cft-builder 0.2.137 → 0.2.138

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.
@@ -4288,7 +4288,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4288
4288
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iwe(t,e){if(t){if(typeof t=="string")return hj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hj(t,e)}}function hj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _we(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function Dwe(t){if(Array.isArray(t))return t}function Nwe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Owe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fwe(t,e,n){return e&&Owe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var kwe="["+x0+Lg+"]+",Pwe=new RegExp("^"+kwe+"$","i"),Mwe="(?:["+Wye+"]["+x0+Lg+"]*|["+x0+Lg+"]+)",Lwe=new RegExp("[^"+x0+Lg+"]+.*$"),Bwe=/[^\d\[\]]/,Vwe=function(){function t(e){var n=e.defaultCountry,r=e.defaultCallingCode,i=e.metadata,a=e.onNationalSignificantNumberChange;Nwe(this,t),this.defaultCountry=n,this.defaultCallingCode=r,this.metadata=i,this.onNationalSignificantNumberChange=a}return Fwe(t,[{key:"input",value:function(n,r){var i=$we(n),a=fj(i,2),s=a[0],l=a[1],c=Y1(s),u;return l&&(r.digits||(r.startInternationalNumber(),c||(u=!0))),c&&this.inputDigits(c,r),{digits:c,justLeadingPlus:u}}},{key:"inputDigits",value:function(n,r){var i=r.digits,a=i.length<3&&i.length+n.length>=3;if(r.appendDigits(n),a&&this.extractIddPrefix(r),this.isWaitingForCountryCallingCode(r)){if(!this.extractCountryCallingCode(r))return}else r.appendNationalSignificantNumberDigits(n);r.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(r.getNationalDigits(),function(s){return r.update(s)})}},{key:"isWaitingForCountryCallingCode",value:function(n){var r=n.international,i=n.callingCode;return r&&!i}},{key:"extractCountryCallingCode",value:function(n){var r=$Ae("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode,a=r.number;if(i)return n.setCallingCode(i),n.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var r=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=r&&Bwe.test(r)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,r){if(this.hasSelectedNumberingPlan){var i=IS(n,this.metadata),a=i.nationalPrefix,s=i.nationalNumber,l=i.carrierCode;if(s!==n)return this.onExtractedNationalNumber(a,l,s,n,r),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,r,i){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,i);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=IS(n,this.metadata),s=a.nationalPrefix,l=a.nationalNumber,c=a.carrierCode;if(l!==r)return this.onExtractedNationalNumber(s,c,l,n,i),!0}}},{key:"onExtractedNationalNumber",value:function(n,r,i,a,s){var l,c,u=a.lastIndexOf(i);if(u>=0&&u===a.length-i.length){c=!0;var d=a.slice(0,u);d!==n&&(l=d)}s({nationalPrefix:n,carrierCode:r,nationalSignificantNumber:i,nationalSignificantNumberMatchesInput:c,complexPrefixBeforeNationalSignificantNumber:l}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){if(this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,function(r){return n.update(r)}))return!0;if(this.extractIddPrefix(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0;if(this.fixMissingPlus(n))return this.extractCallingCodeAndNationalSignificantNumber(n),!0}},{key:"extractIddPrefix",value:function(n){var r=n.international,i=n.IDDPrefix,a=n.digits;if(n.nationalSignificantNumber,!(r||i)){var s=Z$(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);if(s!==void 0&&s!==a)return n.update({IDDPrefix:a.slice(0,a.length-s.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var r=tj(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),i=r.countryCallingCode;if(r.number,i)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:i}),!0}}},{key:"startInternationalNumber",value:function(n,r){var i=r.country,a=r.callingCode;n.startInternationalNumber(i,a),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),function(r){return n.update(r)})}}]),t}();function qwe(t){var e=t.search(Mwe);if(!(e<0)){t=t.slice(e);var n;return t[0]==="+"&&(n=!0,t=t.slice(1)),t=t.replace(Lwe,""),n&&(t="+"+t),t}}function Uwe(t){var e=qwe(t)||"";return e[0]==="+"?[e.slice(1),!0]:[e]}function $we(t){var e=Uwe(t),n=fj(e,2),r=n[0],i=n[1];return Pwe.test(r)||(r=""),[r,i]}function jwe(t,e){return Kwe(t)||Ywe(t,e)||Hwe(t,e)||zwe()}function zwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4289
4289
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hwe(t,e){if(t){if(typeof t=="string")return pj(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 pj(t,e)}}function pj(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 Ywe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,l;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(c){a=!0,l=c}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw l}}return r}}function Kwe(t){if(Array.isArray(t))return t}function Rwe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xwe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gwe(t,e,n){return e&&Xwe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var z5=function(){function t(e,n){Rwe(this,t),this.metadata=new bo(n);var r=this.getCountryAndCallingCode(e),i=jwe(r,2),a=i[0],s=i[1];this.defaultCountry=a,this.defaultCallingCode=s,this.reset()}return Gwe(t,[{key:"getCountryAndCallingCode",value:function(n){var r,i;return n&&(B5(n)?(r=n.defaultCountry,i=n.defaultCallingCode):r=n),r&&!this.metadata.hasCountry(r)&&(r=void 0),[r,i]}},{key:"input",value:function(n){var r=this.parser.input(n,this.state),i=r.digits,a=r.justLeadingPlus;if(a)this.formattedOutput="+";else if(i){this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state);var s;if(this.metadata.hasSelectedNumberingPlan()&&(s=this.formatter.format(i,this.state)),s===void 0&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var l=this.state.getNationalDigits();l&&(s=this.formatter.format(l,this.state))}this.formattedOutput=s?this.getFullNumber(s):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new XAe({onCountryChange:function(i){n.country=i},onCallingCodeChange:function(i,a){n.metadata.selectNumberingPlan(a,i),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new Twe({state:this.state,metadata:this.metadata}),this.parser=new Vwe({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){var n=this.state.digits;if(n)return this._getCountry()}},{key:"_getCountry",value:function(){var n=this.state.country;return n}},{key:"determineTheCountryIfNeeded",value:function(){(!this.state.country||this.isCountryCallingCodeAmbiguous())&&this.determineTheCountry()}},{key:"getFullNumber",value:function(n){var r=this;if(this.isInternational()){var i=function(l){return r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!l})+l},a=this.state.callingCode;return i(a?n?"".concat(a," ").concat(n):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.complexPrefixBeforeNationalSignificantNumber,a=n.nationalPrefix,s=r,l=i||a;return l&&(s=l+s),s}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,Hc)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,r=this.metadata.getCountryCodesForCallingCode(n);return r&&r.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(HAe(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,r=n.digits,i=n.callingCode,a=n.country,s=n.nationalSignificantNumber;if(r){if(this.isInternational())return i?"+"+i+s:"+"+r;if(a||i){var l=a?this.metadata.countryCallingCode():i;return"+"+l+s}}}},{key:"getNumber",value:function(){var n=this.state,r=n.nationalSignificantNumber,i=n.carrierCode,a=n.callingCode,s=this._getCountry();if(r&&!(!s&&!a)){if(s&&s===this.defaultCountry){var l=new bo(this.metadata.metadata);l.selectNumberingPlan(s);var c=l.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(c);if(u.length>1){var d=rj(r,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});d&&(s=d)}}var f=new MAe(s||a,r,this.metadata.metadata);return i&&(f.carrierCode=i),f}}},{key:"isPossible",value:function(){var n=this.getNumber();return n?n.isPossible():!1}},{key:"isValid",value:function(){var n=this.getNumber();return n?n.isValid():!1}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function Wwe(t,e,n){return n||(n=e,e=void 0),new z5(e,n).input(t)}function gj(t){var e=t.inputFormat,n=t.country,r=t.metadata;return e==="NATIONAL_PART_OF_INTERNATIONAL"?"+".concat(H1(n,r)):""}function H5(t,e){return e&&(t=t.slice(e.length),t[0]===" "&&(t=t.slice(1))),t}function Qwe(t,e,n){if(!(n&&n.ignoreRest)){var r=function(a){if(n)switch(a){case"end":n.ignoreRest=!0;break}};return j$(t,e,r)}}function mj(t){var e=t.onKeyDown,n=t.inputFormat;return F.useCallback(function(r){if(r.keyCode===Zwe&&n==="INTERNATIONAL"&&r.target instanceof HTMLInputElement&&Jwe(r.target)===eSe.length){r.preventDefault();return}e&&e(r)},[e,n])}function Jwe(t){return t.selectionStart}var Zwe=8,eSe="+",tSe=["onKeyDown","country","inputFormat","metadata","international","withCountryCallingCode"];function FS(){return FS=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},FS.apply(this,arguments)}function nSe(t,e){if(t==null)return{};var n=rSe(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 rSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function iSe(t){function e(n,r){var i=n.onKeyDown,a=n.country,s=n.inputFormat,l=n.metadata,c=l===void 0?t:l;n.international,n.withCountryCallingCode;var u=nSe(n,tSe),d=F.useCallback(function(h){var g=new z5(a,c),v=gj({inputFormat:s,country:a,metadata:c}),m=g.input(v+h),A=g.getTemplate();return v&&(m=H5(m,v),A&&(A=H5(A,v))),{text:m,template:A}},[a,c]),f=mj({onKeyDown:i,inputFormat:s});return F.createElement(Mg,FS({},u,{ref:r,parse:Qwe,format:d,onKeyDown:f}))}return e=F.forwardRef(e),e.propTypes={value:In.string.isRequired,onChange:In.func.isRequired,onKeyDown:In.func,country:In.string,inputFormat:In.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:In.object},e}const aSe=iSe();var sSe=["value","onChange","onKeyDown","country","inputFormat","metadata","inputComponent","international","withCountryCallingCode"];function kS(){return kS=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},kS.apply(this,arguments)}function oSe(t,e){if(t==null)return{};var n=lSe(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 lSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function cSe(t){function e(n,r){var i=n.value,a=n.onChange,s=n.onKeyDown,l=n.country,c=n.inputFormat,u=n.metadata,d=u===void 0?t:u,f=n.inputComponent,h=f===void 0?"input":f;n.international,n.withCountryCallingCode;var g=oSe(n,sSe),v=gj({inputFormat:c,country:l,metadata:d}),m=F.useCallback(function(S){var T=fAe(S.target.value);if(T===i){var C=vj(v,T,l,d);C.indexOf(S.target.value)===0&&(T=T.slice(0,-1))}a(T)},[v,i,a,l,d]),A=mj({onKeyDown:s,inputFormat:c});return F.createElement(h,kS({},g,{ref:r,value:vj(v,i,l,d),onChange:m,onKeyDown:A}))}return e=F.forwardRef(e),e.propTypes={value:In.string.isRequired,onChange:In.func.isRequired,onKeyDown:In.func,country:In.string,inputFormat:In.oneOf(["INTERNATIONAL","NATIONAL_PART_OF_INTERNATIONAL","NATIONAL","INTERNATIONAL_OR_NATIONAL"]).isRequired,metadata:In.object,inputComponent:In.elementType},e}const uSe=cSe();function vj(t,e,n,r){return H5(Wwe(t+e,n,r),t)}function dSe(t){if(t.length<2||t[0]!=="+")return!1;for(var e=1;e<t.length;){var n=t.charCodeAt(e);if(!(n>=48&&n<=57))return!1;e++}return!0}function fSe(t){dSe(t)||console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got",t)}var hSe=In.shape({country_calling_codes:In.object.isRequired,countries:In.object.isRequired});In.objectOf(In.string);function PS(t,e){var n="+"+H1(t,e);return n}function Bg(t,e){return vSe(t)||mSe(t,e)||gSe(t,e)||pSe()}function pSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4290
4290
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gSe(t,e){if(t){if(typeof t=="string")return bj(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 bj(t,e)}}function bj(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 mSe(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)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 vSe(t){if(Array.isArray(t))return t}function bSe(t){var e=this,n=t.value,r=t.onChange,i=t.country,a=t.defaultCountry,s=t.international,l=t.withCountryCallingCode,c=t.useNationalFormatForDefaultCountryValue,u=t.metadata;typeof l=="boolean"&&!(i&&s)&&console.error("[react-phone-number-input] `withCountryCallingCode` property can only be used together with `country` and `international` properties"),i&&a&&console.error("[react-phone-number-input] When `country` property is passed, `defaultCountry` property has no effect and therefore shouldn't be passed"),typeof s=="boolean"&&!i&&console.error("[react-phone-number-input] `international` property can only be used together with `country` property");var d=ASe({international:s,country:i,defaultCountry:a,withCountryCallingCode:l}),f=F.useRef(),h=function(W,Q,Z){console.error("[react-phone-number-input] Expected phone number ".concat(W," to correspond to country ").concat(Q," but ").concat(Z?"in reality it corresponds to country "+Z:"it doesn't",".")),f.current=!0},g=function(W){return n&&fSe(n),ySe(n,i,a,d,c,u,function(){W&&W.onCountryMismatch&&W.onCountryMismatch();for(var Q=arguments.length,Z=new Array(Q),H=0;H<Q;H++)Z[H]=arguments[H];h.apply(e,Z)})},v=F.useState(i),m=Bg(v,2),A=m[0],S=m[1],T=F.useState(a),C=Bg(T,2),x=C[0],w=C[1],I=F.useState(g()),_=Bg(I,2),N=_[0],O=_[1],k=F.useState(n),M=Bg(k,2),j=M[0],P=M[1],$=F.useState(),K=Bg($,2);K[0];var ce=K[1],X=F.useCallback(function(){return ce({})},[ce]);function ne(q){if(q){d==="NATIONAL_PART_OF_INTERNATIONAL"&&(q="+".concat(H1(i,u)).concat(q));var W=new z5(i||a,u);return W.input(q),W.getNumberValue()}}F.useEffect(function(){n!==j&&(P(n),O(g()))},[n]),F.useEffect(function(){if(i!==A){S(i);var q,W=g({onCountryMismatch:function(){q=!0}});O(W),q&&P(ne(W))}},[i]),F.useEffect(function(){a!==x&&(w(a),O(g()))},[a]),F.useEffect(function(){j!==n&&r(j)},[j]);var he=F.useCallback(function(q){var W;if(i)if(d==="INTERNATIONAL"){var Q=PS(i,u);if(q.indexOf(Q)!==0){if(q&&q[0]!=="+")q=Q+q;else if(!f.current)return O(Q),P(void 0),X()}}else q&&q[0]==="+"&&(q=q.slice(1));else a||q&&q[0]!=="+"&&(q="+"+q);q&&(W=ne(q)),O(q),P(W)},[i,d,a,u,O,P,X,f]);return{phoneDigits:N,setPhoneDigits:he,inputFormat:d}}function ySe(t,e,n,r,i,a,s){if(e&&r==="INTERNATIONAL"){var l=PS(e,a);return t?(t.indexOf(l)!==0&&s(t,e),t):l}if(!t)return"";if(!e&&!n)return t;var c=new z5(void 0,a);c.input(t);var u=c.getNumber();if(u)if(e)switch(u.country&&u.country!==e?s(t,e,u.country):u.countryCallingCode!==H1(e,a)&&s(t,e),r){case"NATIONAL":return Y1(u.formatNational());case"NATIONAL_PART_OF_INTERNATIONAL":return Y1(H5(u.formatInternational(),PS(e,a)));case"INTERNATIONAL":throw new Error('`inputFormat: "INTERNATIONAL"` case should\'ve already been handled earlier in the code');case"INTERNATIONAL_OR_NATIONAL":throw new Error('`inputFormat: "INTERNATIONAL_OR_NATIONAL"` is not possible when `country` is fixed');default:throw new Error("Unknown `inputFormat`: ".concat(r))}else return u.countryCallingCode&&u.countryCallingCode===H1(n,a)&&i?Y1(u.formatNational()):t;else return""}function ASe(t){var e=t.international,n=t.country,r=t.defaultCountry,i=t.withCountryCallingCode;return n?e?i?"INTERNATIONAL":"NATIONAL_PART_OF_INTERNATIONAL":"NATIONAL":r?"INTERNATIONAL_OR_NATIONAL":"INTERNATIONAL"}var wSe=["Component","country","defaultCountry","useNationalFormatForDefaultCountryValue","value","onChange","metadata","international","withCountryCallingCode"];function MS(){return MS=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},MS.apply(this,arguments)}function SSe(t,e){if(t==null)return{};var n=CSe(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 CSe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Y5(t,e){var n=t.Component,r=t.country,i=t.defaultCountry,a=t.useNationalFormatForDefaultCountryValue,s=a===void 0?!0:a,l=t.value,c=t.onChange,u=t.metadata,d=t.international,f=t.withCountryCallingCode,h=SSe(t,wSe),g=bSe({value:l,onChange:c,country:r,defaultCountry:i,international:d,withCountryCallingCode:f,useNationalFormatForDefaultCountryValue:s,metadata:u}),v=g.phoneDigits,m=g.setPhoneDigits,A=g.inputFormat;return F.createElement(n,MS({},h,{ref:e,metadata:u,inputFormat:A,international:d,withCountryCallingCode:f,country:r||i,value:v,onChange:m}))}Y5=F.forwardRef(Y5),Y5.propTypes={value:In.string,onChange:In.func.isRequired,country:In.string,defaultCountry:In.string,international:In.bool,withCountryCallingCode:In.bool,Component:In.elementType.isRequired,useNationalFormatForDefaultCountryValue:In.bool,metadata:hSe};var xSe=["type","autoComplete","smartCaret","metadata"];function LS(){return LS=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},LS.apply(this,arguments)}function TSe(t,e){if(t==null)return{};var n=ESe(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 ESe(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,a;for(a=0;a<r.length;a++)i=r[a],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function yj(t){function e(n,r){var i=n.type,a=i===void 0?"tel":i,s=n.autoComplete,l=s===void 0?"tel":s,c=n.smartCaret,u=c===void 0?!0:c,d=n.metadata,f=d===void 0?t:d,h=TSe(n,xSe);return F.createElement(Y5,LS({},h,{type:a,autoComplete:l,metadata:f,ref:r,Component:u?aSe:uSe}))}return e=F.forwardRef(e),e.propTypes={type:In.string,autoComplete:In.string,smartCaret:In.bool,metadata:In.object},e}yj();const ISe=yj(Aye),_Se=t=>{var H,Y,oe,be,Ce,ve,ye,te,L,le,ie;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,TASK_PUBLISHED:s,task_status:l}=wr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A,isDisabled:S}=t,{isAdmin:T,isRenderView:C,isPreview:x}=Wt(),[w,I]=F.useState(!1),[_,N]=F.useState(""),[O,k]=F.useState(0),[M,j]=F.useState(!1),[P,$]=F.useState(!1),K=()=>{$(!0)},ce=()=>{$(!1)},X=()=>{var ue,Ne,_e;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const me=[...v.repeatableFields],se=Et.findIndex(me,function(we){return we.uuid===(d==null?void 0:d.uuid)});se>=0&&me[se].fieldData?N(me[se].fieldData):N("")}}else{const me=a;if(me!=null&&me.length){for(const se of me)if(se.fieldId===t.field.uuid&&((ue=se==null?void 0:se.postData[0])==null?void 0:ue.postValue)!==""&&((Ne=se==null?void 0:se.postData[0])!=null&&Ne.postValue)){N((_e=se==null?void 0:se.postData[0])==null?void 0:_e.postValue);break}}}j(!0)};F.useEffect(()=>{M||X();const ue=Qt.addListener("clearRepeatableFields",se=>{se===(v==null?void 0:v.uuid)&&(N(""),k(0),d.isValid=0,u(g,h,m,A,f,d))}),Ne=Qt.addListener("onSubmitUserForm",()=>{var se;(se=d==null?void 0:d.attributes)!=null&&se.required?_?d.isValid=1:d.isValid=0:d.isValid=1}),_e=Qt.addListener("OnInvalidFieldCatch",se=>{d.uuid===(se==null?void 0:se.fieldId)?k(1):k(0)}),me=Qt.addListener("OnGetFieldValue",se=>{var ke;const we=(ke=se==null?void 0:se.repeatableColumn)==null?void 0:ke.filter(R=>(R==null?void 0:R.fieldUuid)===(d==null?void 0:d.uuid));we!=null&&we.length});return()=>{Ne.remove(),_e.remove(),me.remove(),ue.remove()}});const ne=ue=>{I(ue)},he=()=>{I(!1)},q=(ue,Ne)=>{const _e=a,me=Et.cloneDeep(e);if(me[d==null?void 0:d.uuid]=ue,(_e==null?void 0:_e.length)>0)for(const se of _e)se.fieldId===t.field.uuid&&(se.postData[0]={postValue:ue});if(!(v!=null&&v.rowIsRepeatable)){n(me);const se=Object.keys(me).length;r(se)}},W=(ue,Ne)=>{var _e;if(a){const me=[...a],se=Et.findIndex(me,function(ke){return ke.rowId===(v==null?void 0:v.uuid)});let we=(_e=a[se])==null?void 0:_e.repeatableFields;we={...we,[ue==null?void 0:ue.uuid]:Ne},me[se]={...me[se],repeatableFields:we},i(me)}N(Ne),Ne!==""?ue.isValid=1:ue.isValid=0},Q=ue=>{v!=null&&v.rowIsRepeatable?W(d,ue):q(ue)},Z=o.jsxs("div",{onMouseOver:K,onMouseOut:ce,children:[!C&&!x&&P&&o.jsx(Jr,{handleFieldSettingsSidebar:ne,...t}),o.jsxs("div",{className:`field ${x?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:x?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(H=d==null?void 0:d.headerText)==null?void 0:H[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((Y=d==null?void 0:d.attributes)==null?void 0:Y.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",x?o.jsx(o.Fragment,{children:(oe=d==null?void 0:d.label)==null?void 0:oe[c==null?void 0:c.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(qi,{message:(be=d==null?void 0:d.toolTip)==null?void 0:be[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((ve=(Ce=d==null?void 0:d.icon)==null?void 0:Ce.properties)==null?void 0:ve.name)}),o.jsx(ISe,{id:d==null?void 0:d.uuid,placeholder:(ye=d==null?void 0:d.placeholder)==null?void 0:ye[c==null?void 0:c.type],value:_,onFocus:()=>k(1),onChange:Q,international:!0,className:`${O===1&&((te=d==null?void 0:d.attributes)!=null&&te.required)?_?"valid":"invalid":"valid'"} p-inputtext`,readOnly:S})]}),o.jsx("div",{children:((L=d==null?void 0:d.attributes)==null?void 0:L.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(le=d==null?void 0:d.validationMesssage)==null?void 0:le.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(ie=d==null?void 0:d.helperText)==null?void 0:ie[c==null?void 0:c.type]})})]})]})}),T&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[w===!0&&o.jsx(ea,{visibilty:w,closeSettingFieldSidebar:he,...t}),o.jsx(Ti,{...t,fieldWrap:Z})]})},DSe=t=>{var q,W,Q,Z,H,Y,oe,be,Ce,ve,ye;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,row:a,isDisabled:s}=t,{isPreview:l,isAdmin:c,isRenderView:u}=Wt(),{task_status:d,taskRegisterData:f,updateTaskRegisterData:h,updateTaskProgressValue:g,updateUserFormDataSubmit:v,userTaskSubmitFormData:m,TASK_PUBLISHED:A}=wr(),{userSelectedLanguage:S}=on(),[T,C]=F.useState(!1),[x,w]=F.useState(""),[I,_]=F.useState(0),[N,O]=F.useState(!1),k=()=>{O(!0)},M=()=>{O(!1)};F.useEffect(()=>{T||ce();const te=Qt.addListener("clearRepeatableFields",le=>{le===(a==null?void 0:a.uuid)&&(w(""),_(0),e.isValid=0)}),L=Qt.addListener("onSubmitUserForm",()=>{var le;(le=e==null?void 0:e.attributes)!=null&&le.required?x!==""&&mu.test(x)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{L.remove(),te.remove()}});const[j,P]=F.useState(!1),$=te=>{P(te)},K=()=>{P(!1)},ce=()=>{var te,L,le;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const ie=[...a.repeatableFields],ue=Et.findIndex(ie,function(Ne){return Ne.uuid===(e==null?void 0:e.uuid)});ue>=0&&ie[ue].fieldData?w(ie[ue].fieldData):w("")}}else{const ie=m;if(ie!=null&&ie.length){for(const ue of ie)if(ue.fieldId===t.field.uuid&&((te=ue==null?void 0:ue.postData[0])==null?void 0:te.postValue)!==""&&((L=ue==null?void 0:ue.postData[0])!=null&&L.postValue)){w((le=ue==null?void 0:ue.postData[0])==null?void 0:le.postValue),C(!0);break}}}C(!0)},X=te=>{w(te);const L=m,le=Et.cloneDeep(f);if(te!==""&&mu.test(te)===!0){if(le[e==null?void 0:e.uuid]=te,(L==null?void 0:L.length)>0)for(const ie of L)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:te})}else if(delete le[e==null?void 0:e.uuid],(L==null?void 0:L.length)>0)for(const ie of L)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:""});if(!(a!=null&&a.rowIsRepeatable)){h(le);const ie=Object.keys(le).length;g(ie)}},ne=(te,L)=>{var me;const le=[...m],ie=Et.findIndex(le,function(se){return se.rowId===(a==null?void 0:a.uuid)});let ue=(me=m[ie])==null?void 0:me.repeatableFields;const Ne=te,_e=Ne==null?void 0:Ne.uuid;ue={...ue,[_e]:L},le[ie]={...le[ie],repeatableFields:ue},v(le),w(L),L!==""&&mu.test(L)===!0?e.isValid=1:e.isValid=0},he=o.jsxs("div",{onMouseOver:k,onMouseOut:M,children:[!u&&!l&&N&&o.jsx(Jr,{handleFieldSettingsSidebar:$,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid"}),(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(q=e==null?void 0:e.headerText)==null?void 0:q[S==null?void 0:S.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((W=e==null?void 0:e.attributes)==null?void 0:W.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(Q=e==null?void 0:e.label)==null?void 0:Q[S==null?void 0:S.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:(Z=e==null?void 0:e.toolTip)==null?void 0:Z[S==null?void 0:S.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((Y=(H=e==null?void 0:e.icon)==null?void 0:H.properties)==null?void 0:Y.name)}),o.jsx(wn,{id:e==null?void 0:e.uuid,placeholder:(oe=e==null?void 0:e.placeholder)==null?void 0:oe[S==null?void 0:S.type],value:x,onFocus:()=>_(1),onChange:te=>{a!=null&&a.rowIsRepeatable?ne(r,i):X(te.target.value)},className:I===1&&((be=e==null?void 0:e.attributes)!=null&&be.required)?x?"valid":"invalid":"valid'",readOnly:s})]}),((Ce=e==null?void 0:e.attributes)==null?void 0:Ce.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:I===1&&!x?(ve=e==null?void 0:e.validationMesssage)==null?void 0:ve[S==null?void 0:S.type]:""})}),x!==""&&I===1&&mu.test(x)===!1&&o.jsx("small",{className:"error",children:"Please enter correct url"}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(ye=e==null?void 0:e.helperText)==null?void 0:ye[S==null?void 0:S.type]})})]}),c&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]});return o.jsxs(o.Fragment,{children:[j===!0&&o.jsx(ea,{visibilty:j,closeSettingFieldSidebar:K,...t},e==null?void 0:e.uuid),o.jsx(Ti,{...t,fieldWrap:he})]})},NSe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwAAAAMACAYAAACTgQCOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAACAAElEQVR42u3deXxcdb3/8ffnTLaWthSUVVuaTMIWKc2cpLWi/oqIeK+4XisuoKDodUNx38H9Ku67IhdwB6NeF1xBqQrWNjOTUgxbM0kLyKp0b7PMnM/vj1ZFtiazZc7M6/l4+LhXxTZ5nzPnfN9zvt/vMQEAakI6DJv3j6L5gft8NTfPN/f5cp8fuR+gIJhv7vNdag7M5sm91aXZkvaTe4uk/c2sSdL+kuRSQtK8h/hr5khqfsB/Nilpx0P8s9tMKuz9/7e6e17SVplNSNpp0i6ZjUfu20yadLMtiqItgdlmmW1xsy2anNwSmW3ZGgRbejOZSY4yAMw8IwIAqAxfuTKxcePGg6IoOsjMDlUUHeJBcJBJh8n9YHc/2MwOdelgSfMl7VfnkeyUtMWke1y606R73f1uBcFdFkX3Kgjudve7giC4d9GiRfdaf3+BswgAKAAAUDM2HXfcARNtbYcH0mFeKHRYEBxu0mEeRR1m1uHSQklNJFW0zZJGJI2YdKdLd5g04tKdhSC4o2tgYKNJETEBAAUAAMoiHYbN892PkNQZSEkPgk65d7qUNKldUhspzagxl0bNbFhRNGxSzqThgpTbYraJKUcAQAEAgIc0vHjxwWpu7jbpGEndkjolJSUdIb7Bj6u8pE0uDZvZsNyHXLrJo+gvXYOD9xIPAAoAADSATccdd0C+paXb3Y8NzLrd/ViZdUs6jHQaymZJI+5+g5kNmfsN+URiqGtgYNQkJx4AFAAAiKFbe3oOz5uFHgSh3ENJ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k/X0xRXADKINTxF4j/24VJbCa5iGyc6+UuajmhzI9s4keAqYGvvL8h/cPLPwxWATNJNDLKY7wPtHl3iW8Al0eIXPfp8SRWXhnk98AfAO3p0iVsZZfXU2Sj1mQUgozTC4cAPSRzQxY99kOB3osk1XfxMSTWWhjmHySJweBc/9iGCVb4GOB+3ADKKJr8isRa6chveGME6tnCck7+kbooW15M4AbgSunKA+CESb3Pyz8sVgAJIP+YQxvkz4PRZfsRNwGejxb90MZYkvUIa5njgi8DaWX7EdxjgQz5/JD8LQEFMvbnrIyR+l+kvs/0UuDxa/GUPo0nSK6Rh3kPiKoKl0/wt9xD8O1bwxxF0ehpO02IBKJipw4HvBN4NrAZez4tvDxwD/pnE90n8T9p8128kSbmkRINh3gScT3AqcAIwb+qXJ4C7gO8Df8kG/tqH/RSLBaDg0nUMcByLATiJzU74kooqJRr8hL0B+BmjTviSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJKnG/n/K52f+BC6LdAAAAABJRU5ErkJggg==",kSe=t=>{var he,q,W,Q,Z,H,Y,oe,be;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isAdmin:s,isPreview:l,isRenderView:c}=Wt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:m}=wr(),{userSelectedLanguage:A}=on(),[S,T]=F.useState(!1),[C,x]=F.useState(""),[w,I]=F.useState(0),[_,N]=F.useState(!1),O=()=>{N(!0)},k=()=>{N(!1)};F.useEffect(()=>{S||K();const Ce=Qt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(x(""),I(0),e.isValid=0)}),ve=Qt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?C!==""&&mu.test(C)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ve.remove(),Ce.remove()}});const[M,j]=F.useState(!1),P=Ce=>{j(Ce)},$=()=>{j(!1)},K=()=>{var Ce,ve,ye;if(i!=null&&i.rowIsRepeatable){const te=[...(i==null?void 0:i.repeatableFields)||[]],L=Et.findIndex(te,function(le){return le.uuid===(e==null?void 0:e.uuid)});L>=0&&te[L].fieldData?x(te[L].fieldData):x("")}else{const te=v;if(te!=null&&te.length){for(const L of te)if(L.fieldId===t.field.uuid&&((Ce=L==null?void 0:L.postData[0])==null?void 0:Ce.postValue)!==""&&((ve=L==null?void 0:L.postData[0])!=null&&ve.postValue)){x((ye=L==null?void 0:L.postData[0])==null?void 0:ye.postValue),T(!0);break}}}T(!0)},ce=(Ce,ve)=>{x(ve);const ye=v,te=Et.cloneDeep(d);if(ye!==null){if(ve){if(te[e==null?void 0:e.uuid]=ve,(ye==null?void 0:ye.length)>0)for(const L of ye)L.fieldId===t.field.uuid&&(L.postData[0]={postValue:ve})}else if(delete te[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const L of ye)L.fieldId===t.field.uuid&&(L.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(te);const L=Object.keys(te).length;h(L)}},X=(Ce,ve,ye,te)=>{var ue;const L=[...v],le=Et.findIndex(L,function(Ne){return Ne.rowId===(i==null?void 0:i.uuid)});let ie=(ue=v[le])==null?void 0:ue.repeatableFields;ie={...ie,[ye==null?void 0:ye.uuid]:te},L[le]={...L[le],repeatableFields:ie},g(L),x(te),te!==""&&mu.test(te)===!0?e.isValid=1:e.isValid=0},ne=o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[!c&&!l&&_&&o.jsx(Jr,{handleFieldSettingsSidebar:P,...t}),o.jsxs("div",{className:`field ${l?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:s?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(he=e==null?void 0:e.headerText)==null?void 0:he[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",l?o.jsx(o.Fragment,{children:(W=e==null?void 0:e.label)==null?void 0:W[A==null?void 0:A.type]}):o.jsx(la,{...t}),(e==null?void 0:e.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(qi,{message:(Q=e==null?void 0:e.toolTip)==null?void 0:Q[A==null?void 0:A.type],position:"right"})})]}),o.jsx("div",{children:o.jsx(R6,{cancelIcon:o.jsx("img",{src:NSe,alt:"custom-cancel-image",width:"25px",height:"25px"}),offIcon:o.jsx("img",{src:OSe,alt:"custom-image-active",width:"25px",height:"25px"}),onIcon:o.jsx("img",{src:FSe,alt:"custom-image",width:"25px",height:"25px"}),id:e==null?void 0:e.uuid,placeholder:(Z=e==null?void 0:e.placeholder)==null?void 0:Z[A==null?void 0:A.type],value:C,onFocus:()=>I(1),onChange:Ce=>{i!=null&&i.rowIsRepeatable?X(n,r,e,Ce.value):ce(Ce,Ce.value)},className:w===1&&((H=e==null?void 0:e.attributes)!=null&&H.required)?C?"valid":"invalid":"valid'",readOnly:a})}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:w===1&&!C?(oe=e==null?void 0:e.validationMesssage)==null?void 0:oe[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(be=e==null?void 0:e.helperText)==null?void 0:be[A==null?void 0:A.type]})})]})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[M===!0&&o.jsx(ea,{visibilty:M,closeSettingFieldSidebar:$,...t},e==null?void 0:e.uuid),o.jsx(Ti,{...t,fieldWrap:ne})]})},PSe=t=>{var he,q,W,Q,Z,H,Y,oe,be;const{field:e,pageIndex:n,sectionIndex:r,row:i,isDisabled:a}=t,{isPreview:s,isAdmin:l,isRenderView:c}=Wt(),{task_status:u,taskRegisterData:d,updateTaskRegisterData:f,updateTaskProgressValue:h,updateUserFormDataSubmit:g,userTaskSubmitFormData:v,TASK_PUBLISHED:m}=wr(),{userSelectedLanguage:A}=on(),[S,T]=F.useState(!1),[C,x]=F.useState(""),[w,I]=F.useState(0),[_,N]=F.useState(!1),O=()=>{N(!0)},k=()=>{N(!1)};F.useEffect(()=>{S||K();const Ce=Qt.addListener("clearRepeatableFields",ye=>{ye===(i==null?void 0:i.uuid)&&(x(""),I(0),e.isValid=0)}),ve=Qt.addListener("onSubmitUserForm",()=>{var ye;(ye=e==null?void 0:e.attributes)!=null&&ye.required?C!==""&&mu.test(C)===!0?e.isValid=1:e.isValid=0:e.isValid=1});return()=>{ve.remove(),Ce.remove()}});const[M,j]=F.useState(!1),P=Ce=>{j(Ce)},$=()=>{j(!1)},K=()=>{var Ce,ve,ye;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const te=[...i.repeatableFields],L=Et.findIndex(te,function(le){return le.uuid===(e==null?void 0:e.uuid)});L>=0&&te[L].fieldData?x(te[L].fieldData):x("")}}else{const te=v;if(te!=null&&te.length){for(const L of te)if(L.fieldId===t.field.uuid&&((Ce=L==null?void 0:L.postData[0])==null?void 0:Ce.postValue)!==""&&((ve=L==null?void 0:L.postData[0])!=null&&ve.postValue)){x((ye=L==null?void 0:L.postData[0])==null?void 0:ye.postValue),T(!0);break}}}T(!0)},ce=(Ce,ve)=>{x(ve);const ye=v,te=Et.cloneDeep(d);if(ye!==null){if(ve){if(te[e==null?void 0:e.uuid]=ve,(ye==null?void 0:ye.length)>0)for(const L of ye)L.fieldId===t.field.uuid&&(L.postData[0]={postValue:ve})}else if(delete te[e==null?void 0:e.uuid],(ye==null?void 0:ye.length)>0)for(const L of ye)L.fieldId===t.field.uuid&&(L.postData[0]={postValue:""})}if(!(i!=null&&i.rowIsRepeatable)){f(te);const L=Object.keys(te).length;h(L)}},X=(Ce,ve,ye,te)=>{var ue;const L=[...v],le=Et.findIndex(L,function(Ne){return Ne.rowId===(i==null?void 0:i.uuid)});let ie=(ue=v[le])==null?void 0:ue.repeatableFields;ie={...ie,[ye==null?void 0:ye.uuid]:te},L[le]={...L[le],repeatableFields:ie},g(L),x(te),te!==""&&mu.test(te)===!0?e.isValid=1:e.isValid=0},ne=o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[!c&&!s&&_&&o.jsx(Jr,{handleFieldSettingsSidebar:P,...t}),o.jsx("div",{className:`field ${s?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:s?"col-12 p-fluid":"col-12 p-fluid field-form-builder",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(he=e==null?void 0:e.headerText)==null?void 0:he[A==null?void 0:A.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:e.uuid,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((q=e==null?void 0:e.attributes)==null?void 0:q.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",s?o.jsx(o.Fragment,{children:(W=e==null?void 0:e.label)==null?void 0:W[A==null?void 0:A.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:(Q=e==null?void 0:e.toolTip)==null?void 0:Q[A==null?void 0:A.type],position:"right"})})]}),o.jsx(W6,{id:e==null?void 0:e.uuid,placeholder:(Z=e==null?void 0:e.placeholder)==null?void 0:Z[A==null?void 0:A.type],value:C,onFocus:()=>I(1),onChange:Ce=>{i!=null&&i.rowIsRepeatable?X(n,r,e,Ce.value):ce(Ce,Ce.value)},className:w===1&&((H=e==null?void 0:e.attributes)!=null&&H.required)?C?"valid":"invalid":"valid'",readOnly:a}),((Y=e==null?void 0:e.attributes)==null?void 0:Y.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:w===1&&!C?(oe=e==null?void 0:e.validationMesssage)==null?void 0:oe[A==null?void 0:A.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(be=e==null?void 0:e.helperText)==null?void 0:be[A==null?void 0:A.type]})})]}),l&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[M===!0&&o.jsx(ea,{visibilty:M,closeSettingFieldSidebar:$,...t},e==null?void 0:e.uuid),o.jsx(Ti,{...t,fieldWrap:ne})]})},MSe=t=>{var ne,he,q,W,Q,Z;const{field:e,pageIndex:n,sectionIndex:r,row:i}=t,{isPreview:a,isAdmin:s,isRenderView:l}=Wt(),{task_status:c,taskRegisterData:u,updateTaskRegisterData:d,updateTaskProgressValue:f,updateUserFormDataSubmit:h,userTaskSubmitFormData:g,TASK_PUBLISHED:v}=wr(),{userSelectedLanguage:m}=on(),[A,S]=F.useState(!1),[T,C]=F.useState(""),[x,w]=F.useState(0),[I,_]=F.useState(!1),N=()=>{_(!0)},O=()=>{_(!1)};F.useEffect(()=>{A||$();const H=Qt.addListener("clearRepeatableFields",oe=>{oe===(i==null?void 0:i.uuid)&&(C(""),w(0),e.isValid=0)}),Y=Qt.addListener("onSubmitUserForm",()=>{var oe;(oe=e==null?void 0:e.attributes)!=null&&oe.required&&(T!==""&&mu.test(T)===!0?e.isValid=1:e.isValid=0)});return()=>{Y.remove(),H.remove()}});const[k,M]=F.useState(!1),j=H=>{M(H)},P=()=>{M(!1)},$=()=>{var H,Y,oe;if(i!=null&&i.rowIsRepeatable){if(i!=null&&i.repeatableFields){const be=[...i.repeatableFields],Ce=Et.findIndex(be,function(ve){return ve.uuid===(e==null?void 0:e.uuid)});Ce>=0&&be[Ce].fieldData?C(be[Ce].fieldData):C("")}}else{const be=g;if(be!=null&&be.length){for(const Ce of be)if(Ce.fieldId===t.field.uuid&&((H=Ce==null?void 0:Ce.postData[0])==null?void 0:H.postValue)!==""&&((Y=Ce==null?void 0:Ce.postData[0])!=null&&Y.postValue)){C((oe=Ce==null?void 0:Ce.postData[0])==null?void 0:oe.postValue),S(!0);break}}}S(!0)},K=(H,Y)=>{C(Y);const oe=g,be=Et.cloneDeep(u);if(Y){if(be[e==null?void 0:e.uuid]=Y,(oe==null?void 0:oe.length)>0)for(const Ce of oe)Ce.fieldId===t.field.uuid&&(Ce.postData[0]={postValue:Y})}else if(delete be[e==null?void 0:e.uuid],(oe==null?void 0:oe.length)>0)for(const Ce of oe)Ce.fieldId===t.field.uuid&&(Ce.postData[0]={postValue:""});if(!(i!=null&&i.rowIsRepeatable)){d(be);const Ce=Object.keys(be).length;f(Ce)}},ce=(H,Y,oe,be)=>{var te;const Ce=[...g],ve=Et.findIndex(Ce,function(L){return L.rowId===(i==null?void 0:i.uuid)});let ye=(te=g[ve])==null?void 0:te.repeatableFields;ye={...ye,[oe==null?void 0:oe.uuid]:be},Ce[ve]={...Ce[ve],repeatableFields:ye},h(Ce),C(be),be!==""&&mu.test(be)===!0?e.isValid=1:e.isValid=0},X=o.jsxs("div",{onMouseOver:N,onMouseOut:O,children:[!l&&!a&&I&&o.jsx(Jr,{handleFieldSettingsSidebar:j,...t}),o.jsxs("div",{className:`field ${a?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" p-fluid ":" "} ${l?" ":" py-6 px-4 card"}`,children:[o.jsxs("div",{className:a?"p-fluid":"card p-fluid field-form-builder",children:[!a&&o.jsx("label",{className:"block font-medium mb-3 text-700 text-2xl",children:"Hidden field"}),o.jsx(wn,{type:a===!0?"hidden":"text",id:e==null?void 0:e.uuid,placeholder:(ne=e==null?void 0:e.placeholder)==null?void 0:ne[m==null?void 0:m.type],value:(he=e==null?void 0:e.defaultValue)==null?void 0:he[m==null?void 0:m.type],onFocus:()=>w(1),onLoad:()=>{i!=null&&i.rowIsRepeatable?ce(n,r,e,e==null?void 0:e.defaultValue):K("",e==null?void 0:e.defaultValue)},className:x===1&&((q=e==null?void 0:e.attributes)!=null&&q.required)?T?"valid":"invalid":"valid'",readOnly:c===v}),((W=e==null?void 0:e.attributes)==null?void 0:W.required)&&o.jsx("div",{children:o.jsx("small",{className:"error",children:x===1&&!T?(Q=e==null?void 0:e.validationMesssage)==null?void 0:Q[m==null?void 0:m.type]:""})}),(e==null?void 0:e.showHelperText)&&o.jsx("div",{children:o.jsx("small",{children:(Z=e==null?void 0:e.helperText)==null?void 0:Z[m==null?void 0:m.type]})})]}),s&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[k===!0&&o.jsx(ea,{visibilty:k,closeSettingFieldSidebar:P,...t}),o.jsx(Ti,{...t,fieldWrap:X})]})},Aj=t=>{var x;const{field:e,fieldIndex:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,path:l,labelType:c}=t,[u,d]=F.useState(e),{isPreview:f}=Wt();F.useEffect(()=>{var w;return T((w=e[c])==null?void 0:w[h==null?void 0:h.type]),()=>{}},[e]);const{userSelectedLanguage:h,fieldSettingUpdate:g,fieldSettingUpdateInlineConditional:v,gridComponentFieldSettingUpdate:m}=on(),A=(w,I,_)=>{d(N=>({...N,[w]:{...N[w],[I==null?void 0:I.type]:_}}))},[S,T]=F.useState((x=e[c])==null?void 0:x[h==null?void 0:h.type]);F.useEffect(()=>(C(),()=>{}),[u]);const C=()=>{const w=l.split("-").map(Number);(t==null?void 0:t.fieldContainer)==="inline-condition-container"?v(w[ga],w[ma],w[Ia],w[_a],w[Da],w[La],w[Jo],w[Eo],u):(w==null?void 0:w.length)>La&&(w==null?void 0:w.length)===Kl+1&&(e!=null&&e.componentType)&&(t==null?void 0:t.fieldContainer)==="grid-container"?m(w[ga],w[ma],w[Ia],w[_a],w[Da],w[5],w[6],w[7],u):g(r,i,a,s,n,{...e,[c]:u[c]})};return o.jsx(o.Fragment,{children:o.jsx(J3,{style:{display:"inline-block"},className:"builder-input-label-edit",html:S,disabled:f,onChange:w=>{var I;T(n4.sanitize((I=w==null?void 0:w.target)==null?void 0:I.value))},onBlur:w=>{var _;const I=n4.sanitize((_=w==null?void 0:w.target)==null?void 0:_.innerText);T(I),A(c,h,I)},tagName:"article"})})},LSe=t=>{var Z,H,Y,oe,be,Ce,ve;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=wr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v,isDisabled:m}=t,{isPreview:A,isAdmin:S,isRenderView:T}=Wt(),[C,x]=F.useState(!1),[w,I]=F.useState(""),[_,N]=F.useState(0),[O,k]=F.useState(!1),[M,j]=F.useState(!1),P=()=>{j(!0)},$=()=>{j(!1)},K=()=>{var ye,te,L;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const le=[...h.repeatableFields],ie=Et.findIndex(le,function(ue){return ue.uuid===(c==null?void 0:c.uuid)});ie>=0&&le[ie].fieldData?I(le[ie].fieldData):I("")}}else{const le=a;if(le!=null&&le.length){for(const ie of le)if(ie.fieldId===t.field.uuid&&((ye=ie==null?void 0:ie.postData[0])==null?void 0:ye.postValue)!==""&&((te=ie==null?void 0:ie.postData[0])!=null&&te.postValue)){I((L=ie==null?void 0:ie.postData[0])==null?void 0:L.postValue);break}}}k(!0)};F.useEffect(()=>{O||K();const ye=Qt.addListener("clearRepeatableFields",ie=>{ie===(h==null?void 0:h.uuid)&&(I(""),N(0),c.isValid=0,l(f,d,g,v,u,c))}),te=Qt.addListener("onSubmitUserForm",()=>{var ie;(ie=c==null?void 0:c.attributes)!=null&&ie.required?w?c.isValid=1:c.isValid=0:c.isValid=1}),L=Qt.addListener("OnInvalidFieldCatch",ie=>{c.uuid===(ie==null?void 0:ie.fieldId)?N(1):N(0)}),le=Qt.addListener("OnGetFieldValue",ie=>{var Ne;const ue=(Ne=ie==null?void 0:ie.repeatableColumn)==null?void 0:Ne.filter(_e=>(_e==null?void 0:_e.fieldUuid)===(c==null?void 0:c.uuid));ue!=null&&ue.length});return()=>{te.remove(),L.remove(),le.remove(),ye.remove()}});const ce=ye=>{x(ye)},X=()=>{x(!1)},ne=ye=>{var le,ie;I(ye.target.value);const te=a,L=Et.cloneDeep(e);if(te!==null){if((le=ye==null?void 0:ye.target)!=null&&le.value){if(L[c==null?void 0:c.uuid]=(ie=ye==null?void 0:ye.target)==null?void 0:ie.value,(te==null?void 0:te.length)>0)for(const ue of te)ue.fieldId===t.field.uuid&&(ue.postData[0]={postValue:ye.target.value})}else if(delete L[c==null?void 0:c.uuid],(te==null?void 0:te.length)>0)for(const ue of te)ue.fieldId===t.field.uuid&&(ue.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(L);const ue=Object.keys(L).length;r(ue)}},he=(ye,te,L,le)=>{var ie;if(a){const ue=[...a],Ne=Et.findIndex(ue,function(me){return me.rowId===(h==null?void 0:h.uuid)});let _e=(ie=a[Ne])==null?void 0:ie.repeatableFields;_e={..._e,[L==null?void 0:L.uuid]:le},ue[Ne]={...ue[Ne],repeatableFields:_e},i(ue)}I(le),le!==""?L.isValid=1:L.isValid=0},q=10,W=()=>{const ye=[];for(let te=0;te<=q;te++)ye.push(o.jsxs("label",{children:[o.jsx("input",{onChange:L=>{h!=null&&h.rowIsRepeatable?he(f,d,c,L.target.value):ne(L)},checked:parseInt(w)===te,name:"liker-scale"+(c==null?void 0:c.uuid),type:"radio",value:te,disabled:m}),o.jsx("span",{children:te})]},`field-${c==null?void 0:c.uuid}-likertScale-${te} ${parseInt(w)===te?"scale-selected":""}`));return ye},Q=o.jsxs("div",{onMouseOver:P,onMouseOut:$,children:[!T&&!A&&M&&o.jsx(Jr,{handleFieldSettingsSidebar:ce,...t}),o.jsxs("div",{className:`field ${A?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsxs("div",{className:"",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(Z=c==null?void 0:c.headerText)==null?void 0:Z[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((H=c==null?void 0:c.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",A?o.jsx(o.Fragment,{children:(Y=c==null?void 0:c.label)==null?void 0:Y[s==null?void 0:s.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(qi,{message:(oe=c==null?void 0:c.toolTip)==null?void 0:oe[s==null?void 0:s.type],position:"right"})})]}),o.jsx("div",{children:o.jsxs("div",{className:"mt-4",children:[o.jsxs("div",{className:"flex justify-content-between mb-3",children:[o.jsx("div",{className:"font-medium text-900 ",children:o.jsx(Aj,{...t,labelType:"startingMessage"})}),o.jsx("div",{className:"font-medium text-900",children:o.jsx(Aj,{...t,labelType:"endingMessage"})})]}),o.jsx("div",{className:"likert",children:W()})]})}),o.jsx("div",{children:((be=c==null?void 0:c.attributes)==null?void 0:be.required)&&o.jsx("small",{className:"error",children:_===1&&!w?(Ce=c==null?void 0:c.validationMesssage)==null?void 0:Ce.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(ve=c==null?void 0:c.helperText)==null?void 0:ve[s==null?void 0:s.type]})})]}),S&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[C===!0&&o.jsx(ea,{visibilty:C,closeSettingFieldSidebar:X,...t}),o.jsx(Ti,{...t,fieldWrap:Q})]})},BSe=t=>{var Z,H,Y,oe,be,Ce,ve,ye,te,L,le,ie;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a,task_status:s,TASK_PUBLISHED:l}=wr(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A,isDisabled:S}=t,{isPreview:T,isAdmin:C,isRenderView:x}=Wt(),[w,I]=F.useState(!1),[_,N]=F.useState(""),[O,k]=F.useState(0),[M,j]=F.useState(!1),[P,$]=F.useState(!1),K=()=>{$(!0)},ce=()=>{$(!1)},X=()=>{var ue,Ne,_e;if(v!=null&&v.rowIsRepeatable){if(v!=null&&v.repeatableFields){const me=[...v.repeatableFields],se=Et.findIndex(me,function(we){return we.uuid===(d==null?void 0:d.uuid)});se>=0&&me[se].fieldData?N(me[se].fieldData):N("")}}else{const me=a;if(me!=null&&me.length){for(const se of me)if(se.fieldId===t.field.uuid&&((ue=se==null?void 0:se.postData[0])==null?void 0:ue.postValue)!==""&&((Ne=se==null?void 0:se.postData[0])!=null&&Ne.postValue)){N((_e=se==null?void 0:se.postData[0])==null?void 0:_e.postValue);break}}}j(!0)};F.useEffect(()=>{M||X();const ue=Qt.addListener("clearRepeatableFields",se=>{se===(v==null?void 0:v.uuid)&&(N(""),k(0),d.isValid=0,u(g,h,m,A,f,d))}),Ne=Qt.addListener("onSubmitUserForm",()=>{var se;(se=d==null?void 0:d.attributes)!=null&&se.required?_?d.isValid=1:d.isValid=0:d.isValid=1}),_e=Qt.addListener("OnInvalidFieldCatch",se=>{d.uuid===(se==null?void 0:se.fieldId)?k(1):k(0)}),me=Qt.addListener("OnGetFieldValue",se=>{var ke;const we=(ke=se==null?void 0:se.repeatableColumn)==null?void 0:ke.filter(R=>(R==null?void 0:R.fieldUuid)===(d==null?void 0:d.uuid));we!=null&&we.length});return()=>{Ne.remove(),_e.remove(),me.remove(),ue.remove()}});const ne=ue=>{I(ue)},he=()=>{I(!1)},q=ue=>{var me,se;N(ue.target.value);const Ne=a,_e=Et.cloneDeep(e);if(Ne!==null){if((me=ue==null?void 0:ue.target)!=null&&me.value){if(_e[d==null?void 0:d.uuid]=(se=ue==null?void 0:ue.target)==null?void 0:se.value,(Ne==null?void 0:Ne.length)>0)for(const we of Ne)we.fieldId===t.field.uuid&&(we.postData[0]={postValue:ue.target.value})}else if(delete _e[d==null?void 0:d.uuid],(Ne==null?void 0:Ne.length)>0)for(const we of Ne)we.fieldId===t.field.uuid&&(we.postData[0]={postValue:""})}if(!(v!=null&&v.rowIsRepeatable)){n(_e);const we=Object.keys(_e).length;r(we)}},W=(ue,Ne)=>{var _e;if(a){const me=[...a],se=Et.findIndex(me,function(ke){return ke.rowId===(v==null?void 0:v.uuid)});let we=(_e=a[se])==null?void 0:_e.repeatableFields;we={...we,[ue==null?void 0:ue.uuid]:Ne},me[se]={...me[se],repeatableFields:we},i(me)}N(Ne),Ne!==""?ue.isValid=1:ue.isValid=0},Q=o.jsxs("div",{onMouseOver:K,onMouseOut:ce,children:[!x&&!T&&P&&o.jsx(Jr,{handleFieldSettingsSidebar:ne,...t}),o.jsxs("div",{className:`field ${T?" ":" builder-element-wrapper "}${(d==null?void 0:d.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:T?"col-12 ":"col-12 p-fluid",children:[(d==null?void 0:d.showHeaderText)&&o.jsx("h6",{children:(Z=d==null?void 0:d.headerText)==null?void 0:Z[c==null?void 0:c.type]}),(d==null?void 0:d.showLabel)&&o.jsxs("label",{htmlFor:f,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((H=d==null?void 0:d.attributes)==null?void 0:H.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",T?o.jsx(o.Fragment,{children:(Y=d==null?void 0:d.label)==null?void 0:Y[c==null?void 0:c.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(d==null?void 0:d.showToolTip)&&o.jsx(qi,{message:(oe=d==null?void 0:d.toolTip)==null?void 0:oe[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs("span",{className:"p-input-icon-"+(d==null?void 0:d.iconAlignment),children:[(d==null?void 0:d.showIcon)&&o.jsx("i",{className:"pi pi-"+((Ce=(be=d==null?void 0:d.icon)==null?void 0:be.properties)==null?void 0:Ce.name)}),o.jsx(wn,{id:d==null?void 0:d.uuid,placeholder:(ve=d==null?void 0:d.placeholder)==null?void 0:ve[c==null?void 0:c.type],value:_,onFocus:()=>k(1),onChange:ue=>{v!=null&&v.rowIsRepeatable?W(d,ue.target.value):q(ue)},className:O===1&&((ye=d==null?void 0:d.attributes)!=null&&ye.required)?_?"valid mt-2 mr-2":"invalid mt-2":"valid mt-2",readOnly:S})]}),o.jsx("div",{children:((te=d==null?void 0:d.attributes)==null?void 0:te.required)&&o.jsx("small",{className:"error",children:O===1&&!_?(L=d==null?void 0:d.validationMesssage)==null?void 0:L.english:""})}),o.jsx("div",{children:(d==null?void 0:d.showHelperText)&&o.jsx("small",{children:(le=d==null?void 0:d.helperText)==null?void 0:le[c==null?void 0:c.type]})})]})]})}),o.jsx("p",{className:"text-center",children:o.jsx("span",{className:`${(ie=d==null?void 0:d.fontStyle)==null?void 0:ie.font} text-center`,style:{fontSize:d==null?void 0:d.fontSize},children:_})}),C&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[w===!0&&o.jsx(ea,{visibilty:w,closeSettingFieldSidebar:he,...t}),o.jsx(Ti,{...t,fieldWrap:Q})]})},VSe=t=>{var ye,te,L,le,ie,ue,Ne,_e,me,se,we,ke,R,Ae,Se,fe,ge;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,TASK_PUBLISHED:a,task_status:s}=wr(),{globalAlignment:l}=Wt(),{userSelectedLanguage:c,fieldSettingUpdate:u}=on(),{isRenderView:d,isAdmin:f,isPreview:h}=Wt(),g=pe=>{const Be=pe.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",De=`${pe.className} justify-content-start`,He=`${pe.titleClassName} pl-1`;return o.jsxs("div",{className:De,children:[o.jsxs("button",{className:pe.togglerClassName,onClick:pe.onTogglerClick,children:[o.jsx("span",{className:Be}),o.jsx(tn,{})]}),o.jsx("span",{className:He,children:X})]})},{field:v,fieldIndex:m,sectionIndex:A,pageIndex:S,row:T,rowIndex:C,columnIndex:x,isDisabled:w}=t,[I,_]=F.useState(!1),[N,O]=F.useState(null),[k,M]=F.useState({country:null,city:null,state:null,addressOne:null,addressTwo:null,zipcode:null,isBillingAddressSame:!1,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}),[j,P]=F.useState(!1),$=()=>{P(!0)},K=()=>{P(!1)},ce=(pe,Be)=>{let De={...k};De={...De,[pe]:Be},M(De),(De==null?void 0:De.addressOne)!==""&&(De!=null&&De.addressTwo)&&(De!=null&&De.zipcode)&&Ce(De==null?void 0:De.zipcode)?(v.isValid=1,Y(De,!0)):(v.isValid=0,Y(null,!1))},[X]=F.useState((ye=v==null?void 0:v.label)==null?void 0:ye[c==null?void 0:c.type]),[ne,he]=F.useState(0),[q,W]=F.useState(!1),Q=()=>{var pe,Be;if(!(T!=null&&T.rowIsRepeatable)){const De=i;if(De!=null&&De.length){for(const He of De)if(He.fieldId===t.field.uuid&&((pe=He==null?void 0:He.postData[0])!=null&&pe.postValue)){M((Be=He==null?void 0:He.postData[0])==null?void 0:Be.postValue);break}}}W(!0)};F.useEffect(()=>{q||Q();const pe=Qt.addListener("clearRepeatableFields",dt=>{dt===(T==null?void 0:T.uuid)&&(he(0),v.isValid=0,u(S,A,C,x,m,v))}),Be=Qt.addListener("onSubmitUserForm",()=>{var dt;(dt=v==null?void 0:v.attributes)!=null&&dt.required?(k==null?void 0:k.addressOne)!==""&&(k==null?void 0:k.zipcode)!==""&&Ce(k==null?void 0:k.zipcode)?v.isValid=1:v.isValid=0:v.isValid=1}),De=Qt.addListener("OnInvalidFieldCatch",dt=>{v.uuid===(dt==null?void 0:dt.fieldId)?he(1):he(0)}),He=Qt.addListener("OnGetFieldValue",dt=>{var Lt;const ft=(Lt=dt==null?void 0:dt.repeatableColumn)==null?void 0:Lt.filter(ln=>(ln==null?void 0:ln.fieldUuid)===(v==null?void 0:v.uuid));ft!=null&&ft.length}),it=Qt.addListener("formFieldAdded",dt=>{N===null&&O(dt.uuid)});return()=>{Be.remove(),De.remove(),He.remove(),pe.remove(),it.remove()}});const Z=pe=>{_(pe)},H=()=>{_(!1)},Y=(pe,Be)=>{const De=i,He=Et.cloneDeep(e);if(Be){if(He[v==null?void 0:v.uuid]=pe,(De==null?void 0:De.length)>0)for(const it of De)it.fieldId===t.field.uuid&&(it.postData[0]={postValue:pe})}else if(delete He[v==null?void 0:v.uuid],(De==null?void 0:De.length)>0)for(const it of De)it.fieldId===t.field.uuid&&(it.postData[0]={postValue:pe});if(!(T!=null&&T.rowIsRepeatable)){n(He);const it=Object.keys(He).length;r(it)}},oe=()=>{let pe="";return h||(pe=pe+" field-form-builder"),s===a&&f===!0&&(pe=pe+" card"),pe},be=()=>{let pe=!1;return k.addressOne!==""&&k.zipcode!==""&&Ce(k.zipcode)&&(pe=!0),pe};function Ce(pe){const Be=/\d/.test(pe),De=/[a-zA-Z]/.test(pe);return Be&&De?!0:!!Be}F.useEffect(()=>(N!==null&&setTimeout(()=>{O(null)},1e3),()=>{}),[N]);const ve=o.jsxs("div",{onMouseOver:$,onMouseOut:K,children:[!d&&!h&&j&&o.jsx(Jr,{handleFieldSettingsSidebar:Z,...t}),o.jsxs("div",{className:`field ${h?" ":" builder-element-wrapper "} ${(v==null?void 0:v.isFluid)===!0?" card py-3 px-4 p-fluid":"card p-4"} ${N===(v==null?void 0:v.uuid)?" new-field ":" card "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:h?"col-12 ":"col-11 p-fluid",children:[(v==null?void 0:v.showHeaderText)&&o.jsx("h6",{children:(te=v==null?void 0:v.headerText)==null?void 0:te[c==null?void 0:c.type]}),(v==null?void 0:v.showLabel)&&o.jsxs("label",{htmlFor:m,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((L=v==null?void 0:v.attributes)==null?void 0:L.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",h?o.jsx(o.Fragment,{children:(le=v==null?void 0:v.label)==null?void 0:le[c==null?void 0:c.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(v==null?void 0:v.showToolTip)&&o.jsx(qi,{message:(ie=v==null?void 0:v.toolTip)==null?void 0:ie[c==null?void 0:c.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3 p-fluid",children:[o.jsx("div",{children:o.jsx("label",{className:"w-full",htmlFor:"",children:(ue=v==null?void 0:v.addresslineFirstLabel)==null?void 0:ue[c==null?void 0:c.type]})}),o.jsx(wn,{value:k.addressOne||"",onChange:pe=>ce("addressOne",pe.target.value),className:"my-2 ",readOnly:w}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(Ne=v==null?void 0:v.addresslineSecondLabel)==null?void 0:Ne[c==null?void 0:c.type]})}),o.jsx(wn,{value:k.addressTwo||"",onChange:pe=>ce("addressTwo",pe.target.value),className:"my-2",readOnly:w}),o.jsx("div",{children:o.jsx("label",{htmlFor:"",children:(_e=v==null?void 0:v.postalcodeLabel)==null?void 0:_e[c==null?void 0:c.type]})}),o.jsx(wn,{value:k.zipcode||"",onChange:pe=>ce("zipcode",pe.target.value),className:"my-2",readOnly:w}),o.jsx("p",{children:!Ce(k.zipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})}),((me=v==null?void 0:v.attributes)==null?void 0:me.required)&&!be()&&o.jsx("small",{className:"error",children:ne===1?(se=v==null?void 0:v.validationMesssage)==null?void 0:se.language:""}),(v==null?void 0:v.showBillingAddress)===!0&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"binary",checked:k.isBillingAddressSame,onChange:pe=>{ce("isBillingAddressSame",pe.checked),pe.checked?M(Be=>({...Be,billingCountry:k.country,billingCity:k.city,billingState:k.state,billingAddressOne:k.addressOne,billingAddressTwo:k.addressTwo,billingZipcode:k.zipcode})):M(Be=>({...Be,billingCountry:null,billingCity:null,billingState:null,billingAddressOne:null,billingAddressTwo:null,billingZipcode:null}))},disabled:w}),o.jsx("label",{htmlFor:"binary",children:"Is Billing Address Same"})]}),k.isBillingAddressSame===!1&&o.jsxs(o.Fragment,{children:[(v==null?void 0:v.showLabel)&&o.jsxs("label",{htmlFor:m,className:"flex font-medium mb-3 text-700 text-2xl",children:[((we=v==null?void 0:v.attributes)==null?void 0:we.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",(ke=v==null?void 0:v.billingLabel)==null?void 0:ke[c==null?void 0:c.type],o.jsx("span",{className:"ml-3",children:(v==null?void 0:v.showToolTip)&&o.jsx(qi,{message:(R=v==null?void 0:v.toolTip)==null?void 0:R[c==null?void 0:c.type],position:"right"})})]}),o.jsx("label",{htmlFor:"",children:(Ae=v==null?void 0:v.addresslineFirstLabel)==null?void 0:Ae[c==null?void 0:c.type]}),o.jsx(wn,{value:k.billingAddressOne||"",onChange:pe=>ce("billingAddressOne",pe.target.value),className:"my-2",readOnly:w}),o.jsx("label",{htmlFor:"",children:(Se=v==null?void 0:v.addresslineSecondLabel)==null?void 0:Se[c==null?void 0:c.type]}),o.jsx(wn,{value:k.billingAddressTwo||"",onChange:pe=>ce("billingAddressTwo",pe.target.value),className:"my-2",readOnly:w}),o.jsx("label",{htmlFor:"",children:(fe=v==null?void 0:v.postalcodeLabel)==null?void 0:fe[c==null?void 0:c.type]}),o.jsx(wn,{value:k.billingZipcode||"",onChange:pe=>ce("billingZipcode",pe.target.value),className:"my-2",readOnly:w}),!Ce(k.billingZipcode)&&o.jsx("small",{children:"Cannot be alphabetical only."})]})]}),o.jsx("div",{}),o.jsx("div",{children:(v==null?void 0:v.showHelperText)&&o.jsx("small",{children:(ge=v==null?void 0:v.helperText)==null?void 0:ge[c==null?void 0:c.type]})})]})]})}),f&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[I===!0&&o.jsx(ea,{visibilty:I,closeSettingFieldSidebar:H,...t}),o.jsx("div",{dir:l?"ltr":"rtl",className:oe(),children:s===a&&f===!0?o.jsx(di,{headerTemplate:g,toggleable:!0,children:ve}):ve})]})},qSe=t=>{var C;const{customColumn:e,indexes:n,customColumnIndex:r,path:i,field:a,onSetValuetoPostData:s,sectionIndex:l,page:c,row:u,column:d,section:f,pageIndex:h,rowIndex:g,columnIndex:v}=t,{handleDrop:m}=on(),{isPreview:A,isAdvanceView:S}=Wt(),T=(x,w)=>{s(x,w)};return o.jsxs("div",{className:"p-2 py-4",children:[n&&((C=a.children)==null?void 0:C.length)>0&&a.children.map((x,w)=>{const I=x[`${n.rowIndex}-${n.columnIndex}`];return I?o.jsx("div",{children:o.jsx(Yc,{type:"grid",showFieldIcons:!1,onChange:T,data:I,field:I,path:`${i}-${n.rowIndex}-${n.columnIndex}-${w}`,sectionIndex:l,page:c,column:d,row:u,section:f,pageIndex:h,rowIndex:g,columnIndex:v,fieldIndex:w,fieldContainer:"grid-container"})},`${n.rowIndex}-${n.columnIndex}-${w}`):null}),n&&A===!1&&o.jsx("div",{className:"py-5",children:o.jsx(kr,{isAdvanceView:S,fieldDropArea:!0,data:{path:`${i}-${n.rowIndex}-${r}`,childrenCount:1,droppedField:e},onDrop:m})})]})},wj=t=>{var M,j,P,$,K,ce,X;const{field:e,column:n,section:r,row:i,rowIndex:a,columnIndex:s,sectionIndex:l,isPreview:c,userSelectedLanguage:u,fieldIndex:d,customColumnHeaderTemplate:f,onSetValuetoPostData:h,setAllFields:g,allFields:v,actionHeaderTemplate:m,actionBodyTemplate:A,isFocus:S,inputValue:T,handleFieldSettingsSidebar:C,isAdmin:x,emitSocketData:w,isRenderView:I}=t,[_,N]=F.useState(!1),O=()=>{N(!0)},k=()=>{N(!1)};return o.jsxs("div",{onMouseOver:O,onMouseOut:k,children:[!I&&!c&&_&&o.jsx(Jr,{handleFieldSettingsSidebar:C,...t}),o.jsxs("div",{className:`field ${c?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 ":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(M=e==null?void 0:e.headerText)==null?void 0:M[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:d,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((j=e==null?void 0:e.attributes)==null?void 0:j.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",c?o.jsx(o.Fragment,{children:(P=e==null?void 0:e.label)==null?void 0:P[u==null?void 0:u.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:($=e==null?void 0:e.toolTip)==null?void 0:$[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(lo,{scrollable:!0,showGridlines:!0,columnResizeMode:"expand",resizableColumns:!0,value:e==null?void 0:e.options,tableStyle:{minWidth:"50rem"},children:[e==null?void 0:e.customColumnsForOptions.map((ne,he)=>o.jsx(xr,{style:{minWidth:350},header:f(ne,he),body:(q,W)=>o.jsx(qSe,{customColumn:ne,section:r,column:n,columnIndex:s,row:i,rowIndex:a,sectionIndex:l,e:q,indexes:W,customColumnIndex:he,onSetValuetoPostData:h,setAllFields:g,allFields:v,emitSocketData:w,field:e,...t})},ne==null?void 0:ne.uuid)),!c&&o.jsx(xr,{frozen:!0,header:ne=>m(ne),body:(ne,he)=>A(ne,he),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((K=e==null?void 0:e.attributes)==null?void 0:K.required)&&o.jsx("small",{className:"error",children:S===1&&!T?(ce=e==null?void 0:e.validationMesssage)==null?void 0:ce.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(X=e==null?void 0:e.helperText)==null?void 0:X[u==null?void 0:u.type]})})]})]})}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]})},Sj=t=>{var ye;const{globalAlignment:e}=Wt(),n=te=>{const L=te.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",le=`${te.className} justify-content-start`,ie=`${te.titleClassName} pl-1`;return o.jsxs("div",{className:le,children:[o.jsxs("button",{className:te.togglerClassName,onClick:te.onTogglerClick,children:[o.jsx("span",{className:L}),o.jsx(tn,{})]}),o.jsx("span",{className:ie,children:w})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=wr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{isPreview:c,field:u,fieldIndex:d,sectionIndex:f,pageIndex:h,row:g,rowIndex:v,columnIndex:m,isAdmin:A}=t,[S,T]=F.useState(!1),[C,x]=F.useState(""),[w]=F.useState((ye=u==null?void 0:u.label)==null?void 0:ye[s==null?void 0:s.type]),[I,_]=F.useState(0),[N,O]=F.useState(!1),[k,M]=F.useState(null),[j,P]=F.useState([]),$=()=>{var te,L,le;if(g!=null&&g.rowIsRepeatable){if(g!=null&&g.repeatableFields){const ie=[...g.repeatableFields],ue=Et.findIndex(ie,function(Ne){return Ne.uuid===(u==null?void 0:u.uuid)});ue>=0&&ie[ue].fieldData?x(ie[ue].fieldData):x("")}}else{const ie=r;if(ie!=null&&ie.length){for(const ue of ie)if(ue.fieldId===t.field.uuid&&((te=ue==null?void 0:ue.postData[0])==null?void 0:te.postValue)!==""&&((L=ue==null?void 0:ue.postData[0])!=null&&L.postValue)){x((le=ue==null?void 0:ue.postData[0])==null?void 0:le.postValue);break}}}O(!0)},K=()=>{const te=u;te.customColumnsForOptions=[...te.customColumnsForOptions,{customKey:"Column",uuid:tt()}],ve(te)},[ce,X]=F.useState(!1),ne=(te,L)=>{var le;return o.jsxs(o.Fragment,{children:[((le=u==null?void 0:u.options)==null?void 0:le.length)>1&&o.jsx(Vt,{text:!0,type:"button",className:"p-button-danger left-space ",icon:"pi pi-trash",onClick:()=>W(te==null?void 0:te.uuid,L==null?void 0:L.rowIndex),rounded:!0,severity:"secondary","aria-label":"Bookmark",size:"small"}),o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>be(),"aria-label":"Add Row",size:"small"})]})},he=(te,L)=>{var le;return o.jsxs(o.Fragment,{children:[te==null?void 0:te.customKey,c===!1&&o.jsxs(o.Fragment,{children:[((le=u==null?void 0:u.customColumnsForOptions)==null?void 0:le.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Q(te==null?void 0:te.uuid,L)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{M(te),X(!0)}})]})]})},q=()=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,icon:"pi pi-plus",onClick:()=>K(),rounded:!0,severity:"secondary","aria-label":"Cancel"})}),W=(te,L)=>{var _e,me;const le=(_e=u==null?void 0:u.customColumnsForOptions)==null?void 0:_e.length,ie=[...(u==null?void 0:u.children)||[]];(me=u==null?void 0:u.children)==null||me.map(se=>{for(let we=0;we<le;we++)if(se[`${L}-${we}`]!==void 0){const ke=Et.findIndex(ie,function(R){return R[`${L}-${we}`]!==void 0});ie.splice(ke,1)}});for(let se=0;se<(ie==null?void 0:ie.length);se++){const we=ie[se],R=Object.keys(we)[0].split("-");parseInt(R[0])>L&&(ie[se]={[`${parseInt(R[0])-1}-${R[1]}`]:ie[se][`${parseInt(R[0])}-${R[1]}`]})}const ue=u==null?void 0:u.options.filter(function(se){return(se==null?void 0:se.uuid)!==te}),Ne={...u,children:[...ie]};Ne.options=ue,ve(Ne)},Q=(te,L)=>{var me,se;const le=Et.findIndex(u==null?void 0:u.customColumnsForOptions,we=>we.uuid===te),ie=u==null?void 0:u.customColumnsForOptions.filter(function(we,ke){return ke!==le}),ue=(me=u==null?void 0:u.options)==null?void 0:me.length,Ne=[...(u==null?void 0:u.children)||[]];(se=u==null?void 0:u.children)==null||se.map(we=>{for(let ke=0;ke<ue;ke++)if(we[`${ke}-${L}`]!==void 0){const R=Et.findIndex(Ne,function(Ae){return Ae[`${ke}-${L}`]!==void 0});Ne.splice(R,1)}});for(let we=0;we<(Ne==null?void 0:Ne.length);we++){const ke=Ne[we],Ae=Object.keys(ke)[0].split("-");parseInt(Ae[1])>L&&(Ne[we]={[`${parseInt(Ae[0])}-${parseInt(Ae[1])-1}`]:Ne[we][`${parseInt(Ae[0])}-${Ae[1]}`]})}const _e={...u,children:[...Ne]};_e.customColumnsForOptions=ie,ve(_e)};F.useEffect(()=>{N||$();const te=Qt.addListener("clearRepeatableFields",ue=>{ue===(g==null?void 0:g.uuid)&&(x(""),_(0),u.isValid=0,l(h,f,v,m,d,u))}),L=Qt.addListener("onSubmitUserForm",()=>{var ue;(ue=u==null?void 0:u.attributes)!=null&&ue.required&&(u.isValid=1)}),le=Qt.addListener("OnInvalidFieldCatch",ue=>{u.uuid===(ue==null?void 0:ue.fieldId)?_(1):_(0)}),ie=Qt.addListener("OnGetFieldValue",ue=>{var _e;const Ne=(_e=ue==null?void 0:ue.repeatableColumn)==null?void 0:_e.filter(me=>(me==null?void 0:me.fieldUuid)===(u==null?void 0:u.uuid));Ne!=null&&Ne.length});return()=>{L.remove(),le.remove(),ie.remove(),te.remove()}});const Z=te=>{T(te)},H=()=>{T(!1)},Y=(te,L)=>{var ie;const le=r;if((le==null?void 0:le.length)>0)for(const ue of le)ue.fieldId===t.field.uuid&&(ue.postData[0]={postValue:{...(ie=ue.postData[0])==null?void 0:ie.postValue,[te]:L}})},oe=()=>{let te="";return c||(te=te+" field-form-builder"),a===i&&A===!0&&(te=te+" card"),te},be=()=>{const te=u;te.options=[...te.options,{uuid:tt(),custom_values:{}}],ve(te)},Ce=(te,L)=>{M(Ne=>Ne===null?{customKey:L,uuid:""}:{...Ne,customKey:L});const le=u.customColumnsForOptions,ie=le.findIndex(Ne=>Ne.uuid===te.uuid);le[ie]={...le[ie],customKey:L};const ue=u;ue.customColumnsForOptions=le,ve(ue)},ve=te=>{l(h,f,v,m,d,te)};return o.jsxs(o.Fragment,{children:[o.jsx(Gs,{maximizable:!0,header:"Update column title",visible:ce,style:{width:"20vw"},footer:()=>o.jsx(Vt,{text:!0,label:"Save",onClick:()=>X(!1)}),onHide:()=>X(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(k==null?void 0:k.customKey)||"",onChange:te=>Ce(k,te.target.value)})})}),S&&o.jsx(ea,{visibilty:S,closeSettingFieldSidebar:H,...t}),o.jsx("div",{dir:e,className:oe(),children:a===i&&A===!0?o.jsx(di,{headerTemplate:n,toggleable:!0,children:o.jsx(wj,{...t,field:u,isPreview:c,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:he,onSetValuetoPostData:Y,setAllFields:te=>P(te),allFields:j,actionHeaderTemplate:q,actionBodyTemplate:ne,addOption:be,isFocus:I,inputValue:C,handleFieldSettingsSidebar:Z,isAdmin:A})}):o.jsx(wj,{...t,field:u,isPreview:c,userSelectedLanguage:s,fieldIndex:d,pageIndex:h,columnIndex:m,customColumnHeaderTemplate:he,onSetValuetoPostData:Y,setAllFields:te=>P(te),allFields:j,actionHeaderTemplate:q,actionBodyTemplate:ne,addOption:be,isFocus:I,inputValue:C,handleFieldSettingsSidebar:Z,isAdmin:A})})]})},USe=t=>{const{customColumn:e,indexes:n,customColumnIndex:r,setAllFields:i,allFields:a}=t,s=l=>{const c={...a};c[`${n==null?void 0:n.rowIndex}-${r}`]=l,i(c)};return o.jsx("div",{children:o.jsx(Va,{value:a[`${n==null?void 0:n.rowIndex}-${r}`],options:e.options,onChange:l=>s(l.value),optionLabel:"label",placeholder:"Select"})})},Cj=t=>{var x,w,I,_,N,O,k;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:a,customColumnRowBodyTemplate:s,setAllFields:l,allFields:c,actionHeaderTemplate:u,actionBodyTemplate:d,isFocus:f,inputValue:h,handleFieldSettingsSidebar:g,isAdmin:v,isRenderView:m}=t,[A,S]=F.useState(!1),T=()=>{S(!0)},C=()=>{S(!1)};return o.jsxs("div",{onMouseOver:T,onMouseOut:C,children:[!m&&!n&&A&&o.jsx(Jr,{handleFieldSettingsSidebar:g,...t}),o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:n?"col-12 ":"col-11 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(x=e==null?void 0:e.headerText)==null?void 0:x[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((w=e==null?void 0:e.attributes)==null?void 0:w.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(I=e==null?void 0:e.label)==null?void 0:I[r==null?void 0:r.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:(_=e==null?void 0:e.toolTip)==null?void 0:_[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsxs(lo,{showGridlines:!0,value:e==null?void 0:e.rows,children:[o.jsx(xr,{frozen:!0,header:"",headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:M=>s(M)}),e==null?void 0:e.customColumns.map((M,j)=>o.jsx(xr,{header:a(M),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(P,$)=>o.jsx(USe,{customColumn:M,e:P,indexes:$,customColumnIndex:j,setAllFields:l,allFields:c,...t})},M==null?void 0:M.uuid)),n===!1&&o.jsx(xr,{frozen:!0,header:M=>u(M),body:M=>d(M),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((N=e==null?void 0:e.attributes)==null?void 0:N.required)&&o.jsx("small",{className:"error",children:f===1&&!h?(O=e==null?void 0:e.validationMesssage)==null?void 0:O.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(k=e==null?void 0:e.helperText)==null?void 0:k[r==null?void 0:r.type]})})]})]})}),v&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]})},$Se=(t,e)=>{var we,ke;const n=R=>{const Ae=R.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Se=`${R.className} justify-content-start`,fe=`${R.titleClassName} pl-1`;return o.jsxs("div",{className:Se,children:[o.jsxs("button",{className:R.togglerClassName,onClick:R.onTogglerClick,children:[o.jsx("span",{className:Ae}),o.jsx(tn,{})]}),o.jsx("span",{className:fe,children:I})]})},{userTaskSubmitFormData:r,TASK_PUBLISHED:i,task_status:a}=wr(),{globalAlignment:s,isPreview:l,isAdmin:c}=Wt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=on(),{field:f,fieldIndex:h,sectionIndex:g,pageIndex:v,row:m,rowIndex:A,columnIndex:S}=t,[T,C]=F.useState(!1),[x,w]=F.useState(""),[I]=F.useState((we=f==null?void 0:f.label)==null?void 0:we[u==null?void 0:u.type]),[_,N]=F.useState(0),[O,k]=F.useState(!1),[M,j]=F.useState(null),[P,$]=F.useState(null),[K,ce]=F.useState({}),X=()=>{var R,Ae,Se;if(m!=null&&m.rowIsRepeatable){if(m!=null&&m.repeatableFields){const fe=[...m.repeatableFields],ge=Et.findIndex(fe,function(pe){return pe.uuid===(f==null?void 0:f.uuid)});ge>=0&&fe[ge].fieldData?w(fe[ge].fieldData):w("")}}else{const fe=r;if(fe!=null&&fe.length){for(const ge of fe)if(ge.fieldId===t.field.uuid&&((R=ge==null?void 0:ge.postData[0])==null?void 0:R.postValue)!==""&&((Ae=ge==null?void 0:ge.postData[0])!=null&&Ae.postValue)){w((Se=ge==null?void 0:ge.postData[0])==null?void 0:Se.postValue);break}}}k(!0)},ne=()=>{const R=f;R.customColumns=[...R.customColumns,{customKey:"Column",uuid:tt(),options:[]}],ue(R)},[he,q]=F.useState(!1),[W,Q]=F.useState(!1),Z=R=>{var Ae;return o.jsxs(o.Fragment,{children:[((Ae=f==null?void 0:f.rows)==null?void 0:Ae.length)>1&&o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>be(R==null?void 0:R.uuid),"aria-label":"Add Row"}),o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>L(),"aria-label":"Add Row"})]})},H=R=>{var Ae;return o.jsxs(o.Fragment,{children:[R==null?void 0:R.customKey,l===!1&&o.jsxs(o.Fragment,{children:[((Ae=f==null?void 0:f.customColumns)==null?void 0:Ae.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>Ce(R==null?void 0:R.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{j(R),q(!0)}})]})]})},Y=()=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ne(),"aria-label":"Add Column"})}),oe=R=>o.jsxs(o.Fragment,{children:[R==null?void 0:R.rowHeading,l===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{$(R),Q(!0)}})})]}),be=R=>{const Ae=f==null?void 0:f.rows.filter(function(fe){return(fe==null?void 0:fe.uuid)!==R}),Se=f;Se.rows=Ae,ue(Se)},Ce=R=>{const Ae=Et.findIndex(f==null?void 0:f.customColumns,ge=>ge.uuid===R),Se=f==null?void 0:f.customColumns.filter(function(ge,pe){return pe!==Ae}),fe=f;fe.customColumns=Se,ue(fe)};F.useEffect(()=>{O||X();const R=Qt.addListener("clearRepeatableFields",fe=>{fe===(m==null?void 0:m.uuid)&&(w(""),N(0),f.isValid=0,d(v,g,A,S,h,f))}),Ae=Qt.addListener("OnInvalidFieldCatch",fe=>{f.uuid===(fe==null?void 0:fe.fieldId)?N(1):N(0)}),Se=Qt.addListener("OnGetFieldValue",fe=>{var pe;const ge=(pe=fe==null?void 0:fe.repeatableColumn)==null?void 0:pe.filter(Be=>(Be==null?void 0:Be.fieldUuid)===(f==null?void 0:f.uuid));ge!=null&&ge.length});return()=>{Ae.remove(),Se.remove(),R.remove()}});const ve=R=>{C(R)},ye=()=>{C(!1)},te=()=>{let R="";return l||(R=R+" field-form-builder"),a===i&&c===!0&&(R=R+" card"),R},L=()=>{const R=f;R.rows=[...R.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],ue(R)},le=(R,Ae)=>{j(pe=>pe===null?{customKey:Ae,uuid:""}:{...pe,customKey:Ae});const Se=f.customColumns,fe=Se.findIndex(pe=>pe.uuid===R.uuid);Se[fe]={...Se[fe],customKey:Ae};const ge=f;ge.customColumns=Se,ue(ge)},ie=(R,Ae)=>{$(pe=>pe===null?{uuid:"",rowHeading:Ae}:{...pe,rowHeading:Ae});const Se=f.rows,fe=Se.findIndex(pe=>pe.uuid===R.uuid);Se[fe]={...Se[fe],rowHeading:Ae};const ge=f;ge.rows=Se,ue(ge)},ue=R=>{d(v,g,A,S,h,R)};function Ne(R){return R.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")}const _e=(R,Ae,Se)=>{const fe=f.customColumns,ge=fe.findIndex(Be=>M&&Be.uuid===M.uuid);fe[ge].options[Se][Ae]=R,fe[ge].options[Se].value=Ne(R);const pe=f;pe.customColumns=fe,ue(pe)},me=()=>{const R=f.customColumns,Ae=R.findIndex(fe=>M&&fe.uuid===M.uuid);R[Ae].options.push({label:"",value:"",uuid:tt()});const Se=f;Se.customColumns=R,ue(Se)},se=R=>{const Ae=f.customColumns,Se=Ae.findIndex(ge=>M&&ge.uuid===M.uuid);if(Se===-1){console.error("Custom column not found");return}Ae[Se].options=Ae[Se].options.filter(ge=>ge.uuid!==R);const fe=f;fe.customColumns=Ae,ue(fe)};return o.jsxs(o.Fragment,{children:[o.jsxs(Gs,{maximizable:!0,header:"Update column title",visible:he,style:{width:"20vw"},footer:()=>o.jsxs(o.Fragment,{children:[" ",o.jsx(Vt,{text:!0,label:"Add Option",icon:"pi pi-plus",onClick:()=>me()}),o.jsx(Vt,{text:!0,label:"Save",onClick:()=>q(!1)})]}),onHide:()=>q(!1),children:[o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(M==null?void 0:M.customKey)||"",onChange:R=>le(M,R.target.value)})}),o.jsx("hr",{}),o.jsx("h5",{children:"Options"}),(M==null?void 0:M.options)&&((ke=M==null?void 0:M.options)==null?void 0:ke.length)>0&&(M==null?void 0:M.options.map((R,Ae)=>o.jsxs("div",{className:"my-2 flex p-fluid",children:[o.jsx("span",{children:Ae+1}),o.jsx(wn,{value:(R==null?void 0:R.label)||"",className:"ml-2",onChange:Se=>_e(Se.target.value,"label",Ae)}),o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>se(R.uuid),"aria-label":"Add Column Option"})]},`custom_column_option_${Ae}`)))]}),o.jsx(Gs,{maximizable:!0,header:"Update Row Title",visible:W,style:{width:"20vw"},footer:()=>o.jsx(Vt,{text:!0,label:"Save",onClick:()=>Q(!1)}),onHide:()=>Q(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(P==null?void 0:P.rowHeading)||"",onChange:R=>ie(P,R.target.value)})})}),o.jsx(ea,{visibilty:T,closeSettingFieldSidebar:ye,...t}),o.jsx("div",{dir:s,className:te(),children:a===i&&c===!0?o.jsx(di,{headerTemplate:n,toggleable:!0,children:o.jsx(Cj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:H,customColumnRowBodyTemplate:oe,setAllFields:ce,allFields:K,actionHeaderTemplate:Y,actionBodyTemplate:Z,isFocus:_,inputValue:x,handleFieldSettingsSidebar:ve,isAdmin:c})}):o.jsx(Cj,{ref:e,...t,field:f,isPreview:l,userSelectedLanguage:u,fieldIndex:h,customColumnHeaderTemplate:H,customColumnRowBodyTemplate:oe,setAllFields:ce,allFields:K,actionHeaderTemplate:Y,actionBodyTemplate:Z,isFocus:_,inputValue:x,handleFieldSettingsSidebar:ve,isAdmin:c})})]})},jSe=t=>{const{indexes:e,customColumnIndex:n,setAllFields:r,allFields:i}=t,a=s=>{const l={...i};l[`${e==null?void 0:e.rowIndex}-${n}`]=s,r(l)};return o.jsx("div",{children:o.jsx(wn,{value:i[`${e==null?void 0:e.rowIndex}-${n}`]||"",onChange:s=>a(s.target.value)})})},xj=t=>{var g,v,m,A,S,T,C;const{field:e,isPreview:n,userSelectedLanguage:r,fieldIndex:i,customColumnHeaderTemplate:a,setAllFields:s,allFields:l,actionHeaderTemplate:c,actionBodyTemplate:u,isFocus:d,inputValue:f,isAdmin:h}=t;return o.jsxs("div",{className:`field ${n?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card p-fluid py-6 px-4":"card py-3 px-4"}`,children:[" ",o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(g=e==null?void 0:e.headerText)==null?void 0:g[r==null?void 0:r.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:i,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((v=e==null?void 0:e.attributes)==null?void 0:v.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",n?o.jsx(o.Fragment,{children:(m=e==null?void 0:e.label)==null?void 0:m[r==null?void 0:r.type]}):o.jsx(la,{path:"",...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:(A=e==null?void 0:e.toolTip)==null?void 0:A[r==null?void 0:r.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",style:{backgroundColor:"#0a061a"},children:[o.jsxs(lo,{scrollable:!0,showGridlines:!0,value:e==null?void 0:e.rows,children:[e==null?void 0:e.customColumns.map((x,w)=>o.jsx(xr,{header:a(x),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(I,_)=>o.jsx(jSe,{customColumn:x,e:I,indexes:_,customColumnIndex:w,setAllFields:s,allFields:l,...t})},x==null?void 0:x.uuid)),n===!1&&o.jsx(xr,{frozen:!0,header:x=>c(x),body:x=>u(x),headerStyle:{textAlign:"left"},bodyStyle:{textAlign:"left",overflow:"visible"}})]}),o.jsx("div",{children:((S=e==null?void 0:e.attributes)==null?void 0:S.required)&&o.jsx("small",{className:"error",children:d===1&&!f?(T=e==null?void 0:e.validationMesssage)==null?void 0:T.english:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(C=e==null?void 0:e.helperText)==null?void 0:C[r==null?void 0:r.type]})})]})]})}),h&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})},zSe=({showAddNewRow:t,setShowAddNewRow:e,customRowEditModalData:n,onHandleChangeCustomRowSetting:r})=>{const[i,a]=F.useState((n==null?void 0:n.rowHeading)||"");return o.jsx(Gs,{maximizable:!0,header:"Update Row Title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Vt,{text:!0,label:"Save",onClick:()=>{e(!1),r(n,i)}}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:i||"",onChange:s=>a(s.target.value)})})})},HSe=({showAddNewColumn:t,setShowAddNewColumn:e,customColumnEditModalData:n,onHandleChangeCustomColumnSetting:r})=>{const i=G3({initialValues:{columnValue:(n==null?void 0:n.customKey)||""},validate:a=>{const s={};return a.columnValue||(s.columnValue="Column value is required"),s},onSubmit:a=>{e(!1),r(n,a.columnValue)}});return o.jsx(Gs,{maximizable:!0,header:"Update column title",visible:t,style:{width:"20vw"},footer:()=>o.jsx(Vt,{text:!0,label:"Save",onClick:()=>i.handleSubmit()}),onHide:()=>e(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsxs("div",{className:"field",children:[o.jsx("label",{htmlFor:"columnValue",children:"Column Title"}),o.jsx(wn,{id:"columnValue",name:"columnValue",value:i.values.columnValue,onChange:i.handleChange,onBlur:i.handleBlur,className:i.touched.columnValue&&i.errors.columnValue?"p-invalid":""}),i.touched.columnValue&&i.errors.columnValue?o.jsx("small",{className:"p-error",children:i.errors.columnValue}):null]})})})},YSe=t=>{var _e;const e=me=>{const se=me.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",we=`${me.className} justify-content-start`,ke=`${me.titleClassName} pl-1`;return o.jsxs("div",{className:we,children:[o.jsxs("button",{className:me.togglerClassName,onClick:me.onTogglerClick,children:[o.jsx("span",{className:se}),o.jsx(tn,{})]}),o.jsx("span",{className:ke,children:w})]})},{TASK_PUBLISHED:n,task_status:r}=wr(),{userSelectedLanguage:i,fieldSettingUpdate:a}=on(),{globalAlignment:s,isPreview:l,isAdmin:c,isRenderView:u}=Wt(),{field:d,fieldIndex:f,sectionIndex:h,pageIndex:g,row:v,rowIndex:m,columnIndex:A}=t,[S,T]=F.useState(!1),[C,x]=F.useState(""),[w]=F.useState((_e=d==null?void 0:d.label)==null?void 0:_e[i==null?void 0:i.type]),[I,_]=F.useState(0),[N,O]=F.useState(null),[k,M]=F.useState(null),[j,P]=F.useState((d==null?void 0:d.allFields)||{}),[$,K]=F.useState(!1),ce=()=>{const me=d;me.customColumns=[...me.customColumns,{customKey:"Column",uuid:tt(),options:[]}],ie(me)},[X,ne]=F.useState(!1),[he,q]=F.useState(!1),W=F.useCallback(Et.debounce(me=>{const se=d;se.allFields={...me},ie(se)},1e3),[]);F.useEffect(()=>{W(j)},[j,W]);const Q=me=>{var se;return o.jsxs(o.Fragment,{children:[((se=d==null?void 0:d.options)==null?void 0:se.length)>1&&o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-trash",rounded:!0,severity:"secondary",onClick:()=>oe(me==null?void 0:me.uuid),"aria-label":"Add Row",size:"small"}),o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>te(),"aria-label":"Add Row",size:"small"})]})},Z=me=>{var se;return o.jsxs(o.Fragment,{children:[me==null?void 0:me.customKey,l===!1&&o.jsxs(o.Fragment,{children:[((se=d==null?void 0:d.customColumns)==null?void 0:se.length)>1&&o.jsx("i",{className:"pi pi-trash ml-3",onClick:()=>be(me==null?void 0:me.uuid)}),o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{O(me),ne(!0)}})]})]})},H=()=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,type:"button",icon:"pi pi-plus",rounded:!0,severity:"secondary",onClick:()=>ce(),"aria-label":"Add Column"})}),Y=me=>o.jsxs(o.Fragment,{children:[me==null?void 0:me.rowHeading,l===!1&&o.jsx(o.Fragment,{children:o.jsx("i",{className:"pi pi-cog ml-3",onClick:()=>{M(me),q(!0)}})})]}),oe=me=>{const se=d==null?void 0:d.rows.filter(function(ke){return(ke==null?void 0:ke.uuid)!==me}),we=d;we.rows=se,ie(we)},be=me=>{const se=Et.findIndex(d==null?void 0:d.customColumns,R=>R.uuid===me),we=d==null?void 0:d.customColumns.filter(function(R,Ae){return Ae!==se}),ke=d;ke.customColumns=we,ie(ke)},Ce=me=>{T(me)},ve=()=>{T(!1)},ye=()=>{let me="";return l||(me=me+" field-form-builder"),r===n&&c===!0&&(me=me+" card"),me},te=()=>{const me=d;me.rows=[...me.rows,{rowHeading:"Row",uuid:tt(),custom_values:{}}],ie(me)},L=(me,se)=>{O(Ae=>Ae===null?{customKey:se,uuid:""}:{...Ae,customKey:se});const we=d.customColumns,ke=we.findIndex(Ae=>Ae.uuid===me.uuid);we[ke]={...we[ke],customKey:se};const R=d;R.customColumns=we,ie(R)},le=(me,se)=>{M(Ae=>Ae===null?{uuid:"",rowHeading:se}:{...Ae,rowHeading:se});const we=d.rows,ke=we.findIndex(Ae=>Ae.uuid===me.uuid);we[ke]={...we[ke],rowHeading:se};const R=d;R.rows=we,ie(R)},ie=me=>{a(g,h,m,A,f,me)},ue=()=>{K(!0)},Ne=()=>{K(!1)};return o.jsxs(o.Fragment,{children:[o.jsx(Gs,{maximizable:!0,header:"Update column title",visible:X,style:{width:"20vw"},footer:()=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,label:"Save",onClick:()=>ne(!1)})}),onHide:()=>ne(!1),children:o.jsx("div",{className:"p-fluid",children:o.jsx(wn,{value:(N==null?void 0:N.customKey)||"",onChange:me=>L(N,me.target.value)})})}),he&&o.jsx(zSe,{showAddNewRow:he,setShowAddNewRow:q,customRowEditModalData:k,onHandleChangeCustomRowSetting:le}),X&&o.jsx(HSe,{showAddNewColumn:X,setShowAddNewColumn:ne,customColumnEditModalData:N,onHandleChangeCustomColumnSetting:L}),o.jsx(ea,{visibilty:S,closeSettingFieldSidebar:ve,...t}),o.jsx("div",{className:"field-form-builder",children:o.jsxs("div",{onMouseOver:ue,onMouseOut:Ne,children:[!u&&!l&&$&&o.jsx(Jr,{handleFieldSettingsSidebar:Ce,...t}),o.jsx("div",{dir:s,className:ye(),children:r===n&&c===!0?o.jsx(di,{headerTemplate:e,toggleable:!0,children:o.jsx(xj,{...t,field:d,isPreview:l,userSelectedLanguage:i,fieldIndex:f,customColumnHeaderTemplate:Z,customColumnRowBodyTemplate:Y,setAllFields:P,allFields:j,actionHeaderTemplate:H,actionBodyTemplate:Q,isFocus:I,inputValue:C,handleFieldSettingsSidebar:Ce,isAdmin:c})}):o.jsx(xj,{isAdmin:!1,...t,field:d,isPreview:l,userSelectedLanguage:i,fieldIndex:f,customColumnHeaderTemplate:Z,customColumnRowBodyTemplate:Y,setAllFields:P,allFields:j,actionHeaderTemplate:H,actionBodyTemplate:Q,isFocus:I,inputValue:C,handleFieldSettingsSidebar:Ce})})]})})]})},KSe=t=>{var te,L,le,ie,ue,Ne,_e,me,se,we,ke;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i,updateUserFormDataSubmit:a}=wr(),[s,l]=F.useState([]),{field:c,fieldIndex:u,row:d,pageIndex:f,sectionIndex:h,section:g,page:v,rowIndex:m,columnIndex:A,path:S,update:T,value:C,isDisabled:x}=t,{isRenderView:w,isAdmin:I,isPreview:_}=Wt(),{userSelectedLanguage:N}=on(),[O,k]=F.useState(!1),[M,j]=F.useState(""),[P,$]=F.useState(0),[K,ce]=F.useState(!1),[X,ne]=F.useState(!1),he=()=>{ne(!0)},q=()=>{ne(!1)},W=R=>{k(R)},Q=()=>{k(!1)};F.useEffect(()=>((c==null?void 0:c.dataSourceType)==="custom"&&l(c==null?void 0:c.options),c==null||c.dataSourceType,()=>{}));const Z=()=>{var Ae,Se,fe,ge;let R=null;if(d!=null&&d.rowIsRepeatable){if(d!=null&&d.repeatableFields){const pe=[...d.repeatableFields],Be=Et.findIndex(pe,function(De){return De.uuid===(c==null?void 0:c.uuid)});Be>=0&&pe[Be].fieldData?(R=pe[Be].fieldData,j(pe[Be].fieldData)):(c.isValid=0,j(""))}}else{const pe=i,Be=Et.cloneDeep(e);if(pe!=null&&pe.length){for(const De of pe)if(De.fieldId===t.field.uuid&&((Ae=De==null?void 0:De.postData)!=null&&Ae.length)){R=(Se=De==null?void 0:De.postData[0])==null?void 0:Se.postValue,j((fe=De==null?void 0:De.postData[0])==null?void 0:fe.postValue),Be[c==null?void 0:c.uuid]=(ge=De==null?void 0:De.postData[0])==null?void 0:ge.postValue;const He=Object.keys(Be).length;r(He);break}}}j(R),setTimeout(()=>{ce(!0)},2e3)};F.useEffect(()=>{!K&&(i==null?void 0:i.length)>0&&Z();const R=Qt.addListener("clearRepeatableFields",fe=>{fe===(d==null?void 0:d.uuid)&&(j(""),$(0),c.isValid=1)}),Ae=Qt.addListener("onSubmitUserForm",()=>{var fe;(fe=c==null?void 0:c.attributes)!=null&&fe.required?M?c.isValid=1:c.isValid=0:c.isValid=1}),Se=Qt.addListener("OnInvalidFieldCatch",fe=>{c.uuid===(fe==null?void 0:fe.fieldId)?$(1):$(0)});return()=>{Ae.remove(),Se.remove(),R.remove()}});const H=(R,Ae)=>{var Se;if(i){const fe=[...i],ge=Et.findIndex(fe,function(Be){return Be.rowId===(d==null?void 0:d.uuid)});let pe=(Se=i[ge])==null?void 0:Se.repeatableFields;pe={...pe,[R==null?void 0:R.uuid]:Ae},fe[ge]={...fe[ge],repeatableFields:pe},a(fe)}j(Ae),Ae?R.isValid=1:R.isValid=0},Y=R=>{var Ae;j(R.target.value),d!=null&&d.rowIsRepeatable?H(c,(Ae=R==null?void 0:R.target)==null?void 0:Ae.value):ve(R.target.value)},oe=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${N.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",be=()=>(c==null?void 0:c.dataSourceType)==="custom"?`optionText.${N.type}`:(c==null?void 0:c.dataSourceType)==="database"?`${c==null?void 0:c.optionLabel}`:"",Ce=()=>{var R,Ae,Se;if(((R=c==null?void 0:c.fieldType)==null?void 0:R.type)==="radio"){const fe=[];return s.map((ge,pe)=>{var De,He,it,dt;const Be=M;fe.push(o.jsxs("div",{className:"field-radiobutton field-radiobutton-builder",onClick:()=>{Y({value:ge,target:{value:ge}})},style:(Be==null?void 0:Be.uuid)===(ge==null?void 0:ge.uuid)?{backgroundColor:"#0F8BFD",padding:15,borderRadius:8}:{padding:15},children:[o.jsx(oa,{onFocus:()=>$(1),inputId:`radio-option-${pe}-${ge==null?void 0:ge.uuid}-${_?"preview":"builder-radio"}`,onChange:ft=>{Y(ft)},value:ge,name:`radio-option-${pe}-${ge==null?void 0:ge.uuid}-${_?"preview":"builder"}`,checked:(Be==null?void 0:Be.uuid)===(ge==null?void 0:ge.uuid),disabled:x}),((De=ge==null?void 0:ge.hyperlinkText)==null?void 0:De[N==null?void 0:N.type])===""?o.jsx("label",{htmlFor:`radio-option-${pe}-${ge==null?void 0:ge.uuid}-${_?"preview":"builder"}`,children:(He=ge==null?void 0:ge.optionText)==null?void 0:He[N==null?void 0:N.type]}):o.jsx("label",{children:o.jsx("a",{href:(it=ge==null?void 0:ge.hyperlinkText)==null?void 0:it[N==null?void 0:N.type],target:"_blank",rel:"noreferrer",children:(dt=ge==null?void 0:ge.optionText)==null?void 0:dt[N==null?void 0:N.type]})})]},pe))}),fe}if(((Ae=c==null?void 0:c.fieldType)==null?void 0:Ae.type)==="dropdown")return o.jsx(Va,{onFocus:()=>$(1),onChange:fe=>{d!=null&&d.rowIsRepeatable?H(c,fe.target.value):ve(fe.target.value)},options:s,optionLabel:be(),optionValue:oe(),value:M,placeholder:(Se=c==null?void 0:c.placeholder)==null?void 0:Se[N==null?void 0:N.type],disabled:x})},ve=R=>{var fe,ge;j(R.target.value);const Ae=i,Se=Et.cloneDeep(e);if(Ae!==null){if((fe=R==null?void 0:R.target)!=null&&fe.value){if(Se[c==null?void 0:c.uuid]=(ge=R==null?void 0:R.target)==null?void 0:ge.value,(Ae==null?void 0:Ae.length)>0)for(const pe of Ae)pe.fieldId===t.field.uuid&&(pe.postData[0]={postValue:R.target.value})}else if(delete Se[c==null?void 0:c.uuid],(Ae==null?void 0:Ae.length)>0)for(const pe of Ae)pe.fieldId===t.field.uuid&&(pe.postData[0]={postValue:""})}if(!(d!=null&&d.rowIsRepeatable)){n(Se);const pe=Object.keys(Se).length;r(pe)}},ye=o.jsxs("div",{onMouseOver:he,onMouseOut:q,children:[!w&&!_&&X&&o.jsx(Jr,{handleFieldSettingsSidebar:W,...t}),o.jsx("div",{className:`field-${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(te=c==null?void 0:c.headerText)==null?void 0:te[N==null?void 0:N.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:u,className:"flex font-medium mb-5 text-700 text-2xl",children:[o.jsx(fa,{sectionIndex:h,fieldIndex:u,field:c,update:T,value:C}),((L=c==null?void 0:c.attributes)==null?void 0:L.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",_?o.jsx(o.Fragment,{children:(le=c==null?void 0:c.label)==null?void 0:le[N==null?void 0:N.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:c!=null&&c.showToolTip?o.jsx(o.Fragment,{children:o.jsx(qi,{message:(ie=c==null?void 0:c.toolTip)==null?void 0:ie[N==null?void 0:N.type],position:"right"})}):""})]}),Ce(),o.jsx("div",{children:((ue=c==null?void 0:c.attributes)==null?void 0:ue.required)&&o.jsx("small",{className:"error",children:P===1&&!M?(Ne=c==null?void 0:c.validationMesssage)==null?void 0:Ne.language:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(_e=c==null?void 0:c.helperText)==null?void 0:_e[N==null?void 0:N.type]})}),((me=c==null?void 0:c.inlineConditionalRules)==null?void 0:me.rules.length)>0&&_===!1&&o.jsx("p",{children:"Inline conditional rules"}),K===!0&&((we=(se=c==null?void 0:c.inlineConditionalRules)==null?void 0:se.rules)==null?void 0:we.length)>0&&((ke=c==null?void 0:c.inlineConditionalRules)==null?void 0:ke.rules.map((R,Ae)=>{const Se=M;return _===!0?o.jsx("div",{children:R==null?void 0:R.conditions.map((fe,ge)=>o.jsx(F.Fragment,{children:o.jsx(s0,{isConditionTrue:(Se==null?void 0:Se.value)==fe.value||!_,inputValue:M,condition:fe,ruleIndex:Ae,conditionIndex:ge,field:c,section:g,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:S,...t})},`select-rule-${Ae}-`+ge))},`rule-${Ae}`):o.jsx(di,{className:"mt-4",header:`Rule ${Ae+1}`,children:o.jsx("div",{children:R==null?void 0:R.conditions.map((fe,ge)=>o.jsx(F.Fragment,{children:o.jsx(s0,{isConditionTrue:(Se==null?void 0:Se.value)===fe.value||!_,inputValue:M,condition:fe,ruleIndex:Ae,conditionIndex:ge,isPreview:_,field:c,section:g,page:v,row:d,pageIndex:f,sectionIndex:h,rowIndex:m,columnIndex:A,path:S,...t})},`select-rule-${Ae}-`+ge))},`rule-${Ae}`)},Ae)}))]}),I&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[O===!0&&o.jsx(ea,{visibilty:O,closeSettingFieldSidebar:Q,...t},c==null?void 0:c.uuid),o.jsx(Ti,{...t,fieldWrap:ye})]})},RSe=t=>{var K,ce,X,ne;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,userTaskSubmitFormData:i}=wr(),{field:a,row:s,isDisabled:l}=t,{isPreview:c,isRenderView:u,isAdmin:d}=Wt(),{userSelectedLanguage:f}=on(),[h,g]=F.useState(!1),[v,m]=F.useState(""),[A,S]=F.useState(0),[T,C]=F.useState(!1),[x,w]=F.useState(!1),I=()=>{w(!0)},_=()=>{w(!1)},N=he=>{g(he)},O=()=>{g(!1)},k=()=>{var q,W,Q,Z;let he=null;if(s!=null&&s.rowIsRepeatable){if(s!=null&&s.repeatableFields){const H=[...s.repeatableFields],Y=Et.findIndex(H,function(oe){return oe.uuid===(a==null?void 0:a.uuid)});Y>=0&&H[Y].fieldData?(he=H[Y].fieldData,m(H[Y].fieldData)):(a.isValid=0,m(""))}}else{const H=i,Y=Et.cloneDeep(e);if(H!=null&&H.length){for(const oe of H)if(oe.fieldId===t.field.uuid&&((q=oe==null?void 0:oe.postData)!=null&&q.length)){he=(W=oe==null?void 0:oe.postData[0])==null?void 0:W.postValue,m((Q=oe==null?void 0:oe.postData[0])==null?void 0:Q.postValue),Y[a==null?void 0:a.uuid]=(Z=oe==null?void 0:oe.postData[0])==null?void 0:Z.postValue;const be=Object.keys(Y).length;r(be);break}}}m(he),setTimeout(()=>{C(!0)},2e3)};F.useEffect(()=>{T||k();const he=Qt.addListener("clearRepeatableFields",Q=>{Q===(s==null?void 0:s.uuid)&&(m(""),S(0),a.isValid=1)}),q=Qt.addListener("onSubmitUserForm",()=>{var Q;if((Q=a==null?void 0:a.attributes)!=null&&Q.required){const Z=v;Z!=null&&Z[a.uuid]?a.isValid=1:a.isValid=0}else a.isValid=1}),W=Qt.addListener("OnInvalidFieldCatch",Q=>{a.uuid===(Q==null?void 0:Q.fieldId)?S(1):S(0)});return()=>{q.remove(),W.remove(),he.remove()}});const M=(he,q,W,Q,Z)=>Q==null?void 0:Q.map(H=>{var Y,oe;return{...H,children:H!=null&&H.children&&((Y=H==null?void 0:H.children)==null?void 0:Y.length)>0?[...((oe=H==null?void 0:H.children)==null?void 0:oe.map(be=>q===(H==null?void 0:H.uuid)||Z===!0?(W!=null&&W[be==null?void 0:be.uuid]&&delete W[be==null?void 0:be.uuid],{...be,options:M(he,q,W,(be==null?void 0:be.options)||[],!0)}):{...be,options:M(he,q,W,(be==null?void 0:be.options)||[],!1)}))||[]]:[]}}),j=(he,q)=>{const W={...v};M(he,q,W,a==null?void 0:a.options,!1),W[he]=q,m(W),s!=null&&s.rowIsRepeatable||P(W)},P=he=>{const q=i,W=Et.cloneDeep(e);if(q!==null){if(he){if(W[a==null?void 0:a.uuid]=he,(q==null?void 0:q.length)>0)for(const Q of q)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:he})}else if(delete W[a==null?void 0:a.uuid],(q==null?void 0:q.length)>0)for(const Q of q)Q.fieldId===t.field.uuid&&(Q.postData[0]={postValue:""})}if(!(s!=null&&s.rowIsRepeatable)){n(W);const Q=Object.keys(W).length;r(Q)}},$=o.jsxs("div",{onMouseOver:I,onMouseOut:_,children:[!u&&!c&&x&&o.jsx(Jr,{handleFieldSettingsSidebar:N,...t}),o.jsx("div",{className:`field-${(a==null?void 0:a.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-12",children:[(a==null?void 0:a.showHeaderText)&&o.jsx("h6",{children:(K=a==null?void 0:a.headerText)==null?void 0:K[f==null?void 0:f.type]}),o.jsx(lb,{...t,isDisabled:l,isFirst:!0,isPreview:c,schema:a,field:a,value:v,update:(he,q)=>{j(he,q)}}),o.jsx("div",{children:((ce=a==null?void 0:a.attributes)==null?void 0:ce.required)&&o.jsx("small",{className:"error",children:A===1&&!v?(X=a==null?void 0:a.validationMesssage)==null?void 0:X.english:""})}),o.jsx("div",{children:(a==null?void 0:a.showHelperText)&&o.jsx("small",{children:(ne=a==null?void 0:a.helperText)==null?void 0:ne[f==null?void 0:f.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(ea,{visibilty:h,closeSettingFieldSidebar:O,...t},a==null?void 0:a.uuid),o.jsx(Ti,{...t,fieldWrap:$})]})},XSe=t=>{var Y,oe,be,Ce,ve,ye,te,L,le,ie;const{field:e,fieldIndex:n,sectionIndex:r,pageIndex:i,row:a,rowIndex:s,columnIndex:l,isDisabled:c}=t,{isRenderView:u,isAdmin:d,isPreview:f}=Wt(),{taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:v,updateUserFormDataSubmit:m,userTaskSubmitFormData:A,task_status:S,TASK_PUBLISHED:T}=wr(),[C,x]=F.useState(!1),{userSelectedLanguage:w,fieldSettingUpdate:I}=on(),[_,N]=F.useState(!1),[O,k]=F.useState(0),[M,j]=F.useState(),[P,$]=F.useState(!1),K=()=>{$(!0)},ce=()=>{$(!1)},X=[{icon:"pi pi-thumbs-up",thumbValue:"up"},{icon:"pi pi-thumbs-down",thumbValue:"down"}],ne=ue=>o.jsx("span",{className:"m-2",children:o.jsx("i",{style:{fontSize:30},className:ue.icon})}),he=()=>{var ue,Ne,_e;if(a!=null&&a.rowIsRepeatable){if(a!=null&&a.repeatableFields){const me=[...a.repeatableFields],se=Et.findIndex(me,function(we){return we.uuid===(e==null?void 0:e.uuid)});se>=0&&me[se].fieldData?j(me[se].fieldData):j("")}}else{const me=A;if(me!=null&&me.length){for(const se of me)if(se.fieldId===t.field.uuid&&((ue=se==null?void 0:se.postData[0])==null?void 0:ue.postValue)!==""&&((Ne=se==null?void 0:se.postData[0])!=null&&Ne.postValue)){j((_e=se==null?void 0:se.postData[0])==null?void 0:_e.postValue);break}}}N(!0)};F.useEffect(()=>{_||he();const ue=Qt.addListener("clearRepeatableFields",se=>{se===(a==null?void 0:a.uuid)&&(j(""),k(0),e.isValid=0,I(i,r,s,l,n,e))}),Ne=Qt.addListener("onSubmitUserForm",()=>{var se;(se=e==null?void 0:e.attributes)!=null&&se.required?M?e.isValid=1:e.isValid=0:e.isValid=1}),_e=Qt.addListener("OnInvalidFieldCatch",se=>{e.uuid===(se==null?void 0:se.fieldId)?k(1):k(0)}),me=Qt.addListener("OnGetFieldValue",se=>{var ke;const we=(ke=se==null?void 0:se.repeatableColumn)==null?void 0:ke.filter((R,Ae)=>(R==null?void 0:R.fieldUuid)===(e==null?void 0:e.uuid));we!=null&&we.length});return()=>{Ne.remove(),_e.remove(),me.remove(),ue.remove()}});const q=ue=>{j(ue.value);const Ne=A,_e=Et.cloneDeep(h);if(Ne!==null){if(ue!=null&&ue.value){if(_e[e==null?void 0:e.uuid]=ue==null?void 0:ue.value,(Ne==null?void 0:Ne.length)>0)for(const me of Ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:ue.value})}else if(delete _e[e==null?void 0:e.uuid],(Ne==null?void 0:Ne.length)>0)for(const me of Ne)me.fieldId===t.field.uuid&&(me.postData[0]={postValue:""})}if(!(a!=null&&a.rowIsRepeatable)){g(_e);const me=Object.keys(_e).length;v(me)}},W=(ue,Ne)=>{var _e;if(A){const me=[...A],se=Et.findIndex(me,function(ke){return ke.rowId===(a==null?void 0:a.uuid)});let we=(_e=A[se])==null?void 0:_e.repeatableFields;we={...we,[ue==null?void 0:ue.uuid]:Ne},me[se]={...me[se],repeatableFields:we},m(me)}j(Ne),Ne!==""?ue.isValid=1:ue.isValid=0},Q=ue=>{x(ue)},Z=()=>{x(!1)},H=o.jsxs("div",{onMouseOver:K,onMouseOut:ce,children:[!u&&!f&&P&&o.jsx(Jr,{handleFieldSettingsSidebar:Q,...t}),o.jsx("div",{className:`field ${f?" ":" builder-element-wrapper "}${(e==null?void 0:e.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:d?"col-6 ":"col-12 p-fluid",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(Y=e==null?void 0:e.headerText)==null?void 0:Y[w==null?void 0:w.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:n,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((oe=e==null?void 0:e.attributes)==null?void 0:oe.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",f?o.jsx(o.Fragment,{children:(be=e==null?void 0:e.label)==null?void 0:be[w==null?void 0:w.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:(Ce=e==null?void 0:e.toolTip)==null?void 0:Ce[w==null?void 0:w.type],position:"right"})})]}),o.jsxs("span",{className:"p-input-icon-"+(e==null?void 0:e.iconAlignment),children:[(e==null?void 0:e.showIcon)&&o.jsx("i",{className:"pi pi-"+((ye=(ve=e==null?void 0:e.icon)==null?void 0:ve.properties)==null?void 0:ye.name)}),o.jsx("div",{className:"card flex justify-content-start",children:o.jsx(Np,{value:M,onChange:ue=>{j(ue.value),a!=null&&a.rowIsRepeatable?W(e,ue.value):q(ue)},itemTemplate:ne,optionLabel:"value",onFocus:()=>k(1),options:X,readOnly:c,className:O===1&&((te=e==null?void 0:e.attributes)!=null&&te.required)?M?"valid":"invalid":"valid'"})})]}),o.jsx("div",{children:((L=e==null?void 0:e.attributes)==null?void 0:L.required)&&o.jsx(o.Fragment,{children:o.jsx("small",{className:"error",children:O===1&&!M?(le=e==null?void 0:e.validationMesssage)==null?void 0:le.english:""})})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ie=e==null?void 0:e.helperText)==null?void 0:ie[w==null?void 0:w.type]})})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(ea,{visibilty:C,closeSettingFieldSidebar:Z,...t}),o.jsx(Ti,{...t,fieldWrap:H})]})},GSe=t=>{var Q,Z,H,Y,oe,be,Ce;const{taskRegisterData:e,updateTaskRegisterData:n,updateTaskProgressValue:r,updateUserFormDataSubmit:i,userTaskSubmitFormData:a}=wr(),{userSelectedLanguage:s,fieldSettingUpdate:l}=on(),{field:c,fieldIndex:u,sectionIndex:d,pageIndex:f,row:h,rowIndex:g,columnIndex:v}=t,{isRenderView:m,isAdmin:A,isPreview:S}=Wt(),[T,C]=F.useState(!1),[x,w]=F.useState(""),[I,_]=F.useState(0),[N,O]=F.useState(!1),[k,M]=F.useState(!1),j=()=>{M(!0)},P=()=>{M(!1)},$=()=>{var ve,ye,te;if(h!=null&&h.rowIsRepeatable){if(h!=null&&h.repeatableFields){const L=[...h.repeatableFields],le=Et.findIndex(L,function(ie){return ie.uuid===(c==null?void 0:c.uuid)});le>=0&&L[le].fieldData?w(L[le].fieldData):w("")}}else{const L=a;if(L!=null&&L.length){for(const le of L)if(le.fieldId===t.field.uuid&&((ve=le==null?void 0:le.postData[0])==null?void 0:ve.postValue)!==""&&((ye=le==null?void 0:le.postData[0])!=null&&ye.postValue)){w((te=le==null?void 0:le.postData[0])==null?void 0:te.postValue);break}}}O(!0)};F.useEffect(()=>{N||$();const ve=Qt.addListener("clearRepeatableFields",le=>{le===(h==null?void 0:h.uuid)&&(w(""),_(0),c.isValid=0,l(f,d,g,v,u,c))}),ye=Qt.addListener("onSubmitUserForm",()=>{var le;(le=c==null?void 0:c.attributes)!=null&&le.required?x?c.isValid=1:c.isValid=0:c.isValid=1}),te=Qt.addListener("OnInvalidFieldCatch",le=>{c.uuid===(le==null?void 0:le.fieldId)?_(1):_(0)}),L=Qt.addListener("OnGetFieldValue",le=>{var ue;const ie=(ue=le==null?void 0:le.repeatableColumn)==null?void 0:ue.filter(Ne=>(Ne==null?void 0:Ne.fieldUuid)===(c==null?void 0:c.uuid));ie!=null&&ie.length});return()=>{ye.remove(),te.remove(),L.remove(),ve.remove()}});const K=ve=>{C(ve)},ce=()=>{C(!1)},X=ve=>{var L,le;w(ve.target.value);const ye=a,te=Et.cloneDeep(e);if(ye!==null){if((L=ve==null?void 0:ve.target)!=null&&L.value){if(te[c==null?void 0:c.uuid]=(le=ve==null?void 0:ve.target)==null?void 0:le.value,(ye==null?void 0:ye.length)>0)for(const ie of ye)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:ve.target.value})}else if(delete te[c==null?void 0:c.uuid],(ye==null?void 0:ye.length)>0)for(const ie of ye)ie.fieldId===t.field.uuid&&(ie.postData[0]={postValue:""})}if(!(h!=null&&h.rowIsRepeatable)){n(te);const ie=Object.keys(te).length;r(ie)}},ne=(ve,ye,te,L)=>{var le;if(a){const ie=[...a],ue=Et.findIndex(ie,function(_e){return _e.rowId===(h==null?void 0:h.uuid)});let Ne=(le=a[ue])==null?void 0:le.repeatableFields;Ne={...Ne,[te==null?void 0:te.uuid]:L},ie[ue]={...ie[ue],repeatableFields:Ne},i(ie)}w(L),L!==""?te.isValid=1:te.isValid=0},he=5,q=()=>{const ve=[],ye=[YE,HE,KE,jE,zE],te=["Awful","Not Very Good","Okay","Really Good","Fantastic"];for(let L=0;L<he;L++)ve.push(o.jsxs("label",{children:[o.jsx("input",{onChange:le=>{h!=null&&h.rowIsRepeatable?ne(f,d,c,le.target.value):X(le)},checked:parseInt(x)===L,name:"liker-Emoji-scale"+(c==null?void 0:c.uuid),type:"radio",value:L}),o.jsxs("span",{className:"grid m-0",children:[o.jsx("div",{className:"col-12 flex justify-content-center",children:o.jsx("img",{src:ye[L]})}),o.jsx("div",{children:te[L]})]})]},`field-${c==null?void 0:c.uuid}-likertEmojiScale-${L} ${parseInt(x)===L?"scale-selected":""}`));return ve},W=o.jsxs("div",{onMouseOver:j,onMouseOut:P,children:[!m&&!S&&k&&o.jsx(Jr,{handleFieldSettingsSidebar:K,...t}),o.jsxs("div",{className:`field ${S?" ":" builder-element-wrapper "}${(c==null?void 0:c.isFluid)===!0?" card py-3 px-4 p-fluid":"card py-3 px-4"}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12 ",children:[(c==null?void 0:c.showHeaderText)&&o.jsx("h6",{children:(Q=c==null?void 0:c.headerText)==null?void 0:Q[s==null?void 0:s.type]}),(c==null?void 0:c.showLabel)&&o.jsxs("label",{htmlFor:`label${u}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((Z=c==null?void 0:c.attributes)==null?void 0:Z.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",S?o.jsx(o.Fragment,{children:(H=c==null?void 0:c.label)==null?void 0:H[s==null?void 0:s.type]}):o.jsx(la,{...t}),o.jsx("span",{className:"ml-3",children:(c==null?void 0:c.showToolTip)&&o.jsx(qi,{message:(Y=c==null?void 0:c.toolTip)==null?void 0:Y[s==null?void 0:s.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("div",{children:o.jsx("div",{className:"emoji",children:q()})}),o.jsx("div",{children:((oe=c==null?void 0:c.attributes)==null?void 0:oe.required)&&o.jsx("small",{className:"error",children:I===1&&!x?(be=c==null?void 0:c.validationMesssage)==null?void 0:be.english:""})}),o.jsx("div",{children:(c==null?void 0:c.showHelperText)&&o.jsx("small",{children:(Ce=c==null?void 0:c.helperText)==null?void 0:Ce[s==null?void 0:s.type]})})]})]})}),A&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(ea,{visibilty:T,closeSettingFieldSidebar:ce,...t}),o.jsx(Ti,{...t,fieldWrap:W})]})},WSe=t=>{var $,K,ce,X,ne,he,q,W,Q,Z,H;const{userTaskSubmitFormData:e}=wr(),{userSelectedLanguage:n,fieldSettingUpdate:r}=on(),{isPreview:i,isAdmin:a,isRenderView:s}=Wt(),{field:l,fieldIndex:c,sectionIndex:u,pageIndex:d,row:f,rowIndex:h,columnIndex:g}=t,[v,m]=F.useState(!1),[A,S]=F.useState(""),[T,C]=F.useState(0),[x,w]=F.useState(!1),[I,_]=F.useState(!1),N=()=>{_(!0)},O=()=>{_(!1)},k=()=>{var Y,oe,be;if(f!=null&&f.rowIsRepeatable){if(f!=null&&f.repeatableFields){const Ce=[...f.repeatableFields],ve=Et.findIndex(Ce,function(ye){return ye.uuid===(l==null?void 0:l.uuid)});ve>=0&&Ce[ve].fieldData?S(Ce[ve].fieldData):S("")}}else{const Ce=e;if(Ce!=null&&Ce.length){for(const ve of Ce)if(ve.fieldId===t.field.uuid&&((Y=ve==null?void 0:ve.postData[0])==null?void 0:Y.postValue)!==""&&((oe=ve==null?void 0:ve.postData[0])!=null&&oe.postValue)){S((be=ve==null?void 0:ve.postData[0])==null?void 0:be.postValue);break}}}w(!0)};F.useEffect(()=>{x||k();const Y=Qt.addListener("clearRepeatableFields",ve=>{ve===(f==null?void 0:f.uuid)&&(S(""),C(0),l.isValid=0,r(d,u,h,g,c,l))}),oe=Qt.addListener("onSubmitUserForm",()=>{var ve,ye;(ve=l==null?void 0:l.attributes)!=null&&ve.required?A&&(A==null?void 0:A.length)<((ye=l==null?void 0:l.attributes)==null?void 0:ye.minLength)?l.isValid=1:l.isValid=0:l.isValid=1}),be=Qt.addListener("OnInvalidFieldCatch",ve=>{l.uuid===(ve==null?void 0:ve.fieldId)?C(1):C(0)}),Ce=Qt.addListener("OnGetFieldValue",ve=>{var te;const ye=(te=ve==null?void 0:ve.repeatableColumn)==null?void 0:te.filter(L=>(L==null?void 0:L.fieldUuid)===(l==null?void 0:l.uuid));ye!=null&&ye.length});return()=>{oe.remove(),be.remove(),Ce.remove(),Y.remove()}});const M=Y=>{m(Y)},j=()=>{m(!1)},P=o.jsxs("div",{onMouseOver:N,onMouseOut:O,children:[!s&&!i&&I&&o.jsx(Jr,{handleFieldSettingsSidebar:M,...t}),o.jsxs("div",{className:`field ${i?" ":" builder-element-wrapper "}${(l==null?void 0:l.isFluid)===!0?" card p-fluid ":"card"} ${s?" ":" py-6 px-4 "}`,children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:a?"col-6 ":"col-12 p-fluid",children:[(l==null?void 0:l.showHeaderText)&&o.jsx("h6",{children:($=l==null?void 0:l.headerText)==null?void 0:$[n==null?void 0:n.type]}),(l==null?void 0:l.showLabel)&&o.jsxs("label",{htmlFor:c,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[o.jsx(fa,{...t}),((K=l==null?void 0:l.attributes)==null?void 0:K.required)&&o.jsx("span",{className:"must-required mr-1",children:"*"})," ",i?o.jsx(o.Fragment,{children:(ce=l==null?void 0:l.label)==null?void 0:ce[n==null?void 0:n.type]}):o.jsx(la,{...t}),(l==null?void 0:l.showToolTip)&&o.jsx("span",{className:"ml-3",children:o.jsx(qi,{message:(X=l==null?void 0:l.toolTip)==null?void 0:X[n==null?void 0:n.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("span",{className:"p-input-icon-"+(l==null?void 0:l.iconAlignment),children:(l==null?void 0:l.showIcon)&&o.jsx("i",{className:"pi pi-"+((he=(ne=l==null?void 0:l.icon)==null?void 0:ne.properties)==null?void 0:he.name)})}),o.jsx("div",{children:((q=l==null?void 0:l.attributes)==null?void 0:q.required)&&o.jsxs(o.Fragment,{children:[o.jsx("small",{className:"error",children:T===1&&!A?(W=l==null?void 0:l.validationMesssage)==null?void 0:W.english:""}),o.jsx("small",{className:"error",children:T===1&&(A==null?void 0:A.length)<((Q=l==null?void 0:l.attributes)==null?void 0:Q.minLength)?`Mini length ${(Z=l==null?void 0:l.attributes)==null?void 0:Z.minLength}`:""})]})}),o.jsx("div",{children:(l==null?void 0:l.showHelperText)&&o.jsx("small",{children:(H=l==null?void 0:l.helperText)==null?void 0:H[n==null?void 0:n.type]})})]})]})}),a&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{...t})]})]})]});return o.jsxs(o.Fragment,{children:[o.jsx(ea,{visibilty:v,closeSettingFieldSidebar:j,...t}),o.jsx(Ti,{...t,fieldWrap:P})]})},QSe=t=>{var j,P,$,K,ce,X,ne;const{field:e,fieldIndex:n,columnIndex:r,sectionIndex:i,rowIndex:a,pageIndex:s,ref:l}=t,{isPreview:c}=Wt(),{userSelectedLanguage:u,fieldSettingUpdate:d}=on(),{userTaskSubmitFormData:f}=wr(),[h,g]=F.useState(!1),[v,m]=F.useState(""),[A,S]=F.useState(0),[T,C]=F.useState(!1),[x,w]=F.useState(!1),I=()=>{w(!0)},_=()=>{w(!1)},N=()=>{var q;const he=f;if(he.length){for(const W of he)if(W.fieldId===t.field.uuid){m((q=W==null?void 0:W.postData[0])==null?void 0:q.postValue),C(!0);break}}};F.useEffect(()=>{T||N();const he=Qt.addListener("onSubmitUserForm",()=>{var W;(W=e==null?void 0:e.attributes)!=null&&W.required&&(v?e.isValid=1:e.isValid=0,d(s,i,a,r,n,e))}),q=Qt.addListener("OnInvalidFieldCatch",W=>{e.uuid===(W==null?void 0:W.fieldId)?S(1):S(0)});return()=>{he.remove(),q.remove()}});const O=he=>{g(he)},k=()=>{g(!1)},M=o.jsxs("div",{onMouseOver:I,onMouseOut:_,children:[!c&&x&&o.jsx(Jr,{handleFieldSettingsSidebar:O,...t}),o.jsx("div",{className:c?"":"field-form-builder",ref:l,children:o.jsx("div",{className:"field",children:o.jsx("div",{className:"grid",children:o.jsxs("div",{className:c?"col-12":"col-11",children:[(e==null?void 0:e.showHeaderText)&&o.jsx("h6",{children:(j=e==null?void 0:e.headerText)==null?void 0:j[u==null?void 0:u.type]}),(e==null?void 0:e.showLabel)&&o.jsxs("label",{htmlFor:`${n}`,className:"flex font-bold mb-3 text-gray-900 text-xl",children:[((P=e==null?void 0:e.attributes)==null?void 0:P.required)&&o.jsx("span",{className:"must-required",children:"*"})," ",i+1,".",r+1,".",n+1," ",($=e==null?void 0:e.label)==null?void 0:$[u==null?void 0:u.type],o.jsx("span",{className:"ml-3",children:(e==null?void 0:e.showToolTip)&&o.jsx(qi,{message:(K=e==null?void 0:e.toolTip)==null?void 0:K[u==null?void 0:u.type],position:"right"})})]}),o.jsxs("div",{className:"mt-3",children:[o.jsx("p",{children:"Anchor Tag"}),o.jsx("div",{children:((ce=e==null?void 0:e.attributes)==null?void 0:ce.required)&&o.jsx("small",{className:"error",children:A===1&&!v?(X=e==null?void 0:e.validationMesssage)==null?void 0:X.language:""})}),o.jsx("div",{children:(e==null?void 0:e.showHelperText)&&o.jsx("small",{children:(ne=e==null?void 0:e.helperText)==null?void 0:ne[u==null?void 0:u.type]})})]})]})})})})]});return o.jsxs(o.Fragment,{children:[h===!0&&o.jsx(ea,{visibilty:h,closeSettingFieldSidebar:k,...t}),o.jsx(Ti,{...t,fieldWrap:M})]})},Yc=t=>{const{data:e,path:n,field:r}=t,{renderType:i,isPreview:a,isAdmin:s}=Wt(),{task_status:l,TASK_PUBLISHED:c}=wr(),u=F.useRef(null),[d,f]=F.useState(!1),[{isDragging:h},g]=sa({item:{...e,type:rf,uuid:e==null?void 0:e.uuid,path:n},type:rf,collect:x=>({isDragging:x.isDragging()})}),v=h?.25:1;g(u);const m=l===c||s,A=x=>{switch(r==null?void 0:r.componentType){case"text":return o.jsx(Yle,{typeName:"Text",field:r,...x});case"number":return o.jsx(Wle,{typeName:"Number",field:r,...x});case"email":return o.jsx(Qle,{typeName:"Email",field:r,...x});case"textarea":return o.jsx(Jle,{typeName:"Text Area",field:r,...x});case"editor":return o.jsx(vce,{typeName:"Editor",field:r,...x});case"question":return o.jsx(Xce,{typeName:"Exam",field:r,...x});case"select":return o.jsx(ace,{typeName:"Select",field:r,...x});case"multi-select":return o.jsx(Pce,{typeName:"Multi Select",field:r,...x});case"checkbox":return o.jsx(Mce,{typeName:"Checkbox",field:r,...x});case"radio":return o.jsx(Bce,{typeName:"Radio",field:r,...x});case"radio-hierarchal":return o.jsx(RSe,{typeName:"Radio Progressive",field:r,...x});case"href":return o.jsx(Gle,{typeName:"Hyperlink",field:r,...x});case"heading":return o.jsx($ce,{typeName:"Heading",field:r,...x});case"paragraph":return o.jsx(c5e,{typeName:"Paragraph",field:r,...x});case"image":return o.jsx(fk,{typeName:"Image",field:r,...x});case"video":return o.jsx(u4e,{typeName:"Video",field:r,...x});case"hr":return o.jsx(d4e,{typeName:"Hr",field:r,...x});case"date-picker":return o.jsx(f4e,{typeName:"Date Picker",field:r,...x});case"signature":return o.jsx(h4e,{typeName:"Signature",field:r,...x});case"file-upload":return o.jsx(hye,{typeName:"File Upload",field:r,...x});case"facebook-login":return o.jsx(WSe,{typeName:"Facebook Login",field:r,...x});case"anchor":return o.jsx(QSe,{ref:u,typeName:"Anchor Tag",field:r,...x});case"image-gallery":return o.jsx(s5e,{typeName:"Image gallery",field:r,...x});case"quiz":return o.jsx(mye,{typeName:"Quiz",field:r,...x});case"document":return o.jsx(pye,{typeName:"Document",field:r,...x});case"list":return o.jsx(yye,{typeName:"List",field:r,...x});case"country":return o.jsx(Hle,{typeName:"Country",field:r,...x});case"phone":return o.jsx(_Se,{typeName:"Phone",field:r,...x});case"web-url":return o.jsx(DSe,{typeName:"Website Url",field:r,...x});case"rating":return o.jsx(kSe,{typeName:"Rating",field:r,...x});case"slider":return o.jsx(PSe,{typeName:"Rating",field:r,...x});case"hidden-field":return o.jsx(MSe,{typeName:"Hidden Field",field:r,...x});case"likert-scale":return o.jsx(LSe,{typeName:"Likert Scale Field",field:r,...x});case"type-signature":return o.jsx(BSe,{typeName:"Likert Scale Field",field:r,...x});case"address":return o.jsx(VSe,{typeName:"Address",field:r,...x});case"grid-component":return o.jsx(Sj,{typeName:"Grid",field:r,...x});case"matrix-scale":return o.jsx(Sj,{typeName:"Grid",field:r,...x});case"matrix-dropdown":return o.jsx($Se,{typeName:"Grid",field:r,...x});case"thumbs":return o.jsx(XSe,{typeName:"Thumbs Up and Down",field:r,...x});case"likert-emoji-scale":return o.jsx(GSe,{typeName:"Thumbs Up and Down",field:r,...x});case"table":return o.jsx(YSe,{typeName:"Grid",field:r,...x});case"dynamic-listing":return o.jsx(KSe,{typeName:"Grid",field:r,...x});default:return o.jsx(o.Fragment,{children:"Empty"})}},S=()=>{f(!0)},T=()=>{f(!1)},C=()=>{let x="";return a?(x=x+" component ",i===af?x=x+" ":x=x+" px-2 "):(x=x+" component draggable field-form-builder-not-preview",i===af?x=x+" pdf-component":x=x+" px-2 pdf-component"),x};return o.jsx(o.Fragment,{children:o.jsxs("div",{style:{opacity:v},className:C(),onMouseOver:S,onMouseOut:T,children:[!a&&d&&o.jsx("i",{ref:a===!1?u:null,className:"elementDrag-icon pi pi-arrows-alt cursor-move",style:{fontSize:"1em"}}),A({...t,isDisabled:m})]})})},JSe={position:"relative"},ZSe=t=>{var O,k,M,j,P;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{removeColumn:f,addColumn:h,cloneColumn:g,formBuilderFormLayout:v,handleDrop:m}=on(),{isPreview:A,isRenderView:S,isAdvanceView:T,emitSocketData:C}=Wt(),[{isDragging:x},w]=sa({type:Ts,item:{type:Ts,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:$=>({isDragging:$.isDragging()})}),I=x&&!S?.25:1;w(d);const _=($,K,ce,X,ne,he,q)=>o.jsx(Yc,{page:u,type:"field",row:c,column:e,section:l,field:$,data:$,path:K,pageIndex:ce,sectionIndex:X,rowIndex:ne,columnIndex:he,fieldIndex:q},`component-${n}-${$==null?void 0:$.uuid}`),N=($,K,ce,X,ne)=>{var Q,Z,H,Y;const he=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",q=`${$.className} justify-content-space-between`,W=`${$.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".add-column-tool"}),o.jsxs("div",{className:q,children:[o.jsxs("span",{ref:A===!1?d:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(tn,{})]}),o.jsx("span",{className:W,children:"Column"})]}),A===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{h(K,ce,X),C()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((Y=(H=(Z=(Q=v[K])==null?void 0:Q.children[ce])==null?void 0:Z.children[X])==null?void 0:H.children)==null?void 0:Y.length)>1&&o.jsxs("button",{className:$.togglerClassName,onClick:()=>{f(K,ce,X,ne),C()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{g(e,K,ce,X,ne),C()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})})]})]})]})};return o.jsx("div",{style:T?{...JSe,opacity:I}:{},className:S?"form-builder-column container-column":"draggable form-builder-column container-column",children:A===!1?o.jsx(o.Fragment,{children:T===!0?o.jsxs(di,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:$=>N($,r,i,a,s),children:[((O=e==null?void 0:e.children)==null?void 0:O.length)>0?(k=e==null?void 0:e.children)==null?void 0:k.map(($,K)=>{const ce=`${n}-${K}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:T,fieldDropArea:!0,data:{path:ce,childrenCount:e.children.length,droppedField:e},onDrop:m}),_($,ce,r,i,a,s,K)]},ce)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(kr,{isAdvanceView:T,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((M=e==null?void 0:e.children)==null?void 0:M.length)>0?(j=e==null?void 0:e.children)==null?void 0:j.map(($,K)=>{const ce=`${n}-${K}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:T,fieldDropArea:!0,data:{path:ce,childrenCount:e.children.length,droppedField:e},onDrop:m}),_($,ce,r,i,a,s,K)]},ce)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(kr,{isAdvanceView:T,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:m,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(P=e==null?void 0:e.children)==null?void 0:P.map(($,K)=>{const ce=`${n}-${K}`;return o.jsx(F.Fragment,{children:_($,ce,r,i,a,s,K)},ce)})})})},eCe=t=>{var i,a,s;const{language:e,onHandleChange:n,stateRow:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row heading"}),o.jsx(wn,{value:(i=r==null?void 0:r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter row heading",onChange:l=>n("heading",e,l.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Row description"}),o.jsx(fo,{value:(a=r==null?void 0:r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter row description",onChange:l=>n("subHeadingText",e,l.target.value)})]}),(r==null?void 0:r.rowIsRepeatable)===!0&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Add To List Button Label"}),o.jsx(wn,{value:(s=r.addToListButtonLabel)==null?void 0:s[e==null?void 0:e.type],onChange:l=>n("addToListButtonLabel",e,l.target.value)})]})]})},tCe=t=>{const{stateRow:e,onHandleChangeAdvanceSettings:n}=t,{renderType:r}=Wt();return o.jsxs("div",{className:"p-fluid",children:[r===j0&&o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"rowIsRepeatable",checked:e==null?void 0:e.rowIsRepeatable,onChange:i=>n("rowIsRepeatable",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isRepeatable",children:"Row is repeatable ?"})]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"field",children:[o.jsx("span",{className:"must-required",children:"*"})," ",o.jsx("label",{children:"Row Minimum Entries"}),o.jsx(ao,{value:e==null?void 0:e.minimumEntries,onChange:i=>n("minimumEntries",i.value)})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"isManualEnumerationEnabled",checked:(e==null?void 0:e.isManualEnumerationEnabled)||!1,onChange:i=>n("isManualEnumerationEnabled",i==null?void 0:i.checked)}),o.jsx("label",{htmlFor:"isManualEnumerationEnabled",children:"Enable manual enumeration for row components?"}),o.jsxs("small",{children:[" ","You need to set mannual enumeration for every component from its settings."," "]})]})]})},Vg=t=>{var T;const{visibilty:e,setVisibility:n,row:r,pageIndex:i,sectionIndex:a,rowIndex:s}=t,{formBuilderSchemaLanguages:l,rowSettingUpdate:c,userSelectedLanguage:u,formBuilderPublishedStatus:d}=on(),[f,h]=F.useState(r),{updateGlobalToast:g,emitSocketData:v}=Wt(),m=(C,x,w)=>{h(I=>{const _=I[C];return Object.assign({},I,{[C]:Object.assign({},_,{[x==null?void 0:x.type]:w})})})},A=(C,x)=>{h(w=>({...w,[C]:x}))},S=()=>{const C={...f,children:r==null?void 0:r.children};c(i,a,s,C),v(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Row updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(No,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Row settings - ",(T=r==null?void 0:r.heading)==null?void 0:T[u==null?void 0:u.type]]})," "]}),!d&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Vt,{className:"mt-3",label:"Update",type:"button",onClick:()=>S(),"aria-label":"Update"})})]}),o.jsxs(as,{children:[o.jsx(Sr,{header:"Text",children:o.jsx(uo,{activeIndex:0,children:l!=null&&l.length?l.map((C,x)=>o.jsx(co,{tabIndex:x,header:C==null?void 0:C.language,children:o.jsx(eCe,{language:C,stateRow:f,onHandleChange:m,...t})},x)):""})}),o.jsx(Sr,{header:"Advance",children:o.jsx(tCe,{stateRow:f,onHandleChangeAdvanceSettings:A})}),o.jsx(Sr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"showRowTitle",checked:f==null?void 0:f.showRowTitle,onChange:C=>A("showRowTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowTitle",children:"Show Row Title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"showRowSubTitle",checked:f==null?void 0:f.showRowSubTitle,onChange:C=>A("showRowSubTitle",C==null?void 0:C.checked)}),o.jsx("label",{htmlFor:"showRowSubTitle",children:"Show Row Sub Title?"})]})]})})]})]})})},nCe={},rCe=t=>{var oe,be,Ce,ve,ye,te,L,le,ie,ue,Ne;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g,handleDrop:v}=on(),{userTaskSubmitFormData:m,taskRegisterData:A,updateTaskRegisterData:S,updateTaskProgressValue:T,addUserDataFormSectionRepeatableData:C,removeUserDataFormSectionRepeatableData:x,task_status:w,TASK_PUBLISHED:I}=wr(),{isPreview:_,isRenderView:N,isAdvanceView:O,renderType:k,isAdmin:M,emitSocketData:j}=Wt(),[P,$]=F.useState(!1),[{isDragging:K},ce]=sa({type:To,item:{type:To,uuid:e.uuid,children:e.children,path:n,data:e},collect:_e=>({isDragging:_e.isDragging()})}),X=K?.25:1;ce(c);const ne=(_e,me,se,we,ke,R)=>o.jsx(ZSe,{page:l,row:e,section:s,data:_e,path:me,pageIndex:se,sectionIndex:we,rowIndex:ke,columnIndex:R,isAdmin:M,emitSocketData:j},`column-${n}-${_e.uuid}`),he=(_e,me,se,we)=>{var Se,fe,ge,pe;const ke=_e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",R=`${_e.className} justify-content-space-between`,Ae=`${_e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-row-tool"}),o.jsxs("div",{className:R,children:[o.jsxs("span",{ref:_===!1?c:null,children:[o.jsx("button",{className:_e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:_e.togglerClassName,onClick:_e.onTogglerClick,children:[o.jsx("span",{className:ke}),o.jsx(tn,{})]}),o.jsxs("span",{className:Ae,children:["Row:"," ",((Se=e==null?void 0:e.heading)==null?void 0:Se[g==null?void 0:g.type])!==""?(fe=e==null?void 0:e.heading)==null?void 0:fe[g==null?void 0:g.type]:"Untitled"]})]}),_===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:_e.togglerClassName,onClick:()=>{d(me,se),j()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((pe=(ge=h[me])==null?void 0:ge.children[se])==null?void 0:pe.children.length)>1&&o.jsxs("button",{className:_e.togglerClassName,onClick:()=>{u(me,se,we),j()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:_e.togglerClassName,onClick:()=>{f(e,me,se,we),j()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>$(!0),className:_e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})},q=Et.findIndex(m,function(_e){return(_e==null?void 0:_e.rowId)===(e==null?void 0:e.uuid)}),W=()=>{var se,we,ke;const _e=Et.cloneDeep(A);((we=(se=m[q])==null?void 0:se.repeatableFieldsData)==null?void 0:we.length)>=(e==null?void 0:e.minimumEntries)?_e[e==null?void 0:e.uuid]=(ke=m[q])==null?void 0:ke.repeatableFields:delete _e[e==null?void 0:e.uuid];const me=Object.keys(_e).length;S(_e),T(me)},Q=(oe=e==null?void 0:e.repeatableFields)==null?void 0:oe.map(_e=>{var me;return{fieldUuid:_e==null?void 0:_e.uuid,field:_e==null?void 0:_e.uuid,header:(me=_e==null?void 0:_e.label)==null?void 0:me.english}}),Z=Q==null?void 0:Q.map(_e=>o.jsx(xr,{field:_e.field,header:_e.header,body:me=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:me[_e==null?void 0:_e.field]}})})},_e.field)),H=()=>{var we;const _e=[...m],me=[];let se=!0;e:for(const[,ke]of e.children.entries()){for(const[,R]of ke.children.entries())if(R!=null&&R.isPostField&&R.isValid!==1){const Ae={fieldId:R.uuid,rowIndex:a};console.log("inValidData",Ae),me.push(Ae),Qt.emit("OnInvalidFieldCatch",Ae),se=!1;break e}se=!0}se&&(me==null?void 0:me.length)===0&&(C(e==null?void 0:e.uuid,(we=_e[q])==null?void 0:we.repeatableFields),Qt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W())},Y=_e=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{x(e==null?void 0:e.uuid,_e==null?void 0:_e.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...nCe,opacity:X,marginTop:`${(be=e==null?void 0:e.margin)==null?void 0:be.top}px`,marginBottom:`${(Ce=e==null?void 0:e.margin)==null?void 0:Ce.bottom}px`,marginLeft:`${(ve=e==null?void 0:e.margin)==null?void 0:ve.left}px`,marginRight:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.right}px`},className:N?"row container-row":"draggable row container-row",children:[P&&o.jsx(Vg,{renderType:k,visibilty:P,setVisibility:$,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:j},"row_settings_"+r+i+a),_===!1?o.jsx(o.Fragment,{children:O===!0?o.jsx(di,{header:"Row",toggleable:!0,headerTemplate:_e=>he(_e,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(te=e==null?void 0:e.children)==null?void 0:te.map((_e,me)=>{const se=`${n}-${me}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:O,data:{path:se,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag"}),ne(_e,se,r,i,a,me)]},se)}),o.jsx(kr,{isAdvanceView:O,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:v,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:O?"form-builder-columns":"",style:O?{overflowX:"auto"}:{},children:(L=e==null?void 0:e.children)==null?void 0:L.map((_e,me)=>{const se=`${n}-${me}`;return o.jsx(F.Fragment,{children:ne(_e,se,r,i,a,me)},se)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&w===I)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(le=e==null?void 0:e.heading)==null?void 0:le[g==null?void 0:g.type]}),o.jsx("span",{children:(ie=e==null?void 0:e.subHeadingText)==null?void 0:ie[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((_e,me)=>{const se=`${n}-${me}`;return o.jsx(F.Fragment,{children:ne(_e,se,r,i,a,me)},se)})})]})}),(e==null?void 0:e.rowIsRepeatable)&&w!==I&&o.jsx(Vt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>H(),label:(ue=e.addToListButtonLabel)==null?void 0:ue[g==null?void 0:g.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(lo,{value:(m==null?void 0:m.length)>0?(Ne=m[q])==null?void 0:Ne.repeatableFieldsData:[],children:[Z,w!==I&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:(_e,me)=>Y(me)})]}),M&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{field:e})]})]})]})},iCe=t=>{var i,a;const{language:e,onHandleChange:n,stateSection:r}=t;return o.jsxs("form",{className:"p-fluid",children:[o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section heading"}),o.jsx(wn,{value:(i=r.heading)==null?void 0:i[e==null?void 0:e.type],placeholder:"Enter section heading",onChange:s=>n("heading",e,s.target.value)})]}),o.jsxs("div",{className:"field",children:[o.jsx("label",{children:"Section description"}),o.jsx(fo,{value:(a=r.subHeadingText)==null?void 0:a[e==null?void 0:e.type],placeholder:"Enter section description",onChange:s=>n("subHeadingText",e,s.target.value)})]})]})},Hh=t=>{const{visibilty:e,setVisibility:n,section:r,pageIndex:i,sectionIndex:a}=t,[s,l]=F.useState(r),{formBuilderSchemaLanguages:c,sectionSettingUpdate:u,userSelectedLanguage:d,formBuilderPublishedStatus:f}=on(),{emitSocketData:h}=Wt(),{updateGlobalToast:g}=Wt(),v=(S,T,C)=>{l(x=>Object.assign({},x,{[S]:Object.assign({},x[S],{[T==null?void 0:T.type]:C})}))},m=(S,T)=>{l(C=>({...C,[S]:T}))},A=()=>{const S={...s,children:r==null?void 0:r.children};u(i,a,S),h(),g({showToast:!0,toastMessage:"Updated",toastDetail:"Section updated",toastType:"success"})};return o.jsx(o.Fragment,{children:o.jsxs(No,{visible:e,position:"left",className:"p-sidebar-lg",onHide:()=>n(!1),children:[o.jsxs("div",{className:"flex justify-content-between flex-wrap card-container ",children:[o.jsxs("div",{className:"flex align-items-center justify-content-center ",children:[" ",o.jsxs("h5",{children:["Section settings - ",r==null?void 0:r.heading[d==null?void 0:d.type]," "]})," "]}),!f&&o.jsx("div",{className:"flex align-items-center justify-content-center",children:o.jsx(Vt,{className:"mt-3",label:"Update",type:"button",onClick:()=>A(),"aria-label":"Update"})})]}),o.jsxs(as,{children:[o.jsx(Sr,{header:"Text",children:o.jsx(uo,{activeIndex:0,children:c!=null&&c.length?c.map((S,T)=>o.jsx(co,{tabIndex:T,header:S==null?void 0:S.language,children:o.jsx(iCe,{language:S,stateSection:s,onHandleChange:v,...t})},T)):""})}),o.jsx(Sr,{header:"Layout",children:o.jsxs("div",{className:"p-fluid",children:[o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionHeader,onChange:S=>m("showSectionHeader",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section header?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"showSectionTitle",checked:s==null?void 0:s.showSectionTitle,onChange:S=>m("showSectionTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionTitle",children:"Show section title?"})]}),o.jsxs("div",{className:"field-checkbox",children:[o.jsx(Kr,{inputId:"showSectionSubTitle",checked:s==null?void 0:s.showSectionSubTitle,onChange:S=>m("showSectionSubTitle",S==null?void 0:S.checked)}),o.jsx("label",{htmlFor:"showSectionSubTitle",children:"Show section sub title?"})]})]})})]})]})})},Yh=t=>{const{saveBuilderElementModalData:e,saveElementModal:n,setSaveElementModal:r}=t,{saveComponent:i}=Wt(),a=G3({initialValues:{builder_element_title:"",builder_element_description:""},validate:c=>{const u={};return c.builder_element_title||(u.builder_element_title="Title is required."),c.builder_element_description||(u.builder_element_description="Description is required."),u},onSubmit:c=>{const u={...c,reusable_template_schema:e==null?void 0:e.reusable_template_schema};i(u,()=>{a.resetForm(),r(!1)})}}),s=c=>!!(a.touched[c]&&a.errors[c]),l=()=>o.jsx("div",{children:o.jsx(Vt,{text:!0,className:"p-button-success",label:"Save",icon:"pi pi-file",onClick:()=>{a.handleSubmit()},autoFocus:!0})});return o.jsxs(Gs,{header:"Save Custom Element",visible:n,style:{width:"20vw"},footer:l(),onHide:()=>r(!1),children:[o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element title"]}),o.jsx(wn,{id:"builder_element_title",name:"builder_element_title",value:a.values.builder_element_title,onChange:a.handleChange,className:`${F3({invalid:s("builder_element_title")})} w-full`})]}),o.jsxs("div",{className:"p-field field",children:[o.jsxs("label",{htmlFor:"username",children:[o.jsx("span",{className:"must-required",children:"*"})," Builder element description"]}),o.jsx(fo,{id:"builder_element_description",name:"builder_element_description",value:a.values.builder_element_description,onChange:a.handleChange,className:`${F3({invalid:s("builder_element_title")})} w-full`})]})]})},aCe=t=>{var ce,X,ne,he,q,W,Q,Z;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=on(),{isPreview:g,isAdvanceView:v,renderType:m,emitSocketData:A}=Wt(),[S,T]=F.useState(!1),[C,x]=F.useState(!1),[w,I]=F.useState(null),[_,N]=F.useState(!1),O=F.useRef(null),k=(H,Y)=>{I(oe=>({...oe,[H]:Y}))},[{isDragging:M},j]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:H=>({isDragging:H.isDragging()})}),P=M?.25:1;j(O);const $=(H,Y,oe,be,Ce)=>o.jsx(rCe,{page:s,section:a,data:H,path:Y,pageIndex:oe,sectionIndex:be,rowIndex:Ce},`row-${n}-${H.uuid}`),K=(H,Y,oe)=>{var ye,te;const be=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ce=`${H.className} justify-content-space-between panel-tab-section`,ve=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ce,children:[o.jsxs("span",{ref:g===!1?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(tn,{})]}),o.jsxs("span",{className:ve,children:[oe+1," ",(ye=e==null?void 0:e.heading)==null?void 0:ye[f==null?void 0:f.type]]})]}),g===!1&&o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".del-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-section-tool"}),o.jsx(dn,{target:".save-tool"}),o.jsx(dn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{c(Y),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((te=d[Y])==null?void 0:te.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{l(Y,oe),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",e),x(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{u(e,Y,oe),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>T(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:P,marginBottom:20},className:v?"draggable row":"",children:[g===!1&&o.jsx(Yh,{saveBuilderElementModalData:w,setSaveBuilderElementModalData:I,saveElementModal:C,setSaveElementModal:x}),S===!0&&o.jsx(Hh,{renderType:m,visibilty:S,setVisibility:T,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),g===!1?o.jsx(o.Fragment,{children:v===!0?o.jsxs(di,{header:(ce=e==null?void 0:e.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:H=>K(H,r,i),onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),children:[((X=e==null?void 0:e.subHeadingText)==null?void 0:X[f==null?void 0:f.type])&&o.jsx("p",{children:(ne=e==null?void 0:e.subHeadingText)==null?void 0:ne[f==null?void 0:f.type]}),o.jsxs("div",{children:[e.children.map((H,Y)=>{const oe=`${n}-${Y}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:v,data:{path:oe,childrenCount:e.children.length},onDrop:h}),$(H,oe,r,i,Y)]},oe)}),o.jsx(kr,{isAdvanceView:v,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{c(r),A()},children:o.jsx(tn,{})})}),((he=d[r])==null?void 0:he.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{l(r,i),A()},children:o.jsx(tn,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=e==null?void 0:e.subHeadingText)==null?void 0:q[f==null?void 0:f.type])&&o.jsx("p",{children:(W=e==null?void 0:e.subHeadingText)==null?void 0:W[f==null?void 0:f.type]}),o.jsx("div",{children:e.children.map((H,Y)=>{const oe=`${n}-${Y}`;return o.jsx(F.Fragment,{children:$(H,oe,r,i,Y)},oe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(Q=e==null?void 0:e.heading)==null?void 0:Q[f==null?void 0:f.type]}),o.jsx("p",{children:(Z=e==null?void 0:e.subHeadingText)==null?void 0:Z[f==null?void 0:f.type]}),o.jsx("hr",{})]}),e.children.map((H,Y)=>{const oe=`${n}-${Y}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:$(H,oe,r,i,Y)},oe)},oe)})]})})]})},sCe={position:"relative"},oCe=t=>{var x,w,I;const{data:e,data:n,path:r,pageIndex:i,sectionIndex:a,rowIndex:s,columnIndex:l,section:c,row:u,page:d}=t,f=F.useRef(null),{handleDrop:h}=on(),{isRenderView:g,isAdvanceView:v,isPreview:m}=Wt(),[{isDragging:A},S]=sa({type:Ts,item:{type:Ts,uuid:e==null?void 0:e.uuid,children:e.children,path:r},collect:_=>({isDragging:_.isDragging()})}),T=A&&!g?.25:1;S(f);const C=(_,N,O,k,M,j,P)=>o.jsx(Yc,{page:d,section:c,row:u,column:n,field:_,pageIndex:O,sectionIndex:k,rowIndex:M,columnIndex:j,fieldIndex:P,type:"field",data:_,path:N},`component-${r}-${_==null?void 0:_.uuid}`);return o.jsx("div",{style:v?{...sCe,opacity:T}:{},className:g?"":"draggable column container-column",children:m===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((x=e==null?void 0:e.children)==null?void 0:x.length)>0?(w=e==null?void 0:e.children)==null?void 0:w.map((_,N)=>{const O=`${r}-${N}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:v,fieldDropArea:!0,data:{path:O,childrenCount:e.children.length,droppedField:e},onDrop:h}),C(_,O,i,a,s,l,N)]},O)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(kr,{isAdvanceView:v,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${r}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:h,isLast:!0})]})}):o.jsx(o.Fragment,{children:(I=e==null?void 0:e.children)==null?void 0:I.map((_,N)=>{const O=`${r}-${N}`;return o.jsx(F.Fragment,{children:C(_,O,i,a,s,l,N)},O)})})})},lCe=t=>{var l;const{isAdvanceView:e}=Wt(),{data:n,page:r,path:i,pageIndex:a}=t,s=(c,u,d,f,h,g,v,m)=>o.jsx(oCe,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(F.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})})})})})})},cCe=t=>{const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:a,isAdvanceView:s}=Wt(),{formBuilderFormSchema:l,handleDrop:c}=on(),u=F.useRef(null),[d,f]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:g=>({isDragging:g.isDragging()})});f(u);const h=(g,v,m,A)=>o.jsx(aCe,{data:g,page:e,section:g,path:v,pageIndex:m,sectionIndex:A},`section_${m}_${A}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:i===!1?o.jsx(o.Fragment,{children:s?o.jsxs(o.Fragment,{children:[e.children.map((g,v)=>{const m=`${n}-${v}`;return o.jsxs(F.Fragment,{children:[s===!0&&o.jsx(kr,{isAdvanceView:s,data:{path:m,childrenCount:e.children.length},onDrop:c}),h(g,m,r,v)]},`section-${v}-${g.uuid}`)}),s===!0&&o.jsx(kr,{isAdvanceView:s,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(lCe,{page:e,path:n,data:e,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((g,v)=>{const m=`${n}-${v}`;return o.jsx(F.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:h(g,m,r,v)})}):((g==null?void 0:g.isHidden)===!1||!i)&&h(g,m,r,v)},`section-${v}-${g.uuid}`)})})})})},uCe=()=>{const{isPreview:t,isAdvanceView:e}=Wt(),[n,r]=F.useState(!1),[i,a]=F.useState(!1),[s,l]=F.useState(0),{formBuilderFormLayout:c,formBuilderFormSchema:u}=on(),{emitSocketData:d}=Wt(),f=(h,g,v)=>o.jsx(cCe,{data:h,path:g,pageIndex:v},`page-${h.uuid}`);return o.jsx("div",{className:"page",children:(c==null?void 0:c.length)===J9&&t===!0?o.jsx(o.Fragment,{children:(c==null?void 0:c.length)&&c.map((h,g)=>{const v=`${g}`;return o.jsx("div",{children:f(h,v,g)},`${h.uuid}-${g}`)})}):o.jsx(o.Fragment,{children:e===!0||t===!0?o.jsx(as,{activeIndex:s,onTabChange:h=>l(h.index),children:(c==null?void 0:c.length)&&c.map((h,g)=>{const v=`${g}`;return o.jsxs(Sr,{disabled:!((h==null?void 0:h.isHidden)===!1||!t),header:"Page",headerTemplate:m=>o.jsx(m7,{options:m,pageIndex:g,setTabSidebarSetting:r,setPageActiveIndex:l,page:h,pages:c}),children:[t===!1&&o.jsx(Of,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:a,pageIndex:g}),o.jsx(Z0,{setVisibility:r,visibilty:n,pageIndex:g,page:h,emitSocketData:d}),f(h,v,g)]},`${h.uuid}-${g}`)})}):o.jsx(o.Fragment,{children:(c==null?void 0:c.length)>0&&(c==null?void 0:c.map((h,g)=>{const v=`${g}`;return o.jsxs(F.Fragment,{children:[t===!1&&o.jsx(Of,{reusableBuilderElementModalVisibility:i,setReusableBuilderElementModalVisibility:a,pageIndex:g}),o.jsx(Z0,{setVisibility:r,visibilty:n,pageIndex:g,page:h,emitSocketData:d}),f(h,v,g)]},`${h.uuid}-${g}`)}))})})})},dCe={position:"relative"},fCe=t=>{var O,k,M,j,P;const{isAdvanceView:e,isPreview:n,emitSocketData:r,isRenderView:i}=Wt(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=F.useRef(null),{removeColumn:m,addColumn:A,cloneColumn:S,formBuilderFormLayout:T,handleDrop:C}=on(),[{isDragging:x},w]=sa({type:Ts,item:{type:Ts,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:$=>({isDragging:$.isDragging()})}),I=x&&!i?.25:1;w(v);const _=($,K,ce,X,ne,he,q)=>o.jsx(Yc,{page:g,column:a,type:"field",row:h,section:f,field:$,data:$,path:K,pageIndex:ce,sectionIndex:X,rowIndex:ne,columnIndex:he,fieldIndex:q},`component-${s}-${$==null?void 0:$.uuid}`),N=($,K,ce,X,ne)=>{var Q,Z,H,Y;const he=$.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",q=`${$.className} justify-content-space-between`,W=`${$.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".add-column-tool"}),o.jsxs("div",{className:q,children:[o.jsxs("span",{ref:n===!1?v:null,children:[o.jsx("button",{className:$.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:$.togglerClassName,onClick:$.onTogglerClick,children:[o.jsx("span",{className:he}),o.jsx(tn,{})]}),o.jsx("span",{className:W,children:"Column"})]}),n===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{A(K,ce,X),r()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((Y=(H=(Z=(Q=T[K])==null?void 0:Q.children[ce])==null?void 0:Z.children[X])==null?void 0:H.children)==null?void 0:Y.length)>1&&o.jsxs("button",{className:$.togglerClassName,onClick:()=>{m(K,ce,X,ne),r()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:$.togglerClassName,onClick:()=>{S(a,K,ce,X,ne),r()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})})]})]})]})};return o.jsx("div",{style:e?{...dCe,opacity:I}:{},className:i?"form-builder-column container-column":"draggable form-builder-column container-column",children:n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(di,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:$=>N($,l,c,u,d),children:[((O=a==null?void 0:a.children)==null?void 0:O.length)>0?(k=a==null?void 0:a.children)==null?void 0:k.map(($,K)=>{const ce=`${s}-${K}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ce,childrenCount:a.children.length,droppedField:a},onDrop:C}),_($,ce,l,c,u,d,K)]},ce)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:C,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((M=a==null?void 0:a.children)==null?void 0:M.length)>0?(j=a==null?void 0:a.children)==null?void 0:j.map(($,K)=>{const ce=`${s}-${K}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:ce,childrenCount:a.children.length,droppedField:a},onDrop:C}),_($,ce,l,c,u,d,K)]},ce)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(kr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:C,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(P=a==null?void 0:a.children)==null?void 0:P.map(($,K)=>{const ce=`${s}-${K}`;return o.jsx(F.Fragment,{children:_($,ce,l,c,u,d,K)},ce)})})})},hCe={},pCe=t=>{var oe,be,Ce,ve,ye,te,L,le,ie,ue,Ne,_e,me,se,we,ke;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,{isRenderView:c,isAdvanceView:u,isAdmin:d,isPreview:f,emitSocketData:h,renderType:g}=Wt(),v=F.useRef(null),{removeRow:m,addRow:A,cloneRow:S,formBuilderFormLayout:T,userSelectedLanguage:C,handleDrop:x}=on(),{userTaskSubmitFormData:w,taskRegisterData:I,updateTaskRegisterData:_,updateTaskProgressValue:N,addUserDataFormSectionRepeatableData:O,removeUserDataFormSectionRepeatableData:k,task_status:M,TASK_PUBLISHED:j}=wr(),[P,$]=F.useState(!1),[{isDragging:K},ce]=sa({type:To,item:{type:To,uuid:e.uuid,children:e.children,path:n,data:e},collect:R=>({isDragging:R.isDragging()})}),X=K?.25:1;ce(v);const ne=(R,Ae,Se,fe,ge,pe)=>o.jsx(fCe,{page:l,row:e,section:s,data:R,path:Ae,pageIndex:Se,sectionIndex:fe,rowIndex:ge,columnIndex:pe,isAdmin:d,emitSocketData:h},`column-${n}-${R.uuid}`),he=(R,Ae,Se,fe)=>{var De,He,it,dt;const ge=R.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",pe=`${R.className} justify-content-space-between`,Be=`${R.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-row-tool"}),o.jsxs("div",{className:pe,children:[o.jsxs("span",{ref:f===!1?v:null,children:[o.jsx("button",{className:R.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:R.togglerClassName,onClick:R.onTogglerClick,children:[o.jsx("span",{className:ge}),o.jsx(tn,{})]}),o.jsxs("span",{className:Be,children:["Row:"," ",((De=e==null?void 0:e.heading)==null?void 0:De[C==null?void 0:C.type])!==""?(He=e==null?void 0:e.heading)==null?void 0:He[C==null?void 0:C.type]:"Untitled"]})]}),f===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:R.togglerClassName,onClick:()=>{A(Ae,Se),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((dt=(it=T[Ae])==null?void 0:it.children[Se])==null?void 0:dt.children.length)>1&&o.jsxs("button",{className:R.togglerClassName,onClick:()=>{m(Ae,Se,fe),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:R.togglerClassName,onClick:()=>{S(e,Ae,Se,fe),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>$(!0),className:R.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})},q=Et.findIndex(w,function(R){return(R==null?void 0:R.rowId)===(e==null?void 0:e.uuid)}),W=()=>{var Se,fe,ge;const R=Et.cloneDeep(I);((fe=(Se=w[q])==null?void 0:Se.repeatableFieldsData)==null?void 0:fe.length)>=(e==null?void 0:e.minimumEntries)?R[e==null?void 0:e.uuid]=(ge=w[q])==null?void 0:ge.repeatableFields:delete R[e==null?void 0:e.uuid];const Ae=Object.keys(R).length;_(R),N(Ae)},Q=(oe=e==null?void 0:e.repeatableFields)==null?void 0:oe.map(R=>{var Ae;return{fieldUuid:R==null?void 0:R.uuid,field:R==null?void 0:R.uuid,header:(Ae=R==null?void 0:R.label)==null?void 0:Ae.english}}),Z=Q==null?void 0:Q.map(R=>o.jsx(xr,{field:R.field,header:R.header,body:Ae=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Ae[R==null?void 0:R.field]}})})},R.field)),H=()=>{var fe;const R=[...w],Ae=[];let Se=!0;e:for(const[,ge]of e.children.entries()){for(const[,pe]of ge.children.entries())if(pe!=null&&pe.isPostField&&pe.isValid!==1){const Be={fieldId:pe.uuid,rowIndex:a};Ae.push(Be),Qt.emit("OnInvalidFieldCatch",Be),Se=!1;break e}Se=!0}Se&&(Ae==null?void 0:Ae.length)===0&&(O(e==null?void 0:e.uuid,(fe=R[q])==null?void 0:fe.repeatableFields),Qt.emit("clearRepeatableFields",e==null?void 0:e.uuid),W())},Y=R=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{k(e==null?void 0:e.uuid,R==null?void 0:R.rowIndex),setTimeout(()=>{W()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...hCe,opacity:X,marginTop:`${(be=e==null?void 0:e.margin)==null?void 0:be.top}px`,marginBottom:`${(Ce=e==null?void 0:e.margin)==null?void 0:Ce.bottom}px`,marginLeft:`${(ve=e==null?void 0:e.margin)==null?void 0:ve.left}px`,marginRight:`${(ye=e==null?void 0:e.margin)==null?void 0:ye.right}px`},className:c?"row container-row":"draggable row container-row",children:[P&&o.jsx(Vg,{renderType:g,visibilty:P,setVisibility:$,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:h},"row_settings_"+r+i+a),g===xm&&o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsxs(F.Fragment,{children:[g===Jd&&o.jsx(kr,{isAdvanceView:u,data:{path:Se,childrenCount:e.children.length},onDrop:x,className:"horizontalDrag"}),ne(R,Se,r,i,a,Ae)]},Se)}),o.jsx(kr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:x,className:"horizontalDrag",isLast:!0})]}),(g===z0||g===j0||g===Cm||g===Q9||g===fp)&&(f===!1?o.jsx(o.Fragment,{children:u===!0?o.jsx(di,{header:"Row",toggleable:!0,headerTemplate:R=>he(R,r,i,a),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(te=e==null?void 0:e.children)==null?void 0:te.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:u,data:{path:Se,childrenCount:e.children.length},onDrop:x,className:"horizontalDrag"}),ne(R,Se,r,i,a,Ae)]},Se)}),o.jsx(kr,{isAdvanceView:u,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:x,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:u?"form-builder-columns":"",style:u?{overflowX:"auto"}:{},children:(L=e==null?void 0:e.children)==null?void 0:L.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsx(F.Fragment,{children:ne(R,Se,r,i,a,Ae)},Se)})})})}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&M===j)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(le=e==null?void 0:e.heading)==null?void 0:le[C==null?void 0:C.type]}),o.jsx("span",{children:(ie=e==null?void 0:e.subHeadingText)==null?void 0:ie[C==null?void 0:C.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsx(F.Fragment,{children:ne(R,Se,r,i,a,Ae)},Se)})})]})})),g===af&&(f===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{A(r,i),h()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]}),((Ne=(ue=T[r])==null?void 0:ue.children[i])==null?void 0:Ne.children.length)>1&&o.jsxs("button",{onClick:()=>{m(r,i,a),h()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>{S(e,r,i,a),h()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>$(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:(_e=e==null?void 0:e.children)==null?void 0:_e.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsx(F.Fragment,{children:ne(R,Se,r,i,a,Ae)},Se)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&M===j)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(me=e==null?void 0:e.heading)==null?void 0:me[C==null?void 0:C.type]}),o.jsx("span",{children:(se=e==null?void 0:e.subHeadingText)==null?void 0:se[C==null?void 0:C.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsx(F.Fragment,{children:ne(R,Se,r,i,a,Ae)},Se)})})]})})),g===Jd&&o.jsx("div",{className:"form-builder-columns",children:e.children.map((R,Ae)=>{const Se=`${n}-${Ae}`;return o.jsx(F.Fragment,{children:ne(R,Se,r,i,a,Ae)},Se)})}),(e==null?void 0:e.rowIsRepeatable)&&M!==j&&o.jsx(Vt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>H(),label:(we=e.addToListButtonLabel)==null?void 0:we[C==null?void 0:C.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(lo,{value:(w==null?void 0:w.length)>0?(ke=w[q])==null?void 0:ke.repeatableFieldsData:[],children:[Z,M!==j&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:R=>Y(R)})]}),d&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{field:e})]})]})]})},gCe=t=>{var ce,X,ne,he,q,W,Q,Z;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Wt(),{handleDrop:a}=on(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=on(),[S,T]=F.useState(!1),[C,x]=F.useState(!1),[w,I]=F.useState({reusable_template_schema:""}),[_,N]=F.useState(!1),O=F.useRef(null),k=(H,Y)=>{I(oe=>({...oe,[H]:Y}))},[{isDragging:M},j]=sa({type:aa,item:{type:aa,uuid:s.uuid,children:s.children,path:l},collect:H=>({isDragging:H.isDragging()})}),P=M?.25:1;j(O);const $=(H,Y,oe,be,Ce)=>o.jsx(pCe,{page:f,section:d,data:H,path:Y,pageIndex:oe,sectionIndex:be,rowIndex:Ce},`row-${l}-${H.uuid}`),K=(H,Y,oe)=>{var ye,te;const be=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ce=`${H.className} justify-content-space-between panel-tab-section`,ve=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ce,children:[o.jsxs("span",{ref:n===!1?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(tn,{})]}),o.jsxs("span",{className:ve,children:[oe+1," ",(ye=s==null?void 0:s.heading)==null?void 0:ye[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".del-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-section-tool"}),o.jsx(dn,{target:".save-tool"}),o.jsx(dn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{g(Y),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((te=m[Y])==null?void 0:te.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(Y,oe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",s),x(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(s,Y,oe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>T(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:P,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(Yh,{saveBuilderElementModalData:w,setSaveBuilderElementModalData:I,saveElementModal:C,setSaveElementModal:x}),S===!0&&o.jsx(Hh,{renderType:r,visibilty:S,setVisibility:T,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(di,{header:(ce=s==null?void 0:s.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:H=>K(H,c,u),onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),children:[((X=s==null?void 0:s.subHeadingText)==null?void 0:X[A==null?void 0:A.type])&&o.jsx("p",{children:(ne=s==null?void 0:s.subHeadingText)==null?void 0:ne[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((H,Y)=>{const oe=`${l}-${Y}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,data:{path:oe,childrenCount:s.children.length},onDrop:a}),$(H,oe,c,u,Y)]},oe)}),o.jsx(kr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(tn,{})})}),((he=m[c])==null?void 0:he.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(tn,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=s==null?void 0:s.subHeadingText)==null?void 0:q[A==null?void 0:A.type])&&o.jsx("p",{children:(W=s==null?void 0:s.subHeadingText)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((H,Y)=>{const oe=`${l}-${Y}`;return o.jsx(F.Fragment,{children:$(H,oe,c,u,Y)},oe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(Q=s==null?void 0:s.heading)==null?void 0:Q[A==null?void 0:A.type]}),o.jsx("p",{children:(Z=s==null?void 0:s.subHeadingText)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((H,Y)=>{const oe=`${l}-${Y}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:$(H,oe,c,u,Y)},oe)},oe)})]})})]})},mCe=t=>{var s;const{data:e,currentPath:n,pageIndex:r,page:i}=t,a=F.useRef(null);return o.jsx(o.Fragment,{children:o.jsxs(Aw,{ref:a,modules:[jV,r5e],spaceBetween:50,slidesPerView:1,navigation:{prevEl:".prev",nextEl:".next"},pagination:{clickable:!1},scrollbar:{el:".swiper-scrollbar",draggable:!1},onSwiper:l=>console.log(l),onSlideChange:()=>console.log("slide change"),children:[(s=e==null?void 0:e.children)==null?void 0:s.map((l,c)=>{var u;return(u=l==null?void 0:l.children)==null?void 0:u.map((d,f)=>{var h;return(h=d==null?void 0:d.children)==null?void 0:h.map((g,v)=>{var m;return(m=g==null?void 0:g.children)==null?void 0:m.map((A,S)=>{const T=`${n}-${c}-${f}-${v}-${S}`;return o.jsx(ww,{children:o.jsx("div",{className:"",children:o.jsx(Yc,{page:i,column:g,type:"field",row:d,section:l,field:A,data:A,path:T,pageIndex:r,sectionIndex:c,rowIndex:f,columnIndex:v,fieldIndex:S},`component-${T}-${A==null?void 0:A.uuid}`)})},`swiper_slide_${T}`)})})})}),o.jsxs("div",{className:"flex justify-content-center",children:[o.jsx(Vt,{className:"mr-2 p-button-info prev",size:"large",label:"Previous",icon:"pi pi-arrow-left",onClick:()=>{}}),o.jsx(Vt,{size:"large",className:"p-button-info next",icon:"pi pi-arrow-right",label:"Next"})]})]})})},vCe=t=>{const{isAdvanceView:e,isRenderView:n,isPreview:r}=Wt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l}=t,{formBuilderFormSchema:c}=on(),u=F.useRef(null),[{},d]=sa({type:aa,item:{type:aa,uuid:a.uuid,children:a.children,path:s},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,g,v,m)=>o.jsx(gCe,{data:h,section:h,path:g,page:a,pageIndex:v,sectionIndex:m},`section_${v}_${m}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${n?"":"draggable page-css mt-0 pt-0 pb-4"}`,"data-image-src":a==null?void 0:a.bgImage,"data-bg-color":`#${a==null?void 0:a.bgColor}`,children:r===!1?o.jsxs(o.Fragment,{children:[a.children.map((h,g)=>{const v=`${s}-${g}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,data:{path:v,childrenCount:a.children.length},onDrop:i}),f(h,v,l,g)]},`section-${g}-${h.uuid}`)}),o.jsx(kr,{isAdvanceView:e,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:(c==null?void 0:c.surveyQuestionSlide)===!0?o.jsx(o.Fragment,{children:o.jsx(mCe,{page:a,data:a,currentPath:s,pageIndex:l})}):o.jsx("div",{className:"p-1",children:a.children.map((h,g)=>{const v=`${s}-${g}`;return o.jsx(F.Fragment,{children:((h==null?void 0:h.isHidden)===!1||!r)&&f(h,v,l,g)},`section-${g}-${h.uuid}`)})})})})},bCe=()=>{const[t,e]=F.useState(!1),{isAdvanceView:n,isPreview:r,emitSocketData:i}=Wt(),[a,s]=F.useState(!1),[l,c]=F.useState(0),{removePage:u,userSelectedLanguage:d,formBuilderFormLayout:f,formBuilderFormLayout:h,clonePage:g}=on(),v=(m,A,S)=>o.jsx(vCe,{data:m,path:A,pageIndex:S},`page-${m.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(h==null?void 0:h.length)===J9&&r===!0?o.jsx(o.Fragment,{children:(h==null?void 0:h.length)&&h.map((m,A)=>{const S=`${A}`;return o.jsx("div",{children:v(m,S,A)},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:n===!0||r===!0?o.jsx(as,{activeIndex:l,onTabChange:m=>c(m.index),children:(h==null?void 0:h.length)&&h.map((m,A)=>{const S=`${A}`;return o.jsxs(Sr,{disabled:!((m==null?void 0:m.isHidden)===!1||!r),header:"Page",headerTemplate:T=>o.jsx(m7,{options:T,pageIndex:A,page:m,isPreview:r,setTabSidebarSetting:s,clonePage:g,emitSocketData:i,formBuilderFormLayout:f,userSelectedLanguage:d,removePage:u,setPageActiveIndex:c,pages:h}),children:[r===!1&&o.jsx(Of,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(Z0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,S,A)]},`${m.uuid}-${A}`)})}):o.jsx(o.Fragment,{children:(h==null?void 0:h.length)>0&&(h==null?void 0:h.map((m,A)=>{const S=`${A}`;return o.jsxs(F.Fragment,{children:[r===!1&&o.jsx(Of,{reusableBuilderElementModalVisibility:t,setReusableBuilderElementModalVisibility:e,pageIndex:A}),o.jsx(Z0,{setVisibility:s,visibilty:a,pageIndex:A,page:m,emitSocketData:i}),v(m,S,A)]},`${m.uuid}-${A}`)}))})})})})},yCe={position:"relative"},ACe=t=>{var C,x,w;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{handleDrop:f}=on(),{isPreview:h,isRenderView:g,isAdvanceView:v}=Wt(),[{isDragging:m},A]=sa({type:Ts,item:{type:Ts,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:I=>({isDragging:I.isDragging()})}),S=m&&!g?.25:1;A(d);const T=(I,_,N,O,k,M,j)=>o.jsx(Yc,{page:u,type:"field",row:c,section:l,field:I,data:I,path:_,pageIndex:N,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:j},`component-${n}-${I==null?void 0:I.uuid}`);return o.jsx("div",{style:v?{...yCe,opacity:S}:{},className:g?"form-builder-column container-column":"draggable form-builder-column container-column",children:h===!1?o.jsxs("div",{className:"builder-row-column",children:[((C=e==null?void 0:e.children)==null?void 0:C.length)>0?(x=e==null?void 0:e.children)==null?void 0:x.map((I,_)=>{const N=`${n}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:v,data:{path:N,childrenCount:e.children.length,droppedField:e},onDrop:f}),T(I,N,r,i,a,s,_)]},N)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(kr,{isAdvanceView:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},isLast:!0,onDrop:f})]}):o.jsx(o.Fragment,{children:(w=e==null?void 0:e.children)==null?void 0:w.map((I,_)=>{const N=`${n}-${_}`;return o.jsx(F.Fragment,{children:T(I,N,r,i,a,s,_)},N)})})})},wCe={},SCe=t=>{var N,O,k,M,j,P,$,K,ce;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{removeRow:u,addRow:d,cloneRow:f,formBuilderFormLayout:h,userSelectedLanguage:g}=on(),{isPreview:v,isRenderView:m}=Wt(),{task_status:A,TASK_PUBLISHED:S}=wr(),[T,C]=F.useState(!1),[{isDragging:x},w]=sa({type:To,item:{type:To,uuid:e.uuid,children:e.children,path:n,data:e},collect:X=>({isDragging:X.isDragging()})}),I=x?.25:1;w(c);const _=(X,ne,he,q,W,Q)=>o.jsx(ACe,{page:l,row:e,section:s,data:X,path:ne,pageIndex:he,sectionIndex:q,rowIndex:W,columnIndex:Q},`column-${n}-${X.uuid}`);return o.jsxs("div",{style:{...wCe,opacity:I,marginTop:`${(N=e==null?void 0:e.margin)==null?void 0:N.top}px`,marginBottom:`${(O=e==null?void 0:e.margin)==null?void 0:O.bottom}px`,marginLeft:`${(k=e==null?void 0:e.margin)==null?void 0:k.left}px`,marginRight:`${(M=e==null?void 0:e.margin)==null?void 0:M.right}px`},className:m?"row container-row":"draggable row container-row",children:[T&&o.jsx(Vg,{visibilty:T,setVisibility:C,row:e,pageIndex:r,sectionIndex:i,rowIndex:a},"row_settings_"+r+i+a),v===!1?o.jsxs("div",{children:[o.jsx("span",{className:"row-setting-block-pdf-editor",children:o.jsxs("div",{className:"pdf-setting-container",children:[o.jsxs("button",{onClick:()=>{d(r,i)},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]}),((P=(j=h[r])==null?void 0:j.children[i])==null?void 0:P.children.length)>1&&o.jsxs("button",{onClick:()=>{u(r,i,a)},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>{f(e,r,i,a)},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]}),o.jsxs("button",{onClick:()=>C(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})]})}),o.jsx("div",{className:"form-builder-columns",children:($=e==null?void 0:e.children)==null?void 0:$.map((X,ne)=>{const he=`${n}-${ne}`;return o.jsx(F.Fragment,{children:_(X,he,r,i,a,ne)},he)})})]}):o.jsx(o.Fragment,{children:!(e!=null&&e.rowIsRepeatable&&A===S)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(K=e==null?void 0:e.heading)==null?void 0:K[g==null?void 0:g.type]}),o.jsx("span",{children:(ce=e==null?void 0:e.subHeadingText)==null?void 0:ce[g==null?void 0:g.type]}),o.jsx("div",{className:"form-builder-columns",children:e.children.map((X,ne)=>{const he=`${n}-${ne}`;return o.jsx(F.Fragment,{children:_(X,he,r,i,a,ne)},he)})})]})})]})},CCe=t=>{var w,I,_;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{userSelectedLanguage:l}=on(),{isPreview:c,isAdvanceView:u}=Wt(),[d,f]=F.useState(!1),[h,g]=F.useState(!1),[v,m]=F.useState(null),A=F.useRef(null),[{isDragging:S},T]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:N=>({isDragging:N.isDragging()})}),C=S?.25:1;T(A);const x=(N,O,k,M,j)=>o.jsx(SCe,{page:s,section:a,data:N,path:O,pageIndex:k,sectionIndex:M,rowIndex:j},`row-${n}-${N.uuid}`);return o.jsxs("div",{style:{opacity:C,marginBottom:20},className:u?"draggable row":"",children:[c===!1&&o.jsx(Yh,{saveBuilderElementModalData:v,setSaveBuilderElementModalData:m,saveElementModal:h,setSaveElementModal:g}),d===!0&&o.jsx(Hh,{visibilty:d,setVisibility:f,section:e,pageIndex:r,sectionIndex:i},"section_settings_"+r+i),c===!1?o.jsx("div",{children:o.jsx("div",{children:e.children.map((N,O)=>{const k=`${n}-${O}`;return o.jsx(F.Fragment,{children:x(N,k,r,i,O)},k)})})}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[(e==null?void 0:e.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(w=e==null?void 0:e.heading)==null?void 0:w[l==null?void 0:l.type]}),((I=e==null?void 0:e.subHeadingText)==null?void 0:I[l==null?void 0:l.type])&&o.jsx("p",{children:(_=e==null?void 0:e.subHeadingText)==null?void 0:_[l==null?void 0:l.type]}),o.jsx("hr",{})]}),e.children.map((N,O)=>{const k=`${n}-${O}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:x(N,k,r,i,O)},k)},k)})]})})]})},K5={},R5={height:"1280px",width:"100%"},xCe=t=>{var f,h,g,v;const{data:e,path:n,pageIndex:r}=t,{isPreview:i,isRenderView:a}=Wt(),s=F.useRef(null),[{isDragging:l},c]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:m=>({isDragging:m.isDragging()})}),u=l?0:1;c(s);const d=(m,A,S,T)=>o.jsx(CCe,{data:m,section:m,path:A,page:e,pageIndex:S,sectionIndex:T},`section_${S}_${T}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"pdf flex justify-content-center",children:i===!1?o.jsx("div",{id:e==null?void 0:e.uuid,className:"page-block ",style:(e==null?void 0:e.bgType)==="image"?{...K5,...R5,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`}:{...K5,...R5,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:((e==null?void 0:e.isCoverPage)===!1||(e==null?void 0:e.isCoverPage)===void 0)&&o.jsx(o.Fragment,{children:e.children.map((m,A)=>{const S=`${n}-${A}`;return o.jsx(F.Fragment,{children:d(m,S,r,A)},`section-${A}-${m.uuid}`)})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page-block",style:(e==null?void 0:e.bgType)==="image"?{...K5,...R5,opacity:u,backgroundImage:`url("${e==null?void 0:e.bgImage}")`,backgroundSize:"cover"}:{...K5,...R5,opacity:u,backgroundColor:`#${e==null?void 0:e.bgColor}`},children:o.jsx("div",{style:{marginTop:`${(f=e==null?void 0:e.margin)==null?void 0:f.top}px`,marginBottom:`${(h=e==null?void 0:e.margin)==null?void 0:h.bottom}px`,marginLeft:`${(g=e==null?void 0:e.margin)==null?void 0:g.left}px`,marginRight:`${(v=e==null?void 0:e.margin)==null?void 0:v.right}px`},children:e.children.map((m,A)=>{const S=`${n}-${A}`;return o.jsx(F.Fragment,{children:((m==null?void 0:m.isHidden)===!1||!i)&&d(m,S,r,A)},`section-${A}-${m.uuid}`)})})})})})})},TCe=()=>{const{isPreview:t}=Wt(),[e,n]=F.useState(!1),[r,i]=F.useState(0),[a,s]=F.useState(!1),{formBuilderFormLayout:l}=on(),c=(u,d,f)=>o.jsx(xCe,{data:u,path:d,pageIndex:f},`page-${u.uuid}`);return o.jsx("div",{className:"page",children:(l==null?void 0:l.length)===J9&&t===!0?o.jsx(o.Fragment,{children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;return o.jsx("div",{className:"scroll-height-400",children:c(u,f,d)},`${u.uuid}-${d}`)})}):o.jsx(o.Fragment,{children:t===!1?o.jsx(as,{activeIndex:r,onTabChange:u=>i(u.index),children:(l==null?void 0:l.length)&&l.map((u,d)=>{const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs(Sr,{header:"Page",headerTemplate:h=>o.jsx(m7,{options:h,pageIndex:d,page:u,setTabSidebarSetting:n,setPageActiveIndex:i,pages:l}),children:[t===!1&&o.jsx(Of,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(Z0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})}):o.jsx("div",{className:"",children:(l==null?void 0:l.length)&&l.map((u,d)=>{var h;const f=`${d}`;if((u==null?void 0:u.isHidden)===!1||!t)return o.jsxs("section",{id:u==null?void 0:u.uuid,"data-nav-title":(h=u==null?void 0:u.title)==null?void 0:h.english,"data-scrollspy":!0,children:[t===!1&&o.jsx(Of,{reusableBuilderElementModalVisibility:a,setReusableBuilderElementModalVisibility:s,pageIndex:d}),o.jsxs("div",{className:"p-3",children:[o.jsx(Z0,{setVisibility:n,visibilty:e,pageIndex:d,page:u}),o.jsx("div",{children:c(u,f,d)})]})]},`${u.uuid}-${d}`)})})})})},ECe=t=>{var S,T,C,x;const e=F.useRef(null),{removeColumn:n,addColumn:r,cloneColumn:i,formBuilderFormLayout:a}=on(),{isPreview:s,emitSocketData:l}=Wt(),{options:c,pageIndex:u,sectionIndex:d,rowIndex:f,columnIndex:h,data:g}=t,v=c.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",m=`${c.className} justify-content-space-between`,A=`${c.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".add-column-tool"}),o.jsxs("div",{className:m,children:[o.jsxs("span",{ref:s===!1?e:null,children:[o.jsx("button",{className:c.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:c.togglerClassName,onClick:c.onTogglerClick,children:[o.jsx("span",{className:v}),o.jsx(tn,{})]}),o.jsx("span",{className:A,children:"Column"})]}),s===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-column-tool","data-pr-tooltip":"Add Column",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{r(u,d,f),l()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((x=(C=(T=(S=a[u])==null?void 0:S.children[d])==null?void 0:T.children[f])==null?void 0:C.children)==null?void 0:x.length)>1&&o.jsxs("button",{className:c.togglerClassName,onClick:()=>{n(u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:c.togglerClassName,onClick:()=>{i(g,u,d,f,h),l()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})})]})]})]})},ICe={position:"relative"},_Ce=t=>{var C,x,w,I,_;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Wt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=F.useRef(null),[{isDragging:m},A]=sa({type:Ts,item:{type:Ts,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:N=>({isDragging:N.isDragging()})}),S=m&&!n?.25:1;A(v);const T=(N,O,k,M,j,P,$)=>o.jsx(Yc,{page:g,column:a,type:"field",row:h,section:f,field:N,data:N,path:O,pageIndex:k,sectionIndex:M,rowIndex:j,columnIndex:P,fieldIndex:$},`component-${s}-${N==null?void 0:N.uuid}`);return o.jsx("div",{style:e?{...ICe,opacity:S}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(di,{className:"builder-row-column",header:"Column",toggleable:!0,headerTemplate:N=>o.jsx(ECe,{options:N,pageIndex:l,sectionIndex:c,rowIndex:u,data:a,columnIndex:d}),children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(x=a==null?void 0:a.children)==null?void 0:x.map((N,O)=>{const k=`${s}-${O}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),T(N,k,l,c,u,d,O)]},k)}):o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]}),o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((w=a==null?void 0:a.children)==null?void 0:w.length)>0?(I=a==null?void 0:a.children)==null?void 0:I.map((N,O)=>{const k=`${s}-${O}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:k,childrenCount:a.children.length,droppedField:a},onDrop:i}),T(N,k,l,c,u,d,O)]},k)}):o.jsx(o.Fragment,{children:o.jsxs("span",{className:"pt-4 text-center text-primary",style:{display:"block",zIndex:-1,width:"99%"},children:["Please drop the element from the sidebar below",o.jsx("p",{children:o.jsx("i",{className:"pi pi-arrow-down py-2",style:{fontSize:"2em"}})})]})}),o.jsx(kr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})})}):o.jsx(o.Fragment,{children:(_=a==null?void 0:a.children)==null?void 0:_.map((N,O)=>{const k=`${s}-${O}`;return o.jsx(F.Fragment,{children:T(N,k,l,c,u,d,O)},k)})})})},DCe=t=>{var T,C,x,w;const{options:e,pageIndex:n,sectionIndex:r,rowIndex:i,data:a}=t,[,s]=F.useState(!1),l=F.useRef(null),{isPreview:c,emitSocketData:u}=Wt(),{removeRow:d,addRow:f,cloneRow:h,formBuilderFormLayout:g,userSelectedLanguage:v}=on(),m=e!=null&&e.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",A=`${e==null?void 0:e.className} justify-content-space-between`,S=`${e==null?void 0:e.titleClassName} pl-1 text-primary`;return o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-row-tool"}),o.jsxs("div",{className:A,children:[o.jsxs("span",{ref:c===!1?l:null,children:[o.jsx("button",{className:e==null?void 0:e.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:e==null?void 0:e.onTogglerClick,children:[o.jsx("span",{className:m}),o.jsx(tn,{})]}),o.jsxs("span",{className:S,children:["Row:"," ",((T=a==null?void 0:a.heading)==null?void 0:T[v==null?void 0:v.type])!==""?(C=a==null?void 0:a.heading)==null?void 0:C[v==null?void 0:v.type]:"Untitled"]})]}),c===!1&&o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-row-tool","data-pr-tooltip":"Add Row",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{f(n,r),u()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((w=(x=g[n])==null?void 0:x.children[r])==null?void 0:w.children.length)>1&&o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{d(n,r,i),u()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:e==null?void 0:e.togglerClassName,onClick:()=>{h(a,n,r,i),u()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"setting-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{onClick:()=>s(!0),className:e==null?void 0:e.togglerClassName,children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})},NCe={},OCe=t=>{var W,Q,Z,H,Y,oe,be,Ce,ve,ye,te;const{isAdvanceView:e,isRenderView:n,isPreview:r,isAdmin:i,renderType:a,emitSocketData:s}=Wt(),{handleDrop:l}=on(),{data:c,path:u,pageIndex:d,sectionIndex:f,rowIndex:h,section:g,page:v}=t,m=F.useRef(null),{userSelectedLanguage:A}=on(),{userTaskSubmitFormData:S,taskRegisterData:T,updateTaskRegisterData:C,updateTaskProgressValue:x,addUserDataFormSectionRepeatableData:w,removeUserDataFormSectionRepeatableData:I,task_status:_,TASK_PUBLISHED:N}=wr(),[O,k]=F.useState(!1),[{isDragging:M},j]=sa({type:To,item:{type:To,uuid:c.uuid,children:c.children,path:u,data:c},collect:L=>({isDragging:L.isDragging()})}),P=M?.25:1;j(m);const $=(L,le,ie,ue,Ne,_e)=>o.jsx(_Ce,{page:v,row:c,section:g,data:L,path:le,pageIndex:ie,sectionIndex:ue,rowIndex:Ne,columnIndex:_e,emitSocketData:s},`column-${u}-${L.uuid}`),K=Et.findIndex(S,function(L){return(L==null?void 0:L.rowId)===(c==null?void 0:c.uuid)}),ce=()=>{var ie,ue,Ne;const L=Et.cloneDeep(T);((ue=(ie=S[K])==null?void 0:ie.repeatableFieldsData)==null?void 0:ue.length)>=(c==null?void 0:c.minimumEntries)?L[c==null?void 0:c.uuid]=(Ne=S[K])==null?void 0:Ne.repeatableFields:delete L[c==null?void 0:c.uuid];const le=Object.keys(L).length;C(L),x(le)},X=(W=c==null?void 0:c.repeatableFields)==null?void 0:W.map(L=>{var le;return{fieldUuid:L==null?void 0:L.uuid,field:L==null?void 0:L.uuid,header:(le=L==null?void 0:L.label)==null?void 0:le.english}}),ne=X==null?void 0:X.map(L=>o.jsx(xr,{field:L.field,header:L.header,body:le=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:le[L==null?void 0:L.field]}})})},L.field)),he=()=>{var ue;const L=[...S],le=[];let ie=!0;e:for(const[,Ne]of c.children.entries()){for(const[,_e]of Ne.children.entries())if(_e!=null&&_e.isPostField&&_e.isValid!==1){const me={fieldId:_e.uuid,rowIndex:h};console.log("inValidData",me),le.push(me),Qt.emit("OnInvalidFieldCatch",me),ie=!1;break e}ie=!0}ie&&(le==null?void 0:le.length)===0&&(w(c==null?void 0:c.uuid,(ue=L[K])==null?void 0:ue.repeatableFields),Qt.emit("clearRepeatableFields",c==null?void 0:c.uuid),ce())},q=L=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{I(c==null?void 0:c.uuid,L==null?void 0:L.rowIndex),setTimeout(()=>{ce()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...NCe,opacity:P,marginTop:`${(Q=c==null?void 0:c.margin)==null?void 0:Q.top}px`,marginBottom:`${(Z=c==null?void 0:c.margin)==null?void 0:Z.bottom}px`,marginLeft:`${(H=c==null?void 0:c.margin)==null?void 0:H.left}px`,marginRight:`${(Y=c==null?void 0:c.margin)==null?void 0:Y.right}px`},className:n?"row container-row":"draggable row container-row",children:[O&&o.jsx(Vg,{renderType:a,visibilty:O,setVisibility:k,row:c,pageIndex:d,sectionIndex:f,rowIndex:h,emitSocketData:s},"row_settings_"+d+f+h),r===!1?o.jsx(o.Fragment,{children:e===!0?o.jsx(di,{header:"Row",toggleable:!0,headerTemplate:L=>o.jsx(DCe,{options:L,pageIndex:d,sectionIndex:f,rowIndex:h,data:c}),children:o.jsxs("div",{className:"form-builder-columns",style:{overflowX:"auto"},children:[(oe=c==null?void 0:c.children)==null?void 0:oe.map((L,le)=>{const ie=`${u}-${le}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,data:{path:ie,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag"}),$(L,ie,d,f,h,le)]},ie)}),o.jsx(kr,{isAdvanceView:e,data:{path:`${u}-${c.children.length}`,childrenCount:c.children.length},onDrop:l,className:"horizontalDrag",isLast:!0})]})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"form-builder-columns":"",style:e?{overflowX:"auto"}:{},children:(be=c==null?void 0:c.children)==null?void 0:be.map((L,le)=>{const ie=`${u}-${le}`;return o.jsx(F.Fragment,{children:$(L,ie,d,f,h,le)},ie)})})})}):o.jsx(o.Fragment,{children:!(c!=null&&c.rowIsRepeatable&&_===N)&&o.jsxs(o.Fragment,{children:[o.jsx("h5",{children:(Ce=c==null?void 0:c.heading)==null?void 0:Ce[A==null?void 0:A.type]}),o.jsx("span",{children:(ve=c==null?void 0:c.subHeadingText)==null?void 0:ve[A==null?void 0:A.type]}),o.jsx("div",{className:"form-builder-columns",children:c.children.map((L,le)=>{const ie=`${u}-${le}`;return o.jsx(F.Fragment,{children:$(L,ie,d,f,h,le)},ie)})})]})}),(c==null?void 0:c.rowIsRepeatable)&&_!==N&&o.jsx(Vt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>he(),label:(ye=c.addToListButtonLabel)==null?void 0:ye[A==null?void 0:A.type]}),(c==null?void 0:c.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(lo,{value:(S==null?void 0:S.length)>0?(te=S[K])==null?void 0:te.repeatableFieldsData:[],children:[ne,_!==N&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:L=>q(L)})]}),i&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{field:c})]})]})]})},FCe=t=>{var ce,X,ne,he,q,W,Q,Z;const{isAdvanceView:e,isPreview:n,renderType:r,emitSocketData:i}=Wt(),{handleDrop:a}=on(),{data:s,path:l,pageIndex:c,sectionIndex:u,section:d,page:f}=t,{removeSection:h,addSection:g,cloneSection:v,formBuilderFormLayout:m,userSelectedLanguage:A}=on(),[S,T]=F.useState(!1),[C,x]=F.useState(!1),[w,I]=F.useState({reusable_template_schema:""}),[_,N]=F.useState(!1),O=F.useRef(null),k=(H,Y)=>{I(oe=>({...oe,[H]:Y}))},[{isDragging:M},j]=sa({type:aa,item:{type:aa,uuid:s.uuid,children:s.children,path:l},collect:H=>({isDragging:H.isDragging()})}),P=M?.25:1;j(O);const $=(H,Y,oe,be,Ce)=>o.jsx(OCe,{page:f,section:d,data:H,path:Y,pageIndex:oe,sectionIndex:be,rowIndex:Ce,emitSocketData:i},`row-${l}-${H.uuid}`),K=(H,Y,oe)=>{var ye,te;const be=H.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",Ce=`${H.className} justify-content-space-between panel-tab-section`,ve=`${H.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:Ce,children:[o.jsxs("span",{ref:n===!1?O:null,children:[o.jsx("button",{className:H.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:H.togglerClassName,onClick:H.onTogglerClick,children:[o.jsx("span",{className:be}),o.jsx(tn,{})]}),o.jsxs("span",{className:ve,children:[oe+1," ",(ye=s==null?void 0:s.heading)==null?void 0:ye[A==null?void 0:A.type]]})]}),n===!1&&o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".del-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-section-tool"}),o.jsx(dn,{target:".save-tool"}),o.jsx(dn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{g(Y),i()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((te=m[Y])==null?void 0:te.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{h(Y,oe),i()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"save-tool","data-pr-tooltip":"Save",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{k("reusable_template_schema",s),x(!0)},children:[o.jsx("span",{className:"pi pi-save"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>{v(s,Y,oe),i()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:H.togglerClassName,onClick:()=>T(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:P,marginBottom:20},className:e?"draggable row":"",children:[n===!1&&o.jsx(Yh,{saveBuilderElementModalData:w,setSaveBuilderElementModalData:I,saveElementModal:C,setSaveElementModal:x}),S===!0&&o.jsx(Hh,{renderType:r,visibilty:S,setVisibility:T,section:s,pageIndex:c,sectionIndex:u,emitSocketData:i},"section_settings_"+c+u),n===!1?o.jsx(o.Fragment,{children:e===!0?o.jsxs(di,{header:(ce=s==null?void 0:s.heading)==null?void 0:ce.english,toggleable:!0,headerTemplate:H=>K(H,c,u),onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),children:[((X=s==null?void 0:s.subHeadingText)==null?void 0:X[A==null?void 0:A.type])&&o.jsx("p",{children:(ne=s==null?void 0:s.subHeadingText)==null?void 0:ne[A==null?void 0:A.type]}),o.jsxs("div",{children:[s.children.map((H,Y)=>{const oe=`${l}-${Y}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,data:{path:oe,childrenCount:s.children.length},onDrop:a}),$(H,oe,c,u,Y)]},oe)}),o.jsx(kr,{isAdvanceView:e,data:{path:`${l}-${s.children.length}`,childrenCount:s.children.length,droppedField:s},onDrop:a,isLast:!0})]}),_&&o.jsxs("div",{className:"m-3 flex justify-content-end",children:[o.jsx("span",{className:"add-section-tool ","data-pr-tooltip":"Add Section",children:o.jsx("i",{className:"pi pi-plus",onClick:()=>{g(c),i()},children:o.jsx(tn,{})})}),((he=m[c])==null?void 0:he.children.length)>1&&o.jsx("span",{className:"del-tool ml-2",children:o.jsx("i",{className:"pi pi-trash","data-pr-tooltip":"Delete",onClick:()=>{h(c,u),i()},children:o.jsx(tn,{})})})]})]}):o.jsxs(o.Fragment,{children:[((q=s==null?void 0:s.subHeadingText)==null?void 0:q[A==null?void 0:A.type])&&o.jsx("p",{children:(W=s==null?void 0:s.subHeadingText)==null?void 0:W[A==null?void 0:A.type]}),o.jsx("div",{children:s.children.map((H,Y)=>{const oe=`${l}-${Y}`;return o.jsx(F.Fragment,{children:$(H,oe,c,u,Y)},oe)})})]})}):o.jsx(o.Fragment,{children:o.jsxs("div",{className:"",children:[(s==null?void 0:s.showSectionHeader)&&o.jsxs(o.Fragment,{children:[o.jsx("h4",{children:(Q=s==null?void 0:s.heading)==null?void 0:Q[A==null?void 0:A.type]}),o.jsx("p",{children:(Z=s==null?void 0:s.subHeadingText)==null?void 0:Z[A==null?void 0:A.type]}),o.jsx("hr",{})]}),s.children.map((H,Y)=>{const oe=`${l}-${Y}`;return o.jsx(F.Fragment,{children:o.jsx("div",{className:"",children:$(H,oe,c,u,Y)},oe)},oe)})]})})]})},kCe={position:"relative"},PCe=t=>{var C,x,w;const{isAdvanceView:e,isRenderView:n,isPreview:r}=Wt(),{handleDrop:i}=on(),{data:a,path:s,pageIndex:l,sectionIndex:c,rowIndex:u,columnIndex:d,section:f,row:h,page:g}=t,v=F.useRef(null),[{isDragging:m},A]=sa({type:Ts,item:{type:Ts,uuid:a==null?void 0:a.uuid,children:a.children,path:s},collect:I=>({isDragging:I.isDragging()})}),S=m&&!n?.25:1;A(v);const T=(I,_,N,O,k,M,j)=>o.jsx(Yc,{page:g,type:"field",row:h,column:a,section:f,field:I,data:I,path:_,pageIndex:N,sectionIndex:O,rowIndex:k,columnIndex:M,fieldIndex:j},`component-${s}-${I==null?void 0:I.uuid}`);return o.jsx("div",{style:e?{...kCe,opacity:S}:{},className:n?"":"draggable column container-column",children:r===!1?o.jsx(o.Fragment,{children:o.jsxs("div",{children:[((C=a==null?void 0:a.children)==null?void 0:C.length)>0?(x=a==null?void 0:a.children)==null?void 0:x.map((I,_)=>{const N=`${s}-${_}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:e,fieldDropArea:!0,data:{path:N,childrenCount:a.children.length,droppedField:a},onDrop:i}),T(I,N,l,c,u,d,_)]},N)}):o.jsx(o.Fragment,{}),o.jsx(kr,{isAdvanceView:e,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${s}-${a.children.length}`,childrenCount:a.children.length,droppedField:a},onDrop:i,isLast:!0})]})}):o.jsx(o.Fragment,{children:(w=a==null?void 0:a.children)==null?void 0:w.map((I,_)=>{const N=`${s}-${_}`;return o.jsx(F.Fragment,{children:T(I,N,l,c,u,d,_)},N)})})})},MCe=t=>{var l;const{isAdvanceView:e}=Wt(),{data:n,page:r,currentPath:i,pageIndex:a}=t,s=(c,u,d,f,h,g,v,m)=>o.jsx(PCe,{page:r,row:m,section:v,data:c,path:`${d}-${f}-${h}-${g}`,pageIndex:d,sectionIndex:f,rowIndex:h,columnIndex:g},`column-${i}-${c.uuid}`);return o.jsx(o.Fragment,{children:(l=n==null?void 0:n.children)==null?void 0:l.map((c,u)=>{var d;return(d=c==null?void 0:c.children)==null?void 0:d.map((f,h)=>{var g;return o.jsx(o.Fragment,{children:o.jsx("div",{className:e?"columns":"",style:e?{overflowX:"auto"}:{},children:(g=f==null?void 0:f.children)==null?void 0:g.map((v,m)=>{const A=`${i}-${u}-${h}-${m}`;return o.jsx(F.Fragment,{children:s(v,A,a,u,h,m,c,f)},A)})})})})})})},LCe=t=>{const{data:e,path:n,pageIndex:r}=t,{isAdvanceView:i,isRenderView:a,isPreview:s}=Wt(),{formBuilderFormSchema:l,handleDrop:c}=on(),u=F.useRef(null),[{},d]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:h=>({isDragging:h.isDragging()})});d(u);const f=(h,g,v,m)=>o.jsx(FCe,{data:h,section:h,path:g,page:e,pageIndex:v,sectionIndex:m},`section_${v}_${m}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${a?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:s===!1?o.jsx(o.Fragment,{children:i?o.jsxs(o.Fragment,{children:[e.children.map((h,g)=>{const v=`${n}-${g}`;return o.jsxs(F.Fragment,{children:[i===!0&&o.jsx(kr,{isAdvanceView:i,data:{path:v,childrenCount:e.children.length},onDrop:c}),f(h,v,r,g)]},`section-${g}-${h.uuid}`)}),i===!0&&o.jsx(kr,{isAdvanceView:i,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:c,isLast:!0})]}):o.jsx(o.Fragment,{children:o.jsx(MCe,{page:e,data:e,path:n,pageIndex:r})})}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"p-1",children:e.children.map((h,g)=>{const v=`${n}-${g}`;return o.jsx(F.Fragment,{children:l!=null&&l.showConditionalFields?o.jsx(o.Fragment,{children:o.jsx("div",{children:f(h,v,r,g)})}):((h==null?void 0:h.isHidden)===!1||!s)&&f(h,v,r,g)},`section-${g}-${h.uuid}`)})})})})},BCe=()=>{const[t,e]=F.useState(!1),{formBuilderFormLayout:n}=on(),{isPreview:r}=Wt(),i=()=>{},a=(s,l,c)=>o.jsx(LCe,{data:s,path:l,pageIndex:c},`page-${s.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:o.jsx("div",{children:(n==null?void 0:n.length)&&n.map((s,l)=>{const c=`${l}`;if((s==null?void 0:s.isHidden)===!1||!r)return o.jsxs("div",{children:[o.jsx(Z0,{setVisibility:e,visibilty:t,pageIndex:l,page:s,emitSocketData:i}),a(s,c,l)]},`policie-page-${l}`)})})})})},VCe={position:"relative"},qCe=t=>{var C;const{isPreview:e,isRenderView:n,isAdvanceView:r}=Wt(),{data:i,path:a,pageIndex:s,sectionIndex:l,rowIndex:c,columnIndex:u,section:d,row:f,page:h}=t,g=F.useRef(null),{handleDrop:v}=on(),[{isDragging:m},A]=sa({type:Ts,item:{type:Ts,uuid:i==null?void 0:i.uuid,children:i.children,path:a},collect:x=>({isDragging:x.isDragging()})}),S=m&&!n?.25:1;A(g);const T=(x,w,I,_,N,O,k)=>o.jsx(Yc,{page:h,type:"field",row:f,section:d,field:x,data:x,path:w,pageIndex:I,sectionIndex:_,rowIndex:N,columnIndex:O,fieldIndex:k},`component-${a}-${x==null?void 0:x.uuid}`);return o.jsx("div",{style:r?{...VCe,opacity:S}:{},className:n?"form-builder-column container-column":"draggable form-builder-column container-column",children:!e&&o.jsxs("div",{children:[(C=i==null?void 0:i.children)==null?void 0:C.map((x,w)=>{const I=`${a}-${w}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{fieldDropArea:!0,isAdvanceView:r,data:{path:I,childrenCount:i.children.length,droppedField:i},onDrop:v}),T(x,I,s,l,c,u,w)]},I)}),i.children.length===0&&o.jsx("p",{className:"text-center",children:"Add element by dragging and dropping element from the sidebar into the dropzone area"}),o.jsx(kr,{fieldDropArea:!0,isAdvanceView:r,data:{path:`${a}-${i.children.length}`,childrenCount:i.children.length,droppedField:i},onDrop:v,isLast:!0})]})})},UCe={},$Ce=t=>{var q,W,Q,Z,H,Y,oe;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{userSelectedLanguage:u,handleDrop:d}=on(),{userTaskSubmitFormData:f,taskRegisterData:h,updateTaskRegisterData:g,updateTaskProgressValue:v,addUserDataFormSectionRepeatableData:m,removeUserDataFormSectionRepeatableData:A,task_status:S,TASK_PUBLISHED:T}=wr(),{isRenderView:C,isAdmin:x,isAdvanceView:w,emitSocketData:I,renderType:_}=Wt(),[N,O]=F.useState(!1),[{isDragging:k},M]=sa({type:To,item:{type:To,uuid:e.uuid,children:e.children,path:n,data:e},collect:be=>({isDragging:be.isDragging()})}),j=k?.25:1;M(c);const P=(be,Ce,ve,ye,te,L)=>o.jsx(qCe,{page:l,row:e,section:s,data:be,path:Ce,pageIndex:ve,sectionIndex:ye,rowIndex:te,columnIndex:L},`column-${n}-${be.uuid}`),$=Et.findIndex(f,function(be){return(be==null?void 0:be.rowId)===(e==null?void 0:e.uuid)}),K=()=>{var ve,ye,te;const be=Et.cloneDeep(h);((ye=(ve=f[$])==null?void 0:ve.repeatableFieldsData)==null?void 0:ye.length)>=(e==null?void 0:e.minimumEntries)?be[e==null?void 0:e.uuid]=(te=f[$])==null?void 0:te.repeatableFields:delete be[e==null?void 0:e.uuid];const Ce=Object.keys(be).length;g(be),v(Ce)},ce=(q=e==null?void 0:e.repeatableFields)==null?void 0:q.map(be=>{var Ce;return{fieldUuid:be==null?void 0:be.uuid,field:be==null?void 0:be.uuid,header:(Ce=be==null?void 0:be.label)==null?void 0:Ce.english}}),X=ce==null?void 0:ce.map(be=>o.jsx(xr,{field:be.field,header:be.header,body:Ce=>o.jsx(o.Fragment,{children:o.jsx("div",{className:"post__content_repetable",dangerouslySetInnerHTML:{__html:Ce[be==null?void 0:be.field]}})})},be.field)),ne=()=>{var ye;const be=[...f],Ce=[];let ve=!0;e:for(const[,te]of e.children.entries()){for(const[,L]of te.children.entries())if(console.log("field.isValid",L.isValid),L!=null&&L.isPostField&&L.isValid!==1){const le={fieldId:L.uuid,rowIndex:a};console.log("inValidData",le),Ce.push(le),Qt.emit("OnInvalidFieldCatch",le),ve=!1;break e}ve=!0}ve&&(Ce==null?void 0:Ce.length)===0&&(m(e==null?void 0:e.uuid,(ye=be[$])==null?void 0:ye.repeatableFields),Qt.emit("clearRepeatableFields",e==null?void 0:e.uuid),K())},he=be=>o.jsx(o.Fragment,{children:o.jsx(Vt,{text:!0,type:"button",className:"p-button-danger ",onClick:()=>{A(e==null?void 0:e.uuid,be==null?void 0:be.rowIndex),setTimeout(()=>{K()},1e3)},icon:"pi pi-trash"})});return o.jsxs("div",{style:{...UCe,opacity:j,marginTop:`${(W=e==null?void 0:e.margin)==null?void 0:W.top}px`,marginBottom:`${(Q=e==null?void 0:e.margin)==null?void 0:Q.bottom}px`,marginLeft:`${(Z=e==null?void 0:e.margin)==null?void 0:Z.left}px`,marginRight:`${(H=e==null?void 0:e.margin)==null?void 0:H.right}px`},className:C?"row container-row":"draggable row container-row",children:[N&&o.jsx(Vg,{renderType:_,visibilty:N,setVisibility:O,row:e,pageIndex:r,sectionIndex:i,rowIndex:a,emitSocketData:I},"row_settings_"+r+i+a),o.jsxs("div",{className:"form-builder-columns",children:[e.children.map((be,Ce)=>{const ve=`${n}-${Ce}`;return o.jsxs(F.Fragment,{children:[_===Jd&&o.jsx(kr,{isAdvanceView:w,data:{path:ve,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag"}),P(be,ve,r,i,a,Ce)]},ve)}),o.jsx(kr,{isAdvanceView:w,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:d,className:"horizontalDrag",isLast:!0})]}),(e==null?void 0:e.rowIsRepeatable)&&S!==T&&o.jsx(Vt,{text:!0,type:"button",className:"p-button-success mb-3",onClick:()=>ne(),label:(Y=e.addToListButtonLabel)==null?void 0:Y[u==null?void 0:u.type]}),(e==null?void 0:e.rowIsRepeatable)&&o.jsxs("div",{className:"card",children:[o.jsxs(lo,{value:(f==null?void 0:f.length)>0?(oe=f[$])==null?void 0:oe.repeatableFieldsData:[],children:[X,S!==T&&o.jsx(xr,{style:{width:"10%"},headerStyle:{textAlign:"center"},bodyStyle:{textAlign:"left",overflow:"visible"},body:be=>he(be)})]}),x&&o.jsxs(o.Fragment,{children:[o.jsx("hr",{}),o.jsx(Pi,{field:e})]})]})]})},jCe=t=>{var P,$;const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{removeSection:l,addSection:c,cloneSection:u,formBuilderFormLayout:d,userSelectedLanguage:f,handleDrop:h}=on(),{isPreview:g,isAdvanceView:v,renderType:m,emitSocketData:A}=Wt(),[S,T]=F.useState(!1),[C,x]=F.useState(!1),[w,I]=F.useState({reusable_template_schema:""}),_=F.useRef(null),[{isDragging:N},O]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:K=>({isDragging:K.isDragging()})}),k=N?.25:1;O(_);const M=(K,ce,X,ne,he)=>o.jsx($Ce,{page:s,section:a,data:K,path:ce,pageIndex:X,sectionIndex:ne,rowIndex:he},`row-${n}-${K.uuid}`),j=(K,ce,X)=>{var W,Q;const ne=K.collapsed?"pi pi-chevron-down":"pi pi-chevron-up",he=`${K.className} justify-content-space-between panel-tab-section`,q=`${K.titleClassName} pl-1 text-primary`;return o.jsxs("div",{className:he,children:[o.jsxs("span",{ref:g===!1?_:null,children:[o.jsx("button",{className:K.togglerClassName,children:o.jsx("span",{className:"pi pi-sliders-h dragabble"})}),o.jsxs("button",{className:K.togglerClassName,onClick:K.onTogglerClick,children:[o.jsx("span",{className:ne}),o.jsx(tn,{})]}),o.jsxs("span",{className:q,children:[X+1," ",(W=e==null?void 0:e.heading)==null?void 0:W[f==null?void 0:f.type]]})]}),g===!1&&o.jsxs(o.Fragment,{children:[o.jsx(dn,{target:".clone-tool"}),o.jsx(dn,{target:".del-tool"}),o.jsx(dn,{target:".setting-tool"}),o.jsx(dn,{target:".add-section-tool"}),o.jsx(dn,{target:".save-tool"}),o.jsx(dn,{target:".settings-tool"}),o.jsxs("div",{className:"p-panel-icons",children:[o.jsx("span",{className:"add-section-tool","data-pr-tooltip":"Add Section",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{c(ce),A()},children:[o.jsx("span",{className:"pi pi-plus"}),o.jsx(tn,{})]})}),((Q=d[ce])==null?void 0:Q.children.length)>1&&o.jsx("span",{className:"del-tool","data-pr-tooltip":"Delete",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{l(ce,X),A()},children:[o.jsx("span",{className:"pi pi-trash"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"clone-tool","data-pr-tooltip":"Clone",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>{u(e,ce,X),A()},children:[o.jsx("span",{className:"pi pi-clone"}),o.jsx(tn,{})]})}),o.jsx("span",{className:"settings-tool","data-pr-tooltip":"Settings",children:o.jsxs("button",{className:K.togglerClassName,onClick:()=>T(!0),children:[o.jsx("span",{className:"pi pi-cog"}),o.jsx(tn,{})]})})]})]})]})};return o.jsxs("div",{style:{opacity:k,marginBottom:20},className:v?"draggable row":"",children:[g===!1&&o.jsx(Yh,{saveBuilderElementModalData:w,setSaveBuilderElementModalData:I,saveElementModal:C,setSaveElementModal:x}),S===!0&&o.jsx(Hh,{renderType:m,visibilty:S,setVisibility:T,section:e,pageIndex:r,sectionIndex:i,emitSocketData:A},"section_settings_"+r+i),g===!1?o.jsxs(di,{className:"mb-5",header:(P=e==null?void 0:e.heading)==null?void 0:P.english,toggleable:!0,headerTemplate:K=>j(K,r,i),children:[o.jsx("p",{children:($=e==null?void 0:e.subHeadingText)==null?void 0:$[f==null?void 0:f.type]}),o.jsxs("div",{className:"",children:[e.children.map((K,ce)=>{const X=`${n}-${ce}`;return o.jsx(F.Fragment,{children:M(K,X,r,i,ce)},X)}),o.jsx(kr,{isAdvanceView:v,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length},onDrop:h,className:"horizontalDrag",isLast:!0})]})]}):o.jsx(o.Fragment,{})]})},zCe=t=>{const{isRenderView:e,isPreview:n}=Wt(),{data:r,path:i,pageIndex:a}=t,s=F.useRef(null),[,l]=sa({type:aa,item:{type:aa,uuid:r.uuid,children:r.children,path:i},collect:u=>({isDragging:u.isDragging()})});l(s);const c=(u,d,f,h)=>o.jsx(jCe,{data:u,section:u,path:d,pageIndex:f,sectionIndex:h,page:r},`section_${f}_${h}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${e?"":"draggable page-css p-3 pb-4"}`,"data-image-src":r==null?void 0:r.bgImage,"data-bg-color":`#${r==null?void 0:r.bgColor}`,children:n?o.jsx(o.Fragment,{}):o.jsx("div",{className:"p-1",children:r.children.map((u,d)=>{const f=`${i}-${d}`;return o.jsx(F.Fragment,{children:c(u,f,a,d)},`section-${d}-${u.uuid}`)})})})},X5=t=>{const{handleSelectCourseItem:e,icon:n,currentItem:r,field:i,fieldIndex:a,title:s}=t,[l,c]=F.useState(!1),{userTrainingSaveData:u}=wr(),d=h=>{var g,v;if(u!==null&&h){const m=u==null?void 0:u.findIndex(A=>(A==null?void 0:A.fieldId)===(h==null?void 0:h.uuid));return(g=u[m])!=null&&g.isSeen?(v=u[m])==null?void 0:v.isSeen:!1}else return!1},f=()=>{let h=[];if(u!==null){const v=u.findIndex(m=>(m==null?void 0:m.fieldId)===(i==null?void 0:i.uuid));h=u[v].logs}else h=[];return h==null?void 0:h.map((v,m)=>o.jsxs("li",{className:"flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-4",children:[o.jsxs("div",{className:"mr-8 md:mr-8",children:[o.jsxs("span",{className:"inline-block text-900 font-medium mr-2 mb-1 md:mb-0",children:[v==null?void 0:v.action," on ",((v==null?void 0:v.videoTime)/60).toFixed(3)," seconds"]}),o.jsx("span",{className:"text-600",children:Bn(v==null?void 0:v.timeState).format("Do, MMMM, YYYY HH:ss")})]}),o.jsxs("div",{className:"mt-2 md:mt-0 ml-0 md:ml-8 flex align-items-center",children:[o.jsx("div",{className:"surface-300 border-round overflow-hidden",style:{height:"8px",width:"200px"},children:o.jsx("div",{className:(v==null?void 0:v.action)==="Play"?"bg-green-500 h-full":"bg-orange-500 h-full",style:{width:`${Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100)}%`}})}),o.jsxs("span",{className:"text-orange-500 ml-3 font-medium",children:[Math.floor((v==null?void 0:v.videoTime)/(v==null?void 0:v.totalTime)*100),"%"]})]})]},`logs_${m}`))};return o.jsxs("ul",{className:"list-none p-0 m-0 cursor-pointer",onClick:()=>{e(i)},children:[o.jsxs("li",{className:" flex flex-column md:flex-row md:align-items-center md:justify-content-between mb-3",style:{borderRadius:"10px"},children:[o.jsx("div",{children:o.jsxs("div",{children:[d(i)?o.jsx(Vt,{text:!0,icon:"pi pi-check",className:"p-button-rounded p-button-primary mr-2 p-button-outlined","aria-label":"Search"}):o.jsx(Vt,{text:!0,icon:"pi pi-dot",className:"p-button-rounded p-button-secondary mr-2 p-button-outlined","aria-label":"Search"}),(i==null?void 0:i.uuid)===(r==null?void 0:r.uuid)?o.jsxs("span",{children:[o.jsx(Vt,{text:!0,icon:n,className:"p-button-rounded p-button-primary mr-2 inline-flex justify-content-center align-items-center w-2rem h-2rem","aria-label":"Search"}),o.jsxs("span",{className:"inline-flex justify-content-center align-items-center h-2rem",style:{color:"#0f8bfd"},children:[a+1," - ",s]})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"inline-flex justify-content-center align-items-center w-2rem h-2rem border-circle border-1",children:o.jsx("i",{className:n})}),o.jsxs("span",{className:"font-medium text-500 ml-2 hoverSelect",children:[a+1," - ",s]})]})]})}),o.jsxs("div",{className:"flex align-items-center justify-content-between md:justify-content-end mt-3 md:mt-0",children:[o.jsx("div",{className:"text-right mr-3",children:o.jsxs("span",{className:" font-bold",children:[" ",i==null?void 0:i.videoDuration]})}),o.jsx(Vt,{text:!0,onClick:()=>c(!l),icon:"pi pi-eye",className:"p-button-rounded p-button-secondary mr-2 ","aria-label":"Search"})]})]}),l&&o.jsxs("div",{className:"surface-card shadow-2 border-round p-4",children:[o.jsx("div",{className:"flex justify-content-between align-items-center mb-5",children:o.jsx("span",{className:"text-xl text-900 font-medium",children:"Logs"})}),o.jsx("ul",{className:"list-none p-0 m-0",children:f()})]})]},`ul-list-${a}`)},HCe=t=>{var C,x,w,I,_,N;const{field:e,fieldIndex:n,currentItem:r,setCurrentItem:i,setCurrentSection:a,setvideoJsOptions:s,section:l,setImage:c,setDocuments:u}=t,{taskOptions:d,userTrainingSaveData:f,updateUserTraining:h}=wr(),g=(C=d==null?void 0:d.training)!=null&&C.getAssessmentSelectedQuiz?(x=d==null?void 0:d.training)==null?void 0:x.getAssessmentSelectedQuiz:()=>{},v=O=>{if(f!==null){const k=[...f],M=k.findIndex(j=>(j==null?void 0:j.fieldId)===(O==null?void 0:O.uuid));M>=0&&(k[M]={...k[M],isSeen:!0}),h([...k])}},m=O=>{var k;i(O),a(l),s({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(k=O==null?void 0:O.media_url)==null?void 0:k.english}]})},A=O=>{var k;v(O),i(O),c((k=O==null?void 0:O.media_url)==null?void 0:k.english),a(l)},S=O=>{v(O),i(O),u(O==null?void 0:O.documents),a(l)},T=O=>{var k,M;(k=O==null?void 0:O.quizSchema)!=null&&k.assessment_id&&(g((M=O==null?void 0:O.quizSchema)==null?void 0:M.assessment_id),a(l),i(O))};switch(e==null?void 0:e.componentType){case"video":return o.jsx(X5,{title:(w=e==null?void 0:e.title)==null?void 0:w.english,type:"video",icon:"pi pi-video",handleSelectCourseItem:m,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"image":return o.jsx(X5,{title:(I=e==null?void 0:e.title)==null?void 0:I.english,type:"image",icon:"pi pi-image",handleSelectCourseItem:A,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"document":return o.jsx(X5,{title:(_=e==null?void 0:e.title)==null?void 0:_.english,type:"document",icon:"pi pi-image",handleSelectCourseItem:S,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);case"quiz":return o.jsx(X5,{title:(N=e==null?void 0:e.quizSchema)==null?void 0:N.assessment_title,type:"quiz",icon:"pi pi-image",handleSelectCourseItem:T,field:e,fieldIndex:n,currentItem:r,userTrainingSaveData:f},`${e==null?void 0:e.uuid}-list`);default:return o.jsx(o.Fragment,{})}},YCe=t=>{const{fields:e,setImage:n,setvideoJsOptions:r,setDocuments:i,setQuizSchema:a,setCurrentItem:s,currentItem:l,setCurrentSection:c,section:u,updateTrainingProgress:d}=t;return o.jsx(o.Fragment,{children:o.jsx("div",{className:"surface-card border-round p-4 ",children:e==null?void 0:e.map((f,h)=>o.jsxs("div",{children:[o.jsx(HCe,{field:f,fieldIndex:h,currentItem:l,setCurrentItem:s,setCurrentSection:c,setvideoJsOptions:r,section:u,setImage:n,setDocuments:i,setQuizSchema:a,updateTrainingProgress:d},`${h}-list-sidebar`)," ",o.jsx("hr",{})," "]},`sidebar-item-card-${h}`))})})},KCe=t=>{var v,m,A,S,T,C,x,w,I,_;const{setSelectedOption:e,quiz:n,userSelectedLanguage:r,onSetAnswer:i,setIsOptionSelected:a,index:s,eleIndex:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f}=t,{media:h}=Wt(),g=(v=h==null?void 0:h.image)!=null&&v.MediaImage?(m=h==null?void 0:h.image)==null?void 0:m.MediaImage:o.jsx(o.Fragment,{});return o.jsxs("div",{onClick:N=>{e(O=>{var k;return(k=n==null?void 0:n.answersText)==null?void 0:k[r==null?void 0:r.type]}),i(N,s,l,n,c),a(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:(d==null?void 0:d.text)===((A=n.answersText)==null?void 0:A[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((S=n.answersText)==null?void 0:S[r==null?void 0:r.type])===f?{backgroundColor:"#0F8BFD",color:"#fff"}:{},children:[o.jsx(oa,{inputId:s,value:n.answersText,checked:((T=n.answersText)==null?void 0:T[r==null?void 0:r.type])===f,onChange:N=>{u({isCorrect:null,text:null}),e(O=>{var k;return(k=N.target.value)==null?void 0:k[r==null?void 0:r.type]}),i(N,s,l,n,c),a(!0)}}),((C=n.answersTextImage)==null?void 0:C[r==null?void 0:r.type])&&((x=n.answersTextImage)==null?void 0:x[r==null?void 0:r.type])!==""&&o.jsx(g,{mediaId:(w=n.answersTextImage)==null?void 0:w[r==null?void 0:r.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:s,children:(I=n.answersText)==null?void 0:I[r==null?void 0:r.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:(d==null?void 0:d.text)===((_=n.answersText)==null?void 0:_[r==null?void 0:r.type])?(d==null?void 0:d.isCorrect)===!0?o.jsxs("span",{style:{color:"green"},children:[" ","Correct answer"]}):o.jsxs("span",{style:{color:"red"},children:[" ","Wrong answer"]}):""})]},s)},RCe=t=>{var g,v,m,A,S,T,C;const{media:e}=Wt(),n=(g=e==null?void 0:e.image)!=null&&g.MediaImage?(v=e==null?void 0:e.image)==null?void 0:v.MediaImage:o.jsx(o.Fragment,{}),{setSelectedOption:r,quiz:i,userSelectedLanguage:a,setIsOptionSelected:s,index:l,ele:c,setCorrectAnswerCheck:u,correctAnswerCheck:d,selectedOption:f,onChangeCheckbox:h}=t;return F.useEffect(()=>(Array.isArray(f)||r([]),()=>{}),[]),o.jsx(o.Fragment,{children:Array.isArray(f)&&o.jsxs("div",{onClick:()=>{var x;h(!(f!=null&&f.some(w=>{var I;return w===((I=i.answersText)==null?void 0:I[a==null?void 0:a.type])})),(x=i==null?void 0:i.answersText)==null?void 0:x[a==null?void 0:a.type]),s(!0),u({isCorrect:null,text:null})},className:"field-radiobutton card",style:d!=null&&d.length&&(d!=null&&d.some(x=>{var w;return(x==null?void 0:x.text)===((w=i.answersText)==null?void 0:w[a==null?void 0:a.type])}))?d!=null&&d.some(x=>{var w;return(x==null?void 0:x.text)===((w=i.answersText)==null?void 0:w[a==null?void 0:a.type])&&(x==null?void 0:x.isCorrect)===!0})?{borderColor:"green",borderWidth:1,borderStyle:"solid",position:"relative"}:{borderColor:"red",borderWidth:1,borderStyle:"solid",position:"relative"}:((m=i.answersText)==null?void 0:m[a==null?void 0:a.type])===f?{backgroundColor:"#0F8BFD"}:{},children:[o.jsx(Kr,{inputId:l,value:i.answersText,checked:f==null?void 0:f.some(x=>{var w;return x===((w=i.answersText)==null?void 0:w[a==null?void 0:a.type])}),onChange:x=>{var w;h(x.checked,(w=x.target.value)==null?void 0:w[a==null?void 0:a.type],i,c),s(!0)}}),((A=i.answersTextImage)==null?void 0:A[a==null?void 0:a.type])&&((S=i.answersTextImage)==null?void 0:S[a==null?void 0:a.type])!==""&&o.jsx(n,{mediaId:(T=i.answersTextImage)==null?void 0:T[a==null?void 0:a.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:l,children:(C=i.answersText)==null?void 0:C[a==null?void 0:a.type]}),o.jsx("span",{style:{position:"absolute",right:10},children:d!=null&&d.length&&(d!=null&&d.some(x=>{var w;return(x==null?void 0:x.text)===((w=i.answersText)==null?void 0:w[a==null?void 0:a.type])}))?d!=null&&d.some(x=>{var w;return(x==null?void 0:x.text)===((w=i.answersText)==null?void 0:w[a==null?void 0:a.type])&&(x==null?void 0:x.isCorrect)===!0})?o.jsx("span",{style:{color:"green"},children:" Correct Answer"}):o.jsx("span",{style:{color:"red"},children:" Wrong Answer"}):""})]},l)})};function Tj(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XCe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ej(t,e,n){return e&&XCe(t.prototype,e),t}function Ij(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&BS(t,e)}function G5(t){return G5=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},G5(t)}function BS(t,e){return BS=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},BS(t,e)}function GCe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function WCe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function QCe(t,e){return e&&(typeof e=="object"||typeof e=="function")?e:WCe(t)}function _j(t){var e=GCe();return function(){var r=G5(t),i;if(e){var a=G5(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return QCe(this,i)}}function JCe(t){return ZCe(t)||exe(t)||txe(t)||nxe()}function ZCe(t){if(Array.isArray(t))return VS(t)}function exe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function txe(t,e){if(t){if(typeof t=="string")return VS(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 VS(t,e)}}function VS(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 nxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4291
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",a=r?r[3]:"",s=r?r[2]:n,l=s.length>=e?s:(JCe(Array(e)).map(function(){return"0"}).join("")+s).slice(e*-1);return"".concat(i).concat(l).concat(a)}var Dj={daysInHours:!1,zeroPadTime:2};function rxe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,a=i===void 0?0:i,s=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,s||(d+=c);var f=s?d:d-r(),h=Math.min(20,Math.max(0,a)),g=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),v=Math.abs(g)/1e3;return{total:g,days:Math.floor(v/(3600*24)),hours:Math.floor(v/3600%24),minutes:Math.floor(v/60%60),seconds:Math.floor(v%60),milliseconds:Number((v%1*1e3).toFixed()),completed:g<=0}}function ixe(t,e){var n=t.days,r=t.hours,i=t.minutes,a=t.seconds,s=Object.assign(Object.assign({},Dj),e),l=s.daysInHours,c=s.zeroPadTime,u=s.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?qg(r+n*24,c):qg(r,f);return{days:l?"":qg(n,d),hours:h,minutes:qg(i,f),seconds:qg(a,f)}}var Nj=function(t){Ij(n,t);var e=_j(n);function n(){var r;return Tj(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(a){return{count:a.count+i}},r.startCountdown)},r}return Ej(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?F.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(F.Component);Nj.propTypes={count:da.number,children:da.element,onComplete:da.func};var Ug=function(t){Ij(n,t);var e=_j(n);function n(r){var i;if(Tj(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var s=i.calcTimeDelta(),l=s.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(s,void 0,l)},i.setLegacyCountdownRef=function(s){i.legacyCountdownRef=s},i.start=function(){if(!i.isStarted()){var s=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=s?i.calcOffsetStartTimestamp()-s:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var a=i.calcTimeDelta();i.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return Ej(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,a=i.date,s=i.now,l=i.precision,c=i.controlled,u=i.overtime;return rxe(a,{now:s,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,a,s){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&a==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){s&&s(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=a||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!a&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,a=i.daysInHours,s=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:ixe(c,{daysInHours:a,zeroPadTime:s,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,a=i.count,s=i.children,l=i.onComplete;return F.createElement(Nj,{ref:this.setLegacyCountdownRef,count:a,onComplete:l},s)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,g=this.getRenderProps();if(h)return h(g);if(f&&this.state.timeDelta.completed&&!d)return F.cloneElement(f,{countdown:g});var v=g.formatted,m=v.days,A=v.hours,S=v.minutes,T=v.seconds;return F.createElement("span",{className:u},g.total<0?"-":"",m,m?":":"",A,":",S,":",T)}}]),n}(F.Component);Ug.defaultProps=Object.assign(Object.assign({},Dj),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),Ug.propTypes={date:da.oneOfType([da.instanceOf(Date),da.string,da.number]),daysInHours:da.bool,zeroPadTime:da.number,zeroPadDays:da.number,controlled:da.bool,intervalDelay:da.number,precision:da.number,autoStart:da.bool,overtime:da.bool,className:da.string,children:da.element,renderer:da.func,now:da.func,onMount:da.func,onStart:da.func,onPause:da.func,onStop:da.func,onTick:da.func,onComplete:da.func};const axe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,a,s;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(Ug,{renderer:n,date:Date.now()+parseInt((s=(a=t==null?void 0:t.time_limit)==null?void 0:a.time_limit_info)==null?void 0:s.num_of_mins)*60*1e3})})},sxe=F.memo(axe),oxe=t=>{var d,f,h,g;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,a]=F.useState(Date.now()),[s,l]=F.useState(!1),c=F.useCallback(()=>{a(Date.now()),l(!1)},[r]);F.useEffect(()=>{c()},[r,c]);const u=v=>(v.seconds<10&&(v.seconds="0"+v.seconds),v.minutes===0&&(v.minutes="0"+v.minutes),v.completed&&!s?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[v.minutes,":",v.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(Ug,{renderer:u,date:i+parseInt((g=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:g.time_per_question)*1e3,intervalDelay:0},i)})},lxe=()=>{const t=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(a)},e=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(a)},n=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(a)},r=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(a)},i=a=>{a.play().then(()=>{}).catch(s=>{console.info("Not Played,"+s.error+s.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},cxe="1",Oj=t=>{var se,we,ke,R,Ae,Se,fe,ge,pe,Be;const e=De=>{const[He,it]=F.useState(De),dt=F.useRef(He);return F.useEffect(()=>{dt.current=He},[He]),[He,dt,it]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:a}=wr(),[s,l]=F.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:g,setAssessmentModal:v=()=>{},saveNewQuizData:m}=t,{quizStartAlert:A}=lxe(),{userSelectedLanguage:S}=on(),[T,,C]=e(0),{media:x}=Wt(),w=(se=x==null?void 0:x.image)!=null&&se.MediaImage?(we=x==null?void 0:x.image)==null?void 0:we.MediaImage:o.jsx(o.Fragment,{}),[I,_,N]=e(null),[O,k]=F.useState(!1),[M,j,P]=e([]),[$,K]=F.useState(!1),[ce,X]=F.useState(!1),[ne,he]=F.useState(0),[q,W]=F.useState(0),[Q,Z]=F.useState(0),[H,Y]=F.useState(!1),[oe,be]=F.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},F.useEffect(()=>{$||K(!0)},[M,O,$]),F.useEffect(()=>{u!==null&&(A(),Ce())},[]);const Ce=()=>{W(u.quizConfiguration.quizPassMark)},ve=F.useCallback((De,He,it,dt,ft)=>{const Lt=[...M];if((ft==null?void 0:ft.answerInputType)!=="checkbox"){const ln={uuid:ft==null?void 0:ft.uuid,question:ft==null?void 0:ft.questionText,isCorrect:dt.isCorrect,selectedAnswer:dt.answersText,viewed:!0},Ft=M.findIndex(mn=>(mn==null?void 0:mn.uuid)===ft.uuid);Ft>=0?(Lt[Ft]={...Lt[Ft],...ln},P(Lt)):P([...M,ln])}},[I]),ye=()=>{if(T===0)return;const De=T-1,He=u.quizElements[De],it=j.current.find(dt=>dt.uuid===He.uuid);if(it){const dt=it.selectedAnswer;N(Array.isArray(dt)?dt:dt[S.type]??dt),k(!0)}else N(null),k(!1);C(De)},te=De=>{for(const He of M)if(He.questionIndex===T+De){N(He.selectedAnswerEnglish);break}},L=(De,He,it,dt)=>{var ln;const ft=[...I];if(De)ft.push(He);else{const Ft=ft.findIndex(mn=>mn===He);Ft>=0&&ft.splice(Ft,1)}N(ft);const Lt=[...M];if((dt==null?void 0:dt.answerInputType)==="checkbox"){let Ft=!1;for(const[,xt]of(dt==null?void 0:dt.answerOptions.entries())||[])if(xt.isCorrect===!0)if(Et.includes(ft,(ln=xt==null?void 0:xt.answersText)==null?void 0:ln[S==null?void 0:S.type]))Ft=!0;else{Ft=!1;break}const mn={uuid:dt==null?void 0:dt.uuid,question:dt==null?void 0:dt.questionText,isCorrect:Ft,selectedAnswer:it.answersText,viewed:!0},Vn=M.findIndex(xt=>(xt==null?void 0:xt.uuid)===dt.uuid);Vn>=0?(Lt[Vn]={...Lt[Vn],...mn},P(Lt)):P([...M,mn])}},le=F.useCallback(()=>{var ln,Ft,mn,Vn,xt,je,Ye,st,Jt,Xt,Zt,yn;const De=_.current,He=Et.findIndex((ln=u==null?void 0:u.quizElements[T])==null?void 0:ln.answerOptions,function(ot){return ot.isCorrect===!0}),it=u==null?void 0:u.quizElements[T],dt=(mn=(Ft=it==null?void 0:it.answerOptions[He])==null?void 0:Ft.answersText)!=null&&mn[S==null?void 0:S.type]?(xt=(Vn=it==null?void 0:it.answerOptions[He])==null?void 0:Vn.answersText)==null?void 0:xt[S==null?void 0:S.type]:"",ft=M.findIndex(ot=>(ot==null?void 0:ot.uuid)===it.uuid);console.log("selectedAnswers",M),console.log("currentQuestionIndex",T),console.log("selectedAnswers[currentQuestionIndex]",M[ft]);const Lt=(je=M[ft])!=null&&je.isCorrect?1:0;if(console.log("isCorrectAnswer[currentQuestionIndex]",Lt),u!=null&&u.quizElements&&T+1!==(u==null?void 0:u.quizElements.length)){const ot={assessment_user_attempt_id:(st=i==null?void 0:i.assesment_user_attempts[((Ye=i==null?void 0:i.assesment_user_attempts)==null?void 0:Ye.length)-1])==null?void 0:st.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(Jt=it.questionText)==null?void 0:Jt[S==null?void 0:S.type],question_uid:it==null?void 0:it.uuid,start_time:s,finish_time:new Date,correct_answer:dt,selected_answer:Array.isArray(De)?De.toString():De,is_correct_answer:Lt};r(ot),N(null),C(T+1),l(new Date),te(2)}else if((u==null?void 0:u.quizElements.length)===T+1){const ot={assessment_user_attempt_id:(Zt=i==null?void 0:i.assesment_user_attempts[((Xt=i==null?void 0:i.assesment_user_attempts)==null?void 0:Xt.length)-1])==null?void 0:Zt.assessment_user_attempt_id,session_id:c,assessment_id:1,question_uid:it==null?void 0:it.uuid,question:(yn=it.questionText)==null?void 0:yn[S==null?void 0:S.type],start_time:s,finish_time:new Date,correct_answer:dt,selected_answer:Array.isArray(De)?De.toString():De,is_correct_answer:Lt};r(ot),ie(),Ne()}if(k(!1),T+1<u.quizElements.length){const ot=T+1,Ue=u.quizElements[ot],nt=M.find(Tt=>Tt.uuid===Ue.uuid);if(nt){const Tt=nt.selectedAnswer,Bt=Array.isArray(Tt)?Tt:Tt[S.type]??Tt;N(Bt),k(!0)}else N(null),k(!1)}},[T,M]),ie=()=>{X(!0)},ue=()=>{me?(console.log("Restart"),g(b3),m(),K(!0),A(),Ce(),C(0),N(null),k(!1),P([]),X(!1),he(0),Z(0),Y(!1),be({isCorrect:null,text:null})):(g(qp),v(!1))},Ne=()=>{var ft,Lt;let De=0,He=0,it=!1;for(const ln of M)ln!=null&&ln.isCorrect&&De++;he(De),He=De/((ft=u==null?void 0:u.quizElements)==null?void 0:ft.length)*100,He=Math.round(He),Z(He),it=He>=q,Y(it);const dt={...u,...i,result:He,status:it,selectedAnswers:M};d(dt),n({session_id:c,is_pass:it?1:0,score:De,out_of:(Lt=u==null?void 0:u.quizElements)==null?void 0:Lt.length,finish_time:new Date,status:1})},_e=()=>{var De,He,it,dt,ft,Lt,ln;if(((De=u==null?void 0:u.quizElements[T])==null?void 0:De.answerInputType)==="radio"){const Ft=Et.findIndex((He=u==null?void 0:u.quizElements[T])==null?void 0:He.answerOptions,function(mn){return mn.isCorrect===!0});I===((ft=(dt=(it=u==null?void 0:u.quizElements[T])==null?void 0:it.answerOptions[Ft])==null?void 0:dt.answersText)==null?void 0:ft[S==null?void 0:S.type])?be({isCorrect:!0,text:I}):be({isCorrect:!1,text:I})}if(((Lt=u==null?void 0:u.quizElements[T])==null?void 0:Lt.answerInputType)==="checkbox"){const Ft=(ln=u==null?void 0:u.quizElements[T])==null?void 0:ln.answerOptions.filter(mn=>mn.isCorrect===!0);if(I!=null&&I.length){const mn=I==null?void 0:I.map(Vn=>({isCorrect:Ft==null?void 0:Ft.some(xt=>{var je;return((je=xt==null?void 0:xt.answersText)==null?void 0:je[S==null?void 0:S.type])===Vn}),text:Vn}));be(mn)}}},me=(i==null?void 0:i.noOfAttempts)-((ke=i==null?void 0:i.assesment_user_attempts)==null?void 0:ke.length)>0&&!H;return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[ce&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",(R=a==null?void 0:a.assessment)==null?void 0:R.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",ne," out of"," ",(Ae=u==null?void 0:u.quizElements)==null?void 0:Ae.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",Q,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",q,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",H?o.jsx(vu,{severity:"success",value:"Passed"}):o.jsx(vu,{severity:"danger",value:"Failed"})]}),H&&o.jsx("p",{children:"Congratulations you have passed!"}),o.jsx(o.Fragment,{children:ce&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Vt,{label:me?"Restart":"End",onClick:()=>ue()})})})]})]})})}),ce&&((Se=i==null?void 0:i.assessment_type)==null?void 0:Se.key)===cxe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:M==null?void 0:M.map((De,He)=>{var it,dt;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(it=De==null?void 0:De.question)==null?void 0:it[S==null?void 0:S.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(dt=De==null?void 0:De.selectedAnswer)==null?void 0:dt[S==null?void 0:S.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),De!=null&&De.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(O4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(O4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},He)})})})]}),f!==BD?o.jsx(o.Fragment,{children:ce&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Vt,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{g(qp)}})})}):o.jsx(o.Fragment,{}),$&&!ce&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(sxe,{assessmentData:i,setDisplaySummary:X}),o.jsx(oxe,{currentQuestionIndex:T,assessmentData:i,onNextQuestion:le})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(fe=u==null?void 0:u.quizElements)==null?void 0:fe.map((De,He)=>{var it,dt,ft,Lt,ln;return o.jsxs("div",{className:"quiz-card-box",children:[T===He&&((it=De==null?void 0:De.questionTextImage)==null?void 0:it[S==null?void 0:S.type])&&((dt=De==null?void 0:De.questionTextImage)==null?void 0:dt[S==null?void 0:S.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(w,{mediaId:(ft=De==null?void 0:De.questionTextImage)==null?void 0:ft[S==null?void 0:S.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:T===He&&((Lt=De==null?void 0:De.questionText)==null?void 0:Lt[S==null?void 0:S.type])}),T===He&&((ln=De==null?void 0:De.answerOptions)==null?void 0:ln.map((Ft,mn)=>(De==null?void 0:De.answerInputType)==="checkbox"?o.jsx(F.Fragment,{children:o.jsx(RCe,{onChangeCheckbox:L,setSelectedOption:N,quiz:Ft,userSelectedLanguage:S,onSetAnswer:ve,setIsOptionSelected:k,index:mn,eleIndex:He,ele:De,setCorrectAnswerCheck:be,correctAnswerCheck:oe,selectedOption:I})},`checkbox-question-${mn}`):o.jsx(F.Fragment,{children:o.jsx(KCe,{setSelectedOption:N,quiz:Ft,userSelectedLanguage:S,onSetAnswer:ve,setIsOptionSelected:k,index:mn,eleIndex:He,ele:De,setCorrectAnswerCheck:be,correctAnswerCheck:oe,selectedOption:I})},`radio-question-${mn}`)))]},He)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",T+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),T>0&&((pe=(ge=i==null?void 0:i.time_limit)==null?void 0:ge.type)==null?void 0:pe.key)!=="PerQuestion"&&o.jsx(Vt,{size:"large",className:"mx-2",label:"Previous",onClick:De=>ye()}),((i==null?void 0:i.skippable)===!0||O===!0)&&o.jsx(Vt,{size:"large",label:(u==null?void 0:u.quizElements.length)===T+1?"Finish":O===!0?"Next":"Skip",onClick:le}),O===!0&&((Be=i==null?void 0:i.assessment_type)==null?void 0:Be.key)==="1"&&o.jsx(Vt,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>_e()})]})]})]})})},uxe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:a,currentItem:s}=t,{userTrainingSaveData:l}=wr();F.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var g,v,m,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(m=(v=(g=d==null?void 0:d.layout[0])==null?void 0:g.children[0])==null?void 0:v.children[0])==null?void 0:m.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=wm.shuffle(h).map((S,T)=>({...S}))),f!=null&&f.randomiseAnswers&&(h=h.map((S,T)=>({...S,answerOptions:wm.shuffle(S==null?void 0:S.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(g=>(g==null?void 0:g.fieldId)===(s==null?void 0:s.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}a()}};return o.jsx("div",{children:n&&o.jsx(Oj,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},dxe=t=>{var m,A;const{currentItem:e,videoJsOptions:n}=t,r=F.useRef(null),{userTrainingSaveData:i,updateUserTraining:a,taskRegisterData:s}=wr(),{media:l}=Wt(),c=(m=l==null?void 0:l.video)!=null&&m.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=S=>{r.current=S,S.on("waiting",()=>{Dt.log("player is waiting")}),S.on("dispose",()=>{Dt.log("player will dispose")})},d=S=>{if(i!==null){const T=[...i],C=T==null?void 0:T.findIndex(x=>(x==null?void 0:x.fieldId)===(e==null?void 0:e.uuid));C>=0&&(T[C].seenTime=S==null?void 0:S.target.currentTime)}},f=S=>{const T=[...i],C=T==null?void 0:T.findIndex(x=>(x==null?void 0:x.fieldId)===(S==null?void 0:S.uuid));C>=0&&(i[C]={...i[C],isSeen:!0},a(T),h("Ended"))},h=S=>{const T=r.current,C=i!==null?i==null?void 0:i.findIndex(x=>(x==null?void 0:x.fieldId)===(e==null?void 0:e.uuid)):-1;C>=0&&i[C].logs.push({action:S,videoTime:i[C].seenTime,totalTime:T.duration,timeState:new Date})},g=S=>{const{mediaId:T}=S,[C,x]=F.useState(!1);return F.useEffect(()=>{if(!C&&i!==null){const w=i.findIndex(I=>(I==null?void 0:I.fieldId)===(e==null?void 0:e.uuid));if(w>=0){x(!0);const I=r.current;I.currentTime=i[w].seenTime}x(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:T,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},v=F.useCallback(S=>o.jsx(g,{mediaId:S}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:v(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(fV,{options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},W5=t=>{var I,_,N,O,k,M;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i}=wr(),[a]=F.useState(!1),[,s]=F.useState(ry),[l,c]=F.useState([]),[u,d]=F.useState(null),{userSelectedLanguage:f}=on(),[h,g]=F.useState(null),[v,m]=F.useState(null),A=(I=i==null?void 0:i.training)!=null&&I.getAssessmentByIdFromStore?(_=i==null?void 0:i.training)==null?void 0:_.getAssessmentByIdFromStore:()=>{},S=(N=i==null?void 0:i.training)!=null&&N.TrainingOverView?(O=i==null?void 0:i.training)==null?void 0:O.TrainingOverView:()=>o.jsx(o.Fragment,{}),[T,C]=F.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});F.useEffect(()=>{a||x()},[a]);const x=()=>{var j,P,$,K,ce,X,ne,he,q,W,Q,Z,H,Y,oe,be,Ce,ve,ye,te,L;switch(g(($=(P=(j=e[0])==null?void 0:j.children[0])==null?void 0:P.children[0])==null?void 0:$.children[0]),m(e[0]),(ne=(X=(ce=(K=e[0])==null?void 0:K.children[0])==null?void 0:ce.children[0])==null?void 0:X.children[0])==null?void 0:ne.componentType){case"video":C({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(Z=(Q=(W=(q=(he=e[0])==null?void 0:he.children[0])==null?void 0:q.children[0])==null?void 0:W.children[0])==null?void 0:Q.media_url)==null?void 0:Z.english}]});break;case"image":s((Ce=(be=(oe=(Y=(H=e[0])==null?void 0:H.children[0])==null?void 0:Y.children[0])==null?void 0:oe.children[0])==null?void 0:be.media_url)==null?void 0:Ce.english);break;case"document":c((L=(te=(ye=(ve=e[0])==null?void 0:ve.children[0])==null?void 0:ye.children[0])==null?void 0:te.children[0])==null?void 0:L.documents);break}},w=j=>{switch(j==null?void 0:j.componentType){case"video":return o.jsx("div",{children:o.jsx(dxe,{videoJsOptions:T,currentItem:j},j==null?void 0:j.uuid)});case"image":return o.jsx(fk,{field:j,isPreview:!0});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(l==null?void 0:l.length)>0&&l.map((P,$)=>o.jsx("li",{children:o.jsx("a",{href:P==null?void 0:P.url,children:P==null?void 0:P.url})},`document-item-${$}`))})]});case"quiz":return A!=null&&A.form_template_schema?o.jsx(uxe,{renderIn:BD,getAssessmentByIdFromStore:A,quizSchema:u,setQuizSchema:d,updateTrainingProgress:r,currentItem:j}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("h3",{children:[(k=v==null?void 0:v.heading)==null?void 0:k[f==null?void 0:f.type]," -"," ",(M=h==null?void 0:h.title)==null?void 0:M[f==null?void 0:f.type]," "]}),w(h),n&&o.jsx(S,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((j,P)=>{var $,K;return o.jsxs(di,{className:"mb-5",header:($=j==null?void 0:j.heading)==null?void 0:$.english,toggleable:!0,children:[o.jsx("p",{children:(K=j==null?void 0:j.subHeadingText)==null?void 0:K[f==null?void 0:f.type]}),j.children.map((ce,X)=>{const ne=`${X}`;return o.jsx("div",{children:ce.children.map((he,q)=>{const W=`${X}-${ne}`;return o.jsx(YCe,{setCurrentSection:m,section:j,setCurrentItem:g,currentItem:h,path:W,fields:he.children,setvideoJsOptions:C,setImage:s,setDocuments:c,setQuizSchema:d,updateTrainingProgress:r},`training-sidebar-${q}`)})},`training-sidebar-container-${X}`)})]},`train-sidebar-panel-${P}`)})})]})};W5.defaultProps={showInfoPanel:!0,sections:{},updateTrainingProgress:()=>{}},W5.propTypes={showInfoPanel:e1.bool,sections:e1.array,updateTrainingProgress:e1.func};const fxe=()=>{var r;const{formBuilderFormLayout:t}=on(),{isPreview:e}=Wt(),n=(i,a,s)=>o.jsx(zCe,{data:i,path:a,pageIndex:s},`page-${i.uuid}`);return e?o.jsx(W5,{sections:((r=t[0])==null?void 0:r.children)||[],showInfoPanel:!1,updateTrainingProgress:()=>{}}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((i,a)=>{const s=`${a}`;return o.jsx("div",{children:n(i,s,a)},`exam-page-${a}`)})})})},hxe=t=>{var I,_,N,O,k;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=on(),a=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:s}=t,[l,c]=F.useState(),[u,d]=F.useState([]),{media:f}=Wt(),h=(I=f==null?void 0:f.image)!=null&&I.MediaImage?(_=f==null?void 0:f.image)==null?void 0:_.MediaImage:o.jsx(o.Fragment,{}),g={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(s==null?void 0:s.length)>0?s:a},[v,m]=F.useState(0),[A,S]=F.useState(!1);function T(M,j){return(M==null?void 0:M.length)<=j?M:(M==null?void 0:M.slice(0,j))+"..."}F.useEffect(()=>{S(!0)},[]);const C=()=>{v!==0&&m(v-1)},x=()=>{if(g!=null&&g.quizElements&&v+1!==(g==null?void 0:g.quizElements.length))m(v+1);else if((g==null?void 0:g.quizElements.length)===v+1)return},w=(M,j)=>{let P=[...u];M.checked?P.push(j):P=P.filter($=>($==null?void 0:$[e==null?void 0:e.type])!==(j==null?void 0:j[e==null?void 0:e.type])),d(P)};return o.jsxs("div",{className:"scroll-height-200 mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[g==null?void 0:g.name," "]}),(N=g==null?void 0:g.quizElements)==null?void 0:N.map((M,j)=>{var P,$,K,ce,X,ne,he,q,W;return(M==null?void 0:M.answerInputType)==="radio"?o.jsxs("div",{className:v===j?"card":" flex align-items-center p-field-radiobutton",children:[((P=M==null?void 0:M.questionTextImage)==null?void 0:P[e==null?void 0:e.type])&&(($=M==null?void 0:M.questionTextImage)==null?void 0:$[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(K=M==null?void 0:M.questionTextImage)==null?void 0:K[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:v===j&&((ce=M==null?void 0:M.questionText)==null?void 0:ce[e==null?void 0:e.type])}),v===j&&((X=M==null?void 0:M.answerOptions)==null?void 0:X.map((Q,Z)=>{var H,Y,oe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(oa,{inputId:`${Z}-preview`,value:Q==null?void 0:Q.answersText,checked:l===Z,onChange:()=>{c(Z)}}),((H=Q.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((Y=Q.answersTextImage)==null?void 0:Y[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(oe=Q.answersTextImage)==null?void 0:oe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${Z}-preview`,children:(be=Q.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},j):(M==null?void 0:M.answerInputType)==="checkbox"?o.jsxs("div",{className:v===j?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:v===j&&((ne=M==null?void 0:M.questionText)==null?void 0:ne[e==null?void 0:e.type])}),v===j&&((he=M==null?void 0:M.answerOptions)==null?void 0:he.map((Q,Z)=>{var H,Y,oe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Kr,{inputId:Z,value:Q==null?void 0:Q.answersText,onChange:Ce=>{w(Ce,Q==null?void 0:Q.answersText)},checked:u.some(Ce=>{var ve;return(Ce==null?void 0:Ce[e==null?void 0:e.type])===((ve=Q==null?void 0:Q.answersText)==null?void 0:ve[e==null?void 0:e.type])})}),((H=Q.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((Y=Q.answersTextImage)==null?void 0:Y[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(oe=Q.answersTextImage)==null?void 0:oe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Z,children:(be=Q.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},j):o.jsxs("div",{className:v===j?"card":"",children:[o.jsx("h3",{className:"mb-5",children:v===j&&((q=M==null?void 0:M.questionText)==null?void 0:q[e==null?void 0:e.type])}),v===j&&((W=M==null?void 0:M.answerOptions)==null?void 0:W.map((Q,Z)=>{var H,Y,oe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(oa,{inputId:Z,value:Q==null?void 0:Q.answersText,onChange:()=>{}}),((H=Q.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((Y=Q.answersTextImage)==null?void 0:Y[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(oe=Q.answersTextImage)==null?void 0:oe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Z,children:(be=Q.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},j)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",v+1+"/"+(g==null?void 0:g.quizElements.length)]}),o.jsx("br",{}),v>0&&o.jsx(Vt,{text:!0,className:"mx-2",label:"Previous",onClick:()=>C()}),o.jsx(Vt,{text:!0,label:(g==null?void 0:g.quizElements.length)===v+1?"Finish":"Next",onClick:()=>x()})]})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(O=g==null?void 0:g.quizElements)==null?void 0:O.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(vu,{className:"mr-2",severity:"success",value:"True"}):o.jsx(vu,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question time limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam time limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show questions randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(k=g==null?void 0:g.quizElements)==null?void 0:k.map((M,j)=>{var P;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:T(((P=M==null?void 0:M.questionText)==null?void 0:P[e==null?void 0:e.type])||"",30)})})},`preview-question-${j}`)})})})]})]})]})]})},pxe=t=>{var x;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{handleDrop:f}=on(),{isRenderView:h,isAdvanceView:g,isPreview:v}=Wt(),[{isDragging:m},A]=sa({type:Ts,item:{type:Ts,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:w=>({isDragging:w.isDragging()})}),T={position:"relative",opacity:m&&!h?.25:1};A(d);const C=(w,I,_,N,O,k,M)=>o.jsx(Yc,{page:u,type:"field",row:c,section:l,field:w,data:w,path:I,pageIndex:_,sectionIndex:N,rowIndex:O,columnIndex:k,fieldIndex:M},`component-${n}-${w==null?void 0:w.uuid}`);return o.jsx("div",{style:g?T:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:v===!1?o.jsxs("div",{children:[e.children.length>0&&((x=e==null?void 0:e.children)==null?void 0:x.map((w,I)=>{const _=`${n}-${I}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:g,fieldDropArea:!0,data:{path:_,childrenCount:e.children.length,droppedField:e},onDrop:f}),C(w,_,r,i,a,s,I)]},_)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(kr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(hxe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},gxe={},mxe=t=>{var v,m,A,S;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{isRenderView:u}=Wt(),[{isDragging:d},f]=sa({type:To,item:{type:To,uuid:e.uuid,children:e.children,path:n,data:e},collect:T=>({isDragging:T.isDragging()})}),h=d?.25:1;f(c);const g=(T,C,x,w,I,_)=>o.jsx(pxe,{page:l,row:e,section:s,data:T,path:C,pageIndex:x,sectionIndex:w,rowIndex:I,columnIndex:_},`column-${n}-${T.uuid}`);return o.jsx("div",{style:{...gxe,opacity:h,marginTop:`${(v=e==null?void 0:e.margin)==null?void 0:v.top}px`,marginBottom:`${(m=e==null?void 0:e.margin)==null?void 0:m.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(S=e==null?void 0:e.margin)==null?void 0:S.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((T,C)=>{const x=`${n}-${C}`;return o.jsx(F.Fragment,{children:g(T,x,r,i,a,C)},x)})})})},vxe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isPreview:d}=Wt(),[f,h]=F.useState(!1),[g,v]=F.useState(!1),[m,A]=F.useState(null),S=F.useRef(null),[{isDragging:T},C]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:I=>({isDragging:I.isDragging()})}),x=T?.25:1;C(S);const w=(I,_,N,O,k)=>o.jsx(mxe,{page:s,section:a,data:I,path:_,pageIndex:N,sectionIndex:O,rowIndex:k},`row-${n}-${I.uuid}`);return o.jsxs("div",{style:{opacity:x,marginBottom:20},className:u?"draggable row":"",children:[d===!1&&o.jsx(Yh,{saveBuilderElementModalData:m,setSaveBuilderElementModalData:A,saveElementModal:g,setSaveElementModal:v}),f===!0&&o.jsx(Hh,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((I,_)=>{const N=`${n}-${_}`;return o.jsx(F.Fragment,{children:w(I,N,r,i,_)},N)})})]})},bxe=t=>{const{data:e,path:n,pageIndex:r}=t,{isRenderView:i}=Wt(),a=F.useRef(null),[{},s]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});s(a);const l=(c,u,d,f)=>o.jsx(vxe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(F.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},yxe=()=>{const{formBuilderFormLayout:t}=on(),e=(n,r,i)=>o.jsx(bxe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},Q5=()=>{const{renderType:t}=Wt();switch(t){case j0:return o.jsx(uCe,{});case z0:return o.jsx(bCe,{});case af:return o.jsx(TCe,{});case Cm:return o.jsx(BCe,{});case xm:return o.jsx(fxe,{});case Jd:return o.jsx(yxe,{})}},Axe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:a,updateTaskProgressValue:s}=wr();return F.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;s(u),a(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(W5,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},wxe=({taskId:t,onStart:e})=>{var S,T,C,x,w,I,_,N,O,k,M,j,P,$,K,ce;const[n,r]=F.useState(qp),[i,a]=F.useState(null),{examComplete:s,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=wr();F.useEffect(()=>{var X,ne,he,q,W;if(((X=c==null?void 0:c.formType)==null?void 0:X.key)==="exam"){let Q=[...((q=(he=(ne=c==null?void 0:c.layout[0])==null?void 0:ne.children[0])==null?void 0:he.children[0])==null?void 0:q.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(Q=wm.shuffle(Q).map(Z=>({...Z}))),l!=null&&l.randomiseAnswers&&(Q=Q.map(Z=>({...Z,answerOptions:wm.shuffle(Z==null?void 0:Z.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(Q=Q.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),a({assessment_id:1,name:(W=u==null?void 0:u.assessment)==null?void 0:W.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:Q})}},[c]);const f=o.jsxs("div",{children:[o.jsx(Vt,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(qp)}),o.jsx(Vt,{label:"Start Immediately",onClick:()=>{g(),r(b3)}})]}),h=X=>X.completed?(g(),r(b3),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your quiz is about to start in ",X.seconds," seconds"]}),g=()=>{const X={task_id:t,session_id:tt(),start_time:new Date,finish_time:new Date};a(ne=>({...ne,...X})),d(X,a)},v=()=>{r(t7),g()},m=((S=l==null?void 0:l.assesment_user_attempts)==null?void 0:S.length)>0?(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.some(X=>(X==null?void 0:X.is_pass)===1):!1;function A(){var H;const X=l==null?void 0:l.assesment_user_attempts[0],ne=l==null?void 0:l.assesment_user_attempts[((H=l==null?void 0:l.assesment_user_attempts)==null?void 0:H.length)-1],he=X==null?void 0:X.start_time,q=ne==null?void 0:ne.finish_time;if(!ne||!he||!q)return"";const W=Bn.utc(he),Z=Bn.utc(q).diff(W,"seconds");return Z<60?Z+" seconds":Math.floor(Z/60)+" minutes"}return o.jsxs(o.Fragment,{children:[n===t7&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Ug,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===qp&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12 md:col-6 md:col-offset-3 sm:col-12 sm:col-offset-0",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(C=u==null?void 0:u.assessment)==null?void 0:C.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:Bn(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((w=l==null?void 0:l.assesment_user_attempts)==null?void 0:w.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(I=i==null?void 0:i.quizElements)==null?void 0:I.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((N=(_=l==null?void 0:l.time_limit)==null?void 0:_.type)==null?void 0:N.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((k=(O=l==null?void 0:l.time_limit)==null?void 0:O.time_limit_info)==null?void 0:k.num_of_mins)," ","mins"]}),l&&((j=(M=l==null?void 0:l.time_limit)==null?void 0:M.type)==null?void 0:j.key)==="PerQuestion"&&o.jsx(o.Fragment,{children:(()=>{var q,W,Q;const X=((W=(q=l==null?void 0:l.time_limit)==null?void 0:q.time_limit_info)==null?void 0:W.time_per_question)*((Q=i==null?void 0:i.quizElements)==null?void 0:Q.length),ne=Math.floor(X/60),he=X%60;return o.jsxs(o.Fragment,{children:[ne," min",he>0&&` ${he} sec`]})})()}),l&&(($=(P=l==null?void 0:l.time_limit)==null?void 0:P.type)==null?void 0:$.key)==="NoTimeLimit"&&o.jsx(o.Fragment,{children:"No time limit"})]})]}),((K=l==null?void 0:l.assesment_user_attempts)==null?void 0:K.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((ce=l==null?void 0:l.assesment_user_attempts)==null?void 0:ce.length)>0?o.jsx(o.Fragment,{children:o.jsx(Vt,{size:"large",label:m===!0?"Passed":"Start now",disabled:m,className:"p-button-info",onClick:()=>{r(t7),e&&e()}})}):o.jsx(f7,{classes:"text-2xl p-3",value:"No attempts remaining",level:"info"})})]})})})}),n===b3&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(Oj,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:v,saveNewQuizData:g,quizData:i,taskSchema:c,saveProgress:s,setAssessmentModal:()=>{}})})]})]})},Sxe=t=>{var Y,oe,be,Ce,ve,ye,te,L,le,ie,ue,Ne;const[e,n]=F.useState(!1),{isAdmin:r}=Wt(),i=F.useRef(!1),{taskId:a,endPoints:s,isRenderView:l,showFieldsAfterSubmit:c,messageWhileSubmittingForm:u,enableFormScroll:d,formScrollHeight:f="scroll-height-225",onStart:h,setAssessmentModal:g=()=>{}}=t,{setLayout:v}=on(),{taskProgressValue:m,taskRegisterData:A,task_status:S,assessmentData:T,taskProgressLoading:C,taskSchema:x,taskData:w,updateTaskFormData:I,submitTaskFormData:_,TasksLoading:N,userTaskSubmitFormData:O,TasksHTTPRequest:k,TasksSubmitLoading:M,clearTaskSchema:j,TASK_PUBLISHED:P,saveProgressDataHook:$,taskOptions:K}=wr(),ce=K!=null&&K.successMessage?K==null?void 0:K.successMessage:"Submitted Successfully";F.useEffect(()=>{if(x!==null&&v((x==null?void 0:x.layout)||[]),a){const me={viewed_at:new Date().toISOString()};I(O,a,s==null?void 0:s.updateFormData,v3,()=>{},me)}return()=>{j()}},[a]);const X=(_e="One or more field is required")=>{i.current.show({severity:"error",summary:"Alert",detail:_e,life:3e3})},ne=()=>{Qt.emit("onSubmitUserForm","complete"),Q()},he=()=>{_(O,a,s==null?void 0:s.submitFormData),n(!1)},q=_e=>{I(_e,a,s==null?void 0:s.updateFormData,v3,()=>{var me;(me=i==null?void 0:i.current)==null||me.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3})})};F.useEffect(()=>{const _e=setTimeout(()=>{var me;O!==null&&((x==null?void 0:x.enableAutoSave)===!0||((me=x==null?void 0:x.formType)==null?void 0:me.key)===d7)&&$(O,a,s==null?void 0:s.updateFormData)},2e3);return()=>clearTimeout(_e)},[A,m]);const W=(_e,me,se,we)=>{var Ae,Se;let ke=we;const R={fieldId:_e.uuid};if(se!=null&&se[_e==null?void 0:_e.uuid]){if((me==null?void 0:me.length)>0){e:for(const[,fe]of me.entries())if(((Ae=fe==null?void 0:fe.children)==null?void 0:Ae.length)>0&&(fe==null?void 0:fe.enableConditionalField)===!0){for(const[,ge]of(fe==null?void 0:fe.children.entries())||[])if((Se=ge==null?void 0:ge.attributes)!=null&&Se.required&&(ke=W(ge,ge==null?void 0:ge.options,se,ke),ke===!1))break e}}}else Qt.emit("OnInvalidFieldCatch",R),ke=!1,X();return ke},Q=F.useCallback(()=>{var me,se,we,ke,R,Ae,Se,fe,ge,pe,Be,De,He,it,dt,ft,Lt,ln,Ft,mn,Vn,xt,je,Ye;let _e=!1;e:for(const[st,Jt]of x.layout.entries())if((Jt==null?void 0:Jt.isHidden)===!1)for(const[Xt,Zt]of Jt.children.entries())for(const[,yn]of Zt.children.entries())if(yn!=null&&yn.rowIsRepeatable){const ot=O.findIndex(Ue=>(Ue==null?void 0:Ue.rowId)===yn.uuid);if(ot>=0){if(((me=O[ot].repeatableFieldsData)==null?void 0:me.length)<(yn==null?void 0:yn.minimumEntries)){X(`Need minimun ${yn==null?void 0:yn.minimumEntries} entries`),_e=!1;break e}_e=!0}}else for(const[,ot]of yn.children.entries())for(const[,Ue]of ot.children.entries()){if(Ue.isValid===0&&Ue.isPostField===!0&&(Ue==null?void 0:Ue.componentType)!=="hidden-field"){console.log("field",Ue);const nt={pageIndex:st,fieldId:Ue.uuid,sectionIndex:Xt},Tt=O.findIndex(Bt=>(Bt==null?void 0:Bt.fieldId)===Ue.uuid);if(console.log("userTaskSubmitFormData![foundFieldIndex]?.postData",(se=O[Tt])==null?void 0:se.postData),!(Tt===-1||(we=O[Tt])!=null&&we.postData[0]&&(((R=(ke=O[Tt])==null?void 0:ke.postData[0].postValue)==null?void 0:R.length)>0||((Ae=O[Tt])==null?void 0:Ae.postData[0].postValue)>0||(fe=(Se=O[Tt])==null?void 0:Se.postData[0].postValue)!=null&&fe.name))){console.log("inValidData",nt),Qt.emit("OnInvalidFieldCatch",nt),_e=!1,X();break e}}if((Ue==null?void 0:Ue.componentType)==="radio-hierarchal"){const nt=O.findIndex(Tt=>(Tt==null?void 0:Tt.fieldId)===Ue.uuid);if(nt>=0&&(_e=W(Ue,Ue==null?void 0:Ue.options,(ge=O[nt])==null?void 0:ge.postData[0].postValue,!0),!_e))break e}if(((pe=Ue==null?void 0:Ue.children)==null?void 0:pe.length)>0)for(const[,nt]of Ue.children.entries()){const Tt=Object.keys(nt);if(Tt[0]){const Bt=nt[Tt[0]],Nn={fieldId:Bt.uuid,sectionIndex:Xt},kn=O.findIndex(Qn=>(Qn==null?void 0:Qn.fieldId)===Bt.uuid);if(!((Be=O[kn])!=null&&Be.postData[0]&&(((He=(De=O[kn])==null?void 0:De.postData[0].postValue)==null?void 0:He.length)>0||((it=O[kn])==null?void 0:it.postData[0].postValue)>0||((Lt=(ft=(dt=O[kn])==null?void 0:dt.postData[0])==null?void 0:ft.postValue)==null?void 0:Lt.addressOne)!==""))){Qt.emit("OnInvalidFieldCatch",Nn),_e=!1,X();break e}}}if(Ue!=null&&Ue.inlineConditionalRules&&((Ft=(ln=Ue==null?void 0:Ue.inlineConditionalRules)==null?void 0:ln.rules)==null?void 0:Ft.length)>0){for(const[,nt]of((mn=Ue==null?void 0:Ue.inlineConditionalRules)==null?void 0:mn.rules.entries())||[])for(const[,Tt]of(nt==null?void 0:nt.conditions.entries())||[])for(const[,Bt]of(Tt==null?void 0:Tt.children.entries())||[])if(Bt.isValid===0){const Nn={fieldId:Bt.uuid,sectionIndex:Xt},kn=O.findIndex(Qn=>(Qn==null?void 0:Qn.fieldId)===Bt.uuid);if(kn>=0&&!((Vn=O[kn])!=null&&Vn.postData[0]&&(((je=(xt=O[kn])==null?void 0:xt.postData[0].postValue)==null?void 0:je.length)>0||((Ye=O[kn])==null?void 0:Ye.postData[0].postValue)>0))){Qt.emit("OnInvalidFieldCatch",Nn),_e=!1,X();break e}}}_e=!0}_e&&n(!0)},[O]),Z=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-5"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"})]})}),H=()=>o.jsxs("div",{className:"text-right",children:[o.jsx(Vt,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(Vt,{label:"Yes",icon:"pi pi-check",onClick:()=>he(),autoFocus:!0})]});return o.jsxs("div",{style:{position:"relative"},children:[e&&o.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"30vw",padding:"20px",backgroundColor:"white",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"8px",zIndex:1e3},children:[o.jsx("p",{className:"text-center",children:u}),H()]}),N||M||k?o.jsx("div",{className:"w-full",children:o.jsx(Z,{})}):o.jsxs(o.Fragment,{children:[(((Y=x==null?void 0:x.formType)==null?void 0:Y.key)===C3||((oe=x==null?void 0:x.formType)==null?void 0:oe.key)==="survey")&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${l===!1?"builder_container":""}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:w==null?void 0:w.task_title}),o.jsx("div",{className:"ml-4 ",children:S===Yee&&o.jsx(f7,{classes:"",value:"COMPLETED",level:"success"})})]}),c===!1&&S===P?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:ce})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[N&&o.jsx(Z,{}),!N&&o.jsxs(o.Fragment,{children:[o.jsx(Xte,{}),o.jsx("div",{className:`${d===!0?f:" "} mt-2 mb-2`,children:o.jsx(xf,{backend:Ef,children:x!==null&&((be=x==null?void 0:x.layout)==null?void 0:be.length)&&o.jsx(Q5,{})})}),o.jsx(A3,{ref:i}),((Ce=x==null?void 0:x.formType)==null?void 0:Ce.key)!==""&&(S===v3||S===null)&&o.jsx("span",{children:Yl.createPortal(o.jsx("div",{style:{zIndex:9999999},className:"card surface-card shadow-1 border-round py-2 render-form-footer",children:o.jsxs("div",{className:" flex justify-content-center",children:[o.jsx(Vt,{text:!0,className:"mr-2 p-button-info",label:"Save progress",onClick:()=>q(O),loading:C,disabled:M}),o.jsx(Vt,{label:"Submit",onClick:()=>ne(),disabled:C,loading:M})]})}),document.body)})]})]})})]})}),((ve=x==null?void 0:x.formType)==null?void 0:ve.key)==="policies"&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx("div",{id:"invoice-content",children:o.jsxs("div",{className:"invoice",children:[o.jsx("div",{className:"invoice-header",children:o.jsx("div",{className:"invoice-company flex align-items-center",children:o.jsxs("h3",{children:[w==null?void 0:w.task_title," "]})})}),o.jsx("div",{className:"scroll-height-300 mt-2 mb-2",children:o.jsx(xf,{backend:Ef,children:x!==null&&((ye=x==null?void 0:x.layout)==null?void 0:ye.length)&&o.jsx(Q5,{})})}),((te=x==null?void 0:x.formType)==null?void 0:te.key)!==""&&(S===1||S===null)&&r===!1&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"flex justify-content-center",children:o.jsx(Vt,{className:"p-button-primary",label:"Accept",onClick:()=>ne(),loading:C})})})]})})})})})}),(((L=x==null?void 0:x.formType)==null?void 0:L.key)==="page"||((le=x==null?void 0:x.formType)==null?void 0:le.key)==="pdf")&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(xf,{backend:Ef,children:x!==null&&((ie=x==null?void 0:x.layout)==null?void 0:ie.length)&&o.jsx(Q5,{})})})})})}),((ue=x==null?void 0:x.formType)==null?void 0:ue.key)==="training"&&o.jsx(Axe,{renderIn:Ute,taskSchema:x,taskId:a,endPoints:s}),((Ne=x==null?void 0:x.formType)==null?void 0:Ne.key)==="exam"&&o.jsx(wxe,{taskId:a,endPoints:s,onStart:h})]})]})};/**
4291
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qg(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,n=String(t);if(e===0)return n;var r=n.match(/(.*?)([0-9]+)(.*)/),i=r?r[1]:"",a=r?r[3]:"",s=r?r[2]:n,l=s.length>=e?s:(JCe(Array(e)).map(function(){return"0"}).join("")+s).slice(e*-1);return"".concat(i).concat(l).concat(a)}var Dj={daysInHours:!1,zeroPadTime:2};function rxe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.now,r=n===void 0?Date.now:n,i=e.precision,a=i===void 0?0:i,s=e.controlled,l=e.offsetTime,c=l===void 0?0:l,u=e.overtime,d;typeof t=="string"?d=new Date(t).getTime():t instanceof Date?d=t.getTime():d=t,s||(d+=c);var f=s?d:d-r(),h=Math.min(20,Math.max(0,a)),g=Math.round(parseFloat(((u?f:Math.max(0,f))/1e3).toFixed(h))*1e3),v=Math.abs(g)/1e3;return{total:g,days:Math.floor(v/(3600*24)),hours:Math.floor(v/3600%24),minutes:Math.floor(v/60%60),seconds:Math.floor(v%60),milliseconds:Number((v%1*1e3).toFixed()),completed:g<=0}}function ixe(t,e){var n=t.days,r=t.hours,i=t.minutes,a=t.seconds,s=Object.assign(Object.assign({},Dj),e),l=s.daysInHours,c=s.zeroPadTime,u=s.zeroPadDays,d=u===void 0?c:u,f=Math.min(2,c),h=l?qg(r+n*24,c):qg(r,f);return{days:l?"":qg(n,d),hours:h,minutes:qg(i,f),seconds:qg(a,f)}}var Nj=function(t){Ij(n,t);var e=_j(n);function n(){var r;return Tj(this,n),r=e.apply(this,arguments),r.state={count:r.props.count||3},r.startCountdown=function(){r.interval=window.setInterval(function(){var i=r.state.count-1;i===0?(r.stopCountdown(),r.props.onComplete&&r.props.onComplete()):r.setState(function(a){return{count:a.count-1}})},1e3)},r.stopCountdown=function(){clearInterval(r.interval)},r.addTime=function(i){r.stopCountdown(),r.setState(function(a){return{count:a.count+i}},r.startCountdown)},r}return Ej(n,[{key:"componentDidMount",value:function(){this.startCountdown()}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return this.props.children?F.cloneElement(this.props.children,{count:this.state.count}):null}}]),n}(F.Component);Nj.propTypes={count:da.number,children:da.element,onComplete:da.func};var Ug=function(t){Ij(n,t);var e=_j(n);function n(r){var i;if(Tj(this,n),i=e.call(this,r),i.mounted=!1,i.initialTimestamp=i.calcOffsetStartTimestamp(),i.offsetStartTimestamp=i.props.autoStart?0:i.initialTimestamp,i.offsetTime=0,i.legacyMode=!1,i.legacyCountdownRef=null,i.tick=function(){var s=i.calcTimeDelta(),l=s.completed&&!i.props.overtime?void 0:i.props.onTick;i.setTimeDeltaState(s,void 0,l)},i.setLegacyCountdownRef=function(s){i.legacyCountdownRef=s},i.start=function(){if(!i.isStarted()){var s=i.offsetStartTimestamp;i.offsetStartTimestamp=0,i.offsetTime+=s?i.calcOffsetStartTimestamp()-s:0;var l=i.calcTimeDelta();i.setTimeDeltaState(l,"STARTED",i.props.onStart),!i.props.controlled&&(!l.completed||i.props.overtime)&&(i.clearTimer(),i.interval=window.setInterval(i.tick,i.props.intervalDelay))}},i.pause=function(){i.isPaused()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.setTimeDeltaState(i.state.timeDelta,"PAUSED",i.props.onPause))},i.stop=function(){i.isStopped()||(i.clearTimer(),i.offsetStartTimestamp=i.calcOffsetStartTimestamp(),i.offsetTime=i.offsetStartTimestamp-i.initialTimestamp,i.setTimeDeltaState(i.calcTimeDelta(),"STOPPED",i.props.onStop))},i.isStarted=function(){return i.isStatus("STARTED")},i.isPaused=function(){return i.isStatus("PAUSED")},i.isStopped=function(){return i.isStatus("STOPPED")},i.isCompleted=function(){return i.isStatus("COMPLETED")},r.date){var a=i.calcTimeDelta();i.state={timeDelta:a,status:a.completed?"COMPLETED":"STOPPED"}}else i.legacyMode=!0;return i}return Ej(n,[{key:"componentDidMount",value:function(){this.legacyMode||(this.mounted=!0,this.props.onMount&&this.props.onMount(this.calcTimeDelta()),this.props.autoStart&&this.start())}},{key:"componentDidUpdate",value:function(i){this.legacyMode||this.props.date!==i.date&&(this.initialTimestamp=this.calcOffsetStartTimestamp(),this.offsetStartTimestamp=this.initialTimestamp,this.offsetTime=0,this.setTimeDeltaState(this.calcTimeDelta()))}},{key:"componentWillUnmount",value:function(){this.legacyMode||(this.mounted=!1,this.clearTimer())}},{key:"calcTimeDelta",value:function(){var i=this.props,a=i.date,s=i.now,l=i.precision,c=i.controlled,u=i.overtime;return rxe(a,{now:s,precision:l,controlled:c,offsetTime:this.offsetTime,overtime:u})}},{key:"calcOffsetStartTimestamp",value:function(){return Date.now()}},{key:"addTime",value:function(i){this.legacyCountdownRef.addTime(i)}},{key:"clearTimer",value:function(){window.clearInterval(this.interval)}},{key:"isStatus",value:function(i){return this.state.status===i}},{key:"setTimeDeltaState",value:function(i,a,s){var l=this;if(this.mounted){var c=i.completed&&!this.state.timeDelta.completed,u=i.completed&&a==="STARTED";c&&!this.props.overtime&&this.clearTimer();var d=function(){s&&s(l.state.timeDelta),l.props.onComplete&&(c||u)&&l.props.onComplete(i,u)};return this.setState(function(f){var h=a||f.status;return i.completed&&!l.props.overtime?h="COMPLETED":!a&&h==="COMPLETED"&&(h="STOPPED"),{timeDelta:i,status:h}},d)}}},{key:"getApi",value:function(){return this.api=this.api||{start:this.start,pause:this.pause,stop:this.stop,isStarted:this.isStarted,isPaused:this.isPaused,isStopped:this.isStopped,isCompleted:this.isCompleted}}},{key:"getRenderProps",value:function(){var i=this.props,a=i.daysInHours,s=i.zeroPadTime,l=i.zeroPadDays,c=this.state.timeDelta;return Object.assign(Object.assign({},c),{api:this.getApi(),props:this.props,formatted:ixe(c,{daysInHours:a,zeroPadTime:s,zeroPadDays:l})})}},{key:"render",value:function(){if(this.legacyMode){var i=this.props,a=i.count,s=i.children,l=i.onComplete;return F.createElement(Nj,{ref:this.setLegacyCountdownRef,count:a,onComplete:l},s)}var c=this.props,u=c.className,d=c.overtime,f=c.children,h=c.renderer,g=this.getRenderProps();if(h)return h(g);if(f&&this.state.timeDelta.completed&&!d)return F.cloneElement(f,{countdown:g});var v=g.formatted,m=v.days,A=v.hours,S=v.minutes,T=v.seconds;return F.createElement("span",{className:u},g.total<0?"-":"",m,m?":":"",A,":",S,":",T)}}]),n}(F.Component);Ug.defaultProps=Object.assign(Object.assign({},Dj),{controlled:!1,intervalDelay:1e3,precision:0,autoStart:!0}),Ug.propTypes={date:da.oneOfType([da.instanceOf(Date),da.string,da.number]),daysInHours:da.bool,zeroPadTime:da.number,zeroPadDays:da.number,controlled:da.bool,intervalDelay:da.number,precision:da.number,autoStart:da.bool,overtime:da.bool,className:da.string,children:da.element,renderer:da.func,now:da.func,onMount:da.func,onStart:da.func,onPause:da.func,onStop:da.func,onTick:da.func,onComplete:da.func};const axe=({assessmentData:t,setDisplaySummary:e})=>{var r,i,a,s;const n=l=>{if(l.seconds<10&&(l.seconds="0"+l.seconds),l.minutes===0&&(l.minutes="0"+l.minutes),l.completed)e(!0);else return o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:l.minutes===0?{color:"black"}:{color:"black"},children:[l.minutes,":",l.seconds]})]})};return o.jsx(o.Fragment,{children:t&&((i=(r=t==null?void 0:t.time_limit)==null?void 0:r.type)==null?void 0:i.key)==="PerExam"&&o.jsx(Ug,{renderer:n,date:Date.now()+parseInt((s=(a=t==null?void 0:t.time_limit)==null?void 0:a.time_limit_info)==null?void 0:s.num_of_mins)*60*1e3})})},sxe=F.memo(axe),oxe=t=>{var d,f,h,g;const{assessmentData:e,onNextQuestion:n,currentQuestionIndex:r}=t,[i,a]=F.useState(Date.now()),[s,l]=F.useState(!1),c=F.useCallback(()=>{a(Date.now()),l(!1)},[r]);F.useEffect(()=>{c()},[r,c]);const u=v=>(v.seconds<10&&(v.seconds="0"+v.seconds),v.minutes===0&&(v.minutes="0"+v.minutes),v.completed&&!s?(l(!0),setTimeout(()=>{n()},500),o.jsx(o.Fragment,{})):o.jsxs("span",{children:["Time Remaining:"," ",o.jsxs("span",{style:{color:"black"},children:[v.minutes,":",v.seconds]})]}));return o.jsx(o.Fragment,{children:((f=(d=e==null?void 0:e.time_limit)==null?void 0:d.type)==null?void 0:f.key)==="PerQuestion"&&o.jsx(Ug,{renderer:u,date:i+parseInt((g=(h=e==null?void 0:e.time_limit)==null?void 0:h.time_limit_info)==null?void 0:g.time_per_question)*1e3,intervalDelay:0},i)})},lxe=()=>{const t=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound4.mp3");i(a)},e=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound2.mp3");i(a)},n=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound8.mp3");i(a)},r=()=>{const a=new Audio("https://api.goenterprise.io/assets/sounds/sound6.mp3");i(a)},i=a=>{a.play().then(()=>{}).catch(s=>{console.info("Not Played,"+s.error+s.name)})};return{socketConnection:t,socketDisconnect:e,errorOcurred:n,quizStartAlert:r}},cxe="1",Oj=t=>{var se,we,ke,R,Ae,Se,fe,ge,pe,Be;const e=De=>{const[He,it]=F.useState(De),dt=F.useRef(He);return F.useEffect(()=>{dt.current=He},[He]),[He,dt,it]},{endQuiz:n,AddUserAssessmentAnswer:r,assessmentData:i,taskData:a}=wr(),[s,l]=F.useState(new Date),{session_id:c,quizData:u,saveProgress:d,renderIn:f,onOpenQuiz:h,setDisplay:g,setAssessmentModal:v=()=>{},saveNewQuizData:m}=t,{quizStartAlert:A}=lxe(),{userSelectedLanguage:S}=on(),[T,,C]=e(0),{media:x}=Wt(),w=(se=x==null?void 0:x.image)!=null&&se.MediaImage?(we=x==null?void 0:x.image)==null?void 0:we.MediaImage:o.jsx(o.Fragment,{}),[I,_,N]=e(null),[O,k]=F.useState(!1),[M,j,P]=e([]),[$,K]=F.useState(!1),[ce,X]=F.useState(!1),[ne,he]=F.useState(0),[q,W]=F.useState(0),[Q,Z]=F.useState(0),[H,Y]=F.useState(!1),[oe,be]=F.useState({isCorrect:null,text:null});window.onbeforeunload=function(){return!1},F.useEffect(()=>{$||K(!0)},[M,O,$]),F.useEffect(()=>{u!==null&&(A(),Ce())},[]);const Ce=()=>{W(u.quizConfiguration.quizPassMark)},ve=F.useCallback((De,He,it,dt,ft)=>{const Lt=[...M];if((ft==null?void 0:ft.answerInputType)!=="checkbox"){const ln={uuid:ft==null?void 0:ft.uuid,question:ft==null?void 0:ft.questionText,isCorrect:dt.isCorrect,selectedAnswer:dt.answersText,viewed:!0},Ft=M.findIndex(mn=>(mn==null?void 0:mn.uuid)===ft.uuid);Ft>=0?(Lt[Ft]={...Lt[Ft],...ln},P(Lt)):P([...M,ln])}},[I]),ye=()=>{if(T===0)return;const De=T-1,He=u.quizElements[De],it=j.current.find(dt=>dt.uuid===He.uuid);if(it){const dt=it.selectedAnswer;N(Array.isArray(dt)?dt:dt[S.type]??dt),k(!0)}else N(null),k(!1);C(De)},te=De=>{for(const He of M)if(He.questionIndex===T+De){N(He.selectedAnswerEnglish);break}},L=(De,He,it,dt)=>{var ln;const ft=[...I];if(De)ft.push(He);else{const Ft=ft.findIndex(mn=>mn===He);Ft>=0&&ft.splice(Ft,1)}N(ft);const Lt=[...M];if((dt==null?void 0:dt.answerInputType)==="checkbox"){let Ft=!1;for(const[,xt]of(dt==null?void 0:dt.answerOptions.entries())||[])if(xt.isCorrect===!0)if(Et.includes(ft,(ln=xt==null?void 0:xt.answersText)==null?void 0:ln[S==null?void 0:S.type]))Ft=!0;else{Ft=!1;break}const mn={uuid:dt==null?void 0:dt.uuid,question:dt==null?void 0:dt.questionText,isCorrect:Ft,selectedAnswer:it.answersText,viewed:!0},Vn=M.findIndex(xt=>(xt==null?void 0:xt.uuid)===dt.uuid);Vn>=0?(Lt[Vn]={...Lt[Vn],...mn},P(Lt)):P([...M,mn])}},le=F.useCallback(()=>{var ln,Ft,mn,Vn,xt,je,Ye,st,Jt,Xt,Zt,yn;const De=_.current,He=Et.findIndex((ln=u==null?void 0:u.quizElements[T])==null?void 0:ln.answerOptions,function(ot){return ot.isCorrect===!0}),it=u==null?void 0:u.quizElements[T],dt=(mn=(Ft=it==null?void 0:it.answerOptions[He])==null?void 0:Ft.answersText)!=null&&mn[S==null?void 0:S.type]?(xt=(Vn=it==null?void 0:it.answerOptions[He])==null?void 0:Vn.answersText)==null?void 0:xt[S==null?void 0:S.type]:"",ft=M.findIndex(ot=>(ot==null?void 0:ot.uuid)===it.uuid);console.log("selectedAnswers",M),console.log("currentQuestionIndex",T),console.log("selectedAnswers[currentQuestionIndex]",M[ft]);const Lt=(je=M[ft])!=null&&je.isCorrect?1:0;if(console.log("isCorrectAnswer[currentQuestionIndex]",Lt),u!=null&&u.quizElements&&T+1!==(u==null?void 0:u.quizElements.length)){const ot={assessment_user_attempt_id:(st=i==null?void 0:i.assesment_user_attempts[((Ye=i==null?void 0:i.assesment_user_attempts)==null?void 0:Ye.length)-1])==null?void 0:st.assessment_user_attempt_id,session_id:c,assessment_id:1,question:(Jt=it.questionText)==null?void 0:Jt[S==null?void 0:S.type],question_uid:it==null?void 0:it.uuid,start_time:s,finish_time:new Date,correct_answer:dt,selected_answer:Array.isArray(De)?De.toString():De,is_correct_answer:Lt};r(ot),N(null),C(T+1),l(new Date),te(2)}else if((u==null?void 0:u.quizElements.length)===T+1){const ot={assessment_user_attempt_id:(Zt=i==null?void 0:i.assesment_user_attempts[((Xt=i==null?void 0:i.assesment_user_attempts)==null?void 0:Xt.length)-1])==null?void 0:Zt.assessment_user_attempt_id,session_id:c,assessment_id:1,question_uid:it==null?void 0:it.uuid,question:(yn=it.questionText)==null?void 0:yn[S==null?void 0:S.type],start_time:s,finish_time:new Date,correct_answer:dt,selected_answer:Array.isArray(De)?De.toString():De,is_correct_answer:Lt};r(ot),ie(),Ne()}if(k(!1),T+1<u.quizElements.length){const ot=T+1,Ue=u.quizElements[ot],nt=M.find(Tt=>Tt.uuid===Ue.uuid);if(nt){const Tt=nt.selectedAnswer,Bt=Array.isArray(Tt)?Tt:Tt[S.type]??Tt;N(Bt),k(!0)}else N(null),k(!1)}},[T,M]),ie=()=>{X(!0)},ue=()=>{me?(console.log("Restart"),g(b3),m(),K(!0),A(),Ce(),C(0),N(null),k(!1),P([]),X(!1),he(0),Z(0),Y(!1),be({isCorrect:null,text:null})):(g(qp),v(!1))},Ne=()=>{var ft,Lt;let De=0,He=0,it=!1;for(const ln of M)ln!=null&&ln.isCorrect&&De++;he(De),He=De/((ft=u==null?void 0:u.quizElements)==null?void 0:ft.length)*100,He=Math.round(He),Z(He),it=He>=q,Y(it);const dt={...u,...i,result:He,status:it,selectedAnswers:M};d(dt),n({session_id:c,is_pass:it?1:0,score:De,out_of:(Lt=u==null?void 0:u.quizElements)==null?void 0:Lt.length,finish_time:new Date,status:1})},_e=()=>{var De,He,it,dt,ft,Lt,ln;if(((De=u==null?void 0:u.quizElements[T])==null?void 0:De.answerInputType)==="radio"){const Ft=Et.findIndex((He=u==null?void 0:u.quizElements[T])==null?void 0:He.answerOptions,function(mn){return mn.isCorrect===!0});I===((ft=(dt=(it=u==null?void 0:u.quizElements[T])==null?void 0:it.answerOptions[Ft])==null?void 0:dt.answersText)==null?void 0:ft[S==null?void 0:S.type])?be({isCorrect:!0,text:I}):be({isCorrect:!1,text:I})}if(((Lt=u==null?void 0:u.quizElements[T])==null?void 0:Lt.answerInputType)==="checkbox"){const Ft=(ln=u==null?void 0:u.quizElements[T])==null?void 0:ln.answerOptions.filter(mn=>mn.isCorrect===!0);if(I!=null&&I.length){const mn=I==null?void 0:I.map(Vn=>({isCorrect:Ft==null?void 0:Ft.some(xt=>{var je;return((je=xt==null?void 0:xt.answersText)==null?void 0:je[S==null?void 0:S.type])===Vn}),text:Vn}));be(mn)}}},me=(i==null?void 0:i.noOfAttempts)-((ke=i==null?void 0:i.assesment_user_attempts)==null?void 0:ke.length)>0&&!H;return o.jsx(o.Fragment,{children:u!==null&&o.jsxs("div",{children:[ce&&o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"card text-center",children:[o.jsxs("h5",{children:["Assessment Result for"," ",(R=a==null?void 0:a.assessment)==null?void 0:R.assessment_title]}),o.jsxs("div",{children:[o.jsxs("p",{children:["You answered ",ne," out of"," ",(Ae=u==null?void 0:u.quizElements)==null?void 0:Ae.length," questions"]}),o.jsxs("p",{children:["Your assessment result: ",Q,"%"]}),o.jsxs("p",{children:["Score Needed To Pass: ",q,"%"]}),o.jsx("br",{}),o.jsxs("p",{children:["Status:"," ",H?o.jsx(vu,{severity:"success",value:"Passed"}):o.jsx(vu,{severity:"danger",value:"Failed"})]}),H&&o.jsx("p",{children:"Congratulations you have passed!"}),o.jsx(o.Fragment,{children:ce&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Vt,{label:me?"Restart":"End",onClick:()=>ue()})})})]})]})})}),ce&&((Se=i==null?void 0:i.assessment_type)==null?void 0:Se.key)===cxe&&o.jsxs("div",{children:[o.jsx("h5",{className:"text-center",children:"Summary "}),o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:M==null?void 0:M.map((De,He)=>{var it,dt;return o.jsxs("div",{className:"card",children:[o.jsxs("span",{className:"text-strong",children:[o.jsx("b",{children:"Question:"})," ",o.jsx("br",{}),(it=De==null?void 0:De.question)==null?void 0:it[S==null?void 0:S.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsxs("span",{children:[o.jsx("b",{children:"Selected Answer:"})," ",o.jsx("br",{}),(dt=De==null?void 0:De.selectedAnswer)==null?void 0:dt[S==null?void 0:S.type]]}),o.jsx("br",{}),o.jsx("br",{}),o.jsx("p",{children:"In Correct:"}),De!=null&&De.isCorrect?o.jsxs(o.Fragment,{children:[o.jsx(O4,{value:"",severity:"success",className:"mr-2"})," ","Yes"]}):o.jsxs(o.Fragment,{children:[o.jsx(O4,{value:"",severity:"danger",className:"mr-2"})," ","No"]})]},He)})})})]}),f!==BD?o.jsx(o.Fragment,{children:ce&&o.jsx("div",{className:"text-center my-5",children:o.jsx(Vt,{text:!0,className:"p-button-danger",icon:"pi pi-times",label:"Close",onClick:()=>{g(qp)}})})}):o.jsx(o.Fragment,{}),$&&!ce&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-6 col-offset-3",children:[o.jsx("h5",{className:"text-center",children:o.jsxs("span",{children:[o.jsx(sxe,{assessmentData:i,setDisplaySummary:X}),o.jsx(oxe,{currentQuestionIndex:T,assessmentData:i,onNextQuestion:le})]})}),o.jsxs("h2",{className:"text-center pb-6",children:[u==null?void 0:u.name," "]}),(fe=u==null?void 0:u.quizElements)==null?void 0:fe.map((De,He)=>{var it,dt,ft,Lt,ln;return o.jsxs("div",{className:"quiz-card-box",children:[T===He&&((it=De==null?void 0:De.questionTextImage)==null?void 0:it[S==null?void 0:S.type])&&((dt=De==null?void 0:De.questionTextImage)==null?void 0:dt[S==null?void 0:S.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(w,{mediaId:(ft=De==null?void 0:De.questionTextImage)==null?void 0:ft[S==null?void 0:S.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:T===He&&((Lt=De==null?void 0:De.questionText)==null?void 0:Lt[S==null?void 0:S.type])}),T===He&&((ln=De==null?void 0:De.answerOptions)==null?void 0:ln.map((Ft,mn)=>(De==null?void 0:De.answerInputType)==="checkbox"?o.jsx(F.Fragment,{children:o.jsx(RCe,{onChangeCheckbox:L,setSelectedOption:N,quiz:Ft,userSelectedLanguage:S,onSetAnswer:ve,setIsOptionSelected:k,index:mn,eleIndex:He,ele:De,setCorrectAnswerCheck:be,correctAnswerCheck:oe,selectedOption:I})},`checkbox-question-${mn}`):o.jsx(F.Fragment,{children:o.jsx(KCe,{setSelectedOption:N,quiz:Ft,userSelectedLanguage:S,onSetAnswer:ve,setIsOptionSelected:k,index:mn,eleIndex:He,ele:De,setCorrectAnswerCheck:be,correctAnswerCheck:oe,selectedOption:I})},`radio-question-${mn}`)))]},He)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Question :"," ",T+1+"/"+(u==null?void 0:u.quizElements.length)]}),o.jsx("br",{}),T>0&&((pe=(ge=i==null?void 0:i.time_limit)==null?void 0:ge.type)==null?void 0:pe.key)!=="PerQuestion"&&o.jsx(Vt,{size:"large",className:"mx-2",label:"Previous",onClick:De=>ye()}),((i==null?void 0:i.skippable)===!0||O===!0)&&o.jsx(Vt,{size:"large",label:(u==null?void 0:u.quizElements.length)===T+1?"Finish":O===!0?"Next":"Skip",onClick:le}),O===!0&&((Be=i==null?void 0:i.assessment_type)==null?void 0:Be.key)==="1"&&o.jsx(Vt,{size:"large",className:"ml-2 p-button-info",label:"Check Answer",onClick:()=>_e()})]})]})]})})},uxe=t=>{const{getAssessmentByIdFromStore:e,quizSchema:n,setQuizSchema:r,renderIn:i,updateTrainingProgress:a,currentItem:s}=t,{userTrainingSaveData:l}=wr();F.useEffect(()=>(c(),()=>{}),[]);const c=()=>{var g,v,m,A;const d=JSON.parse(e.form_template_schema),f=JSON.parse(e.assessment_meta_data);let h=[...((A=(m=(v=(g=d==null?void 0:d.layout[0])==null?void 0:g.children[0])==null?void 0:v.children[0])==null?void 0:m.children[0])==null?void 0:A.children)||[]];f!=null&&f.randomiseQuestions&&(h=wm.shuffle(h).map((S,T)=>({...S}))),f!=null&&f.randomiseAnswers&&(h=h.map((S,T)=>({...S,answerOptions:wm.shuffle(S==null?void 0:S.answerOptions)}))),f!=null&&f.enableNoOfAssessmentQuestions&&(h=h.slice(0,parseInt(f==null?void 0:f.noOfAssessmentQuestions))),r({assessment_id:1,name:e==null?void 0:e.assessment_title,label:"assessment_title",quizConfiguration:d==null?void 0:d.quizConfiguration,quizElements:h})},u=d=>{if((d==null?void 0:d.status)===!0){if(l!==null){const h=l.findIndex(g=>(g==null?void 0:g.fieldId)===(s==null?void 0:s.uuid));h>=0&&(l[h]={...l[h],isSeen:!0})}a()}};return o.jsx("div",{children:n&&o.jsx(Oj,{renderIn:i,quizData:n,taskSchema:e==null?void 0:e.form_template_schema,saveProgress:d=>{u(d)}})})},dxe=t=>{var m,A;const{currentItem:e,videoJsOptions:n}=t,r=F.useRef(null),{userTrainingSaveData:i,updateUserTraining:a,taskRegisterData:s}=wr(),{media:l}=Wt(),c=(m=l==null?void 0:l.video)!=null&&m.MediaVideo?(A=l==null?void 0:l.video)==null?void 0:A.MediaVideo:()=>o.jsx(o.Fragment,{}),u=S=>{r.current=S,S.on("waiting",()=>{Dt.log("player is waiting")}),S.on("dispose",()=>{Dt.log("player will dispose")})},d=S=>{if(i!==null){const T=[...i],C=T==null?void 0:T.findIndex(x=>(x==null?void 0:x.fieldId)===(e==null?void 0:e.uuid));C>=0&&(T[C].seenTime=S==null?void 0:S.target.currentTime)}},f=S=>{const T=[...i],C=T==null?void 0:T.findIndex(x=>(x==null?void 0:x.fieldId)===(S==null?void 0:S.uuid));C>=0&&(i[C]={...i[C],isSeen:!0},a(T),h("Ended"))},h=S=>{const T=r.current,C=i!==null?i==null?void 0:i.findIndex(x=>(x==null?void 0:x.fieldId)===(e==null?void 0:e.uuid)):-1;C>=0&&i[C].logs.push({action:S,videoTime:i[C].seenTime,totalTime:T.duration,timeState:new Date})},g=S=>{const{mediaId:T}=S,[C,x]=F.useState(!1);return F.useEffect(()=>{if(!C&&i!==null){const w=i.findIndex(I=>(I==null?void 0:I.fieldId)===(e==null?void 0:e.uuid));if(w>=0){x(!0);const I=r.current;I.currentTime=i[w].seenTime}x(!0)}return()=>{}},[i]),o.jsx(c,{mediaId:T,ref:r,className:"my-video",style:{borderRadius:"10px"},onPlay:()=>h("Play"),onPause:()=>h("Pause"),onEnded:()=>f(e),onTimeUpdate:d,controls:!0})},v=F.useCallback(S=>o.jsx(g,{mediaId:S}),[e==null?void 0:e.media_file_id]);return o.jsx("div",{children:(e==null?void 0:e.isExternalSource)===!1&&(e==null?void 0:e.media_file_id)!==void 0&&(e==null?void 0:e.media_file_id)!==null?o.jsx(o.Fragment,{children:v(e==null?void 0:e.media_file_id)}):o.jsx(o.Fragment,{children:o.jsx(fV,{options:n,onReady:u,currentItem:e},e==null?void 0:e.uuid)})})},W5=t=>{var I,_,N,O,k,M;const{sections:e,showInfoPanel:n,updateTrainingProgress:r}=t,{taskOptions:i}=wr(),[a]=F.useState(!1),[,s]=F.useState(ry),[l,c]=F.useState([]),[u,d]=F.useState(null),{userSelectedLanguage:f}=on(),[h,g]=F.useState(null),[v,m]=F.useState(null),A=(I=i==null?void 0:i.training)!=null&&I.getAssessmentByIdFromStore?(_=i==null?void 0:i.training)==null?void 0:_.getAssessmentByIdFromStore:()=>{},S=(N=i==null?void 0:i.training)!=null&&N.TrainingOverView?(O=i==null?void 0:i.training)==null?void 0:O.TrainingOverView:()=>o.jsx(o.Fragment,{}),[T,C]=F.useState({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"}]});F.useEffect(()=>{a||x()},[a]);const x=()=>{var j,P,$,K,ce,X,ne,he,q,W,Q,Z,H,Y,oe,be,Ce,ve,ye,te,L;switch(g(($=(P=(j=e[0])==null?void 0:j.children[0])==null?void 0:P.children[0])==null?void 0:$.children[0]),m(e[0]),(ne=(X=(ce=(K=e[0])==null?void 0:K.children[0])==null?void 0:ce.children[0])==null?void 0:X.children[0])==null?void 0:ne.componentType){case"video":C({autoplay:!1,controls:!0,responsive:!0,fluid:!0,sources:[{src:(Z=(Q=(W=(q=(he=e[0])==null?void 0:he.children[0])==null?void 0:q.children[0])==null?void 0:W.children[0])==null?void 0:Q.media_url)==null?void 0:Z.english}]});break;case"image":s((Ce=(be=(oe=(Y=(H=e[0])==null?void 0:H.children[0])==null?void 0:Y.children[0])==null?void 0:oe.children[0])==null?void 0:be.media_url)==null?void 0:Ce.english);break;case"document":c((L=(te=(ye=(ve=e[0])==null?void 0:ve.children[0])==null?void 0:ye.children[0])==null?void 0:te.children[0])==null?void 0:L.documents);break}},w=j=>{switch(j==null?void 0:j.componentType){case"video":return o.jsx("div",{children:o.jsx(dxe,{videoJsOptions:T,currentItem:j},j==null?void 0:j.uuid)});case"image":return o.jsx(fk,{field:j,isPreview:!0});case"document":return o.jsxs("div",{children:[o.jsx("h6",{children:"Documents"}),o.jsx("ul",{children:(l==null?void 0:l.length)>0&&l.map((P,$)=>o.jsx("li",{children:o.jsx("a",{href:P==null?void 0:P.url,children:P==null?void 0:P.url})},`document-item-${$}`))})]});case"quiz":return A!=null&&A.form_template_schema?o.jsx(uxe,{renderIn:BD,getAssessmentByIdFromStore:A,quizSchema:u,setQuizSchema:d,updateTrainingProgress:r,currentItem:j}):o.jsx("div",{});case"slides":return o.jsx("div",{children:"Show slides"});case"html":return o.jsx("div",{children:"Show custom HTML Here"});default:return o.jsx("div",{})}};return o.jsxs("div",{className:"grid",children:[o.jsxs("div",{className:"col-8 scroll-height-100",children:[o.jsxs("h3",{children:[(k=v==null?void 0:v.heading)==null?void 0:k[f==null?void 0:f.type]," -"," ",(M=h==null?void 0:h.title)==null?void 0:M[f==null?void 0:f.type]," "]}),w(h),n&&o.jsx(S,{})]}),o.jsx("div",{className:"col-4 scroll-height-100",children:e.map((j,P)=>{var $,K;return o.jsxs(di,{className:"mb-5",header:($=j==null?void 0:j.heading)==null?void 0:$.english,toggleable:!0,children:[o.jsx("p",{children:(K=j==null?void 0:j.subHeadingText)==null?void 0:K[f==null?void 0:f.type]}),j.children.map((ce,X)=>{const ne=`${X}`;return o.jsx("div",{children:ce.children.map((he,q)=>{const W=`${X}-${ne}`;return o.jsx(YCe,{setCurrentSection:m,section:j,setCurrentItem:g,currentItem:h,path:W,fields:he.children,setvideoJsOptions:C,setImage:s,setDocuments:c,setQuizSchema:d,updateTrainingProgress:r},`training-sidebar-${q}`)})},`training-sidebar-container-${X}`)})]},`train-sidebar-panel-${P}`)})})]})};W5.defaultProps={showInfoPanel:!0,sections:{},updateTrainingProgress:()=>{}},W5.propTypes={showInfoPanel:e1.bool,sections:e1.array,updateTrainingProgress:e1.func};const fxe=()=>{var r;const{formBuilderFormLayout:t}=on(),{isPreview:e}=Wt(),n=(i,a,s)=>o.jsx(zCe,{data:i,path:a,pageIndex:s},`page-${i.uuid}`);return e?o.jsx(W5,{sections:((r=t[0])==null?void 0:r.children)||[],showInfoPanel:!1,updateTrainingProgress:()=>{}}):o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((i,a)=>{const s=`${a}`;return o.jsx("div",{children:n(i,s,a)},`exam-page-${a}`)})})})},hxe=t=>{var I,_,N,O,k;const{userSelectedLanguage:e,formBuilderConfigurationType:n,builderTemplateName:r,formBuilderFormSchema:i}=on(),a=[{label:{english:"List main maintenance safety tips? "},componentType:"question",questionText:{french:"Quels sont les principaux conseils de sécurité pour la maintenance?? ",english:"List main maintenance safety tips? "},answerOptions:[],isHidden:!1,uuid:"rtest",options:[],underLined:!1,isAllowMultipleAnswer:!1,resizableColumns:!1,reorderableColumns:!1,timeLimit:0,score:0,subject_id:0,course_category_id:0,TextEditorProps:!1}],{questions:s}=t,[l,c]=F.useState(),[u,d]=F.useState([]),{media:f}=Wt(),h=(I=f==null?void 0:f.image)!=null&&I.MediaImage?(_=f==null?void 0:f.image)==null?void 0:_.MediaImage:o.jsx(o.Fragment,{}),g={assessment_id:"abc123",name:`${n==null?void 0:n.name} - ${r}`,label:"Quiz 1",quizConfiguration:{quizPassMark:75,quizTimeLimit:2,quizMaxAttempts:99,quizSequentialAnswer:0,isAllCorrectMandatory:!0,quizRandomiseQuestions:1,quizUniqueAnswersPerAttempt:"1"},quizElements:(s==null?void 0:s.length)>0?s:a},[v,m]=F.useState(0),[A,S]=F.useState(!1);function T(M,j){return(M==null?void 0:M.length)<=j?M:(M==null?void 0:M.slice(0,j))+"..."}F.useEffect(()=>{S(!0)},[]);const C=()=>{v!==0&&m(v-1)},x=()=>{if(g!=null&&g.quizElements&&v+1!==(g==null?void 0:g.quizElements.length))m(v+1);else if((g==null?void 0:g.quizElements.length)===v+1)return},w=(M,j)=>{let P=[...u];M.checked?P.push(j):P=P.filter($=>($==null?void 0:$[e==null?void 0:e.type])!==(j==null?void 0:j[e==null?void 0:e.type])),d(P)};return o.jsxs("div",{className:"mb-2",children:[A&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[o.jsxs("h3",{children:[g==null?void 0:g.name," "]}),(N=g==null?void 0:g.quizElements)==null?void 0:N.map((M,j)=>{var P,$,K,ce,X,ne,he,q,W;return(M==null?void 0:M.answerInputType)==="radio"?o.jsxs("div",{className:v===j?"card":" flex align-items-center p-field-radiobutton",children:[((P=M==null?void 0:M.questionTextImage)==null?void 0:P[e==null?void 0:e.type])&&(($=M==null?void 0:M.questionTextImage)==null?void 0:$[e==null?void 0:e.type])!==""&&o.jsx("div",{className:"text-center assessment_image_container",children:o.jsx(h,{mediaId:(K=M==null?void 0:M.questionTextImage)==null?void 0:K[e==null?void 0:e.type],style:{height:"100px",width:"100px",objectFit:"cover",borderRadius:100},className:"text-center",alt:"questionImage"})}),o.jsx("h3",{className:"mb-5",children:v===j&&((ce=M==null?void 0:M.questionText)==null?void 0:ce[e==null?void 0:e.type])}),v===j&&((X=M==null?void 0:M.answerOptions)==null?void 0:X.map((Q,Z)=>{var H,Y,oe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(oa,{inputId:`${Z}-preview`,value:Q==null?void 0:Q.answersText,checked:l===Z,onChange:()=>{c(Z)}}),((H=Q.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((Y=Q.answersTextImage)==null?void 0:Y[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(oe=Q.answersTextImage)==null?void 0:oe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:`${Z}-preview`,children:(be=Q.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},j):(M==null?void 0:M.answerInputType)==="checkbox"?o.jsxs("div",{className:v===j?"card":" flex align-items-center p-field-radiobutton",children:[o.jsx("h3",{className:"mb-5",children:v===j&&((ne=M==null?void 0:M.questionText)==null?void 0:ne[e==null?void 0:e.type])}),v===j&&((he=M==null?void 0:M.answerOptions)==null?void 0:he.map((Q,Z)=>{var H,Y,oe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(Kr,{inputId:Z,value:Q==null?void 0:Q.answersText,onChange:Ce=>{w(Ce,Q==null?void 0:Q.answersText)},checked:u.some(Ce=>{var ve;return(Ce==null?void 0:Ce[e==null?void 0:e.type])===((ve=Q==null?void 0:Q.answersText)==null?void 0:ve[e==null?void 0:e.type])})}),((H=Q.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((Y=Q.answersTextImage)==null?void 0:Y[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(oe=Q.answersTextImage)==null?void 0:oe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Z,children:(be=Q.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},j):o.jsxs("div",{className:v===j?"card":"",children:[o.jsx("h3",{className:"mb-5",children:v===j&&((q=M==null?void 0:M.questionText)==null?void 0:q[e==null?void 0:e.type])}),v===j&&((W=M==null?void 0:M.answerOptions)==null?void 0:W.map((Q,Z)=>{var H,Y,oe,be;return o.jsxs("div",{className:"field-radiobutton",children:[o.jsx(oa,{inputId:Z,value:Q==null?void 0:Q.answersText,onChange:()=>{}}),((H=Q.answersTextImage)==null?void 0:H[e==null?void 0:e.type])&&((Y=Q.answersTextImage)==null?void 0:Y[e==null?void 0:e.type])!==""&&o.jsx(h,{mediaId:(oe=Q.answersTextImage)==null?void 0:oe[e==null?void 0:e.type],className:"mx-3",alt:"questionImage",style:{width:"50px",height:"50px",borderRadius:50}}),o.jsx("label",{htmlFor:Z,children:(be=Q.answersText)==null?void 0:be[e==null?void 0:e.type]})]},Z)}))]},j)})]})}),o.jsxs("div",{className:"text-center my-5",children:[o.jsxs("div",{className:"mb-1",children:["Viewing:"," ",v+1+"/"+(g==null?void 0:g.quizElements.length)]}),o.jsx("br",{}),v>0&&o.jsx(Vt,{text:!0,className:"mx-2",label:"Previous",onClick:()=>C()}),o.jsx(Vt,{outlined:!0,label:(g==null?void 0:g.quizElements.length)===v+1?"Finish":"Next",onClick:()=>x()})]})]}),o.jsxs("div",{className:"surface-card p-4 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Summary"}),o.jsx("div",{className:"text-500 mb-5",children:`${n==null?void 0:n.name} - ${r}`}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total Questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(O=g==null?void 0:g.quizElements)==null?void 0:O.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Has Maximum Number of questions:"}),o.jsxs("div",{className:"text-900 w-full md:w-9 line-height-3",children:[i==null?void 0:i.noOfAssessmentQuestions," "]})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show Answers Randomly"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:i!=null&&i.randomiseAnswers?o.jsx(vu,{className:"mr-2",severity:"success",value:"True"}):o.jsx(vu,{className:"mr-2",severity:"warning",value:"False"})})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Question time limit"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"0.45 seconds"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Exam time limit:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:"2 mins"})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Show questions randomly:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:o.jsx("div",{className:"grid mt-0 mr-0",children:(k=g==null?void 0:g.quizElements)==null?void 0:k.map((M,j)=>{var P;return o.jsx("div",{className:"col-12 md:col-6",children:o.jsx("div",{className:"p-3 border-1 surface-border border-round surface-card",children:o.jsx("div",{className:"text-700",children:T(((P=M==null?void 0:M.questionText)==null?void 0:P[e==null?void 0:e.type])||"",30)})})},`preview-question-${j}`)})})})]})]})]})]})},pxe=t=>{var x;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,columnIndex:s,section:l,row:c,page:u}=t,d=F.useRef(null),{handleDrop:f}=on(),{isRenderView:h,isAdvanceView:g,isPreview:v}=Wt(),[{isDragging:m},A]=sa({type:Ts,item:{type:Ts,uuid:e==null?void 0:e.uuid,children:e.children,path:n},collect:w=>({isDragging:w.isDragging()})}),T={position:"relative",opacity:m&&!h?.25:1};A(d);const C=(w,I,_,N,O,k,M)=>o.jsx(Yc,{page:u,type:"field",row:c,section:l,field:w,data:w,path:I,pageIndex:_,sectionIndex:N,rowIndex:O,columnIndex:k,fieldIndex:M},`component-${n}-${w==null?void 0:w.uuid}`);return o.jsx("div",{style:g?T:{},className:h?"form-builder-column container-column":"draggable form-builder-column container-column",children:v===!1?o.jsxs("div",{children:[e.children.length>0&&((x=e==null?void 0:e.children)==null?void 0:x.map((w,I)=>{const _=`${n}-${I}`;return o.jsxs(F.Fragment,{children:[o.jsx(kr,{isAdvanceView:g,fieldDropArea:!0,data:{path:_,childrenCount:e.children.length,droppedField:e},onDrop:f}),C(w,_,r,i,a,s,I)]},_)})),e.children.length===0&&o.jsx("p",{className:"text-center",children:"Drag and drop from sidebar items"}),o.jsx(kr,{isAdvanceView:g,dropHereLastField:!0,fieldDropArea:!0,data:{path:`${n}-${e.children.length}`,childrenCount:e.children.length,droppedField:e},onDrop:f,isLast:!0})]}):o.jsx(o.Fragment,{children:e.children.length>0?o.jsx(hxe,{questions:e.children}):o.jsx("p",{className:"text-center",children:"No items to show"})})})},gxe={},mxe=t=>{var v,m,A,S;const{data:e,path:n,pageIndex:r,sectionIndex:i,rowIndex:a,section:s,page:l}=t,c=F.useRef(null),{isRenderView:u}=Wt(),[{isDragging:d},f]=sa({type:To,item:{type:To,uuid:e.uuid,children:e.children,path:n,data:e},collect:T=>({isDragging:T.isDragging()})}),h=d?.25:1;f(c);const g=(T,C,x,w,I,_)=>o.jsx(pxe,{page:l,row:e,section:s,data:T,path:C,pageIndex:x,sectionIndex:w,rowIndex:I,columnIndex:_},`column-${n}-${T.uuid}`);return o.jsx("div",{style:{...gxe,opacity:h,marginTop:`${(v=e==null?void 0:e.margin)==null?void 0:v.top}px`,marginBottom:`${(m=e==null?void 0:e.margin)==null?void 0:m.bottom}px`,marginLeft:`${(A=e==null?void 0:e.margin)==null?void 0:A.left}px`,marginRight:`${(S=e==null?void 0:e.margin)==null?void 0:S.right}px`},className:u?"row container-row":"draggable row container-row",children:o.jsx("div",{className:"form-builder-columns",children:e.children.map((T,C)=>{const x=`${n}-${C}`;return o.jsx(F.Fragment,{children:g(T,x,r,i,a,C)},x)})})})},vxe=t=>{const{data:e,path:n,pageIndex:r,sectionIndex:i,section:a,page:s}=t,{renderType:l,emitSocketData:c,isAdvanceView:u,isPreview:d}=Wt(),[f,h]=F.useState(!1),[g,v]=F.useState(!1),[m,A]=F.useState(null),S=F.useRef(null),[{isDragging:T},C]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:I=>({isDragging:I.isDragging()})}),x=T?.25:1;C(S);const w=(I,_,N,O,k)=>o.jsx(mxe,{page:s,section:a,data:I,path:_,pageIndex:N,sectionIndex:O,rowIndex:k},`row-${n}-${I.uuid}`);return o.jsxs("div",{style:{opacity:x,marginBottom:20},className:u?"draggable row":"",children:[d===!1&&o.jsx(Yh,{saveBuilderElementModalData:m,setSaveBuilderElementModalData:A,saveElementModal:g,setSaveElementModal:v}),f===!0&&o.jsx(Hh,{renderType:l,visibilty:f,setVisibility:h,section:e,pageIndex:r,sectionIndex:i,emitSocketData:c},"section_settings_"+r+i),o.jsx("div",{className:"",children:e.children.map((I,_)=>{const N=`${n}-${_}`;return o.jsx(F.Fragment,{children:w(I,N,r,i,_)},N)})})]})},bxe=t=>{const{data:e,path:n,pageIndex:r}=t,{isRenderView:i}=Wt(),a=F.useRef(null),[{},s]=sa({type:aa,item:{type:aa,uuid:e.uuid,children:e.children,path:n},collect:c=>({isDragging:c.isDragging()})});s(a);const l=(c,u,d,f)=>o.jsx(vxe,{data:c,section:c,path:u,page:e,pageIndex:d,sectionIndex:f},`section_${d}_${f}`);return o.jsx("div",{style:{overflowX:"auto"},className:`${i?"":"draggable page-css p-3 pb-4"}`,"data-image-src":e==null?void 0:e.bgImage,"data-bg-color":`#${e==null?void 0:e.bgColor}`,children:o.jsx("div",{className:"",children:e.children.map((c,u)=>{const d=`${n}-${u}`;return o.jsx(F.Fragment,{children:l(c,d,r,u)},`section-${u}-${c.uuid}`)})})})},yxe=()=>{const{formBuilderFormLayout:t}=on(),e=(n,r,i)=>o.jsx(bxe,{data:n,path:r,pageIndex:i},`page-${n.uuid}`);return o.jsx(o.Fragment,{children:o.jsx("div",{className:"page",children:(t==null?void 0:t.length)&&t.map((n,r)=>{const i=`${r}`;return o.jsx("div",{children:e(n,i,r)},`exam-page-${r}`)})})})},Q5=()=>{const{renderType:t}=Wt();switch(t){case j0:return o.jsx(uCe,{});case z0:return o.jsx(bCe,{});case af:return o.jsx(TCe,{});case Cm:return o.jsx(BCe,{});case xm:return o.jsx(fxe,{});case Jd:return o.jsx(yxe,{})}},Axe=t=>{var l;const{taskSchema:e,taskId:n,endPoints:r}=t,{userTrainingSaveData:i,saveProgressDataHook:a,updateTaskProgressValue:s}=wr();return F.useEffect(()=>{const c=setTimeout(()=>{const u=i==null?void 0:i.filter(d=>(d==null?void 0:d.isSeen)===!0).length;s(u),a(i,n,r==null?void 0:r.submitFormData)},1e3);return()=>clearTimeout(c)},[i]),o.jsx("div",{children:e!==null&&o.jsx(W5,{updateTrainingProgress:()=>{},sections:(l=e==null?void 0:e.layout[0])==null?void 0:l.children})})},wxe=({taskId:t,onStart:e})=>{var S,T,C,x,w,I,_,N,O,k,M,j,P,$,K,ce;const[n,r]=F.useState(qp),[i,a]=F.useState(null),{examComplete:s,assessmentData:l,taskSchema:c,taskData:u,startQuiz:d}=wr();F.useEffect(()=>{var X,ne,he,q,W;if(((X=c==null?void 0:c.formType)==null?void 0:X.key)==="exam"){let Q=[...((q=(he=(ne=c==null?void 0:c.layout[0])==null?void 0:ne.children[0])==null?void 0:he.children[0])==null?void 0:q.children[0].children)||[]];l!=null&&l.randomiseQuestions&&(Q=wm.shuffle(Q).map(Z=>({...Z}))),l!=null&&l.randomiseAnswers&&(Q=Q.map(Z=>({...Z,answerOptions:wm.shuffle(Z==null?void 0:Z.answerOptions)}))),l!=null&&l.enableNoOfAssessmentQuestions&&(Q=Q.slice(0,parseInt(l==null?void 0:l.noOfAssessmentQuestions))),a({assessment_id:1,name:(W=u==null?void 0:u.assessment)==null?void 0:W.assessment_title,label:"assessment_title",quizConfiguration:c==null?void 0:c.quizConfiguration,quizElements:Q})}},[c]);const f=o.jsxs("div",{children:[o.jsx(Vt,{text:!0,label:"Cancel",icon:"pi pi-times",className:"mx-2 p-button-danger",onClick:()=>r(qp)}),o.jsx(Vt,{label:"Start Immediately",onClick:()=>{g(),r(b3)}})]}),h=X=>X.completed?(g(),r(b3),o.jsx(o.Fragment,{})):o.jsxs("span",{className:"text-2xl",children:["Your quiz is about to start in ",X.seconds," seconds"]}),g=()=>{const X={task_id:t,session_id:tt(),start_time:new Date,finish_time:new Date};a(ne=>({...ne,...X})),d(X,a)},v=()=>{r(t7),g()},m=((S=l==null?void 0:l.assesment_user_attempts)==null?void 0:S.length)>0?(T=l==null?void 0:l.assesment_user_attempts)==null?void 0:T.some(X=>(X==null?void 0:X.is_pass)===1):!1;function A(){var H;const X=l==null?void 0:l.assesment_user_attempts[0],ne=l==null?void 0:l.assesment_user_attempts[((H=l==null?void 0:l.assesment_user_attempts)==null?void 0:H.length)-1],he=X==null?void 0:X.start_time,q=ne==null?void 0:ne.finish_time;if(!ne||!he||!q)return"";const W=Bn.utc(he),Z=Bn.utc(q).diff(W,"seconds");return Z<60?Z+" seconds":Math.floor(Z/60)+" minutes"}return o.jsxs(o.Fragment,{children:[n===t7&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"card surface-section flex justify-content-center align-items-center",style:{minHeight:"100vh"},children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-6 col-offset-3",children:o.jsxs("div",{className:"text-center",children:[o.jsx(Ug,{date:Date.now()+15e3,renderer:h}),f]})})})})}),o.jsxs("div",{children:[n===qp&&o.jsx("div",{className:" fadein animation-duration-500 animation-iteration-1 surface-section px-4 py-5 md:px-6 lg:px-8 scroll-height-150",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12 md:col-6 md:col-offset-3 sm:col-12 sm:col-offset-0",children:o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{children:[o.jsx("h3",{children:(C=u==null?void 0:u.assessment)==null?void 0:C.assessment_title}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{children:"Overview"}),o.jsx("div",{dangerouslySetInnerHTML:{__html:c==null?void 0:c.intro}})]}),o.jsxs("div",{className:"surface-card p-4 shadow-2 border-round",children:[o.jsx("div",{className:"font-medium text-3xl text-900 mb-3",children:"Guidance"}),o.jsxs("div",{className:"text-500 mb-5",children:["You have a total of ",l==null?void 0:l.noOfAttempts," ","attempts for the entire Quiz"," "]}),o.jsxs("ul",{className:"list-none p-0 m-0 border-top-1 surface-border",children:[o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Expires on:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:Bn(u==null?void 0:u.task_due_date).format("Do MMM YYYY ")})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap surface-ground",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-medium",children:"Total attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:l==null?void 0:l.noOfAttempts})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Attempts made:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(x=l==null?void 0:l.assesment_user_attempts)==null?void 0:x.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Remaining attempts:"}),o.jsx("div",{className:"text-900 w-full md:w-9 line-height-3",children:(l==null?void 0:l.noOfAttempts)-((w=l==null?void 0:l.assesment_user_attempts)==null?void 0:w.length)})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Number of questions:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:(I=i==null?void 0:i.quizElements)==null?void 0:I.length})]}),o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Exam time:"}),o.jsxs("div",{className:"text-900 w-full md:w-9",children:[" ",l&&((N=(_=l==null?void 0:l.time_limit)==null?void 0:_.type)==null?void 0:N.key)==="PerExam"&&o.jsxs(o.Fragment,{children:[Math.floor((k=(O=l==null?void 0:l.time_limit)==null?void 0:O.time_limit_info)==null?void 0:k.num_of_mins)," ","mins"]}),l&&((j=(M=l==null?void 0:l.time_limit)==null?void 0:M.type)==null?void 0:j.key)==="PerQuestion"&&o.jsx(o.Fragment,{children:(()=>{var q,W,Q;const X=((W=(q=l==null?void 0:l.time_limit)==null?void 0:q.time_limit_info)==null?void 0:W.time_per_question)*((Q=i==null?void 0:i.quizElements)==null?void 0:Q.length),ne=Math.floor(X/60),he=X%60;return o.jsxs(o.Fragment,{children:[ne," min",he>0&&` ${he} sec`]})})()}),l&&(($=(P=l==null?void 0:l.time_limit)==null?void 0:P.type)==null?void 0:$.key)==="NoTimeLimit"&&o.jsx(o.Fragment,{children:"No time limit"})]})]}),((K=l==null?void 0:l.assesment_user_attempts)==null?void 0:K.length)>0&&o.jsxs("li",{className:"flex align-items-center py-3 px-2 flex-wrap",children:[o.jsx("div",{className:"text-500 w-full md:w-3 font-bold",children:"Time taken:"}),o.jsx("div",{className:"text-900 w-full md:w-9",children:A()})]})]})]})]}),o.jsx("div",{className:"my-5",children:(l==null?void 0:l.noOfAttempts)-((ce=l==null?void 0:l.assesment_user_attempts)==null?void 0:ce.length)>0?o.jsx(o.Fragment,{children:o.jsx(Vt,{size:"large",label:m===!0?"Passed":"Start now",disabled:m,className:"p-button-info",onClick:()=>{r(t7),e&&e()}})}):o.jsx(f7,{classes:"text-2xl p-3",value:"No attempts remaining",level:"info"})})]})})})}),n===b3&&i!==null&&o.jsx("div",{className:"fadein animation-duration-500",children:o.jsx(Oj,{session_id:i==null?void 0:i.session_id,setDisplay:r,onOpenQuiz:v,saveNewQuizData:g,quizData:i,taskSchema:c,saveProgress:s,setAssessmentModal:()=>{}})})]})]})},Sxe=t=>{var Y,oe,be,Ce,ve,ye,te,L,le,ie,ue,Ne;const[e,n]=F.useState(!1),{isAdmin:r}=Wt(),i=F.useRef(!1),{taskId:a,endPoints:s,isRenderView:l,showFieldsAfterSubmit:c,messageWhileSubmittingForm:u,enableFormScroll:d,formScrollHeight:f="scroll-height-225",onStart:h,setAssessmentModal:g=()=>{}}=t,{setLayout:v}=on(),{taskProgressValue:m,taskRegisterData:A,task_status:S,assessmentData:T,taskProgressLoading:C,taskSchema:x,taskData:w,updateTaskFormData:I,submitTaskFormData:_,TasksLoading:N,userTaskSubmitFormData:O,TasksHTTPRequest:k,TasksSubmitLoading:M,clearTaskSchema:j,TASK_PUBLISHED:P,saveProgressDataHook:$,taskOptions:K}=wr(),ce=K!=null&&K.successMessage?K==null?void 0:K.successMessage:"Submitted Successfully";F.useEffect(()=>{if(x!==null&&v((x==null?void 0:x.layout)||[]),a){const me={viewed_at:new Date().toISOString()};I(O,a,s==null?void 0:s.updateFormData,v3,()=>{},me)}return()=>{j()}},[a]);const X=(_e="One or more field is required")=>{i.current.show({severity:"error",summary:"Alert",detail:_e,life:3e3})},ne=()=>{Qt.emit("onSubmitUserForm","complete"),Q()},he=()=>{_(O,a,s==null?void 0:s.submitFormData),n(!1)},q=_e=>{I(_e,a,s==null?void 0:s.updateFormData,v3,()=>{var me;(me=i==null?void 0:i.current)==null||me.show({severity:"success",summary:"Progress Saved",detail:"",life:3e3})})};F.useEffect(()=>{const _e=setTimeout(()=>{var me;O!==null&&((x==null?void 0:x.enableAutoSave)===!0||((me=x==null?void 0:x.formType)==null?void 0:me.key)===d7)&&$(O,a,s==null?void 0:s.updateFormData)},2e3);return()=>clearTimeout(_e)},[A,m]);const W=(_e,me,se,we)=>{var Ae,Se;let ke=we;const R={fieldId:_e.uuid};if(se!=null&&se[_e==null?void 0:_e.uuid]){if((me==null?void 0:me.length)>0){e:for(const[,fe]of me.entries())if(((Ae=fe==null?void 0:fe.children)==null?void 0:Ae.length)>0&&(fe==null?void 0:fe.enableConditionalField)===!0){for(const[,ge]of(fe==null?void 0:fe.children.entries())||[])if((Se=ge==null?void 0:ge.attributes)!=null&&Se.required&&(ke=W(ge,ge==null?void 0:ge.options,se,ke),ke===!1))break e}}}else Qt.emit("OnInvalidFieldCatch",R),ke=!1,X();return ke},Q=F.useCallback(()=>{var me,se,we,ke,R,Ae,Se,fe,ge,pe,Be,De,He,it,dt,ft,Lt,ln,Ft,mn,Vn,xt,je,Ye;let _e=!1;e:for(const[st,Jt]of x.layout.entries())if((Jt==null?void 0:Jt.isHidden)===!1)for(const[Xt,Zt]of Jt.children.entries())for(const[,yn]of Zt.children.entries())if(yn!=null&&yn.rowIsRepeatable){const ot=O.findIndex(Ue=>(Ue==null?void 0:Ue.rowId)===yn.uuid);if(ot>=0){if(((me=O[ot].repeatableFieldsData)==null?void 0:me.length)<(yn==null?void 0:yn.minimumEntries)){X(`Need minimun ${yn==null?void 0:yn.minimumEntries} entries`),_e=!1;break e}_e=!0}}else for(const[,ot]of yn.children.entries())for(const[,Ue]of ot.children.entries()){if(Ue.isValid===0&&Ue.isPostField===!0&&(Ue==null?void 0:Ue.componentType)!=="hidden-field"){console.log("field",Ue);const nt={pageIndex:st,fieldId:Ue.uuid,sectionIndex:Xt},Tt=O.findIndex(Bt=>(Bt==null?void 0:Bt.fieldId)===Ue.uuid);if(console.log("userTaskSubmitFormData![foundFieldIndex]?.postData",(se=O[Tt])==null?void 0:se.postData),!(Tt===-1||(we=O[Tt])!=null&&we.postData[0]&&(((R=(ke=O[Tt])==null?void 0:ke.postData[0].postValue)==null?void 0:R.length)>0||((Ae=O[Tt])==null?void 0:Ae.postData[0].postValue)>0||(fe=(Se=O[Tt])==null?void 0:Se.postData[0].postValue)!=null&&fe.name))){console.log("inValidData",nt),Qt.emit("OnInvalidFieldCatch",nt),_e=!1,X();break e}}if((Ue==null?void 0:Ue.componentType)==="radio-hierarchal"){const nt=O.findIndex(Tt=>(Tt==null?void 0:Tt.fieldId)===Ue.uuid);if(nt>=0&&(_e=W(Ue,Ue==null?void 0:Ue.options,(ge=O[nt])==null?void 0:ge.postData[0].postValue,!0),!_e))break e}if(((pe=Ue==null?void 0:Ue.children)==null?void 0:pe.length)>0)for(const[,nt]of Ue.children.entries()){const Tt=Object.keys(nt);if(Tt[0]){const Bt=nt[Tt[0]],Nn={fieldId:Bt.uuid,sectionIndex:Xt},kn=O.findIndex(Qn=>(Qn==null?void 0:Qn.fieldId)===Bt.uuid);if(!((Be=O[kn])!=null&&Be.postData[0]&&(((He=(De=O[kn])==null?void 0:De.postData[0].postValue)==null?void 0:He.length)>0||((it=O[kn])==null?void 0:it.postData[0].postValue)>0||((Lt=(ft=(dt=O[kn])==null?void 0:dt.postData[0])==null?void 0:ft.postValue)==null?void 0:Lt.addressOne)!==""))){Qt.emit("OnInvalidFieldCatch",Nn),_e=!1,X();break e}}}if(Ue!=null&&Ue.inlineConditionalRules&&((Ft=(ln=Ue==null?void 0:Ue.inlineConditionalRules)==null?void 0:ln.rules)==null?void 0:Ft.length)>0){for(const[,nt]of((mn=Ue==null?void 0:Ue.inlineConditionalRules)==null?void 0:mn.rules.entries())||[])for(const[,Tt]of(nt==null?void 0:nt.conditions.entries())||[])for(const[,Bt]of(Tt==null?void 0:Tt.children.entries())||[])if(Bt.isValid===0){const Nn={fieldId:Bt.uuid,sectionIndex:Xt},kn=O.findIndex(Qn=>(Qn==null?void 0:Qn.fieldId)===Bt.uuid);if(kn>=0&&!((Vn=O[kn])!=null&&Vn.postData[0]&&(((je=(xt=O[kn])==null?void 0:xt.postData[0].postValue)==null?void 0:je.length)>0||((Ye=O[kn])==null?void 0:Ye.postData[0].postValue)>0))){Qt.emit("OnInvalidFieldCatch",Nn),_e=!1,X();break e}}}_e=!0}_e&&n(!0)},[O]),Z=()=>o.jsx(o.Fragment,{children:o.jsxs("div",{className:"w-full",children:[o.jsx("p",{children:"Loading form data....."}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-5"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"}),o.jsx(Aa,{className:"mb-2"})]})}),H=()=>o.jsxs("div",{className:"text-right",children:[o.jsx(Vt,{text:!0,label:"No",icon:"pi pi-times",onClick:()=>n(!1),className:"p-button-danger"}),o.jsx(Vt,{label:"Yes",icon:"pi pi-check",onClick:()=>he(),autoFocus:!0})]});return o.jsxs("div",{style:{position:"relative"},children:[e&&o.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"30vw",padding:"20px",backgroundColor:"white",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"8px",zIndex:1e3},children:[o.jsx("p",{className:"text-center",children:u}),H()]}),N||M||k?o.jsx("div",{className:"w-full",children:o.jsx(Z,{})}):o.jsxs(o.Fragment,{children:[(((Y=x==null?void 0:x.formType)==null?void 0:Y.key)===C3||((oe=x==null?void 0:x.formType)==null?void 0:oe.key)==="survey")&&o.jsx(o.Fragment,{children:o.jsxs("div",{className:`px-0 ${l===!1?"builder_container":""}`,children:[o.jsxs("div",{className:"flex justify-content-center mb-2 align-items-center",children:[o.jsx("div",{className:"text-center text-900 text-3xl font-medium",children:w==null?void 0:w.task_title}),o.jsx("div",{className:"ml-4 ",children:S===Yee&&o.jsx(f7,{classes:"",value:"COMPLETED",level:"success"})})]}),c===!1&&S===P?o.jsx(o.Fragment,{children:o.jsx("h3",{className:"text-center mt-5",children:ce})}):o.jsx("div",{className:"grid",children:o.jsxs("div",{className:"col-12",children:[N&&o.jsx(Z,{}),!N&&o.jsxs(o.Fragment,{children:[o.jsx(Xte,{}),o.jsx("div",{className:`${d===!0?f:" "} mt-2 mb-2`,children:o.jsx(xf,{backend:Ef,children:x!==null&&((be=x==null?void 0:x.layout)==null?void 0:be.length)&&o.jsx(Q5,{})})}),o.jsx(A3,{ref:i}),((Ce=x==null?void 0:x.formType)==null?void 0:Ce.key)!==""&&(S===v3||S===null)&&o.jsx("span",{children:Yl.createPortal(o.jsx("div",{style:{zIndex:9999999},className:"card surface-card shadow-1 border-round py-2 render-form-footer",children:o.jsxs("div",{className:" flex justify-content-center",children:[o.jsx(Vt,{text:!0,className:"mr-2 p-button-info",label:"Save progress",onClick:()=>q(O),loading:C,disabled:M}),o.jsx(Vt,{label:"Submit",onClick:()=>ne(),disabled:C,loading:M})]})}),document.body)})]})]})})]})}),((ve=x==null?void 0:x.formType)==null?void 0:ve.key)==="policies"&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx("div",{id:"invoice-content",children:o.jsxs("div",{className:"invoice",children:[o.jsx("div",{className:"invoice-header",children:o.jsx("div",{className:"invoice-company flex align-items-center",children:o.jsxs("h3",{children:[w==null?void 0:w.task_title," "]})})}),o.jsx("div",{className:"scroll-height-300 mt-2 mb-2",children:o.jsx(xf,{backend:Ef,children:x!==null&&((ye=x==null?void 0:x.layout)==null?void 0:ye.length)&&o.jsx(Q5,{})})}),((te=x==null?void 0:x.formType)==null?void 0:te.key)!==""&&(S===1||S===null)&&r===!1&&o.jsx(o.Fragment,{children:o.jsx("div",{className:"flex justify-content-center",children:o.jsx(Vt,{className:"p-button-primary",label:"Accept",onClick:()=>ne(),loading:C})})})]})})})})})}),(((L=x==null?void 0:x.formType)==null?void 0:L.key)==="page"||((le=x==null?void 0:x.formType)==null?void 0:le.key)==="pdf")&&o.jsx("div",{className:"layout-invoice-page",children:o.jsx("div",{className:"grid",children:o.jsx("div",{className:"col-12",children:o.jsx("div",{className:"card",children:o.jsx(xf,{backend:Ef,children:x!==null&&((ie=x==null?void 0:x.layout)==null?void 0:ie.length)&&o.jsx(Q5,{})})})})})}),((ue=x==null?void 0:x.formType)==null?void 0:ue.key)==="training"&&o.jsx(Axe,{renderIn:Ute,taskSchema:x,taskId:a,endPoints:s}),((Ne=x==null?void 0:x.formType)==null?void 0:Ne.key)==="exam"&&o.jsx(wxe,{taskId:a,endPoints:s,onStart:h})]})]})};/**
4292
4292
  * React Router v6.28.0
4293
4293
  *
4294
4294
  * Copyright (c) Remix Software Inc.
@@ -4373,7 +4373,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4373
4373
  stroke: #ffa700;
4374
4374
  }
4375
4375
  }
4376
- `,iTe={spinner:function(e){var n=e.props;return{animationDuration:n.animationDuration}}},e9=Un.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:nTe,styles:rTe,inlineStyles:iTe}}),qj=b.memo(b.forwardRef(function(t,e){var n=Rn(),r=b.useContext(or),i=e9.getProps(t,r),a=b.useRef(null),s=e9.setMetaData({props:i}),l=s.ptm,c=s.cx,u=s.sx,d=s.isUnstyled;ui(e9.css.styles,d,{name:"progressspinner"}),b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return a.current}}});var f=n({id:i.id,ref:a,style:i.style,className:pt(i.className,c("root")),role:"progressbar","aria-busy":!0},e9.getOtherProps(i),l("root")),h=n({className:c("spinner"),viewBox:"25 25 50 50",style:u("spinner")},l("spinner")),g=n({className:c("circle"),cx:"50",cy:"50",r:"20",fill:i.fill,strokeWidth:i.strokeWidth,strokeMiterlimit:"10"},l("circle"));return b.createElement("div",f,b.createElement("svg",h,b.createElement("circle",g)))}));qj.displayName="ProgressSpinner";const aTe=()=>{const{renderType:t,componentList:e,sectionsList:n,exam:r}=Wt(),{userSelectedLanguage:i,formBuilderFormLayout:a}=on(),s=4,l=0,c=1,u=2,d=5,f=()=>{const K=t;let ce=0;return K===Jd?ce=s:K===xm?ce=d:K===Cm||K===Q9||K===af?ce=u:K===j0||K===fp?ce=c:K===z0&&(ce=l),ce},h=F.useRef(),g=r!=null&&r.getPaginatedAssessmentQuestionBankList?r==null?void 0:r.getPaginatedAssessmentQuestionBankList:()=>{},v=r!=null&&r.getPaginatedAssessmentQuestionBankListFromStore?r==null?void 0:r.getPaginatedAssessmentQuestionBankListFromStore:[],m=r!=null&&r.updateQuestionBankStates?r==null?void 0:r.updateQuestionBankStates:()=>{},A=r!=null&&r.assessmentSearchFilterCourseCategoryId?r==null?void 0:r.assessmentSearchFilterCourseCategoryId:null,S=r!=null&&r.assessmentSearchFilterCourseSubjectId?r==null?void 0:r.assessmentSearchFilterCourseSubjectId:null,T=r!=null&&r.AssessmentQuestionBankLoading?r==null?void 0:r.AssessmentQuestionBankLoading:!1,C=r!=null&&r.AssessmentQuestionBankPaginator?r==null?void 0:r.AssessmentQuestionBankPaginator:()=>o.jsx(o.Fragment,{});r!=null&&r.courseCategoryList&&(r==null||r.courseCategoryList);const x=r!=null&&r.getCourseCategoryList?r==null?void 0:r.getCourseCategoryList:()=>{};r!=null&&r.subjectList&&(r==null||r.subjectList);const w=r!=null&&r.getSubjectList?r==null?void 0:r.getSubjectList:()=>{},[I,_]=F.useState([]),[N,O]=F.useState("");F.useEffect(()=>(t===Jd&&(x(),w()),()=>{}),[t]);const k=F.useCallback(()=>{const K=v.map(ce=>{var he;const X=JSON.parse(ce.question_meta_data),ne=JSON.parse(ce.meta_data);return{label:(he=X==null?void 0:X.questionText)==null?void 0:he[i==null?void 0:i.type],icon:"pi pi-fw pi-trash",element:"radio",schema:{uuid:tt(),componentType:"question",questionText:X==null?void 0:X.questionText,questionTextImage:ne==null?void 0:ne.questionImage,answerInputType:X!=null&&X.answerInputType?X==null?void 0:X.answerInputType:"radio",answerOptions:X==null?void 0:X.answerOptions,isHidden:!1,subject_title:ce==null?void 0:ce.subject_title,course_category_title:ce==null?void 0:ce.course_category_title,subject_id:ce==null?void 0:ce.subject_id,course_category_id:ce==null?void 0:ce.course_category_id,created_by_id:null,date_created:ce==null?void 0:ce.created_at},subject_title:ce==null?void 0:ce.subject_title,course_category_title:ce==null?void 0:ce.course_category_title,uuid:tt(),type:nr,componentType:"question"}});_(K)},[v,i==null?void 0:i.type]);F.useEffect(()=>{k()},[]);const M=()=>{h.current&&h.current};F.useEffect(()=>(t===Jd&&g(),()=>{}),[t,A,S]);const j=()=>{m({filter:N,page:1,per_page:10,sort:"created_at|desc"})},[P,$]=F.useState(f());return F.useEffect(()=>{$(f())},[t]),o.jsx(o.Fragment,{children:o.jsxs(as,{activeIndex:P,onTabChange:K=>$(K.index),scrollable:!0,children:[t===z0&&o.jsx(Sr,{header:"Survey",children:xQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===j0||t===fp)&&o.jsx(Sr,{header:"Form",children:SQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===Cm||t===Q9||t===af)&&o.jsx(Sr,{header:"Layout",children:wK.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===z0||t===j0||t===fp)&&o.jsx(Sr,{header:"Layout",children:CQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),t===Jd&&o.jsx(Sr,{header:"Question bank",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-12",children:AK.map((K,ce)=>o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>{const he=Et.cloneDeep(X);return o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:he},X.uuid)},"form_elements_"+ne)})},`new-quiz-${ce}`))}),o.jsx("div",{className:"col-12 ",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(wn,{placeholder:"Keyword",onChange:K=>{O(K.target.value),K.target.value||(m({filter:"",page:1,per_page:10,sort:"created_at|desc"}),g())},onKeyDown:K=>K.key==="Enter"?j():null}),o.jsx(Vt,{icon:"pi pi-search",className:"p-button-info",onClick:()=>j()})]})}),T?o.jsx(qj,{}):o.jsx("div",{className:"scroll-height-500 w-full",children:I.map((K,ce)=>{var X,ne,he,q,W;return o.jsx("div",{onScroll:M,ref:h,className:"col-12 ",children:o.jsx(kd,{tags:[{severity:"success",label:K==null?void 0:K.subject_title},{severity:"info",label:K==null?void 0:K.course_category_title}],showIcon:(W=(q=(he=(ne=(X=a[0])==null?void 0:X.children[0])==null?void 0:ne.children[0])==null?void 0:he.children[0])==null?void 0:q.children)==null?void 0:W.some(Q=>{var Z,H,Y;return((Z=Q==null?void 0:Q.questionText)==null?void 0:Z[i.type])===((Y=(H=K==null?void 0:K.schema)==null?void 0:H.questionText)==null?void 0:Y[i.type])}),data:K},ce)},"question_elements_"+ce)})}),o.jsx(C,{})]})}),t===xm&&o.jsx(Sr,{header:"Training",children:TQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===z0||t===j0||t===fp)&&o.jsxs(Sr,{header:"Custom",children:[o.jsx("h6",{children:"Custom Sections"}),o.jsx("div",{className:"grid",children:(n==null?void 0:n.length)>0&&n.map((K,ce)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:{label:K==null?void 0:K.builder_element_title,element:"reusable_builder_section",schema:K==null?void 0:K.reusable_template_schema,uuid:tt(),type:aa}},K.uuid)},"reusable_elements_"+ce))}),o.jsx("h6",{children:"Custom Matrix"}),o.jsx("div",{className:"grid",children:(e==null?void 0:e.length)>0&&e.map((K,ce)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:{label:K==null?void 0:K.custom_component_title,element:"custom_component",schema:JSON.parse(K==null?void 0:K.custom_component_schema),uuid:tt(),type:nr}},K.uuid)},"custom_component"+ce))})]})]})})};function Uj(t){return t}function sTe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var oTe=800,lTe=16,cTe=Date.now;function uTe(t){var e=0,n=0;return function(){var r=cTe(),i=lTe-(r-n);if(n=r,i>0){if(++e>=oTe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function dTe(t){return function(){return t}}var fTe=z3?function(t,e){return z3(t,"toString",{configurable:!0,enumerable:!1,value:dTe(e),writable:!0})}:Uj,hTe=uTe(fTe),$j=Math.max;function pTe(t,e,n){return e=$j(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=$j(r.length-e,0),s=Array(a);++i<a;)s[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(s),sTe(t,this,l)}}function gTe(t,e){return hTe(pTe(t,e,Uj),t+"")}function mTe(t,e,n){if(!a0(n))return!1;var r=typeof e;return(r=="number"?H3(n)&&LN(e,n.length):r=="string"&&e in n)?o2(n[e],t):!1}function vTe(t){return gTe(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&mTe(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,a)}return e})}var bTe="__lodash_hash_undefined__";function yTe(t){return this.__data__.set(t,bTe),this}function ATe(t){return this.__data__.has(t)}function t9(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new sd;++e<n;)this.add(t[e])}t9.prototype.add=t9.prototype.push=yTe,t9.prototype.has=ATe;function wTe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function STe(t,e){return t.has(e)}var CTe=1,xTe=2;function jj(t,e,n,r,i,a){var s=n&CTe,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var f=-1,h=!0,g=n&xTe?new t9:void 0;for(a.set(t,e),a.set(e,t);++f<l;){var v=t[f],m=e[f];if(r)var A=s?r(m,v,f,e,t,a):r(v,m,f,t,e,a);if(A!==void 0){if(A)continue;h=!1;break}if(g){if(!wTe(e,function(S,T){if(!STe(g,T)&&(v===S||i(v,S,n,r,a)))return g.push(T)})){h=!1;break}}else if(!(v===m||i(v,m,n,r,a))){h=!1;break}}return a.delete(t),a.delete(e),h}function TTe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function ETe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var ITe=1,_Te=2,DTe="[object Boolean]",NTe="[object Date]",OTe="[object Error]",FTe="[object Map]",kTe="[object Number]",PTe="[object RegExp]",MTe="[object Set]",LTe="[object String]",BTe="[object Symbol]",VTe="[object ArrayBuffer]",qTe="[object DataView]",zj=fu?fu.prototype:void 0,US=zj?zj.valueOf:void 0;function UTe(t,e,n,r,i,a,s){switch(n){case qTe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case VTe:return!(t.byteLength!=e.byteLength||!a(new Y3(t),new Y3(e)));case DTe:case NTe:case kTe:return o2(+t,+e);case OTe:return t.name==e.name&&t.message==e.message;case PTe:case LTe:return t==e+"";case FTe:var l=TTe;case MTe:var c=r&ITe;if(l||(l=ETe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=_Te,s.set(t,e);var d=jj(l(t),l(e),r,i,a,s);return s.delete(t),d;case BTe:if(US)return US.call(t)==US.call(e)}return!1}var $Te=1,jTe=Object.prototype,zTe=jTe.hasOwnProperty;function HTe(t,e,n,r,i,a){var s=n&$Te,l=R7(t),c=l.length,u=R7(e),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:zTe.call(e,h)))return!1}var g=a.get(t),v=a.get(e);if(g&&v)return g==e&&v==t;var m=!0;a.set(t,e),a.set(e,t);for(var A=s;++f<c;){h=l[f];var S=t[h],T=e[h];if(r)var C=s?r(T,S,h,e,t,a):r(S,T,h,t,e,a);if(!(C===void 0?S===T||i(S,T,n,r,a):C)){m=!1;break}A||(A=h=="constructor")}if(m&&!A){var x=t.constructor,w=e.constructor;x!=w&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof w=="function"&&w instanceof w)&&(m=!1)}return a.delete(t),a.delete(e),m}var YTe=1,Hj="[object Arguments]",Yj="[object Array]",n9="[object Object]",KTe=Object.prototype,Kj=KTe.hasOwnProperty;function RTe(t,e,n,r,i,a){var s=od(t),l=od(e),c=s?Yj:Nc(t),u=l?Yj:Nc(e);c=c==Hj?n9:c,u=u==Hj?n9:u;var d=c==n9,f=u==n9,h=c==u;if(h&&d2(t)){if(!d2(e))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new pu),s||j7(t)?jj(t,e,n,r,i,a):UTe(t,e,c,n,r,i,a);if(!(n&YTe)){var g=d&&Kj.call(t,"__wrapped__"),v=f&&Kj.call(e,"__wrapped__");if(g||v){var m=g?t.value():t,A=v?e.value():e;return a||(a=new pu),i(m,A,n,r,a)}}return h?(a||(a=new pu),HTe(t,e,n,r,i,a)):!1}function Rj(t,e,n,r,i){return t===e?!0:t==null||e==null||!hu(t)&&!hu(e)?t!==t&&e!==e:RTe(t,e,n,r,Rj,i)}function XTe(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),l=s.length;l--;){var c=s[++i];if(n(a[c],c,a)===!1)break}return e}}var GTe=XTe();function $S(t,e,n){(n!==void 0&&!o2(t[e],n)||n===void 0&&!(e in t))&&V7(t,e,n)}function WTe(t){return hu(t)&&H3(t)}function jS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function QTe(t){return u2(t,h2(t))}function JTe(t,e,n,r,i,a,s){var l=jS(t,n),c=jS(e,n),u=s.get(c);if(u){$S(t,n,u);return}var d=a?a(l,c,n+"",t,e,s):void 0,f=d===void 0;if(f){var h=od(c),g=!h&&d2(c),v=!h&&!g&&j7(c);d=c,h||g||v?od(l)?d=l:WTe(l)?d=Y7(l):g?(f=!1,d=YN(c,!0)):v?(f=!1,d=iO(c,!0)):d=[]:M7(c)||q7(c)?(d=l,q7(l)?d=QTe(l):(!a0(l)||L7(l))&&(d=sO(c))):f=!1}f&&(s.set(c,d),i(d,c,r,a,s),s.delete(c)),$S(t,n,d)}function Xj(t,e,n,r,i){t!==e&&GTe(e,function(a,s){if(i||(i=new pu),a0(a))JTe(t,e,s,n,Xj,r,i);else{var l=r?r(jS(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),$S(t,s,l)}},h2)}function zS(t,e){return Rj(t,e)}var E0=vTe(function(t,e,n){Xj(t,e,n)}),dr=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(dr||{});class Vu{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const i=dr.TYPE&dr.ATTRIBUTE;this.scope=r.scope!=null?r.scope&dr.LEVEL|i:dr.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class Rh extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Gj=class Tx{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const i=this.query(n);if(i==null)throw new Rh(`Unable to create ${n} blot`);const a=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),l=new a(e,s,r);return Tx.blots.set(l.domNode,l),l}find(e,n=!1){return Tx.find(e,n)}query(e,n=dr.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&dr.LEVEL&dr.BLOCK?r=this.types.block:e&dr.LEVEL&dr.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&dr.LEVEL&r.scope&&n&dr.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Rh("Invalid definition");if(r&&n.blotName==="abstract")throw new Rh("Cannot register abstract class");const a=r?n.blotName:i?n.attrName:void 0;return this.types[a]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};Gj.blots=new WeakMap;let Xh=Gj;function Wj(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class ZTe extends Vu{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){Wj(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(Wj(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const Kc=ZTe;function HS(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class eEe extends Vu{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[HS(this.keyName)]=n,!0):!1}remove(e){e.style[HS(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[HS(this.keyName)];return this.canAdd(e,n)?n:""}}const I0=eEe;class tEe{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Xh.find(this.domNode);if(e==null)return;const n=Vu.keys(this.domNode),r=Kc.keys(this.domNode),i=I0.keys(this.domNode);n.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,dr.ATTRIBUTE);s instanceof Vu&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const r9=tEe,Qj=class{constructor(e,n){this.scroll=e,this.domNode=n,Xh.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Rh("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Xh.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,i){const a=this.isolate(e,n);if(this.scroll.query(r,dr.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,dr.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Rh(`Cannot wrap ${e}`);return r.appendChild(this),r}};Qj.blotName="abstract";let Jj=Qj;const Zj=class extends Jj{static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zj.scope=dr.INLINE_BLOT;const yo=Zj;class nEe{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===e)return i;i+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||n&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[i,a]=this.find(e);let s=e-a;const l=this.iterator(i);let c=l();for(;c&&s<e+n;){const u=c.length();e>s?r(c,e-s,Math.min(n,s+u-e)):r(c,0,Math.min(u,e+n-s)),s+=u,c=l()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let i=r();for(;i;)n=e(n,i),i=r();return n}}function ez(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(dr.INLINE);return Array.from(t.childNodes).forEach(i=>{r.domNode.appendChild(i)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const tz=class U0 extends Jj{constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,U0.uiClass&&this.uiNode.classList.add(U0.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new nEe,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=ez(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Rh)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,n=0){const[r,i]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof U0?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(s,l,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof U0&&(i=i.concat(s.descendants(e,l,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===dr.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof U0?n.unwrap():n.remove())})}formatAt(e,n,r,i){this.children.forEachAt(e,n,(a,s,l)=>{a.formatAt(s,l,r,i)})}insertAt(e,n,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),a=[[this,e]];return r instanceof U0?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof U0&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const l=i.split(a,n);l!=null&&r.appendChild(l)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const l=ez(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};tz.uiClass="";const Rc=tz;function rEe(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const Gh=class dp extends Rc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(dp.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new r9(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof dp||(r=r.wrap(dp.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,dr.INLINE);if(r==null)return;r instanceof Vu?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.formats()[r]!=null||this.scroll.query(r,dr.ATTRIBUTE)?this.isolate(e,n).format(r,i):super.formatAt(e,n,r,i)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof dp&&r.prev===this&&rEe(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof dp&&this.attributes.move(r),r}};Gh.allowedChildren=[Gh,yo],Gh.blotName="inline",Gh.scope=dr.INLINE_BLOT,Gh.tagName="SPAN";const YS=Gh,Wh=class Ex extends Rc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(Ex.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new r9(this.domNode)}format(e,n){const r=this.scroll.query(e,dr.BLOCK);r!=null&&(r instanceof Vu?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(Ex.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.scroll.query(r,dr.BLOCK)!=null?this.format(r,i):super.formatAt(e,n,r,i)}insertAt(e,n,r){if(r==null||this.scroll.query(n,dr.INLINE)!=null)super.insertAt(e,n,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(n,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Wh.blotName="block",Wh.scope=dr.BLOCK_BLOT,Wh.tagName="P",Wh.allowedChildren=[YS,Wh,yo];const Hg=Wh,KS=class extends Rc{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,i){super.formatAt(e,n,r,i),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};KS.blotName="container",KS.scope=dr.BLOCK_BLOT;const i9=KS;class iEe extends yo{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,i){e===0&&n===this.length()?this.format(r,i):super.formatAt(e,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Pl=iEe,aEe={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},sEe=100,Qh=class extends Rc{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,aEe),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=dr.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,i){this.update(),super.formatAt(e,n,r,i)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof Rc&&c.children.forEach(s),r.delete(c.domNode),c.optimize(n))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=sEe)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const d=this.find(u.target,!0);d!=null&&(d.domNode===u.target&&(u.type==="childList"?(a(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{const h=this.find(f,!1);a(h,!1),h instanceof Rc&&h.children.forEach(g=>{a(g,!1)})})):u.type==="attributes"&&a(d.prev)),a(d))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),i=l.slice();i.length>0;)e.push(i.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};Qh.blotName="scroll",Qh.defaultChild=Hg,Qh.allowedChildren=[Hg,i9],Qh.scope=dr.BLOCK_BLOT,Qh.tagName="DIV";const RS=Qh,XS=class KY extends yo{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof KY&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};XS.blotName="text",XS.scope=dr.INLINE_BLOT;const a9=XS,nz=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Vu,AttributorStore:r9,BlockBlot:Hg,ClassAttributor:Kc,ContainerBlot:i9,EmbedBlot:Pl,InlineBlot:YS,LeafBlot:yo,ParentBlot:Rc,Registry:Xh,Scope:dr,ScrollBlot:RS,StyleAttributor:I0,TextBlot:a9},Symbol.toStringTag,{value:"Module"}));var GS={exports:{}},Ml=-1,qo=1,Ns=0;function Yg(t,e,n,r,i){if(t===e)return t?[[Ns,t]]:[];if(n!=null){var a=gEe(t,e,n);if(a)return a}var s=WS(t,e),l=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=s9(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var u=oEe(t,e);return l&&u.unshift([Ns,l]),c&&u.push([Ns,c]),QS(u,i),r&&uEe(u),u}function oEe(t,e){var n;if(!t)return[[qo,e]];if(!e)return[[Ml,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(a!==-1)return n=[[qo,r.substring(0,a)],[Ns,i],[qo,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=Ml),n;if(i.length===1)return[[Ml,t],[qo,e]];var s=cEe(t,e);if(s){var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=Yg(l,u),g=Yg(c,d);return h.concat([[Ns,f]],g)}return lEe(t,e)}function lEe(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,f=d%2!==0,h=0,g=0,v=0,m=0,A=0;A<i;A++){for(var S=-A+h;S<=A-g;S+=2){var T=a+S,C;S===-A||S!==A&&l[T-1]<l[T+1]?C=l[T+1]:C=l[T-1]+1;for(var x=C-S;C<n&&x<r&&t.charAt(C)===e.charAt(x);)C++,x++;if(l[T]=C,C>n)g+=2;else if(x>r)h+=2;else if(f){var w=a+d-S;if(w>=0&&w<s&&c[w]!==-1){var I=n-c[w];if(C>=I)return rz(t,e,C,x)}}}for(var _=-A+v;_<=A-m;_+=2){var w=a+_,I;_===-A||_!==A&&c[w-1]<c[w+1]?I=c[w+1]:I=c[w-1]+1;for(var N=I-_;I<n&&N<r&&t.charAt(n-I-1)===e.charAt(r-N-1);)I++,N++;if(c[w]=I,I>n)m+=2;else if(N>r)v+=2;else if(!f){var T=a+d-_;if(T>=0&&T<s&&l[T]!==-1){var C=l[T],x=a+C-T;if(I=n-I,C>=I)return rz(t,e,C,x)}}}}return[[Ml,t],[qo,e]]}function rz(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),l=e.substring(r),c=Yg(i,a),u=Yg(s,l);return c.concat(u)}function WS(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return lz(t.charCodeAt(i-1))&&i--,i}function iz(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var a=0,s=1;;){var l=t.substring(i-s),c=e.indexOf(l);if(c==-1)return a;s+=c,(c==0||t.substring(i-s)==e.substring(0,s))&&(a=s,s++)}}function s9(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return cz(t.charCodeAt(t.length-i))&&i--,i}function cEe(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function i(g,v,m){for(var A=g.substring(m,m+Math.floor(g.length/4)),S=-1,T="",C,x,w,I;(S=v.indexOf(A,S+1))!==-1;){var _=WS(g.substring(m),v.substring(S)),N=s9(g.substring(0,m),v.substring(0,S));T.length<N+_&&(T=v.substring(S-N,S)+v.substring(S,S+_),C=g.substring(0,m-N),x=g.substring(m+_),w=v.substring(0,S-N),I=v.substring(S+_))}return T.length*2>=g.length?[C,x,w,I,T]:null}var a=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var c,u,d,f;t.length>e.length?(c=l[0],u=l[1],d=l[2],f=l[3]):(d=l[0],f=l[1],c=l[2],u=l[3]);var h=l[4];return[c,u,d,f,h]}function uEe(t){for(var e=!1,n=[],r=0,i=null,a=0,s=0,l=0,c=0,u=0;a<t.length;)t[a][0]==Ns?(n[r++]=a,s=c,l=u,c=0,u=0,i=t[a][1]):(t[a][0]==qo?c+=t[a][1].length:u+=t[a][1].length,i&&i.length<=Math.max(s,l)&&i.length<=Math.max(c,u)&&(t.splice(n[r-1],0,[Ml,i]),t[n[r-1]+1][0]=qo,r--,r--,a=r>0?n[r-1]:-1,s=0,l=0,c=0,u=0,i=null,e=!0)),a++;for(e&&QS(t),hEe(t),a=1;a<t.length;){if(t[a-1][0]==Ml&&t[a][0]==qo){var d=t[a-1][1],f=t[a][1],h=iz(d,f),g=iz(f,d);h>=g?(h>=d.length/2||h>=f.length/2)&&(t.splice(a,0,[Ns,f.substring(0,h)]),t[a-1][1]=d.substring(0,d.length-h),t[a+1][1]=f.substring(h),a++):(g>=d.length/2||g>=f.length/2)&&(t.splice(a,0,[Ns,d.substring(0,g)]),t[a-1][0]=qo,t[a-1][1]=f.substring(0,f.length-g),t[a+1][0]=Ml,t[a+1][1]=d.substring(g),a++),a++}a++}}var az=/[^a-zA-Z0-9]/,sz=/\s/,oz=/[\r\n]/,dEe=/\n\r?\n$/,fEe=/^\r?\n\r?\n/;function hEe(t){function e(g,v){if(!g||!v)return 6;var m=g.charAt(g.length-1),A=v.charAt(0),S=m.match(az),T=A.match(az),C=S&&m.match(sz),x=T&&A.match(sz),w=C&&m.match(oz),I=x&&A.match(oz),_=w&&g.match(dEe),N=I&&v.match(fEe);return _||N?5:w||I?4:S&&!C&&x?3:C||x?2:S||T?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==Ns&&t[n+1][0]==Ns){var r=t[n-1][1],i=t[n][1],a=t[n+1][1],s=s9(r,i);if(s){var l=i.substring(i.length-s);r=r.substring(0,r.length-s),i=l+i.substring(0,i.length-s),a=l+a}for(var c=r,u=i,d=a,f=e(r,i)+e(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var h=e(r,i)+e(i,a);h>=f&&(f=h,c=r,u=i,d=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,d?t[n+1][1]=d:(t.splice(n+1,1),n--))}n++}}function QS(t,e){t.push([Ns,""]);for(var n=0,r=0,i=0,a="",s="",l;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case qo:i++,s+=t[n][1],n++;break;case Ml:r++,a+=t[n][1],n++;break;case Ns:var c=n-i-r-1;if(e){if(c>=0&&dz(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),a=u+a,s=u+s,!t[c][1]){t.splice(c,1),n--;var d=c-1;t[d]&&t[d][0]===qo&&(i++,s=t[d][1]+s,d--),t[d]&&t[d][0]===Ml&&(r++,a=t[d][1]+a,d--),c=d}}if(uz(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),a+=u,s+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=WS(s,a),l!==0&&(c>=0?t[c][1]+=s.substring(0,l):(t.splice(0,0,[Ns,s.substring(0,l)]),n++),s=s.substring(l),a=a.substring(l)),l=s9(s,a),l!==0&&(t[n][1]=s.substring(s.length-l)+t[n][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=i+r;a.length===0&&s.length===0?(t.splice(n-f,f),n=n-f):a.length===0?(t.splice(n-f,f,[qo,s]),n=n-f+1):s.length===0?(t.splice(n-f,f,[Ml,a]),n=n-f+1):(t.splice(n-f,f,[Ml,a],[qo,s]),n=n-f+2)}n!==0&&t[n-1][0]===Ns?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",s="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===Ns&&t[n+1][0]===Ns&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&QS(t,e)}function lz(t){return t>=55296&&t<=56319}function cz(t){return t>=56320&&t<=57343}function uz(t){return cz(t.charCodeAt(0))}function dz(t){return lz(t.charCodeAt(t.length-1))}function pEe(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function JS(t,e,n,r){return dz(t)||uz(r)?null:pEe([[Ns,t],[Ml,e],[qo,n],[Ns,r]])}function gEe(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,a=t.length,s=e.length;if(r.length===0&&(i===null||i.length===0)){var l=r.index,c=t.slice(0,l),u=t.slice(l),d=i?i.index:null;e:{var f=l+s-a;if(d!==null&&d!==f||f<0||f>s)break e;var h=e.slice(0,f),g=e.slice(f);if(g!==u)break e;var v=Math.min(l,f),m=c.slice(0,v),A=h.slice(0,v);if(m!==A)break e;var S=c.slice(v),T=h.slice(v);return JS(m,S,T,u)}e:{if(d!==null&&d!==l)break e;var C=l,h=e.slice(0,C),g=e.slice(C);if(h!==c)break e;var x=Math.min(a-C,s-C),w=u.slice(u.length-x),I=g.slice(g.length-x);if(w!==I)break e;var S=u.slice(0,u.length-x),T=g.slice(0,g.length-x);return JS(c,S,T,w)}}if(r.length>0&&i&&i.length===0)e:{var m=t.slice(0,r.index),w=t.slice(r.index+r.length),v=m.length,x=w.length;if(s<v+x)break e;var A=e.slice(0,v),I=e.slice(s-x);if(m!==A||w!==I)break e;var S=t.slice(v,a-x),T=e.slice(v,s-x);return JS(m,S,T,w)}return null}function o9(t,e,n,r){return Yg(t,e,n,r,!0)}o9.INSERT=qo,o9.DELETE=Ml,o9.EQUAL=Ns;var mEe=o9,l9={exports:{}};l9.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",h="[object Map]",g="[object Number]",v="[object Object]",m="[object Promise]",A="[object RegExp]",S="[object Set]",T="[object String]",C="[object Symbol]",x="[object WeakMap]",w="[object ArrayBuffer]",I="[object DataView]",_="[object Float32Array]",N="[object Float64Array]",O="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",j="[object Uint8Array]",P="[object Uint8ClampedArray]",$="[object Uint16Array]",K="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,X=/\w*$/,ne=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,q={};q[a]=q[s]=q[w]=q[I]=q[l]=q[c]=q[_]=q[N]=q[O]=q[k]=q[M]=q[h]=q[g]=q[v]=q[A]=q[S]=q[T]=q[C]=q[j]=q[P]=q[$]=q[K]=!0,q[u]=q[d]=q[x]=!1;var W=typeof ki=="object"&&ki&&ki.Object===Object&&ki,Q=typeof self=="object"&&self&&self.Object===Object&&self,Z=W||Q||Function("return this")(),H=e&&!e.nodeType&&e,Y=H&&!0&&t&&!t.nodeType&&t,oe=Y&&Y.exports===H;function be(re,Le){return re.set(Le[0],Le[1]),re}function Ce(re,Le){return re.add(Le),re}function ve(re,Le){for(var rt=-1,qt=re?re.length:0;++rt<qt&&Le(re[rt],rt,re)!==!1;);return re}function ye(re,Le){for(var rt=-1,qt=Le.length,Er=re.length;++rt<qt;)re[Er+rt]=Le[rt];return re}function te(re,Le,rt,qt){for(var Er=-1,sr=re?re.length:0;++Er<sr;)rt=Le(rt,re[Er],Er,re);return rt}function L(re,Le){for(var rt=-1,qt=Array(re);++rt<re;)qt[rt]=Le(rt);return qt}function le(re,Le){return re==null?void 0:re[Le]}function ie(re){var Le=!1;if(re!=null&&typeof re.toString!="function")try{Le=!!(re+"")}catch{}return Le}function ue(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt,Er){rt[++Le]=[Er,qt]}),rt}function Ne(re,Le){return function(rt){return re(Le(rt))}}function _e(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt){rt[++Le]=qt}),rt}var me=Array.prototype,se=Function.prototype,we=Object.prototype,ke=Z["__core-js_shared__"],R=function(){var re=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return re?"Symbol(src)_1."+re:""}(),Ae=se.toString,Se=we.hasOwnProperty,fe=we.toString,ge=RegExp("^"+Ae.call(Se).replace(ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pe=oe?Z.Buffer:void 0,Be=Z.Symbol,De=Z.Uint8Array,He=Ne(Object.getPrototypeOf,Object),it=Object.create,dt=we.propertyIsEnumerable,ft=me.splice,Lt=Object.getOwnPropertySymbols,ln=pe?pe.isBuffer:void 0,Ft=Ne(Object.keys,Object),mn=Ei(Z,"DataView"),Vn=Ei(Z,"Map"),xt=Ei(Z,"Promise"),je=Ei(Z,"Set"),Ye=Ei(Z,"WeakMap"),st=Ei(Object,"create"),Jt=qr(mn),Xt=qr(Vn),Zt=qr(xt),yn=qr(je),ot=qr(Ye),Ue=Be?Be.prototype:void 0,nt=Ue?Ue.valueOf:void 0;function Tt(re){var Le=-1,rt=re?re.length:0;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Bt(){this.__data__=st?st(null):{}}function Nn(re){return this.has(re)&&delete this.__data__[re]}function kn(re){var Le=this.__data__;if(st){var rt=Le[re];return rt===r?void 0:rt}return Se.call(Le,re)?Le[re]:void 0}function Qn(re){var Le=this.__data__;return st?Le[re]!==void 0:Se.call(Le,re)}function Jn(re,Le){var rt=this.__data__;return rt[re]=st&&Le===void 0?r:Le,this}Tt.prototype.clear=Bt,Tt.prototype.delete=Nn,Tt.prototype.get=kn,Tt.prototype.has=Qn,Tt.prototype.set=Jn;function br(re){var Le=-1,rt=re?re.length:0;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Or(){this.__data__=[]}function Sn(re){var Le=this.__data__,rt=ae(Le,re);if(rt<0)return!1;var qt=Le.length-1;return rt==qt?Le.pop():ft.call(Le,rt,1),!0}function lt(re){var Le=this.__data__,rt=ae(Le,re);return rt<0?void 0:Le[rt][1]}function ut(re){return ae(this.__data__,re)>-1}function yt(re,Le){var rt=this.__data__,qt=ae(rt,re);return qt<0?rt.push([re,Le]):rt[qt][1]=Le,this}br.prototype.clear=Or,br.prototype.delete=Sn,br.prototype.get=lt,br.prototype.has=ut,br.prototype.set=yt;function Nt(re){var Le=-1,rt=re?re.length:0;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Cn(){this.__data__={hash:new Tt,map:new(Vn||br),string:new Tt}}function On(re){return ji(this,re).delete(re)}function _t(re){return ji(this,re).get(re)}function Fe(re){return ji(this,re).has(re)}function Qe(re,Le){return ji(this,re).set(re,Le),this}Nt.prototype.clear=Cn,Nt.prototype.delete=On,Nt.prototype.get=_t,Nt.prototype.has=Fe,Nt.prototype.set=Qe;function At(re){this.__data__=new br(re)}function zt(){this.__data__=new br}function Rt(re){return this.__data__.delete(re)}function nn(re){return this.__data__.get(re)}function xn(re){return this.__data__.has(re)}function Ln(re,Le){var rt=this.__data__;if(rt instanceof br){var qt=rt.__data__;if(!Vn||qt.length<n-1)return qt.push([re,Le]),this;rt=this.__data__=new Nt(qt)}return rt.set(re,Le),this}At.prototype.clear=zt,At.prototype.delete=Rt,At.prototype.get=nn,At.prototype.has=xn,At.prototype.set=Ln;function Hn(re,Le){var rt=It(re)||Ke(re)?L(re.length,String):[],qt=rt.length,Er=!!qt;for(var sr in re)Se.call(re,sr)&&!(Er&&(sr=="length"||zn(sr,qt)))&&rt.push(sr);return rt}function at(re,Le,rt){var qt=re[Le];(!(Se.call(re,Le)&&An(qt,rt))||rt===void 0&&!(Le in re))&&(re[Le]=rt)}function ae(re,Le){for(var rt=re.length;rt--;)if(An(re[rt][0],Le))return rt;return-1}function Me(re,Le){return re&&fi(Le,wo(Le),re)}function We(re,Le,rt,qt,Er,sr,Wr){var Fr;if(qt&&(Fr=sr?qt(re,Er,sr,Wr):qt(re)),Fr!==void 0)return Fr;if(!pa(re))return re;var Tr=It(re);if(Tr){if(Fr=pn(re),!Le)return oi(re,Fr)}else{var Qr=Yi(re),Ii=Qr==d||Qr==f;if(yr(re))return Yn(re,Le);if(Qr==v||Qr==a||Ii&&!sr){if(ie(re))return sr?re:{};if(Fr=$e(Ii?{}:re),!Le)return Mi(re,Me(Fr,re))}else{if(!q[Qr])return sr?re:{};Fr=Kt(re,Qr,We,Le)}}Wr||(Wr=new At);var Qa=Wr.get(re);if(Qa)return Qa;if(Wr.set(re,Fr),!Tr)var Ki=rt?rr(re):wo(re);return ve(Ki||re,function(vi,Ca){Ki&&(Ca=vi,vi=re[Ca]),at(Fr,Ca,We(vi,Le,rt,qt,Ca,re,Wr))}),Fr}function ht(re){return pa(re)?it(re):{}}function Ct(re,Le,rt){var qt=Le(re);return It(re)?qt:ye(qt,rt(re))}function Gt(re){return fe.call(re)}function Dn(re){if(!pa(re)||Pr(re))return!1;var Le=Mr(re)||ie(re)?ge:ne;return Le.test(qr(re))}function Pn(re){if(!Wa(re))return Ft(re);var Le=[];for(var rt in Object(re))Se.call(re,rt)&&rt!="constructor"&&Le.push(rt);return Le}function Yn(re,Le){if(Le)return re.slice();var rt=new re.constructor(re.length);return re.copy(rt),rt}function Lr(re){var Le=new re.constructor(re.byteLength);return new De(Le).set(new De(re)),Le}function Xr(re,Le){var rt=Le?Lr(re.buffer):re.buffer;return new re.constructor(rt,re.byteOffset,re.byteLength)}function $n(re,Le,rt){var qt=Le?rt(ue(re),!0):ue(re);return te(qt,be,new re.constructor)}function Fn(re){var Le=new re.constructor(re.source,X.exec(re));return Le.lastIndex=re.lastIndex,Le}function lr(re,Le,rt){var qt=Le?rt(_e(re),!0):_e(re);return te(qt,Ce,new re.constructor)}function Br(re){return nt?Object(nt.call(re)):{}}function mi(re,Le){var rt=Le?Lr(re.buffer):re.buffer;return new re.constructor(rt,re.byteOffset,re.length)}function oi(re,Le){var rt=-1,qt=re.length;for(Le||(Le=Array(qt));++rt<qt;)Le[rt]=re[rt];return Le}function fi(re,Le,rt,qt){rt||(rt={});for(var Er=-1,sr=Le.length;++Er<sr;){var Wr=Le[Er],Fr=void 0;at(rt,Wr,Fr===void 0?re[Wr]:Fr)}return rt}function Mi(re,Le){return fi(re,Ci(re),Le)}function rr(re){return Ct(re,wo,Ci)}function ji(re,Le){var rt=re.__data__;return zr(Le)?rt[typeof Le=="string"?"string":"hash"]:rt.map}function Ei(re,Le){var rt=le(re,Le);return Dn(rt)?rt:void 0}var Ci=Lt?Ne(Lt,Object):Gr,Yi=Gt;(mn&&Yi(new mn(new ArrayBuffer(1)))!=I||Vn&&Yi(new Vn)!=h||xt&&Yi(xt.resolve())!=m||je&&Yi(new je)!=S||Ye&&Yi(new Ye)!=x)&&(Yi=function(re){var Le=fe.call(re),rt=Le==v?re.constructor:void 0,qt=rt?qr(rt):void 0;if(qt)switch(qt){case Jt:return I;case Xt:return h;case Zt:return m;case yn:return S;case ot:return x}return Le});function pn(re){var Le=re.length,rt=re.constructor(Le);return Le&&typeof re[0]=="string"&&Se.call(re,"index")&&(rt.index=re.index,rt.input=re.input),rt}function $e(re){return typeof re.constructor=="function"&&!Wa(re)?ht(He(re)):{}}function Kt(re,Le,rt,qt){var Er=re.constructor;switch(Le){case w:return Lr(re);case l:case c:return new Er(+re);case I:return Xr(re,qt);case _:case N:case O:case k:case M:case j:case P:case $:case K:return mi(re,qt);case h:return $n(re,qt,rt);case g:case T:return new Er(re);case A:return Fn(re);case S:return lr(re,qt,rt);case C:return Br(re)}}function zn(re,Le){return Le=Le??i,!!Le&&(typeof re=="number"||he.test(re))&&re>-1&&re%1==0&&re<Le}function zr(re){var Le=typeof re;return Le=="string"||Le=="number"||Le=="symbol"||Le=="boolean"?re!=="__proto__":re===null}function Pr(re){return!!R&&R in re}function Wa(re){var Le=re&&re.constructor,rt=typeof Le=="function"&&Le.prototype||we;return re===rt}function qr(re){if(re!=null){try{return Ae.call(re)}catch{}try{return re+""}catch{}}return""}function Os(re){return We(re,!0,!0)}function An(re,Le){return re===Le||re!==re&&Le!==Le}function Ke(re){return er(re)&&Se.call(re,"callee")&&(!dt.call(re,"callee")||fe.call(re)==a)}var It=Array.isArray;function en(re){return re!=null&&ua(re.length)&&!Mr(re)}function er(re){return zs(re)&&en(re)}var yr=ln||hi;function Mr(re){var Le=pa(re)?fe.call(re):"";return Le==d||Le==f}function ua(re){return typeof re=="number"&&re>-1&&re%1==0&&re<=i}function pa(re){var Le=typeof re;return!!re&&(Le=="object"||Le=="function")}function zs(re){return!!re&&typeof re=="object"}function wo(re){return en(re)?Hn(re):Pn(re)}function Gr(){return[]}function hi(){return!1}t.exports=Os}(l9,l9.exports);var fz=l9.exports,c9={exports:{}};c9.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Function]",v="[object GeneratorFunction]",m="[object Map]",A="[object Number]",S="[object Null]",T="[object Object]",C="[object Promise]",x="[object Proxy]",w="[object RegExp]",I="[object Set]",_="[object String]",N="[object Symbol]",O="[object Undefined]",k="[object WeakMap]",M="[object ArrayBuffer]",j="[object DataView]",P="[object Float32Array]",$="[object Float64Array]",K="[object Int8Array]",ce="[object Int16Array]",X="[object Int32Array]",ne="[object Uint8Array]",he="[object Uint8ClampedArray]",q="[object Uint16Array]",W="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,Y={};Y[P]=Y[$]=Y[K]=Y[ce]=Y[X]=Y[ne]=Y[he]=Y[q]=Y[W]=!0,Y[l]=Y[c]=Y[M]=Y[d]=Y[j]=Y[f]=Y[h]=Y[g]=Y[m]=Y[A]=Y[T]=Y[w]=Y[I]=Y[_]=Y[k]=!1;var oe=typeof ki=="object"&&ki&&ki.Object===Object&&ki,be=typeof self=="object"&&self&&self.Object===Object&&self,Ce=oe||be||Function("return this")(),ve=e&&!e.nodeType&&e,ye=ve&&!0&&t&&!t.nodeType&&t,te=ye&&ye.exports===ve,L=te&&oe.process,le=function(){try{return L&&L.binding&&L.binding("util")}catch{}}(),ie=le&&le.isTypedArray;function ue(re,Le){for(var rt=-1,qt=re==null?0:re.length,Er=0,sr=[];++rt<qt;){var Wr=re[rt];Le(Wr,rt,re)&&(sr[Er++]=Wr)}return sr}function Ne(re,Le){for(var rt=-1,qt=Le.length,Er=re.length;++rt<qt;)re[Er+rt]=Le[rt];return re}function _e(re,Le){for(var rt=-1,qt=re==null?0:re.length;++rt<qt;)if(Le(re[rt],rt,re))return!0;return!1}function me(re,Le){for(var rt=-1,qt=Array(re);++rt<re;)qt[rt]=Le(rt);return qt}function se(re){return function(Le){return re(Le)}}function we(re,Le){return re.has(Le)}function ke(re,Le){return re==null?void 0:re[Le]}function R(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt,Er){rt[++Le]=[Er,qt]}),rt}function Ae(re,Le){return function(rt){return re(Le(rt))}}function Se(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt){rt[++Le]=qt}),rt}var fe=Array.prototype,ge=Function.prototype,pe=Object.prototype,Be=Ce["__core-js_shared__"],De=ge.toString,He=pe.hasOwnProperty,it=function(){var re=/[^.]+$/.exec(Be&&Be.keys&&Be.keys.IE_PROTO||"");return re?"Symbol(src)_1."+re:""}(),dt=pe.toString,ft=RegExp("^"+De.call(He).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=te?Ce.Buffer:void 0,ln=Ce.Symbol,Ft=Ce.Uint8Array,mn=pe.propertyIsEnumerable,Vn=fe.splice,xt=ln?ln.toStringTag:void 0,je=Object.getOwnPropertySymbols,Ye=Lt?Lt.isBuffer:void 0,st=Ae(Object.keys,Object),Jt=Ci(Ce,"DataView"),Xt=Ci(Ce,"Map"),Zt=Ci(Ce,"Promise"),yn=Ci(Ce,"Set"),ot=Ci(Ce,"WeakMap"),Ue=Ci(Object,"create"),nt=qr(Jt),Tt=qr(Xt),Bt=qr(Zt),Nn=qr(yn),kn=qr(ot),Qn=ln?ln.prototype:void 0,Jn=Qn?Qn.valueOf:void 0;function br(re){var Le=-1,rt=re==null?0:re.length;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Or(){this.__data__=Ue?Ue(null):{},this.size=0}function Sn(re){var Le=this.has(re)&&delete this.__data__[re];return this.size-=Le?1:0,Le}function lt(re){var Le=this.__data__;if(Ue){var rt=Le[re];return rt===r?void 0:rt}return He.call(Le,re)?Le[re]:void 0}function ut(re){var Le=this.__data__;return Ue?Le[re]!==void 0:He.call(Le,re)}function yt(re,Le){var rt=this.__data__;return this.size+=this.has(re)?0:1,rt[re]=Ue&&Le===void 0?r:Le,this}br.prototype.clear=Or,br.prototype.delete=Sn,br.prototype.get=lt,br.prototype.has=ut,br.prototype.set=yt;function Nt(re){var Le=-1,rt=re==null?0:re.length;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Cn(){this.__data__=[],this.size=0}function On(re){var Le=this.__data__,rt=Yn(Le,re);if(rt<0)return!1;var qt=Le.length-1;return rt==qt?Le.pop():Vn.call(Le,rt,1),--this.size,!0}function _t(re){var Le=this.__data__,rt=Yn(Le,re);return rt<0?void 0:Le[rt][1]}function Fe(re){return Yn(this.__data__,re)>-1}function Qe(re,Le){var rt=this.__data__,qt=Yn(rt,re);return qt<0?(++this.size,rt.push([re,Le])):rt[qt][1]=Le,this}Nt.prototype.clear=Cn,Nt.prototype.delete=On,Nt.prototype.get=_t,Nt.prototype.has=Fe,Nt.prototype.set=Qe;function At(re){var Le=-1,rt=re==null?0:re.length;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function zt(){this.size=0,this.__data__={hash:new br,map:new(Xt||Nt),string:new br}}function Rt(re){var Le=Ei(this,re).delete(re);return this.size-=Le?1:0,Le}function nn(re){return Ei(this,re).get(re)}function xn(re){return Ei(this,re).has(re)}function Ln(re,Le){var rt=Ei(this,re),qt=rt.size;return rt.set(re,Le),this.size+=rt.size==qt?0:1,this}At.prototype.clear=zt,At.prototype.delete=Rt,At.prototype.get=nn,At.prototype.has=xn,At.prototype.set=Ln;function Hn(re){var Le=-1,rt=re==null?0:re.length;for(this.__data__=new At;++Le<rt;)this.add(re[Le])}function at(re){return this.__data__.set(re,r),this}function ae(re){return this.__data__.has(re)}Hn.prototype.add=Hn.prototype.push=at,Hn.prototype.has=ae;function Me(re){var Le=this.__data__=new Nt(re);this.size=Le.size}function We(){this.__data__=new Nt,this.size=0}function ht(re){var Le=this.__data__,rt=Le.delete(re);return this.size=Le.size,rt}function Ct(re){return this.__data__.get(re)}function Gt(re){return this.__data__.has(re)}function Dn(re,Le){var rt=this.__data__;if(rt instanceof Nt){var qt=rt.__data__;if(!Xt||qt.length<n-1)return qt.push([re,Le]),this.size=++rt.size,this;rt=this.__data__=new At(qt)}return rt.set(re,Le),this.size=rt.size,this}Me.prototype.clear=We,Me.prototype.delete=ht,Me.prototype.get=Ct,Me.prototype.has=Gt,Me.prototype.set=Dn;function Pn(re,Le){var rt=Ke(re),qt=!rt&&An(re),Er=!rt&&!qt&&en(re),sr=!rt&&!qt&&!Er&&zs(re),Wr=rt||qt||Er||sr,Fr=Wr?me(re.length,String):[],Tr=Fr.length;for(var Qr in re)He.call(re,Qr)&&!(Wr&&(Qr=="length"||Er&&(Qr=="offset"||Qr=="parent")||sr&&(Qr=="buffer"||Qr=="byteLength"||Qr=="byteOffset")||Kt(Qr,Tr)))&&Fr.push(Qr);return Fr}function Yn(re,Le){for(var rt=re.length;rt--;)if(Os(re[rt][0],Le))return rt;return-1}function Lr(re,Le,rt){var qt=Le(re);return Ke(re)?qt:Ne(qt,rt(re))}function Xr(re){return re==null?re===void 0?O:S:xt&&xt in Object(re)?Yi(re):Wa(re)}function $n(re){return pa(re)&&Xr(re)==l}function Fn(re,Le,rt,qt,Er){return re===Le?!0:re==null||Le==null||!pa(re)&&!pa(Le)?re!==re&&Le!==Le:lr(re,Le,rt,qt,Fn,Er)}function lr(re,Le,rt,qt,Er,sr){var Wr=Ke(re),Fr=Ke(Le),Tr=Wr?c:$e(re),Qr=Fr?c:$e(Le);Tr=Tr==l?T:Tr,Qr=Qr==l?T:Qr;var Ii=Tr==T,Qa=Qr==T,Ki=Tr==Qr;if(Ki&&en(re)){if(!en(Le))return!1;Wr=!0,Ii=!1}if(Ki&&!Ii)return sr||(sr=new Me),Wr||zs(re)?fi(re,Le,rt,qt,Er,sr):Mi(re,Le,Tr,rt,qt,Er,sr);if(!(rt&i)){var vi=Ii&&He.call(re,"__wrapped__"),Ca=Qa&&He.call(Le,"__wrapped__");if(vi||Ca){var os=vi?re.value():re,xa=Ca?Le.value():Le;return sr||(sr=new Me),Er(os,xa,rt,qt,sr)}}return Ki?(sr||(sr=new Me),rr(re,Le,rt,qt,Er,sr)):!1}function Br(re){if(!ua(re)||zr(re))return!1;var Le=yr(re)?ft:Z;return Le.test(qr(re))}function mi(re){return pa(re)&&Mr(re.length)&&!!Y[Xr(re)]}function oi(re){if(!Pr(re))return st(re);var Le=[];for(var rt in Object(re))He.call(re,rt)&&rt!="constructor"&&Le.push(rt);return Le}function fi(re,Le,rt,qt,Er,sr){var Wr=rt&i,Fr=re.length,Tr=Le.length;if(Fr!=Tr&&!(Wr&&Tr>Fr))return!1;var Qr=sr.get(re);if(Qr&&sr.get(Le))return Qr==Le;var Ii=-1,Qa=!0,Ki=rt&a?new Hn:void 0;for(sr.set(re,Le),sr.set(Le,re);++Ii<Fr;){var vi=re[Ii],Ca=Le[Ii];if(qt)var os=Wr?qt(Ca,vi,Ii,Le,re,sr):qt(vi,Ca,Ii,re,Le,sr);if(os!==void 0){if(os)continue;Qa=!1;break}if(Ki){if(!_e(Le,function(xa,zi){if(!we(Ki,zi)&&(vi===xa||Er(vi,xa,rt,qt,sr)))return Ki.push(zi)})){Qa=!1;break}}else if(!(vi===Ca||Er(vi,Ca,rt,qt,sr))){Qa=!1;break}}return sr.delete(re),sr.delete(Le),Qa}function Mi(re,Le,rt,qt,Er,sr,Wr){switch(rt){case j:if(re.byteLength!=Le.byteLength||re.byteOffset!=Le.byteOffset)return!1;re=re.buffer,Le=Le.buffer;case M:return!(re.byteLength!=Le.byteLength||!sr(new Ft(re),new Ft(Le)));case d:case f:case A:return Os(+re,+Le);case h:return re.name==Le.name&&re.message==Le.message;case w:case _:return re==Le+"";case m:var Fr=R;case I:var Tr=qt&i;if(Fr||(Fr=Se),re.size!=Le.size&&!Tr)return!1;var Qr=Wr.get(re);if(Qr)return Qr==Le;qt|=a,Wr.set(re,Le);var Ii=fi(Fr(re),Fr(Le),qt,Er,sr,Wr);return Wr.delete(re),Ii;case N:if(Jn)return Jn.call(re)==Jn.call(Le)}return!1}function rr(re,Le,rt,qt,Er,sr){var Wr=rt&i,Fr=ji(re),Tr=Fr.length,Qr=ji(Le),Ii=Qr.length;if(Tr!=Ii&&!Wr)return!1;for(var Qa=Tr;Qa--;){var Ki=Fr[Qa];if(!(Wr?Ki in Le:He.call(Le,Ki)))return!1}var vi=sr.get(re);if(vi&&sr.get(Le))return vi==Le;var Ca=!0;sr.set(re,Le),sr.set(Le,re);for(var os=Wr;++Qa<Tr;){Ki=Fr[Qa];var xa=re[Ki],zi=Le[Ki];if(qt)var ka=Wr?qt(zi,xa,Ki,Le,re,sr):qt(xa,zi,Ki,re,Le,sr);if(!(ka===void 0?xa===zi||Er(xa,zi,rt,qt,sr):ka)){Ca=!1;break}os||(os=Ki=="constructor")}if(Ca&&!os){var Ha=re.constructor,bi=Le.constructor;Ha!=bi&&"constructor"in re&&"constructor"in Le&&!(typeof Ha=="function"&&Ha instanceof Ha&&typeof bi=="function"&&bi instanceof bi)&&(Ca=!1)}return sr.delete(re),sr.delete(Le),Ca}function ji(re){return Lr(re,wo,pn)}function Ei(re,Le){var rt=re.__data__;return zn(Le)?rt[typeof Le=="string"?"string":"hash"]:rt.map}function Ci(re,Le){var rt=ke(re,Le);return Br(rt)?rt:void 0}function Yi(re){var Le=He.call(re,xt),rt=re[xt];try{re[xt]=void 0;var qt=!0}catch{}var Er=dt.call(re);return qt&&(Le?re[xt]=rt:delete re[xt]),Er}var pn=je?function(re){return re==null?[]:(re=Object(re),ue(je(re),function(Le){return mn.call(re,Le)}))}:Gr,$e=Xr;(Jt&&$e(new Jt(new ArrayBuffer(1)))!=j||Xt&&$e(new Xt)!=m||Zt&&$e(Zt.resolve())!=C||yn&&$e(new yn)!=I||ot&&$e(new ot)!=k)&&($e=function(re){var Le=Xr(re),rt=Le==T?re.constructor:void 0,qt=rt?qr(rt):"";if(qt)switch(qt){case nt:return j;case Tt:return m;case Bt:return C;case Nn:return I;case kn:return k}return Le});function Kt(re,Le){return Le=Le??s,!!Le&&(typeof re=="number"||H.test(re))&&re>-1&&re%1==0&&re<Le}function zn(re){var Le=typeof re;return Le=="string"||Le=="number"||Le=="symbol"||Le=="boolean"?re!=="__proto__":re===null}function zr(re){return!!it&&it in re}function Pr(re){var Le=re&&re.constructor,rt=typeof Le=="function"&&Le.prototype||pe;return re===rt}function Wa(re){return dt.call(re)}function qr(re){if(re!=null){try{return De.call(re)}catch{}try{return re+""}catch{}}return""}function Os(re,Le){return re===Le||re!==re&&Le!==Le}var An=$n(function(){return arguments}())?$n:function(re){return pa(re)&&He.call(re,"callee")&&!mn.call(re,"callee")},Ke=Array.isArray;function It(re){return re!=null&&Mr(re.length)&&!yr(re)}var en=Ye||hi;function er(re,Le){return Fn(re,Le)}function yr(re){if(!ua(re))return!1;var Le=Xr(re);return Le==g||Le==v||Le==u||Le==x}function Mr(re){return typeof re=="number"&&re>-1&&re%1==0&&re<=s}function ua(re){var Le=typeof re;return re!=null&&(Le=="object"||Le=="function")}function pa(re){return re!=null&&typeof re=="object"}var zs=ie?se(ie):mi;function wo(re){return It(re)?Pn(re):oi(re)}function Gr(){return[]}function hi(){return!1}t.exports=er}(c9,c9.exports);var hz=c9.exports,ZS={};Object.defineProperty(ZS,"__esModule",{value:!0});const vEe=fz,bEe=hz;var eC;(function(t){function e(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let c=vEe(s);l||(c=Object.keys(c).reduce((u,d)=>(c[d]!=null&&(u[d]=c[d]),u),{}));for(const u in a)a[u]!==void 0&&s[u]===void 0&&(c[u]=a[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function n(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});const l=Object.keys(a).concat(Object.keys(s)).reduce((c,u)=>(bEe(a[u],s[u])||(c[u]=s[u]===void 0?null:s[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=n;function r(a={},s={}){a=a||{};const l=Object.keys(s).reduce((c,u)=>(s[u]!==a[u]&&a[u]!==void 0&&(c[u]=s[u]),c),{});return Object.keys(a).reduce((c,u)=>(a[u]!==s[u]&&s[u]===void 0&&(c[u]=null),c),l)}t.invert=r;function i(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;const c=Object.keys(s).reduce((u,d)=>(a[d]===void 0&&(u[d]=s[d]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=i})(eC||(eC={})),ZS.default=eC;var u9={};Object.defineProperty(u9,"__esModule",{value:!0});var tC;(function(t){function e(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=e})(tC||(tC={})),u9.default=tC;var nC={};Object.defineProperty(nC,"__esModule",{value:!0});const pz=u9;class yEe{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=pz.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=e:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(r,e):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?pz.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(i)}}else return[]}}nC.default=yEe,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=mEe,r=fz,i=hz,a=ZS;e.AttributeMap=a.default;const s=u9;e.Op=s.default;const l=nC;e.OpIterator=l.default;const c="\0",u=(f,h)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const g=Object.keys(f)[0];if(!g||g!==Object.keys(h)[0])throw new Error(`embed types not matched: ${g} != ${Object.keys(h)[0]}`);return[g,f[g],h[g]]};class d{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,g){this.handlers[h]=g}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const g=this.handlers[h];if(!g)throw new Error(`no handlers for embed type "${h}"`);return g}insert(h,g){const v={};return typeof h=="string"&&h.length===0?this:(v.insert=h,g!=null&&typeof g=="object"&&Object.keys(g).length>0&&(v.attributes=g),this.push(v))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,g){if(typeof h=="number"&&h<=0)return this;const v={retain:h};return g!=null&&typeof g=="object"&&Object.keys(g).length>0&&(v.attributes=g),this.push(v)}push(h){let g=this.ops.length,v=this.ops[g-1];if(h=r(h),typeof v=="object"){if(typeof h.delete=="number"&&typeof v.delete=="number")return this.ops[g-1]={delete:v.delete+h.delete},this;if(typeof v.delete=="number"&&h.insert!=null&&(g-=1,v=this.ops[g-1],typeof v!="object"))return this.ops.unshift(h),this;if(i(h.attributes,v.attributes)){if(typeof h.insert=="string"&&typeof v.insert=="string")return this.ops[g-1]={insert:v.insert+h.insert},typeof h.attributes=="object"&&(this.ops[g-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof v.retain=="number")return this.ops[g-1]={retain:v.retain+h.retain},typeof h.attributes=="object"&&(this.ops[g-1].attributes=h.attributes),this}}return g===this.ops.length?this.ops.push(h):this.ops.splice(g,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const g=[],v=[];return this.forEach(m=>{(h(m)?g:v).push(m)}),[g,v]}reduce(h,g){return this.ops.reduce(h,g)}changeLength(){return this.reduce((h,g)=>g.insert?h+s.default.length(g):g.delete?h-g.delete:h,0)}length(){return this.reduce((h,g)=>h+s.default.length(g),0)}slice(h=0,g=1/0){const v=[],m=new l.default(this.ops);let A=0;for(;A<g&&m.hasNext();){let S;A<h?S=m.next(h-A):(S=m.next(g-A),v.push(S)),A+=s.default.length(S)}return new d(v)}compose(h){const g=new l.default(this.ops),v=new l.default(h.ops),m=[],A=v.peek();if(A!=null&&typeof A.retain=="number"&&A.attributes==null){let T=A.retain;for(;g.peekType()==="insert"&&g.peekLength()<=T;)T-=g.peekLength(),m.push(g.next());A.retain-T>0&&v.next(A.retain-T)}const S=new d(m);for(;g.hasNext()||v.hasNext();)if(v.peekType()==="insert")S.push(v.next());else if(g.peekType()==="delete")S.push(g.next());else{const T=Math.min(g.peekLength(),v.peekLength()),C=g.next(T),x=v.next(T);if(x.retain){const w={};if(typeof C.retain=="number")w.retain=typeof x.retain=="number"?T:x.retain;else if(typeof x.retain=="number")C.retain==null?w.insert=C.insert:w.retain=C.retain;else{const _=C.retain==null?"insert":"retain",[N,O,k]=u(C[_],x.retain),M=d.getHandler(N);w[_]={[N]:M.compose(O,k,_==="retain")}}const I=a.default.compose(C.attributes,x.attributes,typeof C.retain=="number");if(I&&(w.attributes=I),S.push(w),!v.hasNext()&&i(S.ops[S.ops.length-1],w)){const _=new d(g.rest());return S.concat(_).chop()}}else typeof x.delete=="number"&&(typeof C.retain=="number"||typeof C.retain=="object"&&C.retain!==null)&&S.push(x)}return S.chop()}concat(h){const g=new d(this.ops.slice());return h.ops.length>0&&(g.push(h.ops[0]),g.ops=g.ops.concat(h.ops.slice(1))),g}diff(h,g){if(this.ops===h.ops)return new d;const v=[this,h].map(C=>C.map(x=>{if(x.insert!=null)return typeof x.insert=="string"?x.insert:c;const w=C===h?"on":"with";throw new Error("diff() called "+w+" non-document")}).join("")),m=new d,A=n(v[0],v[1],g,!0),S=new l.default(this.ops),T=new l.default(h.ops);return A.forEach(C=>{let x=C[1].length;for(;x>0;){let w=0;switch(C[0]){case n.INSERT:w=Math.min(T.peekLength(),x),m.push(T.next(w));break;case n.DELETE:w=Math.min(x,S.peekLength()),S.next(w),m.delete(w);break;case n.EQUAL:w=Math.min(S.peekLength(),T.peekLength(),x);const I=S.next(w),_=T.next(w);i(I.insert,_.insert)?m.retain(w,a.default.diff(I.attributes,_.attributes)):m.push(_).delete(w);break}x-=w}}),m.chop()}eachLine(h,g=`
4376
+ `,iTe={spinner:function(e){var n=e.props;return{animationDuration:n.animationDuration}}},e9=Un.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:nTe,styles:rTe,inlineStyles:iTe}}),qj=b.memo(b.forwardRef(function(t,e){var n=Rn(),r=b.useContext(or),i=e9.getProps(t,r),a=b.useRef(null),s=e9.setMetaData({props:i}),l=s.ptm,c=s.cx,u=s.sx,d=s.isUnstyled;ui(e9.css.styles,d,{name:"progressspinner"}),b.useImperativeHandle(e,function(){return{props:i,getElement:function(){return a.current}}});var f=n({id:i.id,ref:a,style:i.style,className:pt(i.className,c("root")),role:"progressbar","aria-busy":!0},e9.getOtherProps(i),l("root")),h=n({className:c("spinner"),viewBox:"25 25 50 50",style:u("spinner")},l("spinner")),g=n({className:c("circle"),cx:"50",cy:"50",r:"20",fill:i.fill,strokeWidth:i.strokeWidth,strokeMiterlimit:"10"},l("circle"));return b.createElement("div",f,b.createElement("svg",h,b.createElement("circle",g)))}));qj.displayName="ProgressSpinner";const aTe=()=>{const{renderType:t,componentList:e,sectionsList:n,exam:r}=Wt(),{userSelectedLanguage:i,formBuilderFormLayout:a}=on(),s=4,l=0,c=1,u=2,d=5,f=()=>{const K=t;let ce=0;return K===Jd?ce=s:K===xm?ce=d:K===Cm||K===Q9||K===af?ce=u:K===j0||K===fp?ce=c:K===z0&&(ce=l),ce},h=F.useRef(),g=r!=null&&r.getPaginatedAssessmentQuestionBankList?r==null?void 0:r.getPaginatedAssessmentQuestionBankList:()=>{},v=r!=null&&r.getPaginatedAssessmentQuestionBankListFromStore?r==null?void 0:r.getPaginatedAssessmentQuestionBankListFromStore:[],m=r!=null&&r.updateQuestionBankStates?r==null?void 0:r.updateQuestionBankStates:()=>{},A=r!=null&&r.assessmentSearchFilterCourseCategoryId?r==null?void 0:r.assessmentSearchFilterCourseCategoryId:null,S=r!=null&&r.assessmentSearchFilterCourseSubjectId?r==null?void 0:r.assessmentSearchFilterCourseSubjectId:null,T=r!=null&&r.AssessmentQuestionBankLoading?r==null?void 0:r.AssessmentQuestionBankLoading:!1,C=r!=null&&r.AssessmentQuestionBankPaginator?r==null?void 0:r.AssessmentQuestionBankPaginator:()=>o.jsx(o.Fragment,{});r!=null&&r.courseCategoryList&&(r==null||r.courseCategoryList);const x=r!=null&&r.getCourseCategoryList?r==null?void 0:r.getCourseCategoryList:()=>{};r!=null&&r.subjectList&&(r==null||r.subjectList);const w=r!=null&&r.getSubjectList?r==null?void 0:r.getSubjectList:()=>{},[I,_]=F.useState([]),[N,O]=F.useState("");F.useEffect(()=>(t===Jd&&(x(),w()),()=>{}),[t]);const k=F.useCallback(()=>{const K=v.map(ce=>{var he;const X=JSON.parse(ce.question_meta_data),ne=JSON.parse(ce.meta_data);return{label:(he=X==null?void 0:X.questionText)==null?void 0:he[i==null?void 0:i.type],icon:"pi pi-fw pi-trash",element:"radio",schema:{uuid:tt(),componentType:"question",questionText:X==null?void 0:X.questionText,questionTextImage:ne==null?void 0:ne.questionImage,answerInputType:X!=null&&X.answerInputType?X==null?void 0:X.answerInputType:"radio",answerOptions:X==null?void 0:X.answerOptions,isHidden:!1,subject_title:ce==null?void 0:ce.subject_title,course_category_title:ce==null?void 0:ce.course_category_title,subject_id:ce==null?void 0:ce.subject_id,course_category_id:ce==null?void 0:ce.course_category_id,created_by_id:null,date_created:ce==null?void 0:ce.created_at},subject_title:ce==null?void 0:ce.subject_title,course_category_title:ce==null?void 0:ce.course_category_title,uuid:tt(),type:nr,componentType:"question"}});_(K)},[v,i==null?void 0:i.type]);F.useEffect(()=>{k()},[]);const M=()=>{h.current&&h.current};F.useEffect(()=>(t===Jd&&g(),()=>{}),[t,A,S]);const j=()=>{m({filter:N,page:1,per_page:10,sort:"created_at|desc"})},[P,$]=F.useState(f());return F.useEffect(()=>{$(f())},[t]),o.jsx(o.Fragment,{children:o.jsxs(as,{activeIndex:P,onTabChange:K=>$(K.index),scrollable:!0,children:[t===z0&&o.jsx(Sr,{header:"Survey",children:xQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===j0||t===fp)&&o.jsx(Sr,{header:"Form",children:SQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid scroll-height-300",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"xl:col-6 lg:col-12 md:col-12 sm:col-12",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===Cm||t===Q9||t===af)&&o.jsx(Sr,{header:"Layout",children:wK.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid scroll-height-300",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===z0||t===j0||t===fp)&&o.jsx(Sr,{header:"Layout",children:CQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid scroll-height-300",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),t===Jd&&o.jsx(Sr,{header:"Question bank",children:o.jsxs("div",{className:"grid",children:[o.jsx("div",{className:"col-12",children:AK.map((K,ce)=>o.jsx("div",{className:"grid scroll-height-300",children:K==null?void 0:K.items.map((X,ne)=>{const he=Et.cloneDeep(X);return o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:he},X.uuid)},"form_elements_"+ne)})},`new-quiz-${ce}`))}),o.jsx("div",{className:"col-12 ",children:o.jsxs("div",{className:"p-inputgroup",children:[o.jsx(wn,{placeholder:"Keyword",onChange:K=>{O(K.target.value),K.target.value||(m({filter:"",page:1,per_page:10,sort:"created_at|desc"}),g())},onKeyDown:K=>K.key==="Enter"?j():null}),o.jsx(Vt,{icon:"pi pi-search",className:"p-button-info",onClick:()=>j()})]})}),T?o.jsx(qj,{}):o.jsx("div",{className:"scroll-height-500 w-full",children:I.map((K,ce)=>{var X,ne,he,q,W;return o.jsx("div",{onScroll:M,ref:h,className:"col-12 ",children:o.jsx(kd,{tags:[{severity:"success",label:K==null?void 0:K.subject_title},{severity:"info",label:K==null?void 0:K.course_category_title}],showIcon:(W=(q=(he=(ne=(X=a[0])==null?void 0:X.children[0])==null?void 0:ne.children[0])==null?void 0:he.children[0])==null?void 0:q.children)==null?void 0:W.some(Q=>{var Z,H,Y;return((Z=Q==null?void 0:Q.questionText)==null?void 0:Z[i.type])===((Y=(H=K==null?void 0:K.schema)==null?void 0:H.questionText)==null?void 0:Y[i.type])}),data:K},ce)},"question_elements_"+ce)})}),o.jsx(C,{})]})}),t===xm&&o.jsx(Sr,{header:"Training",children:TQ.map((K,ce)=>o.jsx(di,{header:K==null?void 0:K.label,toggleable:!0,style:{marginBottom:10},children:o.jsx("div",{className:"grid scroll-height-300",children:K==null?void 0:K.items.map((X,ne)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:X},X.uuid)},"form_elements_"+ne))})},`pannel-tab-${ce}`))}),(t===z0||t===j0||t===fp)&&o.jsxs(Sr,{header:"Custom",children:[o.jsx("h6",{children:"Custom Sections"}),o.jsx("div",{className:"grid",children:(n==null?void 0:n.length)>0&&n.map((K,ce)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:{label:K==null?void 0:K.builder_element_title,element:"reusable_builder_section",schema:K==null?void 0:K.reusable_template_schema,uuid:tt(),type:aa}},K.uuid)},"reusable_elements_"+ce))}),o.jsx("h6",{children:"Custom Matrix"}),o.jsx("div",{className:"grid",children:(e==null?void 0:e.length)>0&&e.map((K,ce)=>o.jsx("div",{className:"col-6",children:o.jsx(kd,{data:{label:K==null?void 0:K.custom_component_title,element:"custom_component",schema:JSON.parse(K==null?void 0:K.custom_component_schema),uuid:tt(),type:nr}},K.uuid)},"custom_component"+ce))})]})]})})};function Uj(t){return t}function sTe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var oTe=800,lTe=16,cTe=Date.now;function uTe(t){var e=0,n=0;return function(){var r=cTe(),i=lTe-(r-n);if(n=r,i>0){if(++e>=oTe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function dTe(t){return function(){return t}}var fTe=z3?function(t,e){return z3(t,"toString",{configurable:!0,enumerable:!1,value:dTe(e),writable:!0})}:Uj,hTe=uTe(fTe),$j=Math.max;function pTe(t,e,n){return e=$j(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=$j(r.length-e,0),s=Array(a);++i<a;)s[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(s),sTe(t,this,l)}}function gTe(t,e){return hTe(pTe(t,e,Uj),t+"")}function mTe(t,e,n){if(!a0(n))return!1;var r=typeof e;return(r=="number"?H3(n)&&LN(e,n.length):r=="string"&&e in n)?o2(n[e],t):!1}function vTe(t){return gTe(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&mTe(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,a)}return e})}var bTe="__lodash_hash_undefined__";function yTe(t){return this.__data__.set(t,bTe),this}function ATe(t){return this.__data__.has(t)}function t9(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new sd;++e<n;)this.add(t[e])}t9.prototype.add=t9.prototype.push=yTe,t9.prototype.has=ATe;function wTe(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function STe(t,e){return t.has(e)}var CTe=1,xTe=2;function jj(t,e,n,r,i,a){var s=n&CTe,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var f=-1,h=!0,g=n&xTe?new t9:void 0;for(a.set(t,e),a.set(e,t);++f<l;){var v=t[f],m=e[f];if(r)var A=s?r(m,v,f,e,t,a):r(v,m,f,t,e,a);if(A!==void 0){if(A)continue;h=!1;break}if(g){if(!wTe(e,function(S,T){if(!STe(g,T)&&(v===S||i(v,S,n,r,a)))return g.push(T)})){h=!1;break}}else if(!(v===m||i(v,m,n,r,a))){h=!1;break}}return a.delete(t),a.delete(e),h}function TTe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function ETe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var ITe=1,_Te=2,DTe="[object Boolean]",NTe="[object Date]",OTe="[object Error]",FTe="[object Map]",kTe="[object Number]",PTe="[object RegExp]",MTe="[object Set]",LTe="[object String]",BTe="[object Symbol]",VTe="[object ArrayBuffer]",qTe="[object DataView]",zj=fu?fu.prototype:void 0,US=zj?zj.valueOf:void 0;function UTe(t,e,n,r,i,a,s){switch(n){case qTe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case VTe:return!(t.byteLength!=e.byteLength||!a(new Y3(t),new Y3(e)));case DTe:case NTe:case kTe:return o2(+t,+e);case OTe:return t.name==e.name&&t.message==e.message;case PTe:case LTe:return t==e+"";case FTe:var l=TTe;case MTe:var c=r&ITe;if(l||(l=ETe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=_Te,s.set(t,e);var d=jj(l(t),l(e),r,i,a,s);return s.delete(t),d;case BTe:if(US)return US.call(t)==US.call(e)}return!1}var $Te=1,jTe=Object.prototype,zTe=jTe.hasOwnProperty;function HTe(t,e,n,r,i,a){var s=n&$Te,l=R7(t),c=l.length,u=R7(e),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:zTe.call(e,h)))return!1}var g=a.get(t),v=a.get(e);if(g&&v)return g==e&&v==t;var m=!0;a.set(t,e),a.set(e,t);for(var A=s;++f<c;){h=l[f];var S=t[h],T=e[h];if(r)var C=s?r(T,S,h,e,t,a):r(S,T,h,t,e,a);if(!(C===void 0?S===T||i(S,T,n,r,a):C)){m=!1;break}A||(A=h=="constructor")}if(m&&!A){var x=t.constructor,w=e.constructor;x!=w&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof w=="function"&&w instanceof w)&&(m=!1)}return a.delete(t),a.delete(e),m}var YTe=1,Hj="[object Arguments]",Yj="[object Array]",n9="[object Object]",KTe=Object.prototype,Kj=KTe.hasOwnProperty;function RTe(t,e,n,r,i,a){var s=od(t),l=od(e),c=s?Yj:Nc(t),u=l?Yj:Nc(e);c=c==Hj?n9:c,u=u==Hj?n9:u;var d=c==n9,f=u==n9,h=c==u;if(h&&d2(t)){if(!d2(e))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new pu),s||j7(t)?jj(t,e,n,r,i,a):UTe(t,e,c,n,r,i,a);if(!(n&YTe)){var g=d&&Kj.call(t,"__wrapped__"),v=f&&Kj.call(e,"__wrapped__");if(g||v){var m=g?t.value():t,A=v?e.value():e;return a||(a=new pu),i(m,A,n,r,a)}}return h?(a||(a=new pu),HTe(t,e,n,r,i,a)):!1}function Rj(t,e,n,r,i){return t===e?!0:t==null||e==null||!hu(t)&&!hu(e)?t!==t&&e!==e:RTe(t,e,n,r,Rj,i)}function XTe(t){return function(e,n,r){for(var i=-1,a=Object(e),s=r(e),l=s.length;l--;){var c=s[++i];if(n(a[c],c,a)===!1)break}return e}}var GTe=XTe();function $S(t,e,n){(n!==void 0&&!o2(t[e],n)||n===void 0&&!(e in t))&&V7(t,e,n)}function WTe(t){return hu(t)&&H3(t)}function jS(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function QTe(t){return u2(t,h2(t))}function JTe(t,e,n,r,i,a,s){var l=jS(t,n),c=jS(e,n),u=s.get(c);if(u){$S(t,n,u);return}var d=a?a(l,c,n+"",t,e,s):void 0,f=d===void 0;if(f){var h=od(c),g=!h&&d2(c),v=!h&&!g&&j7(c);d=c,h||g||v?od(l)?d=l:WTe(l)?d=Y7(l):g?(f=!1,d=YN(c,!0)):v?(f=!1,d=iO(c,!0)):d=[]:M7(c)||q7(c)?(d=l,q7(l)?d=QTe(l):(!a0(l)||L7(l))&&(d=sO(c))):f=!1}f&&(s.set(c,d),i(d,c,r,a,s),s.delete(c)),$S(t,n,d)}function Xj(t,e,n,r,i){t!==e&&GTe(e,function(a,s){if(i||(i=new pu),a0(a))JTe(t,e,s,n,Xj,r,i);else{var l=r?r(jS(t,s),a,s+"",t,e,i):void 0;l===void 0&&(l=a),$S(t,s,l)}},h2)}function zS(t,e){return Rj(t,e)}var E0=vTe(function(t,e,n){Xj(t,e,n)}),dr=(t=>(t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY",t))(dr||{});class Vu{constructor(e,n,r={}){this.attrName=e,this.keyName=n;const i=dr.TYPE&dr.ATTRIBUTE;this.scope=r.scope!=null?r.scope&dr.LEVEL|i:dr.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(n=>n.name)}add(e,n){return this.canAdd(e,n)?(e.setAttribute(this.keyName,n),!0):!1}canAdd(e,n){return this.whitelist==null?!0:typeof n=="string"?this.whitelist.indexOf(n.replace(/["']/g,""))>-1:this.whitelist.indexOf(n)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const n=e.getAttribute(this.keyName);return this.canAdd(e,n)&&n?n:""}}class Rh extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Gj=class Tx{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,n=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(n){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,n)}return null}create(e,n,r){const i=this.query(n);if(i==null)throw new Rh(`Unable to create ${n} blot`);const a=i,s=n instanceof Node||n.nodeType===Node.TEXT_NODE?n:a.create(r),l=new a(e,s,r);return Tx.blots.set(l.domNode,l),l}find(e,n=!1){return Tx.find(e,n)}query(e,n=dr.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&dr.LEVEL&dr.BLOCK?r=this.types.block:e&dr.LEVEL&dr.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(i=>(r=this.classes[i],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&n&dr.LEVEL&r.scope&&n&dr.TYPE&r.scope?r:null}register(...e){return e.map(n=>{const r="blotName"in n,i="attrName"in n;if(!r&&!i)throw new Rh("Invalid definition");if(r&&n.blotName==="abstract")throw new Rh("Cannot register abstract class");const a=r?n.blotName:i?n.attrName:void 0;return this.types[a]=n,i?typeof n.keyName=="string"&&(this.attributes[n.keyName]=n):r&&(n.className&&(this.classes[n.className]=n),n.tagName&&(Array.isArray(n.tagName)?n.tagName=n.tagName.map(s=>s.toUpperCase()):n.tagName=n.tagName.toUpperCase(),(Array.isArray(n.tagName)?n.tagName:[n.tagName]).forEach(s=>{(this.tags[s]==null||n.className==null)&&(this.tags[s]=n)}))),n})}};Gj.blots=new WeakMap;let Xh=Gj;function Wj(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(n=>n.indexOf(`${e}-`)===0)}class ZTe extends Vu{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(n=>n.split("-").slice(0,-1).join("-"))}add(e,n){return this.canAdd(e,n)?(this.remove(e),e.classList.add(`${this.keyName}-${n}`),!0):!1}remove(e){Wj(e,this.keyName).forEach(n=>{e.classList.remove(n)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const n=(Wj(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,n)?n:""}}const Kc=ZTe;function HS(t){const e=t.split("-"),n=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+n}class eEe extends Vu{static keys(e){return(e.getAttribute("style")||"").split(";").map(n=>n.split(":")[0].trim())}add(e,n){return this.canAdd(e,n)?(e.style[HS(this.keyName)]=n,!0):!1}remove(e){e.style[HS(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const n=e.style[HS(this.keyName)];return this.canAdd(e,n)?n:""}}const I0=eEe;class tEe{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,n){n?e.add(this.domNode,n)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=Xh.find(this.domNode);if(e==null)return;const n=Vu.keys(this.domNode),r=Kc.keys(this.domNode),i=I0.keys(this.domNode);n.concat(r).concat(i).forEach(a=>{const s=e.scroll.query(a,dr.ATTRIBUTE);s instanceof Vu&&(this.attributes[s.attrName]=s)})}copy(e){Object.keys(this.attributes).forEach(n=>{const r=this.attributes[n].value(this.domNode);e.format(n,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(n=>{this.attributes[n].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,n)=>(e[n]=this.attributes[n].value(this.domNode),e),{})}}const r9=tEe,Qj=class{constructor(e,n){this.scroll=e,this.domNode=n,Xh.blots.set(n,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Rh("Blot definition missing tagName");let n,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?n=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?n=document.createElement(r):n=document.createElement(this.tagName[0])):n=document.createElement(this.tagName),this.className&&n.classList.add(this.className),n}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),Xh.blots.delete(this.domNode)}deleteAt(e,n){this.isolate(e,n).remove()}formatAt(e,n,r,i){const a=this.isolate(e,n);if(this.scroll.query(r,dr.BLOT)!=null&&i)a.wrap(r,i);else if(this.scroll.query(r,dr.ATTRIBUTE)!=null){const s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,i)}}insertAt(e,n,r){const i=r==null?this.scroll.create("text",n):this.scroll.create(n,r),a=this.split(e);this.parent.insertBefore(i,a||void 0)}isolate(e,n){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(n),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,n){return e===0?this:this.next}update(e,n){}wrap(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Rh(`Cannot wrap ${e}`);return r.appendChild(this),r}};Qj.blotName="abstract";let Jj=Qj;const Zj=class extends Jj{static value(e){return!0}index(e,n){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(n,1):-1}position(e,n){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Zj.scope=dr.INLINE_BLOT;const yo=Zj;class nEe{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const n=e.slice(1);this.append(...n)}}at(e){const n=this.iterator();let r=n();for(;r&&e>0;)e-=1,r=n();return r}contains(e){const n=this.iterator();let r=n();for(;r;){if(r===e)return!0;r=n()}return!1}indexOf(e){const n=this.iterator();let r=n(),i=0;for(;r;){if(r===e)return i;i+=1,r=n()}return-1}insertBefore(e,n){e!=null&&(this.remove(e),e.next=n,n!=null?(e.prev=n.prev,n.prev!=null&&(n.prev.next=e),n.prev=e,n===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let n=0,r=this.head;for(;r!=null;){if(r===e)return n;n+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const n=e;return e!=null&&(e=e.next),n}}find(e,n=!1){const r=this.iterator();let i=r();for(;i;){const a=i.length();if(e<a||n&&e===a&&(i.next==null||i.next.length()!==0))return[i,e];e-=a,i=r()}return[null,0]}forEach(e){const n=this.iterator();let r=n();for(;r;)e(r),r=n()}forEachAt(e,n,r){if(n<=0)return;const[i,a]=this.find(e);let s=e-a;const l=this.iterator(i);let c=l();for(;c&&s<e+n;){const u=c.length();e>s?r(c,e-s,Math.min(n,s+u-e)):r(c,0,Math.min(u,e+n-s)),s+=u,c=l()}}map(e){return this.reduce((n,r)=>(n.push(e(r)),n),[])}reduce(e,n){const r=this.iterator();let i=r();for(;i;)n=e(n,i),i=r();return n}}function ez(t,e){const n=e.find(t);if(n)return n;try{return e.create(t)}catch{const r=e.create(dr.INLINE);return Array.from(t.childNodes).forEach(i=>{r.domNode.appendChild(i)}),t.parentNode&&t.parentNode.replaceChild(r.domNode,t),r.attach(),r}}const tz=class U0 extends Jj{constructor(e,n){super(e,n),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,U0.uiClass&&this.uiNode.classList.add(U0.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new nEe,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const n=ez(e,this.scroll);this.insertBefore(n,this.children.head||void 0)}catch(n){if(n instanceof Rh)return;throw n}})}deleteAt(e,n){if(e===0&&n===this.length())return this.remove();this.children.forEachAt(e,n,(r,i,a)=>{r.deleteAt(i,a)})}descendant(e,n=0){const[r,i]=this.children.find(n);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,i]:r instanceof U0?r.descendant(e,i):[null,-1]}descendants(e,n=0,r=Number.MAX_VALUE){let i=[],a=r;return this.children.forEachAt(n,r,(s,l,c)=>{(e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e)&&i.push(s),s instanceof U0&&(i=i.concat(s.descendants(e,l,a))),a-=c}),i}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(n=>{e||this.statics.allowedChildren.some(r=>n instanceof r)||(n.statics.scope===dr.BLOCK_BLOT?(n.next!=null&&this.splitAfter(n),n.prev!=null&&this.splitAfter(n.prev),n.parent.unwrap(),e=!0):n instanceof U0?n.unwrap():n.remove())})}formatAt(e,n,r,i){this.children.forEachAt(e,n,(a,s,l)=>{a.formatAt(s,l,r,i)})}insertAt(e,n,r){const[i,a]=this.children.find(e);if(i)i.insertAt(a,n,r);else{const s=r==null?this.scroll.create("text",n):this.scroll.create(n,r);this.appendChild(s)}}insertBefore(e,n){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,n||null),e.parent=this,n!=null&&(r=n.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,n)=>e+n.length(),0)}moveChildren(e,n){this.children.forEach(r=>{e.insertBefore(r,n)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n)}else this.remove()}path(e,n=!1){const[r,i]=this.children.find(e,n),a=[[this,e]];return r instanceof U0?a.concat(r.path(i,n)):(r!=null&&a.push([r,i]),a)}removeChild(e){this.children.remove(e)}replaceWith(e,n){const r=typeof e=="string"?this.scroll.create(e,n):e;return r instanceof U0&&this.moveChildren(r),super.replaceWith(r)}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(i,a,s)=>{const l=i.split(a,n);l!=null&&r.appendChild(l)}),r}splitAfter(e){const n=this.clone();for(;e.next!=null;)n.appendChild(e.next);return this.parent&&this.parent.insertBefore(n,this.next||void 0),n}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,n){const r=[],i=[];e.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),i.push(...a.removedNodes))}),i.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));const l=ez(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};tz.uiClass="";const Rc=tz;function rEe(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}const Gh=class dp extends Rc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(dp.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new r9(this.domNode)}format(e,n){if(e===this.statics.blotName&&!n)this.children.forEach(r=>{r instanceof dp||(r=r.wrap(dp.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,dr.INLINE);if(r==null)return;r instanceof Vu?this.attributes.attribute(r,n):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n)}}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.formats()[r]!=null||this.scroll.query(r,dr.ATTRIBUTE)?this.isolate(e,n).format(r,i):super.formatAt(e,n,r,i)}optimize(e){super.optimize(e);const n=this.formats();if(Object.keys(n).length===0)return this.unwrap();const r=this.next;r instanceof dp&&r.prev===this&&rEe(n,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,n){const r=super.wrap(e,n);return r instanceof dp&&this.attributes.move(r),r}};Gh.allowedChildren=[Gh,yo],Gh.blotName="inline",Gh.scope=dr.INLINE_BLOT,Gh.tagName="SPAN";const YS=Gh,Wh=class Ex extends Rc{static create(e){return super.create(e)}static formats(e,n){const r=n.query(Ex.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,n){super(e,n),this.attributes=new r9(this.domNode)}format(e,n){const r=this.scroll.query(e,dr.BLOCK);r!=null&&(r instanceof Vu?this.attributes.attribute(r,n):e===this.statics.blotName&&!n?this.replaceWith(Ex.blotName):n&&(e!==this.statics.blotName||this.formats()[e]!==n)&&this.replaceWith(e,n))}formats(){const e=this.attributes.values(),n=this.statics.formats(this.domNode,this.scroll);return n!=null&&(e[this.statics.blotName]=n),e}formatAt(e,n,r,i){this.scroll.query(r,dr.BLOCK)!=null?this.format(r,i):super.formatAt(e,n,r,i)}insertAt(e,n,r){if(r==null||this.scroll.query(n,dr.INLINE)!=null)super.insertAt(e,n,r);else{const i=this.split(e);if(i!=null){const a=this.scroll.create(n,r);i.parent.insertBefore(a,i)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,n){const r=super.replaceWith(e,n);return this.attributes.copy(r),r}update(e,n){super.update(e,n),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Wh.blotName="block",Wh.scope=dr.BLOCK_BLOT,Wh.tagName="P",Wh.allowedChildren=[YS,Wh,yo];const Hg=Wh,KS=class extends Rc{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,n){super.deleteAt(e,n),this.enforceAllowedChildren()}formatAt(e,n,r,i){super.formatAt(e,n,r,i),this.enforceAllowedChildren()}insertAt(e,n,r){super.insertAt(e,n,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};KS.blotName="container",KS.scope=dr.BLOCK_BLOT;const i9=KS;class iEe extends yo{static formats(e,n){}format(e,n){super.formatAt(0,this.length(),e,n)}formatAt(e,n,r,i){e===0&&n===this.length()?this.format(r,i):super.formatAt(e,n,r,i)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Pl=iEe,aEe={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},sEe=100,Qh=class extends Rc{constructor(e,n){super(null,n),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,aEe),this.attach()}create(e,n){return this.registry.create(this,e,n)}find(e,n=!1){const r=this.registry.find(e,n);return r?r.scroll===this?r:n?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,n=dr.ANY){return this.registry.query(e,n)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,n){this.update(),e===0&&n===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,n)}formatAt(e,n,r,i){this.update(),super.formatAt(e,n,r,i)}insertAt(e,n,r){this.update(),super.insertAt(e,n,r)}optimize(e=[],n={}){super.optimize(n);const r=n.mutationsMap||new WeakMap;let i=Array.from(this.observer.takeRecords());for(;i.length>0;)e.push(i.pop());const a=(c,u=!0)=>{c==null||c===this||c.domNode.parentNode!=null&&(r.has(c.domNode)||r.set(c.domNode,[]),u&&a(c.parent))},s=c=>{r.has(c.domNode)&&(c instanceof Rc&&c.children.forEach(s),r.delete(c.domNode),c.optimize(n))};let l=e;for(let c=0;l.length>0;c+=1){if(c>=sEe)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(u=>{const d=this.find(u.target,!0);d!=null&&(d.domNode===u.target&&(u.type==="childList"?(a(this.find(u.previousSibling,!1)),Array.from(u.addedNodes).forEach(f=>{const h=this.find(f,!1);a(h,!1),h instanceof Rc&&h.children.forEach(g=>{a(g,!1)})})):u.type==="attributes"&&a(d.prev)),a(d))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),i=l.slice();i.length>0;)e.push(i.pop())}}update(e,n={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(i=>{const a=this.find(i.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(i),null):(r.set(a.domNode,[i]),a)}).forEach(i=>{i!=null&&i!==this&&r.has(i.domNode)&&i.update(r.get(i.domNode)||[],n)}),n.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),n),this.optimize(e,n)}};Qh.blotName="scroll",Qh.defaultChild=Hg,Qh.allowedChildren=[Hg,i9],Qh.scope=dr.BLOCK_BLOT,Qh.tagName="DIV";const RS=Qh,XS=class KY extends yo{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,n){super(e,n),this.text=this.statics.value(this.domNode)}deleteAt(e,n){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+n)}index(e,n){return this.domNode===e?n:-1}insertAt(e,n,r){r==null?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,n,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof KY&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,n=!1){return[this.domNode,e]}split(e,n=!1){if(!n){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,n){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};XS.blotName="text",XS.scope=dr.INLINE_BLOT;const a9=XS,nz=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Vu,AttributorStore:r9,BlockBlot:Hg,ClassAttributor:Kc,ContainerBlot:i9,EmbedBlot:Pl,InlineBlot:YS,LeafBlot:yo,ParentBlot:Rc,Registry:Xh,Scope:dr,ScrollBlot:RS,StyleAttributor:I0,TextBlot:a9},Symbol.toStringTag,{value:"Module"}));var GS={exports:{}},Ml=-1,qo=1,Ns=0;function Yg(t,e,n,r,i){if(t===e)return t?[[Ns,t]]:[];if(n!=null){var a=gEe(t,e,n);if(a)return a}var s=WS(t,e),l=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=s9(t,e);var c=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var u=oEe(t,e);return l&&u.unshift([Ns,l]),c&&u.push([Ns,c]),QS(u,i),r&&uEe(u),u}function oEe(t,e){var n;if(!t)return[[qo,e]];if(!e)return[[Ml,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(a!==-1)return n=[[qo,r.substring(0,a)],[Ns,i],[qo,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=Ml),n;if(i.length===1)return[[Ml,t],[qo,e]];var s=cEe(t,e);if(s){var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=Yg(l,u),g=Yg(c,d);return h.concat([[Ns,f]],g)}return lEe(t,e)}function lEe(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;u<s;u++)l[u]=-1,c[u]=-1;l[a+1]=0,c[a+1]=0;for(var d=n-r,f=d%2!==0,h=0,g=0,v=0,m=0,A=0;A<i;A++){for(var S=-A+h;S<=A-g;S+=2){var T=a+S,C;S===-A||S!==A&&l[T-1]<l[T+1]?C=l[T+1]:C=l[T-1]+1;for(var x=C-S;C<n&&x<r&&t.charAt(C)===e.charAt(x);)C++,x++;if(l[T]=C,C>n)g+=2;else if(x>r)h+=2;else if(f){var w=a+d-S;if(w>=0&&w<s&&c[w]!==-1){var I=n-c[w];if(C>=I)return rz(t,e,C,x)}}}for(var _=-A+v;_<=A-m;_+=2){var w=a+_,I;_===-A||_!==A&&c[w-1]<c[w+1]?I=c[w+1]:I=c[w-1]+1;for(var N=I-_;I<n&&N<r&&t.charAt(n-I-1)===e.charAt(r-N-1);)I++,N++;if(c[w]=I,I>n)m+=2;else if(N>r)v+=2;else if(!f){var T=a+d-_;if(T>=0&&T<s&&l[T]!==-1){var C=l[T],x=a+C-T;if(I=n-I,C>=I)return rz(t,e,C,x)}}}}return[[Ml,t],[qo,e]]}function rz(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),s=t.substring(n),l=e.substring(r),c=Yg(i,a),u=Yg(s,l);return c.concat(u)}function WS(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(a,i)==e.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return lz(t.charCodeAt(i-1))&&i--,i}function iz(t,e){var n=t.length,r=e.length;if(n==0||r==0)return 0;n>r?t=t.substring(n-r):n<r&&(e=e.substring(0,n));var i=Math.min(n,r);if(t==e)return i;for(var a=0,s=1;;){var l=t.substring(i-s),c=e.indexOf(l);if(c==-1)return a;s+=c,(c==0||t.substring(i-s)==e.substring(0,s))&&(a=s,s++)}}function s9(t,e){if(!t||!e||t.slice(-1)!==e.slice(-1))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;n<i;)t.substring(t.length-i,t.length-a)==e.substring(e.length-i,e.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return cz(t.charCodeAt(t.length-i))&&i--,i}function cEe(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||r.length*2<n.length)return null;function i(g,v,m){for(var A=g.substring(m,m+Math.floor(g.length/4)),S=-1,T="",C,x,w,I;(S=v.indexOf(A,S+1))!==-1;){var _=WS(g.substring(m),v.substring(S)),N=s9(g.substring(0,m),v.substring(0,S));T.length<N+_&&(T=v.substring(S-N,S)+v.substring(S,S+_),C=g.substring(0,m-N),x=g.substring(m+_),w=v.substring(0,S-N),I=v.substring(S+_))}return T.length*2>=g.length?[C,x,w,I,T]:null}var a=i(n,r,Math.ceil(n.length/4)),s=i(n,r,Math.ceil(n.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var c,u,d,f;t.length>e.length?(c=l[0],u=l[1],d=l[2],f=l[3]):(d=l[0],f=l[1],c=l[2],u=l[3]);var h=l[4];return[c,u,d,f,h]}function uEe(t){for(var e=!1,n=[],r=0,i=null,a=0,s=0,l=0,c=0,u=0;a<t.length;)t[a][0]==Ns?(n[r++]=a,s=c,l=u,c=0,u=0,i=t[a][1]):(t[a][0]==qo?c+=t[a][1].length:u+=t[a][1].length,i&&i.length<=Math.max(s,l)&&i.length<=Math.max(c,u)&&(t.splice(n[r-1],0,[Ml,i]),t[n[r-1]+1][0]=qo,r--,r--,a=r>0?n[r-1]:-1,s=0,l=0,c=0,u=0,i=null,e=!0)),a++;for(e&&QS(t),hEe(t),a=1;a<t.length;){if(t[a-1][0]==Ml&&t[a][0]==qo){var d=t[a-1][1],f=t[a][1],h=iz(d,f),g=iz(f,d);h>=g?(h>=d.length/2||h>=f.length/2)&&(t.splice(a,0,[Ns,f.substring(0,h)]),t[a-1][1]=d.substring(0,d.length-h),t[a+1][1]=f.substring(h),a++):(g>=d.length/2||g>=f.length/2)&&(t.splice(a,0,[Ns,d.substring(0,g)]),t[a-1][0]=qo,t[a-1][1]=f.substring(0,f.length-g),t[a+1][0]=Ml,t[a+1][1]=d.substring(g),a++),a++}a++}}var az=/[^a-zA-Z0-9]/,sz=/\s/,oz=/[\r\n]/,dEe=/\n\r?\n$/,fEe=/^\r?\n\r?\n/;function hEe(t){function e(g,v){if(!g||!v)return 6;var m=g.charAt(g.length-1),A=v.charAt(0),S=m.match(az),T=A.match(az),C=S&&m.match(sz),x=T&&A.match(sz),w=C&&m.match(oz),I=x&&A.match(oz),_=w&&g.match(dEe),N=I&&v.match(fEe);return _||N?5:w||I?4:S&&!C&&x?3:C||x?2:S||T?1:0}for(var n=1;n<t.length-1;){if(t[n-1][0]==Ns&&t[n+1][0]==Ns){var r=t[n-1][1],i=t[n][1],a=t[n+1][1],s=s9(r,i);if(s){var l=i.substring(i.length-s);r=r.substring(0,r.length-s),i=l+i.substring(0,i.length-s),a=l+a}for(var c=r,u=i,d=a,f=e(r,i)+e(i,a);i.charAt(0)===a.charAt(0);){r+=i.charAt(0),i=i.substring(1)+a.charAt(0),a=a.substring(1);var h=e(r,i)+e(i,a);h>=f&&(f=h,c=r,u=i,d=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=u,d?t[n+1][1]=d:(t.splice(n+1,1),n--))}n++}}function QS(t,e){t.push([Ns,""]);for(var n=0,r=0,i=0,a="",s="",l;n<t.length;){if(n<t.length-1&&!t[n][1]){t.splice(n,1);continue}switch(t[n][0]){case qo:i++,s+=t[n][1],n++;break;case Ml:r++,a+=t[n][1],n++;break;case Ns:var c=n-i-r-1;if(e){if(c>=0&&dz(t[c][1])){var u=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),a=u+a,s=u+s,!t[c][1]){t.splice(c,1),n--;var d=c-1;t[d]&&t[d][0]===qo&&(i++,s=t[d][1]+s,d--),t[d]&&t[d][0]===Ml&&(r++,a=t[d][1]+a,d--),c=d}}if(uz(t[n][1])){var u=t[n][1].charAt(0);t[n][1]=t[n][1].slice(1),a+=u,s+=u}}if(n<t.length-1&&!t[n][1]){t.splice(n,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=WS(s,a),l!==0&&(c>=0?t[c][1]+=s.substring(0,l):(t.splice(0,0,[Ns,s.substring(0,l)]),n++),s=s.substring(l),a=a.substring(l)),l=s9(s,a),l!==0&&(t[n][1]=s.substring(s.length-l)+t[n][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=i+r;a.length===0&&s.length===0?(t.splice(n-f,f),n=n-f):a.length===0?(t.splice(n-f,f,[qo,s]),n=n-f+1):s.length===0?(t.splice(n-f,f,[Ml,a]),n=n-f+1):(t.splice(n-f,f,[Ml,a],[qo,s]),n=n-f+2)}n!==0&&t[n-1][0]===Ns?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,i=0,r=0,a="",s="";break}}t[t.length-1][1]===""&&t.pop();var h=!1;for(n=1;n<t.length-1;)t[n-1][0]===Ns&&t[n+1][0]===Ns&&(t[n][1].substring(t[n][1].length-t[n-1][1].length)===t[n-1][1]?(t[n][1]=t[n-1][1]+t[n][1].substring(0,t[n][1].length-t[n-1][1].length),t[n+1][1]=t[n-1][1]+t[n+1][1],t.splice(n-1,1),h=!0):t[n][1].substring(0,t[n+1][1].length)==t[n+1][1]&&(t[n-1][1]+=t[n+1][1],t[n][1]=t[n][1].substring(t[n+1][1].length)+t[n+1][1],t.splice(n+1,1),h=!0)),n++;h&&QS(t,e)}function lz(t){return t>=55296&&t<=56319}function cz(t){return t>=56320&&t<=57343}function uz(t){return cz(t.charCodeAt(0))}function dz(t){return lz(t.charCodeAt(t.length-1))}function pEe(t){for(var e=[],n=0;n<t.length;n++)t[n][1].length>0&&e.push(t[n]);return e}function JS(t,e,n,r){return dz(t)||uz(r)?null:pEe([[Ns,t],[Ml,e],[qo,n],[Ns,r]])}function gEe(t,e,n){var r=typeof n=="number"?{index:n,length:0}:n.oldRange,i=typeof n=="number"?null:n.newRange,a=t.length,s=e.length;if(r.length===0&&(i===null||i.length===0)){var l=r.index,c=t.slice(0,l),u=t.slice(l),d=i?i.index:null;e:{var f=l+s-a;if(d!==null&&d!==f||f<0||f>s)break e;var h=e.slice(0,f),g=e.slice(f);if(g!==u)break e;var v=Math.min(l,f),m=c.slice(0,v),A=h.slice(0,v);if(m!==A)break e;var S=c.slice(v),T=h.slice(v);return JS(m,S,T,u)}e:{if(d!==null&&d!==l)break e;var C=l,h=e.slice(0,C),g=e.slice(C);if(h!==c)break e;var x=Math.min(a-C,s-C),w=u.slice(u.length-x),I=g.slice(g.length-x);if(w!==I)break e;var S=u.slice(0,u.length-x),T=g.slice(0,g.length-x);return JS(c,S,T,w)}}if(r.length>0&&i&&i.length===0)e:{var m=t.slice(0,r.index),w=t.slice(r.index+r.length),v=m.length,x=w.length;if(s<v+x)break e;var A=e.slice(0,v),I=e.slice(s-x);if(m!==A||w!==I)break e;var S=t.slice(v,a-x),T=e.slice(v,s-x);return JS(m,S,T,w)}return null}function o9(t,e,n,r){return Yg(t,e,n,r,!0)}o9.INSERT=qo,o9.DELETE=Ml,o9.EQUAL=Ns;var mEe=o9,l9={exports:{}};l9.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",f="[object GeneratorFunction]",h="[object Map]",g="[object Number]",v="[object Object]",m="[object Promise]",A="[object RegExp]",S="[object Set]",T="[object String]",C="[object Symbol]",x="[object WeakMap]",w="[object ArrayBuffer]",I="[object DataView]",_="[object Float32Array]",N="[object Float64Array]",O="[object Int8Array]",k="[object Int16Array]",M="[object Int32Array]",j="[object Uint8Array]",P="[object Uint8ClampedArray]",$="[object Uint16Array]",K="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,X=/\w*$/,ne=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,q={};q[a]=q[s]=q[w]=q[I]=q[l]=q[c]=q[_]=q[N]=q[O]=q[k]=q[M]=q[h]=q[g]=q[v]=q[A]=q[S]=q[T]=q[C]=q[j]=q[P]=q[$]=q[K]=!0,q[u]=q[d]=q[x]=!1;var W=typeof ki=="object"&&ki&&ki.Object===Object&&ki,Q=typeof self=="object"&&self&&self.Object===Object&&self,Z=W||Q||Function("return this")(),H=e&&!e.nodeType&&e,Y=H&&!0&&t&&!t.nodeType&&t,oe=Y&&Y.exports===H;function be(re,Le){return re.set(Le[0],Le[1]),re}function Ce(re,Le){return re.add(Le),re}function ve(re,Le){for(var rt=-1,qt=re?re.length:0;++rt<qt&&Le(re[rt],rt,re)!==!1;);return re}function ye(re,Le){for(var rt=-1,qt=Le.length,Er=re.length;++rt<qt;)re[Er+rt]=Le[rt];return re}function te(re,Le,rt,qt){for(var Er=-1,sr=re?re.length:0;++Er<sr;)rt=Le(rt,re[Er],Er,re);return rt}function L(re,Le){for(var rt=-1,qt=Array(re);++rt<re;)qt[rt]=Le(rt);return qt}function le(re,Le){return re==null?void 0:re[Le]}function ie(re){var Le=!1;if(re!=null&&typeof re.toString!="function")try{Le=!!(re+"")}catch{}return Le}function ue(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt,Er){rt[++Le]=[Er,qt]}),rt}function Ne(re,Le){return function(rt){return re(Le(rt))}}function _e(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt){rt[++Le]=qt}),rt}var me=Array.prototype,se=Function.prototype,we=Object.prototype,ke=Z["__core-js_shared__"],R=function(){var re=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||"");return re?"Symbol(src)_1."+re:""}(),Ae=se.toString,Se=we.hasOwnProperty,fe=we.toString,ge=RegExp("^"+Ae.call(Se).replace(ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pe=oe?Z.Buffer:void 0,Be=Z.Symbol,De=Z.Uint8Array,He=Ne(Object.getPrototypeOf,Object),it=Object.create,dt=we.propertyIsEnumerable,ft=me.splice,Lt=Object.getOwnPropertySymbols,ln=pe?pe.isBuffer:void 0,Ft=Ne(Object.keys,Object),mn=Ei(Z,"DataView"),Vn=Ei(Z,"Map"),xt=Ei(Z,"Promise"),je=Ei(Z,"Set"),Ye=Ei(Z,"WeakMap"),st=Ei(Object,"create"),Jt=qr(mn),Xt=qr(Vn),Zt=qr(xt),yn=qr(je),ot=qr(Ye),Ue=Be?Be.prototype:void 0,nt=Ue?Ue.valueOf:void 0;function Tt(re){var Le=-1,rt=re?re.length:0;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Bt(){this.__data__=st?st(null):{}}function Nn(re){return this.has(re)&&delete this.__data__[re]}function kn(re){var Le=this.__data__;if(st){var rt=Le[re];return rt===r?void 0:rt}return Se.call(Le,re)?Le[re]:void 0}function Qn(re){var Le=this.__data__;return st?Le[re]!==void 0:Se.call(Le,re)}function Jn(re,Le){var rt=this.__data__;return rt[re]=st&&Le===void 0?r:Le,this}Tt.prototype.clear=Bt,Tt.prototype.delete=Nn,Tt.prototype.get=kn,Tt.prototype.has=Qn,Tt.prototype.set=Jn;function br(re){var Le=-1,rt=re?re.length:0;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Or(){this.__data__=[]}function Sn(re){var Le=this.__data__,rt=ae(Le,re);if(rt<0)return!1;var qt=Le.length-1;return rt==qt?Le.pop():ft.call(Le,rt,1),!0}function lt(re){var Le=this.__data__,rt=ae(Le,re);return rt<0?void 0:Le[rt][1]}function ut(re){return ae(this.__data__,re)>-1}function yt(re,Le){var rt=this.__data__,qt=ae(rt,re);return qt<0?rt.push([re,Le]):rt[qt][1]=Le,this}br.prototype.clear=Or,br.prototype.delete=Sn,br.prototype.get=lt,br.prototype.has=ut,br.prototype.set=yt;function Nt(re){var Le=-1,rt=re?re.length:0;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Cn(){this.__data__={hash:new Tt,map:new(Vn||br),string:new Tt}}function On(re){return ji(this,re).delete(re)}function _t(re){return ji(this,re).get(re)}function Fe(re){return ji(this,re).has(re)}function Qe(re,Le){return ji(this,re).set(re,Le),this}Nt.prototype.clear=Cn,Nt.prototype.delete=On,Nt.prototype.get=_t,Nt.prototype.has=Fe,Nt.prototype.set=Qe;function At(re){this.__data__=new br(re)}function zt(){this.__data__=new br}function Rt(re){return this.__data__.delete(re)}function nn(re){return this.__data__.get(re)}function xn(re){return this.__data__.has(re)}function Ln(re,Le){var rt=this.__data__;if(rt instanceof br){var qt=rt.__data__;if(!Vn||qt.length<n-1)return qt.push([re,Le]),this;rt=this.__data__=new Nt(qt)}return rt.set(re,Le),this}At.prototype.clear=zt,At.prototype.delete=Rt,At.prototype.get=nn,At.prototype.has=xn,At.prototype.set=Ln;function Hn(re,Le){var rt=It(re)||Ke(re)?L(re.length,String):[],qt=rt.length,Er=!!qt;for(var sr in re)Se.call(re,sr)&&!(Er&&(sr=="length"||zn(sr,qt)))&&rt.push(sr);return rt}function at(re,Le,rt){var qt=re[Le];(!(Se.call(re,Le)&&An(qt,rt))||rt===void 0&&!(Le in re))&&(re[Le]=rt)}function ae(re,Le){for(var rt=re.length;rt--;)if(An(re[rt][0],Le))return rt;return-1}function Me(re,Le){return re&&fi(Le,wo(Le),re)}function We(re,Le,rt,qt,Er,sr,Wr){var Fr;if(qt&&(Fr=sr?qt(re,Er,sr,Wr):qt(re)),Fr!==void 0)return Fr;if(!pa(re))return re;var Tr=It(re);if(Tr){if(Fr=pn(re),!Le)return oi(re,Fr)}else{var Qr=Yi(re),Ii=Qr==d||Qr==f;if(yr(re))return Yn(re,Le);if(Qr==v||Qr==a||Ii&&!sr){if(ie(re))return sr?re:{};if(Fr=$e(Ii?{}:re),!Le)return Mi(re,Me(Fr,re))}else{if(!q[Qr])return sr?re:{};Fr=Kt(re,Qr,We,Le)}}Wr||(Wr=new At);var Qa=Wr.get(re);if(Qa)return Qa;if(Wr.set(re,Fr),!Tr)var Ki=rt?rr(re):wo(re);return ve(Ki||re,function(vi,Ca){Ki&&(Ca=vi,vi=re[Ca]),at(Fr,Ca,We(vi,Le,rt,qt,Ca,re,Wr))}),Fr}function ht(re){return pa(re)?it(re):{}}function Ct(re,Le,rt){var qt=Le(re);return It(re)?qt:ye(qt,rt(re))}function Gt(re){return fe.call(re)}function Dn(re){if(!pa(re)||Pr(re))return!1;var Le=Mr(re)||ie(re)?ge:ne;return Le.test(qr(re))}function Pn(re){if(!Wa(re))return Ft(re);var Le=[];for(var rt in Object(re))Se.call(re,rt)&&rt!="constructor"&&Le.push(rt);return Le}function Yn(re,Le){if(Le)return re.slice();var rt=new re.constructor(re.length);return re.copy(rt),rt}function Lr(re){var Le=new re.constructor(re.byteLength);return new De(Le).set(new De(re)),Le}function Xr(re,Le){var rt=Le?Lr(re.buffer):re.buffer;return new re.constructor(rt,re.byteOffset,re.byteLength)}function $n(re,Le,rt){var qt=Le?rt(ue(re),!0):ue(re);return te(qt,be,new re.constructor)}function Fn(re){var Le=new re.constructor(re.source,X.exec(re));return Le.lastIndex=re.lastIndex,Le}function lr(re,Le,rt){var qt=Le?rt(_e(re),!0):_e(re);return te(qt,Ce,new re.constructor)}function Br(re){return nt?Object(nt.call(re)):{}}function mi(re,Le){var rt=Le?Lr(re.buffer):re.buffer;return new re.constructor(rt,re.byteOffset,re.length)}function oi(re,Le){var rt=-1,qt=re.length;for(Le||(Le=Array(qt));++rt<qt;)Le[rt]=re[rt];return Le}function fi(re,Le,rt,qt){rt||(rt={});for(var Er=-1,sr=Le.length;++Er<sr;){var Wr=Le[Er],Fr=void 0;at(rt,Wr,Fr===void 0?re[Wr]:Fr)}return rt}function Mi(re,Le){return fi(re,Ci(re),Le)}function rr(re){return Ct(re,wo,Ci)}function ji(re,Le){var rt=re.__data__;return zr(Le)?rt[typeof Le=="string"?"string":"hash"]:rt.map}function Ei(re,Le){var rt=le(re,Le);return Dn(rt)?rt:void 0}var Ci=Lt?Ne(Lt,Object):Gr,Yi=Gt;(mn&&Yi(new mn(new ArrayBuffer(1)))!=I||Vn&&Yi(new Vn)!=h||xt&&Yi(xt.resolve())!=m||je&&Yi(new je)!=S||Ye&&Yi(new Ye)!=x)&&(Yi=function(re){var Le=fe.call(re),rt=Le==v?re.constructor:void 0,qt=rt?qr(rt):void 0;if(qt)switch(qt){case Jt:return I;case Xt:return h;case Zt:return m;case yn:return S;case ot:return x}return Le});function pn(re){var Le=re.length,rt=re.constructor(Le);return Le&&typeof re[0]=="string"&&Se.call(re,"index")&&(rt.index=re.index,rt.input=re.input),rt}function $e(re){return typeof re.constructor=="function"&&!Wa(re)?ht(He(re)):{}}function Kt(re,Le,rt,qt){var Er=re.constructor;switch(Le){case w:return Lr(re);case l:case c:return new Er(+re);case I:return Xr(re,qt);case _:case N:case O:case k:case M:case j:case P:case $:case K:return mi(re,qt);case h:return $n(re,qt,rt);case g:case T:return new Er(re);case A:return Fn(re);case S:return lr(re,qt,rt);case C:return Br(re)}}function zn(re,Le){return Le=Le??i,!!Le&&(typeof re=="number"||he.test(re))&&re>-1&&re%1==0&&re<Le}function zr(re){var Le=typeof re;return Le=="string"||Le=="number"||Le=="symbol"||Le=="boolean"?re!=="__proto__":re===null}function Pr(re){return!!R&&R in re}function Wa(re){var Le=re&&re.constructor,rt=typeof Le=="function"&&Le.prototype||we;return re===rt}function qr(re){if(re!=null){try{return Ae.call(re)}catch{}try{return re+""}catch{}}return""}function Os(re){return We(re,!0,!0)}function An(re,Le){return re===Le||re!==re&&Le!==Le}function Ke(re){return er(re)&&Se.call(re,"callee")&&(!dt.call(re,"callee")||fe.call(re)==a)}var It=Array.isArray;function en(re){return re!=null&&ua(re.length)&&!Mr(re)}function er(re){return zs(re)&&en(re)}var yr=ln||hi;function Mr(re){var Le=pa(re)?fe.call(re):"";return Le==d||Le==f}function ua(re){return typeof re=="number"&&re>-1&&re%1==0&&re<=i}function pa(re){var Le=typeof re;return!!re&&(Le=="object"||Le=="function")}function zs(re){return!!re&&typeof re=="object"}function wo(re){return en(re)?Hn(re):Pn(re)}function Gr(){return[]}function hi(){return!1}t.exports=Os}(l9,l9.exports);var fz=l9.exports,c9={exports:{}};c9.exports,function(t,e){var n=200,r="__lodash_hash_undefined__",i=1,a=2,s=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",f="[object Date]",h="[object Error]",g="[object Function]",v="[object GeneratorFunction]",m="[object Map]",A="[object Number]",S="[object Null]",T="[object Object]",C="[object Promise]",x="[object Proxy]",w="[object RegExp]",I="[object Set]",_="[object String]",N="[object Symbol]",O="[object Undefined]",k="[object WeakMap]",M="[object ArrayBuffer]",j="[object DataView]",P="[object Float32Array]",$="[object Float64Array]",K="[object Int8Array]",ce="[object Int16Array]",X="[object Int32Array]",ne="[object Uint8Array]",he="[object Uint8ClampedArray]",q="[object Uint16Array]",W="[object Uint32Array]",Q=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,Y={};Y[P]=Y[$]=Y[K]=Y[ce]=Y[X]=Y[ne]=Y[he]=Y[q]=Y[W]=!0,Y[l]=Y[c]=Y[M]=Y[d]=Y[j]=Y[f]=Y[h]=Y[g]=Y[m]=Y[A]=Y[T]=Y[w]=Y[I]=Y[_]=Y[k]=!1;var oe=typeof ki=="object"&&ki&&ki.Object===Object&&ki,be=typeof self=="object"&&self&&self.Object===Object&&self,Ce=oe||be||Function("return this")(),ve=e&&!e.nodeType&&e,ye=ve&&!0&&t&&!t.nodeType&&t,te=ye&&ye.exports===ve,L=te&&oe.process,le=function(){try{return L&&L.binding&&L.binding("util")}catch{}}(),ie=le&&le.isTypedArray;function ue(re,Le){for(var rt=-1,qt=re==null?0:re.length,Er=0,sr=[];++rt<qt;){var Wr=re[rt];Le(Wr,rt,re)&&(sr[Er++]=Wr)}return sr}function Ne(re,Le){for(var rt=-1,qt=Le.length,Er=re.length;++rt<qt;)re[Er+rt]=Le[rt];return re}function _e(re,Le){for(var rt=-1,qt=re==null?0:re.length;++rt<qt;)if(Le(re[rt],rt,re))return!0;return!1}function me(re,Le){for(var rt=-1,qt=Array(re);++rt<re;)qt[rt]=Le(rt);return qt}function se(re){return function(Le){return re(Le)}}function we(re,Le){return re.has(Le)}function ke(re,Le){return re==null?void 0:re[Le]}function R(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt,Er){rt[++Le]=[Er,qt]}),rt}function Ae(re,Le){return function(rt){return re(Le(rt))}}function Se(re){var Le=-1,rt=Array(re.size);return re.forEach(function(qt){rt[++Le]=qt}),rt}var fe=Array.prototype,ge=Function.prototype,pe=Object.prototype,Be=Ce["__core-js_shared__"],De=ge.toString,He=pe.hasOwnProperty,it=function(){var re=/[^.]+$/.exec(Be&&Be.keys&&Be.keys.IE_PROTO||"");return re?"Symbol(src)_1."+re:""}(),dt=pe.toString,ft=RegExp("^"+De.call(He).replace(Q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=te?Ce.Buffer:void 0,ln=Ce.Symbol,Ft=Ce.Uint8Array,mn=pe.propertyIsEnumerable,Vn=fe.splice,xt=ln?ln.toStringTag:void 0,je=Object.getOwnPropertySymbols,Ye=Lt?Lt.isBuffer:void 0,st=Ae(Object.keys,Object),Jt=Ci(Ce,"DataView"),Xt=Ci(Ce,"Map"),Zt=Ci(Ce,"Promise"),yn=Ci(Ce,"Set"),ot=Ci(Ce,"WeakMap"),Ue=Ci(Object,"create"),nt=qr(Jt),Tt=qr(Xt),Bt=qr(Zt),Nn=qr(yn),kn=qr(ot),Qn=ln?ln.prototype:void 0,Jn=Qn?Qn.valueOf:void 0;function br(re){var Le=-1,rt=re==null?0:re.length;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Or(){this.__data__=Ue?Ue(null):{},this.size=0}function Sn(re){var Le=this.has(re)&&delete this.__data__[re];return this.size-=Le?1:0,Le}function lt(re){var Le=this.__data__;if(Ue){var rt=Le[re];return rt===r?void 0:rt}return He.call(Le,re)?Le[re]:void 0}function ut(re){var Le=this.__data__;return Ue?Le[re]!==void 0:He.call(Le,re)}function yt(re,Le){var rt=this.__data__;return this.size+=this.has(re)?0:1,rt[re]=Ue&&Le===void 0?r:Le,this}br.prototype.clear=Or,br.prototype.delete=Sn,br.prototype.get=lt,br.prototype.has=ut,br.prototype.set=yt;function Nt(re){var Le=-1,rt=re==null?0:re.length;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function Cn(){this.__data__=[],this.size=0}function On(re){var Le=this.__data__,rt=Yn(Le,re);if(rt<0)return!1;var qt=Le.length-1;return rt==qt?Le.pop():Vn.call(Le,rt,1),--this.size,!0}function _t(re){var Le=this.__data__,rt=Yn(Le,re);return rt<0?void 0:Le[rt][1]}function Fe(re){return Yn(this.__data__,re)>-1}function Qe(re,Le){var rt=this.__data__,qt=Yn(rt,re);return qt<0?(++this.size,rt.push([re,Le])):rt[qt][1]=Le,this}Nt.prototype.clear=Cn,Nt.prototype.delete=On,Nt.prototype.get=_t,Nt.prototype.has=Fe,Nt.prototype.set=Qe;function At(re){var Le=-1,rt=re==null?0:re.length;for(this.clear();++Le<rt;){var qt=re[Le];this.set(qt[0],qt[1])}}function zt(){this.size=0,this.__data__={hash:new br,map:new(Xt||Nt),string:new br}}function Rt(re){var Le=Ei(this,re).delete(re);return this.size-=Le?1:0,Le}function nn(re){return Ei(this,re).get(re)}function xn(re){return Ei(this,re).has(re)}function Ln(re,Le){var rt=Ei(this,re),qt=rt.size;return rt.set(re,Le),this.size+=rt.size==qt?0:1,this}At.prototype.clear=zt,At.prototype.delete=Rt,At.prototype.get=nn,At.prototype.has=xn,At.prototype.set=Ln;function Hn(re){var Le=-1,rt=re==null?0:re.length;for(this.__data__=new At;++Le<rt;)this.add(re[Le])}function at(re){return this.__data__.set(re,r),this}function ae(re){return this.__data__.has(re)}Hn.prototype.add=Hn.prototype.push=at,Hn.prototype.has=ae;function Me(re){var Le=this.__data__=new Nt(re);this.size=Le.size}function We(){this.__data__=new Nt,this.size=0}function ht(re){var Le=this.__data__,rt=Le.delete(re);return this.size=Le.size,rt}function Ct(re){return this.__data__.get(re)}function Gt(re){return this.__data__.has(re)}function Dn(re,Le){var rt=this.__data__;if(rt instanceof Nt){var qt=rt.__data__;if(!Xt||qt.length<n-1)return qt.push([re,Le]),this.size=++rt.size,this;rt=this.__data__=new At(qt)}return rt.set(re,Le),this.size=rt.size,this}Me.prototype.clear=We,Me.prototype.delete=ht,Me.prototype.get=Ct,Me.prototype.has=Gt,Me.prototype.set=Dn;function Pn(re,Le){var rt=Ke(re),qt=!rt&&An(re),Er=!rt&&!qt&&en(re),sr=!rt&&!qt&&!Er&&zs(re),Wr=rt||qt||Er||sr,Fr=Wr?me(re.length,String):[],Tr=Fr.length;for(var Qr in re)He.call(re,Qr)&&!(Wr&&(Qr=="length"||Er&&(Qr=="offset"||Qr=="parent")||sr&&(Qr=="buffer"||Qr=="byteLength"||Qr=="byteOffset")||Kt(Qr,Tr)))&&Fr.push(Qr);return Fr}function Yn(re,Le){for(var rt=re.length;rt--;)if(Os(re[rt][0],Le))return rt;return-1}function Lr(re,Le,rt){var qt=Le(re);return Ke(re)?qt:Ne(qt,rt(re))}function Xr(re){return re==null?re===void 0?O:S:xt&&xt in Object(re)?Yi(re):Wa(re)}function $n(re){return pa(re)&&Xr(re)==l}function Fn(re,Le,rt,qt,Er){return re===Le?!0:re==null||Le==null||!pa(re)&&!pa(Le)?re!==re&&Le!==Le:lr(re,Le,rt,qt,Fn,Er)}function lr(re,Le,rt,qt,Er,sr){var Wr=Ke(re),Fr=Ke(Le),Tr=Wr?c:$e(re),Qr=Fr?c:$e(Le);Tr=Tr==l?T:Tr,Qr=Qr==l?T:Qr;var Ii=Tr==T,Qa=Qr==T,Ki=Tr==Qr;if(Ki&&en(re)){if(!en(Le))return!1;Wr=!0,Ii=!1}if(Ki&&!Ii)return sr||(sr=new Me),Wr||zs(re)?fi(re,Le,rt,qt,Er,sr):Mi(re,Le,Tr,rt,qt,Er,sr);if(!(rt&i)){var vi=Ii&&He.call(re,"__wrapped__"),Ca=Qa&&He.call(Le,"__wrapped__");if(vi||Ca){var os=vi?re.value():re,xa=Ca?Le.value():Le;return sr||(sr=new Me),Er(os,xa,rt,qt,sr)}}return Ki?(sr||(sr=new Me),rr(re,Le,rt,qt,Er,sr)):!1}function Br(re){if(!ua(re)||zr(re))return!1;var Le=yr(re)?ft:Z;return Le.test(qr(re))}function mi(re){return pa(re)&&Mr(re.length)&&!!Y[Xr(re)]}function oi(re){if(!Pr(re))return st(re);var Le=[];for(var rt in Object(re))He.call(re,rt)&&rt!="constructor"&&Le.push(rt);return Le}function fi(re,Le,rt,qt,Er,sr){var Wr=rt&i,Fr=re.length,Tr=Le.length;if(Fr!=Tr&&!(Wr&&Tr>Fr))return!1;var Qr=sr.get(re);if(Qr&&sr.get(Le))return Qr==Le;var Ii=-1,Qa=!0,Ki=rt&a?new Hn:void 0;for(sr.set(re,Le),sr.set(Le,re);++Ii<Fr;){var vi=re[Ii],Ca=Le[Ii];if(qt)var os=Wr?qt(Ca,vi,Ii,Le,re,sr):qt(vi,Ca,Ii,re,Le,sr);if(os!==void 0){if(os)continue;Qa=!1;break}if(Ki){if(!_e(Le,function(xa,zi){if(!we(Ki,zi)&&(vi===xa||Er(vi,xa,rt,qt,sr)))return Ki.push(zi)})){Qa=!1;break}}else if(!(vi===Ca||Er(vi,Ca,rt,qt,sr))){Qa=!1;break}}return sr.delete(re),sr.delete(Le),Qa}function Mi(re,Le,rt,qt,Er,sr,Wr){switch(rt){case j:if(re.byteLength!=Le.byteLength||re.byteOffset!=Le.byteOffset)return!1;re=re.buffer,Le=Le.buffer;case M:return!(re.byteLength!=Le.byteLength||!sr(new Ft(re),new Ft(Le)));case d:case f:case A:return Os(+re,+Le);case h:return re.name==Le.name&&re.message==Le.message;case w:case _:return re==Le+"";case m:var Fr=R;case I:var Tr=qt&i;if(Fr||(Fr=Se),re.size!=Le.size&&!Tr)return!1;var Qr=Wr.get(re);if(Qr)return Qr==Le;qt|=a,Wr.set(re,Le);var Ii=fi(Fr(re),Fr(Le),qt,Er,sr,Wr);return Wr.delete(re),Ii;case N:if(Jn)return Jn.call(re)==Jn.call(Le)}return!1}function rr(re,Le,rt,qt,Er,sr){var Wr=rt&i,Fr=ji(re),Tr=Fr.length,Qr=ji(Le),Ii=Qr.length;if(Tr!=Ii&&!Wr)return!1;for(var Qa=Tr;Qa--;){var Ki=Fr[Qa];if(!(Wr?Ki in Le:He.call(Le,Ki)))return!1}var vi=sr.get(re);if(vi&&sr.get(Le))return vi==Le;var Ca=!0;sr.set(re,Le),sr.set(Le,re);for(var os=Wr;++Qa<Tr;){Ki=Fr[Qa];var xa=re[Ki],zi=Le[Ki];if(qt)var ka=Wr?qt(zi,xa,Ki,Le,re,sr):qt(xa,zi,Ki,re,Le,sr);if(!(ka===void 0?xa===zi||Er(xa,zi,rt,qt,sr):ka)){Ca=!1;break}os||(os=Ki=="constructor")}if(Ca&&!os){var Ha=re.constructor,bi=Le.constructor;Ha!=bi&&"constructor"in re&&"constructor"in Le&&!(typeof Ha=="function"&&Ha instanceof Ha&&typeof bi=="function"&&bi instanceof bi)&&(Ca=!1)}return sr.delete(re),sr.delete(Le),Ca}function ji(re){return Lr(re,wo,pn)}function Ei(re,Le){var rt=re.__data__;return zn(Le)?rt[typeof Le=="string"?"string":"hash"]:rt.map}function Ci(re,Le){var rt=ke(re,Le);return Br(rt)?rt:void 0}function Yi(re){var Le=He.call(re,xt),rt=re[xt];try{re[xt]=void 0;var qt=!0}catch{}var Er=dt.call(re);return qt&&(Le?re[xt]=rt:delete re[xt]),Er}var pn=je?function(re){return re==null?[]:(re=Object(re),ue(je(re),function(Le){return mn.call(re,Le)}))}:Gr,$e=Xr;(Jt&&$e(new Jt(new ArrayBuffer(1)))!=j||Xt&&$e(new Xt)!=m||Zt&&$e(Zt.resolve())!=C||yn&&$e(new yn)!=I||ot&&$e(new ot)!=k)&&($e=function(re){var Le=Xr(re),rt=Le==T?re.constructor:void 0,qt=rt?qr(rt):"";if(qt)switch(qt){case nt:return j;case Tt:return m;case Bt:return C;case Nn:return I;case kn:return k}return Le});function Kt(re,Le){return Le=Le??s,!!Le&&(typeof re=="number"||H.test(re))&&re>-1&&re%1==0&&re<Le}function zn(re){var Le=typeof re;return Le=="string"||Le=="number"||Le=="symbol"||Le=="boolean"?re!=="__proto__":re===null}function zr(re){return!!it&&it in re}function Pr(re){var Le=re&&re.constructor,rt=typeof Le=="function"&&Le.prototype||pe;return re===rt}function Wa(re){return dt.call(re)}function qr(re){if(re!=null){try{return De.call(re)}catch{}try{return re+""}catch{}}return""}function Os(re,Le){return re===Le||re!==re&&Le!==Le}var An=$n(function(){return arguments}())?$n:function(re){return pa(re)&&He.call(re,"callee")&&!mn.call(re,"callee")},Ke=Array.isArray;function It(re){return re!=null&&Mr(re.length)&&!yr(re)}var en=Ye||hi;function er(re,Le){return Fn(re,Le)}function yr(re){if(!ua(re))return!1;var Le=Xr(re);return Le==g||Le==v||Le==u||Le==x}function Mr(re){return typeof re=="number"&&re>-1&&re%1==0&&re<=s}function ua(re){var Le=typeof re;return re!=null&&(Le=="object"||Le=="function")}function pa(re){return re!=null&&typeof re=="object"}var zs=ie?se(ie):mi;function wo(re){return It(re)?Pn(re):oi(re)}function Gr(){return[]}function hi(){return!1}t.exports=er}(c9,c9.exports);var hz=c9.exports,ZS={};Object.defineProperty(ZS,"__esModule",{value:!0});const vEe=fz,bEe=hz;var eC;(function(t){function e(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let c=vEe(s);l||(c=Object.keys(c).reduce((u,d)=>(c[d]!=null&&(u[d]=c[d]),u),{}));for(const u in a)a[u]!==void 0&&s[u]===void 0&&(c[u]=a[u]);return Object.keys(c).length>0?c:void 0}t.compose=e;function n(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});const l=Object.keys(a).concat(Object.keys(s)).reduce((c,u)=>(bEe(a[u],s[u])||(c[u]=s[u]===void 0?null:s[u]),c),{});return Object.keys(l).length>0?l:void 0}t.diff=n;function r(a={},s={}){a=a||{};const l=Object.keys(s).reduce((c,u)=>(s[u]!==a[u]&&a[u]!==void 0&&(c[u]=s[u]),c),{});return Object.keys(a).reduce((c,u)=>(a[u]!==s[u]&&s[u]===void 0&&(c[u]=null),c),l)}t.invert=r;function i(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;const c=Object.keys(s).reduce((u,d)=>(a[d]===void 0&&(u[d]=s[d]),u),{});return Object.keys(c).length>0?c:void 0}t.transform=i})(eC||(eC={})),ZS.default=eC;var u9={};Object.defineProperty(u9,"__esModule",{value:!0});var tC;(function(t){function e(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}t.length=e})(tC||(tC={})),u9.default=tC;var nC={};Object.defineProperty(nC,"__esModule",{value:!0});const pz=u9;class yEe{constructor(e){this.ops=e,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(e){e||(e=1/0);const n=this.ops[this.index];if(n){const r=this.offset,i=pz.default.length(n);if(e>=i-r?(e=i-r,this.index+=1,this.offset=0):this.offset+=e,typeof n.delete=="number")return{delete:e};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=e:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(r,e):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?pz.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const e=this.ops[this.index];return e?typeof e.delete=="number"?"delete":typeof e.retain=="number"||typeof e.retain=="object"&&e.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const e=this.offset,n=this.index,r=this.next(),i=this.ops.slice(this.index);return this.offset=e,this.index=n,[r].concat(i)}}else return[]}}nC.default=yEe,function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const n=mEe,r=fz,i=hz,a=ZS;e.AttributeMap=a.default;const s=u9;e.Op=s.default;const l=nC;e.OpIterator=l.default;const c="\0",u=(f,h)=>{if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);if(typeof h!="object"||h===null)throw new Error(`cannot retain a ${typeof h}`);const g=Object.keys(f)[0];if(!g||g!==Object.keys(h)[0])throw new Error(`embed types not matched: ${g} != ${Object.keys(h)[0]}`);return[g,f[g],h[g]]};class d{constructor(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]}static registerEmbed(h,g){this.handlers[h]=g}static unregisterEmbed(h){delete this.handlers[h]}static getHandler(h){const g=this.handlers[h];if(!g)throw new Error(`no handlers for embed type "${h}"`);return g}insert(h,g){const v={};return typeof h=="string"&&h.length===0?this:(v.insert=h,g!=null&&typeof g=="object"&&Object.keys(g).length>0&&(v.attributes=g),this.push(v))}delete(h){return h<=0?this:this.push({delete:h})}retain(h,g){if(typeof h=="number"&&h<=0)return this;const v={retain:h};return g!=null&&typeof g=="object"&&Object.keys(g).length>0&&(v.attributes=g),this.push(v)}push(h){let g=this.ops.length,v=this.ops[g-1];if(h=r(h),typeof v=="object"){if(typeof h.delete=="number"&&typeof v.delete=="number")return this.ops[g-1]={delete:v.delete+h.delete},this;if(typeof v.delete=="number"&&h.insert!=null&&(g-=1,v=this.ops[g-1],typeof v!="object"))return this.ops.unshift(h),this;if(i(h.attributes,v.attributes)){if(typeof h.insert=="string"&&typeof v.insert=="string")return this.ops[g-1]={insert:v.insert+h.insert},typeof h.attributes=="object"&&(this.ops[g-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof v.retain=="number")return this.ops[g-1]={retain:v.retain+h.retain},typeof h.attributes=="object"&&(this.ops[g-1].attributes=h.attributes),this}}return g===this.ops.length?this.ops.push(h):this.ops.splice(g,0,h),this}chop(){const h=this.ops[this.ops.length-1];return h&&typeof h.retain=="number"&&!h.attributes&&this.ops.pop(),this}filter(h){return this.ops.filter(h)}forEach(h){this.ops.forEach(h)}map(h){return this.ops.map(h)}partition(h){const g=[],v=[];return this.forEach(m=>{(h(m)?g:v).push(m)}),[g,v]}reduce(h,g){return this.ops.reduce(h,g)}changeLength(){return this.reduce((h,g)=>g.insert?h+s.default.length(g):g.delete?h-g.delete:h,0)}length(){return this.reduce((h,g)=>h+s.default.length(g),0)}slice(h=0,g=1/0){const v=[],m=new l.default(this.ops);let A=0;for(;A<g&&m.hasNext();){let S;A<h?S=m.next(h-A):(S=m.next(g-A),v.push(S)),A+=s.default.length(S)}return new d(v)}compose(h){const g=new l.default(this.ops),v=new l.default(h.ops),m=[],A=v.peek();if(A!=null&&typeof A.retain=="number"&&A.attributes==null){let T=A.retain;for(;g.peekType()==="insert"&&g.peekLength()<=T;)T-=g.peekLength(),m.push(g.next());A.retain-T>0&&v.next(A.retain-T)}const S=new d(m);for(;g.hasNext()||v.hasNext();)if(v.peekType()==="insert")S.push(v.next());else if(g.peekType()==="delete")S.push(g.next());else{const T=Math.min(g.peekLength(),v.peekLength()),C=g.next(T),x=v.next(T);if(x.retain){const w={};if(typeof C.retain=="number")w.retain=typeof x.retain=="number"?T:x.retain;else if(typeof x.retain=="number")C.retain==null?w.insert=C.insert:w.retain=C.retain;else{const _=C.retain==null?"insert":"retain",[N,O,k]=u(C[_],x.retain),M=d.getHandler(N);w[_]={[N]:M.compose(O,k,_==="retain")}}const I=a.default.compose(C.attributes,x.attributes,typeof C.retain=="number");if(I&&(w.attributes=I),S.push(w),!v.hasNext()&&i(S.ops[S.ops.length-1],w)){const _=new d(g.rest());return S.concat(_).chop()}}else typeof x.delete=="number"&&(typeof C.retain=="number"||typeof C.retain=="object"&&C.retain!==null)&&S.push(x)}return S.chop()}concat(h){const g=new d(this.ops.slice());return h.ops.length>0&&(g.push(h.ops[0]),g.ops=g.ops.concat(h.ops.slice(1))),g}diff(h,g){if(this.ops===h.ops)return new d;const v=[this,h].map(C=>C.map(x=>{if(x.insert!=null)return typeof x.insert=="string"?x.insert:c;const w=C===h?"on":"with";throw new Error("diff() called "+w+" non-document")}).join("")),m=new d,A=n(v[0],v[1],g,!0),S=new l.default(this.ops),T=new l.default(h.ops);return A.forEach(C=>{let x=C[1].length;for(;x>0;){let w=0;switch(C[0]){case n.INSERT:w=Math.min(T.peekLength(),x),m.push(T.next(w));break;case n.DELETE:w=Math.min(x,S.peekLength()),S.next(w),m.delete(w);break;case n.EQUAL:w=Math.min(S.peekLength(),T.peekLength(),x);const I=S.next(w),_=T.next(w);i(I.insert,_.insert)?m.retain(w,a.default.diff(I.attributes,_.attributes)):m.push(_).delete(w);break}x-=w}}),m.chop()}eachLine(h,g=`
4377
4377
  `){const v=new l.default(this.ops);let m=new d,A=0;for(;v.hasNext();){if(v.peekType()!=="insert")return;const S=v.peek(),T=s.default.length(S)-v.peekLength(),C=typeof S.insert=="string"?S.insert.indexOf(g,T)-T:-1;if(C<0)m.push(v.next());else if(C>0)m.push(v.next(C));else{if(h(m,v.next(1).attributes||{},A)===!1)return;A+=1,m=new d}}m.length()>0&&h(m,{},A)}invert(h){const g=new d;return this.reduce((v,m)=>{if(m.insert)g.delete(s.default.length(m));else{if(typeof m.retain=="number"&&m.attributes==null)return g.retain(m.retain),v+m.retain;if(m.delete||typeof m.retain=="number"){const A=m.delete||m.retain;return h.slice(v,v+A).forEach(T=>{m.delete?g.push(T):m.retain&&m.attributes&&g.retain(s.default.length(T),a.default.invert(m.attributes,T.attributes))}),v+A}else if(typeof m.retain=="object"&&m.retain!==null){const A=h.slice(v,v+1),S=new l.default(A.ops).next(),[T,C,x]=u(m.retain,S.insert),w=d.getHandler(T);return g.retain({[T]:w.invert(C,x)},a.default.invert(m.attributes,S.attributes)),v+1}}return v},0),g.chop()}transform(h,g=!1){if(g=!!g,typeof h=="number")return this.transformPosition(h,g);const v=h,m=new l.default(this.ops),A=new l.default(v.ops),S=new d;for(;m.hasNext()||A.hasNext();)if(m.peekType()==="insert"&&(g||A.peekType()!=="insert"))S.retain(s.default.length(m.next()));else if(A.peekType()==="insert")S.push(A.next());else{const T=Math.min(m.peekLength(),A.peekLength()),C=m.next(T),x=A.next(T);if(C.delete)continue;if(x.delete)S.push(x);else{const w=C.retain,I=x.retain;let _=typeof I=="object"&&I!==null?I:T;if(typeof w=="object"&&w!==null&&typeof I=="object"&&I!==null){const N=Object.keys(w)[0];if(N===Object.keys(I)[0]){const O=d.getHandler(N);O&&(_={[N]:O.transform(w[N],I[N],g)})}}S.retain(_,a.default.transform(C.attributes,x.attributes,g))}}return S.chop()}transformPosition(h,g=!1){g=!!g;const v=new l.default(this.ops);let m=0;for(;v.hasNext()&&m<=h;){const A=v.peekLength(),S=v.peekType();if(v.next(),S==="delete"){h-=Math.min(A,h-m);continue}else S==="insert"&&(m<h||!g)&&(h+=A);m+=A}return h}}d.Op=s.default,d.OpIterator=l.default,d.AttributeMap=a.default,d.handlers={},e.default=d,t.exports=d,t.exports.default=d}(GS,GS.exports);var oc=GS.exports;const cr=Ps(oc);class Xc extends Pl{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Xc.blotName="break",Xc.tagName="BR";let Gc=class extends a9{};function d9(t){return t.replace(/[&<>"']/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[e])}const $u=class $u extends YS{static compare(e,n){const r=$u.order.indexOf(e),i=$u.order.indexOf(n);return r>=0||i>=0?r-i:e===n?0:e<n?-1:1}formatAt(e,n,r,i){if($u.compare(this.statics.blotName,r)<0&&this.scroll.query(r,dr.BLOT)){const a=this.isolate(e,n);i&&a.wrap(r,i)}else super.formatAt(e,n,r,i)}optimize(e){if(super.optimize(e),this.parent instanceof $u&&$u.compare(this.statics.blotName,this.parent.statics.blotName)>0){const n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}};Gn($u,"allowedChildren",[$u,Xc,Pl,Gc]),Gn($u,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let qu=$u;const gz=1;class eo extends Hg{constructor(){super(...arguments);Gn(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=mz(this)),this.cache.delta}deleteAt(n,r){super.deleteAt(n,r),this.cache={}}formatAt(n,r,i,a){r<=0||(this.scroll.query(i,dr.BLOCK)?n+r===this.length()&&this.format(i,a):super.formatAt(n,Math.min(r,this.length()-n-1),i,a),this.cache={})}insertAt(n,r,i){if(i!=null){super.insertAt(n,r,i),this.cache={};return}if(r.length===0)return;const a=r.split(`
4378
4378
  `),s=a.shift();s.length>0&&(n<this.length()-1||this.children.tail==null?super.insertAt(Math.min(n,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((c,u)=>(l=l.split(c,!0),l.insertAt(0,u),u.length),n+s.length)}insertBefore(n,r){const{head:i}=this.children;super.insertBefore(n,r),i instanceof Xc&&i.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+gz),this.cache.length}moveChildren(n,r){super.moveChildren(n,r),this.cache={}}optimize(n){super.optimize(n),this.cache={}}path(n){return super.path(n,!0)}removeChild(n){super.removeChild(n),this.cache={}}split(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(n===0||n>=this.length()-gz)){const a=this.clone();return n===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}const i=super.split(n,r);return this.cache={},i}}eo.blotName="block",eo.tagName="P",eo.defaultChild=Xc,eo.allowedChildren=[Xc,qu,Pl,Gc];class lc extends Pl{attach(){super.attach(),this.attributes=new r9(this.domNode)}delta(){return new cr().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,n){const r=this.scroll.query(e,dr.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,n)}formatAt(e,n,r,i){this.format(r,i)}insertAt(e,n,r){if(r!=null){super.insertAt(e,n,r);return}const i=n.split(`
4379
4379
  `),a=i.pop(),s=i.map(c=>{const u=this.scroll.create(eo.blotName);return u.insertAt(0,c),u}),l=this.split(e);s.forEach(c=>{this.parent.insertBefore(c,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}}lc.scope=dr.BLOCK_BLOT;function mz(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return t.descendants(yo).reduce((n,r)=>r.length()===0?n:n.insert(r.value(),cc(r,{},e)),new cr).insert(`