403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.135.194.130
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/bnnagency.com/wp-content/themes/flatsome/assets/js/builder/core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/bnnagency.com/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=72)}([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(15);function s(t,e,n,o){t.on("keydown",(function(t){var i=t.metaKey||t.ctrlKey,s=90===t.keyCode,r=27===t.keyCode,g=t.shiftKey;r&&n.stack?(t.preventDefault(),n.stack.close(),e.apply()):i&&s&&(g?o.redo():o.undo(),e.apply(),t.preventDefault())}))}s.$inject=["$document","app","store","history"];var r=n(0),g=n.n(r),a=n(2),A=n.n(a),c=n(3),l=new(function(){function t(){g()(this,t)}return A()(t,[{key:"controller",value:function(t,e){c.b.shortcodes.hasOwnProperty(t)&&(c.b.shortcodes[t].controller=e)}},{key:"on",value:function(t,e){c.b.$$events[t]=c.b.$$events[t]||[],c.b.$$events[t].push(e)}},{key:"addfilter",value:function(t,e){c.b.$$filters[t]=c.b.$$filters[t]||[],c.b.$$filters[t].push(e)}},{key:"addAction",value:function(t){c.b.actions.push(t)}}]),t}()),C=angular.module("uxBuilder",[]);e.a=C,C.config(o),C.run(i.a),C.run(s),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(s(e)).assign(o,n)},o.$get=function(e,n){var i=t(s(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(s(n)).assign(o,null)):t(s(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 s(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 s})),n.d(e,"c",(function(){return r}));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=s(g).top,A=t-a,c=a+A*i,l=t-c,C=0,I=20,u=function t(){r(c+l*o((C+=I)/e),g),C<e?window.requestAnimationFrame(t):n&&"function"==typeof n&&n()};u()}function s(){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 r(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){"use strict";n.d(e,"a",(function(){return i}));var o=n(16);function i(){return function(t){return t=t.replace(/<p>\s*<\/p>/g,"<p>&nbsp;</p>"),(t=Object(o.autop)(t)).replace(/<p>&nbsp;<\/p>/g,"<p> </p>")}}},function(t,e){t.exports=window.regeneratorRuntime},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){t.exports=window.wp.autop},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return s}));var o=n(0),i=n.n(o),s=function e(n,o,s,r,g,a,A,c,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){if(I.shortcode||m(t),b(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)")})),I.target=null,I.addToShortcode=null,e.$recompile)return f.stop(!0),v(t);if(s.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,r=o&&I.target.index===e.index+1,g=t.srcEvent.altKey;!i&&!r||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=c().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={},b(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(b(t),u.find("h3 span").removeAttr("style"),u.removeClass("active"),e.states.dragging=!1,I.target&&!I.defaultPrevented){var i=t.srcEvent.altKey,s=I.target.target,c=I.target.index;I.addedShortode=i?s.addChild(e.copy(),c):r.move(e,s,c)}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={},A((function(){return o.isDragging=!1}),0)}function b(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&&(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+c().contents().scrollTop(),I.preventDefault=function(){I.defaultPrevented=!0},I.setContainment=function(t){I.constrains=t.outerOffset(),I.container=t}}}};s.$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 s}));var o=n(0),i=n.n(o),s=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(41),i=n(42),s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,r=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,g=/^[a-zA-Z]:/,a=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(a,"")}var c=[["#","hash"],["?","query"],function(t,e){return I(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function C(t){var n,o=("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{}).location||{},i={},r=typeof(t=t||o);if("blob:"===t.protocol)i=new d(unescape(t.pathname),{});else if("string"===r)for(n in i=new d(t,{}),l)delete i[n];else if("object"===r){for(n in t)n in l||(i[n]=t[n]);void 0===i.slashes&&(i.slashes=s.test(t.href))}return i}function I(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function u(t,e){t=A(t),e=e||{};var n,o=r.exec(t),i=o[1]?o[1].toLowerCase():"",s=!!o[2],g=!!o[3],a=0;return s?g?(n=o[2]+o[3]+o[4],a=o[2].length+o[3].length):(n=o[2]+o[4],a=o[2].length):g?(n=o[3]+o[4],a=o[3].length):n=o[4],"file:"===i?a>=2&&(n=n.slice(2)):I(i)?n=o[4]:i?s&&(n=n.slice(2)):a>=2&&I(e.protocol)&&(n=o[4]),{protocol:i,slashes:s||I(i),slashesCount:a,rest:n}}function d(t,e,n){if(t=A(t),!(this instanceof d))return new d(t,e,n);var s,r,a,l,p,h,f=c.slice(),m=typeof e,v=this,b=0;for("object"!==m&&"string"!==m&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),s=!(r=u(t||"",e=C(e))).protocol&&!r.slashes,v.slashes=r.slashes||s&&e.slashes,v.protocol=r.protocol||e.protocol||"",t=r.rest,("file:"===r.protocol&&(2!==r.slashesCount||g.test(t))||!r.slashes&&(r.protocol||r.slashesCount<2||!I(v.protocol)))&&(f[3]=[/(.*)/,"pathname"]);b<f.length;b++)"function"!=typeof(l=f[b])?(a=l[0],h=l[1],a!=a?v[h]=t:"string"==typeof a?~(p=t.indexOf(a))&&("number"==typeof l[2]?(v[h]=t.slice(0,p),t=t.slice(p+l[2])):(v[h]=t.slice(p),t=t.slice(0,p))):(p=a.exec(t))&&(v[h]=p[1],t=t.slice(0,p.index)),v[h]=v[h]||s&&l[3]&&e[h]||"",l[4]&&(v[h]=v[h].toLowerCase())):t=l(t,v);n&&(v.query=n(v.query)),s&&e.slashes&&"/"!==v.pathname.charAt(0)&&(""!==v.pathname||""!==e.pathname)&&(v.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],s=!1,r=0;o--;)"."===n[o]?n.splice(o,1):".."===n[o]?(n.splice(o,1),r++):r&&(0===o&&(s=!0),n.splice(o,1),r--);return s&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(v.pathname,e.pathname)),"/"!==v.pathname.charAt(0)&&I(v.protocol)&&(v.pathname="/"+v.pathname),o(v.port,v.protocol)||(v.host=v.hostname,v.port=""),v.username=v.password="",v.auth&&(l=v.auth.split(":"),v.username=l[0]||"",v.password=l[1]||""),v.origin="file:"!==v.protocol&&I(v.protocol)&&v.host?v.protocol+"//"+v.host:"null",v.href=v.toString()}d.prototype={set:function(t,e,n){var s=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),s[t]=e;break;case"port":s[t]=e,o(e,s.protocol)?e&&(s.host=s.hostname+":"+e):(s.host=s.hostname,s[t]="");break;case"hostname":s[t]=e,s.port&&(e+=":"+s.port),s.host=e;break;case"host":s[t]=e,/:\d+$/.test(e)?(e=e.split(":"),s.port=e.pop(),s.hostname=e.join(":")):(s.hostname=e,s.port="");break;case"protocol":s.protocol=e.toLowerCase(),s.slashes=!n;break;case"pathname":case"hash":if(e){var r="pathname"===t?"/":"#";s[t]=e.charAt(0)!==r?r+e:e}else s[t]=e;break;default:s[t]=e}for(var g=0;g<c.length;g++){var a=c[g];a[4]&&(s[a[1]]=s[a[1]].toLowerCase())}return s.origin="file:"!==s.protocol&&I(s.protocol)&&s.host?s.protocol+"//"+s.host:"null",s.href=s.toString(),s},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 s=o+(n.slashes||I(n.protocol)?"//":"");return n.username&&(s+=n.username,n.password&&(s+=":"+n.password),s+="@"),s+=n.host+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(s+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(s+=n.hash),s}},d.extractProtocol=u,d.location=C,d.trimLeft=A,d.qs=i,t.exports=d}).call(this,n(4))},function(t,e,n){var o=n(43);t.exports=function(t,e){if(null==t)return{};var n,i,s=o(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}},function(t,e){function n(t,e,n,o,i,s,r){try{var g=t[s](r),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,s){var r=t.apply(e,o);function g(t){n(r,i,s,g,a,"next",t)}function a(t){n(r,i,s,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){n.p=window.flatsomeVars?window.flatsomeVars.assets_url:"/"},function(t,e,n){"use strict";n(32),n(33)},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(36),n(37),n(38),n(39),n(40)},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,s=i.defaultView,r=o.outerOffset(n),g=!!this.get(0).ownerDocument.defaultView.frameElement,a=!!o.get(0).ownerDocument.defaultView.frameElement;if(!g&&a){var A=s.frameElement.getBoundingClientRect();r.left+=A.left,r.top+=A.top}return g&&a&&(r.top+=i.documentElement.scrollTop||i.body.scrollTop),this.css({width:r.width.toFixed(2),height:r.height.toFixed(2),transform:"translateX(".concat(r.left.toFixed(),"px) translateY(").concat(r.top.toFixed(),"px)")})}}).call(this,n(4))},function(t,e,n){(function(t){t.jQuery.fn.isVisible=function(){return t=[this.get(0)],e=!0,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;var t,e}}).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 s=t.jQuery(i),r=i.getBoundingClientRect(),g=r.right-(n.left?n.left:r.left),a=r.bottom-(n.top?n.top:r.top),A=s.css("display").search("inline")>-1;e.includeMargins&&(A?g=s.outerWidth(!0):a=s.outerHeight(!0)),n.top=(r.top>n.top?n.top:r.top)+0,n.left=(r.left>n.left?n.left:r.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,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=t.jQuery(n),g=r.get(0).ownerDocument,a=g.defaultView,A=a.innerHeight,c=g.body.getBoundingClientRect(),l=r.get(0).getBoundingClientRect(),C=l.top-c.top+l.height/2+i;l.height<A?C-=A/2:l.height>A&&(C=l.top-c.top),Object(e.b)(C,o,s,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 s(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var n,i,r=[];for(i in"string"!=typeof e&&(e="?"),t)if(o.call(t,i)){if((n=t[i])||null!=n&&!isNaN(n)||(n=""),i=s(i),n=s(n),null===i||null===n)continue;r.push(i+"="+n)}return r.length?e+r.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,o={};e=n.exec(t);){var s=i(e[1]),r=i(e[2]);null===s||null===r||s in o||(o[s]=r)}return o}},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,o,i={},s=Object.keys(t);for(o=0;o<s.length;o++)n=s[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(45);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":22,"./components/app-actions/app-actions.html":23,"./components/app-sidebar/app-sidebar.html":24,"./components/app-tools/app-move-tool/app-move-tool.template.html":12,"./components/app-tools/app-resize-tool/app-resize-tool.template.html":13,"./components/app-tools/app-tools.html":25,"./components/context-menu/context-menu.template.html":14,"./components/shortcode-hierarchy-list-item/shortcode-hierarchy-list-item.html":26,"./components/ux-option/types/checkbox.html":46,"./components/ux-option/types/col-slider.html":47,"./components/ux-option/types/colorpicker.html":48,"./components/ux-option/types/gallery.html":49,"./components/ux-option/types/group.html":50,"./components/ux-option/types/image.html":51,"./components/ux-option/types/margins.html":52,"./components/ux-option/types/radio-buttons.html":53,"./components/ux-option/types/radio-images.html":54,"./components/ux-option/types/scrubfield.html":55,"./components/ux-option/types/select.html":56,"./components/ux-option/types/slider.html":57,"./components/ux-option/types/text-editor.html":58,"./components/ux-option/types/textarea.html":59,"./components/ux-option/types/textfield.html":60,"./components/ux-option/types/title.html":61,"./components/ux-option/types/urlfield.html":62,"./routes/home/home.html":27,"./routes/settings/settings.html":28,"./routes/shortcode/shortcode.html":29,"./shortcodes/_loading.html":63};function i(t){var e=s(t);return n(e)}function s(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=s,t.exports=i,i.id=45},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    ng-model-options="{ updateOn: \'input\' }"\n  >\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),s=n(2),r=n.n(s),g=n(1),a=function(){function t(e,n,o){i()(this,t),this.app=e,this.$scope=n,this.$element=o}return t.$inject=["app","$scope","$element"],r()(t,[{key:"$onInit",value:function(){this.$element.toggleClass("with-label",!!this.label)}},{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(11),i=n.n(o),s=n(21),r=n.n(s);n(1).a.component("templateSelector",{controller:["app","store","iframe","$scope","templates",function(t,e,n,o,s){var g=this;this.store=e,this.templates=s,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 s=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(s.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 s=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(s.content),t.apply()}))},this.removeTemplate=function(){var t=r()(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(_x){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){"use strict";var o=n(0),i=n.n(o),s=function t(e){return i()(this,t),e.frameElement?e.parent.angular:angular};s.$inject=["$window"];var r=n(2),g=n.n(r),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}(),A=function t(e,n,o,s,r,g,a,A){i()(this,t);var c=angular.copy(e.permissions);function l(t){return e.components[t]}return l.goto=function(t){(window.parent||window).location.hash="!".concat(t)},l.exit=function(){if(c.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 s=0;s<e.$$events[t].length;s++){var r;(r=e.$$events[t][s]).call.apply(r,[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),s=2;s<o;s++)i[s-2]=arguments[s];for(var r=0;r<e.$$filters[t].length;r++){var g;n=(g=e.$$filters[t][r]).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(A.CHANGED,t)},l};A.$inject=["store","$rootScope","$window","$timeout","$log","AppEvent","ShortcodeEvent","MediaEvent"];var c=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(17),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 s=n.defer(),r=0,g=0;return _.each(o,(function(n,i){!0===e.$get(t+"."+i+".loaded")?delete o[i]:r++})),0===_.size(o)?(s.resolve(),s.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",A);function A(){a.loaded=!0,++g===r&&s.resolve()}a.loaded=!1,a.addEventListener("load",A),e.$set(t+"."+o,a),document.getElementsByTagName("head")[0].appendChild(a)})),s.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(18),d=function(){function t(e,n,o,s,r){i()(this,t),this.app=e,this.store=n,this.manager=o,this.ShortcodeEvent=s,this.$timeout=r}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,s=this.store.shortcode;switch(this.store.$disable(),this.store.currentAction=this.store.history.indexOf(t)+e,o){case"reorderChildren":var r=i.id,g=i.parentId,a=i.toIndex,A=i.fromIndex,c=A>a?A+1:A;this.manager.move(s[r],s[g],c,!1),i.fromIndex=a,i.toIndex=A;break;case"moveChild":var l=i.id,C=i.parentId,I=i.index,u=i.fromParentId,d=i.fromIndex;this.manager.move(s[l],s[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=s[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 b in v){var y=s[b];for(var $ in v[b]){var w=v[b][$],x=w.optionValue,k=w.responsiveValue;w.optionValue=angular.copy(y.optionValues[$]),w.responsiveValue=angular.copy(y.responsiveValues[$]),y.optionValues[$]=x,k&&(y.responsiveValues[$]=k)}}break;case"clearResponsiveValue":var E=i.id,S=i.optionName,O=i.breakpointIndex,D=i.value,T=s[E].responsiveValues[S];T[O]?T[O]=null:T[O]=D;break;case"updateContent":var P=i.id,j=i.content,M=s[P];i.content=M.content,M.content=j;break;case"addChild":case"removeChild":if(s[i.id])this.manager.remove(s[i.id],!1);else{var N=s[i.parentId].addChild(i.data,i.index,!1);this.$timeout((function(){n.app.trigger(n.ShortcodeEvent.ATTACHED,N)}))}break;case"removeContent":Object.keys(s).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(19),h=n.n(p),f=function(){function t(e,n,o,s,r,g){i()(this,t),this.app=e,this.store=n,this.targets=o,this.manager=s,this.$timeout=r,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"),s=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){s.html(t)},clearError:function(){s.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:s,currentBreakpoint:r,getMediaValue:function(t,e){return(e=e||r())>s()?g(t,e):A(t,e)},getMediaIndex:function(t,e){return(e=e||r())>s()?a(t,e):c(t,e)},getLowerMediaValue:g,getLowerMediaIndex:a,getHigherMediaValue:A,getHigherMediaIndex:c,hasValueBetween:function(t,e,n){for(var o=e+1;o<n;o++)if(t[o])return!0;return!1}};function s(){return n.breakpoints.default}function r(){return n.breakpoints.current}function g(t,e){for(var n=e||r();n>=0;n--)if(t[n])return t[n];return null}function a(t,e){for(var n=e||r();n>=0;n--)if(t[n])return n;return 0}function A(t,e){for(var n=e||r();n<t.length;n++)if(t[n])return t[n];return null}function c(t,e){for(var n=e||r();n<t.length;n++)if(t[n])return n;return 0}};v.$inject=["app","store","utils"];var b,y=n(3),$={},w=function(){function t(e,n,o){var s=this;i()(this,t),angular.merge(this,e),this.responsiveValues={},this.optionValues={},this.$isReady=!1;var r=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 r.responsiveValues},set $responsive(t){r.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 A=function(t){if("$"===t.charAt(0))return"continue";Object.defineProperty(s.options,t,{enumerable:!0,get:function(){return s.data.options.named[t].responsive?S(s.responsiveValues[t]):s.optionValues[t]},set:function(e){var n=s.data.options.named[t],o=x(e,n),i=y.b.breakpoints.current;s.$isReady&&y.b.enabled&&(clearTimeout(b),$[s.$id]||($[s.$id]={}),$[s.$id][t]||($[s.$id][t]={optionValue:angular.copy(s.optionValues[t]),responsiveValue:angular.copy(s.responsiveValues[t])}),b=setTimeout((function(){var e=Object.keys($);1===e.length&&1===Object.keys($[e[0]]).length?y.b.$addAction("updateOption",{id:s.$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)}),$={},s.apply()}),250)),s.optionValues[t]=o,n.responsive&&o!==S(s.responsiveValues[t])&&(s.responsiveValues[t][i]=o)}}),s.options[t]=e.options[t]};for(var c in e.options)A(c);this.data.options.flat.forEach((function(t){null===s.options[t.$name]&&(s.options[t.$name]=t.default),t.$isValidFor(n)||(s.options[t.$name]=null,t.responsive&&(s.options.$responsive[t.$name]=[null,null,null]))})),y.b.shortcode[this.$id]=this,e.hasOwnProperty("children")&&(this.children=e.children.map((function(e){return new t(e,s)}))),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 s=e.$parentId,r=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(s,"-").concat(r),id:o.$id,parentId:this.$id,index:n,fromIndex:r,fromParentId:s})}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=[];return e.children&&e.children.forEach((function(e){n.push(e),n.concat(t(e))})),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,s,r){i()(this,t),this.app=e,this.store=n,this.$timeout=o,this.$templateCache=s,this.ShortcodeEvent=r}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 s in i)t.options[s]=i[s][o];for(var r in t.options)"$responsive"!==r&&null===t.options[r]&&(t.options[r]=n.data.options.get(r).default);Object.keys(n.options).forEach((function(e){var o=n.data.options.named[e];!o||o.$isValidFor(n.parent)&&o.$satisfiesConditions(n.options)||(delete t.options[e],delete t.options.$responsive[e])}))}))}}]),t}(),P=n(5),j=n.n(P);function M(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 N(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?M(Object(n),!0).forEach((function(e){j()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var R=function(){function t(e,n,o,s,r){var g=this;i()(this,t),this.store=e,this.$iframe=n,this.$timeout=r,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=[],s=!!this.store.isDragging,r=0;r<this.store.targets.length;r++){var g=this.store.targets[r],a=g.element[0].ownerDocument.defaultView,A=g.shortcode.parent,c=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)&&(!s||g.droppable)&&(s||g.addable)&&(s||a.frameElement))if(a){switch(a.frameElement&&angular.isDefined(this.frameOffsets)&&(c-=this.frameOffsets.left,l-=this.frameOffsets.top),A&&"ux_stack"===A.tag&&"col"===A.options.direction&&(g=N(N({},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:c,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:c,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-c),2)+Math.pow(Math.abs(I-l),2)),fromCenter:Math.sqrt(Math.pow(Math.abs(u-c),2)+Math.pow(Math.abs(d-l),2))},f=g.shortcode.isEmpty,m=f?0:o,v=this.isInside(g,c,l,m),b=this.isInside(g,c,l),y=f?v:h.fromSide<m;v&&y&&i.push({target:g.target||("center"!==g.name?g.shortcode.parent:g.shortcode),insideLimit:v,insideElement:b,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},s=Math.min(t.offsets.left-i.x,t.offsets.right+i.x),r=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 s<=e&&e<=r&&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(20),B=n.n(Y);function L(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?L(Object(n),!0).forEach((function(e){j()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var G=function(){function t(e,n,o,s,r,g,a){i()(this,t),this.app=e,this.store=n,this.modal=o,this.presetCache=s,this.Shortcode=r,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=B()(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,s){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,r=s().get(0).contentWindow,g=s().get(0).contentDocument,a=t,A=e,c=s().get(0).getBoundingClientRect(),l=t-c.left,C=e-c.top,I=n.angular.element(i.elementFromPoint(a,A)),u=r.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 s=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 s.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",s).service("actions",a).service("app",A).service("contextmenu",c).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",R).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"];var s=n(10);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).filter("autop",s.a)},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,s=null;e.$watch("draggableShortcode.shortcode",(function(r){s&&s.destroy(),s=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(){s.destroy(),o.removeElement(n.get(0))}))}))}]}}function s(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,s=!1;function r(){var t=n.attachment.id,o=n.attachment.size||"full",i=n.attachment.width||0,s=n.attachment.height||0,r=i||s?"w".concat(i,".h").concat(s):o,a="cache.attachment.".concat(r,".id").concat(t),A=e.$get(a);if(angular.isDefined(A))return g(A);jQuery.getJSON(e.ajaxUrl,{action:"ux_builder_get_attachment",attachment_id:t,attachment_size:o,attachment_width:i,attachment_height:s}).done((function(t){t.success?g(e.$set(a,t.data)):window.self===window.top&&n.attachment.model&&(A=["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"]),A&&g(A)})).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]+")"),s=!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 r():("IMG"===o[0].tagName?(o.removeAttr("src"),o.removeAttr("width"),o.removeAttr("height")):o.css("background-image",""),void(s=!1))})),n.$watch((function(){return i.size}),(function(t,e){s&&t!==e&&r()})),n.$on("$destroy",(function(){o.off("load.wpAttachment")}))}]}}i.$inject=["draggable"],s.$inject=["app"],o.a.directive("draggableShortcode",i),o.a.directive("toNumber",(function(){return{require:"ngModel",link:function(t,e,n,o){o.$formatters.push((function(t){var e=parseFloat(t);return isNaN(e)?null:e}))}}})),o.a.directive("wpAttachment",s)},function(t,e,n){var o;!function(i,s,r,g){"use strict";var a,A=["","webkit","Moz","MS","ms","o"],c=s.createElement("div"),l=Math.round,C=Math.abs,I=Date.now;function u(t,e,n){return setTimeout(b(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",s=i.console&&(i.console.warn||i.console.log);return s&&s.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 b(t,e){return function(){return t.apply(e,arguments)}}function y(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=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];O(i,r)<0&&o.push(t[s]),i[s]=r,s++}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),s=0;s<A.length;){if((o=(n=A[s])?n+i:e)in t)return o;s++}}var j=1;function M(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var N="ontouchstart"in i,R=void 0!==P(i,"PointerEvent"),Y=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),B=["x","y"],L=["clientX","clientY"];function V(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){y(t.options.enable,[t])&&n.handler(e)},this.init()}function _(t,e,n){var o=n.pointers.length,i=n.changedPointers.length,s=1&e&&o-i==0,r=12&e&&o-i==0;n.isFirst=!!s,n.isFinal=!!r,s&&(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 s=n.firstInput,r=n.firstMultiple,g=r?r.center:s.center,a=e.center=Q(o);e.timeStamp=I(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=U(g,a),e.distance=Z(g,a),function(t,e){var n=e.center,o=t.offsetDelta||{},i=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(i=t.prevDelta={x:s.deltaX||0,y:s.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 A,c,l=z(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=C(l.x)>C(l.y)?l.x:l.y,e.scale=r?(A=r.pointers,Z((c=o)[0],c[1],L)/Z(A[0],A[1],L)):1,e.rotation=r?function(t,e){return U(e[1],e[0],L)+U(t[1],t[0],L)}(r.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,s,r=t.lastInterval||e,g=e.timeStamp-r.timeStamp;if(8!=e.eventType&&(g>25||void 0===r.velocity)){var a=e.deltaX-r.deltaX,A=e.deltaY-r.deltaY,c=z(g,a,A);o=c.x,i=c.y,n=C(c.x)>C(c.y)?c.x:c.y,s=F(a,A),t.lastInterval=e}else n=r.velocity,o=r.velocityX,i=r.velocityY,s=r.direction;e.velocity=n,e.velocityX=o,e.velocityY=i,e.direction=s}(n,e);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=B);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=B);var o=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,o)/Math.PI}V.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(M(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(M(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,V.apply(this,arguments)}v(H,V,{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,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(K="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel"),v(tt,V,{handler:function(t){var e=this.store,n=!1,o=t.type.toLowerCase().replace("ms",""),i=X[o],s=q[t.pointerType]||t.pointerType,r="touch"==s,g=O(e,t.pointerId,"pointerId");1&i&&(0===t.button||r)?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:s,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,V.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,V,{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 st(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},V.apply(this,arguments)}function rt(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,s,r=D(t.changedTouches),g=[],a=this.target;if(s=n.filter((function(t){return k(t.target,a)})),1===e)for(i=0;i<s.length;)o[s[i].identifier]=!0,i++;for(i=0;i<r.length;)o[r[i].identifier]&&g.push(r[i]),12&e&&delete o[r[i].identifier],i++;return g.length?[T(s.concat(g),"identifier",!0),g]:void 0}function gt(){V.apply(this,arguments);var t=b(this.handler,this);this.touch=new st(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,At.call(this,e)):12&t&&At.call(this,e)}function At(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 ct(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var i=this.lastTouches[o],s=Math.abs(e-i.x),r=Math.abs(n-i.y);if(s<=25&&r<=25)return!0}return!1}v(st,V,{handler:function(t){var e=it[t.type],n=rt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}),v(gt,V,{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&&ct.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var lt=P(c.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)}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 bt(){mt.apply(this,arguments)}function yt(){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)}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||(R?tt:Y?st:N?gt:H))(n,_),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,s){n=P(o.style,s),e?(t.oldCssProps[n]=o.style[n],o.style[n]=i):o.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}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){y(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");return e&&n?"none":e||n?e?"pan-x":"pan-y":E(t,"manipulation")?"manipulation":"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,s=E(o,"pan-y")&&!It["pan-y"],r=E(o,"pan-x")&&!It["pan-x"];if(i){var g=1===t.pointers.length,a=t.distance<2,A=t.deltaTime<250;if(g&&a&&A)return}if(!r||!s)return i||s&&6&n||r&&24&n?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}},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(!y(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,s=t.deltaX,r=t.deltaY;return i&e.direction||(6&e.direction?(i=0===s?1:s<0?2:4,n=s!=this.pX,o=Math.abs(t.deltaX)):(i=0===r?1:r<0?8:16,n=r!=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(bt,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(yt,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 s=!this.pTime||t.timeStamp-this.pTime<e.interval,r=!this.pCenter||Z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,r&&s?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}],[bt,{enable:!1},["rotate"]],[wt,{direction:6}],[vt,{direction:6},["swipe"]],[xt],[xt,{event:"doubletap",taps:2},["tap"]],[yt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},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 s=0;s<o.length;)n=o[s],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(i=e.curRecognizer=n),s++}},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=s.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:V,TouchAction:ut,TouchInput:st,MouseInput:H,PointerEventInput:tt,TouchMouseInput:gt,SingleTouchInput:nt,Recognizer:dt,AttrRecognizer:mt,Tap:xt,Pan:vt,Swipe:wt,Pinch:bt,Rotate:$t,Press:yt,on:w,off:x,each:p,merge:m,extend:f,assign:a,inherit:v,bindFn:b,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){n(30),t.exports=n(73)},function(t,e,n){"use strict";n.r(e),function(t){n(31),n(34),n(68),n(67),n(35),n(66),n(44),n(74);var e=n(1),o=n(9);for(var i in n(64),n(78),n(106),n(107),n(80),n(81),n(108),n(82),n(83),n(84),n(109),n(85),n(86),n(104),n(87),n(88),n(110),n(89),n(111),n(90),n(65),n(91),n(103),n(92),n(93),n(94),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(27).default,controller:n(75).default,controllerAs:"$ctrl",resolve:{factory:i}}).state("shortcode",{url:"/shortcode/:id",template:n(29).default,controller:n(76).default,controllerAs:"$ctrl",resolve:{factory:i}}).state("settings",{url:"/settings",template:n(28).default,controller:n(77).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),s=n(2),r=n.n(s),g=function(){function t(e,n,o,s,r){i()(this,t),this.app=e,this.store=n,this.utils=o,this.Shortcode=s,this.$log=r,this.permissions=angular.copy(this.store.permissions)}return t.$inject=["app","store","utils","Shortcode","$log"],r()(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),s=n(2),r=n.n(s),g=function(){function t(e,n,o,s,r,g,a,A,c){var l=this;i()(this,t),this.app=e,this.store=n,this.utils=o,this.$scope=r,this.shortcode=null,this.options=null,this.previousOptions=null,this.previousContent=null,this.responsiveHelper=a,this.currentHistoryAction=n.currentAction,n.shortcode[s.id]?this.configure(n.shortcode[s.id]):g((function(){return l.exit()}),0,!1),r.$on(A.MOVED,(function(t,e){l.shortcode.$id===e.$id&&(l.shortcode=e)})),r.$on(A.RECOMPILED,(function(t,e){l.shortcode.$id===e.$id&&(l.shortcode=e,l.app.selectShortcode(e))})),r.$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"],r()(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),s=n(2),r=n.n(s),g=function(){function t(e,n,o,s,r,g){var a=this;i()(this,t),this.app=e,this.store=n,this.post=n.post,this.templates=o,this.modal=s,this.manager=r,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"],r()(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(79).default,template:n(22).default,require:{stack:"^appStack"},bindings:{shortcode:"<",index:"<"}})},function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return C}));var o=n(5),i=n.n(o),s=n(0),r=n.n(s),g=n(2),a=n.n(g);function A(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 c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){i()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(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 C=function(){function t(e,n,o,i,s,g,a,A,c,l){var C=this;r()(this,t),this.app=e,this.store=n,this.templates=o,this.presetCache=i,this.manager=s,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=A,this.$iframe=c,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++})),A((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,s=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return l(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,void 0):void 0}}(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 s,r=!0,g=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return r=t.done,t},e:function(t){g=!0,s=t},f:function(){try{r||null==n.return||n.return()}finally{if(g)throw s}}}}(o);try{for(s.s();!(i=s.n()).done;){var r=i.value;if(!0!==r.custom){t.currentPreset=o.indexOf(r);break}}}catch(t){s.e(t)}finally{s.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=c(c({},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),s=n(1),r=function t(e){i()(this,t),this.app=e};r.$inject=["app"],r.$inject=["app"],s.a.component("appContent",{controller:r,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),s=n(1),r=function t(e,n,o,s,r,g,a,A,c,l,C,I){var u=this;i()(this,t),this.app=e,this.store=n,this.targets=o,this.iframe=s,this.$timeout=a,this.Shortcode=c,this.IframeEvent=I,this.loading=!1;var d=this.store.post.meta.options.flat,p=this.store.post.meta.values;r.$watchCollection((function(){return p}),(function(t,e){if(u.store.initialized&&t!==e){var n={},o=!1;for(var i in d){var s=d[i];t[s.$name]!==e[s.$name]&&(n[s.$name]=t[s.$name],s.reload&&(o=!0))}o&&u.iframe.reload()}})),r.$on(l.READY,(function(){return u.loading=!1})),r.$on(C.PAN_START,(function(){return g.find(".iframe-overlay").removeClass("hidden")})),r.$on(C.PAN_END,(function(){return g.find(".iframe-overlay").addClass("hidden")}))};r.$inject=["app","store","targets","iframe","$scope","$element","$timeout","$window","Shortcode","AppEvent","DragEvent","IframeEvent"],r.$inject=["app","store","targets","iframe","$scope","$element","$timeout","$window","Shortcode","AppEvent","DragEvent","IframeEvent"],s.a.component("appContentIframe",{controller:r,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),s=n(2),r=n.n(s),g=n(1),a=function(){function t(e,n){i()(this,t),this.app=e,this.$scope=n,this.currentChild=null}return t.$inject=["app","$scope"],r()(t,[{key:"$onInit",value:function(){var t=this,e=this.app,n=this.$scope;_.each(this.shortcode.children,(function(e){e.states.active&&(t.currentChild=e)})),n.$watch((function(){return e.states.selectedShortcode}),(function(e){if(!e)return t.currentChild=null;for(var n=0;n<t.shortcode.children.length;n++)e.isSelfOrDescendantOf(t.shortcode.children[n])&&(t.currentChild=t.shortcode.children[n])}))}},{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),s=n(2),r=n.n(s),g=n(1),a=function(){function t(e,n,o,s,r,g){i()(this,t),this.app=e,this.store=n,this.$element=o,this.$compile=s,this.$timeout=r,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"],r()(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 s=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&&(s.isInitialized=!0)})),this.onMessage=function(e){var n=(e.origin||"").replace(/\/+$/,"");/^http(s)?:\/\/studio\.uxthemes\.com$/.test(n)&&"success"===e.data.status&&(s.content=e.data.data.content,s.images=e.data.data.images,s.title=e.data.data.title,s.steps=Object.keys(s.images).length+1,s.isActive=!0,1===s.steps&&s.store.isRegistered&&s.import(),t.apply())},this.import=function(){if(!s.store.isRegistered)throw new Error("Must register site to import.");if(s.isImporting=!0,s.progress=0,s.errors=[],1===s.steps||!s.importImages)return s.content=s.content.replace(/{{{.+}}}/g,""),s.addShortcode(s.content);var n=i.when(),o=function(o){n=n.then((function(){return jQuery.post(e.ajaxUrl,{action:"ux_builder_import_media",url:s.images[o],id:o}).then((function(e){var n=e.data,i=e.success;s.processed++,s.progress=Math.round(s.processed/s.steps*100),i&&n?s.content=s.content.replace("{{{".concat(o,"}}}"),n.id):i||s.errors.unshift([s.images[o],n?n.message:""]),t.apply()}))})).catch((function(t){s.processed++,s.progress=Math.round(s.processed/s.steps*100),s.errors.unshift([s.images[o],t.statusText])}))};for(var r in s.images)o(r);n=n.then((function(){s.addShortcode(s.content)}))},this.hide=function(){s.isActive=!1,s.isImporting=!1,s.content=null,s.images=null,s.title=null,s.errors=[],s.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,s.progress=100,t.apply(),o((function(){s.steps=0,s.processed=0,s.errors.length||s.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            <div class="notice notice-info" ng-if="!$ctrl.store.isRegistered">\n              <p>Please register your site to import from Flatsome Studio</p>\n              <p><a href="{{:: $ctrl.store.registerUrl }}" target="_blank">Register now</a></p>\n            </div>\n            <label class="flatsome-studio__setting" ng-if="$ctrl.steps > 1">\n              <input type="checkbox" ng-model="$ctrl.importImages" ng-disabled="!$ctrl.store.isRegistered" />\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()" ng-disabled="!$ctrl.store.isRegistered">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(){var t=this;this.$onInit=function(){"_root"===t.shortcode.tag?t.label="Add elements":t.label="Add to ".concat(t.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),s=n(1),r=function t(e,n){var o=this;i()(this,t),e.$watch((function(){return o.loading}),(function(t){n.toggleClass("loading",!!t)}))};r.$inject=["$scope","$element"],r.$inject=["$scope","$element"],s.a.component("uxLoader",{controller:r,bindings:{loading:"<"}})},function(t,e,n){"use strict";var o=n(0),i=n.n(o),s=n(2),r=n.n(s),g=n(1),a=function(){function t(e){i()(this,t),this.$scope=e}return t.$inject=["$scope"],r()(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),s=n(2),r=n.n(s),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"],r()(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),s=n(1),r=function t(e,n,o){i()(this,t),this.wpMediaUrl=n.wpMediaUrl};r.$inject=["app","store","wpMedia"],r.$inject=["app","store","wpMedia"],s.a.component("wpMedia",{controller:r,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),s=n(2),r=n.n(s),g=n(1);function a(t,e){return c(t)+(l(t)||e)}function A(t,e,n){var o=c(e),i=a(e,n),s=(c(t)||o)+(l(t)||n);return s!==i?s:i}function c(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 s=e.option,r=t(n.get(0),{cssProps:{}}),g=a(s.default,s.unit),I=s.unit,u=!1,d=null;i.$render=function(){n[0].value=i.$viewValue!==g||u?i.$viewValue:""},n.on("blur",(function(t){d=c(t.currentTarget.value),I=l(t.currentTarget.value)||s.unit,i.$setViewValue(d?d+I:""),i.$render()})),r.get("pan").set({threshold:0}),r.on("panstart",(function(t){d=parseFloat(c(i.$viewValue||s.default),10)||0,I=l(i.$viewValue)||l(s.default)||s.unit,n.addClass("scrubbing"),u=!0})),r.on("panup panright pandown panleft",(function(t){if(u){var e=(t.deltaX+-1*t.deltaY)/2,n=d,o=s.step||1,r=C(o);n=(d+e*o).toFixed(r),n=angular.isDefined(s.min)&&n<=s.min?s.min:n,n=angular.isDefined(s.max)&&n>=s.max?s.max:n,i.$setViewValue(A(n,s.default,I)),i.$render()}})),r.on("panend",(function(t){n.removeClass("scrubbing"),u=!1,d=null,i.$render()})),e.$on("$destroy",(function(){r.destroy(),r=null}))}}}I.$inject=["hammer"];var u={controller:function(){function t(e,n,o){var s=this;i()(this,t),this.app=e,this.$colorpicker=n.find(".option-colorpicker-input"),o.$watch((function(){return s.model}),(function(t,e){s.$colorpicker.spectrum("set",t)}))}return t.$inject=["app","$element","$scope"],r()(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=n(10),p=Object(d.a)(),h={controller:function(){function t(e,n,o,s,r,g){var a=this;i()(this,t),this.app=e,this.wpEditor=n,this.$scope=o,this.$element=r,o.$on("$destroy",(function(){a.$element=null}))}return t.$inject=["app","wpEditor","$scope","$window","$element","$timeout"],r()(t,[{key:"autop",value:function(){if(!1!==this.option.tinymce){var t=this.app.states.selectedShortcode.content;this.app.states.selectedShortcode.content=p(t)}}},{key:"openTextEditor",value:function(){this.wpEditor.open()}}]),t}(),require:{$optionsCtrl:"^uxOptions"},bindings:{option:"<",model:"="},template:'\n    <div class="option-text-editor">\n      <button ng-if="$ctrl.option.tinymce !== false" 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-style="{\n          \'fontFamily\': !$ctrl.option.tinymce !== false ? \'monospace\' : null,\n          \'height\': $ctrl.option.height\n        }"\n        ng-blur="$ctrl.autop()"\n        ng-model="$ctrl.app.states.selectedShortcode.content">\n      </textarea>\n    </div>\n  '},f=n(69),m=n.n(f),v={controller:function(){function t(e,n,o,s,r,g){var a=this;i()(this,t),this.app=e,this.wpMedia=n,this.$scope=o,this.$element=r,this.$timeout=g,this.$focusPoint=r.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()}))}return t.$inject=["app","wpMedia","$scope","$window","$element","$timeout"],r()(t,[{key:"$onInit",value:function(){var t=this,e=this.$timeout,n=this.$scope;this.option.bgPosition&&e((function(){return t.setupFocusPoint()}),0,!1),n.$on("$destroy",(function(){t.option.bgPosition&&t.draggableFocusPoint.destroy(),t.modal.detach(),t.modal=null,t.$focusPoint=null,t.$element=null}))}},{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 m.a(this.$focusPoint.get(0)),this.draggableFocusPoint.get("pan").set({direction:m.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 s=Math.round(i/e.width*100),r=Math.round(o/e.height*100),g={top:"".concat(r,"%"),left:"".concat(s,"%")};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  '},b={controller:function(){function t(e,n){i()(this,t),this.$scope=e,this.$element=n}return t.$inject=["$scope","$element"],r()(t,[{key:"$onInit",value:function(){var t=this,e=this.$scope,n=this.$element;this.createInputValues(this.model),n.toggleClass("is-simple",this.option.simple),e.$watch("$ctrl.model",(function(e){t.createInputValues(e)}))}},{key:"createInputValues",value:function(t){var e=this,n=t?t.split(" "):this.option.default.split(" ");n=n.map((function(t,n){return t?A(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  '},y={controller:function(){function t(e,n,o,s,r,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"],r()(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,'"')})),s=e.edit("[gallery ".concat(i.join(" "),"]")),r=s.content.get();this.wpMedia.open(),s.on("close",(function(){t.wpMedia.close()})),s.on("uploader:ready",(function(){""===o.options.ids&&(r.toolbar.get("spinner").$el.removeClass("is-active"),r.uploader.$el.removeClass("hidden"))})),s.state("gallery-edit").on("update",(function(i){var r=e.shortcode(i).attrs.named;n.forEach((function(t){if(r.hasOwnProperty(t.$orgName)){var e=angular.isArray(r[t.$orgName])?r[t.$orgName].join(","):r[t.$orgName];o.options[t.$name]=e}})),s.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  '},$=n(70),w=n.n($),x=n(5),k=n.n(x),E=n(7),S=n.n(E);function O(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 D={controller:function(){function t(e,n,o,s,r,g,a){i()(this,t),this.app=e,this.store=n,this.$scope=s,this.$element=r,this.$timeout=g,this.$log=a}return t.$inject=["app","store","utils","$scope","$element","$timeout","$log"],r()(t,[{key:"$onInit",value:function(){var t=this,e=this.app,n=this.store,o=this.$scope,i=this.$element,s=this.$timeout,r=this.$log,g=!1,a=null,A=null,c=i.find("> select");if(this.config=angular.merge({delimiter:",",postSelect:!1,termSelect:!1,allowClear:!0,multiple:!1,placeholder:"Select",minOptions:20},this.option.config),c.on("change",(function(n){g?(t.value=c.val()||t.option.default,e.apply()):g=!0})),this.config.multiple||c.removeAttr("multiple"),this.config.postSelect||this.config.termSelect){var l=this.config.postSelect?"ux_builder_get_posts":"ux_builder_get_terms",C=this.config.postSelect?"ux_builder_search_posts":"ux_builder_search_terms",I=angular.isString(this.value)&&this.config.multiple?this.value.split(this.config.delimiter):this.value,u=this.config.postSelect||this.config.termSelect;S.a.get(n.ajaxUrl,{id:n.post.id,action:l,option:u,values:I,security:n.nonce}).done((function(t){var e=t.data;e?(angular.forEach(e,(function(t,e){c.append(new Option(t.title,t.id,!0,!0))})),c.trigger("change"),o.$apply()):r.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:C,option:u,security:n.nonce}},processResults:function(t,e){var n=t.data;return e.page=e.page||1,{results:S.a.map(n,(function(t){return{text:t.title,slug:t.slug,id:t.id}}))}}}}if(this.config.multiple||this.config.ajax){var d=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?O(Object(n),!0).forEach((function(e){k()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},this.config);if("object"===w()(d.options)){if(!0===d.sortable){var p=(this.value||"").split(this.config.delimiter);for(var h in d.data=p.map((function(t){return{id:t,text:d.options[t]}})),d.options)p.indexOf(h)<0&&d.data.push({id:h,text:d.options[h]})}else for(var f in d.data=[],d.options)d.data.push({id:f,text:d.options[f]});delete d.options}a=c.select2(d).data("select2"),S()("ul.select2-selection__rendered",i).on("keydown",this.handleSearch)}if(!this.config.ajax){var m=c;s((function(){m.val(t.config.multiple?t.value.split(t.config.delimiter):t.value),m.trigger("change")}),0,!1)}this.config.multiple&&(this.config.ajax||this.config.sortable)&&(A=S()("ul.select2-selection__rendered",i).sortable({axis:"y",items:"> .select2-selection__choice",stop:function(t,e){i.find(".select2-selection__choice").each((function(t,e){var n=S()(e).data("data").id,o=c.find('option[value="'+n+'"]')[0];c.append(o)})),c.trigger("change"),o.$apply()}}).data("uiSortable")),o.$on("$destroy",(function(){c.off("change"),A&&(A._destroy(),A=null),a&&(a.destroy(),a=null,S()("ul.select2-selection__rendered",i).off("keydown",t.handleSearch)),c=null}))}},{key:"isSelected",value:function(t){return angular.isArray(this.value)?S.a.inArray(t,this.value)>-1:this.value===t}},{key:"handleSearch",value:function(t){if(8===t.keyCode&&0===S()(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  '},T={controller:function(){function t(e,n){i()(this,t),this.store=e,this.$scope=n,this.posts=[],this.query=""}return t.$inject=["store","$scope"],r()(t,[{key:"onChange",value:function(){var t=this;if(this.query.length<=3)return this.posts=[];S.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    '},P={controller:function(){function t(e,n,o){var s=this;i()(this,t),this.$element=n,this.$isToggled=!1,e.$watch((function(){return s.$optionCtrl.$cache.isOpen}),(function(t,e){e&&t||(t?s.showOptions():s.hideOptions())}))}return t.$inject=["$scope","$element","$timeout"],r()(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",h),g.a.component("uxOptionImage",v),g.a.component("uxOptionMargins",b),g.a.component("uxOptionGallery",y),g.a.component("uxOptionSelect",D),g.a.component("uxOptionUrlfield",T),g.a.component("uxOptionGroup",P);var j=function(){function t(e,n,o,s,r,g,a,A,c){var l=this;i()(this,t),this.app=e,this.utils=o,this.store=n,this.$element=g,this.$interpolate=r,this.reponsive=c,this.focused=!1,n.cache.option=n.cache.option||{},s.$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"],r()(t,[{key:"$onInit",value:function(){var t=this.store;this.$cache=t.cache.option[this.option.$id]||{isOpen:!0}}},{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:j,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),s=n.n(i),r=n(2),g=n.n(r),a={controller:function(){function t(e,n,o,i){s()(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,s=this.$menu.outerOffset(),r=e.getBoundingClientRect(),g=e.ownerDocument.defaultView.frameElement,a=(n||r.left+r.width/2)-s.width/2,A=(o||r.bottom)+i,c=A+s.height>this.$window.innerHeight;if(c&&(A=(o||r.top)-s.height-i),g){var l=g.getBoundingClientRect();a+=l.left,A+=l.top}this.$menu.css({left:a,top:A}),this.$menu.toggleClass("position-bottom",!c),this.$menu.toggleClass("position-top",c),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(14).default,bindings:{shortcode:"<"}};o.a.component("contextMenu",a)},,function(t,e,n){"use strict";var o=n(0),i=n.n(o),s=n(1),r=n(2),g=n.n(r),a=angular.injector(["ng"]),A=function(){function t(e){var n=this;i()(this,t),this.tree=e,this.named={};var o=a.get("$parse","shortcode.options");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,s){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s;if(n&&(t=t.find(n)),0===t.length)return!1;switch(i.type){case"class":c(t,i,s,r);break;case"style":l(t,i,s);break;case"content":C(t,i,s)}return!((!u(s)||!u(r))&&(o&&u(s)&&!u(r)||o&&s===e.default))}}(t.onChange,t)),t.$isValidFor=function(t){if(this.require){if("string"==typeof this.require&&this.require!==t.tag)return!1;if(Array.isArray(this.require)&&this.require.indexOf(t.tag)<0)return!1}return!0},t.$satisfiesConditions=function(t){return!this.conditions||o(this.conditions)({$ctrl:{model:t}})}}))}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 c(t,e,n,o){var i=angular.isString(e.class),s=i?I(e.class,n):e.class[n],r=i?I(e.class,o):e.class[o];u(o)||t.removeClass(r),u(n)||t.addClass(s)}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}var d=function t(e,n,o,s,r,g,a,c){i()(this,t),this.app=e,this.store=n,this.templates=o,a.debug("Data:",n),s.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 A(l),this.store.post.meta.options=new A(C),this.store.shortcodes){var u=new A(this.store.shortcodes[I].options);this.store.shortcodes[I].options=u}r.$on(c.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"],s.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),s=n.n(i),r=function t(e,n,o,i,r,g,a){s()(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)}};r.$inject=["app","store","history","ResponsiveHelper","ShortcodeEvent","$injector","$timeout"],o.a.component("appActions",{controller:r,template:n(23).default})},function(t,e,n){"use strict";var o=n(1),i=n(0),s=n.n(i),r=function t(e,n,o,i,r,g){var a=this;s()(this,t);var A=null,c=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){A&&A.shortcode===e&&a.hide()})),this.selectShortcode=function(){e.configureShortcode(A.shortcode)},this.show=function(t){A&&A.shortcode===t.shortcode||(t=function(t){return t.shortcode.data.toolbar.showChildrenSelector&&(t.template='<children-selector shortcode="shortcode"></children-selector>'),t}(t),this.title=t.title||t.shortcode.data.name,(A=(t.scope||t.shortcode.$scope).$new()).shortcode=t.shortcode,c=i(t.template||t.shortcode.data.toolbar.template||r.get(t.templateUrl))(A),l.html(c),o.addClass("visible"))},this.hide=function(){A&&(A.$destroy(),c.remove(),c=null,A=null),this.title="",o.removeClass("visible"),l.empty()}};r.$inject=["app","$scope","$element","$compile","$templateCache","ShortcodeEvent"],o.a.component("appContentToolbar",{controller:r,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),s=n.n(i),r=n(2),g=n.n(r),a=function(){function t(e,n,o,i){var r=this;s()(this,t),this.app=e,this.store=n,this.permissions=angular.copy(this.store.permissions);var g=!0;o.onSuccess({},(function(){g?g=!1:r.routeAnimation=i.is("home")?"to-right":"to-left"}))}return t.$inject=["app","store","$transitions","$state"],g()(t,[{key:"toggle",value:function(){this.store.showSidebar=!this.store.showSidebar}}]),t}();o.a.component("appSidebar",{controller:a,template:n(24).default})},function(t,e,n){"use strict";var o=n(1),i=n(0),s=n.n(i),r=n(2),g=n.n(r),a=function(){function t(e,n,o,i,r){s()(this,t),this.app=e,this.store=n,this.templates=o,this.manager=i,this.contextMenu=r.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&&(A(this.shortcode.options.$responsive,this.store.clipboard.options.data.$responsive,this.shortcode.data.options),A(this.shortcode.options,this.store.clipboard.options.data,this.shortcode.data.options))}},{key:"saveAsPreset",value:function(){this.templates.savePreset(this.shortcode)}}]),t}();function A(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),s=n.n(i),r=n(2),g=n.n(r),a=function(){function t(e,n,o,i,r,g,a,A,c){s()(this,t),this.app=e,this.store=n,this.targets=o,this.$scope=r,this.$iframe=A,this.$element=g,this.draggable=i,this.$interpolate=c,this.ShortcodeEvent=a}return t.$inject=["app","store","targets","draggable","$scope","$element","ShortcodeEvent","$iframe","$interpolate"],g()(t,[{key:"$onInit",value:function(){var t=this,e=this.app,n=this.store,o=this.targets,i=this.$scope,s=this.$element,r=this.$interpolate,g=this.$iframe,a=this.draggable,A=this.ShortcodeEvent,c=angular.element("shortcode-hierarchy"),l=r(this.shortcode.data.info),C=a(this.shortcode,s[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:s,shortcode:this.shortcode}),o.add("bottom",{element:s,shortcode:this.shortcode})),this.shortcode.isParent&&o.add("center",{element:s,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),g().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():l(this.shortcode.options)},i.$on(A.SELECTED,(function(e,n){if(t.shortcode.isSelfOrAncestorOf(n)){n.ancestors.forEach((function(t){t.states.open=!0}));var o=s.get(0).getBoundingClientRect().top+c.scrollTop()-parseInt(c.css("padding-top"))-c.height()/2;c.animate({scrollTop:o})}})),i.$on("$destroy",(function(){c=null,C.destroy()}))}},{key:"showContextMenu",value:function(t){this.app("contextMenu").open(this.shortcode,t.currentTarget)}}]),t}();o.a.component("shortcodeHierarchyListItem",{controller:a,template:n(26).default,bindings:{shortcode:"<"}})}]);

Youez - 2016 - github.com/yon3zu
LinuXploit