https://t.me/ARX49
Server : LiteSpeed
System : Linux server321.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : apotdzgr ( 7060)
PHP Version : 8.0.30
Disable Function : NONE
Directory :  /home/apotdzgr/public_html/wp-content/themes/flatsome/assets/js/builder/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/apotdzgr/public_html/wp-content/themes/flatsome/assets/js/builder/core/editor.js
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=70)}([function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function o(t,e,n,o,i){t.digestTtl(20),n.debugEnabled("dev"===window.location.hostname.split(".").pop()),i.debugInfoEnabled(!1),e.defaults.headers.common["X-Requested-With"]="XMLHttpRequest",o.decorator("$rootScope",["$delegate",function(t){return Object.defineProperty(t.constructor.prototype,"_",{value:_,enumerable:!1}),t}])}n.d(e,"b",(function(){return l})),o.$inject=["$rootScopeProvider","$httpProvider","$logProvider","$provide","$compileProvider"];var i=n(14);function r(t,e,n,o){t.on("keydown",(function(t){var i=t.metaKey||t.ctrlKey,r=90===t.keyCode,s=27===t.keyCode,g=t.shiftKey;s&&n.stack?(t.preventDefault(),n.stack.close(),e.apply()):i&&r&&(g?o.redo():o.undo(),e.apply(),t.preventDefault())}))}r.$inject=["$document","app","store","history"];var s=n(0),g=n.n(s),a=n(2),c=n.n(a),A=n(3),l=new(function(){function t(){g()(this,t)}return c()(t,[{key:"controller",value:function(t,e){A.b.shortcodes.hasOwnProperty(t)&&(A.b.shortcodes[t].controller=e)}},{key:"on",value:function(t,e){A.b.$$events[t]=A.b.$$events[t]||[],A.b.$$events[t].push(e)}},{key:"addfilter",value:function(t,e){A.b.$$filters[t]=A.b.$$filters[t]||[],A.b.$$filters[t].push(e)}},{key:"addAction",value:function(t){A.b.actions.push(t)}}]),t}()),C=angular.module("uxBuilder",[]);e.a=C;C.config(o),C.run(i.a),C.run(r),C.factory("presetCache",["$cacheFactory",function(t){return t()}])},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}t.exports=function(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i})),i.$inject=["$parse"];var o=(window.parent||window).uxBuilderData;function i(t){return o.$set=function(e,n){return t(r(e)).assign(o,n)},o.$get=function(e,n){var i=t(r(e))(o);return!angular.isDefined(i)&&n?o.$set(e,n):i},o.$unset=function(e){var n;return e.indexOf("*")?(n=e.split("*")[0],t(r(n)).assign(o,null)):t(r(e)).assign(o,null)},o.$disable=function(){o.enabled=!1},o.$enable=function(){o.enabled=!0},o.$addAction=function(t,e){if(o.enabled){o.history.splice(0,o.history.length-49),o.currentAction<o.history.length-1&&o.history.splice(o.currentAction+1,o.history.length);var n=o.history.slice().pop();n&&n.payload.key===e.key?!1!==e.override&&(n.payload=e):o.currentAction=o.history.push({type:t,payload:e})-1}},o.$resetToAction=function(t){o.history.splice(t+1,o.history.length),o.currentAction=Math.min(t,o.currentAction)},o}function r(t){var e=[],n=t.split(".");return _.each(n,(function(t){e.push(jQuery.camelCase(t.replace(/:/g,"-")))})),e.join(".")}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},,function(t,e){t.exports=window.jQuery},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return s}));var o=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1};function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document,a=r(g).top,c=t-a,A=a+c*i,l=t-A,C=0,I=20,u=function t(){s(A+l*o((C+=I)/e),g),C<e?window.requestAnimationFrame(t):n&&"function"==typeof n&&n()};u()}function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=t.documentElement,n=(t.defaultView.pageYOffset||e.scrollTop)-(e.clientTop||0),o=(t.defaultView.pageXOffset||e.scrollLeft)-(e.clientLeft||0);return{top:n,left:o}}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;e.documentElement.scrollTop=t,e.body.parentNode.scrollTop=t,e.body.scrollTop=t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n(0),n(2);var o=(window.frameElement?window.parent:window).uxBuilderData},function(t,e,n){t.exports=n(63)},function(t,e,n){"use strict";n.r(e),e.default='<div class="uxb-move">\n  <div class="uxb-move-handle"\n    ng-if="$ctrl.shortcode"\n    ng-class="$ctrl.classNames($ctrl.shortcode)"\n    draggable-shortcode="$ctrl.shortcode">\n    <span class="uxb-move-icon dashicons dashicons-move"></span>\n  </div>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="uxb-resize uxb-resize-top"></div>\n<div class="uxb-resize uxb-resize-right"></div>\n<div class="uxb-resize uxb-resize-bottom"></div>\n<div class="uxb-resize uxb-resize-left"></div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="context-menu-menu" ng-click="$ctrl.hide()">\n  <shortcode-actions shortcode="$ctrl.shortcode"></shortcode-actions>\n</div>\n'},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return i})),i.$inject=["$rootScope","$window","AppEvent"];var o=null;function i(t,e,n){var o=!0;t.$watch((function(){o&&e.postCustomMessage(n.APPLY)})),e.addEventListener(n.APPLY,(function(){o=!1,null===t.$$phase&&t.$apply(),o=!0}),!1),e.addEventListener(n.BROADCAST,(function(e){t.$broadcast(e.data.type,e.data.data)}),!1),e.addEventListener(n.EMIT,(function(e){t.$emit(e.data.type,e.data.data)}),!1)}t.postCustomMessage=function(t,e,n){o=o||(self===top?document.querySelectorAll(".iframe-frame")[0].contentWindow:window.parent),(n=new CustomEvent(t)).data=e,o.dispatchEvent(n)}}).call(this,n(4))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return r}));var o=n(0),i=n.n(o),r=function e(n,o,r,s,g,a,c,A,l,C){i()(this,e);var I={},u=(window.parent||window).angular.element("draggable-helper");return function(e,i,d){var p=this;d=angular.extend({cssProps:{},droppable:!0,broadcast:!0,start:angular.noop,move:angular.noop,end:angular.noop},d);var h=i||e.$element.get(0),f=new t.HammerJS(h,d);return f.get("pan").set({direction:t.HammerJS.DIRECTION_ALL,threshold:1}),angular.element(h).data("shortcode",e),angular.element(h).addClass("uxb-draggable"),f.on("hammer.input",(function(t){t.srcEvent.stopPropagation(),t.srcEvent.stopImmediatePropagation()})),f.on("panstart",m),f.on("pan",(function(t){I.shortcode||m(t);y(t),I.defaultPrevented||(u.addClass("active"),u.css({transform:"translate3d(".concat(I.global.x,"px, ").concat(I.global.y,"px, 0px)")}),u.find("h3 span").css({transform:"rotate(".concat(-25*I.originalEvent.velocityY,"deg)")}));if(I.target=null,I.addToShortcode=null,e.$recompile)return f.stop(!0),v(t);if(r.find(I.global.x,I.global.y).map((function(t){!I.target&&t.target&&t.target.allows(e)&&(I.target=t)})),I.target){var o=I.target.target===e.parent,i=o&&I.target.index===e.index,s=o&&I.target.index===e.index+1,g=t.srcEvent.altKey;!i&&!s||g||(I.target=null)}d.move(t),n("tools").showAddableSpot(I.target,t.srcEvent.altKey),n.outlineShortcode(I.target?I.target.target.parent:null),n.broadcast(C.PAN_MOVE,I),d.broadcast&&n.broadcast(C.MOVE,I);n("tools").apply(),e.$scope.$digest()})),f.on("panend",v),f;function m(t){u.find("h3 span").text(e.data.name),g.onkeydown=function(t){return n("tools").toggleAddableButton(t.altKey)},g.onkeyup=function(t){return n("tools").toggleAddableButton(t.altKey)},I.shortcode=e,I.iframeRect=A().get(0).getBoundingClientRect(),I.container=e.parent.$element,I.isSelected=n.states.selectedShortcode===e,I.defaultPrevented=!1,I.showHelper=!0,I.constrains=!1,I.initial={},y(t),I.initial={},I.initial.innerX=I.innerX,I.initial.innerY=I.innerY,I.initial.elementX=I.elementX,I.initial.elementY=I.elementY,e.$element.addClass("uxb-shortcode-dragging"),angular.element(a.parent.document.body).addClass("dragging"),angular.element("body").addClass("dragging"),d.start(t),e.states.dragging=!0,o.isDragging=!0,n.broadcast(C.PAN_START,I),d.broadcast&&n.broadcast(C.START,I),n("tools").apply(),e.$scope.$digest()}function v(t){if(y(t),u.find("h3 span").removeAttr("style"),u.removeClass("active"),e.states.dragging=!1,I.target&&!I.defaultPrevented){var i=t.srcEvent.altKey,r=I.target.target,A=I.target.index;I.addedShortode=i?r.addChild(e.copy(),A):s.move(e,r,A)}e.$element.removeClass("uxb-shortcode-dragging"),angular.element(a.parent.document.body).removeClass("dragging"),angular.element("body").removeClass("dragging"),d.end(t),n.broadcast(C.PAN_END,I),d.broadcast&&n.broadcast(C.END,I),g.onkeydown=null,g.onkeyup=null,I={},c((function(){return o.isDragging=!1}),0)}function y(t){I.originalEvent=t,I.global=l.getGlobalCoordinates(t.target.ownerDocument.defaultView,t.center.x,t.center.y),I.element=angular.element(h),I.draggable=p,I.main={},I.main.x=I.global.x,I.main.y=I.global.y,I.iframe={},I.iframe.x=I.global.x-I.iframeRect.left,I.iframe.y=I.global.y-I.iframeRect.top,I.virtual={},I.virtual.width=I.shortcode.$element.width(),I.virtual.height=I.shortcode.$element.height(),I.virtual.top=I.iframe.y-I.initial.elementY,I.virtual.right=I.iframe.x+I.virtual.width-I.initial.elementX,I.virtual.bottom=I.iframe.y+I.virtual.height-I.initial.elementY,I.virtual.left=I.iframe.x-I.initial.elementX,I.constrains&&function(){I.constrains=I.container.outerOffset(),I.innerX=I.iframe.x-I.constrains.left-I.initial.elementX,I.innerY=I.iframe.y-I.constrains.top-I.initial.elementY,I.virtual.top<I.constrains.top&&(I.innerY=0);I.virtual.right>I.constrains.right&&(I.innerX=I.constrains.width-I.virtual.width);I.virtual.bottom>I.constrains.bottom&&(I.innerY=I.constrains.height-I.virtual.height);I.virtual.left<I.constrains.left&&(I.innerX=0)}(),I.elementX=I.iframe.x-e.$element.offset().left,I.elementY=I.iframe.y-e.$element.offset().top+A().contents().scrollTop(),I.preventDefault=function(){I.defaultPrevented=!0},I.setContainment=function(t){I.constrains=t.outerOffset(),I.container=t}}}};r.$inject=["app","store","targets","Shortcode","$document","$window","$timeout","$iframe","utils","DragEvent"]}).call(this,n(4))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return r}));var o=n(0),i=n.n(o),r=function e(){return i()(this,e),function(e,n,o){return o?t.propagatingHammer(new t.HammerJS(e,n)):new t.HammerJS(e,n)}}}).call(this,n(4))},function(t,e,n){"use strict";(function(e){var o=n(38),i=n(39),r=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,s=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\S\s]*)/i,g=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function a(t){return(t||"").toString().replace(g,"")}var c=[["#","hash"],["?","query"],function(t){return t.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],A={hash:1,query:1};function l(t){var n,o=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},i={},s=typeof(t=t||o);if("blob:"===t.protocol)i=new I(unescape(t.pathname),{});else if("string"===s)for(n in i=new I(t,{}),A)delete i[n];else if("object"===s){for(n in t)n in A||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=r.test(t.href))}return i}function C(t){t=a(t);var e=s.exec(t);return{protocol:e[1]?e[1].toLowerCase():"",slashes:!!e[2],rest:e[3]}}function I(t,e,n){if(t=a(t),!(this instanceof I))return new I(t,e,n);var r,s,g,A,u,d,p=c.slice(),h=typeof e,f=this,m=0;for("object"!==h&&"string"!==h&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),e=l(e),r=!(s=C(t||"")).protocol&&!s.slashes,f.slashes=s.slashes||r&&e.slashes,f.protocol=s.protocol||e.protocol||"",t=s.rest,s.slashes||(p[3]=[/(.*)/,"pathname"]);m<p.length;m++)"function"!=typeof(A=p[m])?(g=A[0],d=A[1],g!=g?f[d]=t:"string"==typeof g?~(u=t.indexOf(g))&&("number"==typeof A[2]?(f[d]=t.slice(0,u),t=t.slice(u+A[2])):(f[d]=t.slice(u),t=t.slice(0,u))):(u=g.exec(t))&&(f[d]=u[1],t=t.slice(0,u.index)),f[d]=f[d]||r&&A[3]&&e[d]||"",A[4]&&(f[d]=f[d].toLowerCase())):t=A(t);n&&(f.query=n(f.query)),r&&e.slashes&&"/"!==f.pathname.charAt(0)&&(""!==f.pathname||""!==e.pathname)&&(f.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),o=n.length,i=n[o-1],r=!1,s=0;o--;)"."===n[o]?n.splice(o,1):".."===n[o]?(n.splice(o,1),s++):s&&(0===o&&(r=!0),n.splice(o,1),s--);return r&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(f.pathname,e.pathname)),o(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(A=f.auth.split(":"),f.username=A[0]||"",f.password=A[1]||""),f.origin=f.protocol&&f.host&&"file:"!==f.protocol?f.protocol+"//"+f.host:"null",f.href=f.toString()}I.prototype={set:function(t,e,n){var r=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),r[t]=e;break;case"port":r[t]=e,o(e,r.protocol)?e&&(r.host=r.hostname+":"+e):(r.host=r.hostname,r[t]="");break;case"hostname":r[t]=e,r.port&&(e+=":"+r.port),r.host=e;break;case"host":r[t]=e,/:\d+$/.test(e)?(e=e.split(":"),r.port=e.pop(),r.hostname=e.join(":")):(r.hostname=e,r.port="");break;case"protocol":r.protocol=e.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(e){var s="pathname"===t?"/":"#";r[t]=e.charAt(0)!==s?s+e:e}else r[t]=e;break;default:r[t]=e}for(var g=0;g<c.length;g++){var a=c[g];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.origin=r.protocol&&r.host&&"file:"!==r.protocol?r.protocol+"//"+r.host:"null",r.href=r.toString(),r},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var r=o+(n.slashes?"//":"");return n.username&&(r+=n.username,n.password&&(r+=":"+n.password),r+="@"),r+=n.host+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(r+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(r+=n.hash),r}},I.extractProtocol=C,I.location=l,I.trimLeft=a,I.qs=i,t.exports=I}).call(this,n(4))},function(t,e,n){var o=n(40);t.exports=function(t,e){if(null==t)return{};var n,i,r=o(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)n=s[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}},function(t,e){function n(t,e,n,o,i,r,s){try{var g=t[r](s),a=g.value}catch(t){return void n(t)}g.done?e(a):Promise.resolve(a).then(o,i)}t.exports=function(t){return function(){var e=this,o=arguments;return new Promise((function(i,r){var s=t.apply(e,o);function g(t){n(s,i,r,g,a,"next",t)}function a(t){n(s,i,r,g,a,"throw",t)}g(void 0)}))}}},function(t,e,n){"use strict";n.r(e),e.default='<p ng-if="$ctrl.errorMessage" class="error error-message">\n  {{ $ctrl.errorMessage }}\n</p>\n\n<div class="add-shortcode-selector">\n  <div class="add-shortcode-header">\n    <h2 class="title">Add Content</h2>\n    <nav class="add-shortcode-types">\n      <button type="button"\n        ng-click="$ctrl.showType(\'shortcodes\')"\n        ng-class="{ active: $ctrl.type === \'shortcodes\' }">\n        Elements\n      </button>\n      <button type="button"\n        ng-if="$ctrl.shortcode.isRoot"\n        ng-click="$ctrl.showType(\'import\')"\n        ng-class="{ active: $ctrl.type === \'import\' }">\n        Import\n      </button>\n    </nav>\n  </div>\n\n  <div class="add-shortcode-items" ng-if="$ctrl.type === \'shortcodes\'">\n\n    <div class="flatsome-studio-button" ng-if="$ctrl.flatsomeStudioIsActive">\n      <button type="button" class="wp-style alt button-large button-block"\n        ng-click="$ctrl.showFlatsomeStudio()">\n        <span class="dashicons dashicons-screenoptions"></span> Flatsome Studio\n      </button>\n      <hr />\n    </div>\n\n    <input class="filter-elements" type="text" placeholder="Search&hellip;" ng-model="$ctrl.filter.name">\n\n    <div class="add-shortcode-category"\n      ng-repeat="category in $ctrl.items"\n      ng-show="items.length">\n      <h3>{{:: category.name }}</h3>\n      <ul>\n        <li class="add-shortcode-box" ng-repeat="item in items = (category.items | filter: $ctrl.filter)">\n          <button class="add-shortcode-box-button" type="button" ng-class="{ \'is-loading\': $ctrl.isLoading === item.tag }" ng-click="$ctrl.add(item, 0)">\n            <img ng-if="item.thumbnail" ng-src="{{:: item.thumbnail }}" alt="{{:: item.name }}"/>\n            <div ng-if="$ctrl.isLoading === item.tag" class="add-shortcode-loading-spinner loading-spinner is-visible"></div>\n            <span class="title">{{:: item.name }}</span>\n          </button>\n        </li>\n      </ul>\n    </div>\n  </div>\n</div>\n\n<template-importer ng-if="$ctrl.type === \'import\'"></template-importer>\n\n<div class="add-shortcode-presets">\n  <h3>Presets</h3>\n  <ul ng-if="$ctrl.presets">\n    <li class="add-shortcode-box" ng-repeat="preset in $ctrl.presets">\n      <button type="button" class="add-shortcode-box-button"\n        title="{{:: preset.name }}"\n        ng-class="{ \'with-thumbnail\' : !!preset.thumbnail, \'active\' : $ctrl.currentPreset === $index }"\n        ng-click="$ctrl.usePreset(preset.content); $ctrl.currentPreset = $index">\n        <div ng-if="preset.custom" class="add-shortcode-icon">\n          <svg width="36" height="36" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.73009 2.41274L8.95709 3.63719L3.40181 9.18095L2.17482 7.95652L7.73009 2.41274ZM7.73009 0.242432L0 7.95652L3.40181 11.3513L11.1319 3.63719L7.73009 0.242432Z" fill="#007CBA"/> <path d="M7.8196 11.3114L8.95987 12.4493L7.8196 13.5873L6.67928 12.4493L7.8196 11.3114ZM7.8196 9.14111L4.50439 12.4492L7.8196 15.7575L11.1348 12.4492L7.8196 9.14087V9.14111Z" fill="#007CBA"/> <path d="M12.2322 6.90786L13.3725 8.0458L12.2322 9.18369L11.0921 8.04584L12.2323 6.90795L12.2322 6.90786ZM12.2323 4.73763L8.91699 8.04584L12.2322 11.3542L15.5474 8.04584L12.2322 4.73755L12.2323 4.73763Z" fill="#007CBA" fill-opacity="0.6"/> </svg>\n        </div>\n        <img ng-if="!preset.custom && preset.thumbnail" ng-src="{{:: preset.thumbnail }}" alt="{{:: preset.name }}">\n        <span class="title">{{:: preset.name }}</span>\n      </button>\n      <div ng-if="preset.custom === true" class="add-shortcode-actions">\n        <button class="blank" ng-click="$ctrl.templates.updatePreset(preset)">\n          <span class="dashicons dashicons-edit"></span>\n        </button>\n        <button class="blank" ng-click="$ctrl.removePreset(preset)">\n          <span class="dashicons dashicons-trash"></span>\n        </button>\n      </div>\n    </li>\n  </ul>\n  <button\n    type="button"\n    class="wp-style alt button-large button-block"\n    ng-click="$ctrl.stack.close()"\n    ng-if="$ctrl.presets">\n    Apply\n  </button>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<button\n  title="Undo"\n  type="button"\n  class="blank has-tooltip"\n  ng-click="$ctrl.undo()"\n  ng-disabled="$ctrl.canUndo() === false">\n  <span class="dashicons dashicons-undo"></span>\n  <div class="uxb-tooltip">Undo</div>\n</button>\n\n<button\n  title="Redo"\n  type="button"\n  class="blank has-tooltip"\n  ng-click="$ctrl.redo()"\n  ng-disabled="$ctrl.canRedo() === false">\n  <span class="dashicons dashicons-redo"></span>\n  <div class="uxb-tooltip">Redo</div>\n</button>\n\n<hr/>\n\n<button type="button"\n    class="blank has-tooltip"\n    title="{{:: breakpoint.title }}"\n    ng-click="$ctrl.setBreakpoint($index)"\n    ng-class="{ \'active\' : $ctrl.isActiveBreakpont($index) }"\n    ng-repeat="(name, breakpoint) in $ctrl.breakpoints.all track by breakpoint.width">\n    <span class="{{:: breakpoint.icon }}"></span>\n    <div class="uxb-tooltip">{{:: breakpoint.title }}</div>\n    <div class="has-breakpoint-values" ng-if="$ctrl.hasBreakpointValues($index)"></div>\n</button>\n\n<hr/>\n\n<button type="button"\n    class="blank has-tooltip"\n    title="{{:: action.tooltip }}"\n    ng-click="$ctrl.doAction(action)"\n    ng-repeat="action in $ctrl.actions">\n    <span class="{{:: action.icon }}"></span>\n    <div class="uxb-tooltip">{{:: action.tooltip }}</div>\n</button>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-main class="animate-{{ $ctrl.routeAnimation }}">\n\n  <div class="title-row sidebar-top">\n  \t<div class="title-row-icon">\n\t  \t<button type="button"\n        title="Exit Builder"\n        class="blank" ng-click="$ctrl.app.exit()"\n        ng-disabled="$ctrl.permissions.exit === false">\n\t   \t \t<span class="dashicons dashicons-no-alt"></span>\n\t\t  </button>\n  \t</div>\n  \t<div class="title-row-title">\n      {{ $ctrl.store.post.attributes.values.post_title }}\n    </div>\n  \t<div class="title-row-actions">\n  \t\t<button type="button" class="blank" ng-click="$ctrl.app.goto(\'/settings\')">\n\t      <span class="dashicons dashicons-admin-generic"></span>\n\t    </button>\n  \t</div>\n  </div>\x3c!-- Sidbar top --\x3e\n\n  <div ui-view></div>\n\n  <div class="app-sidebar-footer">\n    <button type="button" class="blank app-sidebar-toggle" ng-click="$ctrl.toggle()">\n      <span class="dashicons dashicons-arrow-left-alt2"\n        ng-if="$ctrl.store.showSidebar === true"\n      ></span>\n      <span class="dashicons dashicons-arrow-right-alt2"\n        ng-if="$ctrl.store.showSidebar === false"\n      ></span>\n    </button>\n  </div> \n\n</app-sidebar-main>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-outline-tool class="auto-size" shortcode="$ctrl.outlined"></app-outline-tool>\n<app-resize-tool class="auto-size" shortcode="$ctrl.outlined"></app-resize-tool>\n<app-move-tool class="auto-size" shortcode="$ctrl.outlined"></app-move-tool>\n<app-select-tool class="auto-size" shortcode="$ctrl.selected"></app-select-tool>\n<add-buttons></add-buttons>\n\n<div class="tools-addable">\n  <div class="line"></div>\n  <add-button\n    class="button"\n    index="$ctrl.index"\n    shortcode="$ctrl.addable">\n  </add-button>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="hierarchy-title" ng-class="{ \'active\' : $ctrl.isActive(), [\'open\'] : $ctrl.shortcode.states.open, [\'visibility-\'+$ctrl.shortcode.options.visibility] : $ctrl.shortcode.options.visibility }">\n\n    <button type="button" class="hierarchy-toggle"\n        ng-if="$ctrl.shortcode.children"\n        ng-click="$ctrl.toggleChildren()">\n    </button>\n\n    <div class="hierarchy-name"\n        ng-click="$ctrl.selectShortcode()"\n        ng-mouseover="$ctrl.outlineShortcode()"\n        ng-dblclick="$ctrl.configureShortcode()">\n\n        {{:: $ctrl.shortcode.data.name }}\n\n        <span class="hierarchy-info" ng-bind="$ctrl.getShortcodeInfo()"></span>\n    </div>\n\n    <div class="hierarchy-tools">\n      <button type="button blank" ng-click="$ctrl.showContextMenu($event)">\n        <span class="dashicons dashicons-admin-generic"></span>\n      </button>\n    </div>\n</div>\n\n<shortcode-hierarchy-list\n  ng-if="$ctrl.shortcode.states.open"\n  ng-class="{ \'open\': $ctrl.shortcode.states.open }"\n  shortcode="$ctrl.shortcode">\n</shortcode-hierarchy-list>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-view class="home-view">\n\n  <view-header>\n\n  </view-header>\n\n  <view-body>\n    <shortcode-hierarchy-list shortcode="$ctrl.store.postContent"></shortcode-hierarchy-list>\n  </view-body>\n\n  <view-footer>\n    <button id="app-draft-button" type="button"\n      class="wp-style button-large button-block"\n      ng-if="$ctrl.store.post.status === \'draft\' || $ctrl.store.post.status === \'auto-draft\'"\n      ng-class="{ \'loading\': $ctrl.store.isSaving === \'draft\' }"\n      ng-disabled="$ctrl.permissions.save === false"\n      ng-click="$ctrl.save(\'draft\')">\n      Save Draft\n    </button>\n    <button id="app-private-button" type="button"\n      class="wp-style button-large button-block"\n      ng-if="$ctrl.store.post.status === \'private\'"\n      ng-class="{ \'loading\': $ctrl.store.isSaving === \'private\' }"\n      ng-disabled="$ctrl.permissions.save === false"\n      ng-click="$ctrl.save(\'private\')">\n      Save Private\n    </button>\n    <button id="app-save-button" type="button"\n      class="wp-style alt button-large button-block"\n      ng-class="{ \'loading\': $ctrl.store.isSaving && $ctrl.store.isSaving !== \'draft\' && $ctrl.store.isSaving !== \'private\'}"\n      ng-disabled="$ctrl.permissions.save === false"\n      ng-click="$ctrl.save()">\n      {{ $ctrl.saveButtonText }}\n    </button>\n    <button id="app-save-button" type="button"\n      class="wp-style button-large button-block button-exit animate-fade-in-right"\n      ng-if="$ctrl.store.isSaved"\n      ng-click="$ctrl.app.exit()">\n      &times;\n    </button>\n  </view-footer>\n\n</app-sidebar-view>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-view class="settings-view">\n\n  <view-header>\n    <div class="title-row">\n      <div class="title-row-icon">\n          <button class="button-reset view-header-title" type="button" ng-click="$ctrl.   exit()">\n               <span class="dashicons dashicons-arrow-left-alt2"></span>\n          </button>\n      </div>\n      <div class="title-row-title"> Post settings </div>\n    </div>\n  </view-header>\n\n  <view-body>\n    <ux-options\n      options="$ctrl.post.attributes.options.tree"\n      model="$ctrl.post.attributes.values">\n    </ux-options>\n    <ux-options\n      options="$ctrl.post.meta.options.tree"\n      model="$ctrl.post.meta.values">\n    </ux-options>\n    <div class="box">\n      <h3 class="box-title">Actions</h3>\n      <div class="box-content">\n        <button class="wp-style button-block" ng-click="$ctrl.saveAsTemplate()">Save as template&hellip;</button>\n        <div style="padding: 5px 0;" />\n        <button class="wp-style danger button-block" ng-click="$ctrl.clearContent()">Clear content&hellip;</button>\n      </div>\n    </div>\n  </view-body>\n\n  <view-footer>\n    <button type="button" class="wp-style blank" ng-click="$ctrl.discard()">\n      <span class="dashicons dashicons-no-alt"></span>Discard\n    </button>\n    <button type="button" class="wp-style" ng-click="$ctrl.exit()">\n      <span class="dashicons dashicons-yes"></span>Apply\n    </button>\n  </view-footer>\n\n</app-sidebar-view>\n'},function(t,e,n){"use strict";n.r(e),e.default='<app-sidebar-view class="shortcode-view">\n\n  <view-header>\n    <div class="title-row">\n      <div class="title-row-icon">\n         <button class="button-reset view-header-title" type="button" ng-click="$ctrl.exit(\'/\')">\n             <span class="dashicons dashicons-arrow-left-alt2"></span>\n         </button>\n      </div>\n      <div class="title-row-title"> {{ $ctrl.shortcode.data.name }} </div>\n      <div class="title-row-actions"></div>\n    </div>\n  </view-header>\n\n  <view-body>\n    <ux-options\n      options="$ctrl.options"\n      shortcode="$ctrl.shortcode"\n      responsive="$ctrl.responsiveValues"\n      model="$ctrl.shortcode.options">\n    </ux-options>\n  </view-body>\n\n  <view-footer>\n    <button type="button" class="wp-style outline" ng-click="$ctrl.discard()">\n      Discard\n    </button>\n    <button type="button" class="wp-style" ng-click="$ctrl.exit()">\n      Apply\n    </button>\n  </view-footer>\n\n</app-sidebar-view>\n'},function(t,e,n){"use strict";n(29),n(30)},function(t,e,n){(function(t){t.UX_EMPTY_VALUE="<none>"}).call(this,n(4))},function(t,e,n){(function(t){!function(){"use strict";t.isIframe=function(){return!!window.frameElement},t.camelCase=function(t,e){return t=e?t.charAt(0).toUpperCase()+t.slice(1):t,jQuery.camelCase(t.replace(/\_|\:/g,"-",!0))},t.snakeCase=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return t.replace(/[A-Z]/g,(function(t,n){return(n?e:"")+t.toLowerCase()}))},t.capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},t.round=function(t,e){return Math.round(t/e)*e}}()}).call(this,n(4))},function(t,e,n){"use strict";var o=n(1);o.a.constant("Event",{READY:"ready",CHANGE:"change",COMPLETE:"complete",ERROR:"error",SCROLL:"scroll",RESIZE:"resize"}),o.a.constant("AppEvent",{READY:"app-ready",APPLY:"app-apply",EMIT:"app-emit",BROADCAST:"app-broadcast"}),o.a.constant("IframeEvent",{READY:"iframe-ready",RELOAD:"iframe-reload",RESIZE:"iframe-resize",CHANGED:"iframe-changed",SCROLL:"iframe-scroll"}),o.a.constant("MouseEvent",{}),o.a.constant("TouchEvent",{}),o.a.constant("ShortcodeEvent",{CREATE:"shortcode-create",CREATED:"shortcode-created",ATTACHED:"shortcode-attached",CONFIGURE:"shortcode-configure",RECOMPILED:"shortcode-recompiled",ACTIVE:"shortcode-active",INACTIVE:"shortcode-inactive",CHANGED:"shortcode-changed",ADDED:"shortcode-added",MOVED:"shortcode-moved",DETACHED:"shortcode-detached",REMOVED:"shortcode-removed",MOUSEOVER:"shortocde-mouseover",MOUSEOUT:"shortocde-mouseout",CLICK:"shortcode-click",OUTLINED:"shortcode-outlined",SELECTED:"shortcode-selected",DUPLICATED:"shortcode-duplicated",DELETED:"shortcode-deleted"}),o.a.constant("ChildEvent",{ADDED:"child-added",REMOVED:"child-removed"}),o.a.constant("OptionsEvent",{SHOW:"options-show",CLEAR:"options-clear",HIDE:"options-hide"}),o.a.constant("MediaEvent",{CHANGED:"media-changed"}),o.a.constant("DragEvent",{PAN_START:"draggable-pan-start",PAN_MOVE:"draggable-pan-move",PAN_END:"draggable-pan-end",START:"draggable-start",MOVE:"draggable-move",END:"draggable-end"})},function(t,e,n){"use strict";n(33),n(34),n(35),n(36),n(37)},function(t,e,n){(function(t){t.jQuery.fn.cover=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return this;var o=t.jQuery(e),i=o.get(0).ownerDocument,r=i.defaultView,s=o.outerOffset(n),g=!!this.get(0).ownerDocument.defaultView.frameElement,a=!!o.get(0).ownerDocument.defaultView.frameElement;if(!g&&a){var c=r.frameElement.getBoundingClientRect();s.left+=c.left,s.top+=c.top}return g&&a&&(s.top+=i.documentElement.scrollTop||i.body.scrollTop),this.css({width:s.width.toFixed(2),height:s.height.toFixed(2),transform:"translateX(".concat(s.left.toFixed(),"px) translateY(").concat(s.top.toFixed(),"px)")})}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.isVisible=function(){return function(t){var e=!0;return t.map((function(t){var n=window.getComputedStyle(t);"none"===n.display&&(e=!1),"hidden"===n.visibility&&(e=!1),"0.0"===n.opacity&&(e=!1)})),e}([this.get(0)])}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.outerOffset=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={width:0,height:0};return this.each((function(o,i){var r=t.jQuery(i),s=i.getBoundingClientRect(),g=s.right-(n.left?n.left:s.left),a=s.bottom-(n.top?n.top:s.top),c=r.css("display").search("inline")>-1;e.includeMargins&&(c?g=r.outerWidth(!0):a=r.outerHeight(!0)),n.top=(s.top>n.top?n.top:s.top)+0,n.left=(s.left>n.left?n.left:s.left)+0,n.width=g>n.width?g:n.width,n.height=a>n.height?a:n.height})),n.right=n.left+n.width,n.bottom=n.top+n.height,n}}).call(this,n(4))},function(t,e,n){"use strict";(function(t){var e=n(8);t.jQuery.fn.scrollToElement=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:450,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=t.jQuery(n),g=s.get(0).ownerDocument,a=g.defaultView,c=a.innerHeight,A=g.body.getBoundingClientRect(),l=s.get(0).getBoundingClientRect(),C=l.top-A.top+l.height/2+i;l.height<c?C-=c/2:l.height>c&&(C=l.top-A.top),Object(e.b)(C,o,r,i,g)}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.shortcode=function(){var e=this.parents(),n=null;return this.data("shortcode")?this.data("shortcode"):(e.each((function(e,o){t.jQuery(o).data("shortcode")&&!n&&(n=t.jQuery(o).data("shortcode"))})),n)}}).call(this,n(4))},function(t,e,n){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},function(t,e,n){"use strict";var o=Object.prototype.hasOwnProperty;function i(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function r(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var n,i,s=[];for(i in"string"!=typeof e&&(e="?"),t)if(o.call(t,i)){if((n=t[i])||null!=n&&!isNaN(n)||(n=""),i=r(i),n=r(n),null===i||null===n)continue;s.push(i+"="+n)}return s.length?e+s.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,o={};e=n.exec(t);){var r=i(e[1]),s=i(e[2]);null===r||null===s||r in o||(o[r]=s)}return o}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}},function(t,e,n){"use strict";var o=n(1);function i(t){var e=n(42);angular.forEach(e.keys(),(function(n){var o=e(n);t.put(n.replace("./",""),o.default||o)}))}i.$inject=["$templateCache"],o.a.run(i)},function(t,e,n){var o={"./components/add-shortcode/add-shortcode.html":20,"./components/app-actions/app-actions.html":21,"./components/app-sidebar/app-sidebar.html":22,"./components/app-tools/app-move-tool/app-move-tool.template.html":11,"./components/app-tools/app-resize-tool/app-resize-tool.template.html":12,"./components/app-tools/app-tools.html":23,"./components/context-menu/context-menu.template.html":13,"./components/shortcode-hierarchy-list-item/shortcode-hierarchy-list-item.html":24,"./components/ux-option/types/checkbox.html":43,"./components/ux-option/types/col-slider.html":44,"./components/ux-option/types/colorpicker.html":45,"./components/ux-option/types/gallery.html":46,"./components/ux-option/types/group.html":47,"./components/ux-option/types/image.html":48,"./components/ux-option/types/margins.html":49,"./components/ux-option/types/radio-buttons.html":50,"./components/ux-option/types/radio-images.html":51,"./components/ux-option/types/scrubfield.html":52,"./components/ux-option/types/select.html":53,"./components/ux-option/types/slider.html":54,"./components/ux-option/types/text-editor.html":55,"./components/ux-option/types/textarea.html":56,"./components/ux-option/types/textfield.html":57,"./components/ux-option/types/title.html":58,"./components/ux-option/types/urlfield.html":59,"./routes/home/home.html":25,"./routes/settings/settings.html":26,"./routes/shortcode/shortcode.html":27,"./shortcodes/_loading.html":60};function i(t){var e=r(t);return n(e)}function r(t){if(!n.o(o,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return o[t]}i.keys=function(){return Object.keys(o)},i.resolve=r,t.exports=i,i.id=42},function(t,e,n){"use strict";n.r(e),e.default='<label>\n  <input type="checkbox"\n    ng-model="$ctrl.model"\n    ng-true-value="\'true\'"\n    ng-false-value="\'0\'">\n  <span></span>\n</label>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="col-slider-wrap col-slider-cols-{{ $ctrl.model }}">\n\n\t<table class="col-slider-table">\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td ng-repeat="n in _.range($ctrl.option.min, $ctrl.option.max + 1) track by $index">{{:: n }}</td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n\n\t<input type="range"\n\t\tclass="col-slider-input"\n    min="{{:: $ctrl.option.min }}"\n    max="{{:: $ctrl.option.max }}"\n    ng-model="$ctrl.model">\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-colorpicker\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-colorpicker>\n\n<div ng-if="$ctrl.option.helpers" class="option-helpers option-helpers-colors">\n  <a href="javascript:"\n    title="Remove"\n    ng-click="$ctrl.model = null">\n    <span class="dashicons dashicons-no-alt"></span>\n  </a>\n  <a href="javascript:"\n    title="{{:: value.title }}"\n    style="background-color: {{:: value.value }}"\n    ng-repeat="(key, value) in $ctrl.option.helpers"\n    ng-click="$ctrl.model = value.value">\n  </a>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-gallery\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-gallery>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-group\n  option="$ctrl.option"\n  shortcode="$ctrl.shortcode"\n  responsive="$ctrl.$optionsCtrl.responsive"\n  model="$ctrl.$optionsCtrl.model"\n></ux-option-group>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-image\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-image>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-margins\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-margins>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="option-button-group">\n\t<label ng-repeat="(value, data) in $ctrl.option.options"\n\t    ng-class="{ \'active\' : $ctrl.model === value }">\n\t    <input type="radio" value="{{:: value }}" ng-model="$ctrl.model"/>\n\t    <button type="button blank" title="{{:: data.title }}">\n\t    \t<span ng-if="data.icon" class="dashicons {{:: data.icon }}"></span>\n\t    \t<span ng-if="!data.icon"> {{:: data.title }}</span>\n\t    </button>\n\t</label>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<label ng-repeat="(key, value) in $ctrl.option.options"\n    ng-class="{ \'active\' : $ctrl.model === key }">\n    <input type="radio" value="{{:: key }}" ng-model="$ctrl.model">\n    <img src="{{:: value.image }}" alt="{{:: value.title }}" title="{{:: value.title }}">\n</label>\n'},function(t,e,n){"use strict";n.r(e),e.default='<input type="text"\n  class="scrubfield"\n\tscrubfield="$ctrl.option"\n\tng-model="$ctrl.model"\n\tplaceholder="{{:: $ctrl.option.default }}"\n\tng-model-options="{\n        \'updateOn\': \'blur default\',\n        \'debounce\': {\n            \'blur\' : 0,\n            \'default\': 10\n        }\n    }">\n<div ng-if="$ctrl.option.helpers" class="option-helpers">\n\t<a \tng-repeat="(key, value) in $ctrl.option.helpers" href="javascript:"\n\t\tng-click="$ctrl.model = value.value">\n\t\t{{:: value.title }}\n\t</a>\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-select\n  option="$ctrl.option"\n  value="$ctrl.model"\n></ux-option-select>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="slider-wrap">\n\n  <input type="range"\n    ng-attr-min="{{:: $ctrl.option.min }}"\n    ng-attr-max="{{:: $ctrl.option.max }}"\n    ng-attr-step="{{:: $ctrl.option.step }}"\n    ng-attr-value="{{:: $ctrl.model }}"\n    ng-model="$ctrl.model">\n\n  <input type="number" to-number\n    ng-attr-min="{{:: $ctrl.option.min }}"\n    ng-attr-max="{{:: $ctrl.option.max }}"\n    ng-model="$ctrl.model">\n\n  <span class="slider-unit">{{:: $ctrl.option.unit }}</span>\n\n</div>\n'},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-editor\n  option="$ctrl.option"\n  model="$ctrl.model"\n></ux-option-editor>\n'},function(t,e,n){"use strict";n.r(e),e.default='  <textarea\n    placeholder="{{::$ctrl.option.placeholder }}"\n    ng-model="$ctrl.model"\n    ng-model-options="{\n        updateOn: \'blur default\',\n        debounce: {\n            blur : 0,\n            default: 10\n        }\n    }"></textarea>\n'},function(t,e,n){"use strict";n.r(e),e.default='  <input type="text"\n    placeholder="{{::$ctrl.option.placeholder }}"\n    ng-model="$ctrl.model"\n    ng-model-options="{\n        updateOn: \'blur default\',\n        debounce: {\n            blur : 0,\n            default: 10\n        }\n    }">\n'},function(t,e,n){"use strict";n.r(e),e.default="{{:: $ctrl.option.heading }}\n"},function(t,e,n){"use strict";n.r(e),e.default='<ux-option-urlfield option="$ctrl.option"></ux-option-urlfield>\n'},function(t,e,n){"use strict";n.r(e),e.default='<div class="uxb-template-loading">Loading&hellip;</div>\n'},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=n(1),a=function(){function t(e,n,o){i()(this,t),this.app=e,this.$scope=n,o.toggleClass("with-label",!!this.label)}return t.$inject=["app","$scope","$element"],s()(t,[{key:"addShortcode",value:function(){this.app.outlineShortcode(null),this.app.selectShortcode(null),this.app.configureShortcode(null),this.app("stack").open('\n      <add-shortcode\n        shortcode="$ctrl.shortcode"\n        index="$ctrl.index"\n      ></add-shortcode>\n    ',this.$scope)}}]),t}();g.a.component("addButton",{controller:a,bindings:{shortcode:"<",label:"@",index:"<"},template:'\n    <button type="button" ng-click="$ctrl.addShortcode()">\n      <div class="wrapper">\n        <span class="icon">+</span>\n        <span class="label">{{:: $ctrl.label }}</span>\n      </div>\n    </button>\n  '})},function(t,e,n){"use strict";var o=n(10),i=n.n(o),r=n(19),s=n.n(r);n(1).a.component("templateSelector",{controller:["app","store","iframe","$scope","templates",function(t,e,n,o,r){var g=this;this.store=e,this.templates=r,this.activeTab="flatsome",this.presets=[],this.isLoading=!0,this.errorMessage="",this.setTemplate=function(o){e.loading=!0,jQuery.post(e.ajaxUrl,{action:"ux_builder_to_array",id:o}).done((function(i){var r=i.data;if(!i.success)return console.error("Failed to compile template ".concat(o));e.post.meta.values.hasOwnProperty("_wp_page_template")&&(e.post.meta.values._wp_page_template=e.templates[o].template||"default"),n.reload(r.content),t.apply()}))},this.useContentTemplate=function(o){e.loading=!0,jQuery.post(e.ajaxUrl,{action:"ux_builder_to_array",content:o.raw}).done((function(i){var r=i.data;if(!i.success)return console.error("Failed to compile template ".concat(o.id));e.post.meta.values.hasOwnProperty("_wp_page_template")&&(e.post.meta.values._wp_page_template=o.template||"default"),n.reload(r.content),t.apply()}))},this.removeTemplate=function(){var t=s()(i.a.mark((function t(e){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:g.templates.remove(e).catch((function(t){g.errorMessage=t.message}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),this.$onInit=function(){jQuery.get(e.ajaxUrl,{action:"ux_builder_parse_presets",tag:"_root"}).done((function(t){var e=t.data;t.success&&e&&Array.isArray(e.presets)?g.presets=e.presets.filter((function(t){return t.custom})):g.errorMessage=e?e.message:"Failed to load templates.",g.isLoading=!1,o.$apply()})).fail((function(t){g.errorMessage=t.statusText,g.isLoading=!1,o.$apply()}))};var a=function(t,e){"_root"===e.tag&&(g.presets=e.presets.filter((function(t){return t.custom})),o.$apply())};o.$on("template-saved",a),o.$on("template-removed",a)}],template:'\n    <h2 class="uxb-templates-title">Insert a template</h2>\n    <div class="uxb-tabs">\n      <button class="uxb-tab" ng-class="{ \'uxb-active\': $ctrl.activeTab === \'flatsome\' }" ng-click="$ctrl.activeTab = \'flatsome\'">Flatsome</button>\n      <button class="uxb-tab" ng-class="{ \'uxb-active\': $ctrl.activeTab === \'custom\' }" ng-click="$ctrl.activeTab = \'custom\'">Custom</button>\n    </div>\n    <div class="uxb-templates-custom" ng-if="$ctrl.activeTab === \'custom\'">\n      <div ng-if="$ctrl.isLoading" class="uxb-loading-spinner"></div>\n      <div ng-if="!$ctrl.isLoading && !$ctrl.errorMessage && $ctrl.presets.length === 0">No custom templates yet&hellip;</div>\n      <p ng-if="$ctrl.errorMessage" class="uxb-error">{{ $ctrl.errorMessage }}</p>\n      <div class="uxb-templates-list">\n        <div class="uxb-template" ng-repeat="template in $ctrl.presets">\n          <button class="uxb-template-button" ng-click="$ctrl.useContentTemplate(template)">\n            <div class="uxb-template-icon">\n              <svg width="42" height="42" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.73009 2.41274L8.95709 3.63719L3.40181 9.18095L2.17482 7.95652L7.73009 2.41274ZM7.73009 0.242432L0 7.95652L3.40181 11.3513L11.1319 3.63719L7.73009 0.242432Z" fill="#007CBA"/> <path d="M7.8196 11.3114L8.95987 12.4493L7.8196 13.5873L6.67928 12.4493L7.8196 11.3114ZM7.8196 9.14111L4.50439 12.4492L7.8196 15.7575L11.1348 12.4492L7.8196 9.14087V9.14111Z" fill="#007CBA"/> <path d="M12.2322 6.90786L13.3725 8.0458L12.2322 9.18369L11.0921 8.04584L12.2323 6.90795L12.2322 6.90786ZM12.2323 4.73763L8.91699 8.04584L12.2322 11.3542L15.5474 8.04584L12.2322 4.73755L12.2323 4.73763Z" fill="#007CBA" fill-opacity="0.6"/> </svg>\n            </div>\n            <div class="uxb-template-label">{{:: template.name }}</div>\n          </button>\n          <div class="uxb-template-actions">\n            <button ng-click="$ctrl.templates.editTemplate(template)">\n              <span class="dashicons dashicons-edit"></span>\n            </button>\n            <button ng-click="$ctrl.removeTemplate(template)">\n              <span class="dashicons dashicons-trash"></span>\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n    <div class="uxb-templates-flatsome" ng-if="$ctrl.activeTab === \'flatsome\'">\n      <h4>*Images are not included.</h4>\n      <div class="uxb-templates-list">\n        <div class="uxb-template" ng-repeat="(id, template) in $ctrl.store.templates track by id">\n          <button type="button" class="uxb-template-button" ng-click="$ctrl.setTemplate(id)">\n            <img ng-attr-src="{{:: template.thumbnail }}">\n            <span class="">{{:: template.name }}</span>\n          </button>\n        </div>\n      </div>\n    </div>\n  '})},function(t,e,n){var o=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",r=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function g(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{g({},"")}catch(t){g=function(t,e,n){return t[e]=n}}function a(t,e,n,o){var i=e&&e.prototype instanceof l?e:l,r=Object.create(i.prototype),s=new $(o||[]);return r._invoke=function(t,e,n){var o="suspendedStart";return function(i,r){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===i)throw r;return x()}for(n.method=i,n.arg=r;;){var s=n.delegate;if(s){var g=v(s,n);if(g){if(g===A)continue;return g}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var a=c(t,e,n);if("normal"===a.type){if(o=n.done?"completed":"suspendedYield",a.arg===A)continue;return{value:a.arg,done:n.done}}"throw"===a.type&&(o="completed",n.method="throw",n.arg=a.arg)}}}(t,n,s),r}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var A={};function l(){}function C(){}function I(){}var u={};u[i]=function(){return this};var d=Object.getPrototypeOf,p=d&&d(d(w([])));p&&p!==e&&n.call(p,i)&&(u=p);var h=I.prototype=l.prototype=Object.create(u);function f(t){["next","throw","return"].forEach((function(e){g(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){var o;this._invoke=function(i,r){function s(){return new e((function(o,s){!function o(i,r,s,g){var a=c(t[i],t,r);if("throw"!==a.type){var A=a.arg,l=A.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,s,g)}),(function(t){o("throw",t,s,g)})):e.resolve(l).then((function(t){A.value=t,s(A)}),(function(t){return o("throw",t,s,g)}))}g(a.arg)}(i,r,o,s)}))}return o=o?o.then(s,s):s()}}function v(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return A;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var o=c(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,A;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,A):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,A)}function y(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(y,this),this.reset(!0)}function w(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,r=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:x}}function x(){return{value:void 0,done:!0}}return C.prototype=h.constructor=I,I.constructor=C,C.displayName=g(I,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,I):(t.__proto__=I,g(t,s,"GeneratorFunction")),t.prototype=Object.create(h),t},t.awrap=function(t){return{__await:t}},f(m.prototype),m.prototype[r]=function(){return this},t.AsyncIterator=m,t.async=function(e,n,o,i,r){void 0===r&&(r=Promise);var s=new m(a(e,n,o,i),r);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},f(h),g(h,s,"Generator"),h[i]=function(){return this},h.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},t.values=w,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return s.type="throw",s.arg=t,e.next=n,o&&(e.method="next",e.arg=void 0),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],s=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var g=n.call(r,"catchLoc"),a=n.call(r,"finallyLoc");if(g&&a){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc)}else if(g){if(this.prev<r.catchLoc)return o(r.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,A):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),A},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),A}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;b(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:w(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),A}},t}(t.exports);try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=function t(e){return i()(this,t),e.frameElement?e.parent.angular:angular};r.$inject=["$window"];var s=n(2),g=n.n(s),a=function(){function t(e){i()(this,t),this.store=e,this.store.states=this.store.states||{}}return t.$inject=["store"],g()(t,[{key:"outlineShortcode",value:function(t){this.store.states.outlinedShortcode=t}},{key:"selectShortcode",value:function(t){this.store.states.selectedShortcode=t}},{key:"configureShortcode",value:function(t){this.store.states.configuringShortcode=t}}]),t}(),c=function t(e,n,o,r,s,g,a,c){i()(this,t);var A=angular.copy(e.permissions);function l(t){return e.components[t]}return l.goto=function(t){(window.parent||window).location.hash=t},l.exit=function(){if(A.exit){var t="publish"===e.post.status?e.backUrl:e.editUrl;(e.isSaved||confirm("Exit? All changes since last save will be lost."))&&((window.parent||window).location.href=t)}},l.register=function(t,n){e.components=e.components||{},e.components[t]=n},l.remove=function(t){delete e.components[t]},l.apply=function(t){n.$apply(t)},l.broadcast=function(t,e){n.$broadcast(t,e),o.postCustomMessage(g.BROADCAST,{type:t,data:e})},l.emit=function(t,e){n.$emit(t,e),o.postCustomMessage(g.EMIT,{type:t,data:e})},l.trigger=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this.broadcast.apply(this,[t].concat(o)),e.$$events.hasOwnProperty(t))for(var r=0;r<e.$$events[t].length;r++){var s;(s=e.$$events[t][r]).call.apply(s,[this].concat(o))}},l.filter=function(t,n){if(e.$$filters.hasOwnProperty(t)){for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];for(var s=0;s<e.$$filters[t].length;s++){var g;n=(g=e.$$filters[t][s]).call.apply(g,[this,n].concat(i))}}return n},l.states=e.states,l.resetAll=function(){e.$$events={},e.$$filters={},this.resetState()},l.resetState=function(){for(var t in e.states)e.states[t]=null},l.freeze=function(t){e.states.freezed=t},l.outlineShortcode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&this.broadcast(a.OUTLINED,t),e.states.outlinedShortcode=!0!==e.states.freezed?t:null},l.selectShortcode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&this.broadcast(a.SELECTED,t),e.states.selectedShortcode=!0!==e.states.freezed?t:null},l.configureShortcode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t?(this.selectShortcode(t),this.broadcast(a.CONFIGURE,t),this.goto("/shortcode/".concat(t.$id))):this.goto("/")},l.setBreakpoint=function(t){e.breakpoints.current=t,l.broadcast(c.CHANGED,t)},l};c.$inject=["store","$rootScope","$window","$timeout","$log","AppEvent","ShortcodeEvent","MediaEvent"];var A=function(){function t(e,n){i()(this,t),this.app=e,this.utils=n}return t.$inject=["app","utils"],g()(t,[{key:"attach",value:function(t){t.addEventListener&&t.addEventListener("contextmenu",this.onRightClick.bind(this),!1)}},{key:"onRightClick",value:function(t){var e=this.utils.getGlobalCoordinates(t.view,t.clientX,t.clientY),n=this.utils.shortcodeFromPoint(e.x,e.y);n.isRoot||(this.menu.open(n,t.target,t.clientX,t.clientY),this.app.apply(),t?t.preventDefault():window.event.returnValue=!1)}},{key:"menu",get:function(){return this.app("contextMenu")}}]),t}(),l=n(15),C=function t(e,n){return i()(this,t),{injectStyles:function(t){return o("styles",t,(function(t,e,n){return(n=document.createElement("link")).id="ux-builder-style-"+e,n.rel="stylesheet",n.type="text/css",n.media="all",n.href=t,n}))},injectScripts:function(t){return o("scripts",t,(function(t,e,n){return(n=document.createElement("script")).id="ux-builder-script-"+e,n.type="text/javascript",n.src=t,n}))}};function o(t,o,i){var r=n.defer(),s=0,g=0;return _.each(o,(function(n,i){!0===e.$get(t+"."+i+".loaded")?delete o[i]:s++})),0===_.size(o)?(r.resolve(),r.promise):(_.each(o,(function(n,o){var a=e.$get(t+"."+o)||i(n,o);if(angular.isDefined(a.loaded)&&!0!==a.loaded)return a.addEventListener("load",c);function c(){a.loaded=!0,++g===s&&r.resolve()}a.loaded=!1,a.addEventListener("load",c),e.$set(t+"."+o,a),document.getElementsByTagName("head")[0].appendChild(a)})),r.promise)}};C.$inject=["store","$q"];var I=function(){function t(e){i()(this,t),this.enabled=!0,this.store=e,this.store.editor=this.store.editor||{state:{}}}return t.$inject=["store"],g()(t,[{key:"disable",value:function(){this.enabled=!1,this.state={}}},{key:"enable",value:function(){this.enabled=!0}},{key:"update",value:function(){}},{key:"outline",value:function(t){this.state.outlined=this.enabled?t:null}},{key:"select",value:function(t){this.state.selected=this.enabled?t:null}},{key:"configure",value:function(t){this.state.configuring=this.enabled?t:null}},{key:"target",value:function(t){this.state.target=this.enabled?t:null}},{key:"state",get:function(){return this.store.editor.state}}]),t}(),u=n(16),d=function(){function t(e,n,o,r,s){i()(this,t),this.app=e,this.store=n,this.manager=o,this.ShortcodeEvent=r,this.$timeout=s}return t.$inject=["app","store","Shortcode","ShortcodeEvent","$timeout"],g()(t,[{key:"undo",value:function(){var t=this.store.history[this.store.currentAction];return this.doAction(t,-1)}},{key:"redo",value:function(){var t=this.store.history[this.store.currentAction+1];return this.doAction(t,0)}},{key:"doAction",value:function(t,e){var n=this;if(t){var o=t.type,i=t.payload,r=this.store.shortcode;switch(this.store.$disable(),this.store.currentAction=this.store.history.indexOf(t)+e,o){case"reorderChildren":var s=i.id,g=i.parentId,a=i.toIndex,c=i.fromIndex,A=c>a?c+1:c;this.manager.move(r[s],r[g],A,!1),i.fromIndex=a,i.toIndex=c;break;case"moveChild":var l=i.id,C=i.parentId,I=i.index,u=i.fromParentId,d=i.fromIndex;this.manager.move(r[l],r[u],d,!1),i.fromParentId=C,i.fromIndex=I,i.parentId=u,i.index=d;break;case"updateOption":var p=i.name,h=i.optionValue,f=i.responsiveValue,m=r[i.id];i.optionValue=angular.copy(m.optionValues[p]),i.responsiveValue=angular.copy(m.responsiveValues[p]),m.optionValues[p]=h,f&&(m.responsiveValues[p]=f);break;case"updateMultipleOptions":var v=i.mutations;for(var y in v){var b=r[y];for(var $ in v[y]){var w=v[y][$],x=w.optionValue,k=w.responsiveValue;w.optionValue=angular.copy(b.optionValues[$]),w.responsiveValue=angular.copy(b.responsiveValues[$]),b.optionValues[$]=x,k&&(b.responsiveValues[$]=k)}}break;case"clearResponsiveValue":var E=i.id,S=i.optionName,O=i.breakpointIndex,D=i.value,T=r[E].responsiveValues[S];T[O]?T[O]=null:T[O]=D;break;case"updateContent":var P=i.id,j=i.content,N=r[P];i.content=N.content,N.content=j;break;case"addChild":case"removeChild":if(r[i.id])this.manager.remove(r[i.id],!1);else{var M=r[i.parentId].addChild(i.data,i.index,!1);this.$timeout((function(){n.app.trigger(n.ShortcodeEvent.ATTACHED,M)}))}break;case"removeContent":Object.keys(r).length>1?this.manager.remove(this.store.postContent,!1):(i.content.forEach((function(t,e){n.store.postContent.addChild(t,e,!1)})),this.$timeout((function(){n.app.trigger(n.ShortcodeEvent.ATTACHED,n.store.postContent)})))}return this.store.$enable(),t}}}]),t}(),p=n(17),h=n.n(p),f=function(){function t(e,n,o,r,s,g){i()(this,t),this.app=e,this.store=n,this.targets=o,this.manager=r,this.$timeout=s,this.metaOptions=n.post.meta.options.flat,this.postMeta=n.post.meta.values,this.IframeEvent=g}return t.$inject=["app","store","targets","Shortcode","$timeout","IframeEvent"],g()(t,[{key:"reload",value:function(t){var e=this;if(!this.store.isReloading){this.store.loading=!0;var n=h()(this.store.iframeUrl);for(var o in this.metaOptions){var i=this.metaOptions[o];n.query+="&".concat(i.$orgName,"=").concat(this.postMeta[i.$name])}this.store.post.content=t||this.store.postContent.copy((function(t,e){t.$id=e.$id})),this.targets.remove(this.store.postContent),this.manager.remove(this.store.postContent,!1),this.app.resetAll(),this.store.isReloading=!!this.$timeout((function(){e.store.iframeUrl=n.toString(),delete e.store.isReloading}),0)}}}]),t}(),m=function(){function t(){i()(this,t)}return g()(t,[{key:"show",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=jQuery("#".concat(t,"-modal"),parent.document),i=o.find(".app-modal-title"),r=o.find(".app-modal-error");return n.title&&i.html(n.title),o.addClass("is-visible"),{$el:o,hide:function(){return e.hide(t)},setError:function(t){r.html(t)},clearError:function(){r.empty()},onClose:function(t){o.one("modal:close",t)}}}},{key:"hide",value:function(t){var e=jQuery("#".concat(t,"-modal"),parent.document),n=e.find(".app-modal-error");e.trigger("modal:close"),e.removeClass("is-visible"),n.empty(),e.off()}}]),t}(),v=function t(e,n,o){return i()(this,t),{defaultBreakpoint:r,currentBreakpoint:s,getMediaValue:function(t,e){if((e=e||s())>r())return g(t,e);return c(t,e)},getMediaIndex:function(t,e){if((e=e||s())>r())return a(t,e);return A(t,e)},getLowerMediaValue:g,getLowerMediaIndex:a,getHigherMediaValue:c,getHigherMediaIndex:A,hasValueBetween:function(t,e,n){for(var o=e+1;o<n;o++)if(t[o])return!0;return!1}};function r(){return n.breakpoints.default}function s(){return n.breakpoints.current}function g(t,e){for(var n=e||s();n>=0;n--)if(t[n])return t[n];return null}function a(t,e){for(var n=e||s();n>=0;n--)if(t[n])return n;return 0}function c(t,e){for(var n=e||s();n<t.length;n++)if(t[n])return t[n];return null}function A(t,e){for(var n=e||s();n<t.length;n++)if(t[n])return n;return 0}};v.$inject=["app","store","utils"];var y=n(3);var b,$={},w=function(){function t(e,n,o){var r=this;i()(this,t),angular.merge(this,e),this.responsiveValues={},this.optionValues={},this.$isReady=!1;var s=this;for(var g in this.$id=o||e.$id||function(t,e){var n=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e?"".concat(t.tag,"-").concat(n):"root"}(e,n),this.$parentId=n?n.$id:e.$parentId||null,this.$textContent=e.content||"",this.data=angular.copy(y.b.shortcodes[this.tag]),n&&angular.extend(this.data,n.data.children),this.states={active:!1,dragging:!1,open:void 0},this.options={get $responsive(){return s.responsiveValues},set $responsive(t){s.responsiveValues=t}},e.options.$responsive){this.responsiveValues[g]=[];for(var a=0;a<e.options.$responsive[g].length;a++)this.responsiveValues[g][a]=x(e.options.$responsive[g][a],this.data.options.named[g])}var c=function(t){if("$"===t.charAt(0))return"continue";Object.defineProperty(r.options,t,{enumerable:!0,get:function(){return r.data.options.named[t].responsive?S(r.responsiveValues[t]):r.optionValues[t]},set:function(e){var n=r.data.options.named[t],o=x(e,n),i=y.b.breakpoints.current;(r.$isReady&&y.b.enabled&&(clearTimeout(b),$[r.$id]||($[r.$id]={}),$[r.$id][t]||($[r.$id][t]={optionValue:angular.copy(r.optionValues[t]),responsiveValue:angular.copy(r.responsiveValues[t])}),b=setTimeout((function(){var e=Object.keys($);1===e.length&&1===Object.keys($[e[0]]).length?y.b.$addAction("updateOption",{id:r.$id,name:t,override:!1,optionValue:$[e[0]][t].optionValue,responsiveValue:$[e[0]][t].responsiveValue,key:"updateOption-".concat(e[0],"-").concat(t,"-").concat(i)}):e.length&&y.b.$addAction("updateMultipleOptions",{mutations:$,override:!1,key:"updateMultipleOptions-".concat(e.join("-"),"-").concat(i)}),$={},r.apply()}),250)),r.optionValues[t]=o,n.responsive)&&(o!==S(r.responsiveValues[t])&&(r.responsiveValues[t][i]=o))}}),r.options[t]=e.options[t]};for(var A in e.options)c(A);this.data.options.flat.forEach((function(t){null===r.options[t.$name]&&(r.options[t.$name]=t.default),t.$isValid(r.options,n)||(r.options[t.$name]=null,t.responsive&&r.options.$responsive[t.$name].map((function(){return null})))})),y.b.shortcode[this.$id]=this,e.hasOwnProperty("children")&&(this.children=e.children.map((function(e){return new t(e,r)}))),this.$isReady=!0}return g()(t,[{key:"apply",value:function(){this.$scope&&!this.$scope.$$phase&&this.$scope.$apply()}},{key:"addChild",value:function(e,n){var o,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e instanceof t)if(e.$parentId!==this.$id){var r=e.$parentId,s=e.index;o=new t(k(e.detatch(),(function(t,e){t.$id=e.$id})),this,e.$id),i&&y.b.$addAction("moveChild",{key:"moveChild-".concat(o.$id,"-").concat(r,"-").concat(s),id:o.$id,parentId:this.$id,index:n,fromIndex:s,fromParentId:r})}else{var g=e.index;n-=n>e.index?1:0,o=e.detatch(),i&&y.b.$addAction("reorderChildren",{key:"reorderChildren-".concat(e.$id,"-").concat(g,"-").concat(n),parentId:this.$id,id:e.$id,toIndex:n,fromIndex:g})}else o=new t(E(e),this),i&&y.b.$addAction("addChild",{key:"addChild-".concat(this.$id,"-").concat(o.$id),id:o.$id,parentId:this.$id,index:n,data:o.copy((function(t,e){t.$id=e.$id}))});if(!this.allows(o))throw Error("".concat(o.data.name," is not allowed in ").concat(this.data.name));var a=n>=0?n:this.children.length;return this.children.splice(a,0,o),o}},{key:"childAt",value:function(t){return this.isParent?this.children[t]:null}},{key:"removeChild",value:function(t){return this.isParent?this.children[t].remove():null}},{key:"replaceChild",value:function(e,n){return this.isParent?(this.children[n]=e instanceof t?e:new t(e,this),this.children[n]):null}},{key:"replaceWith",value:function(t){return this.isRoot?null:this.parent.replaceChild(t,this.index)}},{key:"is",value:function(t){return this.data.tag===t}},{key:"isChildOf",value:function(t){return this.parent===t}},{key:"isDescendantOf",value:function(t){return t.descendants.indexOf(this)>-1}},{key:"isSelfOrDescendantOf",value:function(t){return t.descendantsAndSelf.indexOf(this)>-1}},{key:"isAncestorOf",value:function(t){return this.descendants.indexOf(t)>-1}},{key:"isSelfOrAncestorOf",value:function(t){return this.descendantsAndSelf.indexOf(t)>-1}},{key:"copy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};for(var n in this)_.isFunction(this[n])||"$"!==n.charAt(0)&&"optionValues"!==n&&"responsiveValues"!==n&&"children"!==n&&"data"!==n&&this.hasOwnProperty(n)&&(e[n]=angular.copy(this[n]));if(this.$textContent&&(e.content=this.$textContent),this.isParent){e.children=[];for(var o=0;o<this.children.length;o++)e.children.push(this.children[o].copy(t))}return t&&t(e,this),e}},{key:"duplicate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.copy((function(t,n){e&&(t.$id=n.$id)}));return this.parent.addChild(n,t||this.index+1)}},{key:"detatch",value:function(){return this.parent?this.parent.children.splice(this.index,1)[0]:null}},{key:"remove",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.descendants.forEach((function(t){delete y.b.shortcode[t.$id]})),this.parent&&(delete y.b.shortcode[this.$id],t&&y.b.$addAction("removeChild",{id:this.$id,index:this.index,parentId:this.parent.$id,key:"removeChild-".concat(this.$id),data:this.copy((function(t,e){t.$id=e.$id}))})),this.detatch()}},{key:"allows",value:function(t){return function(t,e){return!e.isSelfOrDescendantOf(t)&&(!t.descendants.filter((function(t){return!1===t.data.nested&&t.tag===e.tag})).length&&e.allowed.hasOwnProperty(t.tag))}(t,this)}},{key:"content",get:function(){return this.$textContent||""},set:function(t){t!==this.content&&this.$isReady&&y.b.enabled&&y.b.$addAction("updateContent",{id:this.$id,override:!1,content:this.content,key:"updateContent-".concat(this.$id)}),this.$textContent=t}},{key:"allowed",get:function(){return function(t){var e=t.ancestorsAndSelf,n={};if(t.data.allow.length)return t.data.allow.reduce((function(t,e){return y.b.shortcodes[e]&&(t[e]=y.b.shortcodes[e]),t}),{});var o=function(o){var i=y.b.shortcodes[o];return i.hidden||i.require.length&&-1===i.require.indexOf(t.tag)||!1===i.nested&&t.tag===i.tag||!1===i.nested&&e.filter((function(t){return t.tag===i.tag})).length?"continue":void(n[i.tag]=i)};for(var i in y.b.shortcodes)o(i);return n}(this)}},{key:"presets",get:function(){var t=this.parent.allowed,e=angular.copy(this.data.presets);return e.forEach((function(n,o){var i=function t(e){var n=[];e.children&&e.children.forEach((function(e){n.push(e),n.concat(t(e))}));return n}(n.content);if(i.unshift(n.content),!t.hasOwnProperty(n.content.tag))return e.splice(o,1);i.forEach((function(t){t.tag===parent.tag&&!0!==y.b.shortcodes[t.tag].nested&&e.splice(o,1)}))})),e}},{key:"isParent",get:function(){return!!this.children}},{key:"isChild",get:function(){return!!this.parent}},{key:"isEmpty",get:function(){return this.isParent&&0===this.children.length}},{key:"isRoot",get:function(){return"_root"===this.tag}},{key:"parent",get:function(){return this.$parentId?y.b.shortcode[this.$parentId]:null}},{key:"index",get:function(){return this.parent?this.parent.children.indexOf(this):0}},{key:"depth",get:function(){return this.ancestors.length}},{key:"ancestors",get:function(){var t=[];return this.parent&&(t.push(this.parent),t=t.concat(this.parent.ancestors)),t}},{key:"ancestorsAndSelf",get:function(){var t=this.ancestors;return t.unshift(this),t}},{key:"descendants",get:function(){var t=[];if(this.isParent)for(var e=0;e<this.children.length;e++)t.push(this.children[e]),t=t.concat(this.children[e].descendants);return t}},{key:"descendantsAndSelf",get:function(){var t=this.descendants;return t.unshift(this),t}},{key:"siblings",get:function(){var t=this;return this.parent?this.parent.children.filter((function(e){return e!==t})):[]}},{key:"nextSibling",get:function(){return this.parent&&this.parent.children[this.index+1]?this.parent.children[this.index+1]:null}},{key:"previousSibling",get:function(){return this.parent&&this.parent.children[this.index-1]?this.parent.children[this.index-1]:null}},{key:"siblingsAndSelf",get:function(){return this.parent?this.parent.children:[this]}}]),t}();function x(t,e){return null===t||"string"==typeof t&&""===t?t:isNaN(t)?angular.isUndefined(t)?e.default:(Array.isArray(t)&&(t=t.join(e.config?e.config.delimiter:",")),String(t)):"string"!=typeof t||!/^0\d/.test(t)&&"+"!==t.charAt(0)?Number(t):String(t)}function k(t,e){var n={};for(var o in t)"$"!==o.charAt(0)&&"children"!==o&&t.hasOwnProperty(o)&&(n[o]=angular.copy(t[o]));if(t.isParent){n.children=[];for(var i=0;i<t.children.length;i++)n.children.push(k(t.children[i],e))}return t.$textContent&&(n.content=t.$textContent),e&&e(n,t),n}function E(t){var e=null,n=angular.copy(t);if(angular.isDefined(n.children))for(var o in n.children)e=E(y.b.shortcodes[n.children[o].tag].presets[0].content),n.children[o].isparent&&!n.children[o].children.length&&(n.children[o]=angular.merge({},e,n.children[o])),n.children[o].content&&""===n.children[o].content&&(n.children[o].content=e.content);return n}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.b.breakpoints.current;return e>y.b.breakpoints.default?O(t,e):D(t,e)}function O(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.b.breakpoints.current,n=e;n>=0;n--)if(null!==t[n])return t[n];return null}function D(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.b.breakpoints.current,n=e;n<t.length;n++)if(null!==t[n])return t[n];return null}var T=function(){function t(e,n,o,r,s){i()(this,t),this.app=e,this.store=n,this.$timeout=o,this.$templateCache=r,this.ShortcodeEvent=s}return t.$inject=["app","store","$timeout","$templateCache","ShortcodeEvent"],g()(t,[{key:"instantiate",value:function(t,e,n){return new w(t,e,n)}},{key:"create",value:function(t,e,n){var o=this.instantiate(t,e,n);return o.$$new=!0,o}},{key:"move",value:function(t,e,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=e.addChild(t,n,o);return i.$$moved=!0,t.$parentId!==i.$parentId&&(this.app.trigger(this.ShortcodeEvent.DETACHED,t),i.$$new=!!i.data.template||!!this.$templateCache.get(i.$id)),this.app.trigger(this.ShortcodeEvent.MOVED,i),i}},{key:"duplicate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.duplicate(e,n);return o.$$new=!0,o.data.template||this.$templateCache.put(o.$id,this.$templateCache.get(t.$id)),o}},{key:"remove",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.app.trigger(this.ShortcodeEvent.DETACHED,t),this.app.states.selectedShortcode&&this.app.states.selectedShortcode.isSelfOrDescendantOf(t)&&(this.app.outlineShortcode(null),this.app.selectShortcode(null),this.app.configureShortcode(null)),t.isRoot)for(var n=t.children.length-1;n>=0;n--)t.children[n].remove(e);else t.remove(e)}},{key:"copy",value:function(t){var e=this;return t.copy((function(t,n){var o=e.store.breakpoints.default,i=n.options.$responsive;for(var r in i)t.options[r]=i[r][o];for(var s in t.options)if("$responsive"!==s){var g=n.data.options.named[s];null===t.options[s]&&g.$isValid(n.options,n.parent)&&(t.options[s]=n.data.options.get(s).default)}}))}}]),t}(),P=n(5),j=n.n(P);function N(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?N(Object(n),!0).forEach((function(e){j()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var L=function(){function t(e,n,o,r,s){var g=this;i()(this,t),this.store=e,this.$iframe=n,this.$timeout=s,o.addEventListener("resize",(function(){return g.updateOffsets()}),!1),o.addEventListener("scroll",(function(){return g.updateOffsets()}),!1),this.updateOffsets(!0,0)}return t.$inject=["store","$iframe","$window","$document","$timeout"],g()(t,[{key:"add",value:function(t,e){var n=angular.extend({name:t,element:e.shortcode.$element,shortcode:e.shortcode,target:e.target||"center"===t?e.shortcode:e.shortcode.parent,droppable:!0,addable:!0,active:!0},e);n.offsets=n.element.outerOffset(),this.store.targets.push(n)}},{key:"enable",value:function(t){var e=this;if(angular.isArray(t))return t.forEach((function(t){return e.enable(t)}));for(var n=0;n<this.store.targets.length;n++)this.store.targets[n].target===t&&(this.store.targets[n].active=!0)}},{key:"disable",value:function(t){var e=this;if(angular.isArray(t))return t.forEach((function(t){return e.disable(t)}));for(var n=0;n<this.store.targets.length;n++)this.store.targets[n].target===t&&(this.store.targets[n].active=!1)}},{key:"remove",value:function(t){var e=t.descendantsAndSelf;this.store.targets=this.store.targets.reduce((function(t,n){return e.indexOf(n.shortcode)<0&&t.push(n),t}),[])}},{key:"removeElement",value:function(t){this.store.targets=this.store.targets.reduce((function(e,n){return n.element.get(0)!==t&&e.push(n),e}),[])}},{key:"enableElement",value:function(t){for(var e=this,n=0;n<this.store.targets.length;n++)this.store.targets[n].element.get(0)===t&&(this.store.targets[n].active=!0,this.store.targets[n].shortcode.descendants.forEach((function(t){t.$element&&e.enableElement(t.$element.get(0))})))}},{key:"disableElement",value:function(t){for(var e=this,n=0;n<this.store.targets.length;n++)this.store.targets[n].element.get(0)===t&&(this.store.targets[n].active=!1,this.store.targets[n].shortcode.descendants.forEach((function(t){t.$element&&e.disableElement(t.$element.get(0))})))}},{key:"find",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:50,i=[],r=!!this.store.isDragging,s=0;s<this.store.targets.length;s++){var g=this.store.targets[s],a=g.element[0].ownerDocument.defaultView,c=g.shortcode.parent,A=t,l=e,C=void 0,I=void 0,u=void 0,d=void 0,p=void 0;if(g.active&&(("center"!==g.name||g.shortcode.isEmpty)&&(!r||g.droppable)&&(r||g.addable)&&(r||a.frameElement)))if(a){switch(a.frameElement&&angular.isDefined(this.frameOffsets)&&(A-=this.frameOffsets.left,l-=this.frameOffsets.top),c&&"ux_stack"===c.tag&&"col"===c.options.direction&&(g=M(M({},g),{},{name:"left"===g.name?"top":"bottom"})),g.name){case"top":p=g.shortcode.index,u=g.offsets.left+g.offsets.width/2,C=n?u:A,I=d=g.offsets.top;break;case"right":p=g.shortcode.index+1,u=g.offsets.right,d=g.offsets.top+g.offsets.height/2,C=g.offsets.right,I=n?d:l;break;case"bottom":p=g.shortcode.index+1,u=g.offsets.left+g.offsets.width/2,C=n?u:A,I=d=g.offsets.bottom;break;case"left":p=g.shortcode.index,u=g.offsets.left,d=g.offsets.top+g.offsets.height/2,C=u,I=n?d:l;break;case"center":p=0,u=u=g.offsets.left+g.offsets.width/2,d=d=g.offsets.top+g.offsets.height/2}var h={fromSide:Math.sqrt(Math.pow(Math.abs(C-A),2)+Math.pow(Math.abs(I-l),2)),fromCenter:Math.sqrt(Math.pow(Math.abs(u-A),2)+Math.pow(Math.abs(d-l),2))},f=g.shortcode.isEmpty,m=f?0:o,v=this.isInside(g,A,l,m),y=this.isInside(g,A,l),b=f?v:h.fromSide<m;v&&b&&i.push({target:g.target||("center"!==g.name?g.shortcode.parent:g.shortcode),insideLimit:v,insideElement:y,element:g.element,shortcode:g.shortcode,name:g.name,distance:h,index:p})}else this.removeElement(g.element.get(0))}return _.chain(i).sortBy((function(t){return-t.target.ancestors.length})).sortBy((function(t){return t.distance.fromCenter})).value()}},{key:"isInside",value:function(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i={x:o,y:o},r=Math.min(t.offsets.left-i.x,t.offsets.right+i.x),s=Math.max(t.offsets.left-i.x,t.offsets.right+i.x),g=Math.min(t.offsets.top-i.y,t.offsets.bottom+i.y),a=Math.max(t.offsets.top-i.y,t.offsets.bottom+i.y);return r<=e&&e<=s&&g<=n&&n<=a}},{key:"updateOffsets",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;this.$timeout.cancel(this.store.__updateTargets),this.store.__updateTargets=this.$timeout((function(){t.frameOffsets=t.$iframe().get(0).getBoundingClientRect();for(var n=0;n<t.store.targets.length;n++){var o=t.store.targets[n];(e||o.active&&o.element[0].ownerDocument.defaultView===window)&&("center"===o.name&&o.shortcode.isEmpty&&o.shortcode.$content&&o.element[0].ownerDocument.defaultView.frameElement?o.offsets=o.shortcode.$content.outerOffset({includeMargins:!0}):o.element?o.offsets=o.element.outerOffset({includeMargins:!0}):t.store.remove(o.shortcode))}delete t.store.__updateTargets}),n,!1)}}]),t}(),Y=n(18),R=n.n(Y);function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?B(Object(n),!0).forEach((function(e){j()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var G=function(){function t(e,n,o,r,s,g,a){i()(this,t),this.app=e,this.store=n,this.modal=o,this.presetCache=r,this.Shortcode=s,this.isSaving=!1,this.shortcode=!1,this.store.currentModal=null,this.store.templateName="",this.content=!1,this.$timeout=g,this.$q=a}return t.$inject=["app","store","modal","presetCache","Shortcode","$timeout","$q"],g()(t,[{key:"showModal",value:function(t){var e=this,n=t.title,o=t.name,i=R()(t,["title","name"]);this.store.templateName=o||"",this.store.templateError="",this.store.templateData=i,this.store.currentModal=this.modal.show("custom-template-modal",{title:n}),this.store.currentModal.onClose((function(){e.store.templateName="",e.store.templateError="",e.store.templateData=null,e.store.currentModal=null})),this.$timeout((function(){e.store.currentModal&&e.store.currentModal.$el.find(".custom-template-modal__input").focus()}),75)}},{key:"savePreset",value:function(t){this.showModal({title:"Save ".concat(t.data.name," as preset"),tag:t.tag,content:this.Shortcode.copy(t)})}},{key:"updatePreset",value:function(t){this.showModal(V({title:"Edit ".concat(t.name," preset")},t))}},{key:"saveTemplate",value:function(t){this.showModal({title:"Save as template",tag:"_root",content:this.Shortcode.copy(t),template:this.store.post.meta.values._wp_page_template})}},{key:"editTemplate",value:function(t){this.showModal(V({title:"Edit ".concat(t.name," template")},t))}},{key:"save",value:function(){var t=this;if(!this.isSaving){var e=V(V({},this.store.templateData),{},{post_id:this.store.post.id,title:this.store.templateName,content:angular.toJson(this.store.templateData.content)});this.isSaving=!0,jQuery.post(this.store.ajaxUrl,{action:"ux_builder_save_custom_template",security:this.store.nonce,data:e}).done((function(e){var n=e.data;e.success?n&&(t.presetCache.remove(n.tag),t.app.broadcast("template-saved",n),t.store.currentModal&&t.store.currentModal.hide()):t.store.currentModal&&t.store.currentModal.setError(n?n.message:"Failed to save template."),t.isSaving=!1,t.app.apply()})).fail((function(e){t.store.currentModal&&t.store.currentModal.setError(e.statusText),t.isSaving=!1,t.app.apply()}))}}},{key:"remove",value:function(t){var e=this;return this.$q((function(n,o){if(confirm("Do you want to delete ".concat(t.name,"?")))return jQuery.post(e.store.ajaxUrl,{action:"ux_builder_delete_custom_template",post_id:e.store.post.id,security:e.store.nonce,id:t.id}).done((function(t){var i=t.data;t.success?i&&(e.app.broadcast("template-removed",i),n(!0)):o(new Error(i?i.message:"Failed to delete template.")),e.app.apply()})).fail((function(t){o(new Error(t.statusText))}));n()}))}}]),t}(),Q=function t(e,n,o,r){i()(this,t),this.arrayPrefix=function(t,e){return t.reduce((function(t,n){return t.push("".concat(e).concat(n)),t}),[])},this.isIframe=function(){return!!o.frameElement},this.getGlobalCoordinates=function(t,e,n){if(t.frameElement){var o=t.frameElement.getBoundingClientRect();e+=o.left,n+=o.top}return{x:e,y:n}},this.camelCase=function(t,e){return t=e?t.charAt(0).toUpperCase()+t.slice(1):t,jQuery.camelCase(t.replace(/\_|\:/g,"-",!0))},this.kebabCase=function(t){return t.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(function(t){return t.toLowerCase()}))},this.elementFromPoint=function(t,e){var n=o.parent||o,i=n.document,s=r().get(0).contentWindow,g=r().get(0).contentDocument,a=t,c=e,A=r().get(0).getBoundingClientRect(),l=t-A.left,C=e-A.top,I=n.angular.element(i.elementFromPoint(a,c)),u=s.angular.element(g.elementFromPoint(l,C));return u.length?u:I},this.shortcodeFromPoint=function(t,n){return this.elementFromPoint(t,n).shortcode()||e.postContent}};Q.$inject=["store","$document","$window","$iframe"];var z=function(){function t(e,n,o){var r=this;i()(this,t),this.app=e,this.store=n,this.$editor=(window.parent||window).angular.element("wp-editor"),this.$iframe=this.$editor.find("iframe").get(0).contentWindow,o.addEventListener("message",(function(t){return r.onMessage(t)}),!1)}return t.$inject=["app","store","$window"],g()(t,[{key:"onMessage",value:function(t){if("uxBuilderWpEditor"===t.data.source)switch(t.data.type){case"change":this.updateContent(t.data.content);break;case"discard":this.discard();break;case"hide":this.close()}}},{key:"open",value:function(){this.store.$set("stack",this),this.$editor.addClass("is-visible"),this.originalContent=this.app.states.selectedShortcode.content,this.$iframe.postMessage({source:"uxbuilder",type:"setContent",content:this.originalContent},"*")}},{key:"updateContent",value:function(t){this.app.states.selectedShortcode.content=t,this.app.states.selectedShortcode.apply()}},{key:"discard",value:function(){this.updateContent(this.originalContent),this.originalContent="",this.close()}},{key:"close",value:function(){this.store.$set("stack",!1),this.$editor.removeClass("is-visible")}},{key:"editor",get:function(){return this.$iframe.wp.editor}}]),t}(),F=function(){function t(e){var n=this;i()(this,t),this.$media=(window.parent||window).angular.element("wp-media"),this.$iframe=this.$media.find("iframe").get(0).contentWindow,e.addEventListener("message",(function(t){return n.onMessage(t)}),!1)}return t.$inject=["$window"],g()(t,[{key:"onMessage",value:function(t){if("uxBuilderWpMedia"===t.data.source)switch(t.data.type){case"close":this.close();break;case"select":"function"==typeof this.cb&&this.cb(t.data.attachment)}}},{key:"open",value:function(t){this.$media.addClass("is-active")}},{key:"close",value:function(){this.$media.removeClass("is-active")}},{key:"media",get:function(){return this.$iframe.wp.media}}]),t}(),Z=function t(e,n){return i()(this,t),function(){return e.element((n.parent.document||document).getElementsByTagName("iframe")[0])}};Z.$inject=["$angular","$window"],angular.module("app.services",[]).service("$angular",r).service("actions",a).service("app",c).service("contextmenu",A).service("draggable",l.a).service("dependencies",C).service("editor",I).service("history",d).service("iframe",f).service("modal",m).service("hammer",u.a).service("ResponsiveHelper",v).service("Shortcode",T).service("utils",Q).service("store",y.a).service("targets",L).service("templates",G).service("$iframe",Z).service("wpEditor",z).service("wpMedia",F)},function(t,e,n){"use strict";function o(t){return function(e){return t.trustAsHtml(e)}}function i(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"html";return t.trustAs(n,e)}}o.$inject=["$sce"],i.$inject=["$sce"],angular.module("app.filters",[]).filter("noDefault",(function(){return function(t,e){return t!==e.default&&t}})).filter("heightCheck",(function(){return function(t){return"100%"===t?"100vh":t}})).filter("html",o).filter("rgba",(function(){return function(t){var e=t;if(e.indexOf("#")>-1){e=(e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,n,o){return e+e+n+n+o+o}))).replace("#","");var n=parseInt(e.substring(0,2),16),o=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);e="rgba(".concat(n,",").concat(o,",").concat(i,",0.3)")}return e}})).filter("trusted",i)},function(t,e,n){"use strict";var o=n(1);function i(t){return{restrict:"A",controllerAs:"draggableShortcode",bindToController:{shortcode:"=draggableShortcode",options:"=draggableOptions",element:"=draggableElement"},controller:["$scope","$element","targets",function(e,n,o){var i=this,r=null;e.$watch("draggableShortcode.shortcode",(function(s){r&&r.destroy(),r=t(i.shortcode,i.element||n.get(0),i.options),i.options&&i.options.targets&&i.options.targets.map((function(t){angular.isObject(t)?(t.shortcode=i.shortcode,t.element=n,o.add(t.name,t)):o.add(t,{shortcode:i.shortcode,element:n})})),e.$on("$destroy",(function(){r.destroy(),o.removeElement(n.get(0))}))}))}]}}i.$inject=["draggable"];function r(t){return{restrict:"A",controllerAs:"attachment",bindToController:!0,scope:{id:"=wpAttachment",size:"=wpAttachmentSize",model:"=wpAttachmentModel",width:"@wpAttachmentWidth",height:"@wpAttachmentHeight"},controller:["app","store","$scope","$element",function(t,e,n,o){var i=this,r=!1;function s(){var t=n.attachment.id,o=n.attachment.size||"full",i=n.attachment.width||0,r=n.attachment.height||0,s=i||r?"w".concat(i,".h").concat(r):o,a="cache.attachment.".concat(s,".id").concat(t),c=e.$get(a);if(angular.isDefined(c))return g(c);jQuery.getJSON(e.ajaxUrl,{action:"ux_builder_get_attachment",attachment_id:t,attachment_size:o,attachment_width:i,attachment_height:r}).done((function(t){t.success?g(e.$set(a,t.data)):window.self===window.top&&n.attachment.model&&(c=["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAEOCAIAAADe+FMwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAADhuaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzExMSA3OS4xNTgzMjUsIDIwMTUvMDkvMTAtMDE6MTA6MjAgICAgICAgICI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgICAgICAgICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpPC94bXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4bXA6Q3JlYXRlRGF0ZT4yMDE2LTA5LTI3VDE3OjUzOjI2KzAyOjAwPC94bXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhtcDpNZXRhZGF0YURhdGU+MjAxNi0wOS0yN1QxNzo1MzoyNiswMjowMDwveG1wOk1ldGFkYXRhRGF0ZT4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTYtMDktMjdUMTc6NTM6MjYrMDI6MDA8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICAgICA8eG1wTU06SW5zdGFuY2VJRD54bXAuaWlkOmJjYTkzYTljLTRlZmQtNDQ0ZC05YjY1LTllNGQ0YWIzMWE3NzwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpiY2E5M2E5Yy00ZWZkLTQ0NGQtOWI2NS05ZTRkNGFiMzFhNzc8L3htcE1NOkRvY3VtZW50SUQ+CiAgICAgICAgIDx4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ+eG1wLmRpZDpiY2E5M2E5Yy00ZWZkLTQ0NGQtOWI2NS05ZTRkNGFiMzFhNzc8L3htcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkhpc3Rvcnk+CiAgICAgICAgICAgIDxyZGY6U2VxPgogICAgICAgICAgICAgICA8cmRmOmxpIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgICAgICAgPHN0RXZ0OmFjdGlvbj5jcmVhdGVkPC9zdEV2dDphY3Rpb24+CiAgICAgICAgICAgICAgICAgIDxzdEV2dDppbnN0YW5jZUlEPnhtcC5paWQ6YmNhOTNhOWMtNGVmZC00NDRkLTliNjUtOWU0ZDRhYjMxYTc3PC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE2LTA5LTI3VDE3OjUzOjI2KzAyOjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgMjAxNSAoTWFjaW50b3NoKTwvc3RFdnQ6c29mdHdhcmVBZ2VudD4KICAgICAgICAgICAgICAgPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOlNlcT4KICAgICAgICAgPC94bXBNTTpIaXN0b3J5PgogICAgICAgICA8cGhvdG9zaG9wOkNvbG9yTW9kZT4zPC9waG90b3Nob3A6Q29sb3JNb2RlPgogICAgICAgICA8cGhvdG9zaG9wOklDQ1Byb2ZpbGU+c1JHQiBJRUM2MTk2Ni0yLjE8L3Bob3Rvc2hvcDpJQ0NQcm9maWxlPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjAwMDAvMTAwMDA8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyMDAwMC8xMDAwMDwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj40ODA8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjcwPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz4rLBj0AAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAALzSURBVHja7NQxEQAwCACxUklMbPh3hQuOIZHww0dWPwDu+RIAGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQMYNAAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDYBBAxg0AAYNYNAAGDSAQQNg0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAYNIBBA2DQAAYNgEEDYNAABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAYNIBBA2DQAAYNgEEDGDQABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg2AQQMYNAAGDWDQABg0gEEDYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAAGDSAQQNg0AAGDYBBA2DQAAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAAGDSAQQNg0AAGDYBBAxg0AAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNgEEDGDQABg1g0AAYNAAGDWDQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNgEEDGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQNg0AAGDYBBAxg0AAYNYNAAGDQABg1g0AAYNIBBA2DQABg0gEEDYNAABg2AQQMYtAQABg2AQQMYNAAGDWDQABg0AAYNYNAAGDSAQQOwbQAAAP//AwDBvQLFJkQUdgAAAABJRU5ErkJggg==","480px","270px"]),c&&g(c)})).fail((function(e){console.error("Failed to load attachment",t)}))}function g(t){"IMG"===o[0].tagName?(o.addClass("processing"),o.on("load",(function(){o.off("load").removeClass("processing")})),o.attr("src",t[0]),o.attr("width",t[1]),o.attr("height",t[2])):o.css("background-image","url("+t[0]+")"),r=!0}o.on("load.wpAttachment",(function(){return t("tools").fixPositions()})),n.$watch((function(){return i.id}),(function(t){return t&&""!==t?"string"==typeof t&&t.indexOf("/")>-1?g([t]):void s():function(){"IMG"===o[0].tagName?(o.removeAttr("src"),o.removeAttr("width"),o.removeAttr("height")):o.css("background-image","");r=!1}()})),n.$watch((function(){return i.size}),(function(t,e){r&&t!==e&&s()})),n.$on("$destroy",(function(){o.off("load.wpAttachment")}))}]}}r.$inject=["app"],o.a.directive("draggableShortcode",i),o.a.directive("toNumber",(function(){return{require:"ngModel",link:function(t,e,n,o){o.$parsers.push((function(t){return""+t})),o.$formatters.push((function(t){return parseFloat(t,10)}))}}})),o.a.directive("wpAttachment",r)},function(t,e,n){var o;
/*! Hammer.JS - v2.0.7 - 2016-04-22
 * http://hammerjs.github.io/
 *
 * Copyright (c) 2016 Jorik Tangelder;
 * Licensed under the MIT license */!function(i,r,s,g){"use strict";var a,c=["","webkit","Moz","MS","ms","o"],A=r.createElement("div"),l=Math.round,C=Math.abs,I=Date.now;function u(t,e,n){return setTimeout(y(t,n),e)}function d(t,e,n){return!!Array.isArray(t)&&(p(t,n[e],n),!0)}function p(t,e,n){var o;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(o=0;o<t.length;)e.call(n,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function h(t,e,n){var o="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=i.console&&(i.console.warn||i.console.log);return r&&r.call(i.console,o,n),t.apply(this,arguments)}}a="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i])}return e}:Object.assign;var f=h((function(t,e,n){for(var o=Object.keys(e),i=0;i<o.length;)(!n||n&&void 0===t[o[i]])&&(t[o[i]]=e[o[i]]),i++;return t}),"extend","Use `assign`."),m=h((function(t,e){return f(t,e,!0)}),"merge","Use `assign`.");function v(t,e,n){var o,i=e.prototype;(o=t.prototype=Object.create(i)).constructor=t,o._super=i,n&&a(o,n)}function y(t,e){return function(){return t.apply(e,arguments)}}function b(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function $(t,e){return void 0===t?e:t}function w(t,e,n){p(S(e),(function(e){t.addEventListener(e,n,!1)}))}function x(t,e,n){p(S(e),(function(e){t.removeEventListener(e,n,!1)}))}function k(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function E(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function O(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var o=0;o<t.length;){if(n&&t[o][n]==e||!n&&t[o]===e)return o;o++}return-1}function D(t){return Array.prototype.slice.call(t,0)}function T(t,e,n){for(var o=[],i=[],r=0;r<t.length;){var s=e?t[r][e]:t[r];O(i,s)<0&&o.push(t[r]),i[r]=s,r++}return n&&(o=e?o.sort((function(t,n){return t[e]>n[e]})):o.sort()),o}function P(t,e){for(var n,o,i=e[0].toUpperCase()+e.slice(1),r=0;r<c.length;){if((o=(n=c[r])?n+i:e)in t)return o;r++}}var j=1;function N(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var M="ontouchstart"in i,L=void 0!==P(i,"PointerEvent"),Y=M&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),R=["x","y"],B=["clientX","clientY"];function _(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){b(t.options.enable,[t])&&n.handler(e)},this.init()}function V(t,e,n){var o=n.pointers.length,i=n.changedPointers.length,r=1&e&&o-i==0,s=12&e&&o-i==0;n.isFirst=!!r,n.isFinal=!!s,r&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,o=e.pointers,i=o.length;n.firstInput||(n.firstInput=G(e));i>1&&!n.firstMultiple?n.firstMultiple=G(e):1===i&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,g=s?s.center:r.center,a=e.center=Q(o);e.timeStamp=I(),e.deltaTime=e.timeStamp-r.timeStamp,e.angle=U(g,a),e.distance=Z(g,a),function(t,e){var n=e.center,o=t.offsetDelta||{},i=t.prevDelta||{},r=t.prevInput||{};1!==e.eventType&&4!==r.eventType||(i=t.prevDelta={x:r.deltaX||0,y:r.deltaY||0},o=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-o.x),e.deltaY=i.y+(n.y-o.y)}(n,e),e.offsetDirection=F(e.deltaX,e.deltaY);var c=z(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=C(c.x)>C(c.y)?c.x:c.y,e.scale=s?(A=s.pointers,l=o,Z(l[0],l[1],B)/Z(A[0],A[1],B)):1,e.rotation=s?function(t,e){return U(e[1],e[0],B)+U(t[1],t[0],B)}(s.pointers,o):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,o,i,r,s=t.lastInterval||e,g=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(g>25||void 0===s.velocity)){var a=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,A=z(g,a,c);o=A.x,i=A.y,n=C(A.x)>C(A.y)?A.x:A.y,r=F(a,c),t.lastInterval=e}else n=s.velocity,o=s.velocityX,i=s.velocityY,r=s.direction;e.velocity=n,e.velocityX=o,e.velocityY=i,e.direction=r}(n,e);var A,l;var u=t.element;k(e.srcEvent.target,u)&&(u=e.srcEvent.target);e.target=u}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function G(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:I(),pointers:e,center:Q(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Q(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,o=0,i=0;i<e;)n+=t[i].clientX,o+=t[i].clientY,i++;return{x:l(n/e),y:l(o/e)}}function z(t,e,n){return{x:e/t||0,y:n/t||0}}function F(t,e){return t===e?1:C(t)>=C(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){n||(n=R);var o=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(o*o+i*i)}function U(t,e,n){n||(n=R);var o=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,o)/Math.PI}_.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(N(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(N(this.element),this.evWin,this.domHandler)}};var W={mousedown:1,mousemove:2,mouseup:4};function H(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,_.apply(this,arguments)}v(H,_,{handler:function(t){var e=W[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var X={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},q={2:"touch",3:"pen",4:"mouse",5:"kinect"},K="pointerdown",J="pointermove pointerup pointercancel";function tt(){this.evEl=K,this.evWin=J,_.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(K="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel"),v(tt,_,{handler:function(t){var e=this.store,n=!1,o=t.type.toLowerCase().replace("ms",""),i=X[o],r=q[t.pointerType]||t.pointerType,s="touch"==r,g=O(e,t.pointerId,"pointerId");1&i&&(0===t.button||s)?g<0&&(e.push(t),g=e.length-1):12&i&&(n=!0),g<0||(e[g]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(g,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function nt(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,_.apply(this,arguments)}function ot(t,e){var n=D(t.touches),o=D(t.changedTouches);return 12&e&&(n=T(n.concat(o),"identifier",!0)),[n,o]}v(nt,_,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var n=ot.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function rt(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},_.apply(this,arguments)}function st(t,e){var n=D(t.touches),o=this.targetIds;if(3&e&&1===n.length)return o[n[0].identifier]=!0,[n,n];var i,r,s=D(t.changedTouches),g=[],a=this.target;if(r=n.filter((function(t){return k(t.target,a)})),1===e)for(i=0;i<r.length;)o[r[i].identifier]=!0,i++;for(i=0;i<s.length;)o[s[i].identifier]&&g.push(s[i]),12&e&&delete o[s[i].identifier],i++;return g.length?[T(r.concat(g),"identifier",!0),g]:void 0}v(rt,_,{handler:function(t){var e=it[t.type],n=st.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});function gt(){_.apply(this,arguments);var t=y(this.handler,this);this.touch=new rt(this.manager,t),this.mouse=new H(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function at(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,ct.call(this,e)):12&t&&ct.call(this,e)}function ct(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var o=this.lastTouches;setTimeout((function(){var t=o.indexOf(n);t>-1&&o.splice(t,1)}),2500)}}function At(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var i=this.lastTouches[o],r=Math.abs(e-i.x),s=Math.abs(n-i.y);if(r<=25&&s<=25)return!0}return!1}v(gt,_,{handler:function(t,e,n){var o="touch"==n.pointerType,i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(o)at.call(this,e,n);else if(i&&At.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var lt=P(A.style,"touchAction"),Ct=void 0!==lt,It=function(){if(!Ct)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||i.CSS.supports("touch-action",n)})),t}();function ut(t,e){this.manager=t,this.set(e)}ut.prototype={set:function(t){"compute"==t&&(t=this.compute()),Ct&&this.manager.element.style&&It[t]&&(this.manager.element.style[lt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return p(this.manager.recognizers,(function(e){b(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(E(t,"none"))return"none";var e=E(t,"pan-x"),n=E(t,"pan-y");if(e&&n)return"none";if(e||n)return e?"pan-x":"pan-y";if(E(t,"manipulation"))return"manipulation";return"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var o=this.actions,i=E(o,"none")&&!It.none,r=E(o,"pan-y")&&!It["pan-y"],s=E(o,"pan-x")&&!It["pan-x"];if(i){var g=1===t.pointers.length,a=t.distance<2,c=t.deltaTime<250;if(g&&a&&c)return}if(!s||!r)return i||r&&6&n||s&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};function dt(t){this.options=a({},this.defaults,t||{}),this.id=j++,this.manager=null,this.options.enable=$(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function pt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function ht(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function ft(t,e){var n=e.manager;return n?n.get(t):t}function mt(){dt.apply(this,arguments)}function vt(){mt.apply(this,arguments),this.pX=null,this.pY=null}function yt(){mt.apply(this,arguments)}function bt(){dt.apply(this,arguments),this._timer=null,this._input=null}function $t(){mt.apply(this,arguments)}function wt(){mt.apply(this,arguments)}function xt(){dt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function kt(t,e){return(e=e||{}).recognizers=$(e.recognizers,kt.defaults.preset),new Et(t,e)}dt.prototype={defaults:{},set:function(t){return a(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=ft(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)||(t=ft(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return-1===O(e,t=ft(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=ft(t,this);var e=O(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function o(n){e.manager.emit(n,t)}n<8&&o(e.options.event+pt(n)),o(e.options.event),t.additionalEvent&&o(t.additionalEvent),n>=8&&o(e.options.event+pt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=a({},t);if(!b(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},v(mt,dt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,o=6&e,i=this.attrTest(t);return o&&(8&n||!i)?16|e:o||i?4&n?8|e:2&e?4|e:2:32}}),v(vt,mt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,n=!0,o=t.distance,i=t.direction,r=t.deltaX,s=t.deltaY;return i&e.direction||(6&e.direction?(i=0===r?1:r<0?2:4,n=r!=this.pX,o=Math.abs(t.deltaX)):(i=0===s?1:s<0?8:16,n=s!=this.pY,o=Math.abs(t.deltaY))),t.direction=i,n&&o>e.threshold&&i&e.direction},attrTest:function(t){return mt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=ht(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),v(yt,mt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),v(bt,dt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,o=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!o||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=u((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=I(),this.manager.emit(this.options.event,this._input)))}}),v($t,mt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),v(wt,mt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return vt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:24&n&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&C(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=ht(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),v(xt,dt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,o=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&i&&n){if(4!=t.eventType)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||Z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&r?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=u((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=u((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),kt.VERSION="2.0.7",kt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[$t,{enable:!1}],[yt,{enable:!1},["rotate"]],[wt,{direction:6}],[vt,{direction:6},["swipe"]],[xt],[xt,{event:"doubletap",taps:2},["tap"]],[bt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Et(t,e){var n;this.options=a({},kt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(L?tt:Y?rt:M?gt:H))(n,V),this.touchAction=new ut(this,this.options.touchAction),St(this,!0),p(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function St(t,e){var n,o=t.element;o.style&&(p(t.options.cssProps,(function(i,r){n=P(o.style,r),e?(t.oldCssProps[n]=o.style[n],o.style[n]=i):o.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}Et.prototype={set:function(t){return a(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var o=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(i=e.curRecognizer=null);for(var r=0;r<o.length;)n=o[r],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(i=e.curRecognizer=n),r++}},get:function(t){if(t instanceof dt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(d(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(d(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=O(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(void 0!==t&&void 0!==e){var n=this.handlers;return p(S(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(void 0!==t){var n=this.handlers;return p(S(t),(function(t){e?n[t]&&n[t].splice(O(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=r.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<n.length;)n[o](e),o++}},destroy:function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},a(kt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Et,Input:_,TouchAction:ut,TouchInput:rt,MouseInput:H,PointerEventInput:tt,TouchMouseInput:gt,SingleTouchInput:nt,Recognizer:dt,AttrRecognizer:mt,Tap:xt,Pan:vt,Swipe:wt,Pinch:yt,Rotate:$t,Press:bt,on:w,off:x,each:p,merge:m,extend:f,assign:a,inherit:v,bindFn:y,prefixed:P}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=kt,void 0===(o=function(){return kt}.call(e,n,e,t))||(t.exports=o)}(window,document)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},,function(t,e,n){t.exports=n(71)},function(t,e,n){"use strict";n.r(e),function(t){n(28),n(31),n(66),n(65),n(32),n(64),n(41),n(72);var e=n(1),o=n(9);n(61),n(76),n(104),n(105),n(78),n(79),n(106),n(80),n(81),n(82),n(107),n(83),n(84),n(102),n(85),n(86),n(108),n(87),n(109),n(88),n(62),n(89),n(101),n(90),n(91),n(92);for(var i in t.UxBuilder=e.b,e.a.run(["$window",function(t){var e=t.uxBuilderData;e.history=[],e.enabled=!0,e.currentAction=-1}]),e.a.requires.push("ngAnimate"),e.a.requires.push("ui.router"),e.a.requires.push("app.filters"),e.a.requires.push("app.services"),o.a.modules.master)e.a.requires.push(o.a.modules.master[i])}.call(this,n(4))},function(t,e,n){"use strict";var o=n(1);function i(t,e,n,o){var i=t.defer();return e.initialized?i.resolve(!0):(n.$on(o.READY,(function(){return i.resolve(!0)})),i.promise)}i.$inject=["$q","store","$rootScope","AppEvent"],o.a.config(["$stateProvider","$urlRouterProvider",function(t,e){t.state("home",{url:"/",template:n(25).default,controller:n(73).default,controllerAs:"$ctrl",resolve:{factory:i}}).state("shortcode",{url:"/shortcode/:id",template:n(27).default,controller:n(74).default,controllerAs:"$ctrl",resolve:{factory:i}}).state("settings",{url:"/settings",template:n(26).default,controller:n(75).default,controllerAs:"$ctrl",resolve:{factory:i}}).state("add",{url:"/add",template:"<div>ADD</div>",resolve:{factory:i}}),e.otherwise("/")}])},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g}));var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=function(){function t(e,n,o,r,s){i()(this,t),this.app=e,this.store=n,this.utils=o,this.Shortcode=r,this.$log=s,this.permissions=angular.copy(this.store.permissions)}return t.$inject=["app","store","utils","Shortcode","$log"],s()(t,[{key:"save",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publish";if(this.permissions.save){var e={status:t,id:this.store.post.id,attributes:this.store.post.attributes.values,meta:this.store.post.meta.values,content:this.Shortcode.copy(this.store.postContent)};this.$log.debug("Saving",e),this.store.isSaving=t,this.store.isSaved=!1,jQuery.post(this.store.ajaxUrl,{action:"ux_builder_save",data:angular.toJson(e),security:this.store.nonce}).done(this.onSaveSuccess.bind(this)).fail(this.onSaveFail.bind(this))}}},{key:"onSaveSuccess",value:function(t){t.success;var e=t.data;e?(this.$log.info("Post was saved",e),this.store.post.status=e.post.post_status,this.store.saveButton=e.save_button,this.store.isSaved=!0):this.$log.warn("An error occurred while saving post"),this.store.isSaving=!1,this.app.apply()}},{key:"onSaveFail",value:function(t){this.$log.error(t),this.store.isSaving=!1,this.app.apply()}},{key:"getOptionName",value:function(t,e){for(var n in e){if("group"===e[n].type)return this.getOptionName(t,e[n].options);if(e[n].$name===t)return e[n].$orgName}return t}},{key:"saveButtonText",get:function(){return this.store.saveButton}}]),t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g}));var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=function(){function t(e,n,o,r,s,g,a,c,A){var l=this;i()(this,t),this.app=e,this.store=n,this.utils=o,this.$scope=s,this.shortcode=null,this.options=null,this.previousOptions=null,this.previousContent=null,this.responsiveHelper=a,this.currentHistoryAction=n.currentAction,n.shortcode[r.id]?this.configure(n.shortcode[r.id]):g((function(){return l.exit()}),0,!1),s.$on(c.MOVED,(function(t,e){l.shortcode.$id===e.$id&&(l.shortcode=e)})),s.$on(c.RECOMPILED,(function(t,e){l.shortcode.$id===e.$id&&(l.shortcode=e,l.app.selectShortcode(e))})),s.$on("$destroy",(function(){l.shortcode=null,l.options=[],l.previousOptions=null,l.previousContent=null,l.currentHistoryAction=null}))}return t.$inject=["app","store","utils","$stateParams","$scope","$timeout","ResponsiveHelper","ShortcodeEvent","DragEvent"],s()(t,[{key:"configure",value:function(t){this.shortcode!==t&&(this.shortcode&&this.clear(),this.options=[],this.shortcode=t,this.shortcode.states.active=!0,this.app.selectShortcode(t),this.shortcode.content&&(this.previousContent=this.shortcode.content),this.shortcode.data.options.tree.length&&(this.options=this.shortcode.data.options.tree,this.responsiveValues=this.shortcode.options.$responsive,this.previousOptions=angular.copy(this.shortcode.options)))}},{key:"exit",value:function(){this.app.goto("/")}},{key:"discard",value:function(){if(this.store.$disable(),this.previousContent&&(this.shortcode.content=this.previousContent),this.previousOptions)for(var t in this.shortcode.options)"$"!==t.charAt(0)&&(this.previousOptions.hasOwnProperty(t)?this.shortcode.options[t]=this.previousOptions[t]:delete this.shortcode.options[t]);this.store.$resetToAction(this.currentHistoryAction),this.store.$enable(),this.exit()}}]),t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return g}));var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=function(){function t(e,n,o,r,s,g){var a=this;i()(this,t),this.app=e,this.store=n,this.post=n.post,this.templates=o,this.modal=r,this.manager=s,this.customTemplateName="",g.$watchCollection((function(){return a.post.attributes.values}),(function(t,e){t!==e&&(a.store.isSaved=!1)})),g.$watchCollection((function(){return a.post.meta.values}),(function(t,e){t!==e&&(a.store.isSaved=!1)}))}return t.$inject=["app","store","templates","modal","Shortcode","$scope"],s()(t,[{key:"saveAsTemplate",value:function(){this.templates.saveTemplate(this.store.postContent)}},{key:"clearContent",value:function(){if(!0===confirm("Are you sure you want to clear all content?")){var t=this.store.postContent.copy((function(t,e){t.$id=e.$id}));this.store.$addAction("removeContent",{key:"removeContent",content:t.children}),this.manager.remove(this.store.postContent,!1)}}},{key:"exit",value:function(){this.app.goto("/")}}]),t}()},function(t,e,n){"use strict";n(1).a.component("addShortcode",{controller:n(77).default,template:n(20).default,require:{stack:"^appStack"},bindings:{shortcode:"<",index:"<"}})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return I}));var o=n(5),i=n.n(o),r=n(0),s=n.n(r),g=n(2),a=n.n(g);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function A(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}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 r,s=!0,g=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){g=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(g)throw r}}}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var I=function(){function t(e,n,o,i,r,g,a,c,A,l){var C=this;s()(this,t),this.app=e,this.store=n,this.templates=o,this.presetCache=i,this.manager=r,this.type="shortcodes",this.query="",this.orderBy="name",this.category=null,this.categories=[],this.items=[],this.items_=[],this.filter={name:""},this.isLoading=!1,this.errorMessage="",this.$scope=g,this.$element=a,this.$timeout=c,this.$iframe=A,this.$placeholder=angular.element('<div class="uxb-placeholder"></div>'),this.ShortcodeEvent=l,g.$on("flatsome-studio-imported",(function(t,e){e.content.children.forEach((function(t){C.addShortcode(t,!1),C.index++})),c((function(){return C.stack.close()}))}));var I=function(t,e){C.presetCache.put(e.tag,e.presets),C.addedShortcode&&C.addedShortcode.tag===e.tag&&(C.addedShortcode.data.hasPresets=e.presets.length>0,C.presets=e.presets)};g.$on("template-saved",I),g.$on("template-removed",I)}return t.$inject=["app","store","templates","presetCache","Shortcode","$scope","$element","$timeout","$iframe","ShortcodeEvent"],a()(t,[{key:"$onInit",value:function(){var t=this;if(this.showType("shortcodes"),_.each(this.items,(function(e){_.each(e.items,(function(n,o){var i=function t(e){var n=[];return _.each(e.children,(function(e){n.push(e),n=_.union(n,t(e))})),n}(n.presets[0].content);i.unshift(n.presets[0].content),_.each(i,(function(n){t.shortcode.tag===n.tag&&!1===t.store.shortcodes[n.tag].nested&&e.items.splice(o,1)}))}))})),1===this.items.length&&1===this.items[0].items.length)return this.add(this.items[0].items[0],0);this.$timeout((function(){t.$element.find(".filter-elements").focus()}),100),this.$timeout((function(){t.shortcode.childAt(t.index)?(t.shortcode.childAt(t.index).$element.before(t.$placeholder),t.$timeout((function(){return t.scrollToElement(t.$placeholder)}),100)):t.shortcode.childAt(t.index-1)?(t.shortcode.childAt(t.index-1).$element.after(t.$placeholder),t.$timeout((function(){return t.scrollToElement(t.$placeholder)}),100)):t.scrollToElement(t.shortcode.$element)}),200)}},{key:"$onDestroy",value:function(){var t=this;if(this.addedShortcode){var e=this.addedShortcode;this.$timeout((function(){t.app.selectShortcode(e),t.app.configureShortcode(e)}),150)}this.categories=[],this.items=[],this.type="shortcodes",this.category=null,this.addedShortcode=null,this.index=null,this.presets=null,this.currentPreset=null,this.filter.name="",this.errorMessage="",this.isLoading=!1,this.app.freeze(!1),this.$placeholder.remove(),this.$placeholder=null,this.$element.removeClass("visible is-showing-presets")}},{key:"add",value:function(t,e){this.addedShortcode=this.addShortcode(angular.copy(t.presets[e].content)),this.app.broadcast(this.ShortcodeEvent.ADDED,this.addedShortcode),this.$placeholder.detach(),this.loadPresets(this.addedShortcode)}},{key:"loadPresets",value:function(){var t=this,e=this.addedShortcode.tag,n=this.addedShortcode.index,o=this.presetCache.get(e),i=function(o){if(t.presetCache.put(e,o),o.length<=1)t.stack.close();else{var i,r=l(o);try{for(r.s();!(i=r.n()).done;){var s=i.value;if(!0!==s.custom){t.currentPreset=o.indexOf(s);break}}}catch(t){r.e(t)}finally{r.f()}t.$element.scrollTop(0),t.$element.addClass("is-showing-presets"),t.presets=o,t.index=n}};Array.isArray(o)?o.length?i(o):this.stack.close():(this.isLoading=e,jQuery.get(this.store.ajaxUrl,{action:"ux_builder_parse_presets",tag:e}).done((function(e){var n=e.data;i(n.presets||[]),t.isLoading=!1,t.$scope.$apply()})).fail((function(e){i([]),t.errorMessage=e.message,t.isLoading=!1,t.$scope.$apply()})))}},{key:"showType",value:function(t){this.type=t,this.category=null,this.items=this.getItems(this.type),this.categories=_.keys(this.items)}},{key:"showFlatsomeStudio",value:function(){this.shortcode.isRoot&&(this.store.showFlatsomeStudio=!this.store.showFlatsomeStudio)}},{key:"getItems",value:function(t,e){var n=this,o=[],i=_.chain(this.shortcode.allowed).sortBy((function(t){return t.name})).sortBy((function(t){return n.shortcode.data.allow.length?n.shortcode.data.allow.indexOf(t.tag)-n.shortcode.data.allow.length:t.priority})).value();return i=_.filter(i,(function(t){return!e||t.category===e})),i=_.filter(i,(function(t){return"ux_gutenberg"!==t.tag})),i=_.groupBy(i,(function(t){return t.category})),_.each(i,(function(t,e){o.push({name:e,items:t})})),o}},{key:"showCategory",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.category=t,this.items=this.getItems(this.type,t)}},{key:"usePreset",value:function(t){var e=A(A({},t),{},{$id:this.addedShortcode.$id});this.manager.remove(this.addedShortcode,!1),this.addedShortcode=this.addShortcode(e,!0)}},{key:"removePreset",value:function(t){var e=this;this.templates.remove(t).catch((function(t){e.errorMessage=t.message}))}},{key:"scrollToElement",value:function(t){this.$iframe().contents().find("body").scrollToElement(t)}},{key:"addShortcode",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.shortcode.addChild(t,this.index);return o.$$new=!0,n&&o.data.scrollTo&&this.$timeout((function(){e.$iframe().contents().find("body").scrollToElement(o.$element)}),0,!1),o}},{key:"flatsomeStudioIsActive",get:function(){return this.shortcode.isRoot&&this.store.flatsomeStudioUrl}}]),t}()},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(1),s=function t(e){i()(this,t),this.app=e};s.$inject=["app"],s.$inject=["app"],r.a.component("appContent",{controller:s,template:"\n    <app-content-iframe></app-content-iframe>\n    <app-content-toolbar></app-content-toolbar>\n  "})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(1),s=function t(e,n,o,r,s,g,a,c,A,l,C,I){var u=this;i()(this,t),this.app=e,this.store=n,this.targets=o,this.iframe=r,this.$timeout=a,this.Shortcode=A,this.IframeEvent=I,this.loading=!1;var d=this.store.post.meta.options.flat,p=this.store.post.meta.values;s.$watchCollection((function(){return p}),(function(t,e){if(u.store.initialized&&t!==e){var n={},o=!1;for(var i in d){var r=d[i];t[r.$name]!==e[r.$name]&&(n[r.$name]=t[r.$name],r.reload&&(o=!0))}o&&u.iframe.reload()}})),s.$on(l.READY,(function(){return u.loading=!1})),s.$on(C.PAN_START,(function(){return g.find(".iframe-overlay").removeClass("hidden")})),s.$on(C.PAN_END,(function(){return g.find(".iframe-overlay").addClass("hidden")}))};s.$inject=["app","store","targets","iframe","$scope","$element","$timeout","$window","Shortcode","AppEvent","DragEvent","IframeEvent"],s.$inject=["app","store","targets","iframe","$scope","$element","$timeout","$window","Shortcode","AppEvent","DragEvent","IframeEvent"],r.a.component("appContentIframe",{controller:s,template:'\n    <iframe class="iframe-frame" ng-attr-src="{{ $ctrl.store.iframeUrl }}"></iframe>\n    <div class="iframe-overlay hidden"></div>\n    <ux-loader loading="$ctrl.loading"></ux-loader>\n  '})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=n(1),a=function(){function t(e,n){var o=this;i()(this,t),this.app=e,this.currentChild=null,_.each(this.shortcode.children,(function(t){t.states.active&&(o.currentChild=t)})),n.$watch((function(){return e.states.selectedShortcode}),(function(t){if(!t)return o.currentChild=null;for(var e=0;e<o.shortcode.children.length;e++)t.isSelfOrDescendantOf(o.shortcode.children[e])&&(o.currentChild=o.shortcode.children[e])}))}return t.$inject=["app","$scope"],s()(t,[{key:"selectShortcode",value:function(t){this.currentChild!==t&&(this.currentChild=t,this.app.selectShortcode(t),this.app.configureShortcode(null))}},{key:"configureShortcode",value:function(t){this.app.configureShortcode(t)}},{key:"getThumbnail",value:function(t){var e=t.data.toolbarThumbnail;return t.options[e]||e||null}}]),t}();g.a.component("childrenSelector",{controller:a,bindings:{shortcode:"="},template:'\n  <ul class="">\n    <li ng-repeat="shortcode in $ctrl.shortcode.children"\n      draggable-shortcode="shortcode"\n      draggable-options="{\n        targets: [\n          { name: \'left\', addable: false },\n          { name: \'right\', addable: false }\n        ]\n      }">\n      <button type="button"\n        ng-click="$ctrl.selectShortcode(shortcode)"\n        ng-dblclick="$ctrl.configureShortcode(shortcode)"\n        ng-class="{ \'active\': shortcode === $ctrl.currentChild }"\n        wp-attachment="$ctrl.getThumbnail(shortcode)"\n        wp-attachment-size="\'thumbnail\'">\n        {{:: shortcode.data.name }}\n      </button>\n    </li>\n    <li>\n      <add-button\n        index="$ctrl.shortcode.children.length"\n        shortcode="$ctrl.shortcode">\n      </add-button>\n    </li>\n  </ul>\n  '})},function(t,e,n){"use strict";n(1).a.component("appLoader",{controller:["$scope","store","$element",function(t,e,n){t.$watch((function(){return e.loading}),(function(t){return n.toggleClass("loading",t)}))}],template:'\n    <div class="app-loader-message">\n\t    <div class="loading-spinner"></div>\n      <p>Loading UX Builder</p>\n    </div>\n  '})},function(t,e,n){"use strict";n(1).a.component("appModal",{controller:["modal","$element",function(t,e){this.hide=function(){t.hide(this.id)},e.on("contextmenu",(function(t){t.stopPropagation()}),!1)}],bindings:{id:"@",title:"@"},transclude:!0,template:'\n    <div class="app-modal" id="{{ $ctrl.id }}-modal" ng-click="$event.stopPropagation()">\n      <div class="app-modal-content">\n        <button class="app-modal-close" ng-click="$ctrl.hide()">&times;</button>\n        <div class="app-modal-title">{{ $ctrl.title }}</div>\n        <div class="app-modal-body">\n          <ng-transclude></ng-transclude>\n        </div>\n        <div class="app-modal-error error"></div>\n      </div>\n    </div>\n  '})},function(t,e,n){"use strict";n(1).a.component("appSidebarView",{transclude:{header:"?viewHeader",body:"?viewBody",footer:"?viewFooter"},template:'\n    <div class="view-header" ng-transclude="header"></div>\n    <div class="view-body" ng-transclude="body"></div>\n    <div class="view-footer" ng-transclude="footer"></div>\n  '})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=n(1),a=function(){function t(e,n,o,r,s,g){i()(this,t),this.app=e,this.store=n,this.$element=o,this.$compile=r,this.$timeout=s,this.$scope=g,this.$wrapper=o.find(".wrapper-inner"),this.$loader=o.find(".loading-spinner"),this.currentScope=null,this.readyTimeout=null,this.app.register("stack",this)}return t.$inject=["app","store","$element","$compile","$timeout","$scope"],s()(t,[{key:"open",value:function(t,e,n){var o=this;this.app.freeze(!0),this.store.$set("stack",this),this.app("tools").hide(),this.$wrapper.empty(),this.$element.toggleClass("stack--large","large"===n),this.$element.addClass("is-visible"),this.$loader.addClass("is-visible"),this.readyTimeout=this.$timeout((function(){o.$loader.removeClass("is-visible"),o.$compile(t)(e?e.$new():o.$scope,(function(t,e){o.currentScope=e,o.$wrapper.append(t),o.$wrapper.addClass("is-visible")}))}),300)}},{key:"close",value:function(){this.app.freeze(!1),this.store.$set("stack",!1),this.$element.removeClass("is-visible"),this.$wrapper.removeClass("is-visible").empty(),this.$timeout.cancel(this.readyTimeout),this.currentScope&&this.currentScope.$destroy()}}]),t}();g.a.component("appStack",{controller:a,template:'\n    <div class="backdrop" ng-click="$ctrl.close()"></div>\n    <div class="wrapper">\n      <div class="loading-spinner"></div>\n      <button type="button" class="close" ng-click="$ctrl.close()">&times;</button>\n      <div class="wrapper-inner"></div>\n    </div>\n  '})},function(t,e,n){"use strict";n(1).a.component("draggableHelper",{template:"\n    <h3><span></span></h3>\n  "})},function(t,e,n){"use strict";n(1).a.component("flatsomeStudio",{controller:["app","store","$scope","$timeout","$q",function(t,e,n,o,i){var r=this;this.store=e,this.isInitialized=!1,this.isImporting=!1,this.isActive=!1,this.processed=0,this.progress=0,this.steps=0,this.importImages=!0,this.errors=[],this.content=null,this.images=null,this.title=null,n.$watch((function(){return e.showFlatsomeStudio}),(function(t){t&&(r.isInitialized=!0)})),this.onMessage=function(e){/^http(s)?:\/\/demos.uxthemes.com/.test(e.origin)&&"success"===e.data.status&&(r.content=e.data.data.content,r.images=e.data.data.images,r.title=e.data.data.title,r.steps=Object.keys(r.images).length+1,r.isActive=!0,1===r.steps&&r.import(),t.apply())},this.import=function(){if(r.isImporting=!0,r.progress=0,r.errors=[],1===r.steps||!r.importImages)return r.content=r.content.replace(/{{{.+}}}/g,""),r.addShortcode(r.content);var n=i.when(),o=function(o){n=n.then((function(){return jQuery.post(e.ajaxUrl,{action:"ux_builder_import_media",url:r.images[o],id:o}).then((function(e){var n=e.data,i=e.success;r.processed++,r.progress=Math.round(r.processed/r.steps*100),i&&n?r.content=r.content.replace("{{{".concat(o,"}}}"),n.id):i||r.errors.unshift([r.images[o],n?n.message:""]),t.apply()}))})).catch((function(t){r.processed++,r.progress=Math.round(r.processed/r.steps*100),r.errors.unshift([r.images[o],t.statusText])}))};for(var s in r.images)o(s);n=n.then((function(){r.addShortcode(r.content)}))},this.hide=function(){r.isActive=!1,r.isImporting=!1,r.content=null,r.images=null,r.title=null,r.errors=[],r.store.showFlatsomeStudio=!1},this.addShortcode=function(n){return jQuery.post(e.ajaxUrl,{action:"ux_builder_to_array",content:n.replace(/\{{3}\d+\}{3}/,"")}).done((function(e){var n=e.data;e.success;r.progress=100,t.apply(),o((function(){r.steps=0,r.processed=0,r.errors.length||r.hide(),t.broadcast("flatsome-studio-imported",n)}),250)}))},window.addEventListener("message",this.onMessage,!1)}],template:'\n    <div class="flatsome-studio" ng-show="$ctrl.store.showFlatsomeStudio" ng-if="$ctrl.isInitialized">\n      <iframe class="flatsome-studio__iframe" ng-attr-src="{{ $ctrl.store.flatsomeStudioUrl | trusted: \'resourceUrl\' }}" frameborder="0"></iframe>\n      <button class="flatsome-studio__close" ng-click="$ctrl.store.showFlatsomeStudio = false">&times;</button>\n\n      <div class="flatsome-studio__overlay" ng-if="$ctrl.isActive">\n        <div class="flatsome-studio__box">\n          <h5 class="flatsome-studio__box-title">\n            Import\n          </h5>\n          <h2 class="flatsome-studio__box-title">\n            {{ $ctrl.title }}\n          </h2>\n          <div class="flatsome-studio__box-content" ng-if="!$ctrl.isImporting">\n            <label class="flatsome-studio__setting" ng-if="$ctrl.steps > 1">\n              <input type="checkbox" ng-model="$ctrl.importImages" />\n              Import images ({{ $ctrl.steps - 1 }})\n            </label>\n            <div class="flatsome-studio__actions">\n              <button class="wp-style" ng-click="$ctrl.isActive = false">Cancel</button>\n              <button class="wp-style alt" ng-click="$ctrl.import()">Start</button>\n            </div>\n          </div>\n          <div class="flatsome-studio__box-content is-importing" ng-if="$ctrl.isImporting">\n            <div class="flatsome-studio__progress">\n              <div class="flatsome-studio__progress-bar" ng-style="{ width: $ctrl.progress + \'%\' }">\n                {{ $ctrl.progress }}%\n              </div>\n            </div>\n            <div ng-if="$ctrl.errors.length" class="flatsome-studio__box-errors">\n              <h4>Some images could not be imported:</h4>\n              <ul>\n                <li ng-repeat="error in $ctrl.errors track by $index" class="error">\n                  {{ error[0] }} ({{ error[1] }})\n                </li>\n              </ul>\n              <button ng-if="$ctrl.steps === $ctrl.processed" class="wp-style alt" ng-click="$ctrl.hide()">\n                Okay\n              </button>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  '})},function(t,e,n){"use strict";n(1).a.component("shortcodeHierarchyList",{controller:function(){"_root"==this.shortcode.tag?this.label="Add elements":this.label="Add to ".concat(this.shortcode.data.name)},template:'\n    <shortcode-hierarchy-list-item\n      ng-repeat="shortcode in $ctrl.shortcode.children"\n      shortcode="shortcode">\n    </shortcode-hierarchy-list-item>\n    <div class="hierarchy-empty"\n      ng-if="$ctrl.shortcode.isParent">\n      <add-button\n        shortcode="$ctrl.shortcode"\n        index="$ctrl.shortcode.children.length"\n        label="{{:: $ctrl.label }}">\n      </add-button>\n    </div>\n  ',bindings:{shortcode:"<"}})},function(t,e,n){"use strict";n(1).a.component("templateImporter",{controller:["app","store",function(t,e){this.value="",this.import=function(){var t=this;jQuery.post(e.ajaxUrl,{action:"ux_builder_to_array",content:this.value}).done((function(e){var n=e.data;if(!e.success)return console.error("Failed to compile template");n.content.children.forEach((function(e){t.manager.addShortcode(e,!1),t.manager.index++})),t.manager.stack.close()}))}}],require:{manager:"^addShortcode"},template:'\n    <div class="template-importer">\n      <div class="option">\n        <textarea style="height: 300px; margin-top: 30px; margin-bottom: 15px" ng-model="$ctrl.value" placeholder="Insert exported code here or Shortcodes"></textarea>\n      </div>\n      <button type="button" class="wp-style alt button-large button-block" ng-click="$ctrl.import()">\n        Import\n      </button>\n    </div>\n  '})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(1),s=function t(e,n){var o=this;i()(this,t),e.$watch((function(){return o.loading}),(function(t){n.toggleClass("loading",!!t)}))};s.$inject=["$scope","$element"],s.$inject=["$scope","$element"],r.a.component("uxLoader",{controller:s,bindings:{loading:"<"}})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=n(1),a=function(){function t(e){i()(this,t),this.$scope=e}return t.$inject=["$scope"],s()(t,[{key:"validOptionConditions",value:function(t){if(t.require&&this.shortcode){if("string"==typeof t.require&&this.shortcode.parent.tag!==t.require)return!1;if(angular.isArray(t.require)&&t.require.indexOf(this.shortcode.parent.tag)<0)return!1}return!t.conditions||this.$scope.$eval(t.conditions)}}]),t}();g.a.component("uxOptions",{controller:a,bindings:{options:"<",shortcode:"<",responsive:"=",model:"="},template:'\n      <p ng-if="$ctrl.options.length === 0">No options</p>\n      <ux-option class="option"\n        ng-repeat="option in $ctrl.options track by option.$id"\n        option="option"\n        model="$ctrl.model[option.$name]"\n        ng-if="$ctrl.validOptionConditions(option)"\n        ng-class="{\n          \'option-{{:: option.type }}\': true,\n          \'option-name-{{:: option.$orgName }}\': true,\n          \'is-responsive\': option.responsive,\n          \'is-full-width\': option.fullWidth\n        }">\n      </ux-option>\n    '})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=n(1),a=function(){function t(e,n,o){i()(this,t),this.wpEditor=o,this.wpEditorUrl=n.wpEditorUrl,e.register("wp-editor",this)}return t.$inject=["app","store","wpEditor"],s()(t,[{key:"open",value:function(){this.wpEditor.open()}},{key:"close",value:function(){this.wpEditor.close()}}]),t}();g.a.component("wpEditor",{controller:a,template:'\n    <div class="backdrop" ng-click="$ctrl.close()"></div>\n    <div class="wrapper">\n      <div class="loading-spinner"></div>\n      <button type="button" class="close" ng-click="$ctrl.close()">&times;</button>\n      <div class="wrapper-inner">\n        <iframe class="wp-editor" ng-attr-src="{{ $ctrl.wpEditorUrl }}" scrolling="no" frameborder="0"></iframe>\n      </div>\n    </div>\n  '})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(1),s=function t(e,n,o){i()(this,t),this.wpMediaUrl=n.wpMediaUrl};s.$inject=["app","store","wpMedia"],s.$inject=["app","store","wpMedia"],r.a.component("wpMedia",{controller:s,template:'\n    <div class="wp-media-wrapper">\n      <iframe class="wp-media" ng-attr-src="{{ $ctrl.wpMediaUrl }}" scrolling="no" frameborder="0"></iframe>\n    </div>\n  '})},,,,,,,,,function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(2),s=n.n(r),g=n(1);function a(t,e){return A(t)+(l(t)||e)}function c(t,e,n){var o=A(e),i=a(e,n),r=(A(t)||o)+(l(t)||n);return r!==i?r:i}function A(t){if(""===t)return t;var e=String(t).match(/[\d\.]+/g);return e&&"-"===String(t).charAt(0)&&(e*=-1),e?parseFloat(e,10).toFixed(C(e)):""}function l(t){var e=String(t).match(/\D+$/g);return!!(e&&e.length&&["em","ex","ch","rem","vw","vh","vmin","vmax","%","cm","mm","in","px","pt","pc"].indexOf(e[0])>-1)&&e[0]}function C(t){var e=String(t).split(".");return e.length>1?e[1].length:0}function I(t){return{restrict:"A",require:"ngModel",scope:{option:"=scrubfield"},link:function(e,n,o,i){var r=e.option,s=t(n.get(0),{cssProps:{}}),g=a(r.default,r.unit),I=r.unit,u=!1,d=null;i.$render=function(){n[0].value=i.$viewValue!==g||u?i.$viewValue:""},n.on("blur",(function(t){d=A(t.currentTarget.value),I=l(t.currentTarget.value)||r.unit,i.$setViewValue(d?d+I:""),i.$render()})),s.get("pan").set({threshold:0}),s.on("panstart",(function(t){d=parseFloat(A(i.$viewValue||r.default),10)||0,I=l(i.$viewValue)||l(r.default)||r.unit,n.addClass("scrubbing"),u=!0})),s.on("panup panright pandown panleft",(function(t){if(u){var e=(t.deltaX+-1*t.deltaY)/2,n=d,o=r.step||1,s=C(o);n=(d+e*o).toFixed(s),n=angular.isDefined(r.min)&&n<=r.min?r.min:n,n=angular.isDefined(r.max)&&n>=r.max?r.max:n,i.$setViewValue(c(n,r.default,I)),i.$render()}})),s.on("panend",(function(t){n.removeClass("scrubbing"),u=!1,d=null,i.$render()})),e.$on("$destroy",(function(){s.destroy(),s=null}))}}}I.$inject=["hammer"];var u={controller:function(){function t(e,n,o){var r=this;i()(this,t),this.app=e,this.$colorpicker=n.find(".option-colorpicker-input"),o.$watch((function(){return r.model}),(function(t,e){r.$colorpicker.spectrum("set",t)}))}return t.$inject=["app","$element","$scope"],s()(t,[{key:"$onInit",value:function(){var t=this;this.$colorpicker.spectrum({color:this.model,allowEmpty:!0,showInput:!0,showAlpha:"hex"!==this.option.format,preferredFormat:this.option.format||"rgb",move:function(e){return t.setColor(e)},hide:function(e){return t.setColor(e)}})}},{key:"$onDestroy",value:function(){this.$colorpicker.spectrum("destroy"),this.$colorpicker=null}},{key:"setColor",value:function(t){this.model=t?t.toString():null,this.$optionsCtrl.shortcode?this.$optionsCtrl.shortcode.apply():this.app.apply()}}]),t}(),require:{$optionsCtrl:"^uxOptions"},bindings:{option:"<",model:"="},template:'\n    <input class="option-colorpicker-input" type="text" ng-model="$ctrl.model">\n  '},d={controller:function(){function t(e,n,o,r,s,g){var a=this;i()(this,t),this.app=e,this.wpEditor=n,this.$scope=o,this.$element=s,o.$on("$destroy",(function(){a.$element=null}))}return t.$inject=["app","wpEditor","$scope","$window","$element","$timeout"],s()(t,[{key:"openTextEditor",value:function(){this.wpEditor.open()}}]),t}(),require:{$optionsCtrl:"^uxOptions"},bindings:{option:"<",model:"="},template:'\n    <div class="option-text-editor">\n      <button type="button" class="open-editor wp-style alt"\n        ng-click="$ctrl.openTextEditor()">\n        Open Text Editor\n      </button>\n      <textarea class="raw-text"\n        ng-model="$ctrl.app.states.selectedShortcode.content">\n      </textarea>\n    </div>\n  '},p=n(67),h=n.n(p),f={controller:function(){function t(e,n,o,r,s,g){var a=this;i()(this,t),this.app=e,this.wpMedia=n,this.$scope=o,this.$element=s,this.$focusPoint=s.find(".focus-point"),this.modal=this.wpMedia.media({title:"Select or Upload image",button:{text:"Use this image"},library:{type:"image"},multiple:!1}),this.modal.on("close",(function(){a.wpMedia.close()})),this.modal.on("select",(function(){a.model=a.modal.state().get("selection").first().toJSON().id,a.wpMedia.close(),e.apply()})),this.option.bgPosition&&g((function(){return a.setupFocusPoint()}),0,!1),o.$on("$destroy",(function(){a.option.bgPosition&&a.draggableFocusPoint.destroy(),a.modal.detach(),a.modal=null,a.$focusPoint=null,a.$element=null}))}return t.$inject=["app","wpMedia","$scope","$window","$element","$timeout"],s()(t,[{key:"openMediaModal",value:function(){this.modal.open(),this.wpMedia.open()}},{key:"thumbSize",value:function(){return this.option.thumbSize?this.$optionsCtrl.model[this.option.thumbSize]:"thumbnail"}},{key:"setupFocusPoint",value:function(){var t=this,e=null,n=this.getBgPosition();this.draggableFocusPoint=new h.a(this.$focusPoint.get(0)),this.draggableFocusPoint.get("pan").set({direction:h.a.DIRECTION_ALL,threshold:0}),this.draggableFocusPoint.on("panstart",(function(n){e=t.$element.find("img").get(0).getClientRects()[0],angular.element("body").addClass("dragging")})),this.draggableFocusPoint.on("pan",(function(n){var o=n.center.y-e.top,i=n.center.x-e.left;o=(o=o<=0?0:o)>=e.height?e.height:o,i=(i=i<=0?0:i)>=e.width?e.width:i;var r=Math.round(i/e.width*100),s=Math.round(o/e.height*100),g={top:"".concat(s,"%"),left:"".concat(r,"%")};t.setFocusPointPosition(g),t.setBgPositionString(g),t.$scope.$apply()})),this.draggableFocusPoint.on("panend",(function(t){angular.element("body").removeClass("dragging")})),this.setFocusPointPosition(n)}},{key:"setFocusPointPosition",value:function(t){this.$focusPoint.css(t)}},{key:"setBgPositionString",value:function(t){this.option.bgPosition&&(this.$optionsCtrl.model[this.option.bgPosition]="".concat(t.left," ").concat(t.top))}},{key:"getBgPosition",value:function(){var t={left:0,top:0},e=this.$optionsCtrl.model[this.option.bgPosition];return e&&(t.left=e.split(" ")[0],t.top=e.split(" ")[1]),t}},{key:"getComputedBgPosition",value:function(){}}]),t}(),require:{$optionsCtrl:"^uxOptions"},bindings:{option:"<",model:"="},template:'\n    <div class="option-image-wrapper">\n      <img draggable="false"\n        ng-if="$ctrl.model"\n        wp-attachment="$ctrl.model"\n        wp-attachment-model="$ctrl.model"\n        wp-attachment-size="$ctrl.thumbSize()">\n\n      <div class="focus-point"\n        ng-class="{ \'active\': $ctrl.model && $ctrl.option.bgPosition }">\n      </div>\n    </div>\n\n    <div class="option-actions">\n      <button type="button" class="wp-style outline"\n        class="wp-style"\n        ng-click="$ctrl.model = null"\n        ng-if="$ctrl.model">\n        Remove\n      </button>\n      <button type="button" class="wp-style outline"\n        ng-click="$ctrl.openMediaModal()">\n        <span ng-if="$ctrl.model">Change media</span>\n        <span ng-if="!$ctrl.model">Select media</span>\n      </button>\n    </div>\n  '},m={controller:function(){function t(e,n){var o=this;i()(this,t),this.createInputValues(this.model),n.toggleClass("is-simple",this.option.simple),e.$watch("$ctrl.model",(function(t){o.createInputValues(t)}))}return t.$inject=["$scope","$element"],s()(t,[{key:"createInputValues",value:function(t){var e=this,n=t?t.split(" "):this.option.default.split(" ");n=n.map((function(t,n){return t?c(t,e.option.default,e.option.unit):null})),this.values={},this.values.first=n[0]||"",this.values.second=n[1]||"",this.option.simple||(this.values.third=n[2]||"",this.values.fourth=n[3]||""),this.modelOptions={updateOn:"blur default",debounce:{blur:0,default:10}}}},{key:"onChange",value:function(t,e){if(this.values[t]=e||"0px",e){var n=[];for(var o in this.values)this.values[o]||(this.values[o]="0px"),n.push(this.values[o]);this.model=n.join(" ")}}},{key:"clear",value:function(){for(var t in this.values)this.values[t]=null;this.model=null}}]),t}(),bindings:{option:"<",model:"="},template:'\n    <div class="flex-options">\n      <input class="scrubfield"\n        scrubfield="$ctrl.option"\n        ng-repeat="(name, value) in $ctrl.values"\n        ng-change="$ctrl.onChange(name, $ctrl.values[name])"\n        ng-model="$ctrl.values[name]"\n        ng-model-options="$ctrl.modelOptions"\n        placeholder="{{:: $ctrl.option.default }}"\n        class="{{:: name }}"\n      >\n      <button type="button" class="blank" ng-click="$ctrl.clear()">\n        <span class="dashicons dashicons-no-alt"></span>\n      </button>\n    </div>\n  '},v={controller:function(){function t(e,n,o,r,s,g){i()(this,t),this.app=e,this.store=n,this.wpMedia=o,this.$window=g}return t.$inject=["app","store","wpMedia","$scope","$element","$window"],s()(t,[{key:"openModal",value:function(){var t=this,e=this.wpMedia.media.gallery,n=this.app.states.selectedShortcode.data.options.flat,o=this.app.states.selectedShortcode,i=n.map((function(t){var e=t.$orgName,n=o.options[t.$name];return"ids"===e&&""===n&&(n="0"),"".concat(e,'="').concat(n,'"')})),r=e.edit("[gallery ".concat(i.join(" "),"]")),s=r.content.get();this.wpMedia.open(),r.on("close",(function(){t.wpMedia.close()})),r.on("uploader:ready",(function(){""===o.options.ids&&(s.toolbar.get("spinner").$el.removeClass("is-active"),s.uploader.$el.removeClass("hidden"))})),r.state("gallery-edit").on("update",(function(i){var s=e.shortcode(i).attrs.named;n.forEach((function(t){if(s.hasOwnProperty(t.$orgName)){var e=angular.isArray(s[t.$orgName])?s[t.$orgName].join(","):s[t.$orgName];o.options[t.$name]=e}})),r.detach(),t.wpMedia.close(),t.app.apply()}))}}]),t}(),require:{$optionsCtrl:"^uxOptions"},bindings:{option:"<",model:"="},template:'\n    <button type="button" class="wp-style" ng-click="$ctrl.openModal()">\n      Edit gallery\n    </button>\n  '},y=n(68),b=n.n(y),$=n(5),w=n.n($),x=n(7),k=n.n(x);function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}var S={controller:function(){function t(e,n,o,r,s,g,a){var c=this;i()(this,t);var A=!1,l=null,C=null,I=s.find("> select");if(this.config=angular.merge({delimiter:",",postSelect:!1,termSelect:!1,allowClear:!0,multiple:!1,placeholder:"Select",minOptions:20},this.option.config),I.on("change",(function(t){A?(c.value=I.val()||c.option.default,e.apply()):A=!0})),this.config.multiple||I.removeAttr("multiple"),this.config.postSelect||this.config.termSelect){var u=this.config.postSelect?"ux_builder_get_posts":"ux_builder_get_terms",d=this.config.postSelect?"ux_builder_search_posts":"ux_builder_search_terms",p=angular.isString(this.value)&&this.config.multiple?this.value.split(this.config.delimiter):this.value,h=this.config.postSelect||this.config.termSelect;k.a.get(n.ajaxUrl,{id:n.post.id,action:u,option:h,values:p,security:n.nonce}).done((function(t){var e=t.data;e?(angular.forEach(e,(function(t,e){I.append(new Option(t.title,t.id,!0,!0))})),I.trigger("change"),r.$apply()):a.warn("An error occurred")})).fail((function(t){console.log(t)})),this.config.ajax={cache:!0,url:n.ajaxUrl,data:function(t){return{id:n.post.id,query:t.term,page:t.page,action:d,option:h,security:n.nonce}},processResults:function(t,e){var n=t.data;return e.page=e.page||1,{results:k.a.map(n,(function(t){return{text:t.title,slug:t.slug,id:t.id}}))}}}}if(this.config.multiple||this.config.ajax){var f=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?E(Object(n),!0).forEach((function(e){w()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.config);if("object"===b()(f.options)){if(!0===f.sortable){var m=(this.value||"").split(this.config.delimiter);for(var v in f.data=m.map((function(t){return{id:t,text:f.options[t]}})),f.options)m.indexOf(v)<0&&f.data.push({id:v,text:f.options[v]})}else for(var y in f.data=[],f.options)f.data.push({id:y,text:f.options[y]});delete f.options}l=I.select2(f).data("select2"),k()("ul.select2-selection__rendered",s).on("keydown",this.handleSearch)}if(!this.config.ajax){var $=I;g((function(){$.val(c.config.multiple?c.value.split(c.config.delimiter):c.value),$.trigger("change")}),0,!1)}this.config.multiple&&(this.config.ajax||this.config.sortable)&&(C=k()("ul.select2-selection__rendered",s).sortable({axis:"y",items:"> .select2-selection__choice",stop:function(t,e){s.find(".select2-selection__choice").each((function(t,e){var n=k()(e).data("data").id,o=I.find('option[value="'+n+'"]')[0];I.append(o)})),I.trigger("change"),r.$apply()}}).data("uiSortable")),r.$on("$destroy",(function(){I.off("change"),C&&(C._destroy(),C=null),l&&(l.destroy(),l=null,k()("ul.select2-selection__rendered",s).off("keydown",c.handleSearch)),I=null}))}return t.$inject=["app","store","utils","$scope","$element","$timeout","$log"],s()(t,[{key:"isSelected",value:function(t){return angular.isArray(this.value)?k.a.inArray(t,this.value)>-1:this.value===t}},{key:"handleSearch",value:function(t){if(8===t.keyCode&&0===k()(t.currentTarget).find(".select2-search input").val().length)return!1}}]),t}(),bindings:{option:"=",value:"="},template:'\n    <select\n      width="100%"\n      multiple="multiple">\n      <option\n        ng-repeat="option in $ctrl.option.options track by option.value"\n        ng-selected="$ctrl.isSelected(option.value)"\n        value="{{:: option.value }}">\n        {{:: option.label }}\n      </option>\n    </select>\n  '},O={controller:function(){function t(e,n){i()(this,t),this.store=e,this.$scope=n,this.posts=[],this.query=""}return t.$inject=["store","$scope"],s()(t,[{key:"onChange",value:function(){var t=this;if(this.query.length<=3)return this.posts=[];k.a.get(this.store.ajaxUrl,{action:"ux_builder_search_posts",option:this.option.data,query:this.query}).done((function(e){t.posts=e.data,t.$scope.$digest()})).fail((function(){}))}},{key:"selectPost",value:function(t){this.option.value=this.post.permalink,this.query="",this.posts=[]}}]),t}(),bindings:{option:"="},template:'\n        <input type="text" ng-model="$ctrl.option.value">\n        <input type="text" placeholder="Search"\n            ng-model="$ctrl.query"\n            ng-change="$ctrl.onChange()"\n            ng-model-options="{\n                updateOn: \'blur default\',\n                debounce: {\n                    blur: 0,\n                    default: 250\n                }\n            }"\n        >\n        <ul ng-if="$ctrl.posts.length">\n            <li ng-repeat="post in $ctrl.posts track by post.ID">\n                <button type="button" ng-click="$ctrl.selectPost(post)">\n                    <h3><span>{{:: post.post_type}}</span>{{:: post.post_title }}</h3>\n                    <small>{{:: post.permalink }}</small>\n                </button>\n            </li>\n        </ul>\n    '},D={controller:function(){function t(e,n,o){var r=this;i()(this,t),this.$element=n,this.$isToggled=!1,e.$watch((function(){return r.$optionCtrl.$cache.isOpen}),(function(t,e){e&&t||(t?r.showOptions():r.hideOptions())}))}return t.$inject=["$scope","$element","$timeout"],s()(t,[{key:"toggleOptions",value:function(){this.$isToggled=!0,this.$optionCtrl.$cache.isOpen=!this.$optionCtrl.$cache.isOpen}},{key:"showOptions",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;this.$element.find("ux-options").first().slideDown(e,(function(){t.$element.removeAttr("style")}))}},{key:"hideOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;t=this.$isToggled?t:0,this.$element.find("ux-options").first().slideUp(t)}}]),t}(),require:{$optionsCtrl:"^uxOptions",$optionCtrl:"^uxOption"},bindings:{option:"<",responsive:"=",model:"="},template:'\n      <button type="button"\n        class="option-group-heading"\n        ng-class="{ \'is-open\': $ctrl.$optionCtrl.$cache.isOpen }"\n        ng-click="$ctrl.toggleOptions()">\n        {{:: $ctrl.option.heading }}\n      </button>\n      <ux-options\n        options="$ctrl.option.options"\n        responsive="$ctrl.responsive"\n        shortcode="$ctrl.$optionsCtrl.shortcode"\n        model="$ctrl.model">\n      </ux-options>\n    '};g.a.directive("scrubfield",I),g.a.component("uxOptionColorpicker",u),g.a.component("uxOptionEditor",d),g.a.component("uxOptionImage",f),g.a.component("uxOptionMargins",m),g.a.component("uxOptionGallery",v),g.a.component("uxOptionSelect",S),g.a.component("uxOptionUrlfield",O),g.a.component("uxOptionGroup",D);var T=function(){function t(e,n,o,r,s,g,a,c,A){var l=this;i()(this,t),this.app=e,this.utils=o,this.store=n,this.$element=g,this.$interpolate=s,this.reponsive=A,this.focused=!1,n.cache.option=n.cache.option||{},this.$cache=n.cache.option[this.option.$id]||{isOpen:!0},r.$watch((function(){return l.option}),(function(t){t.autoFocus&&a((function(){return l.setFocus()}),l.focused?0:600,!1)}))}return t.$inject=["app","store","utils","$scope","$interpolate","$element","$timeout","$iframe","ResponsiveHelper"],s()(t,[{key:"setFocus",value:function(){this.$element.find("input, select, textarea, button, a").first().focus().select(),this.focused=!0}},{key:"isNotDefaultBreakpoint",value:function(){return this.reponsive.currentBreakpoint()!==this.reponsive.defaultBreakpoint()}},{key:"clearResponsiveValue",value:function(){var t=this.$optionsCtrl.shortcode.$id,e=this.getResponsiveValues(),n=this.reponsive.currentBreakpoint(),o=this.option.$name;this.store.$addAction("clearResponsiveValue",{key:"clearResponsiveValue-".concat(t,"-").concat(o,"-").concat(n),value:angular.copy(e[n]),breakpointIndex:n,optionName:o,id:t}),e[n]=null,this.model=this.reponsive.getMediaValue(e)}},{key:"hasResponsiveValue",value:function(){return null!==this.getResponsiveValues()[this.reponsive.currentBreakpoint()]}},{key:"getResponsiveValues",value:function(){return this.$optionsCtrl.model.$responsive.hasOwnProperty(this.option.$name)?this.$optionsCtrl.model.$responsive[this.option.$name]:null}}]),t}();g.a.component("uxOption",{controller:T,require:{$optionsCtrl:"^uxOptions"},bindings:{option:"<",model:"="},template:'\n    <h3 ng-if="$ctrl.option.heading" class="option-header">\n      {{:: $ctrl.option.heading }}\n    </h3>\n    <div class="option-body">\n      <div class="option-template">\n        <div ng-include="\'components/ux-option/types/\' + $ctrl.option.type + \'.html\'"></div>\n        <button type="button"\n          class="option-has-custom-value"\n          title="{{ $ctrl.hasResponsiveValue() ? \'Clear responsive option\' : \'\' }}"\n          ng-if="$ctrl.option.responsive"\n          ng-click="$ctrl.clearResponsiveValue()"\n          ng-class="{\n            \'visible\': $ctrl.isNotDefaultBreakpoint(),\n            \'active\': $ctrl.hasResponsiveValue()\n          }">\n        </button>\n      </div>\n      <div class="option-description"\n        ng-if="$ctrl.option.description">\n        {{:: $ctrl.option.description }}\n      </div>\n    </div>\n  '})},function(t,e,n){"use strict";var o=n(1),i=n(0),r=n.n(i),s=n(2),g=n.n(s),a={controller:function(){function t(e,n,o,i){r()(this,t),this.app=e,this.$element=n,this.$window=o,this.$timeout=i,this.$menu=n.find(".context-menu-menu"),this.$element.on("click",this.close.bind(this)),this.app.register("contextMenu",this)}return t.$inject=["app","$element","$window","$timeout"],g()(t,[{key:"open",value:function(t,e,n,o){this.previousSelected=this.app.states.selectedShortcode,this.app.selectShortcode(t),this.shortcode=t,this.app("tools").hide();var i=n&&o?20:5,r=this.$menu.outerOffset(),s=e.getBoundingClientRect(),g=e.ownerDocument.defaultView.frameElement,a=(n||s.left+s.width/2)-r.width/2,c=(o||s.bottom)+i,A=c+r.height>this.$window.innerHeight;if(A&&(c=(o||s.top)-r.height-i),g){var l=g.getBoundingClientRect();a+=l.left,c+=l.top}this.$menu.css({left:a,top:c}),this.$menu.toggleClass("position-bottom",!A),this.$menu.toggleClass("position-top",A),this.$element.addClass("is-active")}},{key:"clear",value:function(){this.previousSelected=null}},{key:"close",value:function(){var t=this;this.previousSelected&&(this.app.selectShortcode(null),this.$timeout((function(){t.previousSelected.$element&&t.app.selectShortcode(t.previousSelected),t.previousSelected=null}),0,!1)),this.shortcode=null,this.$element.removeClass("is-active"),this.app.apply()}}]),t}(),template:n(13).default,bindings:{shortcode:"<"}};o.a.component("contextMenu",a)},,function(t,e,n){"use strict";var o=n(0),i=n.n(o),r=n(1),s=n(2),g=n.n(s),a=angular.injector(["ng"]),c=function(){function t(e){var n=this;i()(this,t);var o=a.get("$parse","shortcode.ptions");this.tree=e,this.named={},this.flat=e.reduce((function(t,e){return"group"===e.type?t=t.concat(e.options):t.push(e),t}),[]),this.flat.forEach((function(t){n.named[t.$name]=t,t.onChange&&(t.apply=function(t,e){var n=t.selector,o=t.recompile,i=t.handler;return function(t,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r;if(n&&(t=t.find(n)),0===t.length)return!1;switch(i.type){case"class":A(t,i,r,s);break;case"style":l(t,i,r,s);break;case"content":C(t,i,r,s)}return!(!u(r)||!u(s))||!(o&&u(r)&&!u(s))&&(!o||r!==e.default)}}(t.onChange,t)),t.$isValid=function(t,e){var n=!0,i=!this.conditions||o(this.conditions)({$ctrl:{model:t}});return this.require&&(angular.isString(this.require)&&this.require!==e.tag||angular.isArray(this.require)&&this.require.indexOf(e.tag)<0)&&(n=!1),n&&i}}))}return g()(t,[{key:"get",value:function(t){for(var e in this.flat)if(this.flat[e].$name===t||this.flat[e].$orgName===t)return this.flat[e]}}]),t}();function A(t,e,n,o){var i=angular.isString(e.class),r=i?I(e.class,n):e.class[n],s=i?I(e.class,o):e.class[o];u(o)||t.removeClass(s),u(n)||t.addClass(r)}function l(t,e,n,o){for(var i in e.rules)t.css(e.rules[i].property,u(n)?"":I(e.rules[i].value,n))}function C(t,e,n,o){t.text(I(e.value,n))}function I(t,e){return t.replace(/\{\{\s*?value\s*?\}\}/g,e)}function u(t){return""===t||(null===t||void 0===t)}var d=function t(e,n,o,r,s,g,a,A){i()(this,t),this.app=e,this.store=n,this.templates=o,a.debug("Data:",n),r.attach(document);var l=this.store.post.attributes.options,C=this.store.post.meta.options;for(var I in this.store.post.attributes.options=new c(l),this.store.post.meta.options=new c(C),this.store.shortcodes){var u=new c(this.store.shortcodes[I].options);this.store.shortcodes[I].options=u}s.$on(A.CHANGED,(function(t,e){g.removeClass((function(t,e){return(e.match(/(^|\s)media-\S+/g)||[]).join(" ")})),g.addClass("media-"+_.keys(n.breakpoints.all)[e])}))};d.$inject=["app","store","templates","contextmenu","$scope","$element","$log","MediaEvent"],d.$inject=["app","store","templates","contextmenu","$scope","$element","$log","MediaEvent"],r.a.component("app",{controller:d,template:'\n    <app-wrapper ng-class="{\n      \'is-saved\': $ctrl.store.isSaved,\n      \'sidebar-visible\': $ctrl.store.showSidebar === true,\n      \'sidebar-hidden\': $ctrl.store.showSidebar === false\n    }">\n      <app-sidebar></app-sidebar>\n      <app-content></app-content>\n      <app-actions></app-actions>\n    </app-wrapper>\n\n    <wp-editor class="app-stack"></wp-editor>\n    <wp-media></wp-media>\n\n    <div class="tools-addable">\n      <div class="line"></div>\n    </div>\n\n    <app-stack></app-stack>\n\n    <app-modal\n      id="custom-template-modal"\n      class="custom-template-modal"\n      ng-class="{ \'is-saving\': $ctrl.templates.isSaving }"\n    >\n      <div class="loading-spinner"></div>\n      <form class="custom-template-modal__form" ng-submit="$ctrl.templates.save()">\n        <input class="custom-template-modal__input" type="text" placeholder="Enter name" ng-model="$ctrl.store.templateName">\n        <button class="custom-template-modal__button wp-style alt" ng-click="$ctrl.templates.save()">Save</button>\n      </form>\n    </app-modal>\n  '})},function(t,e,n){"use strict";var o=n(1),i=n(0),r=n.n(i),s=function t(e,n,o,i,s,g,a){r()(this,t),this.breakpoints=n.breakpoints,this.actions=n.actions,this.undo=function(){o.undo()},this.redo=function(){o.redo()},this.canUndo=function(){return n.currentAction>=0},this.canRedo=function(){return n.currentAction<n.history.length-1},this.viewRevisions=function(){console.log("actions.viewRevisions")},this.setBreakpoint=function(t){e.setBreakpoint(t)},this.isActiveBreakpont=function(t){return i.currentBreakpoint()===t},this.hasBreakpointValues=function(t){if(!e.states.selectedShortcode)return!1;if(t===i.defaultBreakpoint())return!1;var n=!1;return angular.forEach(e.states.selectedShortcode.options.$responsive,(function(e){e[t]&&(n=!0)})),n},this.doAction=function(t){t.handler(g)}};s.$inject=["app","store","history","ResponsiveHelper","ShortcodeEvent","$injector","$timeout"],o.a.component("appActions",{controller:s,template:n(21).default})},function(t,e,n){"use strict";var o=n(1),i=n(0),r=n.n(i),s=function t(e,n,o,i,s,g){var a=this;r()(this,t);var c=null,A=null,l=o.find(".toolbar-content");e.register("toolbar",this),this.title="",n.$watch((function(){return e.states.selectedShortcode}),(function(t){if(t){for(var e=null,n=t.ancestorsAndSelf,o=0;o<n.length;o++)if(!e&&n[o].data.toolbar&&n[o].data.toolbar.showOnChildActive){(e=angular.copy(n[o].data.toolbar)).shortcode=n[o],e.shortcode.children.map((function(e){e.states.active=e.isAncestorOf(t)}));break}e?a.show(e):a.hide()}})),n.$on(g.DETACHED,(function(t,e){c&&c.shortcode===e&&a.hide()})),this.selectShortcode=function(){e.configureShortcode(c.shortcode)},this.show=function(t){c&&c.shortcode===t.shortcode||(t=function(t){t.shortcode.data.toolbar.showChildrenSelector&&(t.template='<children-selector shortcode="shortcode"></children-selector>');return t}(t),this.title=t.title||t.shortcode.data.name,(c=(t.scope||t.shortcode.$scope).$new()).shortcode=t.shortcode,A=i(t.template||t.shortcode.data.toolbar.template||s.get(t.templateUrl))(c),l.html(A),o.addClass("visible"))},this.hide=function(){c&&(c.$destroy(),A.remove(),A=null,c=null),this.title="",o.removeClass("visible"),l.empty()}};s.$inject=["app","$scope","$element","$compile","$templateCache","ShortcodeEvent"],o.a.component("appContentToolbar",{controller:s,template:'\n    <div class="toolbar-wrapper">\n      <h2 class="toolbar-title">\n        <button type="button" class="inline" ng-click="$ctrl.selectShortcode($ctrl.shortcode)">\n          {{ $ctrl.title }}\n        </button>\n      </h2>\n      <div class="toolbar-content"></div>\n      <div class="toolbar-hide">\n        <button type="button" ng-click="$ctrl.hide()">&times;</button>\n      </div>\n    </div>\n  '})},function(t,e,n){"use strict";var o=n(1),i=n(0),r=n.n(i),s=n(2),g=n.n(s),a=function(){function t(e,n,o,i){var s=this;r()(this,t),this.app=e,this.store=n,this.permissions=angular.copy(this.store.permissions);var g=!0;o.$on("$stateChangeSuccess",(function(){g?g=!1:s.routeAnimation=i.is("home")?"to-right":"to-left"}))}return t.$inject=["app","store","$scope","$state"],g()(t,[{key:"toggle",value:function(){this.store.showSidebar=!this.store.showSidebar}}]),t}();o.a.component("appSidebar",{controller:a,template:n(22).default})},function(t,e,n){"use strict";var o=n(1),i=n(0),r=n.n(i),s=n(2),g=n.n(s),a=function(){function t(e,n,o,i,s){r()(this,t),this.app=e,this.store=n,this.templates=o,this.manager=i,this.contextMenu=s.contextMenu}return t.$inject=["app","store","templates","Shortcode","$scope"],g()(t,[{key:"configureShortcode",value:function(){this.contextMenu.clear(),this.app.configureShortcode(this.shortcode)}},{key:"deleteShortcode",value:function(){this.manager.remove(this.shortcode)}},{key:"duplicateShortcode",value:function(){this.app.configureShortcode(this.manager.duplicate(this.shortcode))}},{key:"copyOptions",value:function(){this.store.clipboard.options={tag:this.shortcode.tag,data:angular.copy(this.shortcode.options)}}},{key:"pasteOptions",value:function(){this.store.clipboard.options&&this.store.clipboard.options.tag===this.shortcode.tag&&(c(this.shortcode.options.$responsive,this.store.clipboard.options.data.$responsive,this.shortcode.data.options),c(this.shortcode.options,this.store.clipboard.options.data,this.shortcode.data.options))}},{key:"saveAsPreset",value:function(){this.templates.savePreset(this.shortcode)}}]),t}();function c(t,e,n){var o=["textfield","image"];for(var i in t)"$"!==i.charAt(0)&&o.indexOf(n.get(i).type)<0&&(t[i]=e[i])}o.a.component("shortcodeActions",{controller:a,require:{contextMenu:"^contextMenu"},bindings:{shortcode:"<"},template:'\n    <button type="button" ng-click="$ctrl.configureShortcode()">\n      Options\n    </button>\n    <button type="button" ng-click="$ctrl.duplicateShortcode()">\n      Duplicate\n    </button>\n    <button type="button" ng-click="$ctrl.copyOptions()">\n      Copy options\n    </button>\n    <button type="button"\n      ng-if="$ctrl.store.clipboard.options.tag === $ctrl.shortcode.tag"\n      ng-click="$ctrl.pasteOptions()">\n      Paste options\n    </button>\n    <button type="button" ng-if="!$ctrl.shortcode.data.hidden" ng-click="$ctrl.saveAsPreset()">\n      Save as preset&hellip;\n    </button>\n    <button type="button" ng-click="$ctrl.deleteShortcode()">\n      Delete&hellip;\n    </button>\n  '})},function(t,e,n){"use strict";var o=n(1),i=n(0),r=n.n(i),s=n(2),g=n.n(s),a=function(){function t(e,n,o,i,s,g,a,c,A){var l=this;r()(this,t),this.app=e;var C=angular.element("shortcode-hierarchy"),I=A(this.shortcode.data.info),u=i(this.shortcode,g[0],{broadcast:!1});void 0===this.shortcode.states.open&&(this.shortcode.states.open=n.postContent.children.length<=5&&1===this.shortcode.depth),this.shortcode.data.addableSpots&&(o.add("top",{element:g,shortcode:this.shortcode}),o.add("bottom",{element:g,shortcode:this.shortcode})),this.shortcode.isParent&&o.add("center",{element:g,shortcode:this.shortcode}),this.isActive=function(){return e.states.selectedShortcode===this.shortcode},this.outlineShortcode=function(){e.outlineShortcode(this.shortcode)},this.selectShortcode=function(){e.selectShortcode(this.shortcode),c().contents().find("body").scrollToElement(this.shortcode.$element)},this.configureShortcode=function(){e.configureShortcode(this.shortcode)},this.toggleChildren=function(){this.shortcode.states.open=!this.shortcode.states.open},this.getShortcodeInfo=function(){var t=this.shortcode.$scope?this.shortcode.$scope.$customCtrl:null;return t&&angular.isFunction(t.$getShortcodeInfo)?t.$getShortcodeInfo():I(this.shortcode.options)},s.$on(a.SELECTED,(function(t,e){if(l.shortcode.isSelfOrAncestorOf(e)){e.ancestors.forEach((function(t){t.states.open=!0}));var n=g.get(0).getBoundingClientRect().top+C.scrollTop()-parseInt(C.css("padding-top"))-C.height()/2;C.animate({scrollTop:n})}})),s.$on("$destroy",(function(){C=null,u.destroy()}))}return t.$inject=["app","store","targets","draggable","$scope","$element","ShortcodeEvent","$iframe","$interpolate"],g()(t,[{key:"showContextMenu",value:function(t){this.app("contextMenu").open(this.shortcode,t.currentTarget)}}]),t}();o.a.component("shortcodeHierarchyListItem",{controller:a,template:n(24).default,bindings:{shortcode:"<"}})}]);

https://t.me/ARX49 - 2025