(()=>{var e,t,n,o={6548:(e,t,n)=>{var o=n(4890),r=n(1090),a=[];for(var i in addonsJSON)a.push(addonsJSON[i]);var l="table_advanced",c="table_advanced_item",s="jp_table_advanced_item",d={accordion:{title:"Accordion",name:"accordion",key:"jp_accordion_item",text:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."},
tab:{title:"Tab",name:"tab",key:"jp_tab_item",text:"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."}},u={xl:{name:"Laptop",value:"xl",icon:"laptop"},lg:{name:"Tablet Landscape",value:"lg",icon:"tabletLandscape"},md:{name:"Tablet",value:"md",icon:"tablet"},sm:{name:"Mobile Landscape",value:"sm",icon:"mobileLandscape"},
xs:{name:"Mobile",value:"xs",icon:"mobile"}},m=u.xl.value,p=["lg","md","sm","xs"],v={flex:"flex",inlineFlex:"inline-flex"},f={horizontal:"row",vertical:"column"},b=[{value:"System",label:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_FONT_BOOK_SYSTEM_FONTS"),isDisabled:!0},{value:"Arial",label:"Arial"},{value:"Tahoma",label:"Tahoma"},{value:"Verdana",label:"Verdana"},{value:"Helvetica",label:"Helvetica"},{value:"Times New Roman",label:"Times New Roman"},{value:"Trebuchet MS",label:"Trebuchet MS"},{value:"Georgia",
label:"Georgia"}],h="jpb_clipboard",g="jpb_row_clipboard",E="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=font.getInstalledFonts"),y="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=aicontent.getAiGeneratedContent"),w="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=aicontent.getUrlToBase64Image"),x="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=aicontent.uploadAiGeneratedImageFromUrl"),I="".concat(pagebuilder_base,"components/com_jpagebuilder/assets/images/"),
O="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=imageshapes.getImageShapesAPI"),C="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=imageshapes.addImageShapeAPI"),A="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=imageshapes.deleteImageShapeAPI"),N="com_xxxxxxxxx",D="xxxxxxxxx_single_",S="xxxxxxxxx",P=["screen_mode","stretch_section"],k="div",R={productList:"xxxxxxxxx_common_productlist",filter:"xxxxxxxxx_list_filter",pagination:"xxxxxxxxx_list_pagination"},
T="256x256",L="rtl"===document.dir,M="".concat(pagebuilder_base,"components/com_jpagebuilder/assets/images/"),Z="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=saveditemsorder.updateSavedItemsOrder&_method=patch"),j=n(885),B=n(4942),J=n(5671),G=n(3144),H=n(136),U=n(2963),z=n(1120),F=n(7294),V=n(3935),W=n(283),K=n.n(W),Y=n(7187),X=n.n(Y);function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ee=new (function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;
if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),(e=o.call(this)).toast={},e}return(0,G.Z)(r,[{key:"setToast",value:function(e){this.toast=e,this.emit("onToasterDispatch")}},
{key:"getToasts",value:function(){return this.toast}}]),r}(Y.EventEmitter)),te={delay:5E3,position:"bottom-right"},ne=function(e,t,n,o){var r={type:"success",title:t,message:e,options:Q(Q({},o),{},{delay:n})};ee.setToast(r)},oe=function(e,t,n,o){var r={type:"danger",title:t,message:e,options:Q(Q({},o),{},{delay:n})};ee.setToast(r)},re=function(e,t,n,o){var r={type:"warning",title:t,message:e,options:Q(Q({},o),{},{delay:n})};ee.setToast(r)},ae=function(e){var t=e.toastId,n=e.type,o=void 0===n?"success":
n,r=e.title,a=e.message,i=e.options,l=e.closeToaster,c=e.element,s=(0,F.useRef)(null),d=(0,F.useRef)(null);return(0,F.useEffect)(function(){var e=Q(Q({},te),i);return d.current.style.animationName="builderFadeInUp",d.current.style.animationDuration=".35s",d.current.style.display="flex",void 0!==(null==e?void 0:e.position)&&c.setAttribute("class","builder-toaster-".concat(e.position)),void 0===(null==e?void 0:e.delay)&&(e.delay=5E3),s.current=setTimeout(function(){d.current.style.animationName="builderFadeInDown",
d.current.style.animationDuration=".35s",d.current.style.opacity=0,setTimeout(function(){l(t)},450)},e.delay),function(){clearTimeout(s.current)}},[]),F.createElement("div",{className:"builder-toaster builder-toaster-".concat(o),onClick:function(e){e.preventDefault(),s.current&&clearTimeout(s.current),d.current.style.animationName="builderFadeInDown",d.current.style.animationDuration=".35s",d.current.style.opacity=0,setTimeout(function(){l(t)},450)},ref:d,style:{display:"none"}},F.createElement("div",
{className:"builder-toaster-info-icon"},F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",className:"bi bi-info-circle",viewBox:"0 0 20 20"},F.createElement("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),F.createElement("path",{d:"M8.93 6.588l-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"}))),
F.createElement("div",{className:"builder-toaster-wrap"},F.createElement("div",{className:"builder-toaster-title"},r),F.createElement("div",{className:"builder-toaster-message"},a)),F.createElement("div",{className:"builder-toaster-close"},F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-x",viewBox:"0 0 16 16"},F.createElement("path",{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}))))};
const ie=function(){var e=(0,F.useState)({}),t=(0,j.Z)(e,2),n=t[0],o=t[1],r=(0,F.useRef)(1),a=(0,F.useRef)(null);(0,F.useEffect)(function(){return ee.on("onToasterDispatch",i),function(){ee.removeListener("onToasterDispatch",i)}},[]);var i=function(){o(function(e){return Q(Q({},e),{},(0,B.Z)({},"toast-".concat(r.current++),ee.toast))})};return(0,V.createPortal)(F.createElement("div",{id:"builder-toaster-container",className:"builder-toaster-bottom-right",ref:a},Object.entries(n).map(function(e){var t=
(0,j.Z)(e,2),n=t[0],r=t[1];return F.createElement(ae,{key:n,toastId:n,type:r.type,title:r.title,message:r.message,options:r.options,element:a.current,closeToaster:function(){return o(function(e){var t=K()(e);return delete t[n],t})}})})),document.body)};var le=function(e){localStorage.removeItem(e)},ce=function(e){return"undefined"!=typeof window&&localStorage.getItem(e)||null},se={isCopiedAddonAvailable:!1,isCopiedSectionAvailable:!1,isCopiedItemsAvailable:!1};var de=n(1002),ue=n(2982),me=n(1609),
pe=n.n(me),ve=n(3218),fe=n.n(ve);const be=new (function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});
function r(){var e,t;return(0,J.Z)(this,r),(t=o.call(this)).device=(null===(e=window)||void 0===e?void 0:e.builderDefaultDevice)||"xl",t}return(0,G.Z)(r,[{key:"setDevice",value:function(e){this.device=e,this.emit("change")}}]),r}(X()));function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var ge=["hidden","text","gmap","border","select","category","accesslevel","animation","alert","alignment","headings","link","color","advancedcolor","textarea",
"separator","header","number","module","checkbox","radio","advancedradio","icon","editor","media","padding","margin","builder","boxshadow","slider","advancedslider","fontstyle","fonts","advancedsettings","typography","codeeditor","gradient","buttons","thumbnail","timeline","interaction_view","repeatable","effects","transform","image_shape"],Ee=function(e){return null!=e},ye=function(){},_e=function(e){return"string"==typeof e},we=function(e){return"object"===(0,de.Z)(e)&&null!==e&&!Array.isArray(e)},
xe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/;"image"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"url")&&(t=/(https?:\/\/[^"']*\.(?:png|jpg|jpeg|gif|svg|webp))/i);var n=new RegExp(t);return!!e.match(n)},Ie=function(e){return"string"==typeof e?
Boolean(Number(e)):Boolean(e)},Oe=function(e){if(Ee(e))return String(e)},Ce=function(e){if(Ee(e)&&(!_e(e)||0!==e.length))return Number(e)},Ae=function(e){for(var t=0,n=Object.keys(e);t<n.length;t++){var o=n[t],r=e[o];if(r.is_header&&"checkbox"===r.type)return{name:o,field:r}}return null},Ne=function(e,t){var n;if(Ee(e))return n=e,"object"!==(0,de.Z)(n)||null===n||Array.isArray(n)||!("xl"in n)&&!("md"in n)?e:e[t]},De=function(e){return!!Ee(e)&&(_e(e)?"true"===e||"1"===e||"false"!==e&&"0"!==e&&0!==
e.length&&e:function(e){return"number"==typeof e}(e)?0!==e&&(1===e||e):e)},Se=function(e,t){var n=!0;if(0===e.length)return n;var o,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?
he(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||
n.return()}finally{if(l)throw a;}}}}(e);try{for(r.s();!(o=r.n()).done;){var a=o.value,i=(0,j.Z)(a,3),l=i[0],c=i[1],s=i[2],d=De(Ne(t[l],be.device)),u=De(s);"="===c?n&&(n=d===u):"!="===c&&n&&(n=d!==u)}}catch(e){r.e(e)}finally{r.f()}return n},Pe=function(e,t){var n,o=Object.keys(e);if(!t)return e;for(var r=0,a=o;r<a.length;r++){var i=e[a[r]];Ee(i.depends)&&(i.visibility=Se(i.depends,t));for(var l=i.fields,c=0,s=Object.keys(l);c<s.length;c++){var d=l[s[c]];if(n=d,"object"===(0,de.Z)(n)&&null!==n&&"type"in
n&&ge.includes(n.type)){var u;if(we(d.depends)){var m=Object.keys(d.depends),p=Object.values(d.depends);d.depends=[[m[0],"=",p[0]]]}d.visibility=Se(null!==(u=d.depends)&&void 0!==u?u:[],t)}}}return e},ke=function(e){if(Ee(e))return e.replace(/[^-0-9.]/g,"")},Re=function(e,t,n){var o=Ce(e);if(Ee(o))return Ee(t)&&(o=Math.max(t,o)),Ee(n)&&(o=Math.min(n,o)),o};function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Me={accordion:"jp_accordion_item",tab:"jp_tab_item"},Ze={xl:1140,lg:960,md:720,sm:540,xs:320},je=
["xl","lg","md","sm","xs"],Be=function(e){var t=Ze[e],n=window.innerWidth>0?window.innerWidth:screen.width,o=Math.min(100,100*n/t)/100,r=document.getElementById("jpagebuilder-view"),a={transform:"scale(".concat(o,")"),transformOrigin:"0% 0%",height:o<1?"calc(100% + ".concat(1E3*(1-o),"px)"):"100%",transformStyle:"preserve-3d",pointerEvents:"auto",overflow:"hidden",position:"relative",display:"inline"};for(var i in a)r.style[i]=a[i]},Je=function(){return Wn.getState()},Ge=function(e){return Je().pageBuilder.present.findIndex(function(t){return t.id===
e})},He=function(e,t){return Je().pageBuilder.present[Ge(e)].columns.findIndex(function(e){return e.id===t})},Ue=function(e,t){(0,ue.Z)(e.querySelectorAll(t)).forEach(function(e){return e.classList.remove(t.substr(1))})},ze=function(e){var t=Je().pageBuilder.present,n=t.findIndex(function(t){return t.id===e});return-1===n?0:t[n].columns.length},Fe=function(e,t,n){var o,r,a=Je().pageBuilder.present,i=a.findIndex(function(t){return(null==t?void 0:t.id)===e});if(-1===i)return null;var l=null===(o=a[i])||
void 0===o?void 0:o.columns.findIndex(function(e){return(null==e?void 0:e.id)===t});return-1===l?null:((null===(r=a[i].columns[l])||void 0===r?void 0:r.addons)||[]).find(function(e){return(null==e?void 0:e.id)===n})||null},Ve=function(e,t){return e.classList.add(t)},We=function(e,t){return e.classList.remove(t)},Ke=function(e){return void 0!==(null==e?void 0:e.combinedSettings)&&"object"===(0,de.Z)(e.combinedSettings)?Object.values(e.combinedSettings).reduce(function(e,t){return Object.assign(e,t),
e},{}):[]},Ye=function(){var e,t=null!==(e={number:0,string:"",boolean:!1}[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string"])&&void 0!==e?e:"";return Object.fromEntries(Array.from(je,function(e){return[e,t]}))},Xe=function(e){return{lg:"@media (max-width: 1199.98px) {",md:"@media (max-width: 991.98px) {",sm:"@media (max-width: 767.98px) {",xs:"@media (max-width: 575.98px) {"}[e]},qe=function(){for(var e="",t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;t--;)e+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*
Math.random()|0];return e},$e=function(e,t,n,o,r){var a=e.find(function(e){return e.id===n.rowId}),i=!!a&&a.columns.find(function(e){return e.id===n.columnId}),l=!!i&&i.addons||[];if(null!=r&&r.parent_addon&&l.some(function(e){return e.id===r.parent_addon}))return!0;for(;null!==(c=o)&&void 0!==c&&c.parent;){var c;if(o.parent===n.id)return!0;o=t.find(function(e){return e.id===o.parent})}return!1},Qe=!1,et=function(){return re(Joomla.Text._("COM_JPAGEBUILDER_ERROR_MSG_FOR_PRO_VERSION"),"Warn")};function tt(e){return pe()(e)?
[]:e.split(" ").map(function(e){var t=parseInt(e.replace("px",""));return isNaN(t)?0:t})}var nt=function(e){var t={};if(fe()(e))void 0===e.xl||""==e.xl.trim()?t.xl=[0,0,0,0]:t.xl=tt(e.xl),void 0===e.lg||""==e.lg.trim()?t.lg=[0,0,0,0]:t.lg=tt(e.lg),void 0===e.md||""==e.md.trim()?t.md=[0,0,0,0]:t.md=tt(e.md),void 0===e.sm||""==e.sm.trim()?t.sm=[0,0,0,0]:t.sm=tt(e.sm),void 0===e.xs||""==e.xs.trim()?t.xs=[0,0,0,0]:t.xs=tt(e.xs);else{var n=tt(e);t.xl=n,t.lg=n,t.md=n,t.sm=n,t.xs=n}return t},ot=function(e,
t,n){var o=e.target.files[0];if(o&&".json"===o.name.slice(-5).toLowerCase()){var r=new FormData;r.append("page",o);var a="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=upload-page&editarea=frontend");jQuery.ajax({type:"POST",url:a,dataType:"json",data:r,cache:!1,processData:!1,contentType:!1,success:function(o){if(o.status)try{t(JSON.parse(o.data.template));var r={css:o.data.css};at(o.data.seo)&&"[]"!==o.data.seo&&(r=Le({css:o.data.css},JSON.parse(o.data.seo))),
n(r),e.target.value=null}catch(e){console.error(e.message)}}})}},rt=function(e,t,n){var o=e.length,r=e[t];return t===n||t>o||n>o?e:e.flatMap(function(e,o){return o===t?[]:o===n?t<n?[e,r]:[r,e]:e})},at=function(e){return null!=e},it=["System","Google Fonts","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia"],lt=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!it.includes(e.family)){var o=window.document,r="jpagebuilder-font-".concat(e.family.replaceAll(/\s/g,
"-")).replaceAll(".",""),a="google"===t?"google-fonts":"custom-fonts",i="".concat(pagebuilder_base,"media/com_jpagebuilder/assets/").concat(a,"/").concat(e.family,"/stylesheet.css");if("google"===t&&(n.findIndex(function(t){return t.family_name===e.family})>=0||(i="https://fonts.googleapis.com/css?family=".concat(e.family,":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&display=swap"))),!o.querySelector("#".concat(r))){var l=
o.createElement("link");l.href=i,l.rel="stylesheet",l.id=r,o.head.appendChild(l)}}},ct=function(e){var t="".concat(pagebuilder_base).concat(e),n=window.document,o=n.createElement("link");o.href=t,o.rel="stylesheet",n.head.appendChild(o)},st=function(e){if(!_e(e))return!1;var t=e.toLocaleLowerCase();return t.startsWith("var(--")&&t.endsWith(")")},dt=function(e){var t=e.previous,n=e.value,o=e.responsive,r=e.device;return o?Le(Le({},t),{},(0,B.Z)({},r,n)):n},ut=function(e,t){return Object.prototype.hasOwnProperty.call(e,
t)},mt=function(e){return at(e)&&fe()(e)?Object.keys(e):[]},pt=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id})},vt=function(e){var t=e.match(/<path\b[^>]*>/g);if(!/<svg\s+.*?>[\s\S]*?<\/svg>/i.test(e)||!t||1!==t.length)return!1;try{return"parsererror"!==(new DOMParser).parseFromString(e,"text/xml").documentElement.nodeName||(console.error("Invalid SVG string:",e),!1)}catch(e){return console.error("Error parsing SVG string:",e),!1}};function ft(e){this.actions=
e,this.actionProperty=["move","rotate","scale","skew","opacity","blur"],this.actionSortList={},this.sortAnimation()}ft.prototype.sortAnimation=function(){this.actions=this.actions.sort(function(e,t){return e.keyframe-t.keyframe})},ft.prototype.bindCustomAnimation=function(){var e=this;this.actionProperty.map(function(t){e.actionSortList[t]=e.actions.filter(function(e){return e.name===t})})},ft.prototype.getCustomAnimationActionByName=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:
null;if(null===t)return void 0!==this.actionSortList[e]?this.actionSortList[e]:[];var n={from:null,to:null},o=void 0!==this.actionSortList[e]?this.actionSortList[e]:[];if(0===o.length)return n;var r=!1;return o.map(function(e,a){t<parseInt(e.keyframe)&&null===n.to&&(void 0!==n.fixed&&delete n.fixed,e.toKF=0,n.to=e,void 0!==o[a-1]&&(o[a-1].scroll=0,n.from=o[a-1]),r=!0),a===o.length-1&&!1===r&&(n.to=e,n.fixed=!0,void 0!==o[a-1]&&(o[a-1].scroll=0,n.from=o[a-1]))}),n},ft.prototype.getTAxis=function(e,
t,n,o){var r=o.toKF,a=o.fromKF;return e-(e-t)/r*(0===a?n:n-a)},ft.prototype.getMoveTransform=function(e,t,n){var o=t.to.keyframe,r=t.from.keyframe,a={toKF:isNaN(o)?100:Math.abs(r-o),fromKF:r,totalKF:o},i=t.from.x,l=t.to.x,c=t.from.y,s=t.to.y,d=t.from.z,u=t.to.z;return t.goal.x=this.getTAxis(i,l,n,a),t.goal.y=this.getTAxis(c,s,n,a),t.goal.z=this.getTAxis(d,u,n,a),t},ft.prototype.getSkew=function(e,t,n){var o=t.to.keyframe,r=t.from.keyframe,a={toKF:isNaN(o)?100:Math.abs(r-o),fromKF:r,totalKF:o},i=t.from.x,
l=t.to.x,c=t.from.y,s=t.to.y;return t.goal.x=this.getTAxis(i,l,n,a),t.goal.y=this.getTAxis(c,s,n,a),t},ft.prototype.getOpacity=function(e,t,n){var o=t.to.keyframe,r=t.from.keyframe,a={toKF:isNaN(o)?100:Math.abs(r-o),fromKF:r,totalKF:o},i=t.from.value,l=t.to.value;return t.goal.value=this.getTAxis(i,l,n,a),t};var bt={},ht=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,J.Z)(this,e),this.width=null,this.height=null,this.clientWidth=null,this.clientHeight=
null,this.left=null,this.top=null,this.gammazero=null,this.betazero=null,this.lastgammazero=null,this.lastbetazero=null,this.transitionTimeout=null,this.updateCall=null,this.event=null,this.updateBind=this.update.bind(this),this.resetBind=this.reset.bind(this),this.element=t,this.destroys=!1,this.settings=this.extendSettings(n),this.reverse=this.settings.reverse?-1:1,this.glare=e.isSettingTrue(this.settings.glare),this.glarePrerender=e.isSettingTrue(this.settings["glare-prerender"]),this.fullPageListening=
e.isSettingTrue(this.settings["full-page-listening"]),this.gyroscope=e.isSettingTrue(this.settings.gyroscope),this.gyroscopeSamples=this.settings.gyroscopeSamples,this.elementListener=this.getElementListener(),this.wrapWithParent(),this.glare&&this.prepareGlare(),this.fullPageListening&&this.updateClientSize(),this.addEventListeners(),this.updateInitialPosition()}return(0,G.Z)(e,[{key:"getElementListener",value:function(){return this.element}},{key:"addEventListeners",value:function(){this.onMouseEnterBind=
this.onMouseEnter.bind(this),this.onMouseMoveBind=this.onMouseMove.bind(this),this.onMouseLeaveBind=this.onMouseLeave.bind(this),this.onWindowResizeBind=this.onWindowResize.bind(this),this.onDeviceOrientationBind=this.onDeviceOrientation.bind(this),this.elementListener.addEventListener("mouseenter",this.onMouseEnterBind),this.elementListener.addEventListener("mouseleave",this.onMouseLeaveBind),this.elementListener.addEventListener("mousemove",this.onMouseMoveBind),(this.glare||this.fullPageListening)&&
window.addEventListener("resize",this.onWindowResizeBind),this.gyroscope&&window.addEventListener("deviceorientation",this.onDeviceOrientationBind)}},{key:"removeEventListeners",value:function(){this.elementListener.removeEventListener("mouseenter",this.onMouseEnterBind),this.elementListener.removeEventListener("mouseleave",this.onMouseLeaveBind),this.elementListener.removeEventListener("mousemove",this.onMouseMoveBind),this.gyroscope&&window.removeEventListener("deviceorientation",this.onDeviceOrientationBind),
(this.glare||this.fullPageListening)&&window.removeEventListener("resize",this.onWindowResizeBind)}},{key:"onDeviceOrientation",value:function(e){if(null!==e.gamma&&null!==e.beta){this.updateElementPosition(),this.gyroscopeSamples>0&&(this.lastgammazero=this.gammazero,this.lastbetazero=this.betazero,null===this.gammazero?(this.gammazero=e.gamma,this.betazero=e.beta):(this.gammazero=(e.gamma+this.lastgammazero)/2,this.betazero=(e.beta+this.lastbetazero)/2),this.gyroscopeSamples-=1);var t=this.settings.gyroscopeMaxAngleX-
this.settings.gyroscopeMinAngleX,n=this.settings.gyroscopeMaxAngleY-this.settings.gyroscopeMinAngleY,o=t/this.width,r=n/this.height,a=(e.gamma-(this.settings.gyroscopeMinAngleX+this.gammazero))/o,i=(e.beta-(this.settings.gyroscopeMinAngleY+this.betazero))/r;null!==this.updateCall&&cancelAnimationFrame(this.updateCall),this.event={clientX:a+this.left,clientY:i+this.top},this.updateCall=requestAnimationFrame(this.updateBind)}}},{key:"wrapWithParent",value:function(){void 0!==this.element.parentElement&&
null!==this.element.parentElement&&"mouseMovement"===this.element.parentElement.className&&(this.element=this.element.parentElement),"jpb-addon-wrapper"!==this.element.className&&this.element.parentElement.className}},{key:"unWrapParent",value:function(e){null!==e.parentNode&&"jpb-addon-wrapper"===e.parentElement.className&&(e=e.parentElement),"jpb-addon-wrapper"===e.className&&e.parentNode}},{key:"onMouseEnter",value:function(){this.updateElementPosition(),this.element.style.willChange="transform",
this.setTransition()}},{key:"onMouseMove",value:function(e){null!==this.updateCall&&cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.updateBind)}},{key:"onMouseLeave",value:function(){this.setTransition(),this.reset(),this.settings.reset&&requestAnimationFrame(this.resetBind)}},{key:"reset",value:function(){this.event={clientX:this.left+this.width/2,clientY:this.top+this.height/2},null!==this.element&&null!==this.element.parentElement&&"jpb-addon-wrapper"===
this.element.parentElement.className&&(this.element=this.element.parentElement),this.element&&"jpb-addon-wrapper"!==this.element.className.trim()||(this.element&&this.element.style&&(this.element.style.transform="perspective(".concat(this.settings.perspective,"px) ")+"rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"),this.resetGlare())}},{key:"resetGlare",value:function(){this.glare&&(this.glareElement.style.transform="rotate(180deg) translate(-50%, -50%)",this.glareElement.style.opacity="0")}},{key:"updateInitialPosition",
value:function(){if(0!==this.settings.startX||0!==this.settings.startY){this.onMouseEnter(),this.fullPageListening?this.event={clientX:(this.settings.startX+this.settings.max)/(2*this.settings.max)*this.clientWidth,clientY:(this.settings.startY+this.settings.max)/(2*this.settings.max)*this.clientHeight}:this.event={clientX:this.left+(this.settings.startX+this.settings.max)/(2*this.settings.max)*this.width,clientY:this.top+(this.settings.startY+this.settings.max)/(2*this.settings.max)*this.height};
var e=this.settings.scale;this.settings.scale=1,this.update(),this.settings.scale=e,this.resetGlare()}}},{key:"getValues",value:function(){var e,t;return this.fullPageListening?(e=this.event.clientX/this.clientWidth,t=this.event.clientY/this.clientHeight):(e=(this.event.clientX-this.left)/this.width,t=(this.event.clientY-this.top)/this.height),e=Math.min(Math.max(e,0),1),t=Math.min(Math.max(t,0),1),{tiltX:(this.reverse*(this.settings.max-e*this.settings.max*2)).toFixed(2),tiltY:(this.reverse*(t*this.settings.max*
2-this.settings.max)).toFixed(2),percentageX:100*e,percentageY:100*t,angle:Math.atan2(this.event.clientX-(this.left+this.width/2),-(this.event.clientY-(this.top+this.height/2)))*(180/Math.PI)}}},{key:"updateElementPosition",value:function(){var e=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=e.left,this.top=e.top}},{key:"updateBorder",value:function(){this.element.style.border="1px solid red"}},{key:"update",value:function(){var e=
this.getValues();this.element.style.transform="perspective("+this.settings.perspective+"px) rotateX("+("x"===this.settings.axis?0:e.tiltY)+"deg) rotateY("+("y"===this.settings.axis?0:e.tiltX)+"deg) scale3d("+this.settings.scale+", "+this.settings.scale+", "+this.settings.scale+")",this.glare&&(this.glareElement.style.transform="rotate(".concat(e.angle,"deg) translate(-50%, -50%)"),this.glareElement.style.opacity="".concat(e.percentageY*this.settings["max-glare"]/100)),this.element.dispatchEvent(new CustomEvent("tiltChange",
{detail:e})),this.updateCall=null}},{key:"prepareGlare",value:function(){if(!this.glarePrerender){var e=document.createElement("div");e.classList.add("js-tilt-glare");var t=document.createElement("div");t.classList.add("js-tilt-glare-inner"),e.appendChild(t),this.element.appendChild(e)}this.glareElementWrapper=this.element.querySelector(".js-tilt-glare"),this.glareElement=this.element.querySelector(".js-tilt-glare-inner"),this.glarePrerender||(Object.assign(this.glareElementWrapper.style,{position:"absolute",
top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden","pointer-events":"none"}),Object.assign(this.glareElement.style,{position:"absolute",top:"50%",left:"50%","pointer-events":"none","background-image":"linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)",width:"".concat(2*this.element.offsetWidth,"px"),height:"".concat(2*this.element.offsetWidth,"px"),transform:"rotate(180deg) translate(-50%, -50%)","transform-origin":"0% 0%",opacity:"0"}))}},{key:"updateGlareSize",value:function(){this.glare&&
Object.assign(this.glareElement.style,{width:"".concat(2*this.element.offsetWidth),height:"".concat(2*this.element.offsetWidth)})}},{key:"updateClientSize",value:function(){this.clientWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,this.clientHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}},{key:"onWindowResize",value:function(){this.updateGlareSize(),this.updateClientSize()}},{key:"setTransition",value:function(){var e=
this;clearTimeout(this.transitionTimeout),this.element.style.transition=this.settings.speed+"ms "+this.settings.easing,this.glare&&(this.glareElement.style.transition="opacity ".concat(this.settings.speed,"ms ").concat(this.settings.easing)),this.transitionTimeout=setTimeout(function(){e.element.style.transition="",e.glare&&(e.glareElement.style.transition="")},this.settings.speed)}},{key:"extendSettings",value:function(e){var t={reverse:!1,max:15,startX:0,startY:0,perspective:1E3,easing:"cubic-bezier(.03,.98,.52,.99)",
scale:1,speed:300,transition:!0,axis:null,glare:!1,"max-glare":1,"glare-prerender":!1,"full-page-listening":!1,"mouse-event-element":null,reset:!0,gyroscope:!0,gyroscopeMinAngleX:-45,gyroscopeMaxAngleX:45,gyroscopeMinAngleY:-45,gyroscopeMaxAngleY:45,gyroscopeSamples:10},n={};for(var o in t)if(o in e)n[o]=e[o];else if(this.element.hasAttribute("data-tilt-"+o)){var r=this.element.getAttribute("data-tilt-"+o);try{n[o]=JSON.parse(r)}catch(e){n[o]=r}}else n[o]=t[o];return n}},{key:"destroy",value:function(e){clearTimeout(this.transitionTimeout),
null!==this.updateCall&&cancelAnimationFrame(this.updateCall),this.reset(),this.destroys=!0,this.removeEventListeners(),this.element.removeAttribute("style"),void 0!==this.element.mouseTilt&&(this.element.mouseTilt=null,delete this.element.mouseTilt),bt[e]&&delete bt[e],this.element=null}}],[{key:"isSettingTrue",value:function(e){return""===e||!0===e||1===e}},{key:"init",value:function(t){var n=t.addonId,o=t.element,r=t.options;bt[n]=new e(o,r)}},{key:"getInstance",value:function(e){return bt[e]}}]),
e}(),gt=function(){function e(){(0,J.Z)(this,e),this.element=null,this.addonId=null}return(0,G.Z)(e,[{key:"parseBeforeFixedWindowPosition",value:function(e){var t={move:null,scale:null,skew:null,opacity:null,blur:null,rotate:null},n=new ft(e);n.bindCustomAnimation();var o={move:{x:0,y:0,z:0},scale:{x:1,y:1,z:1},skew:{x:0,y:0},rotate:{x:0,y:0,z:0},opacity:0,blur:0};return Object.keys(t).forEach(function(e){t[e]=n.getCustomAnimationActionByName(e),null!==t[e]&&t[e].length>0&&(o[e]=t[e][0].property)}),
Object.keys(o).forEach(function(e){void 0!==o[e].x&&(o[e].x=""===o[e].x?0:parseFloat(o[e].x)),void 0!==o[e].y&&(o[e].y=""===o[e].y?0:parseFloat(o[e].y)),void 0!==o[e].z&&(o[e].z=""===o[e].z?0:parseFloat(o[e].z))}),"{\n                will-change: transform;\n                transform : translate3d(".concat(o.move.x,"px, ").concat(o.move.y,"px, ").concat(o.move.z,"px) \n                                scale3d(").concat(o.scale.x,", ").concat(o.scale.y,", ").concat(o.scale.z,")\n                                rotateX(").concat(o.rotate.x,
"deg) rotateY(").concat(o.rotate.y,"deg) rotateZ(").concat(o.rotate.y,"deg) \n                                skew(").concat(o.skew.x,"deg, ").concat(o.skew.y,"deg);\n                }")}},{key:"parseScrollAction",value:function(e,t,n){var o=new ft(e);o.bindCustomAnimation();var r={move:{from:{x:0,y:0,z:0,keyframe:0,f:!1},to:{x:0,y:0,z:0,keyframe:0,f:!1},goal:{x:0,y:0,z:0,keyframe:0}},scale:{from:{x:1,y:1,z:1,keyframe:0},to:{x:1,y:1,z:1,keyframe:0},goal:{x:1,y:1,z:1,keyframe:0}},skew:{from:{x:0,y:0,
keyframe:0},to:{x:0,y:0,keyframe:0},goal:{x:0,y:0,keyframe:0}},rotate:{from:{x:0,y:0,z:0,keyframe:0},to:{x:0,y:0,z:0,keyframe:0},goal:{x:0,y:0,z:0,keyframe:0}},opacity:{from:{value:0,keyframe:0},to:{value:0,keyframe:0},goal:{value:1,keyframe:0}},blur:{from:{value:0,keyframe:0},to:{value:0,keyframe:0},goal:{value:0,keyframe:0}}};return o.actionProperty.map(function(e){var n=o.getCustomAnimationActionByName(e,t);null!==n.from&&(Object.assign(r[e].from,n.from.property),r[e].from.f=!0,r[e].from.keyframe=
parseInt(n.from.keyframe),void 0!==r[e].from.x&&(r[e].from.x=""===r[e].from.x?0:parseFloat(r[e].from.x)),void 0!==r[e].from.y&&(r[e].from.y=""===r[e].from.y?0:parseFloat(r[e].from.y)),void 0!==r[e].from.z&&(r[e].from.z=""===r[e].from.z?0:parseFloat(r[e].from.z)),void 0!==r[e].from.value&&(r[e].from.value=""===r[e].from.value?0:parseFloat(r[e].from.value))),null!==n.to&&(Object.assign(r[e].to,n.to.property),void 0!==r[e].to.x&&(r[e].to.x=""===r[e].to.x?0:parseFloat(r[e].to.x),r[e].goal.x=r[e].to.x),
void 0!==r[e].to.y&&(r[e].to.y=""===r[e].to.y?0:parseFloat(r[e].to.y),r[e].goal.y=r[e].to.y),void 0!==r[e].to.z&&(r[e].to.z=""===r[e].to.z?0:parseFloat(r[e].to.z),r[e].goal.z=r[e].to.z),void 0!==r[e].to.value&&(r[e].to.value=""===r[e].to.value?0:parseFloat(r[e].to.value),r[e].goal.value=r[e].to.value),r[e].to.keyframe=parseInt(n.to.keyframe),r[e].to.f=!0),!0===r[e].to.f&&!0===r[e].from.f&&void 0===n.fixed&&(r[e]="opacity"===e||"blur"===e?o.getOpacity(e,r[e],t):"skew"===e?o.getSkew(e,r[e],t):o.getMoveTransform(e,
r[e],t))}),"{\n            will-change:transform !important;\n            -webkit-transition-timing-function:ease !important;\n            transform-origin:".concat(n.x_offset," ").concat(n.y_offset,";\n            transform-style:preserve-3d !important;\n            opacity: ").concat(r.opacity.goal.value,";\n            filter: blur(").concat(r.blur.goal.value,"px);\n            -webkit-filter: blur(").concat(r.blur.goal.value,"px);\n            transform:perspective(1000px) translate3d(").concat(r.move.goal.x,
"px, ").concat(r.move.goal.y,"px, ").concat(r.move.goal.z,"px) \n                    scale3d(").concat(r.scale.goal.x,", ").concat(r.scale.goal.y,", ").concat(r.scale.goal.z,")\n                    rotateX(").concat(r.rotate.goal.x,"deg) rotateY(").concat(r.rotate.goal.y,"deg) rotateZ(").concat(r.rotate.goal.z,"deg) \n                    skew(").concat(r.skew.goal.x,"deg, ").concat(r.skew.goal.y,"deg) !important;\n        }")}}]),e}(),Et=new gt;function yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
var wt=function(e){var t=e.sections,n=e.sectionsObject,o=e.addonList,r=e.addon,a=e.options,i=[],c=[];return r.id=qe(),function e(r){o.forEach(function(o){var s,u=null===(s=r.children)||void 0===s?void 0:s.findIndex(function(e){return e===o.id});if(at(u)&&-1!==u){var m,p=qe();null===(m=r.children)||void 0===m||m.splice(u,1,p);var v=K()(o);if(v.parent=r.id,Object.keys(d).includes(v.name)){var f=xt({sections:t,sectionsObject:n,addon:v,addonId:p,options:{rowId:a.rowId,columnId:a.columnId}});c=f.sections}else v.name===
l?(v.id=p,v=Ot(v)):v.id=p;i.push(v),"div"===v.name&&e(v)}})}(r),{divAddon:r,children:i,nestedSections:c}},xt=function(e){var t,n=e.sections,o=e.sectionsObject,r=e.addon,a=e.options,i=e.addonId,l=void 0===i?qe():i,c=[],s=r;return s.id=l,(null===(t=s.settings)||void 0===t?void 0:t[d[s.name].key]).forEach(function(e){e.content.forEach(function(e){var t=o[e.id];if(!at(t))return null;var r=qe();e.id=r;var i=K()(t);i.id=r,i.parent_addon=s.id,at(a)&&(i.parent={rowId:a.rowId,columnId:a.columnId}),c.push(i);
var l=It({sections:n,sectionsObject:o,section:i});c.push.apply(c,(0,ue.Z)(l))})}),{addon:s,sections:c}},It=function(e){var t=e.sections,n=e.sectionsObject,o=e.section,r=[];return o.columns.forEach(function(e){e.id=qe();var a=[];e.addons.forEach(function(i){if(!i.parent)if(Object.keys(d).includes(i.name)){var c=xt({sections:t,sectionsObject:n,addon:i,options:{rowId:o.id,columnId:e.id}});at(c)&&(a.push(c.addon),r.push.apply(r,(0,ue.Z)(c.sections)))}else if("nested_row"===i.type){var s=function(e){var t=
e.sections,n=e.sectionsObject,o=e.addon,r=e.options,a=[],i=o,l=n[i.id];if(!at(l))return null;i.id=qe();var c=K()(l);c.id=i.id,at(r)&&(c.parent={rowId:r.rowId,columnId:r.columnId}),a.push(c);var s=It({sections:t,sectionsObject:n,section:c});return a.push.apply(a,(0,ue.Z)(s)),{addon:i,sections:a}}({sections:t,sectionsObject:n,addon:i,options:{rowId:o.id,columnId:e.id}});at(s)&&(a.push(s.addon),r.push.apply(r,(0,ue.Z)(s.sections)))}else if("div"===i.name){var u=wt({sections:t,sectionsObject:n,addon:i,
addonList:e.addons,options:{rowId:o.id,columnId:e.id}}),m=u.divAddon,p=u.children,v=u.nestedSections;a.push.apply(a,[m].concat((0,ue.Z)(p))),r.push.apply(r,(0,ue.Z)(v))}else if(i.name===l){i.id=qe();var f=Ot(i);a.push(f)}else i.id=qe(),a.push(i)}),a.length>0&&(e.addons=a)}),r},Ot=function(e){var t=function(t){return t.map(function(t){var n,o;return _t(_t({},t),{},c in t?(0,B.Z)({},c,t[c].map(function(t){var n,o;return _t(_t({},t),{},{content:null!==(n=null==t||null===(o=t.content)||void 0===o?void 0:
o.map(function(t){return _t(_t({},t),{},{id:qe(),reference_id:e.id})}))&&void 0!==n?n:[]})})):{content:null!==(n=null==t||null===(o=t.content)||void 0===o?void 0:o.map(function(t){return _t(_t({},t),{},{id:qe(),reference_id:e.id})}))&&void 0!==n?n:[]})})};return at(e.settings)?(e.settings[s]=t(e.settings[s]),e.settings[c]=t(e.settings[c]),e):e},Ct=n(5861),At=n(4687),Nt=n.n(At);function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Pt=function e(t,n,o){n&&(n.columns.forEach(function(n){n.addons.forEach(function(n){if(Object.keys(Me).includes(n.name))n.settings["jp_".concat(n.name,
"_item")].forEach(function(n){n.content.forEach(function(n){var r=t[n.id];r&&e(t,r,o)})});else if("nested_row"===n.type){var r=t[n.id];r&&e(t,r,o)}})}),o.push(n))},kt=function(e,t){var n={};e.forEach(function(e){return n[e.id]=e});var o=[];return t&&Pt(n,St(St({},t),{},{parent:!1}),o),o.reverse()},Rt=function e(t){var n,o=t.addon,r=t.divAddons,a=t.objAddons,i=t.objRows,l=t.newRows;null==o||null===(n=o.children)||void 0===n||n.forEach(function(t){var n=a[t];if(r.push(n),Gt(n)&&Object.keys(Me).includes(n.name))n.settings["jp_".concat(n.name,
"_item")].forEach(function(e){e.content.forEach(function(e){var t=i[e.id];t&&Pt(i,t,l)})});else if("nested_row"===(null==n?void 0:n.type)){var o=i[n.id];o&&Pt(i,o,l)}else"div"===n.name&&e({addon:n,divAddons:r,objAddons:a,objRows:i,newRows:l})})},Tt=function(e){var t=e.sections,n=e.addon,o=e.rowIndex,r=e.colIndex,a=K()(n),i={};t.forEach(function(e){return i[e.id]=e});var l=[],c=[];if(a.parent&&(a.parent=!1),Gt(a)&&Object.keys(Me).includes(a.name))a.settings["jp_".concat(a.name,"_item")].forEach(function(e){e.content.forEach(function(e){var t=
i[e.id];t&&Pt(i,t,l)})});else if("div"===a.name){var s;c.push(a);var d=(null==t||null===(s=t[o])||void 0===s||null===(s=s.columns)||void 0===s||null===(s=s[r])||void 0===s?void 0:s.addons)||[],u={};d.forEach(function(e){return u[e.id]=e}),Rt({addon:a,divAddons:c,objAddons:u,objRows:i,newRows:l})}return{name:a.name,addon:"div"===a.name?c:[a],rows:l.reverse()}},Lt=function(e){var t=[];try{var n=localStorage.getItem(e);if(n){var o=JSON.parse(n);Array.isArray(o)&&(t=o)}}catch(e){re(Joomla.Text._("COM_JPAGEBUILDER_ERROR_MSG_FOR_COPIED_ROW"),
"Warn")}return t},Mt=function(e,t){localStorage.setItem(e,JSON.stringify(t))},Zt=function(e){var t={addonName:"",addonData:null};try{var n=localStorage.getItem(e);if(n){var o=JSON.parse(n);null!=o&&o.addonData&&null!=o&&o.addonName&&(t=o)}}catch(e){re(Joomla.Text._("COM_JPAGEBUILDER_ERROR_MSG_FOR_COPIED_ADDON"),"Warn")}return t},jt=function(e,t){var n=t.addonName,o=t.addonData;localStorage.setItem(e,JSON.stringify({addonName:n,addonData:o}))},Bt=function(){var e=arguments.length>0&&void 0!==arguments[0]?
arguments[0]:{},t=" ",n=["1",1,"true",!0],o=e.hidden_xl,r=e.hidden_lg,a=e.hidden_md,i=e.hidden_sm,l=e.hidden_xs;return n.includes(o)&&(t+="builder-hidden-xl "),n.includes(r)&&(t+="builder-hidden-lg "),n.includes(a)&&(t+="builder-hidden-md "),n.includes(i)&&(t+="builder-hidden-sm "),n.includes(l)&&(t+="builder-hidden-xs "),t},Jt=function(e){var t=e.settings,n=void 0===t?{}:t,o=e.targetProperty,r=void 0===o?"enable_animation":o;return!(0===Object.keys(n).length||(ut(n,r)?!n[r]||null==n||!n.animation:
null==n||!n.animation))},Gt=function(e){return null!=e},Ht=function(e){return Array.from(Array(e).keys())},Ut=function(e){var t="",n={};return e.global_use_animation&&e.global_animation&&(t+=" jpb-wow "+e.global_animation,e.global_animationduration&&(n["data-jpb-wow-duration"]="".concat(e.global_animationduration,"ms")),e.global_animationdelay&&(n["data-jpb-wow-delay"]="".concat(e.global_animationdelay,"ms"))),{animationAttr:n,animationClass:t}},zt=function(){var e=arguments.length>0&&void 0!==arguments[0]?
arguments[0]:[];return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?e.map(function(e){return""!==toString(e.value)?St(St({},e),{},{isDisabled:!0}):e}):e},Ft=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n=arguments;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:"",e.abrupt("return",new Promise(function(e,n){var o=new Image;o.src=t,o.onload=function(){return e(o)},o.onerror=function(){return n()}}));case 2:case "end":return e.stop()}},
e)}));return function(){return e.apply(this,arguments)}}(),Vt=n(2902),Wt=n(1469),Kt=n.n(Wt),Yt=n(7037),Xt=n.n(Yt);function qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=
arguments[t]?arguments[t]:{};t%2?$t(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var en=Object.freeze({div:"div",table_advanced:"table_advanced",accordion:"accordion",tab:"tab"}),tn=function(){var e={},t=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(n,o){n.parent||
t.push(n.id),e[n.id]={row:n,rowIndex:o}});var n=[];return t.forEach(function(t){var o=e[t].row;o&&dn({row:o},e,n)}),n.reverse()},nn=function(e){var t=e.sections,n=e.sectionsObject,o=e.addonList,r=e.addon,a=e.options,i=[],c=[];return r.id=qe(),function e(r){o.forEach(function(o){var s,u=null===(s=r.children)||void 0===s?void 0:s.findIndex(function(e){return e===o.id});if(at(u)&&-1!==u){var m,p=qe();null===(m=r.children)||void 0===m||m.splice(u,1,p);var v=K()(o);if(v.parent=r.id,Object.keys(d).includes(v.name)){var f=
on({sections:t,sectionsObject:n,addon:v,addonId:p,options:{rowId:a.rowId,columnId:a.columnId}});c=f.sections}else v.name===l?(v.id=p,v=an(v)):v.id=p;i.push(v),"div"===v.name&&e(v)}})}(r),{divAddon:r,children:i,nestedSections:c}},on=function(e){var t,n=e.sections,o=e.sectionsObject,r=e.addon,a=e.options,i=e.addonId,l=void 0===i?qe():i,c=[],s=r;return s.id=l,(null===(t=s.settings)||void 0===t?void 0:t[d[s.name].key]).forEach(function(e){e.content.forEach(function(e){var t=o[e.id];if(!at(t))return null;
var r=qe();e.id=r;var i=K()(t);i.id=r,i.parent_addon=s.id,at(a)&&(i.parent={rowId:a.rowId,columnId:a.columnId}),c.push(i);var l=rn({sections:n,sectionsObject:o,section:i});c.push.apply(c,(0,ue.Z)(l))})}),{addon:s,sections:c}},rn=function(e){var t=e.sections,n=e.sectionsObject,o=e.section,r=[];return o.columns.forEach(function(e){e.id=qe();var a=[];e.addons.forEach(function(i){if(!i.parent)if(Object.keys(d).includes(i.name)){var c=on({sections:t,sectionsObject:n,addon:i,options:{rowId:o.id,columnId:e.id}});
at(c)&&(a.push(c.addon),r.push.apply(r,(0,ue.Z)(c.sections)))}else if("nested_row"===i.type){var s=ln({sections:t,sectionsObject:n,addon:i,options:{rowId:o.id,columnId:e.id}});at(s)&&(a.push(s.addon),r.push.apply(r,(0,ue.Z)(s.sections)))}else if("div"===i.name){var u=nn({sections:t,sectionsObject:n,addon:i,addonList:e.addons,options:{rowId:o.id,columnId:e.id}}),m=u.divAddon,p=u.children,v=u.nestedSections;a.push.apply(a,[m].concat((0,ue.Z)(p))),r.push.apply(r,(0,ue.Z)(v))}else if(i.name===l){i.id=
qe();var f=an(i);a.push(f)}else if(i.name===R.productList){var b;i.id=qe();var h=null!==(b=i.items)&&void 0!==b?b:[];h.forEach(function(e,t){var n=[];e.forEach(function(t){if(!t.parent)if("div"===t.name){var o=cn({addon:t,addonList:e}),r=o.divAddon,a=o.children;n.push.apply(n,[r].concat((0,ue.Z)(a)))}else t.id=qe(),n.push(t)}),h[t]=n}),a.push(i)}else i.id=qe(),a.push(i)}),a.length>0&&(e.addons=a)}),r},an=function(e){var t=function(t){return t.map(function(t){return Qt(Qt({},t),{},c in t?(0,B.Z)({},
c,t[c].map(function(t){return Qt(Qt({},t),{},{content:t.content.map(function(t){return Qt(Qt({},t),{},{id:qe(),reference_id:e.id})})})})):{content:t.content.map(function(t){return Qt(Qt({},t),{},{id:qe(),reference_id:e.id})})})})};return at(e.settings)?(e.settings[s]=t(e.settings[s]),e.settings[c]=t(e.settings[c]),e):e},ln=function(e){var t=e.sections,n=e.sectionsObject,o=e.addon,r=e.options,a=[],i=o,l=n[i.id];if(!at(l))return null;i.id=qe();var c=K()(l);c.id=i.id,at(r)&&(c.parent={rowId:r.rowId,
columnId:r.columnId}),a.push(c);var s=rn({sections:t,sectionsObject:n,section:c});return a.push.apply(a,(0,ue.Z)(s)),{addon:i,sections:a}},cn=function(e){var t=e.addonList,n=e.addon,o=[];return n.id=qe(),function e(n){t.forEach(function(t){var r,a=null===(r=n.children)||void 0===r?void 0:r.findIndex(function(e){return e===t.id});if(at(a)&&-1!==a){var i,l=qe();null===(i=n.children)||void 0===i||i.splice(a,1,l);var c=K()(t);c.parent=n.id,c.id=l,o.push(c),"div"===c.name&&e(c)}})}(n),{divAddon:n,children:o}},
sn=function(e){var t=e.id,n=void 0===t?qe():t,o=e.column,r=e.rowId,a=e.stateObj,i=e.clonedRows,l=K()(o);l.id=n;var c=[],s=l.addons,d={rowId:r,columnId:n};return s.forEach(function(e){if(!e.parent){var t=un({addonData:{addon:e},parent:d,stateObj:a,clonedRows:i,newAddons:c,addons:s}).clonedAddon;c=[].concat((0,ue.Z)(c),[t])}}),l.addons=c,l},dn=function(e,t,n){var o=e.id,r=void 0===o?qe():o,a=e.row,i=e.parent_addon,l=void 0===i?null:i,c=e.parent,s=void 0===c?null:c,d=K()(a);d.id=r,l&&(d.parent_addon=
l),s&&(d.parent=s),d.columns=d.columns.map(function(e){return sn({column:e,rowId:r,stateObj:t,clonedRows:n})}),n.push(d)},un=function e(t){var n,o=t.addonData,r=t.parent,a=t.stateObj,i=t.clonedRows,l=t.addons,c=t.newAddons,s=function(e){var t,n,o,r=e.addon,a=e.id,i=void 0===a?qe():a,l=e.parent,c=void 0===l?void 0:l,s={},d=K()(r);if(d.id=i,null!==(t=d.settings)&&void 0!==t&&t.instFormId&&(d.settings.instFormId=i),d.name===en.table_advanced){var u=d.settings,m=u.jp_table_advanced_item,p=u.table_advanced_item;
d.settings.jp_table_advanced_item=m.map(function(e){return e.content=e.content.map(function(e){return Qt(Qt({},e),{},{id:qe(),reference_id:i})}),e}),d.settings.table_advanced_item=p.map(function(e){return e.table_advanced_item=e.table_advanced_item.map(function(e){return e.content=e.content.map(function(e){return Qt(Qt({},e),{},{id:qe(),reference_id:i})}),e}),e})}return d.htmlContent&&(d.htmlContent=d.htmlContent.replaceAll("-".concat(r.id),"-".concat(i))),null!==(n=d.assets)&&void 0!==n&&n.css&&
(d.assets.css=d.assets.css.replaceAll("-".concat(r.id),"-".concat(i))),null!==(o=d.assets)&&void 0!==o&&o.js&&(d.assets.js=d.assets.js.replaceAll("-".concat(r.id),"-".concat(i))),r.children&&Array.isArray(r.children)&&(d.children=d.children.map(function(e){var t=qe();return s[e]={id:t,parent:i},t})),c&&(d.parent=c),{clonedAddon:d,clonedChildren:s}}(o),d=s.clonedAddon,u=s.clonedChildren,m="jp_".concat(d.name,"_item"),p=[en.accordion,en.tab].includes(o.addon.name),v=Object.entries(u);if(v.length&&v.forEach(function(t){var n=
(0,j.Z)(t,2),o=n[0],s=n[1],d=s.id,u=s.parent,m=l.find(function(e){return e.id.toString()===o});if(m){var p=e({addonData:{addon:m,id:d,parent:u},parent:r,stateObj:a,clonedRows:i,newAddons:c,addons:l}).clonedAddon;c.push(p)}}),"nested_row"===o.addon.type){var f=o.addon.id,b=((null==a?void 0:a[f])||{}).row;return b&&dn({id:d.id,row:b,parent:r},a,i),{clonedAddon:d,clonedChildren:u}}if(!m||null===(n=d.settings)||void 0===n||null===(n=n[m])||void 0===n||!n.length||!p)return{clonedAddon:d,clonedChildren:u};
var h=[];return d.settings[m]=d.settings[m].map(function(e){var t=e.content;return t.length?(t=t.map(function(e){var t=qe();return h.push({newRowId:t,oldRowId:e.id}),e.id=t}),e):e}),h.forEach(function(e){var t=e.newRowId,n=e.oldRowId,o=a[n].row;dn({id:t,row:o,parent_addon:d.id,parent:r},a,i)}),{clonedAddon:d,clonedChildren:u}},mn=function(e,t){var n=t.parent,o=n.rowId,r=n.columnId;return e.map(function(e){return o===e.id?Qt(Qt({},e),{},{columns:e.columns.map(function(e){return r===e.id?Qt(Qt({},e),
{},{addons:e.addons.filter(function(e){return e.id!==t.id})}):e})}):e})},pn=function e(t,n,o){var r=o.filter(function(e){return e.id!==n.id});return n.parent&&fe()(n.parent)&&(r=mn(r,n)),n.columns.forEach(function(n){n.addons.forEach(function(n){if(Object.keys(Me).includes(n.name))n.settings["jp_".concat(n.name,"_item")].forEach(function(n){Array.isArray(n.content)&&n.content.forEach(function(n){var o=t[n.id];o&&(r=e(t,o,r))})});else if("nested_row"===(null==n?void 0:n.type)){var o=t[n.id];o&&(r=
e(t,o,r))}})}),r},vn=function(e,t){var n,o=Ye(),r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return qt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=
0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}(je);try{for(r.s();!(n=r.n()).done;){var a=
n.value;o[a]=t.includes(a)?e:"100%"}}catch(e){r.e(e)}finally{r.f()}return o},fn=function(e){var t=e.addons,n=e.addonToDelete;return t.flatMap(function(e){return e.id===n.id?[]:null!=n&&n.parent&&n.parent===e.id?Qt(Qt({},e),e.children&&{children:e.children.filter(function(e){return e.toString()!==n.id.toString()})}):e})},bn=function e(t){var n=t.addons,o=t.addonToDelete,r=t.removedAddonList,a=void 0===r?[]:r,i=fn({addons:n,addonToDelete:o}),l=[];if(a.push(o),"div"===o.name&&null!=o&&o.children){var c=
o.children;i.forEach(function(e){c.includes(e.id)&&l.push(e)})}return a.push.apply(a,l),l.forEach(function(t){i="div"===t.name?e({addons:i,addonToDelete:t,removedAddonList:a}):fn({addons:i,addonToDelete:t})}),i},hn=function(e){var t=e.rows,n=e.rowId,o=e.columnId,r=e.addonId,a=e.referenceId,i={};t.forEach(function(e){return i[e.id]=e});var l=t.findIndex(function(e){return e.id===n}),c=t[l].columns.findIndex(function(e){return e.id===o}),s=t[l].columns[c].addons;if(void 0!==a){var d=s.find(function(e){return e.id===
a});return"table_advanced"===(null==d?void 0:d.name)?function(e){var t=e.rows,n=e.rowId,o=e.columnId,r=e.addonId,a=e.referenceId,i=e.referenceAddon,l=Qt(Qt({},i),{},{settings:Qt(Qt({},i.settings),{},{jp_table_advanced_item:i.settings.jp_table_advanced_item.map(function(e){return Qt(Qt({},e),{},{content:e.content.filter(function(e){return e.id!==r})})}),table_advanced_item:i.settings.table_advanced_item.map(function(e){return Qt(Qt({},e),{},{table_advanced_item:e.table_advanced_item.map(function(e){return Qt(Qt({},
e),{},{content:e.content.filter(function(e){return e.id!==r})})})})})})});return t.map(function(e){return n===e.id?Qt(Qt({},e),{},{columns:e.columns.map(function(e){return e.id===o?Qt(Qt({},e),{},{addons:e.addons.map(function(e){return e.id===a?l:e})}):e})}):e})}({rows:t,referenceAddon:d,rowId:n,columnId:o,addonId:r,referenceId:a}):t}var u=s.find(function(e){return e.id===r}),m=[];if(!u)return t;var p=bn({addons:s,addonToDelete:u,removedAddonList:m}),v=t;return m.forEach(function(e){if(Object.keys(Me).includes(e.name))e.settings["jp_".concat(e.name,
"_item")].forEach(function(e){e.content.forEach(function(e){var t=i[e.id];t&&(v=pn(i,t,v))})});else if("nested_row"===(null==e?void 0:e.type)){var t=i[e.id];t&&(v=pn(i,t,v))}}),v=v.map(function(e){return n===e.id?Qt(Qt({},e),{},{columns:e.columns.map(function(e){return e.id===o?Qt(Qt({},e),{},{addons:p}):e})}):e}),v},gn=function(e,t){at(e.parent)&&"boolean"!=typeof e.parent&&t.forEach(function(t){var n;t.id===e.parent&&(t.children=null===(n=t.children)||void 0===n?void 0:n.filter(function(t){return t!==
e.id}),e.parent=!1)})},En=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(null===(t=e.settings)||void 0===t?void 0:t[d[e.name].key]).forEach(function(e){e.content.forEach(function(e){var t=n.findIndex(function(t){return t.id===e.id});if(-1===t)return null;var o=n[t];at(o)&&(n.splice(t,1),wn(o,n))})})},yn=function(e){var t=e.sections,n=e.sectionIndex,o=e.sectionId,r=void 0===o?qe():o,a=e.independent,i=void 0===a||a,l=Object.fromEntries(t.map(function(e,t){return[e.id,
Qt(Qt({},e),{},{index:t})]})),c=t[n],s=K()(c);s.id=r,i&&(s.parent=!1),s.parent_addon&&i&&delete s.parent_addon,s.columns.forEach(function(e){e.id=qe()});var d=rn({sections:t,sectionsObject:l,section:s});return[s].concat((0,ue.Z)(d))},_n=function(e,t){var n=t.findIndex(function(t){return t.id===e.id});if(-1===n)return null;var o=t[n];at(o)&&(t.splice(n,1),wn(o,t))},wn=function(e,t){at(e)&&e.columns.forEach(function(e){e.addons.forEach(function(e){Object.keys(d).includes(e.name)?En(e,t):"nested_row"===
e.type&&_n(e,t)})})},xn=function(e){var t=e.rows,n=e.dragInfo,o=e.hoverInfo,r=e.isLayer,a=void 0!==r&&r,i=n.dragRowId,l=n.dragColumnId,c=n.dragAddonId,s=o.hoverRowId,d=o.hoverColumnId,u=o.hoverAddonId,m=o.position,p=s===i,v=d===l,f="bottom"===m,b=function(e,t,n){return e?[].concat((0,ue.Z)(n),(0,ue.Z)(t)):[].concat((0,ue.Z)(t),(0,ue.Z)(n))},h=function(e,t){var n;return Qt(Qt({},e),{},{children:null!==(n=null==e?void 0:e.children.filter(function(e){return e.toString()!==t.toString()}))&&void 0!==n?
n:[]})},g=function(e){var t,n,o=e.addon,r=e.hoverAddonId,a=void 0===r?null:r,i=e.childIdToAdd,l=e.isPositionBottom,c=void 0!==l&&l,s=e.dragAddon,d=void 0===s?{}:s;return"nested_row"===(null==d?void 0:d.type)?o:Qt(Qt({},o),{},a?{children:(t=o,null!=t&&null!==(n=t.children)&&void 0!==n&&n.length?t.children.flatMap(function(e){return e.toString()===a.toString()?b(c,[i],[e]):e}):[i])}:{children:o.children?[].concat((0,ue.Z)(o.children),[i]):[i]})},E=function(e,t){return"nested_row"===(null==e?void 0:
e.type)?e:Qt(Qt({},e),{},t?{parent:t}:{parent:!1})},y=function(e){var t,n=e.findIndex(function(e){return e.id===u}),o=e[n],r=e.findIndex(function(e){return e.id===c}),i=e[r],l=null==o?void 0:o.parent,s=null==i?void 0:i.parent;if(l&&s&&l===s){var d={addons:e,hoverParentId:l,dragAddonId:c,hoverAddonId:u};return a?function(e){var t=e.addons,n=e.hoverParentId,o=e.dragAddonId,r=e.hoverAddonId,a=function(e,t){return e.findIndex(function(e){return t.toString()===e.toString()})};return t.flatMap(function(e){if(e.id===
n){var t=a(e.children,o),i=a(e.children,r),l=null==e?void 0:e.children.flatMap(function(e){return e.toString()===o.toString()?[]:e.toString()===r.toString()?t<i?[r,o]:[o,r]:e});return Qt(Qt({},e),{},{children:null!=l?l:[]})}return e})}(d):function(e){var t=e.addons,n=e.hoverParentId,o=e.dragAddonId,r=e.hoverAddonId,a=e.position;return t.flatMap(function(e){if(e.id===n){var t=null==e?void 0:e.children.flatMap(function(e){return e.toString()===o.toString()?[]:e.toString()===r.toString()?"bottom"===
a?[r,o]:[o,r]:e});return Qt(Qt({},e),{},{children:null!=t?t:[]})}return e})}(Qt(Qt({},d),{},{position:m}))}return"div"!==o.name||null!=o&&null!==(t=o.children)&&void 0!==t&&t.length?o.parent?e.flatMap(function(e){return e.id===o.parent?g({addon:e,hoverAddonId:o.id,childIdToAdd:i.id,isPositionBottom:f,dragAddon:i}):e.id===c?E(i,o.parent):null!=i&&i.parent&&e.id===i.parent?h(e,i.id):e}):e.flatMap(function(e){if(u===e.id){var t=o;null!=i&&i.parent&&u===i.parent&&(t=h(o,i.id));var l=E(i,null);return a&&
r<n||!a&&f?[t,l]:[l,t]}return c===e.id?[]:null!=i&&i.parent&&e.id===i.parent?h(e,i.id):e}):e.flatMap(function(e){return e.id===o.id?g({addon:e,hoverAddonId:o.id,childIdToAdd:i.id,isPositionBottom:f,dragAddon:i}):e.id===c?E(i,o.id):null!=i&&i.parent&&e.id===i.parent?h(e,i.id):e})},_=function(e){var t=e.column,n=e.hoverAddonId,o=e.hoverAddon,r=e.dragAddonId,a=e.dragAddon,i=e.isPositionBottom,l=e.dragAddonData;if(!n){var c=E(a,null);return Qt(Qt({},t),{},{addons:[c].concat((0,ue.Z)(l.addon.slice(1)))})}return Qt(Qt({},
t),{},{addons:t.addons.flatMap(function(e){if(n===e.id){if("div"===o.name){var t=E(a,n),c=g({addon:e,childIdToAdd:r,dragAddon:a});return b(i,[t].concat((0,ue.Z)(l.addon.slice(1))),[c])}var s=E(a,e.parent);return b(i,[s].concat((0,ue.Z)(l.addon.slice(1))),[e])}return"div"!==o.name&&null!=o&&o.parent&&o.parent===e.id?g({addon:e,hoverAddonId:n,childIdToAdd:r,isPositionBottom:i,dragAddon:a}):e})})},w=function(e,t){if(!v){var n=e.findIndex(function(e){return e.id===l}),o=e[n].addons.find(function(e){return e.id===
c}),r=e.find(function(e){return e.id===d}).addons.find(function(e){return e.id===u});return e.map(function(e){if(e.id===d){if(!u){var n=E(o,null);return Qt(Qt({},e),{},{addons:[n].concat((0,ue.Z)(t.addon.slice(1)))})}return _({column:e,hoverAddonId:u,hoverAddon:r,dragAddonId:c,dragAddon:o,isPositionBottom:f,dragAddonData:t})}return e.id===l?Qt(Qt({},e),{},{addons:e.addons.flatMap(function(e){return t.addon.find(function(t){return t.id===e.id})?[]:null!=o&&o.parent&&o.parent===e.id?h(e,o.id):e})}):
e})}return v?e.map(function(e){return e.id===d?Qt(Qt({},e),{},{addons:y(e.addons)}):e}):e};return function(e){var t,n,o=e.findIndex(function(e){return e.id===i}),r=e[o];if(!at(r))return e;var a=r.columns.findIndex(function(e){return e.id===l}),m=r.columns[a];if(!at(m))return e;var v=m.addons.find(function(e){return e.id===c}),b=e.find(function(e){return e.id===s}),g=null==b||null===(t=b.columns)||void 0===t?void 0:t.find(function(e){return e.id===d}),E=null==g||null===(n=g.addons)||void 0===n?void 0:
n.find(function(e){return e.id===u}),y=function(e){var t=e.sections,n=e.addon,o=e.rowIndex,r=e.colIndex,a=K()(n),i={};t.forEach(function(e){return i[e.id]=e});var l=[],c=[];if(Gt(a)&&Object.keys(Me).includes(a.name))a.settings["jp_".concat(a.name,"_item")].forEach(function(e){e.content.forEach(function(e){var t=i[e.id];t&&Pt(i,t,l)})});else if("div"===a.name){var s;c.push(a);var d=(null==t||null===(s=t[o])||void 0===s||null===(s=s.columns)||void 0===s||null===(s=s[r])||void 0===s?void 0:s.addons)||
[],u={};d.forEach(function(e){return u[e.id]=e}),Rt({addon:a,divAddons:c,objAddons:u,objRows:i,newRows:l})}else if("nested_row"===(null==a?void 0:a.type)){var m=i[a.id];m&&Pt(i,m,l)}return{name:a.name,addon:"div"===a.name?c:[a],rows:l.reverse()}}({sections:e,addon:v,rowIndex:o,colIndex:a});return at(y)?p?e.flatMap(function(e){return y.rows.find(function(t){return t.id===e.id})&&l===e.parent.columnId?Qt(Qt({},e),e.parent&&{parent:Qt(Qt({},e.parent),{},{columnId:d})}):p&&e.id===s?Qt(Qt({},e),{},{columns:w(e.columns,
y)}):e}):e.map(function(e){return y.rows.find(function(t){return t.id===e.id})&&e.parent.rowId===i?Qt(Qt({},e),{},{parent:{rowId:s,columnId:d}}):i===e.id?Qt(Qt({},e),{},{columns:e.columns.map(function(e){return l===e.id?Qt(Qt({},e),{},{addons:e.addons.flatMap(function(e){return y.addon.find(function(t){return t.id===e.id})?[]:null!=v&&v.parent&&v.parent===e.id?h(e,v.id):e})}):e})}):s===e.id?Qt(Qt({},e),{},{columns:e.columns.map(function(e){return d===e.id?_({column:e,hoverAddonId:u,hoverAddon:E,dragAddonId:c,
dragAddon:v,isPositionBottom:f,dragAddonData:y}):e})}):e}):e}(t)},In=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,Vt.ZP)(e,function(e){e.forEach(function(e){!function(e){["image","video"].includes(e.settings.background_type)&&void 0===e.settings.overlay_type&&(e.settings.overlay_type="overlay_color"),e.parent&&(e.settings.fullscreen=1)}(e),e.columns.forEach(function(e){e.addons.forEach(function(e){"testimonialpro"===e.name&&(e.settings.hasOwnProperty("tab_arrows")||
(e.settings.tab_arrows="normal"))})})})})};function On(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=
0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}function Cn(e,t){(null==t||t>
e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,
Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Dn=(new Date).getTime(),Sn=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"12").split("+").map(function(e){var t=e.trim();return Number(t)>12?"12":
t}).filter(Number),r=window.rowSettings.default,a=window.colSettings.default;e||(e={}),t||(t={});var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"row",n=e.padding,o=e.margin,r=["lg","md","sm","xl","xs"];return Nn(Nn({},("row"===t?window.rowSettings:window.colSettings).default),{},{padding:r.reduce(function(e,t){return e[t]=t===window.builderDefaultDevice?n:"",e},{}),margin:r.reduce(function(e,t){return e[t]=
t===window.builderDefaultDevice?o:"",e},{})})};Object.keys(e).length>0&&(r=i(e)),Object.keys(t).length>0&&(a=i(t,"col"));var l=o.flatMap(function(e){var t=e.trim();if(!/^\d+$/.test(t))return[];var n=parseInt(t)>12?12:parseInt(t),o="".concat(parseFloat((100/(12/n)).toFixed(6)),"%"),r={xl:o,lg:o,md:o,sm:"100%",xs:"100%"};return{id:Dn++,class_name:"row-column",visibility:!0,settings:Nn(Nn({},a),{},{width:r}),addons:[]}}),c=o.join("+");return{id:n||Dn++,visibility:!0,collapse:!1,settings:r,layout:c,columns:l,
parent:!1}},Pn=function(e,t,n){switch(t.type){case "ROW_TOGGLE":return e.id!==t.id?e:Object.assign({},e,{visibility:!e.visibility});case "TOGGLE_COLLAPSE":return e.id!==t.id?e:Object.assign({},e,{collapse:!e.collapse});case "ROW_SETTING":return(0,Vt.ZP)(e,function(e){e.settings=t.settings.formData});case "CHANGE_COLUMN":var o=jn(e.columns,t);return Object.assign({},e,{layout:o.layout,columns:o.columns});case "COLUMN_SETTING":var r=Number(t.settings.colIndex),a=r+1,i=Object.assign({},e.columns[t.settings.colIndex]);
return i.settings=t.settings.formData,Object.assign({},e,{columns:[].concat((0,ue.Z)(e.columns.slice(0,r)),[i],(0,ue.Z)(e.columns.slice(a)))});case "ADDON_SETTING":case "ADDON_EDIT":case "CLONE_ADDON":case "PASTE_ADDON":case "PASTE_INNER_ADDON":case "PASTE_INNER_ROW":case "CLONE_INNER_ROW":case "CHANGE_INNER_COLUMN":case "DELETE_ADDON":case "ADD_INNER_ROW":case "INNER_ROW_TOGGLE":case "ADD_INNER_ROW_BOTTOM":case "INNER_ROW_SETTING":case "INNER_COLUMN_SETTING":case "ADDON_INNER_SETTING":case "CLONE_INNER_ADDON":case "DELETE_INNER_ADDON":case "ADDON_INNER_EDIT":case "TOGGLE_COLUMN":case "DELETE_INNER_COLUMN":case "TOGGLE_INNER_COLUMN":case "DISABLE_ADDON":case "DISABLE_INNER_ADDON":if(void 0===
t.settings.colIndex)return e;var l=Number(t.settings.colIndex),c=l+1,s=Object.assign({},e.columns[l]),d=Rn(s,t,n);if(null!=d&&d.column){var u=Object.assign({},e,{columns:[].concat((0,ue.Z)(e.columns.slice(0,l)),[d.column],(0,ue.Z)(e.columns.slice(c)))});return null!=d&&d.options&&(d.options.columnId=s.id),{row:u,options:null==d?void 0:d.options}}return Object.assign({},e,{columns:[].concat((0,ue.Z)(e.columns.slice(0,l)),[d],(0,ue.Z)(e.columns.slice(c)))});case "DELETE_COLUMN":var m=Number(t.settings.colIndex),
p=m+1,v=e.layout.split(",");v.splice(m,1);var f=v.join(",");return Object.assign({},e,{layout:f,columns:[].concat((0,ue.Z)(e.columns.slice(0,m)),(0,ue.Z)(e.columns.slice(p)))});case "COLUMN_SORT":var b=t.dragIndex,h=t.hoverIndex;return(0,Vt.ZP)(e,function(e){var t=e.columns.length;h!==b&&t>h&&t>b&&(e.columns=rt(e.columns,b,h))});default:return e}},kn=function(e,t){var n=Number(t.settings.innerColIndex),o=n+1;switch(t.type){case "INNER_COLUMN_SETTING":var r=Object.assign({},e.columns[n]);return r.settings=
t.settings.formData,Object.assign({},e,{columns:[].concat((0,ue.Z)(e.columns.slice(0,n)),[r],(0,ue.Z)(e.columns.slice(o)))});case "CHANGE_INNER_COLUMN":var a=jQuery.extend(!0,{},e.columns),i=jn(a,t);return Object.assign({},e,{layout:i.layout,columns:i.columns});case "DELETE_INNER_COLUMN":var l=Number(t.settings.innerColIndex),c=l+1,s=e.layout.split(",");s.splice(l,1);var d=s.join(",");return Object.assign({},e,{layout:d,columns:[].concat((0,ue.Z)(e.columns.slice(0,l)),(0,ue.Z)(e.columns.slice(c)))});
case "ADDON_INNER_SETTING":case "CLONE_INNER_ADDON":case "PASTE_INNER_ADDON":case "DELETE_INNER_ADDON":case "ADDON_INNER_EDIT":case "DISABLE_INNER_ADDON":"ADDON_INNER_SETTING"===t.type?t.type="ADDON_SETTING":t.settings.addonIndex=t.settings.addonInnerIndex,"CLONE_INNER_ADDON"===t.type&&(t.type="CLONE_ADDON"),"PASTE_INNER_ADDON"===t.type&&(t.type="PASTE_ADDON"),"DELETE_INNER_ADDON"===t.type&&(t.type="DELETE_ADDON"),"ADDON_INNER_EDIT"===t.type&&(t.type="ADDON_EDIT"),"DISABLE_INNER_ADDON"===t.type&&
(t.type="DISABLE_ADDON");var u=Object.assign({},e.columns[n]);return Object.assign({},e,{columns:[].concat((0,ue.Z)(e.columns.slice(0,n)),[Rn(u,t)],(0,ue.Z)(e.columns.slice(o)))});case "TOGGLE_INNER_COLUMN":var m=Object.assign({},e.columns[n]);return m.visibility=!m.visibility,Object.assign({},e,{columns:[].concat((0,ue.Z)(e.columns.slice(0,n)),[m],(0,ue.Z)(e.columns.slice(o)))});case "DISABLE_ADDON":var p=e.visibility,v=void 0===p||p;return Object.assign({},e,{visibility:!v});default:return e}},
Rn=function(e,t){var n=Number(t.settings.addonIndex),o=n+1,r=t.settings;if("row"===r.addonName)return e;var a={id:Dn++,type:"inner_row",settings:window.rowSettings.default,layout:"12",visibility:!0,columns:[{id:Dn++,class_name:"col-md-12",visibility:!0,settings:window.colSettings.default,addons:[],width:"100%"}]};switch(t.type){case "ADDON_SETTING":var i,l,c=Nn(Nn({id:r.addonId,type:r.addonType,name:r.addonName,visibility:!0,settings:r.formData,htmlContent:r.htmlContent,assets:r.assets,icon:r.icon,
title:r.title,parent:!1},"div"===r.addonName&&{children:[]}),r.addonName===R.productList&&{items:Ht(10).map(function(){return[]})}),s="xxxxxxxxx_list_filter"===r.addonName,d=["accordion","tab","advanced_table","row","column",R.productList,R.filter,R.pagination];if("table_advanced"===r.addonName){var u,m;if((null===(u=c.settings)||void 0===u||null===(u=u.jp_table_advanced_item)||void 0===u?void 0:u.length)>0){var p,v=On(c.settings.jp_table_advanced_item);try{for(v.s();!(p=v.n()).done;){var f=p.value;
if(void 0!==(null==f?void 0:f.content)&&Xt()(f.content)){var b={id:Dn++,name:"text_block",visibility:!0,collapse:!1,reference_id:c.id,settings:{text:f.content}};f.content=[],f.content.push(b)}}}catch(e){v.e(e)}finally{v.f()}}if((null===(m=c.settings)||void 0===m||null===(m=m.table_advanced_item)||void 0===m?void 0:m.length)>0){var h,g=On(c.settings.table_advanced_item);try{for(g.s();!(h=g.n()).done;){var E,y=On(h.value.table_advanced_item);try{for(y.s();!(E=y.n()).done;){var _=E.value;if(void 0!==
(null==_?void 0:_.content)&&Xt()(_.content)){var w={id:Dn++,name:"text_block",visibility:!0,collapse:!1,reference_id:c.id,settings:{text:_.content}};_.content=[],_.content.push(w)}}}catch(e){y.e(e)}finally{y.f()}}}catch(e){g.e(e)}finally{g.f()}}}if(null!=r&&r.parentAddon){var x,I=e.addons.findIndex(function(e){return e.id===r.parentAddon.id});if(-1!==I){var O=e.addons[I];if("div"===O.name){c.parent=r.parentAddon.id;var C=Nn(Nn({},O),{},{children:(0,ue.Z)(e.addons[I].children)});C.children||(C.children=
[]),void 0!==(null==r?void 0:r.childIndex)?C.children.splice(r.childIndex,0,c.id):C.children.push(c.id),e.addons=e.addons.map(function(e,t){return t===I?C:e})}if(O.name===R.productList&&!d.includes(r.addonName)){var A=O.items.map(function(e){var t,n=Nn({id:qe(),type:r.addonType,name:r.addonName,visibility:!0,settings:r.formData,assets:r.assets,icon:r.icon,title:r.title,parent:!1},"div"===r.addonName&&{children:[]}),o=(0,ue.Z)(e);return o.splice(null!==(t=null==r?void 0:r.childIndex)&&void 0!==t?t:
0,0,n),o});e.addons=e.addons.map(function(e,t){return I===t?Nn(Nn({},e),{},{items:A}):e})}}else if(!s&&!d.includes(r.addonName)&&"div"===(null==r||null===(x=r.parentAddon)||void 0===x?void 0:x.name)&&at(null==r?void 0:r.collectionAddonId)&&at(null==r?void 0:r.collectionItemAddonIndex)){var N=e.addons.findIndex(function(e){return e.id===r.collectionAddonId});if(-1!==N){var D=e.addons[N],S=D.items[0].findIndex(function(e){return e.id===r.parentAddon.id});if(-1!==S){var P=(0,ue.Z)(D.items).map(function(e){var t,
n=e[S],o=(0,ue.Z)(n.children||[]),a=Nn({id:qe(),type:r.addonType,name:r.addonName,visibility:!0,settings:r.formData,assets:r.assets,icon:r.icon,title:r.title,parent:n.id},"div"===r.addonName&&{children:[]});void 0!==(null==r?void 0:r.childIndex)?o.splice(r.childIndex,0,a.id):o.push(a.id);var i=(0,ue.Z)(e);return(i=i.map(function(e,t){return t===S?Nn(Nn({},e),{},{children:o}):e})).splice(null!==(t=null==r?void 0:r.collectionItemAddonIndex)&&void 0!==t?t:0,0,a),i});e.addons=e.addons.map(function(e,
t){return N===t?Nn(Nn({},e),{},{items:P}):e})}}}}if(!s&&!d.includes(r.addonName)&&"div"!==(null==r||null===(i=r.parentAddon)||void 0===i?void 0:i.name)&&at(null==r?void 0:r.collectionAddonId)&&at(null==r?void 0:r.collectionItemAddonIndex)){var k=e.addons.findIndex(function(e){return e.id===r.collectionAddonId});if(-1!==k){var T=e.addons[k].items.map(function(e){var t=Nn({id:qe(),type:r.addonType,name:r.addonName,visibility:!0,settings:r.formData,assets:r.assets,icon:r.icon,title:r.title,parent:!1},
"div"===r.addonName&&{children:[]}),n=(0,ue.Z)(e);return n.splice(r.collectionItemAddonIndex,0,t),n});e.addons=e.addons.map(function(e,t){return k===t?Nn(Nn({},e),{},{items:T}):e})}}if(null!=r&&r.deepAddon&&"table_advanced"===r.deepAddon.name){var L=r.deepAddon,M=r.deepAddonItemKey,Z=r.deepAddonItemIndex,j=r.deepAddonItemInnerIndex,B=r.indexPosition;return(0,Vt.ZP)(e,function(e){var t=e.addons.find(function(e){return e.id===L.id});"table_advanced_item"===M?(c.reference_id=L.id,t.settings[M][Z][M][j].content.splice(B,
0,c)):t.settings[M][Z].content.splice(B,0,c)})}var J=[];if(Object.keys(Me).includes(c.name)){var G,H=Me[c.name];null!=c&&null!==(G=c.settings)&&void 0!==G&&G[H]&&c.settings[H].forEach(function(e,t){var n=[],o=Sn("12",{padding:"5px 0px 5px 0px",margin:"0px 0px 0px 0px"});if(o.parent_addon=c.id,null!=e&&e.content&&Kt()(e.content))e.content.forEach(function(e){"nested_row"!==(null==e?void 0:e.type)&&n.push(Nn(Nn({},e),{},{id:qe(),title:"Text Block",visibility:!0}))});else if(null!=e&&e.content&&Xt()(e.content)){var r=
{id:Dn++,name:"text_block",title:"Text Block",visibility:!0,settings:{text:e.content}};n.push(r)}n.length>0&&(o.columns[0].addons=n,c.settings[H][t].content=[],c.settings[H][t].content.push({id:o.id,type:"nested_row",name:"row"}),J.push(o))})}return{column:!s&&(r.addonName.includes("xxxxxxxxx_list_")||(null==r||null===(l=r.parentAddon)||void 0===l?void 0:l.name)===R.productList||at(null==r?void 0:r.collectionAddonId)&&at(null==r?void 0:r.collectionItemAddonIndex))?Object.assign({},e,{addons:e.addons}):
void 0!==r.indexPosition?0==r.indexPosition?Object.assign({},e,{addons:[c].concat((0,ue.Z)(e.addons))}):Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,r.indexPosition)),[c],(0,ue.Z)(e.addons.slice(r.indexPosition)))}):Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons),[c])}),options:{sideRows:J}};case "TOGGLE_COLUMN":return e.id!==t.settings.id?e:Object.assign({},e,{visibility:!e.visibility});case "ADD_INNER_ROW":return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons),
[a])});case "ADD_INNER_ROW_BOTTOM":return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,o)),[a],(0,ue.Z)(e.addons.slice(o)))});case "CLONE_ADDON":var U=jQuery.extend(!0,{},e.addons[n]);U.id=++Dn,U.settings.instFormId=U.id;var z=Tn(U,U.id).addon;return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,o)),[z],(0,ue.Z)(e.addons.slice(o)))});case "PASTE_ADDON":var F=jQuery.extend(!0,{},t.formData);F.id=++Dn,F.settings.instFormId=F.id;var V=Tn(F,F.id).addon;return Object.assign({},
e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,o)),[V],(0,ue.Z)(e.addons.slice(o)))});case "PASTE_INNER_ROW":var W=Object.assign({},t.settings.innerRow,{id:Dn++});return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,n)),[W],(0,ue.Z)(e.addons.slice(o)))});case "CLONE_INNER_ROW":var Y=jQuery.extend(!0,{},e.addons[n]),X=Ln(Y);return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,o)),[X],(0,ue.Z)(e.addons.slice(o)))});case "INNER_ROW_TOGGLE":var q=Object.assign({},e.addons[n]);
return q.visibility=!q.visibility,Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,n)),[q],(0,ue.Z)(e.addons.slice(o)))});case "ADDON_EDIT":case "INNER_ROW_SETTING":if(null!=r&&r.deepAddon){var $=r.deepAddon,Q=r.deepAddonIndex,ee=r.deepAddonItemIndex,te=r.deepAddonItemKey,ne=r.deepAddonItemInnerIndex,oe=r.formData;if("table_advanced"===(null==$?void 0:$.name)){var re=K()($);return void 0!==ne?re.settings[te][ee][te][ne].content[Q].settings=Nn(Nn({},re.settings[te][ee][te][ne].content[Q].settings),
oe):re.settings[te][ee].content[Q].settings=Nn(Nn({},re.settings[te][ee].content[Q].settings),oe),Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,n)),[re],(0,ue.Z)(e.addons.slice(o)))})}}var ae=r.collectionItemIndex,ie=r.collectionItemAddonIndex;if(at(ae)){var le=r.addonIndex;return e.addons=e.addons.map(function(e,t){return le===t?Nn(Nn({},e),{},{items:e.items.map(function(e){return e.map(function(e,t){return t===ie?Nn(Nn({},e),{},{settings:r.formData,assets:r.assets}):e})})}):e}),
e}var ce=Object.assign({},e.addons[n]);return ce.settings=r.formData,ce.htmlContent=r.htmlContent,ce.assets=r.assets,Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,n)),[ce],(0,ue.Z)(e.addons.slice(o)))});case "INNER_COLUMN_SETTING":case "ADDON_INNER_SETTING":case "CLONE_INNER_ADDON":case "PASTE_INNER_ADDON":case "DELETE_INNER_ADDON":case "CHANGE_INNER_COLUMN":case "ADDON_INNER_EDIT":case "DELETE_INNER_COLUMN":case "TOGGLE_INNER_COLUMN":case "DISABLE_ADDON":case "DISABLE_INNER_ADDON":var se=
Object.assign({},e.addons[n]);return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,n)),[kn(se,t)],(0,ue.Z)(e.addons.slice(o)))});case "DELETE_ADDON":return Object.assign({},e,{addons:[].concat((0,ue.Z)(e.addons.slice(0,t.settings.addonIndex)),(0,ue.Z)(e.addons.slice(t.settings.addonIndex+1)))});default:return e}},Tn=function(e,t){var n=null;if("accordion"===e.name&&void 0!==e.settings.jp_accordion_item&&e.settings.jp_accordion_item.length>0){var o=e.settings.jp_accordion_item.map(function(e){var o=
e.content;return"object"===(0,de.Z)(o)&&o.length>0&&(n=++t,o=o.map(function(e){return e.id=n})),e});e.settings.jp_accordion_item=o}if("tab"===e.name&&void 0!==e.settings.jp_tab_item&&Array.isArray(e.settings.jp_tab_item)&&e.settings.jp_tab_item.length>0){var r=e.settings.jp_tab_item.map(function(t){var o=t.content;return"object"===(0,de.Z)(o)&&o.length>0&&(n=++e.id,o=o.map(function(e){return e.id=n})),t});e.settings.jp_tab_item=r}return{addon:e,insideAddonId:n}},Ln=function(e){var t,n=arguments.length>
1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null!==o?(e.id=o,Dn=o):e.id=++Dn,Mn(e,function(e){e.id=Dn++}),(null==e||null===(t=e.columns)||void 0===t?void 0:t.length)>0){var r,a=On(e.columns);try{for(a.s();!(r=a.n()).done;){var i,l=r.value;if(l.id=Dn++,(null==l||null===(i=l.addons)||void 0===i?void 0:i.length)>0){var c,s=On(l.addons);try{for(s.s();!(c=s.n()).done;){var d=c.value;"nested_row"===(null==d?void 0:d.type)?n&&(d.id=Dn++):d.id=Dn++,
Mn(d,function(e){e.id=Dn++})}}catch(e){s.e(e)}finally{s.f()}}}}catch(e){a.e(e)}finally{a.f()}}return e},Mn=function(e,t){if(Object.keys(Me).includes(e.name)){var n,o=Me[e.name];if(null!=e&&null!==(n=e.settings)&&void 0!==n&&n[o]){var r,a=On(e.settings[o].entries());try{for(a.s();!(r=a.n()).done;){var i=(0,j.Z)(r.value,2),l=i[0],c=i[1];if(null!=c&&c.content&&c.content instanceof Array&&c.content.length>0){var s,d=On(c.content.entries());try{for(d.s();!(s=d.n()).done;){var u=(0,j.Z)(s.value,2),m=u[0];
t(u[1],void 0,l,m)}}catch(e){d.e(e)}finally{d.f()}}}}catch(e){a.e(e)}finally{a.f()}}}},Zn=function e(t,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=K()(n);i=Ln(i),a&&(i.id=a,a=!1);var l=null!=n&&n.parent?t.find(function(e){return e.id===n.parent.rowId}):null;if(o){for(var c=0;c<l.columns.length;c++)for(var s=0;s<l.columns[c].addons.length;s++){var d=l.columns[c].addons[s];
if("nested_row"===(null==d?void 0:d.type)&&d.id===n.id)if(i.parent={rowId:o.id,columnId:o.columns[c].id},r>1)o.columns[c].addons[s].id=i.id;else{var u=Object.assign({},d,{id:i.id});o.columns[c].addons.splice(s+1,0,u)}}t.push(i)}else{var m=t.findIndex(function(e){return e.id===n.id});t.splice(m+1,0,i)}for(var p=0;p<i.columns.length;p++)for(var v=function(){var n=i.columns[p].addons[f];if("nested_row"===(null==n?void 0:n.type)){var o=t.find(function(e){return e.id===n.id});e(t,o,i,2,!1)}},f=0;f<i.columns[p].addons.length;f++)v()},
jn=function(e,t){for(var n=t.layout,o=t.current,r=e,a="12"==n?[12]:n.split("+"),i="12"==o?[12]:o.split("+"),l=a.length,c=i.length,s=[],d=0;d<l;d++){var u=a[d],m="col-md-"+u;if(void 0!==r[d])r[d].class_name=m,r[d].width="".concat(parseFloat((100/(12/parseInt(u))).toFixed(6)),"%"),s.push(r[d]);else{var p={id:Dn++,class_name:m,visibility:!0,settings:window.colSettings.default,addons:[],width:"".concat(parseFloat((100/(12/parseInt(u))).toFixed(6)),"%")};s.push(p)}}if(l<c){for(var v=l-1,f=[],b=l;b<c;b++){var h=
r[b].addons;h.length>0&&(f=f.concat(h))}f.length>0&&(s[v].addons=s[v].addons.concat(f))}return{layout:n,columns:s}};function Bn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Gn={form:{},data:{title:"",catid:"0",published:"1",language:"*",access:"0",css:"",meta_title:"",meta_description:"",meta_keywords:"",robots:"",seo_spacer:"",og_title:"",og_image:"",og_description:"",menutitle:"",menualias:"",menuparent_id:"",menuid:"0",extension:"",extension_view:""}};function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
var zn={globalPanel:{},activeDevice:u.xl.value};var Fn=(0,r.ZP)(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:In(window.initialState),n=arguments.length>1?arguments[1]:void 0;switch(n.type){case "MOVE_ADDON_ITEMS":window.warningAtReload=!0;var o=n.payload,r=o.dragInfo,a=o.hoverInfo;return xn({rows:t,dragInfo:r,hoverInfo:a});case "SORT_COLLECTION_ADDON":window.warningAtReload=!0;var i=n.payload,c=i.dragInfo,s=i.hoverInfo,u=i.isEmptyChild,m=void 0!==u&&u,p=t.findIndex(function(e){return e.id===
c.dragRowId}),v=t[p];if(!at(v))return t;var f=v.columns.findIndex(function(e){return e.id===c.dragColumnId}),b=v.columns[f];if(!at(b))return t;var h=b.addons.findIndex(function(e){return e.id===c.collectionAddonId}),g=b.addons[h];if(!at(g))return t;var E=c.collectionItemAddonIndex,y=s.collectionItemAddonIndex,_=c.childIndex,w=s.childIndex,x="top"===s.position;return function(e){var t=e.state,n=e.sourceSectionIndex,o=e.sourceColumnIndex,r=e.sourceAddonIndex,a=e.sourceItemAddonIndex,i=e.destinationItemAddonIndex,
l=e.sourceChildIndex,c=e.destinationChildIndex,s=e.isEmptyChild,d=e.isAbove;return(0,Vt.ZP)(t,function(e){var t=e[n].columns[o].addons[r].items;if(!at(t))return e;t.forEach(function(n,o){var u=n[a],m=n[i],p=u.parent,v=function(e){var t=e.addonList,n=e.addon,o=null;if("div"===n.name){var r=function(e){var t=e.addonList,n=e.addon,o=[];return function e(n){t.forEach(function(t){var r,a=null===(r=n.children)||void 0===r?void 0:r.findIndex(function(e){return e===t.id});at(a)&&-1!==a&&(o.push(t),"div"===
t.name&&e(t))})}(n),{divAddon:n,children:o}}({addon:n,addonList:t}),a=r.divAddon,i=r.children;o={name:a.name,addons:[a].concat((0,ue.Z)(i))}}else o={name:n.name,addons:[n]};return o}({addonList:n,addon:u});if(!at(v))return e;var f=(0,j.Z)(v.addons,1)[0];if("div"===m.name&&s){var b=m;b.children=[u.id],gn(f,n),f.parent=b.id}else if(at(c)&&at(m.parent)){var h=n.findIndex(function(e){return e.id===m.parent}),g=n[h];at(g)&&g.children&&(at(u.parent)&&at(l)&&u.parent===m.parent?g.children=rt(g.children,
l,c):(g.children.splice(d?c:c+1,0,f.id),gn(f,n),f.parent=g.id))}else gn(f,n);m.id===p?(r<i&&!d||r>i&&d)&&(t[o]=rt(n,a,i)):t[o]=rt(n,a,i)})})}({state:t,sourceSectionIndex:p,sourceColumnIndex:f,sourceAddonIndex:h,sourceItemAddonIndex:E,destinationItemAddonIndex:y,sourceChildIndex:_,destinationChildIndex:w,isEmptyChild:m,isAbove:x});case "SORT_ADDON_WITH_COLLECTION_ITEM_ADDON":window.warningAtReload=!0;var I=n.payload,O=I.dragInfo,C=I.hoverInfo,A=t.findIndex(function(e){return e.id===O.dragRowId}),N=
t[A];if(!at(N))return t;var D=t.findIndex(function(e){return e.id===C.hoverRowId}),S=t[D];if(!at(S))return t;var P=N.columns.findIndex(function(e){return e.id===O.dragColumnId}),k=N.columns[P];if(!at(k))return t;var T=S.columns.findIndex(function(e){return e.id===C.hoverColumnId}),L=S.columns[T];if(!at(L))return t;var M=k.addons.findIndex(function(e){return e.id===O.dragAddonId}),Z=k.addons[M];if(!at(Z))return t;var J=L.addons.findIndex(function(e){return e.id===C.collectionAddonId}),G=L.addons[J];
if(!at(G))return t;var H=C.collectionItemAddonIndex,U="top"===C.position;return function(e){var t=e.state,n=e.sourceSectionIndex,o=e.destinationSectionIndex,r=e.sourceColumnIndex,a=e.destinationColumnIndex,i=e.sourceAddonIndex,l=e.destinationAddonIndex,c=e.destinationItemAddonIndex,s=e.isAbove;return(0,Vt.ZP)(t,function(e){var t=e[n].columns[r].addons,d=t[i],u=e[o].columns[a].addons[l].items;if(!at(u))return e;gn(d,t),t.splice(i,1),u.forEach(function(e){at(c)?e.splice(s?c:c+1,0,d):e.push(d)})})}({state:t,
sourceSectionIndex:A,destinationSectionIndex:D,sourceColumnIndex:P,destinationColumnIndex:T,sourceAddonIndex:M,destinationAddonIndex:J,destinationItemAddonIndex:H,isAbove:U});case "MOVE_LAYER_ADDON":window.warningAtReload=!0;var z=n.payload,F=z.dragInfo,V=z.hoverInfo;return xn({rows:t,dragInfo:F,hoverInfo:V,isLayer:!0});case "MOVE_COLUMN_ITEMS":window.warningAtReload=!0;var W=n.payload,Y=W.dragSectionIdx,X=W.dragColIdx,q=W.hoverSectionIdx,$=W.hoverColIdx,Q=t[Y].columns[X],ee=t.flatMap(function(e,
t){return t===Y&&Y===q?Nn(Nn({},e),{},{columns:rt(e.columns,X,$)}):t===Y?1===e.columns.length?[]:Nn(Nn({},e),{},q===Y?{columns:rt(e.columns,X,$)}:{columns:e.columns.flatMap(function(e,t){return t===X?[]:e})}):t===q?Nn(Nn({},e),{},{columns:e.columns.flatMap(function(e,t){return t===$?[Q,e]:e})}):e});return ee;case "MOVE_SECTION_ITEMS":window.warningAtReload=!0;var te=n.payload,ne=te.dragSectionIdx,oe=te.hoverSectionIdx,ae=t[ne];return t.flatMap(function(e,t){return t===ne?[]:t===oe?oe<ne?[ae,e]:[e,
ae]:e});case "CHANGE_ADMIN_LABEL":window.warningAtReload=!0;var ie=n.payload,le=ie.type,ce=ie.title,se=ie.sectionIndex,de=ie.nestedRowIndex,me=ie.deepAddonRowIndex,pe=ie.columnIndex,ve=ie.addonIndex,be=ie.collectionItemAddonIndex;return(0,Vt.ZP)(t,function(e){if(["section","nested_row","deep_addon_row"].includes(le)){var t=se;"nested_row"===le&&(t=de),"deep_addon_row"===le&&(t=me),e[t].settings.admin_label=ce}else if("column"===le)e[se].columns[pe].settings.admin_label=ce;else if("addon"===le&&at(be)){var n=
e[se].columns[pe].addons[ve];null==n||n.items.forEach(function(e){e[be].settings.admin_label=ce})}else"addon"===le&&(e[se].columns[pe].addons[ve].settings.admin_label=ce)});case "CHANGE_VISIBILITY":window.warningAtReload=!0;var he=n.payload,ge=he.type,Ee=he.rowIndex,ye=he.columnIndex,_e=he.addonIndex,we=he.collectionItemAddonIndex;return(0,Vt.ZP)(t,function(e){if(["section","nested_row","deep_addon_row"].includes(ge))e[Ee].visibility=!e[Ee].visibility;else if("column"===ge){var t=e[Ee].columns[ye].visibility;
e[Ee].columns[ye].visibility=!t}else if("addon"===ge&&at(we)){var n=e[Ee].columns[ye].addons[_e];null==n||n.items.forEach(function(e){var t=e[we].visibility;e[we].visibility=!t})}else if("addon"===ge){var o=e[Ee].columns[ye].addons[_e].visibility;e[Ee].columns[ye].addons[_e].visibility=!o}});case "CHANGE_COLLECTION_ITEM_VISIBILITY":window.warningAtReload=!0;var xe=n.payload,Ie=xe.rowId,Oe=xe.columnId,Ce=xe.addonIndex,Ae=xe.itemAddonIndex;return function(e){var t=e.rows,n=e.rowId,o=e.columnId,r=e.addonIndex,
a=e.itemAddonIndex;return(0,Vt.ZP)(t,function(e){var t=e.findIndex(function(e){return e.id===n}),i=e[t].columns.findIndex(function(e){return e.id===o}),l=e[t].columns[i].addons[r].items;if(!at(l))return e;l.forEach(function(e,t){var n=(0,Vt.Vk)(l)[t][a].visibility;l[t][a].visibility=!n})})}({rows:t,rowId:Ie,columnId:Oe,addonIndex:Ce,itemAddonIndex:Ae});case "CHANGE_COLUMN_WIDTH":window.warningAtReload=!0;var Ne=n.payload,De=Ne.rowId,Se=Ne.originalColumnId,Pe=Ne.affectedColumnId,ke=Ne.originalColumnValue,
Re=Ne.affectedColumnValue,Te=Ne.device,Le=Ne.fitInRow,Ze=t.findIndex(function(e){return e.id===De});if(Le)return t.map(function(e,t){if(Ze===t){var n=e.columns.findIndex(function(e){return e.id===Se}),o=e.columns.findIndex(function(e){return e.id===Pe});return Nn(Nn({},e),{},{columns:e.columns.map(function(e,t){var n;if(null===(n=e.settings)||void 0===n||!n.width)return Nn(Nn({},e),{},{settings:Nn(Nn({},e.settings),{},{width:Ye()})});if(e.id===Se){var o=Nn(Nn({},e.settings.width),{},(0,B.Z)({},Te,
ke));return Nn(Nn({},e),{},{settings:Nn(Nn({},e.settings),{},{width:o})})}if(e.id===Pe){var r=Nn(Nn({},e.settings.width),{},(0,B.Z)({},Te,Re));return Nn(Nn({},e),{},{settings:Nn(Nn({},e.settings),{},{width:r})})}return e}),layout:e.layout.split("+").map(function(e,t){return t===n?(12*Number(ke.replace("%",""))/100).toFixed(1):t===o?(12*Number(Re.replace("%",""))/100).toFixed(1):e}).join("+")})}return e});var je,Be=t[Ze].columns.findIndex(function(e){return e.id===Se}),Je=Math.min(parseFloat(ke),100),
Ge=null!==(je=t[Ze].columns[Be].settings)&&void 0!==je&&je.width?t[Ze].columns[Be].settings.width:Ye();return Ge=Nn(Nn({},Ge),{},(0,B.Z)({},Te,"".concat(Je,"%"))),t.map(function(e,t){return Ze===t?Nn(Nn({},e),{},{columns:e.columns.map(function(e,t){return Be===t?Nn(Nn({},e),{},{settings:Nn(Nn({},e.settings),{},{width:Ge})}):e}),layout:e.layout.split("+").map(function(e,t){return t===Be?(12*Je/100).toFixed(1):e}).join("+")}):e});case "RESET_COLUMN_WIDTH_AFTER_FIT_COLUMNS":window.warningAtReload=!0;
var He=n.rowId,Ue=n.device,ze=t.findIndex(function(e){return e.id===He});if(t[ze].columns.reduce(function(e,t){var n;return e+parseFloat((null===(n=t.width)||void 0===n?void 0:n[Ue])||"0")},0)>100){var Fe=100/t[ze].columns.length;return(0,Vt.ZP)(t,function(e){e[ze].columns.forEach(function(e){e.width[Ue]="".concat(Fe,"%")})})}return t;case "CHANGE_INNER_COLUMN_WIDTH":window.warningAtReload=!0;var Ve=n.rowIndex,We=n.colIndex,Ke=n.addonIndex,Xe=n.originalInnerColumnIndex,$e=n.affectedInnerColumnIndex,
Qe=n.originalInnerColumnValue,et=n.affectedeInnerColumnValue,tt=t[Ve].columns[We].addons[Ke],nt=tt.columns[Xe],ot=tt.columns[$e];return nt.width=Qe,ot.width=et,(0,ue.Z)(t);case "IMPORT_PAGE":return window.warningAtReload=!0,In(n.page);case "CLEAR_PAGE":return window.warningAtReload=!0,[];case "VALIDATE_OLD_PAGE_CONTENT":var it=function(e){var t=Object.fromEntries(e.map(function(e,t){return[e.id,_t(_t({},e),{},{index:t})]})),n=[];return e.forEach(function(o){if(!o.parent){var r=K()(o);r.id=qe(),r.columns.forEach(function(e){e.id=
qe()});var a=It({sections:e,sectionsObject:t,section:r});n=[].concat((0,ue.Z)(n),[r],(0,ue.Z)(a))}}),n}(t);return it;case "ROW_TOGGLE":case "TOGGLE_COLLAPSE":return window.warningAtReload=!0,t.map(function(e){return Pn(e,n)});case "ADD_ROW":window.warningAtReload=!0;var lt=n.payload,ct=lt.layout,st=void 0===ct?"6+6":ct,dt=lt.rowIndex,ut=lt.parent;if(ut){var mt=ut.rowId,pt=ut.columnId,vt=ut.addonIndex,ft=ut.rowOptions,bt=void 0===ft?{}:ft,ht=ut.columnOptions,gt=void 0===ht?{}:ht,Et=ut.deepAddonOptions,
yt=void 0===Et?{}:Et,Ct=Sn(st,bt,gt);Ct.parent={rowId:mt,columnId:pt};var At={type:"nested_row",id:Ct.id,name:"row"},Nt=t.findIndex(function(e){return e.id===mt});if(-1===Nt)return t;var Dt=t[Nt].columns.findIndex(function(e){return e.id===pt});if(-1===Dt)return t;var St=(0,Vt.ZP)(t,function(e){if(yt&&Object.keys(yt).length>0){var t=yt.deepAddon,n=yt.deepAddonItemKey,o=yt.deepAddonItemIndex;e[Nt].columns[Dt].addons.find(function(e){return e.id===t.id}).settings[n][o].content.splice(vt,0,At)}else e[Nt].columns[Dt].addons.splice(vt,
0,At);e.push(Ct)});return St}if(dt){var Pt=Sn(st),kt=(0,ue.Z)(t);return kt.splice(dt,0,Pt),kt}var Rt=Sn(st);return[].concat((0,ue.Z)(t),[Rt]);case "UPDATE_COLUMNS":window.warningAtReload=!0;var Tt=(0,ue.Z)(t),Lt=n.payload,Mt=Lt.rowId,Zt=Lt.columnIndex,jt=Tt.findIndex(function(e){return e.id===Mt}),Bt=vn("50%",["xl","lg","md"]),Jt=(e=Bt,{id:Dn++,class_name:"row-column",visibility:!0,settings:Nn(Nn({},window.colSettings.default),{},{width:e}),addons:[]});return Tt=Tt.map(function(e,t){if(jt===t){var n=
e.layout.split(/[+,]/);return n.splice(Zt,0,6),Nn(Nn({},e),{},{columns:e.columns.flatMap(function(t,n){if(at(Zt)){if(Zt===n)return[Jt,t];if(Zt>=e.columns.length&&n===e.columns.length-1)return[t,Jt]}return t}),layout:n.join("+")})}return e}),Tt;case "REMOVE_ROW":window.warningAtReload=!0;var Gt=n.payload.rowId,Ht={};t.forEach(function(e){return Ht[e.id]=e});var Ut=Ht[Gt];return Ut?pn(Ht,Ut,t):t;case "REMOVE_COLUMN":window.warningAtReload=!0;var zt=n.payload;return function(e){var t,n=e.rowId,o=e.columnId,
r=e.rows,a={};r.forEach(function(e){return a[e.id]=e});var i=a[n],l=null==i?void 0:i.columns.find(function(e){return e.id===o});if(!l||!i)return r;var c={},s=r.flatMap(function(e){if(n===e.id){if(1===e.columns.length)return c=e,[];var t=e.columns.length-1,o=12/t,r=Array(t).fill(o);return Qt(Qt({},e),{},{layout:r.join("+"),columns:e.columns.flatMap(function(e){return e.id===l.id?[]:e})})}return e});return null!==(t=c)&&void 0!==t&&t.parent&&fe()(c.parent)&&(s=mn(s,c)),l.addons.forEach(function(e){if(Object.keys(Me).includes(e.name))e.settings["jp_".concat(e.name,
"_item")].forEach(function(e){e.content.forEach(function(e){var t=a[e.id];s=pn(a,t,s)})});else if("nested_row"===(null==e?void 0:e.type)){var t=a[e.id];s=pn(a,t,s)}}),s}({rowId:zt.rowId,columnId:zt.columnId,rows:t});case "RESET_COLUMNS_WIDTH":return window.warningAtReload=!0,function(e){var t=e.rowId,n=e.rows,o={};n.forEach(function(e){return o[e.id]=e});var r=o[t];if(!(null==r?void 0:r.columns)||!r)return n;var a=n.flatMap(function(e){if(t===e.id){var n=e.columns.length,o=12/n,r=Array(n).fill(o),
a="".concat((parseFloat(100/12)*o).toFixed(6),"%"),i=vn(a,["xl","lg","md"]);return Qt(Qt({},e),{},{layout:r.join("+"),columns:e.columns.map(function(e){return Qt(Qt({},e),{},{settings:Qt(Qt({},e.sections),{},{width:i})})})})}return e});return a}({rowId:n.payload.rowId,rows:t});case "REMOVE_ADDON":window.warningAtReload=!0;var Ft=n.payload,Wt=Ft.rowId,Yt=Ft.columnId,qt=Ft.addonId,$t=Ft.referenceId;return hn({rows:t,rowId:Wt,columnId:Yt,addonId:qt,referenceId:$t});case "REMOVE_COLLECTION_ADDON_ITEM":window.warningAtReload=
!0;var en=n.payload,rn=en.rowId,ln=en.columnId,fn=en.addonIndex,bn=en.collectionItemAddonIndex;return function(e){var t=e.rows,n=e.rowId,o=e.columnId,r=e.addonIndex,a=e.collectionItemAddonIndex;return(0,Vt.ZP)(t,function(e){var t=e.findIndex(function(e){return e.id===n}),i=e[t].columns.findIndex(function(e){return e.id===o}),l=e[t].columns[i].addons,c=l[r],s=c.items;if(!at(s))return e;s.forEach(function(e,t){var n,o=null===(n=s[t])||void 0===n?void 0:n[a];at(o)&&("div"===o.name?(gn(o,e),function(e,
t,n){var o=t[e];t.splice(e,1),at(o)&&function e(o){var r;null===(r=o.children)||void 0===r||r.forEach(function(o){var r=t.findIndex(function(e){return e.id===o});if(at(r)&&-1!==r){var a=t[r];t.splice(r,1),"div"===a.name?e(a):Object.keys(d).includes(a.name)?En(a,n):"nested_row"===a.type&&_n(a,n)}})}(o)}(a,e,[])):(gn(o,e),s[t].splice(a,1)))}),l[r]=c})}({rows:t,rowId:rn,columnId:ln,addonIndex:fn,collectionItemAddonIndex:bn});case "DELETE_ROW":return window.warningAtReload=!0,[].concat((0,ue.Z)(t.slice(0,
n.index)),(0,ue.Z)(t.slice(n.index+1)));case "DUPLICATE_ROW":return window.warningAtReload=!0,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return(0,Vt.ZP)(e,function(e){var n={},o=null;e.forEach(function(e,t){return n[e.id]={row:e,rowIndex:t}});var r=[],a=t.rowId,i=t.type,l=n[a],c=l.row,s=l.rowIndex;if("nested_row"===i&&c){var d=(null==t?void 0:t.parentRow)||{},u=d.id,m=d.colIndex,p=d.addonIndex,v=n[u],f=v.row,b=v.rowIndex,h=f.columns[m].addons[p],
g=K()(h);o=qe(),g.id=o;var E=e[b].columns[m].addons.flatMap(function(e){return e.id.toString()===a.toString()?[e,g]:e});e[b].columns[m].addons=E}c&&(dn(Qt(Qt({},o&&{id:o}),{},{row:c}),n,r),e.splice.apply(e,[s,0].concat(r)))})}(t,n.payload);case "DUPLICATE_DEEP_CONTENT_ITEM":window.warningAtReload=!0;var Cn=n.payload,An=Cn.deepItem,kn=Cn.addonData,Rn=kn.addonIndex,Tn=kn.colIndex,Ln=kn.rowIndex,Mn=kn.deepItemRowId,jn={};t.forEach(function(e,t){return jn[e.id]={row:e,rowIndex:t}});var Bn=[],Jn=(0,j.Z)(An.value.content,
1)[0],Gn=jn[Jn.id].row,Hn=Mn;return Gn?(dn({id:Hn,row:Gn},jn,Bn),t.flatMap(function(e,t){if(Ln===t){var n=Nn(Nn({},e),{},{columns:e.columns.map(function(e,t){return Tn===t?Nn(Nn({},e),{},{addons:e.addons.map(function(e,t){return Rn===t?Nn(Nn({},e),{},{settings:Nn(Nn({},e.settings),{},(0,B.Z)({},An.key,e.settings[An.key].flatMap(function(e,t){return t===An.index?[e,Nn(Nn({},An.value),{},{content:An.value.content.map(function(e){return Nn(Nn({},e),{},{id:Hn})})})]:e})))}):e})}):e})});return[n].concat(Bn)}return e})):
t;case "DUPLICATE_COLUMN":return window.warningAtReload=!0,function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0,r=o.rowId,a=o.columnId,i={};n.forEach(function(e,t){return i[e.id]={row:e,rowIndex:t}});var l=i[r],c=l.row,s=l.rowIndex;if(!c)return n;var d=null===(e=c.columns)||void 0===e?void 0:e.findIndex(function(e){return e.id===a});if(-1===d)return n;var u=c.columns[d];if((null==c||null===(t=c.columns)||void 0===t?void 0:t.length)>=
8)return re("You are not allowed to add more than ".concat(8," columns!")),n;var m=[],p=n[s].columns,v=sn({column:u,rowId:c.id,stateObj:i,clonedRows:m}),f=n.map(function(e,t){return s===t?Qt(Qt({},e),{},{columns:[].concat((0,ue.Z)(p.slice(0,d+1)),[v],(0,ue.Z)(p.slice(d+1)))}):e});return[].concat((0,ue.Z)(f),m)}(t,n.payload);case "PASTE_ROW":window.warningAtReload=!0;var Un=n.payload||{},zn=Un.index,Fn=Un.rows,Vn={};t.forEach(function(e){return Vn[e.id]=e});var Wn=t[zn];if(!Wn)return t;var Kn=pn(Vn,
Wn,t),Yn=tn(Fn);return[].concat((0,ue.Z)(Kn.slice(0,zn)),(0,ue.Z)(Yn),(0,ue.Z)(Kn.slice(zn)));case "PASTE_OR_INSERT_NESTED_ROW":var Xn=n.payload,qn=Xn.sectionIndex,$n=Xn.columnIndex,Qn=Xn.addonIndex,eo=Xn.nestedSectionIndex,to=Xn.sectionData,no=Xn.isAbove,oo=void 0!==no&&no,ro=Xn.replace,ao=void 0!==ro&&ro,io=K()(t),lo=io[qn],co=lo.columns[$n],so=co.addons,uo=yn({sectionIndex:0,sections:to}),mo=(0,j.Z)(uo,1)[0],po={id:mo.id,type:"nested_row",name:"row",title:Joomla.JText._("COM_JPAGEBUILDER_ROW"),
visibility:!0,icon:""};if(mo.parent={rowId:lo.id,columnId:co.id},ao){so.splice(Qn,1,po);var vo=t[eo];io.splice.apply(io,[eo,1].concat((0,ue.Z)(uo))),wn(vo,t.page)}else so.splice(oo?Qn:Qn+1,0,po),io.splice.apply(io,[eo+1,0].concat((0,ue.Z)(uo)));return io;case "PASTE_OR_INSERT_SECTION":return window.warningAtReload=!0,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=t.sectionIndex,o=t.sectionData,r=t.isAbove,a=void 0!==r&&r,i=t.replace,
l=void 0!==i&&i;return(0,Vt.ZP)(e,function(e){var t=yn({sectionIndex:0,sections:o});l?e.splice.apply(e,[n,1].concat((0,ue.Z)(t))):e.splice.apply(e,[a?n:n+1,0].concat((0,ue.Z)(t)))})}(t,n.payload);case "ADD_BLOCK_AS_NESTED_SECTION":return window.warningAtReload=!0,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=t.sectionIndex,o=t.columnIndex,r=t.addonIndex,a=void 0===r?0:r,i=t.nestedSectionIndex,l=void 0===i?-1:i,c=t.sectionData,
s=t.isAbove,d=t.replace;return(0,Vt.ZP)(e,function(e){var t=e[n],r=t.columns[o],i=r.addons,u=yn({sectionIndex:0,sections:c}),m=(0,j.Z)(u,1)[0],p={id:m.id,type:"nested_row",name:"row",title:Joomla.JText._("COM_JPAGEBUILDER_ROW"),visibility:!0,icon:""};if(m.parent={rowId:t.id,columnId:r.id},d){i.splice(a,1,p);var v=e[l];e.splice.apply(e,[l,1].concat((0,ue.Z)(u))),wn(v,e.page)}else i.splice(s?a:a+1,0,p),e.splice.apply(e,[l+1,0].concat((0,ue.Z)(u)))})}(t,n.payload);case "ADD_BLOCK":window.warningAtReload=
!0;var fo=n.payload,bo=fo.rows,ho=fo.index,go=fo.type,Eo=[],yo=Array.isArray(bo)?bo:[bo];if("insert_block"!==go)return[].concat((0,ue.Z)(t.slice(0,n.payload.index)),(0,ue.Z)(yo),(0,ue.Z)(t.slice(n.payload.index)));Eo=yo.map(function(e,t){var n,o=Nn({},e.settings);return o.background_type||(o=o.background_image?Nn(Nn({},o),{},{background_type:"image"}):o.background_color?Nn(Nn({},o),{},{background_type:"color"}):o.background_gradient?Nn(Nn({},o),{},{background_type:"gradient"}):o.background_video?
Nn(Nn({},o),{},{background_type:"video"}):Nn(Nn({},o),{},{background_type:"none"})),n=Nn(Nn({},e),{},{settings:o}),0===t&&(n.id=++Dn),n});var _o=(0,ue.Z)(t);return _o.splice(ho,0,Eo[0]),Eo.length>1&&_o.push.apply(_o,(0,ue.Z)(Eo.slice(1))),_o;case "ADD_BLOCK_OR_SECTION":window.warningAtReload=!0;var wo=n.payload,xo=wo.rows,Io=wo.type,Oo=Array.isArray(xo)?xo:[xo];if("insert_block"===Io){var Co={background_image:"image",background_color:"color",background_gradient:"gradient",background_video:"video"};
Oo=Oo.map(function(e){var t=e.settings;if(!t.background_type){for(var n=0,o=Object.entries(Co);n<o.length;n++){var r=(0,j.Z)(o[n],2),a=r[0],i=r[1];if(t[a]){t=Nn(Nn({},t),{},{background_type:i});break}}t.background_type||(t=Nn(Nn({},t),{},{background_type:"none"}))}return Nn(Nn({},e),{},{settings:t})})}var Ao=tn(Oo),No=In(Ao);return[].concat((0,ue.Z)(t),(0,ue.Z)(No));case "UPDATE_ROW_LAYOUT":window.warningAtReload=!0;var Do=t.map(function(e){if(e.id===n.payload.rowId){var t=function(e,t){var n=t.payload,
o=n.newLayout,r=n.currentLayout;if(o===r)return{columns:e,layout:r};var a=r.split("+"),i=o.split("+").map(function(e){var t=e.trim();return Number(t)>12?"12":t}).filter(Number),l=a.length,c=i.length,s=window.colSettings.default,d=i.flatMap(function(t,n){var o,r=t.trim();if(!/^\d+(\.[0-9])?$/.test(r))return[];var a=Number(r)>12?12:Number(r),i="".concat(parseFloat((100/(12/a)).toFixed(6)),"%"),l={xl:i,lg:i,md:i,sm:"100%",xs:"100%"};return null!=e&&null!==(o=e[n])&&void 0!==o&&o.addons.length?Nn(Nn({},
e[n]),{},{settings:Nn(Nn({},e[n].settings),{},{width:l})}):{id:Dn++,class_name:"row-column",visibility:!0,settings:Nn(Nn({},s),{},{width:l}),addons:[],width:l}});if(c<l){var u=e.slice(c).flatMap(function(e){return e.addons});u.length&&(d[c-1].addons=[].concat((0,ue.Z)(d[c-1].addons),(0,ue.Z)(u)))}return{layout:i.join("+"),columns:d}}(e.columns,n);return Nn(Nn({},e),{},{layout:t.layout,columns:t.columns})}return e});return Do;case "ROW_SETTING":case "COLUMN_SETTING":case "ADDON_SETTING":case "ADDON_EDIT":case "CLONE_ADDON":case "PASTE_ADDON":case "PASTE_INNER_ADDON":case "CHANGE_INNER_COLUMN":case "PASTE_INNER_ROW":case "CLONE_INNER_ROW":case "DELETE_ADDON":case "ADD_INNER_ROW":case "DELETE_COLUMN":case "INNER_ROW_TOGGLE":case "ADD_INNER_ROW_BOTTOM":case "INNER_ROW_SETTING":case "INNER_COLUMN_SETTING":case "ADDON_INNER_SETTING":case "CLONE_INNER_ADDON":case "DELETE_INNER_ADDON":case "ADDON_INNER_EDIT":case "CHANGE_COLUMN":case "TOGGLE_COLUMN":case "DELETE_INNER_COLUMN":case "TOGGLE_INNER_COLUMN":case "DISABLE_ADDON":case "DISABLE_INNER_ADDON":var So;
window.warningAtReload=!0;var Po=[],ko=t.map(function(e,o){if(o!=n.index)return e;var r,a=Pn(e,n,t);return null!=a&&a.row?(Po=null==a||null===(r=a.options)||void 0===r||null===(r=r.sideRows)||void 0===r?void 0:r.map(function(t){return t.parent={rowId:e.id,columnId:a.options.columnId},t}),a.row):a});if((null===(So=Po)||void 0===So?void 0:So.length)>0&&ko.push.apply(ko,(0,ue.Z)(Po)),"ADDON_EDIT"===n.type&&Object.keys(Me).includes(n.settings.addonName)){var Ro=Me[n.settings.addonName],To=[];n.settings.formData[Ro].forEach(function(e){null!=
e&&e.content&&Kt()(e.content)&&e.content.forEach(function(e){var n=null!=e&&e.type&&"nested_row"===e.type?e.id:0;if(n){var o=t.find(function(e){return e.id===n});o||To.push({reference:e.reference,original:e.id})}})});var Lo=t[n.settings.rowIndex],Mo=Lo&&Lo.columns[n.settings.colIndex];(null==To?void 0:To.length)>0&&To.forEach(function(e){if(void 0!==(null==e?void 0:e.reference)){var o=t.find(function(t){return t.id===e.reference});Zn(ko,o,null,1,e.original)}else{var r=Sn("12",{padding:"5px 0px 5px 0px",
margin:"0px 0px 0px 0px"},{},e.original);r.parent_addon=n.settings.addonId,r.parent={rowId:(null==Lo?void 0:Lo.id)||0,columnId:(null==Mo?void 0:Mo.id)||0},ko.push(r)}})}return ko;case "EDIT_DEEP_ADDON_TITLE":window.warningAtReload=!0;var Zo=n.payload,jo=Zo.name,Bo=Zo.rowIndex,Jo=Zo.colIndex,Go=Zo.addonIndex,Ho=Zo.itemIndex,Uo=Zo.value,zo=Zo.addonName;return(0,Vt.ZP)(t,function(e){e[Bo].columns[Jo].addons[Go].settings[Me[zo]][Ho][jo]=Uo});case "EDIT_ADDON_TEXT":window.warningAtReload=!0;var Fo=n.payload;
return function(e,t){var n=t.addonIndex,o=t.colIndex,r=t.rowIndex,a=t.text;return e.map(function(e,t){return t===r?Qt(Qt({},e),{},{columns:e.columns.map(function(e,t){return t===o?Qt(Qt({},e),{},{addons:e.addons.map(function(e,t){return t===n?Qt(Qt({},e),{},{settings:Qt(Qt({},e.settings),{},{text:a})}):e})}):e})}):e})}(t,Fo);case "DUPLICATE_DEEP_ADDON":window.warningAtReload=!0;var Vo=n.data,Wo=Vo.addon,Ko=Vo.addonIndex,Yo=Vo.colIndex,Xo=Vo.rowIndex;return Wo.name===R.productList?(0,Vt.ZP)(t,function(e){var t=
e[Xo],n=t.columns[Yo],o=n.addons,r=function(e){var t=e.sections,n=e.rowId,o=e.columnId,r=e.addonList,a=e.addon,i=Object.fromEntries(t.map(function(e,t){return[e.id,_t(_t({},e),{},{index:t})]})),c=K()(a),s=null;if("div"===c.name){var d=wt({sections:t,sectionsObject:i,addon:c,addonList:r,options:{rowId:n,columnId:o}}),u=d.divAddon,m=d.children,p=d.nestedSections;s={name:u.name,addons:[u].concat((0,ue.Z)(m)),sections:p}}else if(["accordion","tab"].includes(c.name)){var v=xt({sections:t,sectionsObject:i,
addon:c,options:{rowId:n,columnId:o}});at(v)&&(s={name:v.addon.name,addons:[v.addon],sections:v.sections})}else if(c.name===l)c.id=qe(),s={name:c.name,addons:[Ot(c)],sections:[]};else if(c.name===R.productList){var f;c.id=qe();var b=null!==(f=c.items)&&void 0!==f?f:[];b.forEach(function(e,t){var n=[];e.forEach(function(t){if(!t.parent)if("div"===t.name){var o=function(e){var t=e.addonList,n=e.addon,o=[];return n.id=qe(),function e(n){t.forEach(function(t){var r,a=null===(r=n.children)||void 0===r?
void 0:r.findIndex(function(e){return e===t.id});if(at(a)&&-1!==a){var i,l=qe();null===(i=n.children)||void 0===i||i.splice(a,1,l);var c=K()(t);c.parent=n.id,c.id=l,o.push(c),"div"===c.name&&e(c)}})}(n),{divAddon:n,children:o}}({addon:t,addonList:e}),r=o.divAddon,a=o.children;n.push.apply(n,[r].concat((0,ue.Z)(a)))}else t.id=qe(),n.push(t)}),b[t]=n}),s={name:c.name,addons:[c],sections:[]}}else c.id=qe(),s={name:c.name,addons:[c],sections:[]};return s}({sections:e,rowId:t.id,columnId:n.id,addonList:o,
addon:o[Ko]});if(!at(r))return e;var a=(0,j.Z)(r.addons,1)[0];if(at(a)&&a.parent){var i,c=o.findIndex(function(e){return e.id===a.parent}),s=o.findIndex(function(e){return e.id===a.id}),d=o[c];at(d)&&(null===(i=d.children)||void 0===i||i.splice(s+1,0,a.id))}o.splice.apply(o,[Ko+1,0].concat((0,ue.Z)(r.addons))),e.splice.apply(e,[Xo+1,0].concat((0,ue.Z)(r.sections)))}):function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:
{},o=n.addon,r=n.addonIndex,a=n.colIndex,i=n.rowIndex,l=K()(t),c=[],s={};t.forEach(function(e,t){return s[e.id]={row:e,rowIndex:t}});var d=t[i].columns[a].addons,u=t[i],m=u.columns[a],p=l[i].columns[a].addons,v={rowId:u.id,columnId:m.id},f={addon:o},b=[],h=un({addonData:f,parent:v,stateObj:s,clonedRows:c,newAddons:b,addons:p}).clonedAddon;if(b=[h].concat((0,ue.Z)(b)),h.parent&&(d=d.map(function(e){return e.id.toString()===h.parent.toString()?function(e){var t=e.divAddon,n=e.childAddonId,o=e.adjChildId,
r=K()(t);if(r.children&&o){var a=r.children.findIndex(function(e){return e===o});-1===a?r.children.push(n):r.children.splice(a+1,0,n)}else r.children=[n];return r}({divAddon:e,childAddonId:h.id,adjChildId:n.addon.id}):e})),"div"===h.name){var g,E,y=r,_=null!==(g=null===(E=f.addon)||void 0===E||null===(E=E.children)||void 0===E?void 0:E.length)&&void 0!==g?g:0;if(_>0){var w=l[i].columns[a].addons.findIndex(function(e){var t,n=null===(t=f.addon)||void 0===t||null===(t=t.children)||void 0===t?void 0:
t[_-1];return e.id.toString()===(null==n?void 0:n.toString())});y=-1===w?r:w}l[i].columns[a].addons=[].concat((0,ue.Z)(d.slice(0,y+1)),(0,ue.Z)(b),(0,ue.Z)(d.slice(y+1)))}else if(null!=h&&h.parent&&(null===(e=l[i].columns[a].addons[r])||void 0===e||null===(e=e.id)||void 0===e?void 0:e.toString())===h.parent.toString()&&"div"===l[i].columns[a].addons[r].name){var x=l[i].columns[a].addons,I=x[r],O=x.findIndex(function(e){var t,n=null==I||null===(t=I.children)||void 0===t?void 0:t.find(function(e){return e.toString()===
f.addon.id.toString()});return e.id.toString()===(null==n?void 0:n.toString())}),C=-1===O?r:O;l[i].columns[a].addons=[].concat((0,ue.Z)(d.slice(0,C+1)),(0,ue.Z)(b),(0,ue.Z)(d.slice(C+1)))}else l[i].columns[a].addons=[].concat((0,ue.Z)(d.slice(0,r+1)),(0,ue.Z)(b),(0,ue.Z)(d.slice(r+1)));return[].concat((0,ue.Z)(l),c)}(t,{addon:Wo,addonIndex:Ko,colIndex:Yo,rowIndex:Xo});case "PASTE_ADDON_NEW":window.warningAtReload=!0;var qo=n.payload.pasteOptions;return function(){var e=arguments.length>0&&void 0!==
arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.rowIndex,o=t.colIndex,r=t.addonIndex,a=t.childIndex,i=t.parentId,c=t.addonData,s=t.isAbove,u=void 0!==s&&s,m=K()(e),p=m[n],v=p.columns[o],f=v.addons,b=function(e){var t=e.sections,n=e.rowId,o=e.columnId,r=e.addonList,a=e.addon,i=Object.fromEntries(t.map(function(e,t){return[e.id,Qt(Qt({},e),{},{index:t})]})),c=K()(a),s=null;if("div"===c.name){var u=nn({sections:t,sectionsObject:i,addon:c,addonList:r,options:{rowId:n,
columnId:o}}),m=u.divAddon,p=u.children,v=u.nestedSections;s={name:m.name,addons:[m].concat((0,ue.Z)(p)),sections:v}}else if(Object.keys(d).includes(c.name)){var f=on({sections:t,sectionsObject:i,addon:c,options:{rowId:n,columnId:o}});at(f)&&(s={name:f.addon.name,addons:[f.addon],sections:f.sections})}else if(c.name===l)c.id=qe(),s={name:c.name,addons:[an(c)],sections:[]};else if(c.name===R.productList){var b;c.id=qe();var h=null!==(b=c.items)&&void 0!==b?b:[];h.forEach(function(e,t){var n=[];e.forEach(function(t){if(!t.parent)if("div"===
t.name){var o=cn({addon:t,addonList:e}),r=o.divAddon,a=o.children;n.push.apply(n,[r].concat((0,ue.Z)(a)))}else t.id=qe(),n.push(t)}),h[t]=n}),s={name:c.name,addons:[c],sections:[]}}else c.id=qe(),s={name:c.name,addons:[c],sections:[]};return s}({sections:c.rows,rowId:p.id,columnId:v.id,addonList:c.addon,addon:c.addon[0]});if(!at(b))return m;var h=(0,j.Z)(b.addons,1)[0];if(h.parent=!1,at(a)){var g,E=null!=i?i:null===(g=f[r])||void 0===g?void 0:g.parent;if(E){var y,_=f.findIndex(function(e){return e.id===
E}),w=f[_];at(w)&&(null===(y=w.children)||void 0===y||y.splice(u?a:a+1,0,h.id),h.parent=w.id)}}return f.splice.apply(f,[u?r:r+1,0].concat((0,ue.Z)(b.addons))),m.splice.apply(m,[n,0].concat((0,ue.Z)(b.sections))),m}(t,qo);case "INSERT_ADDON":window.warningAtReload=!0;var $o=n.payload,Qo=$o.options,er=$o.rowIndex,tr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.sections,n=e.addon,o=e.rows,r=e.rowIndex,a=e.colIndex,i=[],l={};o.forEach(function(e,t){return l[e.id]={row:e,
rowIndex:t}});var c=n[0],s=[],d=un({addonData:{addon:c},parent:f,stateObj:l,clonedRows:i,newAddons:s,addons:n}).clonedAddon;if(s.push(d),!t.length){var u=Sn();return[Qt(Qt({},u),{},{columns:[Qt(Qt({},u.columns[0]),{},{addons:s})]})].concat((0,ue.Z)(i.reverse()))}var m=t[r].columns[a].addons,p=t[r],v=p.columns[a],f={rowId:p.id,columnId:v.id};d.parent&&(m=m.map(function(e){return e.id.toString()===d.parent.toString()&&(e.children?e.children.push(d.id):e.children=[d.id]),e}));var b=Qt(Qt({},t[r]),{},
{columns:t[r].columns.map(function(e,t){return t===a?Qt(Qt({},e),{},{addons:[].concat((0,ue.Z)(e.addons),s)}):e})});return[b].concat((0,ue.Z)(i.reverse()))}(Qo),nr=In(tr);return[].concat((0,ue.Z)(t.slice(0,er)),(0,ue.Z)(nr),(0,ue.Z)(t.slice(er+1)));case "ADD_ADDON":window.warningAtReload=!0;var or=n.payload,rr=or.rowIndex,ar=or.colIndex,ir=or.addonIndex,lr=or.parentAddon,cr=or.childIndex,sr=or.newAddon,dr=or.deepAddon;return(0,Vt.ZP)(t,function(e){var t=e[rr].columns[ar].addons;if(!t)return e;var o=
e[rr].id,r=e[rr].columns[ar].id;if(lr){sr.parent=lr.id;var a=t.find(function(e){return e.id===lr.id});a.children||(a.children=[]),void 0===cr?a.children.push(sr.id):a.children.splice(cr,0,sr.id)}if(Object.keys(Me).includes(sr.name)){var i=Me[sr.name];sr.settings[i]&&sr.settings[i].forEach(function(t,n){if(t.content&&Kt()(t.content))t.content.forEach(function(t,a){t.id=qe();var l={type:"nested_row",name:"row",id:qe()},c=Sn("12",{padding:"5px 0px 5px 0px",margin:"0px 0px 0px 0px"});c.parent_addon=sr.id,
c.parent={rowId:o,columnId:r},c.id=l.id,sr.settings[i][n].content[a]=l,c.columns[0].addons.push(t),e.push(c)});else if(t.content&&Xt()(t.content)){var a={id:qe(),name:"text_block",title:"Text Block",visibility:!0,settings:{text:t.content}},l={type:"nested_row",name:"row",id:qe()},c=Sn("12",{padding:"5px 0px 5px 0px",margin:"0px 0px 0px 0px"});c.parent_addon=sr.id,c.parent={rowId:o,columnId:r},c.id=l.id,sr.settings[i][n].content=[l],c.columns[0].addons.push(a),e.push(c)}})}if("table_advanced"===sr.name){var l,
c;if((null===(l=sr.settings)||void 0===l||null===(l=l.jp_table_advanced_item)||void 0===l?void 0:l.length)>0){var s,d=On(sr.settings.jp_table_advanced_item);try{for(d.s();!(s=d.n()).done;){var u=s.value;if(void 0!==(null==u?void 0:u.content)&&Xt()(u.content)){var m={id:qe(),name:"text_block",visibility:!0,collapse:!1,reference_id:sr.id,settings:{text:u.content}};u.content=[],u.content.push(m)}}}catch(e){d.e(e)}finally{d.f()}}if((null===(c=sr.settings)||void 0===c||null===(c=c.table_advanced_item)||
void 0===c?void 0:c.length)>0){var p,v=On(sr.settings.table_advanced_item);try{for(v.s();!(p=v.n()).done;){var f,b=On(p.value.table_advanced_item);try{for(b.s();!(f=b.n()).done;){var h=f.value;if(void 0!==(null==h?void 0:h.content)&&Xt()(h.content)){var g={id:qe(),name:"text_block",visibility:!0,collapse:!1,reference_id:sr.id,settings:{text:h.content}};h.content=[],h.content.push(g)}}}catch(e){b.e(e)}finally{b.f()}}}catch(e){v.e(e)}finally{v.f()}}}if(dr&&"table_advanced"===dr.name){var E=n.payload.deepAddonData,
y=E.deepAddonItemKey,_=E.deepAddonItemIndex,w=E.deepAddonItemInnerIndex,x=t.find(function(e){return e.id===dr.id});"table_advanced_item"===y?(sr.reference_id=dr.id,x.settings[y][_][y][w].content.splice(ir,0,sr)):x.settings[y][_].content.splice(ir,0,sr)}else void 0!==ir?t.splice(ir,0,sr):t.push(sr)});case "UPDATE_DATA_FROM_LAYERS_PANEL":return window.warningAtReload=!0,n.data;case "COLUMN_SORT":window.warningAtReload=!0;var ur=n.rowIndex;return t.map(function(e,t){return t!=ur?e:Pn(e,n)});default:return t}},
{filter:function(e,t,n){var o=n.present;return("ADDON_EDIT"!==e.type||JSON.stringify(t)!==JSON.stringify(o))&&!["ADDON_INNER_EDIT","SET_PAGE_SETTINGS_DATA","SET_PAGE_SETTINGS_FORM"].includes(e.type)},limit:50,undoType:"UNDO_PAGE_BUILDER",redoType:"REDO_PAGE_BUILDER"}),Vn=(0,o.UY)({pageBuilder:Fn,copiedData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se;switch((arguments.length>1?arguments[1]:void 0).type){case "SET_COPIED_DATA_STATUS":var t=ce(h),n=ce(g);return{isCopiedItemsAvailable:!!t||
!!n,isCopiedAddonAvailable:!!t,isCopiedSectionAvailable:!!n};case "CLEAR_COPIED_DATA":return le(h),le(g),ne(Joomla.JText._("COM_JPAGEBUILDER_ACTION_CLEARED_CLIPBOARD_MESSAGE"),Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),se;default:return e}},addonList:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0===(null===(e=addonsFromDB)||void 0===e?void 0:e.length)?a:a.filter(function(e){var t,n;return null===(t=addonsFromDB)||void 0===t||!t[e.addon_name]||1==(null===(n=addonsFromDB[e.addon_name])||
void 0===n?void 0:n.status)});return(arguments.length>1?arguments[1]:void 0).type,t},pageOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gn,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case "SET_PAGE_SETTINGS_DATA":return Jn(Jn({},e),{},{data:Jn(Jn({},e.data),t.payload)});case "SET_PAGE_SETTINGS_FORM":return Jn(Jn({},e),{},{form:t.payload});default:return e}},tools:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zn,t=arguments.length>
1?arguments[1]:void 0;switch(t.type){case "SET_GLOBAL_PANEL":return Un(Un({},e),{},{globalPanel:t.payload});case "CHANGE_ACTIVE_DEVICE":return Un(Un({},e),{},{activeDevice:t.payload});default:return e}}});const Wn=(0,o.MT)(Vn,window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__());var Kn=n(9862),Yn=n(4664),Xn=n(8216),qn=n(2068),$n="row",Qn="column",eo="addon",to="block",no="builderaddon",oo="myaddon";const ro=function(e){var t=e.children,n=(0,qn.L)({accept:eo,hover:function(e){},
collect:function(e){return{isOver:e.isOver(),canDrop:e.canDrop()}},canDrop:function(e){return"columns"===e.name}}),o=(0,j.Z)(n,2),r=o[0],a=(r.canDrop,r.isOver,o[1]);return F.createElement("div",{className:"builder-container",ref:a},t)};var ao=n(7462),io=n(7326);const lo={saveClose:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M31.693 10.667a8.669 8.669 0 0 1-7.377 8.57v8.067a2.572 2.572 0 0 1-2.571 2.571H2.888a2.539 2.539 0 0 1-2.572-2.571V8.446a2.572 2.572 0 0 1 2.572-2.571h12.915a8.667 8.667 0 0 1 15.89 4.792Zm-9.948 16.315V19.24a8.67 8.67 0 0 1-6.042-3.935H6.745c-.75 0-1.286-.536-1.286-1.286V8.446H3.21c-.214 0-.321.161-.321.322v18.214c0 .214.107.322.321.322h18.215c.16 0 .321-.108.321-.322Zm-7.386-16.315c0-.768.1-1.512.287-2.22H8.031v4.285h6.576a8.689 8.689 0 0 1-.248-2.065Zm-2.043 5.922c-2.625 0-4.714 2.143-4.714 4.715a4.687 4.687 0 0 0 4.714 4.714c2.572 0 4.715-2.09 4.715-4.714 0-2.572-2.143-4.715-4.715-4.715Zm0 6.857c-1.232 0-2.143-.91-2.143-2.142 0-1.179.911-2.143 2.143-2.143a2.15 2.15 0 0 1 2.143 2.143c0 1.232-.964 2.142-2.143 2.142ZM28.167 6.51l-4.153 4.154 4.153 4.153a.69.69 0 1 1-.977.977l-4.154-4.153-4.153 4.153a.69.69 0 0 1-.977 0 .69.69 0 0 1 0-.977l4.153-4.153-4.153-4.154a.69.69 0 1 1 .977-.977l4.154 4.153 4.153-4.153a.69.69 0 1 1 .977.977Z" fill="currentColor"/>',
viewBox:"0 0 32 32"},backendLink:{icon:'<path d="M2,21c0,0.6,0.4,1,1,1h5V10H2V21z M16,22h5c0.6,0,1-0.4,1-1V10h-6V22z M10,22h4V10h-4V22z M21,2H3C2.4,2,2,2.4,2,3v5h20V3C22,2.4,21.6,2,21,2z" fill="currentColor"/>',viewBox:"0 0 24 24"},saveNew:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M12.38 16.657c-2.637 0-4.736 2.153-4.736 4.736a4.71 4.71 0 0 0 4.736 4.737c2.584 0 4.737-2.1 4.737-4.737 0-2.583-2.153-4.736-4.737-4.736Zm0 6.89c-1.238 0-2.153-.916-2.153-2.154 0-1.184.915-2.152 2.153-2.152a2.16 2.16 0 0 1 2.153 2.152c0 1.238-.968 2.153-2.153 2.153Z" fill="#676D98"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.836 10.832a8.71 8.71 0 0 1-7.4 8.61v7.98a2.584 2.584 0 0 1-2.583 2.583H2.908a2.55 2.55 0 0 1-2.584-2.583V8.476c0-1.4 1.13-2.583 2.584-2.583h13.049a8.707 8.707 0 0 1 15.879 4.94ZM21.853 27.1v-7.652a8.711 8.711 0 0 1-6.16-4.082h-8.91c-.754 0-1.292-.538-1.292-1.291V8.476h-2.26c-.216 0-.323.162-.323.323v18.3c0 .215.107.323.323.323h18.3c.16 0 .322-.108.322-.323Zm-7.432-16.267c0-.816.113-1.607.323-2.356h-6.67v4.306h6.566a8.732 8.732 0 0 1-.219-1.95Zm9.432-4.644a.714.714 0 0 0-1.429 0v3.93h-3.929a.715.715 0 0 0 0 1.429h3.93v3.93a.714.714 0 1 0 1.428 0v-3.93h3.93a.714.714 0 0 0 0-1.43h-3.93V6.189Z" fill="currentColor"/>',
viewBox:"0 0 32 32"},cornerGear:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.852 0H0v4.817h3.235V3.211h1.617V0Zm12.94 0h-6.47v3.211h6.47V0Zm11.322 0H24.26v3.211h1.618v1.606h3.235V0ZM0 11.24v6.423h3.235V11.24H0Zm29.114 6.423V11.24h-3.235v6.423h3.235Zm-25.88 6.423H0v4.817h4.852v-3.211H3.235v-1.606Zm8.088 4.817h6.47v-3.211h-6.47v3.211Zm19.462-2.213 1.062.6a.337.337 0 0 1 .148.349c-.297.899-.741 1.698-1.359 2.372a.297.297 0 0 1-.37.05l-1.062-.6a4.953 4.953 0 0 1-1.482.875v1.224c0 .125-.1.25-.247.3a6.52 6.52 0 0 1-2.693 0c-.123-.05-.222-.175-.222-.3v-1.224c-.568-.2-1.062-.5-1.507-.874l-1.062.6a.297.297 0 0 1-.37-.05 6.402 6.402 0 0 1-1.334-2.373.289.289 0 0 1 .123-.35l1.062-.6a5.34 5.34 0 0 1 0-1.772l-1.062-.6a.289.289 0 0 1-.123-.35c.271-.898.74-1.697 1.333-2.372a.297.297 0 0 1 .371-.05l1.062.625c.445-.4.939-.7 1.507-.9v-1.223c0-.125.074-.25.222-.275a5.772 5.772 0 0 1 2.693 0 .29.29 0 0 1 .247.275v1.224c.543.2 1.037.5 1.482.874l1.062-.6a.297.297 0 0 1 .37.05 6.403 6.403 0 0 1 1.334 2.373c.05.125 0 .274-.123.35l-1.063.599a4.29 4.29 0 0 1 0 1.773Zm-6.62-.9c0 1.125.864 1.999 1.976 1.999a1.977 1.977 0 0 0 1.976-1.998c0-1.099-.89-1.998-1.976-1.998-1.112 0-1.976.899-1.976 1.998Z" fill="currentColor"/>',
viewBox:"0 0 32 32"},expandAll:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M9.68417 2.5549H4.37292L12.2388 10.4544C12.7429 10.925 12.7429 11.7318 12.2388 12.236C11.7682 12.7401 10.9613 12.7401 10.4572 12.236L2.59113 4.36995L2.59136 9.64795C2.59136 10.354 2.01993 10.9254 1.31391 10.9254C0.607895 10.9254 0.036461 10.354 0.036461 9.64795V1.27768C0.036461 0.571668 0.607865 0.000234483 1.31391 0.000234483L9.68417 0C10.3902 0 10.9616 0.571434 10.9616 1.27745C10.9616 1.98347 10.3902 2.5549 9.68417 2.5549ZM29.4102 22.3173C29.4102 21.6113 29.9816 21.0399 30.6877 21.0399L30.6874 21.0399C31.3934 21.0399 31.9648 21.6114 31.9648 22.3174L31.9651 30.7213C31.9651 31.4273 31.3936 31.9987 30.6876 31.9987H22.3173C21.6113 31.9987 21.0399 31.4273 21.0399 30.7213C21.0399 30.0153 21.6113 29.4438 22.3173 29.4438H27.6286L19.7962 21.5778C19.292 21.1072 19.292 20.3003 19.7962 19.7962C20.2668 19.292 21.0737 19.292 21.5778 19.7962L29.4102 27.6286V22.3173ZM10.4209 19.8008L2.5549 27.6332V22.322C2.5549 21.6159 1.98347 21.0445 1.27745 21.0445C0.571434 21.0445 0 21.6159 0 22.322V30.6922C0 31.3983 0.571434 31.9697 1.27745 31.9697H9.64771C10.3538 31.9697 10.9252 31.3982 10.9252 30.6922C10.9252 29.9862 10.3537 29.4148 9.64771 29.4148H4.36996L12.236 21.5487C12.7401 21.0446 12.7401 20.2377 12.236 19.7671C11.7319 19.2963 10.9252 19.2963 10.4209 19.8007L10.4209 19.8008ZM22.3173 0.036461H30.6876L30.6875 0.036521C31.3935 0.036521 31.965 0.607925 31.9985 1.31397L31.9987 9.68423C31.9987 10.3903 31.4273 10.9617 30.7213 10.9617C30.0153 10.9617 29.4438 10.3903 29.4438 9.68423V4.37298L21.5778 12.2054C21.1072 12.7095 20.3003 12.7095 19.7962 12.2054C19.292 11.7348 19.292 10.9279 19.7962 10.4238L27.6286 2.59136H22.3173C21.6113 2.59136 21.0399 2.01993 21.0399 1.31391C21.0399 0.607895 21.6113 0.036461 22.3173 0.036461Z" fill="currentColor" />',
viewBox:"0 0 32 32"},collapseAll:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M12.3566 2.8512L12.3566 11.0827L12.3565 11.0826C12.3565 11.7769 11.7938 12.3389 11.0984 12.3719L2.85525 12.3721C2.15995 12.3721 1.59719 11.8101 1.59719 11.1158C1.59719 10.4215 2.15992 9.85955 2.85525 9.85955H8.08587L0.372362 2.12392C-0.124121 1.66111 -0.124121 0.867614 0.372362 0.371834C0.835835 -0.123945 1.63045 -0.123945 2.12694 0.371835L9.84044 8.07441V2.8512C9.84044 2.15689 10.4032 1.59493 11.0985 1.59493C11.7938 1.59493 12.3566 2.15686 12.3566 2.8512ZM12.3566 29.1507L12.3566 20.9192L12.3565 20.9194C12.3565 20.225 11.7938 19.6631 11.0984 19.6301L2.85525 19.6299C2.15995 19.6299 1.59719 20.1918 1.59719 20.8861C1.59719 21.5804 2.15992 22.1424 2.85525 22.1424H8.08587L0.372362 29.878C-0.124121 30.3408 -0.124121 31.1343 0.372362 31.6301C0.835835 32.1259 1.63045 32.1259 2.12694 31.6301L9.84044 23.9275V29.1507C9.84044 29.8451 10.4032 30.407 11.0985 30.407C11.7938 30.407 12.3566 29.8451 12.3566 29.1507ZM19.6423 11.0827V2.8512C19.6423 2.15686 20.205 1.59493 20.9003 1.59493C21.5956 1.59493 22.1584 2.15689 22.1584 2.8512V8.07441L29.8719 0.371835C30.3684 -0.123945 31.163 -0.123945 31.6265 0.371834C32.1229 0.867614 32.1229 1.66111 31.6265 2.12392L23.913 9.85955H29.1436C29.8389 9.85955 30.4016 10.4215 30.4016 11.1158C30.4016 11.8101 29.8389 12.3721 29.1436 12.3721L20.9004 12.3719C20.2051 12.3389 19.6423 11.7769 19.6423 11.0826L19.6423 11.0827ZM19.6423 29.1507V20.9192L19.6423 20.9194C19.6423 20.225 20.2051 19.6631 20.9004 19.6301L29.1436 19.6299C29.8389 19.6299 30.4016 20.1918 30.4016 20.8861C30.4016 21.5804 29.8389 22.1424 29.1436 22.1424H23.913L31.6265 29.878C32.1229 30.3408 32.1229 31.1343 31.6265 31.6301C31.163 32.1259 30.3684 32.1259 29.8719 31.6301L22.1584 23.9275V29.1507C22.1584 29.8451 21.5956 30.407 20.9003 30.407C20.205 30.407 19.6423 29.8451 19.6423 29.1507Z" fill="currentColor" />',
viewBox:"0 0 32 32"},roundedCorner:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M0 4.85393C0 2.17318 2.17318 0 4.85393 0H27.1461C29.8268 0 32 2.17318 32 4.85393V27.1461C32 29.8268 29.8268 32 27.1461 32H4.85393C2.17318 32 0 29.8268 0 27.1461V4.85393ZM4.85393 3.23595C3.96035 3.23595 3.23595 3.96035 3.23595 4.85393V27.1461C3.23595 28.0397 3.96035 28.764 4.85393 28.764H27.1461C28.0397 28.764 28.764 28.0397 28.764 27.1461V4.85393C28.764 3.96035 28.0397 3.23595 27.1461 3.23595H4.85393Z" fill="#4E5487" fill="currentColor"/>',
viewBox:"0 0 32 32"},ellipsisDoubleX:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.6 14.2a2.6 2.6 0 100-5.2 2.6 2.6 0 000 5.2zm0 8.667a2.6 2.6 0 100-5.2 2.6 2.6 0 000 5.2zm13-11.267a2.6 2.6 0 11-5.2 0 2.6 2.6 0 015.2 0zM16 22.867a2.6 2.6 0 100-5.2 2.6 2.6 0 000 5.2zM29 11.6a2.6 2.6 0 11-5.2 0 2.6 2.6 0 015.2 0zm-2.6 11.267a2.6 2.6 0 100-5.2 2.6 2.6 0 000 5.2z" fill="currentColor"/>',viewBox:"0 0 32 32"},ellipsisDoubleY:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M17.8 5.6a2.6 2.6 0 105.2 0 2.6 2.6 0 00-5.2 0zm-8.667 0a2.6 2.6 0 105.2 0 2.6 2.6 0 00-5.2 0zm11.267 13a2.6 2.6 0 110-5.2 2.6 2.6 0 010 5.2zM9.133 16a2.6 2.6 0 105.2 0 2.6 2.6 0 00-5.2 0zM20.4 29a2.6 2.6 0 110-5.2 2.6 2.6 0 010 5.2zM9.133 26.4a2.6 2.6 0 105.2 0 2.6 2.6 0 00-5.2 0z" fill="currentColor"/>',
viewBox:"0 0 32 32"},ellipsisX:{icon:'<path d="M19.484 16.484C19.484 14.597 17.887 13 16 13c-1.935 0-3.484 1.597-3.484 3.484A3.47 3.47 0 0016 19.968c1.887 0 3.484-1.549 3.484-3.484zM24.516 13c-1.935 0-3.484 1.597-3.484 3.484a3.47 3.47 0 003.484 3.484c1.887 0 3.484-1.549 3.484-3.484C28 14.597 26.403 13 24.516 13zM7.484 13C5.548 13 4 14.597 4 16.484a3.47 3.47 0 003.484 3.484c1.887 0 3.484-1.549 3.484-3.484C10.968 14.597 9.37 13 7.484 13z" fill="currentColor"/>',viewBox:"0 0 32 32"},ellipsisY:{icon:'<path d="M16.516 19.484C18.403 19.484 20 17.887 20 16c0-1.935-1.597-3.484-3.484-3.484A3.47 3.47 0 0013.032 16c0 1.887 1.549 3.484 3.484 3.484zM20 24.516c0-1.935-1.597-3.484-3.484-3.484a3.47 3.47 0 00-3.484 3.484c0 1.887 1.549 3.484 3.484 3.484C18.403 28 20 26.403 20 24.516zm0-17.032C20 5.548 18.403 4 16.516 4a3.47 3.47 0 00-3.484 3.484c0 1.887 1.549 3.484 3.484 3.484C18.403 10.968 20 9.37 20 7.484z" fill="currentColor"/>',
viewBox:"0 0 32 32"},angleLeft:{icon:'<path d="M8.91 16.007c0 .345.133.69.387.926l10.615 10.694c.227.235.522.373.857.373.696 0 1.231-.539 1.231-1.257 0-.346-.134-.664-.348-.898l-9.745-9.838 9.745-9.852c.214-.22.348-.538.348-.898C22 4.54 21.465 4 20.768 4c-.334 0-.629.138-.87.373l-10.6 10.694c-.255.263-.389.58-.389.94z" fill="currentColor"/>',viewBox:"0 0 32 32"},angleLeftBold:{icon:'<path d="M4.63832 0.15601C4.68859 0.105907 4.74845 0.0664547 4.81432 0.0400107C4.88314 0.0131341 4.95643 -0.000439239 5.03031 1.08367e-05C5.0989 0.000663456 5.16675 0.0142335 5.23031 0.0400107C5.29642 0.0659993 5.35637 0.10551 5.40631 0.15601L5.91431 0.664009C5.9652 0.714884 6.00653 0.7745 6.03631 0.840008C6.06713 0.907479 6.08543 0.979991 6.09031 1.05401C6.0907 1.12737 6.07922 1.20031 6.05631 1.27001C6.0321 1.33606 5.99389 1.3961 5.94431 1.44601L2.38232 4.99999L5.93831 8.55398C5.99267 8.60187 6.03454 8.66228 6.06031 8.72998C6.08322 8.79968 6.0947 8.87262 6.09431 8.94598C6.08943 9.02 6.07113 9.09251 6.04031 9.15998C6.01053 9.22549 5.9692 9.2851 5.91831 9.33598L5.41031 9.84398C5.36036 9.89448 5.30042 9.93399 5.23431 9.95998C5.16624 9.98703 5.09356 10.0006 5.02031 9.99998C4.95175 9.99909 4.88394 9.98553 4.82032 9.95998C4.75445 9.93353 4.69459 9.89408 4.64432 9.84398L0.18633 5.39999C0.125378 5.35376 0.0766339 5.29334 0.0443302 5.22399C0.0125869 5.15372 -0.00247217 5.07705 0.000330366 4.99999C-0.000619339 4.92589 0.0158206 4.85259 0.0483302 4.786C0.0824329 4.7189 0.12931 4.65912 0.18633 4.61L4.63832 0.15601Z" fill="#3366FF"/>',
viewBox:"0 0 7 10"},angleRight:{icon:'<path d="M22.09 15.993c0-.345-.133-.69-.387-.926L11.088 4.373A1.176 1.176 0 0010.232 4C9.535 4 9 4.539 9 5.257c0 .346.134.664.348.898l9.745 9.838-9.745 9.852a1.284 1.284 0 00-.348.898C9 27.46 9.535 28 10.232 28c.334 0 .629-.138.87-.373l10.6-10.694c.255-.263.389-.58.389-.94z" fill="currentColor"/>',viewBox:"0 0 32 32"},angleUp:{icon:'<path d="M15.993 8.91c-.345 0-.69.133-.926.387L4.373 19.912a1.176 1.176 0 00-.373.857C4 21.465 4.539 22 5.257 22c.346 0 .664-.134.898-.348l9.838-9.745 9.852 9.745c.22.214.538.348.898.348.718 0 1.257-.535 1.257-1.232 0-.334-.138-.629-.373-.87l-10.694-10.6a1.317 1.317 0 00-.94-.389z" fill="currentColor"/>',
viewBox:"0 0 32 32"},angleDown:{icon:'<path d="M16.007 22.09c.345 0 .69-.133.926-.387l10.694-10.615c.235-.227.373-.522.373-.856C28 9.535 27.461 9 26.743 9c-.346 0-.664.134-.898.348l-9.838 9.745-9.852-9.745A1.284 1.284 0 005.257 9C4.54 9 4 9.535 4 10.232c0 .334.138.629.373.87l10.694 10.6c.263.255.58.389.94.389z" fill="currentColor"/>',viewBox:"0 0 32 32"},times:{icon:'<path d="M5 15L15 5M5 5L15 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>',viewBox:"0 0 20 20"},
timesAlt:{icon:'<path d="M20.17 16l6.254-6.254a1.966 1.966 0 000-2.78l-1.39-1.39a1.966 1.966 0 00-2.78 0L16 11.83 9.746 5.576a1.966 1.966 0 00-2.78 0l-1.39 1.39a1.966 1.966 0 000 2.78L11.83 16l-6.254 6.254a1.966 1.966 0 000 2.78l1.39 1.39a1.966 1.966 0 002.78 0L16 20.17l6.254 6.254a1.966 1.966 0 002.78 0l1.39-1.39a1.966 1.966 0 000-2.78L20.17 16z" fill="currentColor"/>',viewBox:"0 0 32 32"},check:{icon:'<path d="M11.19 26.568L1.44 16.98a1.458 1.458 0 010-2.086l2.12-2.087a1.518 1.518 0 012.122 0l6.568 6.46L26.318 5.431a1.518 1.518 0 012.121 0l2.122 2.086c.585.576.585 1.51 0 2.086L13.31 26.568a1.518 1.518 0 01-2.122 0z" fill="currentColor"/>',
viewBox:"0 0 32 32"},checkAlt:{icon:'<path d="M12.495 30.407c.898 0 1.592-.372 2.083-1.1L30.492 4.521c.356-.558.508-1.032.508-1.49C31 1.83 30.154 1 28.934 1c-.829 0-1.337.305-1.845 1.1L12.411 25.38l-7.534-9.668c-.508-.66-1.033-.931-1.778-.931C1.88 14.781 1 15.645 1 16.83c0 .524.186 1.032.626 1.557l8.77 10.937c.593.745 1.22 1.083 2.1 1.083z" fill="currentColor"/>',viewBox:"0 0 32 32"},checkCircle:{icon:'<path d="M16 1C7.714 1 1 7.774 1 16c0 8.286 6.714 15 15 15 8.226 0 15-6.714 15-15 0-8.226-6.774-15-15-15zm0 2.903c6.653 0 12.097 5.444 12.097 12.097 0 6.714-5.444 12.097-12.097 12.097A12.055 12.055 0 013.903 16C3.903 9.347 9.286 3.903 16 3.903zm8.468 7.924l-1.391-1.392c-.242-.302-.726-.302-1.029 0l-8.528 8.468-3.629-3.629c-.302-.302-.726-.302-1.028 0l-1.391 1.33c-.242.303-.242.787 0 1.03l5.504 5.564c.302.302.726.302 1.028 0l10.464-10.343c.242-.303.242-.787 0-1.028z" fill="currentColor"/>',
viewBox:"0 0 32 32"},plus:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M16 2a2.333 2.333 0 00-2.333 2.333v9.334H4.333a2.333 2.333 0 000 4.666h9.334v9.334a2.333 2.333 0 004.667 0v-9.334h9.333a2.333 2.333 0 000-4.666h-9.334V4.333A2.333 2.333 0 0016 2z" fill="currentColor"/>',viewBox:"0 0 32 32"},plusCircle:{icon:'<path d="M16.008 32C24.768 32 32 24.768 32 16.008 32 7.232 24.752 0 15.992 0 7.232 0 0 7.232 0 16.008 0 24.768 7.232 32 16.008 32zm-.032-8.37c-.976 0-1.593-.715-1.593-1.706V17.6h-4.55C8.824 17.6 8.11 17 8.11 16.024c0-.991.682-1.609 1.722-1.609h4.55v-4.55c0-.991.619-1.707 1.594-1.707.975 0 1.625.7 1.625 1.707v4.55h4.567c1.04 0 1.706.618 1.706 1.61 0 .975-.699 1.576-1.706 1.576H17.6v4.323c0 1.024-.65 1.706-1.625 1.706z" fill="currentColor"/>',
viewBox:"0 0 32 32"},plusSquare:{icon:'<path d="M24.571 14.929c0-.402-.401-.804-.803-.804h-5.893V8.232c0-.402-.402-.803-.804-.803H14.93a.814.814 0 00-.804.803v5.893H8.232a.814.814 0 00-.803.804v2.142c0 .47.334.804.803.804h5.893v5.893c0 .469.335.803.804.803h2.142a.814.814 0 00.804-.803v-5.893h5.893a.814.814 0 00.803-.804V14.93zM31 4.214C31 2.474 29.527 1 27.786 1H4.214A3.215 3.215 0 001 4.214v23.572C1 29.594 2.406 31 4.214 31h23.572A3.215 3.215 0 0031 27.786V4.214zm-3.214 23.17c0 .268-.201.402-.402.402H4.616c-.268 0-.402-.134-.402-.402V4.616c0-.2.134-.402.402-.402h22.768c.2 0 .402.201.402.402v22.768z" fill="currentColor"/>',
viewBox:"0 0 32 32"},minus:{icon:'<rect x="30" y="14" width="4.667" height="28" rx="2" transform="rotate(90 30 14)" fill="currentColor"/>',viewBox:"0 0 32 32"},minusCircle:{icon:'<path d="M16.008 32C24.768 32 32 24.768 32 16.008 32 7.232 24.752 0 15.992 0 7.232 0 0 7.232 0 16.008 0 24.768 7.232 32 16.008 32zm-.032-14.4H9.832c-1.007 0-1.722-.6-1.722-1.576 0-.991.682-1.609 1.722-1.609h12.336c1.04 0 1.706.618 1.706 1.61 0 .975-.699 1.576-1.706 1.576h-5.239-.953z" fill="currentColor"/>',viewBox:"0 0 32 32"},
playCircle:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.097C8.874 3.097 3.097 8.874 3.097 16S8.874 28.903 16 28.903 28.903 23.126 28.903 16 23.126 3.097 16 3.097zM0 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16S0 24.837 0 16z" fill="currentColor"/><path d="M11.871 10.655c0-.815.9-1.309 1.586-.871l8.4 5.345a1.032 1.032 0 010 1.742l-8.4 5.345a1.032 1.032 0 01-1.586-.87V10.654z" fill="currentColor"/>',viewBox:"0 0 32 32"},info:{icon:'<path d="M32 16c0-8.774-7.226-16-16-16C7.161 0 0 7.226 0 16c0 8.839 7.161 16 16 16 8.774 0 16-7.161 16-16zm-16 3.226c1.613 0 2.968 1.355 2.968 2.968A2.96 2.96 0 0116 25.16c-1.677 0-2.968-1.29-2.968-2.968A2.96 2.96 0 0116 19.227zM13.161 8.58c-.064-.452.323-.84.774-.84H18c.452 0 .839.388.774.84l-.451 8.774c-.065.451-.387.71-.775.71h-3.16c-.388 0-.71-.259-.775-.71L13.16 8.58z" fill="currentColor"/>',
viewBox:"0 0 32 32"},undo:{icon:'<path d="M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z" fill="currentColor"/>',viewBox:"0 0 512 512"},redo:{icon:'<path d="M463.5 224l8.5 0c13.3 0 24-10.7 24-24l0-128c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1c-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8l119.5 0z" fill="currentColor"/>',
viewBox:"0 0 512 512"},lock:{icon:'<path d="M27 14h-1.5V9.5C25.5 4.312 21.187 0 16 0c-5.25 0-9.5 4.313-9.5 9.5V14H5a3 3 0 00-3 3v12c0 1.688 1.313 3 3 3h22a3 3 0 003-3V17c0-1.625-1.375-3-3-3zm-6.5 0h-9V9.5c0-2.438 2-4.5 4.5-4.5 2.438 0 4.5 2.063 4.5 4.5V14z" fill="currentColor"/>',viewBox:"0 0 32 32"},unlock:{icon:'<path d="M23.5 2c-4.667.056-8.389 3.889-8.389 8.556v3.888H2.667A2.667 2.667 0 000 17.111v10.667c0 1.5 1.167 2.666 2.667 2.666h19.555a2.667 2.667 0 002.667-2.666V17.11c0-1.444-1.222-2.667-2.667-2.667h-2.666V10.5c0-2.167 1.722-4 3.944-4.056 2.222 0 4.056 1.834 4.056 4v4.445c0 .778.555 1.333 1.333 1.333h1.778c.722 0 1.333-.555 1.333-1.333v-4.445C32 5.778 28.167 2 23.5 2z" fill="currentColor"/>',
viewBox:"0 0 32 32"},arrowsX:{icon:'<path d="M31.564 16.948l-5.38 5.38c-.945.944-2.563.275-2.563-1.062v-2.881H8.384v2.881c0 1.337-1.619 2.006-2.562 1.063L.44 16.947a1.494 1.494 0 010-2.12l5.38-5.38c.944-.944 2.563-.275 2.563 1.062v2.881h15.243v-2.887c0-1.337 1.619-2.006 2.562-1.062l5.375 5.38a1.513 1.513 0 010 2.126z" fill="currentColor"/>',viewBox:"0 0 32 32"},arrowsY:{icon:'<path d="M21.483 23.594h-2.916V8.406h2.916c1.33 0 2.028-1.625 1.077-2.562L17.046.469a1.401 1.401 0 00-2.092 0L9.44 5.844c-.951.937-.254 2.562 1.077 2.562h2.98v15.188h-2.98c-1.33 0-2.028 1.625-1.077 2.562l5.514 5.375c.57.625 1.521.625 2.092 0l5.514-5.375c.951-.937.254-2.562-1.077-2.562z" fill="currentColor"/>',
viewBox:"0 0 32 32"},download:{icon:'<path d="M13.5 0c-.875 0-1.5.688-1.5 1.5V12H6.5c-1.125 0-1.688 1.375-.875 2.188l9.5 9.5c.438.437 1.25.437 1.688 0l9.5-9.5c.812-.813.25-2.188-.875-2.188H20V1.5c0-.813-.688-1.5-1.5-1.5h-5zM32 23.5c0-.813-.688-1.5-1.5-1.5h-9.188l-3.062 3.063a3.136 3.136 0 01-4.563 0L10.626 22H1.5c-.875 0-1.5.688-1.5 1.5v7c0 .875.625 1.5 1.5 1.5h29c.813 0 1.5-.625 1.5-1.5v-7zM24.25 29c0 .688-.563 1.25-1.25 1.25-.688 0-1.25-.563-1.25-1.25 0-.688.563-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zm4 0c0 .688-.563 1.25-1.25 1.25-.688 0-1.25-.563-1.25-1.25 0-.688.563-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25z" fill="currentColor"/>',
viewBox:"0 0 32 32"},upload:{icon:'<path d="M18.5 23.988c.813 0 1.5-.626 1.5-1.502V11.971h5.438a1.234 1.234 0 00.875-2.128l-9.5-9.514c-.438-.439-1.25-.439-1.688 0l-9.5 9.514A1.234 1.234 0 006.5 11.97H12v10.515c0 .876.625 1.502 1.5 1.502h5zm13.5-.5c0-.814-.688-1.503-1.5-1.503H22v.501c0 1.94-1.625 3.505-3.5 3.505h-5a3.497 3.497 0 01-3.5-3.505v-.5H1.5c-.875 0-1.5.688-1.5 1.502v7.01C0 31.374.625 32 1.5 32h29c.813 0 1.5-.626 1.5-1.502v-7.01zm-7.75 5.508c0 .688-.563 1.251-1.25 1.251-.688 0-1.25-.563-1.25-1.251 0-.689.563-1.252 1.25-1.252.688 0 1.25.563 1.25 1.252zm4 0c0 .688-.563 1.251-1.25 1.251-.688 0-1.25-.563-1.25-1.251 0-.689.563-1.252 1.25-1.252.688 0 1.25.563 1.25 1.252z" fill="currentColor"/>',
viewBox:"0 0 32 32"},cloudUpload:{icon:'<path d="M16.645 12.951a.868.868 0 00-1.228 0l-5.258 5.258a1.247 1.247 0 101.764 1.765l2.86-2.86V28.26a1.247 1.247 0 102.496 0V17.113l2.86 2.86a1.248 1.248 0 101.765-1.764l-5.259-5.258z" fill="currentColor"/><path d="M26.008 11.828C25.86 6.384 21.386 2 15.906 2c-2.517 0-4.928.931-6.79 2.622a10.087 10.087 0 00-3.114 5.47 7.589 7.589 0 00-3.973 2.266A7.586 7.586 0 000 17.532c0 4.196 3.414 7.61 7.61 7.61h.063a1.248 1.248 0 100-2.495h-.07a5.12 5.12 0 01-5.108-5.115c0-2.648 2.065-4.887 4.7-5.098.6-.048 1.08-.518 1.142-1.116a7.584 7.584 0 017.57-6.823c4.196 0 7.61 3.414 7.61 7.61v.374c0 1 .81 1.81 1.809 1.81a4.184 4.184 0 014.179 4.179 4.184 4.184 0 01-4.18 4.18l-.935-.001a1.247 1.247 0 100 2.495h.935A6.682 6.682 0 0032 18.468c0-3.45-2.63-6.297-5.992-6.64z" fill="currentColor"/>',
viewBox:"0 0 32 32"},emptyBox:{icon:'<path d="M20.943 15.97c-.797 0-1.547-.401-1.923-1.027l-3-4.78-3.047 4.78c-.375.67-1.125 1.072-1.922 1.072-.235 0-.422-.044-.61-.089L4.02 14.14v7.952c0 .67.469 1.25 1.125 1.385l10.126 2.457c.469.09.985.09 1.453 0l10.127-2.457c.703-.134 1.172-.715 1.172-1.385v-7.952l-6.423 1.787a3.25 3.25 0 01-.656.045zm9.985-5.003L28.49 6.366c-.14-.268-.422-.402-.75-.358L16.02 7.393l4.266 6.835a.846.846 0 00.891.313l9.282-2.546a.733.733 0 00.47-1.028zM3.503 6.366l-2.438 4.601c-.187.402.047.894.47 1.028l9.281 2.546a.801.801 0 00.891-.357l4.313-6.79L4.253 6.007c-.328-.044-.61.09-.75.358z" fill="currentColor"/>',
viewBox:"0 0 32 32"},star:{icon:'<path d="M14.294 1.101l-3.89 8.31-8.797 1.312c-1.556.25-2.154 2.249-1.017 3.436l6.283 6.435-1.496 9.059c-.24 1.624 1.437 2.874 2.813 2.124l7.84-4.31 7.78 4.31c1.376.75 3.052-.5 2.813-2.124l-1.497-9.06 6.284-6.434c1.137-1.187.539-3.187-1.017-3.436L21.655 9.41l-3.95-8.31a1.871 1.871 0 00-3.41 0z" fill="currentColor"/>',viewBox:"0 0 32 32"},pencil:{icon:'<path d="M18.157 5.834L.764 23.228.013 30.36a1.455 1.455 0 001.626 1.627l7.133-.75 17.394-17.394-8.009-8.009zm12.951-1.188L27.354.892c-1.126-1.19-3.065-1.19-4.254 0l-3.504 3.503 8.009 8.009L31.108 8.9c1.19-1.189 1.19-3.128 0-4.254z" fill="currentColor"/>',
viewBox:"0 0 32 32"},move:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.178 5.793l1.591-1.59v3.182a1.23 1.23 0 002.462 0V4.202l1.591 1.591a1.23 1.23 0 001.74-1.74L16.872.36a1.23 1.23 0 00-.188-.154c-.02-.013-.042-.024-.064-.035a1.171 1.171 0 01-.033-.017 1.24 1.24 0 00-.115-.06 1.227 1.227 0 00-.127-.04l-.036-.011a.571.571 0 00-.067-.02 1.209 1.209 0 00-.482 0c-.023.005-.045.012-.068.02l-.036.011c-.042.01-.085.024-.126.04a1.22 1.22 0 00-.115.06 1.053 1.053 0 01-.034.017c-.021.011-.043.022-.063.035-.067.045-.13.096-.187.154l-3.692 3.692a1.23 1.23 0 001.74 1.74zM16 20.307a4.308 4.308 0 100-8.615 4.308 4.308 0 000 8.615zm-.87 3.438a1.23 1.23 0 012.1.87v3.183l1.592-1.591a1.23 1.23 0 011.74 1.74l-3.69 3.692h-.002c-.057.058-.12.109-.187.154a.576.576 0 01-.062.034l-.016.008a.714.714 0 01-.26.11.929.929 0 00-.035.01.563.563 0 01-.069.02c-.159.033-.323.033-.482 0a.563.563 0 01-.069-.02l-.036-.01a.714.714 0 01-.241-.1 1.055 1.055 0 00-.034-.018c-.02-.01-.042-.021-.061-.034a1.232 1.232 0 01-.188-.154l-3.692-3.692a1.23 1.23 0 011.74-1.74l1.591 1.59v-3.182c0-.326.13-.64.36-.87zm16.814-8.092a1.248 1.248 0 00-.039-.124c-.018-.04-.039-.08-.062-.118a1.204 1.204 0 01-.017-.034c-.01-.02-.021-.04-.034-.06a1.233 1.233 0 00-.153-.188h-.001l-3.692-3.692a1.23 1.23 0 00-1.74 1.74l1.591 1.592h-3.182a1.23 1.23 0 000 2.461h3.182l-1.59 1.592a1.232 1.232 0 00.87 2.1 1.23 1.23 0 00.87-.36l3.691-3.691v-.001c.058-.058.11-.12.154-.188.013-.019.023-.04.034-.06a1.18 1.18 0 01.017-.034 1.25 1.25 0 00.062-.118 1.25 1.25 0 00.039-.124l.011-.036a.587.587 0 00.02-.07 1.207 1.207 0 000-.481.587.587 0 00-.02-.07l-.011-.036zm-31.85.818a1.224 1.224 0 01-.038-.125 1.062 1.062 0 00-.012-.036c-.007-.023-.015-.045-.02-.069a1.207 1.207 0 010-.482.593.593 0 01.02-.07l.012-.035c.01-.043.023-.084.038-.125.019-.04.04-.08.062-.117a1.08 1.08 0 00.018-.034c.01-.02.02-.041.033-.06.045-.068.096-.13.154-.188v-.001l3.692-3.691a1.231 1.231 0 011.74 1.74l-1.59 1.591h3.182a1.23 1.23 0 110 2.462H4.202l1.591 1.591a1.23 1.23 0 01-1.74 1.74L.36 16.872a1.232 1.232 0 01-.154-.188.553.553 0 01-.033-.06.963.963 0 00-.018-.034 1.246 1.246 0 01-.062-.118z" fill="currentColor"/>',
viewBox:"0 0 32 32"},save:{icon:'<path d="M29.121 8.121L23.88 2.88A3 3 0 0021.757 2H5a3 3 0 00-3 3v22a3 3 0 003 3h22a3 3 0 003-3V10.243a3 3 0 00-.879-2.122zM16 26a4 4 0 110-8 4 4 0 010 8zm6-19.032v6.282a.75.75 0 01-.75.75H6.75a.75.75 0 01-.75-.75v-6.5A.75.75 0 016.75 6h14.282a.75.75 0 01.53.22l.218.217a.749.749 0 01.22.53z" fill="currentColor"/>',viewBox:"0 0 32 32"},saveLine:{icon:'<path d="M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm0 96c0-17.7 14.3-32 32-32l192 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32L96 224c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z" fill="currentColor"/>',
viewBox:"0 0 448 512"},social:{icon:'<path d="M11.938 1.875H2.312A1.313 1.313 0 001 3.188v9.624a1.313 1.313 0 001.313 1.313h3.752V9.96H4.343V8h1.722V6.506c0-1.7 1.012-2.638 2.562-2.638.742 0 1.518.132 1.518.132v1.668H9.29c-.843 0-1.105.523-1.105 1.06V8h1.88l-.3 1.96h-1.58v4.165h3.752a1.313 1.313 0 001.313-1.313V3.188a1.313 1.313 0 00-1.313-1.313zM29.56 5.148c.01.125.01.25.01.374 0 3.793-2.887 8.163-8.164 8.163A8.108 8.108 0 0117 12.397c.231.027.453.036.693.036a5.747 5.747 0 003.562-1.226 2.874 2.874 0 01-2.683-1.99c.178.027.356.044.542.044.258 0 .515-.035.755-.097a2.87 2.87 0 01-2.3-2.816v-.036a2.89 2.89 0 001.296.364 2.867 2.867 0 01-1.279-2.39c0-.532.142-1.02.391-1.447a8.156 8.156 0 005.916 3.002 3.24 3.24 0 01-.07-.657c0-1.581 1.279-2.87 2.869-2.87.826 0 1.572.347 2.096.907a5.65 5.65 0 001.821-.693 2.862 2.862 0 01-1.261 1.581A5.752 5.752 0 0031 3.665a6.168 6.168 0 01-1.44 1.483zM3.742 29.25h-2.54v-8.178h2.54v8.178zm-1.271-9.294a1.483 1.483 0 01-1.04-2.525 1.47 1.47 0 012.51 1.04c0 .812-.658 1.485-1.47 1.485zm8.242 9.294v-3.981c0-.95-.02-2.166-1.32-2.166-1.32 0-1.523 1.031-1.523 2.097v4.05H5.333v-8.178h2.436v1.115h.035c.34-.643 1.168-1.32 2.403-1.32 2.57 0 3.043 1.692 3.043 3.89v4.493h-2.537zM30.956 21.15c-.16-.6-.63-1.073-1.226-1.233-1.081-.292-5.418-.292-5.418-.292s-4.336 0-5.417.292a1.743 1.743 0 00-1.226 1.233c-.29 1.089-.29 3.36-.29 3.36s0 2.27.29 3.36c.16.6.63 1.053 1.226 1.213 1.081.292 5.418.292 5.418.292s4.336 0 5.417-.292a1.717 1.717 0 001.226-1.214c.29-1.088.29-3.36.29-3.36s0-2.27-.29-3.358zm-8.062 5.422v-4.124l3.625 2.062-3.625 2.062z" fill="currentColor"/>',
viewBox:"0 0 32 32"},share:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M22.571 1.151a6.167 6.167 0 11-1.92 9.533l-7.965 3.982a6.185 6.185 0 010 2.667l7.964 3.982A6.167 6.167 0 1119.31 24l-7.964-3.982a6.166 6.166 0 110-8.034L19.309 8a6.166 6.166 0 013.262-6.85zm3.76 2.511a3.167 3.167 0 10-2.003 6.01 3.167 3.167 0 002.003-6.01zm-18.323 9.47a3.167 3.167 0 101.49 1.451m-1.49-1.451a3.166 3.166 0 011.49 1.451zm17.547 9.04a3.17 3.17 0 00-3.058 1.744 3.167 3.167 0 103.058-1.743z" fill="currentColor"/>',
viewBox:"0 0 32 32"},canvas:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M0 5.1h2.9V2.9h2.2V0H0v5.1z" fill="currentColor"/><path d="M19.7 0h-7.3v2.9h7.3V0z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M26.9 0v2.9h2.2v2.2H32V0h-5.1z" fill="currentColor"/><path d="M2.9 12.4H0v7.3h2.9v-7.3zM32 12.4h-2.9v7.3H32v-7.3z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2.9 26.9H0V32h5.1v-2.9H2.9v-2.2zM29.1 29.1h-2.2V32H32v-5.1h-2.9v2.2z" fill="currentColor"/><path d="M19.7 29.1h-7.3V32h7.3v-2.9z" fill="currentColor"/>',
viewBox:"0 0 32 32"},rowsAlt:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M3 28.857h26v-8.571H3v8.571zM1 29.93C1 30.52 1.448 31 2 31h28c.552 0 1-.48 1-1.071V19.214c0-.591-.448-1.071-1-1.071H2c-.552 0-1 .48-1 1.071V29.93zM3 11.714h26V3.143H3v8.571zm-2 1.072c0 .591.448 1.071 1 1.071h28c.552 0 1-.48 1-1.071V2.07C31 1.48 30.552 1 30 1H2c-.552 0-1 .48-1 1.071v10.715z" fill="currentColor"/>',viewBox:"0 0 32 32"},columns:{icon:'<path d="M29 2H3a3 3 0 00-3 3v22c0 1.688 1.313 3 3 3h26a3 3 0 003-3V5c0-1.625-1.375-3-3-3zM14 26H4V10h10v16zm14 0H18V10h10v16z" fill="currentColor"/>',
viewBox:"0 0 32 32"},columnsAlt:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M3.143 3v26h8.571V3H3.143zM2.07 1C1.48 1 1 1.448 1 2v28c0 .552.48 1 1.071 1h10.715c.591 0 1.071-.448 1.071-1V2c0-.552-.48-1-1.071-1H2.07zM20.286 3v26h8.571V3h-8.571zm-1.072-2c-.591 0-1.071.448-1.071 1v28c0 .552.48 1 1.071 1H29.93C30.52 31 31 30.552 31 30V2c0-.552-.48-1-1.072-1H19.215z" fill="currentColor"/>',viewBox:"0 0 32 32"},trash:{icon:'<path d="M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z" fill="currentColor"/>',
viewBox:"0 0 448 512"},ban:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M29 16.5C29 23.404 23.404 29 16.5 29c-2.88 0-5.533-.974-7.647-2.61L26.39 8.852A12.446 12.446 0 0 1 29 16.5ZM6.718 24.282 24.282 6.718A12.447 12.447 0 0 0 16.5 4C9.596 4 4 9.596 4 16.5c0 2.942 1.017 5.647 2.718 7.782ZM32 16.5C32 25.06 25.06 32 16.5 32 7.94 32 1 25.06 1 16.5 1 7.94 7.94 1 16.5 1 25.06 1 32 7.94 32 16.5Z" fill="currentColor"/>',viewBox:"0 0 32 32"},bold:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M7 17.999V4h9a7 7 0 015.704 11.058A7 7 0 0118 27.998h-7V28H7V17.999zm4 6V18h5l.125-.001H18a3 3 0 010 6h-7zm0-10V8h5a3 3 0 01.082 5.999H11z" fill="currentColor"/>',
viewBox:"0 0 32 32"},italic:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M23.975 7.975V4h-12v3.975h3.6l-3.225 16.05H8V28h12v-3.975h-3.525l3.15-16.05h4.35z" fill="currentColor"/>',viewBox:"0 0 32 32"},underline:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4 24.55h24V28H4v-3.45zM10.975 12.55c0 2.85 2.175 5.175 5.025 5.175a5.185 5.185 0 005.175-5.175V4h3.45v8.55a8.546 8.546 0 01-8.55 8.55 8.546 8.546 0 01-8.55-8.55V4h3.45v8.55z" fill="currentColor"/>',viewBox:"0 0 32 32"},strikethrough:{icon:'<path d="M24.865 18.224c.273.653.412 1.403.412 2.256 0 2.231-.805 4.043-2.414 5.434C21.255 27.304 19.104 28 16.416 28c-3.136 0-5.507-.66-7.117-1.98-1.61-1.32-2.428-3.308-2.455-5.963h3.636c.056 1.567.567 2.732 1.536 3.495.968.762 2.421 1.144 4.357 1.144 1.575 0 2.825-.318 3.752-.953.927-.636 1.39-1.518 1.39-2.648 0-.805-.3-1.448-.898-1.928-.414-.33-1.113-.645-2.083-.942h6.331zm-8.73-4.448l-.868-.223c-1.714-.437-2.83-.85-3.344-1.239-.516-.388-.774-.992-.774-1.811 0-1.03.436-1.822 1.307-2.373.87-.55 1.919-.825 3.145-.825 1.686 0 2.978.296 3.877.89.898.592 1.376 1.567 1.432 2.922h3.636c-.083-2.075-.846-3.78-2.289-5.115C20.815 4.667 18.743 4 16.04 4c-2.535 0-4.59.65-6.165 1.949-1.574 1.3-2.361 3.065-2.361 5.296 0 .966.198 1.808.585 2.532l8.037-.001zm10.779 1.1H5.086c-.6 0-1.086.494-1.086 1.102 0 .608.486 1.101 1.086 1.101h21.828c.6 0 1.086-.493 1.086-1.101s-.486-1.101-1.086-1.101z" fill="currentColor"/>',
viewBox:"0 0 32 32"},ul:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M7.778 4a1 1 0 011-1h22a1 1 0 011 1v2a1 1 0 01-1 1h-22a1 1 0 01-1-1V4zM7.778 15a1 1 0 011-1h22a1 1 0 011 1v2a1 1 0 01-1 1h-22a1 1 0 01-1-1v-2zM7.778 26a1 1 0 011-1h22a1 1 0 011 1v2a1 1 0 01-1 1h-22a1 1 0 01-1-1v-2zM0 5c0-1.105.893-2 1.995-2h.01C3.107 3 4 3.895 4 5s-.893 2-1.995 2h-.01A1.998 1.998 0 010 5zM0 16c0-1.105.893-2 1.995-2h.01C3.107 14 4 14.895 4 16s-.893 2-1.995 2h-.01A1.998 1.998 0 010 16zM0 27c0-1.105.893-2 1.995-2h.01C3.107 25 4 25.895 4 27s-.893 2-1.995 2h-.01A1.998 1.998 0 010 27z" fill="currentColor"/>',
viewBox:"0 0 32 32"},ol:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M7.778 4a1 1 0 011-1h22a1 1 0 011 1v2a1 1 0 01-1 1h-22a1 1 0 01-1-1V4zM7.778 15a1 1 0 011-1h22a1 1 0 011 1v2a1 1 0 01-1 1h-22a1 1 0 01-1-1v-2zM7.778 26a1 1 0 011-1h22a1 1 0 011 1v2a1 1 0 01-1 1h-22a1 1 0 01-1-1v-2z" fill="currentColor"/><path d="M3.129 8H2V3.648l-1.348.418v-.918l2.356-.843h.12V8zM4.285 19H.387v-.773l1.84-1.961c.252-.276.438-.517.558-.723.123-.206.184-.401.184-.586 0-.253-.064-.45-.192-.594-.127-.146-.31-.218-.547-.218a.748.748 0 00-.605.265c-.146.175-.219.405-.219.692H.273c0-.347.082-.663.247-.95.166-.286.4-.51.703-.671a2.117 2.117 0 011.027-.247c.586 0 1.04.141 1.363.422.326.281.489.679.489 1.192 0 .28-.073.567-.22.859-.145.292-.395.631-.75 1.02L1.84 18.09h2.445V19zM1.535 26.656h.602c.286 0 .498-.071.636-.215.138-.143.207-.333.207-.57 0-.23-.069-.407-.207-.535-.135-.128-.322-.191-.562-.191a.827.827 0 00-.543.18.563.563 0 00-.219.46H.32c0-.297.08-.562.239-.797.161-.237.385-.422.671-.554.29-.133.607-.2.954-.2.601 0 1.073.145 1.414.434.34.286.511.682.511 1.188 0 .26-.079.5-.238.718a1.548 1.548 0 01-.625.504c.32.115.559.287.715.516.159.229.238.5.238.812 0 .506-.185.91-.554 1.215-.368.305-.855.457-1.461.457-.568 0-1.033-.15-1.395-.45-.36-.299-.539-.694-.539-1.187h1.129c0 .214.08.388.238.524.162.135.36.203.594.203.268 0 .478-.07.629-.211a.738.738 0 00.23-.566c0-.568-.312-.852-.937-.852h-.598v-.883z" fill="currentColor"/>',
viewBox:"0 0 32 32"},quote:{icon:'<path d="M2.592 26.063c-.792.332-.773 1.196-.415 1.965.357.768.632 1.234.632 1.234.652.711 1.227.915 1.994.582 2.147-.922 3.987-2.126 5.495-3.56 1.815-1.742 3.067-3.715 3.732-5.892.665-2.151.997-5.149.997-8.991V3.537A1.54 1.54 0 0013.493 2H5.409a1.54 1.54 0 00-1.534 1.537v10.067c0 .846.69 1.537 1.534 1.537h5.23c-.05 2.587-.225 4.928-2.186 6.893-.92 1.255-3.995 3.234-5.86 4.029zM17.506 26.063c-.793.332-.773 1.196-.416 1.965.358.768.633 1.234.633 1.234.652.711 1.227.915 1.993.582 2.147-.922 3.988-2.126 5.496-3.56 1.815-1.742 3.067-3.715 3.732-5.892.664-2.151.996-5.149.996-8.991V3.537A1.54 1.54 0 0028.407 2h-8.084a1.54 1.54 0 00-1.534 1.537v10.067c0 .846.69 1.537 1.534 1.537h5.23c-.05 2.587-.226 4.928-2.187 6.893-.92 1.255-3.994 3.234-5.86 4.029z" fill="currentColor"/>',
viewBox:"0 0 32 32"},code:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M31.204 14.378l-2.982-3.148V5.667c0-3.043-2.385-5.562-5.266-5.562H20.57c-1.094 0-1.889.945-1.889 2.099 0 1.154.895 2.099 1.889 2.099h2.385c.795 0 1.39.63 1.39 1.47v6.401c0 .525.2 1.05.597 1.47l2.186 2.309-2.186 2.308a2.13 2.13 0 00-.596 1.47v6.402c0 .84-.596 1.469-1.391 1.469H20.57c-1.094 0-1.889.945-1.889 2.099 0 1.154.895 2.099 1.889 2.099h2.385c2.881 0 5.267-2.519 5.267-5.562v-5.563l2.98-3.148c.796-1.05.796-2.31 0-3.149zM7.354 12.07V5.666c0-.84.596-1.469 1.391-1.469h2.385c1.093 0 1.888-.945 1.888-2.099C13.018.945 12.124 0 11.13 0H8.745C5.863.105 3.578 2.624 3.578 5.667v5.563L.596 14.378a2.108 2.108 0 000 2.939l2.982 3.148v5.563c0 3.043 2.385 5.562 5.266 5.562h2.385c1.094 0 1.889-.945 1.889-2.099 0-1.154-.895-2.099-1.889-2.099H8.745c-.795 0-1.391-.63-1.391-1.47v-6.401a2.13 2.13 0 00-.596-1.47L4.57 15.849l2.187-2.31a2.13 2.13 0 00.596-1.469z" fill="currentColor"/>',
viewBox:"0 0 32 32"},copy:{icon:'<path d="M29.063 4.125L25.875.937C25.375.438 24.437 0 23.75 0H13a3 3 0 00-3 3v3H5a3 3 0 00-3 3v20c0 1.688 1.313 3 3 3h14a3 3 0 003-3v-3h5a3 3 0 003-3V6.25c0-.688-.438-1.625-.938-2.125zM18.624 29H5.375c-.25 0-.375-.125-.375-.375V9.375C5 9.187 5.125 9 5.375 9H10v14c0 1.688 1.313 3 3 3h6v2.625c0 .25-.188.375-.375.375zm8-6h-13.25c-.25 0-.375-.125-.375-.375V3.375c0-.188.125-.375.375-.375H20v5.5c0 .875.625 1.5 1.5 1.5H27v12.625c0 .25-.188.375-.375.375zM27 7h-4V3h.563c.125 0 .187.063.25.125l3.062 3.063c.063.062.125.125.125.25V7z" fill="currentColor"/>',
viewBox:"0 0 32 32"},textAlignLeft:{icon:'<path d="M29 14H3a1 1 0 01-1-1v-2a1 1 0 011-1h26a1 1 0 011 1v2a1 1 0 01-1 1zM3 26h26a1 1 0 011 1v2a1 1 0 01-1 1H3a1 1 0 01-1-1v-2a1 1 0 011-1zM2.802 2h16.396a.801.801 0 01.802.802v2.396a.8.8 0 01-.802.802H2.802A.801.801 0 012 5.198V2.802A.801.801 0 012.802 2zm0 16h16.396a.8.8 0 01.802.802v2.396a.8.8 0 01-.802.802H2.802A.8.8 0 012 21.198v-2.396A.801.801 0 012.802 18z" fill="currentColor"/>',viewBox:"0 0 32 32"},textAlignCenter:{icon:'<path d="M29 10H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1v-2a1 1 0 00-1-1zm0 16H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1v-2a1 1 0 00-1-1zM8.756 6h14.488A.756.756 0 0024 5.244V2.756A.755.755 0 0023.244 2H8.756A.756.756 0 008 2.756v2.488A.756.756 0 008.756 6zm14.488 16a.756.756 0 00.756-.756v-2.488a.756.756 0 00-.756-.756H8.756a.756.756 0 00-.756.756v2.488a.756.756 0 00.756.756h14.488z" fill="currentColor"/>',
viewBox:"0 0 32 32"},textAlignRight:{icon:'<path d="M3 14h26a1 1 0 001-1v-2a1 1 0 00-1-1H3a1 1 0 00-1 1v2a1 1 0 001 1zm26 12H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1v-2a1 1 0 00-1-1zm.198-24H12.802a.801.801 0 00-.802.802v2.396a.8.8 0 00.802.802h16.396A.801.801 0 0030 5.198V2.802A.8.8 0 0029.198 2zm0 16H12.802a.8.8 0 00-.802.802v2.396a.8.8 0 00.802.802h16.396a.8.8 0 00.802-.802v-2.396a.8.8 0 00-.802-.802z" fill="currentColor"/>',viewBox:"0 0 32 32"},textAlignJustify:{icon:'<path d="M29 26H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1v-2a1 1 0 00-1-1zm0-8H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1v-2a1 1 0 00-1-1zm0-8H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1v-2a1 1 0 00-1-1zm0-8H3a1 1 0 00-1 1v2a1 1 0 001 1h26a1 1 0 001-1V3a1 1 0 00-1-1z" fill="currentColor"/>',
viewBox:"0 0 32 32"},verticalAlignStart:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M.625 2c0 .76.616 1.375 1.375 1.375h28a1.375 1.375 0 100-2.75H2C1.24.625.625 1.241.625 2z" fill="currentColor"/><rect width="24" height="6" rx="1" transform="matrix(0 1 1 0 7 8)" fill="currentColor"/><rect width="16" height="6" rx="1" transform="matrix(0 1 1 0 19 8)" fill="currentColor"/>',viewBox:"0 0 32 32"},verticalAlignCenter:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M.625 16c0-.76.616-1.375 1.375-1.375h28a1.375 1.375 0 110 2.75H2c-.76 0-1.375-.616-1.375-1.375z" fill="currentColor"/><rect x="7" y="28" width="24" height="6" rx="1" transform="rotate(-90 7 28)" fill="currentColor"/><rect x="19" y="24" width="16" height="6" rx="1" transform="rotate(-90 19 24)" fill="currentColor"/>',
viewBox:"0 0 32 32"},verticalAlignEnd:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M31.375 30c0-.76-.616-1.375-1.375-1.375H2a1.375 1.375 0 100 2.75h28c.76 0 1.375-.616 1.375-1.375z" fill="currentColor"/><path d="M24 24a1 1 0 001-1V1a1 1 0 00-1-1h-4a1 1 0 00-1 1v22a1 1 0 001 1h4z" fill="currentColor"/><rect width="16" height="6" rx="1" transform="matrix(0 -1 -1 0 13 24)" fill="currentColor"/>',viewBox:"0 0 32 32"},cog:{icon:'<path d="M30.462 19.731L27.8 18.194c.269-1.45.269-2.938 0-4.388l2.662-1.537a.755.755 0 00.344-.875 15.566 15.566 0 00-3.419-5.913.752.752 0 00-.925-.143L23.8 6.875A11.794 11.794 0 0020 4.681V1.612a.749.749 0 00-.587-.73 15.712 15.712 0 00-6.825 0 .749.749 0 00-.588.73v3.075a12.167 12.167 0 00-3.8 2.194L5.544 5.344a.743.743 0 00-.925.143A15.472 15.472 0 001.2 11.4c-.106.338.038.7.344.875l2.662 1.537a12.039 12.039 0 000 4.388l-2.662 1.538a.755.755 0 00-.344.875 15.566 15.566 0 003.419 5.912.752.752 0 00.925.144l2.662-1.538a11.795 11.795 0 003.8 2.194V30.4c0 .35.244.656.588.731 2.293.513 4.644.488 6.825 0a.749.749 0 00.587-.731v-3.075a12.167 12.167 0 003.8-2.194l2.663 1.538a.743.743 0 00.925-.144 15.472 15.472 0 003.419-5.912.772.772 0 00-.35-.882zM16 21c-2.756 0-5-2.244-5-5s2.244-5 5-5 5 2.244 5 5-2.244 5-5 5z" fill="currentColor"/>',
viewBox:"0 0 32 32"},thunderBolt:{icon:'<path d="M24.515 10h-7.25l2.687-8.063c.25-1-.5-1.937-1.437-1.937h-9c-.75 0-1.438.563-1.5 1.313l-2 15C5.89 17.25 6.577 18 7.515 18h7.375l-2.875 12.188c-.188.937.5 1.812 1.437 1.812.563 0 1.063-.25 1.313-.75l11-19c.625-.938-.125-2.25-1.25-2.25z" fill="currentColor"/>',viewBox:"0 0 32 32"},link:{icon:'<path d="M20.41 11.59c-.375-.376-.813-.751-1.25-1.064-.439-.313-.94-.25-1.314.063l-1.314 1.313c-.5.563-.751 1.252-.751 1.877 0 .375.188.626.438.813.188.125.438.313.688.5 1.752 1.815 1.752 4.63 0 6.382l-4.254 4.192a4.421 4.421 0 01-6.381 0c-1.752-1.752-1.69-4.63.062-6.381l.814-.814c.312-.25.375-.688.25-1.063-.376-1.064-.563-2.19-.626-3.254 0-.875-1.063-1.313-1.689-.688l-2.315 2.315c-3.69 3.691-3.69 9.76 0 13.45 3.691 3.692 9.76 3.692 13.451 0l4.192-4.19v-.064c3.69-3.628 3.753-9.634 0-13.388zm8.822-8.822c-3.691-3.69-9.76-3.69-13.451 0L11.589 6.96v.062c-3.69 3.629-3.753 9.635 0 13.389.376.375.814.75 1.252 1.063.438.313.938.25 1.313-.063l1.314-1.313c.5-.563.751-1.252.751-1.877 0-.375-.188-.626-.438-.813a17.384 17.384 0 01-.688-.5c-1.752-1.815-1.752-4.63 0-6.382l4.254-4.192a4.421 4.421 0 016.381 0c1.752 1.752 1.69 4.63-.062 6.382l-.814.813c-.312.25-.375.688-.25 1.063.375 1.064.563 2.19.626 3.254 0 .875 1.063 1.313 1.689.688l2.315-2.315c3.69-3.691 3.69-9.76 0-13.45z" fill="currentColor"/>',
viewBox:"0 0 32 32"},image:{icon:'<path d="M30.32,7.163H1.811C0.812,7.163,0,7.974,0,8.975V31.15c0,0.998,0.812,1.811,1.811,1.811H30.32c1,0,1.812-0.812,1.812-1.811 V8.974C32.129,7.972,31.32,7.163,30.32,7.163z M28.51,10.784v16.323l-4.141-5.026c-0.152-0.185-0.422-0.218-0.615-0.076 l-4.816,3.517l-8.27-8.045c-0.096-0.094-0.229-0.135-0.358-0.127c-0.134,0.012-0.253,0.083-0.329,0.191l-6.359,9.099V10.784H28.51 L28.51,10.784z M17.65,17.573c0-1.623,1.319-2.943,2.94-2.943c1.623,0,2.941,1.32,2.941,2.943c0,1.619-1.318,2.941-2.941,2.941 C18.969,20.514,17.65,19.191,17.65,17.573z M34.771,26.396c-0.75,0-1.356-0.608-1.356-1.356V5.88H5.206 c-0.75,0-1.357-0.606-1.357-1.356c0-0.749,0.607-1.356,1.357-1.356h29.565c0.75,0,1.357,0.607,1.357,1.356v20.517 C36.129,25.788,35.521,26.396,34.771,26.396z" fill="currentColor"/>',
viewBox:"0 0 36.129 36.129"},picture:{icon:'<path d="M25.884 2H5.046C3.366 2 2 3.406 2 5.139v19.726C2 26.595 3.366 28 5.046 28h20.838c1.68 0 3.045-1.405 3.045-3.135V5.139C28.929 3.406 27.564 2 25.884 2zm-6.47 4.668c1.624 0 2.941 1.357 2.941 3.03 0 1.673-1.317 3.03-2.942 3.03-1.624 0-2.941-1.357-2.941-3.03 0-1.673 1.317-3.03 2.941-3.03zM24.928 25.1H6.421c-.813 0-1.175-.605-.808-1.352l5.048-10.3c.366-.747 1.063-.813 1.557-.149l5.076 6.833c.494.665 1.357.722 1.928.126l1.242-1.295c.57-.596 1.412-.522 1.877.163l3.216 4.732c.465.686.185 1.242-.628 1.242z" fill="currentColor"/>',
viewBox:"0 0 32 32"},music:{icon:' <path d="m 7 1.007812 c -0.296875 -0.003906 -0.578125 0.125 -0.769531 0.351563 l -3.230469 3.640625 h -1 c -1.09375 0 -2 0.84375 -2 2 v 2 c 0 1.089844 0.910156 2 2 2 h 1 l 3.230469 3.640625 c 0.210937 0.253906 0.492187 0.363281 0.769531 0.359375 z m 7 -0.007812 c -0.550781 0 -1 0.449219 -1 1 v 12 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -12 c 0 -0.550781 -0.449219 -1 -1 -1 z m -4 2 c -0.550781 0 -1 0.449219 -1 1 v 8 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -8 c 0 -0.550781 -0.449219 -1 -1 -1 z m 0 0" fill="currentColor"/>',
viewBox:"0 0 16 16"},zip:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M8.193 1h12.05l7.583 7.557v19.25A3.197 3.197 0 0124.634 31H8.193A3.197 3.197 0 015 27.807V4.193A3.197 3.197 0 018.193 1zm0 28.044h16.44c.682 0 1.236-.555 1.236-1.237l-.046-18.475-4.098.011a2.215 2.215 0 01-2.214-2.215V2.946l-6.024.006V4.87h1.886a.5.5 0 01.499.5v1.092a.5.5 0 01-.5.5h-1.885v2.091h1.886a.5.5 0 01.499.5v1.093a.5.5 0 01-.5.5h-1.885v2.09h1.886a.5.5 0 01.499.5v1.093a.5.5 0 01-.5.5h-2.756a.5.5 0 01-.5-.5v-1.592h-1.885a.5.5 0 01-.5-.5v-1.092a.5.5 0 01.5-.5h1.886V9.053H10.23a.5.5 0 01-.5-.5V7.462a.5.5 0 01.5-.5h1.886v-2.09H10.23a.5.5 0 01-.5-.5V2.955l-1.538.001c-.682 0-1.237.554-1.237 1.236v23.614c0 .683.555 1.237 1.237 1.237zm5.8-11.823v2.556l.772 2.266a2.078 2.078 0 01-.277 1.877 2.08 2.08 0 01-1.687.867 2.08 2.08 0 01-1.687-.867 2.078 2.078 0 01-.277-1.877l.772-2.266V17.22a.5.5 0 01.499-.5h1.386a.5.5 0 01.5.5zm-2.062 6.114c.4.56 1.34.56 1.74 0 .201-.28.255-.642.144-.968l-.26-.76h-1.508l-.26.76c-.11.326-.057.688.144.968z" fill="currentColor"/>',
viewBox:"0 0 32 32"},paperclip:{icon:'<path d="M8,24c-1.8,0-3.5-0.7-4.9-2L3,21.9c-1.3-1.3-2-3-2-4.9c0-1.8,0.7-3.6,2-4.9L13.7,1.4C14.6,0.5,15.9,0,17.2,0c1.3,0,2.6,0.5,3.5,1.4c2,2,2,5.1,0.1,7.1L10.1,19.1c-1.2,1.2-3,1.2-4.2,0c-1.2-1.2-1.2-3.1,0-4.2l9.4-9.4l1.4,1.4l-9.4,9.4c-0.4,0.4-0.4,1,0,1.4c0.4,0.4,1,0.4,1.4,0L19.3,7.1c1.1-1.1,1.1-3,0-4.2c-1.2-1.2-3.1-1.2-4.2-0.1L4.4,13.5C3.5,14.4,3,15.7,3,17c0,1.3,0.5,2.6,1.4,3.5l0.1,0.1c1.9,1.9,5,1.9,7,0l9.5-9.5l1.4,1.4L12.9,22C11.6,23.3,9.8,24,8,24z" fill="currentColor"/>',
viewBox:"0 0 24 24"},frame:{icon:'<path d="M0 10.571c0 .5.357.858.857.858h2.857a.869.869 0 00.857-.858v-6h6a.869.869 0 00.858-.857V.857C11.429.43 11 0 10.57 0H1.714C.714 0 0 .786 0 1.714v8.857zM20.571.857v2.857c0 .5.358.857.858.857h6v6c0 .5.357.858.857.858h2.857A.869.869 0 0032 10.57V1.714C32 .786 31.214 0 30.286 0h-8.857c-.5 0-.858.429-.858.857zm10.572 19.714h-2.857c-.5 0-.857.429-.857.858v6h-6c-.5 0-.858.428-.858.857v2.857c0 .5.358.857.858.857h8.857c.928 0 1.714-.714 1.714-1.714v-8.857c0-.429-.429-.858-.857-.858zM11.429 31.143v-2.857c0-.429-.429-.857-.858-.857h-6v-6c0-.429-.428-.858-.857-.858H.857c-.5 0-.857.429-.857.858v8.857C0 31.286.714 32 1.714 32h8.857a.869.869 0 00.858-.857z" fill="currentColor"/>',
viewBox:"0 0 32 32"},crop:{icon:'<path d="M30.5 22H28V6c0-1.063-.938-2-2-2H12v6h10v20.5c0 .875.625 1.5 1.5 1.5h3c.813 0 1.5-.625 1.5-1.5V28h2.5c.813 0 1.5-.625 1.5-1.5v-3c0-.813-.688-1.5-1.5-1.5zM10 1.5C10 .687 9.312 0 8.5 0h-3C4.625 0 4 .688 4 1.5V4H1.5C.625 4 0 4.688 0 5.5v3C0 9.375.625 10 1.5 10H4v16c0 1.125.875 2 2 2h14v-6H10V1.5z" fill="currentColor"/>',viewBox:"0 0 32 32"},eye:{icon:'<path d="M31.807 14.856C28.794 8.977 22.83 5 16 5S3.204 8.98.193 14.856a1.797 1.797 0 000 1.622C3.206 22.356 9.171 26.333 16 26.333c6.83 0 12.796-3.98 15.807-9.856a1.797 1.797 0 000-1.621zM16 23.666a8 8 0 110-16 8 8 0 010 16zm0-13.333a5.296 5.296 0 00-1.406.21 2.658 2.658 0 01-3.717 3.718A5.321 5.321 0 1016 10.333z" fill="currentColor"/>',
viewBox:"0 0 32 32"},eyeSlash:{icon:'<path d="M17.299 22.869l2.595 2.005c-1.25.325-2.55.525-3.895.525-6.145 0-11.515-3.58-14.225-8.87-.23-.46-.23-1 0-1.46.51-1 1.145-1.915 1.835-2.78l5.245 4.055c.28 3.72 3.35 6.655 7.145 6.655.435-.005.87-.05 1.3-.13zm14.53 4.16l-.98 1.26a.803.803 0 01-1.125.14L.31 5.694a.803.803 0 01-.14-1.125l.98-1.26a.803.803 0 011.125-.14l6.36 4.915a15.412 15.412 0 017.365-1.885c6.145 0 11.515 3.58 14.225 8.87.23.46.23 1 0 1.46-1 1.955-2.385 3.69-4.06 5.105l5.525 4.27c.35.27.415.775.14 1.125zM23.2 15.79a7.19 7.19 0 00-7.2-7.19c-1.665 0-3.28.585-4.56 1.655l3.68 2.845c.045-.165.07-.33.075-.5 0-.51-.165-1-.465-1.41a4.74 4.74 0 015.805 6.095l1.965 1.52c.43-.915.695-1.925.695-3.005.005-.005.005-.005.005-.01z" fill="currentColor"/>',
viewBox:"0 0 32 32"},clipboard:{icon:'<path d="M25 4h-5c0-2.188-1.813-4-4-4-2.25 0-4 1.813-4 4H7a3 3 0 00-3 3v22c0 1.688 1.313 3 3 3h18a3 3 0 003-3V7c0-1.625-1.375-3-3-3zm-9-1.5c.813 0 1.5.688 1.5 1.5 0 .875-.688 1.5-1.5 1.5-.875 0-1.5-.625-1.5-1.5 0-.813.625-1.5 1.5-1.5zm9 26.125c0 .25-.188.375-.375.375H7.375c-.25 0-.375-.125-.375-.375V7.375C7 7.187 7.125 7 7.375 7H10v2.25c0 .438.313.75.75.75h10.5a.76.76 0 00.75-.75V7h2.625c.188 0 .375.188.375.375v21.25z" fill="currentColor"/>',viewBox:"0 0 32 32"},
clipboardBelow:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M14 4h4.375C19.797 4 21 5.203 21 6.625v19.25a2.626 2.626 0 0 1-2.625 2.625H2.625A2.591 2.591 0 0 1 0 25.875V6.625A2.626 2.626 0 0 1 2.625 4H7A3.49 3.49 0 0 1 10.5.5C12.414.5 14 2.086 14 4Zm-2.188 0A1.33 1.33 0 0 0 10.5 2.687c-.766 0-1.313.602-1.313 1.313 0 .766.547 1.313 1.313 1.313.71 0 1.313-.547 1.313-1.313ZM2.626 16.015V6.953c0-.164.11-.328.328-.328H5.25v1.969c0 .383.273.656.656.656h9.188a.665.665 0 0 0 .656-.656V6.625h2.297c.164 0 .328.164.328.328v9.062H2.625Zm8.293 8.592a.625.625 0 0 1-.837 0l-2.746-2.472a.625.625 0 1 1 .836-.929l1.704 1.533v-4.09a.625.625 0 1 1 1.25 0v4.09l1.703-1.533a.625.625 0 0 1 .836.93l-2.746 2.471Z" clip-rule="evenodd"/>',
viewBox:"0 0 21 29"},clipboardAbove:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M14 4h4.375C19.797 4 21 5.203 21 6.625v19.25a2.626 2.626 0 0 1-2.625 2.625H2.625A2.591 2.591 0 0 1 0 25.875V6.625A2.626 2.626 0 0 1 2.625 4H7A3.49 3.49 0 0 1 10.5.5C12.414.5 14 2.086 14 4Zm-2.188 0A1.33 1.33 0 0 0 10.5 2.687c-.766 0-1.313.602-1.313 1.313 0 .766.547 1.313 1.313 1.313.71 0 1.313-.547 1.313-1.313Zm6.235 21.875c.164 0 .328-.11.328-.328v-9.064H2.625v9.064c0 .219.11.328.328.328h15.094Zm-7.13-17.984a.625.625 0 0 0-.836 0l-2.746 2.472a.625.625 0 0 0 .836.93l1.704-1.534v4.09a.625.625 0 1 0 1.25 0V9.76l1.703 1.533a.625.625 0 1 0 .836-.929l-2.746-2.472Z" clip-rule="evenodd"/>',
viewBox:"0 0 21 29"},paste:{icon:'<path d="M10 11.5C10 9.625 11.563 8 13.5 8H22V3.5c0-.813-.688-1.5-1.5-1.5h-5.063c-.687-1.188-2-2-3.437-2-1.5 0-2.813.813-3.5 2h-5C2.625 2 2 2.688 2 3.5v21c0 .875.625 1.5 1.5 1.5H10V11.5zm2-9c.813 0 1.5.688 1.5 1.5 0 .875-.688 1.5-1.5 1.5-.875 0-1.5-.625-1.5-1.5 0-.813.625-1.5 1.5-1.5zM23.5 18c-.875 0-1.5-.625-1.5-1.5V10h-8.5c-.875 0-1.5.688-1.5 1.5v19c0 .875.625 1.5 1.5 1.5h15c.813 0 1.5-.625 1.5-1.5V18h-6.5zm6.5-2.375c0-.313-.25-.813-.5-1.063L25.437 10.5c-.25-.25-.75-.5-1.062-.5H24v6h6v-.375z" fill="currentColor"/>',
viewBox:"0 0 32 32"},clone:{icon:'<path d="M29 0H11a3 3 0 00-3 3v18c0 1.688 1.313 3 3 3h18a3 3 0 003-3V3c0-1.625-1.375-3-3-3zM11 26c-2.813 0-5-2.188-5-5V8H3a3 3 0 00-3 3v18c0 1.688 1.313 3 3 3h18a3 3 0 003-3v-3H11z" fill="currentColor"/>',viewBox:"0 0 32 32"},cloneLine:{icon:'<path d="M29 0H9a3 3 0 00-3 3v3H3a3 3 0 00-3 3v20c0 1.688 1.313 3 3 3h20a3 3 0 003-3v-3h3a3 3 0 003-3V3c0-1.625-1.375-3-3-3zm-6.375 29H3.375c-.25 0-.375-.125-.375-.375V9.375C3 9.187 3.125 9 3.375 9H6v14c0 1.688 1.313 3 3 3h14v2.625c0 .25-.188.375-.375.375zm6-6H9.375c-.25 0-.375-.125-.375-.375V3.375C9 3.187 9.125 3 9.375 3h19.25c.188 0 .375.188.375.375v19.25c0 .25-.188.375-.375.375z" fill="currentColor"/>',
viewBox:"0 0 32 32"},filter:{icon:'<path d="M29.56 0H2.44C1.153 0 .509 1.624 1.446 2.56L12.28 14.116v12.866c0 .5.175 1 .585 1.25l4.686 3.497c.937.687 2.226 0 2.226-1.25V14.116L30.555 2.561C31.492 1.624 30.848 0 29.56 0z" fill="currentColor"/>',viewBox:"0 0 32 32"},search:{icon:'<path d="M31.532 27.66l-6.244-6.243c-.312-.25-.687-.438-1.062-.438h-.999c1.686-2.185 2.748-4.932 2.748-7.992C25.975 5.87 20.105 0 12.987 0 5.807 0 0 5.87 0 12.987c0 7.18 5.807 12.988 12.987 12.988 2.997 0 5.745-1 7.993-2.748v1.062c0 .374.124.749.437 1.061l6.181 6.182c.624.624 1.561.624 2.123 0l1.748-1.749c.625-.562.625-1.498.063-2.123zm-18.545-6.68a7.968 7.968 0 01-7.992-7.993c0-4.37 3.56-7.992 7.992-7.992 4.371 0 7.993 3.622 7.993 7.992 0 4.434-3.622 7.993-7.993 7.993z" fill="currentColor"/>',
viewBox:"0 0 32 32"},caretDown:{icon:'<path d="M8.213 11h15.574c1.079 0 1.619 1.277.856 2.024l-7.787 7.629a1.228 1.228 0 01-1.712 0l-7.787-7.629C6.594 12.277 7.134 11 8.213 11z" fill="currentColor"/>',viewBox:"0 0 32 32"},caretUp:{icon:'<path d="M23.787 21H8.213c-1.079 0-1.619-1.277-.856-2.024l7.787-7.629a1.228 1.228 0 011.712 0l7.787 7.629c.763.747.223 2.024-.856 2.024z" fill="currentColor"/>',viewBox:"0 0 32 32"},caretRight:{icon:'<path d="M11 23.787V8.213c0-1.079 1.277-1.619 2.024-.856l7.629 7.787c.463.473.463 1.24 0 1.712l-7.629 7.787c-.747.763-2.024.223-2.024-.856z" fill="currentColor"/>',
viewBox:"0 0 32 32"},caretLeft:{icon:'<path d="M21 8.213v15.574c0 1.079-1.277 1.619-2.024.856l-7.629-7.787a1.228 1.228 0 010-1.712l7.629-7.787c.747-.763 2.024-.223 2.024.856z" fill="currentColor"/>',viewBox:"0 0 32 32"},typography:{icon:'<path d="M27.143 24.571h-1.447L18.732 4.59A.87.87 0 0017.93 4h-3.911a.87.87 0 00-.804.59L6.25 24.57H4.857c-.482 0-.857.429-.857.858v1.714c0 .482.375.857.857.857h7.286c.428 0 .857-.375.857-.857v-1.714c0-.429-.429-.858-.857-.858h-1.286l1.393-4.285h7.393l1.446 4.285h-1.232c-.482 0-.857.429-.857.858v1.714c0 .482.375.857.857.857h7.286c.428 0 .857-.375.857-.857v-1.714c0-.429-.429-.858-.857-.858zM13.32 16.696l2.25-6.642c.215-.858.375-1.554.429-1.875 0 .375.107 1.071.375 1.875l2.25 6.642h-5.304z" fill="currentColor"/>',
viewBox:"0 0 32 32"},typographyAlt:{icon:'<path d="M16.03 4h9.901c1.387 0 2.064.688 2.064 2.076 0 1.071.011 2.143 0 3.203-.011 1.117-.744 1.907-1.77 1.918-1.038.012-1.805-.79-1.827-1.94a16.555 16.555 0 010-1.297c.01-.305-.113-.373-.395-.373a496.45 496.45 0 01-5.797 0c-.327 0-.406.113-.406.418.012 5.324.012 10.649 0 15.973 0 .316.102.43.418.418.394-.012.79-.034 1.172.056.891.214 1.455.982 1.388 1.918-.068.868-.767 1.59-1.658 1.613-2.086.023-4.161.023-6.248 0-.902-.011-1.624-.767-1.68-1.658-.056-.903.541-1.704 1.444-1.861.35-.068.71-.08 1.06-.057.394.023.507-.113.507-.508-.022-1.951-.011-3.903-.011-5.854 0-3.306-.011-6.6.011-9.905 0-.451-.124-.564-.564-.564-1.86.023-3.71.023-5.57 0-.395 0-.53.09-.497.496.034.43.011.858 0 1.298 0 1.06-.79 1.85-1.793 1.839-.981-.012-1.76-.79-1.77-1.805a179.536 179.536 0 010-3.486c0-1.173.744-1.907 1.905-1.918H16.03z" fill="currentColor"/>',
viewBox:"0 0 32 32"},th:{icon:'<path d="M18.344 3c-.82 0-1.407.638-1.407 1.393v9.286c0 .812.586 1.392 1.407 1.392h11.25c.761 0 1.406-.58 1.406-1.392V4.393C31 3.638 30.355 3 29.594 3h-11.25zm-4.688 0H2.406C1.586 3 1 3.638 1 4.393v9.286c0 .812.586 1.392 1.406 1.392h11.25c.762 0 1.406-.58 1.406-1.392V4.393c0-.755-.644-1.393-1.406-1.393zM1 18.321v9.286C1 28.42 1.586 29 2.406 29h11.25c.762 0 1.406-.58 1.406-1.393v-9.286c0-.754-.644-1.392-1.406-1.392H2.406c-.82 0-1.406.638-1.406 1.392zM18.344 29h11.25c.761 0 1.406-.58 1.406-1.393v-9.286c0-.754-.645-1.392-1.406-1.392h-11.25c-.82 0-1.407.638-1.407 1.392v9.286c0 .813.586 1.393 1.407 1.393z" fill="currentColor"/>',
viewBox:"0 0 32 32"},plug:{icon:'<path d="M24 2c0-1.063-.938-2-2-2-1.125 0-2 .938-2 2v6h4V2zm3 8H5c-.563 0-1 .5-1 1v2c0 .563.438 1 1 1h1v2a9.998 9.998 0 008 9.813V32h4v-6.188c4.5-.937 7.938-4.937 8-9.812v-2h1c.5 0 1-.438 1-1v-2c0-.5-.5-1-1-1zM12 2c0-1.063-.938-2-2-2-1.125 0-2 .938-2 2v6h4V2z" fill="currentColor"/>',viewBox:"0 0 32 32"},sliders:{icon:'<path d="M27.25 4.502H15.145a8.655 8.655 0 010 7.5H27.25a3.707 3.707 0 002.654-1.096 3.754 3.754 0 00-2.654-6.404zM7.252 2A6.254 6.254 0 001 8.252c0 3.451 2.8 6.252 6.252 6.252 3.451 0 6.252-2.8 6.252-6.252 0-3.451-2.8-6.252-6.252-6.252zM4.75 19.502A3.753 3.753 0 001 23.252c0 1.008.387 1.951 1.096 2.654a3.731 3.731 0 002.654 1.096h12.105a8.654 8.654 0 010-7.5H4.75zM24.748 17a6.254 6.254 0 00-6.252 6.252c0 3.451 2.8 6.252 6.252 6.252 3.451 0 6.252-2.8 6.252-6.252C31 19.801 28.2 17 24.748 17z" fill="currentColor"/>',
viewBox:"0 0 32 32"},equalizer:{icon:'<path d="M5.333 2.667c.737 0 1.334.597 1.334 1.333v9.333a1.333 1.333 0 11-2.667 0V4c0-.736.597-1.333 1.333-1.333zM6.667 20h2.666a1.333 1.333 0 000-2.667h-8a1.333 1.333 0 000 2.667H4v8a1.333 1.333 0 102.667 0v-8zM17.333 16a1.333 1.333 0 10-2.666 0v12a1.333 1.333 0 102.666 0V16zM16 2.667c.736 0 1.333.597 1.333 1.333v5.333H20A1.333 1.333 0 0120 12h-8a1.333 1.333 0 010-2.667h2.667V4c0-.736.597-1.333 1.333-1.333zM30.667 20a1.333 1.333 0 010 2.667H28V28a1.333 1.333 0 01-2.667 0v-5.333h-2.666a1.333 1.333 0 010-2.667h8zM26.667 2.667C27.403 2.667 28 3.264 28 4v12a1.333 1.333 0 01-2.667 0V4c0-.736.597-1.333 1.334-1.333z" fill="currentColor"/>',
viewBox:"0 0 32 32"},click:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M16 31c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C7.716 1 1 7.716 1 16c0 8.284 6.716 15 15 15zm0 1c8.837 0 16-7.163 16-16S24.837 0 16 0 0 7.163 0 16s7.163 16 16 16z" fill="currentColor"/><path d="M21 16a5 5 0 11-10 0 5 5 0 0110 0z" fill="currentColor"/>',viewBox:"0 0 32 32"},hover:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M31.1 15.7c2.4 6.6-.2 11.7-5.9 13.8-4.8 1.7-9.1.4-12.7-4l-5.2-6.3c-1.2-1.4-1.1-2.9 0-3.9 1.1-.9 2.5-.8 3.6.4l2.3 2.5c.1.1.1.1.2.1s.1-.1.1-.2L9.9 8c-5 1.9-8.2 6.7-8.4 13 0 .5-.3.8-.7.8-.4 0-.8-.4-.8-.8C0 14.1 3.8 8.6 9.3 6.5L9 5.7C8.4 4 9.2 2.6 10.7 2c1.5-.5 3 .1 3.6 1.8l1.8 4.9c.3-.3.7-.5 1-.6 1.2-.4 2.3-.1 3 .9.4-.3.8-.5 1.2-.7 1.2-.4 2.2-.1 2.9.8 2.5-.9 4.7.4 5.9 3.7l1 2.9zM8.5 18.2l5.2 6.3c3.3 4 7 4.9 11 3.4 4.9-1.8 7-6 4.9-11.8l-.9-2.5c-.9-2.5-2.2-3.5-3.6-3l.6 1.7c.2.5-.1.9-.4 1-.4.1-.8 0-1-.5l-.7-2.1c-.3-.9-1-1.2-1.8-.9-.3.1-.6.3-.9.6l1 2.7c.2.5-.1.9-.4 1-.4.1-.8 0-1-.5l-1.1-3c-.3-.9-1-1.2-1.8-.9-.3.1-.6.3-.9.6l1.4 3.7c.2.4 0 .9-.4 1-.4.2-.9-.1-1-.5L12.8 4.3c-.3-.7-.9-1.1-1.6-.8-.7.2-1 .9-.7 1.6l5.2 14.3c.2.6 0 1.1-.6 1.3-.5.2-.9.1-1.4-.4l-3.5-3.7c-.5-.6-1.2-.7-1.7-.3-.6.5-.5 1.2 0 1.9z" fill="currentColor"/>',
viewBox:"0 0 32 32"},button:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M0 8a4 4 0 014-4h24a4 4 0 014 4v9a4 4 0 01-4 4h-.5a1 1 0 110-2h.5a2 2 0 002-2V8a2 2 0 00-2-2H4a2 2 0 00-2 2v9a2 2 0 002 2h9a1 1 0 110 2H4a4 4 0 01-4-4V8z" fill="currentColor"/><path opacity="0.5" fill-rule="evenodd" clip-rule="evenodd" d="M16.004 12.669l1.526 9.46c.05.408.508.611.864.408l2.645-1.882 3.612 5.137c.508.661 2.034-.407 1.577-1.068l-3.612-5.188 2.696-1.832c.305-.254.305-.762-.05-.966l-8.393-4.68a.604.604 0 00-.865.611z" fill="currentColor"/>',
viewBox:"0 0 32 32"},recycleAlt:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.333 4c.737 0 1.334.597 1.334 1.333v3.124A11.976 11.976 0 0116 4c6.12 0 11.169 4.58 11.907 10.502a1.333 1.333 0 01-2.646.33C24.687 10.229 20.76 6.667 16 6.667a9.323 9.323 0 00-7.66 4H12a1.333 1.333 0 110 2.666H5.333A1.333 1.333 0 014 12V5.333C4 4.597 4.597 4 5.333 4zm-.082 12.01a1.333 1.333 0 011.488 1.158 9.335 9.335 0 0016.922 4.165H20a1.333 1.333 0 110-2.666h6.667c.736 0 1.333.597 1.333 1.333v6.667a1.333 1.333 0 01-2.667 0v-3.124A11.976 11.976 0 0116 28C9.88 28 4.831 23.42 4.093 17.498A1.333 1.333 0 015.25 16.01z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tagH1:{icon:'<path d="M19.04 7v18h-3.408v-7.827H8.384V25H5V7h3.384v7.292h7.248V7h3.408zM20.861 10.365V7h6.096v18h-3.552V10.365h-2.544z" fill="currentColor"/>',viewBox:"0 0 32 32"},tagH2:{icon:'<path d="M16.04 7.374V25h-3.408v-7.664H5.384V25H2V7.374h3.384v7.14h7.248v-7.14h3.408zM18.461 22.229c5.424-3.911 8.136-7.157 8.136-9.737 0-.782-.184-1.398-.552-1.847-.352-.45-.912-.674-1.68-.674-1.584 0-2.424 1.123-2.52 3.37h-3.288c.096-2.08.704-3.653 1.824-4.718C21.501 7.54 22.917 7 24.63 7c1.744 0 3.08.474 4.008 1.423.944.932 1.416 2.18 1.416 3.745 0 1.231-.352 2.471-1.056 3.72a15.037 15.037 0 01-2.64 3.42 21.308 21.308 0 01-3.384 2.671h7.416v2.871H18.461V22.23z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tagH3:{icon:'<path d="M16.04 7.657V24.83h-3.408v-7.468H5.384v7.468H2V7.657h3.384v6.957h7.248V7.657h3.408zM24.797 7c1.152 0 2.136.203 2.952.608.832.406 1.456.965 1.872 1.678.432.714.648 1.509.648 2.384 0 1.103-.296 2.011-.888 2.725-.592.697-1.376 1.127-2.352 1.289v.121c2.368.714 3.552 2.125 3.552 4.233 0 1.476-.488 2.675-1.464 3.6-.976.908-2.352 1.362-4.128 1.362-1.888 0-3.392-.47-4.512-1.41-1.12-.958-1.744-2.393-1.872-4.306h3.312c.08.876.36 1.573.84 2.092.496.502 1.192.754 2.088.754.768 0 1.368-.211 1.8-.633.432-.438.648-1.005.648-1.702 0-.827-.312-1.46-.936-1.898-.624-.438-1.544-.656-2.76-.656h-.696v-2.798h.696c2.24.033 3.36-.754 3.36-2.36 0-.697-.2-1.24-.6-1.629-.4-.405-.944-.608-1.632-.608-.72 0-1.312.235-1.776.705-.464.454-.728 1.095-.792 1.922h-3.312c.096-1.751.656-3.097 1.68-4.038C21.55 7.478 22.973 7 24.797 7z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tagH4:{icon:'<path d="M15.04 7.202V25h-3.408v-7.74H4.384V25H1V7.202h3.384v7.21h7.248v-7.21h3.408zM17.51 21.42v-2.95L25.62 7h3.624v11.345h2.208v3.075h-2.208V25h-3.408v-3.58H17.51zM26.1 11.16l-5.136 7.184h5.136V11.16z" fill="currentColor"/>',viewBox:"0 0 32 32"},tagH5:{icon:'<path d="M15.04 7.349v17.576h-3.408v-7.643H4.384v7.643H1V7.35h3.384v7.12h7.248v-7.12h3.408zM29.821 10.087h-8.04v4.432c.368-.449.872-.805 1.512-1.07a5.41 5.41 0 012.16-.424c1.168 0 2.136.265 2.904.797a4.537 4.537 0 011.728 2.09c.384.864.576 1.827.576 2.889 0 1.875-.512 3.377-1.536 4.506C28.117 24.436 26.67 25 24.781 25c-1.232 0-2.304-.224-3.216-.672-.912-.465-1.624-1.104-2.136-1.917-.512-.83-.792-1.793-.84-2.888h3.288c.128.747.424 1.344.888 1.792.464.432 1.08.648 1.848.648.928 0 1.616-.29 2.064-.872.464-.597.696-1.386.696-2.365 0-.93-.24-1.651-.72-2.166-.48-.514-1.16-.772-2.04-.772-.64 0-1.184.15-1.632.448a2.496 2.496 0 00-.984 1.146H18.71V7h11.112v3.087z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tagH6:{icon:'<path d="M15.04 7.61v17.22h-3.408v-7.488H4.384v7.487H1V7.61h3.384v6.976h7.248V7.61h3.408zM26.677 12.293c-.256-1.691-1.104-2.537-2.544-2.537-1.12 0-1.936.504-2.448 1.512-.512.992-.736 2.553-.672 4.683.256-.78.752-1.398 1.488-1.853.752-.472 1.624-.708 2.616-.708 1.632 0 2.912.504 3.84 1.512.944.992 1.416 2.407 1.416 4.244 0 1.139-.224 2.147-.672 3.025-.448.878-1.12 1.569-2.016 2.073-.88.504-1.952.756-3.216.756-2.464 0-4.16-.772-5.088-2.317-.928-1.561-1.392-3.707-1.392-6.44 0-3.137.496-5.462 1.488-6.975C20.485 7.756 22.11 7 24.35 7c1.712 0 3.024.496 3.936 1.488.912.992 1.432 2.26 1.56 3.805h-3.168zm-5.376 6.61c0 .91.256 1.666.768 2.268.528.585 1.296.878 2.304.878.864 0 1.552-.26 2.064-.78.512-.521.768-1.245.768-2.171 0-.976-.264-1.724-.792-2.244-.512-.52-1.208-.78-2.088-.78-.832 0-1.544.243-2.136.73-.592.489-.888 1.188-.888 2.098z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tagDiv:{icon:'<path d="M31.567 13.822l-6.682-7.079a1.647 1.647 0 00-2.312-.072 1.647 1.647 0 00-.072 2.311l5.634 5.96-5.634 5.96a1.647 1.647 0 00.072 2.31c.29.29.687.434 1.12.434a1.7 1.7 0 001.192-.506l6.682-7.079a1.663 1.663 0 000-2.239zM17.796 1.462a1.5 1.5 0 012.924.669L14.26 30.4a1.5 1.5 0 11-2.925-.668l6.462-28.27zM9.427 6.67a1.704 1.704 0 00-1.156-.432c-.434 0-.83.18-1.12.505l-6.718 7.08c-.577.613-.577 1.588 0 2.238l6.682 7.08c.29.325.722.505 1.192.505.433 0 .795-.144 1.12-.433.65-.614.686-1.662.072-2.312l-5.634-5.96 5.634-5.959a1.647 1.647 0 00-.072-2.311z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tagP:{icon:'<path d="M27.286 4.857v1.714a.86.86 0 01-.857.858h-2.572v19.714A.86.86 0 0123 28h-1.714a.86.86 0 01-.857-.857V7.429h-1.715v19.714a.86.86 0 01-.857.857h-1.714a.86.86 0 01-.857-.857v-6H13.57A8.57 8.57 0 015 12.57 8.569 8.569 0 0113.571 4H26.43a.86.86 0 01.857.857z" fill="currentColor"/>',viewBox:"0 0 32 32"},tagSpan:{icon:'<path d="M4.576 12.764c.296.296.625.428 1.053.428.428 0 .79-.132 1.053-.428.297-.296.461-.691.428-1.086 0-.395-.164-.757-.46-.988L3.554 7.596 6.65 4.502c.297-.297.461-.692.428-1.087 0-.395-.164-.757-.46-.987A1.515 1.515 0 005.53 2c-.395 0-.757.165-.987.46L.46 6.544c-.296.296-.461.69-.428 1.086 0 .395.165.757.46.987l4.083 4.148zM15.307 13.093h11.225a5.437 5.437 0 005.43-5.431 5.437 5.437 0 00-5.43-5.432H15.307a5.437 5.437 0 00-5.432 5.432 5.437 5.437 0 005.432 5.431zm0-8.196h11.225a2.796 2.796 0 012.797 2.798 2.796 2.796 0 01-2.797 2.798H15.307a2.796 2.796 0 01-2.798-2.798 2.796 2.796 0 012.798-2.798zM27.387 19.142c-.296-.296-.625-.428-1.053-.428-.428 0-.79.132-1.053.428-.297.296-.461.691-.428 1.086 0 .395.164.757.46.988l3.095 3.094-3.094 3.094c-.297.297-.461.692-.428 1.087 0 .395.164.757.46.987.264.263.659.428 1.054.428h.033c.395 0 .757-.165.987-.46l4.148-4.115c.296-.297.46-.692.428-1.087 0-.395-.165-.757-.461-.987l-4.148-4.115zM16.656 18.78H5.431A5.437 5.437 0 000 24.211a5.437 5.437 0 005.431 5.432h11.225a5.437 5.437 0 005.432-5.432c0-2.995-2.47-5.431-5.432-5.431zm0 8.196H5.431a2.796 2.796 0 01-2.798-2.797 2.796 2.796 0 012.798-2.798h11.225a2.796 2.796 0 012.798 2.797c0 1.548-1.284 2.798-2.798 2.798z" fill="currentColor"/>',
viewBox:"0 0 32 32"},fontawesome:{icon:'<path d="M29.587 22.467c0 .45-.382.638-.832.831-1.794.77-3.713 1.476-5.763 1.476-2.882 0-4.226-1.794-7.683-1.794-2.494 0-5.12.893-7.233 1.856-.125.063-.256.063-.381.125v4.864C7.695 31.162 6.688 32 5.582 32a2.157 2.157 0 01-2.175-2.175V6.4A3.573 3.573 0 012 3.582C2 1.6 3.6 0 5.582 0c1.982 0 3.582 1.6 3.582 3.582 0 1.15-.513 2.175-1.407 2.82v1.98c.257-.087 3.676-1.793 7.17-1.793 4.083 0 6.108 1.725 7.94 1.725 2.431 0 5.12-1.725 5.763-1.725.513 0 .963.381.963.831l-.006 15.047z" fill="currentColor"/>',
viewBox:"0 0 32 32"},icofont:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M25.306 9.57c2.578 0 4.769-2.223 4.769-4.801C30.107 2.159 27.948 0 25.305 0c-2.577 0-4.8 2.191-4.8 4.769 0 2.545 2.255 4.8 4.8 4.8zm3.093-4.833c0 1.643-1.385 3.028-3.06 3.028-1.709 0-2.997-1.288-2.997-3.028 0-1.644 1.353-3.061 2.996-3.061 1.579 0 3.061 1.45 3.061 3.06zm-.611 13.792c-1.032-5.64-4.64-8.958-10.183-8.926-.128 0-.74 0-1.256.194A880.864 880.864 0 003.235 13.76c-1.386.419-1.547 1.03-.774 2.255.554.859 1.191 1.658 1.83 2.459.847 1.062 1.697 2.128 2.359 3.341 1.353 2.513 3.834 3.577 6.605 3.061.464-.077.928-.19 1.393-.301.309-.075.618-.15.927-.214.774-.161 1.064.064.838.902-.134.539-.234 1.091-.335 1.648-.116.642-.233 1.29-.406 1.929-.847 3.261.138 3.226 2.747 3.133l.218-.008c.118 0 .248-.036.376-.072.081-.022.16-.044.236-.057 5.993-1.289 9.666-7.024 8.539-13.307zm-18.206-.774c-2.288.645-3.705 0-4.994-2.287 1.292-.392 2.566-.809 3.835-1.223 2.591-.846 5.158-1.684 7.797-2.29 4.189-.902 8.957 2.61 9.376 6.831.025.145-.006.29-.036.435-.01.049-.02.097-.028.145-.052 0-.093.006-.126.01-.05.006-.08.01-.1-.01-2.964-4.382-6.927-4.64-11.47-2.9-1.308.487-2.672.858-4.013 1.224l-.24.065zm2.123 1.583c2.37-.738 4.738-1.474 7.222-1.776 1.643-.065 2.867.644 3.834 1.933.29.355.644.902-.258.967-2.111.13-4.122.72-6.127 1.308-.995.292-1.988.584-2.992.819-1.74.419-3.254-.097-4.478-1.386l-.072-.07c-.283-.272-.753-.725.104-.961.928-.261 1.848-.548 2.768-.834zm10.25 3.412c1.29.354 2.191 1.063 2.095 2.642.16 1.128-.58 1.837-1.29 2.513a6.101 6.101 0 01-2.158 1.354c-.123.045-.25.096-.381.148-.792.315-1.69.672-2.326.174-.475-.367-.27-.951-.063-1.54.101-.289.203-.579.224-.845.06-.861.338-1.723.609-2.56l.068-.21c.42-1.225 1.901-2.03 3.222-1.676z" fill="currentColor"/>',
viewBox:"0 0 32 32"},ionicons:{icon:'<path d="M15.933 22.226a6.159 6.159 0 100-12.318 6.159 6.159 0 000 12.318z" fill="currentColor"/><path d="M28.787 6.56c.134-.401.267-.803.267-1.204 0-1.473-1.205-2.544-2.543-2.544-.402 0-.804.134-1.206.268C22.628 1.07 19.415 0 15.933 0 11.65 0 7.632 1.74 4.686 4.686 1.606 7.766 0 11.782 0 16.066c0 4.286 1.607 8.302 4.686 11.248C7.766 30.259 11.65 32 15.933 32c4.285 0 8.301-1.607 11.247-4.686 2.945-3.08 4.686-6.962 4.686-11.247 0-3.481-1.071-6.829-3.08-9.506zm-2.678 19.683c-2.678 2.678-6.293 4.284-10.176 4.284s-7.498-1.473-10.176-4.284C3.08 23.565 1.473 19.95 1.473 16.067S2.946 8.569 5.757 5.89c2.678-2.678 6.293-4.284 10.176-4.284 2.946 0 5.891.937 8.167 2.544-.134.401-.267.803-.267 1.205 0 1.472 1.205 2.544 2.544 2.544.401 0 .803-.134 1.205-.268 1.74 2.41 2.677 5.355 2.677 8.435.134 3.749-1.472 7.364-4.15 10.176z" fill="currentColor"/>',
viewBox:"0 0 32 32"},octicons:{icon:'<path d="M32 17.077c-.056.215-.038.433-.056.651-.278 3.339-1.431 6.318-3.472 8.932-1.931 2.476-4.372 4.22-7.288 5.272-.159.058-.325.08-.493.061-.416-.048-.688-.352-.688-.789-.003-.866.01-1.728.013-2.594.003-.805.037-1.613-.016-2.418-.05-.719-.219-1.398-.603-2.011a3.54 3.54 0 00-.44-.532c.234-.036.443-.065.652-.097 1.075-.17 2.122-.433 3.1-.94 1.65-.852 2.678-2.225 3.17-4.037a10.8 10.8 0 00.337-3.662 6.29 6.29 0 00-1.522-3.676c-.047-.054-.097-.099-.066-.192.45-1.321.36-2.633-.066-3.938-.118-.366-.121-.372-.506-.363-.656.016-1.268.222-1.865.481-.713.312-1.378.706-2.016 1.149-.094.064-.172.086-.284.057a14.434 14.434 0 00-4.157-.513 14.197 14.197 0 00-3.5.5.39.39 0 01-.359-.057c-.762-.513-1.553-.975-2.416-1.293-.525-.192-1.062-.343-1.63-.31-.132.006-.204.044-.25.179-.466 1.315-.595 2.646-.173 3.999.05.157.032.25-.075.375-.956 1.145-1.453 2.48-1.487 3.983-.028 1.184.081 2.354.418 3.496.597 1.995 1.857 3.355 3.741 4.124.85.346 1.74.536 2.644.67.119.02.237.032.356.052.025.003.05.013.09.022-.174.19-.34.372-.468.587a3.925 3.925 0 00-.506 1.45c-.013.07-.01.144-.097.183-.825.352-1.675.516-2.56.285-.853-.225-1.465-.783-1.925-1.53-.33-.535-.718-1.023-1.23-1.385-.523-.37-1.091-.51-1.72-.401a.81.81 0 00-.15.041c-.193.084-.24.228-.134.411.138.23.338.4.563.52.397.211.68.538.934.9.366.52.672 1.078.91 1.675.374.933 1.084 1.475 2.009 1.741.847.244 1.71.228 2.572.116.197-.026.393-.045.587-.087.128-.029.147.013.147.132 0 .914.006 1.824.01 2.738 0 .106.006.215-.01.321a.729.729 0 01-.625.625c-.19.03-.384.02-.569-.048-2.647-.93-4.903-2.466-6.765-4.602-2-2.296-3.26-4.955-3.807-7.97a14.98 14.98 0 01-.23-2.08c-.004-.058-.02-.116-.029-.174V15.41c.01-.052.025-.103.028-.154.04-.66.125-1.315.25-1.966.74-3.8 2.553-6.963 5.444-9.454C8.312 1.604 11.316.353 14.694.058c.247-.023.5-.003.743-.058h1.126c.053.029.112.026.168.026a14.32 14.32 0 012.247.263 15.439 15.439 0 015.594 2.27c2.497 1.639 4.416 3.813 5.74 6.533a16.383 16.383 0 011.635 6.196c.019.276-.006.555.053.827v.962z" fill="currentColor"/>',
viewBox:"0 0 32 32"},iconjar:{icon:'<path d="M7.343 7.833c-.656 0-1.248-.604-1.248-1.272 0-1.54 3.81-2.68 8.146-2.68.394 0 .656 0 .656-.333 0-.603-1.313-.803-1.313-1.807C13.584.67 14.832 0 16.408 0c1.577 0 2.825.67 2.825 1.741 0 1.004-1.313 1.138-1.313 1.807 0 .201.197.335.656.335 4.336 0 8.213 1.07 8.213 2.678a1.258 1.258 0 01-1.25 1.271H7.345l-.001.001zm19.642 6.091c1.578 1.004 2.168 2.812 1.907 4.487l-1.84 10.106C26.657 30.53 24.948 32 22.91 32H10.036C8 32 6.292 30.528 5.897 28.519L4.057 18.41a4.41 4.41 0 011.972-4.42c.92-.668 1.116-1.807 0-2.208-1.577-.603-1.25-2.544.328-2.544h9.59c1.512 0 3.353 1.137 3.353 4.82 0 3.682-1.71 3.346-1.71 5.957 0 1.139.92 2.344 2.037 2.479 1.906.2 3.022-.536 3.022-3.214 0-2.746-1.576-4.017-1.576-6.293 0-2.745 1.707-3.817 2.824-3.817h2.76c1.576 0 1.906 1.942.328 2.545-1.116.467-.92 1.607 0 2.208z" fill="currentColor"/>',
viewBox:"0 0 32 32"},materialicon:{icon:'<path d="M28.2 5.5c-.2.1-.2.2-.2.3v4.3s.1 0 .1-.1.1 0 .1-.1c.6-.4 1.2-.7 1.9-1.1.6-.4 1.2-.7 1.9-1.1V3.3c-1.3.7-2.5 1.5-3.8 2.2z" fill="currentColor"/><path d="M31.9 12.6c-.3.2-.6.3-.8.5-1 .6-1.9 1.1-2.9 1.7-.2 0-.2.1-.2.3v4.1c0 .2-.1.3-.2.4l-5.7 3.3-2.1 1.2c-1.3-.7-2.5-1.4-3.7-2.2h-.1c-.1 0-.1-.1-.1-.1l2.1-1.2c1.8-1.1 3.7-2.1 5.5-3.2.2-.1.2-.2.2-.3V3.8v-.1-.2l-12 6.9C10.5 9.6 9.2 8.8 7.8 8 5.3 6.4 2.6 4.8 0 3.3V17c0 .2.1.3.2.3l3.6 2.1c.1 0 .1.1.2.1v-9.3h.1c.1 0 .1.1.1.1 2.3 1.3 4.6 2.6 6.8 4 .1 0 .2.1.2.1.2.1.4.3.7.4.1 0 .2 0 .2-.1 0 0 .1 0 .1-.1 1.2-.7 2.5-1.4 3.7-2.1 1.2-.7 2.5-1.4 3.7-2.1h.1c.1 0 .1-.1.2-.1v4.4c0 .1-.1.2-.2.2-1.6.9-3.2 1.9-4.8 2.8-1 .6-1.9 1.1-2.9 1.7v4.4c0 .3.1.4.3.6 2.5 1.4 4.9 2.8 7.4 4.3h.1c.1 0 .1.1.2.1s.2-.1.2-.1.1 0 .1-.1l5.7-3.3 5.7-3.3c.1 0 .1-.1.2-.1v-9.3c.1 0 .1 0 0 0z" fill="currentColor"/>',
viewBox:"0 0 32 32"},icomoon:{icon:'<path d="M16 0c-2.267 0-4.267.4-6.267 1.2-1.866.8-3.6 2-5.066 3.467C3.2 6.133 2 7.867 1.2 9.733c-.8 2-1.2 4-1.2 6.267 0 2.267.4 4.267 1.2 6.267.8 1.866 2 3.6 3.467 5.066C6.133 28.8 7.867 30 9.733 30.8c1.867.8 4 1.2 6.267 1.2 2.267 0 4.267-.4 6.267-1.2 1.866-.8 3.6-2 5.066-3.467 1.467-1.466 2.667-3.2 3.467-5.066.8-1.867 1.2-4 1.2-6.267 0-2.267-.4-4.267-1.2-6.267-.8-1.866-2-3.6-3.467-5.066C25.867 3.2 24.133 2 22.267 1.2c-2-.8-4-1.2-6.267-1.2zm-4.133 2c1.2.667 2.4 1.6 3.333 2.533a19.077 19.077 0 012.533 3.2c.667 1.2 1.2 2.534 1.6 3.867.4 1.333.534 2.8.534 4.267 0 1.466-.267 2.933-.534 4.266-.4 1.334-.933 2.667-1.6 3.867-.666 1.2-1.6 2.267-2.533 3.333a14.706 14.706 0 01-3.333 2.534c-1.2-.534-2.267-1.467-3.334-2.4C7.6 26.4 6.667 25.333 6 24.133c-.667-1.2-1.2-2.533-1.6-3.866-.4-1.334-.533-2.8-.533-4.267 0-1.467.133-2.933.666-4.267.4-1.333.934-2.666 1.6-3.866.534-1.2 1.467-2.267 2.4-3.334C9.6 3.6 10.667 2.667 11.867 2zm0 10.267c-1.067 0-1.867.4-2.667 1.066-.667.667-1.067 1.6-1.067 2.667 0 1.067.4 1.867 1.067 2.667.667.8 1.6 1.066 2.667 1.066 1.066 0 1.866-.4 2.666-1.066.8-.667 1.067-1.6 1.067-2.667 0-1.067-.4-1.867-1.067-2.667-.8-.666-1.733-1.066-2.666-1.066z" fill="currentColor"/>',
viewBox:"0 0 32 32"},fontello:{icon:'<path d="M30.6 13.1c.4 1.2-.1 2.2-1.3 2.6-.5.2-.5.2-.5-.4 0-.6-.1-1.2-.5-1.6-.3-.4-.7-.5-1.1-.4-.4.1-.6.4-.7.8-.2.8.3 1.7 1.1 2.1.1.1.3.1.3.3-.1.4-.2.9-.6 1.2-.3.3-.7.2-.9-.1-.2-.4-.3-.7-.2-1.1.1-.4.2-.8.2-1.3 0-.3 0-.6-.4-.6s-.5.2-.6.6c-.1.5 0 .9 0 1.3s-.2.7-.4.9c-.2.2-.4.2-.6 0-.4-.4-.7-1.5-.5-2 .5-1.4.9-2.9.9-4.4 0-.6-.1-1.2-.5-1.7-.4-.6-1.2-.6-1.6.1-.2.3-.3.7-.3 1.1-.3 1.8-.1 3.7.2 5.5.1.6-.2 1.1-.5 1.5-.1.2-.3.2-.5 0-.4-.3-.8-1.5-.6-2 .4-1 .6-2 .8-3.1.1-1 .2-2-.3-3-.2-.3-.4-.6-.8-.6s-.6.2-.8.6c-.2.4-.3.8-.4 1.2-.2 1.9-.1 3.8.3 5.6.1.4-.4 1.4-.7 1.6-.1.1-.3.1-.4 0-.2-.1 0-.3 0-.4.3-.6.5-1.3.5-2 0-.6-.1-1.3-.5-1.8-.5-.5-1.1-.4-1.4.2-.3.6-.4 1.2-.4 1.9.1.6.3 1.2.6 1.8-.6.1-1-.2-1.2-1-.4-1.3-.2-2.7-.1-4 .1-.5.1-.5.8-.5.8 0 1.4-.3 1.6-.9.2-.6.1-1.1-.1-1.7-.6.8-.9 1-1.5 1.2-.3.1-.4.1-.3-.3.2-.5.3-1 .4-1.6.1-.2.1-.5-.2-.6-.6-.1-1.4.4-1.5.9-.1.4-.1.8-.2 1.2 0 .2-.1.3-.3.2-.4-.1-.9-.2-1.3-.3-1.4-.4-2.8-.6-4.2-.3-.3.1-.2-.1-.2-.3.1-.7 0-1.4-.3-2-.4-.9-1.3-1.5-2.2-1.4-.9 0-1.6.6-2 1.6-.3.7-.4 1.5-.4 2.3 0 1.5.3 3 .6 4.5.1.5 0 .8-.3 1.1-.3.3-.4.3-.6 0-.8-.9-1.8-.9-2.6-.1-.4.4-.7.9-.8 1.5-.6 1.8-.5 3.7 0 5.5.3 1.4.9 2.6 2 3.5 1.8 1.6 3.9.9 4.4-1.4.3-1.3.3-2.6 0-3.8-.3-1.6-.6-3.3-.9-4.9 0-.2-.1-.5.2-.5.3 0 .1.3.1.5.1.9.2 1.8.9 2.6.9.9 1.9.7 2.4-.4.1-.3.2-.7.3-1 0-.3.3-.3.5-.3s.1.2.2.3c.1.5.1 1 .4 1.5.1.2.2.5.6.4.3-.1.5-.3.5-.7.1-.8.3-1.5.6-2.3.1.2.1.4.1.6.1.7.3 1.4.8 2 .5.6 1.2.6 1.7 0 .1-.2.2-.3.4-.5.7.9 1.3 1 2.3.5.2-.1.3 0 .4.1.6.4 1.1.2 1.5-.3.1-.1.2-.4.4-.5.5.9.9 1.2 1.5 1.1.7-.2.9-.9 1.3-1.4.3.6.5 1.3 1.2 1.4.8.1 1.1-.5 1.5-1 .2.2.3.4.4.6.7.8 1.5.7 2-.2.2-.4.3-.8.4-1.2 0-.3.1-.4.5-.5 1-.1 2-.4 2.6-1.3.5-1.2-.1-2.2-1.2-2.3zM4.3 17.4c.3.5.4.9.3 1.4 0 .1 0 .2-.1.2s-.1-.1-.2-.2c-.1-.5-.1-.9 0-1.4zm2 4.4c0 .7 0 1.5-.2 2.2-.4 1-1.2 1.3-2 .5-.6-.5-1-1.1-1.3-1.8-.7-1.7-1-3.5-.8-5.4 0-.3.1-.6.2-.8.4-.7 1-.7 1.5-.2.1.2.1.3 0 .4-.2.6-.4 1.2-.4 1.8v.4c.1.6.6 1 1 .9.5 0 .8-.5.8-1.1 0-.6-.1-1.2-.3-1.7-.3-.5 0-.8.4-1.1.5 2.1 1 4 1.1 5.9zm8.6-4c-.2.1-.5 0-.6-.2-.3-.4-.4-.8-.4-1.2-.1-.8-.1-1.6.1-2.4.1-.4 0-.5-.4-.5s-.7.2-.8.6c-.4.9-.7 1.7-1 2.6.1-.9.1-1.8.5-2.7.3-.6.2-.7-.5-.7-.5 0-.7.2-.8.7-.1.4-.2.9-.3 1.3-.1.3-.2.5-.6.7 0-.4 0-.8-.1-1.1-.1-.3-.2-.7-.5-.9-.3-.3-.7-.4-1.1-.2-.4.1-.5.5-.6.9 0 .8.2 1.4.9 1.8.3 0 .4.1.3.4-.1.3-.1.6-.3.8-.1.2-.2.4-.5.4s-.4-.2-.5-.4c-.4-.9-.4-1.9-.1-2.9 0-.1.1-.2.1-.2.1-.2 0-.4-.1-.6-.1-.2-.3-.1-.4 0-.4.1-.8.3-1.3.5-.2-1.8-.5-3.5-.2-5.3.2-.5.3-1 .6-1.3.6-.7 1.4-.6 1.8.2.3.6.3 1.3.2 2 0 .2-.2.2-.3.3-.4.3-.8.6-1.1 1-.1.2-.2.4-.2.6 0 .4.1.6.4.8.3.2.6 0 .8-.2.5-.4.7-1 .9-1.5.1-.5.4-.7.9-.8 1-.2 2 0 2.9.3.8.3 1.5.6 2.3.9.2.1.2.2.2.4-.1.9-.1 1.9-.1 2.8 0 .8.1 1.6.3 2.3.1.5-.1.6-.4.8zm-5.8-2c-.4-.4-.4-.7-.3-1.1.3.3.3.6.3 1.1zM8 11.1c-.1.5-.2.8-.5 1-.1.1-.1.2-.3.1-.1-.1-.1-.2 0-.3.2-.3.4-.6.8-.8zm10.1 6.2c-.3-.8-.3-1.6-.2-2.4 0-.2.1-.5.4-.5.3 0 .4.3.4.5.1.8-.1 1.6-.6 2.4zm2.4-5.3c0-.3 0-.6.1-.9 0-.2 0-.6.3-.6s.2.4.3.6c.1.6.1 1.1 0 1.7-.1.5-.2 1.1-.4 1.6-.2-.8-.3-1.6-.3-2.4zm3.1 2.4c-.2-1.2-.2-2.3-.1-3.4 0-.1 0-.2.1-.3 0-.1 0-.2.2-.2s.2.1.2.2c.2.6.2 1.1.1 1.7-.1.7-.2 1.4-.5 2zm4.4 1.3c-.5-.3-.7-.6-.7-1.1 0-.2.1-.3.2-.3.2 0 .3.1.3.2.2.4.2.7.2 1.2z" fill="currentColor"/><path d="M8.3 22c0-.4.2-.5.4-.6.8-.5 1.7-.8 2.6-1 2.4-.5 4.8-.6 7.2-.6 2.3 0 4.6.3 6.7 1 .5.2 1 .3 1.4.6.1.1.2.1.3.2.1.1.1.3 0 .5s-.2.1-.4.1c-1.4-.4-2.7-.7-4.1-.8-2.3-.3-4.6-.3-6.9-.1-1.9.2-3.7.6-5.5 1.3-.2.1-.4.2-.5.2-.2.1-.4.4-.7.2-.3-.4-.5-.7-.5-1z" fill="currentColor"/>',
viewBox:"0 0 32 32"},videoCameraDuo:{icon:'<path d="M-59.1,311.2h-167.8c0,0-44.1,0-44.1,44.1v91.5c0,0,0,44.1,44.1,44.1h167.8c0,0,44.1,0,44.1-44.1v-91.5 C-15,355.3-15,311.2-59.1,311.2z M-177.1,450.3v-98.5l83.8,49.3L-177.1,450.3z" fill="currentColor"/>',viewBox:"-271 311.2 256 179.8"},foldersDuo:{icon:'<path d="M228,56H160L133.333,36a20.12292,20.12292,0,0,0-12-4H76A20.0226,20.0226,0,0,0,56,52V72H36A20.0226,20.0226,0,0,0,16,92V204a20.0226,20.0226,0,0,0,20,20H188.88867A19.13289,19.13289,0,0,0,208,204.88867V184h20.88867A19.13289,19.13289,0,0,0,248,164.88867V76A20.0226,20.0226,0,0,0,228,56ZM184,200H40V96H80l26.667,20a20.12292,20.12292,0,0,0,12,4H184Zm40-40H208V116a20.0226,20.0226,0,0,0-20-20H120L93.333,76a20.12292,20.12292,0,0,0-12-4H80V56h40l26.667,20a20.12292,20.12292,0,0,0,12,4H224Z" fill="currentColor"/>',
viewBox:"0 0 256 256"},foldersDuoAlt:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M5.41959 3.23866C6.23018 3.05852 7.19557 3 8.312 3H9.92963C10.9327 3 11.8694 3.5013 12.4258 4.3359L13.2383 5.5547C13.4238 5.83288 13.736 6 14.0704 6H19.1258C20.7233 6 22.0181 7.26115 22.0029 8.8852C21.9847 10.8192 22 12.7539 22 14.688C22 15.8044 21.9415 16.7698 21.7613 17.5804C21.5787 18.4024 21.2579 19.1251 20.6915 19.6915C20.1251 20.2579 19.4024 20.5787 18.5804 20.7613C17.7698 20.9415 16.8044 21 15.688 21H8.312C7.19557 21 6.23018 20.9415 5.41959 20.7613C4.59764 20.5787 3.87488 20.2579 3.30848 19.6915C2.74209 19.1251 2.42133 18.4024 2.23866 17.5804C2.05852 16.7698 2 15.8044 2 14.688V9.312C2 8.19557 2.05852 7.23018 2.23866 6.41959C2.42133 5.59764 2.74209 4.87488 3.30848 4.30848C3.87488 3.74209 4.59764 3.42133 5.41959 3.23866Z" fill="currentColor"/>',
viewBox:"0 0 24 24"},folderPlusDuo:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M13 11C13 10.4477 12.5523 10 12 10C11.4477 10 11 10.4477 11 11V12.5L9.5 12.5C8.94772 12.5 8.5 12.9477 8.5 13.5C8.5 14.0523 8.94772 14.5 9.5 14.5L11 14.5V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V14.5L14.5 14.5C15.0523 14.5 15.5 14.0523 15.5 13.5C15.5 12.9477 15.0523 12.5 14.5 12.5L13 12.5V11ZM5.41959 3.23866C6.23018 3.05852 7.19557 3 8.312 3H9.92963C10.9327 3 11.8694 3.5013 12.4258 4.3359L13.2383 5.5547C13.4238 5.83288 13.736 6 14.0704 6H19.1258C20.7233 6 22.0181 7.26115 22.0029 8.8852C21.9847 10.8192 22 12.7539 22 14.688C22 15.8044 21.9415 16.7698 21.7613 17.5804C21.5787 18.4024 21.2579 19.1251 20.6915 19.6915C20.1251 20.2579 19.4024 20.5787 18.5804 20.7613C17.7698 20.9415 16.8044 21 15.688 21H8.312C7.19557 21 6.23018 20.9415 5.41959 20.7613C4.59764 20.5787 3.87488 20.2579 3.30848 19.6915C2.74209 19.1251 2.42133 18.4024 2.23866 17.5804C2.05852 16.7698 2 15.8044 2 14.688V9.312C2 8.19557 2.05852 7.23018 2.23866 6.41959C2.42133 5.59764 2.74209 4.87488 3.30848 4.30848C3.87488 3.74209 4.59764 3.42133 5.41959 3.23866Z" fill="currentColor"/>',
viewBox:"0 0 24 24"},plusCircleDuo:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M188.998,331.298l-0.231-107.449l-92.494-53.907L3.946,223.654l0.225,108.29l92.102,53.475L188.998,331.298z M105.656,358.292l0.165-75.232l64.289-37.558l0.165,75.067L105.656,358.292z M96.26,191.586l64.603,37.658l-64.384,37.606 L31.874,229.05L96.26,191.586z M22.703,245.356l64.411,37.691l-0.164,75.335l-64.092-37.217L22.703,245.356z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M288.748,169.948l-92.324,53.706l0.231,108.29l92.104,53.475l92.714-54.121l-0.231-107.449L288.748,169.948z M288.735,191.586l64.605,37.658l-64.386,37.606l-64.606-37.801L288.735,191.586z M215.179,245.356l64.404,37.691l-0.164,75.335 l-64.076-37.217L215.179,245.356z M298.137,358.292l0.159-75.232l64.289-37.558l0.164,75.067L298.137,358.292z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M285.216,53.892L192.719,0l-92.324,53.697l0.222,108.295l92.102,53.479l92.717-54.121L285.216,53.892z M192.707,21.635 l64.609,37.649l-64.384,37.619l-64.609-37.811L192.707,21.635z M119.149,75.401l64.411,37.698l-0.161,75.335l-64.095-37.211 L119.149,75.401z M202.099,188.343l0.162-75.234l64.292-37.564l0.164,75.073L202.099,188.343z" fill="currentColor"/>',
viewBox:"0 0 385.419 385.419"},layersDuo:{icon:'<g transform="translate(0.000000,186.000000) scale(0.100000,-0.100000)" fill="currentColor" stroke="none"><path d="M175 1788 c-50 -18 -96 -58 -116 -102 -16 -36 -19 -68 -19 -286 0 -275 6 -304 71 -352 52 -39 93 -48 210 -48 l109 0 0 75 0 75 -109 0 c-86 0 -113 3 -125 16 -24 23 -24 445 0 468 13 14 49 16 239 16 l225 0 16 -25 c15 -23 23 -25 85 -25 81 0 84 6 43 88 -19 39 -38 59 -72 80 l-47 27 -240 2 c-152 1 -251 -2 -270 -9z" fill="currentColor"/><path d="M675 1488 c-50 -18 -96 -58 -116 -102 -17 -37 -19 -70 -19 -386 0 -386 3 -401 71 -453 61 -46 91 -49 444 -45 l330 3 47 27 c34 21 53 41 72 80 l26 52 0 336 0 336 -26 52 c-19 39 -38 59 -72 80 l-47 27 -340 2 c-222 1 -350 -2 -370 -9z" fill="currentColor"/><path d="M1640 926 l0 -76 109 0 c149 0 141 13 141 -250 0 -170 -3 -209 -16 -228 -15 -22 -19 -22 -239 -22 -190 0 -226 2 -239 16 -9 8 -16 20 -16 25 0 5 -31 9 -70 9 -66 0 -70 -1 -70 -22 1 -39 36 -104 71 -131 59 -44 96 -49 344 -45 230 3 230 3 277 30 34 21 53 41 72 80 26 51 26 54 26 288 0 234 0 237 -26 288 -19 39 -38 59 -72 80 -43 25 -57 27 -169 31 l-123 3 0 -76z" fill="currentColor"/></g>',
viewBox:"0 0 204 186"},layoutsDuo:{icon:'<path d="m 10.535714,6.61964 0.983036,0.63482 0,5.74554 -3.5625005,-2.24464 2.5794645,-4.13572 z m 2.25,-4.46785 -5.7241075,0 -0.616071,1.0125 4.1116065,2.58482 2.228572,-3.59732 z M 10.401786,5.97679 2.4785712,1 l 0,5.74554 1.2321433,0.77678 6.6910715,-1.54553 z m -6.8035715,2.04642 -2.383929,3.825 5.724107,0 3.3482145,-5.37053 -6.6883925,1.54553 z" fill="currentColor"/>',viewBox:"0 0 14 14"},mediaDuo:{icon:'<path d="M17.125 6.17L15.079.535c-.151-.416-.595-.637-.989-.492L.492 5.006c-.394.144-.593.597-.441 1.013l2.156 5.941V8.777c0-1.438 1.148-2.607 2.56-2.607H8.36l4.285-3.008 2.479 3.008h2.001zM19.238 8H4.767a.761.761 0 0 0-.762.777v9.42c.001.444.343.803.762.803h14.471c.42 0 .762-.359.762-.803v-9.42A.761.761 0 0 0 19.238 8zM18 17H6v-2l1.984-4.018 2.768 3.436 2.598-2.662 3.338-1.205L18 14v3z" fill="currentColor"/>',
viewBox:"0 0 20 20"},toolsDuo:{icon:'<path fill="currentColor" d="M59.77,37.11l-.41-1c1.4-3.17,1.31-3.27,1-3.54l-1.79-1.75-.18-.15h-.21c-.11,0-.44,0-3.16,1.23l-1-.4c-1.3-3.21-1.43-3.21-1.81-3.21H49.72c-.38,0-.52,0-1.73,3.22l-1,.4a17.37,17.37,0,0,0-3.21-1.17h-.24l-1.93,1.89c-.29.28-.39.37,1.09,3.49l-.41,1C39,38.4,39,38.52,39,38.91v2.48c0,.39,0,.52,3.29,1.7l.41,1c-1.4,3.17-1.31,3.26-1,3.54l1.8,1.75.17.15h.21c.11,0,.43,0,3.16-1.24l1,.41c1.3,3.21,1.43,3.21,1.81,3.21h2.53c.38,0,.52,0,1.73-3.22l1-.41a17,17,0,0,0,3.2,1.18h.24l1.95-1.9c.27-.28.37-.38-1.11-3.49l.41-1c3.29-1.27,3.29-1.41,3.29-1.79V38.81C63.07,38.42,63.07,38.28,59.77,37.11ZM51,44.22a4.12,4.12,0,1,1,4.2-4.12A4.16,4.16,0,0,1,51,44.22Z" transform="translate(-8.93 -4.12)"/><path fill="currentColor" d="M36,22.79l-.53-1.27c1.83-4.14,1.71-4.26,1.35-4.62l-2.34-2.29-.23-.19H34c-.14,0-.57,0-4.13,1.61l-1.31-.53c-1.69-4.19-1.86-4.19-2.36-4.19h-3.3c-.49,0-.68,0-2.25,4.21l-1.31.53a21.5,21.5,0,0,0-4.19-1.53h-.31L12.33,17c-.38.36-.51.49,1.42,4.57l-.53,1.26c-4.29,1.66-4.29,1.82-4.29,2.32v3.24c0,.51,0,.69,4.3,2.23l.54,1.26c-1.83,4.13-1.71,4.26-1.36,4.61l2.34,2.29L15,39h.27c.14,0,.56,0,4.12-1.61l1.31.53c1.69,4.19,1.86,4.19,2.36,4.19h3.3c.51,0,.69,0,2.26-4.21l1.31-.53a21.5,21.5,0,0,0,4.19,1.53h.31L37,36.38c.36-.36.48-.49-1.44-4.55l.53-1.26c4.29-1.66,4.29-1.83,4.29-2.33V25C40.34,24.5,40.34,24.32,36,22.79ZM24.64,32.08a5.39,5.39,0,1,1,5.48-5.39A5.46,5.46,0,0,1,24.64,32.08Z" transform="translate(-8.93 -4.12)"/><path fill="currentColor" d="M58,11.62l-.35-.83c1.2-2.71,1.12-2.79.89-3L57,6.28l-.15-.13h-.18A9.91,9.91,0,0,0,54,7.2l-.86-.34c-1.1-2.74-1.22-2.74-1.54-2.74H49.47c-.33,0-.45,0-1.48,2.75l-.85.34a14.14,14.14,0,0,0-2.74-1h-.2L42.56,7.83c-.25.24-.34.32.92,3l-.34.83c-2.8,1.08-2.8,1.18-2.8,1.51v2.12c0,.33,0,.45,2.8,1.45l.35.82c-1.19,2.71-1.11,2.79-.88,3l1.53,1.49.15.14h.18a10,10,0,0,0,2.69-1.06l.85.35c1.11,2.73,1.22,2.73,1.55,2.73h2.15c.33,0,.45,0,1.48-2.74l.85-.35a14.89,14.89,0,0,0,2.73,1H57l1.66-1.62c.23-.23.31-.32-.94-3L58,16.7c2.8-1.09,2.8-1.2,2.8-1.52V13.07C60.84,12.73,60.84,12.62,58,11.62Zm-7.44,6.06a3.52,3.52,0,1,1,3.58-3.51A3.56,3.56,0,0,1,50.59,17.68Z" transform="translate(-8.93 -4.12)"/>',
viewBox:"0 -5 54.13 54.13"},blocksDuo:{icon:'<path d="m17.12 21.857h-14.977v-6.428h-2.143v8.571h19.259v-8.571h-2.139zm-12.616-7.018.442-2.102 10.486 2.21-.442 2.09zm1.379-5.009.898-1.955 9.71 4.54-.898 1.942zm2.692-4.768 1.366-1.647 8.218 6.87-1.366 1.647zm5.313-5.062 6.388 8.585-1.716 1.286-6.386-8.585zm-9.616 19.701v-2.13h10.714v2.13z"  fill="currentColor"/>',viewBox:"0 0 24 24"},zipDuo:{icon:'<path opacity=".8" d="M27.563 6.563L21.442.438A1.499 1.499 0 0020.382 0H20v8h8v-.381c0-.394-.156-.775-.438-1.056z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M18 8.5c0 .825.675 1.5 1.5 1.5H28v20.5c0 .831-.669 1.5-1.5 1.5h-21c-.831 0-1.5-.669-1.5-1.5v-29C4 .669 4.669 0 5.5 0h6.525v2h2V0H18v8.5zM11.994 2h-2v2h2V2zM8.8 22.069a3.277 3.277 0 106.425.018l-1.081-5.48a.756.756 0 00-.738-.607h-1.381v-2h2v-2h-2v-2h2V8h-2V6h2V4h-2v2h-2v2h2v2h-2v2h2v2h-2v2L8.8 22.069zm1.2.619c0-.932.906-1.688 2.025-1.688 1.119 0 2.031.756 2.031 1.688 0 .93-.906 1.687-2.025 1.687-1.119 0-2.031-.75-2.031-1.688z" fill="currentColor"/>',
viewBox:"0 0 32 32"},cubeDuo:{icon:'<path d="m17.12 21.857h-14.977v-6.428h-2.143v8.571h19.259v-8.571h-2.139zm-12.616-7.018.442-2.102 10.486 2.21-.442 2.09zm1.379-5.009.898-1.955 9.71 4.54-.898 1.942zm2.692-4.768 1.366-1.647 8.218 6.87-1.366 1.647zm5.313-5.062 6.388 8.585-1.716 1.286-6.386-8.585zm-9.616 19.701v-2.13h10.714v2.13z" fill="currentColor"/>',viewBox:"0 0 24 24"},filesDuo:{icon:'<path d="M17.125 6.17L15.079.535c-.151-.416-.595-.637-.989-.492L.492 5.006c-.394.144-.593.597-.441 1.013l2.156 5.941V8.777c0-1.438 1.148-2.607 2.56-2.607H8.36l4.285-3.008 2.479 3.008h2.001zM19.238 8H4.767a.761.761 0 0 0-.762.777v9.42c.001.444.343.803.762.803h14.471c.42 0 .762-.359.762-.803v-9.42A.761.761 0 0 0 19.238 8zM18 17H6v-2l1.984-4.018 2.768 3.436 2.598-2.662 3.338-1.205L18 14v3z" fill="currentColor"/>',
viewBox:"0 0 20 20"},wordDuo:{icon:'<path d="M19.5 10c-.825 0-1.5-.675-1.5-1.5V0H5.5C4.669 0 4 .669 4 1.5v29c0 .831.669 1.5 1.5 1.5h21c.831 0 1.5-.669 1.5-1.5V10h-8.5zm4.294 6.919l-2.375 10.5a.743.743 0 01-.732.581h-2.375a.749.749 0 01-.725-.569c-1.612-6.469-1.3-5.075-1.6-6.906h-.03c-.07.894-.15 1.088-1.6 6.906a.749.749 0 01-.726.569h-2.319a.749.749 0 01-.73-.587l-2.363-10.5A.747.747 0 018.95 16h1.531a.75.75 0 01.738.606c.975 4.875 1.256 6.844 1.312 7.638.1-.638.457-2.044 1.838-7.669a.744.744 0 01.731-.569h1.819c.35 0 .65.238.731.575 1.5 6.275 1.8 7.75 1.85 8.088-.012-.7-.163-1.113 1.35-8.075a.725.725 0 01.719-.594h1.494a.75.75 0 01.73.919z" fill="currentColor"/><path opacity=".8" d="M28 7.619V8h-8V0h.381c.4 0 .782.156 1.063.438l6.119 6.125c.28.28.437.662.437 1.056z" fill="currentColor"/>',
viewBox:"0 0 32 32"},pdfDuo:{icon:'<path opacity=".8" d="M27.563 6.563L21.438.438A1.499 1.499 0 0020.375 0H20v8h8v-.381c0-.394-.156-.775-.438-1.056z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 10c-.825 0-1.5-.675-1.5-1.5V0H5.5C4.669 0 4 .669 4 1.5v29c0 .831.669 1.5 1.5 1.5h21c.831 0 1.5-.669 1.5-1.5V10h-8.5zm2.869 13.9c-1.056 0-2.644-.481-4-1.219-1.261.208-2.661.682-4.005 1.137-.315.107-.627.212-.933.313-1.587 2.738-2.7 3.863-3.818 3.863-.344 0-.994-.194-1.344-.625-1.194-1.469 1.712-3.381 3.406-4.25.003 0 .005-.002.006-.003.002-.002.003-.003.007-.003.756-1.325 1.824-3.638 2.55-5.363-.532-2.056-.82-3.669-.507-4.813.338-1.23 2.694-1.412 2.988.426.329 1.071-.084 2.766-.366 3.922l-.022.09c.588 1.55 1.419 2.6 2.669 3.363 1.206-.157 3.731-.4 4.6.45.719.712.594 2.712-1.231 2.712zm-7.125-10.825c-.181 0-.188 1.931.125 2.931.35-.625.4-2.931-.125-2.931zm.018 5.881c-.48 1.263-1.08 2.707-1.774 3.919.28-.107.569-.226.867-.35.922-.38 1.936-.797 3.064-1.019-.794-.6-1.556-1.462-2.157-2.55zm-3.7 5.288c-1.356 2.175-2.18 2.562-2.18 2.512.308-.837 1.372-1.787 1.938-2.293.098-.087.18-.161.242-.22zm8.694-2.288c2.319.988 2.675.563 2.675.563.256-.169-.156-.744-2.675-.563z" fill="currentColor"/>',
viewBox:"0 0 32 32"},powerpointDuo:{icon:'<path opacity=".8" d="M27.563 6.563L21.438.438A1.499 1.499 0 0020.375 0H20v8h8v-.381c0-.394-.156-.775-.438-1.056z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M18 8.5c0 .825.675 1.5 1.5 1.5H28v20.5c0 .831-.669 1.5-1.5 1.5h-21c-.831 0-1.5-.669-1.5-1.5v-29C4 .669 4.669 0 5.5 0H18v8.5zm-3.631 18.75v-3.575c.127 0 .289.007.478.014 1.883.077 6.466.265 6.466-4.864 0-2.762-1.775-4.813-4.557-4.813h-5.062a.752.752 0 00-.75.75V27.25c0 .413.337.75.75.75h1.925c.412 0 .75-.337.75-.75zm-.006-10.3h1.743c.55 0 .969.169 1.269.506.6.681.613 2.044-.012 2.756-.307.35-.744.532-1.32.532h-1.68V16.95z" fill="currentColor"',
viewBox:"0 0 32 32"},excelDuo:{icon:'<path d="M19.5 10c-.825 0-1.5-.675-1.5-1.5V0H5.5C4.669 0 4 .669 4 1.5v29c0 .831.669 1.5 1.5 1.5h21c.831 0 1.5-.669 1.5-1.5V10h-8.5zm2.256 16.844A.751.751 0 0121.125 28h-2.181a.753.753 0 01-.663-.394C17.056 25.344 16 23.312 16 23.312c-.4.925-.625 1.25-2.287 4.3a.743.743 0 01-.657.394h-2.181a.751.751 0 01-.631-1.156l3.768-5.844-3.768-5.844a.75.75 0 01.631-1.156h2.175c.275 0 .531.15.662.394 1.632 3.05 1.25 2.1 2.288 4.281 0 0 .381-.731 2.288-4.281a.753.753 0 01.662-.394h2.175c.594-.006.95.65.631 1.15L18 21l3.756 5.844z" fill="currentColor"/><path opacity=".8" d="M28 7.619V8h-8V0h.381c.4 0 .782.156 1.063.438l6.119 6.125c.28.28.437.662.437 1.056z" fill="currentColor"/>',
viewBox:"0 0 32 32"},animationDuo:{icon:'<path opacity="0.2" d="M32 7.9C32 3.6 28.4 0 24.1 0c-4.3 0-7.9 3.5-7.9 7.8h.1c4.4 0 7.9 3.6 7.9 7.9v.1c4.3 0 7.8-3.5 7.8-7.9z" fill="currentColor"/><path opacity="0.4" d="M23.9 16c0-4.4-3.6-7.9-7.9-7.9-4.3 0-7.9 3.5-7.9 7.8h.1c4.4 0 7.9 3.6 7.9 7.9v.1c4.3 0 7.8-3.5 7.8-7.9z" fill="currentColor"/><path d="M7.9 32a7.9 7.9 0 100-15.8 7.9 7.9 0 000 15.8z" fill="currentColor"/>',viewBox:"0 0 32 32"},animationEffect:{icon:'<path d="M22,13v8a1,1,0,0,1-1,1H13a1,1,0,0,1-1-1V13a1,1,0,0,1,1-1h8A1,1,0,0,1,22,13ZM7,6A1,1,0,0,0,6,7v9a1,1,0,0,0,1,1h3V10.5a.5.5,0,0,1,.5-.5H17V7a1,1,0,0,0-1-1ZM3,13H4V4.5A.5.5,0,0,1,4.5,4H13V3a1,1,0,0,0-1-1H3A1,1,0,0,0,2,3v9A1,1,0,0,0,3,13Z" fill="currentColor"/>',
viewBox:"0 0 24 24"},addonDuo:{icon:'<path d="M8.026 12.2h.9c.8 0 1.6.6 1.7 1.4.1.4 0 .7-.2 1l-.1.2c-.1.2-.2.4-.2.6v.4c0 .6.5 1.2 1.1 1.2h4.9v4.8h-.5c-.1-.1-.3-.2-.5-.3-.5-.2-1-.3-1.5-.2-1.3.2-2.2 1.3-2.3 2.6v1c0 1.4 1 2.5 2.3 2.8.6.1 1.2 0 1.8-.3l.2-.1h.5v4.3h-12c-1.5 0-2.6-1.1-2.7-2.5v-12h4.2c.3 0 .7-.1.9-.4.2-.2.3-.5.4-.7v-.4c0-.2-.1-.4-.2-.6l-.2-.2c-.2-.3-.3-.8-.3-1.2.2-.8.8-1.3 1.6-1.4h.2z" fill="currentColor"/><path opacity=".8" d="M21.526 17.117c.02.083 0 0 0 .083v.5c-.4.6-.6 1.3-.5 2 .2 1.3 1.3 2.2 2.6 2.3h1.1c2.2.1 3.6-2.5 2.3-4.3v-.4c0-.1 0-.1.1-.2h4.8v11.8c0 1.4-1.1 2.6-2.6 2.7h-12.2v-4.2c0-.6-.5-1.2-1.1-1.2h-.4c-.2 0-.4.1-.6.2l-.1.1c-.3.2-.8.3-1.2.3-.8-.2-1.3-.8-1.4-1.6v-1c0-.8.6-1.6 1.4-1.7.4-.1.7 0 1 .2l.2.1c.2.1.4.2.6.2h.5c.7 0 1.2-.5 1.3-1.1V17h4.2" fill="currentColor"/><path opacity=".8" fill-rule="evenodd" clip-rule="evenodd" d="M14.226 0l.7 4.7c.1.6.7 1.1 1.3 1.1h.4c.2 0 .4-.1.6-.2l.1-.1c1-1.1 2.5-.5 2.8.8v.2l.1.8c.2.7-.3 1.5-1.1 1.8-.3.1-.7.1-1 0l-.2-.2c-.2-.1-.4-.1-.6-.1h-.5c-.6.1-1.1.6-1.1 1.3v.1l.6 4.1-4.7.7h-.1l-.1-.1v-.4c.3-.6.4-1.3.2-2-.4-1.2-1.6-2-2.9-1.9h-.1l-.8.1c-1.4.2-2.4 1.3-2.5 2.7 0 .6.2 1.2.6 1.7l.2.2.1.1v.4l-.1.1-4.2.6-1.9-11.8c-.2-1.4.8-2.7 2.1-3h.2l11.9-1.7z" fill="currentColor"/>',
viewBox:"0 0 32 32"},integrationsDuo:{icon:'<path d="M9.412 10.412a1 1 0 011-1h11.176a1 1 0 011 1v11.176a1 1 0 01-1 1H10.412a1 1 0 01-1-1V10.412z" fill="currentColor"/><path opacity=".8" d="M20.706 1a1 1 0 00-1-1H1a1 1 0 00-1 1v18.706a1 1 0 001 1h4.588a1 1 0 001-1V7.588a1 1 0 011-1h12.118a1 1 0 001-1V1zM26.412 11.294a1 1 0 00-1 1v12.118a1 1 0 01-1 1H12.294a1 1 0 00-1 1V31a1 1 0 001 1H31a1 1 0 001-1V12.294a1 1 0 00-1-1h-4.588z" fill="currentColor"/>',viewBox:"0 0 32 32"},languagesDuo:{icon:'<path d="M28.4 13h-12c-1.9 0-3.4 1.5-3.4 3.4V23l-3.1 2.2c-.2.2-.4.5-.4.8 0 .3.1.6.4.8L13 29c.2 1.7 1.7 2.9 3.4 2.9h12c1.9 0 3.4-1.5 3.4-3.4v-12c.1-2-1.5-3.5-3.4-3.5zm-4 13.2c-.2 0-.4-.1-.4-.3l-.4-1.3h-2.3l-.4 1.3c-.1.2-.2.3-.4.3-.4 0-.8-.2-.8-.5v-.1l1.9-6.3c.1-.3.5-.4.8-.4.4 0 .8.1.8.4l1.9 6.3v.1c.1.2-.4.5-.7.5z" fill="currentColor"/><path d="M21.5 23.5h1.8l-.9-3-.9 3z" fill="currentColor"/><path opacity=".8" d="M22.6 6.1c0-.3-.1-.6-.4-.8L19 3C18.8 1.3 17.3.1 15.6.1h-12C1.7.1.2 1.6.2 3.5v12.1c0 1.9 1.5 3.4 3.4 3.4h7.7v-2.4c0-1.3.4-2.4 1.2-3.3-1.1 0-2.1-.3-2.9-.9-.8.6-1.8.9-2.9.9-.3 0-.5-.2-.5-.5s.2-.5.5-.5c.7 0 1.5-.2 2.1-.6-.8-.8-1.2-1.8-1.3-3h-.8c-.3 0-.5-.2-.5-.5s.2-.5.5-.5h2.4V6.4c0-.3.2-.5.5-.5s.5.2.5.5v1.3h2.4c.3 0 .5.2.5.5s-.2.5-.5.5h-.7c-.1 1.1-.6 2.1-1.3 2.9.6.4 1.3.6 2.1.6.3 0 .5.2.5.5 1-.9 2.2-1.4 3.6-1.4h2.4V9l3.1-2.2c.2-.2.4-.4.4-.7z" fill="currentColor"/><path opacity=".8" d="M9.6 11c.6-.6 1-1.4 1.1-2.2H8.5c.1.8.5 1.6 1.1 2.2z" fill="currentColor"/>',
viewBox:"0 0 32 32"},layoutDesign1:{icon:'<rect width="50" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},layoutDesign2:{icon:'<rect width="24" height="20" rx="2" fill="currentColor"/><rect x="26" width="24" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},layoutDesign3:{icon:'<rect width="15.3" height="20" rx="2" fill="currentColor"/><rect x="17.3" width="15.3" height="20" rx="2" fill="currentColor"/><rect x="34.6001" width="15.3" height="20" rx="2" fill="currentColor"/>',
viewBox:"0 0 50 20"},layoutDesign4:{icon:'<rect x="0.899902" width="11" height="20" rx="2" fill="currentColor"/><rect x="13.8999" width="11" height="20" rx="2" fill="currentColor"/><rect x="26.8999" width="11" height="20" rx="2" fill="currentColor"/><rect x="39.8999" width="11" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},layoutDesign5:{icon:'<rect x="0.899902" width="19" height="20" rx="2" fill="currentColor"/><rect x="21.8999" width="29" height="20" rx="2" fill="currentColor"/>',
viewBox:"0 0 50 20"},layoutDesign6:{icon:'<rect width="11" height="20" rx="2" fill="currentColor"/><rect x="13" width="37" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},layoutDesign7:{icon:'<rect width="11.3" height="20" rx="2" fill="currentColor"/><rect x="13.3" width="23.4" height="20" rx="2" fill="currentColor"/><rect x="38.7" width="11.3" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},layoutDesign8:{icon:'<rect width="8" height="20" rx="2" fill="currentColor"/><rect x="10" width="22" height="20" rx="2" fill="currentColor"/><rect x="34" width="16" height="20" rx="2" fill="currentColor"/>',
viewBox:"0 0 50 20"},layoutDesign9:{icon:'<rect width="8" height="20" rx="2" fill="currentColor"/><rect x="10" width="40" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},layoutDesign10:{icon:'<rect width="8" height="20" rx="2" fill="currentColor"/><rect x="10" width="11" height="20" rx="2" fill="currentColor"/><rect x="23" width="27" height="20" rx="2" fill="currentColor"/>',viewBox:"0 0 50 20"},iconsDuo:{icon:'<path d="M24 16.97c-.057.675-.482.952-.963 1.229-1.899 1.044-3.769 2.09-5.668 3.104-.708.368-1.19.89-1.53 1.66a344.392 344.392 0 01-2.606 5.746c-.255.584-.454 1.291-1.219 1.291-.765 0-.963-.676-1.247-1.26-.935-1.998-1.87-3.995-2.748-6.024-.312-.676-.737-1.137-1.36-1.444-1.87-.984-3.684-1.998-5.554-3.012C.595 17.983 0 17.768 0 17.03c0-.737.567-1.014 1.077-1.29 1.842-1.014 3.683-2.028 5.553-3.012.68-.338 1.134-.83 1.446-1.567.878-2.029 1.813-4.026 2.748-6.024.255-.553.482-1.137 1.19-1.137.709 0 .935.584 1.19 1.137.397.86.907 1.69 1.162 2.612.992 3.535 3.287 5.594 6.404 6.823.822.338 1.615.83 2.408 1.29.425.216.794.523.822 1.107z" fill="currentColor"/><path opacity="0.4" d="M25.24 31.93a.489.489 0 01-.413-.292c-.088-.204-.205-.38-.264-.584-.383-1.575-1.382-2.51-2.94-2.918-.353-.087-.883-.204-.883-.671 0-.496.53-.555.883-.642 1.587-.438 2.587-1.4 2.999-3.035.088-.321.176-.759.617-.788.441 0 .559.438.647.759.382 1.663 1.44 2.655 3.087 3.064.324.087.765.175.794.613 0 .438-.44.554-.764.642-1.676.438-2.735 1.459-3.146 3.152-.118.32-.236.642-.618.7zM32 6.04c-.03.322-.235.468-.441.555-.353.175-.706.35-1.088.438-2 .496-3.117 1.78-3.646 3.706-.147.526-.265 1.284-.97 1.284-.735 0-.824-.817-.941-1.313-.5-2.13-1.97-3.21-3.94-3.794-.47-.146-1.176-.233-1.176-.904 0-.584.617-.73 1.058-.847 2.294-.583 3.646-2.013 4.205-4.29.088-.408.294-.875.852-.875.471 0 .647.409.736.788.529 2.422 2.087 3.823 4.44 4.436.352.175.823.32.911.817z" fill="currentColor"/>',
viewBox:"0 0 32 32"},popupsDuo:{icon:'<path opacity="0.4" d="M4 24h24v4a2 2 0 01-2 2H6a2 2 0 01-2-2v-4z" fill="currentColor"/><rect opacity="0.4" x="4" y="2" width="24" height="14.4" rx="2" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M2 9.778a2 2 0 00-2 2v8.19a2 2 0 002 2h12.06l2.16 2.496a.5.5 0 00.756 0l2.161-2.496H30a2 2 0 002-2v-8.19a2 2 0 00-2-2H2z" fill="currentColor"/>',viewBox:"0 0 32 32"},uppercaseDuo:{icon:'<path d="M13.393 23.63h-6.85l-1.329 5.009H0L7.668 4h4.6l7.77 24.639h-5.316l-1.329-5.01zm-5.725-4.192h4.6l-2.351-8.793-2.25 8.793z" fill="currentColor"/><path d="M28.013 25.572H23.82l-.818 3.067h-3.271l4.703-15.131h2.76L32 28.639h-3.272l-.715-3.067zm-3.476-2.556h2.862l-1.43-5.419-1.432 5.419z" fill="currentColor"/>',
viewBox:"0 0 32 32"},desktop:{icon:'<path d="M26.25 6h-20C5.56 6 5 6.56 5 7.25v12.5c0 .69.56 1.25 1.25 1.25h20c.69 0 1.25-.56 1.25-1.25V7.25c0-.69-.56-1.25-1.25-1.25z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6.25 6.8a.45.45 0 00-.45.45v12.5c0 .248.201.45.45.45h20a.45.45 0 00.45-.45V7.25a.45.45 0 00-.45-.45h-20zm-2.05.45A2.05 2.05 0 016.25 5.2h20a2.05 2.05 0 012.05 2.05v12.5a2.05 2.05 0 01-2.05 2.05h-20a2.05 2.05 0 01-2.05-2.05V7.25zM9.2 26a.8.8 0 01.8-.8h12.5a.8.8 0 010 1.6H10a.8.8 0 01-.8-.8z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5 20.2a.8.8 0 01.8.8v5a.8.8 0 01-1.6 0v-5a.8.8 0 01.8-.8zM20 20.2a.8.8 0 01.8.8v5a.8.8 0 01-1.6 0v-5a.8.8 0 01.8-.8z" fill="currentColor"/>',
viewBox:"0 0 32 32"},desktopLine:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M6.25 6.8a.45.45 0 00-.45.45v12.5c0 .248.201.45.45.45h20a.45.45 0 00.45-.45V7.25a.45.45 0 00-.45-.45h-20zm-2.05.45A2.05 2.05 0 016.25 5.2h20a2.05 2.05 0 012.05 2.05v12.5a2.05 2.05 0 01-2.05 2.05h-20a2.05 2.05 0 01-2.05-2.05V7.25zM9.2 26a.8.8 0 01.8-.8h12.5a.8.8 0 010 1.6H10a.8.8 0 01-.8-.8z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12.5 20.2a.8.8 0 01.8.8v5a.8.8 0 01-1.6 0v-5a.8.8 0 01.8-.8zM20 20.2a.8.8 0 01.8.8v5a.8.8 0 01-1.6 0v-5a.8.8 0 01.8-.8z" fill="currentColor"/>',
viewBox:"0 0 32 32"},laptop:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M28 19.818c0 1.51-.74 2.23-2.23 2.23H6.23c-1.48 0-2.23-.72-2.23-2.23V9.231C4 7.71 4.75 7 6.23 7h19.54C27.26 7 28 7.711 28 9.23v10.588zm-5.367 4.88c0 .448-.35.809-.789.809H10.127a.804.804 0 01-.8-.809c0-.448.361-.808.8-.808h11.717c.438 0 .79.36.79.808z" fill="currentColor"/>',viewBox:"0 0 32 32"},laptopLine:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.139 7.118c.527-.52 1.265-.718 2.092-.718H25.77c.83 0 1.57.198 2.096.72.527.522.734 1.262.734 2.11v10.588c0 .845-.207 1.584-.734 2.107-.525.523-1.264.724-2.096.724H6.23c-.828 0-1.566-.202-2.092-.723-.527-.522-.738-1.261-.738-2.108V9.231c0-.85.21-1.591.739-2.113zm.843.855c-.217.213-.382.588-.382 1.258v10.587c0 .664.164 1.04.382 1.255.22.217.597.376 1.249.376H25.77c.657 0 1.034-.16 1.25-.375.217-.215.38-.59.38-1.256V9.231c0-.672-.163-1.046-.379-1.26-.216-.213-.592-.371-1.252-.371H6.232c-.654 0-1.031.157-1.25.373z" fill="currentColor"/><path d="M21.844 25.507c.438 0 .79-.36.79-.809a.796.796 0 00-.79-.808H10.127a.804.804 0 00-.8.808c0 .448.361.809.8.809h11.717z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tabletLandscape:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.663 9.368v13.264c0 1.128.942 2.03 2.09 2.03h17.82c1.148 0 2.09-.902 2.09-2.03V9.368c0-1.128-.942-2.03-2.09-2.03H6.753c-1.148 0-2.09.902-2.09 2.03zm16.5.445a.55.55 0 10-1.1 0v12.1a.55.55 0 001.1 0v-12.1zm2.2 7.15a1.1 1.1 0 11-.001-2.2 1.1 1.1 0 010 2.2z" fill="currentColor"/>',viewBox:"0 0 32 32"},tabletLandscapeLine:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.663 22.632V9.368c0-1.128.942-2.03 2.09-2.03h17.82c1.148 0 2.09.902 2.09 2.03v13.264c0 1.128-.942 2.03-2.09 2.03H6.753c-1.148 0-2.09-.902-2.09-2.03zm1.965-14.05c-.488.057-.865.448-.865.921v12.994l.007.116c.061.458.477.812.983.812h17.82l.124-.007c.489-.058.866-.448.866-.921V9.503l-.008-.116c-.061-.458-.477-.812-.982-.812H6.753l-.125.007zm14.534 1.23a.55.55 0 10-1.1 0v12.1a.55.55 0 001.1 0v-12.1zm2.2 7.15a1.1 1.1 0 110-2.199 1.1 1.1 0 010 2.2z" fill="currentColor"/>',
viewBox:"0 0 32 32"},tablet:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M22.295 5H9.03C7.902 5 7 5.942 7 7.09v17.82C7 26.058 7.902 27 9.03 27h13.265c1.128 0 2.03-.942 2.03-2.09V7.09c0-1.148-.902-2.09-2.03-2.09zm-.445 16.5a.55.55 0 000-1.1H9.75a.55.55 0 000 1.1h12.1zm-7.15 2.2a1.1 1.1 0 112.2 0 1.1 1.1 0 01-2.2 0z" fill="currentColor"/>',viewBox:"0 0 32 32"},tabletLine:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M9.03 5h13.265c1.128 0 2.03.942 2.03 2.09v17.82c0 1.148-.902 2.09-2.03 2.09H9.03C7.902 27 7 26.058 7 24.91V7.09C7 5.942 7.902 5 9.03 5zm14.05 1.966c-.057-.489-.448-.866-.92-.866H9.166l-.117.008c-.457.06-.811.477-.811.982v17.82l.007.125c.057.488.448.865.92.865H22.16l.116-.008c.457-.06.812-.476.812-.982V7.09l-.008-.124zM21.85 21.5a.55.55 0 000-1.1H9.75a.55.55 0 000 1.1h12.1zm-7.15 2.2a1.1 1.1 0 112.2 0 1.1 1.1 0 01-2.2 0z" fill="currentColor"/>',
viewBox:"0 0 32 32"},mobile:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.19 6.212H11.084c-.973 0-1.685.853-1.685 1.829v15.592c0 .976.712 1.829 1.685 1.829H21.19c.973 0 1.684-.853 1.684-1.829V8.041c0-.976-.711-1.83-1.684-1.83zm-3.61 3.85a.481.481 0 000-.963h-2.887a.481.481 0 100 .963h2.888zm-2.405 11.55a.962.962 0 111.924 0 .962.962 0 01-1.924 0z" fill="currentColor"/>',viewBox:"0 0 32 32"},mobileLine:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M11.084 6.212H21.19c.973 0 1.684.853 1.684 1.829v15.592c0 .976-.711 1.829-1.684 1.829H11.084c-.973 0-1.685-.853-1.685-1.829V8.041c0-.976.712-1.83 1.685-1.83zm10.823 1.72c-.045-.428-.349-.758-.717-.758H11.084l-.09.007c-.356.053-.632.417-.632.86v15.592l.006.109c.044.427.348.757.716.757H21.19l.09-.006c.357-.054.632-.418.632-.86V8.041l-.005-.11zm-4.326 2.13a.481.481 0 100-.963h-2.888a.481.481 0 100 .963h2.888zm-2.406 11.55a.962.962 0 111.924 0 .962.962 0 01-1.924 0z" fill="currentColor"/>',
viewBox:"0 0 32 32"},mobileLandscape:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M6 10.21v10.106C6 21.289 6.853 22 7.829 22H23.42c.976 0 1.829-.712 1.829-1.684V10.209c0-.973-.853-1.684-1.829-1.684H7.83C6.853 8.525 6 9.236 6 10.209zm3.85 3.609a.481.481 0 10-.963 0v2.887a.481.481 0 10.963 0V13.82zm11.55 2.406a.962.962 0 110-1.924.962.962 0 010 1.924z" fill="currentColor"/>',viewBox:"0 0 32 32"},mobileLandscapeLine:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M6 20.316V10.209c0-.973.853-1.684 1.829-1.684H23.42c.976 0 1.829.711 1.829 1.684v10.107c0 .973-.853 1.684-1.829 1.684H7.83C6.853 22 6 21.288 6 20.316zM7.72 9.493c-.428.045-.758.349-.758.716v10.107l.007.09c.054.356.417.632.86.632H23.42l.109-.006c.427-.045.757-.349.757-.716V10.21l-.006-.091c-.054-.356-.418-.631-.86-.631H7.83l-.11.005zm2.13 4.326a.481.481 0 10-.963 0v2.887a.481.481 0 10.963 0V13.82zm11.55 2.406a.962.962 0 110-1.924.962.962 0 010 1.924z" fill="currentColor"/>',
viewBox:"0 0 32 32"},justifyStart:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 13C5.05228 13 5.5 12.5523 5.5 12L5.5 4C5.5 3.44772 5.05229 3 4.5 3C3.94772 3 3.5 3.44771 3.5 4L3.5 12C3.5 12.5523 3.94772 13 4.5 13ZM13 1C13.2761 1 13.5 0.776143 13.5 0.500001C13.5 0.223858 13.2761 9.53674e-07 13 9.53674e-07L1 0C0.723858 0 0.5 0.223858 0.5 0.5C0.5 0.776142 0.723858 1 1 1L13 1ZM10.5 8C10.5 8.55229 10.0523 9 9.5 9C8.94771 9 8.5 8.55228 8.5 8L8.5 4C8.5 3.44772 8.94772 3 9.5 3C10.0523 3 10.5 3.44772 10.5 4L10.5 8Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},justifyEnd:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 0a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0V1a1 1 0 0 1 1-1ZM13 12a.5.5 0 0 1 0 1H1a.5.5 0 0 1 0-1h12Zm-2.5-7a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0V5Z" fill="currentColor" fill-opacity="1"/>',viewBox:"0 0 14 13"},justifyCenter:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M.5.5A.5.5 0 0 1 1 0h12a.5.5 0 0 1 0 1H1A.5.5 0 0 1 .5.5Zm3 5.5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1ZM1 11a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1H1Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},justifySpaceAround:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 0a.5.5 0 0 1 0 1H.5a.5.5 0 1 1 0-1h13ZM4 5a1 1 0 0 1 0-2h6a1 1 0 1 1 0 2H4Zm0 5a1 1 0 1 1 0-2h6a1 1 0 1 1 0 2H4Zm10 2.5a.5.5 0 0 0-.5-.5H.5a.5.5 0 0 0 0 1h13a.5.5 0 0 0 .5-.5Z" fill="currentColor" fill-opacity="1"/>',viewBox:"0 0 14 13"},justifySpaceBetween:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5 0a.5.5 0 0 1 0 1H.5a.5.5 0 1 1 0-1h13ZM4 5a1 1 0 0 1 0-2h6a1 1 0 1 1 0 2H4Zm0 5a1 1 0 1 1 0-2h6a1 1 0 1 1 0 2H4Zm10 2.5a.5.5 0 0 0-.5-.5H.5a.5.5 0 0 0 0 1h13a.5.5 0 0 0 .5-.5Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},justifySpaceEvenly:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M.5.5C.5.22.72 0 1 0h12a.5.5 0 0 1 0 1H1A.5.5 0 0 1 .5.5Zm3 5.5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1ZM1 11a.5.5 0 0 0 0 1h12a.5.5 0 0 0 0-1H1Z" fill="currentColor" fill-opacity="1"/>',viewBox:"0 0 14 13"},alignStart:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 13a1 1 0 0 0 1-1V4a1 1 0 1 0-2 0v8a1 1 0 0 0 1 1ZM13 1a.5.5 0 0 0 0-1H1a.5.5 0 0 0 0 1h12Zm-2.5 7a1 1 0 1 1-2 0V4a1 1 0 0 1 2 0v4Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},alignEnd:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 0a1 1 0 0 1 1 1v8a1 1 0 1 1-2 0V1a1 1 0 0 1 1-1ZM13 12a.5.5 0 0 1 0 1H1a.5.5 0 0 1 0-1h12Zm-2.5-7a1 1 0 1 0-2 0v4a1 1 0 1 0 2 0V5Z" fill="currentColor" fill-opacity="1"/>',viewBox:"0 0 14 13"},alignCenter:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M4.5 11.5a1 1 0 0 1-1-1v-4H1a.5.5 0 0 1 0-1h2.5v-4a1 1 0 0 1 2 0v4h3v-2a1 1 0 1 1 2 0v2H13a.5.5 0 0 1 0 1h-2.5v2a1 1 0 1 1-2 0v-2h-3v4a1 1 0 0 1-1 1Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},alignStretch:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M.5 14a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5Zm10-8a1 1 0 1 0 0-2h-7a1 1 0 0 0 0 2h7Zm-1 4a1 1 0 1 0 0-2h-5a1 1 0 1 0 0 2h5Zm3.5 3.5a.5.5 0 0 0 1 0V.5a.5.5 0 0 0-1 0v13Z" fill="currentColor" fill-opacity="1"/>',viewBox:"0 0 14 13"},flexWrap:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M0 .5a.5.5 0 0 1 1 0v13a.5.5 0 0 1-1 0V.5ZM13.5 0a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0V.5a.5.5 0 0 0-.5-.5ZM7.36 3.03C9.7 3.03 11.5 4.22 11.5 6s-1.22 3.01-3.3 3.01H4.7l-1.11-.04.94.83.55.55c.07.07.1.15.1.25 0 .21-.14.36-.36.36a.4.4 0 0 1-.26-.11L2.62 8.93a.37.37 0 0 1-.12-.27c0-.1.04-.2.12-.27l1.94-1.93a.4.4 0 0 1 .26-.11c.22 0 .37.15.37.36 0 .1-.04.19-.1.25l-.56.55-.94.83 1.1-.04h3.56c1.62 0 2.52-.92 2.52-2.25s-1.29-2.3-3.41-2.3h-4.2a.35.35 0 0 1-.37-.36c0-.2.15-.36.37-.36h4.2Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},flexNoWrap:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M7.88 1a.5.5 0 0 1 .87.5L7.15 4.3C8.54 4.73 9.5 5.7 9.5 7c0 1.79-1.22 3.01-3.3 3.01H3.83l-.76 1.32.02.02c.06.07.1.15.1.25 0 .21-.15.36-.37.36-.03 0-.07 0-.1-.02L1.25 14.5a.5.5 0 1 1-.87-.5l1.58-2.74L.62 9.93a.37.37 0 0 1-.12-.27c0-.1.04-.2.12-.27l1.94-1.93a.4.4 0 0 1 .26-.11c.22 0 .37.15.37.36 0 .1-.04.19-.1.25l-.56.55-.94.83 1.1-.04h.4l2.63-4.54H1.16a.35.35 0 0 1-.37-.37c0-.2.15-.36.37-.36h4.2c.26 0 .51.01.75.04L7.88 1Zm-1.1 3.92L4.25 9.3h2c1.62 0 2.52-.92 2.52-2.25 0-1-.73-1.8-2-2.13Zm-4.1 5.1-1.1-.04.75.65.35-.6Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},flexWrapReverse:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M0 4.84c0 1.74 1.8 2.9 4.14 2.9h4.2c.22 0 .37-.16.37-.35 0-.2-.15-.35-.37-.35h-4.2C2.02 7.04.73 6.1.73 4.8c0-1.3.9-2.2 2.52-2.2H6.8l1.11-.03-.94.8-.55.54a.32.32 0 0 0-.1.25c0 .2.14.35.36.35a.4.4 0 0 0 .26-.11l1.94-1.88a.35.35 0 0 0 0-.53L6.94.1A.4.4 0 0 0 6.68 0c-.22 0-.37.15-.37.35 0 .1.04.18.1.25l.56.54.94.8-1.1-.04H3.3C1.21 1.9 0 3.1 0 4.84Zm11 3.32c0-1.74-1.8-2.9-4.14-2.9h-4.2c-.22 0-.37.16-.37.35 0 .2.15.35.37.35h4.2c2.12 0 3.41.94 3.41 2.24 0 1.3-.9 2.2-2.52 2.2H4.2l-1.11.03.94-.8.55-.54c.07-.06.1-.15.1-.25 0-.2-.14-.35-.36-.35a.4.4 0 0 0-.26.11l-1.94 1.88a.35.35 0 0 0 0 .53l1.94 1.88a.4.4 0 0 0 .26.11c.22 0 .37-.15.37-.35 0-.1-.04-.18-.1-.25l-.56-.54-.94-.8 1.1.04h3.5C9.79 11.1 11 9.9 11 8.16Z" fill="currentColor" fill-opacity="1"/>',
viewBox:"0 0 14 13"},dockLeft:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 0a.83.83 0 0 0-.83.83v8.34c0 .46.37.83.83.83h10c.46 0 .83-.37.83-.83V.83A.83.83 0 0 0 11.5 0h-10Zm9.17 1.67H4.83v6.66h5.84V1.67Z" fill="currentColor"/>',viewBox:"0 0 12 10"},dockRight:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M11.1647 0C11.6253 0 11.998 0.373077 11.998 0.833333V9.16667C11.998 9.62692 11.6253 10 11.1647 10H1.16471C0.704101 10 0.331379 9.62692 0.331379 9.16667V0.833333C0.331379 0.373077 0.704101 0 1.16471 0H11.1647ZM1.99805 1.66667H7.83138V8.33333H1.99805V1.66667Z" fill="currentColor"/>',
viewBox:"0 0 12 10"},dockFloat:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M3.5 0a1 1 0 0 0-1 1v5.5a1 1 0 0 0 1 1h7.17a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1H3.5ZM10 1.67H4.17v4.16H10V1.67ZM0 2.5h1.67V10H0V2.5Zm9.17 5.83V10h-7.5V8.33h7.5Z" fill="currentColor"/>',viewBox:"0 0 12 10"},giftBox:{icon:'<path fill-rule="evenodd" d="M5 5a3 3 0 015-2.236A3 3 0 0114.83 6H16a2 2 0 110 4h-5V9a1 1 0 10-2 0v1H4a2 2 0 110-4h1.17C5.06 5.687 5 5.35 5 5zm4 1V5a1 1 0 10-1 1h1zm3 0a1 1 0 10-1-1v1h1z" clip-rule="evenodd" />  <path d="M9 11H3v5a2 2 0 002 2h4v-7zM11 18h4a2 2 0 002-2v-5h-6v7z" />',
viewBox:"0 0 20 20"},premium:{icon:'<rect opacity="0.7" x="2.41504" y="10.5635" width="10.9714" height="2.4" fill="white" /> <path opacity="0.4" d="M8.07202 2.16406L13.2149 9.87834H2.75781L8.07202 2.16406Z" fill="white" /> <g filter="url(#filter0_d_5080_949)"> <path d="M13.8313 4.24902L5.08691 9.90613L13.348 9.91754L13.8313 4.24902Z" fill="#FDF1DF" /> </g> <g filter="url(#filter1_d_5080_949)"> <path d="M2 4.24902L10.7444 9.90613L2.48335 9.91754L2 4.24902Z" fill="#FFFAF4" /> </g> <defs> <filter id="filter0_d_5080_949" x="3.28691" y="0.649023" width="12.3441" height="9.26846" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" > <feFlood flood-opacity="0" result="BackgroundImageFix" /> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> <feOffset dy="-1.8" /> <feGaussianBlur stdDeviation="0.9" /> <feComposite in2="hardAlpha" operator="out" /> <feColorMatrix type="matrix" values="0 0 0 0 0.911683 0 0 0 0 0.680468 0 0 0 0 0.301132 0 0 0 0.1 0" /> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5080_949" /> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5080_949" result="shape" /> </filter> <filter id="filter1_d_5080_949" x="0.2" y="0.649023" width="12.3441" height="9.26846" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" > <feFlood flood-opacity="0" result="BackgroundImageFix" /> <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" /> <feOffset dy="-1.8" /> <feGaussianBlur stdDeviation="0.9" /> <feComposite in2="hardAlpha" operator="out" /> <feColorMatrix type="matrix" values="0 0 0 0 0.911683 0 0 0 0 0.680468 0 0 0 0 0.301132 0 0 0 0.1 0" /> <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_5080_949" /> <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_5080_949" result="shape" /> </filter> </defs>',
viewBox:"0 0 16 13"},bars:{icon:'<path d="M0.6 3.4V0.6H15.4V3.4H0.6ZM0.6 8.9V6.1H15.4V8.9H0.6ZM0.6 14.4V11.6H15.4V14.4H0.6Z" stroke="#676D98" stroke-width="1.2" stroke-linejoin="round" fill="none" />',viewBox:"0 0 16 15"},verticalBars:{icon:'<path d="M16.8748 3.1C16.8886 3.1 16.8998 3.11119 16.8998 3.125L16.8998 17.875C16.8998 17.8888 16.8886 17.9 16.8748 17.9L14.1248 17.9C14.1109 17.9 14.0998 17.8888 14.0998 17.875L14.0998 3.125C14.0998 3.11119 14.111 3.1 14.1248 3.1L16.8748 3.1ZM11.3743 3.1C11.3881 3.1 11.3993 3.11119 11.3993 3.125L11.3993 17.875C11.3993 17.8888 11.3881 17.9 11.3743 17.9H8.62427C8.61046 17.9 8.59927 17.8888 8.59927 17.875L8.59927 3.125C8.59927 3.11119 8.61046 3.1 8.62427 3.1L11.3743 3.1ZM5.875 3.1C5.88881 3.1 5.9 3.11119 5.9 3.125L5.9 17.875C5.9 17.8888 5.88881 17.9 5.875 17.9H3.125C3.11119 17.9 3.1 17.8888 3.1 17.875L3.1 3.125C3.1 3.11119 3.11119 3.1 3.125 3.1L5.875 3.1Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round" fill="none"/>',
viewBox:"0 0 20 20"},exit:{icon:'<path d="M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>',viewBox:"0 0 24 24"},settings:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M13.75 5.669V3.5a.5.5 0 0 0-1 0v2.198a2.188 2.188 0 0 0 0 4.229V16.5a.5.5 0 0 0 1 0V9.956a2.188 2.188 0 0 0 0-4.287Zm.75 2.144a1.188 1.188 0 1 0-2.375 0 1.188 1.188 0 0 0 2.375 0ZM7.125 3a.5.5 0 0 0-.5.5v6.573a2.188 2.188 0 0 0 0 4.229V16.5a.5.5 0 0 0 1 0v-2.169a2.188 2.188 0 0 0 0-4.287V3.5a.5.5 0 0 0-.5-.5Zm1.25 9.188a1.188 1.188 0 1 1-2.375 0 1.188 1.188 0 0 1 2.375 0Z" clip-rule="evenodd"/>',
viewBox:"0 0 20 20"},generate:{icon:'<path fill="currentColor" d="m297.06 130.97c7.26-21.79 4.76-45.66-6.85-65.48-17.46-30.4-52.56-46.04-86.84-38.68-15.25-17.18-37.16-26.95-60.13-26.81-35.04-.08-66.13 22.48-76.91 55.82-22.51 4.61-41.94 18.7-53.31 38.67-17.59 30.32-13.58 68.54 9.92 94.54-7.26 21.79-4.76 45.66 6.85 65.48 17.46 30.4 52.56 46.04 86.84 38.68 15.24 17.18 37.16 26.95 60.13 26.8 35.06.09 66.16-22.49 76.94-55.86 22.51-4.61 41.94-18.7 53.31-38.67 17.57-30.32 13.55-68.51-9.94-94.51zm-120.28 168.11c-14.03.02-27.62-4.89-38.39-13.88.49-.26 1.34-.73 1.89-1.07l63.72-36.8c3.26-1.85 5.26-5.32 5.24-9.07v-89.83l26.93 15.55c.29.14.48.42.52.74v74.39c-.04 33.08-26.83 59.9-59.91 59.97zm-128.84-55.03c-7.03-12.14-9.56-26.37-7.15-40.18.47.28 1.3.79 1.89 1.13l63.72 36.8c3.23 1.89 7.23 1.89 10.47 0l77.79-44.92v31.1c.02.32-.13.63-.38.83l-64.41 37.19c-28.69 16.52-65.33 6.7-81.92-21.95zm-16.77-139.09c7-12.16 18.05-21.46 31.21-26.29 0 .55-.03 1.52-.03 2.2v73.61c-.02 3.74 1.98 7.21 5.23 9.06l77.79 44.91-26.93 15.55c-.27.18-.61.21-.91.08l-64.42-37.22c-28.63-16.58-38.45-53.21-21.95-81.89zm221.26 51.49-77.79-44.92 26.93-15.54c.27-.18.61-.21.91-.08l64.42 37.19c28.68 16.57 38.51 53.26 21.94 81.94-7.01 12.14-18.05 21.44-31.2 26.28v-75.81c.03-3.74-1.96-7.2-5.2-9.06zm26.8-40.34c-.47-.29-1.3-.79-1.89-1.13l-63.72-36.8c-3.23-1.89-7.23-1.89-10.47 0l-77.79 44.92v-31.1c-.02-.32.13-.63.38-.83l64.41-37.16c28.69-16.55 65.37-6.7 81.91 22 6.99 12.12 9.52 26.31 7.15 40.1zm-168.51 55.43-26.94-15.55c-.29-.14-.48-.42-.52-.74v-74.39c.02-33.12 26.89-59.96 60.01-59.94 14.01 0 27.57 4.92 38.34 13.88-.49.26-1.33.73-1.89 1.07l-63.72 36.8c-3.26 1.85-5.26 5.31-5.24 9.06l-.04 89.79zm14.63-31.54 34.65-20.01 34.65 20v40.01l-34.65 20-34.65-20z"/>',
viewBox:"0 0 320 320"},update:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M1.333 0c.737 0 1.334.597 1.334 1.333v3.124A11.976 11.976 0 0 1 12 0c6.12 0 11.169 4.58 11.907 10.502a1.333 1.333 0 0 1-2.646.33C20.687 6.229 16.76 2.667 12 2.667a9.323 9.323 0 0 0-7.66 4H8a1.333 1.333 0 1 1 0 2.666H1.333A1.333 1.333 0 0 1 0 8V1.333C0 .597.597 0 1.333 0Zm-.082 12.01a1.333 1.333 0 0 1 1.488 1.158 9.335 9.335 0 0 0 16.922 4.165H16a1.333 1.333 0 1 1 0-2.666h6.667c.736 0 1.333.597 1.333 1.333v6.667a1.333 1.333 0 0 1-2.667 0v-3.124A11.976 11.976 0 0 1 12 24C5.88 24 .831 19.42.093 13.498A1.333 1.333 0 0 1 1.25 12.01Z" clip-rule="evenodd"/></svg>',
viewBox:"0 0 24 24"},recycle:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M13.025 5.378c0 .76.617 1.378 1.378 1.378h4.127a4.131 4.131 0 0 1 4.137 4.139v8.242h2.755v-8.242A6.887 6.887 0 0 0 18.53 4h-4.127c-.761 0-1.378.617-1.378 1.378Zm5.505 22.044c0-.76-.617-1.378-1.377-1.378h-4.128a4.142 4.142 0 0 1-4.136-4.133v-6.889H6.133v6.89c0 3.796 3.09 6.888 6.892 6.888h4.128c.76 0 1.377-.617 1.377-1.378Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M8.485 12.67a1.378 1.378 0 0 0-1.948 0l-4.133 4.134a1.378 1.378 0 0 0 1.948 1.949l3.16-3.041 3.158 3.04a1.378 1.378 0 0 0 1.949-1.948l-4.134-4.133ZM24.044 17.09l-3.159-3.042a1.378 1.378 0 1 0-1.948 1.949l4.133 4.133c.538.538 1.41.538 1.949 0l4.133-4.133a1.378 1.378 0 1 0-1.949-1.949l-3.159 3.041Z" clip-rule="evenodd"/>',
viewBox:"0 0 32 32"},variations:{icon:'<path d="M17.125 6.17L15.079.535c-.151-.416-.595-.637-.989-.492L.492 5.006c-.394.144-.593.597-.441 1.013l2.156 5.941V8.777c0-1.438 1.148-2.607 2.56-2.607H8.36l4.285-3.008 2.479 3.008h2.001zM19.238 8H4.767a.761.761 0 0 0-.762.777v9.42c.001.444.343.803.762.803h14.471c.42 0 .762-.359.762-.803v-9.42A.761.761 0 0 0 19.238 8zM18 17H6v-2l1.984-4.018 2.768 3.436 2.598-2.662 3.338-1.205L18 14v3z" fill="currentColor"/>',viewBox:"0 0 20 20"},arrowLeft:{icon:'<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.5 12h-15m0 0 6.75 6.75M4.5 12l6.75-6.75"/>',
viewBox:"0 0 24 24"},magicFill:{icon:'<path fill="currentColor" d="M9.45 4.459 3.19 10.81l-.187 1.783A.364.364 0 0 0 3.41 13l1.783-.188 6.259-6.351-2.003-2.002Zm3.237-.298-.938-.938a.746.746 0 0 0-1.064 0l-.876.876L11.811 6.1l.876-.876a.746.746 0 0 0 0-1.064ZM4 1l.81 2.19L7 4l-2.19.81L4 7l-.81-2.19L1 4l2.19-.81L4 1ZM12 8l1.08 2.92L16 12l-2.92 1.08L12 16l-1.08-2.92L8 12l2.92-1.08L12 8Z"/>',viewBox:"0 0 16 16"},insert:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M8.551 2.2a.55.55 0 1 0-1.1 0v6.55L5.597 7.266a.55.55 0 0 0-.687.86l2.748 2.198c.2.16.486.16.687 0l2.748-2.199a.55.55 0 0 0-.688-.859L8.551 8.75V2.2ZM3.055 9.894a.55.55 0 0 0-1.1 0v3.298c0 .303.246.55.55.55h10.992a.55.55 0 0 0 .55-.55V9.894a.55.55 0 1 0-1.1 0v2.748H3.055V9.894Z" clip-rule="evenodd"/>',
viewBox:"0 0 16 16"},accept:{icon:'<path fill="currentColor" d="M28.998 8.531l-2.134-2.134c-0.394-0.393-1.030-0.393-1.423 0l-12.795 12.795-6.086-6.13c-0.393-0.393-1.029-0.393-1.423 0l-2.134 2.134c-0.393 0.394-0.393 1.030 0 1.423l8.924 8.984c0.393 0.393 1.030 0.393 1.423 0l15.648-15.649c0.393-0.392 0.393-1.030 0-1.423z"></path>',viewBox:"0 -3 32 32"},chevronLeft:{icon:'<path d="M15.75 19.5 8.25 12l7.5-7.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" />',
viewBox:"0 0 24 24"},chevronRight:{icon:'<path d="m8.25 4.5 7.5 7.5-7.5 7.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" />',viewBox:"0 0 24 24"},command:{icon:'<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M11.5 4.5 15 8l-3.5 3.5m-7 0L1 8l3.5-3.5m5-2-3 11" fill="none"/>',viewBox:"0 0 16 16"},fixingIcon:{icon:'<path fill="#484f66" d="m66.582 45.818-4.506-1.536a18.64 18.64 0 0 0-1.317-6.665l3.583-3.135a1.17 1.17 0 0 0 .26-1.432 24.102 24.102 0 0 0-6.968-7.955 1.164 1.164 0 0 0-1.449.06l-3.582 3.134a18.263 18.263 0 0 0-6.431-2.192l-.921-4.661a1.16 1.16 0 0 0-1.112-.934c-3.638-.09-7.2.653-10.367 2.048a1.16 1.16 0 0 0-.673 1.287l.923 4.671a18.839 18.839 0 0 0-5.114 4.473l-4.496-1.538a1.15 1.15 0 0 0-1.362.496 23.957 23.957 0 0 0-3.419 10.008c-.06.544.267 1.052.785 1.225l4.506 1.537a18.642 18.642 0 0 0 1.317 6.664l-3.583 3.135a1.17 1.17 0 0 0-.26 1.432 24.1 24.1 0 0 0 6.969 7.955 1.164 1.164 0 0 0 1.448-.06l3.583-3.134a18.263 18.263 0 0 0 6.43 2.192l.923 4.67a1.16 1.16 0 0 0 1.112.935c3.639.09 7.2-.653 10.368-2.048.5-.218.778-.756.673-1.288l-.924-4.67a18.84 18.84 0 0 0 5.114-4.473l4.506 1.536a1.15 1.15 0 0 0 1.362-.496 23.96 23.96 0 0 0 3.418-10.008c.04-.55-.278-1.06-.796-1.233Zm-21.588 6.268c-4.186.828-8.268-1.907-9.096-6.094-.827-4.186 1.908-8.268 6.095-9.096 4.186-.827 8.268 1.908 9.096 6.094.827 4.187-1.908 8.269-6.095 9.096Z"/>',
viewBox:"0 0 87 89"},arrowPath:{icon:'<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16.023 9.348h4.992l-3.18-3.183a8.25 8.25 0 0 0-13.804 3.7m-1.046 9.779v-4.992m0 0h4.992m-4.992 0 3.18 3.183a8.25 8.25 0 0 0 13.803-3.7m1.047-9.78v4.99" fill="none"/>',viewBox:"0 0 24 24"},openBook:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M11.5 6.982c-4.268-3.644-9-1.146-9-1.146v10.57c5.012 0 7.863 1.712 9 2.594V6.982Z" clip-rule="evenodd"/><path fill="#7784A8" d="M21.5 16.407c-5.012 0-7.864 1.71-9 2.593V6.982c4.268-3.645 9-1.147 9-1.147v10.572Z" opacity=".6"/>',
viewBox:"0 0 24 24"},broom:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M20.0215 40.1489C31.0672 40.1489 40.0215 31.1946 40.0215 20.1489C40.0215 9.10323 31.0672 0.148926 20.0215 0.148926C8.97579 0.148926 0.0214844 9.10323 0.0214844 20.1489C0.0214844 31.1946 8.97579 40.1489 20.0215 40.1489ZM15.7985 18.1171H14.5373V16.8559H13.2761V18.1171H12.0149V19.3783H13.2761V20.6395H14.5373V19.3783H15.7985V18.1171ZM13.2761 23.1619H12.0149V21.9007H10.7537V23.1619H9.49247V24.4231H10.7537V25.6844H12.0149V24.4231H13.2761V23.1619ZM17.6903 20.0089H27.1494V19.3783C27.1494 19.0438 27.0166 18.723 26.78 18.4865C26.5435 18.25 26.2227 18.1171 25.8882 18.1171H23.3658V10.5498H21.474V18.1171H18.9516C18.6171 18.1171 18.2963 18.25 18.0597 18.4865C17.8232 18.723 17.6903 19.0438 17.6903 19.3783V20.0089ZM24.0046 27.5762H26.5188C27.2037 25.1604 27.1789 23.2247 27.1567 21.4976C27.1557 21.4214 27.1548 21.3456 27.1539 21.2701H17.6721C17.5838 23.4835 17.0534 25.5992 16.4291 27.5762H18.8431C19.2902 26.687 19.5822 25.3016 19.5822 24.4231C19.5822 24.2559 19.6486 24.0955 19.7669 23.9772C19.8851 23.859 20.0455 23.7925 20.2128 23.7925C20.38 23.7925 20.5404 23.859 20.6587 23.9772C20.7769 24.0955 20.8434 24.2559 20.8434 24.4231C20.8434 25.178 20.646 26.4745 20.221 27.5762H22.6267C23.0738 26.687 23.3658 25.3016 23.3658 24.4231C23.3658 24.2559 23.4322 24.0955 23.5505 23.9772C23.6688 23.859 23.8292 23.7925 23.9964 23.7925C24.1637 23.7925 24.3241 23.859 24.4423 23.9772C24.5606 24.0955 24.627 24.2559 24.627 24.4231C24.627 25.178 24.4296 26.4745 24.0046 27.5762Z" fill="currentColor"/>',
viewBox:"0 0 40 40"},wand:{icon:'<path fill="url(#a)" d="M18.407 11.781a.594.594 0 0 1-.594.594h-1.187v1.188a.594.594 0 0 1-1.188 0v-1.188h-1.187a.594.594 0 0 1 0-1.188h1.187V10a.594.594 0 1 1 1.188 0v1.188h1.187a.594.594 0 0 1 .594.593ZM4.157 5.844h1.187V7.03a.594.594 0 0 0 1.188 0V5.844h1.187a.594.594 0 0 0 0-1.188H6.532V3.47a.594.594 0 1 0-1.188 0v1.187H4.157a.594.594 0 0 0 0 1.188Zm9.5 8.906h-.594v-.594a.594.594 0 0 0-1.187 0v.594h-.594a.594.594 0 0 0 0 1.188h.594v.593a.594.594 0 1 0 1.187 0v-.593h.594a.594.594 0 0 0 0-1.188Zm2.62-8.313L5.938 16.777a1.188 1.188 0 0 1-1.679 0l-1.536-1.535a1.188 1.188 0 0 1 0-1.68l10.34-10.339a1.187 1.187 0 0 1 1.68 0l1.534 1.535a1.187 1.187 0 0 1 0 1.68Zm-.839-.839-1.536-1.535-2.374 2.375 1.535 1.535 2.375-2.375Z"/><defs><linearGradient id="a" x1="1.23" x2="23.351" y1="19.797" y2="13.966" gradientUnits="userSpaceOnUse"><stop stop-color="#FF9645"/><stop offset=".239" stop-color="#FF6471"/><stop offset=".465" stop-color="#CF6EBD"/><stop offset=".746" stop-color="#A477D1"/><stop offset="1" stop-color="#268DDA"/></linearGradient></defs>',
viewBox:"0 0 19 20"},editorHeading1:{icon:'<path fill="currentColor" d="M19.061 7v18h-3.408v-7.827H8.405V25H5.021V7h3.384v7.292h7.248V7h3.408ZM20.883 10.365V7h6.096v18h-3.552V10.365h-2.544Z"/>',viewBox:"0 0 32 32"},editorHeading2:{icon:'<path fill="currentColor" d="M15.847 7.374V25h-3.408v-7.664H5.19V25H1.807V7.374H5.19v7.14h7.248v-7.14h3.408ZM18.268 22.229c5.424-3.911 8.136-7.157 8.136-9.737 0-.782-.184-1.398-.552-1.847-.352-.45-.912-.674-1.68-.674-1.584 0-2.424 1.123-2.52 3.37h-3.288c.096-2.08.704-3.653 1.824-4.718C21.308 7.54 22.724 7 24.436 7c1.744 0 3.08.474 4.008 1.423.944.932 1.416 2.18 1.416 3.745 0 1.231-.352 2.471-1.056 3.72a15.037 15.037 0 0 1-2.64 3.42 21.308 21.308 0 0 1-3.384 2.671h7.416v2.871H18.268V22.23Z"/>',
viewBox:"0 0 32 32"},editorHeading3:{icon:'<path fill="currentColor" d="M15.749 7.657V24.83h-3.408v-7.468H5.093v7.468H1.709V7.657h3.384v6.957h7.248V7.657h3.408ZM24.506 7c1.152 0 2.136.203 2.952.608.832.406 1.456.965 1.872 1.678.432.714.648 1.509.648 2.384 0 1.103-.296 2.011-.888 2.725-.592.697-1.376 1.127-2.352 1.289v.121c2.368.714 3.552 2.125 3.552 4.233 0 1.476-.488 2.675-1.464 3.6-.976.908-2.352 1.362-4.128 1.362-1.888 0-3.392-.47-4.512-1.41-1.12-.958-1.744-2.393-1.872-4.306h3.312c.08.876.36 1.573.84 2.092.496.502 1.192.754 2.088.754.768 0 1.368-.211 1.8-.633.432-.438.648-1.005.648-1.702 0-.827-.312-1.46-.936-1.898-.624-.438-1.544-.656-2.76-.656h-.696v-2.798h.696c2.24.033 3.36-.754 3.36-2.36 0-.697-.2-1.24-.6-1.629-.4-.405-.944-.608-1.632-.608-.72 0-1.312.235-1.776.705-.464.454-.728 1.095-.792 1.922h-3.312c.096-1.751.656-3.097 1.68-4.038C21.258 7.478 22.682 7 24.506 7Z"/>',
viewBox:"0 0 32 32"},editorHeading4:{icon:'<path fill="currentColor" d="M14.813 7.202V25h-3.408v-7.74H4.157V25H.773V7.202h3.384v7.21h7.248v-7.21h3.408ZM17.283 21.42v-2.95L25.395 7h3.624v11.345h2.208v3.075h-2.208V25H25.61v-3.58h-8.328Zm8.592-10.26-5.136 7.184h5.136V11.16Z"/>',viewBox:"0 0 32 32"},editorHeading5:{icon:'<path fill="currentColor" d="M15.208 7.349v17.576H11.8v-7.643H4.552v7.643H1.168V7.35h3.384v7.12H11.8v-7.12h3.408ZM29.99 10.087h-8.04v4.432c.367-.449.871-.805 1.511-1.07a5.41 5.41 0 0 1 2.16-.424c1.168 0 2.136.265 2.904.797a4.537 4.537 0 0 1 1.728 2.09c.384.864.576 1.827.576 2.889 0 1.875-.512 3.377-1.536 4.506C28.285 24.436 26.837 25 24.95 25c-1.232 0-2.304-.224-3.216-.672-.912-.465-1.624-1.104-2.136-1.917-.512-.83-.792-1.793-.84-2.888h3.288c.128.747.424 1.344.888 1.792.464.432 1.08.648 1.848.648.928 0 1.616-.29 2.064-.872.464-.597.696-1.386.696-2.365 0-.93-.24-1.651-.72-2.166-.48-.514-1.16-.772-2.04-.772-.64 0-1.184.15-1.632.448a2.496 2.496 0 0 0-.984 1.146h-3.288V7H29.99v3.087Z"/>',
viewBox:"0 0 32 32"},editorHeading6:{icon:'<path fill="currentColor" d="M15.352 7.61v17.22h-3.408v-7.488H4.696v7.487H1.314V7.61h3.384v6.976h7.247V7.61h3.408ZM26.99 12.293c-.256-1.691-1.104-2.537-2.544-2.537-1.12 0-1.936.504-2.448 1.512-.512.992-.736 2.553-.672 4.683.256-.78.752-1.398 1.488-1.853.752-.472 1.624-.708 2.616-.708 1.632 0 2.912.504 3.84 1.512.944.992 1.416 2.407 1.416 4.244 0 1.139-.224 2.147-.672 3.025-.448.878-1.12 1.569-2.016 2.073-.88.504-1.952.756-3.216.756-2.464 0-4.16-.772-5.088-2.317-.928-1.561-1.392-3.707-1.392-6.44 0-3.137.496-5.462 1.488-6.975C20.798 7.756 22.422 7 24.662 7c1.712 0 3.024.496 3.936 1.488.912.992 1.432 2.26 1.56 3.805H26.99Zm-5.376 6.61c0 .91.256 1.666.768 2.268.528.585 1.296.878 2.304.878.864 0 1.552-.26 2.064-.78.512-.521.768-1.245.768-2.171 0-.976-.264-1.724-.792-2.244-.512-.52-1.208-.78-2.088-.78-.832 0-1.544.243-2.136.73-.592.489-.888 1.188-.888 2.098Z"/>',
viewBox:"0 0 32 32"},editorList:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M9.188 5.322c0-.48.388-.867.867-.867H29.13c.48 0 .868.388.868.867v1.734a.867.867 0 0 1-.868.867H10.055a.867.867 0 0 1-.867-.867V5.322ZM9.188 14.86c0-.479.388-.867.867-.867H29.13c.48 0 .868.388.868.867v1.735a.867.867 0 0 1-.868.867H10.055a.867.867 0 0 1-.867-.867V14.86ZM9.188 24.399c0-.48.388-.867.867-.867H29.13c.48 0 .868.388.868.867v1.734a.867.867 0 0 1-.868.867H10.055a.867.867 0 0 1-.867-.867v-1.734ZM2.445 6.189c0-.958.775-1.734 1.73-1.734h.009c.955 0 1.73.776 1.73 1.734s-.775 1.734-1.73 1.734h-.009c-.955 0-1.73-.776-1.73-1.734ZM2.445 15.727c0-.957.775-1.734 1.73-1.734h.009c.955 0 1.73.777 1.73 1.734 0 .958-.775 1.735-1.73 1.735h-.009c-.955 0-1.73-.777-1.73-1.735ZM2.445 25.266c0-.958.775-1.734 1.73-1.734h.009c.955 0 1.73.776 1.73 1.734S5.139 27 4.184 27h-.009c-.955 0-1.73-.776-1.73-1.734Z" clip-rule="evenodd"/>',
viewBox:"0 0 32 32"},editorOrderedList:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M8.54 5.343c0-.48.388-.868.868-.868H28.52c.48 0 .87.389.87.868v1.738c0 .48-.39.869-.87.869H9.408a.869.869 0 0 1-.869-.869V5.343ZM8.54 14.9c0-.48.388-.869.868-.869H28.52c.48 0 .87.39.87.869v1.738c0 .48-.39.868-.87.868H9.408a.869.869 0 0 1-.869-.868V14.9ZM8.54 24.457c0-.48.388-.87.868-.87H28.52c.48 0 .87.39.87.87v1.737c0 .48-.39.87-.87.87H9.408a.869.869 0 0 1-.869-.87v-1.737Z" clip-rule="evenodd"/><path fill="#6F7CA3" d="M4.501 8.819h-.98V5.038l-1.171.363v-.797l2.046-.733h.105v4.948ZM5.507 18.375H2.12v-.672L3.718 16c.22-.24.382-.45.486-.628a1 1 0 0 0 .16-.51c0-.219-.056-.39-.167-.515-.111-.127-.27-.19-.475-.19a.65.65 0 0 0-.526.23c-.127.152-.19.352-.19.601H2.02c0-.3.072-.575.214-.824a1.52 1.52 0 0 1 .611-.584 1.84 1.84 0 0 1 .893-.214c.509 0 .904.122 1.184.367.283.244.424.59.424 1.035 0 .244-.063.493-.19.746-.126.254-.344.55-.651.886l-1.124 1.185h2.125v.79ZM3.117 25.027h.522c.249 0 .433-.062.553-.187.12-.124.18-.29.18-.495 0-.2-.06-.354-.18-.465-.117-.111-.28-.166-.488-.166a.718.718 0 0 0-.472.156.489.489 0 0 0-.19.4h-.98c0-.258.068-.488.206-.692a1.4 1.4 0 0 1 .584-.482 1.96 1.96 0 0 1 .828-.173c.523 0 .932.125 1.228.377.297.248.445.592.445 1.031 0 .227-.069.435-.207.625-.138.19-.319.336-.543.438.278.099.485.248.621.448.138.199.207.434.207.705 0 .44-.16.791-.482 1.056-.319.264-.742.397-1.27.397-.492 0-.896-.13-1.21-.39-.313-.26-.469-.604-.469-1.032h.98a.57.57 0 0 0 .208.455c.14.117.312.176.516.176.233 0 .415-.061.546-.183a.641.641 0 0 0 .2-.492c0-.493-.271-.74-.814-.74h-.52v-.767Z"/>',
viewBox:"0 0 32 32"},editorBold:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M7 17.999V4h9a7 7 0 0 1 5.704 11.058A7 7 0 0 1 18 27.998h-7V28H7V17.999Zm4 6V18h5l.125-.001H18a3 3 0 0 1 0 6h-7Zm0-10V8h5a3 3 0 0 1 .082 5.999H11Z" clip-rule="evenodd"/>',viewBox:"0 0 32 32"},editorQuote:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M12.57 6.077c-5.02 3.224-7.81 6.976-8.367 11.258-.869 6.665 5.091 9.927 8.111 6.996 3.02-2.931 1.21-6.651-.977-7.668-2.186-1.017-3.524-.663-3.29-2.022.233-1.359 3.344-5.127 6.077-6.882a.5.5 0 0 0 .076-.68l-.676-.879c-.293-.381-.575-.367-.955-.123Zm13.217 0c-5.02 3.224-7.81 6.977-8.367 11.258-.869 6.665 5.091 9.927 8.111 6.996 3.02-2.931 1.21-6.651-.977-7.668-2.187-1.017-3.524-.663-3.29-2.022.233-1.359 3.344-5.127 6.077-6.882a.5.5 0 0 0 .076-.68L26.74 6.2c-.294-.381-.575-.367-.954-.123Z" clip-rule="evenodd"/>',
viewBox:"0 0 32 32"},editorItalic:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M11.988 3.987V2h-6v1.987h1.8l-1.613 8.025H4V14h6v-1.988H8.238l1.575-8.024h2.175Z" clip-rule="evenodd"/>',viewBox:"0 0 16 16"},editorUppercase:{icon:'<path fill="currentColor" d="M6.94 11.069H4.159L3.618 13H1.5l3.115-9.5h1.869L9.641 13H7.48l-.54-1.931ZM4.616 9.451h1.869l-.955-3.39-.914 3.39Z"/><path fill="#6F7CA3" d="M12.88 11.817h-1.703L10.845 13H9.516l1.91-5.834h1.122L14.5 13h-1.33l-.29-1.183Zm-1.412-.985h1.163l-.582-2.09-.58 2.09Z"/>',
viewBox:"0 0 16 16"},editorUnderline:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M2 12.275h12V14H2v-1.725ZM5.487 6.275c0 1.425 1.087 2.588 2.512 2.588a2.593 2.593 0 0 0 2.588-2.588V2h1.725v4.275a4.273 4.273 0 0 1-4.275 4.275 4.273 4.273 0 0 1-4.275-4.275V2h1.725v4.275Z" clip-rule="evenodd"/>',viewBox:"0 0 16 16"},editorTable:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M2.793 3.828A2.652 2.652 0 0 1 4.708 3h14.583c.718 0 1.407.298 1.915.828a2.89 2.89 0 0 1 .793 1.998v12.348a2.89 2.89 0 0 1-.793 1.998A2.652 2.652 0 0 1 19.29 21H4.708a2.652 2.652 0 0 1-1.915-.828A2.89 2.89 0 0 1 2 18.174V5.826c0-.75.285-1.468.793-1.998Zm.457 6.128v3.696h8.125V9.957H3.25Zm9.374 0v3.696h8.125V9.957h-8.124Zm8.125-1.304V5.826c0-.404-.153-.79-.427-1.076a1.428 1.428 0 0 0-1.031-.446H4.708c-.387 0-.757.16-1.03.446a1.556 1.556 0 0 0-.428 1.076v2.826h17.5Zm0 6.305h-8.124v4.738h6.666c.387 0 .758-.16 1.031-.445.274-.285.427-.672.427-1.076v-3.217Zm-9.374 4.738v-4.739H3.25v3.218c0 .404.154.79.427 1.076.274.285.644.446 1.031.446h6.667Z" clip-rule="evenodd"/>',
viewBox:"0 0 24 24"},editorLink:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M5.164 5.914a2.086 2.086 0 1 0 0 4.172h1.418a.75.75 0 0 1 0 1.5H5.164a3.586 3.586 0 1 1 0-7.172h1.418a.75.75 0 0 1 0 1.5H5.164Zm.312 1.783a.75.75 0 0 1 .75-.75h3.844a.75.75 0 0 1 0 1.5H6.226a.75.75 0 0 1-.75-.75ZM12.922 8a2.086 2.086 0 0 0-2.086-2.086H9.418a.75.75 0 1 1 0-1.5h1.418a3.586 3.586 0 0 1 0 7.172H9.418a.75.75 0 0 1 0-1.5h1.418A2.086 2.086 0 0 0 12.922 8Z" clip-rule="evenodd"/>',viewBox:"0 0 16 16"},
editorSourceCode:{icon:'<path fill="currentColor" d="M27.947 14.38 22.82 8.949a1.264 1.264 0 0 0-1.774-.056 1.264 1.264 0 0 0-.055 1.774l4.324 4.574-4.324 4.574a1.264 1.264 0 0 0 .055 1.774c.222.221.527.332.86.332.332 0 .665-.138.914-.388l5.128-5.433a1.276 1.276 0 0 0 0-1.718ZM17.378 4.895a1.151 1.151 0 0 1 2.245.513l-4.96 21.697a1.151 1.151 0 1 1-2.244-.513l4.96-21.697ZM10.955 8.892a1.308 1.308 0 0 0-.887-.332c-.332 0-.637.138-.859.388L4.053 14.38c-.443.471-.443 1.22 0 1.718l5.128 5.433c.222.25.555.388.915.388.333 0 .61-.11.86-.332a1.264 1.264 0 0 0 .055-1.774L6.687 15.24l4.324-4.574a1.264 1.264 0 0 0-.056-1.774Z"/>',
viewBox:"0 0 32 32"},editorExpand:{icon:'<path fill="currentColor" fill-rule="evenodd" d="M7.268 6.494 4.37 3.595h1.963a.548.548 0 1 0 0-1.095H3.048a.548.548 0 0 0-.548.548v3.285a.548.548 0 1 0 1.095 0V4.37l2.899 2.898a.548.548 0 1 0 .774-.774Zm-.774 2.738L3.595 12.13v-1.963a.548.548 0 1 0-1.095 0v3.285c0 .303.245.548.548.548h3.285a.548.548 0 0 0 0-1.095H4.37l2.898-2.899a.548.548 0 0 0-.774-.774Zm5.636 3.673-2.898-2.899a.548.548 0 0 1 .774-.774l2.899 2.898v-1.963a.548.548 0 1 1 1.095 0v3.285a.548.548 0 0 1-.548.548h-3.285a.548.548 0 1 1 0-1.095h1.963ZM9.232 7.268c.214.214.56.214.774 0l2.899-2.898v1.963a.548.548 0 1 0 1.095 0V3.048a.548.548 0 0 0-.548-.548h-3.285a.548.548 0 1 0 0 1.095h1.963L9.232 6.494a.548.548 0 0 0 0 .774Z" clip-rule="evenodd"/>',
viewBox:"0 0 16 16"},chevronDown:{icon:'<path d="M19.5 8.25L12 15.75L4.5 8.25" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>',viewBox:"0 0 24 24"},crossCircled:{icon:'<path fill="currentColor" d="M16.25 10a6.25 6.25 0 1 1-12.5 0 6.25 6.25 0 0 1 12.5 0Z"/><path fill="#fff" d="M12.521 7.478a.535.535 0 0 0-.756 0L10.003 9.24 8.24 7.478a.535.535 0 0 0-.757.757l1.762 1.762-1.762 1.761a.535.535 0 1 0 .757.757l1.762-1.762 1.762 1.762a.535.535 0 0 0 .756-.757L10.76 9.998l1.762-1.762a.535.535 0 0 0 0-.757Z"/>',
viewBox:"0 0 20 20"},ellipsisXAlt:{icon:'<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 5.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Zm9-2.25a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0ZM18 3a2.25 2.25 0 1 1-4.5 0A2.25 2.25 0 0 1 18 3Z" fill="currentColor"/>',viewBox:"0 0 18 6"},dragger:{icon:'<path d="M17.4708 8.75929C17.4708 9.73092 18.2608 10.5186 19.2354 10.5186C20.21 10.5186 21 9.73092 21 8.75929C21 7.78766 20.21 7 19.2354 7C18.2608 7 17.4708 7.78766 17.4708 8.75929Z" fill="currentColor"/><path d="M11 8.75929C11 9.73092 11.79 10.5186 12.7646 10.5186C13.7392 10.5186 14.5292 9.73092 14.5292 8.75929C14.5292 7.78766 13.7392 7 12.7646 7C11.79 7 11 7.78766 11 8.75929Z" fill="currentColor"/><path d="M19.2354 18.2595C18.2608 18.2595 17.4708 17.4718 17.4708 16.5002C17.4708 15.5285 18.2608 14.7409 19.2354 14.7409C20.21 14.7409 21 15.5285 21 16.5002C21 17.4718 20.21 18.2595 19.2354 18.2595Z" fill="currentColor"/><path d="M11 16.5C11 17.4716 11.79 18.2593 12.7646 18.2593C13.7392 18.2593 14.5292 17.4716 14.5292 16.5C14.5292 15.5284 13.7392 14.7407 12.7646 14.7407C11.79 14.7407 11 15.5284 11 16.5Z" fill="currentColor"/><path d="M19.2354 26C18.2608 26 17.4708 25.2123 17.4708 24.2407C17.4708 23.2691 18.2608 22.4814 19.2354 22.4814C20.21 22.4814 21 23.2691 21 24.2407C21 25.2123 20.21 26 19.2354 26Z" fill="currentColor"/><path d="M11 24.2407C11 25.2123 11.79 26 12.7646 26C13.7392 26 14.5292 25.2123 14.5292 24.2407C14.5292 23.2691 13.7392 22.4814 12.7646 22.4814C11.79 22.4814 11 23.2691 11 24.2407Z" fill="currentColor"/>',
viewBox:"0 0 32 32"},sync:{icon:'<path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"/>',
viewBox:"0 0 640 512"},unsync:{icon:'<path d="M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"/>',
viewBox:"0 0 640 512"}};const co=(so=function(e){return F.createElement("span",(0,ao.Z)({className:e.className},e.tabIndex&&{tabIndex:e.tabIndex},e.onClick&&{onClick:e.onClick}),F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:e.viewBox,dangerouslySetInnerHTML:{__html:e.icon}}))},function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;(0,J.Z)(this,r);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return e=o.call.apply(o,[this].concat(n)),(0,B.Z)((0,io.Z)(e),"parseIconClass",function(e){var t=e.trim().split(" ");return t.length>1&&(/fa[sbr]/i.test(t[0])||(t[0]="fas")),t.join(" ")}),(0,B.Z)((0,io.Z)(e),
"isAddonIcon",function(e){return/^addon::.+$/.test(e)}),(0,B.Z)((0,io.Z)(e),"renderAddonIcon",function(t){var n,o=t.split("::"),r=(0,j.Z)(o,2),a=(r[0],r[1]);if(a=/^jp_/.test(a)?a.replace(/^jp_/,""):a,void 0===(null===(n=addonsJSON)||void 0===n?void 0:n[a]))return null;var i="builder-icon";return e.props.size&&(i+=" builder-icon-"+e.props.size),e.props.className&&(i+=" "+e.props.className),F.createElement("span",{className:i,dangerouslySetInnerHTML:{__html:addonsJSON[a].icon}})}),e}return(0,G.Z)(r,
[{key:"render",value:function(){var e,t;if(this.props.isClassIcon)return F.createElement("span",{className:this.parseIconClass(this.props.name),"aria-hidden":!0});if(this.isAddonIcon(this.props.name))return this.renderAddonIcon(this.props.name);var n,o=lo.info;void 0===(null==lo?void 0:lo[this.props.name])?null!==(null===(n=this.props)||void 0===n?void 0:n.fallback)&&(o=lo[this.props.fallback]):o=lo[this.props.name];var r=Object.assign({tabIndex:"",icon:null===(e=o)||void 0===e?void 0:e.icon,viewBox:null===
(t=o)||void 0===t?void 0:t.viewBox,size:""},this.props),a="builder-icon";return this.props.size&&(a+=" builder-icon-"+this.props.size),this.props.className&&(a+=" "+this.props.className),r.className=a,F.createElement(so,r)}}]),r}(F.Component));var so;const uo=function(e){var t=e.code,n=e.category,o=e.title,r=e.content,a=e.onClose,i=(0,F.useState)(""),l=(0,j.Z)(i,2),c=l[0],s=l[1],d=function(){var e=(0,Ct.Z)(Nt().mark(function e(o){var r,i,l;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o.preventDefault(),
r=pagebuilder_base+"index.php?option=com_jpagebuilder&task=page.saveCode",e.next=4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({title:c,code:t,category:n})});case 4:return i=e.sent,e.next=7,i.json();case 7:(l=e.sent).status?(ne(l.data,"Success"),window.warningAtReload=!1,a()):oe(l.data,"Error");case 9:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();return F.createElement(F.Fragment,
null,F.createElement("div",{className:"builder-dialog-icon"},F.createElement(co,{name:"blocksDuo",className:"builder-text-primary builder-icon-large"})),F.createElement("div",{className:"builder-dialog-title"},o),F.createElement("div",{className:"builder-dialog-content"},r),F.createElement("div",{className:"builder-dialog-forms"},F.createElement("div",{className:"builder-form-group"},F.createElement("input",{type:"text",className:"builder-form-field",placeholder:r,onChange:function(e){return s(e.target.value)}}))),
F.createElement("div",{className:"builder-dialog-footer"},F.createElement("span",{className:"builder-button builder-button-primary",onClick:function(e){e.preventDefault(),a()},role:"button"},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")),F.createElement("span",{className:"builder-button builder-button-primary",onClick:d,role:"button"},Joomla.JText._("COM_JPAGEBUILDER_SAVE"))))},mo=function(e){var t=e.children,n=e.className,o=e.closeOnBackdrop,r=e.onClose;return(0,V.createPortal)(F.createElement(F.Fragment,
null,F.createElement("div",{className:"builder-dialog-backdrop",onClick:function(e){if(e.preventDefault(),!o)return!1;r()}}),F.createElement("div",{className:"builder-dialog".concat(n?" ".concat(n):"")},F.createElement("div",{className:"builder-dialog-body"},t))),document.body)};var po=new (function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),(e=o.call(this)).addon={},e.section={},e.dialog="",e.show=!1,e}return(0,G.Z)(r,[{key:"setAddon",value:function(e){this.addon=e,this.dispatchEvent()}},{key:"setSection",value:function(e){this.section=e,this.dispatchEvent()}},{key:"setDialog",value:function(e){this.dialog=
e,this.dispatchEvent()}},{key:"showDialog",value:function(){this.show=!0,this.dispatchEvent()}},{key:"hideDialog",value:function(){this.reset()}},{key:"reset",value:function(){this.addon={},this.section={},this.show=!1,this.dialog="",this.dispatchEvent()}},{key:"dispatchEvent",value:function(){this.emit("contextMenu")}}]),r}(Y.EventEmitter));const vo=Object.seal(po),fo=function(){var e=(0,F.useState)(!1),t=(0,j.Z)(e,2),n=t[0],o=t[1];(0,F.useEffect)(function(){return vo.on("contextMenu",a),function(){vo.removeListener("contextMenu",
a)}},[]);var r,a=function(){o(vo.show)};return n&&F.createElement(mo,{className:"builder-text-center"},F.createElement(uo,{code:(r=vo.dialog,"saveSection"===r?vo.section:vo.addon),onClose:function(){vo.reset(),o(!1)},title:function(e){return"saveAddon"===e?"Save Block":"saveSection"===e?"Save Row Section":""}(vo.dialog),content:function(e){return"saveAddon"===e?"Enter the name of the block":"saveSection"===e?"Enter the name of the row section":""}(vo.dialog),category:function(e){return"saveSection"===
e?"section":"addon"}(vo.dialog)}))};var bo={form:"",mainForm:{addonName:"",addonType:"",values:""},insideForm:{addonName:"",addonType:"addon",values:""},activeField:{fieldName:"",rfieldIndex:"",addonName:"",addonIndex:"",riFieldName:""}};const ho=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case "ADD_EDIT_ADDON_IN":return(0,Vt.ZP)(e,function(e){e.form="insideForm",e.insideForm.addonName=t.addonName,e.insideForm.values=
t.values,e.activeField.addonName=t.addonName,e.activeField.riFieldName=t.riFieldName,e.activeField.addonIndex=t.addonIndex});case "INIT_VALUE":return(0,Vt.ZP)(e,function(e){var n=t.addonName,o=t.addonType,r=t.values,a=t.addonData;e.mainForm={addonName:n,addonType:o,values:r,addonData:a},e.form="mainForm"});case "CANCEL_ADDON_IN_FORM":return(0,Vt.ZP)(e,function(e){e.form="mainForm"});case "ADD_EDIT_REPEAT_FIELD":return(0,Vt.ZP)(e,function(e){e.activeField.fieldName=t.fieldName,e.activeField.rfieldIndex=
t.rfieldIndex});default:return e}};var go=n(496);function Eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Eo(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
Eo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _o=(new Date).getTime(),wo=[],xo=go.Z.plugin({jpbForm:function(e,t){switch(t.type){case "INLINE_EDIT_ELM_CHANGE":var n=e.values.instFormId,o=t.payload,r=o.id,a=o.field,i=o.value,l=o.addonName;if(n!==r&&("accordion"==l||"tab"==l)){var c="";if("accordion"==l?c="jp_accordion_item":"tab"==l&&(c="jp_tab_item"),c){var s=K()(e.values[c]),d=Io(s,t);return(0,Vt.ZP)(e,function(e){e.values[c]=d})}return e}if("js_slideshow"==
l){var u="slideshow_items",m=K()(e.values[u]),p=Oo(m,t.payload);return(0,Vt.ZP)(e,function(e){e.values[u]=p})}if("button_group"===l){var v=t.payload.options.buttonGroupIndex;return yo(yo({},e),{},{values:yo(yo({},e.values),{},{jp_button_group_item:e.values.jp_button_group_item.map(function(e,t){return v!==t?e:yo(yo({},e),{},{title:i})})})})}var f=null==a?void 0:a.split("-");return f?f.length<3?(0,Vt.ZP)(e,function(e){e.values[a]=i}):(0,Vt.ZP)(e,function(e){e.values[f[0]][f[1]][f[2]]=i}):e;case "SAVE_ADDON_IN":case "UPDATE_ADDON_IN":case "REMOVE_ADDON_IN":case "SORT_ADDON_IN":var b=
t.fieldData,h=Co(b.fieldName),g=h.fieldName,E=h.fieldIndex,y=h.nestedFieldName;if(null!==g){var _=Co(b.riFieldName),w=(_.fieldName,_.fieldIndex),x=_.nestedFieldName,I=jQuery.extend(!0,{},e.values[g][E][y][w]),O=K()(t),C=jQuery.extend(!0,O.fieldData,{fieldName:g,rfieldIndex:w,riFieldName:x}),A=jQuery.extend(!0,O,{fieldData:C,riFieldName:x}),N=No(I,A);return(0,Vt.ZP)(e,function(e){e.values[g][E][y].splice(w,1,N)})}var D=jQuery.extend(!0,{},e.values[b.fieldName][b.rfieldIndex]),S=No(D,t);return(0,Vt.ZP)(e,
function(e){e.values[b.fieldName].splice(b.rfieldIndex,1,S)});case "ADD_DEEP_ADDON_NEW_ITEM":var P,k=t.payload,R=k.meta,T=k.item,L=k.addonName,M=k.addon.id,Z=R.key,j=Object.keys(Me).includes(L)?T:null===(P=addonsJSON)||void 0===P||null===(P=P[L])||void 0===P||null===(P=P.default)||void 0===P||null===(P=P[Z])||void 0===P?void 0:P[0];if(!j)return e;if("table_advanced"===L){var B=j.table_advanced_item.map(function(e){var t=e.content;return{content:[{collapse:!1,id:qe(),name:"text_block",reference_id:M,
settings:{text:t},visibility:!0}]}});j={table_advanced_item:B}}return(0,Vt.ZP)(e,function(e){var t;null===(t=e.values[Z])||void 0===t||t.push(j)});default:return e}}}),Io=function(e,t){return e.map(function(e){return e.content.map(function(e){return e.id===t.id&&(e.settings[t.field]=t.value),e}),e}),e},Oo=function(e,t){var n=t.field,o=t.options,r=t.value;if("title_content_title"===n)e[o.slidenumber].slideshow_inner_items[o.itemposition][n]=r;else{var a=n.split("-");e[a[0]][a[1]][a[2]][a[3]]=r}return e},
Co=function(e){var t=null,n=null,o=null,r=e.split(".");return r.length>1&&(t=r[0].replace(/ *\[[^)]*\] */g,""),o=Ao(r[0]),n=r[1]),{fieldName:t,fieldIndex:o,nestedFieldName:n}},Ao=function(e){var t=/\[([^)]+)\]/.exec(e);return null!==t&&t.length>0?t[t.length-1]:null},No=function(e,t){var n=t.fieldData;switch(t.type){case "SAVE_ADDON_IN":var o=e[n.riFieldName];if(null==o||""==o){var r=K()(wo);r.push({id:_o++,name:n.addonName,settings:t.formVal}),e[n.riFieldName]=r}else e[n.riFieldName].push({id:_o++,
name:n.addonName,settings:t.formVal});return e;case "UPDATE_ADDON_IN":return e[n.riFieldName][n.addonIndex].settings=t.formVal,e;case "REMOVE_ADDON_IN":return(0,Vt.ZP)(e,function(e){e[t.riFieldName].splice(t.addonIndex,1)});case "SORT_ADDON_IN":var a=t.dragIndex,i=t.dropIndex;return e[t.riFieldName][a],(0,Vt.ZP)(e,function(e){e[t.riFieldName]=rt(e[t.riFieldName],a,i)});default:return e}};const Do=xo;var So=n(2496);var Po=new (function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||
!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),(e=o.call(this)).show=!1,e.addon={},e.addonId=0,e.position={left:0,right:0,width:0,height:0},
e.addonType="addon",e.config={},e}return(0,G.Z)(r,[{key:"setType",value:function(e){this.addonType=e}},{key:"showEditor",value:function(){this.show=!0,this.dispatchEvent()}},{key:"hideEditor",value:function(){this.reset()}},{key:"setAddon",value:function(e){var t;this.addon=e,void 0!==(null==e||null===(t=e.settings)||void 0===t?void 0:t.addonId)&&this.setAddonId(e.settings.addonId)}},{key:"setConfig",value:function(e){this.config=e}},{key:"setAddonId",value:function(e){this.addonId=e}},{key:"setPosition",
value:function(e){this.position=e}},{key:"reset",value:function(){this.show=!1,this.addon={},this.addonType="addon",this.addonId=0,this.position={},this.config={},this.dispatchEvent()}},{key:"dispatchEvent",value:function(){this.emit("onEditor")}}]),r}(X()));Po.setMaxListeners(0);const ko=Object.seal(Po);var Ro=(0,F.createContext)({}),To=function(){return(0,F.useContext)(Ro)};const Lo=Ro;var Mo=function(e){var t=e.addonType,n=e.settings;return{type:"INIT_VALUE",addonName:e.addonName,addonType:t,values:n,
addonData:e.addonData}},Zo=function(e,t){return{type:"ADD_EDIT_REPEAT_FIELD",fieldName:e,rfieldIndex:t}},jo=function(e,t){if(""===t.addonIndex)var n="SAVE_ADDON_IN";else n="UPDATE_ADDON_IN";return{type:n,formVal:e,fieldData:t}},Bo=function(e,t,n,o){return{type:"ADD_EDIT_ADDON_IN",addonName:e,addonIndex:o,values:t,riFieldName:n}},Jo=function(e){return{type:"INLINE_EDIT_ELM_CHANGE",payload:e}},Go=n(3910),Ho=n(3382);const Uo=(0,Xn.$j)(function(e){return{state:e}})(function(e){var t,n=e.flOptions,o=e.state,
r=e.parentKey,a=(null===(t=o.form.jpbForm.values)||void 0===t||null===(t=t[r])||void 0===t?void 0:t[0])||{};return F.createElement("div",{className:"builder-form-group"},void 0!==n.attr&&F.createElement(yd,{fieldsList:n.attr,fieldsAttr:n.attr,values:a,parentKey:r,element:"".concat(r,"[0]")}))});var zo=n(4785),Fo="repeatItem";const Vo=function(e){var t=e.children,n=e.onClick;return F.createElement("div",{role:"presentation",className:"builder-portal-popover-wrapper"},F.createElement("div",{className:"builder-portal-popover-backdrop",
onClick:n}),t)};var Wo=function(e){var t=(0,F.useRef)();return(0,F.useEffect)(function(){t.current=e},[e]),t.current};function Ko(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ko(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ko(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Xo=function(e){var t,n=e.isOpen,o=e.triggerRef,r=e.arrow,a=void 0===r?"auto":r,i=e.gap,l=void 0===i?10:i,c=e.isDropdown,s=void 0!==c&&c,d=(0,F.useMemo)(function(){return o||{current:null}},[o,a]),u=(0,F.useRef)(null),m=Wo(null===(t=d.current)||void 0===t?void 0:t.getBoundingClientRect()),p=(0,F.useState)(0),v=(0,j.Z)(p,2),f=
v[0],b=v[1],h=(0,F.useState)({left:0,top:0,arrowPlacement:"bottom"}),g=(0,j.Z)(h,2),E=g[0],y=g[1];return(0,F.useEffect)(function(){var e=document.querySelector(".builder-modal-dialog-scrollable .builder-modal-body");var sectionsChild=e.querySelector(".builder-sections-library-list");var overflowUpdate="hidden";if(sectionsChild)overflowUpdate="auto";if(n&&e)return e.style.overflow=overflowUpdate,function(){e.style.overflow="auto"}},[n]),(0,F.useEffect)(function(){if(d.current){var e=d.current.getBoundingClientRect();
b(e.width)}},[d]),(0,F.useEffect)(function(){if(n&&d.current&&u.current){var e=d.current.getBoundingClientRect(),t=u.current.getBoundingClientRect(),o=m||{},r=o.left,i=o.top,c=t.width||e.width,p=t.height;if(0===E.top&&0===E.left||r!==e.left||i!==e.top){var v={top:0,left:0},b="bottom",h=window.innerHeight||document.documentElement.clientHeight,g=window.innerWidth||document.documentElement.clientWidth,_=p+l,w=c+l,x=h-p,I=function(){return"auto"===a&&g>e.left+c?Math.floor(e.left):"auto"===a&&e.left>
c?Math.floor(e.right-c):Math.floor(e.left-(c-f)/2)},O=function(){var t=Math.floor(e.top-p/2+e.height/2);if(t<l)return l;if(t+p+l>h){var n=t+p-h+l,o=Math.floor(t-n);return o<0?0:o}return t},C=function(t){var n=t.arrowPosition,o=Math.floor(e.left-c-l),r=Math.floor(e.right+l);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e<0)return 0;if(e+c>g){var t=e+c-g;return Math.floor(e-t)}return e}("left"===n?o:r)},A=function(t){var n=t.arrowPosition,o=Math.floor(e.top-p-l),
r=Math.floor(e.bottom+l);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e<0)return 0;if(e+p>h){var t=e+p-h,n=Math.floor(e-t);return n<0?0:n}return e}("top"===n?o:r)},N={top:{top:A({arrowPosition:"top"}),left:I()},bottom:{top:A({arrowPosition:"bottom"}),left:I()},left:{top:O(),left:C({arrowPosition:"left"})},right:{top:O(),left:C({arrowPosition:"right"})},middle:{top:x<0?0:x/2,left:Math.floor(e.left-c/2+e.width/2)}};"auto"!==a?(v={top:N.bottom,bottom:N.top,left:N.right,
right:N.left,middle:N.middle}[a],b=a):e.bottom+_>h&&e.top>_?(v=N.top,b="bottom"):w>e.left&&e.bottom+_>h&&!s?(v=N.right,b="left"):w<e.left&&e.bottom+_>h&&!s?(v=N.left,b="right"):e.bottom+_<=h?(v=N.bottom,b="top"):(v=N.middle,b="middle"),y(Yo(Yo({},v),{},{arrowPlacement:b}))}}},[d,u,m,f,n,l,a,s]),{position:E,triggerWidth:f,triggerRef:d,popoverRef:u}},qo=n(4448);const $o=function(e){var t=document.querySelector(".builder-modal-editor-panel .builder-modal-content"),n=(null==t?void 0:t.getBoundingClientRect().left)+
(null==t?void 0:t.getBoundingClientRect().width)/2,o=window.innerWidth/2,r=e.title,a=void 0===r?Joomla.JText._("COM_JPAGEBUILDER_POPOVER_TITLE"):r,i=e.parent_el,l=e.open,c=e.children,s=e.onHide,d=e.gap,u=void 0===d?32:d,m=e.arrow,p=void 0===m?n>o?"right":"left":m,v=e.disableBackdrop,f=void 0!==v&&v,b=e.footerContent,h=e.hideFooter,g=void 0!==h&&h,E=e.modalBodyCss,y=void 0===E?{}:E,_=e.portalPopoverCss,w=void 0===_?{}:_,x=Xo({isOpen:l,triggerRef:i,arrow:p,gap:u,footerContent:b}),I=x.position,O=x.popoverRef;
if(!l)return null;var C=function(){return F.createElement("div",{ref:O,style:{position:"absolute",left:I.left,top:I.top,zIndex:1051}},F.createElement("div",{className:"builder-modal-dialog builder-portal-popover",style:w},F.createElement("div",{className:"builder-modal-content"},F.createElement("div",{className:"builder-modal-header"},F.createElement("span",{className:"builder-modal-header-title builder-d-flex builder-align-items-left"},a),F.createElement("span",{className:"builder-close-button",
"aria-label":"Close",role:"button",onClick:function(){return s()}},F.createElement(co,{name:"times"}))),F.createElement("div",{className:"builder-modal-body",style:y},c),!g&&b&&F.createElement("div",{className:"builder-card-footer"},b))))};return(0,qo.createPortal)(f?C():F.createElement(Vo,{onClick:function(){return s()}},C()),document.body)};var Qo=n(2146),er=n(8239),tr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],
o="";if(arguments.length>3&&void 0!==arguments[3]&&!arguments[3])return o;var r=e.hex,a=e.rgb,i=e.hsl;return"hex"===t?o=r:"rgb"===t?o=n?"rgba(".concat(a.r,", ").concat(a.g,", ").concat(a.b,")"):"rgba(".concat(a.r,", ").concat(a.g,", ").concat(a.b,", ").concat(a.a,")"):"hsl"===t&&(o=n?"hsla(".concat(parseInt(i.h),", ").concat(parseInt(100*i.s),"%, ").concat(parseInt(100*i.l),"%)"):"hsla(".concat(parseInt(i.h),", ").concat(parseInt(100*i.s),"%, ").concat(parseInt(100*i.l),"%, ").concat(i.a,")")),o},
nr=n(7830),or=n(1150),rr=n(5697),ar=n.n(rr);function ir(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
ir(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cr=function(e){return F.createElement("div",{className:"builder-color-picker-pointer",style:lr({width:e.width+"px",height:e.height+"px",cursor:"pointer"},e.styles)})};cr.propTypes={width:ar().number,height:ar().number,styles:ar().object},cr.defaultProps={width:12,height:12,styles:{}};const sr=cr;var dr=n(6214),ur={pointer:{width:"12px",height:"12px",borderRadius:"50%",transform:"translate(-6px, -6px)",
border:"2px solid #FFFFFF",boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)"},hueSlider:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:"#FFFFFF",border:"2px solid #FFFFFF",boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)"},alphaSlider:{width:"12px",height:"12px",borderRadius:"50%",backgroundColor:"#FFFFFF",border:"2px solid #FFFFFF",boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)"},swatchSquare:{minWidth:16,minHeight:16,margin:"1px 2px",cursor:"pointer",boxShadow:"0 0 2px rgba(0,0,0, .6)"}},mr="".concat(pagebuilder_base,
"index.php?option=com_jpagebuilder&task=color.globalColors&_method=get");const pr=(0,nr.iS)(function(e){var t,n,o=e.hex,r=e.color,a=e.disableHue,i=e.disableAlpha,l=e.disableInputs,c=e.disableGlobalColors,s=void 0!==c&&c,d=e.onChange,u=e.onColorChange,m=(0,F.useRef)(!1),p=(0,F.useState)("hex"),v=(0,j.Z)(p,2),f=v[0],b=v[1],h=tr(e,f,i,m.current),g=(0,F.useState)(h),E=(0,j.Z)(g,2),y=E[0],_=E[1],w=(0,F.useState)([]),x=(0,j.Z)(w,2),I=x[0],O=x[1],C=(0,F.useState)(),A=(0,j.Z)(C,2),N=A[0],D=A[1];(0,F.useEffect)((0,Ct.Z)(Nt().mark(function e(){var t,
n,o;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!s){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,fetch(mr,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 4:return t=e.sent,e.next=7,t.json();case 7:(n=e.sent)&&(O(n.data),(o=n.data[0])&&D({label:o.name,value:o.id}));case 9:case "end":return e.stop()}},e)})),[]),(0,F.useEffect)(function(){_(h||r)},[f]),(0,F.useEffect)(function(){_(r)},[r]);var S=
function(e){if(!e)return u("");var t=fe()(e)?o:e;if("string"==typeof e&&"var"===e.slice(0,3).toLocaleLowerCase())u(e,{type:"var"});else if("string"==typeof e&&"rgba"===(null==e?void 0:e.slice(0,4).toLocaleLowerCase()))d(e,{type:"rgb"}),b("rgb");else{var n=e&&CSS.supports("color",t);m.current=n,d(e,{type:"rgb"===e.source?"rgb":f})}_(t)};return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-color-picker-window"},F.createElement("div",{className:"builder-color-picker-saturation"},
F.createElement(or.OQ,(0,ao.Z)({},e,{onChange:S,pointer:function(){return F.createElement(sr,{styles:ur.pointer})}}))),!a&&F.createElement("div",{className:"builder-color-picker-hue"},F.createElement(or.PS,{hsl:e.hsl,onChange:S,direction:"horizontal",pointer:function(){return F.createElement(sr,{styles:ur.hueSlider})}})),!i&&F.createElement("div",{className:"builder-color-picker-alpha"},F.createElement(or.xV,{hsl:e.hsl,rgb:e.rgb,onChange:function(e){"hex"===f&&b("rgb"),S(e)},direction:"horizontal",
pointer:function(){return F.createElement(sr,{styles:ur.alphaSlider})}}))),!l&&F.createElement("div",{className:"builder-color-picker-form-group builder-mt-3"},F.createElement(or.Vm,{value:"hex"===f?y:r,onChange:S,placeholder:"#000000"}),F.createElement("span",{className:"builder-close-button builder-close-button-sm",style:{position:"relative",top:"-23px",left:"calc(100% - 24px)"},onClick:function(){_(""),u("")},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"}))),!s&&I.length>
0?F.createElement("div",null,F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",isClearable:!1,value:N,options:I.map(function(e){return{label:e.name,value:e.id}}),onChange:function(e){return D(e)},menuPlacement:"auto",menuPosition:"fixed",components:{IndicatorSeparator:function(){return null}}}),F.createElement("div",{className:"builder-color-picker-presets builder-mt-3"},(null!==(t=null===(n=I.find(function(e){return e.id===(null==N?void 0:N.value)}))||void 0===
n?void 0:n.colors)&&void 0!==t?t:[]).map(function(e){return F.createElement("div",{onClick:function(){return S(e.value)},key:e.id,style:{backgroundColor:e.value}},F.createElement("span",{style:{opacity:1-(new dr.C(e.value)).getAlpha()}}))}))):null)}),vr=function(e){var t=e.color,n=e.onChange,o=e.colorList,r=void 0===o?[]:o,a=e.disableHue,i=void 0!==a&&a,l=e.disableAlpha,c=void 0!==l&&l,s=e.disableInputs,d=void 0!==s&&s,u=e.disableGlobalColors,m=void 0!==u&&u,p=function(e){var t=arguments.length>1&&
void 0!==arguments[1]?arguments[1]:{type:"hex",isValidColor:!1};if(fe()(e)){var o=e.rgb,r=t.type,a=tr(e,r);1===o.a&&(a=tr(e,"hex")),n(a)}else{if("var"===(null==t?void 0:t.type))return void n(e);n("")}};return F.createElement("div",{className:"builder-color-picker-wrapper"},F.createElement(pr,{color:t,colors:r,disableHue:i,disableAlpha:c,disableInputs:d,onChange:p,onColorChange:p,disableGlobalColors:m}))},fr=function(e){var t,n=e.input,o=n.value,r=n.onChange,a=n.name,i=e.params,l=(0,F.useState)(function(){var e=
fe()(o)?o:Object.assign({},{color:o}),t=Object.assign({},e);return t.type=t.type?t.type:"solid",t}()),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useRef)(null),m=(0,F.useRef)(null),p=(0,F.useRef)(null),v=(0,F.useState)(!1),f=(0,j.Z)(v,2),b=f[0],h=f[1],g=(0,F.useState)(!1),E=(0,j.Z)(g,2),y=E[0],_=E[1],w=(0,F.useState)(!1),x=(0,j.Z)(w,2),I=x[0],O=x[1],C=function(e){var t=Object.assign({},s);t.type=e,d(t),r(t)},A=function(e){var t=Object.assign({},s,{color:e});d(t),r(t)},N=[{value:"top center",label:"Top Center"},
{value:"top left",label:"Top Left"},{value:"top right",label:"Top Right"},{value:"center center",label:"Center Center"},{value:"center left",label:"Center Left"},{value:"center right",label:"Center Right"},{value:"bottom center",label:"Bottom Center"},{value:"bottom left",label:"Bottom Left"},{value:"bottom right",label:"Bottom Right"}],D=s,S="solid"==D.type?D.color?D.color:"":"#B3B6CB",P="linear"==D.type?"linear-gradient(".concat(D.deg||0,"deg, ").concat(D.color?D.color:"#398AF1"," ").concat(D.pos||
0,"%, ").concat(D.color2?D.color2:"#5EDCED"," ").concat(D.pos2||100,"%)"):"linear-gradient(144.46deg, #C9CBDC 18.4%, rgba(124, 131, 182, 0.97) 82.64%)",k="radial"==D.type?"radial-gradient(at ".concat(D.radialPos||"center center",", ").concat(D.color?D.color:"#398AF1"," ").concat(D.pos||0,"%, ").concat(D.color2?D.color2:"#5EDCED"," ").concat(D.pos2||100,"%)"):"radial-gradient(at center center, #4D5387 0%, #E6E7F1 100%)";return t="radial"==D.type?k:P,F.createElement("div",{className:"builder-form-group",
"data-field":a},i.title&&!i.hideTitle&&F.createElement("label",null,void 0!==i.desc&&""!=i.desc?F.createElement(er.Z,{content:i.desc,tagName:"span"},i.title):i.title),F.createElement("div",{className:"builder-form-color builder-d-flex builder-align-items-center builder-justify-content-between builder-px-2"},F.createElement("label",{className:"builder-mb-0"},{solid:"Solid",linear:"Linear",radial:"Radial"}[D.type]),F.createElement("div",{className:"builder-color-container"},F.createElement("div",{ref:u,
className:"builder-color-picker",style:{background:"".concat(D.color||D.color2?"solid"===D.type?S:t:"")},onClick:function(){return h(!b)}}),s.color&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),function(){var e=Object.assign({},s,{color:"",color2:""});d(e),r(e)}()},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"})))),F.createElement($o,{title:i.title,open:b,parent_el:u,modalBodyCss:{padding:0},onHide:function(){return h(!1)},
gap:34},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement("div",{className:"builder-color-selectors builder-mb-3"},F.createElement(er.Z,{content:"Color",tagName:"span"},F.createElement("div",{className:"builder-color-selector".concat("solid"==D.type?" active":""),style:{backgroundColor:"".concat(S)},onClick:function(e){e.preventDefault(),C("solid")},role:"button","area-hidden":"true"})),
F.createElement(er.Z,{content:"Linear Gradient",tagName:"span"},F.createElement("div",{className:"builder-color-selector".concat("linear"==D.type?" active":""),style:{backgroundImage:"".concat(P)},onClick:function(e){e.preventDefault(),C("linear")},role:"button","area-hidden":"true"})),F.createElement(er.Z,{content:"Radial Gradient",tagName:"span"},F.createElement("div",{className:"builder-color-selector".concat("radial"==D.type?" active":""),style:{backgroundImage:"".concat(k)},onClick:function(e){e.preventDefault(),
C("radial")},role:"button","area-hidden":"true"}))),"solid"==D.type&&F.createElement("div",{className:"builder-form-color builder-form-color-inline"},F.createElement("div",{className:"builder-color-popover"},F.createElement(vr,{color:D.color,onChange:A}))),"solid"!=D.type&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-gradient-container builder-mb-3"},F.createElement("div",{className:"builder-gradient-body",style:{backgroundImage:"".concat(t)}})),F.createElement("div",
{className:"builder-d-flex builder-justify-content-between builder-mb-3"},F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-gutter-15"},F.createElement("div",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_COLOR")," 1"),F.createElement("div",null,F.createElement("div",{className:"builder-form-color"},F.createElement("div",{className:"builder-color-container"},F.createElement("div",{ref:m,className:"builder-color-picker",onClick:function(){return _(!y)},
style:{backgroundColor:"".concat((null==D?void 0:D.color)||"")}}),D.color&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),function(){var e=Object.assign({},s,{color:""});d(e),r(e)}()},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"}))),F.createElement($o,{title:i.title,open:y,parent_el:m,modalBodyCss:{padding:0},onHide:function(){return _(!1)},gap:10},F.createElement("div",{className:"builder-card builder-card-popover"},
F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:D.color,onChange:A}))))))),F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-gutter-15"},F.createElement("div",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_COLOR")," 2"),F.createElement("div",null,F.createElement("div",{className:"builder-form-color"},F.createElement("div",{className:"builder-color-container"},F.createElement("div",{ref:p,
className:"builder-color-picker",onClick:function(){return O(!I)},style:{backgroundColor:"".concat((null==D?void 0:D.color2)||"")}}),D.color2&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),function(){var e=Object.assign({},s,{color2:""});d(e),r(e)}()},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"}))),F.createElement($o,{title:"".concat(Joomla.JText._("COM_JPAGEBUILDER_COLOR")," 2"),open:I,parent_el:p,
modalBodyCss:{padding:0},onHide:function(){return O(!1)},gap:10},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:(null==D?void 0:D.color2)||"",onChange:function(e){var t=Object.assign({},s,{color2:e});d(t),r(t)}})))))))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-3"},F.createElement("span",
{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_START"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",onChange:function(e){var t=Object.assign({},s,{pos:e.target.value});d(t),r(t)},value:D.pos||0})),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",className:"builder-form-field builder-form-field-sm",onChange:function(e){var t=
Object.assign({},s,{pos:e.target.value});d(t),r(t)},value:D.pos||0}),F.createElement("span",{className:"builder-field-info"},"%")))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-3"},F.createElement("span",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_END"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",onChange:function(e){var t=
Object.assign({},s,{pos2:e.target.value});d(t),r(t)},value:D.pos2||100})),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",className:"builder-form-field builder-form-field-sm",onChange:function(e){var t=Object.assign({},s,{pos2:e.target.value});d(t),r(t)},value:D.pos2||100}),F.createElement("span",{className:"builder-field-info"},"%")))),"radial"!=D.type&&F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},
F.createElement("div",{className:"builder-column-3"},F.createElement("span",{className:"builder-form-label"},"Angle")),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",max:"360",className:"builder-form-range",onChange:function(e){var t=Object.assign({},s,{deg:e.target.value});d(t),r(t)},value:D.deg||0})),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",max:"360",
className:"builder-form-field builder-form-field-sm",onChange:function(e){var t=Object.assign({},s,{deg:e.target.value});d(t),r(t)},value:D.deg||0}),F.createElement("span",{className:"builder-field-info"},"deg")))),"radial"==D.type&&F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-6"},F.createElement("span",{className:"builder-form-label"},"Angle")),F.createElement("div",{className:"builder-column-6"},F.createElement(Qo.ZP,
{className:"builder-select-container",classNamePrefix:"builder-select",isClearable:!1,value:N.length&&N.find(function(e){return e.value===(null==D?void 0:D.radialPos)}),options:N,onChange:function(e){var t=Object.assign({},s,{radialPos:e.value});d(t),r(t)},menuPlacement:"auto",menuPosition:"fixed",components:{IndicatorSeparator:function(){return null}}}))))))))};var br=n(4486),hr=n.n(br);function gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&
(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Er(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const yr=function(e){var t=e.input,
n=e.params,o=e.responsiveDevice,r=(0,F.useState)([]),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=t.onChange,s=t.value;return(0,F.useEffect)(function(){var e=[];hr()(n.values,function(t,n){e.push({value:n,label:t})}),l(e)},[n.values]),F.createElement("div",{"data-field":null==t?void 0:t.name,className:"builder-form-group builder-form-inline".concat(null!=n.class?" "+n.class:"")},F.createElement("label",null,void 0!==n.desc&&""!=n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",
{className:"builder-nav-tabs builder-tab-button-group"},i.map(function(e,r){return F.createElement("span",{key:r,className:"builder-nav-item".concat(e.value==(fe()(null==t?void 0:t.value)?null==t?void 0:t.value[o]:null==t?void 0:t.value)?" active":""),onClick:function(t){return function(e,t){if(e.preventDefault(),null!=n&&n.responsive){var r={};fe()(s)?r=Er(Er({},s),{},(0,B.Z)({},o,t)):(r=Ye())[o]=t,c(r)}else c(t)}(t,e.value)},role:"button"},fe()(e.label)?F.createElement(F.Fragment,null,null!=e.label.icon&&
""!=e.label.icon&&F.createElement("span",{className:"builder-icon".concat(null!=e.label.label&&""!=e.label.label?" builder-me-2":""),dangerouslySetInnerHTML:{__html:e.label.icon}}),null!=e.label.label&&""!=e.label.label&&F.createElement("span",null,e.label.label)):e.label)})))};var _r=new (function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),(e=o.call(this)).show=!1,e.addon={},e.type="addon",e.rowIndex=0,e.rowSettings={},e.colIndex=0,e.colSettings={},e.activePanel="",e.innerRowIndex="",e.innerColIndex="",e}return(0,G.Z)(r,[{key:"showEditPanel",value:function(){this.show=!0,this.emit("change")}},{key:"hideEditPanel",
value:function(){this.show=!1,this.emit("change")}},{key:"setType",value:function(e){this.type=e,this.emit("change")}},{key:"setAddon",value:function(e){if(void 0!==this.addon.settings&&this.addon.settings.addonId!=this.addon.settings.addonId&&(window.toolsTabIndex=0),!pe()(e)){var t=addonsJSON[e.settings.addonName];e.title=t.title,e.icon=t.icon}this.addon=e,this.emit("change")}},{key:"setRowIndex",value:function(e){this.rowIndex=e,this.emit("change")}},{key:"setColIndex",value:function(e){this.colIndex=
e,this.emit("change")}},{key:"setInnerColIndex",value:function(e){this.innerColIndex=e,this.emit("change")}},{key:"setInnerRowIndex",value:function(e){this.innerRowIndex=e,this.emit("change")}},{key:"setRowSettings",value:function(e){this.rowSettings=e,this.emit("change")}},{key:"setColSettings",value:function(e){this.colSettings=e,this.emit("change")}},{key:"resetAll",value:function(){this.show=!1,this.addon={},this.type="addon",this.rowIndex=0,this.rowSettings={},this.emit("change")}}]),r}(X()));
_r.setMaxListeners(0);const wr=Object.seal(_r);const xr=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,
e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).handleNewItemAddition=t.handleNewItemAddition.bind((0,io.Z)(t)),t}return(0,G.Z)(r,[{key:"handleNewItemAddition",value:function(){this.props.params,wr.resetAll(),wr.setAddon(ko.addon),wr.setType(ko.addonType),wr.showEditPanel(),ko.hideEditor()}},{key:"render",value:function(){var e,t=this.props,n=(t.input.value,t.params);return F.createElement("div",{"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name,className:"builder-form-group builder-form-inline".concat(null!=
n.column?" builder-column-"+n.column:"")},n.title&&!(null!=n&&n.inline)&&F.createElement("label",null,void 0!==n.desc&&""!=n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",{className:"builder-form-advanced-settings",onClick:this.handleNewItemAddition},F.createElement("span",{className:"builder-button builder-button-".concat(n.button||"primary"),role:"button"},F.createElement(co,{name:null!=n.buttonIcon?n.buttonIcon:"cog",className:"builder-me-1",
"area-hidden":"true"})," ",null!=n.buttonText?n.buttonText:"Settings")))}}]),r}(F.Component);var Ir=n(251),Or=n.n(Ir),Cr=n(6073),Ar=n.n(Cr);const Nr=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;
e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){return(0,J.Z)(this,r),o.apply(this,arguments)}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){this.setState({elementValue:this.props.elmValue})}},{key:"render",value:function(){var e;return e=""==this.props.elmValue?"":this.props.elmValue,F.createElement("div",{className:"builder-column-3"},F.createElement("input",{type:"text",className:"builder-form-field builder-form-field-sm builder-form-field-text",
autoComplete:"off",placeholder:this.props.direction,"data-direction":this.props.direction,"data-device":this.props.device,onChange:this.props.itemChangeHandle,value:e}))}}]),r}(F.Component);var Dr=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,
o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;(0,J.Z)(this,r);var n={top:"",right:"",bottom:"",left:""};(t=o.call(this,e)).props.params.responsive&&(n={xl:{top:"",right:"",bottom:"",left:""},lg:{top:"",right:"",bottom:"",left:""},md:{top:"",right:"",bottom:"",left:""},sm:{top:"",right:"",bottom:"",left:""},xs:{top:"",right:"",bottom:"",left:""}});var a=!1;return t.props.params.responsive&&
(a={xl:!1,lg:!1,md:!1,sm:!1,xs:!1}),t.state={dirObject:n,locked:a},t.onChangeHandle=t.onChangeHandle.bind((0,io.Z)(t)),t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.input,t=this.getObjectFromStringValue(e.value);this.setState({dirObject:t,locked:this.checkLock(e.value)})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.getObjectFromStringValue(e.input.value);Or()(t,this.state.dirObject)||this.setState({dirObject:t,locked:this.checkLock(e.input.value)})}},
{key:"checkLock",value:function(e){var t;if(this.props.params.responsive&&fe()(e))t={xl:!1,lg:!1,md:!1,sm:!1,xs:!1},Ar()(e,function(e,n){var o="string"==typeof e&&e.length>0?e.split(" "):Array.from("    ");o[0]==o[1]&&o[1]==o[2]&&o[2]==o[3]&&(t[n]=!0)});else if(this.props.params.responsive&&!fe()(e))t={xl:!1,lg:!1,md:!1,sm:!0,xs:!0},(n=(e+"").split(" "))[0]==n[1]&&n[1]==n[2]&&n[2]==n[3]&&(t.md=!0);else{var n;t=!1,(n=(e+"").split(" "))[0]==n[1]&&n[1]==n[2]&&n[2]==n[3]&&(t=!0)}return t}},{key:"getObjectFromStringValue",
value:function(e){var t=this.props.params,n={};if(t.responsive&&fe()(e))Ar()(e,function(e,t){var o="string"==typeof e&&e.length>0?e.split(" "):Array.from("    ");(e={top:"",right:"",bottom:"",left:""}).top=o[0],void 0!==o[1]&&(e.right=o[1]),void 0!==o[2]&&(e.bottom=o[2]),void 0!==o[3]&&(e.left=o[3]),n[t]=e});else if(t.responsive&&!fe()(e)){n={xl:{top:"",right:"",bottom:"",left:""},lg:{top:"",right:"",bottom:"",left:""},md:{top:"",right:"",bottom:"",left:""},sm:{top:"",right:"",bottom:"",left:""},
xs:{top:"",right:"",bottom:"",left:""}};var o=(e+"").split(" ");n[window.builderDefaultDevice].top=o[0],void 0!==o[1]&&(n[window.builderDefaultDevice].right=o[1]),void 0!==o[2]&&(n[window.builderDefaultDevice].bottom=o[2]),void 0!==o[3]&&(n[window.builderDefaultDevice].left=o[3])}else{var r=(e+"").split(" ");(n={top:"",right:"",bottom:"",left:""}).top=r[0],void 0!==r[1]&&(n.right=r[1]),void 0!==r[2]&&(n.bottom=r[2]),void 0!==r[3]&&(n.left=r[3])}return n}},{key:"onChangeHandle",value:function(e){var t=
this.props.params,n=e.target.getAttribute("data-direction"),o=e.target.getAttribute("data-device"),r=" ";""!==e.target.value&&(r=e.target.value);var a=this.state.dirObject,i={};if(t.responsive){if(this.state.locked[o])var l={top:r,right:r,bottom:r,left:r};else l=(0,Vt.ZP)(a[o],function(e){e[n]=r});i=(0,Vt.ZP)(a,function(e){e[o]=l})}else i=this.state.locked?(0,Vt.ZP)(a,function(e){e.top=r,e.right=r,e.bottom=r,e.left=r}):(0,Vt.ZP)(a,function(e){e[n]=r});this.setState({dirObject:i})}},{key:"componentDidUpdate",
value:function(){this.getStringFromBoxModelObject()}},{key:"getStringFromBoxModelObject",value:function(){var e,t=this.state.dirObject,n=this.props,o=n.input.onChange;n.params.responsive?(e={xl:{},lg:{},md:{},sm:{},xs:{}},Ar()(t,function(t,n){var o="";void 0!==t.top&&""!==t.top?o+=t.top.trim()+" ":o+=" ",void 0!==t.right&&""!==t.right?o+=t.right.trim()+" ":o+=" ",void 0!==t.bottom&&""!==t.bottom?o+=t.bottom.trim()+" ":o+=" ",void 0!==t.left&&""!==t.left?o+=t.left.trim():o+="",e[n]=o})):(e="",void 0!==
t.top&&""!==t.top?e+=t.top.trim()+" ":e+=" ",void 0!==t.right&&""!==t.right?e+=t.right.trim()+" ":e+=" ",void 0!==t.bottom&&""!==t.bottom?e+=t.bottom.trim()+" ":e+=" ",void 0!==t.left&&""!==t.left?e+=t.left.trim():e+=""),o(e)}},{key:"render",value:function(){var e,t,n,o,r,a=this,i=this.props,l=i.params,c=i.handleIsWidthSlider,s=this.state,d=s.dirObject,u=s.locked,m=be.device;return F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},
F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between builder-mb-1"},l.title&&!l.hideTitle&&F.createElement("label",{className:"builder-mb-0"},void 0!==l.desc&&""!=l.desc?F.createElement(er.Z,{content:l.desc,tagName:"span"},l.title):l.title),F.createElement("div",{className:"builder-margin-left-auto"},l.responsive?F.createElement(F.Fragment,null,F.createElement("span",{className:"builder-button builder-button-light builder-button-md builder-button-round",
onClick:function(e){e.preventDefault();var t=(0,Vt.ZP)(u,function(e){e[m]=!e[m]});a.setState({locked:t})},role:"button"},u[m]?F.createElement(co,{name:"unsync"}):F.createElement(co,{name:"sync"})),"advancedslider"===l.type&&F.createElement("span",{className:"builder-button builder-button-light builder-button-md builder-button-round",onClick:function(){return c({value:!0})}},F.createElement(co,{name:"roundedCorner"}))):F.createElement(F.Fragment,null,F.createElement("span",{className:"builder-button builder-button-light builder-button-md builder-button-round",
onClick:function(e){e.preventDefault(),a.setState({locked:!u})},role:"button"},u?F.createElement(co,{name:"unsync"}):F.createElement(co,{name:"sync"})),"advancedslider"===l.type&&F.createElement("span",{className:"builder-button builder-button-light builder-button-md builder-button-round",onClick:function(){return c({value:!0})}},F.createElement(co,{name:"roundedCorner"}))))),l.responsive?F.createElement("div",{className:"builder-row builder-align-items-center"},F.createElement(Nr,{direction:"top",
device:m,elmValue:null==d||null===(t=d[m])||void 0===t?void 0:t.top,itemChangeHandle:this.onChangeHandle}),F.createElement(Nr,{direction:"right",device:m,elmValue:null==d||null===(n=d[m])||void 0===n?void 0:n.right,itemChangeHandle:this.onChangeHandle}),F.createElement(Nr,{direction:"bottom",device:m,elmValue:null==d||null===(o=d[m])||void 0===o?void 0:o.bottom,itemChangeHandle:this.onChangeHandle}),F.createElement(Nr,{direction:"left",device:m,elmValue:null==d||null===(r=d[m])||void 0===r?void 0:
r.left,itemChangeHandle:this.onChangeHandle})):F.createElement("div",{className:"builder-row builder-align-items-center"},F.createElement(Nr,{direction:"top",elmValue:null==d?void 0:d.top,itemChangeHandle:this.onChangeHandle}),F.createElement(Nr,{direction:"right",elmValue:null==d?void 0:d.right,itemChangeHandle:this.onChangeHandle}),F.createElement(Nr,{direction:"bottom",elmValue:null==d?void 0:d.bottom,itemChangeHandle:this.onChangeHandle}),F.createElement(Nr,{direction:"left",elmValue:null==d?
void 0:d.left,itemChangeHandle:this.onChangeHandle})))}}]),r}(F.Component);const Sr=Dr;var Pr=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,
arguments);return(0,U.Z)(this,e)});function r(e){var t,n;return(0,J.Z)(this,r),(n=o.call(this)).state={units:null!==(t=null==e?void 0:e.units)&&void 0!==t?t:["px","%","em","rem"],status:!1},n}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handleClickOutside.bind(this))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handleClickOutside.bind(this))}},{key:"updateUnit",value:function(e,t){t.preventDefault();
var n=this.props,o=n.unit,r=n.update;if(o===e)return!1;r(e),this.setState({status:!1})}},{key:"handleClickOutside",value:function(e){this.unitPopover&&!this.unitPopover.contains(e.target)&&!1!==this.state.status&&this.setState({status:null})}},{key:"render",value:function(){var e=this,t=this.props.unit;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-form-field-unit".concat(this.state.status?" is-open":""),onClick:function(){return e.setState({status:!e.state.status})}},
F.createElement("span",{className:"builder-form-unit-name"},null!=t?t:"px"),F.createElement("span",{className:"builder-icon"},F.createElement(co,{name:"angleDown"})),this.state.status&&F.createElement("div",{className:"builder-form-unit-popover",ref:function(t){e.unitPopover=t}},F.createElement("div",{className:"builder-list-group"},this.state.units.map(function(n,o){return F.createElement("span",{key:o,className:"builder-list-item builder-list-item-action".concat(n===t?" active":""),onClick:e.updateUnit.bind(e,
n),role:"button"},n)})))))}}]),r}(F.Component);function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Rr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
kr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Tr={xl:"",lg:"",md:"",sm:"",xs:""},Lr=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;
e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={unit:"px"},t}return(0,G.Z)(r,[{key:"UNSAFE_componentWillMount",value:function(){var e,t=this.props,n=t.params,o=t.input,r="";n.unit&&(r=n.responsive?null!==(e=o.value.unit)&&void 0!==e?e:"px":(r=o.value.replace(/\d+/g,"")).length<1?"px":r,this.setState({unit:r}))}},{key:"onChangeHandle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?
arguments[1]:null,n=this.props,o=n.input,r=o.value,a=o.onChange,i=(o.name,n.params),l=this.state.unit;if(i.responsive)if(fe()(r)){var c=Rr(Rr({},Tr),r);null===t&&(c[e.target.dataset.device]=e.target.value),void 0!==i.unit&&null!==t&&(c.unit=t),void 0===i.unit&&delete c.unit,void 0!==i.staticUnit&&(delete c.unit,c[e.target.dataset.device]="".concat(c[e.target.dataset.device]).concat(i.staticUnit)),a(c)}else{var s={xl:r,lg:r,md:r,sm:"",xs:"",unit:"px"};void 0!==i.unit&&(s.unit=null===t?l:t),null===
t&&(s[e.target.dataset.device]=e.target.value),void 0!==i.staticUnit&&(delete s.unit,newValue[e.target.dataset.device]="".concat(newValue[e.target.dataset.device]).concat(i.staticUnit)),a(s)}else{var d=null===t?e.target.value:r;void 0!==i.unit&&(d=null===t?d+l:d+t),void 0!==i.staticUnit&&(d="".concat(d).concat(i.staticUnit)),a(d)}}},{key:"updateUnit",value:function(e){this.onChangeHandle({},e),this.setState({unit:e})}},{key:"renderUnit",value:function(){var e=this,t=this.props.params,n=this.state.unit;
return t.unit||this.props.staticUnit?t.staticUnit||this.props.staticUnit?F.createElement("span",{className:"builder-slider-static-unit"},t.staticUnit||this.props.staticUnit):F.createElement(Pr,{update:function(t){return e.updateUnit(t)},unit:n}):null}},{key:"render",value:function(){var e,t,n,o,r,a=this,i=this.props,l=i.input,c=i.params,s=i.handleIsWidthSlider,d=null!==(e=c.max)&&void 0!==e?e:100,u=null!==(t=c.min)&&void 0!==t?t:0,p=null!==(n=c.step)&&void 0!==n?n:1,v=!!c.unit||!!this.props.staticUnit,
f=be.device,b={};if(fe()(l.value))for(var h in l.value)b[h]=ke(String(l.value[h]));else{var g=ke(String(l.value));b=(0,B.Z)({},m,g),g=parseFloat(g,10),g=isNaN(g)?"":g}var E=fe()(l.value)?b[f]:b[m],y=void 0!==c.info&&c.info;return F.createElement("div",{"data-field":null===(o=this.props.input)||void 0===o?void 0:o.name,className:"builder-form-group".concat(null!=c.column?" builder-column-"+c.column:"")},F.createElement("div",{className:"builder-row builder-align-items-center"},!c.hideTitle&&F.createElement("div",
{className:"builder-column-4"},F.createElement("label",{className:"builder-form-label builder-mb-0"},void 0!==c.desc&&""!=c.desc?F.createElement(er.Z,{content:c.desc,tagName:"span"},c.title):c.title)),c.responsive?F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-column-".concat(c.hideTitle?12-(v||y?4:3):v||y?"4":"5")},F.createElement("input",{value:b[f]?b[f]:0,max:d,min:u,step:p,"data-device":f,type:"range",className:"builder-form-range",onChange:this.onChangeHandle.bind(this)})),
F.createElement("div",{className:"builder-column-".concat(v||y?"4":"3")},F.createElement("div",{className:"".concat("advancedslider"===c.type?"builder-position-relative":""," ").concat(v||y?"builder-field-group":"")},F.createElement("input",{type:"number",value:null!==(r=b[f])&&void 0!==r?r:"",max:d,min:u,step:p,"data-device":f,className:"builder-form-field builder-form-field-number builder-form-field-sm builder-mb-0",autoComplete:"off",onChange:this.onChangeHandle.bind(this),onBlur:function(e){(c.min||
c.max)&&(e.target.value=Re(e.target.value,u,d),a.onChangeHandle(e))}}),"advancedslider"===c.type&&F.createElement("span",{className:"builder-position-absolute builder-radius-btn builder-button builder-button-light builder-button-md builder-button-round",onClick:function(){return s({value:!1})}},F.createElement(co,{name:"frame"})),y&&F.createElement("span",{className:"builder-field-info"},y),this.renderUnit()))):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-column-".concat(c.hideTitle?
12-(v||y?4:3):v||y?"4":"5")},F.createElement("input",{value:E||0,max:d,min:u,step:p,type:"range",className:"builder-form-range",onChange:this.onChangeHandle.bind(this)})),F.createElement("div",{className:"builder-column-".concat(v||y?"4":"3")},F.createElement("div",{className:"".concat("advancedslider"===c.type?"builder-position-relative":""," ").concat(v||y?"builder-field-group":"")},F.createElement("input",{type:"number",value:null!=E?E:"",max:d,min:u,step:p,className:"builder-form-field builder-form-field-number builder-form-field-sm builder-mb-0",
autoComplete:"off",onChange:this.onChangeHandle.bind(this),onBlur:function(e){(c.min||c.max)&&(e.target.value=Re(e.target.value,u,d),a.onChangeHandle(e))}}),"advancedslider"===c.type&&F.createElement("span",{className:"builder-position-absolute builder-radius-btn builder-button builder-button-light builder-button-md builder-button-round",onClick:function(){return s({value:!1})}},F.createElement(co,{name:"frame"})),y&&F.createElement("span",{className:"builder-field-info"},y),this.renderUnit())))))}}]),
r}(F.Component);const Mr=Lr;function Zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zr(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach(function(t){Object.defineProperty(e,
t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Br=function(e){var t=(0,F.useState)(!0),n=(0,j.Z)(t,2),o=n[0],r=n[1];(0,F.useLayoutEffect)(function(){var t=e.input,n=e.responsiveDevice,o=e.params,a=null==t?void 0:t.value;null!=o&&o.responsive&&(a=null==t?void 0:t.value[n]);var i=(a+"").split(" ").length<2;r(!!i)});var a=function(t){var n=t.value,o=void 0===n||n,a=e.input,i=e.params,l=e.responsiveDevice;if(o)i.responsive?(a.value[l]=0,a.onChange(jr(jr({},a.value),{},(0,B.Z)({},a.value[l],
0)))):(a.value=0,a.onChange(0)),r(!0);else{var c=null==a?void 0:a.value;i.responsive&&(c=a.value[l]),(c+"").split(" ").length<2&&(i.responsive?a.value[l]="".concat(c,"px ").concat(c,"px ").concat(c,"px ").concat(c,"px"):a.value="".concat(c,"px ").concat(c,"px ").concat(c,"px ").concat(c,"px")),r(!1)}};return o?F.createElement(Mr,(0,ao.Z)({},e,{handleIsWidthSlider:a})):F.createElement(Sr,(0,ao.Z)({},e,{handleIsWidthSlider:a}))},Jr=function(e){var t=e.params,n=e.input;return F.createElement("div",{className:"builder-form-group",
"data-field":null==n?void 0:n.name},F.createElement("div",{className:"builder-alert builder-alert-".concat(t.style||"warning")},t.title&&F.createElement("div",{className:"builder-alert-title"},t.title),t.message))};var Gr=n(1700),Hr=n.n(Gr);var Ur=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={value:t._filterValue()},t}return(0,G.Z)(r,[{key:"_filterValue",value:function(){var e=this.props,t=e.input,n=e.params,o=this.convertValue(t.value);return n.responsive?fe()(o)?o:{xl:o,lg:o,md:o,sm:"",xs:""}:o}},{key:"convertValue",value:function(e){var t=
{"jpb-text-left":"left","jpb-text-right":"right","jpb-text-center":"center"};return void 0!==(null==t?void 0:t[e])?t[e]:e}},{key:"onClickHandle",value:function(e){var t=this.props,n=t.input.onChange;if(t.params.responsive){var o=be.device;if(fe()(this.state.value)){var r=Object.assign({},this.state.value);r[o]=e,this.setState({value:r}),n(r)}else{var a={xl:e,lg:e,md:e,sm:"",xs:""};a[o]=e,this.setState({value:a}),n(a)}}else this.setState({value:e}),n(e)}},{key:"render",value:function(){var e,t=this,
n=this.props.params,o=n.flex?["start","center","end"]:n.enableJustify?n.disableCenter?["left","right"]:["left","center","right","justify"]:["left","center","right"],r=null!=n&&n.available_options?n.available_options:o,a=null!=n&&n.vertical?"vertical":"horizontal",i=null!=n.layout&&n.layout?n.layout:"vertical",l=be.device;return F.createElement("div",{"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name,className:"builder-form-group".concat(null!=n.class?" "+n.class:"").concat("horizontal"==
i?" builder-row builder-align-items-center":"")},n.title&&!n.hideTitle&&F.createElement("label",{className:"".concat("horizontal"==i?"builder-column-4 builder-mb-0":"")},void 0!==n.desc&&""!=n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",{className:"".concat("horizontal"==i?"builder-column-8":"")},F.createElement("div",{className:"builder-nav-tabs builder-tab-pills builder-nav-fill"},r.map(function(e,o){return F.createElement("span",{key:o,className:"builder-nav-item".concat(n.responsive?
e==t.state.value[l]?" active":"":e==t.state.value?" active":""),onClick:function(n){n.preventDefault(),t.onClickHandle(e)},role:"button"},F.createElement(co,{name:"".concat("vertical"==a?"vertical":"text","Align").concat(Hr()(e))}))}))))}}]),r}(F.Component);const zr=Ur;var Fr=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={groups:t.animationGroups(),animations:t.animations(),groupAnimations:{},activeGroup:""},t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.input,t=e.value?e.value.replace(/([A-Z])/g," $1").split(" ")[0]:"",
n=[];Ee(t)&&["flash","pulse","rubberBand","shakeX","shakeY","headShake","swing","tada","wobble","jello","heartBeat"].includes(t)&&(t="special"),t&&hr()(this.state.animations[t],function(e,t){n.push({value:t,label:e})}),this.setState({activeGroup:t,groupAnimations:n})}},{key:"animations",value:function(){return{fade:{fadeIn:"Fade",fadeInDown:"Down",fadeInDownBig:"Down Big",fadeInLeft:"Left",fadeInLeftBig:"Left Big",fadeInRight:"Right",fadeInRightBig:"Right Big",fadeInUp:"Up",fadeInUpBig:"UpBig"},flip:{flip:"Flip",
flipInX:"Flip X",flipInY:"Flip Y"},rotate:{rotateIn:"Rotate",rotateInDownLeft:"Down Left",rotateInDownRight:"Down Right",rotateInUpLeft:"Up Left",rotateInUpRight:"Up Right"},zoom:{zoomIn:"Zoom",zoomInDown:"Down",zoomInLeft:"Left",zoomInRight:"Right",zoomInUp:"Up"},bounce:{bounceIn:"Bounce",bounceInDown:"Down",bounceInLeft:"Left",bounceInRight:"Right",bounceInUp:"Up"},special:{flash:"Blink",pulse:"Wave",rubberBand:"Elastic",shakeX:"Jitter X",shakeY:"Jitter Y",headShake:"Nod",swing:"Sway",tada:"Splash",
wobble:"Jiggle",jello:"Bounce",heartBeat:"Pulse"}}}},{key:"animationGroups",value:function(){return[{name:"fade",label:"Fade",icon:'<svg width="32" height="34" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><defs/><path fill-rule="evenodd" clip-rule="evenodd" d="M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704Z" fill="currentColor"/><path opacity=".05" fill-rule="evenodd" clip-rule="evenodd" d="M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z" fill="currentColor"/><path opacity=".1" fill-rule="evenodd" clip-rule="evenodd" d="M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z" fill="currentColor"/><path opacity=".15" fill-rule="evenodd" clip-rule="evenodd" d="M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z" fill="currentColor"/><path opacity=".2" fill-rule="evenodd" clip-rule="evenodd" d="M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z" fill="currentColor"/><path opacity=".25" fill-rule="evenodd" clip-rule="evenodd" d="M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z" fill="currentColor"/><path opacity=".3" fill-rule="evenodd" clip-rule="evenodd" d="M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z" fill="currentColor"/><path opacity=".35" fill-rule="evenodd" clip-rule="evenodd" d="M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z" fill="currentColor"/><path opacity=".4" fill-rule="evenodd" clip-rule="evenodd" d="M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z" fill="currentColor"/><path opacity=".45" fill-rule="evenodd" clip-rule="evenodd" d="M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z" fill="currentColor"/><path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z" fill="currentColor"/></svg>'},
{name:"rotate",label:"Rotate",icon:'<svg width="32" height="34" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><defs/><path d="M12.5 20.5C17.1944 20.5 21 16.6944 21 12C21 7.30558 17.1944 3.5 12.5 3.5C7.80558 3.5 4 7.30558 4 12C4 13.5433 4.41128 14.9905 5.13022 16.238M1.5 15L5.13022 16.238M6.82531 12.3832L5.47107 16.3542L5.13022 16.238" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>'},{name:"flip",label:"Flip",icon:'<svg width="32" height="34" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><defs/><path d="M12,6C6.3,6,2,8.15,2,11c0,2.45,3.19,4.38,7.71,4.88l-.42.41a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l2-2a1,1,0,0,0,.21-.33,1,1,0,0,0,0-.76,1,1,0,0,0-.21-.33l-2-2a1,1,0,0,0-1.42,1.42l.12.11C6,13.34,4,12,4,11c0-1.22,3.12-3,8-3s8,1.78,8,3c0,.83-1.45,2-4.21,2.6A1,1,0,0,0,15,14.79a1,1,0,0,0,1.19.77C19.84,14.76,22,13.06,22,11,22,8.15,17.7,6,12,6Z" fill="currentColor"/></svg>'},
{name:"bounce",label:"Bounce",icon:'<svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><defs/><path d="M19 7C17.8954 7 17 6.10457 17 5C17 3.89543 17.8954 3 19 3C20.1046 3 21 3.89543 21 5C21 6.10457 20.1046 7 19 7Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/><path d="M4 15.5C7 14.5 9.5 15 12 20C12.5 17 14 12.5 15.5 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>'},
{name:"zoom",label:"Zoom",icon:'<svg width="32" height="34" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><defs/><path d="M9.354 15.354L3.7 21H8v1H2v-6h1v4.285l5.646-5.639zM22 2h-6v1h4.3l-5.654 5.646.707.708L21 3.715V8h1zm-6 20h6v-6h-1v4.285l-5.646-5.639-.707.708L20.3 21H16zM8 2H2v6h1V3.715l5.646 5.639.707-.708L3.7 3H8z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"  fill="currentColor"/><path fill="none" d="M0 0h24v24H0z"/></svg>'},{name:"special",
label:"Special",icon:'<svg width="32" height="34" viewBox="0 0 576 512" fill="none" xmlns="http://www.w3.org/2000/svg"><defs/><path d="M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"/></svg>'}]}},
{key:"changeAnimation",value:function(e){var t=this.props.input,n=(t.value,t.onChange),o="";if(null==e)o="";else if(void 0!==e.length){for(var r=[],a=0;a<e.length;a++)r[a]=e[a].value;o=r}else o=e.value;n(o)}},{key:"onClickHandleAnimation",value:function(e){var t=this.props.input.onChange,n=[];hr()(this.state.animations[e],function(e,t){n.push({value:t,label:e})}),this.setState({activeGroup:e,groupAnimations:n}),t(Object.keys(this.state.animations[e])[0])}},{key:"render",value:function(){var e,t=this,
n=this.props.input,o=this.state.groupAnimations.length&&this.state.groupAnimations.find(function(e){return e.value===n.value});return F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},F.createElement("div",{className:"builder-row builder-gutter-20"},this.state.groups.map(function(e,n){return F.createElement("div",{key:n,className:"builder-column-4"},F.createElement("div",{className:"builder-animation-type".concat(t.state.activeGroup==
e.name?" active":""),onClick:function(n){n.preventDefault(),t.onClickHandleAnimation(e.name)}},F.createElement("div",{className:"builder-animation-icon",dangerouslySetInnerHTML:{__html:e.icon}}),F.createElement("div",{className:"builder-animation-name"},e.label)))})),this.state.activeGroup&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-card-divider builder-mb-3","area-hidden":"true"}),F.createElement("div",{className:"builder-row builder-gutter-20"},F.createElement("div",
{className:"builder-column-5"},F.createElement("span",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_ADDON_ANIMATION_DIRECTION"))),F.createElement("div",{className:"builder-column-7"},F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:o,options:this.state.groupAnimations,onChange:this.changeAnimation.bind(this),menuPlacement:"auto",menuPosition:"fixed",components:{IndicatorSeparator:function(){return null}}})))))}}]),r}(F.Component);
const Vr=Fr;var Wr=(0,F.forwardRef)(function(e,t){var n=e.color,o=e.onChangeColor,r=e.onClick,a=e.isClearable,i=void 0===a||a,l=e.hasAlphaField,c=void 0===l||l,s=e.disabled,d=void 0!==s&&s,u=e.hideInput,m=void 0!==u&&u,p=function(e){return e%1==0},v=function(e){if(st(e))return e;var t=new dr.C(e);return t.isValid?t.toHexString().toUpperCase().replace("#",""):""},f=function(e){if(st(e))return"100%";var t=new dr.C(e);if(!t.isValid)return"0%";var n=100*t.getAlpha(),o=p(n)?n:n.toFixed(0);return"".concat(o,
"%")},b=(0,F.useState)(v(n)),h=(0,j.Z)(b,2),g=h[0],E=h[1],y=(0,F.useState)(f(n)),_=(0,j.Z)(y,2),w=_[0],x=_[1];(0,F.useEffect)(function(){E(v(n)),x(f(n))},[n]);var I=function(){if(st(g))o(g);else{var e=Math.min(Number(w.replace(/[^0-9.]/g,"")),100),t=e/100,n=(new dr.C("#".concat(g))).setAlpha(t);if(n.isValid){var r=p(e)?e:e.toFixed(2);x("".concat(r,"%")),o(n.toRgbString())}}},O=function(e){"Enter"===e.key&&(I(),e.currentTarget.blur()),"Escape"===e.key&&(E(v(n)),x(f(n)),e.currentTarget.blur())},C=st(g)||
(new dr.C(g)).isValid,A=st(g)?g:(new dr.C(g)).setAlpha(1).toRgbString();return F.createElement("div",{ref:t,className:"builder-color-swatch"},F.createElement("button",{type:"button",className:"builder-color-swatch-button",onClick:r,disabled:d},C?F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-color-swatch-color-box",style:{backgroundColor:A}},F.createElement("span",{className:"builder-color-swatch-color-left"}),F.createElement("span",{className:"builder-color-swatch-color-right",
style:{opacity:1-(new dr.C(n)).getAlpha()}}),i&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),e.stopPropagation(),o("")},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"})))):F.createElement(Kr,null)),!m&&F.createElement("input",{type:"text",className:"builder-color-swatch-color-input",value:g,onChange:function(e){return E(e.target.value)},onBlur:I,onKeyDown:O,onClick:function(e){return e.currentTarget.select()}}),
c&&F.createElement("div",{className:"builder-color-swatch-alpha-wrapper"},F.createElement("input",{type:"text",className:"builder-color-swatch-alpha-input",value:w,onChange:function(e){return x(e.target.value)},onBlur:I,onKeyDown:O,onClick:function(e){return e.currentTarget.select()}})))}),Kr=function(){return F.createElement("div",{className:"builder-color-swatch-empty-color"})};function Yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yr(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const qr=function(e){var t,n,o=e.input,r=e.params,a=e.responsiveDevice,i=(0,F.useState)({options:[],
value:"",multi:!!e.params.multiple&&e.params.multiple}),l=(0,j.Z)(i,2),c=l[0],s=l[1];(0,F.useEffect)(function(){"select"==r.type?s(Xr(Xr({},c),{},{options:r.values})):"accesslevel"==r.type?s(Xr(Xr({},c),{},{options:accessLevels})):"category"==r.type&&s(Xr(Xr({},c),{},{options:articleCats}))},[]);var d=c.options,u=c.multi,m="";m=r.responsive&&"object"==(0,de.Z)(o.value)?o.value[a]:o.value;var p;p=u&&Array.isArray(m)?null==d?void 0:d.filter(function(e){return m.includes(e.value)}):null==d?void 0:d.find(function(e){return e.value===
m});var v=!(null==r.inline||!r.inline)&&r.inline;return F.createElement("div",{"data-field":null===(t=e.input)||void 0===t?void 0:t.name,className:"".concat(void 0!==r.class?" "+r.class:"").concat(v?" builder-row builder-align-items-center":"")},F.createElement("div",{className:"".concat(v?"builder-column-8":"")},F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:null!==(n=p)&&void 0!==n?n:null,menuPlacement:"auto",menuPosition:"fixed",styles:{menu:function(e){return Xr(Xr({},
e),{},{zIndex:3})},menuPortal:function(e){return Xr(Xr({},e),{},{zIndex:9999})}},isMulti:c.multi,options:c.options,onChange:function(t){var n=e.input,o=n.value,r=n.onChange,a=e.params,i=e.responsiveDevice,l="";if(null===t)l="";else if(Array.isArray(t)){for(var c=[],s=0;s<t.length;s++)c[s]=t[s].value;l=c}else l=(null==t?void 0:t.value)||"";if(a.responsive){var d=(0,B.Z)({},i,(null==t?void 0:t.value)||"");"object"===(0,de.Z)(o)&&null!==o?r(Object.assign({},o,d)):r(Object.assign({},(0,B.Z)({},i,o),d))}else r(l)}.bind(void 0),
isClearable:void 0===e.params.clearable||e.params.clearable,components:{IndicatorSeparator:function(){return null}}})))};function $r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Qr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ea="slider",ta=[{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_NONE"),value:"none"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_SOLID"),value:"solid"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_DOUBLE"),value:"double"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_DOTTED"),
value:"dotted"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_DASHED"),value:"dashed"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_GROOVE"),value:"groove"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_RIDGE"),value:"ridge"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_INSET"),value:"inset"},{label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER_STYLE_OUTSET"),value:"outset"}],na={xl:{border_width:"",border_style:"",border_color:""},lg:{border_width:"",
border_style:"",border_color:""},md:{border_width:"",border_style:"",border_color:""},sm:{border_width:"",border_style:"",border_color:""},xs:{border_width:"",border_style:"",border_color:""}};const oa=function(e){var t,n,o,r=e.input,a=e.params,i=(0,F.useRef)(null),l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(be.device),m=(0,j.Z)(u,2),p=(m[0],m[1]),v=r.value;at(r.value)&&fe()(r.value)||(v=a.responsive?na:{border_width:"",border_style:"",border_color:""}),(0,F.useEffect)(function(){var e=
function(){return p(be.device)};return be.on("change",e),function(){return be.removeListener("change",e)}},[be.device]);var f=a.responsive?v[be.device]:v,b=f.border_width,h=f.border_style,g=f.border_color,E=b.split(" "),y=(0,F.useState)(E.length>1?"box":ea),_=(0,j.Z)(y,2),w=_[0],x=_[1];return F.createElement("div",{className:"builder-form-group builder-border-container"},F.createElement("label",{className:"builder-border-title"},null!==(t=a.title)&&void 0!==t?t:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BORDER")),
F.createElement("div",null,w===ea?F.createElement(Mr,(0,ao.Z)({},e,{params:Qr(Qr({},a),{},{responsive:!1,type:"advancedslider",hideTitle:!0}),input:Qr(Qr({},r),{},{value:b,onChange:function(e){if(a.responsive){var t=dt({previous:v,value:Qr(Qr({},f),{},{border_width:"".concat(e,"px")}),responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_width:"".concat(e,"px")}))}}),handleIsWidthSlider:function(){var e=at(f.border_width)?"".concat(f.border_width," ").concat(f.border_width,
" ").concat(f.border_width," ").concat(f.border_width):" ".repeat(4);if(a.responsive){var t=dt({previous:v,value:Qr(Qr({},f),{},{border_width:e}),responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_width:e}));x("box")}})):F.createElement(Sr,(0,ao.Z)({},e,{params:Qr(Qr({},a),{},{responsive:!1,type:"advancedslider",hideTitle:!0}),input:Qr(Qr({},r),{},{value:b,onChange:function(e){if(a.responsive){var t=dt({previous:v,value:Qr(Qr({},f),{},{border_width:e}),
responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_width:e}))}}),handleIsWidthSlider:function(){var e=at(f.border_width)?f.border_width.split(/\s+/)[0]:"";if(a.responsive){var t=dt({previous:v,value:Qr(Qr({},f),{},{border_width:e}),responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_width:e}));x(ea)}}))),F.createElement("div",{className:"builder-color-container"},F.createElement(qr,(0,ao.Z)({},e,{params:Qr(Qr({},
a),{},{responsive:!1,type:"select",values:ta}),input:Qr(Qr({},r),{},{value:null!==(n=null===(o=ta.find(function(e){return e.value===h}))||void 0===o?void 0:o.value)&&void 0!==n?n:"",onChange:function(e){if(a.responsive){var t=dt({previous:v,value:Qr(Qr({},f),{},{border_style:e}),responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_style:e}))}})})),F.createElement("div",null,F.createElement(Wr,{ref:i,color:g||"",onChangeColor:function(e){if(a.responsive){var t=
dt({previous:v,value:Qr(Qr({},f),{},{border_color:e}),responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_color:e}))},onClick:function(){return d(!s)},hasAlphaField:!0,hideInput:!0}),F.createElement($o,{title:a.title,open:s,parent_el:i,modalBodyCss:{padding:0},onHide:function(){return d(!1)},gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(pr,
{color:g||"",onChange:function(e){if(a.responsive){var t=dt({previous:v,value:Qr(Qr({},f),{},{border_color:tr(e,"rgb")}),responsive:a.responsive,device:be.device});r.onChange(t)}else r.onChange(Qr(Qr({},f),{},{border_color:tr(e,"rgb")}))}})))))))};function ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function aa(e){for(var t=1;t<arguments.length;t++){var n=
null!=arguments[t]?arguments[t]:{};t%2?ra(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ra(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ia=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"prepareValue",function(){var e=t.props.input,n=e.value,o=e.onChange,r={};if(fe()(n)){var a=!!(n.ho||n.vo||n.blur||n.spread);r=void 0!==(null==n?void 0:n.enabled)?n:aa(aa({},n),{},{enabled:a})}else{var i=n.split(" "),l=function(e){return NaN!==
parseFloat(e)||void 0!==parseFloat(e)?parseFloat(e):0};r={ho:l(i[0]),vo:l(i[1]),blur:l(i[2]),spread:l(i[3]),color:void 0!==i[4]?i[4]:"",inset:!1,enabled:t.isEnabled(n)}}return o(r),r}),(0,B.Z)((0,io.Z)(t),"isEnabled",function(e){if("string"==typeof e&&e&&(e=(e=e.replace(/\s+/g," ")).split(" ")),pe()(e))return!1;if(e&&Array.isArray(e))return e.some(function(e,t){return t<4?!!Number(e):4===t?!["#fff","#ffffff"].includes(e.toLowerCase()):void 0});if(e&&"object"===(0,de.Z)(e)&&!Array.isArray(e)){var t,
n=["ho","vo","blur","spread"];if(void 0!==(null===(t=e)||void 0===t?void 0:t.enabled))return e.enabled;for(var o in e){if(n.includes(o))return!!Number(e[o]);if("color"===o)return!["#fff","#ffffff"].includes(e.color)}}return!0}),(0,B.Z)((0,io.Z)(t),"clearColor",function(){var e=t.props.input.onChange,n=Object.assign({},t.state.value);n.color="",t.setState({value:n}),e(n)}),t.colorPicker=(0,F.createRef)(),t.state={value:t.prepareValue(),displayColorPicker:!1},t}return(0,G.Z)(r,[{key:"onChangeHandle",
value:function(e,t){var n=this.props.input.onChange,o=Object.assign({},this.state.value);o[t]=e,this.setState({value:o}),n(o)}},{key:"onClickHandleToggle",value:function(){var e=this.props.input.onChange,t=Object.assign({},this.state.value);t.enabled=!this.state.value.enabled,this.setState({value:t}),e(t)}},{key:"handleClick",value:function(){this.setState({displayColorPicker:!this.state.displayColorPicker})}},{key:"handleClose",value:function(){this.setState({displayColorPicker:!1})}},{key:"render",
value:function(){var e,t=this,n=this.props,o=n.input.value,r=n.params,a={};r.config&&(a=r.config);var i=this.state.value;return F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},F.createElement("div",{className:"builder-card"},F.createElement("div",{className:"builder-card-header".concat(o.enabled?"":" builder-card-no-border")},F.createElement("div",{className:"builder-form-label"},r.title),F.createElement("div",null,F.createElement("span",
{className:"builder-form-switch"},F.createElement("span",{className:"builder-field-checkbox".concat(null!=o&&o.enabled?" active":""),onClick:this.onClickHandleToggle.bind(this),"area-hidden":"true"})))),o.enabled&&F.createElement("div",{className:"builder-card-body"},F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column"},F.createElement("label",{className:"builder-form-label builder-mb-0"},Joomla.JText._("COM_JPAGEBUILDER_COLOR"))),
F.createElement("div",{className:"builder-column-auto"},F.createElement("div",{className:"builder-form-color",ref:this.colorPicker},F.createElement("div",{className:"builder-color-container",onClick:this.handleClick.bind(this)},F.createElement("div",{className:"builder-color-picker",style:{backgroundColor:"".concat(i.color)}}),i.color&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:this.clearColor,title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",
size:"1x"}))),F.createElement($o,{title:Joomla.JText._("COM_JPAGEBUILDER_COLOR"),open:this.state.displayColorPicker,parent_el:this.colorPicker,modalBodyCss:{padding:0},onHide:function(){t.setState({displayColorPicker:!1})},gap:10},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:i.color,onChange:function(e){t.onChangeHandle(e,"color")}}))))))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},
F.createElement("div",{className:"builder-column-4"},F.createElement("label",{className:"builder-form-label builder-mb-0"},Joomla.JText._("COM_JPAGEBUILDER_HORIZONTAL"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",onChange:function(e){t.onChangeHandle(e.target.value,"ho")},value:i&&i.ho||0})),F.createElement("div",{className:"builder-column-3"},F.createElement("input",{type:"number",className:"builder-form-field",onChange:function(e){t.onChangeHandle(e.target.value,
"ho")},value:i&&i.ho||0}))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-4"},F.createElement("label",{className:"builder-form-label builder-mb-0"},Joomla.JText._("COM_JPAGEBUILDER_VERTICAL"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",onChange:function(e){t.onChangeHandle(e.target.value,"vo")},value:i&&i.vo||0})),F.createElement("div",
{className:"builder-column-3"},F.createElement("input",{type:"number",className:"builder-form-field",onChange:function(e){t.onChangeHandle(e.target.value,"vo")},value:i&&i.vo||0}))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-4"},F.createElement("label",{className:"builder-form-label builder-mb-0"},Joomla.JText._("COM_JPAGEBUILDER_BLUR"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",
{type:"range",className:"builder-form-range",onChange:function(e){t.onChangeHandle(e.target.value,"blur")},value:i&&i.blur||0})),F.createElement("div",{className:"builder-column-3"},F.createElement("input",{type:"number",className:"builder-form-field",onChange:function(e){t.onChangeHandle(e.target.value,"blur")},value:i&&i.blur||0}))),(void 0===a.spread||a.spread)&&F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-4"},
F.createElement("label",{className:"builder-form-label builder-mb-0"},Joomla.JText._("COM_JPAGEBUILDER_SPREAD"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",onChange:function(e){t.onChangeHandle(e.target.value,"spread")},value:i&&i.spread||0})),F.createElement("div",{className:"builder-column-3"},F.createElement("input",{type:"number",className:"builder-form-field",onChange:function(e){t.onChangeHandle(e.target.value,"spread")},
value:i&&i.spread||0}))))))}}]),r}(F.Component);const la=ia;var ca=n(1584),sa=n.n(ca),da=n(1763),ua=n.n(da),ma=function(e){return at(e)?sa()(e)?toString(Ce(e)):ua()(e)?toString(e):"true"===e?"1":"false"===e?"0":e:"0"},pa=function(e,t){return t in e},va=function(e,t){return"%"===e.transform_origin.top.unit&&"%"===e.transform_origin.left.unit?"0"===e.transform_origin.top.value&&"0"===e.transform_origin.left.value?t(0):"0"===e.transform_origin.top.value&&"50"===e.transform_origin.left.value?t(1):"0"===
e.transform_origin.top.value&&"100"===e.transform_origin.left.value?t(2):"50"===e.transform_origin.top.value&&"0"===e.transform_origin.left.value?t(3):"50"===e.transform_origin.top.value&&"50"===e.transform_origin.left.value?t(4):"50"===e.transform_origin.top.value&&"100"===e.transform_origin.left.value?t(5):"100"===e.transform_origin.top.value&&"0"===e.transform_origin.left.value?t(6):"100"===e.transform_origin.top.value&&"50"===e.transform_origin.left.value?t(7):"100"===e.transform_origin.top.value&&
"100"===e.transform_origin.left.value?t(8):t(-1):t(-1),e};function fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fa(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ha=function(e){var t,n,o=e.input,r=e.params,a=null!==(t=null===(n=r.reduxProps)||void 0===n?void 0:n.activeDevice)&&void 0!==t?t:"xl",i=function(e,t){var n,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!at(e))return"";if(n=e,"object"===(0,de.Z)(n)&&null!==n&&!Array.isArray(n)&&(pa(n,"xl")||pa(n,"md"))&&!pa(n,"unit"))return e[t]?ma(String(e[t])):"";if(function(e){return"object"===
(0,de.Z)(e)&&null!==e&&!Array.isArray(e)&&(pa(e,"xl")||pa(e,"md"))&&"unit"in e}(e)){var r=o?e.unit:"";return e[t]?ma(String(e[t]))+r:""}return fe()(e)?"":ma(e)}(o.value,a);return{activeDevice:a,inputValue:i,generateFieldValue:function(e){if(r.responsive){if(!fe()(o.value)){var t=Ye((0,de.Z)(o.value));return t[a]=e,t}return ba(ba({},o.value),{},(0,B.Z)({},a,e))}return e}}};const ga=function(e){var t=e.input,n=e.params,o=t.onChange,r=ha({input:t,params:n}),a=r.inputValue,i=r.generateFieldValue;return(0,F.useEffect)(function(){Array.isArray(n.values)&&
n.values.some(function(e){return e.value===a})||o(n.std)},[]),F.createElement("div",{className:"builder-form-group","data-field":null==t?void 0:t.name},n.title&&!n.hideTitle&&F.createElement("label",null,n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",{className:"builder-nav-tabs builder-tab-".concat(n.style||"pills"," builder-nav-fill")},n.values.map(function(e,t){var n,r,l,c,s;return F.createElement("span",{key:t,className:"builder-nav-item".concat(e.value===
a?" active":""),onClick:function(t){t.preventDefault();var n=i(e.value);o(n)},role:"button"},fe()(e.label)?F.createElement(F.Fragment,null,null!=e&&null!==(n=e.label)&&void 0!==n&&n.tooltip?F.createElement(er.Z,{content:e.label.tooltip,className:"builder-h-100 builder-w-100 builder-text-center",tagName:"span"},!(null==e||null===(r=e.label)||void 0===r||!r.icon)&&F.createElement(co,{name:e.label.icon,"aria-hidden":"true"}),!(null==e||null===(l=e.label)||void 0===l||!l.label)&&F.createElement("span",
null,e.label.label)):F.createElement(F.Fragment,null,!(null==e||null===(c=e.label)||void 0===c||!c.icon)&&F.createElement(co,{name:e.label.icon,"aria-hidden":"true"}),!(null==e||null===(s=e.label)||void 0===s||!s.label)&&F.createElement("span",null,e.label.label))):e.label)})))};function Ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}
function ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ea(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ea(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const _a=function(e){var t=e.input,n=e.params,o=e.responsiveDevice,r=(0,F.useMemo)(function(){var e=function(e){if(null!=n&&n.responsive){var t=
Ye("boolean");return fe()(e)?e:(t[o]=Boolean(Number(e)),t)}return Boolean(Number(e))}(t.value);return null!=n&&n.responsive?Boolean(Number(e[o])):e},[t.value,o,n]);return F.createElement("div",{className:"builder-form-group builder-form-inline".concat(null!=n.class?" "+n.class:""),"data-field":null==t?void 0:t.name},n.title&&!n.hideTitle&&F.createElement("label",null,void 0!==n.desc&&""!=n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",{className:"builder-form-switch"},
F.createElement("input",{type:"checkbox",value:r,checked:r,onChange:function(e){var r=t.onChange,a=t.value,i=e.target.checked;if(null!=n&&n.responsive){var l={};fe()(a)?l=ya(ya({},a),{},(0,B.Z)({},o,Boolean(Number(i)))):(l=Ye("boolean"))[o]=Boolean(Number(i)),r(l)}else r(Boolean(Number(i)))}})))};n(6629),n(6531),n(1707),n(8018),n(3256),n(1423);const wa=function(e){var t=e.name,o=e.value,r=e.onChange,a=e.label,i=e.syntax,l=void 0===i?"css":i,c=(0,F.useRef)(null);return(0,F.useEffect)(function(){var e=
n(4631).fromTextArea(c.current,{lineNumbers:!0,mode:l,lint:!0,tabSize:2,gutters:["CodeMirror-lint-markers"],lineWrapping:!0});e.on("keyup",function(t,n){var o=/^[a-zA-Z]$/.test(n.key),r=e.doc.getLine(e.doc.getCursor().line).substr(0,e.doc.getCursor().ch);(o||":"===n.key||" "===n.key&&/:\s+$/.test(r))&&e.showHint({completeSingle:!1})}),e.on("change",function(e,t){"setValue"!==t.origin&&r(e.getValue(),t)})},[]),F.createElement("div",{className:"builder-form-group"},a&&F.createElement("label",null,a),
F.createElement("textarea",{ref:c,name:t,value:o,autoComplete:"off",onChange:function(){var e,t;r(null!==(e=null===(t=c.current)||void 0===t?void 0:t.value)&&void 0!==e?e:"")}}))};var xa=function(e){var t=e.children,n=e.className,o=e.onClose,r=e.showClose;return F.createElement("div",{className:"builder-modal-header".concat(n?" "+n:"")},t,r&&F.createElement("span",{className:"builder-close-button","aria-label":"Close",tabIndex:0,onKeyDown:ye,onClick:function(e){e.preventDefault(),o()},role:"button"},
F.createElement(co,{name:"times"})))},Ia=function(e){var t=e.children;return F.createElement("div",{className:"builder-modal-content"},t)},Oa=function(e){var t=e.children,n=e.className;return F.createElement("div",{className:"builder-modal-body".concat(n?" "+n:"")},t)},Ca=function(e){var t=e.children;return F.createElement("div",{className:"builder-modal-footer"},t)};const Aa=function(e){var t=e.children,n=e.isOpen,o=e.onClose,r=e.showClose,a=e.size,i=e.cssClass,l=(0,F.useRef)(null);if((0,F.useEffect)(function(){return window.addEventListener("keydown",
c),function(){window.removeEventListener("keydown",c)}}),!n)return null;var c=function(e){"Escape"===e.key&&o(!0)};return V.createPortal(F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-modal-overlay",onClick:function(){return o(!0)},onKeyDown:ye,tabIndex:0,role:"button"}),F.createElement("div",{className:"builder-modal",ref:l},F.createElement("div",{className:"builder-modal-dialog".concat(a?" builder-modal-"+a:"").concat(i?" "+i:"")},r&&F.createElement("span",{className:"builder-modal-close",
"aria-label":"Close",onClick:function(e){e.preventDefault(),o()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"times",size:"2x"})),t))),document.body)},Na=function(e){var t=e.isOpen,n=e.onClose,o=e.title,r=void 0===o?Joomla.JText._("COM_JPAGEBUILDER_CODE_EDITOR"):o,a=e.value,i=e.onChange,l=(0,F.useState)(a),c=(0,j.Z)(l,2),s=c[0],d=c[1];return(0,F.useEffect)(function(){s!==a&&d(a)},[t,a]),F.createElement(Aa,{isOpen:t,onClose:function(){return n(!1)},cssClass:"builder-modal-dialog-centered builder-modal-dialog-code-editor"},
F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return n(!1)}},F.createElement("span",{className:"builder-modal-header-title"},r)),F.createElement("div",null,F.createElement("div",{className:"builder-code-mirror-modal"},F.createElement(wa,{name:"codeEditor",value:s,onChange:function(e){return d(e)}}))),F.createElement(Ca,null,F.createElement("div",{className:"builder-d-flex justify-content-end builder-mt-3"},F.createElement("button",
{type:"button",onClick:function(){n(!1)},className:"builder-button builder-button-primary"},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")),F.createElement("button",{type:"button",className:"builder-button builder-button-primary builder-ms-2 ".concat(s===a?"disabled":""),onClick:function(){i(s)},disabled:s===a},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_APPLY"))))))},Da=function(e){var t=e.input,n=e.params,o=t.value,r=t.onChange,a=t.name,i=(0,F.useState)(!1),l=(0,j.Z)(i,
2),c=l[0],s=l[1],d=Wo(o);return(0,F.useEffect)(function(){c&&d!==o&&s(!1)},[c,o,d]),F.createElement("div",{className:"builder-form-group","data-field":null==t?void 0:t.name},F.createElement("div",{className:"builder-d-flex builder-justify-content-between builder-align-items-center"},n.title&&F.createElement("label",null,void 0!==n.desc&&""!=n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",{className:"builder-controls-group"},F.createElement(er.Z,
{content:Joomla.JText._("COM_JPAGEBUILDER_CODE_EDITOR_EXPAND"),tagName:"span"},F.createElement("button",{type:"button",className:"builder-richtext-tool-item builder-mb-2",onClick:function(){return s(!0)}},F.createElement(co,{name:"editorExpand"}))))),F.createElement(wa,{key:c,name:a,syntax:(null==n?void 0:n.syntax)||"css",value:o,onChange:r}),F.createElement(Na,{title:n.title,isOpen:c,onClose:function(e){return s(e)},value:o,onChange:r}))},Sa=function(e){var t=e.input,n=t.value,o=t.onChange,r=t.name,
a=e.params,i=(0,F.useRef)(null),l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=function(e){o(e)};return F.createElement("div",{"data-field":r,className:"builder-form-group".concat(null!=a.column?" builder-column-"+a.column:"")},a.title&&F.createElement("label",null,void 0!==a.desc&&""!=a.desc?F.createElement(er.Z,{content:a.desc,tagName:"span"},a.title):a.title),F.createElement("div",null,F.createElement(Wr,{ref:i,color:n||"",onChangeColor:u,onClick:function(){return d(!s)},hasAlphaField:!0}),
F.createElement($o,{title:a.title,open:s,parent_el:i,onHide:function(){return d(!1)},modalBodyCss:{padding:0},gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:n,onChange:u}))))))};var Pa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=(0,F.useState)(e),o=(0,j.Z)(n,2),r=o[0],a=o[1];return(0,F.useEffect)(function(){var n=setTimeout(function(){a(e)},
t);return function(){clearTimeout(n)}},[e,t]),r};function ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ka(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
ka(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ta={opacity:{label:"Opacity",min:0,max:100,unit:"%"},blur:{label:"Blur",min:0,max:200,unit:"px"},brightness:{label:"Brightness",min:0,max:100,unit:"%"},contrast:{label:"Contrast",min:0,max:200,unit:"%"},saturate:{label:"Saturation",min:0,max:200,unit:"%"},invert:{label:"Invert color",min:0,max:100,unit:"%"},grayscale:{label:"Grayscale",min:0,max:100,unit:"%"},sepia:{label:"Sepia",min:0,
max:100,unit:"%"},hue_rotate:{label:"Hue rotate",min:0,max:360,unit:"deg"}};const La=function(e){var t=e.input,n=t.value,o=t.onChange,r=n;at(r)||(r={});var a=(0,F.useState)(r),i=(0,j.Z)(a,2),l=i[0],c=i[1],s=Pa(l);return(0,F.useEffect)(function(){o(s)},[s]),F.createElement("div",null,Object.entries(Ta).map(function(e){var t=(0,j.Z)(e,2),n=t[0],o=t[1];return F.createElement(Mr,{key:o.label,params:{title:o.label,min:o.min,max:o.max},input:{value:l[n]||"",onChange:function(e){c(function(t){return Ra(Ra({},
t),{},(0,B.Z)({},n,e))})}},staticUnit:o.unit})}))};function Ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ma(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
Ma(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ja=function(e){var t,n=e.input,o=n.value,r=n.onChange,a=e.params,i=(0,F.useState)(b),l=(0,j.Z)(i,2),c=l[0],s=l[1],d=(0,F.useState)(!1),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useState)([]),f=(0,j.Z)(v,2),h=f[0],g=f[1],y=c.find(function(e){return e.value===o});return(0,F.useEffect)(function(){(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r,a,i;return Nt().wrap(function(e){for(;;)switch(e.prev=
e.next){case 0:return e.next=2,fetch(E,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 2:return t=e.sent,e.next=5,t.json();case 5:n=e.sent,o=n.data.map(function(e){return Za({label:e.family_name,value:e.family_name,type:e.type},"google"===e.type&&{variants:e.data.variants})}),r=o.filter(function(e){return"google"===e.type}),a=o.filter(function(e){return"local"===e.type}),i=[],r.length>0&&!window.disableGoogleFonts&&i.push.apply(i,[{value:"Google Fonts",
label:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_FONT_BOOK_GOOGLE_FONTS"),isDisabled:!0}].concat((0,ue.Z)(r))),a.length>0&&i.push.apply(i,[{value:"Local Fonts",label:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_FONT_BOOK_LOCAL_FONTS"),isDisabled:!0}].concat((0,ue.Z)(a))),i.push.apply(i,(0,ue.Z)(b)),s(i),g(n.data),p(!0);case 16:case "end":return e.stop()}},e)}))()},[]),(0,F.useEffect)(function(){var e;if(h.length&&y&&m){var t=h.find(function(e){return e.family_name===y.value});if(t){var n,o,r=null!==(e=t.type)&&
void 0!==e?e:"google";"google"!==r||window.disableGoogleFonts?"local"===r&&lt({family:y.value,variants:[]},"local"):lt({family:y.value,variants:null!==(n=null===(o=t.data)||void 0===o?void 0:o.variants)&&void 0!==n?n:[]},"google",c)}}},[h,m]),F.createElement("div",{"data-field":null===(t=e.input)||void 0===t?void 0:t.name,className:"builder-form-group".concat(null!=a.class?" "+a.class:"")},F.createElement("label",null,void 0!==a.desc&&""!=a.desc?F.createElement(er.Z,{content:a.desc,tagName:"span"},
a.title):a.title),F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:y,options:c,menuPlacement:"auto",menuPosition:"fixed",onChange:function(e){return r(e.value)},components:{IndicatorSeparator:function(){return null}}}))};var Ba=[{value:"",label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_FONT_WEIGHT")},{value:100,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_THIN")},{value:200,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_EXTRA_LIGHT")},
{value:300,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_LIGHT")},{value:400,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_NORMAL")},{value:500,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_MEDIUM")},{value:600,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_SEMI_BOLD")},{value:700,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_BOLD")},{value:800,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_EXTRA_BOLD")},{value:900,label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_BLACK")}];
const Ja=function(e){var t=e.input,n=t.value,o=t.onChange,r=t.name,a=e.params,i=function(e,t){e.preventDefault();var r=Object.assign({},n,(0,B.Z)({},t,!n[t]));o(r)},l=Ba.find(function(e){return e.value===n.weight})||{};return F.createElement("div",{className:"builder-form-group".concat(null!=a.class?" "+a.class:""),"data-field":r},F.createElement("label",null,void 0!==a.desc&&""!=a.desc?F.createElement(er.Z,{content:a.desc,tagName:"span"},a.title):a.title),F.createElement("div",{className:"builder-d-flex builder-gutter-15"},
F.createElement("div",{className:"builder-flex-shrink-1"},F.createElement("div",{className:"builder-nav-tabs builder-tab-button-group"},F.createElement("span",{className:"builder-nav-item".concat(void 0!==n&&n.underline?" active":""),onClick:function(e){return i(e,"underline")},role:"button"},F.createElement(co,{name:"underline"})),F.createElement("span",{className:"builder-nav-item".concat(void 0!==n&&n.italic?" active":""),onClick:function(e){return i(e,"italic")},role:"button"},F.createElement(co,
{name:"italic"})),F.createElement("span",{className:"builder-nav-item".concat(void 0!==n&&n.uppercase?" active":""),onClick:function(e){return i(e,"uppercase")},role:"button"},F.createElement(co,{name:"typography"})))),F.createElement("div",{className:"builder-flex-grow-1"},F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:l,options:Ba,isClearable:!1,onChange:function(e){var t=Object.assign({},n,{weight:e.value});o(t)},menuPlacement:"auto",menuPosition:"fixed",
components:{IndicatorSeparator:function(){return null}}}))))};const Ga=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);
return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).colorPicker1=(0,F.createRef)(),t.colorPicker2=(0,F.createRef)(),t.state={displayColorPicker:!1,displayColorPicker2:!1},t}return(0,G.Z)(r,[{key:"handleClick",value:function(){this.setState({displayColorPicker:!this.state.displayColorPicker})}},{key:"handleClick2",value:function(){this.setState({displayColorPicker2:!this.state.displayColorPicker2})}},{key:"handleChange",value:function(e){var t=this.props.input,n=t.onChange,
o=t.value;n(Object.assign({},o,{color:e}))}},{key:"handleChange2",value:function(e){var t=this.props.input,n=t.onChange,o=t.value;n(Object.assign({},o,{color2:e}))}},{key:"clearColor1",value:function(){var e=this.props.input,t=e.value;(0,e.onChange)(Object.assign({},t,{color:""}))}},{key:"clearColor2",value:function(){var e=this.props.input,t=e.value;(0,e.onChange)(Object.assign({},t,{color2:""}))}},{key:"handleGradientTypeChange",value:function(e){var t=this.props.input,n=t.onChange,o=t.value;n(Object.assign({},
o,{type:e.target.value}))}},{key:"componentDidMount",value:function(){var e=this.props,t=e.input,n=t.onChange,o=t.value,r=e.params.std;!o&&r&&n(r)}},{key:"render",value:function(){var e,t,n=this,o=this.props,r=o.input,a=r.value,i=r.onChange,l=(r.name,o.params),c=[{value:"top center",label:"Top Center"},{value:"top left",label:"Top Left"},{value:"top right",label:"Top Right"},{value:"center center",label:"Center Center"},{value:"center left",label:"Center Left"},{value:"center right",label:"Center Right"},
{value:"bottom center",label:"Bottom Center"},{value:"bottom left",label:"Bottom Left"},{value:"bottom right",label:"Bottom Right"}];return t="radial"==a.type?"radial-gradient(at ".concat(a.radialPos||"center center",", ").concat(a.color?a.color:"rgba(255, 255, 255, 0)"," ").concat(a.pos||0,"%, ").concat(a.color2?a.color2:"rgba(255, 255, 255, 0)"," ").concat(a.pos2||100,"%)"):"linear-gradient(".concat(a.deg||0,"deg, ").concat(a.color?a.color:"rgba(255, 255, 255, 0)"," ").concat(a.pos||0,"%, ").concat(a.color2?
a.color2:"rgba(255, 255, 255, 0)"," ").concat(a.pos2||100,"%)"),F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},F.createElement("label",null,void 0!==l.desc&&""!=l.desc?F.createElement(er.Z,{content:l.desc,tagName:"span"},l.title):l.title),F.createElement("div",{className:"builder-gradient-container builder-mb-3"},F.createElement("div",{className:"builder-gradient-body",style:{backgroundImage:"".concat(t)}})),F.createElement("div",
{className:"builder-d-flex builder-justify-content-between builder-mb-3"},F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-gutter-15",ref:this.colorPicker1},F.createElement("div",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_COLOR")," 1"),F.createElement("div",null,F.createElement("div",{className:"builder-form-color"},F.createElement("div",{className:"builder-color-container"},F.createElement("div",{className:"builder-color-picker",onClick:this.handleClick.bind(this),
style:{backgroundColor:"".concat(a.color)}}),a.color&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),n.clearColor1()},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"}))),F.createElement($o,{title:"".concat(Joomla.JText._("COM_JPAGEBUILDER_COLOR")," 1"),open:this.state.displayColorPicker,parent_el:this.colorPicker1,modalBodyCss:{padding:0},onHide:function(){n.setState({displayColorPicker:!1})},gap:10},
F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:a&&a.color,onChange:this.handleChange.bind(this)}))))))),F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-gutter-15",ref:this.colorPicker2},F.createElement("div",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_COLOR")," 2"),F.createElement("div",null,F.createElement("div",
{className:"builder-form-color"},F.createElement("div",{className:"builder-color-container"},F.createElement("div",{className:"builder-color-picker",onClick:this.handleClick2.bind(this),style:{backgroundColor:"".concat(a.color2)}}),a.color2&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),n.clearColor2()},title:"Clear",role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"}))),F.createElement($o,{title:"".concat(Joomla.JText._("COM_JPAGEBUILDER_COLOR"),
" 2"),open:this.state.displayColorPicker2,parent_el:this.colorPicker2,modalBodyCss:{padding:0},onHide:function(){n.setState({displayColorPicker2:!1})},gap:10},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:a&&a.color2,onChange:this.handleChange2.bind(this)})))))))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",
{className:"builder-column-3"},F.createElement("span",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_START"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",onChange:function(e){var t=Object.assign({},a,{pos:e.target.value});i(t)},value:a&&a.pos||0})),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",className:"builder-form-field builder-form-field-sm",
onChange:function(e){var t=Object.assign({},a,{pos:e.target.value});i(t)},value:a&&a.pos||0}),F.createElement("span",{className:"builder-field-info"},"%")))),F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-3"},F.createElement("span",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_END"))),F.createElement("div",{className:"builder-column-5"},F.createElement("input",{type:"range",className:"builder-form-range",
onChange:function(e){var t=Object.assign({},a,{pos2:e.target.value});i(t)},value:a&&a.pos2||100})),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",className:"builder-form-field builder-form-field-sm",onChange:function(e){var t=Object.assign({},a,{pos2:e.target.value});i(t)},value:a&&a.pos2||100}),F.createElement("span",{className:"builder-field-info"},"%")))),F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between builder-mb-3"},
F.createElement("div",null,F.createElement("span",{className:"builder-form-label"},Joomla.JText._("COM_JPAGEBUILDER_TYPE"))),F.createElement("div",{className:"builder-d-flex builder-gutter-20"},F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-mb-0"},F.createElement("input",{type:"radio",className:"builder-field-radio",value:"linear",checked:a&&"radial"!=a.type,onChange:this.handleGradientTypeChange.bind(this)}),"Linear")),F.createElement("div",{className:"builder-form-check"},
F.createElement("label",{className:"builder-mb-0"},F.createElement("input",{type:"radio",className:"builder-field-radio",value:"radial",checked:a&&"radial"==a.type,onChange:this.handleGradientTypeChange.bind(this)}),"Radial")))),a&&"radial"!=a.type&&F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-3"},F.createElement("span",{className:"builder-form-label"},"Angle")),F.createElement("div",{className:"builder-column-5"},
F.createElement("input",{type:"range",max:"360",className:"builder-form-range",onChange:function(e){var t=Object.assign({},a,{deg:e.target.value});i(t)},value:a&&a.deg||0})),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",max:"360",className:"builder-form-field builder-form-field-sm",onChange:function(e){var t=Object.assign({},a,{deg:e.target.value});i(t)},value:a&&a.deg||0}),F.createElement("span",
{className:"builder-field-info"},"%")))),a&&"radial"==a.type&&F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-6"},F.createElement("span",{className:"builder-form-label"},"Angle")),F.createElement("div",{className:"builder-column-6"},F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",isClearable:!1,value:c.length&&c.find(function(e){return e.value===(null==a?void 0:a.radialPos)}),
options:c,onChange:function(e){var t=Object.assign({},a,{radialPos:e.value});i(t)},menuPlacement:"auto",menuPosition:"fixed",components:{IndicatorSeparator:function(){return null}}}))))}}]),r}(F.Component);var Ha=(0,F.createContext)({});const Ua=Ha,za=function(e){var t=e.params,n=e.input,o=(0,F.useContext)(Ha),r=o.setActiveGroup,a=o.activeGroup,i=(0,F.useMemo)(function(){return a===t.uuid?"up":"down"},[a]);return F.createElement("div",{"data-field":null==n?void 0:n.name,className:"builder-form-label",
onClick:function(e){e.preventDefault();var n=""===a||a!==t.uuid?t.uuid:"";r(n)}},t.title,"toggle"===(null==t?void 0:t.style)&&F.createElement("span",{className:"builder-toggle-icon pull-right","aria-hidden":"down"===i},F.createElement(co,{name:"".concat("down"===i?"angleDown":"angleUp")})))};function Fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,
o)}return n}var Va=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,
r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"sanitizedValue",function(){var e=t.props,n=e.input.value,o=e.params;if(null!=o&&o.responsive&&o.responsive){var r={md:n,sm:"",xs:""};return fe()(n)?n:r}return fe()(n)?n.md:n}),(0,B.Z)((0,io.Z)(t),"handleChangeHeading",function(e,n){e.preventDefault();var o=t.props,r=o.params,a=o.input,i=(a.value,a.onChange);if(null!=r&&r.responsive&&r.responsive){var l=be.device||"md";if(fe()(t.state.value)){var c=function(e){for(var t=1;t<arguments.length;t++){var n=null!=
arguments[t]?arguments[t]:{};t%2?Fa(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t.state.value);c[l]=n,t.setState({value:c}),i(c)}else{var s={md:"",sm:"",xs:""};s[l]=n,t.setState({value:s}),i(s)}}else t.setState({value:n}),i(n)}),t.state={value:t.sanitizedValue()},t}return(0,G.Z)(r,
[{key:"render",value:function(){var e,t=this,n=this.props,o=(n.input.value,n.params),r=null!=o.headingsOnly&&o.headingsOnly?["h1","h2","h3","h4","h5","h6"]:["h1","h2","h3","h4","h5","h6","div","p"],a=be.device||"md";return F.createElement("div",{className:"builder-form-group".concat(null!=o.class?" "+o.class:""),"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},o.title&&!o.hideTitle&&F.createElement("label",null,void 0!==o.desc&&""!=o.desc?F.createElement(er.Z,{content:o.desc,tagName:"span"},
o.title):o.title),F.createElement("div",{className:"builder-nav-tabs builder-tab-button-group"},r.map(function(e){return F.createElement("span",{key:e,className:"builder-nav-item".concat(null!=o&&o.responsive&&o.responsive?e==t.state.value[a]?" active":"":e==t.state.value?" active":""),onClick:function(n){return t.handleChangeHeading(n,e)},role:"button"},F.createElement(co,{name:"tag".concat(Hr()(e))}))})))}}]),r}(F.Component);const Wa=Va,Ka=function(e){var t=e.input;return F.createElement("input",
(0,ao.Z)({"data-field":null==t?void 0:t.name,type:"text",className:"builder-field-hidden"},t,{style:{display:"none"},onChange:function(e){e.preventDefault(),(0,t.onChange)(e.target.value)}}))},Ya=function(e){var t=e.message;return F.createElement("div",{className:"builder-empty-result"},F.createElement(co,{name:"emptyBox",className:"builder-icon-8x builder-text-secondary builder-opacity-4 builder-mb-2"}),F.createElement("div",{className:"builder-empty-message"},F.createElement("div",{dangerouslySetInnerHTML:{__html:t}})))};
const Xa=function(e){(0,H.Z)(c,e);var t,n,o,r,a,i,l=(a=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=(0,z.Z)(a);if(i){var n=(0,z.Z)(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return(0,U.Z)(this,e)});function c(e){var t;return(0,J.Z)(this,
c),(t=l.call(this,e)).uploadInputRef=(0,F.createRef)(null),t.state={iconList:faIconList,iconProviders:[{name:"fontawesome",title:"Font Awesome 5 Free"}],listOpen:!1,icon:"",name:"",filterText:"",activeIconProvider:{name:"fontawesome",title:"Font Awesome 5 Free"},loading:!1},t}return(0,G.Z)(c,[{key:"componentDidMount",value:function(){this.setState({icon:this.props.input.value?this.parseIcon(this.props.input.value):"",name:this.props.input.value?this.parseIcon(this.props.input.value,!0):""})}},{key:"onClickHandle",
value:function(e){e.preventDefault();var t=this.state.listOpen;this.setState({listOpen:!t})}},{key:"setIcon",value:function(e){this.state.listOpen,this.setState({icon:e,name:this.parseIcon(e,!0),listOpen:!1})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({icon:e.input.value})}},{key:"parseIcon",value:function(e){var t=e.split(" ");return 1==t.length&&"fa"==(t=e.split("-"))[0]?"fa "+e:e}},{key:"handleIconFilter",value:function(e){e.preventDefault(),this.setState({filterText:e.target.value})}},
{key:"handleIconProviderChange",value:(o=(0,Ct.Z)(Nt().mark(function e(t){return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:"fontawesome"!==t.name&&t!==this.state.activeIconProvider?(this.getCustomIcons(t),this.setState({activeIconProvider:t})):"fontawesome"===t.name&&this.setState({activeIconProvider:t,iconList:faIconList});case 1:case "end":return e.stop()}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"getCustomIcons",value:(n=(0,Ct.Z)(Nt().mark(function e(t){var n,
o,r,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=pagebuilder_base+"index.php?option=com_jpagebuilder&task=asset.loadIcons",o={name:t.name,title:t.title},this.setState({loading:t.name}),e.next=5,fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify(o)});case 5:return r=e.sent,e.next=8,r.json();case 8:null!=(a=e.sent)&&a.iconList&&this.setState({iconList:JSON.parse(a.iconList)}),this.setState({loading:!1});
case 11:case "end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"uploadCustomIcon",value:(t=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({loading:"upload"}),n=pagebuilder_base+"index.php?option=com_jpagebuilder&task=asset.uploadCustomIcon",(o=new FormData).append("custom_icon",t),e.next=6,fetch(n,{method:"POST",headers:{"X-CSRF-Token":Joomla.getOptions("csrf.token")},body:o});case 6:return r=
e.sent,e.next=9,r.json();case 9:(a=e.sent).data&&(ct(a.data.css_path),this.setState(function(e){return{iconProviders:e.iconProviders.concat({name:a.data.name,title:a.data.title})}})),this.setState({loading:!1});case 12:case "end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"render",value:function(){var e,t=this,n=this.props,o=n.input,r=(o.value,o.onChange),a=(o.name,n.params);return F.createElement("div",{"data-field":null===(e=this.props.input)||void 0===e?void 0:
e.name,className:"builder-form-group builder-form-inline".concat(null!=a.column?" builder-column-"+a.column:"")},a.title&&F.createElement("label",null,void 0!==a.desc&&""!=a.desc?F.createElement(er.Z,{content:a.desc,tagName:"span"},a.title):a.title),F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-gutter-15"},this.state.icon&&F.createElement("div",null,F.createElement("div",{className:"builder-form-field-icon"},F.createElement("span",{className:this.state.icon,"area-hidden":"true"}),
!1!==(null==a?void 0:a.clearable)&&F.createElement("span",{className:"builder-close-button builder-close-button-sm",onClick:function(e){e.preventDefault(),r(""),t.setIcon("")},title:Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_CLEAR"),role:"button"},F.createElement(co,{name:"timesAlt",size:"1x"})))),F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-primary",onClick:this.onClickHandle.bind(this),role:"button"},this.state.icon?"".concat(Joomla.JText._("COM_JPAGEBUILDER_REPLACE_ICON")):
"".concat(Joomla.JText._("COM_JPAGEBUILDER_CHOOSE_ICON"))))),F.createElement(Aa,{isOpen:this.state.listOpen,onClose:function(){return t.setState({listOpen:!1})},cssClass:"builder-modal-dialog-fixed builder-modal-dialog-centered builder-layouts-modal",size:"lg"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return t.setState({listOpen:!1})}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_ICON_LIBRARY"))),
F.createElement(Oa,null,F.createElement("div",{className:"builder-modal-container"},F.createElement("div",{className:"builder-modal-main builder-flex-stack"},F.createElement("div",{className:"builder-flex-stack-item builder-flex-stack-item-icons-search builder-mb-4"},F.createElement("div",{className:"builder-has-icon-left builder-w-100"},F.createElement(co,{name:"search",className:"builder-form-icon"}),F.createElement("input",{type:"text",className:"builder-form-field builder-form-field-lg",onChange:this.handleIconFilter.bind(this),
autoComplete:"off",placeholder:"Search for icons"}))),this.state.iconList.length>0?F.createElement("div",{className:"builder-flex-auto builder-flex-stack-item-scrollable builder-position-relative"},F.createElement("div",{className:"builder-media-icon-list"},this.state.iconList.map(function(e,n){if(""==t.state.filterText||-1!==e.toLowerCase().indexOf(t.state.filterText.toLowerCase())){var o=t.parseIcon(e.toLowerCase());return F.createElement("div",{key:n},F.createElement("div",{className:"builder-media-icon",
onClick:function(n){n.preventDefault(),t.setIcon(e),r(e)}},F.createElement("div",{className:"builder-media-icon-sign"},F.createElement("span",{className:e,"area-hidden":"true"})),F.createElement("div",{className:"builder-media-icon-name",title:o},o)))}}))):F.createElement("div",{className:"builder-d-flex builder-flex-auto builder-align-items-center builder-justify-content-center"},F.createElement(Ya,{message:Joomla.JText._("COM_JPAGEBUILDER_NO_ICON_FOUND")}))))))))}}]),c}(F.Component);function qa(e,
t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}var $a=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),
function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"sanitizedValue",function(){var e=t.props,n=e.input.value,o=e.params,r={xl:t.convertValue(n),lg:t.convertValue(n),md:t.convertValue(n),sm:"",xs:""};return null!=o&&o.responsive&&o.responsive?fe()(n)?Object.fromEntries(Object.entries(n).map(function(e){var n=(0,j.Z)(e,
2),o=n[0],r=n[1];return[o,t.convertValue(r)]})):r:fe()(n)?n.md:n}),(0,B.Z)((0,io.Z)(t),"convertValue",function(e){var t={"jpb-text-left":"left","jpb-text-right":"right","jpb-text-center":"center","jpb-text-justify":"justify"};return void 0!==(null==t?void 0:t[e])?t[e]:e}),t.state={value:t.sanitizedValue()},t}return(0,G.Z)(r,[{key:"onClickHandle",value:function(e){var t=this.props,n=t.input,o=n.onChange,r=n.value;if(t.params.responsive){var a=be.device||"md";if(fe()(this.state.value)){var i=function(e){for(var t=
1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qa(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},this.state.value);i[a]=i[a]!==e?e:"",this.setState({value:i}),o(i)}else{var l={xl:"",lg:"",md:"",sm:"",xs:""};l[a]=l[a]!==e?e:"",this.setState({value:l}),o(l)}}else r===
e?(this.setState({value:""}),o("")):(this.setState({value:e}),o(e))}},{key:"render",value:function(){var e=this,t=this.props.params,n=t.flex?["flex-start","center","flex-end"]:t.disableJustify?t.disableCenter?["left","right"]:["left","center","right"]:["left","center","right","justify"],o=null!=t&&t.available_options?t.available_options:n,r=be.device;return F.createElement(F.Fragment,null,o.map(function(n,o){return F.createElement("span",{key:o,className:"builder-inline-editor-item"},F.createElement("span",
{className:"builder-inline-editor-button".concat(null!=t&&t.responsive&&t.responsive?n===e.state.value[r]?" active":"":n===e.state.value?" active":""),onClick:function(t){t.preventDefault(),e.onClickHandle(n)},role:"button"},F.createElement(co,{name:"textAlign".concat(Hr()(n))})))}))}}]),r}(F.Component);const Qa=$a;function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),
n.push.apply(n,o)}return n}var ti=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;
return(0,J.Z)(this,r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"sanitizedValue",function(){var e=t.props,n=e.input.value,o=e.params;if(null!=o&&o.responsive&&o.responsive){var r={xl:"",lg:"",md:n,sm:"",xs:""};return fe()(n)?n:r}return fe()(n)?n.md:n}),(0,B.Z)((0,io.Z)(t),"handleChangeHeading",function(e,n){e.preventDefault();var o=t.props,r=o.params,a=o.input,i=(a.value,a.onChange);if(null!=r&&r.responsive&&r.responsive){var l=be.device||"md";if(fe()(t.state.value)){var c=function(e){for(var t=1;t<arguments.length;t++){var n=
null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t.state.value);c[l]=n,t.setState({value:c}),i(c)}else{var s={xl:"",lg:"",md:"",sm:"",xs:""};s[l]=n,t.setState({value:s}),i(s)}}else t.setState({value:n}),i(n)}),t.state={value:t.sanitizedValue()},
t}return(0,G.Z)(r,[{key:"render",value:function(){var e=this,t=this.props,n=(t.input.value,t.params),o=be.device||"md";return F.createElement(F.Fragment,null,["h1","h2","h3","h4","h5","h6","div","p","span"].map(function(t){return F.createElement("span",{key:t,className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button".concat(null!=n&&n.responsive&&n.responsive?t==e.state.value[o]?" active":"":t==e.state.value?" active":""),onClick:function(n){return e.handleChangeHeading(n,
t)},role:"button"},F.createElement(co,{name:"tag".concat(Hr()(t))})))}))}}]),r}(F.Component);const ni=ti;function oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ri(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oi(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const ai=function(e){var t=e.params,n=e.input,o=n.value,r=n.onChange,a=n.name,i=function(){var e=fe()(o)?o:Object.assign({},{url:o}),t=Object.assign({},e);return ri(ri({},t),{},{type:t.type||"url",new_tab:!!t.new_tab,nofollow:!!t.nofollow,noreferrer:!!t.noreferrer,noopener:!!t.noopener})},l=(0,F.useState)(i()),c=(0,j.Z)(l,2),s=
c[0],d=c[1],u=(0,F.useState)([]),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useState)([]),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)({}),y=(0,j.Z)(E,2),_=y[0],w=y[1],x=(0,F.useState)(""),I=(0,j.Z)(x,2),O=I[0],C=I[1],A=(0,F.useRef)(null),N=(0,F.useState)(!1),D=(0,j.Z)(N,2),S=D[0],P=D[1];(0,F.useEffect)(function(){k(),R()},[]),(0,F.useEffect)(function(){d(i())},[o]),(0,F.useEffect)(function(){r(s)},[s]),(0,F.useEffect)(function(){C(Z(s))},[p,h,s]);var k=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,
n,o;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&task=page.loadPagesList"),e.next=3,fetch(t,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 3:return n=e.sent,e.next=6,n.json();case 6:(o=e.sent)&&(v(o),"page"===s.type&&T(s[s.type],o));case 8:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),R=function(){var e=
(0,Ct.Z)(Nt().mark(function e(){var t,n,o;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&task=page.loadSiteMenus"),e.next=3,fetch(t,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 3:return n=e.sent,e.next=6,n.json();case 6:(o=e.sent)&&(g(o),"menu"===s.type&&T(s[s.type],o));case 8:case "end":return e.stop()}},e)}));return function(){return e.apply(this,
arguments)}}(),T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find(function(t){return String(t.value)===String(e)});w(t)},L=function(e){var t=Object.assign({},s);t[s.type]=(null==e?void 0:e.value)||"",T(t[t.type],"page"===t.type?p:h),d(t)},M=function(e){var t=null!=e&&e.clearInput?"":e.target.value,n=ri(ri({},s),{},{url:t});d(n)},Z=function(e){var t,n,o,r;if(!e)return"";switch(e.type){case "url":return e.url;
case "menu":return null!==(t=null===(n=h.find(function(t){return t.value===(null==e?void 0:e.menu)}))||void 0===n?void 0:n.label)&&void 0!==t?t:"";case "page":return null!==(o=null===(r=p.find(function(t){return String(t.value)===String(null==e?void 0:e.page)}))||void 0===r?void 0:r.label)&&void 0!==o?o:"";default:return""}},B=s.type;return F.createElement("div",{className:"builder-form-group".concat(null!=t.class?" "+t.class:""),"data-field":a},t.title&&!t.hideTitle&&F.createElement("label",null,
void 0!==t.desc&&""!=t.desc?F.createElement(er.Z,{content:t.desc,tagName:"span"},t.title):t.title),F.createElement("div",{className:"builder-position-relative"},F.createElement("input",{ref:A,placeholder:"https://",className:"builder-form-field builder-form-field-text builder-pe-4",value:O,readOnly:!0,onClick:function(){return P(!S)}}),O&&F.createElement("span",{className:"builder-button builder-button-round builder-media-link-icon",role:"button"},F.createElement(co,{name:"timesAlt",onClick:function(){"url"===
B?M({clearInput:!0}):L({clearInput:!0})}}))),F.createElement($o,{title:t.title,open:S,parent_el:A,modalBodyCss:{padding:0},onHide:function(){return P(!1)},gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement("div",{className:"builder-nav-tabs builder-tab-".concat(t.tabStyle||"pills"," builder-nav-fill builder-mb-2")},["url","menu","page"].map(function(e,t){return F.createElement("span",
{key:t,className:"builder-nav-item".concat(e==B?" active":""),onClick:function(t){t.preventDefault(),function(e){var t=Object.assign({},s);t.type=e||"",T(t[t.type],"page"===t.type?p:h),d(t)}(e)},role:"button",tabIndex:0,onKeyDown:ye},Hr()(e))})),F.createElement("div",{className:"builder-tab-content"},F.createElement("div",{className:"builder-form-group"},"url"==B?F.createElement("div",{className:"builder-position-relative"},F.createElement("input",{placeholder:"https://",className:"builder-form-field builder-form-field-text builder-pe-4",
value:(null==s?void 0:s.url)||"",onChange:M}),""===s.url&&F.createElement("span",{className:"builder-button builder-button-round builder-media-link-icon",role:"button"},F.createElement(co,{name:"upload",onClick:function(){t.setGlobalPanel({name:"media",mediaType:t.mediaType||"attachment",isInsert:!0,inputName:a,inputValue:o})}})),""!==s.url&&F.createElement("span",{className:"builder-button builder-button-round builder-media-link-icon",role:"button"},F.createElement(co,{name:"timesAlt",onClick:function(){return M({clearInput:!0})}}))):
F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",placeholder:"Select ".concat(B),options:"page"==B&&p||h,value:null!=_&&_.label?_:null,isClearable:!0,isSearchable:!0,menuPlacement:"auto",menuPosition:"fixed",name:B+"Link",onChange:L,components:{IndicatorSeparator:function(){return null}}})),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",
className:"builder-field-check",value:null!=s&&s.new_tab?s.new_tab:0,checked:!(null==s||!s.new_tab)&&s.new_tab,onChange:function(){var e=ri(ri({},s),{},{new_tab:!s.new_tab});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_OPEN_IN_NEW_TAB"))),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",className:"builder-field-check",value:null!=s&&s.nofollow?s.nofollow:0,checked:!(null==
s||!s.nofollow)&&s.nofollow,onChange:function(){var e=ri(ri({},s),{},{nofollow:!s.nofollow});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_NO_FOLLOW"))),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",className:"builder-field-check",value:null!=s&&s.noreferrer?s.noreferrer:0,checked:!(null==s||!s.noreferrer)&&s.noreferrer,onChange:function(){var e=ri(ri({},s),{},{noreferrer:!s.noreferrer});
d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_NO_REFERRER"))),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",className:"builder-field-check",value:null!=s&&s.noopener?s.noopener:0,checked:!(null==s||!s.noopener)&&s.noopener,onChange:function(){var e=ri(ri({},s),{},{noopener:!s.noopener});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_NO_OPENER"))))))))},ii=function(e){var t=e.generatedImages,
n=e.formSubmitHandler,o=e.onGenerateWithPrompt,r=(e.onEdit,e.isLoading),a=(e.isSubmitDisabled,e.popover),i=void 0===a?"prompt":a,l={prompt:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE"),reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")},variations:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE_VARIATIONS"),reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")},variationsPreview:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE_VARIATIONS"),
reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")},generativeFill:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE"),reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")},generativeFillPreview:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE"),reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")},expand:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE"),reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")},
expandPreview:{generate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE"),reGenerate:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")}};return F.createElement("div",{className:"builder-ai-image-popover-footer",style:{justifyContent:"end",gap:"variations"===i?0:"16px"}},("variations"===i||t.length>0)&&F.createElement("span",{role:"button",className:"builder-button builder-button-primary",onClick:function(){o()},disabled:r},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_WRITE_NEW_PROMPT")),F.createElement("div",
{className:"variations"===i?"builder-ai-image-popover-footer-button-group-wrapper":""},"variations"!==i&&F.createElement("span",{role:"button",onClick:function(){n()},className:"builder-button builder-button-primary",disabled:r},r?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"}):F.createElement(F.Fragment,null,F.createElement(co,{name:t.length>0?"recycle":"generate",className:"builder-d-inline-flex builder-me-2"}),t.length>0?l[i].reGenerate:l[i].generate))))};
var li=300,ci=300;const si=function(e){var t=e.imageFullPath,n=e.scaleSize,o=e.onDrawEnd,r=(0,F.useState)(),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=Wo(n),s=(0,F.useRef)(null),d=(0,F.useRef)(null);(0,F.useEffect)(function(){var e,t,r=s.current,a=null==r?void 0:r.getContext("2d"),l=d.current,p=Math.min(null!==(e=Number(n))&&void 0!==e?e:0,1.95)-1;if(i&&n!==c&&l&&r&&a){var v=i.height-i.height*p,f=i.width-i.width*p,b=u(v,f),h=b.centerX,g=b.centerY;a.clearRect(0,0,r.width,r.height),r.width=ci,r.height=li,a.drawImage(l,
h,g,f,v);var E=null!==(t=m())&&void 0!==t?t:"";o(E)}},[i,o,c,n]);var u=function(e,t){var n=s.current;return n?{centerX:n.width/2-t/2,centerY:n.height/2-e/2}:{centerX:0,centerY:0}},m=function(){var e=s.current,t=null==e?void 0:e.getContext("2d"),n=d.current;if(e&&t&&n)return e.toDataURL("image/png")};return F.createElement("div",{className:"builder-ai-image-expand-wrapper"},F.createElement("div",{className:"builder-ai-image-expand-canvas-wrapper"},F.createElement("canvas",{ref:s,className:"builder-ai-image-expand-canvas"})),
F.createElement("img",{ref:d,onLoad:function(){var e,t=s.current,n=d.current;if(t&&n){var r=t.getContext("2d");if(r){var a=n.width,i=n.height;t.width=ci,t.height=li;var c,p,v=a/i;v>=1?(c=ci,p=li/v):(c=ci*v,p=li),l({height:p,width:c});var f=u(p,c),b=f.centerX,h=f.centerY;r.drawImage(n,b,h,c,p),r.globalCompositeOperation="destination-out";var g=null!==(e=m())&&void 0!==e?e:"";o(g)}}},src:t,alt:"canvas hidden item",style:{display:"none"}}))};function di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?di(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):di(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
const mi=function(e){var t=e.onChange,n=e.imageFullPath,o=e.onGenerateWithPrompt,r=(0,F.useState)(""),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useState)(1),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)({prompt:"",aspectRatio:"",imageSize:"512x512"}),p=(0,j.Z)(m,2),v=p[0],f=p[1],b=(0,F.useState)(!1),h=(0,j.Z)(b,2),g=h[0],E=h[1],_=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var n,o,r,a,l;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return E(!0),e.prev=1,e.next=4,fetch("".concat(y),
{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({prompt:v.prompt,aspect_ratio:v.aspectRatio,image_size:v.imageSize,image_uri:i,type:"generative_fill"})});case 4:return n=e.sent,e.next=7,n.json();case 7:if(o=e.sent,!(r=o.data).hasOwnProperty("status")||null!=r&&r.status){e.next=11;break}throw new Error(null==r?void 0:r.message);case 11:a=r.data.flatMap(function(e){var t=e.url;return at(t)?t:[]}),t(a,i,v.prompt),e.next=18;
break;case 15:e.prev=15,e.t0=e.catch(1),oe(null!==(l=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==l?l:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 18:return e.prev=18,E(!1),e.finish(18);case 21:case "end":return e.stop()}},e,null,[[1,15,18,21]])}));return function(){return e.apply(this,arguments)}}();return F.createElement("div",null,F.createElement("div",{className:"builder-ai-image-expand-popover"},F.createElement("div",{className:"builder-ai-image-expand-popover-left"},
F.createElement(si,{imageFullPath:n,onDrawEnd:l,scaleSize:d})),F.createElement("div",{className:"builder-ai-image-expand-popover-right",style:{pointerEvents:g?"none":"auto"}},F.createElement("div",{className:"builder-ai-image-expand-popover-field-wrapper"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_EDITOR_SCALE_SIZE")),F.createElement("div",{className:"builder-ai-image-expand-popover-scale-input-wrapper"},F.createElement("input",
{value:d,max:2,min:1,step:.1,type:"range",className:"builder-form-range",onChange:function(e){return u(e.target.value)}}),F.createElement("div",{className:"builder-ai-image-expand-popover-scale-number"},d,"x"))),F.createElement("div",{className:"builder-column-12"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_WHAT_TO_GENERATE")),F.createElement("textarea",{className:"builder-form-field",name:"prompt",rows:6,value:v.prompt,
onChange:function(e){return f(ui(ui({},v),{},{prompt:e.target.value}))}})))))),F.createElement(ii,{generatedImages:[],formSubmitHandler:_,isLoading:g,isSubmitDisabled:0===v.prompt.trim().length,onGenerateWithPrompt:o,popover:"expand"}))},pi=function(e){var t=e.imageFullPath,n=e.brushSize,o=e.onDrawEnd,r=(0,F.useState)(!1),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useState)(!1),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)([]),p=(0,j.Z)(m,2),v=p[0],f=p[1],b=(0,F.useState)([]),h=(0,j.Z)(b,2),g=h[0],E=h[1],
y=(0,F.useRef)(null),_=(0,F.useRef)(null),w=(0,F.useRef)(null);(0,F.useEffect)(function(){if(v.length>1){var e,t=null!==(e=x())&&void 0!==e?e:"";o(t)}else o("")},[o,g,v.length]),(0,F.useEffect)(function(){var e=y.current,t=null==e?void 0:e.getContext("2d");t&&(t.lineWidth=n)},[n]);var x=function(){var e=y.current,t=null==e?void 0:e.getContext("2d"),n=_.current;if(e&&t&&n)return e.toDataURL("image/png")};return F.createElement("div",{className:"builder-ai-image-masking-canvas"},F.createElement("div",
{className:"builder-ai-image-masking-canvas-wrapper"},F.createElement("canvas",{ref:y,className:"builder-ai-image-masking-canvas-style",onMouseDown:function(e){if(d&&y.current){var t=y.current,n=t.getContext("2d");if(n){var o=t.getBoundingClientRect(),r=(e.clientX-o.left)*(t.width/o.width),a=(e.clientY-o.top)*(t.height/o.height);n.beginPath(),n.moveTo(r,a),l(!0)}}},onMouseMove:function(e){var t=y.current,n=null==t?void 0:t.getContext("2d");if(t&&n){var o=t.getBoundingClientRect(),r=(e.clientX-o.left)*
(t.width/o.width),a=(e.clientY-o.top)*(t.height/o.height);w.current&&(w.current.style.left="".concat(r,"px"),w.current.style.top="".concat(a,"px"),i&&(n.lineTo(r,a),n.stroke()))}},onMouseUp:function(){var e;l(!1);var t=null!==(e=x())&&void 0!==e?e:"";o(t);var n=y.current,r=null==n?void 0:n.getContext("2d");if(n&&r){var a=r.getImageData(0,0,n.width,n.height);f([].concat((0,ue.Z)(v),[a])),E([])}},onMouseEnter:function(){w.current&&(w.current.style.display="block",document.body.style.cursor="none")},
onMouseLeave:function(){w.current&&(w.current.style.display="none",document.body.style.cursor="auto")}}),F.createElement("div",{ref:w,className:"builder-ai-image-masking-canvas-custom-cursor",style:{height:"".concat(n,"px"),width:"".concat(n,"px")}})),F.createElement("div",{className:"builder-ai-image-masking-canvas-undo-wrapper"},F.createElement("button",{type:"button",className:"builder-button builder-button-icon",onClick:function(e){e.preventDefault(),e.stopPropagation(),function(){if(0!==v.length){var e=
(0,ue.Z)(v),t=e.pop();at(t)&&E([].concat((0,ue.Z)(g),[t]));var n=y.current,o=null==n?void 0:n.getContext("2d");n&&o&&(o.clearRect(0,0,n.width,n.height),e.forEach(function(e){o.putImageData(e,0,0)}),f(e))}}()},disabled:1===v.length},F.createElement(co,{name:"undo"})),F.createElement("button",{type:"button",className:"builder-button builder-button-icon",onClick:function(e){e.preventDefault(),e.stopPropagation(),function(){if(0!==g.length){var e=(0,ue.Z)(g),t=e.pop();if(at(t)){f(function(e){return[].concat((0,ue.Z)(e),
[t])});var n=y.current,o=null==n?void 0:n.getContext("2d");n&&o&&(o.putImageData(t,0,0),E(e))}}}()},disabled:0===g.length},F.createElement(co,{name:"redo"}))),F.createElement("img",{ref:_,onLoad:function(){var e=y.current,t=_.current;if(e&&t){var o=e.getContext("2d");if(o){u(!0);var r=t.width,a=t.height;e.width=300,e.height=300;var i=r/a;i>=1?(e.width=300,e.height=300/i):(e.width=300*i,e.height=300),o.drawImage(t,0,0,e.width,e.height),o.globalCompositeOperation="destination-out",o.lineWidth=n,o.lineJoin=
"round",o.lineCap="round";var l=o.getImageData(0,0,e.width,e.height);f([].concat((0,ue.Z)(v),[l])),E([])}}},src:t,alt:"canvas hidden item",style:{display:"none"}}))};function vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vi(Object(n),!0).forEach(function(t){(0,B.Z)(e,
t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const bi=function(e){var t=e.onChange,n=e.imageFullPath,o=e.onGenerateWithPrompt,r=(0,F.useState)(""),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useState)({prompt:"",aspectRatio:"",imageSize:"512x512",brushSize:30}),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)(!1),p=(0,j.Z)(m,2),v=p[0],f=p[1],
b=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var n,o,r,a,l;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,fetch("".concat(y),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({prompt:d.prompt,aspect_ratio:d.aspectRatio,image_size:d.imageSize,image_uri:i,type:"generative_fill"})});case 4:return n=e.sent,e.next=7,n.json();case 7:if(o=e.sent,!(r=o.data).hasOwnProperty("status")||
null!=r&&r.status){e.next=11;break}throw new Error(null==r?void 0:r.message);case 11:a=r.data.flatMap(function(e){var t=e.url;return at(t)?t:[]}),t(a,i,d.prompt),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1);case 18:return e.prev=18,f(!1),e.finish(18);case 21:case "end":return e.stop()}},e,null,[[1,15,18,21]])}));return function(){return e.apply(this,arguments)}}();return F.createElement("div",null,F.createElement("div",{className:"builder-ai-image-magic-fill"},F.createElement("div",{className:"builder-ai-image-magic-fill-left"},
F.createElement(pi,{imageFullPath:n,onDrawEnd:l,brushSize:d.brushSize})),F.createElement("div",{className:"builder-ai-image-magic-fill-right"},F.createElement("div",{className:"builder-ai-image-magic-fill-field-wrapper"},F.createElement("div",{className:"builder-column-12"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_EDITOR_BRUSH_SIZE")),F.createElement("div",{className:"builder-ai-image-magic-fill-input-wrapper"},
F.createElement("input",{value:d.brushSize,max:50,min:10,type:"range",className:"builder-form-range",onChange:function(e){return u(fi(fi({},d),{},{brushSize:e.target.value}))}}),F.createElement("input",{value:d.brushSize,type:"number",min:10,max:50,className:"builder-form-field",onChange:function(e){return u(fi(fi({},d),{},{brushSize:e.target.value}))}})))),F.createElement("div",{className:"builder-column-12"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_WHAT_TO_GENERATE")),
F.createElement("textarea",{className:"builder-form-field",name:"prompt",rows:6,value:d.prompt,onChange:function(e){return u(fi(fi({},d),{},{prompt:e.target.value}))}})))))),F.createElement(ii,{generatedImages:[],formSubmitHandler:b,isLoading:v,isSubmitDisabled:!i||0===d.prompt.trim().length,onGenerateWithPrompt:o,popover:"generativeFill"}))};var hi=n(3279),gi=n.n(hi);const Ei=function(e){var t,n,o,r,a,i=(0,F.useRef)(null),l=e.topGap,c=void 0===l?0:l,s=e.parent_el,d=e.position,u=e.open,m=e.children,
p=e.onHide,v=e.scroll_target,f=void 0===v?window:v,b=e.className,h=(t=i,n=(0,F.useState)(!1),o=(0,j.Z)(n,2),r=o[0],a=o[1],(0,F.useEffect)(function(){var e=function(e){t&&null!==t.current&&!t.current.contains(e.target)&&a(!r)};return r&&t&&(window.addEventListener("click",e),window.iWindow.addEventListener("click",e)),function(){window.removeEventListener("click",e),window.iWindow.removeEventListener("click",e)}},[r,t]),[r,a]),g=(0,j.Z)(h,2),E=g[0],y=g[1];(0,F.useEffect)(function(){y(!!u)},[u]),(0,F.useEffect)(function(){E?
w():(i.current&&(i.current.style.visibility="hidden"),p&&p())},[E]),(0,F.useEffect)(function(){if(f)return f.addEventListener("scroll",_),function(){f.removeEventListener("scroll",_)}},[_,s,f]);var _=gi()(function(){w()}),w=function(){if(s.current&&i.current){var e=s.current.getBoundingClientRect(),t=i.current.getBoundingClientRect(),n=x(e,t,d);if("bottom"===n&&(i.current.style.top=e.top+e.height+c+"px"),"top"===n){var o=e.top-t.height+c;i.current.style.top=o+"px"}var r=window.innerWidth||document.documentElement.clientWidth;
e.left+i.current.getBoundingClientRect().width>r?(i.current.style.left="auto",i.current.style.right="10px"):d.center?i.current.style.left=e.left+e.width/2+"px":i.current.style.left=e.left+"px",i.current.style.visibility="visible"}},x=function(e,t,n){if(n.bottom)return e.bottom+t.height>window.innerHeight?"top":"bottom"};return(0,V.createPortal)(F.createElement(F.Fragment,null,E&&F.createElement("div",{ref:i,style:{position:"fixed",zIndex:5E9},className:b},m)),document.body)};var yi=[{value:"1:1",
label:"Square (1:1)"},{value:"3:2",label:"Landscape (3:2)"},{value:"4:3",label:"Landscape (4:3)"},{value:"16:9",label:"Landscape (16:9)"},{value:"2:3",label:"Portrait (2:3)"},{value:"3:4",label:"Portrait (3:4)"},{value:"9:16",label:"Portrait (9:16)"}];const _i=function(e){var t=e.image,n=e.onInsert,o=e.onEdit,r=e.popover,a=e.isSkeletonOnly,i=void 0!==a&&a,l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(!1),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useRef)(null),b=(0,F.useRef)(null);return i?
F.createElement("div",{className:"builder-ai-generated-image-button builder-ai-image-generated-skeleton-wrapper",style:{pointerEvents:"none"}},F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"})):F.createElement("div",{className:"builder-ai-generated-image-button",style:{pointerEvents:s?"auto":"none"}},F.createElement("img",{ref:f,src:t,alt:"Generated alt text",style:{display:"none"},onLoad:function(){f.current&&(f.current.style.display="block",d(!0))}}),
F.createElement("div",{"data-action-buttons":!0,className:"builder-ai-generated-image-action-button-wrapper",style:{maxWidth:r&&"variations"!==r?"auto":"72px"}},"variationsPreview"!==r&&F.createElement("span",{role:"button",title:"Generate Variants",className:"builder-button builder-button-primary builder-ai-generated-image-action-button",onClick:function(){return o(t,"variation")},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"variations"})),F.createElement("span",{ref:b,role:"button",title:"Insert",
className:"builder-button builder-button-primary builder-ai-generated-image-action-button",onClick:function(){return v(!0)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"accept"})),F.createElement(Ei,{open:p,parent_el:b,onHide:function(){return v(!1)},position:{bottom:!0,center:!0}},F.createElement("div",{className:"builder-backdrop builder-backdrop-color",onClick:function(){return v(!1)},role:"presentation"}),F.createElement("div",{className:"builder-list-group builder-is-card builder-context-sub-menu builder-context-sub-menu-dropdown"},
yi.map(function(e){return F.createElement("span",{key:e.value,className:"builder-list-item builder-list-item-action",onClick:function(){n(t,e.value),v(!1)},role:"button",onKeyDown:ye,tabIndex:0},e.label)})))),!s&&F.createElement("div",{className:"builder-ai-generated-image-button builder-ai-image-generated-skeleton-wrapper",style:{pointerEvents:"none"}},F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"})))};var wi="".concat(I,"empty_ai_image.svg");const xi=
function(e){var t=e.generatedImages,n=e.isLoading,o=e.onInsert,r=e.onEdit,a=e.popover;if(0===t.length&&!n)return F.createElement("div",{className:"builder-ai-image-generated-list-wrapper"},F.createElement("img",{src:wi,alt:"empty State"}),F.createElement("div",{className:"builder-ai-image-generated-list-wrapper-text"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_CREATE_USING_PROMPT")));var i=0===t.length&&n;return F.createElement("div",{className:"builder-ai-image-generated-wrapper",style:{pointerEvents:n?
"none":"auto"}},(i?(4,Array.from(Array(4).keys())):t).map(function(e){return F.createElement(_i,{key:e,image:String(e),onInsert:function(e,t){return o(String(e),t)},onEdit:r,popover:a,isSkeletonOnly:i})}))};function Ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Oi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?
arguments[t]:{};t%2?Ii(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ci={prompt:"",imageSize:"256x256",aspectRatio:"1:1"};const Ai=function(e){var t=e.onClose,n=e.onEdit,o=e.onChange,r=e.isLoading,a=e.prompt,i=e.generatedImages,l=e.imageSize,c=e.setCurrentlyGeneratedItems,s=(0,F.useState)(i),
d=(0,j.Z)(s,2),u=d[0],m=d[1],p=(0,F.useState)(Oi(Oi({},Ci),{},{prompt:a,imageSize:l})),v=(0,j.Z)(p,2),f=v[0],b=v[1],h=(0,F.useState)(!1),g=(0,j.Z)(h,2),E=g[0],_=g[1],w=(0,F.useState)(!1),I=(0,j.Z)(w,2),O=I[0],C=I[1],A=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==f.prompt.trim().length){e.next=2;break}return e.abrupt("return");case 2:return C(!0),e.prev=3,e.next=6,fetch("".concat(y),{method:"POST",headers:{"Content-Type":"application/json",
"X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({prompt:f.prompt,image_size:f.imageSize,type:"image"})});case 6:return t=e.sent,e.next=9,t.json();case 9:if(n=e.sent,!(o=n.data).hasOwnProperty("status")||null!=o&&o.status){e.next=13;break}throw new Error(null==o?void 0:o.message);case 13:return e.abrupt("return",o);case 16:e.prev=16,e.t0=e.catch(3),oe(null!==(r=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==r?r:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 19:return e.prev=
19,C(!1),e.finish(19);case 22:case "end":return e.stop()}},e,null,[[3,16,19,22]])}));return function(){return e.apply(this,arguments)}}(),N=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:(t=e.sent)&&(n=null==t?void 0:t.data.flatMap(function(e){var t=e.url;return at(t)?t:[]}),m(n),c(n));case 4:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return F.createElement("div",
{className:"builder-ai-image-generator-wrapper"},E||r?F.createElement("div",{className:"builder-ai-image-generator-loading-wrapper"},F.createElement("div",{className:"builder-spinner"})):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-ai-image-generator-list-wrapper"},F.createElement(xi,{generatedImages:u,isLoading:O,onInsert:function(){var e=(0,Ct.Z)(Nt().mark(function e(n,r){var a,i,l,c;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _(!0),e.prev=
1,e.next=4,fetch(x,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({url:n,aspect_ratio:r})});case 4:return a=e.sent,e.next=7,a.json();case 7:i=e.sent,l=i.data,o(null==l?void 0:l.path),t(),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),oe(null!==(c=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==c?c:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 16:return e.prev=16,_(!1),e.finish(16);case 19:case "end":return e.stop()}},
e,null,[[1,13,16,19]])}));return function(t,n){return e.apply(this,arguments)}}(),onEdit:function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n.apply(void 0,t.concat([f.prompt,f.imageSize]))}}),F.createElement("form",null,F.createElement("div",{className:"builder-ai-image-generator-filed-wrapper"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_WHAT_TO_GENERATE")),F.createElement("textarea",
{className:"builder-form-field",placeholder:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_INPUT_PLACEHOLDER"),value:f.prompt,onChange:function(e){return b(Oi(Oi({},f),{},{prompt:e.target.value}))}})),F.createElement("div",{className:"builder-form-group"},F.createElement(ga,{input:{onChange:function(e){b(Oi(Oi({},f),{},{imageSize:e}))},value:f.imageSize},params:{title:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_SIZE"),values:[{label:"256px",value:"256x256"},{label:"512px",value:"512x512"},
{label:"1024px",value:"1024x1024"}]}}))))),F.createElement(ii,{generatedImages:u,formSubmitHandler:N,onGenerateWithPrompt:function(){b(Ci),m([])},isLoading:O})))},Ni=function(e){var t=e.onClose,n=e.onChange,o=e.onInsert,r=e.imageFullPath,a=e.imageUri,i=e.prompt,l=e.onEdit,c=e.popover,s=e.generatedImages,d=e.isLoading,u=void 0!==d&&d,m=e.onGenerateWithPrompt,p=(0,F.useRef)(null),v=(0,F.useRef)(null),f=(0,F.useState)(!1),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)({imageSize:"512x512",aspectRatio:"16:9"}),
_=(0,j.Z)(E,2),w=_[0],I=(_[1],(0,F.useState)(!1)),O=(0,j.Z)(I,2),C=O[0],A=O[1],N=(0,F.useState)(!1),D=(0,j.Z)(N,2),S=D[0],P=D[1],k=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,o,r,l,s;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),e.prev=1,e.next=4,fetch("".concat(y),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({prompt:i,image_size:w.imageSize,image_uri:a,type:"variationsPreview"===
c?"variation":"generative_fill"})});case 4:return t=e.sent,e.next=7,t.json();case 7:if(o=e.sent,!(r=o.data).hasOwnProperty("status")||null!=r&&r.status){e.next=11;break}throw new Error(null==r?void 0:r.message);case 11:l=r.data.flatMap(function(e){var t=e.url;return at(t)?t:[]}),n(l),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),oe(null!==(s=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==s?s:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 18:return e.prev=18,A(!1),e.finish(18);
case 21:case "end":return e.stop()}},e,null,[[1,15,18,21]])}));return function(){return e.apply(this,arguments)}}();return(0,F.useEffect)(function(){0===s.length&&k()},[s.length]),F.createElement("div",null,u||S?F.createElement("div",{className:"builder-ai-image-generator-loading-wrapper"},F.createElement("div",{className:"builder-spinner"})):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-ai-image-preview-wrapper"},F.createElement("div",{className:"builder-ai-image-preview-wrapper-left ".concat(!h||
["generativeFill","expandPreview"].includes(c)?"builder-ai-image-preview-wrapper-left-img":""," ").concat("expandPreview"===c?"builder-ai-image-preview-wrapper-left-transparent":"")},F.createElement("p",null,"Original Photo"),F.createElement("img",{ref:v,src:r,alt:"selected",onLoad:function(){if(g(!0),"variationsPreview"!==c&&"variations"!==c){var e=p.current,t=v.current;if(e&&t){var n=e.getContext("2d");if(n){var o=t.width,r=t.height;e.width=282,e.height=282;var a=o/r;a>=1?(e.width=282,e.height=
282/a):(e.width=282*a,e.height=282),n.drawImage(t,0,0,e.width,e.height)}}}}}),!h&&F.createElement("div",{className:"builder-ai-image-generated-skeleton-wrapper",style:{pointerEvents:"none",height:"282px",width:"282px"}},F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"})),["generativeFill","expandPreview"].includes(c)&&F.createElement("canvas",{ref:p})),F.createElement("div",null,F.createElement(xi,{generatedImages:s,isLoading:C,onInsert:function(){var e=
(0,Ct.Z)(Nt().mark(function e(n,r){var a,i,l,c;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),e.prev=1,e.next=4,fetch(x,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({url:n,aspect_ratio:r})});case 4:return a=e.sent,e.next=7,a.json();case 7:i=e.sent,l=i.data,o(null==l?void 0:l.src.replace(/^\/+/,"")),t(),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),oe(null!==(c=null===e.t0||void 0===
e.t0?void 0:e.t0.message)&&void 0!==c?c:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 16:return e.prev=16,P(!1),e.finish(16);case 19:case "end":return e.stop()}},e,null,[[1,13,16,19]])}));return function(t,n){return e.apply(this,arguments)}}(),onEdit:l,popover:c}))),F.createElement(ii,{generatedImages:s,formSubmitHandler:k,isLoading:C,onGenerateWithPrompt:m,popover:c})))},Di=function(e){var t=e.onChange,n=e.imageFullPath,o=e.imageUri,r=e.onGenerateWithPrompt,a=e.onEdit,i=e.isLoading,l=(0,F.useState)({imageSize:"512x512",
aspectRatio:"16:9"}),c=(0,j.Z)(l,1)[0],s=(0,F.useState)(!1),d=(0,j.Z)(s,2),u=d[0],m=d[1],p=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var n,r,a,i,l;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.next=4,fetch("".concat(y),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({image_size:c.imageSize,image_uri:o,type:"variation"})});case 4:return n=e.sent,e.next=7,n.json();case 7:if(r=
e.sent,!(a=r.data).hasOwnProperty("status")||null!=a&&a.status){e.next=11;break}throw new Error(null==a?void 0:a.message);case 11:i=a.data.flatMap(function(e){var t=e.url;return at(t)?t:[]}),t(i),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),oe(null!==(l=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==l?l:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 18:return e.prev=18,m(!1),e.finish(18);case 21:case "end":return e.stop()}},e,null,[[1,15,18,21]])}));return function(){return e.apply(this,
arguments)}}(),v=i||u;return F.createElement("div",{className:"builder-ai-image-variation"},v?F.createElement("div",{className:"builder-ai-image-generator-loading-wrapper"},F.createElement("div",{className:"builder-spinner"})):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-ai-image-variation-wrapper"},F.createElement("img",{src:n,alt:"variation"}),F.createElement("div",{className:"builder-ai-image-variation-action-wrapper"},F.createElement("span",{title:"Generate Variants",
className:"builder-button builder-button-primary",onClick:function(){p()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"variations"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_VARIATIONS")))),F.createElement(ii,{generatedImages:[],formSubmitHandler:p,isLoading:u,onGenerateWithPrompt:r,onEdit:a,popover:"variations"})))},Si=function(e){var t=e.isOpen,n=e.onClose,o=e.onChange,r=e.imageFullPath,a=e.imageUri,i=e.triggerRef,l=e.popoverGap,c=void 0===l?20:l,s=a.length>0?"variations":
"prompt",d=(0,F.useState)(s),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useState)([]),f=(0,j.Z)(v,2),b=f[0],h=f[1],g=(0,F.useState)(r),E=(0,j.Z)(g,2),y=E[0],_=E[1],x=(0,F.useState)(a),I=(0,j.Z)(x,2),O=I[0],C=I[1],A=(0,F.useState)(""),N=(0,j.Z)(A,2),D=N[0],S=N[1],P=(0,F.useState)(T),k=(0,j.Z)(P,2),R=k[0],L=k[1],M=(0,F.useState)([]),Z=(0,j.Z)(M,2),B=Z[0],J=Z[1],G=(0,F.useState)(!1),H=(0,j.Z)(G,2),U=H[0],z=H[1];(0,F.useEffect)(function(){p(s),_(r),C(a)},[r,a]);var V=function(e){var t=arguments.length>1&&void 0!==
arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;J([].concat((0,ue.Z)(B),[{popover:m,imagePath:y,imageUriPath:O,generatedImages:b,prompt:t,imageSize:n}])),p(e),S(t),L(n),"variationsPreview"===e&&h([])},W=function(){J([]),h([]),L(T),S("")},K=function(){p(s),h([]),n(),S("")},Y=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.trim().length){e.next=2;break}return e.abrupt("return");
case 2:return z(!0),e.prev=3,e.next=6,fetch("".concat(w),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({image_uri:t})});case 6:return n=e.sent,e.next=9,n.json();case 9:if(o=e.sent,!(r=o.data).hasOwnProperty("status")||null!=r&&r.status){e.next=13;break}throw new Error(null==r?void 0:r.message);case 13:return e.abrupt("return",r);case 16:e.prev=16,e.t0=e.catch(3),oe(null!==(a=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&
void 0!==a?a:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 19:return e.prev=19,z(!1),e.finish(19);case 22:case "end":return e.stop()}},e,null,[[3,16,19,22]])}));return function(t){return e.apply(this,arguments)}}();return F.createElement($o,{title:F.createElement("div",{className:"builder-d-flex builder-align-items-center"},!["prompt","variations"].includes(m)&&F.createElement("button",{className:"builder-button builder-button-icon",onClick:function(){if(B.length>0){var e=B[B.length-1];
J(B.slice(0,B.length-1)),p(e.popover),_(e.imagePath),C(e.imageUriPath),h(e.generatedImages),S(e.prompt),L(e.imageSize)}}},F.createElement(co,{name:"arrowLeft",height:20,width:20})),F.createElement("div",null,function(){switch(m){case "variationsPreview":return Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_VARIATIONS");case "generativeFill":case "generativeFillPreview":return Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_MAGIC_FILL");case "expand":return Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_EXPAND_IMAGE");
case "expandPreview":return Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_BACK_TO_EDITOR");default:return Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_IMAGE_GENERATOR")}}())),portalPopoverCss:{maxWidth:"756px",width:"100%"},open:t,parent_el:i,onHide:K,gap:c,modalBodyCss:{padding:"0px"},hideFooter:!0},F.createElement("div",{className:"builder-card builder-card-popover builder-p-0"},function(){switch(m){case "variations":return F.createElement(Di,{isLoading:U,onChange:function(e){h(e),V("variationsPreview")},
onGenerateWithPrompt:function(){p("prompt"),W()},onEdit:function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.length>0&&a.startsWith("http"))){e.next=8;break}return e.next=3,Y(a);case 3:if((n=e.sent).status){e.next=6;break}return e.abrupt("return");case 6:_(n.dataUrl),C(n.dataUrl);case 8:V("magicFill"===t?"generativeFill":"expand");case 9:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),
imageFullPath:y,imageUri:O});case "variationsPreview":return F.createElement(Ni,{onClose:K,onChange:function(e){return h(e)},onInsert:o,onGenerateWithPrompt:function(){V("prompt"),W()},generatedImages:b,imageFullPath:y,imageUri:O,isLoading:U,onEdit:function(){var e=(0,Ct.Z)(Nt().mark(function e(t,n){var o;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y(t);case 2:if((o=e.sent).status){e.next=5;break}return e.abrupt("return");case 5:_(o.dataUrl),C(o.dataUrl),V("expand"===
n?"expand":"generativeFill");case 8:case "end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),popover:"variationsPreview"});case "generativeFill":return F.createElement(bi,{onChange:function(e,t,n){h(e),V("generativeFillPreview",n),_(t),C(t)},onGenerateWithPrompt:function(){p("prompt"),W()},imageFullPath:y,imageUri:O});case "generativeFillPreview":return F.createElement(Ni,{onClose:K,onChange:function(e){return h(e)},onInsert:o,onGenerateWithPrompt:function(){p("prompt"),
W()},prompt:D,generatedImages:b,imageFullPath:y,imageUri:O,isLoading:U,onEdit:function(){var e=(0,Ct.Z)(Nt().mark(function e(t,n){var o;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("variation"!==n){e.next=5;break}return _(t),C(t),V("variationsPreview"),e.abrupt("return");case 5:return e.next=7,Y(t);case 7:(o=e.sent).status&&(_(o.dataUrl),C(o.dataUrl),V("expand"));case 9:case "end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),popover:"generativeFill"});
case "expand":return F.createElement(mi,{onChange:function(e,t,n){h(e),V("expandPreview",n),_(t),C(t)},onGenerateWithPrompt:function(){p("prompt"),W()},imageFullPath:y,imageUri:O});case "expandPreview":return F.createElement(Ni,{onClose:K,onChange:function(e){return h(e)},onInsert:o,onGenerateWithPrompt:function(){p("prompt"),W()},prompt:D,generatedImages:b,imageFullPath:y,imageUri:O,isLoading:U,onEdit:function(){var e=(0,Ct.Z)(Nt().mark(function e(t,n){var o;return Nt().wrap(function(e){for(;;)switch(e.prev=
e.next){case 0:if("variation"!==n){e.next=5;break}return _(t),C(t),V("variationsPreview"),e.abrupt("return");case 5:return e.next=7,Y(t);case 7:(o=e.sent).status&&(_(o.dataUrl),C(o.dataUrl),V("generativeFill"));case 9:case "end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),popover:"expandPreview"});default:return F.createElement(Ai,{onClose:K,onChange:o,isLoading:U,prompt:D,imageSize:R,generatedImages:b,setCurrentlyGeneratedItems:function(e){h(e)},onEdit:function(){var e=
(0,Ct.Z)(Nt().mark(function e(t,n,o,r){var a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("variation"!==n){e.next=5;break}return _(t),C(t),V("variationsPreview",o,r),e.abrupt("return");case 5:return e.next=7,Y(t);case 7:(a=e.sent).status&&_(a.dataUrl),V("magicFill"===n?"generativeFill":"expand",o,r);case 10:case "end":return e.stop()}},e)}));return function(t,n,o,r){return e.apply(this,arguments)}}()})}}()))};var Pi=function(e){return{type:"ADD_ROW",payload:e}},ki=function(e){return{type:"REMOVE_ROW",
payload:{rowId:e}}},Ri=function(e,t){return{type:"REMOVE_COLUMN",payload:{rowId:e,columnId:t}}},Ti=function(e,t,n){return{type:"REMOVE_ADDON",payload:{rowId:e,columnId:t,addonId:n,referenceId:arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0}}},Li=function(e){return{type:"REMOVE_COLLECTION_ADDON_ITEM",payload:{rowId:e.rowId,columnId:e.columnId,addonIndex:e.addonIndex,collectionItemAddonIndex:e.collectionItemAddonIndex}}},Mi=function(e){return{type:"DUPLICATE_ROW",payload:e}},Zi=function(e){return{type:"DUPLICATE_DEEP_CONTENT_ITEM",
payload:e}},ji=function(e,t){return{type:"DUPLICATE_COLUMN",payload:{rowId:e,columnId:t}}},Bi=function(e){return{type:"DUPLICATE_DEEP_ADDON",data:e}},Ji=function(e){return{type:"PASTE_ADDON_NEW",payload:{rowIndex:e.rowIndex,pasteOptions:e.pasteOptions}}},Gi=function(e,t){return{type:"PASTE_ROW",payload:{rows:t,index:e}}},Hi=function(e){return{type:"PASTE_OR_INSERT_NESTED_ROW",payload:e}},Ui=function(e){return{type:"EDIT_DEEP_ADDON_TITLE",payload:e}},zi=function(e){var t="ROW_SETTING";return"row"===
e.type?t="ROW_SETTING":"column"===e.type?t="COLUMN_SETTING":"addon"===e.type?t=""===e.settings.addonIndex?"ADDON_SETTING":"ADDON_EDIT":"inner_row"===e.type?t="INNER_ROW_SETTING":"inner_column"===e.type?t="INNER_COLUMN_SETTING":"inner_addon"===e.type&&(t=void 0===e.settings.addonInnerIndex?"ADDON_INNER_SETTING":"ADDON_INNER_EDIT"),{type:t,index:e.index,settings:e.settings}},Fi=function(e){return{type:"IMPORT_PAGE",page:e}},Vi=function(e,t,n){return{type:"TOGGLE_COLUMN",index:e,settings:{colIndex:t,
id:n}}},Wi=function(e){return{type:"PASTE_OR_INSERT_SECTION",payload:e}},Ki=function(e){return{type:"ADD_BLOCK_AS_NESTED_SECTION",payload:e}},Yi=function(e){return{type:"SET_PAGE_SETTINGS_DATA",payload:e}},Xi=function(e,t){return{type:"MOVE_ADDON_ITEMS",payload:{dragInfo:e,hoverInfo:t}}},qi=function(e,t,n){return{type:"SORT_COLLECTION_ADDON",payload:{dragInfo:e,hoverInfo:t,isEmptyChild:n}}},$i=function(e,t){return{type:"SORT_ADDON_WITH_COLLECTION_ITEM_ADDON",payload:{dragInfo:e,hoverInfo:t}}},Qi=
function(e){return{type:"MOVE_COLUMN_ITEMS",payload:{dragSectionIdx:e.dragSectionIdx,dragColIdx:e.dragColIdx,hoverSectionIdx:e.hoverSectionIdx,hoverColIdx:e.hoverColIdx}}},el=function(e){return{type:"CHANGE_ADMIN_LABEL",payload:e}},tl=function(e){return{type:"CHANGE_VISIBILITY",payload:e}},nl=n(2166);const ol=function(e){var t=e.isOpen,n=e.closeModal,o=e.title,r=void 0===o?Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_CONFIRMATION_TITLE"):o,a=e.consentBody,i=void 0===a?Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DEFAULT_CONFIRMATION"):
a,l=e.confirmAction,c=void 0===l?Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_CONFIRM"):l,s=e.btnVariant,d=void 0===s?"primary":s,u=e.handleConfirmation,m=void 0===u?ye:u;return F.createElement(Aa,{isOpen:t,onClose:function(){return n()},cssClass:"builder-modal-dialog-centered"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return n()}},F.createElement("span",{className:"builder-modal-header-title"},r)),F.createElement(Oa,{className:"builder-modal-consent-body"},
F.createElement("div",null,i)),F.createElement(Ca,null,F.createElement("div",{className:"builder-d-flex justify-content-end"},F.createElement("button",{type:"button",onClick:function(){n()},className:"builder-button builder-button-primary"},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")),F.createElement("button",{type:"button",className:"builder-button builder-button-".concat(d," builder-ms-2"),onClick:function(){n(),m()}},c)))))};const rl=function(e){(0,H.Z)(r,e);var t,n,
o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t,n,a,i,l,c,s,d,u;(0,J.Z)(this,r),u=o.call(this,e),(0,B.Z)((0,io.Z)(u),
"getFilename",function(e){var t=e.path.lastIndexOf("/");return e.path.substr(t+1)||""}),(0,B.Z)((0,io.Z)(u),"trimFilename",function(e){if(!e)return"";var t=e.split(".");return 0===t.length?"":t.length>=1?t[0]:void 0}),(0,B.Z)((0,io.Z)(u),"getFileExtension",function(e){if(!e)return"";var t=e.split(".");return 0===t.length?"":t.length>=1?t[1]:void 0}),(0,B.Z)((0,io.Z)(u),"renameFile",(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r,a,i,l,c;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=
u.props,o=n.item,r=n.handleUpdateMediaItems,o.title!==u.state.fileName){e.next=3;break}return e.abrupt("return");case 3:return a={id:o.id,title:u.state.fileName,path:o.path,thumb:o.thumb},i="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=media.renameMedia"),e.next=7,fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify(a)});case 7:return l=e.sent,e.next=10,l.json();case 10:null!=(c=e.sent)&&null!==(t=
c.data)&&void 0!==t&&t.status?(ne(Joomla.JText._(c.data.data),Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),r()):oe(Joomla.JText._(c.data.data),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 12:case "end":return e.stop()}},e)}))),(0,B.Z)((0,io.Z)(u),"handleClickMediaItem",function(e){return function(){e||u.props.onHandleItemClick(u.props.item)}}),u.state={activeMenu:!1,editState:!1,fileName:u.trimFilename(u.getFilename(e.item)),fileExt:u.getFileExtension(u.getFilename(e.item))},u.canCreate=
null!==(t=null===(n=userPermissions)||void 0===n?void 0:n.create)&&void 0!==t&&t,u.canDelete=null!==(a=null===(i=userPermissions)||void 0===i?void 0:i.delete)&&void 0!==a&&a;var m=null!==(l=null===(c=userPermissions)||void 0===c?void 0:c.edit)&&void 0!==l&&l,p=null!==(s=null===(d=userPermissions)||void 0===d?void 0:d.edit_own)&&void 0!==s&&s;return u.canEdit=m||p&&userPermissions.user_id===e.item.created_by,u}return(0,G.Z)(r,[{key:"displayMediaFileFormate",value:function(e){var t;switch(e){case "mp4":case "mov":case "wmv":case "avi":case "mpg":case "ogv":case "3gp":case "3g2":t=
{type:"video",icon:"videoCameraDuo"};break;case "mp3":case "m4a":case "ogg":case "wav":t={type:"audio",icon:"music"};break;case "doc":case "docx":case "odt":t={type:"document",icon:"wordDuo"};break;case "key":case "ppt":case "pptx":case "pps":case "ppsx":t={type:"presentation",icon:"powerpointDuo"};break;case "xls":case "xlsx":case "csv":t={type:"excel",icon:"excelDuo"};break;case "pdf":t={type:"pdf",icon:"pdfDuo"};break;case "zip":t={type:"archive",icon:"zipDuo"};break;default:t={type:"image",icon:"image"}}return t}},
{key:"renderDropdown",value:function(){var e=this;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-dropdown-overlay",onClick:function(){return e.setState({activeMenu:!1})}}),F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown"},F.createElement("div",{className:"builder-list-item builder-list-item-action".concat(this.canEdit?"":" disabled"),onClick:function(t){t.preventDefault(),e.canEdit&&e.setState({activeMenu:!1,editState:!0})}},
F.createElement(co,{name:"pencil",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_RENAME")),F.createElement("div",{className:"builder-list-item builder-list-item-delete builder-list-item-action".concat(this.canDelete?"":" disabled"),onClick:function(t){t.preventDefault(),e.canDelete&&(e.setState({activeMenu:!1}),e.props.onHandleDeleteItem())}},F.createElement(co,{name:"trash",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE"))))}},{key:"render",
value:function(){var e,t=this,n=this.props,o=n.item,r=n.mediaTypeToInsert,a=this.displayMediaFileFormate(o.ext),i=0===(null==o?void 0:o.id)?o.title:o.id,l=null===(e=this.props.activeItem)||void 0===e?void 0:e[i],c=r&&r!==o.type;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-card builder-card-selectable builder-card-media".concat(l?" active":""," builder-mb-4"),onClick:this.handleClickMediaItem(c),style:c?{cursor:"not-allowed",opacity:".7"}:void 0},F.createElement("div",
{className:"builder-card-".concat("image"==o.type?"image":"icon builder-card-icon-".concat(a.type))},"image"==o.type?F.createElement("img",{title:this.state.fileName,src:pagebuilder_base+"".concat(null!=o&&o.thumb?o.thumb:o.path),loading:"lazy"}):F.createElement(co,{name:a.icon,size:"9x"}),l?F.createElement("span",{className:"builder-field-check active","area-hidden":"true"}):F.createElement("span",{className:"builder-field-check","area-hidden":"true"})),F.createElement("div",{className:"builder-card-footer"},
this.state.editState?F.createElement("input",{type:"text",className:"builder-form-field",value:this.state.fileName,onChange:function(e){return t.setState({fileName:e.target.value})},autoFocus:!0,onKeyDown:function(e){"Escape"===e.key?(t.setState({editState:!1}),t.setState({fileName:t.trimFilename(t.getFilename(o))})):"Enter"===e.key&&(t.setState({editState:!1}),t.renameFile())}}):F.createElement("span",{className:"builder-card-title builder-text-truncate",title:this.state.fileName,onDoubleClick:function(){return t.setState({editState:!0})}},
"".concat(this.state.fileName,".").concat(this.state.fileExt)),F.createElement("span",{className:"builder-ms-2",onClick:function(e){t.setState({activeMenu:1})}},F.createElement("span",{className:"builder-button builder-button-icon",role:"button"},F.createElement(co,{name:"ellipsisY"}))))),this.state.activeMenu&&this.renderDropdown())}}]),r}(F.Component);function al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}var il=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});
function r(e){var t,n,a,i,l,c,s;return(0,J.Z)(this,r),s=o.call(this,e),(0,B.Z)((0,io.Z)(s),"handleFolderDeletion",function(e){var t,n=s.props.filtered+"/"+e;jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&task=media.delete_folder",data:{folder:n,deleteItem:"multiple"},cache:!1,async:!1,success:function(e){try{var n=jQuery.parseJSON(e);n.status?t=n:alert(n.output)}catch(t){jQuery(".jpagebuilder-media-body-inner").html(e)}},error:function(e){var t,n=e.responseJSON;oe(null==
n||null===(t=n.data)||void 0===t?void 0:t.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"))}}),void 0!==t.status&&t.status&&s.props.onDeleteFolder(t.output)}),(0,B.Z)((0,io.Z)(s),"handleFolderRename",function(e){s.setState({newfolderName:e})}),(0,B.Z)((0,io.Z)(s),"handleFolderRenameSave",function(){var e,t=s.props.filtered+"/"+s.state.newfolderName,n=s.props.filtered+"/"+s.state.oldfolder.name;jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&task=media.rename_folder",
data:{currentfolder:n,newfolder:t,renameItem:"single"},cache:!1,async:!1,success:function(t){try{var n=jQuery.parseJSON(t);n.status?e=n:alert(n.output)}catch(e){jQuery(".jpagebuilder-media-body-inner").html(t)}},error:function(e){var t,n=e.responseJSON;oe(null==n||null===(t=n.data)||void 0===t?void 0:t.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"))}}),void 0!==e.status&&e.status&&s.props.onRenameFolder(s.state.oldfolder,e.output),s.handleItemClick(e.output),s.setState({folderRenameEnable:!1,
newfolderName:"",oldfolder:""})}),(0,B.Z)((0,io.Z)(s),"handleDeleteAction",function(e){if(e.preventDefault(),s.canDelete){var t=s.props,n=t.activeItem,o=t.filtered,r=t.isEmptyFolder,a=t.onHandleDeleteItem,i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?al(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(t){Object.defineProperty(e,
t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},n),l=!1;Object.values(i).forEach(function(e){var t,n=(t=null==e?void 0:e.fullname,(null==e?void 0:e.name)&&t?o+"/"+e.name:null);n&&!r(n)?s.handleFolderDeletion(e.name):l||(a(),l=!0)})}}),s.state={folderRenameEnable:!1,newfolderName:"",oldfolder:"",activeMenu:"",editState:"",folderName:"",isConsentModalOpen:!1,currEvent:null,isDropdownConsentModalOpen:!1},s.canCreate=null!==(t=null===(n=userPermissions)||void 0===n?void 0:n.create)&&void 0!==t&&
t,s.canEdit=null!==(a=null===(i=userPermissions)||void 0===i?void 0:i.edit)&&void 0!==a&&a,s.canDelete=null!==(l=null===(c=userPermissions)||void 0===c?void 0:c.delete)&&void 0!==l&&l,s}return(0,G.Z)(r,[{key:"handleChangeFilter",value:function(e){this.props.onFilterChange(e)}},{key:"handleItemClick",value:function(e){(0==this.props.activeItem.id&&this.props.activeItem.title==e.title||this.props.activeItem.id==e.id&&void 0!==this.props.activeItem.id)&&(e=""),this.props.onHandleItemClick(e)}},{key:"handleCreateFolder",
value:function(e){var t,n=this.props.filtered+"/"+e;jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&task=media.create_folder",data:{folder:n},cache:!1,async:!1,success:function(e){try{var n=jQuery.parseJSON(e);n.status?t=n:alert(n.output)}catch(t){jQuery(".jpagebuilder-media-body-inner").html(e)}}}),void 0!==t.status&&t.status&&this.props.onCreateFolder(t.output)}},{key:"renderDropdown",value:function(e,t){var n=this;return F.createElement(F.Fragment,null,F.createElement("div",
{className:"builder-dropdown-overlay",onClick:function(){return n.setState({activeMenu:!1})}}),F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown"},F.createElement("div",{className:"builder-list-item builder-list-item-action".concat(this.canEdit?"":" disabled"),onClick:function(o){o.preventDefault(),n.canEdit&&n.setState({activeMenu:"",editState:e,oldfolder:t,newfolderName:t.name})}},F.createElement(co,{name:"pencil",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_RENAME")),
F.createElement("div",{className:"builder-list-item builder-list-item-delete builder-list-item-action".concat(this.canDelete?"":" disabled"),onClick:function(t){t.preventDefault(),n.canDelete&&n.setState({activeMenu:"",isDropdownConsentModalOpen:!0,folder:e})}},F.createElement(co,{name:"trash",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE"))))}},{key:"render",value:function(){var e=this,t=this.props,n=t.activeItem,o=t.folders,r=t.breadcrumbs,a=t.filters,i=t.filtered;
return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between builder-px-5"},F.createElement("div",{className:"builder-breadcrumb builder-py-4"},F.createElement("span",{className:"builder-breadcrumb-item"},F.createElement(co,{name:"foldersDuo"})," ",Joomla.JText._("COM_JPAGEBUILDER_FOLDERS")),r.map(function(t,n,o){return F.createElement("span",{key:n,className:"builder-breadcrumb-item".concat(n===o.length-1?" active":
""),onClick:function(n){n.preventDefault(),e.handleChangeFilter(t.path)}},t.label)})),Object.keys(n).length>0&&F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-primary".concat(this.canDelete?"":" disabled"),onClick:function(t){return e.setState({isConsentModalOpen:!0,currEvent:t})}},F.createElement(co,{name:"timesAlt"}),Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE"))),F.createElement(ol,{isOpen:this.state.isConsentModalOpen||this.state.isDropdownConsentModalOpen,
title:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_MEDIA_MANAGER_MODAL_CONSENT_TITLE"),consentBody:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_MEDIA_MANAGER_MODAL_CONSENT_CONFIRM_MESSAGE"),closeModal:function(){return e.setState({isConsentModalOpen:!1,isDropdownConsentModalOpen:!1})},handleConfirmation:function(){e.state.isConsentModalOpen&&e.state.currEvent&&e.handleDeleteAction(e.state.currEvent),e.state.isDropdownConsentModalOpen&&!e.state.isConsentModalOpen&&e.handleFolderDeletion(e.state.folder)},btnVariant:"danger"})),
F.createElement("div",{className:"builder-flex-auto builder-flex-stack-item-scrollable builder-position-relative"},F.createElement("div",{className:"builder-media-item-list builder-p-5 builder-pt-1"},F.createElement("div",{className:"builder-row builder-row-columns-5 builder-gutter-4"},F.createElement("div",{className:"builder-column",onClick:function(t){if(t.preventDefault(),e.canCreate){var n=prompt(Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_ENTER_DIRECTORY_NAME"));null!=n&&""!=(n=n.trim())&&
e.handleCreateFolder(n)}}},F.createElement("div",{className:"builder-card builder-card-selectable builder-card-media builder-mb-4".concat(this.canCreate?"":" disabled")},F.createElement("div",{className:"builder-card-icon builder-card-icon-folder"},F.createElement(co,{name:"folderPlusDuo",size:"7x"})),F.createElement("div",{className:"builder-card-media-heading builder-text-truncate"},Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_CREATE_FOLDER")))),null==o?void 0:o.map(function(t,o){var r=a.find(function(e){var n=
i.replace(/\\/g,"/")+"/"+t;return e.name===t&&n===e.relname}),l=void 0!==(null==n?void 0:n[r.id])&&r.fullname===n[r.id].fullname;return F.createElement("div",{key:o,className:"builder-column",onClick:function(t){t.preventDefault(),e.handleItemClick(r)},onDoubleClick:function(n){n.preventDefault();var o=i+"/"+t;e.handleChangeFilter(o)}},F.createElement("div",{className:"builder-card builder-card-selectable builder-card-media".concat(l?" active":""," builder-mb-4")},F.createElement("div",{className:"builder-card-icon builder-card-icon-folder"},
F.createElement(co,{name:"foldersDuoAlt",size:"7x"}),l?F.createElement("span",{className:"builder-field-check active","area-hidden":"true"}):F.createElement("span",{className:"builder-field-check","area-hidden":"true"})),F.createElement("div",{className:"builder-card-footer"},e.state.editState===t?F.createElement("input",{type:"text",className:"builder-form-field",value:e.state.newfolderName,onChange:function(t){return e.handleFolderRename(t.target.value)},onKeyDown:function(t){"Enter"===t.key&&e.handleFolderRenameSave()},
autoFocus:!0}):F.createElement("span",{className:"builder-card-title builder-text-truncate",title:t,onDoubleClick:function(n){n.preventDefault(),e.setState({editState:t,oldfolder:r,newfolderName:r.name})}},t),F.createElement("span",{className:"builder-ms-2"},F.createElement("span",{className:"builder-button builder-button-icon",role:"button",onClick:function(o){l&&o.stopPropagation(),Object.keys(n).length>1?e.setState({activeMenu:""}):e.setState(function(e){return e.activeMenu===t?{activeMenu:""}:
{activeMenu:t}})}},F.createElement(co,{name:"ellipsisY"}))))),e.state.activeMenu===t&&1===Object.keys(n).length&&e.renderDropdown(t,r))}),this.props.items.map(function(t){return F.createElement("div",{key:t.path,className:"builder-column",onClick:function(n){n.preventDefault(),e.handleItemClick(t)}},F.createElement(rl,{item:t,activeItem:e.props.activeItem,onHandleItemClick:e.props.onHandleItemClick,onHandleDeleteItem:e.props.onHandleDeleteItem}))})))))}}]),r}(F.Component);const ll=il,cl=function(e){var t,
n,o=e.uploadMedia,r=e.showUploadButton,a=void 0!==r&&r,i=e.onHandleUpload,l=(0,F.useRef)(null),c=null!==(t=null===(n=userPermissions)||void 0===n?void 0:n.create)&&void 0!==t&&t,s=(0,qn.L)({accept:[nl.FILE],canDrop:function(){return c},drop:function(e,t){t.getItem().files.forEach(function(e){return o(e)})}}),d=(0,j.Z)(s,2)[1];return F.createElement("div",{className:"builder-media-drop-interface",style:{width:a?"100%":"initial"},ref:d},c?F.createElement(F.Fragment,null,F.createElement(co,{name:"cloudUpload",
size:"7x",className:"builder-icon-upload-large"}),F.createElement("div",{className:"builder-fs-h3 builder-mt-2"},Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_DROP_FILES"))):F.createElement("div",{className:"builder-fs-h3 builder-mt-2 text-muted"},Joomla.JText._("COM_JPAGEBUILDER_NO_UPLOAD_PERMISSION")),a&&c&&F.createElement(F.Fragment,null,F.createElement("p",{className:"builder-my-1 builder-text-secondary"}),F.createElement("div",{className:"builder-p-3"},F.createElement("span",{className:"builder-button builder-button-primary builder-button-md builder-d-block",
onClick:function(e){var t;e.preventDefault(),c&&(null===(t=l.current)||void 0===t||t.click())},role:"button"},Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_UPLOAD_FILES")),F.createElement("input",{type:"file",className:"builder-d-none",ref:l,onChange:function(e){var t=e.target.files[0];i(t)}}))))};const sl=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){return(0,J.Z)(this,r),o.call(this,e)}return(0,G.Z)(r,[{key:"render",value:function(){var e=this;return""!==this.props.activeItem&&F.createElement("div",{className:"builder-modal-footer builder-modal-footer-white"},F.createElement("span",{className:"builder-button builder-button-primary",
onClick:function(t){t.preventDefault(),e.props.onInsertMediaClick()},role:"button",tabIndex:0,onKeyDown:ye},F.createElement(co,{name:"check"})," ",Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_INSERT")),F.createElement("span",{className:"builder-button builder-button-primary",onClick:function(t){t.preventDefault(),e.props.onHandleItemClick("")},role:"button",tabIndex:0,onKeyDown:ye},F.createElement(co,{name:"timesAlt"})," ",Joomla.JText._("COM_JPAGEBUILDER_CANCEL")))}}]),r}(F.Component);const dl=
function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,
e)).state={months:["January","February","March","April","May","June","July","August","September","October","November","December"]},t}return(0,G.Z)(r,[{key:"handleChangeFiler",value:function(e){e.preventDefault(),this.props.onFilterChange(e.target.value)}},{key:"render",value:function(){var e=this;return F.createElement("div",null,"folders"==this.props.typeOfMedia&&F.createElement("div",null,F.createElement("select",{className:"builder-form-field",value:this.props.filtered,onChange:this.handleChangeFiler.bind(this)},
F.createElement("option",{value:jpbMediaPath},jpbMediaPath),this.props.filters.map(function(e,t){return F.createElement("option",{key:t,value:e.relname},e.relname)}))),"folders"!=this.props.typeOfMedia&&F.createElement("div",null,F.createElement("select",{className:"builder-form-field",value:this.props.filtered,onChange:this.handleChangeFiler.bind(this)},F.createElement("option",{value:""},Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_ALL")),this.props.filters.map(function(t,n){var o=t.year+
"-"+t.month;return F.createElement("option",{key:n,value:o},e.state.months[t.month-1]," ",t.year," ")}))))}}]),r}(F.Component);const ul=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=
Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){return(0,J.Z)(this,r),o.call(this,e)}return(0,G.Z)(r,[{key:"handleChangeFiler",value:function(e){e.preventDefault(),this.props.onFilterChange(e.target.value)}},{key:"handleSearchTextChange",value:function(e){e.preventDefault(),this.props.onHandleSearchText(e.target.value)}},{key:"render",value:function(){return F.createElement("div",{className:"builder-px-0 builder-py-4 builder-row builder-justify-content-start builder-gutter-0"},
F.createElement("div",{className:"builder-column-12"},F.createElement("div",{className:"builder-mx-5 builder-d-flex builder-justify-content-".concat("folders"!=this.props.browserMediaType?"between":"end"," builder-gap-3")},"folders"!=this.props.browserMediaType?F.createElement("div",{className:"builder-has-icon-left builder-flex-full"},F.createElement(co,{name:"search",className:"builder-form-icon"}),F.createElement("input",{type:"text",ref:"searchTextRef",className:"builder-form-field",onKeyUp:this.handleSearchTextChange.bind(this),
autoComplete:"off",placeholder:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_SEARCH")})):F.createElement("div",{className:"builder-has-icon-left builder-flex-full"},F.createElement(co,{name:"search",className:"builder-form-icon disabled"}),F.createElement("input",{disabled:!0,type:"text",className:"builder-form-field disabled",placeholder:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_SEARCH")})),F.createElement("div",{className:"builder-w-200"},F.createElement(dl,{onFilterChange:this.props.onFilterChange,
typeOfMedia:this.props.typeOfMedia,filtered:this.props.filtered,filters:this.props.filters})))))}}]),r}(F.Component),ml=function(e){var t,n,o,r=e.items,a=e.activeItem,i=e.pageNav,l=e.typeOfMedia,c=e.supported,s=e.onHandleItemClick,d=e.onHandlePageNavClick,u=e.onHandleDeleteItem,m=e.mediaTypeToInsert,p=e.handleUpdateMediaItems,v=e.uploadMedia,f=e.onHandleUpload,b=null!==(t=null===(n=userPermissions)||void 0===n?void 0:n.delete)&&void 0!==t&&t;return r.length>0?F.createElement(F.Fragment,null,F.createElement("div",
{className:"builder-d-flex builder-align-items-center builder-justify-content-between builder-px-5"},F.createElement("div",{className:"builder-breadcrumb builder-py-4"},F.createElement("span",{className:"builder-breadcrumb-item"},F.createElement(co,{name:"filesDuo"})," ",Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_ALL_ITEMS")),"*"!=l&&F.createElement("span",{className:"builder-breadcrumb-item active"},(o=l).charAt(0).toUpperCase()+o.slice(1),"s")),Object.keys(a).length>0&&F.createElement("div",
null,F.createElement("span",{className:"builder-button builder-button-primary".concat(b?"":" disabled"),onClick:function(e){e.preventDefault(),b&&u()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"timesAlt"})," ",Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE")))),F.createElement("div",{className:"builder-flex-auto builder-flex-stack-item-scrollable builder-position-relative",onScroll:function(e){var t=e.target;t.scrollHeight-t.scrollTop===t.clientHeight&&"true"==i&&d()}},
F.createElement("div",{className:"builder-media-item-list builder-p-5 builder-pt-1"},F.createElement("div",{className:"builder-row builder-row-columns-5 builder-gutter-4"},r.map(function(e){return F.createElement("div",{key:e.id,onClick:function(t){t.preventDefault(),e.type===c&&function(e){var t=a.id===e.id?"":e;s(t)}(e)},className:"builder-column",onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(rl,{item:e,activeItem:a,mediaTypeToInsert:m,onHandleItemClick:s,onHandleDeleteItem:u,handleUpdateMediaItems:p}))})),
"true"==i&&F.createElement("div",{className:"builder-text-center"},F.createElement("div",{className:"builder-spinner builder-spinner-sm","area-hidden":"true"}))))):F.createElement("div",{className:"builder-d-flex builder-flex-auto builder-align-items-center builder-justify-content-center"},F.createElement(cl,{uploadMedia:v,onHandleUpload:f,showUploadButton:!0}))};var pl=[{name:"*",icon:"filesDuo",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_ALL_ITEMS"),className:"builder-list-item-action-media-icon"},
{name:"image",icon:"image",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_IMAGES"),className:"builder-list-item-action-media-icon"},{name:"video",icon:"videoCameraDuo",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_VIDEOS"),className:"builder-list-item-action-media-icon"},{name:"audio",icon:"music",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_AUDIOS"),className:"builder-list-item-action-media-icon"},{name:"attachment",icon:"paperclip",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_ATTACHMENTS"),
className:"builder-list-item-action-media-icon"},{name:"folders",icon:"foldersDuo",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_FOLDERS"),className:"builder-list-item-action-media-icon"}];const vl=function(e){var t,n,o=(0,F.useRef)(null),r=null!==(t=null===(n=userPermissions)||void 0===n?void 0:n.create)&&void 0!==t&&t,a=function(t){return function(n){n.preventDefault(),e.onHandleCategoryChange(t.name)}};return F.createElement("div",{className:"builder-column-2 builder-h-100"},F.createElement("div",
{className:"builder-card builder-m-4 builder-pb-2 builder-me-0"},F.createElement("div",{className:"builder-p-3"},F.createElement("span",{className:"builder-dragdroplabel"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_DRAG_AND_DROP_YOUR_FILES")),F.createElement("span",{className:"builder-button builder-button-primary builder-button-md builder-d-block".concat(r?"":" disabled"),onClick:function(e){var t;e.preventDefault(),r&&(null===(t=o.current)||void 0===t||t.click())},role:"button"},F.createElement(co,
{name:"upload"})," ",Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_UPLOAD_FILES")),F.createElement("input",{type:"file",className:"builder-d-none",ref:o,onChange:function(t){if(r){var n=t.target.files[0];e.onHandleUpload(n)}}})),F.createElement("div",{className:"builder-list-group"},pl.map(function(t,n){return F.createElement("span",{key:n,className:"builder-list-item builder-list-item-action builder-list-item-action-media-icon builder-user-select-none".concat(t.name===e.browserMediaType?" active":
""),onClick:a(t),role:"button"},F.createElement(co,{name:t.icon,className:"builder-me-2"}),t.title)}))))};var fl=function(e){return{type:"SET_GLOBAL_PANEL",payload:e}};const bl=function(e){var t=e.message;return F.createElement("div",{className:"builder-spinner-container"},F.createElement("div",{className:"builder-spinner","area-hidden":"true"}),t&&F.createElement("div",{className:"builder-mt-3"},F.createElement("span",{className:"builder-ms-2"},t)))};function hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function gl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hl(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
var El=function(e){(0,H.Z)(a,e);var t,n,o,r=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=(0,z.Z)(n);if(o){var r=(0,z.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,U.Z)(this,e)});function a(e){var t;return(0,J.Z)(this,
a),t=r.call(this,e),(0,B.Z)((0,io.Z)(t),"isEmptyFolder",function(e){var n={type:t.state.typeOfMedia};"folders"!=t.state.typeOfMedia?n.date=e:n.path=e;var o,r,a=t.getMediaItems(n);if("folders"==n.type)return!((null===(o=a.items)||void 0===o?void 0:o.length)>0||(null===(r=a.folders_list)||void 0===r?void 0:r.length)>0)}),(0,B.Z)((0,io.Z)(t),"renameFolder",function(){var e=(0,Ct.Z)(Nt().mark(function e(n,o){return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.deleteFolder(n);
case 2:return e.next=4,t.createFolder(o);case 4:case "end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}()),(0,B.Z)((0,io.Z)(t),"showFooter",function(){var e,n=t.props,o=n.isOver,r=n.disableInsert,a=n.type,i=n.isGallery,l=t.state.activeItem,c=Object.keys(l).length>0,s=c&&Object.values(l)[0].type,d="*"===a||s===a,u="folders"===t.state.typeOfMedia&&Gt(null===(e=Object.values(l)[0])||void 0===e?void 0:e.parent);return(!o||r)&&c&&(d||u&&i)&&!(u&&Object.values(l).length>
1)}),(0,B.Z)((0,io.Z)(t),"updateFormData",function(e,t,n){for(var o=e,r=0;r<t.length;r++){if(!fe()(o))return{};"url"===t[r]&&(o.tab="link"),r===t.length-1&&(o[t[r]]=n),o=o[t[r]]}return e}),(0,B.Z)((0,io.Z)(t),"handleInsertAttachment",function(){var e,n=t.state.activeItem,o=t.props.globalPanel,r=o.inputName,a=o.inputValue;t.props.setGlobalPanel({});var i=((null===(e=Object.values(n))||void 0===e?void 0:e[0])||{}).path,l=r.split(/\.|\[|\].|\]/);if(l=l.flatMap(function(e){return""===e?[]:Number.isNaN(parseInt(e))?
e:parseInt(e)}),wr.addon.settings){var c,s,d,u=wr.addon,m=null===(c=t.props.currentState[wr.rowIndex])||void 0===c?void 0:c.id,p=null===(s=t.props.currentState[wr.rowIndex])||void 0===s||null===(s=s.columns[wr.colIndex])||void 0===s?void 0:s.id;if(!m||!p||null===(d=u)||void 0===d||null===(d=d.addon)||void 0===d||!d.id)return;var v=Fe(m,p,u.addon.id);if(!v)return;var f=K()(v.settings);f=t.updateFormData(f,l,gl(gl({},a),{},{url:i})),u=gl(gl({},u),{},{settings:gl(gl({},u.settings),{},{formData:f})}),
wr.setAddon(u);var b={type:wr.type,index:wr.rowIndex,settings:u.settings};t.props.saveSettings(b)}}),t.state={typeOfInput:t.props.type,typeOfMedia:t.props.type,pageNav:!1,mediaItems:[],folders:[],breadcrumbs:[],searchText:"",filters:[],filtered:"",activeItem:{},fetched:!1,uploading:!1},t.liveSearchTimer=0,t}return(0,G.Z)(a,[{key:"componentDidMount",value:function(){var e={type:this.state.typeOfMedia},t=this.getMediaItems(e);Gt(t)&&this.setState({mediaItems:t.items,pageNav:t.pageNav,filters:t.filters})}},
{key:"handleSearchText",value:function(e){var t=e.trim(),n={type:this.state.typeOfMedia,date:this.state.filtered,search:t};this.liveSearchTimer&&clearTimeout(this.liveSearchTimer),this.liveSearchTimer=setTimeout(function(){var e=this.getMediaItems(n);Gt(e)&&this.setState({mediaItems:e.items,pageNav:e.pageNav,filters:e.filters,searchText:t})}.bind(this),300)}},{key:"handlePageNavClick",value:function(){var e=this.state,t=e.mediaItems,n=e.typeOfMedia,o=e.filtered,r=e.searchText,a={type:n,date:o};""!==
r&&(a.search=r),t.length>0&&(a.start=t.length);var i=this.getMediaItems(a);Gt(i)&&this.setState({mediaItems:[].concat((0,ue.Z)(t),(0,ue.Z)(i.items)),pageNav:i.pageNav})}},{key:"getFolderItems",value:function(){var e={type:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"folders",path:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""};return this.getMediaItems(e)}},{key:"handleCategoryChange",value:function(e){var t={type:e};"folders"==e&&(t.path=window.jpbMediaPath);var n=this.getMediaItems(t);
n&&("folders"==e?this.setState({mediaItems:n.items,filters:n.folders,folders:n.folders_list,breadcrumbs:n.breadcrumbs,typeOfMedia:e,pageNav:"",activeItem:"",searchText:"",filtered:window.jpbMediaPath}):this.setState({typeOfMedia:e,mediaItems:n.items,filters:n.filters,pageNav:n.pageNav,activeItem:"",searchText:"",filtered:""}))}},{key:"filterChange",value:function(e){var t={type:this.state.typeOfMedia};"folders"!=this.state.typeOfMedia?t.date=e:t.path=e;var n=this.getMediaItems(t);Gt(n)&&("folders"==
t.type?this.setState({mediaItems:n.items,folders:n.folders_list,breadcrumbs:n.breadcrumbs,pageNav:"",activeItem:"",searchText:"",filtered:e}):this.setState({mediaItems:n.items,pageNav:n.pageNav,activeItem:"",searchText:"",filtered:e}))}},{key:"getMediaItems",value:function(e){var t,n=this,o=pagebuilder_base+"index.php?option=com_jpagebuilder&view=media&layout=browse&format=json&source=page";return"folders"==e.type&&(o=pagebuilder_base+"index.php?option=com_jpagebuilder&view=media&layout=folders&format=json&source=page"),
this.setState({fetched:!1}),jQuery.ajax({type:"POST",url:o,data:e,dataType:"json",cache:!1,async:!1,success:function(e){t=e,n.setState({fetched:!0,loadingMoreMedia:!1})},error:function(e){var t,o=e.responseJSON;oe(null==o||null===(t=o.data)||void 0===t?void 0:t.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),n.setState({fetched:!0,loadingMoreMedia:!1})}}),t}},{key:"handleUpdateMediaItems",value:function(){var e={type:this.state.typeOfMedia},t=this.getMediaItems(e);Gt(t)&&this.setState({mediaItems:t.items,
pageNav:t.pageNav,filters:t.filters})}},{key:"handleActiveItem",value:function(e){if(""!==e){var t=this.state.activeItem,n=void 0===(null==e?void 0:e.id)||0===e.id?e.title:e.id,o={};if(null!=t&&t[n])delete (o=gl({},t))[n];else{var r;if(this.props.isGallery)return o=gl(gl({},t),{},(0,B.Z)({},n,e)),void this.setState({activeItem:o});null!==(r=this.props.globalPanel)&&void 0!==r&&r.isInsert?o=(0,B.Z)({},n,e):"manager"===this.props.client?o=gl(gl({},t),{},(0,B.Z)({},n,e)):"field"===this.props.client&&
(o=(0,B.Z)({},n,e))}this.setState({activeItem:o})}else this.setState({activeItem:{}})}},{key:"formatMediaInsert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!Array.isArray(e))throw new Error("formattingData must be an array");return e.map(function(e){var t,n;return{title:null==e?void 0:e.title,thumb:{src:null==e?void 0:e.path,width:null==e||null===(t=e.media_attr)||void 0===t||null===(t=t.full)||void 0===t?void 0:t.width,height:null==e||null===(n=e.media_attr)||
void 0===n||null===(n=n.full)||void 0===n?void 0:n.height},full:null==e?void 0:e.path,alt:""}})}},{key:"insertMediaClick",value:function(){var e,t=this.state.activeItem;if(null!==(e=this.props.globalPanel)&&void 0!==e&&e.mediaType)this.handleInsertAttachment();else if(void 0===Object.values(t)[0].type){if(Object.values(t)[0]){var n=Object.values(t)[0].relname+"/",o=this.getFolderItems("folders",n).items,r=this.formatMediaInsert(o);this.props.onHandleInsertMedia(r)}}else if(this.props.isGallery){var a=
this.formatMediaInsert(Object.values(t));this.props.onHandleInsertMedia(a)}else if(this.props.onHandleInsertMedia)this.props.onHandleInsertMedia(t)}},{key:"handleDeleteItem",value:(t=(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r,a,i,l,c,s,d,u,m=this;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.state.activeItem,o="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=media.delete_media"),r=[],Object.values(n).forEach(function(e){var t="local+db";if(void 0!==
(null==e?void 0:e.fullname)){var n=m.state.filtered+"/"+e.name;if(!m.isEmptyFolder(n))return;t="folder"}else 0===(null==e?void 0:e.id)&&(t="local");var o={id:e.id,path:void 0!==(null==e?void 0:e.fullname)?e.fullname:e.path,type:t};r.push(o)}),e.next=6,fetch(o,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({data:r})});case 6:return a=e.sent,e.next=9,a.json();case 9:if(null!=(i=e.sent)&&null!==(t=i.data)&&void 0!==t&&t.status){e.next=
13;break}return oe(i.data.data),e.abrupt("return");case 13:l=(0,ue.Z)(this.state.mediaItems),c=(0,ue.Z)(this.state.filters),s=(0,ue.Z)(this.state.folders),d=Nt().mark(function e(t){var o,r,a,i,d;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:void 0!==(null===(o=n[t])||void 0===o?void 0:o.fullname)?(r=m.state.filtered+"/"+n[t].name,m.isEmptyFolder(r)&&(a=c.findIndex(function(e){return Number(e.id)===Number(t)}),i=s.indexOf(n[t].name),a>-1&&c.splice(a,1),i>-1&&s.splice(i,1))):(d="string"!=
typeof(u=t)||isNaN(u)||isNaN(parseFloat(u))?l.findIndex(function(e){return e.title===t}):l.findIndex(function(e){return Number(e.id)===Number(t)}))>-1&&l.splice(d,1);case 1:case "end":return e.stop()}var u},e)}),e.t0=Nt().keys(n);case 18:if((e.t1=e.t0()).done){e.next=23;break}return u=e.t1.value,e.delegateYield(d(u),"t2",21);case 21:e.next=18;break;case 23:this.setState({mediaItems:l,filters:c,folders:s,activeItem:{}});case 24:case "end":return e.stop()}},e,this)})),function(){return t.apply(this,
arguments)})},{key:"handleUpload",value:function(e){this.mediaUploadActions(e)}},{key:"mediaUploadActions",value:function(e){var t=new FormData;t.append("file",e),"folders"==this.state.typeOfMedia&&t.append("folder",this.state.filtered);var n=this;this.setState({uploading:!0}),jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&task=media.upload_media",data:t,contentType:!1,cache:!1,processData:!1,beforeSend:function(){jQuery(".jpagebuilder-media-file-loader").css({display:"inline-block"})},
xhr:function(){var e=jQuery.ajaxSettings.xhr();return e.upload.onprogress=function(e){jQuery(".jpagebuilder-progress-bar").css("width",Math.floor(e.loaded/e.total*100)+"%").text(Math.floor(e.loaded/e.total*100)+"%")},e}}).done(function(e){var t=jQuery.parseJSON(e);t.status?(delete t.output,delete t.status,n.setState({mediaItems:(0,Vt.ZP)(n.state.mediaItems,function(e){e.splice(0,0,t)})}),ne(Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_TOASTER_SUCCESS"),Joomla.JText._("COM_JPAGEBUILDER_TOASTER_SUCCESS"))):
(alert(t.output),oe(t.output,Joomla.JText._("COM_JPAGEBUILDER_TOASTER_ERROR"))),n.setState({uploading:!1})}).fail(function(e){if("string"!=typeof e)oe(e.statusText,Joomla.JText._("COM_JPAGEBUILDER_TOASTER_ERROR"));else{var t=jQuery.parseJSON(e);oe(t.output,Joomla.JText._("COM_JPAGEBUILDER_TOASTER_ERROR"))}n.setState({uploading:!1})})}},{key:"createFolder",value:function(e){var t=this.state,n=t.filters,o=t.folders,r=null==e?void 0:e.relname.split("/"),a=r.length>3,i=r.splice(0,r.length-1).join("/"),
l=gl(gl({},e),{},{id:n.length+1,parent:0});if(a){var c,s=n.findIndex(function(e){return e.relname==i});l.parent=null===(c=n[s])||void 0===c?void 0:c.id}this.setState({filters:[].concat((0,ue.Z)(n),[l]),folders:(0,Vt.ZP)(o,function(e){e.splice(0,0,l.name)}),activeItem:{}})}},{key:"deleteFolder",value:function(e){var t=this.state.filters.findIndex(function(t){return t.name==e.name&&t.relname==e.relname}),n=this.state.folders.findIndex(function(t){return t==e.name});this.setState({filters:(0,Vt.ZP)(this.state.filters,
function(e){e.splice(t,1)}),folders:(0,Vt.ZP)(this.state.folders,function(e){e.splice(n,1)}),activeItem:{}})}},{key:"render",value:function(){var e,t=this.props,n=t.connectDropTarget,o=t.isOver,r=this.state,a=r.fetched,i=r.mediaItems,l=r.folders,c=r.breadcrumbs;return r.uploading?F.createElement(bl,{message:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_UPLOADING")+"..."}):F.createElement(F.Fragment,null,n(F.createElement("div",{className:"builder-modal-body builder-p-0 builder-overflow-hidden"},
o?F.createElement(cl,{uploadMedia:this.mediaUploadActions.bind(this)}):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-modal-container builder-row builder-gutter-0"},F.createElement(vl,{searchText:this.state.searchText,onHandleCategoryChange:this.handleCategoryChange.bind(this),browserMediaType:this.state.typeOfMedia,onHandleUpload:this.handleUpload.bind(this),onHandleSearchText:this.handleSearchText.bind(this)}),F.createElement("div",{className:"builder-column-10 builder-modal-main builder-flex-stack"},
F.createElement(ul,{activeItem:this.state.activeItem,filters:this.state.filters,filtered:this.state.filtered,typeOfMedia:this.state.typeOfMedia,searchText:this.state.searchText,onHandleItemClick:this.handleActiveItem.bind(this),onInsertMediaClick:this.insertMediaClick.bind(this),onFilterChange:this.filterChange.bind(this),onHandleUpload:this.handleUpload.bind(this),onHandleDeleteItem:this.handleDeleteItem.bind(this),onHandleSearchText:this.handleSearchText.bind(this),onCreateFolder:this.createFolder.bind(this),
browserMediaType:this.state.typeOfMedia}),a?"folders"==this.state.typeOfMedia?F.createElement(ll,{items:i,folders:l,breadcrumbs:c,filters:this.state.filters,filtered:this.state.filtered,onFilterChange:this.filterChange.bind(this),onHandleDeleteItem:this.handleDeleteItem.bind(this),onHandleItemClick:this.handleActiveItem.bind(this),activeItem:this.state.activeItem,onCreateFolder:this.createFolder.bind(this),onDeleteFolder:this.deleteFolder.bind(this),onRenameFolder:this.renameFolder.bind(this),isEmptyFolder:this.isEmptyFolder.bind(this)}):
F.createElement(F.Fragment,null,F.createElement(ml,{items:i,supported:this.state.typeOfInput,activeItem:this.state.activeItem,typeOfMedia:this.state.typeOfMedia,pageNav:this.state.pageNav,mediaTypeToInsert:null===(e=this.props.globalPanel)||void 0===e?void 0:e.mediaType,onHandleDeleteItem:this.handleDeleteItem.bind(this),onHandleItemClick:this.handleActiveItem.bind(this),onHandlePageNavClick:this.handlePageNavClick.bind(this),handleUpdateMediaItems:this.handleUpdateMediaItems.bind(this),uploadMedia:this.mediaUploadActions.bind(this),
onHandleUpload:this.handleUpload.bind(this)})):F.createElement("div",{className:"builder-d-flex builder-flex-auto builder-align-items-center builder-justify-content-center"},null!=i&&i.length?F.createElement(F.Fragment,null,F.createElement(Ya,{message:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_MEDIA_NO_ICON_FOUND")}),Joomla.JText._("COM_JPAGEBUILDER_LOADING")):F.createElement(cl,{uploadMedia:this.mediaUploadActions.bind(this),onHandleUpload:this.handleUpload.bind(this),showUploadButton:!0}))))))),
this.showFooter()&&F.createElement(sl,{activeItem:this.state.activeItem,onHandleItemClick:this.handleActiveItem.bind(this),onInsertMediaClick:this.insertMediaClick.bind(this)}))}}]),a}(F.Component);const yl=(0,zo.DropTarget)(nl.FILE,{},function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}})((0,Xn.$j)(function(e){var t,n;return{globalPanel:null===(t=e.tools)||void 0===t?void 0:t.globalPanel,currentState:null===(n=e.pageBuilder)||void 0===n?void 0:n.present}},function(e){return{setGlobalPanel:function(t){return e(fl(t))},
saveSettings:function(t){return e(zi(t))}}})(El));function _l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function wl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_l(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
_l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var xl=function(e){var t={src:"",alt:""};try{t="string"==typeof e?JSON.parse(e):e}catch(n){t=e}return t};const Il=function(e){(0,H.Z)(a,e);var t,n,o,r=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),
function(){var e,t=(0,z.Z)(n);if(o){var r=(0,z.Z)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,U.Z)(this,e)});function a(e){var t;return(0,J.Z)(this,a),(t=r.call(this,e)).state={popIsUp:!1,media:xl(t.props.input.value),type:"image",isGeneratorOpen:!1,isLoadingImageMeta:!1},t.triggerRef=(0,F.createRef)(),t}return(0,G.Z)(a,[{key:"componentDidMount",value:function(){var e=this.props.params;void 0!==(null==e?void 0:e.format)&&this.setState({type:e.format})}},
{key:"onChangeHandle",value:(t=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r,a,i,l,c,s,d,u;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props,o=n.input,r=o.onChange,a=o.value,i=n.params.hide_preview,l=i?t.target.value:wl(wl({},a),{},{src:t.target.value}),r(l),c=t.target.value.startsWith("http")?t.target.value:"".concat(window.pagebuilder_base).concat(t.target.value),xe(c,"image")){e.next=6;break}return e.abrupt("return");case 6:return this.setState({isLoadingImageMeta:!0}),
e.prev=7,e.next=10,Ft(c);case 10:s=e.sent,d=s.naturalHeight,u=s.naturalWidth,r({src:t.target.value,height:d,width:u});case 14:return e.prev=14,this.setState({isLoadingImageMeta:!1}),e.finish(14);case 17:case "end":return e.stop()}},e,this,[[7,,14,17]])})),function(e){return t.apply(this,arguments)})},{key:"onChangeAltText",value:function(e){var t=this.props.input,n=t.value;(0,t.onChange)(wl(wl({},n),{},{alt:e.target.value}))}},{key:"handleUploadClick",value:function(){this.setState({popIsUp:!0})}},
{key:"handleInsertMedia",value:function(e){"object"===(0,de.Z)(e)&&!Array.isArray(e)&&Object.keys(e).length>0&&(e=Object.values(e)[0]);var t=this.props,n=t.input.onChange,o=t.params.hide_preview,r=e.path,a=o?r:{src:r};void 0===o&&e.media_attr&&e.media_attr.full&&(a=wl(wl({},a),e.media_attr.full)),n(a),this.setState({media:a,popIsUp:!1})}},{key:"handleMediaModal",value:function(){this.setState({popIsUp:!1})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(e.input.value!==this.state.media){var t=
this.props.params.hide_preview,n=e.input.value;void 0===n.src&&(n=t?n:e.input.value),this.setState({media:xl(n)})}}},{key:"removeMedia",value:function(e){e.preventDefault();var t=this.props.input,n=t.value,o=t.onChange;n.src?o(wl(wl({},n),{},{src:"",height:"",width:""})):o("")}},{key:"render",value:function(){var e,t,n=this,o=this.props,r=o.input,a=r.onChange,i=r.name,l=o.params,c="",s=this.state.media;void 0!==s.src&&(s=s.src),"#"!==s&&(""!==s&&1==s.startsWith("http")?c=s:""!==s&&(c=pagebuilder_base+
s));var d=l.placeholder||"";return F.createElement("div",{ref:this.triggerRef,"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name,className:"builder-form-group".concat(null!=l.column?" builder-column-"+l.column:"")},l.title&&!l.hideTitle&&F.createElement("label",null,void 0!==l.desc&&""!=l.desc?F.createElement(er.Z,{content:l.desc,tagName:"span"},l.title):l.title),!!window.is_ai_enabled&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-button builder-button-primary builder-ai-button builder-mb-2",
role:"button",onClick:function(){return n.setState({isGeneratorOpen:!0})},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"generate",className:"builder-d-inline-flex builder-me-2"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE_WITH_AI")),F.createElement(Si,{isOpen:this.state.isGeneratorOpen,triggerRef:this.triggerRef,onClose:function(){return n.setState({isGeneratorOpen:!1})},onChange:function(e){(0,n.props.input.onChange)(e)},imageFullPath:c,imageUri:s})),F.createElement("div",{className:"builder-form-field-media"},
""==c?!l.hide_preview&&F.createElement("div",{className:"builder-form-media-placeholder builder-mb-3"},F.createElement("span",{className:"builder-button builder-button-primary builder-d-flex builder-align-items-center",onClick:function(e){e.preventDefault(),n.handleUploadClick()},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"upload",className:"builder-d-inline-flex builder-me-2"}),"Choose ",this.state.type.charAt(0).toUpperCase()+this.state.type.slice(1))):!l.hide_preview&&F.createElement("div",
{className:"builder-form-media-placeholder builder-form-has-media builder-mb-3"},F.createElement("div",{className:"builder-form-media-".concat(this.state.type)},F.createElement("div",{className:"builder-form-media-placeholder-overlay"},F.createElement("div",{className:"builder-me-2"},F.createElement("span",{className:"builder-button builder-button-primary",onClick:function(e){e.preventDefault(),n.handleUploadClick()},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"recycle",size:"1x"}),
" ",Joomla.JText._("COM_JPAGEBUILDER_REPLACE"))),F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-primary",onClick:this.removeMedia.bind(this),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"times"})," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_CLEAR")))),"image"==this.state.type&&F.createElement("img",{src:c,alt:""}),"video"==this.state.type&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-media-preview-icon"},
F.createElement(co,{name:"playCircle",size:"3x"})),F.createElement("video",{muted:!0},F.createElement("source",{src:c,type:"video/mp4"}))))),"lottie_file"!==i||l.hide_preview?F.createElement("div",null,F.createElement("div",{className:"builder-row"},F.createElement("div",{className:"builder-column"},F.createElement("input",{value:s,placeholder:d,className:"builder-form-field",autoComplete:"off",onChange:this.onChangeHandle.bind(this)})),F.createElement("div",{className:"builder-column-auto"},""==
c?F.createElement("span",{className:"builder-button builder-button-primary ".concat(this.state.isLoadingImageMeta?"disabled":""),onClick:function(e){e.preventDefault(),n.handleUploadClick()},role:"button",onKeyDown:ye,tabIndex:0},this.state.isLoadingImageMeta?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white builder-me-2"}):F.createElement(F.Fragment,null,F.createElement(co,{name:"upload"})," ",Joomla.JText._("COM_JPAGEBUILDER_UPLOAD"))):F.createElement("span",
{className:"builder-button builder-button-primary ".concat(this.state.isLoadingImageMeta?"disabled":""),onClick:function(e){e.preventDefault(),a("")},role:"button",onKeyDown:ye,tabIndex:0},this.state.isLoadingImageMeta?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white builder-me-2"}):F.createElement(F.Fragment,null,F.createElement(co,{name:"times"})," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_CLEAR"))))),!(null!=l&&l.hide_alt_text)&&F.createElement("div",
{className:"builder-row"},F.createElement("div",{className:"builder-column builder-mt-2"},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_ALT_TEXT_DESC"),tagName:"span"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_MEDIA_ALT_TEXT"))),F.createElement("input",{value:(null===(t=this.state.media)||void 0===t?void 0:t.alt)||"",className:"builder-form-field",autoComplete:"off",onChange:this.onChangeAltText.bind(this)})))):null),F.createElement(Aa,{isOpen:this.state.popIsUp,
onClose:function(){return n.setState({popIsUp:!1})},cssClass:"builder-modal-dialog-fixed builder-modal-dialog-centered",size:"lg"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return n.setState({popIsUp:!1})}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_MEDIA"))),F.createElement(yl,{client:"field",type:this.state.type,onHandleInsertMedia:this.handleInsertMedia.bind(this),
onHandleMediaModal:this.handleMediaModal.bind(this)}))))}}]),a}(F.Component);const Ol=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,
arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={options:[],value:"",multi:t.props.params.multiple},t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){"position"==this.props.params.module?this.setState({options:moduleAttr.modulePosition}):this.setState({options:moduleAttr.moduleName})}},{key:"logChange",value:function(e){var t=this.props.input,n=(t.value,t.onChange);if(t.name,this.setState({value:e}),void 0!==e.length){for(var o=[],r=
0;r<e.length;r++)o[r]=e[r].value;n(o)}else n(e.value)}},{key:"render",value:function(){var e,t,n=this.props,o=n.input,r=n.params;return F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},r.title&&F.createElement("label",null,void 0!==r.desc&&""!=r.desc?F.createElement(er.Z,{content:r.desc,tagName:"span"},r.title):r.title),F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:(null===
(t=this.state.options)||void 0===t?void 0:t.length)&&this.state.options.find(function(e){return e.value===o.value}),multi:this.state.multi,menuPlacement:"auto",menuPosition:"fixed",options:this.state.options,onChange:this.logChange.bind(this),components:{IndicatorSeparator:function(){return null}}}))}}]),r}(F.Component);function Cl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),
n.push.apply(n,o)}return n}var Al=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;
return(0,J.Z)(this,r),(t=o.call(this,e)).state={value:"",active:window.builderDefaultDevice,unit:"px"},t}return(0,G.Z)(r,[{key:"UNSAFE_componentWillMount",value:function(){var e=this.props,t=e.input,n=t.value,o=t.onChange,r=e.params,a="";if(r.responsive)if(null!=r&&r.unit&&(a=n.unit||"px"),fe()(n)){var i=Object.assign({},n);null!=r&&r.unit&&(i.unit=a),o(i)}else{var l={xl:n,lg:n,md:n,sm:"",xs:""};null!=r&&r.unit&&(l.unit=a),o(l)}else null!=r&&r.unit&&(a=0===(a=n.replace(/\d+/g,"")).length?"px":a),
o(n);this.setState({unit:a})}},{key:"onChangeHandle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.props,o=n.input,r=o.value,a=o.onChange,i=n.params,l=this.state.unit;if(i.responsive){var c=be.device,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cl(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cl(Object(n)).forEach(function(t){Object.defineProperty(e,
t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},r);null===t&&(s[c]=e.target.value),null!=i&&i.unit&&null!==t&&(s.unit=t||l),a(s)}else a(e.target.value)}},{key:"updateUnit",value:function(e){this.onChangeHandle({},e),this.setState({unit:e})}},{key:"render",value:function(){var e,t=this,n=this.props,o=n.input,r=n.params,a=this.state.unit,i=r.max?r.max:"",l=r.min?r.min:"",c=r.step?r.step:1,s=!!r.unit,d=!(null==r.inline||!r.inline)&&r.inline,u=be.device,m=null!=r.info&&r.info;return F.createElement("div",
{"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name,className:"builder-form-group".concat(null!=r.class?" "+r.class:"").concat(d?" builder-row builder-align-items-center":"")},r.title&&F.createElement("label",{className:"".concat(d?"builder-column-4 builder-mb-0":"")},void 0!==r.desc&&""!=r.desc?F.createElement(er.Z,{content:r.desc,tagName:"span"},r.title):r.title),F.createElement("div",{className:"".concat(d?"builder-column-8":"")},F.createElement("div",{className:"builder-field-group"},
r.responsive?F.createElement("input",{type:"number",max:i,min:l,step:c,value:o.value[u],"data-device":u,className:"builder-form-field builder-form-field-number",placeholder:null!=r.placeholder?r.placeholder:"",autoComplete:"off",onChange:this.onChangeHandle.bind(this)}):F.createElement("input",(0,ao.Z)({},o,{max:i,min:l,step:c,className:"builder-form-field builder-form-field-number",placeholder:null!=r.placeholder?r.placeholder:"",autoComplete:"off",onChange:this.onChangeHandle.bind(this)})),m&&F.createElement("span",
{className:"builder-field-info"},m),s&&F.createElement(Pr,{update:function(e){return t.updateUnit(e)},unit:a}))))}}]),r}(F.Component);const Nl=Al;var Dl=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;
e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={options:[],value:""},t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.params,t=[];hr()(e.values,function(e,n){t.push({value:n,label:e})}),this.setState({options:t})}},{key:"render",value:function(){var e,t=this.props,n=t.input,o=t.params;return F.createElement("div",{"data-field":null===(e=this.props.input)||void 0===
e?void 0:e.name,className:"builder-form-group builder-form-inline".concat(null!=o.class?" "+o.class:"")},F.createElement("label",null,void 0!==o.desc&&""!=o.desc?F.createElement(er.Z,{content:o.desc,tagName:"span"},o.title):o.title),F.createElement("div",{className:"builder-nav-tabs builder-tab-button-group"},this.state.options.map(function(e,t){return F.createElement("span",{key:t,className:"builder-nav-item".concat(e.value==n.value?" active":""),onClick:function(t){t.preventDefault(),n.onChange(e.value)},
role:"button"},fe()(e.label)?F.createElement(F.Fragment,null,null!=e.label.icon&&""!=e.label.icon&&F.createElement("span",{className:"builder-icon".concat(null!=e.label.label&&""!=e.label.label?" builder-me-2":""),dangerouslySetInnerHTML:{__html:e.label.icon}}),null!=e.label.label&&""!=e.label.label&&F.createElement("span",null,e.label.label)):e.label)})))}}]),r}(F.Component);const Sl=Dl;var Pl=function(e){var t=e.prompt,n=e.language,o=e.tone,r=e.useCase,a=e.action,i="".concat(t,"\nTone should be ").concat(o,
"\n");return n&&(i+="\nTranslate the generated text to: ".concat(n)),"others"!==r&&(i+="\nUse case should be ".concat(r)),a&&(i+="\nMake it ".concat(a)),i},kl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return String(Math.ceil(e/4))},Rl=n(8721),Tl=n.n(Rl);function Ll(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}
function Ml(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ll(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ll(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Zl=function(e){var t=e.generatedValues,n=e.popover,o=void 0===n?"edit":n,r=e.onChange,a=e.onInsert,i=e.onPaginate,l=e.onEdit,c=e.totalItems,
s=e.currentIndex,d=(0,F.useState)(t.generatedText),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useState)(!1),f=(0,j.Z)(v,2),b=f[0],h=f[1],g=(0,F.useState)(!1),E=(0,j.Z)(g,2),_=E[0],w=E[1],x=Wo(t.generatedText),I=function(){var e=(0,F.useState)(null),t=(0,j.Z)(e,2),n=t[0],o=t[1];return[n,function(e){try{var t=document.createElement("textarea");return t.value=e,t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),
o(e),ne("Copied to clipboard.","Success"),!0}catch(e){return console.warn("Copy failed",e),o(null),!1}}]}(),O=(0,j.Z)(I,2),C=(O[0],O[1]);(0,F.useEffect)(function(){t.generatedText!==x&&p(t.generatedText)},[t,x]);var A=function(){var e=(0,Ct.Z)(Nt().mark(function e(n){var o,r,a,i;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.prompt.trim().length){e.next=2;break}return e.abrupt("return");case 2:return w(!0),e.prev=3,e.next=6,fetch("".concat(y),{method:"POST",headers:{"Content-Type":"application/json",
"X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({prompt:n,type:"text"})});case 6:return o=e.sent,e.next=9,o.json();case 9:if(r=e.sent,a=r.data,!Tl()(a,"status")||null!=a&&a.status){e.next=13;break}throw new Error(null==a?void 0:a.message);case 13:return e.abrupt("return",a.choices[0].message.content);case 16:e.prev=16,e.t0=e.catch(3),oe(null!==(i=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==i?i:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 19:return e.prev=
19,w(!1),e.finish(19);case 22:case "end":return e.stop()}},e,null,[[3,16,19,22]])}));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,Ct.Z)(Nt().mark(function e(n){var a,i;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=Pl(Ml(Ml({},t),{},{prompt:m,action:n})),e.next=3,A(a);case 3:(i=e.sent)&&r(Ml(Ml({},t),{},{popover:o,generatedText:i}));case 5:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();return F.createElement(F.Fragment,
null,F.createElement("div",{className:"builder-ai-text-wrapper"},F.createElement("div",{className:"builder-ai-text-generated-prompt"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_WHAT_TO_GENERATE"),F.createElement("span",{role:"button",className:"builder-button builder-button-icon",onClick:function(){l()},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"pencil",width:10,height:10}))),F.createElement("div",{className:"builder-ai-text-prompt"},t.prompt),F.createElement("div",{className:"builder-ai-text-history-wrapper"},
F.createElement("div",{className:"builder-ai-text-pagination-wrapper"},F.createElement("span",{role:"button",title:"Previous",className:"builder-button builder-button-icon ".concat(0===s?"disabled":""),disabled:0===s,onClick:function(){return i(s-1)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"chevronLeft",height:20,width:20})),F.createElement("div",null,"".concat(s+1,"/").concat(c)),F.createElement("span",{role:"button",title:"Next",className:"builder-button builder-button-icon ".concat(s+
1===c?"disabled":""),disabled:s+1===c,onClick:function(){return i(s+1)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"chevronRight",height:20,width:20}))),F.createElement("div",{className:"builder-ai-text-right-side-wrapper"},F.createElement("span",{role:"button",title:"Edit",className:"builder-button builder-button-icon",onClick:function(){return h(!0)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"pencil",height:14,width:14})),F.createElement("span",{role:"button",title:"Copy",className:"builder-button builder-button-icon",
onClick:function(){return C(m)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"copy",height:14,width:14})))),b?F.createElement("textarea",{className:"builder-form-field",value:m,onChange:function(e){return p(e.target.value)},onKeyDown:function(e){"Escape"===e.key&&h(!1)},onBlur:function(){return h(!1)}}):F.createElement("div",{className:"builder-ai-text-generated"},m),F.createElement("div",{className:"builder-ai-text-action-wrapper",style:{pointerEvents:_?"none":"auto"}},[{label:"Fix Grammar & Spelling",
value:"fixGrammarAndSpelling"},{label:"Summarize",value:"summarize"},{label:"Para-phrase",value:"paraPhrase"},{label:"Simplify",value:"simplify"}].map(function(e){return F.createElement("span",{role:"button",className:"builder-button builder-button-primary",key:e.value,onClick:function(){return N(e.value)},onKeyDown:ye,tabIndex:0},e.label)}))),F.createElement("div",{className:"builder-ai-text-button-wrapper"},F.createElement("span",{role:"button",className:"builder-button builder-button-primary",
onClick:function(){a(t.generatedText)},disabled:_,onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"check"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_PLACE_TEXT")),F.createElement("span",{role:"button",className:"builder-button builder-button-primary",disabled:_,onClick:(0,Ct.Z)(Nt().mark(function e(){var n,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.prompt.trim().length){e.next=2;break}return e.abrupt("return");case 2:return h(!1),n=Pl(Ml(Ml({},t),{},{popover:o})),
e.next=6,A(n);case 6:(a=e.sent)&&r(Ml(Ml({},t),{},{popover:o,generatedText:a}));case 8:case "end":return e.stop()}},e)})),onKeyDown:ye,tabIndex:0},_?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"}):F.createElement(F.Fragment,null,F.createElement(co,{name:"recycle",className:"builder-d-inline-flex builder-me-2"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_REGENERATE")))))};function jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);
t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Bl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jl(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Jl=function(e){var t,n=e.popover,
o=void 0===n?"prompt":n,r=e.languageOptions,a=void 0===r?[]:r,i=e.generatedValues,l=e.onChange,c=e.onInsert,s=(0,F.useState)(i),d=(0,j.Z)(s,2),u=d[0],m=d[1],p=(0,F.useState)(!1),v=(0,j.Z)(p,2),f=v[0],b=v[1],h=Wo(null==i?void 0:i.prompt),g=[{label:"Standard",value:"standard"},{label:"Fluency",value:"fluency"},{label:"Formal",value:"formal"},{label:"Academic",value:"academic"},{label:"Simple",value:"simple"},{label:"Creative",value:"creative"},{label:"Expand",value:"expand"},{label:"Shorten",value:"shorten"}],
E=[{label:"Heading",value:"heading"},{label:"Paragraph",value:"paragraph"},{label:"Others",value:"others"}];(0,F.useEffect)(function(){(null==i?void 0:i.prompt)!==h&&m(i)},[i,h]);var _=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==u.prompt.trim().length){e.next=2;break}return e.abrupt("return");case 2:return b(!0),e.prev=3,e.next=6,fetch("".concat(y),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},
body:JSON.stringify({prompt:t,type:"text",max_tokens:u.characterLimit?kl(u.characterLimit):void 0})});case 6:return n=e.sent,e.next=9,n.json();case 9:if(o=e.sent,r=o.data,!Tl()(r,"status")||null!=r&&r.status){e.next=13;break}throw new Error(null==r?void 0:r.message);case 13:return e.abrupt("return",r.choices[0].message.content);case 16:e.prev=16,e.t0=e.catch(3),oe(null!==(a=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==a?a:"",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 19:return e.prev=
19,b(!1),e.finish(19);case 22:case "end":return e.stop()}},e,null,[[3,16,19,22]])}));return function(t){return e.apply(this,arguments)}}(),w=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,r;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n=Pl(Bl(Bl({},u),{},{popover:o})),e.next=4,_(n);case 4:(r=e.sent)&&l(Bl(Bl({},u),{},{popover:o,generatedText:r}));case 6:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),x=
function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,r;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=2;break}return e.abrupt("return");case 2:return n=Pl(Bl(Bl({},i),{},{prompt:u.prompt,action:t})),e.next=5,_(n);case 5:(r=e.sent)&&l(Bl(Bl({},u),{},{popover:o,generatedText:r}));case 7:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();return F.createElement("form",{onSubmit:w},F.createElement("div",{style:{pointerEvents:f?"none":
"auto"}},F.createElement("div",{className:"builder-row builder-gutter-15"},F.createElement("div",{className:"builder-column-12"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_PROMPT")),F.createElement("textarea",{className:"builder-form-field",name:"prompt",rows:6,value:u.prompt,onChange:function(e){return m(Bl(Bl({},u),{},{prompt:e.target.value}))}}),F.createElement("p",{className:"builder-text-caption builder-mb-1 builder-text-right"},
"Characters: ",(null===(t=u.prompt)||void 0===t?void 0:t.length)||0))),"edit"===o&&F.createElement("div",{className:"builder-row builder-gutter-15"},F.createElement("div",{className:"builder-ai-text-action-wrapper",style:{pointerEvents:f?"none":"auto"}},[{label:"Fix Grammar & Spelling",value:"fixGrammarAndSpelling"},{label:"Summarize",value:"summarize"},{label:"Improve",value:"improve"},{label:"Para-phrase",value:"paraPhrase"},{label:"Simplify",value:"simplify"}].map(function(e){return F.createElement("button",
{key:e.value,className:"builder-button builder-button-primary",onClick:function(t){t.preventDefault(),x(e.value)}},e.label)}))),F.createElement("div",{className:"builder-column-6"},F.createElement("div",{className:"builder-form-group"},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_CHARACTER_LIMIT_HELP_TEXT"),tagName:"span"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_CHARACTER_LIMIT"))),F.createElement("input",{className:"builder-form-field",
name:"characterLimit",value:u.characterLimit,onChange:function(e){return m(Bl(Bl({},u),{},{characterLimit:e.target.value}))}}))),F.createElement("div",{className:"builder-column-6"},F.createElement("div",{className:"builder-form-group"},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_LANGUAGE_PLACEHOLDER"),tagName:"span"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_LANGUAGE"))),F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",
value:a.find(function(e){return e.value===u.language}),options:a.filter(function(e){return"*"!==e.value}),placeholder:"Select a language",menuPlacement:"auto",menuPosition:"fixed",isClearable:!0,onChange:function(e){m(Bl(Bl({},u),{},{language:at(e)?e.value:""}))},components:{IndicatorSeparator:function(){return null}}}))),F.createElement("div",{className:"builder-column-6"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_SELECT_TONE")),
F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:g.find(function(e){return e.value===u.tone}),options:g,menuPlacement:"auto",menuPosition:"fixed",onChange:function(e){return m(Bl(Bl({},u),{},{tone:e.value}))},components:{IndicatorSeparator:function(){return null}}}))),F.createElement("div",{className:"builder-column-6"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_SELECT_USE_CASE")),
F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:E.find(function(e){return e.value===u.useCase}),options:E,menuPlacement:"auto",menuPosition:"fixed",onChange:function(e){return m(Bl(Bl({},u),{},{useCase:e.value}))},components:{IndicatorSeparator:function(){return null}}}))))),F.createElement("div",{className:"builder-ai-text-button-wrapper builder-d-flex builder-justify-content-end builder-align-items-center builder-bg-secondary"},"edit"===o&&F.createElement("button",
{type:"button",className:"builder-button builder-button-primary builder-me-1",disabled:f,onClick:function(){c&&c(u.prompt)}},F.createElement(co,{name:"check"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_PLACE_TEXT")),F.createElement("button",{type:"submit",className:"builder-button builder-button-primary",disabled:f},f?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"}):F.createElement(F.Fragment,null,F.createElement(co,{name:"generate",className:"builder-d-inline-flex builder-me-2"}),
Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE")))))},Gl=function(e){var t=e.isOpen,n=e.fieldValue,o=e.languageOptions,r=void 0===o?[]:o,a=e.triggerRef,i=e.onChange,l=e.onClose,c=e.popoverGap,s=n.trim().length>0,d=(0,F.useState)(s?"edit":"prompt"),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useState)({prompt:s?n:"",popover:s?"edit":"prompt",generatedText:"",characterLimit:"1000",language:"",tone:"standard",useCase:"others"}),f=(0,j.Z)(v,2),b=f[0],h=f[1],g=(0,F.useState)([]),E=(0,j.Z)(g,2),y=E[0],_=E[1],
w=(0,F.useState)(0),x=(0,j.Z)(w,2),I=x[0],O=x[1],C=function(){var e=n.trim().length>0;p(e?"edit":"prompt"),h({prompt:e?n:"",popover:e?"edit":"prompt",generatedText:"",characterLimit:"1000",language:"",tone:"standard",useCase:"others"}),_([])};(0,F.useEffect)(function(){C()},[n]);var A=function(e){b.prompt!==e.prompt?(_([e]),h(e),O(0)):(_([].concat((0,ue.Z)(y),[e])),h(e),O(y.length)),p("regenerate")};return F.createElement($o,{title:F.createElement("div",{className:"builder-d-flex builder-align-items-center"},
"regenerate"===m&&F.createElement("button",{className:"builder-button builder-button-icon",onClick:function(){p("prompt"),h({prompt:"",popover:"prompt",generatedText:"",characterLimit:"1000",language:"",tone:"standard",useCase:"others"}),_([])}},F.createElement(co,{name:"arrowLeft",height:20,width:20})),"regenerate"===m?Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_WRITE_NEW_PROMPT"):Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_TEXT_GENERATOR")),portalPopoverCss:{maxWidth:"440px",width:"100%"},open:t,
parent_el:a,onHide:function(){C(),l()},gap:c,modalBodyCss:{padding:"0px"},hideFooter:!0},F.createElement("div",{className:"builder-card builder-card-popover builder-p-2"},function(){switch(m){case "regenerate":return F.createElement(Zl,{onEdit:function(){p("prompt")},onInsert:function(e){i(e),l()},onChange:A,generatedValues:b,onPaginate:function(e){var t=y[e];h(t),O(e)},totalItems:y.length,currentIndex:I});case "edit":return F.createElement(Jl,{generatedValues:b,popover:"edit",onChange:A,onInsert:function(e){i(e),
l()},languageOptions:r});default:return F.createElement(Jl,{languageOptions:r,generatedValues:b,onChange:A})}}()))};var Hl=n(1284),Ul=F.forwardRef(function(e,t){var n=e.value,o=e.isOpen,r=e.onClose,a=e.onChange,i=/<li><p>(.*?)<\/p><(\/?)(ol|li|ul)>/gi,l=(0,F.useState)(""),c=(0,j.Z)(l,2),s=c[0],d=c[1];return(0,F.useEffect)(function(){var e=n.replaceAll(i,"<li>$1<$2$3>");d(e)},[n]),F.createElement($o,{title:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_SOURCE_CODE"),open:o,parent_el:t,modalBodyCss:{padding:0},
portalPopoverCss:{width:"600px",maxWidth:"600px"},onHide:r,gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover builder-code-editor-wrapper"},F.createElement(wa,{name:"codeEditor",value:n,onChange:function(e){return d(e)}}),F.createElement("div",{className:"builder-d-flex justify-content-end mt-10"},F.createElement("button",{type:"button",className:"builder-button builder-button-primary",onClick:function(){a(s),
r()}},Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_APPLY_BUTTON"))))))}),zl=(0,F.forwardRef)(function(e,t){var n=e.color,o=e.onChangeColor,r=e.onClick,a=e.isClearable,i=void 0===a||a,l=e.dimension,c=void 0===l?{width:16,height:16}:l,s=function(e){if(st(e))return e;var t=new dr.C(e);return t.isValid?t.toHexString().toUpperCase().replace("#",""):""},d=(0,F.useState)(s(n)),u=(0,j.Z)(d,2),m=u[0],p=u[1];(0,F.useEffect)(function(){p(s(n))},[n]);var v=st(m)||(new dr.C(m)).isValid,f=st(m)?m:(new dr.C(m)).setAlpha(1).toRgbString();
return F.createElement("div",{ref:t,className:"builder-color-plain-swatch"},F.createElement("button",{type:"button",className:"builder-color-plain-swatch-button",onClick:r},v?F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-color-plain-swatch-color-box",style:{backgroundColor:f}},F.createElement("span",{className:"builder-color-plain-swatch-color-left",style:{width:"".concat(c.width,"px"),height:"".concat(c.height,"px")}}),i&&F.createElement("span",{className:"builder-plain-close-button",
onClick:function(e){e.preventDefault(),e.stopPropagation(),o("")},title:"Clear",role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"crossCircled"})))):F.createElement("div",{className:"builder-color-plain-swatch-empty-color",style:{width:"".concat(c.width,"px"),height:"".concat(c.height,"px")}})))}),Fl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=(0,F.useMemo)(function(){return gi()(e,t)},[t].concat((0,ue.Z)(n)));
return(0,F.useEffect)(function(){return function(){o.cancel()}},[o]),o},Vl=function(e){var t,n=e.editor,o=e.triggerRef,r=null!==(t=n.getAttributes("textStyle").color)&&void 0!==t?t:"",a=(0,F.useState)(!1),i=(0,j.Z)(a,2),l=i[0],c=i[1],s=(0,F.useState)(""),d=(0,j.Z)(s,2),u=d[0],m=d[1];(0,F.useEffect)(function(){Ee(r)&&m(r)},[r]);var p=Fl(function(e){n.chain().focus().setColor(e).run()},400);return F.createElement("div",null,F.createElement(zl,{color:u,onChangeColor:function(e){e||n.chain().focus().unsetColor().run()},
onClick:function(){return c(!l)},dimension:{height:16,width:16}}),F.createElement($o,{title:"Color",open:l,parent_el:o,onHide:function(){return c(!1)},modalBodyCss:{padding:0},gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(vr,{color:u,onChange:function(e){!function(e){m(e)}(e),p(e)}})))))},Wl=n(4184),Kl=n.n(Wl);function Yl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Xl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yl(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
var ql={type:"url",url:"",menu:"",page:0,new_tab:!1,nofollow:!1,noreferrer:!1,noopener:!1},$l=["nofollow","noreferrer","noopener"],Ql=function(e){return"index.php?option=com_jpagebuilder&view=page&id=".concat(e)},ec=function(e){var t,n=e.triggerRef,o=e.isActive,r=e.setLink,a=e.attributes,i=e.unsetLink,l=(0,F.useState)(ql),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)([]),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useState)([]),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)("url"),y=(0,j.Z)(E,2),_=y[0],w=
y[1],x=(0,F.useState)(!1),I=(0,j.Z)(x,2),O=I[0],C=I[1],A=(0,F.useState)(null),N=(0,j.Z)(A,2),D=N[0],S=N[1];(0,F.useEffect)(function(){if("open"===D){var e={nofollow:!1,noreferrer:!1,noopener:!1};if(Ee(a.rel)){var t=a.rel.split(" ").filter(function(e){return e});Object.keys(e).forEach(function(n){t.includes(n)&&(e[n]=!0)})}Ee(a.url)&&d(Xl(Xl({},ql),{},{url:a.url,new_tab:a.new_tab},e))}},[a,D]);var P=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n;return Nt().wrap(function(e){for(;;)switch(e.prev=
e.next){case 0:return t="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&task=page.loadPagesList"),e.next=3,fetch(t,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 3:return n=e.sent,e.next=6,n.json();case 6:return e.abrupt("return",e.sent);case 7:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n;return Nt().wrap(function(e){for(;;)switch(e.prev=
e.next){case 0:return t="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&task=page.loadSiteMenus"),e.next=3,fetch(t,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 3:return n=e.sent,e.next=6,n.json();case 6:return e.abrupt("return",e.sent);case 7:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();(0,F.useEffect)(function(){(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r;return Nt().wrap(function(e){for(;;)switch(e.prev=
e.next){case 0:return e.next=2,Promise.all([P(),k()]);case 2:t=e.sent,n=(0,j.Z)(t,2),o=n[0],r=n[1],(0,V.unstable_batchedUpdates)(function(){v(o),g(r)});case 7:case "end":return e.stop()}},e)}))()},[]);var R=function(e){var t=null!=e&&e.clearInput?"":e.target.value,n=Xl(Xl({},s),{},{url:t});d(n)},T="page"===_?p:h;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-richtext-link-wrapper"},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_LINK"),tagName:"span"},
F.createElement("button",{type:"button",className:Kl()("builder-richtext-tool-item",{active:o}),onClick:function(){return S("open")}},F.createElement(co,{name:"editorLink"}))),o&&F.createElement("span",{role:"button",tabIndex:0,className:"clear-link-button",onClick:function(e){e.stopPropagation(),d(ql),i()},onKeyDown:ye},F.createElement(co,{name:"crossCircled"})),F.createElement($o,{title:"Link",open:null!==D,parent_el:n,modalBodyCss:{padding:0},onHide:function(){w("url"),S(null)},gap:25},F.createElement("div",
{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement("div",{className:"builder-nav-tabs builder-tab-pills builder-nav-fill builder-mb-2"},["url","menu","page"].map(function(e,t){return F.createElement("span",{key:t,className:"builder-nav-item".concat(e==_?" active":""),onClick:function(t){t.preventDefault(),w(e),"url"!==e&&d(Xl(Xl({},s),{},{type:e}))},role:"button",tabIndex:0,onKeyDown:ye},Hr()(e))})),F.createElement("div",
{className:"builder-tab-content"},F.createElement("div",{className:"builder-form-group"},"url"==_?F.createElement("div",{className:"builder-position-relative"},F.createElement("input",{placeholder:"https://",className:"builder-form-field builder-form-field-text builder-pe-4",value:s.url,onChange:R}),""===s.url?F.createElement("span",{className:"builder-button builder-button-round builder-media-link-icon",role:"button"},F.createElement(co,{name:"upload",onClick:function(){return C(!0)}})):F.createElement("span",
{className:"builder-button builder-button-round builder-media-link-icon",role:"button"},F.createElement(co,{name:"timesAlt",onClick:function(){return R({clearInput:!0})}}))):F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",placeholder:"Select ".concat(_),options:"page"==_?p:h,value:null!==(t=T.find(function(e){var t=String(e.value);return"page"===_&&Ee(e.value)&&(t=Ql(t)),t===String(s[_])}))&&void 0!==t?t:"",isClearable:!0,isSearchable:!0,menuPlacement:"auto",
menuPosition:"fixed",name:_+"Link",onChange:function(e){var t,n,o;o=t=null==e?void 0:e.value,"page"===(n=_)&&Ee(t)&&(o=Ql(t)),d(Xl(Xl({},s),{},(0,B.Z)({},n,o)))},components:{IndicatorSeparator:function(){return null}}})),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",className:"builder-field-check",value:s.new_tab,checked:s.new_tab,onChange:function(){var e=Xl(Xl({},
s),{},{new_tab:!s.new_tab});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_OPEN_IN_NEW_TAB"))),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",className:"builder-field-check",value:s.nofollow,checked:s.nofollow,onChange:function(){var e=Xl(Xl({},s),{},{nofollow:!s.nofollow});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_NO_FOLLOW"))),F.createElement("div",{className:"builder-form-check"},
F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",className:"builder-field-check",value:s.noreferrer,checked:s.noreferrer,onChange:function(){var e=Xl(Xl({},s),{},{noreferrer:!s.noreferrer});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_NO_REFERRER"))),F.createElement("div",{className:"builder-form-check"},F.createElement("label",{className:"builder-form-label justify-content-start mb-2"},F.createElement("input",{type:"checkbox",
className:"builder-field-check",value:s.noopener,checked:s.noopener,onChange:function(){var e=Xl(Xl({},s),{},{noopener:!s.noopener});d(e)}}),Joomla.JText._("COM_JPAGEBUILDER_NO_OPENER")))),F.createElement("div",{className:"builder-d-flex justify-content-end builder-mt-3"},F.createElement("button",{type:"button",className:"builder-button builder-button-primary",onClick:function(){var e,t=s.type;Ee(t)&&(0===(null===(e=s[t])||void 0===e?void 0:e.toString().trim().length)?i():r({href:String(s[t]),target:s.new_tab?
"_blank":null,rel:$l.filter(function(e){return s[e]}).join(" ")})),S(null),w("url"),d(ql)}},Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_APPLY_BUTTON"))))))),F.createElement(Aa,{isOpen:O,showClose:!0,onClose:function(){return C(!1)},cssClass:"builder-modal-dialog-fixed builder-modal-dialog-centered",size:"lg"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return C(!1)}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_ACTION_PANEL_MEDIA_MANAGER_SETTINGS"))),
F.createElement(yl,{client:"field",type:"*",onHandleInsertMedia:function(e){var t=e;"object"===(0,de.Z)(e)&&!Array.isArray(e)&&Object.keys(e).length>0&&(t=Object.values(e)[0]),(0,V.unstable_batchedUpdates)(function(){d(Xl(Xl({},s),{},{url:t.path})),C(!1)})}}))))},tc=function(e){var t=e.name,n=e.icon,o=e.isActive,r=e.onClick,a=e.disabled;return F.createElement(er.Z,{content:t,tagName:"span"},F.createElement("button",{type:"button",className:Kl()("builder-richtext-tool-item",{active:o}),onClick:r,disabled:a},
F.createElement(co,{name:n})))},nc=function(e){var t=e.editor,n=e.setActivePopover,o=(0,F.useRef)(null),r=(0,F.useState)(!1),a=(0,j.Z)(r,2),i=a[0],l=a[1];return F.createElement(F.Fragment,null,F.createElement("button",{type:"button",className:Kl()("builder-richtext-tool-item",{active:i}),ref:o,onClick:function(){return l(!i)}},F.createElement(co,{name:"ellipsisXAlt"})),F.createElement(Ei,{open:i,parent_el:o,onHide:function(){return l(!1)},position:{bottom:!0},scroll_target:document.getElementById("builder-layers-panel-modal-body"),
topGap:10},F.createElement("div",{className:"builder-backdrop",role:"button",onClick:function(){return l(!1)},onKeyDown:ye,tabIndex:0}),F.createElement("div",{className:"builder-richtext-tool-option-wrapper",onClick:function(){return l(!1)},role:"button",tabIndex:0,onKeyDown:ye},F.createElement(tc,{name:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_BLOCKQUOTE"),icon:"editorQuote",onClick:function(){return t.chain().focus().toggleBlockquote().run()},isActive:t.isActive("blockquote"),disabled:!t.can().chain().focus().toggleBlockquote().run()}),
F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_INSERT_TABLE"),tagName:"span"},F.createElement("button",{type:"button",className:"builder-richtext-tool-item",onClick:function(){return n("table")}},F.createElement(co,{name:"editorTable"}))),F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_SOURCE_CODE"),tagName:"span"},F.createElement("button",{type:"button",className:"builder-richtext-tool-item",onClick:function(){return n("code-editor")}},F.createElement(co,
{name:"editorSourceCode"}))))))},oc=function(e){var t=e.open,n=e.onChange,o=e.content,r=e.onOpen,a=(0,F.useRef)(null),i=(0,F.useRef)(null),l=(0,F.useState)(!0),c=(0,j.Z)(l,2),s=c[0],d=c[1];return(0,F.useEffect)(function(){var e;t&&(null===(e=a.current)||void 0===e||e.submit())},[t]),F.createElement(Aa,{isOpen:t,onClose:function(){return r(!1)},cssClass:"builder-modal-dialog-centered builder-modal-dialog-responsive"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,
onClose:function(){return r(!1)}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_SYSTEM_EDITOR"))),F.createElement("div",null,F.createElement("div",null,F.createElement("form",{method:"post",target:"editorIframe",action:"".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=systemeditor&layout=default&tmpl=component"),ref:a,style:{display:"none"}},F.createElement("input",{type:"hidden",value:o,name:"system_editor_data"})),s&&F.createElement("div",
{className:"builder-d-flex builder-justify-content-center builder-align-items-center builder-modal-dialog-responsive-iframe"},F.createElement("div",{className:"builder-spinner"})),F.createElement("iframe",{ref:i,onLoad:function(){if(d(!1),i.current&&i.current.contentDocument){var e=i.current.contentDocument.body;e&&(e.style.padding="20px")}},name:"editorIframe",title:"editor iframe",className:"builder-modal-dialog-responsive-iframe",style:{display:s?"none":"block"}}))),F.createElement(Ca,null,F.createElement("div",
{className:"builder-d-flex justify-content-end builder-mt-3"},F.createElement("button",{type:"button",onClick:function(){return r(!1)},className:"builder-button builder-button-primary"},Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_SYSTEM_EDITOR_CANCEL")),F.createElement("button",{type:"button",className:"builder-button builder-button-primary builder-ms-2",onClick:function(){var e,t,o=null===(e=i.current)||void 0===e?void 0:e.contentWindow;if(null!=o&&null!==(t=o.tinyMCE)&&void 0!==t&&t.activeEditor){var a;
null===(a=o.document)||void 0===a||null===(a=a.querySelector('[aria-controls="wf-editor-wysiwyg"]'))||void 0===a||a.click();var l=o.tinyMCE.activeEditor.getContent();n(l)}r(!1)}},Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_SYSTEM_EDITOR_APPLY"))))))};const rc=function(e){var t=e.value,n=e.label,o=e.onChange,r=e.checked,a=e.disabled,i=void 0!==a&&a;return F.createElement("div",{className:"builder-form-group builder-form-inline"},n&&F.createElement("label",null,n),F.createElement("div",{className:"builder-form-switch"},
F.createElement("input",{type:"checkbox",value:Ie(t)?String(t):void 0,checked:r,disabled:i,onChange:function(e){o&&o(e.target.checked,e)}})))},ac=function(e){var t=e.value,n=e.placeholder,o=e.label,r=e.isInline,a=void 0!==r&&r,i=e.onChange,l=function(e){i(e.target.value)};return F.createElement("div",{className:"builder-form-group".concat(a?" builder-row builder-align-items-center":"")},F.createElement("label",{className:"".concat(a?"builder-column-4 builder-mb-0":"")},o),F.createElement("div",{className:a?
"builder-column-8":""},F.createElement("input",{type:"text",value:t,placeholder:null!=n?n:"",className:"builder-form-field",autoComplete:"off",onChange:l,onBlur:l})))};function ic(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function lc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ic(Object(n),!0).forEach(function(t){(0,B.Z)(e,
t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ic(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cc=F.forwardRef(function(e,t){var n=e.isOpen,o=e.onClose,r=e.onChange,a={rows:3,cols:3,withHeaderRow:!0},i=(0,F.useState)(a),l=(0,j.Z)(i,2),c=l[0],s=l[1];return F.createElement($o,{title:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_INSERT_TABLE"),open:n,parent_el:t,modalBodyCss:{padding:0},
onHide:o,gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(ac,{value:c.rows,onChange:function(e){return s(lc(lc({},c),{},{rows:e}))},label:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_TABLE_NUM_OF_ROWS")}),F.createElement(ac,{value:c.cols,onChange:function(e){return s(lc(lc({},c),{},{cols:e}))},label:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_TABLE_NUM_OF_COLS")}),F.createElement("div",
{className:"builder-richtext-new-tab-wrapper"},F.createElement(rc,{checked:c.withHeaderRow,onChange:function(){return s(lc(lc({},c),{},{withHeaderRow:!c.withHeaderRow}))},label:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_TABLE_HEADER_ROW")})),F.createElement("div",{className:"builder-d-flex justify-content-end mt-10"},F.createElement("button",{type:"button",className:"builder-button builder-button-primary",onClick:function(){r(c),s(a),o()}},Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_INSERT_BUTTON"))))))}),
sc=function(e){var t=e.items,n=e.defaultItem,o=(0,F.useRef)(null),r=(0,F.useState)(!1),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useState)(n),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=Object.keys(t).find(function(e){return t[e].isActive});return(0,F.useEffect)(function(){Ee(m)&&u(m)},[m]),F.createElement(F.Fragment,null,F.createElement(er.Z,{content:Joomla.JText._(t[d].name),tagName:"span"},F.createElement("button",{type:"button",className:Kl()("builder-richtext-tool-item",{active:t[d].isActive}),ref:o,onClick:function(){return l(!i)}},
F.createElement(co,{name:t[d].icon}))),F.createElement(Ei,{open:i,parent_el:o,onHide:function(){return l(!1)},position:{bottom:!0},scroll_target:document.getElementById("builder-layers-panel-modal-body"),topGap:10},F.createElement("div",{className:"builder-backdrop",role:"button",onClick:function(){return l(!1)},onKeyDown:ye,tabIndex:0}),F.createElement("div",{className:"builder-richtext-tool-option-wrapper"},Object.keys(t).map(function(e){return F.createElement(er.Z,{key:e,content:Joomla.JText._(t[e].name),
tagName:"span"},F.createElement("button",{type:"button",className:Kl()("builder-richtext-tool-item",{active:t[e].isActive}),onClick:function(n){n.stopPropagation(),t[e].action(),u(e),l(!1)}},F.createElement(co,{name:t[e].icon})))}))))},dc=function(e){return{h1:{name:"COM_JPAGEBUILDER_RICHTEXT_H1",icon:"editorHeading1",isActive:e.isActive("heading",{level:1}),action:function(){return e.chain().focus().toggleHeading({level:1}).run()}},h2:{name:"COM_JPAGEBUILDER_RICHTEXT_H2",icon:"editorHeading2",isActive:e.isActive("heading",
{level:2}),action:function(){return e.chain().focus().toggleHeading({level:2}).run()}},h3:{name:"COM_JPAGEBUILDER_RICHTEXT_H3",icon:"editorHeading3",isActive:e.isActive("heading",{level:3}),action:function(){return e.chain().focus().toggleHeading({level:3}).run()}},h4:{name:"COM_JPAGEBUILDER_RICHTEXT_H4",icon:"editorHeading4",isActive:e.isActive("heading",{level:4}),action:function(){return e.chain().focus().toggleHeading({level:4}).run()}},h5:{name:"COM_JPAGEBUILDER_RICHTEXT_H5",icon:"editorHeading5",
isActive:e.isActive("heading",{level:5}),action:function(){return e.chain().focus().toggleHeading({level:5}).run()}},h6:{name:"COM_JPAGEBUILDER_RICHTEXT_H6",icon:"editorHeading6",isActive:e.isActive("heading",{level:6}),action:function(){return e.chain().focus().toggleHeading({level:6}).run()}}}},uc=function(e){return{list:{name:"COM_JPAGEBUILDER_RICHTEXT_UNORDERED_LIST",icon:"editorList",isActive:e.isActive("bulletList"),action:function(){return e.chain().focus().toggleBulletList().run()}},orderedList:{name:"COM_JPAGEBUILDER_RICHTEXT_ORDERED_LIST",
icon:"editorOrderedList",isActive:e.isActive("orderedList"),action:function(){return e.chain().focus().toggleOrderedList().run()}}}},mc=function(e){return{left:{name:"COM_JPAGEBUILDER_RICHTEXT_ALIGN_LEFT",icon:"textAlignLeft",isActive:e.isActive({textAlign:"left"}),action:function(){return e.chain().focus().setTextAlign("left").run()}},center:{name:"COM_JPAGEBUILDER_RICHTEXT_ALIGN_CENTER",icon:"textAlignCenter",isActive:e.isActive({textAlign:"center"}),action:function(){return e.chain().focus().setTextAlign("center").run()}},
right:{name:"COM_JPAGEBUILDER_RICHTEXT_ALIGN_RIGHT",icon:"textAlignRight",isActive:e.isActive({textAlign:"right"}),action:function(){return e.chain().focus().setTextAlign("right").run()}},justify:{name:"COM_JPAGEBUILDER_RICHTEXT_ALIGN_JUSTIFY",icon:"textAlignJustify",isActive:e.isActive({textAlign:"justify"}),action:function(){return e.chain().focus().setTextAlign("justify").run()}}}},pc=function(e){var t=e.onChange,n=e.editor,o=e.value,r=(0,F.useRef)(null),a=(0,F.useState)(null),i=(0,j.Z)(a,2),l=
i[0],c=i[1],s=(0,F.useState)(!1),d=(0,j.Z)(s,2),u=d[0],m=d[1],p=(0,F.useState)(!1),v=(0,j.Z)(p,2),f=v[0],b=v[1];return n?F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-toolbar-wrapper",ref:r},F.createElement("div",{className:"builder-controls-group"},F.createElement("div",{className:"builder-controls-group"},F.createElement(tc,{name:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_BOLD"),icon:"editorBold",onClick:function(){return n.chain().focus().toggleBold().run()},isActive:n.isActive("bold"),
disabled:!n.can().chain().focus().toggleBold().run()}),F.createElement(tc,{name:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_ITALIC"),icon:"editorItalic",onClick:function(){return n.chain().focus().toggleItalic().run()},isActive:n.isActive("italic"),disabled:!n.can().chain().focus().toggleItalic().run()}),F.createElement(tc,{name:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_UNDERLINE"),icon:"editorUnderline",onClick:function(){return n.chain().focus().toggleUnderline().run()},isActive:n.isActive("italic"),
disabled:!n.can().chain().focus().toggleUnderline().run()}),F.createElement(sc,{items:dc(n),defaultItem:"h1"})),F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_COLOR"),tagName:"span"},F.createElement(Vl,{editor:n,triggerRef:r}))),F.createElement("div",{className:"builder-controls-group"},F.createElement(sc,{items:mc(n),defaultItem:"left"})),F.createElement("div",{className:"builder-controls-group"},F.createElement(sc,{items:uc(n),defaultItem:"list"})),F.createElement("div",
{className:"builder-controls-group"},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_INSERT_IMAGE"),tagName:"span"},F.createElement("button",{type:"button",className:"builder-richtext-tool-item",onClick:function(){m(!0)}},F.createElement(co,{name:"image"})))),F.createElement("div",{className:"builder-controls-group"},F.createElement(ec,{isActive:n.isActive("link"),attributes:{url:n.getAttributes("link").href,new_tab:"_blank"===n.getAttributes("link").target,rel:n.getAttributes("link").rel},
setLink:function(e){var t=e.href,o=e.target,r=e.rel;n.chain().focus().setLink({href:t,target:o,rel:r}).run()},unsetLink:function(){n.chain().focus().unsetLink().run()},triggerRef:r})),F.createElement("div",{className:"builder-controls-group"},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_RICHTEXT_SYSTEM_EDITOR"),tagName:"span"},F.createElement("button",{type:"button",className:"builder-richtext-tool-item",onClick:function(){return b(!0)}},F.createElement(co,{name:"editorExpand"})))),
F.createElement(nc,{editor:n,activePopover:l,setActivePopover:c})),F.createElement(Ul,{ref:r,value:o,onChange:function(e){null==n||n.commands.setContent(e),t(e)},isOpen:"code-editor"===l,onClose:function(){return c(null)}}),F.createElement(cc,{ref:r,isOpen:"table"===l,onClose:function(){return c(null)},onChange:function(e){var t=e.rows,o=e.cols,r=e.withHeaderRow;null==n||n.chain().focus().insertTable({rows:t,cols:o,withHeaderRow:r}).run()}}),F.createElement(Aa,{isOpen:u,onClose:function(){return m(!1)},
cssClass:"builder-modal-dialog-fixed builder-modal-dialog-centered",size:"lg"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return m(!1)}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_MEDIA"))),F.createElement(yl,{client:"field",type:"image",onHandleInsertMedia:function(e){var t=e;"object"===(0,de.Z)(e)&&!Array.isArray(e)&&Object.keys(e).length>0&&(t=Object.values(e)[0]),null==
n||n.chain().focus().setImage({src:t.path,alt:t.title}).run(),m(!1)}}))),F.createElement(oc,{open:f,onOpen:b,content:o,onChange:function(e){n.commands.setContent(e),t(e)}})):null},vc=n(9734),fc=n(7937),bc=n(561),hc=n(353),gc=n(336),Ec=n(9966),yc=n(5525),_c=n(7490),wc=n(8486),xc=n(3816),Ic=n(6484),Oc=n(4565),Cc=n(1575),Ac=n(1347),Nc=n(658),Dc=n(3626),Sc=n(3991),Pc=n(2701),kc=n(6279),Rc=n(8510),Tc=n(6761),Lc=function(e){var t=(0,F.useRef)(null),n=e.node,o=n.attrs,r=o.src,a=o.alt;return(0,F.useEffect)(function(){var e;
at(n.attrs.style)&&(null===(e=t.current)||void 0===e||e.setAttribute("style",n.attrs.style))},[n.attrs.style]),F.createElement(Hl.T5,null,F.createElement("img",{ref:t,src:pagebuilder_base+r,alt:a,className:n.attrs.class,height:n.attrs.height,width:n.attrs.width}))},Mc=Tc.ZP.extend({addNodeView:function(){return(0,Hl.fW)(Lc)},addAttributes:function(){var e,t,n,o,r,a;return{src:{default:null!==(e=this.editor)&&void 0!==e&&e.getAttributes("src")?this.editor.getAttributes("src"):null,parseHTML:function(e){return e.hasAttribute("src")?
e.getAttribute("src"):null}},alt:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("alt"),parseHTML:function(e){return e.hasAttribute("alt")?e.getAttribute("alt"):null}},height:{default:null===(n=this.editor)||void 0===n?void 0:n.getAttributes("height"),parseHTML:function(e){return e.hasAttribute("height")?e.getAttribute("height"):null}},width:{default:null===(o=this.editor)||void 0===o?void 0:o.getAttributes("width"),parseHTML:function(e){return e.hasAttribute("width")?e.getAttribute("width"):
null}},class:{default:null===(r=this.editor)||void 0===r?void 0:r.getAttributes("class"),parseHTML:function(e){return e.hasAttribute("class")?e.getAttribute("class"):null}},style:{default:null===(a=this.editor)||void 0===a?void 0:a.getAttributes("style"),parseHTML:function(e){return e.hasAttribute("style")?e.getAttribute("style"):null}}}}}).configure({inline:!0,allowBase64:!0});function Zc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function jc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zc(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Bc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}
var Jc=n(3621).Z.extend({renderHTML:function(e){var t=e.HTMLAttributes,n=t.style;if(!n)return["span",t,0];var o,r={},a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Bc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?
Bc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||
n.return()}finally{if(l)throw a;}}}}(n.replace(/\s+/g,"").split(";").filter(function(e){return!!e}).map(function(e){var t=e.split(":"),n=(0,j.Z)(t,2);return{key:n[0],value:n[1]}}));try{for(a.s();!(o=a.n()).done;){var i=o.value,l=i.key,c=i.value;Ee(r[l])||(r[l]=c)}}catch(e){a.e(e)}finally{a.f()}for(var s=[],d=0,u=Object.entries(r);d<u.length;d++){var m=(0,j.Z)(u[d],2),p=m[0],v=m[1];s.push("".concat(p,":").concat(v,";"))}return s.length>0&&(t=jc(jc({},t),{},{style:s.join(" ")})),["span",t,0]},addAttributes:function(){var e,
t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")}}}}),Gc=Jc;function Hc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Uc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?
Hc(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Fc=n(6022).Z.extend({renderHTML:function(e){var t,n=e.HTMLAttributes,o=e.node,r=n.style,a=null!==(t=o.attrs.textAlign)&&void 0!==
t?t:null;if(!r)return["p",n,0];var i,l={},c=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return zc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,
r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}(r.replace(/\s+/g,"").split(";").filter(function(e){return!!e}).map(function(e){var t=
e.split(":"),n=(0,j.Z)(t,2);return{key:n[0],value:n[1]}}));try{for(c.s();!(i=c.n()).done;){var s=i.value,d=s.key,u=s.value;Ee(l[d])||(l[d]=u)}}catch(e){c.e(e)}finally{c.f()}for(var m=[],p=0,v=Object.entries(l);p<v.length;p++){var f=(0,j.Z)(v[p],2),b=f[0],h=f[1];"left"!==a&&m.push("".concat(b,":").concat(h,";"))}return m.length>0&&(n=Uc(Uc({},n),{},{style:m.join(" ")})),["p",n,0]},addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},
style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")}}}}),Vc=Fc;function Wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Kc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wc(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,
Object.getOwnPropertyDescriptors(n)):Wc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Yc=function(e){var t=e.input,n=e.editorRef,o=t.value,r=t.onChange,a=function(e){var t=e.content,n=e.onChange,o=(0,F.useRef)(null),r=/<li><p>(.*?)<\/p><(\/?)(ol|li|ul)>/gi;return o.current=(0,Hl.jE)({extensions:[gc.Z,Pc.Z,wc.Z,yc.Z,kc.Z.configure({types:["heading","paragraph"]}),Mc,Gc,hc.Z,_c.Z.extend({addAttributes:function(){var e,t,n;return Kc(Kc({},
null===(e=this.parent)||void 0===e?void 0:e.call(this)),{},{class:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("class")},style:{default:null===(n=this.editor)||void 0===n?void 0:n.getAttributes("style")}})}}).configure({levels:[1,2,3,4,5,6]}),Ic.Z.extend({addAttributes:function(){var e,t,n,o,r;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")},href:{default:null===
(n=this.editor)||void 0===n?void 0:n.getAttributes("href")},target:{default:null===(o=this.editor)||void 0===o?void 0:o.getAttributes("target")},rel:{default:null===(r=this.editor)||void 0===r?void 0:r.getAttributes("rel")}}}}).configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer nofollow"}}),Vc,fc.ZP.extend({addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:
t.getAttributes("style")}}}}),xc.ZP.extend({addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")}}}}),Rc.Z.extend({addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")}}}}),vc.ZP.extend({addAttributes:function(){var e,
t,n;return{class:{default:null!==(e=null===(t=this.editor)||void 0===t?void 0:t.getAttributes("class"))&&void 0!==e?e:"jpb-blockquote-style",parseHTML:function(e){return e.hasAttribute("class")?e.getAttribute("class"):null}},style:{default:null===(n=this.editor)||void 0===n?void 0:n.getAttributes("style")}}}}),bc.ZP.extend({addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:
t.getAttributes("style")}}}}),Cc.ZP.extend({addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")}}}}),Oc.Z.extend({addAttributes:function(){var e,t;return{class:{default:null===(e=this.editor)||void 0===e?void 0:e.getAttributes("class")},style:{default:null===(t=this.editor)||void 0===t?void 0:t.getAttributes("style")}}}}),Ec.Z,Ac.ZP.extend({addAttributes:function(){var e,
t,n;return{class:{default:null!==(e=null===(t=this.editor)||void 0===t?void 0:t.getAttributes("class"))&&void 0!==e?e:"jpb-table-style",parseHTML:function(e){return e.hasAttribute("class")?e.getAttribute("class"):null}},style:{default:null===(n=this.editor)||void 0===n?void 0:n.getAttributes("style")}}}}).configure({resizable:!1}),Sc.Z,Dc.Z,Nc.Z],content:t,onUpdate:function(e){var t=e.editor.getHTML().replaceAll(r,"<li>$1<$2$3>");n(t)}}),o.current}({content:o,onChange:r});return n.current=a,F.createElement("div",
{className:"builder-richtext-editor"},F.createElement(pc,{editor:a,value:o,onChange:r}),F.createElement(Hl.kg,{editor:a,spellCheck:!1}))};function Xc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function qc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xc(Object(n),!0).forEach(function(t){(0,B.Z)(e,
t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const $c=function(e){var t=e.input,n=e.params,o=t.value,r=(0,F.useState)(!1),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useRef)(null),s=(0,F.useRef)(null),d=/<li><p>(.*?)<\/p><(\/?)(ol|li|ul)>/gi,u="<li>$1<$2$3>",m=o.replaceAll(d,u),p=qc(qc({},t),{},{value:m});(0,F.useEffect)(function(){var e,
t=null===(e=s.current)||void 0===e||null===(e=e.getHTML())||void 0===e?void 0:e.replaceAll(d,u),n=null==o?void 0:o.replaceAll(d,u);s.current&&t!==n&&s.current.commands.setContent(n)},[o]);var v=o.replace(/<\/(p|div|h1|h2|h3|h4|h5|h6|ul|ol|li|blockquote)>/g,"\n").replace(/<[^>]*>/g,""),f=v.length>0;return F.createElement("div",{ref:c,className:"builder-form-group","data-field":null==t?void 0:t.name},n.title?n.desc?F.createElement("label",null,F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title)):
F.createElement("label",null,n.title):null,!!window.is_ai_enabled&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-button builder-button-primary builder-ai-button builder-mb-2",role:"button",onClick:function(){return l(!0)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"generate",className:"builder-d-inline-flex builder-me-2"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE_WITH_AI")),F.createElement(Gl,{languageOptions:null==n?void 0:n.languageOptions,fieldValue:f?
v:"",isOpen:i,triggerRef:c,onClose:function(){return l(!1)},onChange:function(e){var n;t.onChange(e),null===(n=s.current)||void 0===n||n.commands.setContent(e),l(!1)}})),F.createElement(Yc,{input:p,editorRef:s}))};function Qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?
arguments[t]:{};t%2?Qc(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ts=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={options:[],value:"",multi:!!t.props.params.multiple&&t.props.params.multiple},t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.params,n=e.input;if("select"==t.type){var o=[];hr()(t.values,function(e,
t){o.push({value:t,label:e})}),this.setState({options:o})}else if("accesslevel"==t.type)this.setState({options:window.accessLevels});else if("category"==t.type){if("com_xxxxxxxxx"===t.context)return void this.setState({options:window.xxxxxxxxxCats});var r=t.multiple&&n.value.includes(""),a=zt(window.articleCats,r);this.setState({options:a})}}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.params,o=t.input;if("category"==n.type&&"com_xxxxxxxxx"!==n.context&&this.props.input.value!==
e.input.value){var r="category"==n.type&&n.multiple&&o.value.includes(""),a=zt(window.articleCats,r);this.setState({options:a})}}},{key:"logChange",value:function(e){var t=this.props,n=t.input,o=n.value,r=n.onChange,a=t.params,i=t.responsiveDevice,l="";if(null===e)l="";else if(Array.isArray(e)){for(var c=[],s=0;s<e.length;s++)c[s]=e[s].value;var d=(l=c).includes("");"category"===a.type&&this.state.multi&&d&&(l=[""])}else l=(null==e?void 0:e.value)||"";if(a.responsive){var u=(0,B.Z)({},i,(null==e?
void 0:e.value)||"");"object"===(0,de.Z)(o)&&null!==o?r(Object.assign({},o,u)):r(Object.assign({},(0,B.Z)({},i,o),u))}else r(l)}},{key:"render",value:function(){var e,t=this.props,n=t.input,o=t.params,r=t.responsiveDevice,a=this.state,i=a.options,l=a.multi,c="";c=o.responsive&&"object"==(0,de.Z)(n.value)?n.value[r]:n.value;var s=void 0;if(l&&Array.isArray(c)){var d=c.map(function(e){return Oe(e)});s=null==i?void 0:i.filter(function(e){return d.includes(Oe(e.value))})}else s=null==i?void 0:i.find(function(e){return Oe(e.value)==
Oe(c)});var u=!(null==o.inline||!o.inline)&&o.inline;return F.createElement("div",{"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name,className:"builder-form-group".concat(null!=o.class?" "+o.class:"").concat(u?" builder-row builder-align-items-center":"")},F.createElement("label",{className:"".concat(u?"builder-column-4 builder-mb-0":"")},void 0!==o.desc&&""!=o.desc?F.createElement(er.Z,{content:o.desc,tagName:"span"},o.title):o.title),F.createElement("div",{className:"".concat(u?
"builder-column-8":"")},F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:s,menuPlacement:"auto",menuPosition:"fixed",styles:{menu:function(e){return es(es({},e),{},{zIndex:3})},menuPortal:function(e){return es(es({},e),{},{zIndex:9999})}},isMulti:this.state.multi,options:this.state.options,onChange:this.logChange.bind(this),isClearable:void 0===this.props.params.clearable||this.props.params.clearable,components:{IndicatorSeparator:function(){return null}}})))}}]),
r}(F.Component);const ns=ts,os=function(e){var t,n=e.params;return F.createElement("div",{className:"builder-group-separator","data-field":null===(t=e.input)||void 0===t?void 0:t.name},n.title&&F.createElement("div",{className:"builder-group-separator-title"},n.title))},rs=function(e){var t,n,o=e.input,r=e.params,a=ha({input:o,params:r}),i=a.inputValue,l=a.generateFieldValue,c=null!==(t=r.inline)&&void 0!==t&&t,s=function(e){var t=l(e.target.value);o.onChange(t)};return F.createElement("div",{"data-field":null==
o?void 0:o.name,className:"builder-form-group".concat(null!=r.class?" "+r.class:"").concat(c?" builder-row builder-align-items-center":"")},F.createElement("label",{className:"".concat(c?"builder-column-4 builder-mb-0":"")},void 0!==r.desc&&""!=r.desc?F.createElement(er.Z,{content:r.desc,tagName:"span"},r.title):r.title),F.createElement("div",{className:c?"builder-column-8":""},F.createElement("input",(0,ao.Z)({},o,{type:(null==r?void 0:r.type)||"text",value:i,placeholder:null!==(n=r.placeholder)&&
void 0!==n?n:"",className:"builder-form-field builder-form-field=".concat(o),autoComplete:"off",onChange:s,onBlur:s}))))},as=function(e){var t,n=e.input,o=e.params,r=at(o.desc)&&(null===(t=o.desc)||void 0===t?void 0:t.trim().length)>0;return F.createElement("div",{className:"builder-form-group","data-field":null==n?void 0:n.name},F.createElement("label",null,r?F.createElement(er.Z,{content:o.desc,tagName:"span"},o.title):o.title),F.createElement("textarea",(0,ao.Z)({},n,{className:"builder-form-field",
onChange:function(e){return n.onChange(e.target.value)}})))};var is=n(5161),ls=n.n(is);var cs=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,
arguments);return(0,U.Z)(this,e)});function r(){return(0,J.Z)(this,r),o.apply(this,arguments)}return(0,G.Z)(r,[{key:"onChangeHandle",value:function(e){var t=this.props.input.onChange,n=e.target.getAttribute("data-value");n&&t(n)}},{key:"render",value:function(){var e,t=this,n=this.props,o=n.input,r=n.params;return F.createElement("div",{className:"builder-form-group".concat(null!=r.class?" "+r.class:""),"data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},r.title&&!r.hideTitle&&F.createElement("label",
null,void 0!==r.desc&&""!=r.desc?F.createElement(er.Z,{content:r.desc,tagName:"span"},r.title):r.title),F.createElement("div",{className:"builder-row builder-gutter-3"},r.values&&ls()(r.values,function(e,n){return F.createElement("div",{className:"builder-column-".concat(parseInt(12/(r.columns||2))," builder-mb-3"),key:n},F.createElement("div",{className:"builder-field-thumbnail".concat(o.value==n?" active":""),"data-value":n,onClick:t.onChangeHandle.bind(t)},fe()(e)?F.createElement("div",{dangerouslySetInnerHTML:{__html:e.svg}}):
F.createElement("img",{src:e})))})))}}]),r}(F.Component);const ss=cs;var ds=n(5987),us=n(2772);const ms=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=
o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this)).state={max:500,min:-500,step:1},t}return(0,G.Z)(r,[{key:"onChange",value:function(e){(0,this.props.input.onChange)(e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.params,n=e.input,o=t.range?t.range.max:100,r=t.range?t.range.min:0,a=t.range?t.range.step:1,i=!!t.info&&t.info,l=void 0===t.placeholder?"":t.placeholder;return F.createElement(F.Fragment,null,F.createElement("div",
{className:"builder-column-6"},F.createElement("input",(0,ao.Z)({},n,{max:o,min:r,step:a,type:"range",className:"builder-form-range",onChange:this.onChange.bind(this)}))),F.createElement("div",{className:"builder-column-3"},i?F.createElement("div",{className:"builder-field-group"},F.createElement("input",(0,ao.Z)({},n,{max:o,min:r,step:a,type:"number",className:"builder-form-field builder-form-field-sm",autoComplete:"off",placeholder:l,onChange:this.onChange.bind(this)})),F.createElement("span",{className:"builder-field-info"},
i)):F.createElement("input",(0,ao.Z)({},n,{max:o,min:r,step:a,type:"number",className:"builder-form-field builder-form-field-sm",autoComplete:"off",placeholder:l,onChange:this.onChange.bind(this)}))))}}]),r}(F.Component);var ps=["single"];function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function fs(e){for(var t=1;t<arguments.length;t++){var n=
null!=arguments[t]?arguments[t]:{};t%2?vs(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var bs=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this)).state={isActionList:!1,timeline:!1,initialAction:[{id:"",name:"",keyframe:0,timing_func:"",property:null},{id:"",name:"",keyframe:100,timing_func:"",property:null}],selectedActionIndex:null,coPosition:{x:0,y:0},contextAxis:{x:0,y:0},timeLineCoPosition:{linePosition:0,
percentage:0,id:null,isVisible:!1,index:null},contextMenuVisible:null,isHoverAction:!1,showTimelineActionList:!1,enableAnimationNameField:!1,currentAction:null,scrollPercent:0,timelineHeight:0,addOnId:null,keyframeCounter:{},renderHtmlActionlist:[],collection:[],scrollEvent:null,actionListDargIndex:null,actionListOverKeyframe:null,selectedDargAction:null,maskPosition:0},t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.handleClickOutside.bind(this)),
window.frames["jpagebuilder-view"].document.addEventListener("scroll",this.handleScroll.bind(this),!1)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.handleClickOutside.bind(this)),window.frames["jpagebuilder-view"].document.removeEventListener("scroll",this.handleScroll.bind(this),!1)}},{key:"componentDidUpdate",value:function(e,t){Or()(e.fields,this.props.fields)&&t.contextMenuVisible===this.state.contextMenuVisible&&t.actionListOverKeyframe===this.state.actionListOverKeyframe||
this.renderAnimationActionList()}},{key:"handleScroll",value:function(e){var t=this.props.state;if(void 0===this.timelineWrapper||null===this.timelineWrapper)return!1;var n=t.form.jpbForm.values.instFormId,o=window.frames["jpagebuilder-view"].document.getElementById("jpb-addon-".concat(n));if(null!==o){var r=this.percentageSeen(o),a=this.timelineWrapper.getBoundingClientRect().height;r>-1&&r<=100&&this.setState({scrollPercent:r,timelineHeight:a,scrollEvent:e})}}},{key:"percentageSeen",value:function(e){var t=
e.getBoundingClientRect(),n=document.body.offsetHeight,o=window.pageYOffset,r=t.top,a=t.height;if(r>o+n)return-1;if(r+a<o)return 101;var i=(o+n-r)/((n+a)/100);return i>100?100:i}},{key:"handleClickOutside",value:function(e){this.itemWrapper&&!this.itemWrapper.contains(e.target)&&null!==this.state.contextMenuVisible&&(void 0===this.contextMenuRoot||this.contextMenuRoot.contains(e.target)||this.setState({contextMenuVisible:null})),this.actionListWrapper&&!this.actionListWrapper.contains(e.target)&&
this.state.isActionList&&this.setState({isActionList:!1})}},{key:"showActionList",value:function(){this.setState({isActionList:!this.state.isActionList})}},{key:"revisedRandId",value:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+e()+e()+e()}},{key:"onMouseMoveAction",value:function(e,t,n,o,r){var a=this.timelineWrapper.getBoundingClientRect(),i=r.target.getBoundingClientRect(),l=r.clientY-i.top,c=parseInt(e)-1,s=parseInt(t)+1,d=c+s-1,u=Math.floor(l/
i.height*c)+s,m=r.clientY-a.top,p={linePosition:Math.abs(m/a.height*100),percentage:u,id:n,isVisible:!(d+1===s),index:o};this.setState({timeLineCoPosition:p,isHoverAction:!0})}},{key:"onSelectAction",value:function(e){var t=this.props.fields.get(e);this.setState({selectedActionIndex:e,contextMenuVisible:null,currentAction:t,showTimelineActionList:!1})}},{key:"onContextMenu",value:function(e,t){t.preventDefault(),this.setState({contextMenuVisible:e,showTimelineActionList:!1})}},{key:"setContextMenuRoot",
value:function(e){this.contextMenuRoot=e}},{key:"toggleContextMenu",value:function(e,t){t.preventDefault(),t.stopPropagation();var n=this.state.contextMenuVisible;this.setState({contextMenuVisible:null!==n?null:e,showTimelineActionList:!1})}},{key:"_onDeleteItem",value:function(e){this.props.fields.remove(e),this.setState({contextMenuVisible:null,selectedActionIndex:null})}},{key:"_onDuplicateItem",value:function(e){var t=this.props.fields,n=K()(t.get(e)),o=e+1;n.id=this.revisedRandId(),t.insert(o,
n),this.setState({currentAction:n,contextMenuVisible:null,selectedActionIndex:o,actionIndex:o})}},{key:"contextMenu",value:function(e){return F.createElement("div",{style:{top:"calc(100% + 5px)",right:"-8px",zIndex:10},className:"builder-list-group builder-context-menu builder-context-menu-md"},F.createElement("span",{className:"builder-list-item builder-list-item-action",onClick:this._onDeleteItem.bind(this,e),role:"button"},F.createElement(co,{name:"trash",className:"builder-list-icon"})," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_ICON_DELETE_BUTTON")),
F.createElement("span",{className:"builder-list-item builder-list-item-action",onClick:this._onDuplicateItem.bind(this,e),role:"button"},F.createElement(co,{name:"clone",className:"builder-list-icon"})," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_ICON_DUPLICATE_BUTTON")))}},{key:"onMouseDragStartOnActionList",value:function(e,t){var n=this,o=this.timelineWrapper.getBoundingClientRect(),r=t.clientY-o.top,a=Math.abs(r/o.height*100);this.timeCounter=0,this.onDragDelayTimer=setInterval(function(){n.updateDragAction(a,
e),n.timeCounter=n.timeCounter+1},200);setTimeout(function(){const rangeInputs=document.querySelectorAll(".builder-form-range");rangeInputs.forEach(function(rangeInput,index){rangeInput.addEventListener("input",function(){const min=rangeInput.min||0;const max=rangeInput.max||100;const value=rangeInput.value;const initialGradient=builderDarkMode?"#b5bcd7":"#001b4c";const finalGradient=builderDarkMode?"#34393f":"#e0e0e0";rangeInput.style.background=`linear-gradient(to right, ${initialGradient} ${(value-
min)/(max-min)*100}%, ${finalGradient} ${(value-min)/(max-min)*100}%)`});(function(){const min=rangeInput.min||0;const max=rangeInput.max||100;const value=rangeInput.value;const initialGradient=builderDarkMode?"#b5bcd7":"#001b4c";const finalGradient=builderDarkMode?"#34393f":"#e0e0e0";rangeInput.style.background=`linear-gradient(to right, ${initialGradient} ${(value-min)/(max-min)*100}%, ${finalGradient} ${(value-min)/(max-min)*100}%)`})()})},150)}},{key:"updateDragAction",value:function(e,t){if(this.timeCounter>
0){clearInterval(this.onDragDelayTimer),this.timeCounter=0;var n=this.props.fields;this.setState({actionListDargIndex:t,selectedDargAction:n.get(t),maskPosition:e})}}},{key:"onMouseOverOnActionList",value:function(e,t){null!==this.state.actionListDargIndex&&this.setState({actionListOverKeyframe:e})}},{key:"onMouseOutOnActionList",value:function(e){null!==this.state.actionListOverKeyframe&&this.setState({actionListOverKeyframe:null})}},{key:"onMouseDragEndOnActionList",value:function(e){var t=this.state,
n=t.actionListDargIndex,o=t.actionListOverKeyframe,r=t.timeLineCoPosition.percentage;if(null!==n){var a=this.props,i=a.fields,l=a.parentKey,c=(a.state,a.dispatch),s=a.meta.form;null!==o&&(r=parseInt(o)),c((0,us.m)(s,"".concat(l,".[").concat(n,"].keyframe"),r)),this.setState({actionListDargIndex:null,selectedDargAction:null,actionListOverKeyframe:null,selectedActionIndex:n,currentAction:i.get(n)})}this.onDragDelayTimer&&clearInterval(this.onDragDelayTimer)}},{key:"onMouseMoveOnTimeline",value:function(e){if(null!==
this.state.actionListDargIndex){var t=this.timelineWrapper.getBoundingClientRect(),n=e.clientY-t.top,o=Math.abs(n/t.height*100);this.setState({maskPosition:o})}}},{key:"actionItemHtml",value:function(e,t){var n=this,o=this.state,r=o.selectedActionIndex,a=o.contextMenuVisible;return F.createElement("div",{key:t,className:"builder-timeline-item".concat(r===t?" active":""),onMouseDown:this.onMouseDragStartOnActionList.bind(this,t),ref:function(e){n.itemWrapper=e}},F.createElement("div",{className:"builder-timeline-item-prepend"},
e.keyframe,"%"),F.createElement("div",{className:"builder-timeline-item-divider"}),F.createElement("div",{className:"builder-timeline-item-content",onClick:this.onSelectAction.bind(this,t)},F.createElement("span",{className:"builder-timeline-item-handle"},F.createElement(co,{name:"ellipsisDoubleX"})),F.createElement("span",{className:"builder-timeline-item-title"},e.name),F.createElement("span",{className:"builder-timeline-item-actions builder-position-relative"},F.createElement("span",{className:"builder-button builder-button-light builder-button-round builder-button-round-sm",
onContextMenu:this.onContextMenu.bind(this,t),onClick:this.toggleContextMenu.bind(this,t)},F.createElement(co,{name:"cog"})),a===t&&this.contextMenu(t))))}},{key:"parentItemHtml",value:function(e,t){var n=this;return F.createElement("div",{key:t,className:"builder-timeline-item-parent",onMouseEnter:this.onMouseOverOnActionList.bind(this,e.keyframe),onMouseLeave:this.onMouseOutOnActionList.bind(this)},e.map(function(e){return n.actionItemHtml(e,e.index)}))}},{key:"actionBlankSpaceHtml",value:function(e,
t,n,o){var r={flexGrow:e/100};return 0===e&&(r.padding=0),F.createElement("div",{key:this.revisedRandId(),className:"builder-timeline-item-spacer",onMouseMove:this.onMouseMoveAction.bind(this,e,t,n,o),style:r})}},{key:"renderAnimationActionList",value:function(){var e=this,t=this.props.fields,n=[],o={},r=0,a={};if(t.length>0){if(t.getAll().map(function(e,t){var n={};void 0===a[e.name]?(n=fs(fs({},e),{},{single:!0}),a[e.name]=e.keyframe):(e.single,n=(0,ds.Z)(e,ps)),void 0!==o[e.keyframe]?(n.index=
t,o[e.keyframe].push(n)):(n.index=t,o[e.keyframe]=[n],o[e.keyframe].keyframe=e.keyframe,o[e.keyframe].index=t)}),ls()(o,function(t,o){var a=Math.abs(r-t.keyframe);n.push(e.actionBlankSpaceHtml(a,r,o,t.index)),n.push(e.parentItemHtml(t,o)),r=t.keyframe}),100!==r){var i=Math.abs(r-100);n.push(this.actionBlankSpaceHtml(i,r,this.revisedRandId(),t.length))}}else this.state.initialAction.map(function(t){var o=Math.abs(r-t.keyframe);r!==t.keyframe?(n.push(e.actionBlankSpaceHtml(o,r,e.revisedRandId(),0)),
n.push(e.actionItemHtml(t,e.revisedRandId()))):n.push(e.actionItemHtml(t,e.revisedRandId())),r=t.keyframe});this.setState({renderHtmlActionlist:n,collection:o})}},{key:"createAction",value:function(e,t){var n=this.props.fields,o=n.length,r={id:this.revisedRandId(),title:e.title,name:e.name,timing_func:"",keyframe:0,property:e.property,range:e.range};if(this.state.isActionList){n.push(r);var a=K()(r);a.keyframe=100,a.id=this.revisedRandId(),n.push(a)}else if(null!==t){var i=this.state.timeLineCoPosition.percentage;
o=t,r.keyframe=i,n.insert(o,r)}else n.insert(n.length-1,r);this.setState({currentAction:e,isActionList:!1,selectedActionIndex:o,showTimelineActionList:!1,actionIndex:o})}},{key:"renderAnimationActions",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.props.flOptions,o=void 0===n.options?[]:n.options,r={zIndex:10};return t?(r.left="50%",r.translateX="-50%"):r.right="0",F.createElement("div",{style:r,className:"builder-list-group builder-context-menu builder-context-menu-sm",
ref:function(t){return e.actionListWrapper=t}},o.map(function(n,o){return F.createElement("div",{key:o,onClick:e.createAction.bind(e,n,t),className:"builder-list-item builder-list-item-action"},n.name)}))}},{key:"showAnimationAction",value:function(){this.setState({showTimelineActionList:!this.state.showTimelineActionList,contextMenuVisible:null})}},{key:"renderPropertyField",value:function(e,t,n){return F.createElement("div",{className:"builder-form-group",key:t},F.createElement("div",{className:"builder-row builder-align-items-center"},
F.createElement("div",{className:"builder-column-3"},F.createElement("label",{className:"builder-form-label builder-mb-0"},t)),F.createElement(Ho.Z,{params:{placeholder:"-",range:n},name:"".concat(e,".property.").concat(t),component:ms})))}},{key:"timeline",value:function(){var e,t=this,n=this.props,o=n.fields,r=n.parentKey,a=n.flOptions,i=this.state,l=i.selectedActionIndex,c=i.currentAction,s=i.timeLineCoPosition,d=s.linePosition,u=s.percentage,m=s.index,p=s.isVisible,v=i.showTimelineActionList,
f=(i.scrollPercent,i.timelineHeight,i.maskPosition),b=i.actionListDargIndex,h=i.selectedDargAction,g="".concat(r);null!==l&&(g="".concat(g,".[").concat(l,"]"));var E={top:"".concat(d,"%")},y={top:"".concat(f,"%")};return F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===e?void 0:e.name},F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between"},F.createElement("div",{className:"builder-me-auto"},
F.createElement("span",{className:"builder-form-label"},a.title)),F.createElement("div",{className:"builder-position-relative"},F.createElement("span",{className:"builder-button builder-button-outline builder-button-round builder-button-effects",onClick:this.showActionList.bind(this),role:"button"},F.createElement(co,{name:"plus",className:"builder-m-0"})),this.state.isActionList&&this.renderAnimationActions())),o.length>0?F.createElement("div",{className:"builder-interaction-canvas builder-my-2"},
F.createElement("div",{className:"builder-fs-2 builder-fs-timeline-labels builder-fw-medium builder-mt-3"},Joomla.JText._("COM_JPAGEBUILDER_BOTTOMSCROLL")),F.createElement("div",{className:"builder-timeline",ref:function(e){t.timelineWrapper=e},onMouseMove:this.onMouseMoveOnTimeline.bind(this),onMouseUp:this.onMouseDragEndOnActionList.bind(this),onMouseLeave:this.onMouseDragEndOnActionList.bind(this)},this.state.renderHtmlActionlist,p&&F.createElement("div",{style:E,className:"builder-timeline-item-hr",
onClick:this.showAnimationAction.bind(this)},F.createElement("div",{className:"builder-timeline-item-prepend"},F.createElement("span",null,u,"%")),F.createElement("div",{className:"builder-timeline-item-divider"}),F.createElement("div",{className:"builder-timeline-item-hr-line"}),v&&this.renderAnimationActions(m)),null!==b&&F.createElement("div",{className:"builder-timeline-item-drag-mask",style:y},F.createElement("span",{className:"builder-me-2"},u,"%"),F.createElement("span",null,h.title)))):F.createElement("div",
{className:"builder-card builder-card-flat builder-my-2"},F.createElement("div",{className:"builder-d-flex builder-flex-column builder-align-items-center builder-px-3 builder-py-5"},F.createElement(co,{name:"animationEffect",size:"2x",className:"builder-text-primary builder-icon-effect"}),F.createElement("div",{className:"builder-fs-2 builder-fw-medium builder-mt-3"},Joomla.JText._("COM_JPAGEBUILDER_ANIMATION")),F.createElement("div",{className:"builder-fs-2 builder-opacity-7 builder-text-center builder-mt-2"},
Joomla.JText._("COM_JPAGEBUILDER_ANIMATION_DESC")))),F.createElement("div",{className:"builder-card-divider builder-mb-2"}),F.createElement("div",{className:"builder-fs-2 builder-fs-timeline-labels builder-fw-medium builder-mb-3"},Joomla.JText._("COM_JPAGEBUILDER_TOPSCROLL")),F.createElement("div",{className:"builder-form-label builder-mb-2 builder-form-label-effects"},Joomla.JText._("COM_JPAGEBUILDER_INTERACTION_SETTINGS")),0==o.length&&null===this.state.selectedActionIndex&&F.createElement("div",
{className:"builder-card builder-card-flat"},F.createElement("div",{className:"builder-p-3"},F.createElement("div",{className:"builder-d-flex"},F.createElement("div",{className:"builder-me-2"},F.createElement(co,{name:"equalizer",className:"builder-text-secondary builder-opacity-5"})),F.createElement("div",null,F.createElement("div",{className:"builder-fs-2 builder-fw-medium"},Joomla.JText._("COM_JPAGEBUILDER_NO_ACTION_SELECTED")),F.createElement("div",{className:"builder-fs-2 builder-opacity-7 builder-mt-2"},
Joomla.JText._("COM_JPAGEBUILDER_SELECT_AN_ACTION")))))),o.length>0&&null!=this.state.selectedActionIndex&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-form-group"},F.createElement("div",{className:"builder-row builder-align-items-center"},F.createElement("div",{className:"builder-column-3"},F.createElement("label",{className:"builder-form-label builder-mb-0"},Joomla.JText._("COM_JPAGEBUILDER_TIMELINE"))),F.createElement(Ho.Z,{params:{placeholder:"-",range:{min:0,max:100},
info:"%"},name:"".concat(g,".keyframe"),component:ms}))),F.createElement("div",{className:"builder-fs-2 builder-mb-2 builder-form-label-effect-name"},null===c&&void 0===c.title?"--":c.title),null!==c&&void 0!==c.property.x&&this.renderPropertyField(g,"x",c.range),null!==c&&void 0!==c.property.y&&this.renderPropertyField(g,"y",c.range),null!==c&&void 0!==c.property.z&&this.renderPropertyField(g,"z",c.range),null!==c&&void 0!==c.property.value&&this.renderPropertyField(g,"value",c.range)))}},{key:"render",
value:function(){return this.timeline()}}]),r}(F.Component);const hs=(0,Xn.$j)(function(e){return{state:e}})(bs);function gs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gs(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ys=[{label:"px",value:"px"},{label:"rem",value:"rem"},{label:"em",value:"em"},{label:"%",value:"%"}],_s=[{label:"deg",value:"deg"},{label:"rad",value:"rad"},{label:"grad",value:"grad"},{label:"turn",value:"turn"}];const ws=function(e){var t=e.input,n=e.params,o=e.label,r=e.fieldValue,a=e.isAngleUnit,i=void 0!==a&&a,l=e.onChange,
c=r.value,s=void 0===c?"":c,d=r.unit,u=void 0===d?"%":d,m=i?_s:ys;return F.createElement("div",{className:"builder-d-flex builder-flex-column"},o&&F.createElement("label",null,null!=n&&n.desc?F.createElement(er.Z,{content:null==n?void 0:n.desc,tagName:"span"},o):o),F.createElement("div",{className:"builder-d-flex builder-field-group"},F.createElement("input",(0,ao.Z)({},t,{type:"number",value:s,className:"builder-form-field builder-form-field-".concat(t," builder-form-field-sm builder-mb-0"),autoComplete:"off",
onChange:function(e){l(Es(Es({},r),{},{value:e.target.value}))},onBlur:function(e){l(Es(Es({},r),{},{value:e.target.value}))}})),F.createElement(Pr,{units:m.map(function(e){return e.value}),unit:u,update:function(e){return l(Es(Es({},r),{},{unit:e}))}})))};var xs=[0,1,2,3,4,5,6,7,8];const Is=function(e){var t=e.activeIndex,n=void 0===t?4:t,o=e.onClick,r=void 0===o?ye:o;return F.createElement("div",{className:"builder-column-4 builder-transform-square-container"},xs.map(function(e,t){return F.createElement("div",
{key:e.toString(),className:"builder-transform-square-btn-wrapper"},F.createElement("div",{role:"button",tabIndex:0,onKeyDown:ye,className:n===t?"builder-transform-square-btn-active":"builder-transform-square-btn",onClick:function(){return r(t)}}))}))};var Os={move:{x:{value:"",unit:"px"},y:{value:"",unit:"px"}},rotate:{x:{value:"",unit:"deg"},y:{value:"",unit:"deg"},z:{value:"",unit:"deg"}},scale:{x:"",y:""},skew:{x:{value:"",unit:"deg"},y:{value:"",unit:"deg"}},transform_origin:{top:{value:"50",
unit:"%"},left:{value:"50",unit:"%"}}},Cs=[{label:"Move",fieldKey:"move",fields:[{label:"X",fieldKey:"x"},{label:"Y",fieldKey:"y"}]},{label:"Rotate",fieldKey:"rotate",isAngleUnit:!0,fields:[{label:"X",fieldKey:"x"},{label:"Y",fieldKey:"y"},{label:"Z",fieldKey:"z"}]},{label:"Scale",fieldKey:"scale",isNoUnit:!0,fields:[{label:"X",fieldKey:"x"},{label:"Y",fieldKey:"y"}]},{label:"Skew",fieldKey:"skew",isAngleUnit:!0,fields:[{label:"X",fieldKey:"x"},{label:"Y",fieldKey:"y"}]},{label:"Transform Origin",
fieldKey:"transform_origin",fields:[{label:"Top",fieldKey:"top"},{label:"Left",fieldKey:"left"}]}];const As=function(e){var t=e.input,n=e.params,o=(0,F.useState)(4),r=(0,j.Z)(o,2),a=r[0],i=r[1],l=(0,F.useState)(function(){return Ee(t.value)&&we(t.value)?t.value:Os}),c=(0,j.Z)(l,2),s=c[0],d=c[1];(0,F.useEffect)(function(){"%"!==s.transform_origin.top.unit||"%"!==s.transform_origin.left.unit||"0"!==s.transform_origin.top.value&&"50"!==s.transform_origin.top.value&&"100"!==s.transform_origin.top.value||
"0"!==s.transform_origin.left.value&&"50"!==s.transform_origin.left.value&&"100"!==s.transform_origin.left.value?i(-1):va(K()(s),i)},[]);var u=function(e){var n=K()(s.transform_origin),o=function(e,t){switch(e){case 0:t.top.value="0",t.left.value="0";break;case 1:t.top.value="0",t.left.value="50";break;case 2:t.top.value="0",t.left.value="100";break;case 3:t.top.value="50",t.left.value="0";break;case 4:t.top.value="50",t.left.value="50";break;case 5:t.top.value="50",t.left.value="100";break;case 6:t.top.value=
"100",t.left.value="0";break;case 7:t.top.value="100",t.left.value="50";break;case 8:t.top.value="100",t.left.value="100"}return t.top.unit="%",t.left.unit="%",t}(e,K()(n)),r=K()(s);r.transform_origin=o,t.onChange(r),d(r),i(e)};return F.createElement("div",null,Cs.map(function(e){return F.createElement("div",{key:e.fieldKey,"data-field":null==t?void 0:t.name,className:"builder-form-group".concat(null!=n.class?" "+n.class:""," builder-row builder-align-items-center")},F.createElement("label",{className:"builder-column-12 builder-mb-2"},
void 0!==n.desc&&""!=n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},e.label):e.label),e.fields.map(function(n){var o,r=null===(o=K()(s)[e.fieldKey])||void 0===o?void 0:o[n.fieldKey];return e.isNoUnit?F.createElement("div",{key:n.fieldKey,className:"builder-column-4"},F.createElement(rs,{input:{value:r,onChange:function(o){var r=K()(s);r[null==e?void 0:e.fieldKey][null==n?void 0:n.fieldKey]=o,t.onChange(r),d(r)}},params:{title:n.label,type:"number"}})):F.createElement("div",{key:n.fieldKey,
className:"builder-column-4"},F.createElement(ws,{input:t,label:n.label,fieldValue:r,isAngleUnit:null==e?void 0:e.isAngleUnit,onChange:function(o){var r=K()(s);r[null==e?void 0:e.fieldKey][null==n?void 0:n.fieldKey]=o,"transform_origin"===e.fieldKey&&va(K()(r),i),t.onChange(r),d(r)}}))}),"transform_origin"===e.fieldKey&&F.createElement(Is,{activeIndex:a,onClick:u}))}))};function Ns(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ns(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ns(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ss={value:"",unit:"px"},Ps={menuPortal:function(e){return Ds(Ds({},e),{},{zIndex:9999})}},ks={option:function(e,
t){var n=t.data;return Ds(Ds({},e),{},{fontWeight:"".concat(n.value," !important")})}},Rs={font:"",weight:"",uppercase:!1,underline:!1,italic:!1,type:"google",size:{xl:Ss,lg:Ss,md:Ss,sm:Ss,xs:Ss},line_height:{xl:Ss,lg:Ss,md:Ss,sm:Ss,xs:Ss},letter_spacing:{xl:Ss,lg:Ss,md:Ss,sm:Ss,xs:Ss}};const Ts=function(e){var t,n,o,r,a,i,l,c,s,d=e.params,u=e.input,m=u.value,p=u.onChange,v=u.name,f=(0,F.useState)(b),h=(0,j.Z)(f,2),g=h[0],y=h[1],_=(0,F.useState)(!1),w=(0,j.Z)(_,2),x=w[0],I=w[1],O=(0,F.useRef)(!1),
C=(0,F.useRef)(null),A=(0,F.useState)(K()(Rs)),N=(0,j.Z)(A,2),D=N[0],S=N[1],P=(0,F.useState)(!1),k=(0,j.Z)(P,2),R=k[0],T=k[1];(0,F.useEffect)(function(){(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r,a,i;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(E,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 2:return t=e.sent,e.next=5,t.json();case 5:n=e.sent,o=n.data.map(function(e){return Ds({label:e.family_name,
value:e.family_name,type:e.type},"google"===e.type&&{variants:e.data.variants})}),r=o.filter(function(e){return"google"===e.type}),a=o.filter(function(e){return"local"===e.type}),i=[],r.length>0&&!window.disableGoogleFonts&&i.push.apply(i,[{value:"Google Fonts",label:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_FONT_BOOK_GOOGLE_FONTS"),isDisabled:!0}].concat((0,ue.Z)(r))),a.length>0&&i.push.apply(i,[{value:"Local Fonts",label:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_FONT_BOOK_LOCAL_FONTS"),isDisabled:!0}].concat((0,ue.Z)(a))),
i.push.apply(i,(0,ue.Z)(b)),y(i),I(!0);case 15:case "end":return e.stop()}},e)}))()},[]),(0,F.useEffect)(function(){if(!O.current&&m){var e,t=K()(m);t.type=null!==(e=null==t?void 0:t.type)&&void 0!==e?e:"google",S(Ds(Ds({},D),t))}},[m]),(0,F.useEffect)(function(){if(O.current&&D){var e=K()(D);null==e||delete e.variants,p(e)}},[D]),(0,F.useEffect)(function(){if(D.font&&x){var e,t=null!=D&&D.type?D.type:"google";"google"!==t||window.disableGoogleFonts?"local"===t&&lt({family:D.font,variants:[String(D.weight)]},
"local"):lt({family:D.font,variants:(null==D||null===(e=D.variants)||void 0===e?void 0:e.length)>0?D.variants:[String(D.weight)]},"google",g)}},[D.font,D.weight,x]);var L=be.device,M=g.find(function(e){return e.value===D.font}),Z=(0,F.useMemo)(function(){var e=[{value:"",label:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_FONT_WEIGHT")},{value:"100",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_THIN")},{value:"200",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_EXTRA_LIGHT")},{value:"300",
label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_LIGHT")},{value:"400",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_NORMAL")},{value:"500",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_MEDIUM")},{value:"600",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_SEMI_BOLD")},{value:"700",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_BOLD")},{value:"800",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_EXTRA_BOLD")},{value:"900",label:Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_FONT_BLACK")}];
return M&&M.variants?e.filter(function(e){var t,n;return(null!==(t=null===(n=M.variants)||void 0===n?void 0:n.map(function(e){var t,n,o,r,a;return{weight:(a=(t=e).match(/\d+/g)&&(null===(n=t.match(/\d+/g))||void 0===n?void 0:n[0]))?Number(a):400,style:null!==(o=t.match(/[a-zA-Z]+/g)&&(null===(r=t.match(/[a-zA-Z]+/g))||void 0===r?void 0:r[0]))&&void 0!==o?o:""}.weight.toString()}))&&void 0!==t?t:[]).includes(e.value)}):e},[M]),J=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:
"google";O.current=!0,["size","line_height","letter_spacing"].includes(e)?S(Ds(Ds({},D),{},(0,B.Z)({},e,Ds(Ds({},D[e]),{},(0,B.Z)({},L,Ds(Ds({},D[e][L]),{},{value:t})))))):S(Ds(Ds(Ds({},D),"font"===e&&{weight:"",type:n}),{},(0,B.Z)({},e,t)))},G=function(e,t){["size","line_height","letter_spacing"].includes(e)&&(O.current=!0,S(Ds(Ds({},D),{},(0,B.Z)({},e,Ds(Ds({},D[e]),{},(0,B.Z)({},L,Ds(Ds({},D[e][L]),{},{unit:t})))))))};return F.createElement("div",{className:"builder-form-group"},d.title&&!d.hideTitle&&
F.createElement("label",null,void 0!==d.desc&&""!=d.desc?F.createElement(er.Z,{content:d.desc,tagName:"span"},d.title):d.title),F.createElement("div",{ref:C,onClick:function(){return T(!R)},role:"button",className:"builder-form-typography-preview",onKeyDown:ye,tabIndex:0},F.createElement("div",{className:"builder-form-typography-preview-font",style:{fontFamily:D.font,fontWeight:D.weight,fontStyle:D.italic?"italic":"normal",textDecoration:D.underline?"underline":"none",textTransform:D.uppercase?"uppercase":
"none"}},D.font||Joomla.JText._("COM_JPAGEBUILDER_TYPOGRAPHY_SELECT_FONT_PLACEHOLDER")),F.createElement("div",{className:"builder-form-typography-preview-size"},"".concat((null==D||null===(t=D.size)||void 0===t||null===(t=t[L])||void 0===t?void 0:t.value+t.unit)||"00","/").concat((null==D||null===(n=D.line_height)||void 0===n||null===(n=n[L])||void 0===n?void 0:n.value+n.unit)||"00")),F.createElement("div",null,F.createElement(co,{name:"cog"}))),F.createElement($o,{title:d.title,open:R,parent_el:C,
modalBodyCss:{padding:0},onHide:function(){return T(!1)},gap:25},F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement("div",{className:"builder-form-group","data-field":v},F.createElement("div",{className:"builder-mb-3"},F.createElement("div",{className:"builder-form-label builder-mb-1"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_FONT")),F.createElement(Qo.ZP,{className:"builder-select-container",
classNamePrefix:"builder-select",isOpen:!0,value:g.find(function(e){return e.value===D.font}),options:g,onChange:function(e){return J("font",null==e?void 0:e.value,null==e?void 0:e.type)},isClearable:!0,styles:Ps,menuPlacement:"auto",menuPosition:"fixed",components:{IndicatorSeparator:function(){return null}}})),F.createElement("div",{className:"builder-row builder-gutter-2 builder-mb-3"},F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-form-label builder-mb-1"},
Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_SIZE")),F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",name:"size",value:void 0!==(null==D||null===(o=D.size)||void 0===o||null===(o=o[L])||void 0===o?void 0:o.value)?D.size[L].value:"",className:"builder-form-field builder-form-field-sm builder-mb-0",onChange:function(e){J("size",e.target.value)},autoComplete:"off"}),F.createElement(Pr,{unit:(null==D||null===(r=D.size)||void 0===r||null===(r=r[L])||void 0===r?
void 0:r.unit)||"px",update:function(e){return G("size",e)}}))),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-form-label builder-mb-1"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_LINE_HEIGHT")),F.createElement("div",{className:"builder-field-group"},F.createElement("input",{type:"number",name:"line_height",value:void 0!==(null==D||null===(a=D.line_height)||void 0===a||null===(a=a[L])||void 0===a?void 0:a.value)?D.line_height[L].value:"",className:"builder-form-field builder-form-field-sm builder-mb-0",
onChange:function(e){return J("line_height",e.target.value)},autoComplete:"off"}),F.createElement(Pr,{unit:(null==D||null===(i=D.line_height)||void 0===i||null===(i=i[L])||void 0===i?void 0:i.unit)||"px",update:function(e){return G("line_height",e)}}))),F.createElement("div",{className:"builder-column-4"},F.createElement("div",{className:"builder-form-label builder-mb-1"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_LETTER_SPACE")),F.createElement("div",{className:"builder-field-group"},F.createElement("input",
{type:"number",name:"letter_spacing",value:void 0!==(null==D||null===(l=D.letter_spacing)||void 0===l||null===(l=l[L])||void 0===l?void 0:l.value)?D.letter_spacing[L].value:"",className:"builder-form-field builder-form-field-sm builder-mb-0",onChange:function(e){return J("letter_spacing",e.target.value)},autoComplete:"off"}),F.createElement(Pr,{unit:(null==D||null===(c=D.letter_spacing)||void 0===c||null===(c=c[L])||void 0===c?void 0:c.unit)||"px",update:function(e){return G("letter_spacing",e)}})))),
F.createElement("div",{className:"builder-row builder-gutter-2"},F.createElement("div",{className:"builder-column-auto"},F.createElement("div",{className:"builder-form-label builder-mb-1"},Joomla.JText._("COM_JPAGEBUILDER_ADDON_TAB_STYLE")),F.createElement("div",{className:"builder-nav-tabs builder-tab-button-group"},F.createElement("span",{className:"builder-nav-item".concat(null!=D&&D.underline?" active":""),onClick:function(){return J("underline",!D.underline)},role:"button",onKeyDown:ye,tabIndex:0},
F.createElement(co,{name:"underline"})),F.createElement("span",{className:"builder-nav-item".concat(null!=D&&D.italic?" active":""),onClick:function(){return J("italic",!D.italic)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"italic"})),F.createElement("span",{className:"builder-nav-item".concat(null!=D&&D.uppercase?" active":""),onClick:function(){return J("uppercase",!D.uppercase)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"uppercaseDuo"})))),F.createElement("div",
{className:"builder-column"},F.createElement("div",{className:"builder-form-label builder-mb-1"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_WEIGHT")),F.createElement(Qo.ZP,{className:"builder-select-container",classNamePrefix:"builder-select",value:null!==(s=Z.find(function(e){return String(e.value)===String(D.weight)}))&&void 0!==s?s:"",options:Z,styles:ks,menuPlacement:"auto",menuPosition:"fixed",clearable:!1,onChange:function(e){return J("weight",e.value)},components:{IndicatorSeparator:function(){return null}}}))))))))},
Ls=function(e){var t=e.isOpen,n=e.closeModal,o=e.title,r=void 0===o?Joomla.JText._("COM_JPAGEBUILDER_EDITOR_INSERT_SVG_SHAPE"):o,a=e.btnVariant,i=void 0===a?"primary":a,l=e.onChange,c=(0,F.useState)(""),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,o,r,a,i;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(vt(d)){e.next=3;break}return oe("Invalid SVG Shape.",Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),e.abrupt("return");case 3:return t=
/fill="([^"]+)"/g,o=d.replace(t,'fill="currentColor"'),r=btoa(o),e.next=9,fetch(C,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({shape:r})});case 9:return a=e.sent,e.next=12,a.json();case 12:(i=e.sent).data&&l(i.data),ne("Successfully Installed",Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),n(),u("");case 17:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return F.createElement(Aa,
{isOpen:t,onClose:function(){return n()},cssClass:"builder-modal-dialog-centered"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return n()}},F.createElement("span",{className:"builder-modal-header-title"},r)),F.createElement(Oa,{className:"builder-modal-consent-body"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,Joomla.JText._("COM_JPAGEBUILDER_EDITOR_SVG_SINGLE_PATH_ONLY")),F.createElement("textarea",
{className:"builder-form-field",value:d,onChange:function(e){return u(e.target.value)}}))),F.createElement(Ca,null,F.createElement("div",{className:"builder-d-flex justify-content-end"},F.createElement("button",{type:"button",onClick:function(){n()},className:"builder-button builder-button-primary"},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")),F.createElement("button",{type:"button",className:"builder-button builder-button-".concat(i," builder-ms-2"),onClick:m},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_SVG_SAVE"))))))},
Ms=function(e){var t=e.input,n=e.params,o=(0,F.useState)(!1),r=(0,j.Z)(o,2),a=r[0],i=r[1],l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useState)([]),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=function(e){var n=t.onChange;e&&n(e)},y=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(O,{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});
case 2:return t=e.sent,e.next=5,t.json();case 5:n=e.sent,g(n.data);case 7:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();(0,F.useEffect)(function(){y()},[]);var _=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,n;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=p,e.next=3,fetch(A,{body:JSON.stringify({id:t}),method:"DELETE",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 3:if(n=
e.sent,ne("Successfully Deleted",Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),y(),n.ok){e.next=8;break}throw new Error("Failed to delete data");case 8:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return F.createElement("div",{className:"builder-form-group".concat(null!=n.class?" "+n.class:""),"data-field":null==t?void 0:t.name},F.createElement("div",{className:"builder-d-flex builder-justify-content-center mb-2"},F.createElement("button",{type:"button",
className:"builder-button builder-button-primary builder-d-flex builder-align-items-center",onClick:function(){i(!0)}},F.createElement(co,{name:"plus",className:"builder-d-inline-flex builder-me-2"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_SVG"))),n.title&&!n.hideTitle&&F.createElement("label",null,void 0!==n.desc&&""!==n.desc?F.createElement(er.Z,{content:n.desc,tagName:"span"},n.title):n.title),F.createElement("div",{className:"builder-row builder-gutter-3 mb-3",style:{}},n.values&&ls()(n.values,
function(e,o){return F.createElement("div",{className:"builder-column-".concat(parseInt(12/(n.columns||2))," builder-mb-3"),key:o},F.createElement("div",{className:"builder-field-thumbnail".concat(t.value==o?" active":""),"data-value":o,onClick:function(){return E(o)},role:"button",onKeyDown:ye,tabIndex:0},fe()(e)?F.createElement("div",{dangerouslySetInnerHTML:{__html:e.svg}}):F.createElement("img",{src:e,alt:"Thumbnail ".concat(o)})))}),h&&h.map(function(e,o){return F.createElement("div",{className:"builder-column-".concat(parseInt(12/
(n.columns||2))," builder-mb-3 builder-field-svg"),key:o},F.createElement("div",{className:"builder-field-shapes".concat(t.value===e.shape?" active":""),"data-value":e.shape,onClick:function(){return E(e.shape)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement("div",{dangerouslySetInnerHTML:{__html:atob(e.shape)},className:"blob"}),F.createElement(co,{name:"trash",onClick:function(){d(!0),v(e.id)}})))})),F.createElement(ol,{isOpen:s,closeModal:function(){return d(!1)},title:Joomla.JText._("COM_JPAGEBUILDER_ADDON_SVG_DELETE_SVG"),
consentBody:Joomla.JText._("COM_JPAGEBUILDER_DELETE_SVG_CONFIRM"),confirmAction:Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_ICON_DELETE_BUTTON"),btnVariant:"danger",handleConfirmation:_}),F.createElement(Ls,{isOpen:a,closeModal:function(){return i(!1)},onChange:function(e){g(function(t){return[].concat((0,ue.Z)(t),[e])})}}))};function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function js(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zs(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Bs=(0,Xn.$j)(function(e){return{state:e}})(function(e){var t=e.field,n=e.fieldName,o=e.reduxProps,
r=e.values,a=e.hideTitle,i=void 0!==a&&a,l=e.parentKey,c=e.element,s=(0,F.useState)(be.device),d=(0,j.Z)(s,2),u=d[0],m=d[1];(0,F.useEffect)(function(){var e=function(){m(be.device)};return be.on("change",e),function(){return be.removeListener("change",e)}},[]);var p=Ee(l)?"".concat(c,".").concat(n):n;switch(t.type){case "hidden":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Ka,name:p});case "text":case "gmap":var v=js(js(js({},t),!!o&&{reduxProps:o}),{},{hideTitle:i});
return F.createElement(Ho.Z,{params:v,component:rs,name:p});case "select":case "category":case "accesslevel":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:ns,name:p,responsiveDevice:u});case "effects":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:La,name:p,responsiveDevice:u});case "transform":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:As,name:p,responsiveDevice:u});case "animation":return F.createElement(Ho.Z,
{params:js(js({},t),{},{hideTitle:i}),component:Vr,name:p});case "alert":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Jr,name:p});case "border":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:oa,name:p});case "alignment":return null!=t&&t.inline?F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Qa,name:p,responsiveDevice:u}):F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:zr,name:p,responsiveDevice:u});
case "headings":return null!=t&&t.inline?F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:ni,name:p}):F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Wa,name:p});case "link":if(!o)return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:ai,name:p});var f=o.globalPanel,b=o.setGlobalPanel,h=js(js({},t),{},{globalPanel:f,setGlobalPanel:b});return F.createElement(Ho.Z,{params:h,component:ai,name:p});case "color":return F.createElement(Ho.Z,{params:js(js({},
t),{},{hideTitle:i}),component:Sa,name:p});case "advancedcolor":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:fr,name:p});case "textarea":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:as,name:p});case "separator":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:os,name:p});case "header":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:za,name:p});case "number":return F.createElement(Ho.Z,
{params:js(js({},t),{},{hideTitle:i}),component:Nl,name:p,responsiveDevice:u});case "module":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Ol,name:p});case "checkbox":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:_a,name:p,responsiveDevice:u});case "radio":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Sl,name:p});case "advancedradio":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:yr,
name:p,responsiveDevice:u});case "icon":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Xa,name:p});case "editor":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i,languageOptions:null==o?void 0:o.languageOptions}),component:$c,name:p});case "media":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Il,name:p});case "padding":case "margin":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Sr,name:p,responsiveDevice:u});
case "builder":default:return null;case "boxshadow":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:la,name:p});case "slider":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i,staticUnit:t.default_unit}),component:Mr,name:p,responsiveDevice:u});case "advancedslider":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Br,name:p,responsiveDevice:u});case "fontstyle":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Ja,
name:p});case "fonts":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:ja,name:p});case "advancedsettings":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:xr,name:p});case "typography":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Ts,name:p,responsiveDevice:u,formData:r});case "codeeditor":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Da,name:p});case "gradient":return F.createElement(Ho.Z,
{params:js(js({},t),{},{hideTitle:i}),component:Ga,name:p});case "buttons":var g=js(js(js({},t),!!o&&{reduxProps:o}),{},{hideTitle:i});return F.createElement(Ho.Z,{params:g,component:ga,name:p});case "thumbnail":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:ss,name:p});case "image_shape":return F.createElement(Ho.Z,{params:js(js({},t),{},{hideTitle:i}),component:Ms,name:p});case "timeline":return void 0===(null==t?void 0:t.options)?null:F.createElement(Go.Z,{flOptions:t,
name:p,parentKey:n,component:hs});case "repeatable":var E=js(js({},t),!!o&&{reduxProps:o});return F.createElement(Go.Z,{flOptions:E,name:p,parentKey:p,component:qs});case "interaction_view":return F.createElement(Uo,{flOptions:t,name:p,parentKey:p})}}),Js=function(e){var t=e.settings,n=e.reduxProps,o=e.values,r=e.parentKey,a=e.element,i=e.disabledGroups;return F.createElement("div",{className:"builder-field-renderer-wrapper"},Object.keys(t).map(function(e){var l=t[e],c=l.fields,s=Object.keys(c),d=
Ae(c),u=function(e){var t=Ae(e);return!!Ee(t)&&Object.keys(e).filter(function(e){return e!==t.name}).every(function(t){return!e[t].visibility})}(c),m=function(e){return Object.keys(e).some(function(t){return e[t].visibility})}(c);return m?0===s.length||"backend"===l.client||Ee(l.visibility)&&!l.visibility||Ee(i)&&i.includes(e)?null:F.createElement("div",{className:"builder-card ".concat(Ee(d)?"builder-card-toggle":""),key:e},F.createElement("div",{className:"builder-card-header"},F.createElement("span",
{className:"builder-fs-2"},l.title),Ee(d)&&F.createElement(Bs,{field:d.field,fieldName:d.name,reduxProps:n,values:o,hideTitle:!0,parentKey:r,element:a})),!u&&F.createElement("div",{className:"builder-card-body"},s.map(function(e){return Ee(c[e].visibility)&&!c[e].visibility||(null==d?void 0:d.name)===e?null:F.createElement(Bs,{key:e,field:c[e],fieldName:e,reduxProps:n,values:o,parentKey:r,element:a})}))):null}))};function Gs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);
t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Hs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gs(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Us=function(e){(0,H.Z)(r,
e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).triggerRef=
(0,F.createRef)(null),t}return(0,G.Z)(r,[{key:"handleItemClick",value:function(e){var t=this.props,n=t.parentKey,o=t.state.jpbForm;this.props.onHandleRowClick(e),"none"!==e&&["table_advanced","accordion","tab","jp_carouselpro","carouselpro","sliderpro","carousel_extended","js_slideshow"].includes(o.mainForm.addonName)&&"mainForm"===o.form&&this.props.setRepeatFields(n,e)}},{key:"handleCloneItem",value:function(e){var t,n=this.props,o=n.fields,r=n.flOptions,a=o.get(e),i=K()(o.get(e));if(o.name===c)i[c]=
(null!==(t=i[c])&&void 0!==t?t:[]).map(function(e,t){return fe()(e.content)&&(e.content=e.content.map(function(e,n){return e.id=qe(),"nested_row"===(null==e?void 0:e.type)&&(e.reference=a[c[t]].content[n].id),e})),e});else if(o.name===s)i.content=i.content.map(function(e,t){return e.id=qe(),e});else if(fe()(i.content)){var l,d=(null===(l=this.props.state)||void 0===l||null===(l=l.jpbForm)||void 0===l?void 0:l.mainForm).addonData,u=qe();i.content=i.content.map(function(e,t){return e.id=u,"nested_row"===
(null==e?void 0:e.type)&&(e.reference=a.content[t].id),e}),r.reduxProps.duplicateDeepContentItem({addonData:Hs(Hs({},d),{},{deepItemRowId:u}),deepItem:{key:this.props.parentKey,value:a,index:this.props.index}})}o.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return at(e)&&at(e.title)&&(e.title="".concat(e.title," copy")),e}(i))}},{key:"render",value:function(){var e=this,t=this.props,n=t.index,o=t.openRow,r=(t.element,t.isDragging),a=t.parentKey,i=t.flOptions,l=t.state,
c=t.thisFormName,s=t.connectDropTarget,d=t.connectDragPreview,u=t.connectDragSource,m=t.fields,p={opacity:r?".5":"1"},v={};"jpbForm"===c&&(void 0!==l.form.jpbForm.values[a]?v=l.form.jpbForm.values[a][n]:m.length>0&&(v=m.get(n))),"insideAddonForm"===c&&(void 0!==l.form.insideAddonForm.values[a]?v=l.form.insideAddonForm.values[a][n]:m.length>0&&(v=m.get(n)));var f=this.props.fields.get(n);return d(s(F.createElement("div",{className:"builder-card builder-mb-1",style:p,ref:this.triggerRef},F.createElement("div",
{className:"builder-card-header builder-row builder-card-no-border"},F.createElement("div",{className:"builder-column"},F.createElement("span",{className:"builder-card-title builder-d-flex builder-align-items-center"},u(F.createElement("span",null,F.createElement(co,{name:"ellipsisDoubleY",className:"builder-cursor-move builder-ms-1 builder-me-2 builder-text-secondary builder-opacity-6"}))),f.title||f.admin_label?F.createElement("span",{className:"builder-fs-2 builder-text-ellipsis",style:{maxWidth:140,
paddingLeft:2},title:f.title||f.admin_label,onClick:function(t){t.preventDefault(),e.handleItemClick(n)}},f.title||f.admin_label):F.createElement("span",{className:"builder-fs-2 builder-text-ellipsis",style:{maxWidth:160,paddingLeft:4},title:"Item",onClick:function(t){t.preventDefault(),e.handleItemClick(n)}},"Item"))),F.createElement("div",{className:"builder-column-auto"},F.createElement("div",{className:"builder-d-flex builder-justify-content-end"},F.createElement("div",null,F.createElement("span",
{className:"builder-button builder-button-light builder-button-round",onClick:function(t){t.preventDefault(),e.handleItemClick(n)},role:"button"},F.createElement(co,{name:"pencil",size:"1x"}))),F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-light builder-button-round",onClick:function(t){t.preventDefault(),e.handleCloneItem(n)},role:"button"},F.createElement(co,{name:"cloneLine",size:"1x"}))),F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-light builder-button-round",
onClick:function(t){t.preventDefault(),e.props.onHandleRemoveItemRowClick(n)},role:"button"},F.createElement(co,{name:"trash",size:"1x"})))))),F.createElement($o,{title:i.title,open:o===n,parent_el:this.triggerRef,onHide:this.props.onClose,gap:25,modalBodyCss:{padding:0},footerContent:F.createElement("div",{className:"builder-button builder-button-primary",onClick:function(t){t.preventDefault(),e.handleItemClick("none")},role:"button"},F.createElement(co,{name:"check",className:"builder-me-1"})," ",
Joomla.JText._("COM_JPAGEBUILDER_APPLY"))},o==n&&F.createElement("div",{className:"builder-card builder-card-popover"},F.createElement("div",{className:"builder-card-body builder-card-body-popover"},F.createElement(Js,{settings:Pe(i.attr,v),reduxProps:i.reduxProps,values:v,parentKey:this.props.parentKey,element:this.props.element})))))))}}]),r}(F.Component);var zs={hover:function(e,t,n){var o=t.getItem().index,r=e.index,a=t.getItem().fieldLength,i=t.isOver({shallow:!0}),l=t.isOver();if(o!==r&&!1!==
i&&!1!==l&&a===e.fields.length){var c=(0,V.findDOMNode)(n).getBoundingClientRect(),s=(c.bottom-c.top)/2,d=t.getClientOffset().y-c.top;o<r&&d<s||o>r&&d>s||(e.fields.swap(o,r),t.getItem().index=r)}}},Fs=(0,zo.DragSource)(Fo,{beginDrag:function(e){return{fieldLength:e.fields.length,id:e.id,index:e.index}}},function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}}),Vs=(0,zo.DropTarget)(Fo,zs,function(e){return{connectDropTarget:e.dropTarget()}});
const Ws=(0,Xn.$j)(function(e){return{state:e}},function(e){return{setRepeatFields:function(t,n){return e(Zo(t,n))}}})(Vs(Fs(Us)));var Ks=void 0;function Ys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ys(Object(n),!0).forEach(function(t){(0,B.Z)(e,
t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const qs=(0,Xn.$j)(function(e){return{state:e}},function(e){return{setRepeatFields:function(t,n){e(Zo(t,n))}}})(function(e){var t=(0,F.useState)("none"),n=(0,j.Z)(t,2),o=n[0],r=n[1],a=(0,F.useState)(!1),i=(0,j.Z)(a,2),l=i[0],c=i[1],s=(0,F.useState)("image"),d=(0,j.Z)(s,2),u=d[0],m=(d[1],
function(e){r(e)}),p=function(t){var n,o=e.fields,r=e.flOptions,a=o.get(t),i=null==a||null===(n=a.content)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.id;at(i)&&r.reduxProps.removeRow(i),o.remove(t)},v=e.fields,f=e.flOptions,b=e.meta.form;return(0,F.useEffect)(function(){var e;(null!==(e=v.getAll())&&void 0!==e?e:[]).forEach(function(e,t){if(!at(e.title)||0===e.title.length){var n=Xs(Xs({},e),{},{admin_label:"Item ".concat(t+1)});v.splice(t,1,n)}})},[]),F.createElement("div",{className:"builder-form-group builder-repeated-fields"},
F.createElement("div",{className:"builder-row builder-align-items-center builder-mb-3"},F.createElement("div",{className:"builder-column-8"},F.createElement("span",{className:"builder-form-label"},f.title)),F.createElement("div",{className:"builder-d-flex builder-justify-content-end gap-2"},f.bulk_import&&F.createElement("div",{className:"builder-d-flex builder-justify-content-center"},F.createElement("span",{className:"builder-button builder-button-primary builder-d-flex",onClick:function(){c(!0)},
role:"button"},F.createElement(co,{name:"plus",className:"builder-me-1 builder-d-flex builder-align-items-center"}),Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_BULK_ADD"))),F.createElement("div",{className:"builder-d-flex builder-justify-content-center"},F.createElement("span",{className:"builder-button builder-button-primary builder-d-flex",onClick:function(t){t.preventDefault();var n=e.fields,o=e.parentKey,r=e.state,a=n.length;"mainForm"===r.jpbForm.form&&e.setRepeatFields(o,a);var i=Object.values(Me)||
[];if(null==i||!i.includes(o)){var l={};return(/^jp_table_advanced_item$/i.test(o)||/^table_advanced_item\[\d+\]\.table_advanced_item$/i.test(o))&&(l={content:[]}),l.admin_label="Item",void n.push(l)}var c={title:"",icon:"",content:[{id:qe(),name:"row",type:"nested_row",reference:void 0}],admin_label:"Item"};if(!addItemsFirst)n.push(c);else n.unshift(c)},role:"button"},F.createElement("div",{className:"builder-d-flex builder-align-items-center"},F.createElement(co,{name:"plus",className:"builder-me-1 builder-d-flex builder-align-items-center"}),
Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_ADD")))))),v.map(function(t,n){return F.createElement(Ws,{key:n,flOptions:f,fields:v,element:t,thisFormName:b,parentKey:e.parentKey,index:n,openRow:o,onClose:function(){return r("none")},onHandleRowClick:m,onHandleRemoveItemRowClick:p})}),F.createElement(Aa,{isOpen:l,onClose:function(){return c(!1)},cssClass:"builder-modal-dialog-fixed builder-modal-dialog-centered",size:"lg"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,
onClose:function(){return c(!1)}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_MEDIA"))),F.createElement(yl,{client:"field",type:u,onHandleInsertMedia:function(e){"object"===(0,de.Z)(e)&&!Array.isArray(e)&&Object.keys(e).length>0&&(e=Object.values(e)),e.forEach(function(e){return v.push(e)}),c(!1)}.bind(Ks),onHandleMediaModal:function(){c(!1)}.bind(Ks),isGallery:!0}))))});var $s=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==
typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){return(0,J.Z)(this,r),o.apply(this,arguments)}return(0,G.Z)(r,[{key:"onClickEditAddon",value:function(e,
t,n){var o=this.props,r=o.inputName,a=o.parentKey,i=o.riIndex,l=r.substring(r.indexOf(".")+1);this.props.setRepeatFields(a,i),this.props.addonAddEditInside(t,n,l,e)}},{key:"onClickRemoveAddon",value:function(e){var t=this.props,n=t.inputName,o=t.parentKey,r=n.substring(n.indexOf(".")+1),a=this.props.state.jpbForm.activeField;a.fieldName=o,a.riFieldName=r,this.props.addonRemoveInside(e,r,a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.addon,o=t.index;return(0,t.connectDragPreview)((0,t.connectDragSource)((0,t.connectDropTarget)(F.createElement("div",
{className:"builder-list-item builder-list-item-bordered builder-px-2"},F.createElement("div",{className:"builder-row builder-align-items-center"},F.createElement("div",{className:"builder-column-auto"},F.createElement(co,{name:"ellipsisDoubleY",className:"builder-cursor-move builder-me-1 builder-text-body builder-opacity-4"})),F.createElement("div",{className:"builder-column-auto"},F.createElement("span",{className:"builder-addon-icon builder-icon",dangerouslySetInnerHTML:{__html:addonsJSON[n.name].icon}})),
F.createElement("div",{className:"builder-column-7"},F.createElement("span",{className:"builder-text-truncate"},addonsJSON[n.name].title)),F.createElement("div",{className:"builder-column builder-pe-0"},F.createElement("div",{className:"builder-d-flex builder-justify-content-end"},F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-light builder-button-round",onClick:function(t){t.preventDefault(),e.onClickEditAddon(o,n.name,n.settings)},role:"button"},F.createElement(co,
{name:"pencil",size:"1x"}))),F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-light builder-button-round",onClick:function(t){t.preventDefault(),e.onClickRemoveAddon(o)},role:"button"},F.createElement(co,{name:"trash",size:"1x"}))))))))))}}]),r}(F.Component),Qs={hover:function(e,t,n){var o=t.getItem().index,r=e.index;if(o!==r){var a=(0,V.findDOMNode)(n).getBoundingClientRect(),i=(a.bottom-a.top)/2,l=t.getClientOffset().y-a.top;if(!(o<r&&l<i||o>r&&l>i)){var c=
e.inputName,s=c.substring(c.indexOf(".")+1),d=e.state.jpbForm.activeField;e.addonSortInside(o,r,s,d),t.getItem().index=r}}}},ed=(0,zo.DragSource)(no,{beginDrag:function(e){return{index:e.index}}},function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}}),td=(0,zo.DropTarget)(no,Qs,function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),isOverCurrent:t.isOver({shallow:!0})}});const nd=(0,Xn.$j)(function(e){return{state:e}},
function(e){return{setRepeatFields:function(t,n){e(Zo(t,n))},addonAddEditInside:function(t,n,o,r){e(Bo(t,n,o,r))},addonRemoveInside:function(t,n,o){e(function(e,t,n){return{type:"REMOVE_ADDON_IN",addonIndex:e,riFieldName:t,fieldData:n}}(t,n,o))},addonSortInside:function(t,n,o,r){e(function(e,t,n,o){return{type:"SORT_ADDON_IN",dragIndex:e,dropIndex:t,riFieldName:n,fieldData:o}}(t,n,o,r))}}})(td(ed($s)));var od=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;
if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){return(0,J.Z)(this,r),o.call(this,e)}return(0,G.Z)(r,[{key:"render",value:function(){var e=this,t=this.props;return t.connectDragPreview,t.connectDragSource,
F.createElement("div",{className:"builder-list-group builder-list-group-rounded"},this.props.builderAddons.map(function(t,n){return F.createElement(nd,{addon:t,builderAddons:e.props.builderAddons,key:n,index:n,parentKey:e.props.parentKey,riIndex:e.props.riIndex,inputName:e.props.inputName})}))}}]),r}(F.Component);const rd=(0,Xn.$j)(function(e){return{state:e}})(od);var ad=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;
if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;(0,J.Z)(this,r),t=o.call(this,e);var n=[];for(var a in addonsJSON)"carousel_extended"!=a&&"table_advanced"!=a&&"accordion"!=a&&"tab"!=a&&"jp_carouselpro"!=a&&"carouselpro"!=a&&
"sliderpro"!=a&&n.push(addonsJSON[a]);return t.state={open:!1,addons:n},t}return(0,G.Z)(r,[{key:"onClickAddon",value:function(){var e=this.state.open;this.setState({open:!e})}},{key:"openAddonForm",value:function(e){var t=this.props,n=t.parentKey,o=t.riIndex,r=t.inputName,a=addonsJSON[e].default,i=r.substring(r.indexOf(".")+1);this.setState({open:!1}),this.props.saveInsideAddon(a,{addonIndex:"",addonName:e,fieldName:n,rfieldIndex:o,riFieldName:i})}},{key:"render",value:function(){var e=this;return F.createElement("div",
{className:"builder-inner-addon-list-container builder-position-relative"},F.createElement("div",{className:"builder-text-center builder-mt-3"},F.createElement("span",{className:"builder-button builder-button-outline".concat(this.state.open?" active":""),onClick:function(t){t.preventDefault(),e.onClickAddon()},role:"button"},this.state.open?F.createElement("i",{className:"fas fa-times","aria-hidden":"true"}):F.createElement("i",{className:"fas fa-plus","aria-hidden":"true"}))),this.state.open&&F.createElement("div",
{className:"builder-addon-list builder-addon-list-inner"},this.state.addons.map(function(t,n){return F.createElement("div",{key:n,onClick:function(n){n.preventDefault();var o=t.addon_name.replace("jp_","");e.openAddonForm(o)}},F.createElement("span",{className:"builder-addon-list-item"},F.createElement("span",{className:"builder-addon-icon"},F.createElement("span",{className:"builder-addon-icon builder-icon",dangerouslySetInnerHTML:{__html:t.icon}})),F.createElement("span",{className:"builder-addon-title"},
t.title)))})))}}]),r}(F.Component);const id=(0,Xn.$j)(function(e){return{state:e}},function(e){return{saveInsideAddon:function(t,n){e(jo(t,n))},addonAddEditInside:function(t,n,o,r){e(Bo(t,n,o,r))}}})(ad);var ld=(new Date).getTime(),cd=[],sd=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),
!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={builderData:cd},t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props.input,t=e.value;if(e.onChange,e.name,""!=t)if(void 0===t[0].id){var n={id:ld++,name:"text_block",settings:{text:t}},o=K()(cd);o.push(n),this.setState({builderData:o})}else this.setState({builderData:t})}},
{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState({builderData:e.input.value})}},{key:"componentDidUpdate",value:function(){(0,this.props.input.onChange)(this.state.builderData)}},{key:"render",value:function(){var e,t=this.props,n=t.input,o=t.params,r=t.parentKey,a=t.riIndex;return["jp_accordion_item","jp_tab_item","table_advanced_item[0].table_advanced_item"].includes(r)?null:F.createElement("div",{className:"builder-form-group","data-field":null===(e=this.props.input)||void 0===
e?void 0:e.name},F.createElement("label",null,o.title),F.createElement(rd,{parentKey:r,riIndex:a,inputName:n.name,builderAddons:this.state.builderData}),F.createElement(id,{parentKey:r,riIndex:a,inputName:n.name}))}}]),r}(F.Component);const dd=(0,Xn.$j)()(sd),ud=function(e){var t,n,o=e.params,r=e.input,a=(0,F.useRef)(null),i=(0,F.useRef)("jpbeditor-".concat((new Date).getTime())).current,l=(0,F.useRef)(!1),c=(0,F.useState)(!1),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)(!1),p=(0,j.Z)(m,2),v=p[0],
f=p[1],b=(0,F.useRef)(null),h=Fl(function(e){r.onChange(e)},150);(0,F.useEffect)(function(){var e=window,t=e.WFEditor,n=e.tinyMCE;(t||n)&&(t?(jQuery.extend(t.settings,function(e){var t=e.setIsFocused,n=e.debounceChangeEditor;return{height:"200",theme_resizing:!1,setup:function(e){var o=function(){var t=e.getContent({format:"raw"});n(t)};e.onNodeChange.add(o),e.onChange.add(o),e.onKeyUp.add(o),e.onPaste.add(o),e.onFocus.add(function(){window.editMode="form",t(!0)}),e.onBlur.add(function(){return t(!1)})}}}({setIsFocused:u,
debounceChangeEditor:h})),t.create(i)):(n.execCommand("mceRemoveEditor",!0,i),n.init(function(e){var t,n=e.setIsFocused,o=e.debounceChangeEditor;return t={selector:"textarea",force_br_newlines:!0,force_p_newlines:!1,forced_root_block:"",toolbar_items_size:"small",invalid_elements:"script,applet",content_css:"components/com_jpagebuilder/assets/css/tinymce.css",theme:tinyTheme,menubar:!1,height:"200",entity_encoding:"raw",deprecation_warnings:!1},(0,B.Z)(t,"force_p_newlines",void 0),(0,B.Z)(t,"forced_root_block",
"p"),(0,B.Z)(t,"content_style","body{ font-size: 12px !important; }"),(0,B.Z)(t,"relative_urls",!0),(0,B.Z)(t,"document_base_url",pagebuilder_base),(0,B.Z)(t,"image_class_list",[{title:"None",value:""},{title:"Left",value:"pull-left"},{title:"Right",value:"pull-right"}]),(0,B.Z)(t,"plugins",["advlist","autolink","lists","link","charmap","preview","image","searchreplace","code","media","fullscreen","wordcount"]),(0,B.Z)(t,"toolbar","blocks | styleselect | bold italic fontsizeselect | alignleft aligncenter alignright alignjustify | blockquote | bullist numlist | link image | fullscreen code"),
(0,B.Z)(t,"setup",function(e){e.on("change keyup paste",function(){var t=e.getContent({format:"raw"});o(t)}),e.on("focus",function(){window.editMode="form",n(!0)}),e.on("blur",function(){return n(!1)})}),t}({setIsFocused:u,debounceChangeEditor:h})),n.execCommand("mceAddEditor",!0,i)))},[]),(0,F.useEffect)(function(){var e=window,t=e.WFEditor,n=e.tinyMCE;if(a.current&&(t||n)&&!d){var o=n.get(i);if(o||Or()(!a.current.textContent,r.value)){var c=function(e){var t=o.getContent({format:"raw"});Or()(t,
e)||o.setContent(e,{format:"raw"})};if(t)return c(r.value);l.current?c(r.value):o.on("init",function(){l.current=!0})}else a.current.textContent=r.value}},[r.value,d]),(0,F.useEffect)(function(){var e=document.querySelector(".builder-inline-editor-button-content");if(e)return e.classList.add("resize-editor"),function(){return e.classList.remove("resize-editor")}},[]);var g=(null!==(t=r.value)&&void 0!==t?t:"").replaceAll(/<p>|<\/p>|<br.*?>/g,""),E=g.trim().length>0;return F.createElement("div",{ref:b,
className:"builder-form-group","data-field":null==r?void 0:r.name},o.title?o.desc?F.createElement("label",null,F.createElement(er.Z,{content:o.desc,tagName:"span"},o.title)):F.createElement("label",null,o.title):null,F.createElement("div",{className:"builder-button builder-button-primary builder-ai-button builder-mb-2",role:"button",onClick:function(){return f(!0)}},F.createElement(co,{name:"generate",className:"builder-d-inline-flex builder-me-2"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_AI_GENERATE_WITH_AI")),
F.createElement(Gl,{languageOptions:null===(n=e.params)||void 0===n?void 0:n.languageOptions,fieldValue:E?g:"",isOpen:v,triggerRef:b,onClose:function(){return f(!1)},onChange:function(e){r.onChange(e),f(!1)}}),F.createElement("div",{className:"content-editor"},F.createElement("textarea",(0,ao.Z)({},r,{ref:a,className:"mce_editable wf-editor",id:i}))))};var md=n(8403),pd=n.n(md),vd=function(e){return F.createElement("div",{className:"builder-tab-pane"},e.children)};vd.propTypes={name:ar().string};
var fd=function(e){var t=(0,F.useRef)(0),n=e.children,o=e.cssClass,r=e.tabStyle,a=e.capitalizeHeader,i=void 0===a||a,l=(0,F.useState)([]),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)({}),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useState)({}),b=(0,j.Z)(f,2),h=b[0],g=b[1];return(0,F.useEffect)(function(){return function(){(0,V.unstable_batchedUpdates)(function(){g({}),d([]),v({})})}},[]),(0,F.useEffect)(function(){var e=[],o={};F.Children.forEach(n,function(t){if(F.isValidElement(t)){var n=t.props,r=n.name,
a=n.attrs,i={};i.name=r,a&&((null==a?void 0:a.icon)&&(i.icon=a.icon),(null==a?void 0:a.size)&&(i.size=a.size),(null==a?void 0:a.text)&&(i.text=a.text),(null==a?void 0:a.text_only)&&(i.text_only=a.text_only),(null==a?void 0:a.icon_only)&&(i.icon_only=a.icon_only),(null==a?void 0:a.icon_position)&&(i.icon_position=a.icon_position)),e.push(i),o[r]=t.props.children}}),(0,V.unstable_batchedUpdates)(function(){d(e),e.length>0&&0===t.current&&g(e[0]),v(o)})},[n]),F.createElement(F.Fragment,null,F.createElement("div",
{className:"builder-nav-tabs-parent ".concat(o?o:"")},F.createElement("div",{className:"builder-nav-tabs builder-tab-".concat(null!=r?r:"neomorphic"," builder-nav-fill")},s.map(function(e){return F.createElement("span",{onClick:function(n){setTimeout(function(){const rangeInputs=document.querySelectorAll(".builder-form-range");rangeInputs.forEach(function(rangeInput,index){rangeInput.addEventListener("input",function(){const min=rangeInput.min||0;const max=rangeInput.max||100;const value=rangeInput.value;
const initialGradient=builderDarkMode?"#b5bcd7":"#001b4c";const finalGradient=builderDarkMode?"#34393f":"#e0e0e0";rangeInput.style.background=`linear-gradient(to right, ${initialGradient} ${(value-min)/(max-min)*100}%, ${finalGradient} ${(value-min)/(max-min)*100}%)`});(function(){const min=rangeInput.min||0;const max=rangeInput.max||100;const value=rangeInput.value;const initialGradient=builderDarkMode?"#b5bcd7":"#001b4c";const finalGradient=builderDarkMode?"#34393f":"#e0e0e0";rangeInput.style.background=
`linear-gradient(to right, ${initialGradient} ${(value-min)/(max-min)*100}%, ${finalGradient} ${(value-min)/(max-min)*100}%)`})()})},1);return o=e,n.preventDefault(),g(o),t.current++,void(window.toolsTabIndex="interaction"===(null==o?void 0:o.name)?3:0);var o},key:e.name,className:"builder-nav-item".concat(e.name===h.name?" active":""),role:"button",tabIndex:0,onKeyDown:ye},function(e){if(null!=e&&e.text_only)return null!=e&&e.text?F.createElement("span",{className:"builder-tab-title"},i?pd()(e.text):
e.text):F.createElement("span",{className:"builder-tab-title"},i?pd()(e.name):e.name);if(null!=e&&e.icon){var t=(null==e?void 0:e.icon_position)||"left",n=null!=e&&e.icon_only?"":i?pd()((null==e?void 0:e.text)||e.name):(null==e?void 0:e.text)||e.name;return"left"===t?F.createElement(F.Fragment,null,F.createElement(co,{name:e.icon,size:(null==e?void 0:e.size)||"",className:"builder-me-2"}),F.createElement("span",{className:"builder-tab-title"},n)):F.createElement(F.Fragment,null,F.createElement("span",
{className:"builder-tab-title"},n),F.createElement(co,{name:e.icon,size:(null==e?void 0:e.size)||"",className:"builder-ms-2"}))}var mapTabs={"general":"Settings","style":"Style","advanced":"Preferences","interaction":"Effects","responsive":"Mobile"};return F.createElement("span",{className:"builder-tab-title"},i?pd()(mapTabs[e.name]??e.name):mapTabs[e.name]??e.name)}(e))}))),F.createElement("div",{className:"builder-tab-content"},Object.keys(p).map(function(e){return e===h.name?p[e]:null})))};fd.propTypes=
{children:function(e,t,n){var o=e[t],r=null;return F.Children.forEach(o,function(e){null!=e&&e.type&&e.type!==vd&&(r=new Error("`"+n+"` children should be of type `Tab`."))}),r}};const bd=fd;function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function gd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:
{};t%2?hd(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}pagebuilder_base;var Ed=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).updateResponsiveData=t.updateResponsiveData.bind((0,io.Z)(t)),t.state={responsiveDevice:be.device,activeGroup:""},t.setActiveGroup=t.setActiveGroup.bind((0,io.Z)(t)),t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){be.on("change",
this.updateResponsiveData)}},{key:"componentWillUnmount",value:function(){be.removeListener("change",this.updateResponsiveData)}},{key:"setActiveGroup",value:function(e){this.setState({activeGroup:e})}},{key:"updateResponsiveData",value:function(){this.setState({responsiveDevice:be.device})}},{key:"_renderField",value:function(e,t){if((void 0===(null==e?void 0:e.type)||"repeatable"===e.type)&&void 0!==(null==e?void 0:e.attr)){if(!this.props.reduxProps)return F.createElement(Go.Z,{flOptions:e,name:t,
parentKey:t,component:qs});var n=gd(gd({},e),{},{reduxProps:this.props.reduxProps});return F.createElement(Go.Z,{flOptions:n,name:t,parentKey:t,component:qs})}switch(e.type){case "hidden":return F.createElement(Ho.Z,{params:e,component:Ka,name:t});case "text":case "gmap":return F.createElement(Ho.Z,{params:e,component:rs,name:t});case "select":case "category":case "accesslevel":return F.createElement(Ho.Z,{params:e,component:ns,name:t,responsiveDevice:this.state.responsiveDevice});case "animation":return F.createElement(Ho.Z,
{params:e,component:Vr,name:t});case "alert":return F.createElement(Ho.Z,{params:e,component:Jr,name:t});case "alignment":return null!=e&&e.inline?F.createElement(Ho.Z,{params:e,component:Qa,name:t,responsiveDevice:this.state.responsiveDevice}):F.createElement(Ho.Z,{params:e,component:zr,name:t,responsiveDevice:this.state.responsiveDevice});case "headings":return null!=e&&e.inline?F.createElement(Ho.Z,{params:e,component:ni,name:t}):F.createElement(Ho.Z,{params:e,component:Wa,name:t});case "link":if(!this.props.reduxProps)return F.createElement(Ho.Z,
{params:e,component:ai,name:t});var o=this.props.reduxProps,r=o.globalPanel,a=o.setGlobalPanel,i=gd(gd({},e),{},{globalPanel:r,setGlobalPanel:a});return F.createElement(Ho.Z,{params:i,component:ai,name:t});case "color":return F.createElement(Ho.Z,{params:e,component:Sa,name:t});case "advancedcolor":return F.createElement(Ho.Z,{params:e,component:fr,name:t});case "textarea":return F.createElement(Ho.Z,{params:e,component:as,name:t});case "separator":return F.createElement(Ho.Z,{params:e,component:os,
name:t});case "header":return F.createElement(Ho.Z,{params:e,component:za,name:t});case "number":return F.createElement(Ho.Z,{params:e,component:Nl,name:t,responsiveDevice:this.state.responsiveDevice});case "module":return F.createElement(Ho.Z,{params:e,component:Ol,name:t});case "checkbox":return F.createElement(Ho.Z,{params:e,component:_a,name:t,responsiveDevice:this.state.responsiveDevice});case "radio":return F.createElement(Ho.Z,{params:e,component:Sl,name:t});case "advancedradio":return F.createElement(Ho.Z,
{params:e,component:yr,name:t,responsiveDevice:this.state.responsiveDevice});case "icon":return F.createElement(Ho.Z,{params:e,component:Xa,name:t});case "editor":return F.createElement(Ho.Z,{params:e,component:ud,name:t});case "media":return F.createElement(Ho.Z,{params:e,component:Il,name:t});case "padding":case "margin":return F.createElement(Ho.Z,{params:e,component:Sr,name:t,responsiveDevice:this.state.responsiveDevice});case "builder":var l=void 0===this.props.parentKey?"":this.props.parentKey;
return F.createElement(Ho.Z,{params:e,parentKey:l,riIndex:this.props.index,component:dd,name:t});case "boxshadow":return F.createElement(Ho.Z,{params:e,component:la,name:t});case "slider":return F.createElement(Ho.Z,{params:e,component:Mr,name:t,responsiveDevice:this.state.responsiveDevice});case "advancedslider":return F.createElement(Ho.Z,{params:e,component:Br,name:t,responsiveDevice:this.state.responsiveDevice});case "fontstyle":return F.createElement(Ho.Z,{params:e,component:Ja,name:t});case "fonts":return F.createElement(Ho.Z,
{params:e,component:ja,name:t});case "advancedsettings":return F.createElement(Ho.Z,{params:e,component:xr,name:t});case "typography":return F.createElement(Ho.Z,{params:e,component:Ts,name:t,responsiveDevice:this.state.responsiveDevice,formData:this.props.values});case "codeeditor":return F.createElement(Ho.Z,{params:e,component:Da,name:t});case "gradient":return F.createElement(Ho.Z,{params:e,component:Ga,name:t});case "buttons":return F.createElement(Ho.Z,{fieldsAttr:this.props.fieldsAttr,isDisplayable:this.isDisplayable.bind(this),
params:e,component:ga,name:t,responsiveDevice:this.state.responsiveDevice});case "thumbnail":return F.createElement(Ho.Z,{params:e,component:ss,name:t});case "timeline":return void 0===(null==e?void 0:e.options)?null:F.createElement(Go.Z,{flOptions:e,name:t,parentKey:t,component:hs});default:return null}}},{key:"isAllowedField",value:function(e){return["fullscreen","container_separator","container_width"].includes(e)}},{key:"isDisplayable",value:function(e){var t=!0,n=this.props,o=n.values,r=n.fieldsList,
a=gd(gd({},void 0===r?{}:r),o);if(void 0===(null==e?void 0:e.depends))return!0;if("object"===(0,de.Z)(e.depends)&&!(e.depends instanceof Array)){var i=Object.entries(e.depends),l=i=i.length>0?i[0]:[],c=(0,j.Z)(l,2),s=c[0],d=c[1];e.depends=[],e.depends.push([s,"=",d])}return e.depends.forEach(function(e){var n=e[0],r=e[1],i=e[2];if(void 0!==a[n]){var l=o[n];void 0!==l&&"object"===(0,de.Z)(l)&&l.hasOwnProperty("src")&&(l=l.src),"="===r?t=fe()(l)&&l.hasOwnProperty("xl")?void 0!==l[be.device]&&t&&l[be.device]==
i:void 0!==l&&t&&l==i:"!="===r&&(t=fe()(l)&&l.hasOwnProperty("xl")?void 0!==l[be.device]&&t&&l[be.device]!=i:void 0!==l&&t&&l!=i)}}),t}},{key:"hasVisibleChildren",value:function(e){var t=this;if("header"===(null==e?void 0:e.type)&&"toggle"===(null==e?void 0:e.style))return this.state.activeGroup===e.uuid;if(void 0===(null==e?void 0:e.group))return!1;var n=this.props.fieldsAttr;return e.group.some(function(e){return t.isDisplayable(n[e])})}},{key:"inAGroup",value:function(e){var t=this.props.fieldsAttr;
return Object.entries(t).some(function(t){var n=(0,j.Z)(t,2),o=(n[0],n[1]);return void 0!==(null==o?void 0:o.group)&&o.group.includes(e)})}},{key:"renderFields",value:function(){var e=this,t=this.props,n=t.fieldsAttr,o=t.values,a=t.toggleType,i=!1;"inner_row"===a?i=!0:"undefined"==typeof pageType||"module"!==pageType||"row"!==a&&"inner_row"!==a||(i=!0);var l=function t(n,o){var a=Object.keys(n).length>1,i=a?Object.keys(n):[];if(a)return F.createElement(bd,null,i.map(function(a){var i,l,c,s,d,u,m;
if("depends"!==a){var p=null===(i=n[a])||void 0===i?void 0:i.fields,v=gd(gd(gd(gd(gd(gd({},(null===(l=n[a])||void 0===l?void 0:l.icon)&&{icon:n[a].icon}),(null===(c=n[a])||void 0===c?void 0:c.text)&&{text:n[a].text}),(null===(s=n[a])||void 0===s?void 0:s.icon_position)&&{icon_position:n[a].icon_position}),(null===(d=n[a])||void 0===d?void 0:d.size)&&{size:n[a].size}),(null===(u=n[a])||void 0===u?void 0:u.text_only)&&{text_only:n[a].text_only}),(null===(m=n[a])||void 0===m?void 0:m.icon_only)&&{icon_only:n[a].icon_only});
return p?F.createElement(vd,{name:a,attrs:v,key:a},t(p,o)):F.createElement(vd,{name:a,attrs:v,key:a},F.createElement("div",{className:"builder-inline-group"},F.createElement(r,{fieldsList:n[a],fieldsAttr:n[a],values:o,reduxProps:e.props.reduxProps})))}}))};return Object.entries(n).map(function(t){var r,a=(0,j.Z)(t,2),c=a[0],s=a[1];if("fields"===c||"fields"===c.slice(0,6)&&!isNaN(c.substring(6))){var d;if(null!==(d=n[c])&&void 0!==d&&d.depends&&!e.isDisplayable(n[c]))return;return F.createElement(F.Fragment,
{key:c},l(n[c],o))}var u=c;return void 0!==(null===(r=e.props)||void 0===r?void 0:r.parentKey)&&(c="".concat(e.props.element,".").concat(c)),i&&e.isAllowedField(c)?null:F.createElement(F.Fragment,{key:c},function(t){var o=t.field,r=t.key;if(void 0!==(null==o?void 0:o.group)&&e.isDisplayable(o))return F.createElement("div",{className:"builder-form-group".concat("header"==(null==o?void 0:o.type)&&"toggle"==(null==o?void 0:o.style)?" builder-form-group-toggle":"")},F.createElement("div",{className:"builder-card".concat("header"==
(null==o?void 0:o.type)&&"toggle"==(null==o?void 0:o.style)?" builder-card-toggle":"")},F.createElement("div",{className:"builder-card-header".concat(e.hasVisibleChildren(o)?"":" builder-card-no-border")},e._renderField(o,r)),e.hasVisibleChildren(o)&&F.createElement("div",{className:"builder-card-body"},(o.title,o.group.length>0&&o.group.map(function(t){var o,a=t;return void 0!==(null===(o=e.props)||void 0===o?void 0:o.parentKey)&&(a="".concat(e.props.element,".").concat(t)),F.createElement(F.Fragment,
{key:"".concat(r,"-").concat(t)},e.isDisplayable(n[t])?e._renderField(n[t],a):null)})))))}({field:s,key:c}),function(t){var n=t.field,o=t.key,r=t.originalKey;if(void 0===(null==n?void 0:n.group)&&!e.inAGroup(r)&&e.isDisplayable(n))return e._renderField(n,o)}({field:s,key:c,originalKey:u}),function(t){var n=t.field,o=t.key,r=t.originalKey;if("interaction_view"===(null==n?void 0:n.type)&&void 0!==(null==n?void 0:n.attr)&&!e.inAGroup(r)&&e.isDisplayable(n))return F.createElement(Uo,{flOptions:n,name:o,
parentKey:o})}({field:s,key:c,originalKey:u}))})}},{key:"render",value:function(){return F.createElement(Ua.Provider,{value:{activeGroup:this.state.activeGroup,setActiveGroup:this.setActiveGroup}},this.renderFields())}}]),r}(F.Component);const yd=(0,Xn.$j)(function(e){return{state:e}})(Ed);var _d=(0,F.createContext)({}),wd=function(){return(0,F.useContext)(_d)};const xd=_d;function Id(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function Od(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Id(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Id(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Cd=function(e){var t=e.handle,n=e.transition,o=void 0===n?"none 0s ease 0s":n,r=e.children,a=F.Children.only(r),
i=(0,F.useRef)(null),l=(0,F.useRef)({left:0,top:0}),c=(0,F.useRef)({left:0,top:0,right:0}),s=(0,F.useState)(null),d=(0,j.Z)(s,2),u=d[0],m=d[1],p=(0,F.useState)(null),v=(0,j.Z)(p,2),f=v[0],b=v[1],h=(0,F.useContext)(xd).dockState;return(0,F.useEffect)(function(){var e,n,r;null!=a&&null!==(e=a.ref)&&void 0!==e&&e.current&&(i.current=a.ref.current);var s=document.getElementById("jpagebuilder-view"),d=null!==(n=window.localStorage.getItem("builderDockState"))&&void 0!==n?n:"float",u=0,p=Number.POSITIVE_INFINITY,
v=0,f=function(e){if(i.current&&"float"===d){s.style.pointerEvents="none";var t=i.current.getBoundingClientRect(),n={},o=e.clientX,r=o-t.left,a=t.right-o;(o>c.current.left+r+1||o>u)&&(o<c.current.right-a-1||o<p)&&(u=o,p=o,n.left=o-l.current.left);var f=e.clientY,b=f-t.top;(f>c.current.top+b+1||f>=v)&&(v=f,n.top=f-l.current.top),m(n)}},h=function e(){u=0,p=Number.POSITIVE_INFINITY,v=0,b(null),s.style.pointerEvents="auto",document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",
e)},g=function(e){var t;if(0===e.button&&"float"===d){b(o);var n=i.current.offsetLeft,r=i.current.offsetTop,a=e.clientX-n,s=e.clientY-r,u=(null===(t=document.getElementById("jpagebuilder"))||void 0===t?void 0:t.getBoundingClientRect())||{};c.current={left:u.left,top:u.top,right:u.right},l.current={left:Math.round(a),top:Math.round(s)},document.addEventListener("mousemove",f),document.addEventListener("mouseup",h)}},E=t?null===(r=i.current)||void 0===r?void 0:r.querySelector(t):null;return E&&"float"===
d?E.style.cursor="move":E=i.current,E.addEventListener("mousedown",g),function(){var e;null===(e=E)||void 0===e||e.removeEventListener("mousedown",g)}},[t,h]),F.cloneElement(a,Od(Od({},!a.ref&&{ref:i}),u&&{style:Od({left:"".concat(u.left,"px"),top:"".concat(u.top,"px"),bottom:u.bottom?"".concat(u.bottom,"px"):"unset",right:u.right?"".concat(u.right,"px"):"unset"},f&&{transition:f})}))},Ad=function(e){var t=e.title,n=e.closeSettingsModal,o=e.hasTitle;return void 0===o||o?F.createElement("div",{className:"builder-editor-modal-title"},
F.createElement("h3",null,F.createElement(co,{className:"builder-drag-button",name:"ellipsisDoubleY"}),t&&F.createElement("span",null,t," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_SETTINGS_TITLE"))),F.createElement(co,{onClick:n,className:"builder-editor-close-button",name:"times"})):null};function Nd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,
o)}return n}function Dd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nd(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Sd=["Alignment"];const Pd=function(e){var t=e.name,n=e.button,o=e.onButtonAction,r=e.isActive,a=e.closeSettingsModal,i=e.addon,
l=To(),c=l.formState,s=l.addonOps,d=l.editorData,u=l.activeDevice,m=l.activeActionButtons,p=(l.position,l.plusItemAction),v=(0,F.useRef)(null),f=(0,F.useRef)(null),b=(0,F.useState)(null),h=(0,j.Z)(b,2),g=h[0],E=h[1];(0,F.useEffect)(function(){if(c){var e;if(void 0===(null===(e=c.form)||void 0===e?void 0:e.jpbForm))return;if(void 0!==(null==n?void 0:n.type)&&"placeholder"===n.type&&void 0!==(null==n?void 0:n.placeholder)){var o,r=null===(o=c.form)||void 0===o||null===(o=o.jpbForm)||void 0===o?void 0:
o.values;if(void 0!==r){var a,i=(null==n||null===(a=n.placeholder)||void 0===a?void 0:a.display_field)||t;E((null==r?void 0:r[i])||null)}}}},[JSON.stringify(c)]);var y,_,w,x,I,O,C=(0,F.useCallback)(function(){var e,t,n=(null==c||null===(e=c.jpbForm)||void 0===e||null===(e=e.mainForm)||void 0===e?void 0:e.values)||{};return Object.keys(n).length&&null!==(t=n)&&void 0!==t&&t.formData?n.formData:n},[JSON.stringify(c)]),A=(0,F.useCallback)(function(e){var t=(null==e?void 0:e.depends)||!1;if(!t)return!0;
var n=!0,o=C();return t.forEach(function(e){if(e.length<3)re(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_DEPENDS_ARRAY"),Joomla.JText._("COM_JPAGEBUILDER_WARNING_LEVEL"));else{var t=e[0],r=e[1],a=e[2];if(void 0!==(null==o?void 0:o[t])){var i,l=o[t];fe()(l)&&null!==(i=l)&&void 0!==i&&i[window.builderDefaultDevice]&&(l=l[u]),"="===r?n=void 0!==l&&n&&l===a:"!="===r&&(n=void 0!==l&&n&&l!==a)}}}),n},[JSON.stringify(n),JSON.stringify(c)]),N=function(e){e.preventDefault();var t={id:(new Date).getTime(),
name:"row",type:"nested_row",reference:void 0},o=Dd(Dd({},null==n?void 0:n.meta),{},{icon:"",content:[t]}),r=d.addon.addon.name;p({meta:null==n?void 0:n.meta,item:o,addonName:r,addon:i})},D=function t(o,r){var a=Object.keys(o).length>1,i=a?Object.keys(o):[],l=a?[]:Object.values(o)[0];return a?F.createElement(bd,null,i.map(function(a){var i,l,c,u,m,p,v,f=null===(i=o[a])||void 0===i?void 0:i.fields,b=Dd(Dd(Dd(Dd(Dd(Dd({},(null===(l=o[a])||void 0===l?void 0:l.icon)&&{icon:o[a].icon}),(null===(c=o[a])||
void 0===c?void 0:c.text)&&{text:o[a].text}),(null===(u=o[a])||void 0===u?void 0:u.icon_position)&&{icon_position:o[a].icon_position}),(null===(m=o[a])||void 0===m?void 0:m.size)&&{size:o[a].size}),(null===(p=o[a])||void 0===p?void 0:p.text_only)&&{text_only:o[a].text_only}),(null===(v=o[a])||void 0===v?void 0:v.icon_only)&&{icon_only:o[a].icon_only});return f?F.createElement(vd,{name:a,attrs:b,key:a},t(f,r)):F.createElement(vd,{name:a,attrs:b,key:a},F.createElement("div",{className:"".concat(null!=
n&&n.subClass?n.subClass:"builder-inline-group")},F.createElement(yd,{fieldsList:Ke(s),fieldsAttr:o[a],values:r,toggleType:d.addonType,reduxProps:e.reduxProps})))})):"inline"===(null==n?void 0:n.style)?F.createElement(yd,{fieldsList:Ke(s),fieldsAttr:l,values:r,toggleType:d.addonType,reduxProps:e.reduxProps}):F.createElement("div",{className:"".concat(null!=n&&n.subClass?n.subClass:"builder-inline-group")},F.createElement(yd,{fieldsList:Ke(s),fieldsAttr:l,values:r,toggleType:d.addonType,reduxProps:e.reduxProps}))},
S=(_=(0,F.useState)({calculatedPosition:{},arrowPlacement:"bottom"}),x=(w=(0,j.Z)(_,2))[0],I=w[1],O=Wo(null===(y=f.current)||void 0===y?void 0:y.getBoundingClientRect()),(0,F.useEffect)(function(){if(r&&v.current&&f.current){var e=v.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=O||{},o=n.height,a=n.top,i=t.width||e.width,l=t.height;if(o!==l||a!==t.top){var c={top:{bottom:"calc(100% + 16px)",top:"initial"},bottom:{top:"calc(100% + 16px)",bottom:"initial"},left:{top:"".concat(Math.floor(-l/
2+e.height/2),"px"),left:"".concat(Math.floor(-i-16),"px")},right:{top:"".concat(Math.floor(-l/2+e.height/2),"px"),left:"".concat(Math.floor(e.width+16),"px")}},s=window.iWindow.innerHeight||window.iDocument.documentElement.clientHeight,d=l+16;e.bottom+d>s&&e.top-40>d?I({calculatedPosition:c.top,arrowPlacement:"top"}):I({calculatedPosition:c.bottom,arrowPlacement:"bottom"})}}},[r,v,f,O]),x),P=S.calculatedPosition,k=S.arrowPlacement,R=(0,F.useCallback)(function(e){var t=null==e?void 0:e.fieldset;if(!t)return oe(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_DATA_STRUCTURE_FOUND"),
Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),console.error(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_DATA_STRUCTURE_FOUND")),null;var n=C(),o=null==t?void 0:t.tab_groups;if(void 0!==o){var r=Object.keys(o);return F.createElement(Cd,{handle:".builder-editor-modal-title"},F.createElement("div",{id:"jp-inline-popover",className:"".concat("inline"===(null==e?void 0:e.style)?"builder-inline-editor builder-inline-editor-dropdown-inline":"builder-inline-editor-button-content"),style:Dd({},
P),ref:f},F.createElement(Ad,{title:e.tooltip,closeSettingsModal:a,hasTitle:!Sd.includes(e.tooltip)}),F.createElement(bd,{tabStyle:"line",cssClass:"builder-outer-tabs"},r.map(function(e){var t,r,a,i,l,c,s,d=null===(t=o[e])||void 0===t?void 0:t.fields,u=Dd(Dd(Dd(Dd(Dd(Dd({},(null===(r=o[e])||void 0===r?void 0:r.icon)&&{icon:o[e].icon}),(null===(a=o[e])||void 0===a?void 0:a.text)&&{text:o[e].text}),(null===(i=o[e])||void 0===i?void 0:i.icon_position)&&{icon_position:o[e].icon_position}),(null===(l=
o[e])||void 0===l?void 0:l.size)&&{size:o[e].size}),(null===(c=o[e])||void 0===c?void 0:c.text_only)&&{text_only:o[e].text_only}),(null===(s=o[e])||void 0===s?void 0:s.icon_only)&&{icon_only:o[e].icon_only});return F.createElement(vd,{name:e,attrs:u,key:e},D(d,n))}))))}var i="inline"==(null==e?void 0:e.style)?"builder-inline-editor builder-inline-editor-dropdown-inline":"builder-inline-editor-button-content",l=Sd.includes(null==e?void 0:e.tooltip)?" builder-has-arrow builder-arrow-".concat("top"===
k?"down":"up"):"",c=function(){var o=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return F.createElement("div",{id:"jp-inline-popover",className:"".concat(i," builder-inline-editor-position-").concat("top"===k?"up":"down").concat(l),style:Dd({},P),ref:f},F.createElement(Ad,{title:e.tooltip,closeSettingsModal:a,hasTitle:o}),D(t,n))};return Sd.includes(e.tooltip)?c():F.createElement(Cd,{handle:".builder-editor-modal-title"},c(!0))},[n,JSON.stringify(c),k,P]);return void 0!==(null==n?void 0:
n.action)&&"separator"===n.action&&A(n)?F.createElement("div",{className:"builder-inline-editor-separator"}):A(n)&&F.createElement("div",{className:"builder-inline-editor-item".concat(null!=n&&n.fieldset||null!=n&&n.options?" builder-inline-editor-has-child":"")},F.createElement("span",{className:"builder-inline-editor-button".concat(m.includes(n.action)?" active":"").concat(r?" builder-dropdown-active active":""),onClick:function(e){e.preventDefault(),e.stopPropagation(),o(t,n)},title:null!=n&&n.tooltip?
n.tooltip:"",role:"button",ref:v},function e(t){var n=void 0!==(null==t?void 0:t.class_icon)&&!0===t.class_icon;if("click"===(null==t?void 0:t.action)&&"plus"===t.type)return F.createElement("span",{className:"builder-d-inline-flex",onClick:N,title:(null==t?void 0:t.tooltip)||""},F.createElement(co,{name:t.icon,isClassIcon:n,size:void 0===(null==t?void 0:t.icon_size)?"":t.icon_size}));if("placeholder"===(null==t?void 0:t.type)){if(void 0===(null==t?void 0:t.placeholder))return oe(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_DATA_STRUCTURE"),
Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),console.error(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_DATA_STRUCTURE")),null;var o=t.placeholder;if(void 0!==(null==o?void 0:o.type)&&"list"===o.type){if(void 0===(null==o?void 0:o.options))return oe(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_MISSING_OPTIONS")),console.error(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_MISSING_OPTIONS")),null;var r=o.options,a=null;if(g){var i=fe()(g)?g[u]:g;a=void 0!==r[i]?r[i]:
Object.values(r)[0]}else if(void 0!==(null==t?void 0:t.default)){var l=fe()(t.default)?t.default[u]:t.default;a=void 0!==r[l]?r[l]:Object.values(r)[0]}else a=Object.values(r)[0];return e(a)}if(void 0!==(null==o?void 0:o.type)&&"HTMLElement"===o.type){var c=(null==o?void 0:o.element)||"div",s={},d=null;if(null!=o&&o.selector&&("#"===o.selector.charAt(0)?s.id=o.selector.substr(1):s.className=o.selector.substr(1)),null!=o&&o.attribute){var m,p,v=(null===(m=o.attribute)||void 0===m?void 0:m.type)||"style",
f=(null===(p=o.attribute)||void 0===p?void 0:p.property)||"background",b=g||(null==t?void 0:t.default),h="";"background"==f&&fe()(b)&&("solid"==(null==b?void 0:b.type)?h=null!=b&&b.color?b.color:"#FFFFFF":(h=(h="radial"==(null==b?void 0:b.type)?"radial-gradient(at "+(null!=b&&b.radialPos?+b.radialPos:"center center")+", ":"linear-gradient("+(null!=b&&b.deg?b.deg+"deg":"0deg")+", ")+(null!=b&&b.color?b.color:"#FFFFFF")+" "+(null!=b&&b.pos?b.pos+"%":"0%")+", "+(null!=b&&b.color2?b.color2:"#FFFFFF")+
" "+(null!=b&&b.pos2?b.pos2+"%":"100%"),h+=")","radial"==(null==b?void 0:b.type)?null!=b&&b.radialPos&&b.radialPos:(null!=b&&b.deg&&b.deg,null!=b&&b.color&&b.color,null!=b&&b.pos&&b.pos,null!=b&&b.color2&&b.color2,null!=b&&b.pos2&&b.pos2))),"text"===v?d=b:s.style=(0,B.Z)({},f,pe()(h)?b:h)}return F.createElement(c,s,d)}}return void 0===(null==t?void 0:t.icon)&&void 0===(null==t?void 0:t.text)?null:void 0===(null==t?void 0:t.text)?F.createElement(co,{name:t.icon,isClassIcon:n,size:void 0===(null==t?
void 0:t.icon_size)?"":t.icon_size}):void 0===(null==t?void 0:t.icon_position)||"left"===t.icon_position?F.createElement(F.Fragment,null,(null==t?void 0:t.icon)&&F.createElement(co,{name:t.icon,isClassIcon:n,size:void 0===(null==t?void 0:t.icon_size)?"":t.icon_size}),F.createElement("span",{className:"builder-inline-editor-button-text builder-ms-2"},t.text)):F.createElement(F.Fragment,null,F.createElement("span",{className:"builder-inline-editor-button-text builder-me-1"},t.text),(null==t?void 0:
t.icon)&&F.createElement(co,{name:t.icon,isClassIcon:n,size:void 0===(null==t?void 0:t.icon_size)?"":t.icon_size}))}(n),((null==n?void 0:n.fieldset)||(null==n?void 0:n.options))&&(null==n?void 0:n.showCaret)&&F.createElement(co,{name:"angleDown",size:"1x"})),void 0!==(null==n?void 0:n.fieldset)&&r&&R(n))},kd=function(e){var t,n=e.doc,o=e.addon,r=e.reduxProps,a=(0,F.useState)(null),i=(0,j.Z)(a,2),l=i[0],c=i[1],s=To(),d=s.editorData,u=s.setActiveActionButtons;(0,F.useEffect)(function(){var e;void 0===
(null===(e=d.config)||void 0===e?void 0:e.buttons)&&oe(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_INVALID_ADDONS_SETTINGS"),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"))},[]),(0,F.useEffect)(function(){c(null)},[d.addonId]);var m=function(){return c(null)},p=function(e,t){t.action=t.action.toLowerCase(),"dropdown"===t.action?c(function(t){return t!==e?e:null}):["bold","italic","underline"].includes(t.action)&&(n.execCommand(t.action,!1,null),u(function(e){var n=(0,ue.Z)(e),o=n.indexOf(t.action);
return o>-1?n.splice(o,1):n.push(t.action),n}))};return void 0!==(null==d||null===(t=d.config)||void 0===t?void 0:t.buttons)&&Object.entries(d.config.buttons).map(function(e){var t=(0,j.Z)(e,2),n=t[0],a=t[1];return F.createElement(Pd,{key:n,addon:o,button:a,name:n,isActive:l===n,closeSettingsModal:m,onButtonAction:p,reduxProps:r})})};var Rd=function(e){if("addon"===e.addonType){var t,n,o=addonsJSON[e.addonName];if(o.combinedSettings={},"object"===(0,de.Z)(o.attr)&&o.attr instanceof Array&&0===o.attr.length&&
(o.attr={}),void 0!==(null==o||null===(t=o.inline)||void 0===t?void 0:t.buttons)){var r=K()(o.attr);Object.entries(o.inline.buttons).forEach(function(e){var t,n=(0,j.Z)(e,2),a=n[0],i=n[1];null!=i&&i.fieldset&&(null!==(t=i.fieldset)&&void 0!==t&&t.tab_groups?Object.entries(i.fieldset.tab_groups).forEach(function(e){var t=(0,j.Z)(e,2),n=t[0],i=t[1];null!=i&&i.fields&&Object.entries(i.fields).forEach(function(e){e[0]="".concat(a,"_").concat(n,"_").concat(e[0]);var t=Object.fromEntries([e]);Object.assign(o.combinedSettings,
r,t)})}):Object.entries(i.fieldset).forEach(function(e){e[0]="".concat(a,"_").concat(e[0]);var t=Object.fromEntries([e]);Object.assign(o.combinedSettings,r,t)}))})}else Object.assign(o.combinedSettings,o.attr,globalAttr);return Object.assign(null!==(n=o.attr)&&void 0!==n?n:{},globalAttr),o}return"column"==e.addonType?Object.assign({},colSettings,{combinedSettings:colSettings.attr}):"row"==e.addonType?Object.assign({},rowSettings,{combinedSettings:rowSettings.attr}):void 0};const Td=function(e){var t=
e.onlyStar,n=e.size;return t?F.createElement(Ld,{size:n}):F.createElement("div",{className:"builder-button-pro ".concat("sm"==n?"builder-button-pro-sm":""," ").concat("md"==n?"builder-button-pro-md":""," ").concat("lg"==n?"builder-button-pro-lg":""," ").concat("xl"==n?"builder-button-pro-xl":""," ")},F.createElement(Ld,{size:n}),F.createElement("span",{className:"builder-button-pro-label"}," Pro "))};var Ld=function(e){var t=e.size;return F.createElement(co,{name:"star",className:"builder-button-pro-star ".concat("sm"==
t?"builder-button-pro-star-sm":""," ").concat("md"==t?"builder-button-pro-star-md":""," ").concat("lg"==t?"builder-button-pro-star-lg":""," ").concat("xl"==t?"button-button-pro-star-xl":"")})},Md=(0,So.Z)({form:"jpbForm",enableReinitialize:!0,destroyOnUnmount:!1,onChange:function(e,t,n,o){n.onSubmit(e)}})(function(e){var t=e.sections,n=e.position,o=e.doc,r=e.formState,a=e.loadFormValues,i=e.handleSubmit,l=e.onChangeEditableValue,c=e.editorData,s=e.onDuplicate,d=e.onDelete,u=e.plusItemAction,m=e.editorRef,
p=(0,F.useState)(""),v=(0,j.Z)(p,2),f=v[0],b=v[1],h=(0,F.useState)([]),g=(0,j.Z)(h,2),E=g[0],y=g[1],_=(0,F.useState)(window.builderDefaultDevice),w=(0,j.Z)(_,2),x=w[0],I=w[1];(0,F.useEffect)(function(){return o.addEventListener("selectionchange",function(){var e=o.getSelection().toString();b(e||""),C()}),be.on("change",O),function(){y([])}},[]),(0,F.useEffect)(function(){if(null!=c&&c.addonId&&jQuery(document).on("editElementChange",function(e,t,n,o,r){var a;e.preventDefault(),e.stopPropagation();
var i=null!=c&&null!==(a=c.addon)&&void 0!==a&&null!==(a=a.settings)&&void 0!==a&&a.addonName?c.addon.settings.addonName:null;i&&l({field:t,value:o,id:n,addonName:i,options:r})}),c.show){var e,t,n,o=null===(e=c.addon)||void 0===e?void 0:e.settings,r=K()(null!==(t=null==o?void 0:o.formData)&&void 0!==t?t:o),i=null==c||null===(n=c.addon)||void 0===n?void 0:n.settings,s=i.addonIndex,d=i.colIndex,u=i.rowIndex;a({addonType:c.addonType,settings:r,addonName:o.addonName,addonData:{addonIndex:s,colIndex:d,
rowIndex:u}})}return function(){jQuery(document).off("editElementChange")}},[JSON.stringify(r),JSON.stringify(c)]),(0,F.useEffect)(function(){C()},[f]);var O=function(){return I(be.device)},C=function(){var e,t=void 0!==(null===(e=o.getSelection())||void 0===e||null===(e=e.baseNode)||void 0===e||null===(e=e.parentNode)||void 0===e?void 0:e.tagName)?o.getSelection().baseNode.parentNode:null;if(t){var n=void 0!==(null==t?void 0:t.parentNode)?t.parentNode:null,r=null!=t&&t.tagName?(t.tagName||"").toLowerCase():
null,a={strong:"bold",em:"italic",u:"underline",i:"italic",b:"bold"},i=[];for("strong"!==r&&"b"!==r&&"em"!==r&&"i"!==r&&"u"!==r||i.push(a[r]);n;){var l,c=(n.tagName||"").toLowerCase();if("strong"!==c&&"b"!==c&&"em"!==c&&"i"!==c&&"u"!==c)break;i.push(a[c]),n=void 0!==(null===(l=n)||void 0===l?void 0:l.parentNode)?n.parentNode:null}y(i)}},A=(0,F.useMemo)(function(){var e;return null!=r&&null!==(e=r.jpbForm)&&void 0!==e&&e.mainForm?Rd(r.jpbForm.mainForm):[]},[r]),N=((0,F.useMemo)(function(){var e;return((null==
r||null===(e=r.jpbForm)||void 0===e||null===(e=e.mainForm)||void 0===e?void 0:e.addonName)||"").split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")},[r]),function(e){return D(e)}),D=function(e){return F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button ".concat(""),onClick:e.onSaveAddon,role:"button"},F.createElement(co,{name:"saveLine"})),Qe)},S={formState:r,editorData:c,activeDevice:x,position:n,
activeActionButtons:E,setActiveActionButtons:y,selection:f,addonOps:A,plusItemAction:u},P="up"===n.direction?" builder-arrow-down editor-content-down":" builder-arrow-up editor-content-up";return F.createElement(Lo.Provider,{value:S},F.createElement("div",{ref:m,className:"builder-inline-editor builder-has-arrow".concat(P),style:{left:n.left,top:n.top}},F.createElement("form",{onSubmit:i,style:{display:"inline-flex"}},F.createElement(kd,{doc:o,addon:c.addon.addon,reduxProps:e.reduxProps})),F.createElement("div",
{className:"builder-inline-editor-separator"}),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",onClick:function(e){e.preventDefault(),wr.resetAll(),wr.setAddon(ko.addon),wr.setType(c.addonType),wr.showEditPanel(),ko.hideEditor()},role:"button"},F.createElement(co,{name:"cog"}))),N({onSaveAddon:function(){var e=ko.addon,n=e.addon,o=e.settings,r=o.rowIndex,a=o.colIndex,i=Tt({sections:t,addon:n,rowIndex:r,colIndex:a});vo.reset(),
vo.setAddon(i),vo.setDialog("saveAddon"),vo.showDialog()}}),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",role:"button",onClick:function(e){e.preventDefault(),s(c)}},F.createElement(co,{name:"cloneLine"}))),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",role:"button",onClick:function(e){e.preventDefault(),d(c)}},F.createElement(co,{name:"trash"})))))});
const Zd=(0,Xn.$j)(function(e){return{formState:e,initialValues:e.jpbForm.mainForm.values||[]}},function(e){return{loadFormValues:function(t){return e(Mo(t))},onChangeEditableValue:function(t){return e(Jo(t))},plusItemAction:function(t){var n=t.meta,o=t.item,r=t.addonName,a=t.addon;return e({type:"ADD_DEEP_ADDON_NEW_ITEM",payload:{meta:n,item:o,addonName:r,addon:void 0===a?{}:a}})}}})(Md);function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);
t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jd(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Jd=(0,o.UY)({jpbForm:ho,form:Do}),
Gd=(0,o.MT)(Jd);const Hd=(0,Xn.$j)(function(e){return{sections:e.pageBuilder.present,tools:e.tools}},function(e){return{onSaveSettings:function(t){return e(zi(t))},onDeepDuplicationAddon:function(t){return e(Bi(t))},onDeleteAddon:function(t,n,o,r){return e(Ti(t,n,o,r))},onEditAddonText:function(t){return e({type:"EDIT_ADDON_TEXT",payload:t})},setGlobalPanel:function(t){return e(fl(t))},duplicateDeepContentItem:function(t){return e(Zi(t))},removeRow:function(t){return e(ki(t))}}})(function(e){var t=
e.sections,n=e.onSaveSettings,o=e.onDeepDuplicationAddon,r=e.onDeleteAddon,a=e.onEditAddonText,i=(0,F.useState)(!1),l=(0,j.Z)(i,2),c=l[0],s=l[1],d=(0,F.useState)({}),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useState)({show:!1,addon:{},addonId:0,position:{},addonType:"addon",config:{}}),f=(0,j.Z)(v,2),b=f[0],h=f[1],g=(0,F.useRef)({width:0,height:0}),E=(0,F.useCallback)(function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;g.current={width:n,height:o};var r=I(g.current);p(r)}},[]),y=Fl(function(e){n(e)},
300),_=function(){var e=ko.show,t=ko.addon,n=ko.addonId,o=ko.position,r=ko.addonType,a=ko.config;h({show:e,addon:t,addonId:n,position:o,addonType:r,config:a})};(0,F.useEffect)(function(){return ko.on("onEditor",w),ko.on("updateEditor",_),document.getElementById("jpagebuilder-view").contentDocument.addEventListener("keyup",x),function(){ko.removeListener("onEditor",w),ko.removeListener("updateEditor",_),document.getElementById("jpagebuilder-view").contentDocument.removeEventListener("keyup",x),s(!1)}},
[]),(0,F.useEffect)(function(){if(b.show){var e=ko.show,n=ko.addonId,o=ko.position,r=ko.addonType,a=ko.config,i=t.find(function(e){var t;return e.id===(null===(t=b.addon)||void 0===t||null===(t=t.row)||void 0===t?void 0:t.id)});if(i){var l=i.columns.find(function(e){var t;return e.id===(null===(t=b.addon)||void 0===t||null===(t=t.column)||void 0===t?void 0:t.id)});if(l){var c=l.addons.find(function(e){return e.id===b.addonId});if(c){var s=Bd(Bd({},b.addon),{},{row:i,column:l,addon:c,settings:Bd(Bd({},
b.addon.settings),{},{formData:c.settings})});h({show:e,addon:s,addonId:n,position:o,addonType:r,config:a})}}}}},[t]),(0,F.useEffect)(function(){return c&&window.frames["jpagebuilder-view"].window.addEventListener("scroll",O),function(){window.frames["jpagebuilder-view"].window.removeEventListener("scroll",O)}},[c]),(0,F.useEffect)(function(){s(b.show)},[b.show]);var w=function(){var e=ko.show,t=ko.addon,n=ko.addonId,o=ko.position,r=ko.addonType,a=ko.config;if(e){s(!1);var i=setTimeout(function(){s(!0),
clearTimeout(i)},200)}h({show:e,addon:t,addonId:n,position:o,addonType:r,config:a})},x=function(e){var t=e.which||e.keyCode;t&&27===t&&ko.show&&ko.hideEditor()},I=function(e){var t,n,o=document.getElementById("jpagebuilder-view"),r=o.contentDocument||o.contentWindow.document,a=(null==o?void 0:o.getBoundingClientRect())||{},i=r.getElementById("jpb-addon-".concat(ko.addonId)),l=(null==i?void 0:i.getBoundingClientRect())||{},c=l.width,s=l.height,d=l.left,u=l.top,m=l.bottom,p=a.left,v=a.top,f=a.height,
b="".concat(p+d+c/2-e.width/2,"px");return f<=m+e.height?(t="".concat(v+u-e.height,"px"),n="up"):(t="".concat(v+u+s+e.height/2,"px"),n="down"),{left:b,top:t,direction:n}},O=Fl(function(){if(c&&ko.addonId){var e=I(g.current);p(e)}},0,[c]),C=function(e){if(b.show){var t=K()(b.addon);t.settings.formData=e;var n=addonsJSON[t.settings.addonName];h(Bd(Bd({},b),{},{addon:Bd(Bd({},b.addon),{},{settings:Bd(Bd({},b.addon.settings),{},{formData:e})})})),null!=n&&n.js_template?y(t):jQuery.ajax({type:"POST",url:pagebuilder_base+
"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=addon",dataType:"json",data:{addon:{id:t.settings.addonId,settings:e,name:t.settings.addonName}},cache:!1,success:function(e){t.settings.htmlContent=e.html,t.settings.assets=e.assets,y(t)}.bind(void 0)})}},A=(0,F.useMemo)(function(){return null!=b&&b.addon&&Object.keys(b.addon).length>0?C:null},[b]);return(0,V.createPortal)(F.createElement(Xn.zt,{store:Gd},c&&F.createElement(Zd,{sections:t,editorRef:E,editorData:b,onSubmit:A,position:m,
doc:document.getElementById("jpagebuilder-view").contentDocument,onDuplicate:function(e){var t=e.addon,n=t.addon,r=t.settings,a=r.rowIndex,i=r.colIndex,l=r.addonIndex;o({addon:n,rowIndex:a,colIndex:i,addonIndex:l})},onDelete:function(e){var t;ko.hideEditor();var n=e.addon;r(n.row.id,n.column.id,n.addon.id,null===(t=n.addon)||void 0===t?void 0:t.reference_id)},onEditAddonText:a,reduxProps:{currentPanel:e.tools.currentPanel,setGlobalPanel:e.setGlobalPanel,duplicateDeepContentItem:e.duplicateDeepContentItem,
removeRow:e.removeRow,activeDevice:e.tools.activeDevice}})),document.body)});var Ud=function(e){var t=e.children;return V.createPortal(t,document.body)};Ud.proptypes={children:ar().node,container:ar().oneOfType([ar().instanceOf(F.Component),ar().func]),disablePortal:ar().bool};const zd=Ud;var Fd=function(e){var t=e.invisible,n=void 0!==t&&t,o=e.open,r=e.onClose,a="builder-element-backdrop";return n&&(a+=" builder-element-backdrop-visible"),o?F.createElement("div",{className:a,"aria-hidden":!0,onClick:function(e){r&&
r()}}):null};Fd.propTypes={invisible:ar().bool,onClose:ar().func.isRequired,open:ar().bool.isRequired};const Vd=Fd;function Wd(e,t){var n=0;return"top"===t?n=e.top:"center"===t?n=e.top+e.height/2:"bottom"===t&&(n=e.bottom),n}function Kd(e,t){var n=0;return"left"===t?n=e.left:"center"===t?n=e.left+e.width/2:"right"===t&&(n=e.right),n}const Yd=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==
typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={contextStyle:{visibility:"hidden"}},t.handlePagesScroll=gi()(t.handlePagesScroll.bind((0,io.Z)(t))),t.onBackdropHandler=t.onBackdropHandler.bind((0,io.Z)(t)),
t.contextMenuTimer=null,t.contextMenuWrapper=null,t.setWrapper=t.setWrapper.bind((0,io.Z)(t)),t}return(0,G.Z)(r,[{key:"onBackdropHandler",value:function(){var e=this.props.onClose;this.setState({contextStyle:{visibility:"hidden"}}),e()}},{key:"setWrapper",value:function(e){e&&(this.contextMenuWrapper=e,this.getContextMenuPosition())}},{key:"handlePagesScroll",value:function(){this.contextMenuWrapper&&this.getContextMenuPosition()}},{key:"componentDidMount",value:function(){document.addEventListener("scroll",
this.handlePagesScroll),document.getElementById("jpagebuilder-view")&&(window.frames["jpagebuilder-view"].window.addEventListener("scroll",this.handlePagesScroll),window.frames["jpagebuilder-view"].window.addEventListener("resize",this.handlePagesScroll))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("scroll",this.handlePagesScroll),document.getElementById("jpagebuilder-view")&&(window.frames["jpagebuilder-view"].window.removeEventListener("scroll",this.handlePagesScroll),
window.frames["jpagebuilder-view"].window.removeEventListener("resize",this.handlePagesScroll))}},{key:"getContextMenuPosition",value:function(){var e=this,t=this.props,n=t.targetElm,o=t.positionX,r=void 0===o?"right":o,a=t.positionY,i=void 0===a?"bottom":a,l=t.anchorOrigin,c=void 0===l?{x:"center",y:"bottom"}:l,s=t.marginThread,d=void 0===s?10:s;n?(this.contextMenuTimer&&clearTimeout(this.contextMenuTimer),this.contextMenuTimer=setTimeout(function(){var t=e.contextMenuWrapper.getBoundingClientRect(),
o=n.getBoundingClientRect(),a=document.getElementById("jpagebuilder-view"),l=document.body.getBoundingClientRect(),s={left:0,top:0};a&&(s=a.getBoundingClientRect(),l.width=s.width,l.height=s.height);var u,m,p=function(e,t){return{left:Kd(e,t.x),top:Wd(e,t.y)}}(o,c);u="right"===r?l.left+s.left+p.left+d:l.left+s.left+p.left-t.width;var v=t.width+d>Math.abs(o.left-l.width),f=t.width+d>o.right;"center"===r?u=p.left+s.left-t.width/2:"right"===r&&v?u=l.left+s.left+p.left-t.width:"left"===r&&f&&(u=l.left+
s.left+p.left+d),("right"===r||"left"===r)&&v&&f&&(u=l.left+s.left+d+p.left-Math.abs(Math.abs(o.left-l.width)-t.width));var b=Math.abs(o.bottom-window.innerHeight),h=o.top;if("top"===i?m=h>t.height?p.top-(t.height+d):o.bottom+d:"bottom"===i&&(m=b>t.height?p.top+d:o.top-(t.height+d)),t.height>h&&t.height>b){var g=Math.abs(b-t.height);m=p.top-g}e.setState({contextStyle:{visibility:"visible",top:m+"px",left:u+"px"}})})):this.setState({contextStyle:{visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}})}},
{key:"render",value:function(){var e=this.props,t=e.children,n=e.open,o=e.className,r=void 0===o?"":o;return n?F.createElement(zd,null,F.createElement("div",{className:"builder-popover-container"},F.createElement(Vd,{invisible:!0,open:n,onClose:this.onBackdropHandler}),F.createElement("div",{className:"builder-popover".concat(""!=r?" "+r:""),style:this.state.contextStyle,ref:this.setWrapper},t))):null}}]),r}(F.Component);function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function qd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xd(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
var $d=[{id:0,size:"12",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="51" height="17" fill="none"><rect width="50.78" height="16.927" fill-opacity=".3" rx="2"/></svg>'},{id:1,size:"6+6",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="23.79" height="16.221" fill-opacity=".3" rx="2"/><rect width="23.79" height="16.221" x="25.681" fill-opacity=".3" rx="2"/></svg>'},{id:2,size:"4+4+4",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="15.139" height="16.221" fill-opacity=".3" rx="2"/><rect width="15.139" height="16.221" x="17.302" fill-opacity=".3" rx="2"/><rect width="15.139" height="16.221" x="34.605" fill-opacity=".3" rx="2"/></svg>'},
{id:3,size:"3+3+3+3",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="51" height="17" fill="none"><rect width="10.814" height="16.221" fill-opacity=".3" rx="2"/><rect width="10.814" height="16.221" x="12.974" fill-opacity=".3" rx="2"/><rect width="10.814" height="16.221" x="25.95" fill-opacity=".3" rx="2"/><rect width="11.354" height="16.221" x="38.929" fill-opacity=".3" rx="2"/></svg>'},{id:4,size:"4+8",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="15.139" height="16.221" fill-opacity=".3" rx="2"/><rect width="33" height="16" x="17" fill-opacity=".3" rx="2"/></svg>'},
{id:5,size:"3+9",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="10.814" height="16.221" fill-opacity=".3" rx="2"/><rect width="37" height="16" x="13" fill-opacity=".3" rx="2"/></svg>'},{id:6,size:"3+6+3",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="10.543" height="16.221" fill-opacity=".3" rx="2"/><rect width="11.084" height="16.221" x="38.659" fill-opacity=".3" rx="2"/><rect width="23.79" height="16.221" x="12.704" fill-opacity=".3" rx="2"/></svg>'},
{id:7,size:"2+6+4",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="51" height="17" fill="none"><rect width="6.488" height="16.221" x=".143" fill-opacity=".3" rx="2"/><rect width="23.79" height="16.221" x="9" fill-opacity=".3" rx="2"/><rect width="15.139" height="16.221" x="35" fill-opacity=".3" rx="2"/></svg>'},{id:8,size:"2+10",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="6.488" height="16.221" x=".143" fill-opacity=".3" rx="2"/><rect width="41" height="16" x="9" fill-opacity=".3" rx="2"/></svg>'},
{id:10,size:"2+3+7",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="17" fill="none"><rect width="6.488" height="16.221" x=".143" fill-opacity=".3" rx="2"/><rect width="10" height="16.221" x="8.7" fill-opacity=".3" rx="2"/><rect width="28.927" height="16.221" x="20.653" fill-opacity=".3" rx="2"/></svg>'}];const Qd=(0,Xn.$j)(null,function(e){return{addRow:function(t){return e(Pi(t))},setGlobalPanel:function(t){return e(fl(t))},updateRowLayout:function(t){return e({type:"UPDATE_ROW_LAYOUT",
payload:t})}}})(function(e){var t=e.open,n=e.closeDropdown,o=e.rowIndex,r=e.rowId,a=e.bottom,i=void 0!==a&&a,l=e.currentLayout,c=void 0===l?"":l,s=e.updateLayout,d=void 0!==s&&s,u=e.addRow,m=e.updateRowLayout,p=e.setGlobalPanel,v=c.toString().replaceAll(",","+"),f=(0,F.useState)(v),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)(!1),y=(0,j.Z)(E,2),_=y[0],w=y[1],x=(0,F.useRef)(null);(0,F.useEffect)(function(){var e=function(e){x.current&&!x.current.parentElement.contains(e.target)&&n()};return document.addEventListener("click",
e),function(){document.removeEventListener("click",e)}},[]),(0,F.useEffect)(function(){g(v)},[v]);var I=function(e){return function(){d?m({newLayout:e.size,currentLayout:v,rowId:r}):u(qd({layout:e.size},i&&{rowIndex:o+1})),n()}};return F.createElement(Yd,{open:t,onClose:n,positionX:"center",positionY:"top",className:"builder-canvas-grid-popover",anchorOrigin:{x:"center",y:"top"}},F.createElement("div",{className:"builder-row",ref:x},F.createElement("div",{className:"builder-column-md-4"},F.createElement("div",
{className:"builder-canvas-card builder-d-flex builder-flex-column builder-justify-content-center builder-text-center builder-py-5 builder-px-3"},F.createElement("div",{className:"builder-d-flex builder-justify-content-center builder-gap-3"},F.createElement(co,{name:"layoutDesign4",className:"builder-bg-secondary"}),F.createElement(co,{name:"layoutDesign2",className:"builder-bg-secondary"}),F.createElement(co,{name:"layoutDesign7",className:"builder-bg-secondary"})),F.createElement("div",{className:"builder-mt-3 builder-mb-4 builder-fs-2"},
Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_POPOVER_TITLE")))),F.createElement("div",{className:"builder-column-md-8 builder-canvas-line"},F.createElement("div",{className:""},F.createElement("div",{className:"builder-canvas-grid-row"},$d.map(function(e){return F.createElement("div",{key:e.id,className:"builder-canvas-grid-column"},F.createElement("div",{className:"builder-canvas-grid-item",onClick:I(e)},F.createElement("div",{className:"builder-canvas-grid-item-preview",dangerouslySetInnerHTML:{__html:e.icon}}),
F.createElement("div",{className:"builder-canvas-grid-item-name"},e.size)))})),F.createElement("div",{className:"builder-fs-sm builder-text-center builder-py-3 builder-insert-line"},Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_POPOVER_CUSTOM_COLUMNS")),_&&F.createElement("p",{className:" builder-fs-2 builder-text-danger builder-text-center "},Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_POPOVER_INVALID_LAYOUT")),F.createElement("form",{className:"builder-d-flex",onSubmit:function(e){e.preventDefault(),/^(\s*\d+(\.[0-9])?\s*\+?\s*)*$/.test(h)&&
""!==h?(d?m({newLayout:h,currentLayout:v,rowId:r}):u(qd({layout:h},i&&{rowIndex:o+1})),n()):w(!0)}},F.createElement("input",{onChange:function(e){var t=e.target.value;g(t)},className:"builder-form-field",type:"text",value:h,placeholder:"e.g. 3+3+6"}),F.createElement("button",{className:"builder-button builder-button-primary  builder-ms-3",type:"submit"},"".concat(d?Joomla.JText._("COM_JPAGEBUILDER_UPDATE"):Joomla.JText._("COM_JPAGEBUILDER_GENERATE")))))),F.createElement("span",{className:"builder-close-button builder-text-secondary builder-cursor-pointer",
onClick:n},F.createElement(co,{name:"times"}))))}),eu=function(e){var t=e.bottom,n=e.iconOnly,o=e.index,r=(0,F.useState)(!1),a=(0,j.Z)(r,2),i=a[0],l=a[1];return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-button builder-button-primary".concat(n?" builder-button-icon-only":" builder-button-md"),onClick:function(){return l(!0)},role:"button",onKeyDown:ye,tabIndex:0},n?F.createElement(co,{name:"plus"}):F.createElement(F.Fragment,null,F.createElement(co,{name:"plus",className:"builder-me-0 builder-me-sm-2"}),
" ",F.createElement("span",{className:"builder-d-none builder-d-sm-inline"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_ADD_NEW_SECTION")))),i&&F.createElement(Qd,{open:i,closeDropdown:function(){return l(!1)},bottom:t,rowIndex:o}))};var tu=function(e){var t,n,o=e.settings,r=e.prop,a=e.cssProp,i=e.device,l=e.important,c=void 0!==l&&l,s=e.unit,d=void 0===s?"px":s,u=Ye("string");if(void 0===(null==o?void 0:o[r]))return u;if(fe()(o[r]))for(var m in u){var p,v,f;pe()(null===(p=o[r])||void 0===p?void 0:p[m])||
""!==((null===(v=o[r])||void 0===v?void 0:v[m])||"").replace(/\s+/g,"")&&(u[m]="".concat(a,": ").concat((null===(f=o[r])||void 0===f?void 0:f[m])||"").concat(d),u[m]+=c?" !important;":";")}else pe()(null==o||null===(t=o[r])||void 0===t?void 0:t.toString())||""!==((null==o||null===(n=o[r])||void 0===n?void 0:n.toString())||"").replace(/\s+/g,"")&&(u[i]="".concat(a,": ").concat((null==o?void 0:o[r])||"").concat(d),u[i]+=c?" !important;":";");return u},nu=function(e,t,n){var o=Ye("string"),r=["top",
"right","bottom","left"],a=/^global_/.test(t)?t.replace(/^global_/,""):t;if(fe()(e[t]))for(var i in o){var l;if(void 0!==(null==e||null===(l=e[t])||void 0===l?void 0:l[i])){var c=e[t][i]+"";o[i]=c.split(" ").map(function(e,t){return pe()(e)?"":"".concat(a,"-").concat(r[t],": ").concat(e,";")}).join("\r\n")}}else{var s=void 0!==(null==e?void 0:e[t])?(null==e?void 0:e[t])+"":"";o[n]=s.split(" ").map(function(e,t){return pe()(e)?"":"".concat(a,"-").concat(r[t],": ").concat(e,";")}).join("\r\n")}return o},
ou=function(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];var a=t.map(function(e,t){return void 0!==(null==o?void 0:o[t])?e+o[t]:e}).join("\n");return"".concat(e," {").concat(a,"}")}},ru={position:"fixed",inset:0,zIndex:3,background:"rgba(0,0,0,0.05)"};const au=(0,Xn.$j)(null,function(e){return{disableColumn:function(t,n,o){e(Vi(t,n,o))},deleteColumn:function(t,n){e(Ri(t,n))},duplicateColumn:function(t,n){e(ji(t,n))}}})(function(e){var t=e.rowIndex,
n=e.rowId,o=e.colIndex,r=e.column,a=e.disableColumn,i=e.deleteColumn,l=e.duplicateColumn,c=(0,F.useState)(!1),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=function(){u(!1)};return F.createElement("div",{className:"builder-column-tools"},F.createElement("div",{className:"builder-column-button"},F.createElement("span",{className:"builder-button builder-button-primary builder-button-round",onClick:d?m:function(){window.jpbNoAddonAutoOpenSection=true;setTimeout(function(context){const idColumn=r.id;const selectorColumn=
`#column-wrap-id-${idColumn} > div.builder-column-tools > div.builder-list-group.builder-is-card.builder-context-sub-menu.builder-has-arrow.builder-arrow-right > span:nth-child(4)`;const targetColumnRow=window.frames["jpagebuilder-view"].window.document.querySelector(selectorColumn);if(targetColumnRow){targetColumnRow.columnHiding=false;targetColumnRow.click();delete targetColumnRow.columnHiding}},100,this);u(!0)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"cog","area-hidden":"true"}))),
d&&F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-list-group builder-is-card builder-context-sub-menu builder-has-arrow builder-arrow-right",style:{zIndex:4}},F.createElement("span",{className:"builder-list-item builder-list-item-action",onClick:function(){l(n,r.id),m()},role:"button",title:Joomla.JText._("COM_JPAGEBUILDER_DUPLICATE_CANVAS"),onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"cloneLine",className:"builder-list-icon"})),function(e){return F.createElement("span",
{className:"builder-list-item builder-list-item-action ".concat(""),onClick:e.onDisable,role:"button",title:e.visibility?Joomla.JText._("COM_JPAGEBUILDER_HIDE"):Joomla.JText._("COM_JPAGEBUILDER_SHOW"),onKeyDown:ye,tabIndex:0},F.createElement("span",{className:"builder-d-flex builder-align-items-center"},e.visibility?F.createElement(F.Fragment,null,F.createElement(co,{name:"eye",className:"builder-list-icon"})):F.createElement(F.Fragment,null,F.createElement(co,{name:"eyeSlash",className:"builder-list-icon"})),
Qe))}({visibility:r.visibility,onDisable:function(){a(t,o,r.id),m()}}),F.createElement("span",{className:"builder-list-item builder-list-item-delete builder-list-item-action",onClick:function(){return i(n,r.id)},role:"button",title:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE"),onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"trash",className:"builder-list-icon"})),F.createElement("span",{className:"builder-list-item builder-list-item-action",onClick:function(event){wr.resetAll(),wr.setType("column"),
wr.setRowIndex(t),wr.setColIndex(o),wr.setColSettings(r),wr.showEditPanel(),window.editMode="inline";const preventClosing=typeof event.target.columnHiding!=="undefined"&&event.target.columnHiding===false;if(!preventClosing)m()},role:"button",title:Joomla.JText._("COM_JPAGEBUILDER_SETTINGS_CANVAS"),onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"cog",className:"builder-list-icon"})))))});function iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var lu=
function(e){var t=e.lastColumnResizable,n=e.row,o=e.column,r=e.fitInRow,a=e.index,i=e.updateColumnWidth,l=(0,F.useRef)(null),c=(0,F.useRef)(null),s=(0,F.useRef)(null),d=(0,F.useRef)({current:null,affected:null}),u=(0,F.useState)(!1),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useState)({width:0,grid:0}),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)({width:0,grid:0}),y=(0,j.Z)(E,2),_=y[0],w=y[1];(0,F.useEffect)(function(){var e=function(e){l.current&&!l.current.contains(e.target)&&s.current&&!s.current.contains(e.target)&&
v(!1)};return p&&l.current&&(window.addEventListener("click",e),window.iWindow.addEventListener("click",e)),function(){window.removeEventListener("click",e),window.iWindow.removeEventListener("click",e)}},[p,l.current]),(0,F.useEffect)(function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return iu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&
(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iu(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=
n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}(window.iWindow.document.querySelectorAll(".jpagebuilder-builder-column"));try{for(t.s();!(e=t.n()).done;)e.value.classList.toggle("zero-zindex")}catch(e){t.e(e)}finally{t.f()}},[p]);var x=Fl(function(e){i(e)},400),I=function(e){r?C(e):A(e)},O=function e(){var t;i({rowId:n.id,originalColumnId:o.id,affectedColumnId:null===(t=n.columns)||void 0===
t||null===(t=t[a+1])||void 0===t?void 0:t.id,originalColumnValue:d.current.current,affectedColumnValue:d.current.affected,device:be.device,fitInRow:r}),d.current={current:null,affected:null},window.iWindow.removeEventListener("mousemove",I),window.iWindow.removeEventListener("mouseup",e)},C=function(e){e.stopPropagation(),e.preventDefault();var t=c.current,n=t.section,o=t.lastMousePositionX,r=t.currentColumn,a=t.affectedColumn,i=t.currentColumnWidth,l=t.affectedColumnWidth,s=o-e.clientX,u=n.getBoundingClientRect(),
m=parseFloat(100*s/u.width),p=parseFloat(i)+parseFloat(l)-8.3,v=parseFloat(i)+parseFloat(l);if(!(!r&!a)){var f=0,b=0;if(parseFloat(i),parseFloat(i)-m>=8.3&&parseFloat(i)-m<=p){var h=parseFloat(i)-m,E=parseFloat(l)+m,y=E>100?100:E;if(h>100)return;r.style.flexBasis="".concat(h,"%"),r.style.maxWidth="".concat(h,"%"),a.style.flexBasis="".concat(y,"%"),a.style.maxWidth="".concat(y,"%"),d.current={current:"".concat(h,"%"),affected:"".concat(y,"%")},f=h,b=y}else if(parseFloat(i)-m<8.3){var _=v-p,x=p>100?
100:p;r.style.flexBasis="".concat(_,"%"),r.style.maxWidth="".concat(_,"%"),a.style.flexBasis="".concat(x,"%"),a.style.maxWidth="".concat(x,"%"),d.current={current:"".concat(_,"%"),affected:"".concat(x,"%")},f=_,b=x}else r.style.flexBasis="".concat(p,"%"),r.style.maxWidth="".concat(p,"%"),a.style.flexBasis="".concat(v-p,"%"),a.style.maxWidth="".concat(v-p,"%"),d.current={current:"".concat(p,"%"),affected:"".concat(v-p,"%")},f=p,b=v-p;(0,V.unstable_batchedUpdates)(function(){g({width:f.toFixed(1)}),
w({width:b.toFixed(1)})})}},A=function(e){var t=c.current,n=t.section,o=t.lastMousePositionX,r=t.currentColumn,a=t.currentColumnWidth,i=n.getBoundingClientRect(),l=e.clientX-o,s=parseFloat(100*l/i.width),d=Math.min(parseFloat(a)+s,100);d<8.3||(N(d,r),g({width:d.toFixed(1)}))},N=function(e,t){e<0||(t.style.flexBasis="".concat(e,"%"),t.style.maxWidth="".concat(e,"%"),d.current={current:"".concat(e,"%"),affected:null})},D=function(e){return function(t){if(c.current){var i=c.current,l=i.currentColumn,
s=i.currentColumnWidth,d=i.affectedColumn,u=i.affectedColumnWidth,m=t.target.value;if(""===m.trim()&&(m="0.0"),parseFloat(m)>100&&(m="100.0"),/^[\d\.]+$/.test(m)){"left"===e?g({width:parseFloat(m).toFixed(1)}):w({width:parseFloat(m).toFixed(1)});var p,v=parseFloat(m),f=parseFloat(s)+parseFloat(u);(r&&v<f&&v>=8.3&&f-v>=8.3||!r&&v>=8.3&&v<=100)&&(r?function(e){var t=e.colType,n=e.colWidth,o=e.currentColumn,r=e.currentColumnWidth,a=e.affectedColumn,i=e.affectedColumnWidth,l="left"===t?n:parseFloat(r)+
parseFloat(i)-n,c="right"===t?n:parseFloat(r)+parseFloat(i)-n;o.style.flexBasis="".concat(l,"%"),o.style.maxWidth="".concat(l,"%"),a.style.flexBasis="".concat(c,"%"),a.style.maxWidth="".concat(c,"%"),"left"===t?w({width:c.toFixed(1)}):g({width:l.toFixed(1)})}({colType:e,colWidth:v,currentColumn:l,currentColumnWidth:s,affectedColumn:d,affectedColumnWidth:u}):N(v,l),x({rowId:n.id,originalColumnId:o.id,affectedColumnId:null===(p=n.columns)||void 0===p||null===(p=p[a+1])||void 0===p?void 0:p.id,originalColumnValue:"".concat("left"===
e?v:parseFloat(s)+parseFloat(u)-v,"%"),affectedColumnValue:r?"".concat("right"===e?v:parseFloat(s)+parseFloat(u)-v,"%"):null,device:be.device,fitInRow:r}))}}}};return F.createElement(F.Fragment,null,t&&F.createElement("div",{ref:l,className:"builder-column-resize-handle",onMouseDown:function(e){return function(e,t){var a,i=void 0!==(null===(a=n.columns)||void 0===a?void 0:a[Number(t)+1]),l=window.iDocument.querySelector("#section-id-".concat(n.id," .jpb-row")),s=window.iDocument.getElementById("column-wrap-id-".concat(o.id)),
u=i?window.iDocument.getElementById("column-wrap-id-".concat(n.columns[parseInt(t)+1].id)):null,m=e.clientX,p=getComputedStyle(s).flexBasis.slice(0,-1),f=i&&getComputedStyle(u).flexBasis.slice(0,-1),b=p+"%",h=i&&f+"%";c.current={section:l,lastMousePositionX:m,currentColumn:s,affectedColumn:u,currentColumnWidth:p,affectedColumnWidth:f},d.current={current:b,affected:h},(c.current||d.current)&&(v(!0),r?C(e):A(e),window.iWindow.addEventListener("mousemove",I),window.iWindow.addEventListener("mouseup",
O))}(e,a)}}),p&&F.createElement("div",{ref:s,className:"builder-column-width-popup ".concat(r?"":"builder-column-width-popup-full")},F.createElement("input",{className:"builder-column-width-popup-input builder-pe-0",type:"text",value:h.width,onChange:D("left")}),"%",r&&F.createElement(F.Fragment,null,F.createElement("span",{id:"builder-percent-slash"},"/"),F.createElement("input",{className:"builder-column-width-popup-input builder-pe-0",type:"text",value:_.width,onChange:D("right")}),"%")))},cu=
n(6459),su=n(7034),du=n(3353),uu="".concat(pagebuilder_base,"components/com_jpagebuilder/assets/images/row.png");const mu=function(e){var t=e.index,n=e.rowIndex,o=(0,su.c)({item:{type:Qn,dragType:"MOVE_COLUMN",columnIndex:t,rowIndex:n,rowId:e.row.id,columnId:e.column.id}}),r=(0,j.Z)(o,3);(0,cu.Z)(r[0]);var a=r[1],i=r[2];return F.createElement(F.Fragment,null,F.createElement(du.h,{connect:i,src:uu}),F.createElement("div",{ref:a,className:"builder-column-drag-area"},F.createElement("span",{className:"builder-column-drag-area-button",
role:"button"},F.createElement(co,{name:"ellipsisDoubleY"}))))};var pu,vu,fu,bu,hu,gu,Eu=function(e){var t=e.rowId,n=e.columnId,o=e.addon,r=e.scrollInteraction,a=void 0!==r&&r,i=e.mouseInteraction,l=void 0!==i&&i,c=function(e){var t=(0,F.useState)(0),n=(0,j.Z)(t,2),o=n[0],r=n[1],a=function(){var t=e.instFormId,n=window.iDocument.getElementById("addon-wrap-".concat(t));if(null!==n){n.removeAttribute("style");var o=i(n,e.scrolling_options);o>-1&&o<=100&&r(o)}},i=function(e){var t=arguments.length>1&&
void 0!==arguments[1]?arguments[1]:"viewport",n=e.getBoundingClientRect(),o=document.body.offsetHeight,r=n&&n.top,a=n.height;if("fullpage"===t){var i=$(window.iDocument).scrollTop()/($(window.iDocument).height()-$(window).height());return Math.round(100*i)}var l=window.pageYOffset;if(r>l+o)return-1;if(r+a<l)return 101;var c=(l+o-r)/((o+a)/100);return c>100?100:c};return(0,F.useEffect)(function(){var t=(e||{}).while_scroll_view;if(Array.isArray(t)&&null!=t&&t.length){var n=t||[];return((0,j.Z)(n,1)[0]||
{}).enable_while_scroll_view&&window.iDocument.addEventListener("scroll",a,!1),function(){window.iDocument.removeEventListener("scroll",a,!1)}}},[null==e?void 0:e.while_scroll_view]),{percentage:o}}(o.settings),s=c.percentage;(0,F.useEffect)(function(){var e=l?function(e,t){var n,o,r,a=be.device;if(null!==(n=t.mouse_movement)&&void 0!==n&&n.length){var i=t.instFormId,l=null===(o=window.frames["jpagebuilder-view"].window.document.getElementById("jpb-addon-".concat(i)))||void 0===o?void 0:o.parentElement;
if(l){var c=null===(r=t.mouse_movement)||void 0===r?void 0:r[0],s=c.enable_tilt_effect,d=c.mouse_tilt_speed,u=c.mouse_tilt_direction,m=c.mouse_tilt_max,p=c.enable_tablet,v=c.enable_mobile;if(s){var f=function(){var t=ht.getInstance(e);t&&t.destroy(e)};s||f(),"sm"!==a||void 0!==p&&0!==p||f(),"xs"!==a||void 0!==v&&0!==v||f();var b={speed:1E3*parseFloat(d),max:parseFloat(m),reverse:"opposite"===u,easing:"cubic-bezier(.03,.98,.52,.99)",scale:1.05,transition:!0,perspective:1E3},h=ht.getInstance(e);return h&&
h.destroy(),ht.init({addonId:e,element:l,options:b}),ht.getInstance(e)}}}}(o.id,o.settings):null;return function(){e&&e.destroy(o.id)}},[o]);var d=o.settings||{},u=d.global_custom_css,m="";if(d.global_custom_position&&(m+=function(e){var t=e.rowId,n=e.columnId,o=e.addon.settings||{},r=o.global_section_z_index,a=o.global_addon_z_index,i="";return void 0!==r&&(i="#jpb-section-parent-".concat(t,"{position: relative; z-index:").concat(r," !important;}")),void 0!==a&&(i+="#column-wrap-id-".concat(n,"{z-index:").concat(a,
" !important;}")),i}({rowId:t,columnId:n,addon:o})),a){var p=function(e,t){var n,o,r=e.settings,a=(r||{}).while_scroll_view,i=be.device;if(3!==window.toolsTabIndex)return"";if(!Array.isArray(a)||null==a||!a.length)return"";var l=a||[],c=(0,j.Z)(l,1)[0]||{},s=c.enable_while_scroll_view,d=c.on_scroll_actions,u=c.transition_origin_x,m=c.transition_origin_y,p=c.enable_tablet,v=c.enable_mobile;if(!s||void 0===d||"sm"===i&&!p||"xs"===i&&!v)return"";var f=K()(d),b={x_offset:null!==(n=r.transition_origin_x)&&
void 0!==n?n:u,y_offset:null!==(o=r.transition_origin_y)&&void 0!==o?o:m},h=Et.parseBeforeFixedWindowPosition(f);return t&&(h=Et.parseScrollAction(f,t,b)),"#addonId ".concat(h)}(o,s);m+=p}var v="#jpb-addon-".concat(o.id),f="#addon-wrap-".concat(o.id),b=u||"";if(at(b)&&b.trim().length>0&&null===b.match(/#addonId/g)&&null===b.match(/#addonWrapper/g)){var h=b.trim();b=h.split("}").filter(Boolean).map(function(e){return"div"===o.name?"".concat(v).concat(e):"".concat(v," ").concat(e)}).join("} ").concat("}")}return""===
(m=(m=(m+=b).replace(/#addonId/g,v)).replace(/#addonWrapper/g,f))?null:F.createElement("style",{type:"text/css"}," ",m," ")},yu=n(6486),_u=function(e){return(0,F.useMemo)(function(){var t=K()(e);yu.templateSettings.evaluate=/<#([\s\S]+?)#>/g,yu.templateSettings.interpolate=/\{\{\{([\s\S]+?)\}\}\}/g,yu.templateSettings.escape=/\{\{([^\}]+?)\}\}(?!\})/g,yu.templateSettings.variable="data";var n=document.getElementById("jpb-tmpl-addon-"+e.name);if(n){var o=(0,yu.template)(n.innerHTML);return t.settings.id=
t.id,o(t.settings)}return""},[e])},wu=n(168),xu=function(e,t){return(0,F.useMemo)(function(){var n,o=e.settings,r="#jpb-addon-".concat(e.id),a=[],i=nu(o,"global_margin",t),l=nu(o,"global_padding",t),c=tu({settings:o,prop:"global_border_radius",cssProp:"border-radius",device:t}),s=tu({settings:o,prop:"global_border_width",cssProp:"border-width",device:t}),d=tu({settings:o,prop:"global_width",cssProp:"width",device:t,important:!1,unit:"%"}),u=null!=o&&o.global_text_color?"color: ".concat(o.global_text_color,
";"):"",m=null!=o&&o.global_background_color?"background-color: ".concat(o.global_background_color,";"):"",p="",v={src:""},f="";if("image"===(null==o?void 0:o.global_background_type))null!=o&&null!==(n=o.global_background_image)&&void 0!==n&&n.src?v.src=o.global_background_image.src:v.src=o.global_background_image,p+=null!=o&&o.global_background_image?"background-image: url(".concat(v.src,");"):"",p+=null!=o&&o.global_background_position?"background-position: ".concat(o.global_background_position,
";"):"",p+=null!=o&&o.global_background_repeat?"background-repeat: ".concat(o.global_background_repeat,";"):"",p+=null!=o&&o.global_background_size?"background-size: ".concat(o.global_background_size,";"):"";else if("gradient"===(null==o?void 0:o.global_background_type)){var b,h;if(null!=o&&o.global_background_gradient)if("linear"===(null===(b=o.global_background_gradient)||void 0===b?void 0:b.type)){var g=o.global_background_gradient,E=g.deg,y=g.color,_=g.color2,w=g.pos,x=void 0===w?"0":w,I=g.pos2,
O=void 0===I?"100":I;f="background-image: linear-gradient(".concat(E,"deg, ").concat(y," ").concat(x,"%, ").concat(_," ").concat(O,"%);")}else if("radial"===(null===(h=o.global_background_gradient)||void 0===h?void 0:h.type)){var C=o.global_background_gradient,A=C.radialPos,N=void 0===A?"top center":A,D=C.color,S=C.color2,P=C.pos,k=void 0===P?"0":P,R=C.pos2,T=void 0===R?"100":R;f="background-image: radial-gradient(at ".concat(N,", ").concat(D," ").concat(k,"%, ").concat(S," ").concat(T,"%);")}}var L=
null!=o&&o.global_user_border&&null!=o&&o.global_boder_style?"border-style: ".concat(o.global_boder_style,";"):"",M=null!=o&&o.global_border_color?"border-color: ".concat(null==o?void 0:o.global_border_color,";"):"",Z="";if(fe()(o.global_boxshadow)){var j=o.global_boxshadow||{},B=j.ho,J=void 0===B?0:B,G=j.vo,H=void 0===G?0:G,U=j.blur,z=void 0===U?0:U,F=j.spread,V=void 0===F?0:F,W=j.color,K=void 0===W?"":W;Z="box-shadow: ".concat(J,"px ").concat(H,"px ").concat(z,"px ").concat(V,"px ").concat(K,";")}else Z=
null!=o&&o.global_boxshadow?"box-shadow: ".concat(null==o?void 0:o.global_boxshadow,";"):"";var Y=ou(r)(pu||(pu=(0,wu.Z)(["\n\t\t\t","\n\t\t"])),d[window.builderDefaultDevice]),X=ou(r)(vu||(vu=(0,wu.Z)(["\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t\t","\n\t\t"])),i[window.builderDefaultDevice],l[window.builderDefaultDevice],c[window.builderDefaultDevice],s[window.builderDefaultDevice],L,M,m,f,p,u,Z);if(null!=o&&o.global_link_color){var q=
ou("".concat(r," a"))(fu||(fu=(0,wu.Z)(["\n\t\t\t\tcolor: ",";\n\t\t\t"])),o.global_link_color);a.push(q)}if(null!=o&&o.global_link_hover_color){var $=ou("".concat(r," a:hover"))(bu||(bu=(0,wu.Z)(["\n\t\t\t\tcolor: ",";\n\t\t\t"])),o.global_link_hover_color);a.push($)}var Q=je.filter(function(e){return e!==window.builderDefaultDevice}).map(function(e){var t="";return t+=Xe(e),(t+=ou(r)(hu||(hu=(0,wu.Z)(["\n\t\t\t\t\t","\n\t\t\t\t\t","\n\t\t\t\t\t","\n\t\t\t\t\t","\n\t\t\t\t"])),i[e],l[e],c[e],s[e]))+
"}"}).join("\n"),ee=je.filter(function(e){return e!==window.builderDefaultDevice}).map(function(e){var t="";return t+=Xe(e),(t+=ou(r)(gu||(gu=(0,wu.Z)(["\n\t\t\t\t\t","\n\t\t\t\t"])),d[e]))+"}"}).join("\n");return a.push(X),a.push(Q),a.push(Y),a.push(ee),a.join("\n")},[e.settings])};function Iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}
function Ou(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Iu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Cu=function(e){var t=e.handle,n=e.transition,o=void 0===n?"none 0s ease 0s":n,r=e.children,a=e.currentPanel,i=localStorage.getItem("layerPosition")?
JSON.parse(localStorage.getItem("layerPosition")):{left:0,top:0},l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=F.Children.only(r),m=(0,F.useRef)(null),p=(0,F.useRef)(i),v=(0,F.useRef)({left:0,top:0,right:0}),f=(0,F.useState)(i),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)(null),y=(0,j.Z)(E,2),_=y[0],w=y[1],x=Pa(h),I=document.getElementById("builder-panel"),O=document.querySelector(".builder-layer-content"),C=I&&I.getBoundingClientRect(),A=O&&O.getBoundingClientRect(),N=C?C.width:62,D=A?A.width:
340;return(0,F.useEffect)(function(){at(x)&&!s&&localStorage.setItem("layerPosition",JSON.stringify(x))},[x,s]),(0,F.useEffect)(function(){var e,n;null!=u&&null!==(e=u.ref)&&void 0!==e&&e.current&&(m.current=u.ref.current);var r=document.getElementById("jpagebuilder-view"),i=localStorage.getItem("builderDockState"),l=at(i)&&["left","right"].includes(i),c=0,s=0,f=!1;if(l&&a){var b=h.left;"left"===i?b<=D+N&&(b=D+N):"right"===i&&b>=document.body.clientWidth-D-m.current.clientWidth&&(b=document.body.clientWidth-
D-m.current.clientWidth),g({left:b,top:h.top})}var E=function(e){if(m.current&&f){var t=e.clientX-c,n=e.clientY-s,o=document.body.clientWidth,i=document.body.clientHeight,l=m.current.clientWidth,d=m.current.clientHeight,u=0,p=localStorage.getItem("builderDockState");at(p)&&["left","right"].includes(p)&&(u=N,a&&("left"===p&&(u=D+N),"right"===p&&(o-=D))),t=Math.min(o-l,Math.max(u,t)),n=Math.min(i-d-60,Math.max(20,n)),r.style.pointerEvents="none",r.style.userSelect="none",g({left:t,top:n})}},y=function e(){f=
!1,d(!1),w(null),r.style.pointerEvents="auto",r.style.userSelect="none",document.userSelect="none",document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",e)},_=function(e){var t;if(c=e.clientX-m.current.offsetLeft,s=e.clientY-m.current.offsetTop,f=!0,d(!0),r.style.userSelect="auto",document.userSelect="auto",0===e.button){w(o);var n=m.current.offsetLeft,a=m.current.offsetTop,i=e.clientX-n,l=e.clientY-a,u=(null===(t=document.getElementById("jpagebuilder"))||void 0===t?void 0:
t.getBoundingClientRect())||{};v.current={left:u.left,top:u.top,right:u.right},p.current={left:Math.round(i),top:Math.round(l)},document.addEventListener("mousemove",E),document.addEventListener("mouseup",y)}},x=t?null===(n=m.current)||void 0===n?void 0:n.querySelector(t):null;return x.style.cursor="move",x.addEventListener("mousedown",_),function(){null==x||x.removeEventListener("mousedown",_)}},[t,a]),F.cloneElement(u,Ou(Ou({},!u.ref&&{ref:m}),h&&{style:Ou({left:"".concat(h.left,"px"),top:"".concat(h.top,
"px"),bottom:h.bottom?"".concat(h.bottom,"px"):"unset",right:h.right?"".concat(h.right,"px"):"unset"},_&&{transition:_})}))};var Au=new (function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;
e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),(e=o.call(this)).addonHoverId=null,e}return(0,G.Z)(r,[{key:"setAddonHoverId",value:function(e){this.addonHoverId=e,this.dispatchEvent()}},{key:"reset",value:function(){this.addonHoverId=null,this.dispatchEvent()}},{key:"dispatchEvent",value:function(){this.emit("onAddonHover")}}]),r}(X()));Au.setMaxListeners(0);const Nu=Object.seal(Au);var Du=(0,F.createContext)({}),Su=
function(){return(0,F.useContext)(Du)};const Pu=Du;function ku(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Ru(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ku(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
ku(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Tu={section:"section",nested_row:"nested_row",deep_addon_row:"deep_addon_row"};function Lu(e){var t=e.sections,n=e.isCollapsed,o=void 0!==n&&n,r=e.previousTree,a=void 0===r?{}:r,i={id:0,parentId:0,childIds:[],sectionIndex:-1,level:0},l={};return t.forEach(function(e,n){if(!e.parent){var r,c,s=Zu({data:e,title:e.settings.admin_label||e.name||"Section",level:1,isCollapsed:null!==(r=null===
(c=a[e.id])||void 0===c?void 0:c.isCollapsed)&&void 0!==r?r:o,indexes:{sectionIndex:n},type:"section"});i.childIds.push(e.id),l[e.id]=s,Mu({sections:t,sectionIndex:n,nodes:l,parentNode:s,previousTree:a})}}),l[i.id]=i,l}function Mu(e){var t=e.sections,n=e.sectionIndex,o=e.nodes,r=e.parentNode,a=e.previousTree,i=void 0===a?{}:a,l=t[n];l.columns.forEach(function(e,a){var c,s,d=Zu({data:e,parentId:l.id,title:e.settings.admin_label||"Column",indexes:{sectionIndex:n,columnIndex:a},level:r.level+1,isCollapsed:null!==
(c=null===(s=i[e.id])||void 0===s?void 0:s.isCollapsed)&&void 0!==c?c:r.isCollapsed,type:"column"});r.childIds.push(e.id),o[e.id]=d,e.addons.forEach(function(c,s){if("nested_row"===(null==c?void 0:c.type)){var u=t.findIndex(function(t){var n=t.id,o=t.parent;return n===c.id&&(null==o?void 0:o.rowId)===l.id&&o.columnId===e.id});if(-1!==u){var m,p,v=t[u],f=Zu({data:v,parentId:e.id,title:v.settings.admin_label||Joomla.JText._("COM_JPAGEBUILDER_ROW"),indexes:{sectionIndex:n,columnIndex:a,addonIndex:s,
nestedRowIndex:u},isCollapsed:null!==(m=null===(p=i[v.id])||void 0===p?void 0:p.isCollapsed)&&void 0!==m?m:d.isCollapsed,level:r.level+2,type:"nested_row"});d.childIds.push(v.id),o[v.id]=f,Mu({sections:t,sectionIndex:u,nodes:o,parentNode:f,previousTree:i})}}else if(c.name===R.productList){var b,h,g,E,y=Zu({data:c,parentId:(null==c?void 0:c.parent)||e.id,childIds:(null==c?void 0:c.items[0].flatMap(function(e){return e.parent?[]:e.id}))||[],title:c.settings.admin_label||c.title||c.name,icon:null!==
(b=c.icon)&&void 0!==b?b:null===(h=addonsJSON[c.name])||void 0===h?void 0:h.icon,indexes:{sectionIndex:n,columnIndex:a,addonIndex:s},level:r.level+2,type:"addon",isCollapsed:null!==(g=null===(E=i[c.id])||void 0===E?void 0:E.isCollapsed)&&void 0!==g?g:d.isCollapsed});null!=c&&c.parent||d.childIds.push(c.id),o[c.id]=y,null==c||c.items[0].forEach(function(e,t){var r,l,d,u,m=null;if(null!=e&&e.parent){var p=null==c?void 0:c.items[0].find(function(t){return t.id===e.parent});if(at(p)){var v,f=(null!==
(v=p.children)&&void 0!==v?v:[]).indexOf(e.id);f>-1&&(m=f)}}var b=Zu(Ru({data:e,parentId:(null==e?void 0:e.parent)||c.id,childIds:(null==e?void 0:e.children)||[],title:e.settings.admin_label||e.title||e.name,icon:null!==(r=e.icon)&&void 0!==r?r:null===(l=addonsJSON[e.name])||void 0===l?void 0:l.icon,indexes:Ru({sectionIndex:n,columnIndex:a,addonIndex:s,collectionItemAddonIndex:t},at(m)&&{childIndex:m}),level:y.level+2,type:"addon"},at(e.children)&&{isCollapsed:null!==(d=null===(u=i[e.id])||void 0===
u?void 0:u.isCollapsed)&&void 0!==d?d:y.isCollapsed}));o[e.id]=b})}else{var _,w,x,I,O=Zu(Ru({data:c,parentId:(null==c?void 0:c.parent)||e.id,childIds:(null==c?void 0:c.children)||[],title:c.settings.admin_label||c.title||c.name,icon:null!==(_=c.icon)&&void 0!==_?_:null===(w=addonsJSON[c.name])||void 0===w?void 0:w.icon,indexes:{sectionIndex:n,columnIndex:a,addonIndex:s},level:r.level+2,type:"addon"},(at(c.children)||["accordion","tab"].includes(c.name))&&{isCollapsed:null!==(x=null===(I=i[c.id])||
void 0===I?void 0:I.isCollapsed)&&void 0!==x?x:d.isCollapsed}));null!=c&&c.parent||d.childIds.push(c.id),o[c.id]=O,["accordion","tab"].includes(c.name)&&c.settings["jp_".concat(c.name,"_item")].flatMap(function(e){return e.content}).filter(fe()).forEach(function(d){var u=t.findIndex(function(t){var n=t.id,o=t.parent;return n===d.id&&(null==o?void 0:o.rowId)===l.id&&o.columnId===e.id});if(-1!==u){var m,p,v=t[u],f=Zu({data:v,parentId:c.id,title:v.settings.admin_label||Joomla.JText._("COM_JPAGEBUILDER_ROW"),
type:"deep_addon_row",indexes:{sectionIndex:n,columnIndex:a,addonIndex:s,deepAddonRowIndex:u},isCollapsed:null!==(m=null===(p=i[v.id])||void 0===p?void 0:p.isCollapsed)&&void 0!==m?m:O.isCollapsed,level:r.level+2});O.childIds.push(v.id),o[v.id]=f,Mu({sections:t,sectionIndex:u,nodes:o,parentNode:f,previousTree:i})}})}})})}function Zu(e){var t=e.data,n=e.title,o=e.icon,r=e.isCollapsed,a=e.level,i=e.indexes,l=e.type,c=e.parentId,s=void 0===c?0:c,d=e.childIds,u=void 0===d?[]:d;return Ru(Ru(Ru({id:t.id,
parentId:s,childIds:u,name:t.name,type:l,title:n,level:a,visibility:t.visibility},i),at(o)&&{icon:o}),at(r)&&{isCollapsed:r})}function ju(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Bu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ju(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ju(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ju=function(e){var t=e.layer,n=t.type,o=t.isCollapsed;return F.createElement("div",{className:"builder-list-tree-item-icon"},"addon"===n&&F.createElement("span",{className:Kl()("builder-addon-icon builder-icon",{"builder-ms-3":void 0===o}),dangerouslySetInnerHTML:{__html:t.icon}}),"column"===n&&F.createElement(co,{name:"columnsAlt"}),
Object.values(Tu).includes(n)&&F.createElement(co,{name:"rowsAlt"}))};const Gu=function(e){var t=e.layer,n=e.parentVisibility,o=e.enableEditTitle,r=e.handleEnableEditing,a=e.handleDisableEditing,i=t.name,l=t.title,c=t.visibility,s=(0,F.useState)(null!=l?l:i),d=(0,j.Z)(s,2),u=d[0],m=d[1],p=(0,Xn.I0)();return F.createElement("button",{onDoubleClick:r,className:Hu.layerTitleContent({visibility:c,parentVisibility:n})},o?F.createElement("input",{autoFocus:!0,className:"builder-form-field",type:"text",
value:u,onChange:function(e){var t=e.target.value;m(t)},onBlur:function(){p(el(Bu(Bu({},t),{},{title:u}))),a()},onKeyDown:function(e){"Enter"===e.key&&(p(el(Bu(Bu({},t),{},{title:u}))),a()),"Escape"===e.key&&a()}}):F.createElement(F.Fragment,null,F.createElement(Ju,{layer:t}),F.createElement("div",{className:"builder-list-tree-item-title",title:null!=l?l:i},null!=l?l:i)))};var Hu={layerTitleContent:function(e){var t=e.visibility,n=e.parentVisibility;return Kl()("builder-reset-button builder-cursor-auto builder-d-flex",
{"builder-opacity-5":!t||!n})}};const Uu=function(e){var t,n,o,r,a=e.layer,i=e.closeOptions,l=e.handleEnableEditing,c=a.sectionIndex,s=a.columnIndex,d=a.addonIndex,u=a.collectionItemAddonIndex,m=(0,Xn.I0)(),p=(0,Xn.v9)(function(e){return e.pageBuilder.present}),v=null!==(t=null===(n=p[c])||void 0===n||null===(n=n.columns)||void 0===n||null===(n=n[s])||void 0===n||null===(n=n.addons)||void 0===n?void 0:n[d])&&void 0!==t?t:{},f=null!==(o=null==v||null===(r=v.items)||void 0===r||null===(r=r[0])||void 0===
r?void 0:r[u])&&void 0!==o?o:{};return F.createElement(F.Fragment,null,F.createElement(em,{onClick:function(){var e=p[c],t=e.id,n=e.columns[s].id;m(Li({rowId:t,columnId:n,addonIndex:d,collectionItemAddonIndex:u})),i()},icon:"trash"},Joomla.JText._("COM_JPAGEBUILDER_DELETE_CANVAS")),F.createElement(em,{onClick:function(e){e.stopPropagation(),l(),i()},icon:"pencil"},Joomla.JText._("COM_JPAGEBUILDER_RENAME_CANVAS")),F.createElement(em,{onClick:function(e){e.stopPropagation(),wr.resetAll();var t={type:"addon",
index:c,settings:{colIndex:s,addonIndex:d,addonId:f.id,assets:f.assets,addonName:f.name,formData:f.settings,collectionItemIndex:0,collectionItemAddonIndex:a.collectionItemAddonIndex}};wr.setAddon(t),wr.setType("addon"),i(),wr.showEditPanel()},icon:"cog"},Joomla.JText._("COM_JPAGEBUILDER_SETTINGS_CANVAS")))};function zu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),
n.push.apply(n,o)}return n}function Fu(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zu(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zu(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Vu=function(e){var t,n,o=e.layer,r=e.closeOptions,a=e.handleEnableEditing,i=o.sectionIndex,l=o.columnIndex,c=o.addonIndex,
s=o.childIndex,d=void 0===s?-1:s,u=o.parentId,m=(0,Xn.I0)(),p=(0,F.useState)(""),v=(0,j.Z)(p,2),f=v[0],b=v[1],g=Su().closeLayersPanel,E=(0,Xn.v9)(function(e){return e.pageBuilder.present}),y=(0,Xn.v9)(function(e){return e.copiedData}),_=null!==(t=null===(n=E[i])||void 0===n||null===(n=n.columns)||void 0===n||null===(n=n[l])||void 0===n||null===(n=n.addons)||void 0===n?void 0:n[c])&&void 0!==t?t:{};(0,F.useEffect)(function(){if(y.isCopiedAddonAvailable){var e=Zt(h);null!=e&&e.addonName?b(e.addonName):
b("")}else b("")},[y.isCopiedAddonAvailable]);var w=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Fu(Fu({},Zt(h)),{},{sections:E,rowIndex:i,colIndex:l,addonIndex:c,childIndex:d,parentId:u,isAbove:e});m(Ji({rowIndex:i,pasteOptions:t})),r()};return F.createElement(F.Fragment,null,F.createElement(em,{onClick:function(e){e.stopPropagation(),vo.reset();var t=Tt({sections:E,addon:K()(_),rowIndex:i,colIndex:l});vo.setAddon(t),vo.setDialog("saveAddon"),vo.showDialog(),g()},icon:"saveLine",
pro:!0},F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_SAVE"))),F.createElement(em,{onClick:function(){m(Bi({addon:_,rowIndex:i,colIndex:l,addonIndex:c})),r()},icon:"cloneLine"},Joomla.JText._("COM_JPAGEBUILDER_DUPLICATE_CANVAS")),F.createElement(em,{onClick:function(){var e=Tt({sections:E,addon:_,rowIndex:i,colIndex:l});jt(h,{addonName:_.name,addonData:e}),m({type:"SET_COPIED_DATA_STATUS"}),ne(Joomla.JText._("COM_JPAGEBUILDER_ADDON_COPIED"),"Success"),r()},icon:"copy"},Joomla.JText._("COM_JPAGEBUILDER_COPY")),
F.createElement(em,{onClick:function(){return w(!0)},icon:"clipboardAbove",disabled:!f},F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_PASTE_ABOVE")),F.createElement("small",null,f?"(".concat(f.split("_").join(" "),")"):"")),F.createElement(em,{onClick:function(){return w(!1)},icon:"clipboardBelow",disabled:!f},F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_PASTE_BELOW")),F.createElement("small",null,f?"(".concat(f.split("_").join(" "),")"):"")),F.createElement(em,{onClick:function(){var e=
E[i],t=e.id,n=e.columns[l].id;m(Ti(t,n,_.id)),r()},icon:"trash"},Joomla.JText._("COM_JPAGEBUILDER_DELETE_CANVAS")),F.createElement(em,{onClick:function(e){e.stopPropagation(),a(),r()},icon:"pencil"},Joomla.JText._("COM_JPAGEBUILDER_RENAME_CANVAS")),F.createElement(em,{onClick:function(e){e.stopPropagation(),wr.resetAll();var t={type:"addon",index:i,settings:{colIndex:l,addonIndex:c,addonId:_.id,htmlContent:_.htmlContent,assets:_.assets,addonName:_.name,formData:_.settings}};wr.setAddon(t),wr.setType("addon"),
r(),wr.showEditPanel()},icon:"cog"},Joomla.JText._("COM_JPAGEBUILDER_SETTINGS_CANVAS")))},Wu=function(e){var t,n,o=e.layer,r=e.closeOptions,a=e.handleEnableEditing,i=o.sectionIndex,l=o.columnIndex,c=(0,Xn.I0)(),s=(0,Xn.v9)(function(e){return e.pageBuilder.present}),d=null!==(t=null===(n=s[i])||void 0===n||null===(n=n.columns)||void 0===n?void 0:n[l])&&void 0!==t?t:{};return F.createElement(F.Fragment,null,F.createElement(em,{onClick:function(){var e=s[i].id,t=s[i].columns[l].id;c(ji(e,t)),r()},icon:"cloneLine"},
Joomla.JText._("COM_JPAGEBUILDER_DUPLICATE_CANVAS")),F.createElement(em,{onClick:function(){var e=s[i].id,t=s[i].columns[l].id;c(Ri(e,t)),r()},icon:"trash"},Joomla.JText._("COM_JPAGEBUILDER_DELETE_CANVAS")),F.createElement(em,{onClick:function(e){e.stopPropagation(),a(),r()},icon:"pencil"},Joomla.JText._("COM_JPAGEBUILDER_RENAME_CANVAS")),F.createElement(em,{onClick:function(e){e.stopPropagation(),wr.resetAll(),wr.setType("column"),wr.setRowIndex(i),wr.setColIndex(l),wr.setColSettings(d),r(),wr.showEditPanel()},
icon:"cog"},Joomla.JText._("COM_JPAGEBUILDER_SETTINGS_CANVAS")))};var Ku,Yu,Xu=Object.freeze({save:"save",duplicate:"duplicate",copy:"copy",paste:"paste",editRow:"editRow",delete:"delete",rename:"rename",settings:"settings"}),qu=(Ku={},(0,B.Z)(Ku,"section",Object.values(Xu)),(0,B.Z)(Ku,"nested_row",Object.values(Xu)),(0,B.Z)(Ku,"deep_addon_row",[Xu.editRow,Xu.rename,Xu.settings]),Ku),$u=(Yu={},(0,B.Z)(Yu,Xu.save,function(e){var t=e.handleSave;return F.createElement(em,{onClick:t,icon:"saveLine",pro:!0},
F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_SAVE")))}),(0,B.Z)(Yu,Xu.duplicate,function(e){var t=e.handleDuplicate;return F.createElement(em,{onClick:t,icon:"cloneLine"},Joomla.JText._("COM_JPAGEBUILDER_DUPLICATE_CANVAS"))}),(0,B.Z)(Yu,Xu.copy,function(e){var t=e.handleCopy;return F.createElement(em,{onClick:t,icon:"copy"},Joomla.JText._("COM_JPAGEBUILDER_COPY"))}),(0,B.Z)(Yu,Xu.paste,function(e){var t=e.handlePaste,n=e.hasCopiedSection,o=e.isNestedRow;return F.createElement(em,{onClick:t,
icon:"clipboard",disabled:!n},F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_PASTE")),F.createElement("small",null," ",n?o?"(row)":"(section)":""))}),(0,B.Z)(Yu,Xu.editRow,function(e){var t=e.handleClickEditRow,n=e.isNestedRow;return F.createElement(em,{onClick:t,icon:"verticalBars"},n?Joomla.JText._("COM_JPAGEBUILDER_EDIT_ROW"):Joomla.JText._("COM_JPAGEBUILDER_EDIT_SECTION"))}),(0,B.Z)(Yu,Xu.delete,function(e){var t=e.handleDelete;return F.createElement(em,{onClick:t,icon:"trash"},
Joomla.JText._("COM_JPAGEBUILDER_DELETE_CANVAS"))}),(0,B.Z)(Yu,Xu.rename,function(e){var t=e.handleRename;return F.createElement(em,{onClick:t,icon:"pencil"},Joomla.JText._("COM_JPAGEBUILDER_RENAME_CANVAS"))}),(0,B.Z)(Yu,Xu.settings,function(e){var t=e.handleSettings;return F.createElement(em,{onClick:t,icon:"cog"},Joomla.JText._("COM_JPAGEBUILDER_SETTINGS_CANVAS"))}),Yu);const Qu=function(e){var t,n=e.layer,o=e.closeOptions,r=e.handleEnableEditing,a=(0,Xn.I0)(),i=(0,F.useState)(!1),l=(0,j.Z)(i,2),
c=l[0],s=l[1],d=Su().closeLayersPanel,u=wd().setEditRow,m=(0,Xn.v9)(function(e){return e.pageBuilder.present}),p=(0,Xn.v9)(function(e){return e.copiedData}),v=n.sectionIndex,f=null!==(t=m[v])&&void 0!==t?t:{};(0,F.useEffect)(function(){if(p.isCopiedSectionAvailable){var e=Lt(g);e&&Array.isArray(e)&&e.length&&s(!0)}else s(!1)},[p.isCopiedSectionAvailable]);var b={isNestedRow:"nested_row"===n.type,hasCopiedSection:c,handleSave:function(e){if(e.stopPropagation(),vo.reset(),"nested_row"===n.type){var t=
n.nestedRowIndex,o=m[t];if(at(o)){var r=kt(m,K()(o));vo.setSection(r)}}else{var a=kt(m,K()(f));vo.setSection(a)}vo.setDialog("saveSection"),vo.showDialog(),d()},handleDuplicate:function(){if("nested_row"===n.type){var e,t=n.addonIndex,r=n.columnIndex,i=n.nestedRowIndex,l=null!==(e=m[i])&&void 0!==e?e:{};if(at(l)){var c={rowId:l.id,parentRow:{id:f.id,colIndex:r,addonIndex:t},type:"nested_row"};a(Mi(c))}}else a(Mi({rowId:f.id}));o()},handleCopy:function(){if("nested_row"===n.type){var e=n.nestedRowIndex,
t=m[e];if(at(t)){var r=kt(m,t);Mt(g,r),a({type:"SET_COPIED_DATA_STATUS"})}}else{var i=kt(m,f);Mt(g,i),a({type:"SET_COPIED_DATA_STATUS"})}ne(Joomla.JText._("COM_JPAGEBUILDER_ROW_COPIED"),"Success"),o()},handlePaste:function(){var e=Lt(g);if("nested_row"===n.type){var t,r=n.addonIndex,i=n.columnIndex,l=n.nestedRowIndex,c=null!==(t=m[l])&&void 0!==t?t:{};at(c)&&a(Hi({sectionIndex:v,columnIndex:i,addonIndex:r,nestedSectionIndex:l,sectionData:e,replace:!0}))}else a(Gi(v,e));o()},handleClickEditRow:function(e){if(e.stopPropagation(),
"nested_row"===n.type){var t=n.nestedRowIndex,o=m[t];at(o)&&u({open:!0,rowId:o.id,rowIndex:t,targetElm:e.currentTarget,layout:o.layout})}else if("deep_addon_row"===n.type){var r=n.deepAddonRowIndex,a=m[r];at(a)&&u({open:!0,rowId:a.id,rowIndex:r,targetElm:e.currentTarget,layout:a.layout})}else u({open:!0,rowId:f.id,rowIndex:v,targetElm:e.currentTarget,layout:f.layout});d()},handleDelete:function(){if("nested_row"===n.type){var e=n.nestedRowIndex,t=m[e];if(at(t)){var r,i=null!==(r=null==t?void 0:t.parent)&&
void 0!==r?r:{},l=i.rowId,c=i.columnId;a(Ti(l,c,t.id))}}else a(ki(f.id));o()},handleRename:function(e){e.stopPropagation(),r(),o()},handleSettings:function(e){if(e.stopPropagation(),wr.resetAll(),wr.setType("row"),"nested_row"===n.type){var t=n.nestedRowIndex,r=m[t];at(r)&&(wr.setRowIndex(t),wr.setRowSettings(r))}else if("deep_addon_row"===n.type){var a=n.deepAddonRowIndex,i=m[a];at(i)&&(wr.setRowIndex(a),wr.setRowSettings(i))}else wr.setRowIndex(v),wr.setRowSettings(f);o(),wr.showEditPanel()}};return(qu[n.type]||
[]).map(function(e,t){var n=$u[e];return n?F.createElement(n,(0,ao.Z)({key:t},b)):null})};var em=function(e){var t=e.onClick,n=e.icon,o=e.disabled,r=void 0!==o&&o,a=e.children,i=e.pro,l=void 0!==i&&i,c=l&&Qe===l,s=r||c,d=c?et:void 0;return F.createElement("div",{onClick:s?d:t,className:nm.optionItem(s),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:n,className:"builder-list-icon"}),a,c&&F.createElement("div",{className:"builder-ps-3"},F.createElement(Td,{size:"sm"})))};const tm=function(e){var t=
e.layer;return Object.values(Tu).includes(t.type)?F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown"},F.createElement(Qu,e)):"column"===t.type?F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown"},F.createElement(Wu,e)):"addon"===t.type&&Ee(t.collectionItemAddonIndex)?F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown"},F.createElement(Uu,e)):"addon"===t.type?F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown"},
F.createElement(Vu,e)):null};var nm={optionItem:function(e){return Kl()("builder-list-item builder-list-item-action",{disabled:e})}},om=F.forwardRef(function(e,t){var n=e.layers,o=e.layer,r=e.toggleCollapse,a=e.parentVisibility,i=(0,F.useRef)(null),l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(!1),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,Xn.I0)(),b=function(){return d(!1)},h=function(){return v(!0)},g=function(e){return function(){var t,n,r=(n=o.id,{section:"section-id-".concat(n),nested_row:"section-id-".concat(n),
column:"column-wrap-id-".concat(n),addon:"addon-wrap-".concat(n),child_addon:"addon-wrap-".concat(n)})[o.type];if(r){var a=null===(t=window.iDocument)||void 0===t?void 0:t.getElementById(r);if(a){"click"===e&&a.scrollIntoView({block:"center"});for(var i="hover"===e?"builder-element-hovered":"builder-element-selected",l=window.iDocument.querySelectorAll(".".concat(i)),c=0;c<l.length;c++)l[c].classList.remove(i);a.classList.contains(i)||a.classList.add(i)}}}};return F.createElement(F.Fragment,null,
F.createElement("div",{className:"builder-list-tree-item-content",onMouseEnter:g("hover"),onMouseLeave:function(e){e.stopPropagation(),Ue(window.iDocument,".builder-element-hovered"),Ue(window.iDocument,".builder-element-selected")}},F.createElement(rm,{ref:t,layer:o,layers:n}),F.createElement(am,{isCollapsed:o.isCollapsed,onClick:r(o.id)}),F.createElement("div",{className:"builder-w-100",onClick:g("click"),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(Gu,{layer:o,parentVisibility:a,enableEditTitle:p,
handleEnableEditing:h,handleDisableEditing:function(){return v(!1)}}))),F.createElement("div",{ref:i,className:lm.treeItemAction(s)},F.createElement("div",{className:"builder-list-tree-item-action builder-ms-auto",onClick:function(e){var t;e.stopPropagation();var n=o.sectionIndex,r=o.columnIndex,a=o.addonIndex,i=o.nestedRowIndex,l=o.deepAddonRowIndex,c=o.collectionItemAddonIndex,s={type:o.type,rowIndex:null!==(t=null!=i?i:l)&&void 0!==t?t:n,columnIndex:r,addonIndex:a,collectionItemAddonIndex:c};f(tl(s))},
role:"button",onKeyDown:ye,tabIndex:0},F.createElement("div",{style:lm.eyePro},F.createElement("span",{className:lm.visibilityBtn},F.createElement(co,{name:o.visibility?"eye":"eyeSlash"})),Qe)),F.createElement("span",{className:"builder-button builder-button-light builder-button-round builder-my-n3 builder-me-n2",onClick:function(e){e.stopPropagation(),d(!s)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"ellipsisY"})),F.createElement(Ei,{open:s,parent_el:i,onHide:b,position:{bottom:!0,
center:!0},scroll_target:document.getElementById("builder-layers-panel-modal-body")},F.createElement("div",{className:"builder-backdrop builder-backdrop-color",onClick:b,role:"button",onKeyDown:ye,tabIndex:0}),F.createElement(tm,{layer:o,closeOptions:b,handleEnableEditing:h}))))}),rm=F.forwardRef(function(e,t){var n,o=e.layer,r=e.layers;return o.type===Tu.nested_row||o.type===Tu.deep_addon_row||(null===(n=r[o.parentId])||void 0===n?void 0:n.type)===Tu.deep_addon_row?null:F.createElement("div",{ref:t,
className:"builder-list-tree-item-sort"},F.createElement(co,{name:"ellipsisDoubleY"}))}),am=function(e){var t=e.isCollapsed,n=e.onClick;return void 0===t?null:F.createElement("div",{onClick:n,className:"builder-list-tree-item-toggler builder-me-2",role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:t?"caretRight":"caretDown"}))};const im=om;var lm={treeItemAction:function(e){return Kl()("builder-list-tree-item-action",{"builder-list-tree-item-action-active":e})},visibilityBtn:Kl()("builder-button builder-button-light builder-button-round builder-my-n3",
{disabled:Qe}),eyePro:{position:"relative"}},cm=n(3493),sm=n.n(cm);const dm=function(e){var t,n,o,r=e.handleRef,a=e.parentRef,i=e.dragAddon,l=e.TYPE,c=e.onSort,s=(0,F.useState)(!0),d=(0,j.Z)(s,2),u=d[0],m=d[1],p=(t=function(e,t){x(e,t)},n=300,o=(0,F.useRef)(t),(0,F.useEffect)(function(){o.current=t}),(0,F.useCallback)(sm()(function(){return o.current.apply(o,arguments)},n,{leading:!0,trailing:!1}),[n])),v=(0,qn.L)({accept:l,collect:function(e){return{isOver:e.isOver({shallow:!0})}},hover:function(e,
t){p(e,t)}}),f=(0,j.Z)(v,2),b=f[0].isOver,h=f[1],g=(0,su.c)({item:{type:l,dragAddon:i,dragRef:a},collect:function(e){return{isDragging:e.isDragging()}},end:function(e,t){t.didDrop()&&I(e)&&c(e)}}),E=(0,j.Z)(g,3),y=E[0].isDragging,_=E[1],w=E[2],x=function(e){e.dragAddon.id!==i.id&&(e.hoverAddon=i,I(e))},I=function(e){var t=e.dragAddon,n=e.hoverAddon;if(!n)return!1;var o=!1;return!Ee(t.collectionItemAddonIndex)&&!Ee(n.collectionItemAddonIndex)||t.sectionIndex===n.sectionIndex&&t.columnIndex===n.columnIndex&&
t.addonIndex===n.addonIndex?(t.type===n.type||"addon"===t.type&&"empty"===n.type||"addon"===t.type&&"nested_row"===n.type||"addon"===t.type&&"child_addon"===n.type||"nested_row"===t.type&&"section"===n.type||"nested_row"===t.type&&"addon"===n.type||"child_addon"===t.type&&"empty"===n.type||"child_addon"===t.type&&"addon"===n.type||"child_addon"===t.type&&"nested_row"===n.type)&&(o=!0):o=!1,m(o),o};return _(r),h(a),w(a),{isDragging:y,isOver:b,isValidDropTarget:u}};function um(e,t){var n=Object.keys(e);
if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function mm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?um(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):um(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,
t))})}return e}var pm=function(e){var t=e.id,n=e.layers,o=e.layer,r=void 0===o?n[t]||{}:o,a=e.childIndex,i=e.toggleCollapse,l=e.expandByLayerId,c=e.isVisible,s=void 0===c||c,d=e.parentVisibility,u=void 0===d||d,m=(0,F.useRef)(null),p=(0,F.useRef)(null),v=Su().addonHoverId,f=(0,Xn.v9)(function(e){return e.pageBuilder}),b=(0,Xn.I0)(),h=r.childIds,g=r.isCollapsed,E=dm({handleRef:m,parentRef:p,dragAddon:r,TYPE:"LAYERS_PANEL_SORTABLE",onSort:function(e){var t,n=r.type,o=f.present,a=e.dragAddon,i=e.hoverAddon,
l=i.sectionIndex,c=i.columnIndex,s=i.addonIndex,d=a.sectionIndex,u=a.columnIndex,m=a.addonIndex;if("section"===n)b({type:"MOVE_SECTION_ITEMS",payload:{dragSectionIdx:(t={dragSectionIdx:d,hoverSectionIdx:l}).dragSectionIdx,hoverSectionIdx:t.hoverSectionIdx}});else if("column"===n)b(Qi({dragSectionIdx:d,dragColIdx:u,hoverSectionIdx:l,hoverColIdx:c}));else if("addon"===n&&Ee(a.collectionItemAddonIndex)){var p,v;if(l!==d||c!==u||s!==m)return;var h=c===u&&s-m>=0?"bottom":"top",g=o[l].id,E=null===(p=o[l])||
void 0===p||null===(p=p.columns)||void 0===p||null===(p=p[c])||void 0===p?void 0:p.id,y=null===(v=o[l])||void 0===v||null===(v=v.columns)||void 0===v||null===(v=v[c])||void 0===v||null===(v=v.addons)||void 0===v?void 0:v[s];if(!Ee(y))return;var _={dragRowId:g,dragColumnId:E,collectionAddonId:y.id,collectionItemIndex:0,collectionItemAddonIndex:a.collectionItemAddonIndex,childIndex:a.childIndex},w={hoverRowId:g,hoverColumnId:E,collectionItemAddonIndex:i.collectionItemAddonIndex,collectionItemIndex:0,
childIndex:i.childIndex,position:h};b(qi(_,w))}else if(["addon","child_addon","nested_row"].includes(n)){var x,I;if(!Ee(a.collectionItemAddonIndex)&&Ee(i.collectionItemAddonIndex))return;var O=c===u&&s-m>=0?"bottom":"top",C=null===(x=o[l])||void 0===x||null===(x=x.columns)||void 0===x||null===(x=x[c])||void 0===x||null===(x=x.addons)||void 0===x||null===(x=x[s])||void 0===x?void 0:x.id,A=null===(I=o[d])||void 0===I||null===(I=I.columns)||void 0===I||null===(I=I[u])||void 0===I||null===(I=I.addons)||
void 0===I||null===(I=I[m])||void 0===I?void 0:I.id,N={dragRowId:o[d].id,dragColumnId:o[d].columns[u].id,dragAddonId:A},D={hoverRowId:o[l].id,hoverColumnId:o[l].columns[c].id,hoverAddonId:C,position:O};b(function(e,t){return{type:"MOVE_LAYER_ADDON",payload:{dragInfo:e,hoverInfo:t}}}(N,D))}ko.hideEditor()}}),y=E.isDragging,_=E.isOver,w=E.isValidDropTarget;return(0,F.useEffect)(function(){y&&!r.isCollapsed&&i(r.id,!0)()},[y]),(0,F.useEffect)(function(){var e;void 0!==t&&v===t&&l&&(l(t),null===(e=p.current)||
void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"}))},[v,t]),F.createElement("div",{style:r.level>1?{display:s?"block":"none",marginLeft:"16px"}:void 0},F.createElement("div",{ref:p,className:hm.treeItem({isDragging:y,isOver:_,isValidDropTarget:w,isActive:v===t})},"empty"===r.type?F.createElement(fm,null):F.createElement(im,{ref:m,layers:n,layer:mm(mm({},r),{},{childIndex:a}),toggleCollapse:i,parentVisibility:u})),F.createElement(vm,{layers:n,childIds:h,toggleCollapse:i,expandByLayerId:l,
parentLayer:r,isCollapsed:g,parentVisibility:u&&r.visibility}))},vm=function(e){var t=e.layers,n=e.childIds,o=e.toggleCollapse,r=e.expandByLayerId,a=e.isCollapsed,i=e.parentLayer,l=e.parentVisibility;if(void 0!==a&&!n.length){var c=i.sectionIndex,s=i.columnIndex,d=i.addonIndex,u={type:"empty",level:i.level+1,sectionIndex:c,columnIndex:s,addonIndex:d};return F.createElement(pm,{layer:u,isVisible:!a})}return n&&n.length?F.createElement(F.Fragment,null,n.map(function(e,n){return F.createElement(pm,{key:e,
id:e,layers:t,childIndex:"div"===(null==i?void 0:i.name)?n:-1,toggleCollapse:o,expandByLayerId:r,isVisible:!a,parentVisibility:l})})):null},fm=function(){return F.createElement("div",{className:"builder-d-flex builder-opacity-5"},F.createElement("div",{className:"builder-list-tree-item-icon builder-ms-3"},F.createElement(co,{name:"canvas"})),F.createElement("div",{className:"builder-list-tree-item-title"},"Empty"))};const bm=function(e){var t=e.layers,n=e.toggleCollapse,o=e.expandByLayerId,r=(t[0]||
{}).childIds||[];return F.createElement(F.Fragment,null,r.map(function(e){return F.createElement(pm,{key:e,id:e,layers:t,toggleCollapse:n,expandByLayerId:o})}))};var hm={treeItem:function(e){var t=e.isDragging,n=e.isOver,o=e.isValidDropTarget,r=e.isActive,a=e.isEmpty,i=void 0!==a&&a;return Kl()("builder-list-tree-item",{"builder-d-between":!i,"builder-list-tree-item-dragging":t,"builder-list-tree-item-over":n,"builder-list-tree-item-not-accept":n&&!o,active:r})}};function gm(e,t){var n=Object.keys(e);
if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Em(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gm(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,
t))})}return e}var ym=function(){var e=(0,Xn.v9)(function(e){return e.pageBuilder.present}),t=wd(),n=t.layers,o=t.setLayers,r=(0,F.useState)(!0),a=(0,j.Z)(r,2),i=a[0],l=a[1];(0,F.useEffect)(function(){var e,t=!(null===(e=n[0])||void 0===e||!e.childIds.find(function(e){return!1===n[e].isCollapsed}));l(!t)},[n]);var c=function e(t,n){n&&n.id&&(void 0!==n.isCollapsed&&(n.isCollapsed=!1),at(t[n.parentId])&&e(t,n.parentId?t[n.parentId]:void 0))};return F.createElement("div",{className:"builder-layer-body",
id:"builder-layers-panel-modal-body"},F.createElement("div",{className:"builder-layers"},F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between builder-mb-2 builder-list-tree-item"},F.createElement("div",{className:"builder-d-flex builder-justify-content-center builder-align-items-center"},F.createElement(co,{name:"canvas"}),F.createElement("span",{className:"builder-ms-2"},F.createElement("span",{className:"builder-fs-2"}," ",Joomla.JText._("COM_JPAGEBUILDER_CANVAS"),
" "))),(null==e?void 0:e.length)>0&&F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-light builder-button-round",onClick:function(){var t,n;l(!i),i?(n=Lu({sections:e}),o(n)):(t=Lu({sections:e,isCollapsed:!0}),o(t))},onKeyDown:function(){},tabIndex:-1,role:"button"},i?F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_LAYERS_PANEL_EXPAND_ALL"),tagName:"span"},F.createElement(co,{name:"expandAll"})):F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_LAYERS_PANEL_COLLAPSE_ALL"),
tagName:"span"},F.createElement(co,{name:"collapseAll"}))))),F.createElement("div",{className:"builder-list-tree"},F.createElement(bm,{layers:n,toggleCollapse:function(e,t){return function(){o(function(n){var o=n[e];return o&&at(o.isCollapsed)?Em(Em({},n),{},(0,B.Z)({},e,Em(Em({},o),{},{isCollapsed:null!=t?t:!o.isCollapsed}))):n})}},expandByLayerId:function(e){o(function(t){return(0,Vt.ZP)(t,function(t){at(t[e])&&c(t,t[e])})})}}))))},_m=function(e){var t=e.onClose,n=e.id;return F.createElement("div",
{id:n,className:"builder-modal-header"},F.createElement("div",{className:"builder-layer-drag-handler"},F.createElement(co,{className:"builder-drag-button",name:"ellipsisDoubleY"}),F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_LAYERS"))),F.createElement("span",{className:"builder-close-button",onClick:function(e){e.preventDefault(),t(),document.body.classList.remove("builder-panel-opened")},tabIndex:-1,onKeyDown:function(){},"aria-label":"Close",
role:"button"},F.createElement(co,{name:"times"})))};const wm=function(e){var t=e.onClose,n=e.importPage,o=e.pageCssHandler,r=e.currentPanel,a=(0,F.useState)(null),i=(0,j.Z)(a,2),l=i[0],c=i[1],s=(0,F.useRef)(0);(0,F.useEffect)(function(){return Nu.on("onAddonHover",d),function(){Nu.removeListener("onAddonHover",d),c(null)}},[]),(0,F.useEffect)(function(){var e=!1,t=0,n=document.querySelector(".builder-layer-body"),o=0,r=document.getElementById("jpagebuilder-view"),a=document.querySelector(".builder-layer-resize"),
i=localStorage.getItem("layerHeight"),l=i?Number(i):0;l&&(n.style.maxHeight="".concat(l,"px")),window.addEventListener("mousedown",function(i){e=a.isEqualNode(i.target)||a.contains(i.target),t=i.clientY,o=n.clientHeight,document.body.style.userSelect="none",e&&(r.style.pointerEvents="none")}),window.addEventListener("mousemove",function(r){if(e&&n){var a=r.clientY-t,i=window.innerHeight-200,l=Math.min(i,Math.max(180,o+a));n.style.maxHeight="".concat(l,"px"),s.current=l,r.stopPropagation()}}),window.addEventListener("mouseup",
function(){e&&localStorage.setItem("layerHeight",s.current),e=!1,document.body.style.userSelect="auto",r.style.pointerEvents="auto"})},[]);var d=function(){var e=Nu.addonHoverId;c(e)},u={addonHoverId:l,closeLayersPanel:t};return F.createElement(Pu.Provider,{value:u},F.createElement("div",{className:"builder-layer builder-layer-sidebar",id:"builder-layer-panel"},F.createElement("div",{className:"builder-modal-dialog builder-modal-dialog-scrollable"},F.createElement(Cu,{handle:"#builder-layer-header",
currentPanel:r},F.createElement("div",{className:"builder-layer-content"},F.createElement(_m,{id:"builder-layer-header",onClose:t}),F.createElement(ym,{importPage:n,pageCssHandler:o}),F.createElement("div",{className:"builder-layer-resize"},F.createElement(co,{name:"ellipsisX"})))))))},xm=function(e){var t=e.value,n=e.label,o=e.onChange,r=e.classes,a=e.checked,i=e.disabled,l=void 0!==i&&i,c=e.id,s=void 0===c?qe():c;return F.createElement("label",{htmlFor:s,className:"".concat(r||""," builder-form-checkbox")},
F.createElement("input",{id:s,type:"checkbox",value:Ie(t)?String(t):void 0,checked:a,disabled:l,onChange:function(e){o&&o(e.target.checked,e)},className:"builder-form-checkbox-input ".concat(n?"builder-form-checkbox-input-has-label":"")}),F.createElement("span",null),n)},Im=function(e){var t=e.title,n=e.open,o=e.onOpen,r=e.exportPage,a=(0,F.useState)(!1),i=(0,j.Z)(a,2),l=i[0],c=i[1];return F.createElement(Aa,{isOpen:n,onClose:function(){return o(!1)},cssClass:"builder-modal-dialog-centered"},F.createElement(Ia,
null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return o(!1)}},F.createElement("span",{className:"builder-modal-header-title"},t||Joomla.JText._("COM_JPAGEBUILDER_EXPORT_PAGE"))),F.createElement(Oa,{className:"builder-modal-export-body builder-fs-2"},Joomla.JText._("COM_JPAGEBUILDER_EXPORT_MESSAGE"),F.createElement("div",null,F.createElement(xm,{value:l,label:Joomla.JText._("COM_JPAGEBUILDER_EXPORT_LABEL_SEO_DATA"),onChange:c,checked:l,classes:"builder-export-checkbox-label"}))),
F.createElement(Ca,null,F.createElement("div",{className:"builder-d-flex justify-content-end"},F.createElement("button",{type:"button",onClick:function(){return o(!1)},className:"builder-button builder-button-primary"},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")),F.createElement("button",{type:"button",className:"builder-button builder-button-primary builder-ms-2",onClick:function(){o(!1),r(l)}},Joomla.JText._("COM_JPAGEBUILDER_EXPORT_CONFIRMATION"))))))};var Om="".concat(pagebuilder_base,
"components/com_jpagebuilder/assets/images/"),Nm=function(e){var t=e.handleClose,n=e.updateStep;return F.createElement(F.Fragment,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:t},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_TITLE_1"))),F.createElement(Oa,null,F.createElement("div",{className:"builder-json-validation-wrapper"},F.createElement("div",{className:"builder-text-content"},F.createElement("h4",
null,Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_HEADING_1")),F.createElement("div",{className:"builder-instructions"},F.createElement("div",null,Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_WHAT_HAPPENED")),F.createElement("div",null,Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_RECOMMEND")))))),F.createElement("div",{className:"builder-modal-footer builder-modal-footer-white"},F.createElement("button",{className:"builder-button builder-button-primary",onClick:t},Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_CANCEL")),
F.createElement("button",{className:"builder-button builder-button-primary",onClick:function(){return n("second")}},Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_FIX_JSON"))))},Dm=function(e){var t=e.updateStep,n=(0,Xn.I0)();return(0,F.useEffect)(function(){n({type:"VALIDATE_OLD_PAGE_CONTENT"});var e=setTimeout(function(){t("third")},6E3);return function(){clearTimeout(e)}},[t]),F.createElement(Oa,null,F.createElement("div",{className:"builder-json-validation-wrapper"},F.createElement("div",{className:"builder-fixing-icon"},
F.createElement(co,{name:"fixingIcon"})),F.createElement("div",{className:"builder-text-content"},F.createElement("h4",null,Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_HEADING_2")),F.createElement("div",{className:"builder-fixing-text"}))))},Sm=function(e){var t=e.handleClose;return F.createElement(F.Fragment,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:t},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_TITLE_2"))),
F.createElement(Oa,null,F.createElement("div",{className:"builder-json-validation-wrapper"},F.createElement("div",{className:"builder-text-content"},F.createElement("h4",null,Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_HEADING_3")),F.createElement("div",{className:"builder-caption"},Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_SAVING_INSTRUCTION"))))),F.createElement("div",{className:"builder-modal-footer builder-modal-footer-white"},F.createElement("button",{className:"builder-button builder-button-primary",
onClick:t},Joomla.JText._("COM_JPAGEBUILDER_VALIDATE_JSON_MODAL_BUTTON_UNDERSTAND"))))};const Pm=function(e){var t=e.isOpen,n=e.closeModal,o=(0,F.useState)("first"),r=(0,j.Z)(o,2),a=r[0],i=r[1],l=(0,F.useCallback)(function(e){return i(e)},[]),c=function(){n(),i("first")},s={first:F.createElement(Nm,{handleClose:c,updateStep:l}),second:F.createElement(Dm,{updateStep:l}),third:F.createElement(Sm,{handleClose:c})};return F.createElement(Aa,{isOpen:t,cssClass:"builder-modal-dialog-centered",size:"md"},
F.createElement(Ia,null,a in s?s[a]:null))};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Rm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?km(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):
km(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Tm=(0,Xn.$j)(null,function(e){return{importPage:function(t){return e(Fi(t))},pageDataHandler:function(t){return e(Yi(t))}}})(function(e){var t,n,o,r,a=e.pageBuilder,i=e.clickUndo,l=e.clickRedo,c=e.importPage,s=e.pageDataHandler,d=(0,F.useRef)(null),m=(0,F.useState)(!1),p=(0,j.Z)(m,2),v=p[0],f=p[1],b=(0,F.useState)("save"),h=(0,j.Z)(b,2),g=h[0],E=h[1],y=(0,F.useState)(!1),_=(0,j.Z)(y,
2),w=_[0],x=_[1],I=(0,F.useState)(!1),O=(0,j.Z)(I,2),C=O[0],A=O[1],D=(0,F.useState)(!1),S=(0,j.Z)(D,2),P=S[0],k=S[1],R=(0,Xn.v9)(function(e){return e.pageOptions}),T=(0,Xn.v9)(function(e){return e.tools}).activeDevice,M=(0,Xn.I0)(),Z=document.getElementById("jpagebuilder").dataset.pageid||0,B=(null===(t=document.getElementById("jpagebuilder").dataset)||void 0===t?void 0:t.pageurl)||"".concat(window.pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&id=").concat(Z),J=a.past.length,G=a.future.length,
H=(null===(n=R.data)||void 0===n?void 0:n.extension)===N?null===(o=R.data)||void 0===o?void 0:o.extension_view:null,U=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r,i,l,c,s,d,u,m=arguments;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=m.length>1&&void 0!==m[1]?m[1]:"save",t.preventDefault(),(0,V.unstable_batchedUpdates)(function(){f(!0),E(n)}),o=a.present,Z){e.next=8;break}return oe(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_PAGE_ID_NOT_FOUND"),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),
f(!1),e.abrupt("return");case 8:return r="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.savePage&id=").concat(Z),i={"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},e.next=12,fetch(r,{method:"POST",headers:i,body:JSON.stringify({data:o})});case 12:return l=e.sent,e.next=15,l.json();case 15:if(c=e.sent,f(!1),null!=c&&c.status){e.next=20;break}return oe(c.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),e.abrupt("return");case 20:return s=
"".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.saveData&id=").concat(Z),e.next=23,fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({data:R.data})});case 23:return d=e.sent,e.next=26,d.json();case 26:(u=e.sent).status||oe(u.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),ne(c.message,Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),window.warningAtReload=!1,"close"===n?z(t):"new"===
n&&(window.location.href="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=dashboard&tmpl=component#/create-page"));case 31:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),o="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.exitExitPage&id=").concat(Z),e.next=4,fetch(o,
{method:"GET",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 4:return r=e.sent,e.next=7,r.json();case 7:null!=(a=e.sent)&&null!==(n=a.data)&&void 0!==n&&n.status?window.location.href=a.data.response:oe(a.data.response);case 9:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),W=function(e){return function(t){t.preventDefault(),be.setDevice(e),M({type:"CHANGE_ACTIVE_DEVICE",payload:e}),Be(e)}},K=function(){return{com_content:"Article",
com_jpagebuilder:"",mod_jpagebuilder:"Module"}[(new URLSearchParams(window.location.href)).get("extension")||"com_jpagebuilder"]},Y=(0,F.useState)(!1),X=(0,j.Z)(Y,2),q=X[0],$=X[1];return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-header"},F.createElement("div",{className:"builder-header-actions"},F.createElement("div",{className:"builder-d-flex builder-gutter-10"},F.createElement("div",null,F.createElement("span",{id:"btn-save-page",className:"builder-button builder-button-primary builder-d-flex justify-content-center align-items-center ".concat("save"===
g&&v?"disabled":""),role:"button",onClick:function(e){return U(e,"save")},onKeyDown:ye,tabIndex:0},"save"===g&&v?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white"}):Joomla.JText._("COM_JPAGEBUILDER_SAVE"))),F.createElement("div",null,F.createElement("span",{className:"builder-button builder-button-primary builder-d-flex justify-content-center align-items-center ",onClick:function(){const svgIcon=`<div class="builder-loadingOverlay"><svg version="1.1" id="L7" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
                              		  viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
                              		 <path fill="#444" d="M31.6,3.5C5.9,13.6-6.6,42.7,3.5,68.4c10.1,25.7,39.2,38.3,64.9,28.1l-3.1-7.9c-21.3,8.4-45.4-2-53.8-23.3
                              		  c-8.4-21.3,2-45.4,23.3-53.8L31.6,3.5z">
                              		      <animateTransform 
                              		         attributeName="transform" 
                              		         attributeType="XML" 
                              		         type="rotate"
                              		         dur="2s" 
                              		         from="0 50 50"
                              		         to="360 50 50" 
                              		         repeatCount="indefinite" />
                              		  </path>
                              		 <path fill="#444" d="M42.3,39.6c5.7-4.3,13.9-3.1,18.1,2.7c4.3,5.7,3.1,13.9-2.7,18.1l4.1,5.5c8.8-6.5,10.6-19,4.1-27.7
                              		  c-6.5-8.8-19-10.6-27.7-4.1L42.3,39.6z">
                              		      <animateTransform 
                              		         attributeName="transform" 
                              		         attributeType="XML" 
                              		         type="rotate"
                              		         dur="1s" 
                              		         from="0 50 50"
                              		         to="-360 50 50" 
                              		         repeatCount="indefinite" />
                              		  </path>
                              		 <path fill="#444" d="M82,35.7C74.1,18,53.4,10.1,35.7,18S10.1,46.6,18,64.3l7.6-3.4c-6-13.5,0-29.3,13.5-35.3s29.3,0,35.3,13.5
                              		  L82,35.7z">
                              		      <animateTransform 
                              		         attributeName="transform" 
                              		         attributeType="XML" 
                              		         type="rotate"
                              		         dur="2s" 
                              		         from="0 50 50"
                              		         to="360 50 50" 
                              		         repeatCount="indefinite" />
                              		  </path>
                              		</svg></div>`;let loadingContainers=document.createElement("div");loadingContainers.classList.add("builder-loadingContainer");loadingContainers.innerHTML=`<div class="builder-loadingSection">${svgIcon}</div>`;const body=document.querySelector("body");body.appendChild(loadingContainers);const url=window.location.href;const pageUrlMatch=url.match(/\/(\d+)(?:\.html)?/);if(pageUrlMatch){const pageId=pageUrlMatch[1];const endPoint="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.checkinPage&id=").concat(pageId);
const headers={"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")};fetch(endPoint,{method:"POST",headers:headers}).then(response=>{const loadingContainer=document.querySelector("div.builder-loadingContainer");if(loadingContainer)loadingContainer.remove();return window.location.href=B})}else{const loadingContainer=document.querySelector("div.builder-loadingContainer");if(loadingContainer)loadingContainer.remove();return window.location.href=B}},role:"button",onKeyDown:ye,
tabIndex:0},Joomla.JText._("COM_JPAGEBUILDER_TOP_PANEL_CLOSE"))),F.createElement("div",{className:"builder-position-relative"},F.createElement("a",{href:B,className:"builder-button builder-button-primary",role:"button",target:"_blank",rel:"noreferrer nofollow"},Joomla.JText._("COM_JPAGEBUILDER_PREVIEW"))),F.createElement("div",{className:"builder-position-absolute builder-button-dropdown-absolute"},F.createElement("span",{className:"builder-button builder-button-dropdown builder-button-round builder-h-100 builder-d-flex justify-content-center align-items-center",
role:"button",onClick:function(){return x(!0)},onKeyDown:ye,tabIndex:0},F.createElement(er.Z,{content:Joomla.JText._("COM_JPAGEBUILDER_PAGE_OPTIONS"),tagName:"span"},F.createElement(co,{name:"cog"}))),F.createElement("input",{ref:d,type:"file",name:"upload-page-json",accept:".json",style:{display:"none"},onChange:function(e){ot(e,c,s),e.target.value=""}}),w&&(r=L?{left:10}:{right:0},F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-dropdown-overlay builder-backdrop",onClick:function(){return x(!1)},
role:"presentation"}),F.createElement("div",{className:"builder-list-group builder-is-card builder-dropdown builder-position-absolute",style:Rm({top:34},r)},F.createElement("div",{className:"builder-list-item builder-list-item-action",onClick:function(){return $(!0)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"upload",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_TOP_PANEL_EXPORT")),F.createElement("div",{className:"builder-list-item builder-list-item-action",
onClick:function(e){var t;e.preventDefault(),x(!1),null===(t=d.current)||void 0===t||t.click()},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"download",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_TOP_PANEL_IMPORT")),F.createElement("a",{className:"builder-list-item builder-list-item-action",href:"".concat(pagebuilder_base,"administrator/index.php?option=com_jpagebuilder&view=editor&tmpl=component#/editor/").concat(Z).concat(H?"/".concat(H):""),target:"_blank",
rel:"noreferrer",onClick:function(){return x(!1)}},F.createElement(co,{name:"backendLink",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_BACKEND_EDITOR")),F.createElement("div",{className:"builder-list-item builder-list-item-delete builder-list-item-action",onClick:function(){return k(!0)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"trash",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_TOP_PANEL_CLEAR_CONTENT")),F.createElement("div",{className:"builder-list-item builder-list-item-warning builder-list-item-action",
onClick:function(){A(!0)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"command",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_TOP_PANEL_VALIDATE_CONTENT")),F.createElement("div",{className:"builder-responsive-controls"},Object.keys(u).map(function(e){return F.createElement("span",{key:e,className:"builder-responsive-control".concat(T===u[e].value?" active":""),"data-device":e,onClick:W(e),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(er.Z,{content:u[e].name,
tagName:"span"},F.createElement(co,{name:T==u[e].value?u[e].icon:"".concat(u[e].icon,"Line")}),u[e].name))}))),F.createElement(Pm,{isOpen:C,closeModal:function(){return A(!1)}}),F.createElement(Im,{title:"Export Page",open:q,onOpen:$,exportPage:function(e){x(!1),function(e){var t=e.pageId,n=e.isSeoChecked,o=void 0!==n&&n,r="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=export"),a=document.createElement("form");if(a.setAttribute("method","post"),a.setAttribute("id","pageexport"),
a.setAttribute("action",r),a.setAttribute("target","_blank"),o){var i=document.createElement("input");i.setAttribute("type","hidden"),i.setAttribute("name","isSeoChecked"),i.setAttribute("value","1"),a.appendChild(i)}var l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name","pageId"),l.setAttribute("value",t),a.appendChild(l),document.getElementsByTagName("body")[0].appendChild(a),a.submit(),document.getElementById("pageexport").remove()}({pageId:Z,isSeoChecked:e})}}),
F.createElement(ol,{isOpen:P,closeModal:function(){return k(!1)},title:Joomla.JText._("COM_JPAGEBUILDER_TOP_PANEL_CLEAR_CONTENT"),consentBody:Joomla.JText._("COM_JPAGEBUILDER_CLEAR_PAGE_CONTENT_CONFIRM"),confirmAction:Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_ICON_DELETE_BUTTON"),btnVariant:"danger",handleConfirmation:function(){x(!1),M({type:"CLEAR_PAGE"}),s({css:""})}}))))),F.createElement("div",{className:"undoredobtns"},F.createElement(er.Z,{content:"Undo",tagName:"span"},F.createElement("span",
{className:"builder-button builder-button-secondary builder-button-round".concat(J?"":" disabled"),onClick:function(e){e.preventDefault(),J&&(i(),wr.hideEditPanel())},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"undo"}),F.createElement("span",{},Joomla.JText._("COM_JPAGEBUILDER_UNDO"))))),F.createElement("div",{className:"undoredobtns"},F.createElement(er.Z,{content:"Redo",tagName:"span"},F.createElement("span",{className:"builder-button builder-button-secondary builder-button-round".concat(G?
"":" disabled"),onClick:function(e){e.preventDefault(),G&&(l(),wr.hideEditPanel())},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"redo"}),F.createElement("span",{},Joomla.JText._("COM_JPAGEBUILDER_REDO")))))),F.createElement("div",{className:"builder-d-flex"},F.createElement("div",{className:"builder-brand"},"JPageBuilder",K()?F.createElement("small",{className:"builder-ml-2"}," (",K(),")"):""))))});var Lm=Object.freeze({LEFT:{state:"left",icon:"dockLeft"},FLOAT:{state:"float",
icon:"dockFloat"},RIGHT:{state:"right",icon:"dockRight"}});const Mm=function(){var e=(0,F.useContext)(xd),t=e.dockState,n=e.setDockState,o=function(e){return function(){return n(e)}};return F.createElement("div",{className:"builder-dock-settings builder-ms-auto builder-me-3"},Object.values(Lm).map(function(e){var n=e.state,r=e.icon;return F.createElement("span",{key:n,className:"builder-dock-icon builder-dock-float".concat(t===n?" is-active":""),onClick:o(n)},F.createElement(co,{name:r}))}))};var Zm=
function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){return(0,J.Z)(this,r),o.apply(this,
arguments)}return(0,G.Z)(r,[{key:"render",value:function(){var e=this.props,t=e.connectDragPreview,n=e.connectDragSource,o=e.addon,r=function(e){return F.createElement("span",null,F.createElement(er.Z,{content:o.title,tagName:"span"},F.createElement("span",{className:"builder-addon-list-item ".concat(e?"disabled":"")},F.createElement("span",{className:"builder-addon-icon",dangerouslySetInnerHTML:{__html:o.icon}}),F.createElement("span",{className:"builder-addon-title","data-title":o.desc},o.title))))};
return o.pro?F.createElement("div",{className:"builder-addon-list-wrapper"},r("pro"),o.pro&&F.createElement(Td,{size:"sm"})):t(F.createElement("div",{className:"builder-addon-list-wrapper"},n(r())))}}]),r}(F.Component);(0,B.Z)(Zm,"contextType",xd);var jm={beginDrag:function(e,t,n){return ko.reset(),{type:"ADD_ADDON",name:e.addon.addon_name,addon:e.addon}},endDrag:function(e,t){var n=t.getDropResult();if(n&&n.status){var o,r=(new Date).getTime(),a=e.addon.addon_name.replace(/jp_/g,""),i=n.index;"div"===
(null==n||null===(o=n.parentAddon)||void 0===o?void 0:o.name)&&void 0!==n.childIndex?i+=n.childIndex+1:"bottom"===n.dropPosition&&(i=n.index+1);var l,c={type:n.type,index:n.rowIndex,settings:{rowIndex:n.rowIndex,indexPosition:i,colIndex:n.colIndex,addonIndex:"",addonId:r,htmlContent:"",assets:"",addonName:a,formData:e.addon.default,icon:e.addon.icon,title:e.addon.title,childIndex:n.childIndex,parent:!1,addonType:e.addon.type}};"addon"===n.type&&at(null==n?void 0:n.collectionAddonId)&&at(null==n?void 0:
n.collectionItemAddonIndex)?(c.settings.collectionAddonId=n.collectionAddonId,c.settings.collectionItemAddonIndex=n.collectionItemAddonIndex,null!=n&&n.parentAddon&&(c.settings.parentAddon=n.parentAddon)):"addon"===n.type&&null!=n&&n.parentAddon&&(c.settings.parentAddon=n.parentAddon),null!=n&&n.deepAddon&&(c.settings.deepAddon=n.deepAddon,c.settings.deepAddonItemKey=n.deepAddonItemKey,c.settings.deepAddonItemIndex=n.deepAddonItemIndex,void 0!==(null==n?void 0:n.deepAddonItemInnerIndex)&&(c.settings.deepAddonItemInnerIndex=
n.deepAddonItemInnerIndex)),e.addon.js_template?(e.addAddon(K()(c)),K()(c).settings.addonIndex=i):(jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=setting_value",dataType:"json",data:{id:r,name:a,collectionItemIndex:null!==(l=null==n?void 0:n.collectionItemIndex)&&void 0!==l?l:0},cache:!1,success:function(t){c.settings.htmlContent=t.html,c.settings.assets=t.assets,c.settings.formData=JSON.parse(t.formData),e.addAddon(K()(c))}.bind(this)}),
K()(c).settings.addonIndex=i)}}},Bm=(0,zo.DragSource)(eo,jm,function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}});const Jm=(0,Xn.$j)(function(e){return{state:e}},function(e){return{addAddon:function(t){return e(zi(t))}}})(Bm(Zm));function Gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,
o)}return n}function Hm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gm(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Um=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;
if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"searchChangeHandle",function(e){e.preventDefault();var n=e.target.value;t.setState({search:n})}),(0,B.Z)((0,io.Z)(t),
"resetAddonSearchField",function(){t.setState({search:""})}),(0,B.Z)((0,io.Z)(t),"getAddons",function(){var e=t.state.search,n=t.props.addonList,o=t.groupAddons(n);if(!e)return o;var r=e.replace(/\s+/g," ").split(" ").filter(function(e){return!!e}).join("|");try{var a=new RegExp(r,"i");return Object.entries(o).reduce(function(e,t){var n=(0,j.Z)(t,2),o=n[0],r=n[1],i="Favourite"!==o?r.filter(function(e){return a.test(e.title)}):r;return e[o]=i,e},{})}catch(e){return{}}}),(0,B.Z)((0,io.Z)(t),"isEmptyAddons",
function(e){return Object.values(e).every(function(e){return 0===e.length})}),t.state={addons:[],categories:window.addonCats,activeCat:"All",search:""},t.searchElement=(0,F.createRef)(),t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){this.state.addons.length<1&&this.setState({addons:this.groupAddons(this.props.addonList)}),this.searchElement.focus()}},{key:"groupAddons",value:function(e){var t=["row","columns","div"],n=e.reduce(function(e,t){var n,o=(null==t?void 0:t.category)||"Settings";
return e[o]=e[o]||[],t.visibility=!0,e[o].push(t),null!==(n=window.addonsFromDB)&&void 0!==n&&n[t.addon_name]&&window.addonsFromDB[t.addon_name].is_favorite&&(e.Favourite||(e.Favourite=[]),e.Favourite.push(t)),e},{});for(var o in n)"Structure"!==o&&n[o].sort(function(e,t){return e.title.toLowerCase().localeCompare(t.title.toLowerCase())});return n.Structure&&n.Structure.sort(function(e,n){return t.indexOf(e.addon_name)-t.indexOf(n.addon_name)}),Hm(Hm({},{Favourite:[],Structure:[],General:[],Content:[],
Media:[],Slider:[]}),n)}},{key:"render",value:function(){var e,t=this,n=this.getAddons(),o=(null===(e=this.props.pageOptions.data)||void 0===e?void 0:e.extension)===N;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-addon-search"},F.createElement("div",{className:"builder-form-group builder-has-icon-left"},F.createElement("input",{type:"text",className:"builder-form-field builder-form-field-lg",placeholder:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_SEARCH"),ref:function(e){return t.searchElement=
e},value:this.state.search,onChange:this.searchChangeHandle}),F.createElement("span",{className:"builder-form-icon"},F.createElement("svg",{width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F.createElement("defs",null),F.createElement("path",{d:"M13.84 13.07l-3.416-3.416a5.865 5.865 0 001.36-3.761A5.9 5.9 0 005.893 0 5.9 5.9 0 000 5.893a5.899 5.899 0 005.892 5.892c1.43 0 2.74-.512 3.762-1.361l3.417 3.417a.543.543 0 00.77 0 .544.544 0 000-.77zM1.09 5.894a4.81 4.81 0 014.803-4.804 4.81 4.81 0 014.804 4.804 4.809 4.809 0 01-4.804 4.803A4.81 4.81 0 011.09 5.893z",
fill:"#676D98"}))))),F.createElement("div",{className:"builder-addon-container builder-d-flex builder-flex-column"},F.createElement(F.Fragment,null,this.isEmptyAddons(n)?F.createElement("div",{className:"builder-mt-4"},F.createElement(Ya,{message:Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_NO_RESULT_FOUND")})):Object.keys(n).map(function(e,r){var a,i,l;return!o&&null!==(a=n[e][0])&&void 0!==a&&null!==(a=a.addon_name)&&void 0!==a&&a.startsWith(D)||o&&"Favourite"!==e&&n[e].length>0&&(null===(i=t.props.pageOptions.data)||
void 0===i?void 0:i.extension_view)===S&&null!==(l=n[e][0])&&void 0!==l&&null!==(l=l.addon_name)&&void 0!==l&&l.startsWith(D)?null:n[e].length>0&&F.createElement("div",{key:r},F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-fs-2 builder-mb-2"},"Favourite"===e?Joomla.JText._("COM_JPAGEBUILDER_EDITOR_FAVORITES"):e),F.createElement("div",{className:"builder-addon-list"},n[e].map(function(e,n){return 0!=e.visibility&&F.createElement("div",{key:n},F.createElement(Jm,{addon:e,
resetAddonSearchField:t.resetAddonSearchField}))}))))}))))}}]),r}(F.Component);(0,B.Z)(Um,"contextType",xd);const zm=(0,Xn.$j)(function(e){return{addonList:e.addonList,pageOptions:e.pageOptions}})(Um),Fm=function(e){var t=e.buttonSize,n=void 0===t?"":t;return F.createElement("a",{href:"https://storejextensions.org/extensions/jpagebuilder-joomla-page-builder.html",target:"_blank",rel:"noreferrer",className:"builder-button builder-button-primary ".concat(n?"builder-button-".concat(n):""),role:"button"},
Joomla.JText._("COM_JPAGEBUILDER_PRO_LABEL_BUY_PRO"))},Vm=function(e){var t=e.children,n=e.enabled,o=void 0===n||n,r=e.buttonSize;return o?F.createElement("div",{className:"builder-pro-label-wrapper"},t,F.createElement(Fm,{buttonSize:r})):F.createElement(F.Fragment,null,t)};function Wm(e){var t=e.src,n=e.alt,o=e.fallback,r=(0,F.useRef)(null),a=(0,F.useRef)(!0),i=(0,F.useRef)(null);return(0,F.useEffect)(function(){var e=new IntersectionObserver(function(n){n.forEach(function(n){if(n.isIntersecting){var o=
n.target;o.src=t,o.style.visibility="visible",o.onload=function(){i.current&&(i.current.style.display="none")},e.unobserve(o)}})});return r.current&&e.observe(r.current),function(){e.disconnect(),a.current=!1}},[r,i,t]),F.createElement(F.Fragment,null,F.createElement("img",{ref:r,alt:n,loading:"lazy",style:{visibility:"hidden"}}),!!o&&F.createElement("div",{ref:i,style:{display:"block",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}},F.cloneElement(o)))}var Km={beginDrag:function(e){var t=
[];try{var n;return t=null!=e&&null!==(n=e.data)&&void 0!==n&&n.json?JSON.parse(e.data.json):[],{type:to,name:"block",data:t}}catch(e){return{type:to,name:"block",data:t}}}};const Ym=(0,zo.DragSource)(to,Km,function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}})(function(e){var t=e.data,n=e.isAuthorized,o=e.isDragging,r=e.connectDragSource,a=e.connectDragPreview,i=e.dockState,l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useRef)(),
m=Xo({isOpen:s,arrow:"float"===i?"left":i}),p=m.position,v=m.triggerRef,f=m.popoverRef;(0,F.useEffect)(function(){return o&&(clearTimeout(u.current),d(!1)),function(){clearTimeout(u.current),d(!1)}},[o]);var b=function(){return F.createElement("div",{ref:v,className:"builder-sections-library-thumb ".concat(n?"":"builder-cursor-auto"),onMouseEnter:function(){n&&(u.current=setTimeout(function(){d(!0)},300))},onMouseLeave:function(){n&&(d(!1),u.current&&clearTimeout(u.current))}},F.createElement(Vm,
{enabled:!n,buttonSize:"sm"},F.createElement("div",{className:"builder-sections-library-thumb-image"},F.createElement(Wm,{src:t.thumb,alt:t.title})),!n&&F.createElement("div",{className:"builder-pro-label-top-right"},F.createElement(Td,{size:"md"}))),F.createElement("div",{className:"builder-sections-library-thumb-footer"},t.title),s&&(0,V.createPortal)(F.createElement("div",{ref:f,className:"builder-sections-library-thumb-preview",style:{position:"absolute",left:p.left,top:p.top}},F.createElement("div",
{className:"builder-sections-library-thumb-preview-title"},t.title),F.createElement("div",{className:"builder-sections-library-thumb-preview-image"},F.createElement(Wm,{src:t.thumb,alt:t.title}))),document.body))};return n?r(a(b())):b()}),Xm=function(e){var t=e.data,n=e.isAuthorized,o=e.dockState;return F.createElement("div",{className:"builder-sections-library-thumb-wrapper"},t.map(function(e,t){return F.createElement(Ym,{key:t,data:e,isAuthorized:n,dockState:o})}))},qm=function(e){var t=e.index,
n=e.data,o=e.isActive,r=e.setActiveItem,a=e.isAuthorized,i=void 0===a||a,l=e.dockState;return F.createElement("div",null,F.createElement("button",{type:"button",className:"builder-sections-library-item-button ".concat(o?"active":""),onClick:function(){r(o?null:t)}},F.createElement(co,{name:"caretRight"}),F.createElement("span",null,n.title)),o&&F.createElement(Xm,{data:n.blocks,isAuthorized:i,dockState:l}))};var $m="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=pre-section-list");
const Qm=function(e){var t=e.dockState,n=(0,F.useState)(""),o=(0,j.Z)(n,2),r=o[0],a=o[1],i=(0,F.useState)({isAuthorized:!1,blocks:{}}),l=(0,j.Z)(i,2),c=l[0],s=l[1],d=(0,F.useState)(!1),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useState)(0),f=(0,j.Z)(v,2),b=f[0],h=f[1],g=Pa(r);(0,F.useEffect)(function(){(0,Ct.Z)(Nt().mark(function e(){var t,n,o,r,a;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,p(!0),e.next=4,fetch($m);case 4:return e.next=6,e.sent.json();case 6:(t=e.sent).status&&
(o=null!==(n=t.data)&&void 0!==n?n:{},r=o.authorised,a=o.blocks,s({isAuthorized:r,blocks:a})),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),re(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_FETCHING_TEMPLATES"));case 13:setTimeout(function(){const firstButton=document.querySelector("div.builder-sections-library-list > div:first-child > button");if(firstButton)firstButton.click()},1);return e.prev=13,p(!1),e.finish(13);case 16:case "end":return e.stop()}},e,null,[[0,10,13,16]])}))()},[]);var E=
(0,F.useMemo)(function(){if(g&&c.blocks){var e=Object.values(c.blocks).flatMap(function(e){return e.blocks}),t=new RegExp(g,"i");return e.filter(function(e){return t.test(e.title)})}return[]},[g,c.blocks]),y=function(e){return c.blocks[e]},_=0===mt(c.blocks).length||g.length>0&&0===E.length;return m?F.createElement("div",{className:"builder-w-100 builder-text-center"},F.createElement("div",{className:"builder-spinner builder-me-2"})):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-addon-search"},
F.createElement("div",{className:"builder-form-group builder-has-icon-left"},F.createElement("input",{type:"text",className:"builder-form-field builder-form-field-lg",placeholder:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_SEARCH"),value:r,onChange:function(e){return a(e.target.value)}}),F.createElement("span",{className:"builder-form-icon"},F.createElement("svg",{width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F.createElement("defs",null),F.createElement("path",{d:"M13.84 13.07l-3.416-3.416a5.865 5.865 0 001.36-3.761A5.9 5.9 0 005.893 0 5.9 5.9 0 000 5.893a5.899 5.899 0 005.892 5.892c1.43 0 2.74-.512 3.762-1.361l3.417 3.417a.543.543 0 00.77 0 .544.544 0 000-.77zM1.09 5.894a4.81 4.81 0 014.803-4.804 4.81 4.81 0 014.804 4.804 4.809 4.809 0 01-4.804 4.803A4.81 4.81 0 011.09 5.893z",
fill:"#676D98"}))))),F.createElement("div",{className:"builder-sections-library-list"},g?F.createElement(Xm,{data:E,isAuthorized:c.isAuthorized,dockState:t}):mt(c.blocks).map(function(e,n){return F.createElement(qm,{key:n,index:n,data:y(e),isActive:n===b,setActiveItem:h,isAuthorized:c.isAuthorized,dockState:t})})),_&&F.createElement("div",{className:"builder-sections-library-empty"},F.createElement(co,{name:"blocksDuo"}),F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_EMPTY_PREDEFINED_SECTIONS"))))},
ep=function(e){var t=e.updatePanelPosition,n=e.onClose,o=wd().dockState;return(0,F.useEffect)(function(){t()},[]),F.createElement("div",{className:"builder-modal builder-sidebar"},F.createElement("div",{className:"builder-modal-dialog builder-modal-dialog-scrollable"},F.createElement(Cd,{handle:"#builder-modal-header"},F.createElement("div",{className:"builder-modal-content"},F.createElement("div",{id:"builder-modal-header",className:"builder-modal-header"},"float"===o&&F.createElement(co,{className:"builder-drag-button",
name:"ellipsisDoubleY"}),F.createElement("span",{className:"builder-modal-header-title builder-modal-header-blocks"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_ADD_ELEMENTS")),F.createElement(Mm,null),F.createElement("span",{className:"builder-close-button",onClick:function(e){e.preventDefault(),n(),document.body.classList.remove("builder-panel-opened")},"aria-label":"Close",role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"times"}))),F.createElement("div",{className:"builder-modal-body builder-overflow-y-auto"},
F.createElement(bd,null,F.createElement(vd,{name:Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_ADDONS")},F.createElement(zm,null)),F.createElement(vd,{name:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_BLOCKS")},F.createElement(Qm,{dockState:o}))))))))};var tp=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,
[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),e=o.call(this),(0,B.Z)((0,io.Z)(e),"getIcon",function(t){try{var n=JSON.parse(t.code).name;return e.props.addonStructureList.find(function(e){return e.addon_name===n}).icon}catch(e){return""}}),e.state={isConsentModalOpen:!1},e}return(0,G.Z)(r,[{key:"render",
value:function(){var e=this,t=this.props,n=t.addon,o=t.isDragging,r=t.activeDragItemId,a=t.connectDragSource,i=t.handleDelete;return(0,t.connectDragPreview)((0,t.connectDropTarget)(a(F.createElement("div",{style:{opacity:o?.5:1}},F.createElement("div",{className:"builder-saved-items-section-item ".concat(r===n.id?"active":"")},F.createElement("span",{className:"builder-saved-items-section-item-drag-icon","data-drag-icon":!0},F.createElement(co,{name:"dragger"})),F.createElement("span",{className:"builder-saved-items-addon-icon builder-saved-items-icon",
dangerouslySetInnerHTML:{__html:this.getIcon(n)}}),F.createElement("span",{"data-section-title":!0,className:"builder-saved-items-section-title"},n.title),F.createElement("button",{type:"button",onClick:function(){e.setState({isConsentModalOpen:!0})}},F.createElement(co,{name:"trash",height:12,width:12})),F.createElement(ol,{isOpen:this.state.isConsentModalOpen,closeModal:function(){return e.setState({isConsentModalOpen:!1})},btnVariant:"danger",consentBody:Joomla.JText._("COM_JPAGEBUILDER_DELETE_SAVED_ADDON_DIALOG_MSG"),
handleConfirmation:function(){return i(n.id,n.title)}}))))))}}]),r}(F.Component),np={beginDrag:function(e){e.setActiveDragItemId(e.addon.id);try{var t,n,o,r=null!=e&&null!==(t=e.addon)&&void 0!==t&&t.code?JSON.parse(e.addon.code):{name:"",addon:[]};return{type:"ADD_ADDON",name:r.name,addon:null!==(n=r.addon[0])&&void 0!==n?n:{},index:e.index,id:null===(o=e.addon)||void 0===o?void 0:o.id}}catch(t){var a;return{type:"ADD_ADDON",name:"",addon:{},index:e.index,id:null===(a=e.addon)||void 0===a?void 0:
a.id}}},endDrag:function(e,t){var n=t.getDropResult();if(null!=n&&n.status){var o,r,a,i=null!=e&&null!==(o=e.addon)&&void 0!==o&&o.code?JSON.parse(e.addon.code):{name:"",addon:[]},l=null==n?void 0:n.childIndex;(null==n||null===(r=n.parentAddon)||void 0===r?void 0:r.name)!==k||at(l)||(l=0);var c={rowIndex:n.rowIndex,colIndex:n.colIndex,addonIndex:0,childIndex:l,parentId:null==n||null===(a=n.parentAddon)||void 0===a?void 0:a.id,addonData:i,isAbove:"top"===n.dropPosition};e.setActiveDragItemId(null),
e.pasteAddon({pasteOptions:c})}}},op={hover:function(e,t,n){var o=t.getItem().index,r=e.index,a=t.isOver({shallow:!0}),i=t.isOver();if(o!==r&&a&&i){var l=(0,V.findDOMNode)(n).getBoundingClientRect(),c=(l.bottom-l.top)/2,s=t.getClientOffset().y-l.top;o<r&&s<c||o>r&&s>c||(e.handleItemSwap(o,r),t.getItem().index=r)}},drop:function(e){e.setActiveDragItemId(null),e.handleItemSortOnDrop()}},rp=(0,zo.DragSource)(eo,np,function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),
isDragging:t.isDragging()}}),ap=(0,zo.DropTarget)(eo,op,function(e){return{connectDropTarget:e.dropTarget()}});const ip=(0,Xn.$j)(function(e){return{addonStructureList:e.addonList}},function(e){return{addAddon:function(t){return e(zi(t))},pasteAddon:function(t){return e(Ji(t))}}})(ap(rp(tp)));var lp=M+"/nothing-found-animation.svg",cp="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.getMyAddons"),sp=("".concat(M,"preview-addon-library.jpg"),"".concat(M,"preview-addon-library-2x.jpg"),
Joomla.JText._("COM_JPAGEBUILDER_SAVED_ITEMS_ADDONS_TITLE"),Joomla.JText._("COM_JPAGEBUILDER_SAVED_ITEMS_ADDONS_CONTENT"),function(){var e=(0,Ct.Z)(Nt().mark(function e(){return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(cp,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 2:return e.next=4,e.sent.json();case 4:return e.abrupt("return",e.sent);case 5:case "end":return e.stop()}},e)}));return function(){return e.apply(this,
arguments)}}());const dp=function(){var e=(0,F.useState)([]),t=(0,j.Z)(e,2),n=t[0],o=t[1],r=(0,F.useState)(null),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useState)(""),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)(!1),p=(0,j.Z)(m,2),v=p[0],f=p[1],b=Wo(n),h=Pa(d),g=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,sp();case 4:t=e.sent,o(t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),oe(e.t0.message,
Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 11:return e.prev=11,f(!1),e.finish(11);case 14:case "end":return e.stop()}},e,null,[[1,8,11,14]])}));return function(){return e.apply(this,arguments)}}(),E=function(e,t){o(function(n){return(0,Vt.ZP)(n,function(n){var o=n[e];n[e]=n[t],n[t]=o})})},y=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,o,r;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=pt(n),o=pt(b),!Or()(t,o)){e.next=4;break}return e.abrupt("return");case 4:return r=
Array.from({length:t.length},function(e,t){return t+1}),f(!0),e.prev=6,e.next=9,fetch(Z,{method:"PATCH",body:JSON.stringify({ids:t,orders:r,type:"Addon"})});case 9:return e.next=11,e.sent.json();case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),oe(e.t0.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 16:return e.prev=16,f(!1),e.finish(16);case 19:case "end":return e.stop()}},e,null,[[6,13,16,19]])}));return function(){return e.apply(this,arguments)}}();(0,F.useEffect)(function(){g()},
[]);var _=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r=arguments;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"",o="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.deleteAddon&id=").concat(t),f(!0),e.prev=3,e.next=6,fetch(o,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 6:return e.next=8,e.sent.json();case 8:1===e.sent?(ne("".concat(n," ").concat(Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_MSG_FOR_DELETE")),
Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),g()):oe("".concat(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_DELETE")," ").concat(n),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),oe("".concat(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_DELETE")," ").concat(n),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 15:return e.prev=15,f(!1),e.finish(15);case 18:case "end":return e.stop()}},e,null,[[3,12,15,18]])}));return function(t){return e.apply(this,
arguments)}}(),w=(0,F.useMemo)(function(){var e=new RegExp(h,"i");return n.length?n.filter(function(t){return e.test(t.title)}):[]},[h,n]);return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-addon-search"},F.createElement("div",{className:"builder-form-group builder-has-icon-left"},F.createElement("input",{type:"text",className:"builder-form-field builder-form-field-lg",placeholder:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_SEARCH"),value:d,onChange:function(e){return u(e.target.value)}}),
F.createElement("span",{className:"builder-form-icon"},F.createElement("svg",{width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F.createElement("defs",null),F.createElement("path",{d:"M13.84 13.07l-3.416-3.416a5.865 5.865 0 001.36-3.761A5.9 5.9 0 005.893 0 5.9 5.9 0 000 5.893a5.899 5.899 0 005.892 5.892c1.43 0 2.74-.512 3.762-1.361l3.417 3.417a.543.543 0 00.77 0 .544.544 0 000-.77zM1.09 5.894a4.81 4.81 0 014.803-4.804 4.81 4.81 0 014.804 4.804 4.809 4.809 0 01-4.804 4.803A4.81 4.81 0 011.09 5.893z",
fill:"#676D98"}))))),F.createElement("div",{className:"builder-saved-items-list"},v?F.createElement("div",{className:"builder-w-100 builder-text-center"},F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-me-2"})):w.length>0?w.map(function(e,t){return F.createElement(ip,{key:e.id,index:t,addon:e,activeDragItemId:i,setActiveDragItemId:function(e){return l(e)},handleDelete:_,handleItemSwap:E,handleItemSortOnDrop:y})}):F.createElement("div",{className:"builder-saved-items-no-result"},
F.createElement("img",{src:lp,alt:Joomla.JText._("COM_JPAGEBUILDER_NOTHING_FOUND_TEXT")}),F.createElement("p",null,Joomla.JText._("COM_JPAGEBUILDER_NOTHING_FOUND_TEXT")))))};var up=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);
if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),(e=o.call(this)).state={isConsentModalOpen:!1},e}return(0,G.Z)(r,[{key:"render",value:function(){var e=this,t=this.props,n=t.section,o=t.isDragging,r=t.activeDragItemId,a=t.handleDelete,i=t.connectDragSource,l=t.connectDragPreview;return i((0,t.connectDropTarget)(l(F.createElement("div",{style:{opacity:o?.5:1}},F.createElement("div",
{className:"builder-saved-items-section-item ".concat(r===n.id?"active":"")},F.createElement("span",{className:"builder-saved-items-section-item-drag-icon","data-drag-icon":!0},F.createElement(co,{name:"dragger"})),F.createElement(co,{className:"builder-saved-items-icon",name:"blocksDuo"}),F.createElement("span",{"data-section-title":!0,className:"builder-saved-items-section-title"},n.title),F.createElement("button",{type:"button",onClick:function(){e.setState({isConsentModalOpen:!0})}},F.createElement(co,
{name:"trash",height:12,width:12})),F.createElement(ol,{isOpen:this.state.isConsentModalOpen,closeModal:function(){return e.setState({isConsentModalOpen:!1})},btnVariant:"danger",consentBody:Joomla.JText._("COM_JPAGEBUILDER_DELETE_SAVED_SECTION_DIALOG_MSG"),handleConfirmation:function(){return a(n.id,n.title)}}))))))}}]),r}(F.Component),mp={beginDrag:function(e){var t=[];e.setActiveDragItemId(e.section.id);try{var n;return t=null!=e&&null!==(n=e.section)&&void 0!==n&&n.section?JSON.parse(e.section.section):
[],{type:to,name:"block",data:t,index:e.index}}catch(n){return{type:to,name:"block",data:t,index:e.index}}},endDrag:function(e){e.setActiveDragItemId(null)}},pp={hover:function(e,t,n){var o=t.getItem().index,r=e.index,a=t.isOver({shallow:!0}),i=t.isOver();if(o!==r&&a&&i){var l=(0,V.findDOMNode)(n).getBoundingClientRect(),c=(l.bottom-l.top)/2,s=t.getClientOffset().y-l.top;o<r&&s<c||o>r&&s>c||(e.handleItemSwap(o,r),t.getItem().index=r)}},drop:function(e){e.setActiveDragItemId(null),e.handleItemSortOnDrop()}},
vp=(0,zo.DragSource)(to,mp,function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}});const fp=(0,zo.DropTarget)(to,pp,function(e){return{connectDropTarget:e.dropTarget()}})(vp(up));var bp=M+"/nothing-found-animation.svg",hp="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.getMySections"),gp=("".concat(M,"preview-section-library.jpg"),"".concat(M,"preview-section-library-2x.jpg"),Joomla.JText._("COM_JPAGEBUILDER_SAVED_ITEMS_SECTIONS_TITLE"),
Joomla.JText._("COM_JPAGEBUILDER_SAVED_ITEMS_SECTIONS_CONTENT"),function(){var e=(0,Ct.Z)(Nt().mark(function e(){return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(hp,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 2:return e.next=4,e.sent.json();case 4:return e.abrupt("return",e.sent);case 5:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}());const Ep=function(){var e=(0,F.useState)([]),
t=(0,j.Z)(e,2),n=t[0],o=t[1],r=(0,F.useState)(null),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=(0,F.useState)(""),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)(!1),p=(0,j.Z)(m,2),v=p[0],f=p[1],b=Wo(n),h=Pa(d),g=(0,F.useCallback)((0,Ct.Z)(Nt().mark(function e(){var t;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,gp();case 4:t=e.sent,o(t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),oe(e.t0.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 11:return e.prev=
11,f(!1),e.finish(11);case 14:case "end":return e.stop()}},e,null,[[1,8,11,14]])})),[]),E=function(e,t){o(function(n){return(0,Vt.ZP)(n,function(n){var o=n[e];n[e]=n[t],n[t]=o})})},y=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var t,o,r;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=pt(n),o=pt(b),!Or()(t,o)){e.next=4;break}return e.abrupt("return");case 4:return r=Array.from({length:t.length},function(e,t){return t+1}),f(!0),e.prev=6,e.next=9,fetch(Z,{method:"PATCH",body:JSON.stringify({ids:t,
orders:r,type:"Section"})});case 9:return e.next=11,e.sent.json();case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),oe(e.t0.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 16:return e.prev=16,f(!1),e.finish(16);case 19:case "end":return e.stop()}},e,null,[[6,13,16,19]])}));return function(){return e.apply(this,arguments)}}();(0,F.useEffect)(function(){g()},[]);var _=(0,F.useMemo)(function(){var e=new RegExp(h,"i");return n.length?n.filter(function(t){return e.test(t.title)}):
[]},[h,n]),w=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,r=arguments;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:"",o="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&task=page.deleteSection&id=").concat(t),f(!0),e.prev=3,e.next=6,fetch(o,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 6:return e.next=8,e.sent.json();case 8:1===e.sent?(ne("".concat(n," ").concat(Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_MSG_FOR_DELETE")),
Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),g()):oe("".concat(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_DELETE")," ").concat(n),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),oe("".concat(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_DELETE")," ").concat(n),Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 15:return e.prev=15,f(!1),e.finish(15);case 18:case "end":return e.stop()}},e,null,[[3,12,15,18]])}));return function(t){return e.apply(this,
arguments)}}();return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-addon-search"},F.createElement("div",{className:"builder-form-group builder-has-icon-left"},F.createElement("input",{type:"text",className:"builder-form-field builder-form-field-lg",placeholder:Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_SEARCH"),value:d,onChange:function(e){return u(e.target.value)}}),F.createElement("span",{className:"builder-form-icon"},F.createElement("svg",{width:"14",height:"14",
fill:"none",xmlns:"http://www.w3.org/2000/svg"},F.createElement("defs",null),F.createElement("path",{d:"M13.84 13.07l-3.416-3.416a5.865 5.865 0 001.36-3.761A5.9 5.9 0 005.893 0 5.9 5.9 0 000 5.893a5.899 5.899 0 005.892 5.892c1.43 0 2.74-.512 3.762-1.361l3.417 3.417a.543.543 0 00.77 0 .544.544 0 000-.77zM1.09 5.894a4.81 4.81 0 014.803-4.804 4.81 4.81 0 014.804 4.804 4.809 4.809 0 01-4.804 4.803A4.81 4.81 0 011.09 5.893z",fill:"#676D98"}))))),F.createElement("div",{className:"builder-saved-items-list"},
v?F.createElement("div",{className:"builder-w-100 builder-text-center"},F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-me-2"})):_.length>0?_.map(function(e,t){return F.createElement(fp,{key:e.id,index:t,section:e,activeDragItemId:i,setActiveDragItemId:function(e){return l(e)},handleDelete:w,handleItemSwap:E,handleItemSortOnDrop:y})}):F.createElement("div",{className:"builder-saved-items-no-result"},F.createElement("img",{src:bp,alt:Joomla.JText._("COM_JPAGEBUILDER_NOTHING_FOUND_TEXT")}),
F.createElement("p",null,Joomla.JText._("COM_JPAGEBUILDER_NOTHING_FOUND_TEXT")))))},yp=function(e){var t=e.updatePanelPosition,n=e.onCloseOptionPanel,o=wd().dockState;return(0,F.useEffect)(function(){t()},[]),F.createElement("div",{className:"builder-modal builder-sidebar"},F.createElement("div",{className:"builder-modal-dialog builder-modal-dialog-scrollable"},F.createElement(Cd,{handle:"#builder-modal-header"},F.createElement("div",{className:"builder-modal-content"},F.createElement("div",{id:"builder-modal-header",
className:"builder-modal-header"},"float"===o&&F.createElement(co,{className:"builder-drag-button",name:"ellipsisDoubleY"}),F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_SAVED_ITEM")),F.createElement(Mm,null),F.createElement("span",{className:"builder-close-button",onClick:function(e){e.preventDefault(),n(),document.body.classList.remove("builder-panel-opened")},"aria-label":"Close",role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,
{name:"times"}))),F.createElement("div",{className:"builder-modal-body"},F.createElement(bd,null,F.createElement(vd,{name:Joomla.JText._("COM_JPAGEBUILDER_SECTIONS")},F.createElement(Ep,null)),F.createElement(vd,{name:Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_ADDONS_TITLE")},F.createElement(dp,null))))))))};function _p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),
n.push.apply(n,o)}return n}var wp=[{value:"general",label:"Settings"},{value:"style",label:"Style"},{value:"advanced",label:"Advanced"},{value:"interaction",label:"Effects"}],xp=[{value:"style",label:"Effects"},{value:"title",label:"Title"},{value:"responsive",label:"Mobile"},{value:"animation",label:"Animation"}],Ip=[{value:"style",label:"Effects"},{value:"responsive",label:"Mobile"},{value:"animation",label:"Animation"}],Op=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||
!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){return(0,J.Z)(this,r),o.call(this,e)}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.addonName;
jQuery(document).on("editElementChange",function(n,o,r,a,i){e.changeEditElementValue({field:o,value:a,id:r,addonName:t,options:i})})}},{key:"componentWillUnmount",value:function(){jQuery(document).off("editElementChange"),window.toolsTabIndex=0}},{key:"renderSettings",value:function(){var e,t,n=this,o=this.props.state,r=null!==(e=null===(t=o.jpbForm.mainForm)||void 0===t?void 0:t.addonType)&&void 0!==e?e:null;if(!Ee(r)||!Ee(o.form)||0===Object.keys(o.form).length)return null;switch(r){case "addon":var a,
i=o.jpbForm.mainForm.addonName,l=null===(a=addonsJSON[i])||void 0===a?void 0:a.settings,c=o.form.jpbForm.values,s=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_p(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({general:l},globalAttr);return wp.map(function(e,
t){return F.createElement(vd,{name:e.value,key:t},F.createElement(Js,{settings:Pe(s[e.value],c),reduxProps:n.props.reduxProps,values:c}))});case "row":var d,u=o.form.jpbForm.values,m="row"===wr.type&&Ee(wr.rowSettings)&&Boolean(null===(d=wr.rowSettings)||void 0===d?void 0:d.parent);return xp.map(function(e,t){return F.createElement(vd,{name:e.value,key:t},F.createElement(Js,{settings:Pe(rowSettings[e.value],u),reduxProps:n.props.reduxProps,values:u,disabledGroups:m?P:void 0}))});case "column":var p=
o.form.jpbForm.values;return Ip.map(function(e,t){return F.createElement(vd,{name:e.value,key:t},F.createElement(Js,{settings:Pe(colSettings[e.value],p),reduxProps:n.props.reduxProps,values:p}))})}}},{key:"render",value:function(){var e=this.props,t=e.handleSubmit,n="builder-form-addon-settings";return"insideForm"==e.state.jpbForm.form&&(n+=" builder-d-none"),F.createElement("form",{className:n,onSubmit:t},F.createElement(bd,null,this.renderSettings()))}}]),r}(F.Component),Cp=(0,So.Z)({form:"jpbForm",
enableReinitialize:!0,destroyOnUnmount:!1})(Op);const Ap=(0,Xn.$j)(function(e){return{state:e,initialValues:e.jpbForm.mainForm.values||[]}},function(e){return{changeEditElementValue:function(t){return e(Jo(t))}}})(Cp),Np=(0,Xn.$j)(function(e){return{state:e}})(function(e){var t=e.addonOps,n=e.state,o=e.formName,r=e.toggleType,a=e.reduxProps,i=t.attr;(0,F.useEffect)(function(){window.toolsTabIndex=0},[]);var l="mainForm"==o?n.form.jpbForm.values:n.form.insideAddonForm.values,c=Object.keys(t.attr);
return F.createElement(bd,null,c.map(function(e,n){return pe()(i[e])?null:F.createElement(vd,{name:e,key:n},F.createElement(yd,{fieldsList:Ke(t),fieldsAttr:i[e],values:l,toggleType:r,reduxProps:a}))}))});var Dp=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),
function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){return(0,J.Z)(this,r),o.apply(this,arguments)}return(0,G.Z)(r,[{key:"render",value:function(){var e=this,t=this.props,n=t.handleSubmit,o=t.state,r=t.showButtons,a=Rd(o.jpbForm.insideForm);return F.createElement("form",{className:"builder-form-inner-addon-settings",onSubmit:n},F.createElement(Np,{addonOps:a,formName:"insideForm"}),
F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between"},r?F.createElement(F.Fragment,null,F.createElement("button",{type:"submit",className:"builder-button builder-button-primary"},F.createElement("i",{className:"fa fa-check-square-o"})," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_APPLY")),F.createElement("span",{className:"builder-button builder-button-primary",onClick:function(t){t.preventDefault(),e.props.cancelInsideAddonForm()},role:"button"},
F.createElement("i",{className:"fa fa-times-circle"}),F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")))):F.createElement("span",{className:"builder-button builder-button-primary",onClick:function(t){t.preventDefault(),e.props.cancelInsideAddonForm()},role:"button"},F.createElement("i",{className:"fa fa-check-square-o"})," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_APPLY"))))}}]),r}(F.Component),Sp=(0,So.Z)({form:"insideAddonForm",enableReinitialize:!0,
destroyOnUnmount:!1})(Dp);const Pp=(0,Xn.$j)(function(e){return{state:e,initialValues:e.jpbForm.insideForm.values}},function(e){return{cancelInsideAddonForm:function(){e({type:"CANCEL_ADDON_IN_FORM"})}}})(Sp);var kp=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),
function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).insideHandleForm=t.insideHandleForm.bind((0,io.Z)(t)),t}return(0,G.Z)(r,[{key:"insideHandleForm",value:function(e){var t=this.props.state.jpbForm.activeField;this.props.saveInsideAddon(e,t)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){Or()(this.props.settings,e.settings)&&
Or()(this.props.addon,e.addon)||this.initValuesOnUpdate(e)}},{key:"componentDidMount",value:function(){this.initValuesOnUpdate(this.props)}},{key:"initValuesOnUpdate",value:function(e){var t,n=e.addonName,o=e.toggleType,r=e.settings;pe()(r)?"addon"==o||"inner_addon"==o?t=addonsJSON[n].default:"column"==o||"inner_column"==o?t=colSettings.default:"row"!=o&&"inner_row"!=o||(t=rowSettings.default):t=r;var a=this.props.addon.settings||{},i=a.addonIndex,l=a.colIndex,c=a.rowIndex;this.props.loadInitialValue({addonType:o,
settings:t,addonName:n,addonData:{addonIndex:i,colIndex:l,rowIndex:c}})}},{key:"render",value:function(){var e=this.props,t=e.addonName,n=e.toggleType,o=(e.settings,null),r=null,a=!0;return"addon"==n||"inner_addon"==n?(addonsJSON[t].js_template?(o=this.props.onSubmit,a=!1):o=this.props.onDynamicSubmit,void 0!==addonsJSON[this.props.state.jpbForm.activeField.addonName]&&addonsJSON[this.props.state.jpbForm.activeField.addonName].js_template&&"insideForm"==this.props.state.jpbForm.form&&(r=this.insideHandleForm,
a=!1)):"row"!=n&&"inner_row"!=n&&"column"!=n&&"inner_column"!=n||(o=this.props.onSubmit,a=!1),"insideForm"!=this.props.state.jpbForm.form||addonsJSON[this.props.state.jpbForm.activeField.addonName].js_template||(a=!0),F.createElement("div",{className:"builder-addon-editor-panel"},""!==this.props.state.jpbForm.form&&F.createElement(Ap,{onSubmit:this.props.onSubmit,showButtons:a,onChange:o,onCloseModal:this.props.onCloseModal,addonName:t,toggleType:this.props.toggleType,reduxProps:this.props.reduxProps}),
"insideForm"===this.props.state.jpbForm.form&&F.createElement(Pp,{toggleType:this.props.toggleType,onSubmit:this.insideHandleForm,onChange:r,showButtons:a,onCloseModal:this.props.onCloseModal}))}}]),r}(F.Component);const Rp=(0,Xn.$j)(function(e){return{state:e}},function(e){return{saveInsideAddon:function(t,n){e(jo(t,n))},loadInitialValue:function(t){return e(Mo(t))}}})(kp);var Tp=(0,o.UY)({jpbForm:ho,form:Do}),Lp=(0,o.MT)(Tp);const Mp=function(e){var t=e.addon,n=e.addonName,o=e.settings,r=e.toggleType,
a=e.onSaveSettings,i=e.onDynamicSubmit,l=e.reduxProps,c=Fl(function(e){a(e)},300),s=Fl(function(e){i(e)},150);return F.createElement(Xn.zt,{store:Lp},F.createElement(Rp,{addon:t,addonName:n,onSubmit:c,onDynamicSubmit:s,settings:o,toggleType:r,reduxProps:l}))};function Zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function jp(e){for(var t=
1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zp(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const Bp=function(e){var t,n,o,r,a=e.addon,i=e.dockState,l=e.onSaveSettings,c=e.onDynamicSettings,s=e.toggleType,d=e.rowSettings,u=e.colSettings,m=e.uniqueId,p=e.reduxProps;
setTimeout(function(){const rangeInputs=document.querySelectorAll(".builder-form-range");rangeInputs.forEach(function(rangeInput,index){rangeInput.addEventListener("input",function(){const min=rangeInput.min||0;const max=rangeInput.max||100;const value=rangeInput.value;const initialGradient=builderDarkMode?"#b5bcd7":"#001b4c";const finalGradient=builderDarkMode?"#34393f":"#e0e0e0";rangeInput.style.background=`linear-gradient(to right, ${initialGradient} ${(value-min)/(max-min)*100}%, ${finalGradient} ${(value-
min)/(max-min)*100}%)`});(function(){const min=rangeInput.min||0;const max=rangeInput.max||100;const value=rangeInput.value;const initialGradient=builderDarkMode?"#b5bcd7":"#001b4c";const finalGradient=builderDarkMode?"#34393f":"#e0e0e0";rangeInput.style.background=`linear-gradient(to right, ${initialGradient} ${(value-min)/(max-min)*100}%, ${finalGradient} ${(value-min)/(max-min)*100}%)`})()})},1);return(0,F.useEffect)(function(){e.updatePanelPosition()},[m]),"addon"!==s||Object.keys(a).length?("addon"===
s?(n=a.settings.addonName,o=a.title,t=jp(jp({},null!==(r=a.settings.formData)&&void 0!==r?r:{}),{},{instFormId:m})):"row"==s?(o=Joomla.JText._("COM_JPAGEBUILDER_ROW"),t=jp(jp({},d),{},{instFormId:m})):"column"==s&&(o="Column",t=jp(jp({},u),{},{instFormId:m})),F.createElement("div",{key:m,className:"builder-modal builder-modal-editor-panel builder-sidebar"},F.createElement("div",{className:"builder-modal-dialog builder-modal-dialog-scrollable"},F.createElement(Cd,{handle:".builder-modal-header"},F.createElement("div",
{className:"builder-modal-content",id:"builder-addon-settings-panel"},F.createElement("div",{className:"builder-modal-header"},"float"===i&&F.createElement(co,{className:"builder-drag-button",name:"ellipsisDoubleY"}),F.createElement("span",{className:"builder-modal-header-title builder-modal-header-blocks builder-d-flex builder-align-items-center"},o),F.createElement(Mm,null),F.createElement("span",{className:"builder-close-button","aria-label":"Close",role:"button",onClick:function(){e.onCloseEditPanel(),
document.body.classList.remove("builder-panel-opened")},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"times"}))),F.createElement("div",{className:"builder-modal-body"},F.createElement(Mp,{addon:a,uniqueId:m,addonName:n,settings:t,onSaveSettings:l,onDynamicSubmit:c,toggleType:s,reduxProps:p}))))))):null},Jp=function(e){var t=e.onBackLayoutList;return F.createElement("div",{className:"builder-modal-header"},F.createElement("span",{className:"builder-d-flex builder-align-items-center",onClick:t(null),
role:"button"},F.createElement("span",{className:"builder-back-button"},F.createElement(co,{name:"angleLeft"})),F.createElement("span",{className:"builder-modal-header-title builder-modal-header-title-normal builder-ms-2"},Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_BACK"))))},Gp=(0,Xn.$j)(null,function(e){return{importPageData:function(t){return e(Fi(t))},pageCssHandler:function(t){return e(Yi(t))}}})(function(e){var t=e.layout,n=e.importPageData,o=e.pageCssHandler,r=e.onCloseModal,a=(0,F.useState)(!1),
i=(0,j.Z)(a,2),l=i[0],c=i[1],s=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var a,i,l;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),a="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&task=page.importLayout&id=").concat(t.id),e.next=4,fetch(a,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 4:return i=e.sent,e.next=7,i.json();case 7:(l=e.sent).status?(n(l.data.template),o({css:l.data.css}),
ne(Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_FOR_LAYOUT"),Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),c(!1),r()):(c(!1),oe(l.data.status,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")));case 9:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return F.createElement("div",{className:"builder-layout-card"},F.createElement("div",{className:"builder-card"},F.createElement("div",{className:"builder-card-image builder-layout-card-image-wrapper builder-position-relative"},
F.createElement(Wm,{src:"https://storejextensions.org/cdn/templatesimages/"+t.thumb,alt:t.title,fallback:F.createElement(bl,null)}),Qe,F.createElement("div",{className:"builder-layout-card-overlay","data-media-overlay":!0},F.createElement("button",{type:"button",className:"builder-button builder-button-primary",onClick:s},l?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-text-white","area-hidden":"true"}):"".concat(Joomla.JText._("COM_JPAGEBUILDER_LAYOUTS_IMPORT"))))),
F.createElement("div",{className:"builder-card-footer"},F.createElement("div",{className:"builder-card-title"},t.title," (",t.templateName,")"))))});var Hp=function(e){var t=e.categoryList,n=e.selectedCategories,o=e.onSelectCategory;return F.createElement("div",{className:"builder-modal-sidebar-body builder-flex-stack-item-scrollable"},F.createElement("div",{className:"builder-fs-1 builder-mb-4 builder-mt-2"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_LAYOUT_MODAL_CATEGORIES")),F.createElement("div",
{className:"builder-list-group"},(0,ue.Z)(t).sort(function(e,t){return e.title.localeCompare(t.title)}).map(function(e){var t,r=e.id,a=e.title,i=e.value,l=e.templates,c=e.blocks,s=null!=r?r:i;return F.createElement("label",{key:s,className:"builder-list-item builder-justify-content-between"},F.createElement("span",{className:"builder-field-switcher-container"},F.createElement("input",{type:"checkbox",className:"builder-field-switcher",checked:n.includes(s),onChange:o(s)}),F.createElement("span",null,
a)),F.createElement("span",{className:"builder-fs-sm builder-text-tertiary"},null!==(t=null==l?void 0:l.length)&&void 0!==t?t:null==c?void 0:c.length))})))};const Up=function(e){var t=e.layoutData.layouts,n=e.selectedCategories,o=e.onSelectCategory,r=e.hideSidebar;return void 0!==r&&r?null:F.createElement("div",{className:"builder-modal-sidebar builder-modal-sidebar-card builder-flex-stack"},F.createElement(Hp,{categoryList:t,selectedCategories:n,onSelectCategory:o}))};var zp=function(e){var t=e.selectedLayout,
n=e.importPageData,o=e.pageCssHandler,r=e.onCloseModal,a=(0,F.useState)(!1),i=(0,j.Z)(a,2),l=i[0],c=i[1],s=function(){var e=(0,Ct.Z)(Nt().mark(function e(){var a,i,l;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),a="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=page&task=page.importLayout&id=").concat(t.id),e.next=4,fetch(a,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}});case 4:return i=e.sent,e.next=
7,i.json();case 7:(l=e.sent).status?(n(l.data.template),o({css:l.data.css}),ne(Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_FOR_LAYOUT"),Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL")),c(!1),r()):(c(!1),oe(l.data,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL")));case 9:case "end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return F.createElement("div",{className:"builder-modal-footer builder-modal-footer-white"},F.createElement("button",{className:"builder-button builder-button-primary",
onClick:s},l?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-text-white","area-hidden":"true"}):"".concat(Joomla.JText._("COM_JPAGEBUILDER_LAYOUTS_IMPORT"))))};const Fp=(0,Xn.$j)(null,function(e){return{importPageData:function(t){return e(Fi(t))},pageCssHandler:function(t){return e(Yi(t))}}})(function(e){var t,n=e.selectedTemplate,o=e.onCloseModal,r=e.importPageData,a=e.pageCssHandler,i=(0,F.useState)(null==n?void 0:n.layouts[0]),l=(0,j.Z)(i,2),c=l[0],s=l[1];return F.createElement(F.Fragment,
null,F.createElement("div",{className:"builder-flex-auto builder-flex-stack-item-scrollable builder-position-relative"},F.createElement("div",{className:"builder-p-5"},F.createElement("div",{className:"builder-row builder-gutter-30"},F.createElement("div",{className:"builder-column-4"},!!n&&F.createElement("div",{className:"builder-mb-5"},F.createElement("img",{className:"builder-shadow builder-radius-5",src:null!==(t=null==c?void 0:"https://storejextensions.org/cdn/templatesimages/"+c.thumb)&&void 0!==
t?t:pagebuilder_base+"components/com_jpagebuilder/assets/templatesimages/"+n.thumb,alt:n.title}))),F.createElement("div",{className:"builder-column-8"},F.createElement("div",{className:"builder-d-flex builder-align-items-center builder-justify-content-between builder-mb-4"},F.createElement("span",{className:"builder-fs-h2"},n.title),F.createElement("span",{className:"builder-fs-1 builder-d-flex "},n.count," ",Joomla.JText._("COM_JPAGEBUILDER_LAYOUTS"),F.createElement("span",{className:"builder-ms-2"},
Qe))),F.createElement("div",{className:"builder-fs-2 builder-opacity-7 builder-mb-5"},n.description),F.createElement("div",{className:"builder-row builder-gutter-30"},null==n?void 0:n.layouts.map(function(e){return F.createElement("div",{className:"builder-column-3 builder-mb-5",key:e.id,onClick:function(){return s(e)}},F.createElement("div",{className:"builder-card builder-card-selectable".concat(e.id===(null==c?void 0:c.id)?" active":"")},F.createElement("div",{className:"builder-card-image builder-card-image-scrollable"},
F.createElement("img",{src:"https://storejextensions.org/cdn/templatesimages/"+e.thumb,alt:e.title,loading:"lazy"})),F.createElement("div",{className:"builder-card-footer"},F.createElement("span",{className:"builder-card-title"},e.title))))})))))),!!c&&F.createElement(zp,{selectedLayout:c,importPageData:r,pageCssHandler:a,onCloseModal:o}))});var Vp="".concat(pagebuilder_base,"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=pre-page-list&editarea=frontend");const Wp=function(e){var t=
e.layoutList,n=e.setTemplateList,o=e.handleFetching,r=e.onShowLayoutDetails;return(0,F.useEffect)(function(){t.length||(0,Ct.Z)(Nt().mark(function e(){var t;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o(!0),e.prev=1,e.next=4,fetch(Vp);case 4:return e.next=6,e.sent.json();case 6:(t=e.sent).status&&(0,V.unstable_batchedUpdates)(function(){n(t.data),o(!1)}),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(1),re(Joomla.JText._("COM_JPAGEBUILDER_ERROR_MSG_FOR_FETCHING_TEMPLATES")),
o(!1);case 14:case "end":return e.stop()}},e,null,[[1,10]])}))()},[]),t.length?F.createElement("div",{className:"builder-flex-auto builder-flex-stack-item-scrollable builder-position-relative"},F.createElement("div",{className:"builder-layout-list"},t.map(function(e){return F.createElement("div",{key:e.id,onClick:r(e)},F.createElement("div",{className:"builder-card",style:{border:"2px solid rgb(".concat(e.accent_color?e.accent_color:"0, 0, 0")+")",boxShadow:"rgba(".concat(e.accent_color?e.accent_color+
", .5":"0, 0, 0, .5")+") 3px 3px 4px 2px"}},F.createElement("div",{className:"builder-card-image builder-card-image-scrollable"},F.createElement(Wm,{src:"https://storejextensions.org/cdn/templatesimages/"+e.thumb,alt:e.title,fallback:F.createElement(bl,null)}),Qe),F.createElement("div",{className:"builder-card-footer"},F.createElement("div",{className:"builder-card-title"},e.title),F.createElement("div",{className:"builder-card-sub-title"},e.count," ",Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_TITLE")))))}))):
F.createElement("div",{className:"builder-d-flex builder-flex-auto builder-align-items-center builder-justify-content-center"},F.createElement(Ya,{message:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_NO_LAYOUT_FOUND")}))};function Kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Yp(e){for(var t=1;t<arguments.length;t++){var n=null!=
arguments[t]?arguments[t]:{};t%2?Kp(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Xp=[{label:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_FILTER_TITLE_ASC"),value:"asc"},{label:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_FILTER_TITLE_DESC"),value:"desc"}],qp=function(e){var t=e.searchText,n=e.onChange;
return F.createElement("div",{className:"builder-modal-sidebar-header builder-flex-stack-item"},F.createElement("div",{className:"builder-has-icon-left"},F.createElement(co,{name:"search",className:"builder-form-icon"}),F.createElement("input",{type:"text",className:"builder-form-field",placeholder:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_SEARCH_PLACEHOLDER"),value:t,onChange:n})))};const $p=function(e){var t,n=e.onCloseModal,o=(0,F.useState)(!1),r=(0,j.Z)(o,2),a=r[0],i=r[1],l=(0,F.useState)(""),c=
(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(null),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useState)([]),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useState)({layouts:[],pages:[],savedAddons:[],savedSections:[]}),y=(0,j.Z)(E,2),_=y[0],w=y[1],x=(0,F.useState)({page:null,sortBy:null}),I=(0,j.Z)(x,2),O=I[0],C=I[1],A=(0,F.useMemo)(function(){var e=K()(_.layouts);var tempTemplates=[];e.sort((a,b)=>{return a.title.localeCompare(b.title)});if(!s.trim()&&!h.length&&!O.page){e.map(category=>{category.templates.map(template=>
{tempTemplates.push(template)})});tempTemplates.sort((a,b)=>{return a.title.localeCompare(b.title)})}return h.length&&(e=e.filter(function(e){return h.includes(e.id)})),e.reduce(function(e,t){if(!s.trim()&&!h.length&&!O.page)return tempTemplates;else{var n=t.templates.sort((a,b)=>{return a.title.localeCompare(b.title)});if(s.trim()&&(n=n.filter(function(e){return e.title.toLowerCase().includes(s.toLowerCase().trim())})),!O.page)return[].concat((0,ue.Z)(e),(0,ue.Z)(n));var o=[];return n.forEach(function(e){var t=
e.layouts.filter(function(e){return e.title.toLocaleLowerCase()===O.page.value.toLocaleLowerCase()}).map(function(t){return Yp(Yp({},t),{},{templateName:e.title})});o.push.apply(o,(0,ue.Z)(t))}),[].concat((0,ue.Z)(e),o)}},[])},[_.layouts,h,s,O.page,null===(t=O.sortBy)||void 0===t?void 0:t.value]),N=function(e){var t=e.target.value;d(t)};return a?F.createElement(bl,null):F.createElement("div",{className:"builder-modal-container"},F.createElement(Up,{layoutData:_,searchText:s,onChangeSearchText:N,selectedCategories:h,
onSelectCategory:function(e){return function(t){var n=t.target.checked?[].concat((0,ue.Z)(h),[e]):h.filter(function(t){return t!==e});g(n)}},hideSidebar:!!p}),F.createElement("div",{className:"builder-modal-main builder-flex-stack"},p&&F.createElement(Jp,{onBackLayoutList:function(e){return function(){return v(e)}}}),p?F.createElement(Fp,{selectedTemplate:p,onCloseModal:n}):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-d-flex builder-justify-content-between builder-px-2"},
F.createElement(qp,{searchText:s,onChange:N}),F.createElement("div",{className:"builder-layouts-filter-wrapper builder-w-100 builder-me-4"},F.createElement(Qo.ZP,{className:"builder-select-container builder-select-filter",classNamePrefix:"builder-select",isClearable:!1,placeholder:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_FILTER_PAGE"),value:O.page,options:_.pages.sort((a,b)=>a.label.trim().localeCompare(b.label)),onChange:function(e){C(Yp(Yp({},O),{},{page:e}))},menuPlacement:"auto",menuPosition:"fixed",
components:{IndicatorSeparator:function(){return null}}}),F.createElement("button",{type:"button",className:"builder-button ".concat(O.page||O.sortBy?"":"disabled"),onClick:function(){C({page:null,sortBy:null}),d("")}},Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_FILTER_RESET")))),O.page?A.length>0?F.createElement("div",{className:"builder-flex-auto builder-flex-stack-item-scrollable builder-position-relative"},F.createElement("div",{className:"builder-layout-list"},A.map(function(e,t){return F.createElement(Gp,
{key:t,layout:e,onCloseModal:n})}))):F.createElement("div",{className:"builder-d-flex builder-flex-auto builder-align-items-center builder-justify-content-center"},F.createElement(Ya,{message:Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_NO_LAYOUT_FOUND")})):F.createElement(Wp,{layoutList:A,setTemplateList:function(e){return function(t){var n,o;w(Yp(Yp({},_),{},"layouts"===e?{layouts:null!==(n=null==t?void 0:t.layouts)&&void 0!==n?n:[],pages:null!==(o=null==t?void 0:t.pages)&&void 0!==o?o:[]}:(0,B.Z)({},
e,t)))}}("layouts"),handleFetching:function(e){return i(e)},onShowLayoutDetails:function(e){return function(){return v(e)}}}))))},Qp=function(e){var t=e.open,n=e.onOpen,o=e.id;return F.createElement(Aa,{isOpen:t,onClose:function(){return n(!1)},cssClass:"builder-modal-dialog-centered",size:"lg"},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:function(){return n(!1)}},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_PERMISSION_MODAL_TITLE"))),
F.createElement("div",null,F.createElement("div",null,F.createElement("iframe",{src:"".concat(pagebuilder_base,"administrator/index.php?option=com_jpagebuilder&view=page&layout=edit&id=").concat(o,"&tmpl=component"),name:"editorIframe",title:"editor iframe",style:{width:"100%",height:"600px",border:"none"}}))),F.createElement(Ca,null,F.createElement("div",{className:"builder-d-flex justify-content-end builder-mt-3"},F.createElement("button",{type:"button",onClick:function(){return n(!1)},className:"builder-button builder-button-primary"},
Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_DIALOG_CANCEL_BUTTON")),F.createElement("button",{type:"button",className:"builder-button builder-button-primary builder-ms-2",onClick:function(){n(!1)}},Joomla.JText._("COM_JPAGEBUILDER_DASHBOARD_PAGES_APPLY"))))))};var ev=function(e){var t=e.field,n=e.onChange,o=e.defaultValue,r=(0,F.useState)(o||""),a=(0,j.Z)(r,2),i=a[0],l=a[1],c=function(e){l(e)};if(e.field.name=="published"&&i==="")i=0;switch((0,F.useEffect)(function(){n(i)},[i]),t.type.toLowerCase()){case "hidden":return F.createElement("input",
{name:t.name,type:"hidden",value:i,onChange:function(e){return c(e.target.value)}});case "text":return F.createElement(rs,{input:{name:t.name,value:i,onChange:function(e){return c(e)}},params:{title:t.label,desc:t.desc}});case "textarea":return F.createElement(as,{input:{name:t.name,value:i,onChange:function(e){return c(e)}},params:{title:t.label,desc:t.desc}});case "codeeditor":return F.createElement(Da,{input:{name:t.name,value:i,onChange:function(e){return c(e)}},params:{title:t.label,desc:t.desc}});
case "jpmedia":var s=i;if((0,yu.isString)(i))try{s=JSON.parse(i)}catch(e){s=i}return F.createElement(Il,{input:{name:t.name,value:s,onChange:function(e){return c(e)}},params:{title:t.label,desc:t.desc}});default:if(void 0!==(null==t?void 0:t.options)&&"object"===(0,de.Z)(t.options)){var d="accesslevel"===t.type?accessLevels:t.options.map(function(e){return{label:e.text,value:e.value}}),u=d.find(function(e){return e.value==i})||[];return F.createElement("div",{className:"builder-form-group"},F.createElement("label",
null,""!==t.desc?F.createElement(er.Z,{content:t.desc,tagName:"span"},t.label):t.label),F.createElement(Qo.ZP,{name:t.name,options:d,value:u,onChange:function(e){return c(e.value)},className:"builder-select-container",classNamePrefix:"builder-select"}))}return null}};const tv=function(e){var t,n=e.groupName,o=e.fields,r=e.changeData,a=e.validFields,i=e.defaultValues,l=(0,F.useState)(!1),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=o.find(function(e){return"asset_id"===e.name}),m=o.find(function(e){return"id"===
e.name}),p=Ee(u)&&!u.value;return"basic"===n?F.createElement(F.Fragment,null,o.map(function(e,t){return F.createElement("div",{className:"builder-form-control",key:t},a.includes(e.name)&&F.createElement(ev,{field:e,onChange:function(t){return r(e.name,t)},defaultValue:i[e.name]}))}),F.createElement("div",{className:"builder-form-control"},F.createElement("div",{className:"builder-form-group"},F.createElement("label",null,F.createElement("span",null,Joomla.JText._("COM_JPAGEBUILDER_PERMISSION_FIELD_LABEL"))),
F.createElement("div",null,F.createElement("button",{type:"button",className:"builder-button builder-button-primary",onClick:function(){return d(!0)},disabled:p},F.createElement(co,{name:"cog"})," ",Joomla.JText._("COM_JPAGEBUILDER_MANAGE_PERMISSION_BUTTON_LABEL")),p&&F.createElement("p",{className:"builder-text-caption"},Joomla.JText._("COM_JPAGEBUILDER_MANAGE_PERMISSION_HELP_MESSAGE")),F.createElement(Qp,{open:s,onOpen:d,id:Number(null!==(t=m.value)&&void 0!==t?t:0)}))))):o.map(function(e,t){return F.createElement("div",
{className:"builder-form-control",key:t},a.includes(e.name)&&F.createElement(ev,{field:e,onChange:function(t){return r(e.name,t)},defaultValue:i[e.name]}))})};function nv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ov(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nv(Object(n),!0).forEach(function(t){(0,B.Z)(e,
t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var rv={basic:Joomla.JText._("COM_JPAGEBUILDER_PAGE_SETTINGS_BASIC"),seo:Joomla.JText._("COM_JPAGEBUILDER_PAGE_SETTINGS_SEO"),pagecss:Joomla.JText._("COM_JPAGEBUILDER_PAGE_SETTINGS_CSS")},av=["id","title","catid","published","language","access","css","meta_title","meta_description","meta_keywords",
"robots","seo_spacer","og_type","og_title","og_image","og_description"];const iv=(0,Xn.$j)(function(e){return{groups:e.pageOptions.form,optionData:e.pageOptions.data}},function(e){return{setSettingsData:function(t){return e(Yi(t))}}})(function(e){var t=e.groups,n=e.dockState,o=e.optionData,r=e.onCloseOptionPanel,a=e.setSettingsData,i=e.updatePanelPosition,l=(0,F.useState)({id:0,title:"",catid:0,published:1,language:"*",access:1,css:"",meta_title:"",meta_description:"",meta_keywords:"",robots:"",seo_spacer:"",
og_type:"",og_title:"",og_image:"",og_description:""}),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(!1),m=(0,j.Z)(u,2),p=m[0],v=m[1];(0,F.useEffect)(function(){i()},[]),(0,F.useEffect)(function(){d(o)},[o]);var f=function(e,t){d(function(n){return ov(ov({},n),{},(0,B.Z)({},e,t))})},b=function(){var e=(0,Ct.Z)(Nt().mark(function e(t){var n,o,i;return Nt().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),v(!0),a(s),n=pagebuilder_base+"index.php?option=com_jpagebuilder&task=page.saveData&id="+
s.id,e.next=6,fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")},body:JSON.stringify({data:s})});case 6:return o=e.sent,e.next=9,o.json();case 9:i=e.sent,v(!1),i.status?(r(),ne(Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_MSG_FOR_PAGE_SAVE"),Joomla.JText._("COM_JPAGEBUILDER_SUCCESS_LEVEL"))):oe(i.message,Joomla.JText._("COM_JPAGEBUILDER_ERROR_LEVEL"));case 12:case "end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}();
return F.createElement("div",{className:"builder-modal builder-modal-editor-panel builder-sidebar"},F.createElement("div",{className:"builder-modal-dialog builder-modal-dialog-scrollable"},F.createElement(Cd,{handle:"#builder-options-header"},F.createElement("div",{className:"builder-modal-content"},F.createElement("div",{id:"builder-options-header",className:"builder-modal-header"},"float"===n&&F.createElement(co,{className:"builder-drag-button",name:"ellipsisDoubleY"}),F.createElement("span",{className:"builder-modal-header-title"},
Joomla.JText._("COM_JPAGEBUILDER_OPTIONS")),F.createElement(Mm,null),F.createElement("span",{className:"builder-close-button","aria-label":"Close",tabIndex:-1,role:"button",onKeyDown:ye,onClick:function(){r(),document.body.classList.remove("builder-panel-opened")}},F.createElement(co,{name:"times"}))),F.createElement("div",{className:"builder-modal-body"},Object.keys(t).length>0&&F.createElement(bd,{capitalizeHeader:!1},Object.keys(rv).map(function(e,n){return F.createElement(vd,{name:rv[e],key:n},
F.createElement("div",{className:"builder-mt-2"},F.createElement(tv,{fields:t[e],changeData:f,validFields:av,defaultValues:o,groupName:e})))}))),F.createElement("div",{className:"builder-modal-footer"},F.createElement("a",{href:"#",className:"builder-button builder-button-primary",onClick:b},p?F.createElement("div",{className:"builder-spinner builder-spinner-sm builder-spinner-white builder-me-2"}):F.createElement(co,{name:"saveLine"}),Joomla.JText._("COM_JPAGEBUILDER_SAVE")))))))}),lv=(0,Xn.$j)(function(e){return{tools:e.tools}},
function(e){return{setGlobalPanel:function(t){return e(fl(t))},duplicateDeepContentItem:function(t){return e(Zi(t))},removeRow:function(t){return e(ki(t))}}})(function(e){var t,n=e.currentPanel,o=e.updatePanelPosition,r=e.closeCurrentPanel,a=e.dockState,i=e.tools,l=e.setGlobalPanel,c=e.editPanelProps,s=e.duplicateDeepContentItem,d=e.removeRow,u=i.globalPanel,m=function(){return l({})},p=(0,Xn.v9)(function(e){return e.pageOptions.form.basic}),v=(0,F.useMemo)(function(){var e;if(!p)return[];var t=(null===
(e=p.find(function(e){return e.type&&"contentlanguage"===e.type}))||void 0===e?void 0:e.options)||[];return t.length>0?t.map(function(e){return{label:e.text,value:e.value}}):t},[p]);return(0,F.useEffect)(function(){n&&u.name===pv.layouts&&r()},[u.name]),n===mv.addElements?F.createElement(ep,{updatePanelPosition:o,onClose:r,dockState:a}):n===mv.options?F.createElement(iv,{updatePanelPosition:o,dockState:a,onCloseOptionPanel:r}):n===mv.savedItems?F.createElement(yp,{updatePanelPosition:o,dockState:a,
onCloseOptionPanel:r}):u.name===pv.layouts?F.createElement(Aa,{onClose:m,cssClass:"builder-modal-dialog-fixed builder-modal-xl builder-modal-dialog-centered builder-layouts-modal",size:"lg",isOpen:!0},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:m},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_LAYOUTS"))),F.createElement(Oa,{className:"builder-p-0 builder-overflow-hidden"},F.createElement($p,
{onCloseModal:m})))):u.name===pv.media?F.createElement(Aa,{onClose:m,cssClass:"builder-modal-dialog-fixed builder-modal-dialog-centered",size:"lg",isOpen:!0},F.createElement(Ia,null,F.createElement(xa,{className:"builder-modal-header-lg",showClose:!0,onClose:m},F.createElement("span",{className:"builder-modal-header-title"},Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER"))),F.createElement(yl,{client:"manager",type:null!==(t=null==u?void 0:u.mediaType)&&void 0!==t?t:"*",disableInsert:!0}))):n===mv.editPanel?
F.createElement(Bp,(0,ao.Z)({updatePanelPosition:o,dockState:a,reduxProps:{globalPanel:u,setGlobalPanel:l,duplicateDeepContentItem:s,removeRow:d,activeDevice:i.activeDevice,languageOptions:v}},c)):null});function cv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function sv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?
arguments[t]:{};t%2?cv(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var uv=10,mv={addElements:"addElements",editPanel:"editPanel",savedItems:"savedItems",layers:"layers",options:"options"},
pv={layouts:"layouts",media:"media"},vv=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t,
n;(0,J.Z)(this,r),n=o.call(this,e),(0,B.Z)((0,io.Z)(n),"updateBodyStackClass",function(e){var t=document.body.classList,n=["builder-stack-left","builder-stack-right","builder-stack-float"].filter(function(t){return t!=="builder-stack-".concat(e)});t.contains("builder-stack-".concat(e))||t.add("builder-stack-".concat(e));var o,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return dv(e,t);
var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dv(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}(n);try{for(r.s();!(o=r.n()).done;){var a=o.value;t.contains(a)&&t.remove(a)}}catch(e){r.e(e)}finally{r.f()}}),(0,B.Z)((0,io.Z)(n),"onMouseDown",function(e){if(0===e.button){var t=n.dragRef.current.offsetLeft,o=n.dragRef.current.offsetTop,r=e.clientX-t,a=e.clientY-o;n.setState({dragging:!0,relative:{left:r,
top:a}}),e.stopPropagation(),e.preventDefault()}}),(0,B.Z)((0,io.Z)(n),"onMouseUp",function(e){n.setState({dragging:!1}),localStorage.setItem("builderPanelPosition",JSON.stringify(n.state.position)),e.stopPropagation(),e.preventDefault()}),(0,B.Z)((0,io.Z)(n),"onMouseMove",function(e){var t;if("float"!==n.state.dockState){var o,r={left:0,top:0};if(null!==(o=n.dragRef)&&void 0!==o&&o.current){var a=n.dragRef.current.getBoundingClientRect();r.left=a.left,r.top=a.top}n.setState({dockState:"float",position:r}),
window.localStorage.setItem("builderDockState","float"),n.togglePanelOpenClass(!1),n.updateBodyStackClass("float")}if(n.state.dragging){if(n.state.dragging&&null!==(t=n.dragRef)&&void 0!==t&&t.current){var i=e.clientX-n.state.relative.left,l=e.clientY-n.state.relative.top,c=document.documentElement.clientWidth-n.dragRef.current.offsetWidth-uv-20,s=document.documentElement.clientHeight-n.dragRef.current.offsetHeight-uv-40,d=n.state.position;i>=uv&&i<=c&&(d.left=i,d.right=c-i),l>=uv&&l<=s&&(d.top=l,
d.down=window.innerHeight-l-uv-40),n.setState({position:d})}e.stopPropagation(),e.preventDefault()}}),(0,B.Z)((0,io.Z)(n),"toggleCurrentPanel",function(e){return function(){n.setCurrentPanel(n.state.currentPanel!==e?e:"")}}),(0,B.Z)((0,io.Z)(n),"handleDockStateChange",function(e){"left"===e?n.setState({position:{left:0,top:0}}):"right"===e?n.setState({position:{right:0,top:0}}):n.setState({position:{left:50,top:50}}),n.setState({dockState:e}),n.updateBodyStackClass(e),window.localStorage.setItem("builderDockState",
e)}),(0,B.Z)((0,io.Z)(n),"setEditRow",function(e){n.setState(function(t){return{editRow:sv(sv({},t.editRow),e)}})}),(0,B.Z)((0,io.Z)(n),"setLayers",function(e){var t="function"==typeof e?function(t){var n=t.layers;return{layers:e(n)}}:{layers:e};n.setState(t)}),(0,B.Z)((0,io.Z)(n),"setCurrentPanel",function(e){return n.setState({currentPanel:e})}),(0,B.Z)((0,io.Z)(n),"closeCurrentPanel",function(){return n.setState({currentPanel:""})}),(0,B.Z)((0,io.Z)(n),"closeGlobalPanel",function(){return n.props.setGlobalPanel({})}),
n.updateState=n.updateState.bind((0,io.Z)(n)),n.updateResponsiveData=n.updateResponsiveData.bind((0,io.Z)(n)),n.dragRef=(0,F.createRef)();var a=null!==(t=window.localStorage.getItem("builderDockState"))&&void 0!==t?t:"float";return n.state={isEditPanelOn:wr.show,addonToEdit:wr.addon,toggleType:wr.type,rowIndex:wr.rowIndex,innerRowIndex:wr.innerRowIndex,innerColIndex:wr.innerColIndex,colIndex:wr.colIndex,rowSettings:wr.rowSettings,colSettings:wr.colSettings,responsiveDevice:be.device,showSubTab:!1,
creatingPage:!1,openLayoutModal:!1,layoutActiveTab:"layouts",showAddonList:!1,showOptionPanel:!1,showMediaManager:!1,position:{left:0,top:0},dragging:!1,relative:null,dockState:a,showLayersPanel:!1,currentPanel:"",editRow:{open:!1,rowIndex:-1,rowId:null,targetElm:null,layout:"12"},layers:{},isLayerOpen:!1,layerPosition:{left:0,top:0},isLayerDragging:!1},n.iWindow=window.frames["jpagebuilder-view"].window,n.iDocument=n.iWindow.document,n}return(0,G.Z)(r,[{key:"togglePanelOpenClass",value:function(e){e?
document.body.classList.add("builder-panel-opened"):document.body.classList.remove("builder-panel-opened")}},{key:"componentDidMount",value:function(){var e=this;this.setState({layers:Lu({sections:this.props.pageBuilder.present})});var t=localStorage.getItem("builderPanelPosition"),n=t?JSON.parse(t):null,o=document.documentElement.clientHeight,r=document.documentElement.clientWidth;null!==n&&n.left<r&&n.top<o&&"float"===this.state.dockState?this.setState({position:n}):this.setState({position:{left:this.dragRef.current.offsetLeft,
top:this.dragRef.current.offsetTop,right:document.documentElement.clientWidth-this.dragRef.current.offsetWidth-uv-this.dragRef.current.offsetLeft,down:document.documentElement.clientHeight-this.dragRef.current.offsetTop-uv-40}}),this.updateBodyStackClass(this.state.dockState),document.getElementById("jpagebuilder-view").style.pointerEvents=this.state.dragging?"none":"auto",wr.on("change",this.updateState),be.on("change",this.updateResponsiveData),document.addEventListener("click",function(t){const addonEditorSettingsPanel=
document.querySelector("div.builder-modal.builder-sidebar div.builder-modal-content");if(addonEditorSettingsPanel){const rect=addonEditorSettingsPanel.getBoundingClientRect();const coordinates={top:rect.top-50,left:rect.left,right:rect.right,bottom:rect.bottom,width:rect.width,height:rect.height};localStorage.setItem("builderSettingsPanelPosition",JSON.stringify(coordinates))}void 0===e.refs.jpbdropdown||e.refs.jpbdropdown==t.target||e.refs.jpbdropdown.contains(t.target)||e.setState({showSubTab:!1})}),
(0,Ct.Z)(Nt().mark(function t(){var n,o,r,a;return Nt().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getPageSettingsForm();case 2:return n=t.sent,t.next=5,n.json();case 5:o=t.sent,r=["id","title","catid","published","language","access","css","meta_title","meta_description","meta_keywords","robots","seo_spacer","og_type","og_title","og_image","og_description","extension","extension_view"],o.status&&(e.props.loadPageSettingsForm(o.data),a=Object.values(o.data).flatMap(function(e){return e}).filter(function(e){return r.includes(e.name)}).reduce(function(e,
t){var n=t.name,o=t.value;return sv(sv({},e),{},(0,B.Z)({},n,o||""))},{}),[0,"0",""].includes(null==a?void 0:a.access)?e.props.loadPageSettingsData(sv(sv({},a),{},{access:"1"})):e.props.loadPageSettingsData(a));case 8:case "end":return t.stop()}},t)}))(),window.addEventListener("triggerAddonPanel",function(t){var n;void 0!==(null==t||null===(n=t.detail)||void 0===n?void 0:n.currentPanel)&&e.setCurrentPanel(t.detail.currentPanel)}),this.props.setCopiedDataStatus()}},{key:"componentDidUpdate",value:function(e,
t){var n=document.getElementById("jpagebuilder-view"),o=this.state,r=o.dragging,a=o.position,i=o.dockState,l=o.currentPanel;if(e.pageBuilder.present!==this.props.pageBuilder.present){var c=Lu({sections:this.props.pageBuilder.present,previousTree:t.layers});this.setState({layers:c})}r&&!t.dragging?(document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.onMouseUp),n.style.pointerEvents="none"):!r&&t.dragging&&(document.removeEventListener("mousemove",this.onMouseMove),
document.removeEventListener("mouseup",this.onMouseUp),n.style.pointerEvents="auto"),"float"===i?(this.dragRef.current.style.left="".concat(a.left,"px"),this.dragRef.current.style.top="".concat(a.top,"px")):this.dragRef.current.removeAttribute("style"),i!==t.dockState&&this.updatePanelPosition("componentDidUpdate"),this.togglePanelOpenClass(!!l)}},{key:"updatePanelPosition",value:function(caller){var e,t=document.querySelector(".builder-modal-dialog-scrollable > .builder-modal-content");if(t){var n=
t.getBoundingClientRect().width,o=null===(e=this.dragRef)||void 0===e||null===(e=e.current)||void 0===e?void 0:e.getBoundingClientRect(),r="float"===this.state.dockState,a=r?uv:0;if(L){if("right"===this.state.dockState)return void t.removeAttribute("style");var i=document.querySelector(".builder-modal.builder-sidebar");if("left"===this.state.dockState)return t.removeAttribute("style"),void(i.style="display: flex; justify-content: left;");i.removeAttribute("style");var l=r?window.iWindow.innerWidth-
o.left-o.width-n-a:window.iWindow.innerWidth-n+o.width;t.style.top="".concat(o.top-40,"px"),t.style.right="".concat(l,"px")}else{if(!r)return void t.removeAttribute("style");n+o.left+o.width>window.innerWidth?t.style.left="".concat(o.left-n-a,"px"):t.style.left="".concat(o.left+o.width+a,"px"),t.style.top="".concat(o.top-50,"px")}const builderPanelSessionPosition=JSON.parse(localStorage.getItem("builderSettingsPanelPosition"));if(builderPanelSessionPosition&&caller!="componentDidUpdate"){const addonEditorSettingsPanel=
document.querySelector("div.builder-modal.builder-sidebar div.builder-modal-content");if(addonEditorSettingsPanel){addonEditorSettingsPanel.style.top=`${builderPanelSessionPosition.top}px`;addonEditorSettingsPanel.style.left=`${builderPanelSessionPosition.left}px`}}}}},{key:"getPageSettingsForm",value:function(){var e=document.getElementById("jpagebuilder").dataset.pageid,t=pagebuilder_base+"index.php?option=com_jpagebuilder&task=page.getPageForm&id="+e;const svgIcon=`<div class="builder-loadingOverlay"><svg version="1.1" id="L7" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
                                  		  viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
                                  		 <path fill="#444" d="M31.6,3.5C5.9,13.6-6.6,42.7,3.5,68.4c10.1,25.7,39.2,38.3,64.9,28.1l-3.1-7.9c-21.3,8.4-45.4-2-53.8-23.3
                                  		  c-8.4-21.3,2-45.4,23.3-53.8L31.6,3.5z">
                                  		      <animateTransform 
                                  		         attributeName="transform" 
                                  		         attributeType="XML" 
                                  		         type="rotate"
                                  		         dur="2s" 
                                  		         from="0 50 50"
                                  		         to="360 50 50" 
                                  		         repeatCount="indefinite" />
                                  		  </path>
                                  		 <path fill="#444" d="M42.3,39.6c5.7-4.3,13.9-3.1,18.1,2.7c4.3,5.7,3.1,13.9-2.7,18.1l4.1,5.5c8.8-6.5,10.6-19,4.1-27.7
                                  		  c-6.5-8.8-19-10.6-27.7-4.1L42.3,39.6z">
                                  		      <animateTransform 
                                  		         attributeName="transform" 
                                  		         attributeType="XML" 
                                  		         type="rotate"
                                  		         dur="1s" 
                                  		         from="0 50 50"
                                  		         to="-360 50 50" 
                                  		         repeatCount="indefinite" />
                                  		  </path>
                                  		 <path fill="#444" d="M82,35.7C74.1,18,53.4,10.1,35.7,18S10.1,46.6,18,64.3l7.6-3.4c-6-13.5,0-29.3,13.5-35.3s29.3,0,35.3,13.5
                                  		  L82,35.7z">
                                  		      <animateTransform 
                                  		         attributeName="transform" 
                                  		         attributeType="XML" 
                                  		         type="rotate"
                                  		         dur="2s" 
                                  		         from="0 50 50"
                                  		         to="360 50 50" 
                                  		         repeatCount="indefinite" />
                                  		  </path>
                                  		</svg></div>`;let loadingContainers=document.createElement("div");loadingContainers.classList.add("builder-loadingContainer");loadingContainers.innerHTML=`<div class="builder-loadingSection">${svgIcon}</div>`;const body=document.querySelector("body");body.appendChild(loadingContainers);return fetch(t,{headers:{"Content-Type":"application/json","X-CSRF-Token":Joomla.getOptions("csrf.token")}})}},{key:"componentWillUnmount",value:function(){wr.removeListener("change",
this.updateState),be.removeListener("change",this.updateResponsiveData)}},{key:"updateState",value:function(){this.setState({isEditPanelOn:wr.show,addonToEdit:wr.addon,toggleType:wr.type,rowIndex:wr.rowIndex,innerRowIndex:wr.innerRowIndex,innerColIndex:wr.innerColIndex,colIndex:wr.colIndex,rowSettings:wr.rowSettings,colSettings:wr.colSettings}),wr.show?this.setCurrentPanel(mv.editPanel):this.state.currentPanel!==mv.layers&&this.closeCurrentPanel()}},{key:"updateResponsiveData",value:function(){var e=
{xl:"builder-iframe-laptop",lg:"builder-iframe-tablet-landscape",md:"builder-iframe-tablet",sm:"builder-iframe-mobile-landscape",xs:"builder-iframe-mobile"},t=document.getElementById("jpagebuilder-view").classList;t.add(e[be.device]),Object.entries(e).forEach(function(e){var n=(0,j.Z)(e,2),o=n[0],r=n[1];o!==be.device&&t.contains(r)&&t.remove(r)}),this.setState({responsiveDevice:be.device})}},{key:"updateAddonToEditFormData",value:function(e){var t,n=null===(t=this.state.addonToEdit)||void 0===t||
null===(t=t.settings)||void 0===t?void 0:t.formData;JSON.stringify(e)!==JSON.stringify(n)&&this.setState({addonToEdit:sv(sv({},this.state.addonToEdit),{},{settings:sv(sv({},this.state.addonToEdit.settings),{},{formData:e})})})}},{key:"saveDynamicSettings",value:function(e){var t,n,o,r,a,i,l={type:this.state.toggleType,index:this.state.addonToEdit.index,settings:{rowIndex:this.state.addonToEdit.settings.rowIndex,colIndex:this.state.addonToEdit.settings.colIndex,addonIndex:this.state.addonToEdit.settings.addonIndex,
addonId:this.state.addonToEdit.settings.addonId,htmlContent:this.state.addonToEdit.settings.htmlContent,assets:this.state.addonToEdit.settings.assets,addonName:this.state.addonToEdit.settings.addonName,formData:e,deepAddon:null===(t=this.state.addonToEdit.settings)||void 0===t?void 0:t.deepAddon,deepAddonItemKey:null===(n=this.state.addonToEdit.settings)||void 0===n?void 0:n.deepAddonItemKey,deepAddonItemIndex:null===(o=this.state.addonToEdit.settings)||void 0===o?void 0:o.deepAddonItemIndex,deepAddonIndex:null===
(r=this.state.addonToEdit.settings)||void 0===r?void 0:r.deepAddonIndex,collectionItemIndex:null===(a=this.state.addonToEdit.settings)||void 0===a?void 0:a.collectionItemIndex,collectionItemAddonIndex:null===(i=this.state.addonToEdit.settings)||void 0===i?void 0:i.collectionItemAddonIndex}};document.body.classList.add("jpb-loading-btn-active"),this.updateAddonToEditFormData(e),jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=addon",dataType:"json",
data:{addon:{id:l.settings.addonId,settings:e,name:l.settings.addonName}},cache:!1,success:function(e){l.settings.htmlContent=e.html,l.settings.assets=e.assets,this.props.onSettingsClick(l),document.body.classList.remove("jpb-loading-btn-active")}.bind(this)})}},{key:"saveSettings",value:function(e){if("addon"===this.state.toggleType){var t,n,o,r,a,i,l;this.updateAddonToEditFormData(e);var c={type:this.state.toggleType,index:this.state.addonToEdit.index,settings:{rowIndex:this.state.addonToEdit.settings.rowIndex,
colIndex:this.state.addonToEdit.settings.colIndex,addonIndex:this.state.addonToEdit.settings.addonIndex,addonId:this.state.addonToEdit.settings.addonId,htmlContent:this.state.addonToEdit.settings.htmlContent,assets:this.state.addonToEdit.settings.assets,addonName:this.state.addonToEdit.settings.addonName,formData:e,deepAddon:null===(t=this.state.addonToEdit.settings)||void 0===t?void 0:t.deepAddon,deepAddonItemKey:null===(n=this.state.addonToEdit.settings)||void 0===n?void 0:n.deepAddonItemKey,deepAddonItemIndex:null===
(o=this.state.addonToEdit.settings)||void 0===o?void 0:o.deepAddonItemIndex,deepAddonItemInnerIndex:null===(r=this.state.addonToEdit.settings)||void 0===r?void 0:r.deepAddonItemInnerIndex,deepAddonIndex:null===(a=this.state.addonToEdit.settings)||void 0===a?void 0:a.deepAddonIndex,collectionItemIndex:null===(i=this.state.addonToEdit.settings)||void 0===i?void 0:i.collectionItemIndex,collectionItemAddonIndex:null===(l=this.state.addonToEdit.settings)||void 0===l?void 0:l.collectionItemAddonIndex}};
window.jpbNoAddonAutoOpenSection=true;addonsJSON[this.state.addonToEdit.settings.addonName].js_template?this.props.onSettingsClick(c,false):(document.body.classList.add("jpb-loading-btn-active"),jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=addon",dataType:"json",data:{addon:{id:c.settings.addonId,settings:e,name:c.settings.addonName}},cache:!1,success:function(e){c.settings.htmlContent=e.html,c.settings.assets=e.assets,this.props.onSettingsClick(c),
document.body.classList.remove("jpb-loading-btn-active")}.bind(this)}))}else if("row"===this.state.toggleType){var s={type:this.state.toggleType,index:this.state.rowIndex,settings:{colIndex:this.state.colIndex,addonIndex:this.state.innerRowIndex,formData:e}};this.props.onSettingsClick(s)}else if("column"===this.state.toggleType){var d={type:this.state.toggleType,index:this.state.rowIndex,settings:{formData:e,colIndex:this.state.colIndex,addonIndex:this.state.innerRowIndex,innerColIndex:this.state.innerColIndex}};
this.props.onSettingsClick(d)}}},{key:"hideEditPanel",value:function(){this.closeCurrentPanel(),wr.hideEditPanel()}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageBuilder,o=t.clickUndo,r=t.clickRedo,a=this.state,i=a.responsiveDevice,l=a.editRow,c=a.currentPanel,s=this.props.tools.globalPanel,d="1223123124142134";"addon"!==this.state.toggleType||pe()(this.state.addonToEdit)?"row"===this.state.toggleType?d=this.state.rowSettings.id:"column"==this.state.toggleType&&(d=this.state.colSettings.id):
d=this.state.addonToEdit.settings.addonId;var u={setCurrentPanel:this.setCurrentPanel,dockState:this.state.dockState,setDockState:this.handleDockStateChange,layers:this.state.layers,setLayers:this.setLayers,editRow:this.state.editRow,setEditRow:this.setEditRow};return F.createElement(xd.Provider,{value:u},F.createElement(F.Fragment,null,F.createElement(Tm,{pageBuilder:n,responsiveDevice:i,clickUndo:o,clickRedo:r}),F.createElement("div",{className:"builder-panel".concat("float"!==this.state.dockState?
" builder-panel-stack-left":""),id:"builder-panel",ref:this.dragRef},F.createElement("div",{className:"builder-panel-handle",role:"button",onMouseDown:this.onMouseDown,onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"ellipsisDoubleX"})),F.createElement("div",{className:"builder-panel-items"},F.createElement("div",{className:"builder-panel-items-top-wrapper"},F.createElement("div",{className:"builder-panel-item".concat(c===mv.addElements||c===mv.editPanel?" active":""),onClick:this.toggleCurrentPanel(mv.addElements),
role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"plusCircleDuo",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_ADD_ELEMENTS")),F.createElement("div",{className:"builder-panel-item".concat(this.state.isLayerOpen?" active":""),onClick:function(){return e.setState({isLayerOpen:!e.state.isLayerOpen})},role:"presentation"},F.createElement(co,{name:"layersDuo",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_LAYERS")),F.createElement("div",{className:"builder-panel-item".concat(s.name===
pv.layouts?" active":""),onClick:function(){e.setState({layoutActiveTab:"layouts",currentPanel:""}),e.props.setGlobalPanel({name:pv.layouts})},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"layoutsDuo",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_GLOBAL_LAYOUTS")),F.createElement("div",{className:"builder-panel-item".concat(c===mv.savedItems?" active":""),onClick:this.toggleCurrentPanel(mv.savedItems),role:"presentation"},F.createElement(co,{name:"cubeDuo",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_LAYOUT_SAVED_ITEM")),
F.createElement("div",{className:"builder-panel-item",onClick:function(t){t.preventDefault(),e.setState({currentPanel:""}),e.props.setGlobalPanel({name:pv.media})},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"mediaDuo",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_MEDIA")),F.createElement("div",{className:"builder-panel-item".concat(c===mv.options?" active":""),onClick:function(t){t.preventDefault(),e.setState(function(e){return{currentPanel:e.currentPanel===mv.options?"":mv.options}}),
c===mv.options?document.body.classList.add("builder-panel-opened"):c||document.body.classList.remove("builder-panel-opened")},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"toolsDuo",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_ACTION_PANEL_ITEM_PAGE_SETTINGS")),"float"!==this.state.dockState&&F.createElement("div",{className:"builder-panel-item builder-panel-item-broom ".concat(this.props.copiedData.isCopiedItemsAvailable?"broom-active":"disabled"),title:Joomla.JText._("COM_JPAGEBUILDER_EDITOR_ACTION_PANEL_CLEAR_CLIPBOARD_TOOLTIP"),
onClick:function(){e.props.clearCopiedData()},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"trash",size:"2x"}),Joomla.JText._("COM_JPAGEBUILDER_EDITOR_ACTION_PANEL_CLEAR_CLIPBOARD"),F.createElement("span",{className:"builder-panel-item-ripple"}))))),F.createElement(lv,{currentPanel:c,updatePanelPosition:this.updatePanelPosition.bind(this),closeCurrentPanel:this.closeCurrentPanel,dockState:this.state.dockState,editPanelProps:{uniqueId:d,onCloseEditPanel:function(){return e.hideEditPanel()},
addon:this.state.addonToEdit,onSaveSettings:this.saveSettings.bind(this),onDynamicSettings:this.saveDynamicSettings.bind(this),toggleType:this.state.toggleType,rowSettings:this.state.rowSettings.settings||{},colSettings:this.state.colSettings.settings||{}}}),this.state.isLayerOpen&&F.createElement(wm,{onClose:function(){return e.setState({isLayerOpen:!1})},currentPanel:this.state.currentPanel}),l.open&&F.createElement(Qd,{open:l.open,targetElm:l.targetElm,rowIndex:l.rowIndex,rowId:l.rowId,closeDropdown:function(){return e.setEditRow({open:!1})},
currentLayout:l.layout,updateLayout:!0})))}}]),r}(F.Component);const fv=(0,Xn.$j)(function(e){return{pageBuilder:e.pageBuilder,addonList:e.addonList,tools:e.tools,copiedData:e.copiedData}},function(e){return{clickUndo:function(){return e({type:"UNDO_PAGE_BUILDER"})},clickRedo:function(){return e({type:"REDO_PAGE_BUILDER"})},onSettingsClick:function(t,openSection){t.settings.openSection=openSection;return e(zi(t),openSection)},loadPageSettingsForm:function(t){return e({type:"SET_PAGE_SETTINGS_FORM",
payload:t})},loadPageSettingsData:function(t){return e(Yi(t))},setGlobalPanel:function(t){return e(fl(t))},setCopiedDataStatus:function(){return e({type:"SET_COPIED_DATA_STATUS"})},clearCopiedData:function(){return e({type:"CLEAR_COPIED_DATA"})}}})(vv);var bv,hv,gv,Ev,yv,_v=n(4841),wv=n.n(_v);function xv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Iv=function(e){var t=e.id,n=e.styleFn,o=e.neg;return je.filter(function(e){return e!==m}).map(function(e){var r=
"";return pe()(n(e))||(r+=Xe(e),r+=ou(t)(hv||(hv=(0,wu.Z)(["\n\t\t\t\t\t","\n\t\t\t\t"])),n(e,o)),r+="}"),r}).join("\n")};function Ov(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(t in e))return"";var o=e[t];if("object"===(0,de.Z)(o)){var r=o.ho?"".concat(o.ho,"px"):"0px",a=o.vo?"".concat(o.vo,"px"):"0px",i=o.blur?"".concat(o.blur,"px"):"0px",l=n?" ":o.spread?"".concat(o.spread,"px"):"0px",c=o.color||"";return function(e){if(!e)return!1;"string"==typeof e&&(e=e.replace(/\s+/g,
" ").split(" "),e={ho:parseFloat(e[0]),vo:parseFloat(e[1]),blur:parseFloat(e[2]),spread:parseFloat(e[3]),color:e[4]});var t=["ho","vo","blur","spread"];if("object"===(0,de.Z)(e)){if(void 0!==e.enabled)return e.enabled;for(var n in e){if(t.includes(n)){var o=parseFloat(e[n]);if(!isNaN(o)&&0!==o)return!0}if("color"===n){var r=e[n].toLowerCase();return!("#fff"===r||"#ffffff"===r)}}}return!1}(o)?"".concat(r," ").concat(a," ").concat(i," ").concat(l," ").concat(c):""}return"0 0 0 0 #fff"===o?"":o}function Cv(e,
t,n){var o,r=null!==(o=t[n])&&void 0!==o?o:null,a="",i="";if(null===r)return"";var l=["xl","lg","md","sm","xs"],c=!1;for(var s in r)if(l.includes(s)){c=!0;break}if(c){var d,u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===
n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xv(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},
e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}(l);try{for(u.s();!(d=u.n()).done;){var p=d.value;if(r[p]){var v,f,b,h=r[p],g=null!==(v=h.border_width)&&void 0!==v?v:"",E=null!==(f=h.border_style)&&void 0!==f?f:"",y=null!==(b=h.border_color)&&void 0!==b?b:"",_=g.split(" ");if(0===_.length)continue;var w;w=1===_.length?"border: ".concat(g," ").concat(E," ").concat(y,";"):Av(_,E,y);var x="";m===p?(x+="".concat(e," {"),x+=w,x+="}"):(x+=Xe(p),x+="".concat(e,
" {"),x+=w,x+="}",x+="}"),i+=x}}}catch(e){u.e(e)}finally{u.f()}}else{var I,O,C,A=null!==(I=r.border_width)&&void 0!==I?I:"",N=null!==(O=r.border_style)&&void 0!==O?O:"",D=null!==(C=r.border_color)&&void 0!==C?C:"",S=A.split(" ");if(0===S.length)return"";var P;P=1===S.length?"border: ".concat(A," ").concat(N," ").concat(D,";"):Av(S,N,D),a="".concat(e," {"),a+=P,a+="}"}return{borderStyle:a,responsiveBorderStyle:i}}function Av(e,t,n){var o=["top","right","bottom","left"],r=[];return e.forEach(function(e,
a){""!==e.trim()&&r.push("border-".concat(o[a],": ").concat(e," ").concat(t," ").concat(n,";"))}),r.join("\n")}const Nv=function(e){var t,n,o,r,a=e.row,i=e.column,l=e.addon,c=e.rowIndex,s=e.colIndex,d=e.index,u=(0,F.useRef)(null),p=(0,Xn.v9)(function(e){return e.pageBuilder.present}),v=(0,Xn.I0)(),f=(0,F.useRef)(null),b=(0,F.useState)(window.builderDefaultDevice),h=(0,j.Z)(b,2),g=h[0],E=h[1],y=_u(l),_=function(e,t){return(0,F.useMemo)(function(){var t=e.settings,n="#jpb-addon-".concat(e.id),o=[],
r=t.global_custom_position,a=t.global_seclect_position,i=t.global_addon_position_top,l=t.global_addon_position_left,c=t.global_addon_z_index;if(void 0!==(0,de.Z)(r)&&r){var s,d,u,p,v,f,b,h=at(i)&&at(i.unit)?i.unit:"px",g=at(l)&&at(l.unit)?l.unit:"px";"absolute"!==a&&"fixed"!==a||(s="margin: 0;"),"absolute"===a&&(p="position: absolute;"),"fixed"===a&&(p="position: fixed;"),fe()(i)&&(d=i[window.builderDefaultDevice]?"top: ".concat(i[window.builderDefaultDevice]).concat(h,";"):"",f=Iv({id:n,styleFn:function(e){return i[e]?
"top: ".concat(i[e]).concat(h,";"):""}})),fe()(l)&&(u=l[window.builderDefaultDevice]?"left: ".concat(l[window.builderDefaultDevice]).concat(g,";"):"",b=Iv({id:n,styleFn:function(e){return l[e]?"left: ".concat(l[e]).concat(g,";"):""}})),c&&(v="z-index: ".concat(c,";"));var E=ou(n)(bv||(bv=(0,wu.Z)(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"])),s,d,u,p,v);o.push(E),o.push(f),o.push(b)}var y=function(e,t,n){var o=t.settings,r=o.enable_scroller,a=o.grid_columns,i=o.gap_x,
l=o.gap_y,c=function(e){var t="",n="",o="",r=a[e];r&&(t="grid-template-columns: repeat(".concat(r,", 1fr);"));var c=fe()(l)?l[e]:"";c&&(n="row-gap: ".concat(c,"px;"));var s=fe()(i)?i[e]:"";return s&&(o="column-gap: ".concat(s,"px;")),"\n    ".concat(t,"\n    ").concat(n,"\n    ").concat(o,"\n    ")},s="";if(Ie(r)){var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",o=fe()(i)?i[e]:"";return o&&(n="margin-right: ".concat(t?"-".concat(o):o,"px;")),"\n      ".concat(n,
"\n      ")},u=".jpagebuilder-addon.builder-collection-addon .builder-collection .slick-slide",p=".jpagebuilder-addon.builder-collection-addon .builder-collection .slick-list";s="\n      ".concat(u," {\n        ").concat(d(m),"\n      }\n      ").concat(p," {\n        ").concat(d(m,!0),"\n      }\n    ");var v=Iv({id:u,styleFn:d});s+=v+=Iv({id:p,styleFn:d})}else s=ou(e)(gv||(gv=(0,wu.Z)(["\n      ","\n      ","\n    "])),"display:grid;",c(m));return s+Iv({id:e,styleFn:c,neg:!0})}(n,e);return o.push(y),
o.join("\n")},[e.settings,t])}(l,g),w=function(e,t){return(0,F.useMemo)(function(){var t=[],n=function(e,t){var n=t.settings,o=n.background,r=n.padding,a=n.border_radius,i=n.background_hover,l=n.border_radius_hover,c=window.getMarginPadding(r,"padding"),s=Cv(e,n,"border"),d=ou(e)(Ev||(Ev=(0,wu.Z)(["\n  ","\n  border-radius: ",";\n  background-color: ",";\n  box-shadow: ",";\n  transition: all 200ms ease-in;\n  ","\n  "])),c[m],fe()(a)?"".concat(a[m],"px"):"".concat(a,"px"),o,Ov(n,"box_shadow"),s.borderStyle);
s.responsiveBorderStyle&&(d+=s.responsiveBorderStyle);var u=Iv({id:e,styleFn:function(e){var t="",n=fe()(c)?c[e]:c,o=fe()(a)?a[e]:a;return n&&(t+=n),o&&(t+="border-radius: ".concat(o,"px")),"\n    ".concat(t,"\n    ")}});d+=u;var p=Cv(e,n,"border_hover");return d+=ou("".concat(e,":hover"))(yv||(yv=(0,wu.Z)(["\n  background-color: ",";\n  border-radius: ",";\n  box-shadow: ",";\n  ","\n  "])),i,fe()(l)?"".concat(l[m],"px"):"".concat(l,"px"),Ov(n,"box_shadow_hover"),p.borderStyle),p.responsiveBorderStyle&&
(d+=p.responsiveBorderStyle),d}("#jpb-addon-".concat(e.id," .collection-item"),e);return t.push(n),t.join("\n")},[e.settings,t])}(l,g),x=function(e,t){return(0,F.useMemo)(function(){var n=e.settings,o=n.enable_scroller,r=void 0!==o&&o,a=n.items_per_slide,i=n.slides_to_scroll,l=n.show_indicators,c=void 0===l||l,s=n.gap_x,d=Ie(r),u=3;at(a)&&at(a[t])&&(u=a[t]);var m=0;at(s)&&at(s[t])&&(m=s[t]);var p=1;return at(i)&&at(i[t])&&(p=i[t]),{enableSlideshow:d,itemsPerSlide:u,slidesToScroll:p,showIndicators:Ie(c),
slideGap:m}},[e.settings,t])}(l,g),I=x.enableSlideshow,O=x.showIndicators,C=x.itemsPerSlide,A=x.slidesToScroll,N=x.slideGap,D=xu(l,g),S=function(){E(be.device)};(0,F.useEffect)(function(){return be.on("change",S),function(){be.removeListener("change",S)}},[]),(0,F.useEffect)(function(){var e=null;if(f.current){var t=Number.isNaN(C)?3:wv()(C),n=Number.isNaN(A)?1:wv()(A),o=Number.isNaN(N)?0:wv()(N),r=Ie(O);e=jQuery(f.current).bxSlider({mode:"horizontal",minSlides:t,maxSlides:t,moveSlides:n,infiniteLoop:!0,
adaptiveHeight:!0,slideMargin:o,pager:r,controls:!0,nextText:"<i class='fa fa-angle-right' aria-hidden='true'></i>",prevText:"<i class='fa fa-angle-left' aria-hidden='true'></i>",nextSelector:u.current.querySelector("#jpb-addon-".concat(l.id,".builder-collection .arrow-next")),prevSelector:u.current.querySelector("#jpb-addon-".concat(l.id,".builder-collection .arrow-prev")),slideWidth:1140,auto:!1,autoHover:!0,touchEnabled:!1})}return function(){at(e)&&e.destroySlider()}},[I,C,A,N,O]);var P=(0,qn.L)({accept:eo,
hover:function(e,t){var n;if("ADD_ADDON"===(null==e?void 0:e.type)||"MOVE_ADDON"===(null==e?void 0:e.type)){Ue(window.iDocument,".builder-collection-placeholder");var o=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect(),r=(o.bottom-o.top)/2,c=t.getClientOffset().y-o.top;if(e.id!==l.id&&t.isOver({shallow:!0})){if($e(p,i.addons,e,l,a))return;(c===r||Math.abs(c-r)<10)&&u.current.classList.add("builder-collection-placeholder")}}},drop:function(e,t){if(("ADD_ADDON"!==(null==e?void 0:e.type)&&
"MOVE_ADDON"!==(null==e?void 0:e.type)||!t.didDrop())&&("ADD_ADDON"===(null==e?void 0:e.type)||"MOVE_ADDON"===(null==e?void 0:e.type))){var n=t.getDropResult();if(e.id!==l.id&&!(t.isOver({shallow:!0})&&$e(p,i.addons,e,l,a)||null!=n&&n.type)){if("MOVE_ADDON"===(null==e?void 0:e.type)){var o={dragRowId:e.rowId,dragColumnId:e.columnId,dragAddonId:e.id},r={hoverRowId:a.id,hoverColumnId:i.id,hoverAddonId:l.id,position:"bottom",element:"div"};v(Xi(o,r))}return Ue(window.iDocument,".builder-collection-placeholder"),
Ue(window.iDocument,".builder-addon-placeholder"),{type:"addon",status:!0,index:d,rowIndex:Ge(a.id),colIndex:He(a.id,i.id),parentAddon:l,dropPosition:"bottom"}}}},canDrop:function(e,t){var n,o=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect(),r=(o.bottom-o.top)/2,a=t.getClientOffset().y-o.top;return!(a!==r&&Math.abs(a-r)>10||"ADD_ADDON"!==(null==e?void 0:e.type)&&"MOVE_ADDON"!==(null==e?void 0:e.type)||"row"===e.name||"column"===e.name)}}),k=(0,j.Z)(P,2)[1],R=function(){wr.resetAll();
var e=new CustomEvent("triggerAddonPanel",{detail:{row:a,column:i,currentPanel:mv.addElements}});window.dispatchEvent(e)},T=null!==(t=l.settings)&&void 0!==t&&t.class?" ".concat(l.settings.class):"";T+=null!==(n=l.settings)&&void 0!==n&&n.enable_scroller?" scroller":"";var L=(null!==(o=null===(r=l.items)||void 0===r?void 0:r[0])&&void 0!==o?o:[]).length?"":" empty-collection-addon",M="builder-collection".concat(T).concat(L),Z=Ut(l.settings),B=Z.animationClass,J=Z.animationAttr;k(u);var G=function(){var e,
t,n=null!==(e=null===(t=l.items)||void 0===t?void 0:t[0])&&void 0!==e?e:[];return 0===n.length?F.createElement("span",{onClick:R,className:"builder-button builder-button-outline builder-button-round",role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"plus"})):Ht(6).map(function(e,t){return F.createElement("div",{key:t,className:"collection-item"},n.map(function(e,n){return e.parent?null:F.createElement(mf,{key:"".concat(e.id,"-").concat(t,"-").concat(n),id:e.id,rowIndex:c,addon:e,column:i,
row:a,colIndex:s,index:d,collectionItemIndex:t,collectionItemAddonIndex:n,collectionAddonId:l.id})}))})};return F.createElement(F.Fragment,null,F.createElement("div",{dangerouslySetInnerHTML:{__html:y}}),F.createElement("style",null,D),F.createElement("style",null,_),F.createElement("style",null,w),F.createElement(Eu,{rowId:a.id,columnId:i.id,addon:l,mouseInteraction:!0,scrollInteraction:!0}),F.createElement("div",(0,ao.Z)({ref:u,onFocus:function(e){e.stopPropagation(),Ve(e.target.parentNode,"builder-collection-is-hovered")},
onBlur:function(e){e.stopPropagation(),We(e.target.parentNode,"builder-collection-is-hovered")},id:"jpb-addon-".concat(l.id),className:"".concat(M," ").concat(B)},J),F.createElement("div",{className:"builder-addon-tools"},F.createElement("span",{className:"builder-button builder-button-primary builder-button-round",onClick:function(e){var t;e.stopPropagation(),e.preventDefault();var n=null===(t=addonsJSON)||void 0===t?void 0:t[l.name];if(void 0!==n){var o=void 0!==(null==n?void 0:n.inline),r={rowIndex:c,
colIndex:s,addonIndex:d,addonId:l.id,htmlContent:l.htmlContent,assets:l.assets,addonName:l.name,formData:l.settings},m={type:"addon",index:c,settings:r,row:a,column:i,addon:l};if(o){if(ko.show&&ko.addonId===m.settings.addonId)return;wr.resetAll(),ko.reset(),ko.setAddon(K()(m)),ko.setType("addon"),ko.setConfig(n.inline),ko.setPosition(u.current.getBoundingClientRect()),ko.showEditor()}else ko.reset(),wr.resetAll(),wr.setAddon(m),wr.setType("addon"),wr.showEditPanel()}},role:"button",onKeyDown:ye,tabIndex:0},
F.createElement(co,{name:"ellipsisX","area-hidden":"true"}))),I?F.createElement(F.Fragment,null,F.createElement("div",{className:"jpb-productlist-slideshow-arrows"},F.createElement("span",{className:"arrow-prev"}),F.createElement("span",{className:"arrow-next"})),F.createElement("div",{ref:f,className:"jpb-productlist-slideshow-wrap","data-enable-slideshow":I,"data-items-per-slide":C,"data-slides-to-scroll":A,"data-show-indicator":O},G())):G()))};var Dv=function(e){var t=e.isOpen,n=e.row,o=e.column,
r=e.onDisable,a=e.openColumnOption,i=e.onDelete,l=e.columnEl,c=(0,F.useState)({top:0,left:"100%"}),s=(0,j.Z)(c,2),d=s[0],u=s[1];return(0,F.useEffect)(function(){if(t&&l){var e=l.getBoundingClientRect().right,n=window.iWindow.innerWidth;u({top:0,left:e>n-230?"-100%":"100%"})}},[t,l]),t&&l?F.createElement("div",{className:"builder-list-group builder-is-card builder-context-sub-menu",style:{left:d.left,top:d.top}},o.visibility&&F.createElement("span",{className:"builder-list-item builder-list-item-action",
onClick:a,role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"cog",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_SETTINGS")),F.createElement("span",{className:"builder-list-item builder-list-item-action".concat(""),onClick:r,role:"button",onKeyDown:ye,tabIndex:0},o.visibility?F.createElement("span",null,F.createElement(co,{name:"eye",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_HIDE")):F.createElement(F.Fragment,null,F.createElement(co,{name:"eyeSlash",
className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_SHOW")),Qe),!(null!=n&&n.parent_addon&&n.columns.length<=1)&&F.createElement("span",{className:"builder-list-item builder-list-item-action",onClick:i,role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"trash",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE"))):null};function Sv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}function Pv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sv(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kv=new Set(["advancedcolor","advancedslider","alignment","boxshadow","buttons","color","margin",
"fonts","fontstyle","gradient","padding","slider","select","typography","radio"]),Rv=["h1","h2","h3","h4","h5","h6","p","div","span","br","section","strong"],Tv=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;
e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={hasCopiedItem:!1,activeColumnMenu:!1,copiedAddonName:"",showSaveDialog:!1},t.options={index:e.settings.rowIndex,settings:{colIndex:e.settings.colIndex,addonIndex:e.settings.addonIndex,innerColIndex:e.settings.innerColIndex,addonInnerIndex:e.settings.addonInnerIndex}},t.columnOptionRef=F.createRef(),t}return(0,G.Z)(r,[{key:"componentDidMount",
value:function(){var e=Zt(h);null!=e&&e.addonName&&null!=e&&e.addonData&&this.setState({hasCopiedItem:!0,copiedAddonName:e.addonName})}},{key:"onCopyAddon",value:function(e){e.preventDefault();var t=this.props.settings,n=t.blank,o=t.addon;if(n)return!1;var r=Tt({sections:this.props.state.pageBuilder.present,addon:o,rowIndex:this.props.settings.rowIndex,colIndex:this.props.settings.colIndex});jt(h,{addonName:o.name,addonData:r}),this.props.setCopiedDataStatus(),ne(Joomla.JText._("COM_JPAGEBUILDER_ADDON_COPIED"),
"Success"),this.props.reset()}},{key:"onSaveAddon",value:function(e){e.preventDefault();var t=this.props,n=t.settings.addon,o=t.reset,r=Tt({sections:this.props.state.pageBuilder.present,addon:n,rowIndex:this.props.settings.rowIndex,colIndex:this.props.settings.colIndex});vo.reset(),vo.setAddon(r),vo.setDialog("saveAddon"),vo.showDialog(),o()}},{key:"pasteItem",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!1!==this.state.hasCopiedItem){var t=this.props.settings,
n=void 0===t?{}:t,o=n.rowIndex,r=n.addonIndex,a=n.colIndex,i=n.childIndex,l=void 0===i?-1:i,c=n.parentId,s=Zt(h),d=this.props.state.pageBuilder.present,u=Pv(Pv({},s),{},{sections:d,rowIndex:o,colIndex:a,addonIndex:r,childIndex:l,parentId:c,isAbove:e});this.props.pasteAddon({rowIndex:o,pasteOptions:u}),this.props.reset()}}},{key:"updateStyle",value:function(e){var t=this.props.settings,n=t.rowIndex,o=t.addonIndex,r=t.colIndex,a=t.innerColIndex,i=t.addonInnerIndex;if(!t.blank){var l={index:n,settings:{colIndex:r,
addonIndex:o,innerColIndex:a,addonInnerIndex:i,assets:e.assets,htmlContent:e.htmlContent,formData:e.settings}};this.props.pasteStyle(l),this.props.reset()}}},{key:"handlePasteStyle",value:function(){if(this.state.hasCopiedItem&&"undefined"!=typeof addonsJSON){var e=this.props.settings.addon,t=K()(e),n=Zt(h).addonData,o=(0,j.Z)(n.addon,1)[0],r=o.name,a=o.settings,i=K()(addonsJSON[r]);if(e.name===r&&Gt(i)&&Gt(a)){var l=i.settings;if(Gt(l)){var c=function e(t,n,o){for(var r=arguments.length>3&&void 0!==
arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=0,l=Object.values(t);i<l.length;i++)for(var c=l[i].fields,s=function(){var t=(0,j.Z)(u[d],2),i=t[0],l=t[1];if(Gt(o[i])&&!Rv.includes(o[i])&&(kv.has(l.type)||r))a[i]=o[i];else if("repeatable"===l.type){var c=Array.isArray(n[i])?n[i]:[],s=c.length,m=Array.isArray(o[i])?o[i]:[],p=m.length;a[i]=m.slice(0,s).flatMap(function(t,n){var o;return Pv(Pv({},c[n]),e(null!==(o=l.attr)&&void 0!==o?o:{},c[n],t,!1,{}))}),s>p&&
(a[i]=[].concat((0,ue.Z)(a[i]),(0,ue.Z)(c.slice(p))))}},d=0,u=Object.entries(c);d<u.length;d++)s();return a},s=c(l,t.settings,a),d=c(globalAttr.style,t.settings,a,!0);this.updateStyle(Pv(Pv({},t),{},{settings:Pv(Pv(Pv({},t.settings),s),d)}))}}}}},{key:"openAddonSettings",value:function(e){var t=this.props,n=t.settings,o=n.addon,r=n.rowIndex,a=n.addonIndex,i=n.colIndex,l=n.innerColIndex,c=n.addonInnerIndex,s=n.blank,d=t.collectionItemIndex,u=t.collectionItemAddonIndex;if(e.preventDefault(),s)return!1;
var m={type:"addon",index:r,settings:{colIndex:i,addonIndex:a,addonId:o.id,htmlContent:o.htmlContent,assets:o.assets,addonName:o.name,formData:o.settings,collectionItemIndex:d,collectionItemAddonIndex:u}};void 0!==c&&(m.type="inner_addon",m.settings.innerRowIndex=a,m.settings.innerColIndex=l,m.settings.addonInnerIndex=c),wr.resetAll(),wr.setAddon(m),wr.setType(m.type),wr.showEditPanel(),this.props.reset()}},{key:"onDuplicateAction",value:function(){var e=this.props.settings,t=e.blank,n=e.addon,o=
e.rowIndex,r=e.colIndex,a=e.addonIndex;if(t)return!1;this.props.duplicateDeepAddon({addon:n,rowIndex:o,colIndex:r,addonIndex:a}),this.props.reset()}},{key:"onDelete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"addon",t=this.props.settings,n=t.addonIndex,o=t.row,r=t.column,a=t.addon,i=t.blank;if("addon"===e){if(i)return!1;wr.setAddon({}),wr.setRowSettings({}),wr.hideEditPanel();var l=window.iDocument.getElementById("#addon-script-".concat(a.id));l&&l.parentNode.remove(l),
Gt(this.props.collectionItemAddonIndex)?this.props.removeCollectionAddonItem({rowId:o.id,columnId:r.id,addonIndex:n,collectionItemAddonIndex:this.props.collectionItemAddonIndex}):this.props.removeAddon(o.id,r.id,a.id,null==a?void 0:a.reference_id),ko.reset()}"column"===e&&this.props.deleteColumn(this.props.settings.row.id,this.props.settings.column.id),this.props.reset()}},{key:"onDisable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"addon",t=this.props.settings,
n=t.row,o=t.column,r=t.rowIndex,a=t.colIndex,i=t.blank,l=t.addon,c=t.addonIndex;if("addon"===e){var s;if(i)return;var d={type:e,rowIndex:r,columnIndex:a,addonIndex:null==o||null===(s=o.addons)||void 0===s?void 0:s.findIndex(function(e){return e.id===l.id})};Gt(this.props.collectionItemAddonIndex)?this.props.changeCollectionItemAddonVisibility({rowId:n.id,columnId:o.id,addonIndex:c,itemAddonIndex:this.props.collectionItemAddonIndex}):this.props.disableAddon(d)}"column"===e&&this.props.disableColumnAction(r,
a,o.id),this.props.reset()}},{key:"openColumnOption",value:function(){var e=this.props.settings,t=e.rowIndex,n=e.colIndex,o=e.column;wr.resetAll(),wr.setType("column"),wr.setRowIndex(t),wr.setColIndex(n),wr.setColSettings(o),wr.showEditPanel(),this.props.reset()}},{key:"render",value:function(){var e,t,n,o=this,r=this.state,a=r.copiedAddonName,i=r.hasCopiedItem,l=this.props.settings,c=l.addon,s=l.blank;void 0===c?(t="Column",n=!0):(t=c.name,n=void 0===(null==c?void 0:c.visibility)||c.visibility);
var d=!0===s?t:addonsJSON[t].title,u="builder-list-item builder-list-item-action",m=u+(s?" disabled":""),p=Gt(this.props.collectionItemAddonIndex),v=this.props.isEmptyColumn||this.props.isEmptyDivAddon;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-list-heading"},d),n&&F.createElement("span",{className:m,onClick:this.openAddonSettings.bind(this),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"cog",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_SETTINGS_CANVAS")),
!p&&F.createElement(F.Fragment,null,function(e){return F.createElement("span",{className:"".concat(e.listItemClass," ").concat(""),onClick:e.onSaveAddon,role:"button",onKeyDown:ye,tabIndex:0},F.createElement("span",null,F.createElement(co,{name:"saveLine",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_SAVE")),Qe)}({listItemClass:m,onSaveAddon:this.onSaveAddon.bind(this)}),F.createElement("span",{className:m,onClick:this.onCopyAddon.bind(this),role:"button",onKeyDown:ye,tabIndex:0},
F.createElement(co,{name:"copy",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_COPY")),v?F.createElement("span",{className:"builder-list-item builder-list-item-action".concat(i?"":" disabled"),onClick:function(){return o.pasteItem(!1)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"clipboard",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_PASTE"),i&&F.createElement("small",null,"(",a===R.productList?"Productlist":null==a?void 0:a.split("_").join(" "),
")")):F.createElement(F.Fragment,null,F.createElement("span",{className:"builder-list-item builder-list-item-action".concat(i?"":" disabled"),onClick:function(){return o.pasteItem(!0)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"clipboardAbove",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_PASTE_ABOVE"),i&&F.createElement("small",null,"(",a===R.productList?"Productlist":null==a?void 0:a.split("_").join(" "),")")),F.createElement("span",{className:"builder-list-item builder-list-item-action".concat(i?
"":" disabled"),onClick:function(){return o.pasteItem(!1)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"clipboardBelow",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_PASTE_BELOW"),i&&F.createElement("small",null,"(",a===R.productList?"Productlist":null==a?void 0:a.split("_").join(" "),")"))),(null===(e=this.props.settings)||void 0===e||null===(e=e.addon)||void 0===e?void 0:e.name)&&this.state.copiedAddonName===this.props.settings.addon.name&&F.createElement("span",
{className:"".concat(m).concat(i?"":" disabled"," ").concat(""," "),onClick:function(){return o.handlePasteStyle()},role:"button",onKeyDown:ye,tabIndex:0},F.createElement("span",null,F.createElement(co,{name:"paste",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_PASE_STYLE")),Qe),F.createElement("span",{className:"".concat(m),onClick:this.onDuplicateAction.bind(this),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"clone",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_DUPLICATE"))),
function(e){return function(e){return F.createElement("span",{className:"".concat(e.listItemClass," ").concat(""," "),onClick:function(){e.onDisable()},role:"button",onKeyDown:ye,tabIndex:0},e.visibility?F.createElement("span",null,F.createElement(co,{name:"eye",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_HIDE")):F.createElement(F.Fragment,null,F.createElement(co,{name:"eyeSlash",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_SHOW")),Qe)}(e)}({listItemClass:m,
visibility:n,onDisable:this.onDisable.bind(this,"addon")}),F.createElement("span",{className:"".concat(m),onClick:this.onDelete.bind(this,"addon"),role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"trash",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_MEDIA_MANAGER_DELETE")),n&&F.createElement(F.Fragment,null,F.createElement("span",{className:"builder-list-divider","aria-hidden":"true"}),F.createElement("span",{className:"".concat(u," builder-has-child"),ref:this.columnOptionRef,
onMouseEnter:function(){return o.setState({activeColumnMenu:!0})},onMouseLeave:function(){return o.setState({activeColumnMenu:!1})},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"columns",className:"builder-list-icon"}),Joomla.JText._("COM_JPAGEBUILDER_COLUMN_SETTINGS"),F.createElement(Dv,{isOpen:this.state.activeColumnMenu,row:this.props.settings.row,column:this.props.settings.column,onDisable:this.onDisable.bind(this,"column"),openColumnOption:this.openColumnOption.bind(this),
onDelete:this.onDelete.bind(this,"column"),columnEl:this.columnOptionRef.current}))))}}]),r}(F.Component);const Lv=(0,Xn.$j)(null,function(e){return{setCopiedDataStatus:function(){return e({type:"SET_COPIED_DATA_STATUS"})}}})(Tv),Mv=(0,Xn.$j)(function(e){return{state:e}},function(e){return{onSettingsClick:function(t){return e(zi(t))},disableColumnAction:function(t,n,o){return e(Vi(t,n,o))},disableInnerColumnAction:function(t){return e(function(e){return{type:"TOGGLE_INNER_COLUMN",index:e.index,settings:e.settings}}(t))},
deleteColumn:function(t,n){return e(Ri(t,n))},pasteAddon:function(t){return e(Ji(t))},pasteStyle:function(t){var n=void 0===t.settings.addonInnerIndex?"ADDON_EDIT":"ADDON_INNER_EDIT";e({type:n,index:t.index,settings:t.settings})},cloneAddon:function(t){return e(function(e){return{type:"CLONE_ADDON",index:e.index,settings:e.settings}}(t))},duplicateDeepAddon:function(t){return e(Bi(t))},cloneAddonInner:function(t){return e(function(e){return{type:"CLONE_INNER_ADDON",index:e.index,settings:e.settings}}(t))},
deleteAddon:function(t){return e(function(e){return{type:"DELETE_ADDON",index:e.index,settings:e.settings}}(t))},removeAddon:function(t,n,o,r){e(Ti(t,n,o,r))},removeCollectionAddonItem:function(t){var n=t.rowId,o=t.columnId,r=t.addonIndex,a=t.collectionItemAddonIndex;e(Li({rowId:n,columnId:o,addonIndex:r,collectionItemAddonIndex:a}))},deleteInnerAddon:function(t){return e(function(e){return{type:"DELETE_INNER_ADDON",index:e.index,settings:e.settings}}(t))},disableAddon:function(t){return e(tl(t))},
changeCollectionItemAddonVisibility:function(t){return e(function(e){return{type:"CHANGE_COLLECTION_ITEM_VISIBILITY",payload:e}}(t))},disableInnerAddon:function(t){return e(function(e){return{type:"DISABLE_INNER_ADDON",index:e.index,settings:e.settings}}(t))}}})(function(e){return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-backdrop builder-backdrop-color",style:{zIndex:3},onClick:function(){return e.reset()},role:"button",onKeyDown:ye,tabIndex:0}),F.createElement("div",
{className:"builder-list-group builder-is-card builder-context-menu",style:{zIndex:4}},F.createElement(Lv,e)))});var Zv=["isOpen","contextMenuEvent","onClose"],jv=function(e){var t=e.isOpen,n=e.contextMenuEvent,o=e.onClose,r=(0,ds.Z)(e,Zv),a=(0,F.useState)({top:0,left:0}),i=(0,j.Z)(a,2),l=i[0],c=i[1];(0,F.useEffect)(function(){if(t&&n){var e=n.clientX,o=n.clientY,r=window.iWindow.innerWidth-230,a=window.iWindow.innerHeight-400,i={top:o>a?a:o,left:e>r?r:e};document.querySelector(".builder-panel-opened.builder-stack-left")&&
(i.left=i.left+340),c(i)}},[t,n]);var s={display:t?"block":"none",position:"absolute",top:l.top,left:l.left};return t&&n?(0,V.createPortal)(F.createElement("div",{style:s,onClick:o,role:"presentation"},F.createElement(Mv,r)),document.body):null},Bv=["soundcloud","video"],Jv=function(e){var t=e.addon,n=e.rowId,o=e.columnId,r=e.htmlContent,a=void 0===r?'<div class="jpb-empty-addon">\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="140.1px" height="24.2px" viewBox="0 0 140.1 24.2" >\n<path class="st0" d="M19,13.5c-0.4-0.4-0.8-0.4-1.1,0.1c-0.9,1.1-1.9,2.1-2.9,3c-3.5,3-7.6,4.7-12.1,5.5\nc-0.6,0.1-0.8-0.1-0.8-0.7c0-0.9,0-1.9,0-2.8l0,0l0,0l0,0V5.5V4.9c0-0.2,0-0.4,0.3-0.5c0.4-0.3,0.7,0.2,1.1,0.5\nc3.4,2.4,6.8,4.9,10.2,7.3c0.5,0.3,0.5,0.5,0.1,0.9c-2.6,2.4-5.5,4.1-8.9,5.1c-1.2,0.3-1.2,0.3-1.2,1.6c0,0.5,0.1,0.6,0.6,0.5\nc1-0.2,2-0.5,2.9-0.8c3.7-1.4,6.8-3.5,9.4-6.5c0.6-0.7,0.6-0.6-0.1-1.2C11.1,7.9,5.9,4.2,0.7,0.5C0.6,0.4,0.4,0.3,0.3,0.4\nc-0.2,0-0.1,0.2-0.1,0.4c0,0.9,0,1.8,0,2.7c0,0.3,0,0.4,0,0.6v3.2l0,0v2.6v1.2V13v1.4v1.5l0,0l-0.1,4.3l0,0c0,0.3,0,0.5,0,0.7\nc0,0.8,0,1.7,0,2.5c0,0.4,0.1,0.6,0.6,0.6c2.1-0.1,4.1-0.4,6.1-1c5-1.5,9.1-4.2,12.5-8.1C19.9,14.2,19.9,14.2,19,13.5z"/>\n<path class="st1" d="M9.1,12.3c0.1-0.1,0.1-0.2,0-0.3c-1.2-0.9-2.4-1.7-3.5-2.5C5.4,9.4,5.3,9.2,5.2,9.3\nc-0.1,0-0.1,0.1-0.1,0.2v0.2v4.5C6.8,14.1,8.2,13.1,9.1,12.3z"/>\n</svg>\n</div>':
r,i=(0,F.useRef)(null),l=(0,F.useState)(""),c=(0,j.Z)(l,2),s=c[0],d=c[1],u=(0,F.useState)(!1),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=Bt(t.settings);return(0,F.useEffect)(function(){if(i.current){var e=i.current.querySelector("#addon-text-".concat(t.id));e&&e.setAttribute("style","min-height:16px;width:100%")}},[p]),F.createElement(F.Fragment,null,F.createElement(Eu,{rowId:n,columnId:o,addon:t,mouseInteraction:!0,scrollInteraction:!0}),F.createElement("div",(0,ao.Z)({ref:i,onFocus:function(e){null!==e.target.getAttribute("contenteditable")&&
(0,V.unstable_batchedUpdates)(function(){d(a),v(!0)})},onBlur:function(){p&&v(!1)},className:"jpb-addon-wrapper ".concat(f),dangerouslySetInnerHTML:{__html:p?s:a}},Bv.includes(t.name)?{style:{pointerEvents:"none"}}:{})))};var Gv=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),
function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),(t=o.call(this,e)).state={settings:t.props.addon.settings,htmlContent:"",cssContent:"",insideAddons:{},interactionCss:{set:"",action:"",status:!1},liveScrollActions:null,isInteract:!1,percentage:null,mouseTilt:null,onInteractionMode:!1},t.textRef=F.createRef(),t}return(0,G.Z)(r,[{key:"checkGoogleFont",
value:function(e){var t,n,o,r,a=this,i=addonsJSON[e.name],l=void 0!==(null==i||null===(t=i.inline)||void 0===t?void 0:t.buttons),c={};l&&(r=null==i||null===(n=i.inline)||void 0===n?void 0:n.buttons,c=Object.values(r).reduce(function(e,t){if(null!=t&&t.fieldset){var n;n=t.fieldset.tab_groups?Object.values(t.fieldset.tab_groups).reduce(function(e,t){if(null!=t&&t.fields){var n=Object.values(t.fields).reduce(function(e,t){return Object.assign(e,t),e},{});Object.assign(e,n)}return e},{}):Object.values(t.fieldset).reduce(function(e,
t){return Object.assign(e,t),e},{}),Object.assign(e,n)}return e},{}),null!=i&&null!==(o=i.attr)&&void 0!==o&&o.general&&Object.entries(i.attr.general).forEach(function(e){var t,n=(0,j.Z)(e,2),o=n[0],r=n[1];void 0===(null===(t=c)||void 0===t?void 0:t[o])&&(c[o]=r)})),c&&Ar()(c,function(t,n){if("fonts"===t.type)a.addFont(e.id,e.settings,n,e.settings[n],t);else if(void 0!==t.attr&&void 0!==e.settings["jp_".concat(e.name,"_item")]||void 0!==t.attr&&e.settings.slideshow_items){var o=void 0===e.settings["jp_".concat(e.name,
"_item")]?e.settings.slideshow_items:e.settings["jp_".concat(e.name,"_item")];Ar()(o,function(n,o){Ar()(t.attr,function(t,r){if("fonts"==t.type){var i="";"button_group"==e.name&&(i="#btn-".concat(e.id).concat(o)),a.addFont(e.id,n,r,n[r],t,i,o)}void 0!==(0,de.Z)(n.slideshow_inner_items)&&Ar()(n.slideshow_inner_items,function(n,o){Ar()(t.attr,function(t,r){if("fonts"==t.type){var i="";"button_group"==e.name&&(i="#btn-".concat(e.id).concat(o)),"js_slideshow"===e.name&&(i="#jpb-jp-slider-".concat(e.id).concat(o)),
a.addFont(e.id,n,r,n[r],t,i,o)}})})})})}})}},{key:"addFont",value:function(e,t,n,o,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",l=window.frames["jpagebuilder-view"].window.document.head,c=window.frames["jpagebuilder-view"].window.document;if(void 0!==r.selector){var s=l.querySelector("#addon-css-"+e+i+"_"+n);s&&void 0!==o?s.innerHTML="#jpb-addon-".concat(e," ").concat(a).concat(r.selector.css.replace("{{ VALUE }}",o)):
void 0!==o&&((s=c.createElement("style")).id="addon-css-"+e+i+"_"+n,s.type="text/css",l.appendChild(s),s.innerHTML="#jpb-addon-".concat(e," ").concat(a).concat(r.selector.css.replace("{{ VALUE }}",o)))}if(void 0!==t&&void 0!==o&&""!==o&&!l.querySelector("#google-font-"+o.toLowerCase().replace(/\s+/g,"_"))&&-1===["System","Google Fonts","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia"].indexOf(o)){var d="https://fonts.googleapis.com/css?family="+o+":100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&display=swap",
u=c.createElement("link");u.id="google-font-"+o.toLowerCase().replace(/\s+/g,"_"),u.href=d,u.rel="stylesheet",u.type="text/css",window.disableGoogleFonts||l.appendChild(u)}}},{key:"addonAssets",value:function(){var e=this.props.addon;if("gmap"==e.name&&"undefined"!=typeof initJPageBuilderGMap&&window.initJPageBuilderGMap(window.frames["jpagebuilder-view"].window.document),void 0!==addonsJSON[e.name]&&(this.checkGoogleFont(e),!addonsJSON[e.name].js_template)){var t=e.assets;if(null==e.assets&&(t=this.state.cssContent),
""!=t){if(null!=t.css){var n=window.frames["jpagebuilder-view"].window.document.createElement("style");n.setAttribute("type","text/css"),n.id="addon-style-"+e.id,null!=window.frames["jpagebuilder-view"].window.document.getElementById(n.id)&&window.frames["jpagebuilder-view"].window.document.getElementById(n.id).remove(),n.styleSheet?n.styleSheet.cssText=t.css:n.appendChild(window.frames["jpagebuilder-view"].window.document.createTextNode(t.css)),window.frames["jpagebuilder-view"].window.document.getElementsByTagName("head")[0].appendChild(n)}if(null!=
t.js){var o=window.frames["jpagebuilder-view"].window.document.createElement("script");o.setAttribute("type","text/javascript"),o.id="addon-script-"+e.id,o.setAttribute("async",!0),o.text=t.js,window.frames["jpagebuilder-view"].window.document.getElementsByTagName("head")[0].appendChild(o)}}}}},{key:"componentDidMount",value:function(){this.addonAssets()}},{key:"componentWillUnmount",value:function(){window.toolsTabIndex=0}},{key:"shouldComponentUpdate",value:function(e,t){return!Or()(e.addon.settings,
t.settings)||""!=t.htmlContent||!Or()(this.state.insideAddons,t.insideAddons)||!Or()(t.percentage!==this.state.percentage)}},{key:"componentDidUpdate",value:function(){var e=this.state.settings;Or()(this.props.addon.settings,e)||this.setState({settings:this.props.addon.settings}),this.addonAssets()}},{key:"handleScroll",value:function(){var e=this.props.addon.settings,t=e.instFormId,n=window.frames["jpagebuilder-view"].document.getElementById("addon-wrap-".concat(t));if(null!==n){n.removeAttribute("style");
var o=this.percentageSeen(n,e.scrolling_options);o>-1&&o<=100&&this.setState({percentage:o})}}},{key:"percentageSeen",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"viewport",n=e.getBoundingClientRect(),o=document.body.offsetHeight,r=window.pageYOffset,a=n.top,i=n.height;if("fullpage"===t){var l=(r=$(window.frames["jpagebuilder-view"].document).scrollTop())/($(window.frames["jpagebuilder-view"].document).height()-$(window).height());return Math.round(100*l)}if(a>r+
o)return-1;if(a+i<r)return 101;var c=(r+o-a)/((o+i)/100);return c>100?100:c}},{key:"checkRepeatableItems",value:function(e,t){var n=this;return Kt()(e.content)&&(e.content=e.content.map(function(e,o){var r="jpbai-".concat(t,"-").concat(o);return n.checkGoogleFont(e),void 0===n.state.insideAddons[r]||pe()(n.state.insideAddons[r])||!Or()(n.state.insideAddons[r].settings,e.settings)?n.renderInsideAddon(e,o,t):n.state.insideAddons[r].html})),e}},{key:"renderAddon",value:function(){var e=this,t=this.props.addon;
yu.templateSettings.evaluate=/<#([\s\S]+?)#>/g,yu.templateSettings.interpolate=/\{\{\{([\s\S]+?)\}\}\}/g,yu.templateSettings.escape=/\{\{([^}]+?)\}\}(?!\})/g,yu.templateSettings.variable="data";var n=document.getElementById("jpb-tmpl-addon-".concat(t.name)),o=K()(t);if("accordion"===o.name?pe()(o.settings.jp_accordion_item)||(o.settings.jp_accordion_item=o.settings.jp_accordion_item.map(function(t,n){return Kt()(t.content)&&(t.content=t.content.map(function(t,o){var r="jpbai-".concat(n,"-").concat(o);
return e.checkGoogleFont(t),void 0===e.state.insideAddons[r]||pe()(e.state.insideAddons[r])||!Or()(e.state.insideAddons[r].settings,t.settings)?e.renderInsideAddon(t,o,n):e.state.insideAddons[r].html})),t})):"jp_tab"===o.name||"tab"==o.name?!pe()(o.settings.jp_tab_item)&&Array.isArray(o.settings.jp_tab_item)&&(o.settings.jp_tab_item=o.settings.jp_tab_item.map(function(t,n){return Kt()(t.content)&&(t.content=t.content.map(function(t,o){var r="jpbai-".concat(n,"-").concat(o);return e.checkGoogleFont(t),
void 0===e.state.insideAddons[r]||pe()(e.state.insideAddons[r])||!Or()(e.state.insideAddons[r].settings,t.settings)?e.renderInsideAddon(t,o,n):e.state.insideAddons[r].html})),t})):"jp_carouselpro"===o.name||"carouselpro"==o.name?pe()(o.settings.jp_carouselpro_item)||(o.settings.jp_carouselpro_item=o.settings.jp_carouselpro_item.map(function(t,n){return Kt()(t.content)&&(t.content=t.content.map(function(t,o){var r="jpbai-".concat(n,"-").concat(o);return e.checkGoogleFont(t),void 0===e.state.insideAddons[r]||
pe()(e.state.insideAddons[r])||!Or()(e.state.insideAddons[r].settings,t.settings)?e.renderInsideAddon(t,o,n):e.state.insideAddons[r].html})),t})):"sliderpro"===o.name?pe()(o.settings.sliderpro_item)||(o.settings.sliderpro_item=o.settings.sliderpro_item.map(function(t,n){return Kt()(t.content)&&(t.content=t.content.map(function(t,o){var r="jpbai-".concat(n,"-").concat(o);return e.checkGoogleFont(t),void 0===e.state.insideAddons[r]||pe()(e.state.insideAddons[r])||!Or()(e.state.insideAddons[r].settings,
t.settings)?e.renderInsideAddon(t,o,n):e.state.insideAddons[r].html})),t})):"table_advanced"===o.name?(pe()(o.settings.jp_table_advanced_item)||(o.settings.jp_table_advanced_item=o.settings.jp_table_advanced_item.map(function(t,n){return e.checkRepeatableItems(t,n)})),pe()(o.settings.table_advanced_item)||(o.settings.table_advanced_item=o.settings.table_advanced_item.map(function(t){return pe()(t.table_advanced_item)?{}:{table_advanced_item:t.table_advanced_item.map(function(t,n){return e.checkRepeatableItems(t,
n)})}}))):"carousel_extended"===o.name?pe()(o.settings.jp_carousel_extended_item)||(o.settings.jp_carousel_extended_item=o.settings.jp_carousel_extended_item.map(function(t,n){return Kt()(t.content)&&(t.content=t.content.map(function(t,o){var r="jpbai-".concat(n,"-").concat(o);return e.checkGoogleFont(t),void 0===e.state.insideAddons[r]||pe()(e.state.insideAddons[r])||!Or()(e.state.insideAddons[r].settings,t.settings)?e.renderInsideAddon(t,o,n):e.state.insideAddons[r].html})),t})):"js_wrapper"===
o.name&&(pe()(o.settings.jp_js_wrapper_item)||(o.settings.jp_js_wrapper_item=o.settings.jp_js_wrapper_item.map(function(t,n){return Kt()(t.content)&&(t.content=t.content.map(function(t,o){var r="jpbai-".concat(n,"-").concat(o);return e.checkGoogleFont(t),void 0===e.state.insideAddons[r]||pe()(e.state.insideAddons[r])||!Or()(e.state.insideAddons[r].settings,t.settings)?e.renderInsideAddon(t,o,n):e.state.insideAddons[r].html})),t}))),n){var r=(0,yu.template)(n.innerHTML);return o.settings.id=o.id,r(o.settings)}return n||
Gt(t.htmlContent)||this.state.htmlContent||jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=addon",dataType:"json",data:{addon:t,options:{collectionItemIndex:this.props.collectionItemIndex}},cache:!1,success:function(e){"true"==e.status&&this.setState({htmlContent:e.html,cssContent:e.assets})}.bind(this)}),t.htmlContent||this.state.htmlContent}},{key:"renderInsideAddon",value:function(e,t,n){var o=document.getElementById("jpb-tmpl-addon-"+
e.name),r=K()(e);if(o){var a=(0,yu.template)(o.innerHTML);return r.settings.id=r.id,a(r.settings)}var i="jpbai-".concat(n,"-").concat(t);if(o||void 0!==this.state.insideAddons[i]&&!pe()(this.state.insideAddons[i])&&Or()(this.state.insideAddons[i].settings,r.settings)){if(void 0!==this.state.insideAddons[i]&&!pe()(this.state.insideAddons[i]))return this.state.insideAddons[i].html}else jQuery.ajax({type:"POST",url:pagebuilder_base+"index.php?option=com_jpagebuilder&view=ajax&format=json&callback=addon",
dataType:"json",data:{addon:e},cache:!1,success:function(e){if("true"==e.status){var t=K()(this.state.insideAddons);t[i]={html:e.html,assets:e.assets,settings:r.settings},this.setState({insideAddons:t})}}.bind(this)});return e.htmlContent||""}},{key:"render",value:function(){var e=this,t=this.props,n=t.addon,o=t.editAddon,r=t.row,a=t.column,i=t.rowId,l=t.columnId,c=this.renderAddon();return F.createElement("div",{role:"button",onKeyDown:ye,tabIndex:0,onClick:function(e){e.preventDefault(),o(e)},onMouseEnter:function(){var t,
n=e.props.addon;Nu.setAddonHoverId(null!==(t=null==n?void 0:n.id)&&void 0!==t?t:null)}},F.createElement(Jv,{addon:n,rowId:i,columnId:l,htmlContent:c}),(null==n?void 0:n.children)&&n.children.length>0&&n.children.map(function(e){var t=Fe(r.id,a.id,e),n=Ge(r.id),o=He(r.id,a.id),i=a.addons.findIndex(function(t){return t.id===e});return F.createElement(lf,{key:t.id,id:t.id,rowIndex:n,addon:t,column:a,row:r,colIndex:o,index:i})}))}}]),r}(F.Component);const Hv=Gv;var Uv,zv=["Tag","className","name","itemIndex",
"title","handleChangeTitle","addonName","rowIndex","colIndex","addonIndex"],Fv=function(e){var t=e.Tag,n=void 0===t?"span":t,o=e.className,r=void 0===o?"jp-editable-title":o,a=e.name,i=void 0===a?"title":a,l=e.itemIndex,c=e.title,s=e.handleChangeTitle,d=e.addonName,u=e.rowIndex,m=e.colIndex,p=e.addonIndex,v=(0,ds.Z)(e,zv),f=(0,F.useState)(!1),b=(0,j.Z)(f,2),h=b[0],g=b[1],E=(0,F.useRef)(""),y=Fl(function(e){s({name:i,value:e,rowIndex:u,colIndex:m,addonIndex:p,itemIndex:l,addonName:d})},500,[]);return c?
F.createElement(n,(0,ao.Z)({className:r,onClick:function(e){e.target.setAttribute("contenteditable","true"),e.target.focus(),g(!0),E.current=e.target.innerHTML},onBlur:function(e){e.target.removeAttribute("contenteditable"),g(!1),E.current=""},onInput:function(e){var t=e.target.innerHTML;y(t)},dangerouslySetInnerHTML:{__html:h?E.current:c},style:c?void 0:{minHeight:"14px",minWidth:"50px"}},v)):null},Vv=(Uv={OPEN_FIRST:0,OPEN_ALL:-1,OPEN_NONE:-2},Object.freeze(Uv));const Wv=(0,Xn.$j)(null,function(e){return{handleChangeTitle:function(t){return e(Ui(t))}}})(function(e){var t,
n=e.row,o=e.column,r=e.addon,a=e.rowIndex,i=e.colIndex,l=e.addonIndex,c=e.handleChangeTitle,s=_u(r),d=(0,F.useState)(Vv.OPEN_FIRST),u=(0,j.Z)(d,2),m=u[0],p=u[1],v=(0,F.useRef)(null),f=Bt(r.settings),b=r.settings;(0,F.useEffect)(function(){var e=b.openitem;p("show"===e?Vv.OPEN_ALL:"hide"===e?Vv.OPEN_NONE:Vv.OPEN_FIRST)},[b.openitem]);var h=b.heading_selector,g=function(){var e;Nu.setAddonHoverId(null!==(e=null==r?void 0:r.id)&&void 0!==e?e:null)},E=function(e){if(!e)return"";var t=e.split(" ");return t.length>
1?t.join(" "):"fas ".concat(t[0])},y=function(e){return m===Vv.OPEN_ALL?"":m===Vv.OPEN_NONE?"jpb-panel-collapse":m===e?"":"jpb-panel-collapse"},_=function(e){return m===Vv.OPEN_ALL?"block":m===Vv.OPEN_NONE?"none":m===e?"block":"none"},w=Ut(r.settings),x=w.animationClass,I=w.animationAttr;return F.createElement(F.Fragment,null,F.createElement("div",{dangerouslySetInnerHTML:{__html:s}}),F.createElement(Eu,{rowId:n.id,columnId:o.id,addon:r,mouseInteraction:!0,scrollInteraction:!0}),F.createElement("div",
(0,ao.Z)({className:"jpb-addon jpb-addon-accordion ".concat(b.class," ").concat(x," ").concat(f),ref:v,id:"jpb-addon-".concat(r.id)},I),(null==b?void 0:b.title)&&F.createElement(h,{className:"jpb-addon-title",dangerouslySetInnerHTML:{__html:b.title}}),F.createElement("div",{className:"jpb-addon-content"},F.createElement("div",{className:"jpb-panel-group"},(null==b||null===(t=b.jp_accordion_item)||void 0===t?void 0:t.length)&&b.jp_accordion_item.map(function(e,t){return F.createElement("div",{key:t,
className:"jpb-panel jpb-".concat(b.style)},F.createElement("button",{className:"builder-reset-button-styles builder-w-100 jpb-panel-heading".concat(m===t?" active":""," ").concat("right"===(null==b?void 0:b.icon_position)?" jpb-accordion-icon-position-right":""),type:"button",onClick:function(e){return function(e,t){var a,i;e.stopPropagation(),e.preventDefault(),p(t);var l=null===(a=addonsJSON)||void 0===a?void 0:a[r.name],c=o.addons.findIndex(function(e){return e.id===r.id}),s=Ge(n.id),d=He(n.id,
o.id);if(void 0!==l){var u=void 0!==(null==l||null===(i=l.inline)||void 0===i?void 0:i.buttons),m={type:"addon",index:s,settings:{rowIndex:s,colIndex:d,addonIndex:c,addonId:r.id,htmlContent:r.htmlContent,assets:r.assets,addonName:r.name,formData:r.settings},row:n,column:o,addon:r};if(u){if(ko.show&&ko.addonId===m.settings.addonId)return;wr.resetAll(),ko.reset(),ko.setAddon(K()(m)),ko.setType("addon"),ko.setConfig(l.inline),ko.setPosition(v.current.getBoundingClientRect()),ko.showEditor()}else ko.reset(),
wr.resetAll(),wr.setAddon(m),wr.setType("addon"),wr.showEditPanel()}}(e,t)},onMouseEnter:g},F.createElement("span",{className:"jpb-panel-title"},""!==e.icon&&"right"!==(null==b?void 0:b.icon_position)&&F.createElement("span",{className:"jpb-accordion-icon-wrap","aria-hidden":"true"},F.createElement("i",{className:E(e.icon)})),F.createElement(Fv,{title:e.title,itemIndex:t,handleChangeTitle:c,addonName:r.name,rowIndex:a,colIndex:i,addonIndex:l}),""!==e.icon&&"right"===(null==b?void 0:b.icon_position)&&
F.createElement("span",{className:"jpb-accordion-icon-wrap","aria-hidden":"true"},F.createElement("i",{className:E(e.icon)}))),"panel-custom"!==b.style&&F.createElement("span",{className:"jpb-toggle-direction"},F.createElement("i",{className:"fas fa-chevron-right"}))),F.createElement("div",{className:y(t),style:{display:_(t)}},F.createElement("div",{className:"jpb-panel-body"},F.createElement(bf,{column:o,row:n,addons:e.content,rowIndex:Ge(n.id),colIndex:He(n.id,o.id)}))))})))))}),Kv=function(e){var t,
n=e.row,o=e.column,r=e.addon,a=_u(r),i=Bt(r.settings),l=(0,F.useMemo)(function(){return r.settings},[r]),c=(0,F.useState)(""),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,F.useState)(0),p=(0,j.Z)(m,2),v=p[0],f=p[1],b=(0,F.useState)(1),h=(0,j.Z)(b,2),g=h[0],E=h[1],y=(0,F.useState)(1),_=(0,j.Z)(y,2),w=_[0],x=_[1];(0,F.useEffect)(function(){if(null!=l&&l.table_pagination){var e=Math.ceil(l.table_advanced_item.length/Number(l.pagination_item));E(0===Number(l.pagination_item)?0:e)}},[l]);var I=(0,F.useMemo)(function(){var e=
(0,ue.Z)(l.table_advanced_item);if(null!=l&&l.table_pagination){var t=1*l.pagination_item;e=e.slice(v,v+t)}if(0===d.length)return e;var n=((null==l?void 0:l.search_column_limit)||"").split(",").map(function(e){return Number(e)});try{var o=new RegExp(d,"i");return e.filter(function(e){return e.table_advanced_item.some(function(e,t){return n.includes(t+1)&&e.content.some(function(e){var t;return o.test(null==e||null===(t=e.settings)||void 0===t?void 0:t.text)})})})}catch(e){return[]}},[d,v,l]);(0,F.useEffect)(function(){if(w){var e=
l.pagination_item*(w-1);f(e)}},[w]);var O=function(e,t){e.preventDefault(),"prev"===t&&w>1?x(function(e){return e-1}):"next"===t&&w<g?x(function(e){return e+1}):"number"==typeof t&&x(t)},C=Ut(r.settings),A=C.animationClass,N=C.animationAttr;return F.createElement(F.Fragment,null,F.createElement("div",{dangerouslySetInnerHTML:{__html:a}}),F.createElement(Eu,{rowId:n.id,columnId:o.id,addon:r,mouseInteraction:!0,scrollInteraction:!0}),F.createElement("div",(0,ao.Z)({id:"jpb-addon-".concat(r.id),className:"".concat(i,
" ").concat(A)},N),F.createElement("div",{className:"jpb-addon jpb-addon-table ".concat(l.class," ").concat(l.table_text_alignment.split("-").length<2?" jpb-text-"+l.table_text_alignment.trim():l.table_text_alignment).concat(l.turn_off_responsive?" jpb-addon-table-not-responsive":""),style:{position:"relative"},onMouseEnter:function(){var e;Nu.setAddonHoverId(null!==(e=null==r?void 0:r.id)&&void 0!==e?e:null)}},F.createElement("div",{className:"builder-deep-addon-settings",style:{position:"absolute",
right:"10px",top:"10px",zIndex:2,cursor:"pointer"},onClick:function(e){var t,a;e.stopPropagation(),e.preventDefault();var i=null===(t=addonsJSON)||void 0===t?void 0:t[r.name],l=o.addons.findIndex(function(e){return e.id===r.id}),c=Ge(n.id),s=He(n.id,o.id);if(void 0!==i){var d=void 0!==(null==i||null===(a=i.inline)||void 0===a?void 0:a.buttons),u={type:"addon",index:c,settings:{rowIndex:c,colIndex:s,addonIndex:l,addonId:r.id,htmlContent:r.htmlContent,assets:r.assets,addonName:r.name,formData:r.settings},
row:n,column:o,addon:r};if(d){if(ko.show&&ko.addonId===u.settings.addonId)return;wr.resetAll(),ko.reset(),ko.setAddon(K()(u)),ko.setType("addon"),ko.setConfig(i.inline),ko.showEditor()}else ko.reset(),wr.resetAll(),wr.setAddon(u),wr.setType("addon"),wr.showEditPanel()}},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"cog"})),F.createElement("div",{className:"jpb-addon-content"},null!=l&&l.table_searchable?F.createElement("div",{className:"jpb-addon-table-search-wrap"},F.createElement("input",
{type:"text",placeholder:Joomla.Text._("COM_JPAGEBUILDER_ADDON_TABLE_ADVANCED_SEARCH_PLACEHOLDER")||"Type Here To Search",className:"jpb-form-control jpb-addon-table-search",onChange:function(e){e.preventDefault(),u(e.target.value)}}),F.createElement("i",{className:"fas fa-search"})):null),F.createElement("table",{className:"jpb-addon-table-main".concat(l.turn_off_heading?" jpb-no-table-header":""),"data-searchable":Boolean(null==l?void 0:l.table_searchable),"data-search-limit":Boolean(null==l?void 0:
l.search_column_limit),"data-sortable":Boolean(null==l?void 0:l.table_sortable),"data-pagination":null!=l&&l.table_pagination&&null!=l&&l.pagination_item?l.pagination_item:""},!(null!=l&&l.turn_off_heading)&&F.createElement("thead",null,F.createElement("tr",null,Kt()(l.jp_table_advanced_item)&&(null==l||null===(t=l.jp_table_advanced_item)||void 0===t?void 0:t.length)>0&&l.jp_table_advanced_item.map(function(e,t){return F.createElement("th",{key:t,className:"".concat(null!=l&&l.table_sortable?"jpb-table-addon-sortable-data":
""),colSpan:null!=e&&e.head_col_span?e.head_col_span:""},F.createElement(bf,{column:o,row:n,addons:Array.isArray(e.content)?e.content:[],rowIndex:Ge(n.id),colIndex:He(n.id,o.id),deepAddon:r,deepAddonItemIndex:t,deepAddonItemKey:"jp_table_advanced_item"}))}))),F.createElement("tbody",null,Kt()(I)&&I.length>0?I.map(function(e,t){var a=null!=l&&l.table_pagination&&null!=l&&l.pagination_item?l.pagination_item:void 0,i=t;return at(a)&&(i+=(Ce(w)-1)*Ce(a)),F.createElement("tr",{key:t},Kt()(null==e?void 0:
e.table_advanced_item)&&e.table_advanced_item.map(function(e,t){return F.createElement("td",{key:t,rowSpan:null!=e&&e.row_span?e.row_span:"",colSpan:(null==e?void 0:e.col_span)||"",style:{background:e.td_inner_bg||""}},F.createElement(bf,{column:o,row:n,addons:Array.isArray(e.content)?e.content:[],rowIndex:Ge(n.id),colIndex:He(n.id,o.id),deepAddon:r,deepAddonItemIndex:i,deepAddonItemInnerIndex:t,deepAddonItemKey:"table_advanced_item"}))}))}):F.createElement("tr",{className:"builder-table-nothing-found text-center"},
F.createElement("td",{colSpan:l.jp_table_advanced_item.length},Joomla.JText._("COM_JPAGEBUILDER_NO_ITEMS_FOUND"))))),null!=l&&l.table_pagination&&null!=l&&l.pagination_item?F.createElement("div",{className:"jpb-addon-table-pagination-wrap".concat(null!=l&&l.total_entries?"":" ".concat(l.pagination_position)).concat(l.total_entries&&l.total_entries_position?" jpb-total-entries-to-left":"")},F.createElement("ul",{className:"jpb-editor-pagination"},F.createElement("li",{className:"builder-page-item",
onClick:function(e){return O(e,"prev")},role:"presentation"},F.createElement("a",{href:"#",className:"jpb-table-prev-link jpb-page-link",title:"Prev",style:{display:w>1?"block":"none"}},F.createElement("i",{"aria-hidden":"true",className:"fas fa-angle-left"}))),g>0&&(0,ue.Z)(Array(g).keys()).map(function(e){return F.createElement("li",{className:"jpb-page-item".concat(w===e+1?" active":""),key:e,onClick:function(t){return O(t,e+1)},role:"presentation"},F.createElement("a",{href:"#",className:"builder-table-paginate-link jpb-page-link"},
e+1))}),F.createElement("li",{className:"builder-page-item",onClick:function(e){return O(e,"next")},role:"presentation"},F.createElement("a",{href:"#",className:"builder-table-next-link jpb-page-link",title:"Prev",style:{display:w>=g?"none":"block"}},F.createElement("i",{"aria-hidden":"true",className:"fas fa-angle-right"})))),null!=l&&l.total_entries?F.createElement("span",{className:"jpb-table-total-reg"},Joomla.JText._("COM_JPAGEBUILDER_TOTAL_ENTRIES"),": ",l.table_advanced_item.length):null):
null)))};function Yv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yv(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yv(Object(n)).forEach(function(t){Object.defineProperty(e,
t,Object.getOwnPropertyDescriptor(n,t))})}return e}const qv=(0,Xn.$j)(null,function(e){return{handleChangeTitle:function(t){return e(Ui(t))}}})(function(e){var t=e.row,n=e.column,o=e.addon,r=e.rowIndex,a=e.colIndex,i=e.addonIndex,l=e.handleChangeTitle,c=_u(o),s=(0,F.useRef)(null),d=(0,F.useMemo)(function(){return o.settings},[o]),u=(0,F.useState)(d),m=(0,j.Z)(u,2),p=m[0],v=m[1],f=(0,F.useMemo)(function(){return p.heading_selector},[p]),b=(0,F.useState)(0),h=(0,j.Z)(b,2),g=h[0],E=h[1],y=(0,F.useState)(be.device),
_=(0,j.Z)(y,2),w=_[0],x=_[1],I=Bt(o.settings);(0,F.useEffect)(function(){!Or()(p,d)&&v(d)},[d]),be.on("change",function(){w!==be.device&&x(be.device)}),(0,F.useEffect)(function(){var e=d.jp_tab_item.map(function(e){var t,n=e;return null!==(t=n)&&void 0!==t&&t.image_or_icon||(e.icon&&(n=Xv(Xv({},e),{},{image_or_icon:"icon"})),e.image&&(n=Xv(Xv({},e),{},{image_or_icon:"image"}))),n}),t=Xv(Xv({},d),{},{jp_tab_item:e});v(t)},[d.jp_tab_item]);var O=function(){var e;Nu.setAddonHoverId(null!==(e=null==o?
void 0:o.id)&&void 0!==e?e:null)},C=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t)return null;if("image"===t.image_or_icon&&t.image)return F.createElement("img",{className:"jpb-tab-image ".concat(["top","bottom"].includes(p.nav_image_postion)?"tab-image-block":""),src:null===(e=t.image)||void 0===e?void 0:e.src,style:["right","bottom"].includes(p.nav_image_postion)?{order:10}:{order:0}});if("icon"===t.image_or_icon){var n=1===(null!=t&&t.icon?null==t?void 0:t.icon.split(" "):
"").length?"fa ".concat(null==t?void 0:t.icon):null==t?void 0:t.icon;return void 0!==n&&n.trim()?F.createElement("span",{className:"jpb-tab-icon ".concat(["top","bottom"].includes(p.nav_icon_postion)?"tab-icon-block":""),style:["right","bottom"].includes(p.nav_icon_postion)?{order:10}:{order:0}},F.createElement("i",{className:n,"area-hidden":"true"})):null}},A="jpb-text-left";"custom"==p.style&&(A=fe()(p.nav_text_align)?(null==p?void 0:p.nav_text_align[be.device])||"jpb-text-left":(null==p?void 0:
p.nav_text_align)||"jpb-text-left"),A.split("-").length<2&&(A="jpb-text-".concat(A));var N="";(["top","bottom"].includes(p.nav_icon_postion)||["top","bottom"].includes(p.nav_image_postion))&&(N="tab-img-or-icon-block-wrap");var D=(fe()(null==p?void 0:p.nav_position)?p.nav_position[w]:null==p?void 0:p.nav_position)||"nav-left",S=Array.isArray(null==p?void 0:p.jp_tab_item)?p.jp_tab_item:[],P=Ut(o.settings),k=P.animationClass,R=P.animationAttr;return F.createElement(F.Fragment,null,F.createElement("div",
{dangerouslySetInnerHTML:{__html:c}}),F.createElement(Eu,{rowId:t.id,columnId:n.id,addon:o,mouseInteraction:!0,scrollInteraction:!0}),F.createElement("div",(0,ao.Z)({className:"jpb-addon jpb-addon-tab ".concat(p.class," builder-deep-addon ").concat(k," ").concat(I),style:{position:"relative"},id:"jpb-addon-".concat(o.id),ref:s},R),(null==p?void 0:p.title)&&F.createElement(f,{className:"jpb-addon-title",dangerouslySetInnerHTML:{__html:p.title}}),F.createElement("div",{className:"jpb-addon-content jpb-tab jpb-".concat(p.style,
"-tab jpb-tab-").concat(D)},F.createElement("ul",{className:"jpb-nav jpb-nav-".concat(p.style)},S.length>0&&S.map(function(e,c){var d="";if("image"===e.image_or_icon&&e.image&&(d=["top","left"].includes(p.nav_image_postion)),"icon"===e.image_or_icon){var u=1===(null!=e&&e.icon?null==e?void 0:e.icon.split(" "):"").length?"fa ".concat(null==e?void 0:e.icon):null==e?void 0:e.icon;void 0!==u&&u.trim()&&(d=["top","left"].includes(p.nav_icon_postion))}return F.createElement("li",{className:"".concat(g===
c?"active":""),key:c,onClick:function(e){return function(e,r){var a,i;e.stopPropagation(),e.preventDefault(),E(r);var l=null===(a=addonsJSON)||void 0===a?void 0:a[o.name],c=n.addons.findIndex(function(e){return e.id===o.id}),d=Ge(t.id),u=He(t.id,n.id);if(void 0!==l){var m=void 0!==(null==l||null===(i=l.inline)||void 0===i?void 0:i.buttons),p={type:"addon",index:d,settings:{rowIndex:d,colIndex:u,addonIndex:c,addonId:o.id,htmlContent:o.htmlContent,assets:o.assets,addonName:o.name,formData:o.settings},
row:t,column:n,addon:o};if(m){if(ko.show&&ko.addonId===p.settings.addonId)return;wr.resetAll(),ko.reset(),ko.setAddon(K()(p)),ko.setType("addon"),ko.setConfig(l.inline),ko.setPosition(s.current.getBoundingClientRect()),ko.showEditor()}else ko.reset(),wr.resetAll(),wr.setAddon(p),wr.setType("addon"),wr.showEditPanel()}}(e,c)},onMouseEnter:O},F.createElement("a",{className:"".concat(A," ").concat(N),href:"#jpb-tab-".concat(o.id).concat(c),"data-toggle":"jpb-tab"},d&&C(e),F.createElement(Fv,{title:e.title,
handleChangeTitle:l,itemIndex:c,addonName:o.name,rowIndex:r,colIndex:a,addonIndex:i}),!d&&C(e),F.createElement(Fv,{className:"jpb-tab-subtitle jp-editable-title",name:"subtitle",title:e.subtitle,handleChangeTitle:l,itemIndex:c,addonName:o.name,rowIndex:r,colIndex:a,addonIndex:i})))})),F.createElement("div",{className:"jpb-tab-content jpb-tab-".concat(p.style,"-content")},S.length>0&&S.map(function(e,r){return F.createElement("div",{key:r,id:"jpb-tab-".concat(o.id).concat(r),className:"jpb-tab-pane jpb-fade".concat(r===
g?" active in":"")},(null==e?void 0:e.content)&&F.createElement(bf,{column:n,row:t,addons:e.content,rowIndex:Ge(t.id),colIndex:He(t.id,n.id)}))})))))}),$v=function(e){var t=e.row,n=e.column,o=e.addon,r=e.rowIndex,a=e.colIndex,i=e.addonIndex;return(0,F.useCallback)(function(){switch(o.name){case "accordion":return F.createElement(Wv,{row:t,column:n,addon:o,rowIndex:r,colIndex:a,addonIndex:i});case "tab":return F.createElement(qv,{row:t,column:n,addon:o,rowIndex:r,colIndex:a,addonIndex:i});case "table_advanced":return F.createElement(Kv,
{row:t,column:n,addon:o});default:return F.createElement("div",null,Joomla.JText._("COM_JPAGEBUILDER_INVALID_DEEP_ADDON"))}},[o,i])()};var Qv,ef,tf,nf=function(e){var t=e.id,n=e.styleFn;return je.filter(function(e){return e!==m}).map(function(e){var o="";return pe()(n(e))||(o+=Xe(e),o+=ou(t)(ef||(ef=(0,wu.Z)(["\n\t\t\t\t\t","\n\t\t\t\t"])),n(e)),o+="}"),o}).join("\n")};function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,
t).enumerable})),n.push.apply(n,o)}return n}const rf=function(e){var t,n,o,r=e.row,a=e.column,i=e.addon,l=e.rowIndex,c=e.colIndex,s=e.index,d=e.collectionAddonId,u=e.collectionItemIndex,p=e.collectionItemAddonIndex,b=(0,F.useState)(window.builderDefaultDevice),h=(0,j.Z)(b,2),g=h[0],E=h[1],y=_u(i),_=function(e,t){return(0,F.useMemo)(function(){var t=e.settings,n="#jpb-addon-".concat(e.id),o=[],r=t.global_custom_position,a=t.global_seclect_position,i=t.global_addon_position_top,l=t.global_addon_position_left,
c=t.global_addon_z_index;if(void 0!==(0,de.Z)(r)&&r){var s,d,u,p,b,h,g,E=at(i)&&at(i.unit)?i.unit:"px",y=at(l)&&at(l.unit)?l.unit:"px";"absolute"!==a&&"fixed"!==a||(s="margin: 0;"),"absolute"===a&&(p="position: absolute;"),"fixed"===a&&(p="position: fixed;"),fe()(i)&&(d=i[window.builderDefaultDevice]?"top: ".concat(i[window.builderDefaultDevice]).concat(E,";"):"",h=nf({id:n,styleFn:function(e){return i[e]?"top: ".concat(i[e]).concat(E,";"):""}})),fe()(l)&&(u=l[window.builderDefaultDevice]?"left: ".concat(l[window.builderDefaultDevice]).concat(y,
";"):"",g=nf({id:n,styleFn:function(e){return l[e]?"left: ".concat(l[e]).concat(y,";"):""}})),c&&(b="z-index: ".concat(c,";"),p||(p="position: relative;"));var _=ou(n)(Qv||(Qv=(0,wu.Z)(["\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t\t","\n\t\t\t"])),s,d,u,p,b);o.push(_),o.push(h),o.push(g)}var w=function(e,t,n){var o,r,a=t.settings,i=a.flex_direction,l=a.reverse_direction,c=a.flex_wrap,s=a.justify_content,d=a.align_items,u=a.flex_gap,p=null!==(o=null==a?void 0:a.width)&&void 0!==o?
o:"",b=null!==(r=null==a?void 0:a.height)&&void 0!==r?r:"",h=null!=a&&a.display?"display: ".concat(a.display,";"):"",g=null!=a&&a.overflow?"overflow: ".concat(a.overflow,";"):"",E=function(e){var t="",n="",o="",r="",m="";if(Object.values(v).includes(null==a?void 0:a.display)){var h=!!(fe()(l)?l[e]:l),g=fe()(i)?i[e]:i,E=Object.values(f).includes(t);g&&(t="flex-direction: ".concat(g).concat(h&&!E?"-reverse":"",";"));var y=fe()(s)?s[e]:s;y&&(n="justify-content: ".concat(y,";"));var _=fe()(d)?d[e]:d;
_&&(o="align-items: ".concat(_,";"));var w=fe()(c)?c[e]:c;w&&(r="flex-wrap: ".concat(w,";"));var x=fe()(u)?u[e]:u;x&&(m="gap: ".concat(x,";"))}var I=p&&fe()(p)?p[e]:p,O=b&&fe()(b)?b[e]:b,C=I?"width: ".concat(I,"px;"):"",A=O?"height: ".concat(O,"px;"):"";return"\n    ".concat(t,"\n    ").concat(n,"\n    ").concat(o,"\n    ").concat(m,"\n    ").concat(r,"\n    ").concat(C,"\n    ").concat(A,"\n    ")};return ou(e)(tf||(tf=(0,wu.Z)(["\n  ","\n  ","\n  ","\n"])),h,E(m),g)+nf({id:e,styleFn:E})}(n,e);return o.push(w),
o.join("\n")},[e.settings,t])}(i,g),w=xu(i,g),x=(0,F.useRef)(null),I=(0,Xn.v9)(function(e){return e.pageBuilder.present}),O=(0,Xn.I0)();(0,F.useEffect)(function(){return be.on("change",C),function(){be.removeListener("change",C)}},[]);var C=function(){E(be.device)},A=(0,qn.L)({accept:eo,hover:function(e,t){var n;if("ADD_ADDON"===(null==e?void 0:e.type)||"MOVE_ADDON"===(null==e?void 0:e.type)){Ue(window.iDocument,".builder-div-placeholder");var o=null===(n=x.current)||void 0===n?void 0:n.getBoundingClientRect(),
l=(o.bottom-o.top)/2,c=t.getClientOffset().y-o.top;if(e.id!==i.id&&t.isOver({shallow:!0})){if($e(I,a.addons,e,i,r))return;(c===l||Math.abs(c-l)<10)&&x.current.classList.add("builder-div-placeholder")}}},drop:function(t,n){if(("ADD_ADDON"!==(null==t?void 0:t.type)&&"MOVE_ADDON"!==(null==t?void 0:t.type)||!n.didDrop())&&("ADD_ADDON"===(null==t?void 0:t.type)||"MOVE_ADDON"===(null==t?void 0:t.type))){var o=n.getDropResult();if(t.id!==i.id&&!(n.isOver({shallow:!0})&&$e(I,a.addons,t,i,r)||null!=o&&o.type)){if("MOVE_ADDON"===
(null==t?void 0:t.type)){var l={dragRowId:t.rowId,dragColumnId:t.columnId,dragAddonId:t.id,collectionItemAddonIndex:t.collectionItemAddonIndex,collectionItemIndex:t.collectionItemIndex,collectionAddonId:t.collectionAddonId,childIndex:t.childIndex},c={hoverRowId:r.id,hoverColumnId:a.id,hoverAddonId:i.id,collectionItemAddonIndex:e.collectionItemAddonIndex,collectionItemIndex:e.collectionItemIndex,collectionAddonId:e.collectionAddonId,childIndex:e.childIndex,position:"bottom",element:"div"};if(Gt(l.collectionAddonId)||
Gt(c.collectionAddonId)){var m,v;if(!Gt(l.collectionAddonId))return void O($i(l,c));if(l.collectionItemIndex!==c.collectionItemIndex||!Gt(l.collectionItemAddonIndex)||!Gt(c.collectionItemAddonIndex))return;O(qi(l,c,0===(null!==(m=null===(v=i.children)||void 0===v?void 0:v.length)&&void 0!==m?m:0)))}else O(Xi(l,c))}Ue(window.iDocument,".builder-div-placeholder"),Ue(window.iDocument,".builder-addon-placeholder");var f={};return Gt(d)&&Gt(p)&&(f.collectionAddonId=d,f.collectionItemIndex=u,f.collectionItemAddonIndex=
p),function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?of(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({type:"addon",status:!0,index:s,rowIndex:Ge(r.id),colIndex:He(r.id,a.id),parentAddon:i,dropPosition:"bottom"},f)}}},canDrop:function(e,t){var n,
o=null===(n=x.current)||void 0===n?void 0:n.getBoundingClientRect(),r=(o.bottom-o.top)/2,a=t.getClientOffset().y-o.top;return!(a!==r&&Math.abs(a-r)>10||"ADD_ADDON"!==(null==e?void 0:e.type)&&"MOVE_ADDON"!==(null==e?void 0:e.type)||"row"===e.name||"column"===e.name)}}),N=(0,j.Z)(A,2);N[0],(0,N[1])(x);var D=null!==(t=i.settings)&&void 0!==t&&t.class?" ".concat(i.settings.class):"",S=null!=i&&null!==(n=i.children)&&void 0!==n&&n.length?"":" empty-div-addon",P=Bt(i.settings),k=Ut(i.settings),R=k.animationClass,
T=k.animationAttr,L="builder-div".concat(D).concat(S).concat(P," ").concat(R);return F.createElement(F.Fragment,null,F.createElement("div",{dangerouslySetInnerHTML:{__html:y}}),F.createElement("style",null,w),F.createElement("style",null,_),F.createElement(Eu,{rowId:r.id,columnId:a.id,addon:i,mouseInteraction:!0,scrollInteraction:!0}),F.createElement("div",(0,ao.Z)({className:"".concat(L),id:"jpb-addon-".concat(i.id),ref:x,onMouseOver:function(e){e.stopPropagation(),Ve(e.target.parentNode,"builder-div-is-hovered")},
onFocus:ye,onMouseOut:function(e){e.stopPropagation(),We(e.target.parentNode,"builder-div-is-hovered")},onBlur:ye},T),F.createElement("div",{className:"builder-addon-tools"},F.createElement("span",{role:"button",className:"builder-button builder-button-primary builder-button-round",onClick:function(e){var t;e.stopPropagation(),e.preventDefault();var n=null===(t=addonsJSON)||void 0===t?void 0:t[i.name];if(void 0!==n){var o=void 0!==(null==n?void 0:n.inline),d={};if(Gt(u))d={rowIndex:l,colIndex:c,addonIndex:s,
collectionItemIndex:u,collectionItemAddonIndex:p,addonId:i.id,htmlContent:i.htmlContent,assets:i.assets,addonName:i.name,formData:i.settings};else{var m=a.addons.findIndex(function(e){return e.id===i.id});d={rowIndex:l,colIndex:c,addonIndex:m,addonId:i.id,htmlContent:i.htmlContent,assets:i.assets,addonName:i.name,formData:i.settings}}var v={type:"addon",index:l,settings:d,row:r,column:a,addon:i};if(o){if(ko.show&&ko.addonId===v.settings.addonId)return;wr.resetAll(),ko.reset(),ko.setAddon(K()(v)),
ko.setType("addon"),ko.setConfig(n.inline),ko.setPosition(x.current.getBoundingClientRect()),ko.showEditor()}else ko.reset(),wr.resetAll(),wr.setAddon(v),wr.setType("addon"),wr.showEditPanel()}},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"ellipsisX","area-hidden":"true"}))),null!=i&&null!==(o=i.children)&&void 0!==o&&o.length?i.children.map(function(e,t){if(Gt(u)){var n=function(e){var t=e.rowIndex,n=e.colIndex,o=e.addonIndex,r=e.itemAddonId,a=Je().pageBuilder.present[t];if(!at(a))return null;
var i=a.columns[n];if(!at(i))return null;var l=i.addons[o];if(!at(l))return null;var c=null==l?void 0:l.items[0];if(!at(c))return null;var s=c.findIndex(function(e){return e.id===r});return-1===s?null:{itemAddon:c[s],index:s}}({rowIndex:l,colIndex:c,addonIndex:s,itemAddonId:e});return Gt(n)&&Gt(n.itemAddon)?F.createElement(mf,{key:e,id:n.itemAddon.id,rowIndex:l,addon:n.itemAddon,column:a,row:r,colIndex:c,index:s,childIndex:t,collectionAddonId:d,collectionItemIndex:u,collectionItemAddonIndex:n.index}):
null}var o=function(e){var t,n=e.sectionIndex,o=e.columnIndex,r=e.id,a=Je().pageBuilder.present[n],i=at(a)?a.columns[o]:null,l=null!==(t=null==i?void 0:i.addons)&&void 0!==t?t:[],c=l.findIndex(function(e){return e.id===r});return{content:l[c],index:c}}({sectionIndex:l,columnIndex:c,id:e}),i=o.index,m=o.content;return m?F.createElement(mf,{key:e,id:m.id,rowIndex:l,addon:m,column:a,row:r,colIndex:c,index:i,childIndex:t}):null}):F.createElement("span",{role:"button",className:"builder-button builder-button-outline builder-button-round",
onClick:function(){wr.resetAll();var e=new CustomEvent("triggerAddonPanel",{detail:{row:r,column:a,currentPanel:mv.addElements}});window.dispatchEvent(e)},onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"plus"}))))};var af=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),
function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),e=o.call(this),(0,B.Z)((0,io.Z)(e),"saveInlineSettings",function(){var t,n=e.props,o=n.addon,r=n.rowIndex,a=n.colIndex,i=n.column,l=n.index,c=n.collectionItemIndex,s=n.collectionItemAddonIndex,d=n.row;if(!o)return{};var u=e.props,m=u.deepAddon,p=u.deepAddonItemKey,v=u.deepAddonItemIndex,f=u.deepAddonItemInnerIndex,
b=null===(t=addonsJSON)||void 0===t?void 0:t[o.name];if(!b)return{};var h=-1,g=-1;return e.props.deepAddon?(h=i.addons.findIndex(function(e){return e.id===m.id}),g=void 0!==f?m.settings[p][v][p][f].content.findIndex(function(e){return e.id===o.id}):m.settings[p][v].content.findIndex(function(e){return e.id===o.id})):h=Gt(c)?l:i.addons.findIndex(function(e){return e.id===o.id}),{editAddon:{type:"addon",index:r,settings:{rowIndex:r,colIndex:a,addonIndex:h,addonId:o.id,htmlContent:o.htmlContent,assets:o.assets,
addonName:o.name,formData:o.settings,deepAddon:m,deepAddonItemKey:p,deepAddonItemIndex:v,deepAddonItemInnerIndex:f,deepAddonIndex:g,collectionItemIndex:c,collectionItemAddonIndex:s},row:d,column:i,addon:o},addonData:b}}),e.state={contextMenuEvent:null,contextMenuState:!1,inlineEditorId:null},e.addonRef=(0,F.createRef)(null),e.traceRef=(0,F.createRef)(!1),e._document=document.getElementById("jpagebuilder-view").contentDocument,e}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){this.createCustomDragSource()}},
{key:"shouldComponentUpdate",value:function(e,t){return this.props.addon&&Or()(e.addon,this.props.addon)&&Or()(e.addon.settings,this.props.addon.settings)&&Or()(e.colIndex,this.props.colIndex)&&Or()(e.column,this.props.column)&&Or()(e.id,this.props.id)&&Or()(e.index,this.props.index)&&Or()(e.isDragging,this.props.isDragging)&&Or()(e.isOver,this.props.isOver)&&Or()(e.rowIndex,this.props.rowIndex)&&Or()(t.contextMenuEvent,this.state.contextMenuEvent),!0}},{key:"resetContextMenu",value:function(){this.setState({contextMenuEvent:null,
contextMenuState:!1}),window.editMode="inline"}},{key:"createCustomDragSource",value:function(){var e,t=this,n=this.props.addon,o=null!=n&&n.icon?n.icon:null===(e=addonsJSON)||void 0===e||null===(e=e[null==n?void 0:n.name])||void 0===e?void 0:e.icon,r=(new DOMParser).parseFromString(o,"image/svg+xml");if(r){var a,i;null===(a=r.querySelector("svg"))||void 0===a||a.setAttribute("width","2em"),null===(i=r.querySelector("svg"))||void 0===i||i.setAttribute("height","2em");var l=new Image,c=(new XMLSerializer).serializeToString(r);
l.src="data:image/svg+xml;base64,".concat(btoa(c)),l.onload=function(){return t.props.connectDragPreview(l)}}}},{key:"editOnClickAddon",value:function(){var e,t=this.saveInlineSettings(),n=t.editAddon,o=t.addonData;if(n&&o)if(void 0!==(null==o||null===(e=o.inline)||void 0===e?void 0:e.buttons)){if(ko.show&&ko.addonId===n.settings.addonId)return;wr.resetAll(),ko.reset(),ko.setAddon(K()(n)),ko.setType("addon"),ko.setConfig(o.inline),ko.setPosition(this.addonRef.getBoundingClientRect()),ko.showEditor()}else{var r=
this.props,a=r.rowIndex,i=r.colIndex;ko.reset(),wr.resetAll(),wr.setAddon(n),wr.setRowIndex(a),wr.setColIndex(i),wr.setType("addon"),wr.showEditPanel()}}},{key:"componentDidUpdate",value:function(){var e=this.saveInlineSettings().editAddon;e&&ko.show&&ko.addonId===e.settings.addonId&&ko.setAddon(K()(e))}},{key:"onContextMenuTrigger",value:function(e){var t;if(!e.metaKey&&17!==e.keyCode&&!e.ctrlKey){e.persist(),e.preventDefault(),e.stopPropagation();var n=this.props.addon;void 0!==(null===(t=addonsJSON)||
void 0===t?void 0:t[null==n?void 0:n.name])&&(window.editMode="",this.setState({contextMenuEvent:e,contextMenuState:!0}))}}},{key:"render",value:function(){var e,t,n,o,r=this,a=this.props,i=a.addon,l=a.rowIndex,c=a.colIndex,s=a.column,d=a.row,u=a.index,m=a.isOver,p=a.isDragging,v=a.childIndex,f=a.connectDropTarget,b=a.connectDragSource,h="jpagebuilder-addon";p&&!m&&(h="jpagebuilder-dragging "+h),m&&!p&&(h+=" jpagebuilder-addon-over"),void 0===(null==i?void 0:i.visibility)||i.visibility||(h+=" jpagebuilder-addon-disabled");
var g=!1,E=s.id,y=void 0!==d?d.id:"";void 0!==(null==i||null===(e=i.settings)||void 0===e?void 0:e.global_custom_position)&&1===(null===(t=i.settings)||void 0===t?void 0:t.global_custom_position)&&void 0!==(null==i||null===(n=i.settings)||void 0===n?void 0:n.global_seclect_position)&&(g=!0,h+=" jpagebuilder-addon-custom-position");var _={addon:i,rowIndex:l,colIndex:c,addonIndex:u,childIndex:v,column:s,parentId:i.parent,customPosition:g,columnMove:this.props.columnMove,connectDragSource:b,row:d},w=
i?"addon-wrap-"+i.id:"",x=i.name===k&&0===(null==i||null===(o=i.children)||void 0===o?void 0:o.length);return i?f(b(F.createElement("div",{key:i.id,id:w,className:"".concat(h," builder-addon-element").concat("div"===i.name?" builder-div-addon":"").concat(i.name===R.productList?" builder-collection-addon":"").concat(null!=d&&d.parent?" builder-nested-addon":" builder-parent-addon"," ").concat(x?" builder-width-full":""),onContextMenu:this.onContextMenuTrigger.bind(this),ref:function(e){return r.addonRef=
e}},F.createElement("div",{className:"builder-addon-placeholder builder-addon-placeholder-top","aria-hidden":"true"}),function(){if(i.name===k){var e;return e=Gt(r.props.collectionItemIndex)?r.props.index:s.addons.findIndex(function(e){return e.id===i.id}),_.addonIndex=e,_.collectionAddonId=r.props.collectionAddonId,_.collectionItemIndex=r.props.collectionItemIndex,_.collectionItemAddonIndex=r.props.collectionItemAddonIndex,x&&(_.addonIndex=0,_.parentId=i.id),F.createElement(rf,{row:d,column:s,addon:i,
rowIndex:l,colIndex:c,index:e,collectionAddonId:r.props.collectionAddonId,collectionItemIndex:r.props.collectionItemIndex,collectionItemAddonIndex:r.props.collectionItemAddonIndex})}return i.name===R.productList?F.createElement(Nv,{row:d,column:s,addon:i,rowIndex:l,colIndex:c,index:s.addons.findIndex(function(e){return e.id===i.id})}):Object.keys(Me).includes(i.name)||"table_advanced"===i.name?F.createElement($v,{row:d,column:s,addon:i,rowIndex:l,colIndex:c,addonIndex:s.addons.findIndex(function(e){return e.id===
i.id})}):F.createElement(Hv,{columnId:E,row:d,column:s,rowId:y,addon:i,rowIndex:l,colIndex:c,addonIndex:u,collectionItemIndex:r.props.collectionItemIndex,collectionItemAddonIndex:r.props.collectionItemAddonIndex,editAddon:r.editOnClickAddon.bind(r)})}(),F.createElement(jv,{isOpen:this.state.contextMenuState,contextMenuEvent:this.state.contextMenuEvent,onClose:this.resetContextMenu.bind(this),menuName:"addon",settings:_,reset:this.resetContextMenu.bind(this),isEmptyDivAddon:x,collectionItemIndex:this.props.collectionItemIndex,
collectionItemAddonIndex:this.props.collectionItemAddonIndex}),F.createElement("div",{className:"builder-addon-placeholder builder-addon-placeholder-bottom","aria-hidden":"true"})))):null}}]),r}(F.Component);const lf=af;var cf={canDrag:function(e){var t;return void 0===(null===(t=e.addon)||void 0===t?void 0:t.reference_id)},beginDrag:function(e){var t;return wr.resetAll(),ko.reset(),void 0!==(null===(t=e.addon)||void 0===t?void 0:t.reference_id)?{}:{type:"MOVE_ADDON",id:e.id,index:e.index,collectionItemAddonIndex:e.collectionItemAddonIndex,
collectionItemIndex:e.collectionItemIndex,collectionAddonId:e.collectionAddonId,childIndex:e.childIndex,rowIndex:e.rowIndex,colIndex:e.colIndex,rowId:e.row.id,columnId:e.column.id}}},sf={canDrop:function(e,t){var n=t.getItem();return null==e||!e.deepAddon||"table_advanced"!==e.deepAddon.name||-1===[R.productList,"div","row","column","accordion","tab","table"].indexOf(n.name)},hover:function(e,t,n){var o;if(t.canDrop()){var r=t.getItem(),a=e.state.pageBuilder.present,i=e.addon.name===R.productList,
l="div"===e.addon.name;if(r.id!==e.id&&("MOVE_ADDON"!==r.type||(null===(o=e.row)||void 0===o?void 0:o.parent_addon)!==r.id)){var c=(0,V.findDOMNode)(n),s=c.getBoundingClientRect(),d=(s.bottom-s.top)/2,u=t.getClientOffset().y-s.top;if(Ue(window.iDocument,".builder-show-placeholder-bottom"),Ue(window.iDocument,".builder-show-placeholder-top"),t.canDrop()&&t.isOver({shallow:!1})){if($e(a,e.column.addons,r,e.addon,e.row))return;l||i?u!==d&&Math.abs(u-d)>10&&(u<d+10&&(c.classList.remove("builder-show-placeholder-bottom"),
c.classList.add("builder-show-placeholder-top")),u>d+10&&(c.classList.remove("builder-show-placeholder-top"),c.classList.add("builder-show-placeholder-bottom"))):(u<d&&(c.classList.remove("builder-show-placeholder-bottom"),c.classList.add("builder-show-placeholder-top")),u>d&&(c.classList.remove("builder-show-placeholder-top"),c.classList.add("builder-show-placeholder-bottom")))}}}},drop:function(e,t,n){var o;if(Ue(window.iDocument,".builder-show-placeholder-bottom"),Ue(window.iDocument,".builder-show-placeholder-top"),
t.canDrop()){var r=t.getItem(),a=r.index,i=e.index,l="ADD_ADDON"===r.type&&"row"===r.name,c=e.state.pageBuilder.present;if(r.id!==e.id&&("MOVE_ADDON"!==r.type||(null===(o=e.row)||void 0===o?void 0:o.parent_addon)!==r.id)&&!$e(c,e.column.addons,r,e.addon,e.row)){var s=(0,V.findDOMNode)(n).getBoundingClientRect(),d=(s.bottom-s.top)/2,u=t.getClientOffset();if(u){var m=u.y-s.top,p={drag:r,dragIndex:a,drop:e,hoverIndex:i};if(m<d&&(p.dropPosition="top"),m>d&&(p.dropPosition="bottom"),r.type===to&&"block"===
r.name){var v=e.rowIndex,f=e.colIndex;e.addBlockAsNestedSection({sectionIndex:v,columnIndex:f,sectionData:r.data,isAbove:"top"===p.dropPosition})}else if(l){var b=e.row.id,h=e.column.id,g=i;"bottom"===p.dropPosition&&g++;var E={};null!=e&&e.deepAddon&&(E.deepAddon=e.deepAddon,E.deepAddonItemKey=e.deepAddonItemKey,E.deepAddonItemIndex=e.deepAddonItemIndex,void 0!==(null==e?void 0:e.deepAddonItemInnerIndex)&&(E.deepAddonItemInnerIndex=e.deepAddonItemInnerIndex));var y={rowId:b,columnId:h,addonIndex:g,
rowOptions:{padding:"75px 0px 75px 0px"},deepAddonOptions:E};e.addRow({parent:y})}else{if("ADD_ADDON"===r.type){var _,w,x,I,O=e.index;if("div"===e.addon.name&&Array.isArray(null===(_=e.addon)||void 0===_?void 0:_.children)){var C=e.addon.children.length;if(0!==C){var A=e.column.addons.findIndex(function(t){var n=e.addon.children[C-1];return t.id.toString()===n.toString()});O=-1===A?e.index:A}}var N={type:"addon",status:!0,index:O,dropPosition:p.dropPosition,addonRef:null,rowIndex:e.rowIndex,colIndex:e.colIndex};
if(null!=e&&e.deepAddon&&(N.deepAddon=e.deepAddon,N.deepAddonItemKey=e.deepAddonItemKey,N.deepAddonItemIndex=e.deepAddonItemIndex,void 0!==(null==e?void 0:e.deepAddonItemInnerIndex)&&(N.deepAddonItemInnerIndex=e.deepAddonItemInnerIndex)),(null==e||null===(w=e.addon)||void 0===w||!w.parent)&&Gt(null==e?void 0:e.collectionAddonId)&&Gt(null==e?void 0:e.collectionItemAddonIndex)){N.collectionAddonId=e.collectionAddonId;var D=e.collectionItemAddonIndex;"bottom"===p.dropPosition&&D++,N.collectionItemAddonIndex=
D}if(null!=e&&null!==(x=e.addon)&&void 0!==x&&x.parent&&Gt(null==e?void 0:e.collectionAddonId)&&Gt(null==e?void 0:e.collectionItemAddonIndex)&&Gt(null==e?void 0:e.collectionItemIndex)){N.collectionAddonId=e.collectionAddonId;var S=Fe(e.row.id,e.column.id,e.collectionAddonId),P=e.addon.id,k=S.items[0].find(function(t){var n;return t.id===(null==e||null===(n=e.addon)||void 0===n?void 0:n.parent)});if(Gt(k)){var R=k.children.indexOf(P);"bottom"===p.dropPosition&&R++,N.collectionItemAddonIndex=e.collectionItemAddonIndex,
N.parentAddon=k,N.childIndex=R}}else if(null!=e&&null!==(I=e.addon)&&void 0!==I&&I.parent){var T=Fe(e.row.id,e.column.id,e.addon.parent),L=e.addon.id,M=T.children.indexOf(L);"bottom"===p.dropPosition&&M++,N.parentAddon=T,N.childIndex=M}return N}var Z={dragRowId:r.rowId,dragColumnId:r.columnId,dragAddonId:r.id,collectionItemAddonIndex:r.collectionItemAddonIndex,collectionItemIndex:r.collectionItemIndex,collectionAddonId:r.collectionAddonId,childIndex:r.childIndex},j={hoverRowId:e.row.id,hoverColumnId:e.column.id,
hoverAddonId:e.id,collectionItemAddonIndex:e.collectionItemAddonIndex,collectionItemIndex:e.collectionItemIndex,collectionAddonId:e.collectionAddonId,childIndex:e.childIndex,position:p.dropPosition};if(Gt(Z.collectionAddonId)||Gt(j.collectionAddonId)){if(!Gt(Z.collectionAddonId))return void e.sortAddonWithCollectionItemAddon(Z,j);if(Z.collectionItemIndex!==j.collectionItemIndex||!Gt(Z.collectionItemAddonIndex)||!Gt(j.collectionItemAddonIndex))return;e.sortCollectionAddonItem(Z,j)}else e.moveAddon(Z,
j);t.getItem().index=i,t.getItem().rowIndex=e.rowIndex,t.getItem().colIndex=e.colIndex,t.getItem().rowId=e.row.id,t.getItem().columnId=e.column.id}}}}}},df=(0,zo.DragSource)(eo,cf,function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}}),uf=(0,zo.DropTarget)([eo,oo,to],sf,function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver({shallow:!0}),canDrop:t.canDrop()}});const mf=(0,Xn.$j)(function(e){return{state:e}},function(e){return{addRow:function(t){return e(Pi(t))},
moveAddon:function(t,n){return e(Xi(t,n))},sortCollectionAddonItem:function(t,n){return e(qi(t,n))},sortAddonWithCollectionItemAddon:function(t,n){e($i(t,n))},addBlockAsNestedSection:function(t){return e(Ki(t))}}})(uf(df(lf)));var pf={hover:function(e,t,n){var o=t.getItem(),r=n.addonListRef,a="ADD_ADDON"===o.type&&"columns"===o.name;a&&ze(e.row.id)>=8||(Ue(window.iDocument,".builder-show-placeholder-center"),Ue(window.iDocument,".builder-show-placeholder-bottom"),Ue(window.iDocument,".builder-show-placeholder-top"),
t.isOver({shallow:!0})&&!a&&r.classList.add("builder-show-placeholder-center"))},drop:function(e,t){if(!t.didDrop()){var n=t.getItem(),o="ADD_ADDON"===n.type&&"columns"===n.name,r="ADD_ADDON"===n.type&&"row"===n.name,a=n.type===to&&"block"===n.name;if(Ue(window.iDocument,".builder-show-placeholder-center"),!o)if(a){var i=e.rowIndex,l=e.colIndex;e.addBlockAsNestedSection({sectionIndex:i,columnIndex:l,sectionData:n.data})}else{if(r&&t.isOver({shallow:!0})){var c={rowId:e.row.id,columnId:e.column.id,
addonIndex:0,rowOptions:{padding:"75px 0px 75px 0px"}};return e.addRow({parent:c}),void(0,ue.Z)(window.iDocument.querySelectorAll(".builder-row-placeholder")).forEach(function(e){return e.classList.remove("builder-row-placeholder")})}if("ADD_ADDON"===n.type&&t.isOver({shallow:!0})){var s={type:"addon",status:!0,index:0,dropPosition:"top",rowIndex:Ge(e.row.id),colIndex:e.colIndex};return null!=e&&e.deepAddon&&(s.deepAddon=e.deepAddon,s.deepAddonItemKey=e.deepAddonItemKey,s.deepAddonItemIndex=e.deepAddonItemIndex,
void 0!==(null==e?void 0:e.deepAddonItemInnerIndex)&&(s.deepAddonItemInnerIndex=e.deepAddonItemInnerIndex)),s}if(t.isOver({shallow:!0})&&"MOVE_ADDON"===(null==n?void 0:n.type)){var d={dragRowId:n.rowId,dragColumnId:n.columnId,dragAddonId:n.id},u={hoverRowId:e.row.id,hoverColumnId:e.column.id,hoverAddonId:null,position:"top"};e.moveAddonItems(d,u)}}}}},vf=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;
if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(){var e;return(0,J.Z)(this,r),e=o.call(this),(0,B.Z)((0,io.Z)(e),"getAddonIndex",function(t){var n,o;return null!==(n=e.props)&&void 0!==n&&n.deepAddon?void 0!==(null===(o=e.props)||void 0===
o?void 0:o.deepAddonItemInnerIndex)?e.props.deepAddon.settings[e.props.deepAddonItemKey][e.props.deepAddonItemIndex][e.props.deepAddonItemKey][e.props.deepAddonItemInnerIndex].content.findIndex(function(e){return e.id===t.id}):e.props.deepAddon.settings[e.props.deepAddonItemKey][e.props.deepAddonItemIndex].content.findIndex(function(e){return e.id===t.id}):e.props.column.addons.findIndex(function(e){return e.id===t.id})}),e.state={contextMenuState:!1},e.addonListRef=(0,F.createRef)(null),e}return(0,G.Z)(r,
[{key:"render",value:function(){var e,t=this,n=this.props,o=n.addons,r=n.column,a=n.row,i=n.rowIndex,l=n.colIndex,c=n.connectDropTarget,s=n.isOverCurrent,d="jpagebuilder-addons",u=(null==r||null===(e=r.children)||void 0===e?void 0:e.length)>0;return o.length||(d+=u?" column-children-empty":" jpagebuilder-no-addons"),c(F.createElement("div",{className:d,ref:function(e){return t.addonListRef=e}},!o.length&&F.createElement("div",{className:"builder-addon-placeholder builder-addon-placeholder-center",
"aria-hidden":"true"}),Kt()(o)&&o.length>0?F.createElement(F.Fragment,null,o.map(function(e,n){if("nested_row"===e.type){var o=function(e){var t=e.id,n=e.rowId,o=e.columnId,r=Je().pageBuilder.present,a=r.findIndex(function(e){return e.id===t&&at(e.parent)&&"boolean"!=typeof e.parent&&e.parent.rowId===n&&e.parent.columnId===o}),i=null;return-1!==a&&(i=r[a]),{nestedRow:i,index:a}}({id:e.id,rowId:a.id,columnId:r.id}),c=o.nestedRow,s=o.index;return Gt(c)?F.createElement(Mf,{key:e.id,id:e.id,index:s,row:c,
nestedRowData:{sectionIndex:i,columnIndex:l,addonIndex:n}}):null}var d,u,m,p;return null!=e&&e.parent?null:F.createElement(mf,{key:e.id,id:e.id,rowIndex:i,addon:e,column:r,row:a,colIndex:l,index:t.getAddonIndex(e),addonSort:t.props.addonSortable,columnMove:t.props.moveButton,deepAddon:(null===(d=t.props)||void 0===d?void 0:d.deepAddon)||void 0,deepAddonItemKey:(null===(u=t.props)||void 0===u?void 0:u.deepAddonItemKey)||void 0,deepAddonItemIndex:void 0!==(null===(m=t.props)||void 0===m?void 0:m.deepAddonItemIndex)?
t.props.deepAddonItemIndex:void 0,deepAddonItemInnerIndex:void 0!==(null===(p=t.props)||void 0===p?void 0:p.deepAddonItemInnerIndex)?t.props.deepAddonItemInnerIndex:void 0})})):!s&&!u&&F.createElement("span",{className:"builder-button builder-button-outline builder-button-round",onClick:function(){wr.resetAll();var e=new CustomEvent("triggerAddonPanel",{detail:{row:a,column:r,currentPanel:mv.addElements}});window.dispatchEvent(e)},role:"button",onKeyDown:ye,tabIndex:0},F.createElement(co,{name:"plus"}))))}}]),
r}(F.Component),ff=(0,zo.DropTarget)([eo,oo,"innerRow","innerAddon",to],pf,function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),canDrop:t.canDrop(),isOverCurrent:t.isOver({shallow:!0})}});const bf=(0,Xn.$j)(function(e){return{state:e}},function(e){return{addonSortable:function(t){return e(t)},addRow:function(t){return e(Pi(t))},moveAddonItems:function(t,n){return e(Xi(t,n))},addBlockAsNestedSection:function(t){return e(Ki(t))}}})(ff(vf));function hf(e,t){var n="undefined"!=typeof Symbol&&
e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gf(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},
e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}function gf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Ef=function(e){(0,H.Z)(r,
e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),
"handleResponsiveDeviceChange",function(){t.setState({device:be.device})}),t.state={move:!1,index:t.props.index,device:be.device,fitInRow:!1,showColumnOptions:!1,contextMenuState:!1,contextMenuEvent:null},t.columnRef=F.createRef(null),t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){var e,t,n;this.setState({fitInRow:fe()(null===(e=this.props.row.settings)||void 0===e?void 0:e.fit_columns)?Boolean(null===(t=this.props.row.settings)||void 0===t?void 0:t.fit_columns[be.device]):Boolean(null===
(n=this.props.row.settings)||void 0===n?void 0:n.fit_columns)}),be.on("change",this.handleResponsiveDeviceChange)}},{key:"componentWillUnmount",value:function(){be.removeListener("change",this.handleResponsiveDeviceChange)}},{key:"componentDidUpdate",value:function(e,t){var n,o,r=null,a=null;fe()(e.row.settings.fit_columns)&&fe()(this.props.row.settings.fit_columns)?(r=null===(n=e.row.settings.fit_columns)||void 0===n?void 0:n[be.device],a=null===(o=this.props.row.settings.fit_columns)||void 0===
o?void 0:o[be.device]):(r=e.row.settings.fit_columns,a=this.props.row.settings.fit_columns),r!==a&&this.setState({fitInRow:Boolean(a)}),t.device!==this.state.device&&this.setState({fitInRow:Boolean(a)}),this.props.index!=this.state.index&&this.setState({move:!1,index:this.props.index})}},{key:"getColumnStyle",value:function(){var e=this.props.column.settings,t={};if(void 0!==e.color&&e.color&&(t.color=e.color),void 0!==e.boxshadow&&e.boxshadow){var n="";n=fe()(e.boxshadow)?(e.boxshadow.ho||0)+"px "+
(e.boxshadow.vo||0)+"px "+(e.boxshadow.blur||0)+"px "+(e.boxshadow.spread||0)+"px "+(e.boxshadow.color||0):e.boxshadow||"",e.boxshadow.enabled&&(t.boxShadow=n)}var o={};return o=void 0!==e.background_image&&void 0!==e.background_image.src?e.background_image:{src:e.background_image},void 0===e.background_type?(void 0!==e.background&&e.background&&(t.backgroundColor=e.background),o.src&&(1==o.src.startsWith("http")?t.backgroundImage="url("+o.src+")":t.backgroundImage="url("+pagebuilder_base+o.src+")",
void 0!==e.background_repeat&&e.background_repeat&&(t.backgroundRepeat=e.background_repeat),void 0!==e.background_size&&e.background_size&&"custom"!==e.background_size&&(t.backgroundSize=e.background_size),void 0!==e.background_attachment&&e.background_attachment&&(t.backgroundAttachment=e.background_attachment),void 0!==e.background_position&&e.background_position&&"custom"!==e.background_position&&(t.backgroundPosition=e.background_position))):("color"!=e.background_type&&"image"!=e.background_type||
void 0===e.background||!e.background||(t.backgroundColor=e.background),"image"==e.background_type&&o.src&&(1==o.src.startsWith("http")||1==o.src.startsWith("https")?t.backgroundImage="url("+o.src+")":t.backgroundImage="url("+pagebuilder_base+o.src+")",void 0!==e.background_repeat&&e.background_repeat&&(t.backgroundRepeat=e.background_repeat),void 0!==e.background_size&&e.background_size&&"custom"!==e.background_size&&(t.backgroundSize=e.background_size),void 0!==e.background_attachment&&e.background_attachment&&
(t.backgroundAttachment=e.background_attachment),void 0!==e.background_position&&e.background_position&&"custom"!==e.background_position&&(t.backgroundPosition=e.background_position)),"gradient"==e.background_type&&void 0!==e.background_gradient&&("radial"==e.background_gradient.type?t.backgroundImage="radial-gradient(at ".concat(e.background_gradient.radialPos||"center center",", ").concat(e.background_gradient.color," ").concat(e.background_gradient.pos||0,"%, ").concat(e.background_gradient.color2,
" ").concat(e.background_gradient.pos2||100,"%)"):t.backgroundImage="linear-gradient(".concat(e.background_gradient.deg||0,"deg, ").concat(e.background_gradient.color," ").concat(e.background_gradient.pos||0,"%, ").concat(e.background_gradient.color2," ").concat(e.background_gradient.pos2||100,"%)"))),t}},{key:"getColumnClassName",value:function(){var e=this.props,t=e.isOver,n=e.canDrop,o=e.isDragging,r=this.props.column,a=r.visibility,i=r.class_name,l=r.settings,c="jpb-"+i;return o&&(c="jpagebuilder-dragging "+
c),void 0!==l.items_align_center&&l.items_align_center&&(c="jpb-column-vertical-align "+c),t&&!n&&(c="jpagebuilder-not-droppable "+c),a||(c+=" jpagebuilder-column-disabled"),void 0!==l.hidden_xl&&1==l.hidden_xl&&(c+=" jpb-hidden-xl"),void 0!==l.hidden_lg&&1==l.hidden_lg&&(c+=" jpb-hidden-lg"),void 0!==l.hidden_md&&1==l.hidden_md&&(c+=" jpb-hidden-md"),void 0!==l.hidden_xs&&1==l.hidden_xs&&(c+=" jpb-hidden-xs"),void 0!==l.hidden_sm&&1==l.hidden_sm&&(c+=" jpb-hidden-sm"),void 0!==l.sm_col&&l.sm_col&&
(c=c+" jpb-"+l.sm_col),void 0!==l.xs_col&&l.xs_col&&(c=c+" jpb-"+l.xs_col),void 0!==l.tablet_order_landscape&&l.tablet_order_landscape&&(c=c+" jpb-order-lg-"+l.tablet_order_landscape),void 0!==l.tablet_order&&l.tablet_order&&(c=c+" jpb-order-md-"+l.tablet_order),void 0!==l.mobile_order_landscape&&l.mobile_order_landscape&&(c=c+" jpb-order-sm-"+l.mobile_order_landscape),void 0!==l.mobile_order&&l.mobile_order&&(c=c+" jpb-order-xs-"+l.mobile_order),c}},{key:"getColumnInnerClassName",value:function(){var e=
this.props.column.settings,t="jpagebuilder-column jpb-column";return Jt({settings:e})&&(t+=" jpb-wow "+e.animation),void 0===e.items_content_alignment||"top"!=e.items_content_alignment&&"start"!=e.items_content_alignment?void 0===e.items_content_alignment||"bottom"!=e.items_content_alignment&&"end"!=e.items_content_alignment?t+=void 0!==e.items_align_center&&e.items_align_center?" jpb-align-items-center":"":t+=void 0!==e.items_align_center&&e.items_align_center?" jpb-align-items-bottom":"":t+=void 0!==
e.items_align_center&&e.items_align_center?" jpb-align-items-top":"",void 0!==e.class&&e.class&&(t+=" "+e.class),t}},{key:"onContextMenuTrigger",value:function(e){e.metaKey||17===e.keyCode||e.ctrlKey||(e.stopPropagation(),null!=e&&e.persist&&e.persist(),e.preventDefault(),window.editMode="",this.setState({contextMenuEvent:e,contextMenuState:!0}))}},{key:"resetContextMenu",value:function(){this.setState({contextMenuEvent:null,contextMenuState:!1}),window.editMode="inline"}},{key:"render",value:function(){var e,
t,n=this.props,o=n.column,r=n.row,a=n.rowIndex,i=n.index,l=n.connectDropTarget,c=this.state.device,s=window.frames["jpagebuilder-view"].document,d=o.settings.width,u="column-id-"+o.id,m="column-wrap-id-"+o.id,v=this.getColumnStyle(),f=this.getColumnClassName(),b=this.getColumnInnerClassName(),h=s.getElementById("".concat(m));if(h&&h.hasAttribute("style")&&h.removeAttribute("style"),this.state.move&&(b+=" jpagebuilder-column-movable"),Jt({settings:o.settings})&&null!==(e=o.settings)&&void 0!==e&&e.animationduration)var g=
o.settings.animationduration+"ms";if(Jt({settings:o.settings})&&null!==(t=o.settings)&&void 0!==t&&t.animationdelay)var E=o.settings.animationdelay+"ms";var y=tu({settings:o.settings,prop:"column_height",cssProp:"height",device:c,unit:"px",important:!0}),_=tu({settings:o.settings,prop:"column_min_height",cssProp:"min-height",device:c,unit:"px"}),w=tu({settings:o.settings,prop:"column_max_height",cssProp:"max-height",device:c,unit:"px"}),x=nu(o.settings,"padding",c),I=nu(o.settings,"margin",c),O=tu({settings:o.settings,
prop:"border_width",cssProp:"border-width",device:c,unit:"px"}),C="";o.settings.use_border&&o.settings.border_color&&(C=o.settings.border_color);var A="";o.settings.use_border&&o.settings.boder_style&&(A=o.settings.boder_style);var N=tu({settings:o.settings,prop:"border_radius",cssProp:"border-radius",device:c,unit:"px"}),D={},S={};S=void 0!==o.settings.pattern_overlay&&void 0!==o.settings.pattern_overlay.src?o.settings.pattern_overlay:{src:o.settings.pattern_overlay},"image"==o.settings.background_type&&
void 0!==o.settings.overlay_type&&"overlay_none"!=o.settings.overlay_type&&(void 0===o.settings.overlay_type&&(o.settings.overlay_type="overlay_color"),void 0!==o.settings.overlay&&""!=o.settings.overlay&&"overlay_color"==o.settings.overlay_type&&(D.backgroundColor=o.settings.overlay),void 0!==o.settings.gradient_overlay&&""!=o.settings.gradient_overlay&&"overlay_gradient"==o.settings.overlay_type&&("radial"==o.settings.gradient_overlay.type?D.backgroundImage="radial-gradient(at ".concat(o.settings.gradient_overlay.radialPos||
"center center",", ").concat(o.settings.gradient_overlay.color," ").concat(o.settings.gradient_overlay.pos||0,"%, ").concat(o.settings.gradient_overlay.color2," ").concat(o.settings.gradient_overlay.pos2||100,"%)"):D.backgroundImage="linear-gradient(".concat(o.settings.gradient_overlay.deg||0,"deg, ").concat(o.settings.gradient_overlay.color," ").concat(o.settings.gradient_overlay.pos||0,"%, ").concat(o.settings.gradient_overlay.color2," ").concat(o.settings.gradient_overlay.pos2||100,"%)")),S.src&&
"overlay_pattern"==o.settings.overlay_type&&(1==S.src.startsWith("http")||1==S.src.startsWith("https")?D.backgroundImage="url("+S.src+")":D.backgroundImage="url("+pagebuilder_base+S.src+")",D.backgroundAttachment="scroll",D.backgroundColor=o.settings.overlay_pattern_color)),"image"==o.settings.background_type&&o.settings.blend_mode&&(D.mixBlendMode=o.settings.blend_mode);var P,k="",R="";P=void 0!==o.settings.background_image&&void 0!==o.settings.background_image.src?o.settings.background_image:{src:o.settings.background_image},
"undefined"!==o.settings.background_type&&P.src&&void 0!==o.settings.background_position&&o.settings.background_position&&"custom"===o.settings.background_position&&void 0!==o.settings.background_position_custom_x&&void 0!==o.settings.background_position_custom_y&&(k="background-position:".concat(o.settings.background_position_custom_x.md).concat(o.settings.background_position_custom_x.unit," ").concat(o.settings.background_position_custom_y.md).concat(o.settings.background_position_custom_y.unit,
";")),void 0!==o.settings.background_position&&o.settings.background_position&&"custom"===o.settings.background_position&&void 0!==o.settings.background_position_custom_x&&void 0!==o.settings.background_position_custom_y&&(R="background-position:".concat(o.settings.background_position_custom_x.sm).concat(o.settings.background_position_custom_x.unit," ").concat(o.settings.background_position_custom_y.sm).concat(o.settings.background_position_custom_y.unit,";")),void 0!==o.settings.background_position&&
o.settings.background_position&&"custom"===o.settings.background_position&&void 0!==o.settings.background_position_custom_x&&o.settings.background_position_custom_y;var T="",L="";void 0!==o.settings.background_size&&o.settings.background_size&&"custom"===o.settings.background_size&&void 0!==o.settings.background_size_custom&&(T="background-size:".concat(o.settings.background_size_custom.md).concat(o.settings.background_size_custom.unit,";")),void 0!==o.settings.background_size&&o.settings.background_size&&
"custom"===o.settings.background_size&&void 0!==o.settings.background_size_custom&&(L="background-size:".concat(o.settings.background_size_custom.sm).concat(o.settings.background_size_custom.unit,";")),void 0!==o.settings.background_size&&o.settings.background_size&&"custom"===o.settings.background_size&&o.settings.background_size_custom;var M="#".concat(m," {");Gt(d)&&(M+="flex: 0 0 ".concat(d[window.builderDefaultDevice],";"),M+="max-width: ".concat(d[window.builderDefaultDevice],";")),null!=I&&
I[window.builderDefaultDevice]&&(M+=I[window.builderDefaultDevice]),M+="}";var Z,j=hf(p);try{for(j.s();!(Z=j.n()).done;){var B=Z.value;M+=Xe(B),M+="#".concat(m," {"),Gt(d)&&(M+="flex: 0 0 ".concat(d[B],";"),M+="max-width: ".concat(d[B],";")),null!=I&&I[B]&&(M+="".concat(I[B],";")),M+="}",M+="}"}}catch(e){j.e(e)}finally{j.f()}var J="#".concat(u," {");null!=x&&x[window.builderDefaultDevice]&&(J+="".concat(x[window.builderDefaultDevice],";")),o.settings.use_border&&null!=O&&O[window.builderDefaultDevice]&&
(J+=O[window.builderDefaultDevice]),""!=C&&(J+="border-color: ".concat(C,";")),""!=A&&(J+="border-style: ".concat(A,";")),null!=N&&N[window.builderDefaultDevice]&&(J+=N[window.builderDefaultDevice]),J+=y[c],J+=_[c],J+=w[c],J+=T,J+=k,J+="}";var G,H=hf(p);try{for(H.s();!(G=H.n()).done;){var U=G.value;J+=Xe(U),J+="#".concat(u," {"),null!=x&&x[U]&&(J+="".concat(x[U],";")),null!=N&&N[U]&&(J+=N[U]),J+=O[U],J+=y[U],J+=L,J+=R,J+="}",J+="}"}}catch(e){H.e(e)}finally{H.f()}var z="#".concat(u," .jpb-column-overlay {");
null!=N&&N[window.builderDefaultDevice]&&(z+=null==N?void 0:N[window.builderDefaultDevice]),z+="}";var V,W=hf(p);try{for(W.s();!(V=W.n()).done;){var K=V.value;null!=N&&N[K]&&(z+=Xe(K),z+="\t#".concat(u," .jpb-column-overlay {"),z+="\t\t".concat(N[K]),z+="\t}",z+="}")}}catch(e){W.e(e)}finally{W.f()}var Y=!this.state.fitInRow||r.columns.length-1!==i,X={type:"addon",blank:!0,rowIndex:a,colIndex:i,addonIndex:null,column:o,row:r};return l(F.createElement("div",{key:o.id,className:"jpagebuilder-builder-column ".concat(f).concat(null!=
r&&r.parent?" builder-nested-column":" builder-parent-column"),onContextMenu:this.onContextMenuTrigger.bind(this),id:m,style:function(e){var t=e.dragItem,n=e.columnId;if(t&&e.isOverCurrent&&"MOVE_COLUMN"===t.dragType&&t.columnId!==n)return{opacity:.6}}({isOverCurrent:this.props.isOverCurrent,dragItem:this.props.dragItem,columnId:this.props.id}),ref:this.columnRef},F.createElement("style",{type:"text/css"},M,J,z),F.createElement(mu,this.props),F.createElement("div",{id:u,className:b,"data-jpb-wow-duration":g,
"data-jpb-wow-delay":E,style:v},void 0!==o.settings.overlay_type&&"overlay_none"!=o.settings.overlay_type&&F.createElement("div",{className:"jpb-column-overlay",style:D}),F.createElement("div",{className:"jpb-column-addons"},F.createElement(bf,{key:o.id,column:o,row:r,addons:o.addons,rowIndex:a,colIndex:i}))),F.createElement(lu,{index:this.props.index,row:this.props.row,column:this.props.column,fitInRow:this.state.fitInRow,lastColumnResizable:Y,updateColumnWidth:this.props.updateColumnWidth}),F.createElement(au,
{visibility:!0,rowIndex:a,colIndex:i,column:o,rowId:r.id}),F.createElement(jv,{isOpen:this.state.contextMenuState,contextMenuEvent:this.state.contextMenuEvent,onClose:this.resetContextMenu.bind(this),menuName:"addon",settings:X,isEmptyColumn:!o.addons.length,reset:this.resetContextMenu.bind(this)})))}}]),r}(F.Component),yf={canDrop:function(e,t){var n=t.getItem();return"ADD_ADDON"===n.type&&"columns"===n.name||n.rowIndex===e.rowIndex},hover:function(e,t,n){var o=t.getItem(),r="ADD_ADDON"===o.type&&
"columns"===o.name;if((0,ue.Z)(window.iDocument.querySelectorAll(".builder-columns-placeholder")).forEach(function(e){return e.classList.remove("builder-columns-placeholder")}),r){if(ze(e.row.id)>=8)return;var a=(0,V.findDOMNode)(n),i=a.getBoundingClientRect(),l=t.getClientOffset(),c=(i.right-i.left)/2,s=l.x-i.left;if(t.isOver()){if(a.classList.add("builder-columns-placeholder"),t.getItem().columnsPosition=void 0,s<c)return a.classList.remove("builder-columns-placeholder-right"),a.classList.add("builder-columns-placeholder-left"),
void(t.getItem().columnsPosition="left");if(s>c)return a.classList.remove("builder-columns-placeholder-left"),a.classList.add("builder-columns-placeholder-right"),void(t.getItem().columnsPosition="right")}}else"ADD_ADDON"!==o.type&&o.rowIndex===e.rowIndex&&(o.index,e.index)},drop:function(e,t,n){var o=t.getItem(),r="ADD_ADDON"===o.type&&"columns"===o.name,a="ADD_ADDON"===o.type&&"div"===o.name,i=o.type===Qn&&"MOVE_COLUMN"===o.dragType;if(!a){if(i){var l=e.rowIndex,c=e.index;if(o.columnId===e.id)return;
e.moveColumnItems({dragSectionIdx:o.rowIndex,dragColIdx:o.columnIndex,hoverSectionIdx:l,hoverColIdx:c})}if(r){var s=t.getDropResult();if(ze(e.row.id)>=8)return void re("You cannot add more than 8 columns!");if(null!=s&&s.rowId&&void 0!==(null==s?void 0:s.columnIndex)&&(s.rowId!==e.row.id||s.columnIndex!==e.index))return;return"left"===o.columnsPosition?e.onUpdateColumns(e.row.id,e.index):"right"===o.columnsPosition&&e.onUpdateColumns(e.row.id,e.index+1),(0,ue.Z)(window.iDocument.querySelectorAll(".builder-columns-placeholder")).forEach(function(e){return e.classList.remove("builder-columns-placeholder")}),
{rowId:e.row.id,columnIndex:e.index}}t.getItem().index;var d=e.index;t.getItem().index=d}}},_f=(0,zo.DropTarget)([Qn,eo],yf,function(e,t){return{dragItem:t.getItem(),connectDropTarget:e.dropTarget(),isOver:t.isOver(),isOverCurrent:t.isOver({shallow:!0}),canDrop:t.canDrop()}});const wf=(0,Xn.$j)(function(e){return{state:e}},function(e){return{dropAddon:function(t){e(t)},updateColumnWidth:function(t){var n=t.rowId,o=t.originalColumnId,r=t.affectedColumnId,a=t.originalColumnValue,i=t.affectedColumnValue,
l=t.device,c=t.fitInRow;e({type:"CHANGE_COLUMN_WIDTH",payload:{rowId:n,originalColumnId:o,affectedColumnId:r,originalColumnValue:a,affectedColumnValue:i,device:l,fitInRow:c}})},onUpdateColumns:function(t,n){return e(function(e){return{type:"UPDATE_COLUMNS",payload:{rowId:e,columnIndex:arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0}}}(t,n))},duplicateColumn:function(t,n){return e(ji(t,n))},deleteColumn:function(t,n){return e(Ri(t,n))},moveColumnItems:function(t){return e(Qi(t))}}})(_f(Ef));
var xf=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t,n,a;return(0,J.Z)(this,
r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"generateHeightWidth",function(){var e=t.state.initialPadding;return{T_height:void 0===e[be.device]?0:e[be.device][0],B_height:void 0===e[be.device]?0:e[be.device][2],L_width:void 0===e[be.device]?0:e[be.device][3],R_width:void 0===e[be.device]?0:e[be.device][1]}}),t.state={isTouch:(a=!1,n=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|iPad|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||
/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,
4)))&&(a=!0),a),initialPadding:{xl:[],lg:[],md:[],xs:[],sm:[]},x:0,y:0,hover:!1,active:!1,enable:"off",position:null,verticalLock:!1,horizontalLock:!1,options:{}},t.onDragOverAction=t.onDragOverAction.bind((0,io.Z)(t)),t.onDragStopAction=t.onDragStopAction.bind((0,io.Z)(t)),t.iDocument=window.frames["jpagebuilder-view"].window.document,t}return(0,G.Z)(r,[{key:"componentDidMount",value:function(){if(void 0!==this.props.paddingObj){var e=nt(this.props.paddingObj);this.setState({initialPadding:e}),this.applyPaddingStyle(e[be.device])}else{var t=
nt("0 0 0 0");this.setState({initialPadding:t}),this.applyPaddingStyle(t[be.device])}this.state.isTouch&&this.setState({hover:!0}),window.frames["jpagebuilder-view"].window.addEventListener("touchmove",this.onDragOverAction,!1),window.frames["jpagebuilder-view"].window.addEventListener("touchcancel",this.onDragStopAction,!1),window.frames["jpagebuilder-view"].window.addEventListener("mousemove",this.onDragOverAction),window.frames["jpagebuilder-view"].window.addEventListener("mouseup",this.onDragStopAction)}},
{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(!Or()(e.paddingObj,this.props.paddingObj)){var t=nt(e.paddingObj);Or()(t,this.state.initialPadding)||this.setState({initialPadding:t})}}},{key:"shouldComponentUpdate",value:function(e,t){return!Or()(this.props.paddingObj,e.paddingObj)||!Or()(this.state,t)}},{key:"applyPaddingStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0,0],t=this.props.row,n=this.iDocument.getElementById("section-id-".concat(t.id)),
o=(0,j.Z)(e,4),r=o[0],a=o[1],i=o[2],l=o[3];n&&(n.style.padding="".concat(r,"px ").concat(a,"px ").concat(i,"px ").concat(l,"px"))}},{key:"onContextMenuAction",value:function(e){e.preventDefault()}},{key:"onTouchStartAction",value:function(e,t){var n=this;t.persist(),t.preventDefault();var o=setTimeout(function(){n.setState({x:t.changedTouches[0].pageX,y:t.changedTouches[0].pageY,position:e,active:!0,hover:!0})},500);this.setState({timer:o})}},{key:"onTouchStopAction",value:function(e){e.persist(),
this.setState({active:!1,hover:!1}),null!==this.state.timer&&clearTimeout(this.state.timer)}},{key:"onDragOverAction",value:function(e){var t=this.state,n=t.active,o=t.initialPadding,r=t.isTouch,a=t.y,i=t.x,l=t.position,c=t.horizontalLock,s=t.verticalLock,d=this.props,u=d.row,m=d.rowIndex,p=d.colIndex,v=d.addonIndex;if(!0===n){var f=o[be.device],b=r?e.changedTouches[0]:e;if("top"===l){var h=Math.abs(f[0]+(b.pageY-a));f[0]=h,c&&(f[2]=h)}if("bottom"===l){var g=Math.abs(f[2]+(b.pageY-a));f[2]=g,c&&(f[0]=
g)}if("left"===l){var E=Math.abs(f[3]+(b.pageX-i));f[3]=E,s&&(f[1]=E)}if("right"===l){var y=Math.abs(f[1]+(i-b.pageX));f[1]=y,s&&(f[3]=y)}var _=f.map(function(e,t){return e+"px"}).join(" ");if(_){var w=K()(u);if(void 0===w.settings.padding){var x={xl:"",lg:"",md:"",sm:"",xs:""};x[be.device]=_,w.settings.padding=x}else void 0===w.settings.padding[be.device]?w.settings.padding=_:w.settings.padding[be.device]=_;var I={type:"row",index:m,settings:{formData:w.settings,colIndex:p,addonIndex:v}},O=this.generateHeightWidth(),
C=O.T_height,A=O.B_height,N=O.L_width,D=O.R_width;this.applyPaddingStyle([C,D,A,N]);var S=K()(o);S[be.device]=f,this.setState({initialPadding:S,x:b.pageX,y:b.pageY,options:I})}}}},{key:"onMouseDownAction",value:function(e){e.preventDefault(),this.setState({active:!0,x:e.pageX,y:e.pageY})}},{key:"onDragStopAction",value:function(e){e.preventDefault(),this.state.active&&(this.setState({active:!1}),this.props.updateRowPadding(this.state.options),this.setState({options:{}}))}},{key:"onMouseEnterAction",
value:function(e,t){t.preventDefault(),!0!==this.state.active&&this.setState({position:e,hover:!0})}},{key:"onMouseLeaveAction",value:function(e){e.preventDefault(),this.state.active||this.setState({hover:!1})}},{key:"onLockAction",value:function(e,t){t.preventDefault();var n=this.state,o=n.horizontalLock,r=n.verticalLock;"h"===e&&this.setState({horizontalLock:!o}),"v"===e&&this.setState({verticalLock:!r})}},{key:"render",value:function(){var e=this.generateHeightWidth(),t=e.T_height,n=e.B_height,
o=e.L_width,r=e.R_width;return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-padding-controller builder-padding-controller-top",onTouchStart:this.onTouchStartAction.bind(this,"top"),onTouchEnd:this.onTouchStopAction.bind(this),onContextMenu:this.onContextMenuAction.bind(this),onMouseLeave:this.onMouseLeaveAction.bind(this),onMouseEnter:this.onMouseEnterAction.bind(this,"top"),onMouseDown:this.onMouseDownAction.bind(this)},F.createElement("span",{className:"builder-padding-handle",
"area-hidden":"true"}),F.createElement("span",{className:"builder-padding-indicator",style:Object.assign({},{height:t})},t>40&&F.createElement("span",{className:"builder-padding-indicator-badge"},F.createElement("span",null,t,"px"),F.createElement("span",{className:"builder-button-icon".concat(this.state.horizontalLock?" active":""),onClick:this.onLockAction.bind(this,"h"),role:"button"},F.createElement(co,{name:"arrowsY"}))))),F.createElement("div",{className:"builder-padding-controller builder-padding-controller-right",
onTouchStart:this.onTouchStartAction.bind(this,"right"),onTouchEnd:this.onTouchStopAction.bind(this),onContextMenu:this.onContextMenuAction.bind(this),onMouseLeave:this.onMouseLeaveAction.bind(this),onMouseEnter:this.onMouseEnterAction.bind(this,"right"),onMouseDown:this.onMouseDownAction.bind(this)},F.createElement("span",{className:"builder-padding-handle","area-hidden":"true"}),F.createElement("span",{className:"builder-padding-indicator",style:Object.assign({},{width:r})},r>40&&F.createElement("span",
{className:"builder-padding-indicator-badge"},F.createElement("span",null,r,"px"),F.createElement("span",{className:"builder-button-icon".concat(this.state.verticalLock?" active":""),onClick:this.onLockAction.bind(this,"v"),role:"button"},F.createElement(co,{name:"arrowsY"}))))),F.createElement("div",{className:"builder-padding-controller builder-padding-controller-bottom",onTouchStart:this.onTouchStartAction.bind(this,"bottom"),onTouchEnd:this.onTouchStopAction.bind(this),onContextMenu:this.onContextMenuAction.bind(this),
onMouseLeave:this.onMouseLeaveAction.bind(this),onMouseEnter:this.onMouseEnterAction.bind(this,"bottom"),onMouseDown:this.onMouseDownAction.bind(this)},F.createElement("span",{className:"builder-padding-handle","area-hidden":"true"}),F.createElement("span",{className:"builder-padding-indicator",style:Object.assign({},{height:n})},n>40&&F.createElement("span",{className:"builder-padding-indicator-badge"},F.createElement("span",null,n,"px"),F.createElement("span",{className:"builder-button-icon".concat(this.state.horizontalLock?
" active":""),onClick:this.onLockAction.bind(this,"h"),role:"button"},F.createElement(co,{name:"arrowsY"}))))),F.createElement("div",{className:"builder-padding-controller builder-padding-controller-left",onTouchStart:this.onTouchStartAction.bind(this,"left"),onTouchEnd:this.onTouchStopAction.bind(this),onContextMenu:this.onContextMenuAction.bind(this),onMouseLeave:this.onMouseLeaveAction.bind(this),onMouseEnter:this.onMouseEnterAction.bind(this,"left"),onMouseDown:this.onMouseDownAction.bind(this)},
F.createElement("span",{className:"builder-padding-handle","area-hidden":"true"}),F.createElement("span",{className:"builder-padding-indicator",style:Object.assign({},{width:o})},o>40&&F.createElement("span",{className:"builder-padding-indicator-badge"},F.createElement("span",null,o,"px"),F.createElement("span",{className:"builder-button-icon".concat(this.state.verticalLock?" active":""),onClick:this.onLockAction.bind(this,"v"),role:"button"},F.createElement(co,{name:"arrowsY"}))))))}}]),r}(F.Component);
const If=(0,Xn.$j)(function(e){return{state:e}},function(e){return{updateRowPadding:function(t){e(zi(t))}}})(xf);function Of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Of(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?
Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Of(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Af=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);
if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"handleEditRow",function(e){t._toggleRowSettingsPanel(),t.setState({editRow:Cf(Cf({},t.state.editRow),{},{open:!0,targetElm:e.currentTarget})})}),(0,B.Z)((0,io.Z)(t),"handleCopyRow",function(){t._toggleRowSettingsPanel();var e=kt(t.props.state.pageBuilder.present,t.props.row);Mt(g,e),t.props.setCopiedDataStatus&&
t.props.setCopiedDataStatus(),ne(Joomla.JText._("COM_JPAGEBUILDER_SECTION_COPIED"),"Success"),t.props.checkCopiedSection&&t.props.checkCopiedSection()}),(0,B.Z)((0,io.Z)(t),"handlePasteRow",function(){var e;t._toggleRowSettingsPanel();var n=Lt(g);if(null!==(e=t.props.row)&&void 0!==e&&e.parent){var o=t.props.nestedRowData,r=o.sectionIndex,a=o.columnIndex,i=o.addonIndex;t.props.pasteNestedRow({sectionIndex:r,columnIndex:a,addonIndex:i,nestedSectionIndex:t.props.index,sectionData:n,replace:!0})}else t.props.pasteRow(t.props.index,
n)}),t.state={showRowSettingsPanel:!1,editRow:{open:!1,targetElm:null}},t}return(0,G.Z)(r,[{key:"_getSettingObjects",value:function(){return{index:this.props.index,settings:{colIndex:this.props.colIndex,addonIndex:this.props.innerRowIndex}}}},{key:"_resetColumnsWidth",value:function(){this.props.resetColumnsWidth(this.props.row.id)}},{key:"_duplicateRowClickHandle",value:function(){var e;if(null!==(e=this.props.row)&&void 0!==e&&e.parent){var t,n=this.props.nestedRowData,o=n.columnIndex,r=n.addonIndex,
a={rowId:this.props.row.id,parentRow:{id:null===(t=this.props.row.parent)||void 0===t?void 0:t.rowId,colIndex:o,addonIndex:r},type:"nested_row"};this.props.duplicateRow(a)}else this.props.duplicateRow({rowId:this.props.row.id})}},{key:"_rowVisbilityToggleHandle",value:function(){this.props.toggleRow(this.props.row.id)}},{key:"_deleteRowClickHandle",value:function(){this.props.removeRow(this.props.row.id)}},{key:"_saveRowAsSection",value:function(){var e=kt(this.props.state.pageBuilder.present,this.props.row);
vo.reset(),vo.setDialog("saveSection"),vo.setSection(e),vo.showDialog()}},{key:"_toggleRowSettingsPanel",value:function(){this.setState({showRowSettingsPanel:!this.state.showRowSettingsPanel})}},{key:"render",value:function(){var e=this,t=this.state.editRow,n=this.props,o=n.index,r=n.row;setTimeout(function(context){if(!window.jpbNoAddonAutoOpenSection&&context.state.showRowSettingsPanel){const idSection=n.row.id;const selectorSection=`#jpb-section-parent-${idSection} div.builder-row-settings > div.builder-inline-editor.builder-has-arrow.builder-arrow-right > div:nth-child(3) > span.builder-inline-editor-button`;
const targetSectionRow=window.frames["jpagebuilder-view"].window.document.querySelector(selectorSection);const parentRowSettings=targetSectionRow.closest("div.builder-row-settings");const computedStyle=window.getComputedStyle(parentRowSettings);if(computedStyle.opacity==="1"){targetSectionRow.sectionHiding=false;targetSectionRow.click()}delete targetSectionRow.sectionHiding}setTimeout(function(){if(window.jpbNoAddonAutoOpenSection)delete window.jpbNoAddonAutoOpenSection},500)},100,this);return F.createElement(F.Fragment,
null,F.createElement("div",{className:"builder-row-settings"},this.state.showRowSettingsPanel&&F.createElement("div",{className:"builder-inline-editor builder-has-arrow builder-arrow-right"},F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",title:Joomla.JText._("COM_JPAGEBUILDER_EDIT_COLUMN_IN_SECTION"),onClick:this.handleEditRow,onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"verticalBars"}))),F.createElement("div",
{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",title:Joomla.JText._("COM_JPAGEBUILDER_RESET_COLUMNS_WIDTH"),onClick:function(t){t.preventDefault(),e._toggleRowSettingsPanel(),e._resetColumnsWidth()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"update"}))),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",title:Joomla.JText._("COM_JPAGEBUILDER_SECTION_SETTINGS"),
onClick:function(t){t.preventDefault(),wr.resetAll(),wr.setType("row"),wr.setRowIndex(e.props.index),wr.setRowSettings(e.props.row),wr.showEditPanel();const preventClosing=typeof t.target.sectionHiding!=="undefined"&&t.target.sectionHiding===false;if(!preventClosing)e._toggleRowSettingsPanel()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"cog"}))),void 0===this.props.innerRowIndex&&function(t){return F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",
{className:"builder-inline-editor-button".concat(""),title:Joomla.JText._("COM_JPAGEBUILDER_SAVE_SECTION"),onClick:function(n){return n.preventDefault(),e._toggleRowSettingsPanel(),void t.saveRowAsSection()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"saveLine"})),Qe)}({saveRowAsSection:this._saveRowAsSection.bind(this)}),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",title:Joomla.JText._("COM_JPAGEBUILDER_DUPLICATE_SECTION"),
onClick:function(t){t.preventDefault(),e._toggleRowSettingsPanel(),e._duplicateRowClickHandle()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"cloneLine"}))),function(t){return function(t){var n,o=e.props.hasCopiedSection||(null===(n=e.props.state)||void 0===n||null===(n=n.copiedData)||void 0===n?void 0:n.isCopiedSectionAvailable);return F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button ".concat(""),
title:Joomla.JText._("COM_JPAGEBUILDER_COPY"),onClick:function(n){return n.preventDefault(),e._toggleRowSettingsPanel(),void t.handleCopyRow()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"copy"})),Qe),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button".concat(o?"":" disable"),title:Joomla.JText._("COM_JPAGEBUILDER_PASTE"),onClick:function(n){return n.preventDefault(),e._toggleRowSettingsPanel(),void t.handlePasteRow()},
onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"clipboard"})),Qe))}(t)}({handleCopyRow:this.handleCopyRow,handlePasteRow:this.handlePasteRow}),function(t){return function(t){return F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button ".concat("","  ").concat(t.visibility?"":" active"),title:Joomla.JText._("COM_JPAGEBUILDER_DISABLE_SECTION"),onClick:function(n){return n.preventDefault(),e._toggleRowSettingsPanel(),
void t.rowVisibilityToggleHandle()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:t.visibility?"eye":"eyeSlash"})),Qe)}(t)}({rowVisibilityToggleHandle:this._rowVisbilityToggleHandle.bind(this),visibility:this.props.row.visibility}),F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button",title:Joomla.JText._("COM_JPAGEBUILDER_DELETE_SECTION"),onClick:function(t){t.preventDefault(),e._toggleRowSettingsPanel(),
e._deleteRowClickHandle()},onKeyDown:ye,tabIndex:0,role:"button"},F.createElement(co,{name:"trash"})))),F.createElement("div",{className:"builder-inline-editor"},F.createElement("div",{className:"builder-inline-editor-item"},F.createElement("span",{className:"builder-inline-editor-button".concat(this.state.showRowSettingsPanel?" active":""),title:Joomla.JText._("COM_JPAGEBUILDER_SECTION_OPTIONS"),onClick:function(t){t.preventDefault(),e._toggleRowSettingsPanel()},onKeyDown:ye,tabIndex:0,role:"button"},
F.createElement(co,{name:"cog"}))))),t.open&&F.createElement(Qd,{open:t.open,targetElm:t.targetElm,closeDropdown:function(){return e.setState(function(e){return{editRow:Cf(Cf({},e.editRow),{},{open:!1})}})},rowIndex:o,rowId:r.id,currentLayout:r.layout,updateLayout:!0}))}}]),r}(F.Component);const Nf=(0,Xn.$j)(function(e){return{state:e}},function(e){return{duplicateRow:function(t){return e(Mi(t))},toggleRow:function(t){return e(function(e){return{type:"ROW_TOGGLE",id:e}}(t))},deleteRow:function(t){return e(function(e){return{type:"DELETE_ROW",
index:e}}(t))},pasteRow:function(t,n){return e(Gi(t,n))},pasteNestedRow:function(t){return e(Hi(t))},resetColumnsWidth:function(t){return e(function(e){return{type:"RESET_COLUMNS_WIDTH",payload:{rowId:e}}}(t))},removeRow:function(t){return e(ki(t))},setCopiedDataStatus:function(){return e({type:"SET_COPIED_DATA_STATUS"})}}})(Af);function Df(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=
Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function Pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sf(Object(n),!0).forEach(function(t){(0,B.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}
var kf=function(e){(0,H.Z)(r,e);var t,n,o=(t=r,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,z.Z)(t);if(n){var r=(0,z.Z)(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return(0,U.Z)(this,e)});function r(e){var t;return(0,J.Z)(this,r),
t=o.call(this,e),(0,B.Z)((0,io.Z)(t),"handleResponsiveDeviceChange",function(){t.setState({device:be.device})}),t.state={isSettingsOpen:!1,device:window.builderDefaultDevice},t.rowRef=F.createRef(null),t}return(0,G.Z)(r,[{key:"shouldComponentUpdate",value:function(e,t){return setTimeout(function(){window.frames["jpagebuilder-view"].window.jQuery(window.frames["jpagebuilder-view"].window).trigger("resize")},300),Or()(e.row,this.props.row)&&Or()(e.id,this.props.id)&&Or()(e.index,this.props.index)&&
Or()(e.isDragging,this.props.isDragging)&&Or()(e.isOver,this.props.isOver)&&Or()(e.isOverCurrent,this.props.isOverCurrent),!0}},{key:"componentDidMount",value:function(){be.on("change",this.handleResponsiveDeviceChange);var e=this.props.row;if(!e)return null;var t="#section-id-"+e.id;if(void 0!==e.settings.background_parallax&&1==e.settings.background_parallax&&void 0!==window.frames["jpagebuilder-view"].window.jQuery.fn.parallax)window.frames["jpagebuilder-view"].window.jQuery(t).parallax();else if(void 0!==
e.settings.background_parallax&&0==e.settings.background_parallax&&void 0!==window.frames["jpagebuilder-view"].window.jQuery.fn.parallaxDestroy){var n="inherit";void 0!==e.settings.background_attachment&&e.settings.background_attachment&&(n=e.settings.background_attachment);var o="0 0";void 0!==e.settings.background_position&&e.settings.background_position&&(o=e.settings.background_position),window.frames["jpagebuilder-view"].window.jQuery(t).parallaxDestroy(o,n)}void 0!==e.settings.background_external_video&&
""!=e.settings.background_external_video&&void 0!==e.settings.external_background_video&&1==e.settings.external_background_video&&window.frames["jpagebuilder-view"].window.jpbVideoBackgroundResize(jQuery(t,window.frames["jpagebuilder-view"].window.document))}},{key:"componentWillUnmount",value:function(){be.removeListener("change",this.handleResponsiveDeviceChange)}},{key:"componentDidUpdate",value:function(e){var t,n,o=this.props.row;if(!o)return null;var r=null,a=null==e||null===(t=e.row)||void 0===
t||null===(t=t.settings)||void 0===t?void 0:t.fit_columns,i=null===(n=this.props)||void 0===n||null===(n=n.row)||void 0===n||null===(n=n.settings)||void 0===n?void 0:n.fit_columns;fe()(a)&&fe()(i)?(null==a||a[be.device],r=null==i?void 0:i[be.device]):a&&i&&a!==(r=i)&&r&&this.props.resetColumnWidth(this.props.row.id,be.device);var l="#section-id-"+o.id;if(void 0!==o.settings.background_parallax&&1==o.settings.background_parallax&&void 0!==window.frames["jpagebuilder-view"].window.jQuery.fn.parallax)window.frames["jpagebuilder-view"].window.jQuery(l).parallax();
else if(void 0!==o.settings.background_parallax&&0==o.settings.background_parallax&&void 0!==window.frames["jpagebuilder-view"].window.jQuery.fn.parallaxDestroy){var c="inherit";void 0!==o.settings.background_attachment&&o.settings.background_attachment&&(c=o.settings.background_attachment);var s="0 0";void 0!==o.settings.background_position&&o.settings.background_position&&(s=o.settings.background_position),window.frames["jpagebuilder-view"].window.jQuery(l).parallaxDestroy(s,c)}void 0!==o.settings.background_external_video&&
""!=o.settings.background_external_video&&void 0!==o.settings.external_background_video&&1==o.settings.external_background_video&&window.frames["jpagebuilder-view"].window.jpbVideoBackgroundResize(jQuery(l,window.frames["jpagebuilder-view"].window.document))}},{key:"getParentRowStyle",value:function(){var e=this.props.row.settings,t={};if(null!=e&&e.margin){var n,o,r,a,i,l=fe()(e.margin)?null===(n=e.margin[be.device])||void 0===n||null===(n=n.toString())||void 0===n?void 0:n.split(" "):e.margin.toString().split(" ");
l&&(t.margin="".concat(null!==(o=l[0])&&void 0!==o?o:""," ").concat(null!==(r=l[1])&&void 0!==r?r:""," ").concat(null!==(a=l[2])&&void 0!==a?a:""," ").concat(null!==(i=l[3])&&void 0!==i?i:""))}return t}},{key:"getRowStyle",value:function(){var e=this.props.row.settings,t={};if(void 0!==e.color&&e.color&&(t.color=e.color),null!=e&&e.padding){var n,o,r,a,i=fe()(e.padding)?e.padding[be.device].toString().split(" "):e.padding.toString().split(" ");t.padding="".concat(null!==(n=i[0])&&void 0!==n?n:"",
" ").concat(null!==(o=i[1])&&void 0!==o?o:""," ").concat(null!==(r=i[2])&&void 0!==r?r:""," ").concat(null!==(a=i[3])&&void 0!==a?a:"")}var l={};return l=void 0!==e.background_image&&void 0!==e.background_image.src?e.background_image:{src:e.background_image},ut(e,"background_type")?("color"!=e.background_type&&"image"!=e.background_type||void 0===e.background_color||!e.background_color||(t.backgroundColor=e.background_color),"image"==e.background_type&&l.src&&(1==l.src.startsWith("http")?t.backgroundImage=
"url("+l.src+")":t.backgroundImage="url("+pagebuilder_base+l.src+")",void 0!==e.background_repeat&&e.background_repeat&&(t.backgroundRepeat=e.background_repeat),void 0!==e.background_size&&e.background_size&&"custom"!==e.background_size&&(t.backgroundSize=e.background_size),void 0!==e.background_attachment&&e.background_attachment&&(t.backgroundAttachment=e.background_attachment),void 0!==e.background_position&&e.background_position&&"custom"!==e.background_position&&(t.backgroundPosition=e.background_position)),
"gradient"==e.background_type&&void 0!==e.background_gradient&&(void 0!==e.background_gradient&&"radial"==e.background_gradient.type?t.backgroundImage="radial-gradient(at ".concat(e.background_gradient.radialPos||"center center",", ").concat(e.background_gradient.color," ").concat(e.background_gradient.pos||0,"%, ").concat(e.background_gradient.color2," ").concat(e.background_gradient.pos2||100,"%)"):t.backgroundImage="linear-gradient(".concat(e.background_gradient.deg||0,"deg, ").concat(e.background_gradient.color,
" ").concat(e.background_gradient.pos||0,"%, ").concat(e.background_gradient.color2," ").concat(e.background_gradient.pos2||100,"%)"))):(void 0!==e.background_color&&e.background_color&&(t.backgroundColor=e.background_color),l.src&&(1==l.src.startsWith("http")?t.backgroundImage="url("+l.src+")":t.backgroundImage="url("+pagebuilder_base+l.src+")",void 0!==e.background_repeat&&e.background_repeat&&(t.backgroundRepeat=e.background_repeat),void 0!==e.background_size&&e.background_size&&"custom"!==e.background_size&&
(t.backgroundSize=e.background_size),void 0!==e.background_attachment&&e.background_attachment&&(t.backgroundAttachment=e.background_attachment),void 0!==e.background_position&&e.background_position&&"custom"!==e.background_position&&(t.backgroundPosition=e.background_position))),t}},{key:"getRowCustomClass",value:function(){var e="jpagebuilder-section jpb-section",t=this.props.row.settings;return void 0!==t.class&&t.class&&(e=e+" "+t.class),void 0!==t.columns_equal_height&&"1"==t.columns_equal_height&&
(e+=" jpb-equalize-columns"),void 0!==t.hidden_xl&&"1"==t.hidden_xl&&(e+=" jpb-hidden-xl"),void 0!==t.hidden_lg&&"1"==t.hidden_lg&&(e+=" jpb-hidden-lg"),void 0!==t.hidden_md&&"1"==t.hidden_md&&(e+=" jpb-hidden-md"),void 0!==t.hidden_sm&&"1"==t.hidden_sm&&(e+=" jpb-hidden-sm"),void 0!==t.hidden_xs&&"1"==t.hidden_xs&&(e+=" jpb-hidden-xs"),Jt({settings:t})&&(e=e+" jpb-wow "+t.animation),void 0!==t.background_external_video&&t.background_external_video&&(e+=" jpb-row-have-ext-bg"),e}},{key:"getSectionTitle",
value:function(){var e=this.props.row.settings,t="";if(void 0!==e.title&&""!=e.title||void 0!==e.subtitle&&""!=e.subtitle){"undefined"!==e.fullscreen&&1==e.fullscreen&&(t+='<div class="jpb-container">');var n="";void 0!==e.title_position&&e.title_position&&(n=e.title_position);var o="";if(void 0!==e.title_section_padding&&""!=e.title_section_padding&&(o+="padding: "+e.title_section_padding+";"),void 0!==e.title_section_margin&&""!=e.title_section_margin&&(o+="margin: "+e.title_section_margin+";"),
t+='<div class="jpb-section-title '+n+'" style="'+o+'">',void 0!==e.title&&e.title){var r="h2";void 0!==e.heading_selector&&e.heading_selector&&(r=e.heading_selector);var a="";void 0!==e.title_fontweight&&""!=e.title_fontweight&&(a+="font-weight: "+e.title_fontweight+";"),void 0!==e.title_text_color&&""!=e.title_text_color&&(a+="color: "+e.title_text_color+";"),t+="<"+r+' class="jpb-title-heading" style="'+a+'">'+e.title+"</"+r+">",void 0!==e.subtitle&&""!=e.subtitle&&(t+='<p class="jpb-title-subheading" style="',
void 0!==e.subtitle_fontsize&&""!=e.subtitle_fontsize&&(t+="font-size: "+e.subtitle_fontsize+"px;"),t+='">'+e.subtitle+"</p>")}t+="</div>",void 0!==(null==e?void 0:e.fullscreen)&&1==e.fullscreen&&(t+="</div>")}return t}},{key:"parseUrl",value:function(e){for(var t=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],n=(new RegExp(["(?:([^:\\/?#]+):)?","(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?",
"()","(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)"].join(""))).exec(e),o={},r=14;r--;)n[r]&&(o[t[r]]=n[r]);return delete o.source,o}},{key:"externalVideo",value:function(){var e=this.props.row;if(!e)return null;if((void 0!==e.settings.background_type||null!=e.settings.background_video)&&!(void 0!==e.settings.background_type&&"video"!=e.settings.background_type||void 0===e.settings.background_external_video||""==e.settings.background_external_video||void 0!==e.settings.external_background_video&&
0==e.settings.external_background_video||0==e.settings.background_video)){var t=this.parseUrl(e.settings.background_external_video),n="";if("youtu.be"==t.host)n="//www.youtube.com/embed/"+(o=t.path.replace("/",""))+"?playlist="+o+"&iv_load_policy=3&enablejsapi=1&disablekb=1&autoplay=1&controls=0&showinfo=0&rel=0&loop=1&wmode=transparent&widgetid=1&mute=1";else if("www.youtube.com"==t.host||"youtube.com"==t.host)n="//www.youtube.com/embed/"+(o=t.query.replace("v=",""))+"?playlist="+o+"&iv_load_policy=3&enablejsapi=1&disablekb=1&autoplay=1&controls=0&showinfo=0&rel=0&loop=1&wmode=transparent&widgetid=1&mute=1";
else if("vimeo.com"==t.host||"www.vimeo.com"==t.host){var o;n="//player.vimeo.com/video/"+(o=t.path.replace("/",""))+"?background=1&autoplay=1&loop=1&title=0&byline=0&portrait=0"}return F.createElement("div",{className:"jpb-youtube-video-bg hidden"},F.createElement("iframe",{src:n,frameBorder:"0",allowFullScreen:!0}))}}},{key:"topShapeContent",value:function(){var e=this.props.row;if(!e)return null;var t=window.jpbSvgShape[e.settings.shape_name];e.settings.shape_invert&&void 0!==window.jpbSvgShape[e.settings.shape_name+
"-invert"]&&(t=window.jpbSvgShape[e.settings.shape_name+"-invert"]);var n="";return e.settings.shape_flip&&(n+=" jpb-shape-flip"),e.settings.shape_invert&&void 0!==window.jpbSvgShape[e.settings.shape_name+"-invert"]&&(n+=" jpb-shape-invert"),e.settings.shape_to_front&&(n+=" jpb-shape-to-front"),void 0!==e.settings.show_top_shape&&e.settings.show_top_shape&&void 0!==e.settings.shape_name&&""!=e.settings.shape_name?F.createElement("div",{className:"jpb-shape-container jpb-top-shape ".concat(n),dangerouslySetInnerHTML:{__html:atob(t)}}):
void 0}},{key:"bottomShapeContent",value:function(){var e=this.props.row;if(!e)return null;var t=window.jpbSvgShape[e.settings.bottom_shape_name];e.settings.bottom_shape_invert&&void 0!==window.jpbSvgShape[e.settings.bottom_shape_name+"-invert"]&&(t=window.jpbSvgShape[e.settings.bottom_shape_name+"-invert"]);var n="";return e.settings.bottom_shape_flip&&(n+=" jpb-shape-flip"),e.settings.bottom_shape_invert&&void 0!==window.jpbSvgShape[e.settings.bottom_shape_name+"-invert"]&&(n+=" jpb-shape-invert"),
e.settings.bottom_shape_to_front&&(n+=" jpb-shape-to-front"),void 0!==e.settings.show_bottom_shape&&e.settings.show_bottom_shape&&void 0!==e.settings.bottom_shape_name&&""!=e.settings.bottom_shape_name?F.createElement("div",{className:"jpb-shape-container jpb-bottom-shape ".concat(n),dangerouslySetInnerHTML:{__html:atob(t)}}):void 0}},{key:"isLayoutOpen",value:function(e){this.setState({isSettingsOpen:e})}},{key:"render",value:function(){var e,t,n,o,r,a,i,l,c,s,d,u,m,p,v=this,f=this.props,b=f.id,
h=f.row,g=f.index,E=f.isOver,y=(f.canDrop,f.isDragging),_=f.connectDropTarget,w=f.connectDragPreview,x=(f.connectDragSource,f.isOverCurrent);if(!h)return null;var I,O,C=this.state.device,A="jpb-row",N=0,D=(null==h?void 0:h.parent)&&!!h.parent,S="";if(void 0===(null==h||null===(e=h.settings)||void 0===e?void 0:e.columns_content_alignment)||"top"!==(null==h||null===(t=h.settings)||void 0===t?void 0:t.columns_content_alignment)&&"start"!==(null==h||null===(n=h.settings)||void 0===n?void 0:n.columns_content_alignment))if(void 0===
(null==h||null===(o=h.settings)||void 0===o?void 0:o.columns_content_alignment)||"bottom"!=(null==h||null===(r=h.settings)||void 0===r?void 0:r.columns_content_alignment)&&"end"!=(null==h||null===(a=h.settings)||void 0===a?void 0:a.columns_content_alignment)){var P,k;void 0!==(null==h||null===(P=h.settings)||void 0===P?void 0:P.columns_align_center)&&1==(null==h||null===(k=h.settings)||void 0===k?void 0:k.columns_align_center)&&(S=" jpb-section-content-center")}else{var R,T;void 0!==(null==h||null===
(R=h.settings)||void 0===R?void 0:R.columns_align_center)&&1==(null==h||null===(T=h.settings)||void 0===T?void 0:T.columns_align_center)&&(S=" jpb-section-content-bottom")}else void 0!==(null==h||null===(I=h.settings)||void 0===I?void 0:I.columns_align_center)&&1==(null==h||null===(O=h.settings)||void 0===O?void 0:O.columns_align_center)&&(S=" jpb-section-content-top");var L={},M=nu(h.settings,"padding",C),Z=nu(h.settings,"margin",C),j="",B=tu({settings:h.settings,prop:"section_height",cssProp:"height",
unit:"px",device:C}),J=tu({settings:h.settings,prop:"section_min_height",cssProp:"min-height",unit:"px",device:C}),G=tu({settings:h.settings,prop:"section_max_height",cssProp:"max-height",unit:"px",device:C}),H=tu({settings:h.settings,prop:"row_border_radius",cssProp:"border-radius",device:C}),U=Ye();if(null!==(i=h.settings)&&void 0!==i&&i.row_border)for(var z in U=tu({settings:h.settings,prop:"row_border_width",cssProp:"border-width",device:C,unit:""})){var V,W;null!==(V=h.settings)&&void 0!==V&&
V.row_border_color&&(U[z]+="border-color: ".concat(h.settings.row_border_color,";")),null!==(W=h.settings)&&void 0!==W&&W.row_border_style&&(U[z]+="border-style: ".concat(h.settings.row_border_style,";"))}"undefined"!==h.settings.section_height_option&&"win-height"==h.settings.section_height_option&&(j+="height:100vh;");var K="";if("undefined"!==h.settings.section_overflow_x&&h.settings.section_overflow_x&&(K+="overflow-x:"+h.settings.section_overflow_x+";"),"undefined"!==h.settings.section_overflow_y&&
h.settings.section_overflow_y&&(K+="overflow-y:"+h.settings.section_overflow_y+";"),D&&(A+=" jpb-nested-row"),void 0!==h.settings){var Y,X,q,$,Q;if(void 0!==h.settings.no_gutter&&1==h.settings.no_gutter&&(A+=" jpb-no-gutter"),void 0===h.settings.columns_content_alignment||"top"!=h.settings.columns_content_alignment&&"start"!=h.settings.columns_content_alignment?void 0===h.settings.columns_content_alignment||"bottom"!=h.settings.columns_content_alignment&&"end"!=h.settings.columns_content_alignment?
void 0!==h.settings.columns_align_center&&1==h.settings.columns_align_center&&(A+=" jpb-align-center"):void 0!==h.settings.columns_align_center&&1==h.settings.columns_align_center&&(A+=" jpb-align-bottom"):void 0!==h.settings.columns_align_center&&1==h.settings.columns_align_center&&(A+=" jpb-align-top"),"undefined"!=h.settings.fullscreen&&(N=h.settings.fullscreen),h.settings.fullscreen&&(A+=" jpb-row-fluid-padding-horizontal"),Jt({settings:h.settings})&&null!==(Y=h.settings)&&void 0!==Y&&Y.animationduration)var ee=
h.settings.animationduration+"ms";if(Jt({settings:h.settings})&&null!==(X=h.settings)&&void 0!==X&&X.animationdelay)var te=h.settings.animationdelay+"ms";if(("image"==h.settings.background_type||"video"==h.settings.background_type)&&(void 0!==h.settings.overlay&&""!=h.settings.overlay&&"overlay_color"==h.settings.overlay_type&&(L.backgroundColor=h.settings.overlay),void 0!==h.settings.gradient_overlay&&""!=h.settings.gradient_overlay&&"overlay_gradient"==h.settings.overlay_type&&("radial"==h.settings.gradient_overlay.type?
L.backgroundImage="radial-gradient(at ".concat(h.settings.gradient_overlay.radialPos||"center center",", ").concat(h.settings.gradient_overlay.color," ").concat(h.settings.gradient_overlay.pos||0,"%, ").concat(h.settings.gradient_overlay.color2," ").concat(h.settings.gradient_overlay.pos2||100,"%)"):L.backgroundImage="linear-gradient(".concat(h.settings.gradient_overlay.deg||0,"deg, ").concat(h.settings.gradient_overlay.color," ").concat(h.settings.gradient_overlay.pos||0,"%, ").concat(h.settings.gradient_overlay.color2,
" ").concat(h.settings.gradient_overlay.pos2||100,"%)")),void 0!==h.settings.pattern_overlay&&""!=h.settings.pattern_overlay&&"overlay_pattern"==h.settings.overlay_type))fe()(null===(q=h.settings)||void 0===q?void 0:q.pattern_overlay)?1==(null===($=h.settings)||void 0===$||null===($=$.pattern_overlay)||void 0===$||null===($=$.src)||void 0===$?void 0:$.startsWith("http"))?L.backgroundImage="url("+h.settings.pattern_overlay.src+")":L.backgroundImage="url("+pagebuilder_base+h.settings.pattern_overlay.src+
")":1==(null===(Q=h.settings)||void 0===Q?void 0:Q.pattern_overlay.startsWith("http"))?L.backgroundImage="url("+h.settings.pattern_overlay+")":L.backgroundImage="url("+pagebuilder_base+h.settings.pattern_overlay+")",L.backgroundAttachment="scroll",L.backgroundColor=h.settings.overlay_pattern_color}"image"==h.settings.background_type&&h.settings.blend_mode&&(L.mixBlendMode=h.settings.blend_mode);var ne="";if(void 0!==h.settings.row_boxshadow&&h.settings.row_boxshadow)if(fe()(h.settings.row_boxshadow)){var oe=
h.settings.row_boxshadow.ho||0,re=h.settings.row_boxshadow.vo||0,ae=h.settings.row_boxshadow.blur||0,ie=h.settings.row_boxshadow.spread||0,le=h.settings.row_boxshadow.color||0;ne+="box-shadow: ".concat(oe,"px ").concat(re,"px ").concat(ae,"px ").concat(ie,"px ").concat(le,";")}else ne+="box-shadow: ".concat(h.settings.row_boxshadow,";");if(y&&!E)var ce="jpagebuilder-section-inner jpagebuilder-row-drag";else ce="jpagebuilder-section-inner";var se="jpagebuilder-section-parent";h.visibility||(se+=" jpagebuilder-row-disabled"),
x&&(se+=" builder-show-placeholder");var de=g,ue=h.columns.length,me="section-id-"+h.id,ve=this.getRowStyle(),be=this.getParentRowStyle(),he=this.getRowCustomClass(),ge=this.getSectionTitle(),Ee=Ye();for(var ye in Ee){var _e,we;null!==(_e=h.settings)&&void 0!==_e&&_e.shape_width&&(Ee[ye]+="width: ".concat(h.settings.shape_width[ye],"%; max-width: ").concat(h.settings.shape_width[ye],"%;")),null!==(we=h.settings)&&void 0!==we&&we.shape_height&&(Ee[ye]+="height: ".concat(h.settings.shape_height[ye],
"px;"))}var xe=Ye();for(var Ie in xe){var Oe,Ce;null!==(Oe=h.settings)&&void 0!==Oe&&Oe.bottom_shape_width&&(xe[Ie]+="width: ".concat(h.settings.bottom_shape_width[Ie],"%; max-width: ").concat(h.settings.bottom_shape_width[Ie],"%;")),null!==(Ce=h.settings)&&void 0!==Ce&&Ce.bottom_shape_height&&(xe[Ie]+="height: ".concat(h.settings.bottom_shape_height[Ie],"px;"))}var Ae=void 0!==(null===(l=h.settings)||void 0===l||null===(l=l.background_image)||void 0===l?void 0:l.src)?h.settings.background_image:
{src:h.settings.background_image},Ne=Ye();if(null!==(c=h.settings)&&void 0!==c&&c.background_type&&""!==Ae.src)for(var De in Ne){var Se,Pe,ke;"custom"===(null===(Se=h.settings)||void 0===Se?void 0:Se.background_position)&&void 0!==(null===(Pe=h.settings)||void 0===Pe||null===(Pe=Pe.background_position_custom_x)||void 0===Pe?void 0:Pe[De])&&void 0!==(null===(ke=h.settings)||void 0===ke||null===(ke=ke.background_position_custom_y)||void 0===ke?void 0:ke[De])&&(Ne[De]="background-position: ".concat(h.settings.background_position_custom_x[De]).concat(h.settings.background_position_custom_x.unit||
"px"," ").concat(h.settings.background_position_custom_y[De]).concat(h.settings.background_position_custom_y.unit||"px",";"))}var Re=Ye();if("custom"===(null===(s=h.settings)||void 0===s?void 0:s.background_size))for(var Te in Re){var Le;void 0!==(null===(Le=h.settings)||void 0===Le||null===(Le=Le.background_size_custom)||void 0===Le?void 0:Le[Te])&&(Re[Te]="background-size: ".concat(h.settings.background_size_custom[Te]).concat(h.settings.background_size_custom.unit||"px",";"))}var Me=Ye();for(var Ze in Me){var Be,
Je,Ge;null!==(Be=h.settings)&&void 0!==Be&&null!==(Be=Be.row_width)&&void 0!==Be&&Be[Ze]&&(Me[Ze]+="width: ".concat(h.settings.row_width[Ze]).concat(h.settings.row_width.unit||"px",";")),null!==(Je=h.settings)&&void 0!==Je&&null!==(Je=Je.row_max_width)&&void 0!==Je&&Je[Ze]&&(Me[Ze]+="max-width: ".concat(h.settings.row_max_width[Ze]).concat(h.settings.row_max_width.unit||"px",";")),null!==(Ge=h.settings)&&void 0!==Ge&&null!==(Ge=Ge.row_min_width)&&void 0!==Ge&&Ge[Ze]&&(Me[Ze]+="min-width: ".concat(h.settings.row_min_width[Ze]).concat(h.settings.row_min_width.unit||
"px",";"))}var He="";!h.settings.fullscreen&&null!==(d=h.settings)&&void 0!==d&&d.container_width&&(He=fe()(h.settings.container_width)?h.settings.container_width[window.builderDefaultDevice]:h.settings.container_width);var Ue=h.settings.fullscreen?".jpb-container-inner":".jpb-row-container",ze=Ye();if((null===(u=h.settings)||void 0===u||!u.no_gutter)&&null!==(m=h.settings)&&void 0!==m&&m.columns_gap)for(var Fe in ze){var Ve;if(null!==(Ve=h.settings.columns_gap)&&void 0!==Ve&&Ve[Fe]){var We=h.settings.columns_gap[Fe]/
2,Ke=h.settings.columns_gap.unit||"px";ze[Fe]+="#".concat(me," > ").concat(Ue," > .jpb-row {"),ze[Fe]+="margin-left: -".concat(We).concat(Ke,";"),ze[Fe]+="margin-right: -".concat(We).concat(Ke,";"),ze[Fe]+="}",ze[Fe]+="#".concat(me," > ").concat(Ue," > .jpb-row > div {"),ze[Fe]+="padding-left: ".concat(We).concat(Ke,";"),ze[Fe]+="padding-right: ".concat(We).concat(Ke,";"),ze[Fe]+="}"}}var qe=function(e){var t=e.settings,n=e.prop,o=e.cssProp,r="";return void 0===(null==t?void 0:t[n])||pe()(null==t?
void 0:t[n])||""!==((null==t?void 0:t[n])||"").replace(/\s+/g,"")&&(r="jpb-text-center"===(null==t?void 0:t[n])?"".concat(o,": center"):"jpb-text-left"===(null==t?void 0:t[n])?"".concat(o,": left"):"jpb-text-right"===(null==t?void 0:t[n])?"".concat(o,": right"):"".concat(o,": ").concat((null==t?void 0:t[n])||"")),r}({settings:h.settings,prop:"title_position",cssProp:"text-align"}),$e=tu({settings:h.settings,prop:"title_fontsize",cssProp:"font-size",device:C}),Qe=tu({settings:h.settings,prop:"title_fontsize",
cssProp:"line-height",device:C}),et=tu({settings:h.settings,prop:"title_margin_top",cssProp:"margin-top",device:C}),tt=tu({settings:h.settings,prop:"title_margin_bottom",cssProp:"margin-bottom",device:C}),nt=tu({settings:h.settings,prop:"subtitle_fontsize",cssProp:"font-size",device:C}),ot=tu({settings:h.settings,prop:"subtitle_fontsize",cssProp:"line-height",device:C}),rt={};Ae.src&&(1==Ae.src.startsWith("http")?rt.backgroundImage="url("+Ae.src+")":rt.backgroundImage="url("+pagebuilder_base+Ae.src+
")");var at="";1==h.settings.video_loop&&(at=!0);var it={};Ae.src&&(1==Ae.src.startsWith("http")?it.backgroundImage=Ae.src:it.backgroundImage=pagebuilder_base+Ae.src);var lt="",ct="",st={};st=void 0!==h.settings.background_video_mp4&&void 0!==h.settings.background_video_mp4.src?h.settings.background_video_mp4:{src:h.settings.background_video_mp4};var dt={};dt=void 0!==h.settings.background_video_ogv&&void 0!==h.settings.background_video_ogv.src?h.settings.background_video_ogv:{src:h.settings.background_video_ogv},
"undefined"!==h.settings.background_type||h.settings.external_background_video?"undefined"===h.settings.background_type||"video"!=h.settings.background_type||h.settings.external_background_video||(st.src?lt=1==st.src.startsWith("http")?st.src:pagebuilder_base+st.src:dt.src&&(ct=1==dt.src.startsWith("http")?dt.src:pagebuilder_base+dt.src)):void 0!==h.settings.background_video&&1==h.settings.background_video&&st.src?lt=1==st.src.startsWith("http")?st.src:pagebuilder_base+st.src:void 0!==h.settings.background_video&&
1==h.settings.background_video&&dt.src&&(ct=1==dt.src.startsWith("http")?dt.src:pagebuilder_base+dt.src);var ut=this.externalVideo(),mt=this.topShapeContent(),pt=this.bottomShapeContent(),vt="jpb-section-parent-"+h.id,ft=je.filter(function(e){return e!==window.builderDefaultDevice}).map(function(e){var t="";return t+=Xe(e),t+="#".concat(me," {"),"undefined"!==h.settings.section_height_option&&"height"==h.settings.section_height_option&&(t+=B[e]),t+=J[e],t+=G[e],t+=M[e],t+=Z[e],t+=U[e],t+=H[e],t+=
Ne[e],t+=Re[e],t+=Me[e],t+="}",t+="#".concat(me," .jpb-row-overlay{"),t+=H[e],t+="}",t+="#".concat(me," .jpb-shape-container.jpb-top-shape > svg{"),t+=Ee[e],t+="}",t+="#".concat(me," .jpb-shape-container.jpb-bottom-shape > svg{"),t+=xe[e],t+="}",t+="#".concat(vt," {"),t+=Z[e],t+="}",t+="#".concat(me," .jpb-section-title .jpb-title-heading{"),t+=$e[e],t+=Qe[e],t+=et[e],t+=tt[e],t+=qe,t+="}",t+="#".concat(me," .jpb-section-title .jpb-title-subheading{"),t+=nt[e],t+=ot[e],t+=qe,t+="}",(t+=ze[e])+"}"}).join("\r\n"),
bt={maxWidth:"100vw",marginLeft:"calc(50% - 50vw)",marginRight:"calc(50% - 50vw)"};return w(_(F.createElement("div",{id:vt,style:be,key:b,className:"".concat(se).concat(null!=h&&h.parent?" builder-nested-row":" builder-parent-row"),ref:this.rowRef},F.createElement("div",{className:"builder-addon-placeholder builder-addon-placeholder-top","aria-hidden":"true"}),F.createElement("div",{className:"jpagebuilder-section-inner-wrap"},F.createElement(Nf,{row:h,index:g,hasCopiedSection:this.props.hasCopiedSection,
checkCopiedSection:this.props.checkCopiedSection,nestedRowData:null===(p=this.props)||void 0===p?void 0:p.nestedRowData}),F.createElement("div",{className:"clearfix"},F.createElement("style",{type:"text/css"},"\n\t\t\t\t\t\t\t\t\t#".concat(me," {\n\t\t\t\t\t\t\t\t\t\t").concat(D?Z[window.builderDefaultDevice]:"","\n\t\t\t\t\t\t\t\t\t\t").concat(M[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat("undefined"!==h.settings.section_height_option&&"height"==h.settings.section_height_option?
B[window.builderDefaultDevice]:"","\n\t\t\t\t\t\t\t\t\t\t").concat(J[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(G[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(U[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(Ne[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(Re[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(Me[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(H[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(j,
"\n\t\t\t\t\t\t\t\t\t\t").concat(K,"\n\t\t\t\t\t\t\t\t\t\t").concat(ne,"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-section-title .jpb-title-heading{\n\t\t\t\t\t\t\t\t\t\t").concat($e[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(Qe[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(et[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(tt[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(qe,"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(me,
" .jpb-section-title .jpb-title-subheading{\n\t\t\t\t\t\t\t\t\t\t").concat(nt[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(ot[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(qe,"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-row-overlay{\n\t\t\t\t\t\t\t\t\t\t").concat(H[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(vt,"{\n\t\t\t\t\t\t\t\t\t\t").concat(!D&&Z[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t\t").concat(Me[window.builderDefaultDevice],
"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t").concat(He>1200?"@media (min-width: 1400px) {#".concat(vt," .jpb-row-container {\n\t\t\t\t\t\t\t\t\t\tmax-width: ").concat(He,"px;\n\t\t\t\t\t\t\t\t\t\t}}"):"#".concat(vt," .jpb-row-container {\n\t\t\t\t\t\t\t\t\t\tmax-width: ").concat(He,"px;\n\t\t\t\t\t\t\t\t\t\t}"),"\n\n\t\t\t\t\t\t\t\t\t").concat(ze[window.builderDefaultDevice],"\n\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-shape-container.jpb-top-shape > svg {\n\t\t\t\t\t\t\t\t\t\t").concat(Ee[window.builderDefaultDevice],
"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-shape-container.jpb-top-shape > svg path,\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-shape-container.jpb-top-shape > svg polygon {\n\t\t\t\t\t\t\t\t\t\tfill: ").concat(h.settings.shape_color,";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-shape-container.jpb-bottom-shape > svg {\n\t\t\t\t\t\t\t\t\t\t").concat(xe[window.builderDefaultDevice],"\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t#").concat(me," .jpb-shape-container.jpb-bottom-shape > svg path,\n\t\t\t\t\t\t\t\t\t#").concat(me,
" .jpb-shape-container.jpb-bottom-shape > svg polygon {\n\t\t\t\t\t\t\t\t\t\tfill: ").concat(h.settings.bottom_shape_color,";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t").concat(ft,"\n\t\t\t\t\t\t\t\t")),F.createElement("div",{className:"jpagebuilder-section",style:{padding:"".concat(null==h?void 0:h.settings.xl)}},F.createElement("div",{className:ce},0==N?F.createElement("section",{id:me,className:he+S,"data-jpb-wow-duration":ee,"data-jpb-wow-delay":te,style:Pf(Pf({},ve),this.props.row.settings.stretch_section&&
bt)},F.createElement(If,{paddingObj:h.settings.padding,row:h,rowIndex:g}),mt,pt,ut,(lt||ct)&&F.createElement("div",{className:"jpb-section-background-video"},F.createElement("video",{className:"section-bg-video",autoPlay:!0,muted:!0,"webkit-playsinline":"true",playsInline:!0,loop:at,controlsList:"nodownload",poster:it.backgroundImage},"(background_video_mp4) && (",F.createElement("source",{src:lt,type:"video/mp4"}),") (background_video_ogv) && (",F.createElement("source",{src:ct,type:"video/ogg"}),
")")),void 0!==h.settings.overlay_type&&"overlay_none"!=h.settings.overlay_type&&F.createElement("div",{className:"jpb-row-overlay",style:L}),F.createElement("div",{className:"jpb-row-container",style:{paddingTop:"1px",paddingBottom:"1px"}},ge&&F.createElement("div",{dangerouslySetInnerHTML:{__html:ge}}),F.createElement("div",{className:A},h.columns.map(function(e,t){return F.createElement(wf,{key:e.id,id:e.id,column:e,row:h,rowIndex:de,index:t,colLength:ue,isSettingsOpen:v.state.isSettingsOpen})})))):
F.createElement("div",{id:me,className:he+S,"data-jpb-wow-duration":ee,"data-jpb-wow-delay":te,style:Pf(Pf({},ve),this.props.row.settings.stretch_section&&bt)},F.createElement(If,{paddingObj:h.settings.padding,row:h,rowIndex:g}),mt,pt,ut,(lt||ct)&&F.createElement("div",{className:"jpb-section-background-video"},F.createElement("video",{className:"section-bg-video",autoPlay:!0,muted:!0,"webkit-playsinline":"true",playsInline:!0,loop:at,controlsList:"nodownload",poster:it.backgroundImage},"(background_video_mp4) && (",
F.createElement("source",{src:lt,type:"video/mp4"}),") (background_video_ogv) && (",F.createElement("source",{src:ct,type:"video/ogg"}),")")),void 0!==h.settings.overlay_type&&"overlay_none"!=h.settings.overlay_type&&F.createElement("div",{className:"jpb-row-overlay",style:L}),F.createElement("div",{className:"jpb-container-inner",style:{paddingTop:"1px",paddingBottom:"1px"}},ge&&F.createElement("div",{dangerouslySetInnerHTML:{__html:ge}}),F.createElement("div",{className:A},h.columns.map(function(e,
t){return F.createElement(wf,{key:e.id,id:e.id,column:e,row:h,rowIndex:de,index:t,colLength:ue,columnMove:v.props.columnSortable})}))))))),!D&&F.createElement("div",{className:"jpagebuilder-row-add-new"},F.createElement(eu,{iconOnly:false,bottom:!0,index:g}))),F.createElement("div",{className:"builder-addon-placeholder builder-addon-placeholder-bottom","aria-hidden":"true"}))))}}]),r}(F.Component),Rf={hover:function(e,t,n){var o=t.getItem(),r=o.index,a=e.index,i="ADD_ADDON"===o.type&&"row"===o.name;
if(r!==a){Ue(window.iDocument,".builder-show-placeholder-center");var l=(0,V.findDOMNode)(n),c=l.getBoundingClientRect(),s=(c.bottom-c.top)/2,d=t.getClientOffset().y-c.top;if((0,ue.Z)(window.iDocument.querySelectorAll(".builder-row-placeholder")).forEach(function(e){e.classList.remove("builder-row-placeholder")}),i&&t.isOver()){var u,m=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Df(e,
t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Df(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e;},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a;}}}}(l.querySelectorAll(".jpb-row"));try{for(m.s();!(u=m.n()).done;){var p=u.value;p.classList.contains("builder-row-placeholder")||p.classList.add("builder-row-placeholder")}}catch(e){m.e(e)}finally{m.f()}t.getItem().rowPosition=void 0,(0,ue.Z)(window.iDocument.querySelectorAll(".builder-row-placeholder")).forEach(function(e){e.classList.remove("builder-row-placeholder-bottom"),
e.classList.remove("builder-row-placeholder-top")})}if(i&&t.isOver({shallow:!0})){if(d<s){var v=l.querySelector(".builder-row-placeholder");return v.classList.remove("builder-row-placeholder-bottom"),void v.classList.add("builder-row-placeholder-top")}if(d>s){var f=l.querySelector(".builder-row-placeholder");return f.classList.remove("builder-row-placeholder-top"),void f.classList.add("builder-row-placeholder-bottom")}}"ADD_ADDON"!==o.type&&(r<a&&d<s||r>a&&d>s||("block"==o.type||(t.getItem().index=
a),t.isOver({shallow:!0})&&(d<s&&(l.classList.remove("builder-show-placeholder-bottom"),l.classList.add("builder-show-placeholder-top")),d>s&&(l.classList.remove("builder-show-placeholder-top"),l.classList.add("builder-show-placeholder-bottom")))))}},drop:function(e,t,n){if(!t.didDrop()){var o=t.getItem(),r="ADD_ADDON"===o.type&&"row"===o.name,a="ADD_ADDON"===o.type&&"div"===o.name,i=o.type===to&&"block"===o.name;if(!a){var l=(0,V.findDOMNode)(n).getBoundingClientRect(),c=(l.bottom-l.top)/2,s=t.getClientOffset().y-
l.top,d=void 0;if(t.isOver({shallow:!0})&&(s<c&&(d="top"),s>c&&(d="bottom")),r&&void 0!==d){var u;if(null===(u=e.row)||void 0===u?void 0:u.parent){var m=function(e){var t=Je().pageBuilder.present,n=e.parent,o=n.rowId,r=n.columnId,a=t.findIndex(function(e){return e.id===o});if(-1!==a){var i=t[a].columns.findIndex(function(e){return e.id===r});if(-1!==i)return t[a].columns[i].addons.findIndex(function(t){return"nested_row"===t.type&&t.id===e.id})}}(e.row);"bottom"===d&&m++;var p=e.row.parent,v={rowId:p.rowId,
columnId:p.columnId,addonIndex:m};e.addRow({parent:v})}else{var f=e.index;"bottom"===d&&f++,e.addRow({rowIndex:f})}Ue(window.iDocument,".builder-row-placeholder")}if("ADD_ADDON"!==o.type&&i){var b=(0,V.findDOMNode)(n).getBoundingClientRect(),h=(b.bottom-b.top)/2,g=t.getClientOffset().y-b.top,E=e.row,y=e.nestedRowData,_=e.index;Ee(E.parent)&&y?e.pasteOrInsertNestedRow({sectionIndex:y.sectionIndex,columnIndex:y.columnIndex,addonIndex:y.addonIndex,nestedSectionIndex:_,sectionData:o.data,isAbove:g<h}):
e.pasteOrInsertSection({sectionIndex:e.index,sectionData:o.data,isAbove:g<h});var w=(0,V.findDOMNode)(n);w.classList.remove("jpb-block-bottom-placeholder"),w.classList.remove("jpb-block-top-placeholder")}}}}},Tf=(0,zo.DragSource)($n,{beginDrag:function(e){return{id:e.id,index:e.index}}},function(e,t){return{connectDragSource:e.dragSource(),connectDragPreview:e.dragPreview(),isDragging:t.isDragging()}}),Lf=(0,zo.DropTarget)([$n,eo,to],Rf,function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),
canDrop:t.canDrop(),isOverCurrent:t.isOver({shallow:!0})}});const Mf=(0,Xn.$j)(function(e){return{state:e}},function(e){return{changeColumnGen:function(t,n,o){e(function(e,t,n){return{type:"CHANGE_COLUMN",index:n,layout:e,current:t}}(t,n,o))},toggleCollapse:function(t){e(function(e){return{type:"TOGGLE_COLLAPSE",id:e}}(t))},addRow:function(t){return e(Pi(t))},resetColumnWidth:function(t,n){return e(function(e,t){return{type:"RESET_COLUMN_WIDTH_AFTER_FIT_COLUMNS",rowId:e,device:t}}(t,n))},pasteOrInsertSection:function(t){return e(Wi(t))},
pasteOrInsertNestedRow:function(t){return e(Hi(t))}}})(Lf(Tf(kf)));var Zf={hover:function(e,t,n){if(t.getItem().type==to){var o=(0,V.findDOMNode)(n);null==o||o.classList.add("jpb-block-can-drag")}},drop:function(e,t,n){var o=t.getItem();if(o.type===to&&"block"===o.name){e.pasteOrInsertSection({sectionIndex:0,sectionData:o.data});var r=(0,V.findDOMNode)(n);null==r||r.classList.remove("jpb-block-can-drag")}}},jf=(0,zo.DropTarget)([$n,to],Zf,function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver(),
canDrop:t.canDrop()}});const Bf=(0,Xn.$j)(null,function(e){return{addBlockAsRow:function(t){return e({type:"ADD_BLOCK",payload:{index:(n=t).index,rows:n.rows,type:n.type}});var n},importPage:function(t){return e(Fi(t))},setGlobalPanel:function(t){return e(fl(t))},pageCssHandler:function(t){return e(Yi(t))},pasteOrInsertSection:function(t){return e(Wi(t))}}})(jf(function(e){var t=e.importPage,n=e.setGlobalPanel,o=e.pageCssHandler,r=e.connectDropTarget,a=e.isOver,i=e.canDrop,l=(0,F.useRef)(null),c=
(0,F.useState)(!1),s=(0,j.Z)(c,2),d=s[0],u=s[1],m=(0,Xn.v9)(function(e){return e.pageBuilder.present}),p=(0,Xn.v9)(function(e){return e.copiedData}),v=!1,f=Fl(function(e){jQuery(document).trigger("editElementChange",e)},400),b=function(){if(p.isCopiedSectionAvailable){var e=Lt(g);e&&Array.isArray(e)&&e.length?u(!0):u(!1)}else u(!1)};(0,F.useEffect)(function(){b()},[p.isCopiedSectionAvailable]),(0,F.useEffect)(function(){var e=".jp-inline-editable-element, .jp-editable-content, .jp-editable-title",
t=window.iWindow.document.getElementById("jpagebuilder-container");function n(e){e.preventDefault();var t=jQuery(this).html();t="string"==typeof t&&t.length>0?t:"";var n=jQuery(this).data(),o=[n.fieldname,n.id,t,n];f(o)}return function(e){var t=e.querySelector(".xxxxxxxxx-drawer-wrapper"),n=e.querySelector("#xxxxxxxxx-modal");t&&t.parentNode.removeChild(t),n&&n.parentNode.removeChild(n),e.querySelector("#jpagebuilder-container").querySelectorAll("button, a").forEach(function(e){e.addEventListener("click",
function(e){e.preventDefault()})})}(window.iWindow.document),jQuery(t).on("input",e,n),function(){jQuery(t).off("input",e,n)}},[]);var h=a&&i;return F.createElement("div",{"x-ignore":""},F.createElement("input",{ref:l,type:"file",name:"upload-page-json",accept:".json",style:{display:"none"},onChange:function(e){return ot(e,t,o)}}),m.map(function(e){return null!=e&&e.parent?null:(v=!0,F.createElement(Mf,{key:e.id,id:e.id,index:Ge(e.id),row:e,hasCopiedSection:d,checkCopiedSection:b}))}),!v&&F.createElement("div",
{className:"builder-page-initial-screen"},r(F.createElement("div",{className:"builder-page-screen-container ".concat(h?"builder-droppable-container":"")},h?F.createElement("button",{className:"builder-page-screen-container-plus-button"},F.createElement(co,{name:"plus"})):F.createElement(F.Fragment,null,F.createElement("div",{className:"builder-page-screen-title"},Joomla.JText._("COM_JPAGEBUILDER_ROW_START_CREATING_PAGE")),F.createElement("div",{className:"builder-page-screen-tools"},F.createElement(eu,
{index:0}),F.createElement("span",{className:"builder-button builder-button-primary",onClick:function(e){e.preventDefault(),n({name:"layouts"})},role:"button",tabIndex:-1,onKeyDown:ye},F.createElement(co,{name:"plus",className:"builder-me-0 builder-me-sm-2"}),F.createElement("span",{className:"builder-d-none builder-d-sm-inline"},Joomla.JText._("COM_JPAGEBUILDER_EDITOR_TEMPLATES"))),F.createElement("div",{className:"builder-page-screen-import"},F.createElement(co,{name:"plus",className:"builder-ms-0 builder-me-0"}),
F.createElement("span",{onClick:function(e){var t;e.preventDefault(),null===(t=l.current)||void 0===t||t.click()},role:"button",tabIndex:-1,onKeyDown:ye},Joomla.JText._("COM_JPAGEBUILDER_ROW_IMPORT_LAYOUT")))))))))}));var Jf=function(){return F.createElement(Kn.W,{backend:Yn.PD},F.createElement(Gf,null))},Gf=(0,zo.DropTarget)(nl.FILE,{},function(e,t){return{connectDropTarget:e.dropTarget(),isOver:t.isOver()}})(function(){return F.createElement("div",{className:"builder-provider-inner",style:{display:"none"}},
Joomla.JText._("COM_JPAGEBUILDER_BLANK_SPACE"))});window.jpbMySectionsRequestRequered=!0,window.ReactDOM=V,window.warningAtReload=!1,window.editMode="form",window.toolsTabIndex=0,window.addEventListener("load",function(){for(var e=document.getElementById("jpagebuilder-view"),t=e.parentNode;null!==t&&"BODY"!=t.tagName;)t.style.height="100%",t.style.width="100%",t.style.maxWidth="100%",t=t.parentNode;e.src=e.dataset.url,window.onbeforeunload=function(e){window.warningAtReload&&(e.preventDefault(),e.returnValue=
"")}}),document.getElementById("jpagebuilder-view").addEventListener("load",function(){document.getElementById("jpagebuilder-container")&&document.getElementById("jpagebuilder").removeChild(document.getElementById("jpagebuilder-container"));var e=window.frames["jpagebuilder-view"].window.document;window.iDocument=e,window.iWindow=window.frames["jpagebuilder-view"].window;var t=window.frames["jpagebuilder-view"].window.document.getElementById("jpagebuilder-container");const loadingContainer=document.querySelector("div.builder-loadingContainer");
if(loadingContainer)loadingContainer.remove();null!==t&&((0,V.unmountComponentAtNode)(t),V.render(F.createElement(Xn.zt,{store:Wn},F.createElement(Kn.W,{backend:Yn.PD},F.createElement(ro,null,F.createElement(Bf,null)))),t));var n=".jp-inline-editable-element, .jp-editable-content, .jp-editable-title";jQuery(t).on("keydown",n,function(e){if(13===e.keyCode){if(e.currentTarget.classList.contains("jp-editable-title"))return!1;var t=function(e){var t,n,o=!1,r=!1,a=window.iDocument;if(a.getSelection){var i=
a.getSelection();i.rangeCount&&((n=(t=i.getRangeAt(0)).cloneRange()).selectNodeContents(e),n.setEnd(t.startContainer,t.startOffset),o=""===n.toString(),n.selectNodeContents(e),n.setStart(t.endContainer,t.endOffset),r=""===n.toString())}else a.selection&&"Control"!==a.selection.type&&((n=(t=a.selection.createRange()).duplicate()).moveToElementText(e),n.setEndPoint("EndToStart",t),o=""===n.text,n.moveToElementText(e),n.setEndPoint("StartToEnd",t),r=""===n.text);return{isAtStart:o,isAtEnd:r}}(e.currentTarget),
n=t.isAtEnd;return window.iDocument.execCommand("insertHTML",!1,n?"<br/><br/>":"<br/>"),!1}}),jQuery(t).on("paste",n,function(e){e.preventDefault();var t=(e.originalEvent||window).clipboardData.getData("text/plain");t.trim()&&window.iDocument.execCommand("insertHTML",!1,t)}),jQuery(document).on("click",".jpagebuilder-page-tools",function(){window.editMode="form"}),e.addEventListener("click",function(e){e.target.closest(".builder-addon-element")||null!=ko&&ko.show&&ko.reset()}),Be(window.builderDefaultDevice)}),
V.render(F.createElement(Xn.zt,{store:Wn},F.createElement(Kn.W,{backend:Yn.PD},F.createElement(Hd,null),F.createElement(ie,null),F.createElement(fo,null),F.createElement(fv,null))),document.getElementById("jpagebuilder-main")),console.warn=function(){};var Hf,Uf=document.getElementById("builder-dnd-provider-dom");Uf&&(Hf=Uf,(0,V.unmountComponentAtNode)(Hf),(0,V.render)(F.createElement(Jf,null),Hf)),jQuery(document).ready(function(e){e(".jpagebuilder-browse-media").on("click",function(t){t.preventDefault();
var n=e(this);n.siblings(".jpagebuilder-media-preview").addClass("jpagebuilder-media-no-image").removeAttr("src"),n.siblings("input").val("")})}),jQuery(window.frames["jpagebuilder-view"].window.document).on("click","a",function(e){return e.preventDefault(),!1}),window.parseUrl=function(e){for(var t=["source","scheme","authority","userInfo","user","pass","host","port","relative","path","directory","file","query","fragment"],n=(new RegExp(["(?:([^:\\/?#]+):)?","(?:\\/\\/()(?:(?:()(?:([^:@\\/]*):?([^:@\\/]*))?@)?([^:\\/?#]*)(?::(\\d*))?))?",
"()","(?:(()(?:(?:[^?#\\/]*\\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)"].join(""))).exec(e),o={},r=14;r--;)n[r]&&(o[t[r]]=n[r]);return delete o.source,o},window.getSiteUrl=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"url";return fe()(e)?e:{type:n,new_tab:"_blank"===t,url:e||"",nofollow:!1,noopener:!1,noreferrer:!1}},window.getSplitRadius=function(e){return e.toString().split(" ").map(function(e,t){if(!pe()(e.trim()))return["border-top-left-radius","border-top-right-radius",
"border-bottom-right-radius","border-bottom-left-radius"][t]+": "+e+";"}).join("")},window.getMarginPadding=function(e,t){var n;return void 0!==e&&fe()(e)?(n={xl:"",lg:"",md:"",sm:"",xs:""},void 0!==e.xl&&""!=e.xl.toString().trim()&&(n.xl=e.xl.toString().split(" ").map(function(e,n){if(!pe()(e.trim()))return t+"-"+["top","right","bottom","left"][n]+": "+e+";"}).join("")),void 0!==e.lg&&""!=e.lg.toString().trim()&&(n.lg=e.lg.toString().split(" ").map(function(e,n){if(!pe()(e.trim()))return t+"-"+["top",
"right","bottom","left"][n]+": "+e+";"}).join("")),void 0!==e.md&&""!=e.md.toString().trim()&&(n.md=e.md.toString().split(" ").map(function(e,n){if(!pe()(e.trim()))return t+"-"+["top","right","bottom","left"][n]+": "+e+";"}).join("")),void 0!==e.sm&&""!=e.sm.toString().trim()&&(n.sm=e.sm.toString().split(" ").map(function(e,n){if(!pe()(e.trim()))return t+"-"+["top","right","bottom","left"][n]+": "+e+";"}).join("")),void 0!==e.xs&&""!=e.xs.toString().trim()&&(n.xs=e.xs.toString().split(" ").map(function(e,
n){if(!pe()(e.trim()))return t+"-"+["top","right","bottom","left"][n]+": "+e+";"}).join("")),n):"number"==typeof e?t+": "+e+";":(n="",void 0!==e&&""!=e.trim()&&(n=e.split(" ").map(function(e,n){if(!pe()(e.trim()))return t+"-"+["top","right","bottom","left"][n]+": "+e+";"}).join("")),n)},window.generateMissingBreakpoints=function(e){return _.forEach(["xl","lg"],function(t){_.has(e,t)||_.set(e,t,_.get(e,"md",""))}),e}}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var n=r[e]={id:e,loaded:!1,
exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,e=[],a.O=(t,n,o,r)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){for(var [n,o,r]=e[d],l=!0,c=0;c<n.length;c++)(!1&r||i>=r)&&Object.keys(a.O).every(e=>a.O[e](n[c]))?n.splice(c--,1):(l=!1,r<i&&(i=r));if(l){e.splice(d--,1);var s=o();void 0!==s&&(t=s)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[n,o,r]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},n=Object.getPrototypeOf?
e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,o){if(1&o&&(e=this(e)),8&o)return e;if("object"==typeof e&&e){if(4&o&&e.__esModule)return e;if(16&o&&"function"==typeof e.then)return e}var r=Object.create(null);a.r(r);var i={};t=t||[null,n({}),n([]),n(n)];for(var l=2&o&&e;"object"==typeof l&&!~t.indexOf(l);l=n(l))Object.getOwnPropertyNames(l).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,a.d(r,i),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,
get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||(new Function("return this"))()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id);}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&
Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={542:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var o,r,[i,l,c]=n,s=0;if(i.some(t=>0!==e[t])){for(o in l)a.o(l,o)&&(a.m[o]=l[o]);if(c)var d=c(a)}for(t&&t(n);s<i.length;s++)r=i[s],a.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return a.O(d)},n=self.webpackChunkjp_page_builder_editor=self.webpackChunkjp_page_builder_editor||[];n.forEach(t.bind(null,
0)),n.push=t.bind(null,n.push.bind(n))})();var i=a.O(void 0,[216],()=>a(6548));i=a.O(i)})();
