@@ -50,7 +50,7 @@ const RadioImage = ({ choices, onClick, value, label, documentation }) => {
]);
return (
- {/*eslint-disable-next-line jsx-a11y/label-has-for */}
+ {/* eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control */}
"},addDevicePanels:function(){var i=this;_.each(i.devices,function(e,t){var n=i.addPanel(t);mi(".hfg--cb-devices-switcher",i.container).append('
'+e+""),mi(".hfg--cb-body",i.container).append(n),mi(".hfg-widgets-panel-inner",i.widgetSidebarContainer).append('
')});var e=mi("#hfg-upsell-tmpl");e.length&&mi(e.html()).insertAfter(mi(".hfg--cb-devices-switcher",i.container)),mi(i.container).find(".welcome-notice").removeClass("hidden"),mi(i.container).find(".conditional-header").addClass("hidden")},addItem:function(e,t){var n=this.getTemplate(),i="tmpl-hfg--cb-item";if(0!==mi("#"+i).length){e.elementOrder=t;var r=n(e,i);return mi(r)}},addAvailableItems:function(){var a=this;_.each(a.devices,function(e,o){_.each(a.items,function(e,t){var n=!0;if(!_.isUndefined(e.devices)&&!_.isEmpty(e.devices))if(_.isString(e.devices))e.devices!==o&&(n=!1);else{var i=!1;_.each(e.devices,function(e){o===e&&(i=!0)}),i||(n=!1)}if(n){t=Object.keys(a.items).indexOf(t);var r=a.addItem(e,t);mi(".hfg--widgets-"+o,a.widgetSidebarContainer).prepend(r)}})})},switchToDevice:function(e,t){var n=this;1<_.size(n.devices)?(mi(".hfg--cb-devices-switcher a",n.container).removeClass("hfg--tab-active"),mi(".hfg--cb-devices-switcher .switch-to-"+e,n.container).addClass("hfg--tab-active"),mi(".hfg--device-panel",n.container).addClass("hfg--panel-hide"),mi(".hfg--device-panel.hfg--panel-"+e,n.container).removeClass("hfg--panel-hide"),n.activePanel=e,mi(".hfg--device-panel .hfg-available-items .item-from-list").each(function(e,t){mi("#accordion-section-"+mi(t)[0].dataset.section).removeClass("hfg-section-inactive")}),mi(".hfg--device-panel.hfg--panel-"+e+" .hfg-available-items .item-from-list").each(function(e,t){mi("#accordion-section-"+mi(t)[0].dataset.section).addClass("hfg-section-inactive")})):(mi(".hfg--device-panel.hfg--panel-"+e+" .hfg-available-items .item-from-list").each(function(e,t){mi("#accordion-section-"+mi(t)[0].dataset.section).addClass("hfg-section-inactive")}),mi(".hfg--cb-devices-switcher a",n.container).addClass("hfg--tab-active")),(_.isUndefined(t)||t)&&("desktop"===e?mi("#customize-footer-actions .preview-desktop").trigger("click"):mi("#customize-footer-actions .preview-mobile").trigger("click"))},addExistingRowsItems:function(){var a=this,t=!1;bi.control(a.controlId).setting.get()&&(t=JSON.parse(bi.control(a.controlId).setting.get())),_.isObject(t)||(t={}),_.each(a.panels,function(r,o){var e={};_.isObject(t[o])&&(e=t[o]),_.each(e,function(e,i){_.isUndefined(e)||_.each(e,function(e,t){var n=mi('.hfg--widgets[data-device="'+o+'"] .grid-stack-item[data-id="'+e.id+'"]').first();n.attr("data-gs-width",e.width),n.attr("data-gs-x",e.x),n.removeClass("item-from-list"),a.addNewWidget(n,r[i]),mi("#accordion-section-"+e.id).removeClass("hfg-section-inactive")})}),a.hideDuplicates(o)}),a.ready=!0},focus:function(){this.container.on("click",".hfg--cb-item-setting, .hfg--cb-item-admin-setting, .hfg--cb-item-name, .item-tooltip",function(e){e.preventDefault();var t=mi(this).data("section")||"";console.log("Clicked section",t),-1!==t.indexOf("neve_")&&(t=t.replace("neve_",""),console.log("New section",t));var n=mi(this).data("widget")||"";n&&(console.log("Clicked widget",n),t=n);var i=mi(this).attr("data-control")||"",r=!1;i&&(_.isUndefined(bi.control(i))||(bi.control(i).focus(),r=!0)),r||t&&!_.isUndefined(bi.section(t))&&(console.log("Before focus section"),bi.section(t).focus())}),this.container.on("click",".hfg--cb-row-settings",function(e){e.preventDefault();var t=mi(this).attr("data-id")||"",n=s.id+"_"+t;_.isUndefined(bi.section(n))||bi.section(n).focus()})},closeComponentsSidebar:function(){mi(".widgets-panel--visible").removeClass("widgets-panel--visible"),mi(".hfg--widgets.widgets--visible").removeClass("widgets--visible"),mi(this.widgetSidebarContainer).find(".component-search").val("").trigger("keyup"),mi(this.widgetSidebarContainer).removeClass("preview-right preview-left"),mi("body").removeClass("hfg--widgets-open"),mi(".hfg--component-preview.visible").removeClass("visible")},initComponentsSidebar:function(){var l=this;mi(l.container).on("click",".add-button--grid",function(e){l.insertPoint=mi(this).data("slot"),l.insertRow=mi(this).closest(".hfg--row-inner").find(".hfg--cb-items").data("id"),e.preventDefault(),l.closeComponentsSidebar();var t=e.target.getBoundingClientRect(),n=mi(".wp-full-overlay").hasClass("collapsed")?0:mi("#customize-controls").outerWidth(),i=mi(l.widgetSidebarContainer).outerWidth(),r=mi(l.widgetSidebarContainer).outerHeight(),o={top:t.top-(r+5)};6
t.x?1:0});for(var s=0;so[s+1].x&&(o[s].width=o[s+1].x-o[s].x,mi(this).attr("data-gs-width",o[s].width)));var c=mi(this).find(".grid-stack-item-content");c.addClass("hfg-highlight"),setTimeout(function(){c.removeClass("hfg-highlight")},3500),mi("#_sid_"+n+"-"+l.insertRow,l.container[0]).append(this),l.addNewWidget(mi(this),mi(l.container[0]).find(" #_sid_"+n+"-"+l.insertRow)),bi.section(this.getAttribute("data-section")).focus(),l.save(),l.insertRow=null,l.insertPoint=null,l.hideDuplicates(n)})},remove:function(){var i=this;mi(i.container).on("click",".hfg--device-panel .hfg--cb-item-remove",function(e){e.preventDefault();var t=mi(this).closest(".grid-stack-item"),n=t.closest(".hfg--device-panel")[0].getAttribute("data-device");t.attr("data-gs-x",0),t.removeAttr("style"),mi(i.widgetSidebarContainer).find(".hfg--widgets-"+n).prepend(t),mi("#accordion-section-"+t[0].dataset.section).addClass("hfg-section-inactive"),i.updateAllGrids(),i.hideDuplicates(n),i.save()})},removeAllItems:function(){var i=this;mi(i.container).find(".grid-stack-item").each(function(e,t){var n=mi(t).closest(".hfg--device-panel")[0].getAttribute("data-device");mi(t).attr("data-gs-x",0),mi(t).removeAttr("style"),mi(i.widgetSidebarContainer).find(".hfg--widgets-"+n).prepend(t),i.updateAllGrids(),i.hideDuplicates(n)})},hideDuplicates:function(e){var t=mi(this.widgetSidebarContainer).find(".hfg--widgets-"+e+" .grid-stack-item"),n={};_.each(t,function(e){var t=mi(e).data("slug");if("hfg-generic-component"===t)return!1;void 0===n[t]&&(n[t]=[]),n[t].push(e)}),_.each(n,function(e,t){if(e.length<2)return mi(e[0]).removeClass("duplicate"),!1;_.each(e,function(e,t){if(0===t)return mi(e).removeClass("duplicate"),!1;mi(e).addClass("duplicate")})})},encodeValue:function(e){return JSON.stringify(e)},listenForLayoutSideloading:function(){var t=this;document.addEventListener("neve-changed-builder-value",function(e){return!!e.detail&&(e.detail.id===t.id&&(bi.control(t.controlId).setting.set(t.encodeValue(e.detail.value)),t.removeAllItems(),void t.addExistingRowsItems()))})},decodeValue:function(e){return JSON.parse(e)},save:function(){var i=this;if(i.ready){var r={};_.each(i.panels,function(e,n){r[n]={},_.each(e,function(e,t){r[n][t]=_.map(mi(" > .grid-stack-item",e),function(e){return e=mi(e),{x:i.getX(e),y:1,width:i.getW(e),height:1,id:e.data("id")||""}})})}),bi.control(i.controlId).setting.set(i.encodeValue(r))}},showPanel:function(){var t=this;this.container.find(".add-button--grid").addClass("hfg-highlight"),setTimeout(function(){t.container.find(".add-button--grid").removeClass("hfg-highlight")},1e3),this.container.removeClass("hfg--builder--hide").addClass("hfg--builder-show"),setTimeout(function(){var e=t.container.height();mi("#customize-preview").addClass("cb--preview-panel-show").css({bottom:e-1,"margin-top":"0px"})},100)},hidePanel:function(){this.container.removeClass("hfg--builder-show"),mi("#customize-preview").removeClass("cb--preview-panel-show").removeAttr("style")},togglePanel:function(){var t=this;bi.state("expandedPanel").bind(function(e){bi.panel(s.panel).expanded()?(wi.trigger("hfg_panel_builder_open",[s.panel]),top._current_builder_panel=c,t.showPanel()):(t.hidePanel(),t.closeComponentsSidebar())}),t.container.on("click",".hfg--panel-close",function(e){e.preventDefault(),t.container.toggleClass("hfg--builder--hide"),t.container.hasClass("hfg--builder--hide")?mi("#customize-preview").removeClass("cb--preview-panel-show"):mi("#customize-preview").addClass("cb--preview-panel-show")})},panelLayoutCSS:function(){var e=mi("#customize-controls").width();bi.state("paneVisible").get()||(e=0),yi?this.container.find(".hfg--cb-inner").css({"margin-right":e}):this.container.find(".hfg--cb-inner").css({"margin-left":e})},populateComponentPreviews:function(){var n=this,i=n.getTemplate();_.each(n.devices,function(e,t){_.each(n.items,function(e){if(null===e.description)return!1;var t=i(e,"tmpl-hfg--widgets-preview");mi(n.widgetSidebarContainer).append(t)})})},init:function(e,t,n){var i=this,r=i.getTemplate(),o=r(s,"tmpl-hfg--builder-panel"),a=r(s,"tmpl-hfg--widgets-sidebar");i.container=mi(o),i.widgetSidebarContainer=mi(a),mi("body .wp-full-overlay").append(i.container).append(i.widgetSidebarContainer),i.controlId=e,i.items=t,i.devices=n,s.section&&bi.section(s.section).container.addClass("hfg--hide"),i.addDevicePanels(),i.switchToDevice(i.activePanel),i.addAvailableItems(),i.populateComponentPreviews(),i.switchToDevice(i.activePanel),i.drag_drop(),i.initComponentsSidebar(),i.focus(),i.remove(),i.addExistingRowsItems(),i.listenForLayoutSideloading(),bi.panel(s.panel).expanded()?i.showPanel():(i.hidePanel(),i.closeComponentsSidebar()),bi.previewedDevice.bind(function(e){"desktop"===e?i.switchToDevice("desktop",!1):i.switchToDevice("mobile",!1)}),i.togglePanel(),bi.state("paneVisible").get()&&i.panelLayoutCSS(),bi.state("paneVisible").bind(function(){i.panelLayoutCSS()}),mi(window).resize(_.throttle(function(){i.panelLayoutCSS()},100)),i.container.on("click",".hfg--cb-devices-switcher a.switch-to",function(e){e.preventDefault();var t=mi(this).data("device");i.switchToDevice(t)}),wi.trigger("hfg_builder_panel_loaded",[c,i])}};return e.init(s.control_id,s.items,s.devices),e},xi=jQuery,_i=wp.customize||null,Si=xi(document),_i.bind("ready",function(e,t){_.each(HFG_Layout_Builder.builders,function(e,t){Ci[t]=new ii(e,t)}),_i.bind("pane-contents-reflowed",function(){setTimeout(function(){0===xi("#sub-accordion-panel-widgets .no-widget-areas-rendered-notice .footer_moved_widgets_text").length&&xi("#sub-accordion-panel-widgets .no-widget-areas-rendered-notice").append('")},1e3)}),_i.state("expandedSection").bind(function(e){xi(".hfg--device-panel .grid-stack-item").removeClass("item-active"),xi(".hfg--cb-row").removeClass("row-active"),e&&(xi('.hfg--cb-row[data-id="'+e.id+'"]').addClass("row-active"),xi(".hfg--device-panel .grid-stack-item.for-s-"+e.id).addClass("item-active"))})}),Si.on("click",".focus-section",function(e){e.preventDefault();var t=xi(this).attr("data-id")||"";(t=t||(t=xi(this).attr("href")||"").replace("#",""))&&_i.section(t)&&_i.section(t).focus()}),Si.on("click",".focus-control",function(e){e.preventDefault();var t=xi(this).attr("data-id")||"";(t=t||(t=xi(this).attr("href")||"").replace("#",""))&&_i.control(t)&&_i.control(t).focus()}),Si.on("click",".focus-panel",function(e){e.preventDefault();var t=xi(this).attr("data-id")||"";(t=t||(t=xi(this).attr("href")||"").replace("#",""))&&_i.panel(t)&&_i.panel(t).focus()}),Si.on("mouseover",".hfg--widgets .grid-stack-item",function(e){var t=xi(this),n=t.attr("data-id");xi(t).closest(".hfg--widgets-panel").find('[data-for-component="'+n+'"]').addClass("visible")}),Si.on("mouseleave",".hfg--widgets .grid-stack-item",function(e){var t=xi(this),n=t.attr("data-id");xi(t).closest(".hfg--widgets-panel").find('[data-for-component="'+n+'"]').removeClass("visible")}),Si.on("mouseover",".hfg--cb-row .grid-stack-item",function(e){var t=xi(this),n=xi(".hfg--cb-item-remove",t).outerWidth()+xi(".hfg--cb-item-setting",t).outerWidth();xi(".grid-stack-item-content",t).innerWidth()-500&&h[0]<4?1:+(h[0]+h[1])),!p&&Z&&(!(h=Z.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=Z.match(/Chrome\/(\d+)/))&&(p=+h[1]);var it=p,ot=it,at=o,ct=r.String,st=!!Object.getOwnPropertySymbols&&!at((function(){var t=Symbol("symbol detection");return!ct(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ot&&ot<41})),lt=st&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ft=K,ut=U,dt=Q,gt=Object,vt=lt?function(t){return"symbol"==typeof t}:function(t){var e=ft("Symbol");return ut(e)&&dt(e.prototype,gt(t))},ht=String,pt=function(t){try{return ht(t)}catch(t){return"Object"}},mt=U,bt=pt,wt=TypeError,yt=function(t){if(mt(t))return t;throw new wt(bt(t)+" is not a function")},xt=yt,_t=T,St=function(t,e){var n=t[e];return _t(n)?void 0:xt(n)},Ct=f,Ot=U,It=X,At=TypeError,kt={exports:{}},Pt=r,jt=Object.defineProperty,Et=function(t,e){try{jt(Pt,t,{value:e,configurable:!0,writable:!0})}catch(n){Pt[t]=e}return e},Dt=Et,Tt="__core-js_shared__",Rt=r[Tt]||Dt(Tt,{}),Ft=Rt;(kt.exports=function(t,e){return Ft[t]||(Ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var zt=kt.exports,Mt=z,Wt=Object,Lt=function(t){return Wt(Mt(t))},Nt=Lt,Gt=S({}.hasOwnProperty),$t=Object.hasOwn||function(t,e){return Gt(Nt(t),e)},Ut=S,Bt=0,Ht=Math.random(),Xt=Ut(1..toString),Vt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Xt(++Bt+Ht,36)},Jt=zt,Kt=$t,Qt=Vt,Yt=st,qt=lt,Zt=r.Symbol,te=Jt("wks"),ee=qt?Zt.for||Zt:Zt&&Zt.withoutSetter||Qt,ne=function(t){return Kt(te,t)||(te[t]=Yt&&Kt(Zt,t)?Zt[t]:ee("Symbol."+t)),te[t]},re=f,ie=X,oe=vt,ae=St,ce=function(t,e){var n,r;if("string"===e&&Ot(n=t.toString)&&!It(r=Ct(n,t)))return r;if(Ot(n=t.valueOf)&&!It(r=Ct(n,t)))return r;if("string"!==e&&Ot(n=t.toString)&&!It(r=Ct(n,t)))return r;throw new At("Can't convert object to primitive value")},se=TypeError,le=ne("toPrimitive"),fe=function(t,e){if(!ie(t)||oe(t))return t;var n,r=ae(t,le);if(r){if(void 0===e&&(e="default"),n=re(r,t,e),!ie(n)||oe(n))return n;throw new se("Can't convert object to primitive value")}return void 0===e&&(e="number"),ce(t,e)},ue=vt,de=function(t){var e=fe(t,"string");return ue(e)?e:e+""},ge=X,ve=r.document,he=ge(ve)&&ge(ve.createElement),pe=function(t){return he?ve.createElement(t):{}},me=pe,be=!a&&!o((function(){return 7!==Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),we=a,ye=f,xe=u,_e=m,Se=L,Ce=de,Oe=$t,Ie=be,Ae=Object.getOwnPropertyDescriptor;i.f=we?Ae:function(t,e){if(t=Se(t),e=Ce(e),Ie)try{return Ae(t,e)}catch(t){}if(Oe(t,e))return _e(!ye(xe.f,t,e),t[e])};var ke={},Pe=a&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),je=X,Ee=String,De=TypeError,Te=function(t){if(je(t))return t;throw new De(Ee(t)+" is not an object")},Re=a,Fe=be,ze=Pe,Me=Te,We=de,Le=TypeError,Ne=Object.defineProperty,Ge=Object.getOwnPropertyDescriptor,$e="enumerable",Ue="configurable",Be="writable";ke.f=Re?ze?function(t,e,n){if(Me(t),e=We(e),Me(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Be in n&&!n[Be]){var r=Ge(t,e);r&&r[Be]&&(t[e]=n.value,n={configurable:Ue in n?n[Ue]:r[Ue],enumerable:$e in n?n[$e]:r[$e],writable:!1})}return Ne(t,e,n)}:Ne:function(t,e,n){if(Me(t),e=We(e),Me(n),Fe)try{return Ne(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Le("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var He=ke,Xe=m,Ve=a?function(t,e,n){return He.f(t,e,Xe(1,n))}:function(t,e,n){return t[e]=n,t},Je={exports:{}},Ke=a,Qe=$t,Ye=Function.prototype,qe=Ke&&Object.getOwnPropertyDescriptor,Ze=Qe(Ye,"name"),tn={EXISTS:Ze,PROPER:Ze&&"something"===function(){}.name,CONFIGURABLE:Ze&&(!Ke||Ke&&qe(Ye,"name").configurable)},en=U,nn=Rt,rn=S(Function.toString);en(nn.inspectSource)||(nn.inspectSource=function(t){return rn(t)});var on,an,cn,sn=nn.inspectSource,ln=U,fn=r.WeakMap,un=ln(fn)&&/native code/.test(String(fn)),dn=Vt,gn=zt("keys"),vn=function(t){return gn[t]||(gn[t]=dn(t))},hn={},pn=un,mn=r,bn=X,wn=Ve,yn=$t,xn=Rt,_n=vn,Sn=hn,Cn="Object already initialized",On=mn.TypeError,In=mn.WeakMap;if(pn||xn.state){var An=xn.state||(xn.state=new In);An.get=An.get,An.has=An.has,An.set=An.set,on=function(t,e){if(An.has(t))throw new On(Cn);return e.facade=t,An.set(t,e),e},an=function(t){return An.get(t)||{}},cn=function(t){return An.has(t)}}else{var kn=_n("state");Sn[kn]=!0,on=function(t,e){if(yn(t,kn))throw new On(Cn);return e.facade=t,wn(t,kn,e),e},an=function(t){return yn(t,kn)?t[kn]:{}},cn=function(t){return yn(t,kn)}}var Pn={set:on,get:an,has:cn,enforce:function(t){return cn(t)?an(t):on(t,{})},getterFor:function(t){return function(e){var n;if(!bn(e)||(n=an(e)).type!==t)throw new On("Incompatible receiver, "+t+" required");return n}}},jn=S,En=o,Dn=U,Tn=$t,Rn=a,Fn=tn.CONFIGURABLE,zn=sn,Mn=Pn.enforce,Wn=Pn.get,Ln=String,Nn=Object.defineProperty,Gn=jn("".slice),$n=jn("".replace),Un=jn([].join),Bn=Rn&&!En((function(){return 8!==Nn((function(){}),"length",{value:8}).length})),Hn=String(String).split("String"),Xn=Je.exports=function(t,e,n){"Symbol("===Gn(Ln(e),0,7)&&(e="["+$n(Ln(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!Tn(t,"name")||Fn&&t.name!==e)&&(Rn?Nn(t,"name",{value:e,configurable:!0}):t.name=e),Bn&&n&&Tn(n,"arity")&&t.length!==n.arity&&Nn(t,"length",{value:n.arity});try{n&&Tn(n,"constructor")&&n.constructor?Rn&&Nn(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=Mn(t);return Tn(r,"source")||(r.source=Un(Hn,"string"==typeof e?e:"")),t};Function.prototype.toString=Xn((function(){return Dn(this)&&Wn(this).source||zn(this)}),"toString");var Vn=Je.exports,Jn=U,Kn=ke,Qn=Vn,Yn=Et,qn=function(t,e,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:e;if(Jn(n)&&Qn(n,o,r),r.global)i?t[e]=n:Yn(e,n);else{try{r.unsafe?t[e]&&(i=!0):delete t[e]}catch(t){}i?t[e]=n:Kn.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Zn={},tr=Math.ceil,er=Math.floor,nr=Math.trunc||function(t){var e=+t;return(e>0?er:tr)(e)},rr=function(t){var e=+t;return e!=e||0===e?0:nr(e)},ir=rr,or=Math.max,ar=Math.min,cr=function(t,e){var n=ir(t);return n<0?or(n+e,0):ar(n,e)},sr=rr,lr=Math.min,fr=function(t){return t>0?lr(sr(t),9007199254740991):0},ur=fr,dr=function(t){return ur(t.length)},gr=L,vr=cr,hr=dr,pr=function(t){return function(e,n,r){var i,o=gr(e),a=hr(o),c=vr(r,a);if(t&&n!=n){for(;a>c;)if((i=o[c++])!=i)return!0}else for(;a>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},mr={includes:pr(!0),indexOf:pr(!1)},br=$t,wr=L,yr=mr.indexOf,xr=hn,_r=S([].push),Sr=function(t,e){var n,r=wr(t),i=0,o=[];for(n in r)!br(xr,n)&&br(r,n)&&_r(o,n);for(;e.length>i;)br(r,n=e[i++])&&(~yr(o,n)||_r(o,n));return o},Cr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Or=Sr,Ir=Cr.concat("length","prototype");Zn.f=Object.getOwnPropertyNames||function(t){return Or(t,Ir)};var Ar={};Ar.f=Object.getOwnPropertySymbols;var kr=K,Pr=Zn,jr=Ar,Er=Te,Dr=S([].concat),Tr=kr("Reflect","ownKeys")||function(t){var e=Pr.f(Er(t)),n=jr.f;return n?Dr(e,n(t)):e},Rr=$t,Fr=Tr,zr=i,Mr=ke,Wr=function(t,e,n){for(var r=Fr(e),i=Mr.f,o=zr.f,a=0;ab;b++)if((c||b in h)&&(g=p(d=h[b],b,v),t))if(e)y[b]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return b;case 2:Bi(y,d)}else switch(t){case 4:return!1;case 7:Bi(y,d)}return o?-1:r||i?i:y}},Xi={forEach:Hi(0),map:Hi(1),filter:Hi(2),some:Hi(3),every:Hi(4),find:Hi(5),findIndex:Hi(6),filterReject:Hi(7)},Vi={},Ji=Sr,Ki=Cr,Qi=Object.keys||function(t){return Ji(t,Ki)},Yi=a,qi=Pe,Zi=ke,to=Te,eo=L,no=Qi;Vi.f=Yi&&!qi?Object.defineProperties:function(t,e){to(t);for(var n,r=eo(e),i=no(e),o=i.length,a=0;o>a;)Zi.f(t,n=i[a++],r[n]);return t};var ro,io=K("document","documentElement"),oo=Te,ao=Vi,co=Cr,so=hn,lo=io,fo=pe,uo="prototype",go="script",vo=vn("IE_PROTO"),ho=function(){},po=function(t){return"<"+go+">"+t+""+go+">"},mo=function(t){t.write(po("")),t.close();var e=t.parentWindow.Object;return t=null,e},bo=function(){try{ro=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;bo="undefined"!=typeof document?document.domain&&ro?mo(ro):(e=fo("iframe"),n="java"+go+":",e.style.display="none",lo.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(po("document.F=Object")),t.close(),t.F):mo(ro);for(var r=co.length;r--;)delete bo[uo][co[r]];return bo()};so[vo]=!0;var wo=Object.create||function(t,e){var n;return null!==t?(ho[uo]=oo(t),n=new ho,ho[uo]=null,n[vo]=t):n=bo(),void 0===e?n:ao.f(n,e)},yo=ne,xo=wo,_o=ke.f,So=yo("unscopables"),Co=Array.prototype;void 0===Co[So]&&_o(Co,So,{configurable:!0,value:xo(null)});var Oo=ei,Io=Xi.find,Ao=function(t){Co[So][t]=!0},ko="find",Po=!0;ko in[]&&Array(1)[ko]((function(){Po=!1})),Oo({target:"Array",proto:!0,forced:Po},{find:function(t){return Io(this,t,arguments.length>1?arguments[1]:void 0)}}),Ao(ko);var jo=bi,Eo=ui?{}.toString:function(){return"[object "+jo(this)+"]"};ui||qn(Object.prototype,"toString",Eo,{unsafe:!0});var Do=de,To=ke,Ro=m,Fo=function(t,e,n){var r=Do(e);r in t?To.f(t,r,Ro(0,n)):t[r]=n},zo=o,Mo=it,Wo=ne("species"),Lo=function(t){return Mo>=51||!zo((function(){var e=[];return(e.constructor={})[Wo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},No=S([].slice),Go=ei,$o=li,Uo=Di,Bo=X,Ho=cr,Xo=dr,Vo=L,Jo=Fo,Ko=ne,Qo=No,Yo=Lo("slice"),qo=Ko("species"),Zo=Array,ta=Math.max;Go({target:"Array",proto:!0,forced:!Yo},{slice:function(t,e){var n,r,i,o=Vo(this),a=Xo(o),c=Ho(t,a),s=Ho(void 0===e?a:e,a);if($o(o)&&(n=o.constructor,(Uo(n)&&(n===Zo||$o(n.prototype))||Bo(n)&&null===(n=n[qo]))&&(n=void 0),n===Zo||void 0===n))return Qo(o,c,s);for(r=new(void 0===n?Zo:n)(ta(s-c,0)),i=0;c1?arguments[1]:void 0;return ca?aa(this,t,e)||0:ia(this,t,e)}});var sa=Lt,la=Qi;ei({target:"Object",stat:!0,forced:o((function(){la(1)}))},{keys:function(t){return la(sa(t))}});var fa,ua,da=bi,ga=String,va=function(t){if("Symbol"===da(t))throw new TypeError("Cannot convert a Symbol value to a string");return ga(t)},ha=Te,pa=o,ma=r.RegExp,ba=pa((function(){var t=ma("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),wa=ba||pa((function(){return!ma("a","y").sticky})),ya={BROKEN_CARET:ba||pa((function(){var t=ma("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:wa,UNSUPPORTED_Y:ba},xa=o,_a=r.RegExp,Sa=xa((function(){var t=_a(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Ca=o,Oa=r.RegExp,Ia=Ca((function(){var t=Oa("(?b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")})),Aa=f,ka=S,Pa=va,ja=function(){var t=ha(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Ea=ya,Da=wo,Ta=Pn.get,Ra=Sa,Fa=Ia,za=zt("native-string-replace",String.prototype.replace),Ma=RegExp.prototype.exec,Wa=Ma,La=ka("".charAt),Na=ka("".indexOf),Ga=ka("".replace),$a=ka("".slice),Ua=(ua=/b*/g,Aa(Ma,fa=/a/,"a"),Aa(Ma,ua,"a"),0!==fa.lastIndex||0!==ua.lastIndex),Ba=Ea.BROKEN_CARET,Ha=void 0!==/()??/.exec("")[1];(Ua||Ha||Ba||Ra||Fa)&&(Wa=function(t){var e,n,r,i,o,a,c,s=this,l=Ta(s),f=Pa(t),u=l.raw;if(u)return u.lastIndex=s.lastIndex,e=Aa(Wa,u,f),s.lastIndex=u.lastIndex,e;var d=l.groups,g=Ba&&s.sticky,v=Aa(ja,s),h=s.source,p=0,m=f;if(g&&(v=Ga(v,"y",""),-1===Na(v,"g")&&(v+="g"),m=$a(f,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==La(f,s.lastIndex-1))&&(h="(?: "+h+")",m=" "+m,p++),n=new RegExp("^(?:"+h+")",v)),Ha&&(n=new RegExp("^"+h+"$(?!\\s)",v)),Ua&&(r=s.lastIndex),i=Aa(Ma,g?n:s,m),g?i?(i.input=$a(i.input,p),i[0]=$a(i[0],p),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Ua&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Ha&&i&&i.length>1&&Aa(za,i[0],n,(function(){for(o=1;o=c?t?"":void 0:(r=uc(o,a))<55296||r>56319||a+1===c||(i=uc(o,a+1))<56320||i>57343?t?fc(o,a):r:t?dc(o,a,a+2):i-56320+(r-55296<<10)+65536}},vc={codeAt:gc(!1),charAt:gc(!0)}.charAt,hc=S,pc=Lt,mc=Math.floor,bc=hc("".charAt),wc=hc("".replace),yc=hc("".slice),xc=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,_c=/\$([$&'`]|\d{1,2})/g,Sc=f,Cc=Te,Oc=U,Ic=A,Ac=Xa,kc=TypeError,Pc=Ya,jc=f,Ec=S,Dc=function(t,e,n,r){var i=nc(t),o=!ec((function(){var e={};return e[i]=function(){return 7},7!==""[t](e)})),a=o&&!ec((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[ic]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!o||!a||n){var c=qa(/./[i]),s=e(i,""[t],(function(t,e,n,r,i){var a=qa(t),s=e.exec;return s===tc||s===oc.exec?o&&!i?{done:!0,value:c(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));Za(String.prototype,t,s[0]),Za(oc,i,s[1])}r&&rc(oc[i],"sham",!0)},Tc=o,Rc=Te,Fc=U,zc=T,Mc=rr,Wc=fr,Lc=va,Nc=z,Gc=function(t,e,n){return e+(n?vc(t,e).length:1)},$c=St,Uc=function(t,e,n,r,i,o){var a=n+t.length,c=r.length,s=_c;return void 0!==i&&(i=pc(i),s=xc),wc(o,s,(function(o,s){var l;switch(bc(s,0)){case"$":return"$";case"&":return t;case"`":return yc(e,0,n);case"'":return yc(e,a);case"<":l=i[yc(s,1,-1)];break;default:var f=+s;if(0===f)return o;if(f>c){var u=mc(f/10);return 0===u?o:u<=c?void 0===r[u-1]?bc(s,1):r[u-1]+bc(s,1):o}l=r[f-1]}return void 0===l?"":l}))},Bc=function(t,e){var n=t.exec;if(Oc(n)){var r=Sc(n,t,e);return null!==r&&Cc(r),r}if("RegExp"===Ic(t))return Sc(Ac,t,e);throw new kc("RegExp#exec called on incompatible receiver")},Hc=ne("replace"),Xc=Math.max,Vc=Math.min,Jc=Ec([].concat),Kc=Ec([].push),Qc=Ec("".indexOf),Yc=Ec("".slice),qc="$0"==="a".replace(/./,"$0"),Zc=!!/./[Hc]&&""===/./[Hc]("a","$0");Dc("replace",(function(t,e,n){var r=Zc?"$":"$0";return[function(t,n){var r=Nc(this),i=zc(t)?void 0:$c(t,Hc);return i?jc(i,t,r,n):jc(e,Lc(r),t,n)},function(t,i){var o=Rc(this),a=Lc(t);if("string"==typeof i&&-1===Qc(i,r)&&-1===Qc(i,"$<")){var c=n(e,o,a,i);if(c.done)return c.value}var s=Fc(i);s||(i=Lc(i));var l,f=o.global;f&&(l=o.unicode,o.lastIndex=0);for(var u,d=[];null!==(u=Bc(o,a))&&(Kc(d,u),f);){""===Lc(u[0])&&(o.lastIndex=Gc(a,Wc(o.lastIndex),l))}for(var g,v="",h=0,p=0;p=h&&(v+=Yc(a,h,w)+m,h=w+b.length)}return v+Yc(a,h)}]}),!!Tc((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")}))||!qc||Zc);var ts=Xi.filter;ei({target:"Array",proto:!0,forced:!Lo("filter")},{filter:function(t){return ts(this,t,arguments.length>1?arguments[1]:void 0)}});var es=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ns=$t,rs=U,is=Lt,os=es,as=vn("IE_PROTO"),cs=Object,ss=cs.prototype,ls=os?cs.getPrototypeOf:function(t){var e=is(t);if(ns(e,as))return e[as];var n=e.constructor;return rs(n)&&e instanceof n?n.prototype:e instanceof cs?ss:null},fs=a,us=o,ds=S,gs=ls,vs=Qi,hs=L,ps=ds(u.f),ms=ds([].push),bs=fs&&us((function(){var t=Object.create(null);return t[2]=2,!ps(t,2)})),ws=function(t){return function(e){for(var n,r=hs(e),i=vs(r),o=bs&&null===gs(r),a=i.length,c=0,s=[];a>c;)n=i[c++],fs&&!(o?n in r:ps(r,n))||ms(s,t?[n,r[n]]:r[n]);return s}},ys={entries:ws(!0),values:ws(!1)}.values;ei({target:"Object",stat:!0},{values:function(t){return ys(t)}});var xs=pt,_s=TypeError,Ss=cr,Cs=dr,Os=Fo,Is=Array,As=Math.max,ks=function(t,e,n){for(var r=Cs(t),i=Ss(e,r),o=Ss(void 0===n?r:n,r),a=Is(As(o-i,0)),c=0;i0;)t[r]=t[--r];r!==o++&&(t[r]=n)}return t},Ts=function(t,e,n,r){for(var i=e.length,o=n.length,a=0,c=0;a3)){if(Ys)return!0;if(Zs)return Zs<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)tl.push({k:e+r,v:n})}for(tl.sort((function(t,e){return e.v-t.v})),r=0;rXs(n)?1:-1}}(t)),n=Bs(i),r=0;r1?arguments[1]:void 0)}});var sl={},ll=A,fl=L,ul=Zn.f,dl=ks,gl="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];sl.f=function(t){return gl&&"Window"===ll(t)?function(t){try{return ul(t)}catch(t){return dl(gl)}}(t):ul(fl(t))};var vl=Vn,hl=ke,pl=function(t,e,n){return n.get&&vl(n.get,e,{getter:!0}),n.set&&vl(n.set,e,{setter:!0}),hl.f(t,e,n)},ml={},bl=ne;ml.f=bl;var wl=r,yl=$t,xl=ml,_l=ke.f,Sl=f,Cl=K,Ol=ne,Il=qn,Al=ke.f,kl=$t,Pl=ne("toStringTag"),jl=ei,El=r,Dl=f,Tl=S,Rl=a,Fl=st,zl=o,Ml=$t,Wl=Q,Ll=Te,Nl=L,Gl=de,$l=va,Ul=m,Bl=wo,Hl=Qi,Xl=Zn,Vl=sl,Jl=Ar,Kl=i,Ql=ke,Yl=Vi,ql=u,Zl=qn,tf=pl,ef=zt,nf=hn,rf=Vt,of=ne,af=ml,cf=function(t){var e=wl.Symbol||(wl.Symbol={});yl(e,t)||_l(e,t,{value:xl.f(t)})},sf=function(){var t=Cl("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=Ol("toPrimitive");e&&!e[r]&&Il(e,r,(function(t){return Sl(n,this)}),{arity:1})},lf=function(t,e,n){t&&!n&&(t=t.prototype),t&&!kl(t,Pl)&&Al(t,Pl,{configurable:!0,value:e})},ff=Pn,uf=Xi.forEach,df=vn("hidden"),gf="Symbol",vf="prototype",hf=ff.set,pf=ff.getterFor(gf),mf=Object[vf],bf=El.Symbol,wf=bf&&bf[vf],yf=El.RangeError,xf=El.TypeError,_f=El.QObject,Sf=Kl.f,Cf=Ql.f,Of=Vl.f,If=ql.f,Af=Tl([].push),kf=ef("symbols"),Pf=ef("op-symbols"),jf=ef("wks"),Ef=!_f||!_f[vf]||!_f[vf].findChild,Df=function(t,e,n){var r=Sf(mf,e);r&&delete mf[e],Cf(t,e,n),r&&t!==mf&&Cf(mf,e,r)},Tf=Rl&&zl((function(){return 7!==Bl(Cf({},"a",{get:function(){return Cf(this,"a",{value:7}).a}})).a}))?Df:Cf,Rf=function(t,e){var n=kf[t]=Bl(wf);return hf(n,{type:gf,tag:t,description:e}),Rl||(n.description=e),n},Ff=function(t,e,n){t===mf&&Ff(Pf,e,n),Ll(t);var r=Gl(e);return Ll(n),Ml(kf,r)?(n.enumerable?(Ml(t,df)&&t[df][r]&&(t[df][r]=!1),n=Bl(n,{enumerable:Ul(0,!1)})):(Ml(t,df)||Cf(t,df,Ul(1,{})),t[df][r]=!0),Tf(t,r,n)):Cf(t,r,n)},zf=function(t,e){Ll(t);var n=Nl(e),r=Hl(n).concat(Nf(n));return uf(r,(function(e){Rl&&!Dl(Mf,n,e)||Ff(t,e,n[e])})),t},Mf=function(t){var e=Gl(t),n=Dl(If,this,e);return!(this===mf&&Ml(kf,e)&&!Ml(Pf,e))&&(!(n||!Ml(this,e)||!Ml(kf,e)||Ml(this,df)&&this[df][e])||n)},Wf=function(t,e){var n=Nl(t),r=Gl(e);if(n!==mf||!Ml(kf,r)||Ml(Pf,r)){var i=Sf(n,r);return!i||!Ml(kf,r)||Ml(n,df)&&n[df][r]||(i.enumerable=!0),i}},Lf=function(t){var e=Of(Nl(t)),n=[];return uf(e,(function(t){Ml(kf,t)||Ml(nf,t)||Af(n,t)})),n},Nf=function(t){var e=t===mf,n=Of(e?Pf:Nl(t)),r=[];return uf(n,(function(t){!Ml(kf,t)||e&&!Ml(mf,t)||Af(r,kf[t])})),r};Fl||(bf=function(){if(Wl(wf,this))throw new xf("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?$l(arguments[0]):void 0,e=rf(t),n=function(t){var r=void 0===this?El:this;r===mf&&Dl(n,Pf,t),Ml(r,df)&&Ml(r[df],e)&&(r[df][e]=!1);var i=Ul(1,t);try{Tf(r,e,i)}catch(t){if(!(t instanceof yf))throw t;Df(r,e,i)}};return Rl&&Ef&&Tf(mf,e,{configurable:!0,set:n}),Rf(e,t)},Zl(wf=bf[vf],"toString",(function(){return pf(this).tag})),Zl(bf,"withoutSetter",(function(t){return Rf(rf(t),t)})),ql.f=Mf,Ql.f=Ff,Yl.f=zf,Kl.f=Wf,Xl.f=Vl.f=Lf,Jl.f=Nf,af.f=function(t){return Rf(of(t),t)},Rl&&(tf(wf,"description",{configurable:!0,get:function(){return pf(this).description}}),Zl(mf,"propertyIsEnumerable",Mf,{unsafe:!0}))),jl({global:!0,constructor:!0,wrap:!0,forced:!Fl,sham:!Fl},{Symbol:bf}),uf(Hl(jf),(function(t){cf(t)})),jl({target:gf,stat:!0,forced:!Fl},{useSetter:function(){Ef=!0},useSimple:function(){Ef=!1}}),jl({target:"Object",stat:!0,forced:!Fl,sham:!Rl},{create:function(t,e){return void 0===e?Bl(t):zf(Bl(t),e)},defineProperty:Ff,defineProperties:zf,getOwnPropertyDescriptor:Wf}),jl({target:"Object",stat:!0,forced:!Fl},{getOwnPropertyNames:Lf}),sf(),lf(bf,gf),nf[df]=!0;var Gf=st&&!!Symbol.for&&!!Symbol.keyFor,$f=ei,Uf=K,Bf=$t,Hf=va,Xf=zt,Vf=Gf,Jf=Xf("string-to-symbol-registry"),Kf=Xf("symbol-to-string-registry");$f({target:"Symbol",stat:!0,forced:!Vf},{for:function(t){var e=Hf(t);if(Bf(Jf,e))return Jf[e];var n=Uf("Symbol")(e);return Jf[e]=n,Kf[n]=e,n}});var Qf=ei,Yf=$t,qf=vt,Zf=pt,tu=Gf,eu=zt("symbol-to-string-registry");Qf({target:"Symbol",stat:!0,forced:!tu},{keyFor:function(t){if(!qf(t))throw new TypeError(Zf(t)+" is not a symbol");if(Yf(eu,t))return eu[t]}});var nu=li,ru=U,iu=A,ou=va,au=S([].push),cu=ei,su=K,lu=Ya,fu=f,uu=S,du=o,gu=U,vu=vt,hu=No,pu=function(t){if(ru(t))return t;if(nu(t)){for(var e=t.length,n=[],r=0;r/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(r,i,o){return _.isUndefined(i)&&(i="tmpl-customize-control-"+t.type),!_.isUndefined(o)&&_.isString(o)?n.variable=o:n.variable="data",_.template(e("#"+i).html(),null,n)(r)}})),drag_drop:function(){var t=this;e(".hfg--device-panel",t.container).each((function(){var n=e(this),r=n.data("device");t.panels[r]={},e(".hfg--cb-items",n).each((function(t){var n=e(this).attr("data-id")||"",i="_sid_"+r+t;n&&(i="_sid_"+r+"-"+n),e(this).attr("id",i)})),e(".grid-stack, .hfg--sidebar-items",n).each((function(){var n=e(this).attr("data-id")||"";t.panels[r][n]=e(this),e(this).droppable({out:function(t,e){},over:function(t,e){},drop:function(n,r){var i=e(this);t.gridster(i,r,n),t.save()}})}));var i=e("#_sid_mobile-sidebar",n),o=i.attr("id")||!1;e(".grid-stack-item",n).draggable({revert:"invalid",connectToSortable:!!o&&"#"+o,start:function(t,r){e("body").addClass("builder-item-moving"),e(".hfg--cb-items",n).css("z-index",""),r.helper.parent().css("z-index",9999)},stop:function(t,r){e("body").removeClass("builder-item-moving"),e(".hfg--cb-items",n).css("z-index",""),r.helper.parent().css("z-index","")}}),i.length>0&&(i.sortable({revert:!0,change:function(e,n){t.save()},receive:function(n,r){e(this).find(".grid-stack-item").removeAttr("style").attr("data-gs-width",1),t.save()}}),t.panels[r].sidebar=i)}))},sortGrid:function(t){e(".grid-stack-item",t).each((function(){var t=e(this),n=t.attr("data-gs-x")||0;n=parseInt(n);var r=t.next();if(r.length>0){var i=r.attr("data-gs-x")||0;n>(i=parseInt(i))&&t.insertAfter(r)}}))},getX:function(t){var e=t.attr("data-gs-x")||0;return parseInt(e)},getW:function(t,e){var n;return _.isUndefined(e)&&(e=!1),n=e?t.attr("data-df-width")||1:t.attr("data-gs-width")||1,parseInt(n)},gridGetItemInfo:function(t,e,n){var r,i=this,o=i.getX(t),a=i.getW(t),c=0,s=0,l=!1;for(r=o-1;r>=0&&!l;)0===e[r]?c++:l=!0,r--;for(l=!1,r=o+a;r=0;i--)if(0===r[i])n++;else if(e)return n;return n},f=function(t){return 0===r[t]},u=function(t,e){for(var n=t;n=0&&!i;)1!==r[e]&&0!==r[e]&&(o=e,i=!0),e--;else o=t;for(e=o+1,n=o;1===r[e];)n++,e++;return{x:o,w:n+1-o}},g=function(t){var e,n,i,a=-1;if(r[t]=0?o.x+o.w-1:t,c=e;e>i&&(c=i);for(var s=0,f=0,u=a;f<=c&&u>=0;)0===r[u]&&(f++,s=u),u--;var g=[],v=0;for(u=s;u<=a;u++)r[u]=0,0!==n[u]&&(g[v]=n[u],v++);for(v=0,u=s;u<=a;u++)void 0!==g[v]?r[u]=g[v]:r[u]=0,v++;return e-c},h=function(t,e){var n=r.slice(),i=s(t);if(0===i)return e;var a=d(t),c=a.x>=0?a.x:t,l=e;e>i&&(l=i);for(var f=t,u=0,g=c;u=c;g--)void 0!==v[h]?r[g]=v[h]:r[g]=0,h--;return e-l},p=function(){b.updateItemsPositions(r)},m=function(t,e){var n,i,c,m,w=t.x,y=t.w,x=function(){for(var t=0,e=0;e=y&&y-i<=c?w-(y-i):w-c)<0&&(n=0);m>=1;){if(u(n,m))return t.x=n,t.w=m,a(t),t.el.attr("data-gs-x",n),t.el.attr("data-gs-width",m),!0;m--}}if(1===r[w]){var S=d(w);if(S.x>=0&&w>S.x+Math.floor(S.w/2)&&w>S.x&&(n=S.x+S.w,(i=s(n,!0))>=y))return a({el:t.el,x:n,w:y}),t.el.attr("data-gs-x",n),t.el.attr("data-gs-width",y),!0}}console.log("--------------------------------------------------------");var C,O;!function(t,e){var n,i,o,a,c=0,p=!1;if(console.log("insert at x",e),console.log("insert node",t),f(e)){if(console.log("empty_at_X",e),n=d(e),i=g(e),n.x>-1){if(console.log("found_item_left",n),(c=s(n.x))>=t.w)if(u(e,t.w))console.log("found",t),w=e,p=!0;else if(t.ox>e)for(o=n.x+n.w,a=(a=l(o))<=t.w?t.w-a:t.w,h(o+1,a),c=s(o),console.log("loop_start_i",o);o>n.x+n.w&&!p;)u(o,t.w)&&(console.log("found_in_loop__i",o),w=o,p=!0),o--;if(!p&&t.oxt.w&&(a=t.w),a-=2,v(n.x,a),console.log("try_move_items_to_left_flag",r),console.log("el2",a),o-=c=s(o),i=g(e);var m=n.x+n.w;for(i.x>-1&&(m=i.x),console.log("loop_start 2_i",o);o-1){console.log("found_item_right",i),i=g(e),c=s(e,!1),console.log("move_all_item_to Right");var y=c>=t.w?t.w:c;for(h(e,y),o=i.x,console.log("loop_start Right",o);o>=0&&!p;)u(o,t.w)&&(w=o,t.x=w,p=!0,console.log("found_in_while_r",o)),o--;p||(w=e,t.w=c,t.x=w,console.log("resize_r_new_w",c),console.log("resize_r_new_x",w))}}else if(console.log("x is not empty"),n=d(e),t.ox=0;)e--;w=e}w>b.cols&&(w=b.cols-1),t.x=w,console.log("new node x",w)}(t,_.clone(w));var I=0;for(w+y>b.cols-1&&(I=l(w,!0),console.log("le",I),I>0&&console.log("move_Left",w+y-b.cols-1)),p();y>=1;){if(x>=y){if(u(w,y))return console.log("",{x:w,w:y}),t.w=y,a(t),t.el.attr("data-gs-x",w),t.el.attr("data-gs-width",y),!0;for(I=l(w,!0),C=w-I,console.log("newX",C),O=C;O=1;){for(O=0;Ob.cols&&(D=b.cols),x=T,E=T,i){if(!f(E))for(;ED&&(x=D)}if(R||(x=I?T:D),x<0&&(x=0),x+S>=b.cols){for(R=!0,E=x;E+S>b.cols&&R;)f(E)?E--:(E++,R=!1);x=E}var F={el:e.draggable,x:x,w:S,ox:j,ow:C};F.x<=0&&(F.x=0);var z=!1;I?(F.x=parseInt(e.draggable.attr("data-gs-x")||0),F.w=parseInt(e.draggable.attr("data-gs-width")||1),function(t,e){var n=t.w;c(t);var r=d(e),i=0;if(r.x>-1&&(i=r.x+r.w),u(e,n))return a({el:t.el,x:e,w:n}),!0;if(i>0&&u(i,n)&&e>=i){var o=g(e);if(o.x>-1&&t.w+e>=o.x)for(var s=_.clone(e);s>i;){if(u(s,n))return a({el:t.el,x:s,w:n}),!0;s--}if(e+n>b.cols){var l=b.cols-n;if(u(l,n))return a({el:t.el,x:l,w:n}),!0}return a({el:t.el,x:i,w:n}),!0}t.x=e,m(t,!0)}(F,x),z=!0):z=m(F),z?(e.draggable.removeClass("item-from-list"),t.append(e.draggable),e.draggable.removeAttr("style"),console.log("DID Flag: ",r),b.draggingItem=null):(e.draggable.removeAttr("style"),console.log("Can not insert"),r=w),p(),b.updateAllGrids()},updateAllGrids:function(){var t=this;_.each(t.panels[t.activePanel],(function(e,n){t.updateGridFlag(e)}))},setGridWidth:function(t,e){var n,r,o=this,a=e.element,c=t.width(),s=e.size.width,l=e.originalSize.width,f=Math.ceil(c/o.cols)-1;i?(n=e.originalPosition.left>e.position.left,r=l!==s):(n=e.originalPosition.left>e.position.left,r=e.originalPosition.leftb.after&&(u=b.after),g=v+u,a.attr("data-gs-x",h).removeAttr("style"),a.attr("data-gs-width",g).removeAttr("style")):((u=h-(d=Math.floor((e.position.left-1)/f)))>b.before&&(u=b.before),d=h-u,g=v+u,a.attr("data-gs-x",d).removeAttr("style"),a.attr("data-gs-width",g).removeAttr("style")),void o.updateGridFlag(t);if(r)return i?(e.originalPosition.left!==e.position.left?(d=Math.floor((e.position.left-1)/f),(u=v+h-(d=o.cols-d))>v&&(u=0),g=v-u,(d=h)<=0&&(d=0),console.log("diffRight_RTL_COL_New __left")):(d=Math.ceil((e.position.left+e.size.width-11)/f),(u=h-(d=o.cols-d))>b.before&&(u=b.before),d=h-u,g=v+u),a.attr("data-gs-x",d).removeAttr("style"),a.attr("data-gs-width",g).removeAttr("style")):((g=v-(u=(d=Math.round((e.position.left-1)/f))-h))<=0&&(g=1,u=0),d=h+u,a.attr("data-gs-x",d).removeAttr("style"),a.attr("data-gs-width",g).removeAttr("style")),void o.updateGridFlag(t);var w,y=b.x;w=Math.ceil((e.position.left+e.size.width-11)/f),p=b.w+(w-(y+b.w)),b.x+p>b.x+b.w+b.after&&(p=b.w+b.after),s'+n({device:t,id:o.id,rows:o.rows},r)+" "},addDevicePanels:function(){var t=this;_.each(t.devices,(function(n,r){var i=t.addPanel(r);e(".hfg--cb-devices-switcher",t.container).append('