Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | Cloud Templates & Patterns collection |
Version | 1.1.10 |
Comparing to | |
See all releases |
Code changes from version 1.1.9 to 1.1.10
- CHANGELOG.md +6 -0
- README.md +9 -0
- editor/build/index.asset.php +1 -1
- editor/build/index.js +1 -1
- editor/src/data/templates-cloud/index.js +1 -1
- editor/src/edit.js +5 -12
- editor/src/extension.js +13 -8
- elementor/build/index.asset.php +1 -1
- elementor/build/index.js +1 -1
- elementor/src/components/export.js +1 -1
- elementor/src/data/templates-cloud/index.js +2 -0
- elementor/src/export.js +1 -2
- includes/Main.php +1 -1
- includes/TI_Beaver.php +3 -2
- languages/templates-patterns-collection.pot +1 -195
- readme.txt +9 -0
- templates-patterns-collection.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +4 -4
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +4 -4
CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 1.1.9](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.8...v1.1.9) (2021-04-29)
|
2 |
|
3 |
- [Fix] Content images not delivered from user site after import on some demos
|
1 |
+
##### [Version 1.1.10](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.9...v1.1.10) (2021-05-05)
|
2 |
+
|
3 |
+
- Allow user-made templates to save metadata
|
4 |
+
- Fix Custom Layouts editor crashing
|
5 |
+
- Fix Gutenberg sync update template for non-Gutenberg templates
|
6 |
+
|
7 |
##### [Version 1.1.9](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.8...v1.1.9) (2021-04-29)
|
8 |
|
9 |
- [Fix] Content images not delivered from user site after import on some demos
|
README.md
CHANGED
@@ -27,6 +27,15 @@ No account is required to access the service template collection and the privacy
|
|
27 |
|
28 |
## Changelog ##
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
##### [Version 1.1.9](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.8...v1.1.9) (2021-04-29)
|
31 |
|
32 |
- [Fix] Content images not delivered from user site after import on some demos
|
27 |
|
28 |
## Changelog ##
|
29 |
|
30 |
+
##### [Version 1.1.10](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.9...v1.1.10) (2021-05-05)
|
31 |
+
|
32 |
+
- Allow user-made templates to save metadata
|
33 |
+
- Fix Custom Layouts editor crashing
|
34 |
+
- Fix Gutenberg sync update template for non-Gutenberg templates
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
##### [Version 1.1.9](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.8...v1.1.9) (2021-04-29)
|
40 |
|
41 |
- [Fix] Content images not delivered from user site after import on some demos
|
editor/build/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '6dee5b8d2c58119d8483ef50207dfa20');
|
editor/build/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t){function r(e,t,r,n,c,a,i){try{var o=e[a](i),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(n,c)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(c,a){var i=e.apply(t,n);function o(e){r(i,c,a,o,s,"next",e)}function s(e){r(i,c,a,o,s,"throw",e)}o(void 0)}))}}},function(e,t,r){var n=r(21),c=r(22),a=r(23),i=r(25);e.exports=function(e,t){return n(e)||c(e,t)||a(e,t)||i()}},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=c.apply(null,n);i&&e.push(i)}else if("object"===a)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){"use strict";const n=r(26),c=r(27),a=r(28);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function s(e,t){return t.decode?c(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function b(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const c="string"==typeof r&&r.includes(e.arrayFormatSeparator),a="string"==typeof r&&!c&&s(r,e).includes(e.arrayFormatSeparator);r=a?s(r,e):r;const i=c||a?r.split(e.arrayFormatSeparator).map(t=>s(t,e)):null===r?r:s(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const c of e.split("&")){let[e,i]=a(t.decode?c.replace(/\+/g," "):c,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:s(i,t),r(s(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=u,t.parse=b,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const c=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[",c,"]"].join("")]:[...r,[o(t,e),"[",o(c,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[]"].join("")]:[...r,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[o(t,e),"=",o(n,e)].join("")]:[[r,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,o(t,e)]:[...r,[o(t,e),"=",o(n,e)].join("")]}}(t),c={};for(const t of Object.keys(e))r(t)||(c[t]=e[t]);const a=Object.keys(c);return!1!==t.sort&&a.sort(t.sort),a.map(r=>{const c=e[r];return void 0===c?"":null===c?o(r,t):Array.isArray(c)?c.reduce(n(r),[]).join("&"):o(r,t)+"="+o(c,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=a(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(u(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:s(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=l(e.url).split("?")[0]||"",c=t.extract(e.url),a=t.parse(c,{sort:!1}),i=Object.assign(a,e.query);let s=t.stringify(i,r);s&&(s="?"+s);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+o(e.fragmentIdentifier,r)),`${n}${s}${u}`}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.editPost},,,function(e,t){e.exports=window.wp.plugins},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.keycodes},function(e,t,r){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,c=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){c=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(c)throw a}}return r}}},function(e,t,r){var n=r(24);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),c=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function i(e){try{return decodeURIComponent(e)}catch(c){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=c.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=i(r[0]);n!==r[0]&&(t[r[0]]=n)}r=c.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var s=a[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){"use strict";r.r(t);var n=r(1),c=r(17),a=r(12),i=(r(20),r(10)),o=r.n(i),s=r(4);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={isFetching:!0,isPreview:!1,tab:3===parseInt(window.tiTpc.tier)?"library":"templates",templates:[],patterns:[],library:{items:[],currentPage:0,totalPages:0},preview:{type:"templates",item:{}}};Object(s.registerStore)("tpc/block-editor",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;return"SET_FETCHING"===t.type?u(u({},e),{},{isFetching:t.isFetching}):"TOGGLE_PREVIEW"===t.type?u(u({},e),{},{isPreview:!e.isPreview}):"UPDATE_CURRENT_TAB"===t.type?u(u({},e),{},{tab:t.tab,isPreview:!1}):"UPDATE_TEMPLATES"===t.type?u(u({},e),{},{templates:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"UPDATE_PATTERNS"===t.type?u(u({},e),{},{patterns:t.items}):"UPDATE_LIBRARY"===t.type?u(u({},e),{},{library:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"SET_PREVIEW_DATA"===t.type?u(u({},e),{},{preview:t.preview}):e},selectors:{isFetching:function(e){return e.isFetching},isPreview:function(e){return e.isPreview},getCurrentTab:function(e){return e.tab},getTemplates:function(e){return e.templates},getPatterns:function(e){return e.patterns},getLibrary:function(e){return e.library},getPreview:function(e){return e.preview}},actions:{setFetching:function(e){return{type:"SET_FETCHING",isFetching:e}},togglePreview:function(e){return{type:"TOGGLE_PREVIEW",isPreview:e}},updateCurrentTab:function(e){return{type:"UPDATE_CURRENT_TAB",tab:e}},updateTemplates:function(e,t,r){return{type:"UPDATE_TEMPLATES",items:e,currentPage:t,totalPages:r}},updatePatterns:function(e){return{type:"UPDATE_PATTERNS",items:e}},updateLibrary:function(e,t,r){return{type:"UPDATE_LIBRARY",items:e,currentPage:t,totalPages:r}},setPreviewData:function(e){return{type:"SET_PREVIEW_DATA",preview:e}}}});var b,m=r(0),f=r(8),d=r.n(f),O=wp.primitives,g=O.Path,j=O.SVG,v=function(e){var t=e.className;return Object(m.createElement)(j,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:d()(["tpc-icon",t])},Object(m.createElement)(g,{d:"M22.8063 24H1.19365C0.534714 24 0 23.4653 0 22.8063V1.19365C0 0.534714 0.534714 0 1.19365 0H22.8063C23.4653 0 24 0.534714 24 1.19365V22.8063C24 23.4653 23.4653 24 22.8063 24Z",fill:"#14171C"}),Object(m.createElement)(g,{d:"M19.8466 20.8187V7.39687V4.43164H16.884H3.45947L6.422 7.39687H16.884V17.8562L19.8466 20.8187Z",fill:"white"}),Object(m.createElement)(g,{d:"M10.138 14.1429L10.1407 17.0838L12.7764 19.7195L12.7656 11.5152L4.55859 11.5044L7.19435 14.1375L10.138 14.1429Z",fill:"white"}))},h=function(){return Object(m.createElement)(j,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tpc-template-cloud-icon"},Object(m.createElement)(g,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(m.createElement)(g,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(m.createElement)(g,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},y=r(3),w=r.n(y),_=r(6),E=r.n(_),k=r(7),P=r.n(k),x=r(11),S=r.n(x),T=r(2),C=r(14),N=r(9),B=new Uint8Array(16);function D(){if(!b&&!(b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(B)}for(var I=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,A=function(e){return"string"==typeof e&&I.test(e)},F=[],L=0;L<256;++L)F.push((L+256).toString(16).substr(1));var V=function(e,t,r){var n=(e=e||{}).random||(e.rng||D)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var c=0;c<16;++c)t[r+c]=n[c];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase();if(!A(r))throw TypeError("Stringified UUID is invalid");return r}(n)};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=lodash.omit,z=Object(s.dispatch)("tpc/block-editor"),H=z.updateLibrary,G=z.updateTemplates,Q=Object(s.dispatch)("core/notices").createNotice,q=function(e){Q("warning",e,{context:"themeisle-blocks/notices/templates-cloud",isDismissible:!0})},$=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{per_page:12,page:0,premade:!0,template_site_slug:"general"},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"page-templates",query:r}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,G(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M({per_page:12,page:0},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"templates",query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),r)}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,H(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t.template_id),query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},t)}),e.prev=1,e.next=4,S()({url:r,method:"POST",parse:!1});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(c=e.sent).message){e.next=11;break}return e.abrupt("return",q(c.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,$();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=E()(w.a.mark((function e(t){var r,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:r,method:"GET",parse:!1});case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:if(!e.sent.message){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/import"),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),n={},e.prev=2,e.next=5,S()({url:r,method:"GET",parse:!1});case 5:if(!(c=e.sent).ok){e.next=12;break}return e.next=9,c.json();case 9:if(!(n=e.sent).message){e.next=12;break}return e.abrupt("return",q(n.message));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),e.t0.message&&q(e.t0.message);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=E()(w.a.mark((function e(t,r){var n,c,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:n,method:"POST"});case 4:if(!(c=e.sent).ok){e.next=11;break}return e.next=8,c.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",q(a.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,W(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t,r){return e.apply(this,arguments)}}(),X=function(){var e=E()(w.a.mark((function e(t,r,n,c,a){var i,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/publish"),query:M(M({cache:localStorage.getItem("tpcCacheBuster"),method:"POST",template_site_slug:r,template_thumbnail:n,premade:c?"yes":"no",link:a},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)})}),e.prev=1,e.next=4,S()({url:i,method:"POST",headers:{Authorization:"Bearer ".concat(tiTpc.bearer||""," ")}});case 4:if(!(o=e.sent).ok){e.next=14;break}return e.next=8,o.json();case 8:if(!(s=e.sent).message){e.next=12;break}return q(s.message),e.abrupt("return",{success:!1});case 12:e.next=17;break;case 14:if(!o.message){e.next=17;break}return q(o.message),e.abrupt("return",{success:!1});case 17:return localStorage.setItem("tpcCacheBuster",V()),e.abrupt("return",{success:!0});case 21:if(e.prev=21,e.t0=e.catch(1),!e.t0.message){e.next=26;break}return q(e.t0.message),e.abrupt("return",{success:!1});case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),ee=function(){var e=Object(s.useSelect)((function(e){return e("core/notices").getNotices("themeisle-blocks/notices/templates-cloud")})),t=Object(s.useDispatch)("core/notices").removeNotice;return Object(m.createElement)("div",{className:"notices"},e.map((function(e){return Object(m.createElement)(T.Notice,{key:e.id,status:e.status,isDismissible:e.isDismissible,onRemove:function(){return t(e.id,"themeisle-blocks/notices/templates-cloud")},actions:e.actions},e.content)})))};function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=lodash.omit,ce=r(13),ae=r(5),ie=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),se=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=function(e){var t=e.closeModal,r=e.getOrder,c=e.getSearchQuery,a=Object(s.useDispatch)("tpc/block-editor"),i=a.setFetching,o=a.updateCurrentTab,l={templates:Object(n.__)("Page Templates")};3===parseInt(tiTpc.tier)&&(l.library=Object(n.__)("My Library"));var u=Object(s.useSelect)((function(e){return e("tpc/block-editor").isFetching()})),p=Object(s.useSelect)((function(e){return e("tpc/block-editor").isPreview()})),b=Object(s.useSelect)((function(e){return e("tpc/block-editor").getCurrentTab()})),f=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.setItem("tpcCacheBuster",V()),i(!0),t=r(),e.next=5,$(ue({search:c()},t));case 5:return e.next=7,W(ue({search:c()},t));case 7:i(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"modal-header"},Object(m.createElement)("div",{className:"left"},Object(m.createElement)(T.Icon,{icon:h})),Object(m.createElement)("div",{className:"center"},Object.keys(l).map((function(e){return Object(m.createElement)(T.Button,{key:e,onClick:function(){return o(e)},className:d()("tabs",{"is-active":e===b})},l[e])}))),Object(m.createElement)("div",{className:"right"},"library"===b&&!p&&Object(m.createElement)(T.ButtonGroup,null,Object(m.createElement)(T.Button,{label:Object(n.__)("Re-sync Library"),icon:oe,disabled:u,className:d()("is-sync",{"is-loading":u}),onClick:f})),Object(m.createElement)(T.Button,{label:Object(n.__)("Close Modal"),icon:se,onClick:t})))},be=r(18),me=function(e){var t=e.isFetching,r=e.importBlocks,c=Object(ce.useViewportMatch)("large",">="),i=Object(ce.useViewportMatch)("large","<="),o=Object(ce.useViewportMatch)("small",">="),l=Object(ce.useViewportMatch)("small","<="),u=1400;c||i||!o||l?!(c||i||o||l)&&(u=600):u=960;var p=Object(s.useDispatch)("tpc/block-editor"),b=p.setFetching,f=p.togglePreview,d=Object(s.useSelect)((function(e){return e("tpc/block-editor").getPreview()})).item;Object(m.useEffect)((function(){h()}),[]);var O=Object(m.useState)(""),g=P()(O,2),j=g[0],v=g[1],h=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,y();case 3:b(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,K(d.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&v(t.content),b(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)("div",{className:"preview-header"},Object(m.createElement)("div",{className:"left"},d.template_name||Object(n.__)("Template")),Object(m.createElement)("div",{className:"right"},Object(m.createElement)(T.Button,{isSecondary:!0,onClick:f},Object(n.__)("Close Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:t,disabled:t,onClick:function(){f(),r(j,d.meta||[])}},Object(n.__)("Import")))),t?Object(m.createElement)(T.Placeholder,null,Object(m.createElement)(T.Spinner,null)):Object(m.createElement)("div",{className:"preview-content"},Object(m.createElement)(be.BlockPreview,{blocks:Object(a.parse)(j),viewportWidth:u})))},fe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),de=Object(m.createElement)(ae.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"})),Oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),ge=r(19);function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he={date:Object(n.__)("Date"),template_name:Object(n.__)("Name"),modified:Object(n.__)("Last Modified")},ye=function(e){var t=e.layout,r=e.sortingOrder,c=e.setLayout,a=e.isSearch,i=e.searchQuery,o=e.onSearch,s=e.setSearchQuery,l=e.setSortingOrder,u=e.changeOrder;return Object(m.createElement)("div",{className:"filters"},Object(m.createElement)("div",{className:"display-sorting"},Object(m.createElement)("div",{className:"sorting-label"},Object(n.__)("Sort by")),Object(m.createElement)("div",{className:"sorting-filter"},Object.keys(he).map((function(e){return Object(m.createElement)(T.Button,{key:e,className:d()({"is-selected":e===r.orderby,"is-asc":"ASC"===r.order}),onClick:function(){var t={order:"DESC",orderby:e};e===r.orderby&&"DESC"===r.order&&(t.order="ASC"),l(ve({},t)),u(ve({},t))}},he[e])})))),Object(m.createElement)("div",{className:"view-filters"},Object(m.createElement)("div",{className:"search-filters"},Object(m.createElement)("input",{placeholder:Object(n.__)("Search for a template…"),className:"filter-search",value:i,onChange:function(e){return s(e.target.value)},onKeyDown:function(e){e.keyCode===ge.ENTER&&o()}}),a?Object(m.createElement)(T.Button,{label:Object(n.__)("Clear search query"),icon:se,onClick:function(){s(""),o("")}}):Object(m.createElement)(T.Button,{label:Object(n.__)("Search"),icon:fe,onClick:function(){return o()}})),Object(m.createElement)(T.Button,{label:Object(n.__)("List View"),icon:de,onClick:function(){return c("list")},isPressed:"list"===t}),Object(m.createElement)(T.Button,{label:Object(n.__)("Grid View"),icon:Oe,onClick:function(){return c("grid")},isPressed:"grid"===t})))},we=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),_e=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),Ee=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})),ke=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),Pe=function(e){var t=e.sortingOrder,r=e.layout,c=e.item,a=e.importBlocks,i=e.deletable,o=Object(s.useDispatch)("tpc/block-editor"),l=o.togglePreview,u=o.setPreviewData,p=Object(m.useState)(!1),b=P()(p,2),f=b[0],O=b[1],g=Object(m.useState)(!1),j=P()(g,2),v=j[0],h=j[1],y=Object(m.useState)(c.template_name),_=P()(y,2),k=_[0],x=_[1],S=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O("importing"),e.next=3,K(c.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&a(t.content,c.meta||[]),O(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O("updating"),e.next=3,Z({template_id:c.template_id,template_name:k||c.template_name},t);case 3:return e.next=5,W(t);case 5:O(!1),h(!v);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(Object(n.__)("Are you sure you want to delete this template?"))){e.next=2;break}return e.abrupt("return",!1);case 2:return O("deleting"),e.next=5,Y(c.template_id,t);case 5:O(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(),u({type:"library",item:c});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("grid"===r){var D={backgroundImage:"url(".concat(c.template_thumbnail,")")};return Object(m.createElement)("div",{key:c.template_id,className:"table-grid"},Object(m.createElement)("div",{style:D,className:d()("grid-preview",{"is-loading":v||!1!==f})},Object(m.createElement)("div",{className:"preview-actions"},Object(m.createElement)(T.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import")),i&&Object(m.createElement)("div",{className:"preview-controls"},!c.link&&Object(m.createElement)(T.Button,{label:Object(n.__)("Edit"),icon:"updating"===f?oe:we,disabled:v||!1!==f,className:d()({"is-loading":"updating"===f}),onClick:function(){return h(!v)}},v&&Object(m.createElement)(T.Popover,{onFocusOutside:function(){return h(!v)},className:"controls-popover"},Object(m.createElement)("div",{className:"popover-content"},Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),value:k,onChange:x}),Object(m.createElement)(T.Button,{label:Object(n.__)("Update"),icon:"updating"===f?oe:_e,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:C})))),Object(m.createElement)(T.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N})))),Object(m.createElement)("div",{className:"card-footer"},Object(m.createElement)("p",null,c.template_name)))}var I=d()("actions",{"no-controls":!i});return Object(m.createElement)("div",{key:c.template_id,className:"table-row"},Object(m.createElement)("div",{className:"row-title"},Object(m.createElement)(T.Icon,{icon:ke}),v?Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),hideLabelFromVision:!0,value:k,onChange:x}):c.template_name),i&&Object(m.createElement)("div",{className:"row-controls"},c.link?Object(m.createElement)(T.Tooltip,{text:Object(n.__)("This template is synced to a page.")},Object(m.createElement)(T.Button,{label:Object(n.__)("Edit"),icon:we,disabled:!0},Object(n.__)("Edit"))):Object(m.createElement)(T.Button,{label:v?Object(n.__)("Update"):Object(n.__)("Edit"),icon:v?"updating"===f?oe:_e:we,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:v?C:function(){return h(!v)}},v?Object(n.__)("Update"):Object(n.__)("Edit")),Object(m.createElement)(T.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N},"deleting"===f?Object(n.__)("Deleting")+"...":Object(n.__)("Delete"))),Object(m.createElement)("div",{className:I},Object(m.createElement)(T.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import"))))},xe=function(e){var t=e.total,r=e.current,n=e.onChange;if(t<2)return null;for(var c=[],a=function(e){var t=e===r;c.push(Object(m.createElement)(T.Button,{key:"page-".concat(e),isPrimary:t,disabled:t,onClick:function(){return n(e)}},e+1))},i=0;i<t;i++)a(i);return Object(m.createElement)(T.ButtonGroup,{className:"pagination"},c)};function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ce=Object(s.withSelect)((function(e,t){var r=t.isGeneral?e("tpc/block-editor").getTemplates():e("tpc/block-editor").getLibrary(),n=r.items;return{items:void 0===n?[]:n,currentPage:r.currentPage,totalPages:r.totalPages}}))((function(e){var t=e.importBlocks,r=e.isGeneral,c=void 0!==r&&r,a=e.isFetching,i=e.items,o=e.currentPage,l=e.totalPages,u=e.getOrder,p=e.setQuery,b=e.getSearchQuery,f=e.setSorting,O=Object(s.useDispatch)("tpc/block-editor").setFetching,g=Object(m.useState)("grid"),j=P()(g,2),v=j[0],h=j[1],y=Object(m.useState)({templates:!1,library:!1}),_=P()(y,2),k=_[0],x=_[1],S=function(e){return x(Te(Te({},k),{},c?{templates:e}:{library:e}))},C=function(){return c?k.templates:k.library},N=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),t=u(),!c){e.next=7;break}return e.next=5,$(Te({search:b()},t));case 5:e.next=9;break;case 7:return e.next=9,W(Te({search:b()},t));case 9:O(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(m.useEffect)((function(){i&&i.length>0||N()}),[c]);var B=function(){var e=E()(w.a.mark((function e(t){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),r=u(),!c){e.next=7;break}return e.next=5,$(Te({search:b(),page:t},r));case 5:e.next=9;break;case 7:return e.next=9,W(Te({search:b(),page:t},r));case 9:O(!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=E()(w.a.mark((function e(){var t,r,n=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:b(),O(!0),S(!!t),r=u(),!c){e.next=9;break}return e.next=7,$(Te({search:t},r));case 7:e.next=11;break;case 9:return e.next=11,W(Te({search:t},r));case 11:O(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=E()(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),!c){e.next=6;break}return e.next=4,$(Te(Te({},t),{},{search:b()}));case 4:e.next=8;break;case 6:return e.next=8,W(Te(Te({},t),{},{search:b()}));case 8:O(!1);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(a)return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ye,{layout:v,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)(T.Placeholder,null,Object(m.createElement)(T.Spinner,null)));if(!Boolean(i.length))return Object(m.createElement)("div",{className:"table-content"},Object(m.createElement)(ye,{layout:v,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(n.__)("No templates available. Add a new one?"));var A=d()("table-content",{"is-grid":"grid"===v});return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ye,{layout:v,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)("div",{className:A},i.map((function(e){return Object(m.createElement)(Pe,{sortingOrder:u(),deletable:!c,key:e.template_id,layout:v,item:e,importBlocks:t})}))),Object(m.createElement)(xe,{onChange:B,current:o,total:l}))})),Ne=Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.isFetching,c=t.getCurrentTab;return{isPreview:r(),isFetching:n(),currentTab:c()}}))((function(e){var t=e.importBlocks,r=e.getOrder,c=e.setQuery,a=e.getSearchQuery,i=e.setSorting,o=e.isPreview,s=e.currentTab,l=e.isFetching;return o&&"library"===s?Object(m.createElement)(me,{isFetching:l,importBlocks:t}):Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)(ee,null),["templates","library"].includes(s)&&Object(m.createElement)(Ce,{isFetching:l,isGeneral:"templates"===s,importBlocks:t,getOrder:r,setQuery:c,getSearchQuery:a,setSorting:i}),"patterns"===s&&Object(n.__)("We are still working on this. Please check back later. Thank you!"))})),Be=function(e){var t=e.title,r=e.leftButtons,c=e.rightButtons,a=e.heading,i=e.previewUrl,o=Object(N.stringifyUrl)({url:i,query:{tpcpreview:"yes"}}),s=t||Object(n.__)("Preview");return Object(m.createElement)("div",{className:"ob-preview single-templates"},Object(m.createElement)("div",{className:"preview"},Object(m.createElement)("iframe",{title:s,src:o,frameBorder:"0"}),Object(m.createElement)("div",{className:"loading"},Object(m.createElement)(T.Dashicon,{icon:"update",size:50}))),Object(m.createElement)("div",{className:"bottom-bar"},r&&Object(m.createElement)("div",{className:"navigator"},r),a&&Object(m.createElement)("h2",{className:"heading"},a),c&&Object(m.createElement)("div",{className:"actions"},c)))};function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=Object(ce.compose)(Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.getPreview,c=t.getCurrentTab;return{isPreview:r(),currentTab:c(),previewData:n().item}})),Object(s.withDispatch)((function(e){var t=e("core/block-editor"),r=t.removeBlock,n=t.replaceBlocks,c=e("tpc/block-editor").togglePreview;return{removeBlock:r,replaceBlocks:n,closePreview:function(){return c(!1)}}})))((function(e){var t=e.clientId,r=e.isPreview,c=e.previewData,i=e.currentTab,o=e.removeBlock,l=e.replaceBlocks,u=e.closePreview,p=Object(s.useSelect)((function(e){return{type:e("core/editor").getEditedPostAttribute("type"),postId:e("core/editor").getEditedPostAttribute("id")}})),b=p.type,f=p.postId,d=Object(s.useDispatch)("core/notices").createErrorNotice,O=Object(s.useDispatch)("tpc/block-editor"),g=O.updateLibrary,j=O.updateTemplates,v=Object(m.useState)(!1),h=P()(v,2),y=h[0],_=h[1],k=Object(m.useState)(!1),x=P()(k,2),S=x[0],C=x[1],N=Object(m.useState)({templates:"",library:""}),B=P()(N,2),D=B[0],I=B[1],A=Object(m.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),F=P()(A,2),L=F[0],V=F[1],U="templates"===i,M=function(){return U?D.templates:D.library},R=function(){return U?L.templates:L.library},z=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(g([]),j([]),0<r.length&&["post","page"].includes(b)){var n=null;"post"===b?n=new wp.api.models.Post({id:f}):"page"===b&&(n=new wp.api.models.Page({id:f})),n.set("meta",Ie({},JSON.parse(r))),n.save()}l(t,Object(a.parse)(e))},H=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.next=3,K(c.template_id).then((function(e){if(e.__file&&e.content&&"wp_export"===e.__file)return u(),C(!1),z(e.content,c.meta||[]),!1;d(Object(n.__)("Something went wrong while importing. Please try again."),{type:"snackbar"}),C(!1),o(t)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){_(!1),C(!1),o(t)};return Object(m.useEffect)((function(){setTimeout((function(){_(!0)}),100)}),[]),y?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.Modal,{onRequestClose:G,shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!r||"templates"!==i,isDismissible:!1,overlayClassName:"tpc-template-cloud-modal"},Object(m.createElement)(pe,{closeModal:G,getOrder:R,getSearchQuery:M}),Object(m.createElement)(Ne,{importBlocks:z,getOrder:R,setQuery:function(e){return I(Ie(Ie({},D),{},U?{templates:e}:{library:e}))},getSearchQuery:M,setSorting:function(e){return V(Ie(Ie({},L),{},U?{templates:e}:{library:e}))}}),Object(m.createElement)((function(){if(!r||"templates"!==i)return null;var e=c.link,t=c.template_name;return Object(m.createElement)(T.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,className:"tpc-preview-wrap-modal"},Object(m.createElement)(Be,{previewUrl:e,heading:t,leftButtons:Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.Button,{disabled:S,icon:ie,onClick:u})),rightButtons:Object(m.createElement)(T.Button,{disabled:S,isPrimary:!0,onClick:H},S?Object(n.__)("Importing")+"...":Object(n.__)("Import"))}),";")}),null))):null}));Object(a.registerBlockType)("ti-tpc/templates-cloud",{title:Object(n.__)("Templates Cloud"),description:Object(n.__)("A cloud based templates library which enables you to create ready-made website in no time."),icon:v,category:"design",keywords:["templates cloud","patterns","template library"],supports:{html:!1},edit:Ae,save:function(){return null}}),3===parseInt(tiTpc.tier)&&Object(c.registerPlugin)("ti-tpc",{render:function(){var e=Object(m.useState)(!1),t=P()(e,2),r=t[0],c=t[1],i=Object(m.useState)(!1),o=P()(i,2),l=o[0],u=o[1],p=Object(m.useState)(""),b=P()(p,2),f=b[0],O=b[1],g=window.tiTpc.canPredefine,j=Object(s.useDispatch)("core/notices"),h=j.createErrorNotice,y=j.createSuccessNotice,_=Object(s.useDispatch)("core/editor").editPost,k=Object(s.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlockCount,n=t.getSelectedBlock,c=t.getMultiSelectedBlocks,i=1===r()?n():c();return Object(a.serialize)(i)}),[]),x=Object(s.useSelect)((function(e){var t=(0,e("core/block-editor").getBlocks)();return Object(a.serialize)(t)}),[]),B=Object(s.useSelect)((function(e){return(0,e("core/editor").getEditedPostAttribute)("meta")}),[]);Object(m.useEffect)((function(){var e=window.tiTpc.metaKeys;window.tiTpc.params.meta=Object.fromEntries(Object.entries(B).filter((function(t){var r=P()(t,2),n=r[0];return r[1],e.includes(n)})))}),[B]);var D=Object(s.useSelect)((function(e){return{meta:e("core/editor").getEditedPostAttribute("meta")||{},postId:e("core/editor").getEditedPostAttribute("id"),type:e("core/editor").getEditedPostAttribute("type"),link:e("core/editor").getEditedPostAttribute("link"),postTitle:e("core/editor").getEditedPostAttribute("title")||Object(n.__)("Template")}})),I=D.meta,A=D.postTitle,F=D.postId,L=D.type,U=D.link,M=D.meta,R=M._ti_tpc_template_sync,z=M._ti_tpc_template_id,H=M._ti_tpc_screenshot_url,G=M._ti_tpc_site_slug,Q=M._ti_tpc_published,q=Object(s.useSelect)((function(e,t){var r=t.forceIsSaving,n=e("core/editor"),c=n.isSavingPost,a=n.isPublishingPost,i=n.isAutosavingPost,o=r||c(),s=i();return(a()||o)&&!s})),$=Object(m.useState)(R),W=P()($,2),Z=W[0],K=W[1],Y=Object(m.useState)(z),te=P()(Y,2),ce=te[0],ae=te[1],ie=Object(m.useState)(G),oe=P()(ie,2),se=oe[0],le=oe[1],ue=Object(m.useState)(Q),pe=P()(ue,2),be=pe[0],me=pe[1],fe=Object(m.useState)(H),de=P()(fe,2),Oe=de[0],ge=de[1];Object(m.useEffect)((function(){_({meta:re(re({},I),{},{_ti_tpc_template_sync:Z,_ti_tpc_template_id:ce,_ti_tpc_screenshot_url:Oe,_ti_tpc_site_slug:se,_ti_tpc_published:be})})}),[Z,ce,Oe,se,be]),Object(m.useEffect)((function(){q&&Z&&ve()}),[q,Z]);var je=function(){var e=E()(w.a.mark((function e(){var t,r,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(!0),t={__file:"wp_export",version:2,content:k},r=Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:f,template_type:"gutenberg"})}),e.prev=3,e.next=6,S()({url:r,method:"POST",data:t,parse:!1});case 6:if(!(a=e.sent).ok){e.next=12;break}return e.next=10,a.json();case 10:(i=e.sent).message?h(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),y(Object(n.__)("Template saved."),{type:"snackbar"}));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),e.t0.message&&h(e.t0.message,{type:"snackbar"});case 17:u(!1),c(!1),O("");case 20:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(){return e.apply(this,arguments)}}(),ve=function(){var e=E()(w.a.mark((function e(){var t,r,c,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),t={__file:"wp_export",version:2,content:x},c=!1,!ce){e.next=7;break}return e.next=6,J(ce);case 6:c=e.sent;case 7:return r=c?Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates/"+ce,query:re(re({},ne(tiTpc.params,"meta")),{},{meta:be?JSON.stringify(tiTpc.params.meta):"",template_name:A,link:U})}):Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:A,template_type:"gutenberg",template_site_slug:G||"",template_thumbnail:H||"",link:U})}),e.prev=8,e.next=11,S()({url:r,method:"POST",data:t,parse:!1});case 11:if(!(a=e.sent).ok){e.next=17;break}return e.next=15,a.json();case 15:(i=e.sent).message?h(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),y(Object(n.__)("Template saved."),{type:"snackbar"}),i.template_id?(ae(i.template_id),he(i.template_id)):he());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),e.t0.message&&h(e.t0.message,{type:"snackbar"});case 22:u(!1);case 23:case"end":return e.stop()}}),e,null,[[8,19]])})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=null;return"post"===L?t=new wp.api.models.Post({id:F}):"page"===L&&(t=new wp.api.models.Page({id:F})),t.set("meta",{_ti_tpc_template_id:e,_ti_tpc_template_sync:Z,_ti_tpc_screenshot_url:Oe,_ti_tpc_site_slug:se,_ti_tpc_published:!be}),t.save()};return["post","page"].includes(L)?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.PluginBlockSettingsMenuItem,{label:Object(n.__)("Save to Neve Cloud"),icon:"none",onClick:function(){return c(!0)}}),Object(m.createElement)(C.PluginSidebarMoreMenuItem,{icon:Object(m.createElement)(T.Icon,{icon:v}),target:"ti-tpc"},Object(n.__)("Templates Cloud")),Object(m.createElement)(C.PluginSidebar,{name:"ti-tpc",title:Object(n.__)("Templates Cloud"),className:"ti-tpc-components-panel"},Object(m.createElement)(T.PanelBody,null,Object(n.__)("Save this page as a template in your Templates Cloud library."),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:ve},Object(n.__)("Save Page to Neve Cloud")),Object(m.createElement)(T.ToggleControl,{label:Object(n.__)("Automatically sync to the cloud"),checked:Z,onChange:function(){return K(!Z)}})),g&&Object(m.createElement)(T.PanelBody,null,Object(m.createElement)("h4",null,Object(n.__)("Publish Settings")),Object(m.createElement)(T.TextControl,{label:Object(n.__)("Screenshot URL"),value:Oe,type:"url",onChange:ge}),Object(m.createElement)(T.TextControl,{label:Object(n.__)("Site Slug"),value:se,help:Object(n.__)("Use `general` to publish this as a global template. Otherwise use the starter site slug to make it available as a single page for the starter site."),type:"url",onChange:le}),Object(m.createElement)((function(){if(!g)return null;var e=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u("publishing"),e.next=3,X(z,G,H,!Q,U).then((function(e){e.success&&(me(!be),he(),y(be?Object(n.__)("Template Unpublished."):Object(n.__)("Template Published."),{type:"snackbar"}))}));case 3:u(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)(T.Button,{isSecondary:!0,onClick:e,disabled:!1!==l,className:d()({"is-loading":"publishing"===l})},be&&("publishing"===l?Object(n.__)("Unpublishing"):Object(n.__)("Unpublish")),!be&&("publishing"===l?Object(n.__)("Publishing"):Object(n.__)("Publish")))}),null),Object(m.createElement)(ee,null))),r&&Object(m.createElement)(T.Modal,{title:Object(n.__)("Save Template"),onRequestClose:function(){return c(!1)}},Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),value:f,onChange:O}),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:je},Object(n.__)("Save")))):null},icon:v})}]);
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t){function r(e,t,r,n,c,a,i){try{var o=e[a](i),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(n,c)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(c,a){var i=e.apply(t,n);function o(e){r(i,c,a,o,s,"next",e)}function s(e){r(i,c,a,o,s,"throw",e)}o(void 0)}))}}},function(e,t,r){var n=r(21),c=r(22),a=r(23),i=r(25);e.exports=function(e,t){return n(e)||c(e,t)||a(e,t)||i()}},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=c.apply(null,n);i&&e.push(i)}else if("object"===a)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){"use strict";const n=r(26),c=r(27),a=r(28);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function s(e,t){return t.decode?c(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function b(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const c="string"==typeof r&&r.includes(e.arrayFormatSeparator),a="string"==typeof r&&!c&&s(r,e).includes(e.arrayFormatSeparator);r=a?s(r,e):r;const i=c||a?r.split(e.arrayFormatSeparator).map(t=>s(t,e)):null===r?r:s(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const c of e.split("&")){let[e,i]=a(t.decode?c.replace(/\+/g," "):c,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:s(i,t),r(s(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=u,t.parse=b,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const c=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[",c,"]"].join("")]:[...r,[o(t,e),"[",o(c,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[]"].join("")]:[...r,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[o(t,e),"=",o(n,e)].join("")]:[[r,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,o(t,e)]:[...r,[o(t,e),"=",o(n,e)].join("")]}}(t),c={};for(const t of Object.keys(e))r(t)||(c[t]=e[t]);const a=Object.keys(c);return!1!==t.sort&&a.sort(t.sort),a.map(r=>{const c=e[r];return void 0===c?"":null===c?o(r,t):Array.isArray(c)?c.reduce(n(r),[]).join("&"):o(r,t)+"="+o(c,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=a(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(u(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:s(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=l(e.url).split("?")[0]||"",c=t.extract(e.url),a=t.parse(c,{sort:!1}),i=Object.assign(a,e.query);let s=t.stringify(i,r);s&&(s="?"+s);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+o(e.fragmentIdentifier,r)),`${n}${s}${u}`}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.editPost},,,function(e,t){e.exports=window.wp.plugins},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.keycodes},function(e,t,r){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,c=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){c=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(c)throw a}}return r}}},function(e,t,r){var n=r(24);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),c=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function i(e){try{return decodeURIComponent(e)}catch(c){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=c.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=i(r[0]);n!==r[0]&&(t[r[0]]=n)}r=c.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var s=a[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){"use strict";r.r(t);var n=r(1),c=r(17),a=r(12),i=(r(20),r(10)),o=r.n(i),s=r(4);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={isFetching:!0,isPreview:!1,tab:3===parseInt(window.tiTpc.tier)?"library":"templates",templates:[],patterns:[],library:{items:[],currentPage:0,totalPages:0},preview:{type:"templates",item:{}}};Object(s.registerStore)("tpc/block-editor",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;return"SET_FETCHING"===t.type?u(u({},e),{},{isFetching:t.isFetching}):"TOGGLE_PREVIEW"===t.type?u(u({},e),{},{isPreview:!e.isPreview}):"UPDATE_CURRENT_TAB"===t.type?u(u({},e),{},{tab:t.tab,isPreview:!1}):"UPDATE_TEMPLATES"===t.type?u(u({},e),{},{templates:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"UPDATE_PATTERNS"===t.type?u(u({},e),{},{patterns:t.items}):"UPDATE_LIBRARY"===t.type?u(u({},e),{},{library:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"SET_PREVIEW_DATA"===t.type?u(u({},e),{},{preview:t.preview}):e},selectors:{isFetching:function(e){return e.isFetching},isPreview:function(e){return e.isPreview},getCurrentTab:function(e){return e.tab},getTemplates:function(e){return e.templates},getPatterns:function(e){return e.patterns},getLibrary:function(e){return e.library},getPreview:function(e){return e.preview}},actions:{setFetching:function(e){return{type:"SET_FETCHING",isFetching:e}},togglePreview:function(e){return{type:"TOGGLE_PREVIEW",isPreview:e}},updateCurrentTab:function(e){return{type:"UPDATE_CURRENT_TAB",tab:e}},updateTemplates:function(e,t,r){return{type:"UPDATE_TEMPLATES",items:e,currentPage:t,totalPages:r}},updatePatterns:function(e){return{type:"UPDATE_PATTERNS",items:e}},updateLibrary:function(e,t,r){return{type:"UPDATE_LIBRARY",items:e,currentPage:t,totalPages:r}},setPreviewData:function(e){return{type:"SET_PREVIEW_DATA",preview:e}}}});var b,m=r(0),f=r(8),d=r.n(f),O=wp.primitives,g=O.Path,j=O.SVG,y=function(e){var t=e.className;return Object(m.createElement)(j,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:d()(["tpc-icon",t])},Object(m.createElement)(g,{d:"M22.8063 24H1.19365C0.534714 24 0 23.4653 0 22.8063V1.19365C0 0.534714 0.534714 0 1.19365 0H22.8063C23.4653 0 24 0.534714 24 1.19365V22.8063C24 23.4653 23.4653 24 22.8063 24Z",fill:"#14171C"}),Object(m.createElement)(g,{d:"M19.8466 20.8187V7.39687V4.43164H16.884H3.45947L6.422 7.39687H16.884V17.8562L19.8466 20.8187Z",fill:"white"}),Object(m.createElement)(g,{d:"M10.138 14.1429L10.1407 17.0838L12.7764 19.7195L12.7656 11.5152L4.55859 11.5044L7.19435 14.1375L10.138 14.1429Z",fill:"white"}))},h=function(){return Object(m.createElement)(j,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tpc-template-cloud-icon"},Object(m.createElement)(g,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(m.createElement)(g,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(m.createElement)(g,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},v=r(3),w=r.n(v),_=r(6),E=r.n(_),k=r(7),P=r.n(k),x=r(11),S=r.n(x),T=r(2),C=r(14),N=r(9),B=new Uint8Array(16);function D(){if(!b&&!(b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(B)}for(var I=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,A=function(e){return"string"==typeof e&&I.test(e)},F=[],L=0;L<256;++L)F.push((L+256).toString(16).substr(1));var V=function(e,t,r){var n=(e=e||{}).random||(e.rng||D)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var c=0;c<16;++c)t[r+c]=n[c];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase();if(!A(r))throw TypeError("Stringified UUID is invalid");return r}(n)};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=lodash.omit,z=Object(s.dispatch)("tpc/block-editor"),H=z.updateLibrary,G=z.updateTemplates,Q=Object(s.dispatch)("core/notices").createNotice,q=function(e){Q("warning",e,{context:"themeisle-blocks/notices/templates-cloud",isDismissible:!0})},$=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{per_page:12,page:0,premade:!0,template_site_slug:"general"},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"page-templates",query:r}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,G(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M({per_page:12,page:0},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"templates",query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),r)}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,H(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t.template_id),query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},t)}),e.prev=1,e.next=4,S()({url:r,method:"POST",parse:!1});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(c=e.sent).message){e.next=11;break}return e.abrupt("return",q(c.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,$();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:r,method:"GET",parse:!1});case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:if(!(c=e.sent).message){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",c);case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/import"),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),n={},e.prev=2,e.next=5,S()({url:r,method:"GET",parse:!1});case 5:if(!(c=e.sent).ok){e.next=12;break}return e.next=9,c.json();case 9:if(!(n=e.sent).message){e.next=12;break}return e.abrupt("return",q(n.message));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),e.t0.message&&q(e.t0.message);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=E()(w.a.mark((function e(t,r){var n,c,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:n,method:"POST"});case 4:if(!(c=e.sent).ok){e.next=11;break}return e.next=8,c.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",q(a.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,W(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t,r){return e.apply(this,arguments)}}(),X=function(){var e=E()(w.a.mark((function e(t,r,n,c,a){var i,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/publish"),query:M(M({cache:localStorage.getItem("tpcCacheBuster"),method:"POST",template_site_slug:r,template_thumbnail:n,premade:c?"yes":"no",link:a},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)})}),e.prev=1,e.next=4,S()({url:i,method:"POST",headers:{Authorization:"Bearer ".concat(tiTpc.bearer||""," ")}});case 4:if(!(o=e.sent).ok){e.next=14;break}return e.next=8,o.json();case 8:if(!(s=e.sent).message){e.next=12;break}return q(s.message),e.abrupt("return",{success:!1});case 12:e.next=17;break;case 14:if(!o.message){e.next=17;break}return q(o.message),e.abrupt("return",{success:!1});case 17:return localStorage.setItem("tpcCacheBuster",V()),e.abrupt("return",{success:!0});case 21:if(e.prev=21,e.t0=e.catch(1),!e.t0.message){e.next=26;break}return q(e.t0.message),e.abrupt("return",{success:!1});case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),ee=function(){var e=Object(s.useSelect)((function(e){return e("core/notices").getNotices("themeisle-blocks/notices/templates-cloud")})),t=Object(s.useDispatch)("core/notices").removeNotice;return Object(m.createElement)("div",{className:"notices"},e.map((function(e){return Object(m.createElement)(T.Notice,{key:e.id,status:e.status,isDismissible:e.isDismissible,onRemove:function(){return t(e.id,"themeisle-blocks/notices/templates-cloud")},actions:e.actions},e.content)})))};function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=lodash.omit,ce=r(13),ae=r(5),ie=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),se=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=function(e){var t=e.closeModal,r=e.getOrder,c=e.getSearchQuery,a=Object(s.useDispatch)("tpc/block-editor"),i=a.setFetching,o=a.updateCurrentTab,l={templates:Object(n.__)("Page Templates")};3===parseInt(tiTpc.tier)&&(l.library=Object(n.__)("My Library"));var u=Object(s.useSelect)((function(e){return e("tpc/block-editor").isFetching()})),p=Object(s.useSelect)((function(e){return e("tpc/block-editor").isPreview()})),b=Object(s.useSelect)((function(e){return e("tpc/block-editor").getCurrentTab()})),f=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.setItem("tpcCacheBuster",V()),i(!0),t=r(),e.next=5,$(ue({search:c()},t));case 5:return e.next=7,W(ue({search:c()},t));case 7:i(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"modal-header"},Object(m.createElement)("div",{className:"left"},Object(m.createElement)(T.Icon,{icon:h})),Object(m.createElement)("div",{className:"center"},Object.keys(l).map((function(e){return Object(m.createElement)(T.Button,{key:e,onClick:function(){return o(e)},className:d()("tabs",{"is-active":e===b})},l[e])}))),Object(m.createElement)("div",{className:"right"},"library"===b&&!p&&Object(m.createElement)(T.ButtonGroup,null,Object(m.createElement)(T.Button,{label:Object(n.__)("Re-sync Library"),icon:oe,disabled:u,className:d()("is-sync",{"is-loading":u}),onClick:f})),Object(m.createElement)(T.Button,{label:Object(n.__)("Close Modal"),icon:se,onClick:t})))},be=r(18),me=function(e){var t=e.isFetching,r=e.importBlocks,c=Object(ce.useViewportMatch)("large",">="),i=Object(ce.useViewportMatch)("large","<="),o=Object(ce.useViewportMatch)("small",">="),l=Object(ce.useViewportMatch)("small","<="),u=1400;c||i||!o||l?!(c||i||o||l)&&(u=600):u=960;var p=Object(s.useDispatch)("tpc/block-editor"),b=p.setFetching,f=p.togglePreview,d=Object(s.useSelect)((function(e){return e("tpc/block-editor").getPreview()})).item;Object(m.useEffect)((function(){h()}),[]);var O=Object(m.useState)(""),g=P()(O,2),j=g[0],y=g[1],h=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,v();case 3:b(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),v=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,K(d.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&y(t.content),b(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)("div",{className:"preview-header"},Object(m.createElement)("div",{className:"left"},d.template_name||Object(n.__)("Template")),Object(m.createElement)("div",{className:"right"},Object(m.createElement)(T.Button,{isSecondary:!0,onClick:f},Object(n.__)("Close Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:t,disabled:t,onClick:function(){f(),r(j,d.meta||[])}},Object(n.__)("Import")))),t?Object(m.createElement)(T.Placeholder,null,Object(m.createElement)(T.Spinner,null)):Object(m.createElement)("div",{className:"preview-content"},Object(m.createElement)(be.BlockPreview,{blocks:Object(a.parse)(j),viewportWidth:u})))},fe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),de=Object(m.createElement)(ae.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"})),Oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),ge=r(19);function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he={date:Object(n.__)("Date"),template_name:Object(n.__)("Name"),modified:Object(n.__)("Last Modified")},ve=function(e){var t=e.layout,r=e.sortingOrder,c=e.setLayout,a=e.isSearch,i=e.searchQuery,o=e.onSearch,s=e.setSearchQuery,l=e.setSortingOrder,u=e.changeOrder;return Object(m.createElement)("div",{className:"filters"},Object(m.createElement)("div",{className:"display-sorting"},Object(m.createElement)("div",{className:"sorting-label"},Object(n.__)("Sort by")),Object(m.createElement)("div",{className:"sorting-filter"},Object.keys(he).map((function(e){return Object(m.createElement)(T.Button,{key:e,className:d()({"is-selected":e===r.orderby,"is-asc":"ASC"===r.order}),onClick:function(){var t={order:"DESC",orderby:e};e===r.orderby&&"DESC"===r.order&&(t.order="ASC"),l(ye({},t)),u(ye({},t))}},he[e])})))),Object(m.createElement)("div",{className:"view-filters"},Object(m.createElement)("div",{className:"search-filters"},Object(m.createElement)("input",{placeholder:Object(n.__)("Search for a template…"),className:"filter-search",value:i,onChange:function(e){return s(e.target.value)},onKeyDown:function(e){e.keyCode===ge.ENTER&&o()}}),a?Object(m.createElement)(T.Button,{label:Object(n.__)("Clear search query"),icon:se,onClick:function(){s(""),o("")}}):Object(m.createElement)(T.Button,{label:Object(n.__)("Search"),icon:fe,onClick:function(){return o()}})),Object(m.createElement)(T.Button,{label:Object(n.__)("List View"),icon:de,onClick:function(){return c("list")},isPressed:"list"===t}),Object(m.createElement)(T.Button,{label:Object(n.__)("Grid View"),icon:Oe,onClick:function(){return c("grid")},isPressed:"grid"===t})))},we=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),_e=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),Ee=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})),ke=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),Pe=function(e){var t=e.sortingOrder,r=e.layout,c=e.item,a=e.importBlocks,i=e.deletable,o=Object(s.useDispatch)("tpc/block-editor"),l=o.togglePreview,u=o.setPreviewData,p=Object(m.useState)(!1),b=P()(p,2),f=b[0],O=b[1],g=Object(m.useState)(!1),j=P()(g,2),y=j[0],h=j[1],v=Object(m.useState)(c.template_name),_=P()(v,2),k=_[0],x=_[1],S=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O("importing"),e.next=3,K(c.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&a(t.content,c.meta||[]),O(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O("updating"),e.next=3,Z({template_id:c.template_id,template_name:k||c.template_name},t);case 3:return e.next=5,W(t);case 5:O(!1),h(!y);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(Object(n.__)("Are you sure you want to delete this template?"))){e.next=2;break}return e.abrupt("return",!1);case 2:return O("deleting"),e.next=5,Y(c.template_id,t);case 5:O(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(),u({type:"library",item:c});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("grid"===r){var D={backgroundImage:"url(".concat(c.template_thumbnail,")")};return Object(m.createElement)("div",{key:c.template_id,className:"table-grid"},Object(m.createElement)("div",{style:D,className:d()("grid-preview",{"is-loading":y||!1!==f})},Object(m.createElement)("div",{className:"preview-actions"},Object(m.createElement)(T.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import")),i&&Object(m.createElement)("div",{className:"preview-controls"},!c.link&&Object(m.createElement)(T.Button,{label:Object(n.__)("Edit"),icon:"updating"===f?oe:we,disabled:y||!1!==f,className:d()({"is-loading":"updating"===f}),onClick:function(){return h(!y)}},y&&Object(m.createElement)(T.Popover,{onFocusOutside:function(){return h(!y)},className:"controls-popover"},Object(m.createElement)("div",{className:"popover-content"},Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),value:k,onChange:x}),Object(m.createElement)(T.Button,{label:Object(n.__)("Update"),icon:"updating"===f?oe:_e,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:C})))),Object(m.createElement)(T.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N})))),Object(m.createElement)("div",{className:"card-footer"},Object(m.createElement)("p",null,c.template_name)))}var I=d()("actions",{"no-controls":!i});return Object(m.createElement)("div",{key:c.template_id,className:"table-row"},Object(m.createElement)("div",{className:"row-title"},Object(m.createElement)(T.Icon,{icon:ke}),y?Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),hideLabelFromVision:!0,value:k,onChange:x}):c.template_name),i&&Object(m.createElement)("div",{className:"row-controls"},c.link?Object(m.createElement)(T.Tooltip,{text:Object(n.__)("This template is synced to a page.")},Object(m.createElement)(T.Button,{label:Object(n.__)("Edit"),icon:we,disabled:!0},Object(n.__)("Edit"))):Object(m.createElement)(T.Button,{label:y?Object(n.__)("Update"):Object(n.__)("Edit"),icon:y?"updating"===f?oe:_e:we,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:y?C:function(){return h(!y)}},y?Object(n.__)("Update"):Object(n.__)("Edit")),Object(m.createElement)(T.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N},"deleting"===f?Object(n.__)("Deleting")+"...":Object(n.__)("Delete"))),Object(m.createElement)("div",{className:I},Object(m.createElement)(T.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import"))))},xe=function(e){var t=e.total,r=e.current,n=e.onChange;if(t<2)return null;for(var c=[],a=function(e){var t=e===r;c.push(Object(m.createElement)(T.Button,{key:"page-".concat(e),isPrimary:t,disabled:t,onClick:function(){return n(e)}},e+1))},i=0;i<t;i++)a(i);return Object(m.createElement)(T.ButtonGroup,{className:"pagination"},c)};function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ce=Object(s.withSelect)((function(e,t){var r=t.isGeneral?e("tpc/block-editor").getTemplates():e("tpc/block-editor").getLibrary(),n=r.items;return{items:void 0===n?[]:n,currentPage:r.currentPage,totalPages:r.totalPages}}))((function(e){var t=e.importBlocks,r=e.isGeneral,c=void 0!==r&&r,a=e.isFetching,i=e.items,o=e.currentPage,l=e.totalPages,u=e.getOrder,p=e.setQuery,b=e.getSearchQuery,f=e.setSorting,O=Object(s.useDispatch)("tpc/block-editor").setFetching,g=Object(m.useState)("grid"),j=P()(g,2),y=j[0],h=j[1],v=Object(m.useState)({templates:!1,library:!1}),_=P()(v,2),k=_[0],x=_[1],S=function(e){return x(Te(Te({},k),{},c?{templates:e}:{library:e}))},C=function(){return c?k.templates:k.library},N=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),t=u(),!c){e.next=7;break}return e.next=5,$(Te({search:b()},t));case 5:e.next=9;break;case 7:return e.next=9,W(Te({search:b()},t));case 9:O(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(m.useEffect)((function(){i&&i.length>0||N()}),[c]);var B=function(){var e=E()(w.a.mark((function e(t){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),r=u(),!c){e.next=7;break}return e.next=5,$(Te({search:b(),page:t},r));case 5:e.next=9;break;case 7:return e.next=9,W(Te({search:b(),page:t},r));case 9:O(!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=E()(w.a.mark((function e(){var t,r,n=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:b(),O(!0),S(!!t),r=u(),!c){e.next=9;break}return e.next=7,$(Te({search:t},r));case 7:e.next=11;break;case 9:return e.next=11,W(Te({search:t},r));case 11:O(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=E()(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),!c){e.next=6;break}return e.next=4,$(Te(Te({},t),{},{search:b()}));case 4:e.next=8;break;case 6:return e.next=8,W(Te(Te({},t),{},{search:b()}));case 8:O(!1);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(a)return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ve,{layout:y,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)(T.Placeholder,null,Object(m.createElement)(T.Spinner,null)));if(!Boolean(i.length))return Object(m.createElement)("div",{className:"table-content"},Object(m.createElement)(ve,{layout:y,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(n.__)("No templates available. Add a new one?"));var A=d()("table-content",{"is-grid":"grid"===y});return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ve,{layout:y,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)("div",{className:A},i.map((function(e){return Object(m.createElement)(Pe,{sortingOrder:u(),deletable:!c,key:e.template_id,layout:y,item:e,importBlocks:t})}))),Object(m.createElement)(xe,{onChange:B,current:o,total:l}))})),Ne=Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.isFetching,c=t.getCurrentTab;return{isPreview:r(),isFetching:n(),currentTab:c()}}))((function(e){var t=e.importBlocks,r=e.getOrder,c=e.setQuery,a=e.getSearchQuery,i=e.setSorting,o=e.isPreview,s=e.currentTab,l=e.isFetching;return o&&"library"===s?Object(m.createElement)(me,{isFetching:l,importBlocks:t}):Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)(ee,null),["templates","library"].includes(s)&&Object(m.createElement)(Ce,{isFetching:l,isGeneral:"templates"===s,importBlocks:t,getOrder:r,setQuery:c,getSearchQuery:a,setSorting:i}),"patterns"===s&&Object(n.__)("We are still working on this. Please check back later. Thank you!"))})),Be=function(e){var t=e.title,r=e.leftButtons,c=e.rightButtons,a=e.heading,i=e.previewUrl,o=Object(N.stringifyUrl)({url:i,query:{tpcpreview:"yes"}}),s=t||Object(n.__)("Preview");return Object(m.createElement)("div",{className:"ob-preview single-templates"},Object(m.createElement)("div",{className:"preview"},Object(m.createElement)("iframe",{title:s,src:o,frameBorder:"0"}),Object(m.createElement)("div",{className:"loading"},Object(m.createElement)(T.Dashicon,{icon:"update",size:50}))),Object(m.createElement)("div",{className:"bottom-bar"},r&&Object(m.createElement)("div",{className:"navigator"},r),a&&Object(m.createElement)("h2",{className:"heading"},a),c&&Object(m.createElement)("div",{className:"actions"},c)))};function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=Object(ce.compose)(Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.getPreview,c=t.getCurrentTab;return{isPreview:r(),currentTab:c(),previewData:n().item}})),Object(s.withDispatch)((function(e){var t=e("core/block-editor"),r=t.removeBlock,n=t.replaceBlocks,c=e("tpc/block-editor").togglePreview;return{removeBlock:r,replaceBlocks:n,closePreview:function(){return c(!1)}}})))((function(e){var t=e.clientId,r=e.isPreview,c=e.previewData,i=e.currentTab,o=e.removeBlock,l=e.replaceBlocks,u=e.closePreview,p=Object(s.useSelect)((function(e){return{type:e("core/editor").getEditedPostAttribute("type")}})).type,b=Object(s.useDispatch)("core/notices").createErrorNotice,f=Object(s.useDispatch)("core/editor").editPost,d=Object(s.useDispatch)("tpc/block-editor"),O=d.updateLibrary,g=d.updateTemplates,j=Object(m.useState)(!1),y=P()(j,2),h=y[0],v=y[1],_=Object(m.useState)(!1),k=P()(_,2),x=k[0],S=k[1],C=Object(m.useState)({templates:"",library:""}),N=P()(C,2),B=N[0],D=N[1],I=Object(m.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),A=P()(I,2),F=A[0],L=A[1],V="templates"===i,U=function(){return V?B.templates:B.library},M=function(){return V?F.templates:F.library},R=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];O([]),g([]),0<r.length&&["post","page"].includes(p)&&f({meta:Ie({},JSON.parse(r))}),l(t,Object(a.parse)(e))},z=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),e.next=3,K(c.template_id).then((function(e){if(e.__file&&e.content&&"wp_export"===e.__file)return u(),S(!1),R(e.content,c.meta||[]),!1;b(Object(n.__)("Something went wrong while importing. Please try again."),{type:"snackbar"}),S(!1),o(t)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){v(!1),S(!1),o(t)};return Object(m.useEffect)((function(){setTimeout((function(){v(!0)}),100)}),[]),h?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.Modal,{onRequestClose:H,shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!r||"templates"!==i,isDismissible:!1,overlayClassName:"tpc-template-cloud-modal"},Object(m.createElement)(pe,{closeModal:H,getOrder:M,getSearchQuery:U}),Object(m.createElement)(Ne,{importBlocks:R,getOrder:M,setQuery:function(e){return D(Ie(Ie({},B),{},V?{templates:e}:{library:e}))},getSearchQuery:U,setSorting:function(e){return L(Ie(Ie({},F),{},V?{templates:e}:{library:e}))}}),Object(m.createElement)((function(){if(!r||"templates"!==i)return null;var e=c.link,t=c.template_name;return Object(m.createElement)(T.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,className:"tpc-preview-wrap-modal"},Object(m.createElement)(Be,{previewUrl:e,heading:t,leftButtons:Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.Button,{disabled:x,icon:ie,onClick:u})),rightButtons:Object(m.createElement)(T.Button,{disabled:x,isPrimary:!0,onClick:z},x?Object(n.__)("Importing")+"...":Object(n.__)("Import"))}),";")}),null))):null}));Object(a.registerBlockType)("ti-tpc/templates-cloud",{title:Object(n.__)("Templates Cloud"),description:Object(n.__)("A cloud based templates library which enables you to create ready-made website in no time."),icon:y,category:"design",keywords:["templates cloud","patterns","template library"],supports:{html:!1},edit:Ae,save:function(){return null}}),3===parseInt(tiTpc.tier)&&Object(c.registerPlugin)("ti-tpc",{render:function(){var e=Object(m.useState)(!1),t=P()(e,2),r=t[0],c=t[1],i=Object(m.useState)(!1),o=P()(i,2),l=o[0],u=o[1],p=Object(m.useState)(""),b=P()(p,2),f=b[0],O=b[1],g=window.tiTpc.canPredefine,j=Object(s.useDispatch)("core/notices"),h=j.createErrorNotice,v=j.createSuccessNotice,_=Object(s.useDispatch)("core/editor").editPost,k=Object(s.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlockCount,n=t.getSelectedBlock,c=t.getMultiSelectedBlocks,i=1===r()?n():c();return Object(a.serialize)(i)}),[]),x=Object(s.useSelect)((function(e){var t=(0,e("core/block-editor").getBlocks)();return Object(a.serialize)(t)}),[]),B=Object(s.useSelect)((function(e){return(0,e("core/editor").getEditedPostAttribute)("meta")}),[]);Object(m.useEffect)((function(){var e=window.tiTpc.metaKeys;window.tiTpc.params.meta=Object.fromEntries(Object.entries(B||{}).filter((function(t){var r=P()(t,2),n=r[0];return r[1],e.includes(n)})))}),[B]);var D=Object(s.useSelect)((function(e){return{meta:e("core/editor").getEditedPostAttribute("meta")||{},postId:e("core/editor").getEditedPostAttribute("id"),type:e("core/editor").getEditedPostAttribute("type"),link:e("core/editor").getEditedPostAttribute("link"),postTitle:e("core/editor").getEditedPostAttribute("title")||Object(n.__)("Template")}})),I=D.meta,A=D.postTitle,F=D.postId,L=D.type,U=D.link,M=D.meta,R=M._ti_tpc_template_sync,z=M._ti_tpc_template_id,H=M._ti_tpc_screenshot_url,G=M._ti_tpc_site_slug,Q=M._ti_tpc_published,q=Object(s.useSelect)((function(e,t){var r=t.forceIsSaving,n=e("core/editor"),c=n.isSavingPost,a=n.isPublishingPost,i=n.isAutosavingPost,o=r||c(),s=i();return(a()||o)&&!s})),$=Object(m.useState)(R),W=P()($,2),Z=W[0],K=W[1],Y=Object(m.useState)(z),te=P()(Y,2),ce=te[0],ae=te[1],ie=Object(m.useState)(G),oe=P()(ie,2),se=oe[0],le=oe[1],ue=Object(m.useState)(Q),pe=P()(ue,2),be=pe[0],me=pe[1],fe=Object(m.useState)(H),de=P()(fe,2),Oe=de[0],ge=de[1];Object(m.useEffect)((function(){_({meta:re(re({},I),{},{_ti_tpc_template_sync:Z,_ti_tpc_template_id:ce,_ti_tpc_screenshot_url:Oe,_ti_tpc_site_slug:se,_ti_tpc_published:be})})}),[Z,ce,Oe,se,be]),Object(m.useEffect)((function(){q&&Z&&ye()}),[q,Z]);var je=function(){var e=E()(w.a.mark((function e(){var t,r,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(!0),t={__file:"wp_export",version:2,content:k},r=Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:f,template_type:"gutenberg"})}),e.prev=3,e.next=6,S()({url:r,method:"POST",data:t,parse:!1});case 6:if(!(a=e.sent).ok){e.next=12;break}return e.next=10,a.json();case 10:(i=e.sent).message?h(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),v(Object(n.__)("Template saved."),{type:"snackbar"}));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),e.t0.message&&h(e.t0.message,{type:"snackbar"});case 17:u(!1),c(!1),O("");case 20:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=E()(w.a.mark((function e(){var t,r,c,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),t={__file:"wp_export",version:2,content:x},c=!1,!ce){e.next=7;break}return e.next=6,J(ce);case 6:c=e.sent;case 7:if(!1===c||"gutenberg"===c.template_type){e.next=9;break}return e.abrupt("return");case 9:return r=c?Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates/"+ce,query:re(re({},ne(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta),template_name:A,link:U})}):Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta),template_name:A,template_type:"gutenberg",template_site_slug:G||"",template_thumbnail:H||"",link:U})}),e.prev=10,e.next=13,S()({url:r,method:"POST",data:t,parse:!1});case 13:if(!(a=e.sent).ok){e.next=19;break}return e.next=17,a.json();case 17:(i=e.sent).message?h(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),v(Object(n.__)("Template saved."),{type:"snackbar"}),i.template_id?(ae(i.template_id),he(i.template_id)):he());case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(10),e.t0.message&&h(e.t0.message,{type:"snackbar"});case 24:u(!1);case 25:case"end":return e.stop()}}),e,null,[[10,21]])})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=null;return"post"===L?t=new wp.api.models.Post({id:F}):"page"===L&&(t=new wp.api.models.Page({id:F})),t.set("meta",{_ti_tpc_template_id:e,_ti_tpc_template_sync:Z,_ti_tpc_screenshot_url:Oe,_ti_tpc_site_slug:se,_ti_tpc_published:!be}),t.save()};return["post","page"].includes(L)?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.PluginBlockSettingsMenuItem,{label:Object(n.__)("Save to Neve Cloud"),icon:"none",onClick:function(){return c(!0)}}),Object(m.createElement)(C.PluginSidebarMoreMenuItem,{icon:Object(m.createElement)(T.Icon,{icon:y}),target:"ti-tpc"},Object(n.__)("Templates Cloud")),Object(m.createElement)(C.PluginSidebar,{name:"ti-tpc",title:Object(n.__)("Templates Cloud"),className:"ti-tpc-components-panel"},Object(m.createElement)(T.PanelBody,null,Object(n.__)("Save this page as a template in your Templates Cloud library."),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:ye},Object(n.__)("Save Page to Neve Cloud")),Object(m.createElement)(T.ToggleControl,{label:Object(n.__)("Automatically sync to the cloud"),checked:Z,onChange:function(){return K(!Z)}})),g&&Object(m.createElement)(T.PanelBody,null,Object(m.createElement)("h4",null,Object(n.__)("Publish Settings")),Object(m.createElement)(T.TextControl,{label:Object(n.__)("Screenshot URL"),value:Oe,type:"url",onChange:ge}),Object(m.createElement)(T.TextControl,{label:Object(n.__)("Site Slug"),value:se,help:Object(n.__)("Use `general` to publish this as a global template. Otherwise use the starter site slug to make it available as a single page for the starter site."),type:"url",onChange:le}),Object(m.createElement)((function(){if(!g)return null;var e=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u("publishing"),e.next=3,X(z,G,H,!Q,U).then((function(e){e.success&&(me(!be),he(),v(be?Object(n.__)("Template Unpublished."):Object(n.__)("Template Published."),{type:"snackbar"}))}));case 3:u(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)(T.Button,{isSecondary:!0,onClick:e,disabled:!1!==l,className:d()({"is-loading":"publishing"===l})},be&&("publishing"===l?Object(n.__)("Unpublishing"):Object(n.__)("Unpublish")),!be&&("publishing"===l?Object(n.__)("Publishing"):Object(n.__)("Publish")))}),null),Object(m.createElement)(ee,null))),r&&Object(m.createElement)(T.Modal,{title:Object(n.__)("Save Template"),onRequestClose:function(){return c(!1)}},Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),value:f,onChange:O}),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:je},Object(n.__)("Save")))):null},icon:y})}]);
|
editor/src/data/templates-cloud/index.js
CHANGED
@@ -158,7 +158,7 @@ export const getTemplate = async ( template ) => {
|
|
158 |
return false;
|
159 |
}
|
160 |
|
161 |
-
return
|
162 |
}
|
163 |
} catch ( error ) {
|
164 |
return false;
|
158 |
return false;
|
159 |
}
|
160 |
|
161 |
+
return content;
|
162 |
}
|
163 |
} catch ( error ) {
|
164 |
return false;
|
editor/src/edit.js
CHANGED
@@ -23,14 +23,14 @@ const Edit = ( {
|
|
23 |
} ) => {
|
24 |
const {
|
25 |
type,
|
26 |
-
postId
|
27 |
} = useSelect( ( select ) => ( {
|
28 |
type: select( 'core/editor' ).getEditedPostAttribute( 'type' ),
|
29 |
-
postId: select( 'core/editor' ).getEditedPostAttribute( 'id' ),
|
30 |
} ) );
|
31 |
|
32 |
const { createErrorNotice } = useDispatch( 'core/notices' );
|
33 |
|
|
|
|
|
34 |
const { updateLibrary, updateTemplates } = useDispatch(
|
35 |
'tpc/block-editor'
|
36 |
);
|
@@ -105,16 +105,9 @@ const Edit = ( {
|
|
105 |
updateTemplates( [] );
|
106 |
|
107 |
if ( 0 < metaFields.length && [ 'post', 'page' ].includes( type ) ) {
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
post = new wp.api.models.Post( { id: postId } );
|
112 |
-
} else if ( type === 'page' ) {
|
113 |
-
post = new wp.api.models.Page( { id: postId } );
|
114 |
-
}
|
115 |
-
|
116 |
-
post.set( 'meta', { ...JSON.parse( metaFields ) } );
|
117 |
-
post.save();
|
118 |
}
|
119 |
|
120 |
replaceBlocks( clientId, parse( content ) );
|
23 |
} ) => {
|
24 |
const {
|
25 |
type,
|
|
|
26 |
} = useSelect( ( select ) => ( {
|
27 |
type: select( 'core/editor' ).getEditedPostAttribute( 'type' ),
|
|
|
28 |
} ) );
|
29 |
|
30 |
const { createErrorNotice } = useDispatch( 'core/notices' );
|
31 |
|
32 |
+
const { editPost } = useDispatch( 'core/editor' );
|
33 |
+
|
34 |
const { updateLibrary, updateTemplates } = useDispatch(
|
35 |
'tpc/block-editor'
|
36 |
);
|
105 |
updateTemplates( [] );
|
106 |
|
107 |
if ( 0 < metaFields.length && [ 'post', 'page' ].includes( type ) ) {
|
108 |
+
editPost( {
|
109 |
+
meta: { ...JSON.parse( metaFields ) },
|
110 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
replaceBlocks( clientId, parse( content ) );
|
editor/src/extension.js
CHANGED
@@ -68,7 +68,7 @@ const Exporter = () => {
|
|
68 |
|
69 |
useEffect( () => {
|
70 |
const metaKeys = window.tiTpc.metaKeys;
|
71 |
-
window.tiTpc.params.meta = Object.fromEntries( Object.entries( getMetaFields ).filter(( [key, value] ) => metaKeys.includes( key )) );
|
72 |
}, [ getMetaFields ] );
|
73 |
|
74 |
const {
|
@@ -203,25 +203,30 @@ const Exporter = () => {
|
|
203 |
doesExist = await getTemplate( templateID );
|
204 |
}
|
205 |
|
206 |
-
if ( doesExist ) {
|
|
|
|
|
|
|
|
|
207 |
url = stringifyUrl( {
|
208 |
-
url: window.tiTpc.endpoint + 'templates
|
209 |
query: {
|
210 |
...omit( tiTpc.params, 'meta' ),
|
211 |
-
meta:
|
212 |
template_name: postTitle,
|
|
|
|
|
|
|
213 |
link,
|
214 |
},
|
215 |
} );
|
216 |
} else {
|
217 |
url = stringifyUrl( {
|
218 |
-
url: window.tiTpc.endpoint + 'templates',
|
219 |
query: {
|
220 |
...omit( tiTpc.params, 'meta' ),
|
|
|
221 |
template_name: postTitle,
|
222 |
-
template_type: 'gutenberg',
|
223 |
-
template_site_slug: _ti_tpc_site_slug || '',
|
224 |
-
template_thumbnail: _ti_tpc_screenshot_url || '',
|
225 |
link,
|
226 |
},
|
227 |
} );
|
68 |
|
69 |
useEffect( () => {
|
70 |
const metaKeys = window.tiTpc.metaKeys;
|
71 |
+
window.tiTpc.params.meta = Object.fromEntries( Object.entries( getMetaFields || {} ).filter(( [key, value] ) => metaKeys.includes( key )) );
|
72 |
}, [ getMetaFields ] );
|
73 |
|
74 |
const {
|
203 |
doesExist = await getTemplate( templateID );
|
204 |
}
|
205 |
|
206 |
+
if ( false !== doesExist && doesExist.template_type !== 'gutenberg' ) {
|
207 |
+
return;
|
208 |
+
}
|
209 |
+
|
210 |
+
if ( ! doesExist ) {
|
211 |
url = stringifyUrl( {
|
212 |
+
url: window.tiTpc.endpoint + 'templates',
|
213 |
query: {
|
214 |
...omit( tiTpc.params, 'meta' ),
|
215 |
+
meta: JSON.stringify( tiTpc.params.meta ),
|
216 |
template_name: postTitle,
|
217 |
+
template_type: 'gutenberg',
|
218 |
+
template_site_slug: _ti_tpc_site_slug || '',
|
219 |
+
template_thumbnail: _ti_tpc_screenshot_url || '',
|
220 |
link,
|
221 |
},
|
222 |
} );
|
223 |
} else {
|
224 |
url = stringifyUrl( {
|
225 |
+
url: window.tiTpc.endpoint + 'templates/' + templateID,
|
226 |
query: {
|
227 |
...omit( tiTpc.params, 'meta' ),
|
228 |
+
meta: JSON.stringify( tiTpc.params.meta ),
|
229 |
template_name: postTitle,
|
|
|
|
|
|
|
230 |
link,
|
231 |
},
|
232 |
} );
|
elementor/build/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill', 'wp-primitives'), 'version' => '6eb35ac9420a3150e7242a1550f19a2b');
|
elementor/build/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.components},function(e,t){function r(e,t,r,n,a,c,i){try{var o=e[c](i),l=o.value}catch(e){return void r(e)}o.done?t(l):Promise.resolve(l).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var i=e.apply(t,n);function o(e){r(i,a,c,o,l,"next",e)}function l(e){r(i,a,c,o,l,"throw",e)}o(void 0)}))}}},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t,r){var n=r(19),a=r(20),c=r(14),i=r(21);e.exports=function(e,t){return n(e)||a(e,t)||c(e,t)||i()}},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=a.apply(null,n);i&&e.push(i)}else if("object"===c)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){"use strict";const n=r(25),a=r(26),c=r(27);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function l(e,t){return t.decode?a(e):e}function s(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=s(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const a="string"==typeof r&&r.includes(e.arrayFormatSeparator),c="string"==typeof r&&!a&&l(r,e).includes(e.arrayFormatSeparator);r=c?l(r,e):r;const i=a||c?r.split(e.arrayFormatSeparator).map(t=>l(t,e)):null===r?r:l(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const a of e.split("&")){let[e,i]=c(t.decode?a.replace(/\+/g," "):a,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:l(i,t),r(l(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=u,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const a=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[",a,"]"].join("")]:[...r,[o(t,e),"[",o(a,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[]"].join("")]:[...r,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[o(t,e),"=",o(n,e)].join("")]:[[r,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,o(t,e)]:[...r,[o(t,e),"=",o(n,e)].join("")]}}(t),a={};for(const t of Object.keys(e))r(t)||(a[t]=e[t]);const c=Object.keys(a);return!1!==t.sort&&c.sort(t.sort),c.map(r=>{const a=e[r];return void 0===a?"":null===a?o(r,t):Array.isArray(a)?a.reduce(n(r),[]).join("&"):o(r,t)+"="+o(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=c(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(u(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:l(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=s(e.url).split("?")[0]||"",a=t.extract(e.url),c=t.parse(a,{sort:!1}),i=Object.assign(c,e.query);let l=t.stringify(i,r);l&&(l="?"+l);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+o(e.fragmentIdentifier,r)),`${n}${l}${u}`}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},function(e,t,r){var n=r(22),a=r(23),c=r(14),i=r(24);e.exports=function(e){return n(e)||a(e)||c(e)||i()}},function(e,t,r){var n=r(15);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=window.wp.keycodes},,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,c=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,c=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw c}}return r}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){var n=r(15);e.exports=function(e){if(Array.isArray(e))return n(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function c(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],c(r),c(n))}function i(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=c(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=a.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=i(r[0]);n!==r[0]&&(t[r[0]]=n)}r=a.exec(e)}t["%C2"]="�";for(var c=Object.keys(t),o=0;o<c.length;o++){var l=c[o];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n,a=r(6),c=r.n(a),i=r(1),o=r.n(i),l=r(3),s=r.n(l),u=r(0),p=r(7),m=r.n(p),d=r(2),b=r(13),f=r.n(b),g=r(8),w=r.n(g),y=r(9),h=new Uint8Array(16);function v(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(h)}for(var O=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,j=function(e){return"string"==typeof e&&O.test(e)},E=[],x=0;x<256;++x)E.push((x+256).toString(16).substr(1));var T=function(e,t,r){var n=(e=e||{}).random||(e.rng||v)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase();if(!j(r))throw TypeError("Stringified UUID is invalid");return r}(n)},k=r(10),_=r.n(k),P=r(4);function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=lodash.omit,D=function(e){return elementor.notifications.showToast({message:e})},M=function(){var e=s()(o.a.mark((function e(){var t,r,n,a,c,i,l,s,u,p=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},r=N(N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta")),{},{per_page:20,page:0,premade:!0,template_site_slug:"general"},C(t,"isScroll")),n=Object(y.stringifyUrl)({url:window.tiTpc.endpoint+"page-templates",query:r}),e.prev=3,e.next=6,_()({url:n,method:"GET",parse:!1});case 6:if(!(a=e.sent).ok){e.next=18;break}return e.next=10,a.json();case 10:if(!(c=e.sent).message){e.next=13;break}return e.abrupt("return",D(c.message));case 13:i=c,t.isScroll&&(l=Object(P.select)("tpc/elementor").getTemplates(),i=[].concat(f()(l.items),f()(c))),s=a.headers.get("x-wp-totalpages"),u=r.page,Object(P.dispatch)("tpc/elementor").updateTemplates(i,u,s);case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),e.t0.message&&D(e.t0.message);case 23:case"end":return e.stop()}}),e,null,[[3,20]])})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=s()(o.a.mark((function e(){var t,r,n,a,c,i,l,s,u,p=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=p.length>0&&void 0!==p[0]?p[0]:{},3===parseInt(window.tiTpc.tier)){e.next=3;break}return e.abrupt("return");case 3:return r=N({per_page:20,page:0},C(t,"isScroll")),n=Object(y.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:N(N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta")),r)}),e.prev=5,e.next=8,_()({url:n,method:"GET",parse:!1});case 8:if(!(a=e.sent).ok){e.next=20;break}return e.next=12,a.json();case 12:if(!(c=e.sent).message){e.next=15;break}return e.abrupt("return",D(c.message));case 15:i=c,t.isScroll&&(l=Object(P.select)("tpc/elementor").getLibrary(),i=[].concat(f()(l.items),f()(c))),s=a.headers.get("x-wp-totalpages"),u=r.page,Object(P.dispatch)("tpc/elementor").updateLibrary(i,u,s);case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(5),e.t0.message&&D(e.t0.message);case 25:case"end":return e.stop()}}),e,null,[[5,22]])})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=s()(o.a.mark((function e(t){var r,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta"))}),e.prev=1,e.next=4,_()({url:r,method:"GET",parse:!1});case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:if(!e.sent.message){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t,"/import"),query:N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta"))}),n={},e.prev=2,e.next=5,_()({url:r,method:"GET",parse:!1});case 5:if(!(a=e.sent).ok){e.next=12;break}return e.next=9,a.json();case 9:if(!(n=e.sent).message){e.next=12;break}return e.abrupt("return",D(n.message));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),e.t0.message&&D(e.t0.message);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t,"/clone"),query:N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta"))}),e.prev=1,e.next=4,_()({url:r,method:"POST"});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",D(a.message));case 11:return localStorage.setItem("tpcCacheBuster",T()),e.next=14,I();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&D(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=s()(o.a.mark((function e(t){var r,n,a,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t.template_id),query:N(N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta")),C(t,"content"))}),e.prev=1,n={url:r,method:"POST",parse:!1},t.content&&(a={title:elementor.config.initial_document.settings.settings.post_title||"",version:"0.4",type:"page",content:t.content},n.data=a),e.next=6,_()(N({},n));case 6:if(!(c=e.sent).ok){e.next=13;break}return e.next=10,c.json();case 10:if(!(i=e.sent).message){e.next=13;break}return e.abrupt("return",D(i.message));case 13:return localStorage.setItem("tpcCacheBuster",T()),e.next=16,I();case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),e.t0.message&&D(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[1,18]])})));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:N({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},C(tiTpc.params,"meta"))}),e.prev=1,e.next=4,_()({url:r,method:"POST"});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",D(a.message));case 11:return localStorage.setItem("tpcCacheBuster",T()),e.next=14,I();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&D(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=s()(o.a.mark((function e(t){var r,n,a,c,i,l,s,u,p,m,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.title,n=t.type,a=t.content,c=t.link,i=void 0===c?"":c,l=t.callback,s=void 0===l?function(){}:l,u={version:"0.4",title:r,type:n,content:a},p=Object(y.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:N(N({},C(tiTpc.params,"meta")),{},{template_name:r||window.tiTpc.exporter.textPlaceholder,template_type:"elementor",link:i})}),e.prev=3,e.next=6,_()({url:p,method:"POST",data:u,parse:!1});case 6:if(!(m=e.sent).ok){e.next=12;break}return e.next=10,m.json();case 10:(d=e.sent).message?D(d.message):(s(d),window.localStorage.setItem("tpcCacheBuster",T()),D(window.tiTpc.exporter.templateSaved));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),e.t0.message&&D(e.t0.message);case 17:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t.template_id,"/publish"),query:N(N({cache:localStorage.getItem("tpcCacheBuster"),method:"POST"},C(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},C(t,"template_id"))}),e.prev=1,e.next=4,_()({url:r,method:"POST",headers:{Authorization:"Bearer ".concat(window.tiTpc.bearer||""," ")}});case 4:if(!(n=e.sent).ok){e.next=14;break}return e.next=8,n.json();case 8:if(!(a=e.sent).message){e.next=12;break}return D(a.message),e.abrupt("return",{success:!1});case 12:e.next=17;break;case 14:if(!n.message){e.next=17;break}return D(n.message),e.abrupt("return",{success:!1});case 17:return localStorage.setItem("tpcCacheBuster",T()),e.abrupt("return",{success:!0});case 21:if(e.prev=21,e.t0=e.catch(1),!e.t0.message){e.next=26;break}return D(e.t0.message),e.abrupt("return",{success:!1});case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t){return e.apply(this,arguments)}}();3===parseInt(window.tiTpc.tier)&&(elementor.on("document:loaded",(function(){s()(o.a.mark((function e(){var t,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(["wp-post","wp-page"].includes(elementor.config.document.type)){e.next=2;break}return e.abrupt("return",null);case 2:if(t=elementor.config.document.id,"page"!==window.tiTpc.postType){e.next=9;break}return e.next=6,new wp.api.models.Page({id:t});case 6:window.tiTpc.postModel=e.sent,e.next=12;break;case 9:return e.next=11,new wp.api.models.Post({id:t});case 11:window.tiTpc.postModel=e.sent;case 12:return e.next=14,window.tiTpc.postModel.fetch();case 14:(r=document.querySelector("button#elementor-panel-saver-button-publish")).addEventListener("click",s()(o.a.mark((function e(){var t,n,a,c,i,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.tiTpc.postModel.fetch();case 2:return t=window.tiTpc.postModel.getMetas(),n=t._ti_tpc_template_sync,a=t._ti_tpc_template_id,c=t._ti_tpc_published,e.next=5,L(a);case 5:if(i=e.sent,r.className.includes("elementor-disabled")||!n||!a||!i){e.next=10;break}return l=elementor.elements.toJSON({remove:["default","editSettings","defaultEditSettings"]}),e.next=10,A({template_id:a,template_name:elementor.config.initial_document.settings.settings.post_title||"",content:l,meta:c?JSON.stringify(tiTpc.params.meta):""});case 10:case"end":return e.stop()}}),e)}))));case 16:case"end":return e.stop()}}),e)})))()})),document.addEventListener("DOMContentLoaded",(function(){var e=function(e){var t=e.content,r=Object(u.useState)(""),n=c()(r,2),a=n[0],i=n[1],l=Object(u.useState)(!1),p=c()(l,2),b=p[0],f=p[1],g=function(){Object(u.unmountComponentAtNode)(document.getElementById("ti-tpc-modal"))},w=function(){var e=s()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.next=3,R({title:a,type:"section",content:[t]});case 3:f(!1),g();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.createElement)(d.Modal,{title:window.tiTpc.exporter.modalLabel,onRequestClose:g,overlayClassName:m()({"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)(d.TextControl,{label:window.tiTpc.exporter.textLabel,placeholder:window.tiTpc.exporter.textPlaceholder,value:a,onChange:i}),Object(u.createElement)(d.Button,{isPrimary:!0,isBusy:b,disabled:b,onClick:w},window.tiTpc.exporter.buttonLabel))};elementor.hooks.addFilter("elements/section/contextMenuGroups",(function(t,r){var n={name:"ti_tpc_export",title:window.tiTpc.exporter.exportLabel,callback:function(){return function(t){var r=t.model.toJSON({remove:["default","editSettings","defaultEditSettings"]}),n=document.createElement("div");n.id="ti-tpc-modal",document.body.appendChild(n),Object(u.render)(Object(u.createElement)(e,{content:r}),document.getElementById("ti-tpc-modal"))}(r)}},a=t.find((function(e){return"save"===e.name}));if(a)a.actions.push(n);else{var c={name:"ti_tpc_export",actions:[n]};t.splice(3,0,c),t.join()}return t}))})));var G=r(12),H=r(5);function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $=function(e){var t=e.title;return Object(u.createElement)(H.SVG,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tpc-template-cloud-icon",title:t},Object(u.createElement)(H.Path,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(u.createElement)(H.Path,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(u.createElement)(H.Path,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},Y=Object(G.compose)(Object(P.withSelect)((function(e){var t=e("tpc/elementor"),r=t.isFetching,n=t.isPreview,a=t.getCurrentTab,c=t.getPreview;return{isFetching:r(),isPreview:n(),currentTab:a(),preview:c()}})),Object(P.withDispatch)((function(e){var t=e("tpc/elementor");return{setFetching:t.setFetching,togglePreview:t.togglePreview,updateCurrentTab:t.updateCurrentTab}})))((function(e){var t=e.getSearchQuery,r=e.getOrder,n=e.onImport,a=e.isFetching,c=e.isPreview,i=e.currentTab,l=e.preview,p=e.setFetching,b=e.togglePreview,f=e.updateCurrentTab,g=function(){var e=s()(o.a.mark((function e(){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.setItem("tpcCacheBuster",T()),p(!0),n=r(),e.next=5,M(q({search:t()},n));case 5:return e.next=7,I(q({search:t()},n));case 7:p(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.createElement)("div",{className:m()("dialog-header dialog-lightbox-header",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header"},Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__logo-area"},c?Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-header-preview-back",onClick:b},Object(u.createElement)("i",{className:"eicon-","aria-hidden":"true"}),Object(u.createElement)("span",null,window.tiTpc.library.actions.back)):Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__logo"},Object(u.createElement)($,{title:window.tiTpc.library.templatesCloud}))),!c&&Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__menu-area"},Object(u.createElement)(d.Button,{className:m()("ti-tpc-template-library-menu-item",{"is-active":"templates"===i}),onClick:function(){return f("templates")}},window.tiTpc.library.tabs.templates),3===parseInt(window.tiTpc.tier)&&Object(u.createElement)(d.Button,{className:m()("ti-tpc-template-library-menu-item",{"is-active":"library"===i}),onClick:function(){return f("library")}},window.tiTpc.library.tabs.library)),Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__items-area"},Object(u.createElement)("div",{className:"ti-tpc-template-library-header-tools"},c?Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__item ti-tpc-template-library-header-preview-insert-wrapper"},Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-template-insert elementor-button",onClick:function(){return n({id:l.template_id,title:l.template_name,meta:l.meta||[]})}},Object(u.createElement)("i",{className:"eicon-file-download","aria-hidden":"true"}),Object(u.createElement)("span",{className:"elementor-button-title"},window.tiTpc.library.actions.insert))):Object(u.createElement)("div",{className:"ti-tpc-template-library-header-actions"},"library"===i&&Object(u.createElement)(d.Button,{className:"ti-tpc-templates-modal__header__item",onClick:g},Object(u.createElement)("i",{className:m()("eicon-sync",{"eicon-animation-spin":a}),"aria-hidden":"true",title:window.tiTpc.library.actions.sync}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.actions.sync)),["wp-post","wp-page"].includes(elementor.config.document.type)&&3===parseInt(window.tiTpc.tier)&&Object(u.createElement)(d.Button,{className:"ti-tpc-templates-modal__header__item",onClick:function(){return f("export")}},Object(u.createElement)("i",{className:"eicon-save-o","aria-hidden":"true",title:window.tiTpc.library.save}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.save)))),Object(u.createElement)(d.Button,{className:"ti-tpc-templates-modal__header__item ti-tpc-templates-modal__header__close",onClick:window.tiTpcModal.hide},Object(u.createElement)("i",{className:"eicon-close","aria-hidden":"true",title:window.tiTpc.library.actions.close}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.actions.close)))))})),Z=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(H.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})),Q=r(16),J=r(11);function W(e){return[null,void 0].includes(e)}function K(e){var t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}}function X(e,t,r){if(e){var n=K(e),a=n.left,c=n.right,i=n.top,o=n.bottom;if(a>r)return!1;if(c<0)return!1;if(i>t)return!1;if(o<0)return!1}return!0}var ee=function(e){var t,r,n,a=e.loading,c=e.hasNextPage,i=e.onLoadMore,o=e.threshold,l=void 0===o?150:o,s=e.checkInterval,u=void 0===s?200:s,p=e.scrollContainer,m=void 0===p?"window":p,d=Object(J.useRef)(null),b=function(){var e="object"==typeof window,t=Object(J.useCallback)((function(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}),[e]),r=Object(J.useState)(t()),n=r[0],a=r[1];return Object(J.useEffect)((function(){function r(){a(t())}if(e)return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}}),[t,e]),n}(),f=b.height,g=b.width,w=Object(J.useState)(!0),y=w[0],h=w[1];return Object(J.useEffect)((function(){a||h(!0)}),[a]),t=function(){!function(){if(y&&!a&&c&&d.current){if("parent"===m){if(!(n=null===(r=d.current)||void 0===r?void 0:r.parentNode)||W(f)||W(g)||!X(n,f,g))return}else if(!(t=d.current)||W(f)||W(g)||!X(t,f,g))return;var e=function(){var e=d.current;if(!e||W(f))return null;var t=e.getBoundingClientRect().bottom,r=t-f;if("parent"===m){var n=e.parentNode;if(!n)return null;r=t-K(n).bottom}return r}();if(W(e))return;e<l&&(h(!1),i())}var t,r,n}()},r=c?u:0,n=Object(J.useRef)(null),Object(J.useEffect)((function(){n.current=t}),[t]),Object(J.useEffect)((function(){if(r){var e=setInterval((function(){var e;null===(e=n.current)||void 0===e||e.call(n)}),r);return function(){clearInterval(e)}}}),[r]),d},te=Object(u.createElement)(H.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(H.Path,{d:"M7.5 12C7.5 11.1716 6.82843 10.5 6 10.5C5.17157 10.5 4.5 11.1716 4.5 12C4.5 12.8284 5.17157 13.5 6 13.5C6.82843 13.5 7.5 12.8284 7.5 12Z"}),Object(u.createElement)(H.Path,{d:"M13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5C12.8284 13.5 13.5 12.8284 13.5 12Z"}),Object(u.createElement)(H.Path,{d:"M19.5 12C19.5 11.1716 18.8284 10.5 18 10.5C17.1716 10.5 16.5 11.1716 16.5 12C16.5 12.8284 17.1716 13.5 18 13.5C18.8284 13.5 19.5 12.8284 19.5 12Z"})),re=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(H.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),ne=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(H.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"})),ae=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(u.createElement)(H.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"}));function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ie=Object(P.withDispatch)((function(e){var t=e("tpc/elementor");return{togglePreview:t.togglePreview,setPreviewData:t.setPreviewData}}))((function(e){var t=e.table,r=void 0!==t&&t,n=e.item,a=e.id,i=e.title,o=e.meta,l=e.thumbnail,s=e.onImport,p=e.onUpdateTemplate,m=e.onDelete,b=e.onDuplicate,f=e.togglePreview,g=e.setPreviewData,y=Object(u.useState)(!1),h=c()(y,2),v=h[0],O=h[1],j=Object(u.useState)(i),E=c()(j,2),x=E[0],T=E[1];return r?Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-item"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},v?Object(u.createElement)(u.Fragment,null,Object(u.createElement)("input",{type:"text",value:x,onChange:function(e){return T(e.target.value)}}),Object(u.createElement)(d.Button,{className:"elementor-button",onClick:function(){return p(a,x)}},Object(u.createElement)("i",{className:"eicon-check","aria-hidden":"true",title:window.tiTpc.library.actions.save}),Object(u.createElement)("span",{className:"elementor-button-title elementor-hidden"},window.tiTpc.library.actions.save)),Object(u.createElement)(d.Button,{className:"elementor-button",onClick:function(){return O(!1)}},Object(u.createElement)("i",{className:"eicon-editor-close","aria-hidden":"true",title:window.tiTpc.library.actions.cancel}),Object(u.createElement)("span",{className:"elementor-button-title elementor-hidden"},window.tiTpc.library.actions.cancel))):i),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},moment(n.date).format("MMMM D, YYYY")),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},moment(n.modified).format("MMMM D, YYYY")),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},Object(u.createElement)(d.Button,{className:"elementor-button elementor-button-success",onClick:function(){return s({id:a,title:i,meta:o})}},Object(u.createElement)("i",{className:"eicon-file-download","aria-hidden":"true"}),Object(u.createElement)("span",{className:"elementor-button-title"},window.tiTpc.library.actions.insert)),Object(u.createElement)(d.DropdownMenu,{icon:te,label:window.tiTpc.library.filters.sortLabels.actions,popoverProps:{position:"bottom right",noArrow:!1},controls:[{title:window.tiTpc.library.actions.edit,icon:re,isDisabled:!!n.link,onClick:function(){return O(!0)}},{title:window.tiTpc.library.actions.duplicate,icon:ne,onClick:function(){return b(a)}},{title:window.tiTpc.library.actions.delete,icon:ae,onClick:function(){return m(a)}}]}))):Object(u.createElement)("div",{className:"ti-tpc-template-library-template"},Object(u.createElement)("div",{className:"ti-tpc-template-library-template-body"},Object(u.createElement)("div",{className:"ti-tpc-template-library-template-screenshot",style:{backgroundImage:"url( ".concat(l,")")}}),Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-template-preview",onClick:function(){f(),g(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},n))}},Object(u.createElement)("i",{className:"eicon-zoom-in-bold","aria-hidden":"true"}))),Object(u.createElement)("div",{className:"ti-tpc-template-library-template-footer"},Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-template-action elementor-button",onClick:function(){return s({id:a,title:i,meta:o})}},Object(u.createElement)("i",{className:"eicon-file-download","aria-hidden":"true"}),Object(u.createElement)("span",null,window.tiTpc.library.actions.insert)),Object(u.createElement)("div",{className:"ti-tpc-template-library-template-name"},i)))}));function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var se={template_name:window.tiTpc.library.filters.sortLabels.name,date:window.tiTpc.library.filters.sortLabels.date,modified:window.tiTpc.library.filters.sortLabels.modified},ue=Object(P.withSelect)((function(e,t){var r=t.isGeneral?e("tpc/elementor").getTemplates():e("tpc/elementor").getLibrary(),n=r.items;return{items:void 0===n?[]:n,currentPage:r.currentPage,totalPages:r.totalPages}}))((function(e){var t=e.getSearchQuery,r=e.getOrder,n=e.setSorting,a=e.onImport,i=e.onUpdateTemplate,l=e.onDelete,p=e.onDuplicate,b=e.isGeneral,f=e.items,g=e.currentPage,w=e.totalPages,y=Object(u.useState)(!1),h=c()(y,2),v=h[0],O=h[1],j=ee({loading:v,hasNextPage:g!==w,onLoadMore:function(){var e=s()(o.a.mark((function e(){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g!==w){e.next=2;break}return e.abrupt("return");case 2:if(O(!0),n=r(),!b){e.next=9;break}return e.next=7,M(le({search:t(),page:g+1,isScroll:!0},n));case 7:e.next=11;break;case 9:return e.next=11,I(le({search:t(),page:g+1,isScroll:!0},n));case 11:O(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),threshold:1});return Object(u.createElement)("div",{className:m()("ti-tpc-template-library-templates-container",{"is-table":!b}),ref:j},b?f.map((function(e){return Object(u.createElement)(ie,{key:e.template_id,item:e,id:e.template_id,title:e.template_name,thumbnail:e.template_thumbnail,onImport:a})})):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-header"},Object.keys(se).map((function(e){return Object(u.createElement)("div",{key:e,className:"ti-tpc-template-library-templates-table-column"},Object(u.createElement)(d.Button,{className:m()({"is-selected":e===r().orderby,"is-asc":"ASC"===r().order}),onClick:function(){var t={order:"DESC",orderby:e};e===r().orderby&&"DESC"===r().order&&(t.order="ASC"),n(le({},t))}},se[e]))})),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},Object(u.createElement)(d.Button,null,window.tiTpc.library.filters.sortLabels.actions))),f.map((function(e){return Object(u.createElement)(ie,{table:!0,key:e.template_id,item:e,id:e.template_id,title:e.template_name,meta:e.meta||[],onImport:a,onUpdateTemplate:i,onDelete:l,onDuplicate:function(e){return p(e)}})}))),0===f.length&&(b?Object(u.createElement)("p",null,"No templates found. Check again later!"):Object(u.createElement)("p",null,"No templates available. Try adding few templates.")),v&&Object(u.createElement)(d.Placeholder,null,Object(u.createElement)(d.Spinner,null)))})),pe=Object(P.withDispatch)((function(e){return{updateCurrentTab:e("tpc/elementor").updateCurrentTab}}))((function(e){var t=e.updateCurrentTab;Object(u.useEffect)((function(){var e=window.tiTpc.postModel.getMetas(),t=e._ti_tpc_template_sync,r=e._ti_tpc_template_id,n=e._ti_tpc_screenshot_url,a=e._ti_tpc_site_slug,c=e._ti_tpc_published;g(Boolean(t)),v(r),x(n),P(a),D(Boolean(c))}),[]);var r=elementor.config.initial_document.settings.settings.post_title||"",n=Object(u.useState)(!1),a=c()(n,2),i=a[0],l=a[1],p=Object(u.useState)(!1),b=c()(p,2),f=b[0],g=b[1],w=Object(u.useState)(""),y=c()(w,2),h=y[0],v=y[1],O=Object(u.useState)(""),j=c()(O,2),E=j[0],x=j[1],T=Object(u.useState)(""),k=c()(T,2),_=k[0],P=k[1],S=Object(u.useState)(""),N=c()(S,2),C=N[0],D=N[1],M=function(){var e=s()(o.a.mark((function e(){var n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l(!0),n=elementor.elements.toJSON({remove:["default","editSettings","defaultEditSettings"]}),a=!1,!h){e.next=7;break}return e.next=6,L(h);case 6:a=e.sent;case 7:if(!a){e.next=12;break}return e.next=10,A({template_id:h,template_name:r,content:n,link:elementor.config.initial_document.urls.permalink,meta:C?JSON.stringify(tiTpc.params.meta):""});case 10:e.next=14;break;case 12:return e.next=14,R({title:r,type:"page",content:n,link:elementor.config.initial_document.urls.permalink,callback:function(e){v(e.template_id),window.tiTpc.postModel.set("meta",{_ti_tpc_template_id:e.template_id,_ti_tpc_template_sync:f}),window.tiTpc.postModel.save()}});case 14:l(!1),t("library");case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=s()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.next=3,V({template_id:h,template_site_slug:_,template_thumbnail:E,premade:C?"no":"yes",link:elementor.config.initial_document.urls.permalink}).then((function(e){e.success&&(elementor.notifications.showToast({message:C?window.tiTpc.exporter.templateUnpublished:window.tiTpc.exporter.templatePublished}),D(!C),window.tiTpc.postModel.set("meta",{_ti_tpc_template_id:h,_ti_tpc_template_sync:f,_ti_tpc_screenshot_url:E,_ti_tpc_site_slug:_,_ti_tpc_published:!C}),window.tiTpc.postModel.save())}));case 3:l(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.createElement)("div",{className:"dialog-message dialog-lightbox-message"},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content"},Object(u.createElement)("div",{className:"ti-tpc-template-library-export"},Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-icon"},Object(u.createElement)("i",{className:"eicon-library-save","aria-hidden":"true"}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.export.save)),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-title"},window.tiTpc.library.export.title),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)("input",{className:"ti-tpc-template-library-blank-field-input",value:elementor.config.initial_document.settings.settings.post_title,disabled:!0}),Object(u.createElement)(d.Button,{className:m()("elementor-button elementor-button-success",{"elementor-button-state":i}),onClick:M},Object(u.createElement)("span",{className:"elementor-state-icon"},Object(u.createElement)("i",{className:"eicon-loading eicon-animation-spin","aria-hidden":"true"})),window.tiTpc.library.export.save)),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)(d.ToggleControl,{label:window.tiTpc.exporter.toggleLabel,checked:f,onChange:function(){return g(!f)}})),window.tiTpc.canPredefine&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)("label",{htmlFor:"ti-tpc-template-screenshot",className:"ti-tpc-template-library-blank-field-input-label"},window.tiTpc.library.export.labelScreenshot),Object(u.createElement)("input",{className:"ti-tpc-template-library-blank-field-input",id:"ti-tpc-template-screenshot",value:E,onChange:function(e){return x(e.target.value)}})),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)("label",{htmlFor:"ti-tpc-template-slug",className:"ti-tpc-template-library-blank-field-input-label"},window.tiTpc.library.export.labelSlug),Object(u.createElement)("input",{className:"ti-tpc-template-library-blank-field-input",id:"ti-tpc-template-slug",value:_,onChange:function(e){return P(e.target.value)}})),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)(d.Button,{className:m()("elementor-button elementor-button-success",{"elementor-button-state":i}),onClick:I},Object(u.createElement)("span",{className:"elementor-state-icon"},Object(u.createElement)("i",{className:"eicon-loading eicon-animation-spin","aria-hidden":"true"})),C?window.tiTpc.library.export.unpublish:window.tiTpc.library.export.publish))))))}));function me(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var be={date:window.tiTpc.library.filters.sortLabels.date,template_name:window.tiTpc.library.filters.sortLabels.name,modified:window.tiTpc.library.filters.sortLabels.modified},fe=Object(G.compose)(Object(P.withSelect)((function(e){var t=e("tpc/elementor"),r=t.isFetching,n=t.isPreview,a=t.getCurrentTab,c=t.getPreview;return{isFetching:r(),isPreview:n(),currentTab:a(),preview:c()}})),Object(P.withDispatch)((function(e){return{setFetching:e("tpc/elementor").setFetching}})))((function(e){var t=e.setQuery,r=e.getSearchQuery,n=e.setSorting,a=e.getOrder,c=e.isSearch,i=e.setSearch,l=e.onImport,p=e.isFetching,b=e.isPreview,f=e.currentTab,g=e.preview,w=e.setFetching,y=function(){var e=s()(o.a.mark((function e(){var t,n,c=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:r(),w(!0),i(!!t),n=a(),"templates"!==f){e.next=9;break}return e.next=7,M(de({search:t},n));case 7:e.next=11;break;case 9:return e.next=11,I(de({search:t},n));case 11:w(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(u.useEffect)((function(){y()}),[f,a()]);var h="templates"===f,v=function(){var e=s()(o.a.mark((function e(t,r){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,A({template_id:t,template_name:r});case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),O=function(){var e=s()(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,U(t);case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=s()(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,F(t);case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return b?Object(u.createElement)("div",{className:m()("dialog-message dialog-lightbox-message",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content"},Object(u.createElement)("div",{className:"ti-tpc-template-library-preview"},Object(u.createElement)("iframe",{title:g.template_name,src:g.link||""}),Object(u.createElement)("div",{className:"is-loading"},Object(u.createElement)(d.Icon,{icon:Z}))))):p?Object(u.createElement)("div",{className:m()("dialog-message dialog-lightbox-message",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content is-loading"},Object(u.createElement)(d.Spinner,null))):"export"===f?Object(u.createElement)(pe,null):Object(u.createElement)("div",{className:m()("dialog-message dialog-lightbox-message",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-filters"},h&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-filters-label"},window.tiTpc.library.filters.sortLabel),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-filters-filter"},Object.keys(be).map((function(e){return Object(u.createElement)(d.Button,{key:e,className:m()({"is-selected":e===a().orderby,"is-asc":"ASC"===a().order}),onClick:function(){var t={order:"DESC",orderby:e};e===a().orderby&&"DESC"===a().order&&(t.order="ASC"),n(de({},t))}},be[e])}))))),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-search"},Object(u.createElement)("label",{htmlFor:"ti-tpc-template-library-filter-search",className:"elementor-screen-only"},window.tiTpc.library.filters.searchLabel),Object(u.createElement)("input",{id:"ti-tpc-template-library-filter-search",placeholder:window.tiTpc.library.filters.search,value:r(),onChange:function(e){return t(e.target.value)},onKeyDown:function(e){e.keyCode===Q.ENTER&&y()}}),c?Object(u.createElement)(d.Button,{onClick:function(){t(""),y("")}},Object(u.createElement)("i",{className:"eicon-close"})):Object(u.createElement)(d.Button,{onClick:function(){return y()}},Object(u.createElement)("i",{className:"eicon-search"})))),["templates","library"].includes(f)&&Object(u.createElement)(ue,{getSearchQuery:function(){return r()},getOrder:a,setSorting:n,onImport:l,onUpdateTemplate:v,onDelete:O,onDuplicate:j,isFetching:p,isGeneral:h}))))}));function ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye=Object(G.compose)(Object(P.withSelect)((function(e){return{currentTab:(0,e("tpc/elementor").getCurrentTab)()}})),Object(P.withDispatch)((function(e){return{setFetching:e("tpc/elementor").setFetching}})))((function(e){var t=e.currentTab,r=e.setFetching,n=Object(u.useState)({templates:"",library:""}),a=c()(n,2),i=a[0],l=a[1],p=Object(u.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),m=c()(p,2),d=m[0],b=m[1],f=Object(u.useState)({templates:!1,library:!1}),g=c()(f,2),w=g[0],y=g[1],h="templates"===t,v=function(){return h?i.templates:i.library},O=function(){return h?d.templates:d.library},j=function e(t){if(t.id=elementorCommon.helpers.getUniqueId(),0<t.elements.length)for(var r=0;r<t.elements.length;r++)t.elements[r]=e(t.elements[r]);return t},E=function(){var e=s()(o.a.mark((function e(t){var n,a,c,i,l,s,u,p,m;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,a=t.title,c=t.meta,i=void 0===c?[]:c,r(!0),e.next=4,B(n);case 4:if(l=e.sent){e.next=7;break}return e.abrupt("return",r(!1));case 7:for(s=$e.internal("document/history/start-log",{type:"add",title:"".concat(window.tiTpc.library.historyMessage," ").concat(a)}),u=Number(window.tiTpc.placeholder),p=l.content,m=0;m<p.length;m++)p[m]=j(p[m]),$e.run("document/elements/create",{container:elementor.getPreviewContainer(),model:p[m],options:u>=0?{at:u++}:{}});0<i.length&&(window.tiTpc.postModel.set("meta",we({},JSON.parse(i))),window.tiTpc.postModel.save()),$e.internal("document/history/end-log",{id:s}),window.tiTpcModal.hide(),r(!1);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(Y,{getSearchQuery:v,getOrder:O,onImport:E}),Object(u.createElement)(fe,{setQuery:function(e){return l(we(we({},i),{},h?{templates:e}:{library:e}))},getSearchQuery:v,setSorting:function(e){return b(we(we({},d),{},h?{templates:e}:{library:e}))},getOrder:O,isSearch:h?w.templates:w.library,setSearch:function(e){return y(we(we({},w),{},h?{templates:e}:{library:e}))},onImport:E}))}));void 0!==elementorCommon&&(window.tiTpcModal=elementorCommon.dialogsManager.createWidget("lightbox",{id:"ti-tpc-templates-modal",className:"ti-tpc-templates-modal",hide:{auto:!1,onClick:!1,onOutsideClick:!1,onOutsideContextMenu:!1,onBackgroundClick:!0},position:{my:"center",at:"center"},onShow:function(){var e=window.tiTpcModal.getElements("content");document.getElementById("ti-tpc-templates-modal-content")||e.append('<div id="ti-tpc-templates-modal-content" class="wrap"></div>')}}),window.tiTpcModal.getElements("header").remove(),window.tiTpcModal.getElements("message").remove(),window.tiTpcModal.getElements("widgetContent").append(window.tiTpcModal.addElement("content")));var he=document.getElementById("tmpl-elementor-add-section");if(he){var ve=he.textContent;he.textContent=ve.replace('<div class="elementor-add-section-drag-title">Drag widget here</div>','<div class="elementor-add-section-area-button elementor-templates-cloud-button" title="'.concat(window.tiTpc.library.libraryButton,'"><svg width="100" height="100" viewBox="10 10 80 80" fill="none" xmlns="http://www.w3.org/2000/svg" class="tpc-template-cloud-icon" role="img" aria-hidden="true" focusable="false"><path d="M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z" fill="#0366D6"></path><path d="M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z" fill="white"></path><path d="M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z" fill="white" style=""></path></svg></div> <div class="elementor-add-section-drag-title">Drag widget here</div>'))}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}elementor.on("preview:loaded",(function(){elementor.$previewContents[0].body.addEventListener("click",(function(e){(-1<Array.from(e.target.classList).indexOf("elementor-templates-cloud-button")||-1<Array.from(e.target.classList).indexOf("tpc-template-cloud-icon")||-1<Array.from(e.target.parentNode.classList).indexOf("tpc-template-cloud-icon"))&&function(e){window.tiTpcModal.show();var t=elementor.$previewContents[0].body.querySelector(".elementor-section-wrap"),r=e.closest(".elementor-add-section");window.tiTpc.placeholder=Array.from(t.childNodes).indexOf(r),Object(u.render)(Object(u.createElement)(ye,null),document.getElementById("ti-tpc-templates-modal-content")),window.tiTpcModal.refreshPosition()}(e.target)}))}));var Ee={isFetching:!0,isPreview:!1,tab:3===parseInt(window.tiTpc.tier)?"library":"templates",templates:[],library:{items:[],currentPage:0,totalPages:0},preview:{}};Object(P.registerStore)("tpc/elementor",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ee,t=arguments.length>1?arguments[1]:void 0;return"SET_FETCHING"===t.type?je(je({},e),{},{isFetching:t.isFetching}):"TOGGLE_PREVIEW"===t.type?je(je({},e),{},{isPreview:!e.isPreview}):"UPDATE_CURRENT_TAB"===t.type?je(je({},e),{},{tab:t.tab}):"UPDATE_TEMPLATES"===t.type?je(je({},e),{},{templates:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"UPDATE_LIBRARY"===t.type?je(je({},e),{},{library:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"SET_PREVIEW_DATA"===t.type?je(je({},e),{},{preview:t.preview}):e},selectors:{isFetching:function(e){return e.isFetching},isPreview:function(e){return e.isPreview},getCurrentTab:function(e){return e.tab},getTemplates:function(e){return e.templates},getLibrary:function(e){return e.library},getPreview:function(e){return e.preview}},actions:{setFetching:function(e){return{type:"SET_FETCHING",isFetching:e}},togglePreview:function(e){return{type:"TOGGLE_PREVIEW",isPreview:e}},updateCurrentTab:function(e){return{type:"UPDATE_CURRENT_TAB",tab:e}},updateTemplates:function(e,t,r){return{type:"UPDATE_TEMPLATES",items:e,currentPage:t,totalPages:r}},updateLibrary:function(e,t,r){return{type:"UPDATE_LIBRARY",items:e,currentPage:t,totalPages:r}},setPreviewData:function(e){return{type:"SET_PREVIEW_DATA",preview:e}}}}),r(28)}]);
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.components},function(e,t){function r(e,t,r,n,a,c,i){try{var o=e[c](i),l=o.value}catch(e){return void r(e)}o.done?t(l):Promise.resolve(l).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var i=e.apply(t,n);function o(e){r(i,a,c,o,l,"next",e)}function l(e){r(i,a,c,o,l,"throw",e)}o(void 0)}))}}},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t,r){var n=r(19),a=r(20),c=r(14),i=r(21);e.exports=function(e,t){return n(e)||a(e,t)||c(e,t)||i()}},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=a.apply(null,n);i&&e.push(i)}else if("object"===c)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t,r){"use strict";const n=r(25),a=r(26),c=r(27);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function l(e,t){return t.decode?a(e):e}function s(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=s(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function m(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const a="string"==typeof r&&r.includes(e.arrayFormatSeparator),c="string"==typeof r&&!a&&l(r,e).includes(e.arrayFormatSeparator);r=c?l(r,e):r;const i=a||c?r.split(e.arrayFormatSeparator).map(t=>l(t,e)):null===r?r:l(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const a of e.split("&")){let[e,i]=c(t.decode?a.replace(/\+/g," "):a,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:l(i,t),r(l(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=u,t.parse=m,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const a=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[",a,"]"].join("")]:[...r,[o(t,e),"[",o(a,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[]"].join("")]:[...r,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[o(t,e),"=",o(n,e)].join("")]:[[r,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,o(t,e)]:[...r,[o(t,e),"=",o(n,e)].join("")]}}(t),a={};for(const t of Object.keys(e))r(t)||(a[t]=e[t]);const c=Object.keys(a);return!1!==t.sort&&c.sort(t.sort),c.map(r=>{const a=e[r];return void 0===a?"":null===a?o(r,t):Array.isArray(a)?a.reduce(n(r),[]).join("&"):o(r,t)+"="+o(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=c(e,"#");return Object.assign({url:r.split("?")[0]||"",query:m(u(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:l(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=s(e.url).split("?")[0]||"",a=t.extract(e.url),c=t.parse(a,{sort:!1}),i=Object.assign(c,e.query);let l=t.stringify(i,r);l&&(l="?"+l);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+o(e.fragmentIdentifier,r)),`${n}${l}${u}`}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},function(e,t,r){var n=r(22),a=r(23),c=r(14),i=r(24);e.exports=function(e){return n(e)||a(e)||c(e)||i()}},function(e,t,r){var n=r(15);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=window.wp.keycodes},,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,a=!1,c=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,c=e}finally{try{n||null==o.return||o.return()}finally{if(a)throw c}}return r}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){var n=r(15);e.exports=function(e){if(Array.isArray(e))return n(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function c(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],c(r),c(n))}function i(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=c(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=a.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=i(r[0]);n!==r[0]&&(t[r[0]]=n)}r=a.exec(e)}t["%C2"]="�";for(var c=Object.keys(t),o=0;o<c.length;o++){var l=c[o];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){},function(e,t,r){"use strict";r.r(t);var n,a=r(6),c=r.n(a),i=r(1),o=r.n(i),l=r(3),s=r.n(l),u=r(0),p=r(7),m=r.n(p),d=r(2),b=r(13),f=r.n(b),g=r(8),w=r.n(g),y=r(9),h=new Uint8Array(16);function v(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(h)}for(var O=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,j=function(e){return"string"==typeof e&&O.test(e)},E=[],x=0;x<256;++x)E.push((x+256).toString(16).substr(1));var T=function(e,t,r){var n=(e=e||{}).random||(e.rng||v)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var a=0;a<16;++a)t[r+a]=n[a];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(E[e[t+0]]+E[e[t+1]]+E[e[t+2]]+E[e[t+3]]+"-"+E[e[t+4]]+E[e[t+5]]+"-"+E[e[t+6]]+E[e[t+7]]+"-"+E[e[t+8]]+E[e[t+9]]+"-"+E[e[t+10]]+E[e[t+11]]+E[e[t+12]]+E[e[t+13]]+E[e[t+14]]+E[e[t+15]]).toLowerCase();if(!j(r))throw TypeError("Stringified UUID is invalid");return r}(n)},k=r(10),_=r.n(k),P=r(4);function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function N(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var C=lodash.omit,D=function(e){return elementor.notifications.showToast({message:e})},M=function(){var e=s()(o.a.mark((function e(){var t,r,n,a,c,i,l,s,u,p=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},r=N(N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta")),{},{per_page:20,page:0,premade:!0,template_site_slug:"general"},C(t,"isScroll")),n=Object(y.stringifyUrl)({url:window.tiTpc.endpoint+"page-templates",query:r}),e.prev=3,e.next=6,_()({url:n,method:"GET",parse:!1});case 6:if(!(a=e.sent).ok){e.next=18;break}return e.next=10,a.json();case 10:if(!(c=e.sent).message){e.next=13;break}return e.abrupt("return",D(c.message));case 13:i=c,t.isScroll&&(l=Object(P.select)("tpc/elementor").getTemplates(),i=[].concat(f()(l.items),f()(c))),s=a.headers.get("x-wp-totalpages"),u=r.page,Object(P.dispatch)("tpc/elementor").updateTemplates(i,u,s);case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),e.t0.message&&D(e.t0.message);case 23:case"end":return e.stop()}}),e,null,[[3,20]])})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=s()(o.a.mark((function e(){var t,r,n,a,c,i,l,s,u,p=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=p.length>0&&void 0!==p[0]?p[0]:{},3===parseInt(window.tiTpc.tier)){e.next=3;break}return e.abrupt("return");case 3:return r=N({per_page:20,page:0},C(t,"isScroll")),n=Object(y.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:N(N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta")),r)}),e.prev=5,e.next=8,_()({url:n,method:"GET",parse:!1});case 8:if(!(a=e.sent).ok){e.next=20;break}return e.next=12,a.json();case 12:if(!(c=e.sent).message){e.next=15;break}return e.abrupt("return",D(c.message));case 15:i=c,t.isScroll&&(l=Object(P.select)("tpc/elementor").getLibrary(),i=[].concat(f()(l.items),f()(c))),s=a.headers.get("x-wp-totalpages"),u=r.page,Object(P.dispatch)("tpc/elementor").updateLibrary(i,u,s);case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(5),e.t0.message&&D(e.t0.message);case 25:case"end":return e.stop()}}),e,null,[[5,22]])})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=s()(o.a.mark((function e(t){var r,n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta"))}),e.prev=1,e.next=4,_()({url:r,method:"GET",parse:!1});case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:if(!e.sent.message){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t,"/import"),query:N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta"))}),n={},e.prev=2,e.next=5,_()({url:r,method:"GET",parse:!1});case 5:if(!(a=e.sent).ok){e.next=12;break}return e.next=9,a.json();case 9:if(!(n=e.sent).message){e.next=12;break}return e.abrupt("return",D(n.message));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),e.t0.message&&D(e.t0.message);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),F=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t,"/clone"),query:N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta"))}),e.prev=1,e.next=4,_()({url:r,method:"POST"});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",D(a.message));case 11:return localStorage.setItem("tpcCacheBuster",T()),e.next=14,I();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&D(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=s()(o.a.mark((function e(t){var r,n,a,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t.template_id),query:N(N({cache:localStorage.getItem("tpcCacheBuster")},C(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},C(t,"content"))}),e.prev=1,n={url:r,method:"POST",parse:!1},t.content&&(a={title:elementor.config.initial_document.settings.settings.post_title||"",version:"0.4",type:"page",content:t.content},n.data=a),e.next=6,_()(N({},n));case 6:if(!(c=e.sent).ok){e.next=13;break}return e.next=10,c.json();case 10:if(!(i=e.sent).message){e.next=13;break}return e.abrupt("return",D(i.message));case 13:return localStorage.setItem("tpcCacheBuster",T()),e.next=16,I();case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),e.t0.message&&D(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[1,18]])})));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:N({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},C(tiTpc.params,"meta"))}),e.prev=1,e.next=4,_()({url:r,method:"POST"});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",D(a.message));case 11:return localStorage.setItem("tpcCacheBuster",T()),e.next=14,I();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&D(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=s()(o.a.mark((function e(t){var r,n,a,c,i,l,s,u,p,m,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.title,n=t.type,a=t.content,c=t.link,i=void 0===c?"":c,l=t.callback,s=void 0===l?function(){}:l,u={version:"0.4",title:r,type:n,content:a},p=Object(y.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:N(N({},C(tiTpc.params,"meta")),{},{meta:"page"===n?JSON.stringify(tiTpc.params.meta):"",template_name:r||window.tiTpc.exporter.textPlaceholder,template_type:"elementor",link:i})}),e.prev=3,e.next=6,_()({url:p,method:"POST",data:u,parse:!1});case 6:if(!(m=e.sent).ok){e.next=12;break}return e.next=10,m.json();case 10:(d=e.sent).message?D(d.message):(s(d),window.localStorage.setItem("tpcCacheBuster",T()),D(window.tiTpc.exporter.templateSaved));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),e.t0.message&&D(e.t0.message);case 17:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(t){return e.apply(this,arguments)}}(),V=function(){var e=s()(o.a.mark((function e(t){var r,n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(y.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t.template_id,"/publish"),query:N(N({cache:localStorage.getItem("tpcCacheBuster"),method:"POST"},C(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},C(t,"template_id"))}),e.prev=1,e.next=4,_()({url:r,method:"POST",headers:{Authorization:"Bearer ".concat(window.tiTpc.bearer||""," ")}});case 4:if(!(n=e.sent).ok){e.next=14;break}return e.next=8,n.json();case 8:if(!(a=e.sent).message){e.next=12;break}return D(a.message),e.abrupt("return",{success:!1});case 12:e.next=17;break;case 14:if(!n.message){e.next=17;break}return D(n.message),e.abrupt("return",{success:!1});case 17:return localStorage.setItem("tpcCacheBuster",T()),e.abrupt("return",{success:!0});case 21:if(e.prev=21,e.t0=e.catch(1),!e.t0.message){e.next=26;break}return D(e.t0.message),e.abrupt("return",{success:!1});case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t){return e.apply(this,arguments)}}();3===parseInt(window.tiTpc.tier)&&(elementor.on("document:loaded",(function(){s()(o.a.mark((function e(){var t,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(["wp-post","wp-page"].includes(elementor.config.document.type)){e.next=2;break}return e.abrupt("return",null);case 2:if(t=elementor.config.document.id,"page"!==window.tiTpc.postType){e.next=9;break}return e.next=6,new wp.api.models.Page({id:t});case 6:window.tiTpc.postModel=e.sent,e.next=12;break;case 9:return e.next=11,new wp.api.models.Post({id:t});case 11:window.tiTpc.postModel=e.sent;case 12:return e.next=14,window.tiTpc.postModel.fetch();case 14:(r=document.querySelector("button#elementor-panel-saver-button-publish")).addEventListener("click",s()(o.a.mark((function e(){var t,n,a,c,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,window.tiTpc.postModel.fetch();case 2:return t=window.tiTpc.postModel.getMetas(),n=t._ti_tpc_template_sync,a=t._ti_tpc_template_id,e.next=5,L(a);case 5:if(c=e.sent,r.className.includes("elementor-disabled")||!n||!a||!c){e.next=10;break}return i=elementor.elements.toJSON({remove:["default","editSettings","defaultEditSettings"]}),e.next=10,A({template_id:a,template_name:elementor.config.initial_document.settings.settings.post_title||"",content:i,meta:JSON.stringify(tiTpc.params.meta)});case 10:case"end":return e.stop()}}),e)}))));case 16:case"end":return e.stop()}}),e)})))()})),document.addEventListener("DOMContentLoaded",(function(){var e=function(e){var t=e.content,r=Object(u.useState)(""),n=c()(r,2),a=n[0],i=n[1],l=Object(u.useState)(!1),p=c()(l,2),b=p[0],f=p[1],g=function(){Object(u.unmountComponentAtNode)(document.getElementById("ti-tpc-modal"))},w=function(){var e=s()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.next=3,R({title:a,type:"section",content:[t]});case 3:f(!1),g();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.createElement)(d.Modal,{title:window.tiTpc.exporter.modalLabel,onRequestClose:g,overlayClassName:m()({"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)(d.TextControl,{label:window.tiTpc.exporter.textLabel,placeholder:window.tiTpc.exporter.textPlaceholder,value:a,onChange:i}),Object(u.createElement)(d.Button,{isPrimary:!0,isBusy:b,disabled:b,onClick:w},window.tiTpc.exporter.buttonLabel))};elementor.hooks.addFilter("elements/section/contextMenuGroups",(function(t,r){var n={name:"ti_tpc_export",title:window.tiTpc.exporter.exportLabel,callback:function(){return function(t){var r=t.model.toJSON({remove:["default","editSettings","defaultEditSettings"]}),n=document.createElement("div");n.id="ti-tpc-modal",document.body.appendChild(n),Object(u.render)(Object(u.createElement)(e,{content:r}),document.getElementById("ti-tpc-modal"))}(r)}},a=t.find((function(e){return"save"===e.name}));if(a)a.actions.push(n);else{var c={name:"ti_tpc_export",actions:[n]};t.splice(3,0,c),t.join()}return t}))})));var G=r(12),H=r(5);function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $=function(e){var t=e.title;return Object(u.createElement)(H.SVG,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tpc-template-cloud-icon",title:t},Object(u.createElement)(H.Path,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(u.createElement)(H.Path,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(u.createElement)(H.Path,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},Y=Object(G.compose)(Object(P.withSelect)((function(e){var t=e("tpc/elementor"),r=t.isFetching,n=t.isPreview,a=t.getCurrentTab,c=t.getPreview;return{isFetching:r(),isPreview:n(),currentTab:a(),preview:c()}})),Object(P.withDispatch)((function(e){var t=e("tpc/elementor");return{setFetching:t.setFetching,togglePreview:t.togglePreview,updateCurrentTab:t.updateCurrentTab}})))((function(e){var t=e.getSearchQuery,r=e.getOrder,n=e.onImport,a=e.isFetching,c=e.isPreview,i=e.currentTab,l=e.preview,p=e.setFetching,b=e.togglePreview,f=e.updateCurrentTab,g=function(){var e=s()(o.a.mark((function e(){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.setItem("tpcCacheBuster",T()),p(!0),n=r(),e.next=5,M(q({search:t()},n));case 5:return e.next=7,I(q({search:t()},n));case 7:p(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.createElement)("div",{className:m()("dialog-header dialog-lightbox-header",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header"},Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__logo-area"},c?Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-header-preview-back",onClick:b},Object(u.createElement)("i",{className:"eicon-","aria-hidden":"true"}),Object(u.createElement)("span",null,window.tiTpc.library.actions.back)):Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__logo"},Object(u.createElement)($,{title:window.tiTpc.library.templatesCloud}))),!c&&Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__menu-area"},Object(u.createElement)(d.Button,{className:m()("ti-tpc-template-library-menu-item",{"is-active":"templates"===i}),onClick:function(){return f("templates")}},window.tiTpc.library.tabs.templates),3===parseInt(window.tiTpc.tier)&&Object(u.createElement)(d.Button,{className:m()("ti-tpc-template-library-menu-item",{"is-active":"library"===i}),onClick:function(){return f("library")}},window.tiTpc.library.tabs.library)),Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__items-area"},Object(u.createElement)("div",{className:"ti-tpc-template-library-header-tools"},c?Object(u.createElement)("div",{className:"ti-tpc-templates-modal__header__item ti-tpc-template-library-header-preview-insert-wrapper"},Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-template-insert elementor-button",onClick:function(){return n({id:l.template_id,title:l.template_name,meta:l.meta||[]})}},Object(u.createElement)("i",{className:"eicon-file-download","aria-hidden":"true"}),Object(u.createElement)("span",{className:"elementor-button-title"},window.tiTpc.library.actions.insert))):Object(u.createElement)("div",{className:"ti-tpc-template-library-header-actions"},"library"===i&&Object(u.createElement)(d.Button,{className:"ti-tpc-templates-modal__header__item",onClick:g},Object(u.createElement)("i",{className:m()("eicon-sync",{"eicon-animation-spin":a}),"aria-hidden":"true",title:window.tiTpc.library.actions.sync}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.actions.sync)),["wp-post","wp-page"].includes(elementor.config.document.type)&&3===parseInt(window.tiTpc.tier)&&Object(u.createElement)(d.Button,{className:"ti-tpc-templates-modal__header__item",onClick:function(){return f("export")}},Object(u.createElement)("i",{className:"eicon-save-o","aria-hidden":"true",title:window.tiTpc.library.save}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.save)))),Object(u.createElement)(d.Button,{className:"ti-tpc-templates-modal__header__item ti-tpc-templates-modal__header__close",onClick:window.tiTpcModal.hide},Object(u.createElement)("i",{className:"eicon-close","aria-hidden":"true",title:window.tiTpc.library.actions.close}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.actions.close)))))})),J=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(H.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})),Z=r(16),Q=r(11);function W(e){return[null,void 0].includes(e)}function K(e){var t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}}function X(e,t,r){if(e){var n=K(e),a=n.left,c=n.right,i=n.top,o=n.bottom;if(a>r)return!1;if(c<0)return!1;if(i>t)return!1;if(o<0)return!1}return!0}var ee=function(e){var t,r,n,a=e.loading,c=e.hasNextPage,i=e.onLoadMore,o=e.threshold,l=void 0===o?150:o,s=e.checkInterval,u=void 0===s?200:s,p=e.scrollContainer,m=void 0===p?"window":p,d=Object(Q.useRef)(null),b=function(){var e="object"==typeof window,t=Object(Q.useCallback)((function(){return{width:e?window.innerWidth:void 0,height:e?window.innerHeight:void 0}}),[e]),r=Object(Q.useState)(t()),n=r[0],a=r[1];return Object(Q.useEffect)((function(){function r(){a(t())}if(e)return window.addEventListener("resize",r),function(){window.removeEventListener("resize",r)}}),[t,e]),n}(),f=b.height,g=b.width,w=Object(Q.useState)(!0),y=w[0],h=w[1];return Object(Q.useEffect)((function(){a||h(!0)}),[a]),t=function(){!function(){if(y&&!a&&c&&d.current){if("parent"===m){if(!(n=null===(r=d.current)||void 0===r?void 0:r.parentNode)||W(f)||W(g)||!X(n,f,g))return}else if(!(t=d.current)||W(f)||W(g)||!X(t,f,g))return;var e=function(){var e=d.current;if(!e||W(f))return null;var t=e.getBoundingClientRect().bottom,r=t-f;if("parent"===m){var n=e.parentNode;if(!n)return null;r=t-K(n).bottom}return r}();if(W(e))return;e<l&&(h(!1),i())}var t,r,n}()},r=c?u:0,n=Object(Q.useRef)(null),Object(Q.useEffect)((function(){n.current=t}),[t]),Object(Q.useEffect)((function(){if(r){var e=setInterval((function(){var e;null===(e=n.current)||void 0===e||e.call(n)}),r);return function(){clearInterval(e)}}}),[r]),d},te=Object(u.createElement)(H.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(u.createElement)(H.Path,{d:"M7.5 12C7.5 11.1716 6.82843 10.5 6 10.5C5.17157 10.5 4.5 11.1716 4.5 12C4.5 12.8284 5.17157 13.5 6 13.5C6.82843 13.5 7.5 12.8284 7.5 12Z"}),Object(u.createElement)(H.Path,{d:"M13.5 12C13.5 11.1716 12.8284 10.5 12 10.5C11.1716 10.5 10.5 11.1716 10.5 12C10.5 12.8284 11.1716 13.5 12 13.5C12.8284 13.5 13.5 12.8284 13.5 12Z"}),Object(u.createElement)(H.Path,{d:"M19.5 12C19.5 11.1716 18.8284 10.5 18 10.5C17.1716 10.5 16.5 11.1716 16.5 12C16.5 12.8284 17.1716 13.5 18 13.5C18.8284 13.5 19.5 12.8284 19.5 12Z"})),re=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(H.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),ne=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)(H.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"})),ae=Object(u.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(u.createElement)(H.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"}));function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var ie=Object(P.withDispatch)((function(e){var t=e("tpc/elementor");return{togglePreview:t.togglePreview,setPreviewData:t.setPreviewData}}))((function(e){var t=e.table,r=void 0!==t&&t,n=e.item,a=e.id,i=e.title,o=e.meta,l=e.thumbnail,s=e.onImport,p=e.onUpdateTemplate,m=e.onDelete,b=e.onDuplicate,f=e.togglePreview,g=e.setPreviewData,y=Object(u.useState)(!1),h=c()(y,2),v=h[0],O=h[1],j=Object(u.useState)(i),E=c()(j,2),x=E[0],T=E[1];return r?Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-item"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},v?Object(u.createElement)(u.Fragment,null,Object(u.createElement)("input",{type:"text",value:x,onChange:function(e){return T(e.target.value)}}),Object(u.createElement)(d.Button,{className:"elementor-button",onClick:function(){return p(a,x)}},Object(u.createElement)("i",{className:"eicon-check","aria-hidden":"true",title:window.tiTpc.library.actions.save}),Object(u.createElement)("span",{className:"elementor-button-title elementor-hidden"},window.tiTpc.library.actions.save)),Object(u.createElement)(d.Button,{className:"elementor-button",onClick:function(){return O(!1)}},Object(u.createElement)("i",{className:"eicon-editor-close","aria-hidden":"true",title:window.tiTpc.library.actions.cancel}),Object(u.createElement)("span",{className:"elementor-button-title elementor-hidden"},window.tiTpc.library.actions.cancel))):i),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},moment(n.date).format("MMMM D, YYYY")),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},moment(n.modified).format("MMMM D, YYYY")),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},Object(u.createElement)(d.Button,{className:"elementor-button elementor-button-success",onClick:function(){return s({id:a,title:i,meta:o})}},Object(u.createElement)("i",{className:"eicon-file-download","aria-hidden":"true"}),Object(u.createElement)("span",{className:"elementor-button-title"},window.tiTpc.library.actions.insert)),Object(u.createElement)(d.DropdownMenu,{icon:te,label:window.tiTpc.library.filters.sortLabels.actions,popoverProps:{position:"bottom right",noArrow:!1},controls:[{title:window.tiTpc.library.actions.edit,icon:re,isDisabled:!!n.link,onClick:function(){return O(!0)}},{title:window.tiTpc.library.actions.duplicate,icon:ne,onClick:function(){return b(a)}},{title:window.tiTpc.library.actions.delete,icon:ae,onClick:function(){return m(a)}}]}))):Object(u.createElement)("div",{className:"ti-tpc-template-library-template"},Object(u.createElement)("div",{className:"ti-tpc-template-library-template-body"},Object(u.createElement)("div",{className:"ti-tpc-template-library-template-screenshot",style:{backgroundImage:"url( ".concat(l,")")}}),Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-template-preview",onClick:function(){f(),g(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},n))}},Object(u.createElement)("i",{className:"eicon-zoom-in-bold","aria-hidden":"true"}))),Object(u.createElement)("div",{className:"ti-tpc-template-library-template-footer"},Object(u.createElement)(d.Button,{className:"ti-tpc-template-library-template-action elementor-button",onClick:function(){return s({id:a,title:i,meta:o})}},Object(u.createElement)("i",{className:"eicon-file-download","aria-hidden":"true"}),Object(u.createElement)("span",null,window.tiTpc.library.actions.insert)),Object(u.createElement)("div",{className:"ti-tpc-template-library-template-name"},i)))}));function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var se={template_name:window.tiTpc.library.filters.sortLabels.name,date:window.tiTpc.library.filters.sortLabels.date,modified:window.tiTpc.library.filters.sortLabels.modified},ue=Object(P.withSelect)((function(e,t){var r=t.isGeneral?e("tpc/elementor").getTemplates():e("tpc/elementor").getLibrary(),n=r.items;return{items:void 0===n?[]:n,currentPage:r.currentPage,totalPages:r.totalPages}}))((function(e){var t=e.getSearchQuery,r=e.getOrder,n=e.setSorting,a=e.onImport,i=e.onUpdateTemplate,l=e.onDelete,p=e.onDuplicate,b=e.isGeneral,f=e.items,g=e.currentPage,w=e.totalPages,y=Object(u.useState)(!1),h=c()(y,2),v=h[0],O=h[1],j=ee({loading:v,hasNextPage:g!==w,onLoadMore:function(){var e=s()(o.a.mark((function e(){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g!==w){e.next=2;break}return e.abrupt("return");case 2:if(O(!0),n=r(),!b){e.next=9;break}return e.next=7,M(le({search:t(),page:g+1,isScroll:!0},n));case 7:e.next=11;break;case 9:return e.next=11,I(le({search:t(),page:g+1,isScroll:!0},n));case 11:O(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),threshold:1});return Object(u.createElement)("div",{className:m()("ti-tpc-template-library-templates-container",{"is-table":!b}),ref:j},b?f.map((function(e){return Object(u.createElement)(ie,{key:e.template_id,item:e,id:e.template_id,title:e.template_name,thumbnail:e.template_thumbnail,onImport:a})})):Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-header"},Object.keys(se).map((function(e){return Object(u.createElement)("div",{key:e,className:"ti-tpc-template-library-templates-table-column"},Object(u.createElement)(d.Button,{className:m()({"is-selected":e===r().orderby,"is-asc":"ASC"===r().order}),onClick:function(){var t={order:"DESC",orderby:e};e===r().orderby&&"DESC"===r().order&&(t.order="ASC"),n(le({},t))}},se[e]))})),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-table-column"},Object(u.createElement)(d.Button,null,window.tiTpc.library.filters.sortLabels.actions))),f.map((function(e){return Object(u.createElement)(ie,{table:!0,key:e.template_id,item:e,id:e.template_id,title:e.template_name,meta:e.meta||[],onImport:a,onUpdateTemplate:i,onDelete:l,onDuplicate:function(e){return p(e)}})}))),0===f.length&&(b?Object(u.createElement)("p",null,"No templates found. Check again later!"):Object(u.createElement)("p",null,"No templates available. Try adding few templates.")),v&&Object(u.createElement)(d.Placeholder,null,Object(u.createElement)(d.Spinner,null)))})),pe=Object(P.withDispatch)((function(e){return{updateCurrentTab:e("tpc/elementor").updateCurrentTab}}))((function(e){var t=e.updateCurrentTab;Object(u.useEffect)((function(){var e=window.tiTpc.postModel.getMetas(),t=e._ti_tpc_template_sync,r=e._ti_tpc_template_id,n=e._ti_tpc_screenshot_url,a=e._ti_tpc_site_slug,c=e._ti_tpc_published;g(Boolean(t)),v(r),x(n),P(a),D(Boolean(c))}),[]);var r=elementor.config.initial_document.settings.settings.post_title||"",n=Object(u.useState)(!1),a=c()(n,2),i=a[0],l=a[1],p=Object(u.useState)(!1),b=c()(p,2),f=b[0],g=b[1],w=Object(u.useState)(""),y=c()(w,2),h=y[0],v=y[1],O=Object(u.useState)(""),j=c()(O,2),E=j[0],x=j[1],T=Object(u.useState)(""),k=c()(T,2),_=k[0],P=k[1],S=Object(u.useState)(""),N=c()(S,2),C=N[0],D=N[1],M=function(){var e=s()(o.a.mark((function e(){var n,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l(!0),n=elementor.elements.toJSON({remove:["default","editSettings","defaultEditSettings"]}),a=!1,!h){e.next=7;break}return e.next=6,L(h);case 6:a=e.sent;case 7:if(!a){e.next=12;break}return e.next=10,A({template_id:h,template_name:r,content:n,link:elementor.config.initial_document.urls.permalink,meta:JSON.stringify(tiTpc.params.meta)});case 10:e.next=14;break;case 12:return e.next=14,R({title:r,type:"page",content:n,link:elementor.config.initial_document.urls.permalink,callback:function(e){v(e.template_id),window.tiTpc.postModel.set("meta",{_ti_tpc_template_id:e.template_id,_ti_tpc_template_sync:f}),window.tiTpc.postModel.save()}});case 14:l(!1),t("library");case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=s()(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.next=3,V({template_id:h,template_site_slug:_,template_thumbnail:E,premade:C?"no":"yes",link:elementor.config.initial_document.urls.permalink}).then((function(e){e.success&&(elementor.notifications.showToast({message:C?window.tiTpc.exporter.templateUnpublished:window.tiTpc.exporter.templatePublished}),D(!C),window.tiTpc.postModel.set("meta",{_ti_tpc_template_id:h,_ti_tpc_template_sync:f,_ti_tpc_screenshot_url:E,_ti_tpc_site_slug:_,_ti_tpc_published:!C}),window.tiTpc.postModel.save())}));case 3:l(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(u.createElement)("div",{className:"dialog-message dialog-lightbox-message"},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content"},Object(u.createElement)("div",{className:"ti-tpc-template-library-export"},Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-icon"},Object(u.createElement)("i",{className:"eicon-library-save","aria-hidden":"true"}),Object(u.createElement)("span",{className:"elementor-screen-only"},window.tiTpc.library.export.save)),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-title"},window.tiTpc.library.export.title),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)("input",{className:"ti-tpc-template-library-blank-field-input",value:elementor.config.initial_document.settings.settings.post_title,disabled:!0}),Object(u.createElement)(d.Button,{className:m()("elementor-button elementor-button-success",{"elementor-button-state":i}),onClick:M},Object(u.createElement)("span",{className:"elementor-state-icon"},Object(u.createElement)("i",{className:"eicon-loading eicon-animation-spin","aria-hidden":"true"})),window.tiTpc.library.export.save)),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)(d.ToggleControl,{label:window.tiTpc.exporter.toggleLabel,checked:f,onChange:function(){return g(!f)}})),window.tiTpc.canPredefine&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)("label",{htmlFor:"ti-tpc-template-screenshot",className:"ti-tpc-template-library-blank-field-input-label"},window.tiTpc.library.export.labelScreenshot),Object(u.createElement)("input",{className:"ti-tpc-template-library-blank-field-input",id:"ti-tpc-template-screenshot",value:E,onChange:function(e){return x(e.target.value)}})),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)("label",{htmlFor:"ti-tpc-template-slug",className:"ti-tpc-template-library-blank-field-input-label"},window.tiTpc.library.export.labelSlug),Object(u.createElement)("input",{className:"ti-tpc-template-library-blank-field-input",id:"ti-tpc-template-slug",value:_,onChange:function(e){return P(e.target.value)}})),Object(u.createElement)("div",{className:"ti-tpc-template-library-blank-field"},Object(u.createElement)(d.Button,{className:m()("elementor-button elementor-button-success",{"elementor-button-state":i}),onClick:I},Object(u.createElement)("span",{className:"elementor-state-icon"},Object(u.createElement)("i",{className:"eicon-loading eicon-animation-spin","aria-hidden":"true"})),C?window.tiTpc.library.export.unpublish:window.tiTpc.library.export.publish))))))}));function me(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var be={date:window.tiTpc.library.filters.sortLabels.date,template_name:window.tiTpc.library.filters.sortLabels.name,modified:window.tiTpc.library.filters.sortLabels.modified},fe=Object(G.compose)(Object(P.withSelect)((function(e){var t=e("tpc/elementor"),r=t.isFetching,n=t.isPreview,a=t.getCurrentTab,c=t.getPreview;return{isFetching:r(),isPreview:n(),currentTab:a(),preview:c()}})),Object(P.withDispatch)((function(e){return{setFetching:e("tpc/elementor").setFetching}})))((function(e){var t=e.setQuery,r=e.getSearchQuery,n=e.setSorting,a=e.getOrder,c=e.isSearch,i=e.setSearch,l=e.onImport,p=e.isFetching,b=e.isPreview,f=e.currentTab,g=e.preview,w=e.setFetching,y=function(){var e=s()(o.a.mark((function e(){var t,n,c=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=c.length>0&&void 0!==c[0]?c[0]:r(),w(!0),i(!!t),n=a(),"templates"!==f){e.next=9;break}return e.next=7,M(de({search:t},n));case 7:e.next=11;break;case 9:return e.next=11,I(de({search:t},n));case 11:w(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(u.useEffect)((function(){y()}),[f,a()]);var h="templates"===f,v=function(){var e=s()(o.a.mark((function e(t,r){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,A({template_id:t,template_name:r});case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),O=function(){var e=s()(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,U(t);case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),j=function(){var e=s()(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,F(t);case 3:w(!1);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return b?Object(u.createElement)("div",{className:m()("dialog-message dialog-lightbox-message",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content"},Object(u.createElement)("div",{className:"ti-tpc-template-library-preview"},Object(u.createElement)("iframe",{title:g.template_name,src:g.link||""}),Object(u.createElement)("div",{className:"is-loading"},Object(u.createElement)(d.Icon,{icon:J}))))):p?Object(u.createElement)("div",{className:m()("dialog-message dialog-lightbox-message",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content is-loading"},Object(u.createElement)(d.Spinner,null))):"export"===f?Object(u.createElement)(pe,null):Object(u.createElement)("div",{className:m()("dialog-message dialog-lightbox-message",{"is-dark":"dark"===elementor.settings.editorPreferences.model.get("ui_theme")})},Object(u.createElement)("div",{className:"dialog-content dialog-lightbox-content"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header"},Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-filters"},h&&Object(u.createElement)(u.Fragment,null,Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-filters-label"},window.tiTpc.library.filters.sortLabel),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-filters-filter"},Object.keys(be).map((function(e){return Object(u.createElement)(d.Button,{key:e,className:m()({"is-selected":e===a().orderby,"is-asc":"ASC"===a().order}),onClick:function(){var t={order:"DESC",orderby:e};e===a().orderby&&"DESC"===a().order&&(t.order="ASC"),n(de({},t))}},be[e])}))))),Object(u.createElement)("div",{className:"ti-tpc-template-library-templates-header-search"},Object(u.createElement)("label",{htmlFor:"ti-tpc-template-library-filter-search",className:"elementor-screen-only"},window.tiTpc.library.filters.searchLabel),Object(u.createElement)("input",{id:"ti-tpc-template-library-filter-search",placeholder:window.tiTpc.library.filters.search,value:r(),onChange:function(e){return t(e.target.value)},onKeyDown:function(e){e.keyCode===Z.ENTER&&y()}}),c?Object(u.createElement)(d.Button,{onClick:function(){t(""),y("")}},Object(u.createElement)("i",{className:"eicon-close"})):Object(u.createElement)(d.Button,{onClick:function(){return y()}},Object(u.createElement)("i",{className:"eicon-search"})))),["templates","library"].includes(f)&&Object(u.createElement)(ue,{getSearchQuery:function(){return r()},getOrder:a,setSorting:n,onImport:l,onUpdateTemplate:v,onDelete:O,onDuplicate:j,isFetching:p,isGeneral:h}))))}));function ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye=Object(G.compose)(Object(P.withSelect)((function(e){return{currentTab:(0,e("tpc/elementor").getCurrentTab)()}})),Object(P.withDispatch)((function(e){return{setFetching:e("tpc/elementor").setFetching}})))((function(e){var t=e.currentTab,r=e.setFetching,n=Object(u.useState)({templates:"",library:""}),a=c()(n,2),i=a[0],l=a[1],p=Object(u.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),m=c()(p,2),d=m[0],b=m[1],f=Object(u.useState)({templates:!1,library:!1}),g=c()(f,2),w=g[0],y=g[1],h="templates"===t,v=function(){return h?i.templates:i.library},O=function(){return h?d.templates:d.library},j=function e(t){if(t.id=elementorCommon.helpers.getUniqueId(),0<t.elements.length)for(var r=0;r<t.elements.length;r++)t.elements[r]=e(t.elements[r]);return t},E=function(){var e=s()(o.a.mark((function e(t){var n,a,c,i,l,s,u,p,m;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,a=t.title,c=t.meta,i=void 0===c?[]:c,r(!0),e.next=4,B(n);case 4:if(l=e.sent){e.next=7;break}return e.abrupt("return",r(!1));case 7:for(s=$e.internal("document/history/start-log",{type:"add",title:"".concat(window.tiTpc.library.historyMessage," ").concat(a)}),u=Number(window.tiTpc.placeholder),p=l.content,m=0;m<p.length;m++)p[m]=j(p[m]),$e.run("document/elements/create",{container:elementor.getPreviewContainer(),model:p[m],options:u>=0?{at:u++}:{}});0<i.length&&(window.tiTpc.postModel.set("meta",we({},JSON.parse(i))),window.tiTpc.postModel.save()),$e.internal("document/history/end-log",{id:s}),window.tiTpcModal.hide(),r(!1);case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(u.createElement)(u.Fragment,null,Object(u.createElement)(Y,{getSearchQuery:v,getOrder:O,onImport:E}),Object(u.createElement)(fe,{setQuery:function(e){return l(we(we({},i),{},h?{templates:e}:{library:e}))},getSearchQuery:v,setSorting:function(e){return b(we(we({},d),{},h?{templates:e}:{library:e}))},getOrder:O,isSearch:h?w.templates:w.library,setSearch:function(e){return y(we(we({},w),{},h?{templates:e}:{library:e}))},onImport:E}))}));void 0!==elementorCommon&&(window.tiTpcModal=elementorCommon.dialogsManager.createWidget("lightbox",{id:"ti-tpc-templates-modal",className:"ti-tpc-templates-modal",hide:{auto:!1,onClick:!1,onOutsideClick:!1,onOutsideContextMenu:!1,onBackgroundClick:!0},position:{my:"center",at:"center"},onShow:function(){var e=window.tiTpcModal.getElements("content");document.getElementById("ti-tpc-templates-modal-content")||e.append('<div id="ti-tpc-templates-modal-content" class="wrap"></div>')}}),window.tiTpcModal.getElements("header").remove(),window.tiTpcModal.getElements("message").remove(),window.tiTpcModal.getElements("widgetContent").append(window.tiTpcModal.addElement("content")));var he=document.getElementById("tmpl-elementor-add-section");if(he){var ve=he.textContent;he.textContent=ve.replace('<div class="elementor-add-section-drag-title">Drag widget here</div>','<div class="elementor-add-section-area-button elementor-templates-cloud-button" title="'.concat(window.tiTpc.library.libraryButton,'"><svg width="100" height="100" viewBox="10 10 80 80" fill="none" xmlns="http://www.w3.org/2000/svg" class="tpc-template-cloud-icon" role="img" aria-hidden="true" focusable="false"><path d="M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z" fill="#0366D6"></path><path d="M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z" fill="white"></path><path d="M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z" fill="white" style=""></path></svg></div> <div class="elementor-add-section-drag-title">Drag widget here</div>'))}function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}elementor.on("preview:loaded",(function(){elementor.$previewContents[0].body.addEventListener("click",(function(e){(-1<Array.from(e.target.classList).indexOf("elementor-templates-cloud-button")||-1<Array.from(e.target.classList).indexOf("tpc-template-cloud-icon")||-1<Array.from(e.target.parentNode.classList).indexOf("tpc-template-cloud-icon"))&&function(e){window.tiTpcModal.show();var t=elementor.$previewContents[0].body.querySelector(".elementor-section-wrap"),r=e.closest(".elementor-add-section");window.tiTpc.placeholder=Array.from(t.childNodes).indexOf(r),Object(u.render)(Object(u.createElement)(ye,null),document.getElementById("ti-tpc-templates-modal-content")),window.tiTpcModal.refreshPosition()}(e.target)}))}));var Ee={isFetching:!0,isPreview:!1,tab:3===parseInt(window.tiTpc.tier)?"library":"templates",templates:[],library:{items:[],currentPage:0,totalPages:0},preview:{}};Object(P.registerStore)("tpc/elementor",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ee,t=arguments.length>1?arguments[1]:void 0;return"SET_FETCHING"===t.type?je(je({},e),{},{isFetching:t.isFetching}):"TOGGLE_PREVIEW"===t.type?je(je({},e),{},{isPreview:!e.isPreview}):"UPDATE_CURRENT_TAB"===t.type?je(je({},e),{},{tab:t.tab}):"UPDATE_TEMPLATES"===t.type?je(je({},e),{},{templates:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"UPDATE_LIBRARY"===t.type?je(je({},e),{},{library:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"SET_PREVIEW_DATA"===t.type?je(je({},e),{},{preview:t.preview}):e},selectors:{isFetching:function(e){return e.isFetching},isPreview:function(e){return e.isPreview},getCurrentTab:function(e){return e.tab},getTemplates:function(e){return e.templates},getLibrary:function(e){return e.library},getPreview:function(e){return e.preview}},actions:{setFetching:function(e){return{type:"SET_FETCHING",isFetching:e}},togglePreview:function(e){return{type:"TOGGLE_PREVIEW",isPreview:e}},updateCurrentTab:function(e){return{type:"UPDATE_CURRENT_TAB",tab:e}},updateTemplates:function(e,t,r){return{type:"UPDATE_TEMPLATES",items:e,currentPage:t,totalPages:r}},updateLibrary:function(e,t,r){return{type:"UPDATE_LIBRARY",items:e,currentPage:t,totalPages:r}},setPreviewData:function(e){return{type:"SET_PREVIEW_DATA",preview:e}}}}),r(28)}]);
|
elementor/src/components/export.js
CHANGED
@@ -58,7 +58,7 @@ const Export = ( { updateCurrentTab } ) => {
|
|
58 |
template_name: title,
|
59 |
content,
|
60 |
link: elementor.config.initial_document.urls.permalink,
|
61 |
-
meta:
|
62 |
} );
|
63 |
} else {
|
64 |
await exportTemplate( {
|
58 |
template_name: title,
|
59 |
content,
|
60 |
link: elementor.config.initial_document.urls.permalink,
|
61 |
+
meta: JSON.stringify( tiTpc.params.meta ),
|
62 |
} );
|
63 |
} else {
|
64 |
await exportTemplate( {
|
elementor/src/data/templates-cloud/index.js
CHANGED
@@ -220,6 +220,7 @@ export const updateTemplate = async ( params ) => {
|
|
220 |
query: {
|
221 |
cache: localStorage.getItem( 'tpcCacheBuster' ),
|
222 |
...omit( tiTpc.params, 'meta' ),
|
|
|
223 |
...omit( params, 'content' ),
|
224 |
},
|
225 |
} );
|
@@ -313,6 +314,7 @@ export const exportTemplate = async ( {
|
|
313 |
url: window.tiTpc.endpoint + 'templates',
|
314 |
query: {
|
315 |
...omit( tiTpc.params, 'meta' ),
|
|
|
316 |
template_name: title || window.tiTpc.exporter.textPlaceholder,
|
317 |
template_type: 'elementor',
|
318 |
link,
|
220 |
query: {
|
221 |
cache: localStorage.getItem( 'tpcCacheBuster' ),
|
222 |
...omit( tiTpc.params, 'meta' ),
|
223 |
+
meta: JSON.stringify( tiTpc.params.meta ),
|
224 |
...omit( params, 'content' ),
|
225 |
},
|
226 |
} );
|
314 |
url: window.tiTpc.endpoint + 'templates',
|
315 |
query: {
|
316 |
...omit( tiTpc.params, 'meta' ),
|
317 |
+
meta: 'page' === type ? JSON.stringify( tiTpc.params.meta ) : '',
|
318 |
template_name: title || window.tiTpc.exporter.textPlaceholder,
|
319 |
template_type: 'elementor',
|
320 |
link,
|
elementor/src/export.js
CHANGED
@@ -41,7 +41,6 @@ if ( parseInt( window.tiTpc.tier ) === 3 ) {
|
|
41 |
const {
|
42 |
_ti_tpc_template_sync,
|
43 |
_ti_tpc_template_id,
|
44 |
-
_ti_tpc_published,
|
45 |
} = window.tiTpc.postModel.getMetas();
|
46 |
|
47 |
const doesExist = await getTemplate( _ti_tpc_template_id );
|
@@ -68,7 +67,7 @@ if ( parseInt( window.tiTpc.tier ) === 3 ) {
|
|
68 |
elementor.config.initial_document.settings.settings
|
69 |
.post_title || '',
|
70 |
content,
|
71 |
-
meta:
|
72 |
} );
|
73 |
}
|
74 |
} );
|
41 |
const {
|
42 |
_ti_tpc_template_sync,
|
43 |
_ti_tpc_template_id,
|
|
|
44 |
} = window.tiTpc.postModel.getMetas();
|
45 |
|
46 |
const doesExist = await getTemplate( _ti_tpc_template_id );
|
67 |
elementor.config.initial_document.settings.settings
|
68 |
.post_title || '',
|
69 |
content,
|
70 |
+
meta: JSON.stringify( tiTpc.params.meta ),
|
71 |
} );
|
72 |
}
|
73 |
} );
|
includes/Main.php
CHANGED
@@ -18,7 +18,7 @@ class Main {
|
|
18 |
*
|
19 |
* @var string Version string.
|
20 |
*/
|
21 |
-
const VERSION = '1.1.
|
22 |
/**
|
23 |
* Sites Library API URL.
|
24 |
*
|
18 |
*
|
19 |
* @var string Version string.
|
20 |
*/
|
21 |
+
const VERSION = '1.1.10';
|
22 |
/**
|
23 |
* Sites Library API URL.
|
24 |
*
|
includes/TI_Beaver.php
CHANGED
@@ -395,6 +395,7 @@ class TI_Beaver extends FLBuilderModule {
|
|
395 |
'template_type' => 'beaver',
|
396 |
'link' => $is_page ? get_permalink( $post_id ) : '',
|
397 |
'cache' => uniqid(),
|
|
|
398 |
),
|
399 |
TPC_TEMPLATES_CLOUD_ENDPOINT . 'templates'
|
400 |
);
|
@@ -440,7 +441,7 @@ class TI_Beaver extends FLBuilderModule {
|
|
440 |
'template_type' => 'beaver',
|
441 |
'link' => get_permalink( $post_id ),
|
442 |
'cache' => uniqid(),
|
443 |
-
'meta' =>
|
444 |
),
|
445 |
TPC_TEMPLATES_CLOUD_ENDPOINT . 'templates/' . esc_attr( $template_id )
|
446 |
);
|
@@ -483,7 +484,7 @@ class TI_Beaver extends FLBuilderModule {
|
|
483 |
'premade' => $premade,
|
484 |
'link' => get_permalink( $post_id ),
|
485 |
'cache' => uniqid(),
|
486 |
-
'meta' =>
|
487 |
),
|
488 |
TPC_TEMPLATES_CLOUD_ENDPOINT . 'templates/' . esc_attr( $template_id ) . '/publish'
|
489 |
);
|
395 |
'template_type' => 'beaver',
|
396 |
'link' => $is_page ? get_permalink( $post_id ) : '',
|
397 |
'cache' => uniqid(),
|
398 |
+
'meta' => $is_page ? json_encode( self::get_template_meta() ) : '',
|
399 |
),
|
400 |
TPC_TEMPLATES_CLOUD_ENDPOINT . 'templates'
|
401 |
);
|
441 |
'template_type' => 'beaver',
|
442 |
'link' => get_permalink( $post_id ),
|
443 |
'cache' => uniqid(),
|
444 |
+
'meta' => json_encode( self::get_template_meta() ),
|
445 |
),
|
446 |
TPC_TEMPLATES_CLOUD_ENDPOINT . 'templates/' . esc_attr( $template_id )
|
447 |
);
|
484 |
'premade' => $premade,
|
485 |
'link' => get_permalink( $post_id ),
|
486 |
'cache' => uniqid(),
|
487 |
+
'meta' => json_encode( self::get_template_meta() ),
|
488 |
),
|
489 |
TPC_TEMPLATES_CLOUD_ENDPOINT . 'templates/' . esc_attr( $template_id ) . '/publish'
|
490 |
);
|
languages/templates-patterns-collection.pot
CHANGED
@@ -9,7 +9,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: templates-patterns-collection\n"
|
@@ -30,291 +30,217 @@ msgstr ""
|
|
30 |
msgid "https://themeisle.com"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: dist/templates-patterns-collection/includes/Admin.php:69
|
34 |
#: includes/Admin.php:69
|
35 |
msgid "Starter Sites"
|
36 |
msgstr ""
|
37 |
|
38 |
-
#: dist/templates-patterns-collection/includes/Admin.php:71
|
39 |
#: includes/Admin.php:71
|
40 |
msgid "My Library"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: dist/templates-patterns-collection/includes/Admin.php:276
|
44 |
#: includes/Admin.php:276
|
45 |
msgid "Hi! We've noticed you were using a child theme of Zelle before. To make your transition easier, we can help you keep the same homepage settings you had before but in original Zelle's style, by converting it into an Elementor template."
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: dist/templates-patterns-collection/includes/Admin.php:307
|
49 |
#: includes/Admin.php:307
|
50 |
#: assets/build/app.js:10
|
51 |
#: assets/src/Components/StarterSiteCard.js:60
|
52 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
53 |
-
#: dist/templates-patterns-collection/assets/src/Components/StarterSiteCard.js:60
|
54 |
msgid "Preview"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: dist/templates-patterns-collection/includes/Admin.php:308
|
58 |
#: includes/Admin.php:308
|
59 |
#: assets/build/app.js:10
|
60 |
#: assets/src/Components/PreviewFrame.js:102
|
61 |
#: assets/src/Components/StarterSiteCard.js:68
|
62 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
63 |
-
#: dist/templates-patterns-collection/assets/src/Components/PreviewFrame.js:102
|
64 |
-
#: dist/templates-patterns-collection/assets/src/Components/StarterSiteCard.js:68
|
65 |
msgid "Import"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: dist/templates-patterns-collection/includes/Admin.php:309
|
69 |
#: includes/Admin.php:309
|
70 |
msgid "Get the PRO version!"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: dist/templates-patterns-collection/includes/Admin.php:310
|
74 |
#: includes/Admin.php:310
|
75 |
msgid "Importing"
|
76 |
msgstr ""
|
77 |
|
78 |
-
#: dist/templates-patterns-collection/includes/Admin.php:311
|
79 |
#: includes/Admin.php:311
|
80 |
#: assets/build/app.js:2
|
81 |
#: assets/src/Components/Migration.js:165
|
82 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
83 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:165
|
84 |
msgid "Cancel"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: dist/templates-patterns-collection/includes/Admin.php:312
|
88 |
#: includes/Admin.php:312
|
89 |
msgid "Loading"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: dist/templates-patterns-collection/includes/Admin.php:313
|
93 |
#: includes/Admin.php:313
|
94 |
#: assets/build/app.js:2
|
95 |
#: assets/build/app.js:10
|
96 |
#: assets/src/Components/ImportModal.js:603
|
97 |
#: assets/src/Components/Migration.js:198
|
98 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
99 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
100 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:603
|
101 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:198
|
102 |
msgid "View Website"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: dist/templates-patterns-collection/includes/Admin.php:314
|
106 |
#: includes/Admin.php:314
|
107 |
#: assets/build/app.js:10
|
108 |
#: assets/src/Components/ImportModal.js:613
|
109 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
110 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:613
|
111 |
msgid "Add your own content"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: dist/templates-patterns-collection/includes/Admin.php:315
|
115 |
#: includes/Admin.php:315
|
116 |
#: assets/build/app.js:10
|
117 |
#: assets/src/Components/ImportModal.js:594
|
118 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
119 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:594
|
120 |
msgid "Back to Sites Library"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: dist/templates-patterns-collection/includes/Admin.php:316
|
124 |
#: includes/Admin.php:316
|
125 |
msgid "Note"
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: dist/templates-patterns-collection/includes/Admin.php:317
|
129 |
#: includes/Admin.php:317
|
130 |
msgid "Advanced Options"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: dist/templates-patterns-collection/includes/Admin.php:318
|
134 |
#: includes/Admin.php:318
|
135 |
#: assets/build/app.js:10
|
136 |
#: assets/src/Components/ImportModal.js:272
|
137 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
138 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:272
|
139 |
msgid "Plugins"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: dist/templates-patterns-collection/includes/Admin.php:319
|
143 |
#: includes/Admin.php:319
|
144 |
msgid "General"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: dist/templates-patterns-collection/includes/Admin.php:320
|
148 |
#: includes/Admin.php:320
|
149 |
msgid "Keep current layout"
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: dist/templates-patterns-collection/includes/Admin.php:321
|
153 |
#: includes/Admin.php:321
|
154 |
msgid "Search"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: dist/templates-patterns-collection/includes/Admin.php:322
|
158 |
#: includes/Admin.php:322
|
159 |
#: assets/build/app.js:10
|
160 |
#: assets/src/Components/ImportModal.js:200
|
161 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
162 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:200
|
163 |
msgid "Content"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: dist/templates-patterns-collection/includes/Admin.php:323
|
167 |
#: includes/Admin.php:323
|
168 |
#: assets/build/app.js:10
|
169 |
#: assets/src/Components/ImportModal.js:204
|
170 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
171 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:204
|
172 |
msgid "Customizer"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: dist/templates-patterns-collection/includes/Admin.php:324
|
176 |
#: includes/Admin.php:324
|
177 |
#: assets/build/app.js:10
|
178 |
#: assets/src/Components/ImportModal.js:208
|
179 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
180 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:208
|
181 |
msgid "Widgets"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: dist/templates-patterns-collection/includes/Admin.php:325
|
185 |
#: includes/Admin.php:325
|
186 |
msgid "We recommend you backup your website content before attempting a full site import."
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: dist/templates-patterns-collection/includes/Admin.php:326
|
190 |
#: includes/Admin.php:326
|
191 |
msgid "Due to copyright issues, some of the demo images will not be imported and will be replaced by placeholder images."
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: dist/templates-patterns-collection/includes/Admin.php:327
|
195 |
#: includes/Admin.php:327
|
196 |
msgid "Some of the demo images will not be imported and will be replaced by placeholder images."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: dist/templates-patterns-collection/includes/Admin.php:328
|
200 |
#: includes/Admin.php:328
|
201 |
msgid "Here is our own collection of related images you can use for your site."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: dist/templates-patterns-collection/includes/Admin.php:329
|
205 |
#: includes/Admin.php:329
|
206 |
#: assets/build/app.js:8
|
207 |
#: assets/src/Components/ImportModal.js:542
|
208 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
209 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:542
|
210 |
msgid "Content was successfully imported. Enjoy your new site!"
|
211 |
msgstr ""
|
212 |
|
213 |
-
#: dist/templates-patterns-collection/includes/Admin.php:330
|
214 |
#: includes/Admin.php:330
|
215 |
msgid "Available in the PRO version"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: dist/templates-patterns-collection/includes/Admin.php:331
|
219 |
#: includes/Admin.php:331
|
220 |
msgid "Copy error code"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: dist/templates-patterns-collection/includes/Admin.php:332
|
224 |
#: includes/Admin.php:332
|
225 |
msgid "Download error log"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: dist/templates-patterns-collection/includes/Admin.php:333
|
229 |
#: includes/Admin.php:333
|
230 |
msgid "To import this demo you have to install the following plugins:"
|
231 |
msgstr ""
|
232 |
|
233 |
#. translators: 1 - 'here'.
|
234 |
-
#: dist/templates-patterns-collection/includes/Admin.php:336
|
235 |
#: includes/Admin.php:336
|
236 |
msgid "It seems that Rest API is not working properly on your website. Read about how you can fix it %1$s."
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: dist/templates-patterns-collection/includes/Admin.php:337
|
240 |
#: includes/Admin.php:337
|
241 |
msgid "here"
|
242 |
msgstr ""
|
243 |
|
244 |
#. translators: 1 - 'get in touch'.
|
245 |
-
#: dist/templates-patterns-collection/includes/Admin.php:341
|
246 |
#: includes/Admin.php:341
|
247 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Please %1$s with us with the error code below, so we can help you fix this."
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: dist/templates-patterns-collection/includes/Admin.php:342
|
251 |
-
#: dist/templates-patterns-collection/includes/Admin.php:352
|
252 |
#: includes/Admin.php:342
|
253 |
#: includes/Admin.php:352
|
254 |
msgid "get in touch"
|
255 |
msgstr ""
|
256 |
|
257 |
#. translators: 1 - 'troubleshooting guide'.
|
258 |
-
#: dist/templates-patterns-collection/includes/Admin.php:346
|
259 |
#: includes/Admin.php:346
|
260 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Take a look at our %1$s to see if any of the proposed solutions work."
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: dist/templates-patterns-collection/includes/Admin.php:347
|
264 |
#: includes/Admin.php:347
|
265 |
msgid "troubleshooting guide"
|
266 |
msgstr ""
|
267 |
|
268 |
#. translators: 1 - 'get in touch'.
|
269 |
-
#: dist/templates-patterns-collection/includes/Admin.php:351
|
270 |
#: includes/Admin.php:351
|
271 |
msgid "If none of the solutions in the guide work, please %1$s with us with the error code below, so we can help you fix this."
|
272 |
msgstr ""
|
273 |
|
274 |
#. translators: %s - 'WP_Filesystem'.
|
275 |
-
#: dist/templates-patterns-collection/includes/Admin.php:356
|
276 |
#: includes/Admin.php:356
|
277 |
msgid "It seems that %s is not available. You can contact your site administrator or hosting provider to help you enable it."
|
278 |
msgstr ""
|
279 |
|
280 |
#. translators: %s - Theme name
|
281 |
-
#: dist/templates-patterns-collection/includes/Admin.php:375
|
282 |
#: includes/Admin.php:375
|
283 |
msgid "Choose from multiple unique demos, specially designed for you, that can be installed with a single click. You just need to choose your favorite, and we will take care of everything else."
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: dist/templates-patterns-collection/includes/Sites_Listing.php:46
|
287 |
-
#: dist/templates-patterns-collection/includes/Sites_Listing.php:56
|
288 |
#: includes/Sites_Listing.php:46
|
289 |
#: includes/Sites_Listing.php:56
|
290 |
msgid "Want to keep using Zelle's homepage?"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: dist/templates-patterns-collection/includes/Sites_Listing.php:47
|
294 |
-
#: dist/templates-patterns-collection/includes/Sites_Listing.php:57
|
295 |
#: includes/Sites_Listing.php:47
|
296 |
#: includes/Sites_Listing.php:57
|
297 |
msgid "Hi! We've noticed you were using Zelle before. To make your transition easier, we can help you keep the same beautiful homepage you had before, by converting it into an Elementor template. This option will also import your homepage content."
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: dist/templates-patterns-collection/includes/TI_Beaver.php:35
|
301 |
-
#: dist/templates-patterns-collection/includes/TI_Beaver.php:37
|
302 |
#: includes/TI_Beaver.php:35
|
303 |
#: includes/TI_Beaver.php:37
|
304 |
msgid "Templates Cloud"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: dist/templates-patterns-collection/includes/TI_Beaver.php:36
|
308 |
#: includes/TI_Beaver.php:36
|
309 |
msgid "Templates Cloud by Neve."
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: dist/templates-patterns-collection/includes/TI_Beaver.php:270
|
313 |
#: includes/TI_Beaver.php:270
|
314 |
msgid "Save to Neve Cloud"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: dist/templates-patterns-collection/includes/TI_Beaver.php:298
|
318 |
#: includes/TI_Beaver.php:298
|
319 |
msgid "Template"
|
320 |
msgstr ""
|
@@ -330,58 +256,42 @@ msgstr ""
|
|
330 |
#. translators: %s: Error message.
|
331 |
#: assets/build/app.js:2
|
332 |
#: assets/src/Components/InstallModal.js:31
|
333 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
334 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:31
|
335 |
msgid "An error has ocurred: %s"
|
336 |
msgstr ""
|
337 |
|
338 |
#. translators: %s: Error message.
|
339 |
#: assets/build/app.js:2
|
340 |
#: assets/src/Components/InstallModal.js:67
|
341 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
342 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:67
|
343 |
msgid "Could not activate theme."
|
344 |
msgstr ""
|
345 |
|
346 |
#: assets/build/app.js:2
|
347 |
#: assets/src/Components/InstallModal.js:89
|
348 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
349 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:89
|
350 |
msgid "Install and Activate Neve"
|
351 |
msgstr ""
|
352 |
|
353 |
#: assets/build/app.js:2
|
354 |
#: assets/src/Components/InstallModal.js:102
|
355 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
356 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:102
|
357 |
msgid "Logo"
|
358 |
msgstr ""
|
359 |
|
360 |
#: assets/build/app.js:2
|
361 |
#: assets/src/Components/InstallModal.js:116
|
362 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
363 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:116
|
364 |
msgid "In order to import the starter site, Neve theme has to be installed and activated. Click the button below to install and activate Neve"
|
365 |
msgstr ""
|
366 |
|
367 |
#: assets/build/app.js:2
|
368 |
#: assets/src/Components/InstallModal.js:52
|
369 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
370 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:52
|
371 |
msgid "Could not install theme."
|
372 |
msgstr ""
|
373 |
|
374 |
#: assets/build/app.js:2
|
375 |
#: assets/src/Components/InstallModal.js:147
|
376 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
377 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:147
|
378 |
msgid "Install and Activate"
|
379 |
msgstr ""
|
380 |
|
381 |
#: assets/build/app.js:2
|
382 |
#: assets/src/Components/InstallModal.js:151
|
383 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
384 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:151
|
385 |
msgid "Activate"
|
386 |
msgstr ""
|
387 |
|
@@ -392,333 +302,235 @@ msgstr ""
|
|
392 |
#: assets/src/Components/Migration.js:161
|
393 |
#: assets/src/Components/OnboardingContent.js:153
|
394 |
#: assets/src/Components/PreviewFrame.js:54
|
395 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
396 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
397 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/DemoSiteTemplatesImport.js:206
|
398 |
-
#: dist/templates-patterns-collection/assets/src/Components/InstallModal.js:163
|
399 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:161
|
400 |
-
#: dist/templates-patterns-collection/assets/src/Components/OnboardingContent.js:153
|
401 |
-
#: dist/templates-patterns-collection/assets/src/Components/PreviewFrame.js:54
|
402 |
msgid "Close"
|
403 |
msgstr ""
|
404 |
|
405 |
#: assets/build/app.js:2
|
406 |
#: assets/src/Components/ImportModalError.js:26
|
407 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
408 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModalError.js:26
|
409 |
msgid "Error code"
|
410 |
msgstr ""
|
411 |
|
412 |
#: assets/build/app.js:2
|
413 |
#: assets/src/Components/ImportModalError.js:31
|
414 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
415 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModalError.js:31
|
416 |
msgid "Error log"
|
417 |
msgstr ""
|
418 |
|
419 |
#: assets/build/app.js:2
|
420 |
#: assets/src/Components/Migration.js:82
|
421 |
#: assets/src/Components/Migration.js:240
|
422 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
423 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:82
|
424 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:240
|
425 |
msgid "Migrate"
|
426 |
msgstr ""
|
427 |
|
428 |
#: assets/build/app.js:2
|
429 |
#: assets/src/Components/Migration.js:141
|
430 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
431 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:141
|
432 |
msgid "Migrating"
|
433 |
msgstr ""
|
434 |
|
435 |
#: assets/build/app.js:2
|
436 |
#: assets/src/Components/Migration.js:189
|
437 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
438 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:189
|
439 |
msgid "Edit Content"
|
440 |
msgstr ""
|
441 |
|
442 |
#: assets/build/app.js:2
|
443 |
#: assets/src/Components/Migration.js:177
|
444 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
445 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:177
|
446 |
msgid "Start Migration"
|
447 |
msgstr ""
|
448 |
|
449 |
#: assets/build/app.js:2
|
450 |
#: assets/src/Components/Migration.js:260
|
451 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
452 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:260
|
453 |
msgid "Dismissed"
|
454 |
msgstr ""
|
455 |
|
456 |
#: assets/build/app.js:2
|
457 |
#: assets/src/Components/Migration.js:269
|
458 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
459 |
-
#: dist/templates-patterns-collection/assets/src/Components/Migration.js:269
|
460 |
msgid "Dismiss"
|
461 |
msgstr ""
|
462 |
|
463 |
#: assets/build/app.js:2
|
464 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:210
|
465 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
466 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:210
|
467 |
msgid "An error occurred!"
|
468 |
msgstr ""
|
469 |
|
470 |
#: assets/build/app.js:2
|
471 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:142
|
472 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
473 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:142
|
474 |
msgid "Import done!"
|
475 |
msgstr ""
|
476 |
|
477 |
#: assets/build/app.js:2
|
478 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:149
|
479 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
480 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:149
|
481 |
msgid "Template was successfully imported!"
|
482 |
msgstr ""
|
483 |
|
484 |
#: assets/build/app.js:2
|
485 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:153
|
486 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
487 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:153
|
488 |
msgid "Templates were successfully imported!"
|
489 |
msgstr ""
|
490 |
|
491 |
#: assets/build/app.js:2
|
492 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:174
|
493 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
494 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:174
|
495 |
msgid "Visit"
|
496 |
msgstr ""
|
497 |
|
498 |
#: assets/build/app.js:2
|
499 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:183
|
500 |
-
#: dist/templates-patterns-collection/assets/build/app.js:2
|
501 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:183
|
502 |
msgid "Edit"
|
503 |
msgstr ""
|
504 |
|
505 |
#. translators: name of starter site
|
506 |
#: assets/build/app.js:4
|
507 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:277
|
508 |
-
#: dist/templates-patterns-collection/assets/build/app.js:4
|
509 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:277
|
510 |
msgid "Import the %s template"
|
511 |
msgstr ""
|
512 |
|
513 |
#. translators: name of template
|
514 |
#: assets/build/app.js:6
|
515 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:282
|
516 |
-
#: dist/templates-patterns-collection/assets/build/app.js:6
|
517 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:282
|
518 |
msgid "Import all templates from %s"
|
519 |
msgstr ""
|
520 |
|
521 |
#. translators: %s the name of the template
|
522 |
#: assets/build/app.js:8
|
523 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:246
|
524 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
525 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:246
|
526 |
msgid "The %s template will be imported as a page into your site. This import will install & activate the page builder plugin if not already installed."
|
527 |
msgstr ""
|
528 |
|
529 |
#. translators: %s the name of the template
|
530 |
#: assets/build/app.js:8
|
531 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:252
|
532 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
533 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:252
|
534 |
msgid "All the templates that are included in this starter site, will be imported as pages. This import will install & activate the page builder plugin if not already installed."
|
535 |
msgstr ""
|
536 |
|
537 |
#: assets/build/app.js:8
|
538 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:302
|
539 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
540 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/ImportTemplatesModal.js:302
|
541 |
msgid "I want to import the entire site"
|
542 |
msgstr ""
|
543 |
|
544 |
#: assets/build/app.js:8
|
545 |
#: assets/src/utils/common.js:27
|
546 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
547 |
-
#: dist/templates-patterns-collection/assets/src/utils/common.js:27
|
548 |
msgid "Business"
|
549 |
msgstr ""
|
550 |
|
551 |
#: assets/build/app.js:8
|
552 |
#: assets/src/utils/common.js:28
|
553 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
554 |
-
#: dist/templates-patterns-collection/assets/src/utils/common.js:28
|
555 |
msgid "Ecommerce"
|
556 |
msgstr ""
|
557 |
|
558 |
#: assets/build/app.js:8
|
559 |
#: assets/src/utils/common.js:29
|
560 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
561 |
-
#: dist/templates-patterns-collection/assets/src/utils/common.js:29
|
562 |
msgid "Fashion"
|
563 |
msgstr ""
|
564 |
|
565 |
#: assets/build/app.js:8
|
566 |
#: assets/src/utils/common.js:30
|
567 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
568 |
-
#: dist/templates-patterns-collection/assets/src/utils/common.js:30
|
569 |
msgid "Blogging"
|
570 |
msgstr ""
|
571 |
|
572 |
#: assets/build/app.js:8
|
573 |
#: assets/src/utils/common.js:31
|
574 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
575 |
-
#: dist/templates-patterns-collection/assets/src/utils/common.js:31
|
576 |
msgid "Photography"
|
577 |
msgstr ""
|
578 |
|
579 |
#: assets/build/app.js:8
|
580 |
#: assets/src/Components/ImportStepper.js:8
|
581 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
582 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportStepper.js:8
|
583 |
msgid "Installing Plugins"
|
584 |
msgstr ""
|
585 |
|
586 |
#: assets/build/app.js:8
|
587 |
#: assets/src/Components/ImportStepper.js:13
|
588 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
589 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportStepper.js:13
|
590 |
msgid "Importing Content"
|
591 |
msgstr ""
|
592 |
|
593 |
#: assets/build/app.js:8
|
594 |
#: assets/src/Components/ImportStepper.js:18
|
595 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
596 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportStepper.js:18
|
597 |
msgid "Importing Customizer Settings"
|
598 |
msgstr ""
|
599 |
|
600 |
#: assets/build/app.js:8
|
601 |
#: assets/src/Components/ImportStepper.js:26
|
602 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
603 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportStepper.js:26
|
604 |
msgid "Importing Widgets"
|
605 |
msgstr ""
|
606 |
|
607 |
#: assets/build/app.js:8
|
608 |
#: assets/src/Components/ImportModal.js:427
|
609 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
610 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:427
|
611 |
msgid "Something went wrong while installing the necessary plugins."
|
612 |
msgstr ""
|
613 |
|
614 |
#: assets/build/app.js:8
|
615 |
#: assets/src/Components/ImportModal.js:431
|
616 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
617 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:431
|
618 |
msgid "Something went wrong while importing the website content."
|
619 |
msgstr ""
|
620 |
|
621 |
#: assets/build/app.js:8
|
622 |
#: assets/src/Components/ImportModal.js:435
|
623 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
624 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:435
|
625 |
msgid "Something went wrong while updating the customizer settings."
|
626 |
msgstr ""
|
627 |
|
628 |
#: assets/build/app.js:8
|
629 |
#: assets/src/Components/ImportModal.js:439
|
630 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
631 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:439
|
632 |
msgid "Something went wrong while importing the widgets."
|
633 |
msgstr ""
|
634 |
|
635 |
#: assets/build/app.js:8
|
636 |
#: assets/src/Components/ImportModal.js:61
|
637 |
#: assets/src/Components/ImportModal.js:97
|
638 |
-
#: dist/templates-patterns-collection/assets/build/app.js:8
|
639 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:61
|
640 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:97
|
641 |
msgid "Something went wrong while loading the site data. Please refresh the page and try again."
|
642 |
msgstr ""
|
643 |
|
644 |
#. translators: name of starter site
|
645 |
#: assets/build/app.js:10
|
646 |
#: assets/src/Components/ImportModal.js:180
|
647 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
648 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:180
|
649 |
msgid "Import %s as a complete site"
|
650 |
msgstr ""
|
651 |
|
652 |
#. translators: name of starter site
|
653 |
#: assets/build/app.js:10
|
654 |
#: assets/src/Components/ImportModal.js:188
|
655 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
656 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:188
|
657 |
msgid "Import the entire site including customizer options, pages, content and plugins."
|
658 |
msgstr ""
|
659 |
|
660 |
#: assets/build/app.js:10
|
661 |
#: assets/src/Components/ImportModal.js:222
|
662 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
663 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:222
|
664 |
msgid "Import settings"
|
665 |
msgstr ""
|
666 |
|
667 |
#: assets/build/app.js:10
|
668 |
#: assets/src/Components/ImportModal.js:562
|
669 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
670 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:562
|
671 |
msgid "I want to import just the templates"
|
672 |
msgstr ""
|
673 |
|
674 |
#: assets/build/app.js:10
|
675 |
#: assets/src/Components/ImportModal.js:580
|
676 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
677 |
-
#: dist/templates-patterns-collection/assets/src/Components/ImportModal.js:580
|
678 |
msgid "Import entire site"
|
679 |
msgstr ""
|
680 |
|
681 |
#: assets/build/app.js:10
|
682 |
#: assets/src/Components/CloudLibrary/DemoSiteTemplatesImport.js:155
|
683 |
#: assets/src/Components/StarterSiteCard.js:103
|
684 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
685 |
-
#: dist/templates-patterns-collection/assets/src/Components/CloudLibrary/DemoSiteTemplatesImport.js:155
|
686 |
-
#: dist/templates-patterns-collection/assets/src/Components/StarterSiteCard.js:103
|
687 |
msgid "Premium"
|
688 |
msgstr ""
|
689 |
|
690 |
#: assets/build/app.js:10
|
691 |
#: assets/src/Components/StarterSiteCard.js:81
|
692 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
693 |
-
#: dist/templates-patterns-collection/assets/src/Components/StarterSiteCard.js:81
|
694 |
msgid "View Pages"
|
695 |
msgstr ""
|
696 |
|
697 |
#: assets/build/app.js:10
|
698 |
#: assets/src/Components/PreviewFrame.js:62
|
699 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
700 |
-
#: dist/templates-patterns-collection/assets/src/Components/PreviewFrame.js:62
|
701 |
msgid "Previous"
|
702 |
msgstr ""
|
703 |
|
704 |
#: assets/build/app.js:10
|
705 |
#: assets/src/Components/PreviewFrame.js:74
|
706 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
707 |
-
#: dist/templates-patterns-collection/assets/src/Components/PreviewFrame.js:74
|
708 |
msgid "Next"
|
709 |
msgstr ""
|
710 |
|
711 |
#: assets/build/app.js:10
|
712 |
#: assets/src/Components/PreviewFrame.js:91
|
713 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
714 |
-
#: dist/templates-patterns-collection/assets/src/Components/PreviewFrame.js:91
|
715 |
msgid "Upgrade and Import"
|
716 |
msgstr ""
|
717 |
|
718 |
#: assets/build/app.js:10
|
719 |
#: assets/src/Components/Search.js:102
|
720 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
721 |
-
#: dist/templates-patterns-collection/assets/src/Components/Search.js:102
|
722 |
msgid "Search for a starter site"
|
723 |
msgstr ""
|
724 |
|
@@ -726,16 +538,10 @@ msgstr ""
|
|
726 |
#: assets/src/Components/EditorSelector.js:30
|
727 |
#: assets/src/Components/EditorSelector.js:70
|
728 |
#: assets/src/Components/EditorTabs.js:42
|
729 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
730 |
-
#: dist/templates-patterns-collection/assets/src/Components/EditorSelector.js:30
|
731 |
-
#: dist/templates-patterns-collection/assets/src/Components/EditorSelector.js:70
|
732 |
-
#: dist/templates-patterns-collection/assets/src/Components/EditorTabs.js:42
|
733 |
msgid "Builder Logo"
|
734 |
msgstr ""
|
735 |
|
736 |
#: assets/build/app.js:10
|
737 |
#: assets/src/Components/OnboardingContent.js:171
|
738 |
-
#: dist/templates-patterns-collection/assets/build/app.js:10
|
739 |
-
#: dist/templates-patterns-collection/assets/src/Components/OnboardingContent.js:171
|
740 |
msgid "No results found"
|
741 |
msgstr ""
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-05-05T17:48:04+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: templates-patterns-collection\n"
|
30 |
msgid "https://themeisle.com"
|
31 |
msgstr ""
|
32 |
|
|
|
33 |
#: includes/Admin.php:69
|
34 |
msgid "Starter Sites"
|
35 |
msgstr ""
|
36 |
|
|
|
37 |
#: includes/Admin.php:71
|
38 |
msgid "My Library"
|
39 |
msgstr ""
|
40 |
|
|
|
41 |
#: includes/Admin.php:276
|
42 |
msgid "Hi! We've noticed you were using a child theme of Zelle before. To make your transition easier, we can help you keep the same homepage settings you had before but in original Zelle's style, by converting it into an Elementor template."
|
43 |
msgstr ""
|
44 |
|
|
|
45 |
#: includes/Admin.php:307
|
46 |
#: assets/build/app.js:10
|
47 |
#: assets/src/Components/StarterSiteCard.js:60
|
|
|
|
|
48 |
msgid "Preview"
|
49 |
msgstr ""
|
50 |
|
|
|
51 |
#: includes/Admin.php:308
|
52 |
#: assets/build/app.js:10
|
53 |
#: assets/src/Components/PreviewFrame.js:102
|
54 |
#: assets/src/Components/StarterSiteCard.js:68
|
|
|
|
|
|
|
55 |
msgid "Import"
|
56 |
msgstr ""
|
57 |
|
|
|
58 |
#: includes/Admin.php:309
|
59 |
msgid "Get the PRO version!"
|
60 |
msgstr ""
|
61 |
|
|
|
62 |
#: includes/Admin.php:310
|
63 |
msgid "Importing"
|
64 |
msgstr ""
|
65 |
|
|
|
66 |
#: includes/Admin.php:311
|
67 |
#: assets/build/app.js:2
|
68 |
#: assets/src/Components/Migration.js:165
|
|
|
|
|
69 |
msgid "Cancel"
|
70 |
msgstr ""
|
71 |
|
|
|
72 |
#: includes/Admin.php:312
|
73 |
msgid "Loading"
|
74 |
msgstr ""
|
75 |
|
|
|
76 |
#: includes/Admin.php:313
|
77 |
#: assets/build/app.js:2
|
78 |
#: assets/build/app.js:10
|
79 |
#: assets/src/Components/ImportModal.js:603
|
80 |
#: assets/src/Components/Migration.js:198
|
|
|
|
|
|
|
|
|
81 |
msgid "View Website"
|
82 |
msgstr ""
|
83 |
|
|
|
84 |
#: includes/Admin.php:314
|
85 |
#: assets/build/app.js:10
|
86 |
#: assets/src/Components/ImportModal.js:613
|
|
|
|
|
87 |
msgid "Add your own content"
|
88 |
msgstr ""
|
89 |
|
|
|
90 |
#: includes/Admin.php:315
|
91 |
#: assets/build/app.js:10
|
92 |
#: assets/src/Components/ImportModal.js:594
|
|
|
|
|
93 |
msgid "Back to Sites Library"
|
94 |
msgstr ""
|
95 |
|
|
|
96 |
#: includes/Admin.php:316
|
97 |
msgid "Note"
|
98 |
msgstr ""
|
99 |
|
|
|
100 |
#: includes/Admin.php:317
|
101 |
msgid "Advanced Options"
|
102 |
msgstr ""
|
103 |
|
|
|
104 |
#: includes/Admin.php:318
|
105 |
#: assets/build/app.js:10
|
106 |
#: assets/src/Components/ImportModal.js:272
|
|
|
|
|
107 |
msgid "Plugins"
|
108 |
msgstr ""
|
109 |
|
|
|
110 |
#: includes/Admin.php:319
|
111 |
msgid "General"
|
112 |
msgstr ""
|
113 |
|
|
|
114 |
#: includes/Admin.php:320
|
115 |
msgid "Keep current layout"
|
116 |
msgstr ""
|
117 |
|
|
|
118 |
#: includes/Admin.php:321
|
119 |
msgid "Search"
|
120 |
msgstr ""
|
121 |
|
|
|
122 |
#: includes/Admin.php:322
|
123 |
#: assets/build/app.js:10
|
124 |
#: assets/src/Components/ImportModal.js:200
|
|
|
|
|
125 |
msgid "Content"
|
126 |
msgstr ""
|
127 |
|
|
|
128 |
#: includes/Admin.php:323
|
129 |
#: assets/build/app.js:10
|
130 |
#: assets/src/Components/ImportModal.js:204
|
|
|
|
|
131 |
msgid "Customizer"
|
132 |
msgstr ""
|
133 |
|
|
|
134 |
#: includes/Admin.php:324
|
135 |
#: assets/build/app.js:10
|
136 |
#: assets/src/Components/ImportModal.js:208
|
|
|
|
|
137 |
msgid "Widgets"
|
138 |
msgstr ""
|
139 |
|
|
|
140 |
#: includes/Admin.php:325
|
141 |
msgid "We recommend you backup your website content before attempting a full site import."
|
142 |
msgstr ""
|
143 |
|
|
|
144 |
#: includes/Admin.php:326
|
145 |
msgid "Due to copyright issues, some of the demo images will not be imported and will be replaced by placeholder images."
|
146 |
msgstr ""
|
147 |
|
|
|
148 |
#: includes/Admin.php:327
|
149 |
msgid "Some of the demo images will not be imported and will be replaced by placeholder images."
|
150 |
msgstr ""
|
151 |
|
|
|
152 |
#: includes/Admin.php:328
|
153 |
msgid "Here is our own collection of related images you can use for your site."
|
154 |
msgstr ""
|
155 |
|
|
|
156 |
#: includes/Admin.php:329
|
157 |
#: assets/build/app.js:8
|
158 |
#: assets/src/Components/ImportModal.js:542
|
|
|
|
|
159 |
msgid "Content was successfully imported. Enjoy your new site!"
|
160 |
msgstr ""
|
161 |
|
|
|
162 |
#: includes/Admin.php:330
|
163 |
msgid "Available in the PRO version"
|
164 |
msgstr ""
|
165 |
|
|
|
166 |
#: includes/Admin.php:331
|
167 |
msgid "Copy error code"
|
168 |
msgstr ""
|
169 |
|
|
|
170 |
#: includes/Admin.php:332
|
171 |
msgid "Download error log"
|
172 |
msgstr ""
|
173 |
|
|
|
174 |
#: includes/Admin.php:333
|
175 |
msgid "To import this demo you have to install the following plugins:"
|
176 |
msgstr ""
|
177 |
|
178 |
#. translators: 1 - 'here'.
|
|
|
179 |
#: includes/Admin.php:336
|
180 |
msgid "It seems that Rest API is not working properly on your website. Read about how you can fix it %1$s."
|
181 |
msgstr ""
|
182 |
|
|
|
183 |
#: includes/Admin.php:337
|
184 |
msgid "here"
|
185 |
msgstr ""
|
186 |
|
187 |
#. translators: 1 - 'get in touch'.
|
|
|
188 |
#: includes/Admin.php:341
|
189 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Please %1$s with us with the error code below, so we can help you fix this."
|
190 |
msgstr ""
|
191 |
|
|
|
|
|
192 |
#: includes/Admin.php:342
|
193 |
#: includes/Admin.php:352
|
194 |
msgid "get in touch"
|
195 |
msgstr ""
|
196 |
|
197 |
#. translators: 1 - 'troubleshooting guide'.
|
|
|
198 |
#: includes/Admin.php:346
|
199 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Take a look at our %1$s to see if any of the proposed solutions work."
|
200 |
msgstr ""
|
201 |
|
|
|
202 |
#: includes/Admin.php:347
|
203 |
msgid "troubleshooting guide"
|
204 |
msgstr ""
|
205 |
|
206 |
#. translators: 1 - 'get in touch'.
|
|
|
207 |
#: includes/Admin.php:351
|
208 |
msgid "If none of the solutions in the guide work, please %1$s with us with the error code below, so we can help you fix this."
|
209 |
msgstr ""
|
210 |
|
211 |
#. translators: %s - 'WP_Filesystem'.
|
|
|
212 |
#: includes/Admin.php:356
|
213 |
msgid "It seems that %s is not available. You can contact your site administrator or hosting provider to help you enable it."
|
214 |
msgstr ""
|
215 |
|
216 |
#. translators: %s - Theme name
|
|
|
217 |
#: includes/Admin.php:375
|
218 |
msgid "Choose from multiple unique demos, specially designed for you, that can be installed with a single click. You just need to choose your favorite, and we will take care of everything else."
|
219 |
msgstr ""
|
220 |
|
|
|
|
|
221 |
#: includes/Sites_Listing.php:46
|
222 |
#: includes/Sites_Listing.php:56
|
223 |
msgid "Want to keep using Zelle's homepage?"
|
224 |
msgstr ""
|
225 |
|
|
|
|
|
226 |
#: includes/Sites_Listing.php:47
|
227 |
#: includes/Sites_Listing.php:57
|
228 |
msgid "Hi! We've noticed you were using Zelle before. To make your transition easier, we can help you keep the same beautiful homepage you had before, by converting it into an Elementor template. This option will also import your homepage content."
|
229 |
msgstr ""
|
230 |
|
|
|
|
|
231 |
#: includes/TI_Beaver.php:35
|
232 |
#: includes/TI_Beaver.php:37
|
233 |
msgid "Templates Cloud"
|
234 |
msgstr ""
|
235 |
|
|
|
236 |
#: includes/TI_Beaver.php:36
|
237 |
msgid "Templates Cloud by Neve."
|
238 |
msgstr ""
|
239 |
|
|
|
240 |
#: includes/TI_Beaver.php:270
|
241 |
msgid "Save to Neve Cloud"
|
242 |
msgstr ""
|
243 |
|
|
|
244 |
#: includes/TI_Beaver.php:298
|
245 |
msgid "Template"
|
246 |
msgstr ""
|
256 |
#. translators: %s: Error message.
|
257 |
#: assets/build/app.js:2
|
258 |
#: assets/src/Components/InstallModal.js:31
|
|
|
|
|
259 |
msgid "An error has ocurred: %s"
|
260 |
msgstr ""
|
261 |
|
262 |
#. translators: %s: Error message.
|
263 |
#: assets/build/app.js:2
|
264 |
#: assets/src/Components/InstallModal.js:67
|
|
|
|
|
265 |
msgid "Could not activate theme."
|
266 |
msgstr ""
|
267 |
|
268 |
#: assets/build/app.js:2
|
269 |
#: assets/src/Components/InstallModal.js:89
|
|
|
|
|
270 |
msgid "Install and Activate Neve"
|
271 |
msgstr ""
|
272 |
|
273 |
#: assets/build/app.js:2
|
274 |
#: assets/src/Components/InstallModal.js:102
|
|
|
|
|
275 |
msgid "Logo"
|
276 |
msgstr ""
|
277 |
|
278 |
#: assets/build/app.js:2
|
279 |
#: assets/src/Components/InstallModal.js:116
|
|
|
|
|
280 |
msgid "In order to import the starter site, Neve theme has to be installed and activated. Click the button below to install and activate Neve"
|
281 |
msgstr ""
|
282 |
|
283 |
#: assets/build/app.js:2
|
284 |
#: assets/src/Components/InstallModal.js:52
|
|
|
|
|
285 |
msgid "Could not install theme."
|
286 |
msgstr ""
|
287 |
|
288 |
#: assets/build/app.js:2
|
289 |
#: assets/src/Components/InstallModal.js:147
|
|
|
|
|
290 |
msgid "Install and Activate"
|
291 |
msgstr ""
|
292 |
|
293 |
#: assets/build/app.js:2
|
294 |
#: assets/src/Components/InstallModal.js:151
|
|
|
|
|
295 |
msgid "Activate"
|
296 |
msgstr ""
|
297 |
|
302 |
#: assets/src/Components/Migration.js:161
|
303 |
#: assets/src/Components/OnboardingContent.js:153
|
304 |
#: assets/src/Components/PreviewFrame.js:54
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
msgid "Close"
|
306 |
msgstr ""
|
307 |
|
308 |
#: assets/build/app.js:2
|
309 |
#: assets/src/Components/ImportModalError.js:26
|
|
|
|
|
310 |
msgid "Error code"
|
311 |
msgstr ""
|
312 |
|
313 |
#: assets/build/app.js:2
|
314 |
#: assets/src/Components/ImportModalError.js:31
|
|
|
|
|
315 |
msgid "Error log"
|
316 |
msgstr ""
|
317 |
|
318 |
#: assets/build/app.js:2
|
319 |
#: assets/src/Components/Migration.js:82
|
320 |
#: assets/src/Components/Migration.js:240
|
|
|
|
|
|
|
321 |
msgid "Migrate"
|
322 |
msgstr ""
|
323 |
|
324 |
#: assets/build/app.js:2
|
325 |
#: assets/src/Components/Migration.js:141
|
|
|
|
|
326 |
msgid "Migrating"
|
327 |
msgstr ""
|
328 |
|
329 |
#: assets/build/app.js:2
|
330 |
#: assets/src/Components/Migration.js:189
|
|
|
|
|
331 |
msgid "Edit Content"
|
332 |
msgstr ""
|
333 |
|
334 |
#: assets/build/app.js:2
|
335 |
#: assets/src/Components/Migration.js:177
|
|
|
|
|
336 |
msgid "Start Migration"
|
337 |
msgstr ""
|
338 |
|
339 |
#: assets/build/app.js:2
|
340 |
#: assets/src/Components/Migration.js:260
|
|
|
|
|
341 |
msgid "Dismissed"
|
342 |
msgstr ""
|
343 |
|
344 |
#: assets/build/app.js:2
|
345 |
#: assets/src/Components/Migration.js:269
|
|
|
|
|
346 |
msgid "Dismiss"
|
347 |
msgstr ""
|
348 |
|
349 |
#: assets/build/app.js:2
|
350 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:210
|
|
|
|
|
351 |
msgid "An error occurred!"
|
352 |
msgstr ""
|
353 |
|
354 |
#: assets/build/app.js:2
|
355 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:142
|
|
|
|
|
356 |
msgid "Import done!"
|
357 |
msgstr ""
|
358 |
|
359 |
#: assets/build/app.js:2
|
360 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:149
|
|
|
|
|
361 |
msgid "Template was successfully imported!"
|
362 |
msgstr ""
|
363 |
|
364 |
#: assets/build/app.js:2
|
365 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:153
|
|
|
|
|
366 |
msgid "Templates were successfully imported!"
|
367 |
msgstr ""
|
368 |
|
369 |
#: assets/build/app.js:2
|
370 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:174
|
|
|
|
|
371 |
msgid "Visit"
|
372 |
msgstr ""
|
373 |
|
374 |
#: assets/build/app.js:2
|
375 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:183
|
|
|
|
|
376 |
msgid "Edit"
|
377 |
msgstr ""
|
378 |
|
379 |
#. translators: name of starter site
|
380 |
#: assets/build/app.js:4
|
381 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:277
|
|
|
|
|
382 |
msgid "Import the %s template"
|
383 |
msgstr ""
|
384 |
|
385 |
#. translators: name of template
|
386 |
#: assets/build/app.js:6
|
387 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:282
|
|
|
|
|
388 |
msgid "Import all templates from %s"
|
389 |
msgstr ""
|
390 |
|
391 |
#. translators: %s the name of the template
|
392 |
#: assets/build/app.js:8
|
393 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:246
|
|
|
|
|
394 |
msgid "The %s template will be imported as a page into your site. This import will install & activate the page builder plugin if not already installed."
|
395 |
msgstr ""
|
396 |
|
397 |
#. translators: %s the name of the template
|
398 |
#: assets/build/app.js:8
|
399 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:252
|
|
|
|
|
400 |
msgid "All the templates that are included in this starter site, will be imported as pages. This import will install & activate the page builder plugin if not already installed."
|
401 |
msgstr ""
|
402 |
|
403 |
#: assets/build/app.js:8
|
404 |
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:302
|
|
|
|
|
405 |
msgid "I want to import the entire site"
|
406 |
msgstr ""
|
407 |
|
408 |
#: assets/build/app.js:8
|
409 |
#: assets/src/utils/common.js:27
|
|
|
|
|
410 |
msgid "Business"
|
411 |
msgstr ""
|
412 |
|
413 |
#: assets/build/app.js:8
|
414 |
#: assets/src/utils/common.js:28
|
|
|
|
|
415 |
msgid "Ecommerce"
|
416 |
msgstr ""
|
417 |
|
418 |
#: assets/build/app.js:8
|
419 |
#: assets/src/utils/common.js:29
|
|
|
|
|
420 |
msgid "Fashion"
|
421 |
msgstr ""
|
422 |
|
423 |
#: assets/build/app.js:8
|
424 |
#: assets/src/utils/common.js:30
|
|
|
|
|
425 |
msgid "Blogging"
|
426 |
msgstr ""
|
427 |
|
428 |
#: assets/build/app.js:8
|
429 |
#: assets/src/utils/common.js:31
|
|
|
|
|
430 |
msgid "Photography"
|
431 |
msgstr ""
|
432 |
|
433 |
#: assets/build/app.js:8
|
434 |
#: assets/src/Components/ImportStepper.js:8
|
|
|
|
|
435 |
msgid "Installing Plugins"
|
436 |
msgstr ""
|
437 |
|
438 |
#: assets/build/app.js:8
|
439 |
#: assets/src/Components/ImportStepper.js:13
|
|
|
|
|
440 |
msgid "Importing Content"
|
441 |
msgstr ""
|
442 |
|
443 |
#: assets/build/app.js:8
|
444 |
#: assets/src/Components/ImportStepper.js:18
|
|
|
|
|
445 |
msgid "Importing Customizer Settings"
|
446 |
msgstr ""
|
447 |
|
448 |
#: assets/build/app.js:8
|
449 |
#: assets/src/Components/ImportStepper.js:26
|
|
|
|
|
450 |
msgid "Importing Widgets"
|
451 |
msgstr ""
|
452 |
|
453 |
#: assets/build/app.js:8
|
454 |
#: assets/src/Components/ImportModal.js:427
|
|
|
|
|
455 |
msgid "Something went wrong while installing the necessary plugins."
|
456 |
msgstr ""
|
457 |
|
458 |
#: assets/build/app.js:8
|
459 |
#: assets/src/Components/ImportModal.js:431
|
|
|
|
|
460 |
msgid "Something went wrong while importing the website content."
|
461 |
msgstr ""
|
462 |
|
463 |
#: assets/build/app.js:8
|
464 |
#: assets/src/Components/ImportModal.js:435
|
|
|
|
|
465 |
msgid "Something went wrong while updating the customizer settings."
|
466 |
msgstr ""
|
467 |
|
468 |
#: assets/build/app.js:8
|
469 |
#: assets/src/Components/ImportModal.js:439
|
|
|
|
|
470 |
msgid "Something went wrong while importing the widgets."
|
471 |
msgstr ""
|
472 |
|
473 |
#: assets/build/app.js:8
|
474 |
#: assets/src/Components/ImportModal.js:61
|
475 |
#: assets/src/Components/ImportModal.js:97
|
|
|
|
|
|
|
476 |
msgid "Something went wrong while loading the site data. Please refresh the page and try again."
|
477 |
msgstr ""
|
478 |
|
479 |
#. translators: name of starter site
|
480 |
#: assets/build/app.js:10
|
481 |
#: assets/src/Components/ImportModal.js:180
|
|
|
|
|
482 |
msgid "Import %s as a complete site"
|
483 |
msgstr ""
|
484 |
|
485 |
#. translators: name of starter site
|
486 |
#: assets/build/app.js:10
|
487 |
#: assets/src/Components/ImportModal.js:188
|
|
|
|
|
488 |
msgid "Import the entire site including customizer options, pages, content and plugins."
|
489 |
msgstr ""
|
490 |
|
491 |
#: assets/build/app.js:10
|
492 |
#: assets/src/Components/ImportModal.js:222
|
|
|
|
|
493 |
msgid "Import settings"
|
494 |
msgstr ""
|
495 |
|
496 |
#: assets/build/app.js:10
|
497 |
#: assets/src/Components/ImportModal.js:562
|
|
|
|
|
498 |
msgid "I want to import just the templates"
|
499 |
msgstr ""
|
500 |
|
501 |
#: assets/build/app.js:10
|
502 |
#: assets/src/Components/ImportModal.js:580
|
|
|
|
|
503 |
msgid "Import entire site"
|
504 |
msgstr ""
|
505 |
|
506 |
#: assets/build/app.js:10
|
507 |
#: assets/src/Components/CloudLibrary/DemoSiteTemplatesImport.js:155
|
508 |
#: assets/src/Components/StarterSiteCard.js:103
|
|
|
|
|
|
|
509 |
msgid "Premium"
|
510 |
msgstr ""
|
511 |
|
512 |
#: assets/build/app.js:10
|
513 |
#: assets/src/Components/StarterSiteCard.js:81
|
|
|
|
|
514 |
msgid "View Pages"
|
515 |
msgstr ""
|
516 |
|
517 |
#: assets/build/app.js:10
|
518 |
#: assets/src/Components/PreviewFrame.js:62
|
|
|
|
|
519 |
msgid "Previous"
|
520 |
msgstr ""
|
521 |
|
522 |
#: assets/build/app.js:10
|
523 |
#: assets/src/Components/PreviewFrame.js:74
|
|
|
|
|
524 |
msgid "Next"
|
525 |
msgstr ""
|
526 |
|
527 |
#: assets/build/app.js:10
|
528 |
#: assets/src/Components/PreviewFrame.js:91
|
|
|
|
|
529 |
msgid "Upgrade and Import"
|
530 |
msgstr ""
|
531 |
|
532 |
#: assets/build/app.js:10
|
533 |
#: assets/src/Components/Search.js:102
|
|
|
|
|
534 |
msgid "Search for a starter site"
|
535 |
msgstr ""
|
536 |
|
538 |
#: assets/src/Components/EditorSelector.js:30
|
539 |
#: assets/src/Components/EditorSelector.js:70
|
540 |
#: assets/src/Components/EditorTabs.js:42
|
|
|
|
|
|
|
|
|
541 |
msgid "Builder Logo"
|
542 |
msgstr ""
|
543 |
|
544 |
#: assets/build/app.js:10
|
545 |
#: assets/src/Components/OnboardingContent.js:171
|
|
|
|
|
546 |
msgid "No results found"
|
547 |
msgstr ""
|
readme.txt
CHANGED
@@ -27,6 +27,15 @@ No account is required to access the service template collection and the privacy
|
|
27 |
|
28 |
== Changelog ==
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
##### [Version 1.1.9](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.8...v1.1.9) (2021-04-29)
|
31 |
|
32 |
- [Fix] Content images not delivered from user site after import on some demos
|
27 |
|
28 |
== Changelog ==
|
29 |
|
30 |
+
##### [Version 1.1.10](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.9...v1.1.10) (2021-05-05)
|
31 |
+
|
32 |
+
- Allow user-made templates to save metadata
|
33 |
+
- Fix Custom Layouts editor crashing
|
34 |
+
- Fix Gutenberg sync update template for non-Gutenberg templates
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
##### [Version 1.1.9](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.8...v1.1.9) (2021-04-29)
|
40 |
|
41 |
- [Fix] Content images not delivered from user site after import on some demos
|
templates-patterns-collection.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Templates Patterns Collection
|
4 |
* Description: This plugin is an add-on to Neve WordPress theme which offers access to Templates and Block Patterns library service to be used with the theme.
|
5 |
-
* Version: 1.1.
|
6 |
* Author: ThemeIsle
|
7 |
* Author URI: https://themeisle.com
|
8 |
* License: GPLv3
|
2 |
/**
|
3 |
* Plugin Name: Templates Patterns Collection
|
4 |
* Description: This plugin is an add-on to Neve WordPress theme which offers access to Templates and Block Patterns library service to be used with the theme.
|
5 |
+
* Version: 1.1.10
|
6 |
* Author: ThemeIsle
|
7 |
* Author URI: https://themeisle.com
|
8 |
* License: GPLv3
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitf50c81772e3cd2fc7ad6a1825c9b2614::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -25,8 +25,8 @@ class InstalledVersions
|
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
-
'pretty_version' => '1.1.
|
29 |
-
'version' => '1.1.
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
@@ -37,8 +37,8 @@ private static $installed = array (
|
|
37 |
array (
|
38 |
'codeinwp/templates-patterns-collection' =>
|
39 |
array (
|
40 |
-
'pretty_version' => '1.1.
|
41 |
-
'version' => '1.1.
|
42 |
'aliases' =>
|
43 |
array (
|
44 |
),
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
+
'pretty_version' => '1.1.10',
|
29 |
+
'version' => '1.1.10.0',
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
37 |
array (
|
38 |
'codeinwp/templates-patterns-collection' =>
|
39 |
array (
|
40 |
+
'pretty_version' => '1.1.10',
|
41 |
+
'version' => '1.1.10.0',
|
42 |
'aliases' =>
|
43 |
array (
|
44 |
),
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInita58745d9f11e37b320157ebd0020b599
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitf50c81772e3cd2fc7ad6a1825c9b2614
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitf50c81772e3cd2fc7ad6a1825c9b2614', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf50c81772e3cd2fc7ad6a1825c9b2614', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitf50c81772e3cd2fc7ad6a1825c9b2614::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -52,9 +52,9 @@ class ComposerStaticInita58745d9f11e37b320157ebd0020b599
|
|
52 |
public static function getInitializer(ClassLoader $loader)
|
53 |
{
|
54 |
return \Closure::bind(function () use ($loader) {
|
55 |
-
$loader->prefixLengthsPsr4 =
|
56 |
-
$loader->prefixDirsPsr4 =
|
57 |
-
$loader->classMap =
|
58 |
|
59 |
}, null, ClassLoader::class);
|
60 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitf50c81772e3cd2fc7ad6a1825c9b2614
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
52 |
public static function getInitializer(ClassLoader $loader)
|
53 |
{
|
54 |
return \Closure::bind(function () use ($loader) {
|
55 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitf50c81772e3cd2fc7ad6a1825c9b2614::$prefixLengthsPsr4;
|
56 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitf50c81772e3cd2fc7ad6a1825c9b2614::$prefixDirsPsr4;
|
57 |
+
$loader->classMap = ComposerStaticInitf50c81772e3cd2fc7ad6a1825c9b2614::$classMap;
|
58 |
|
59 |
}, null, ClassLoader::class);
|
60 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
-
'pretty_version' => '1.1.
|
5 |
-
'version' => '1.1.
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
@@ -13,8 +13,8 @@
|
|
13 |
array (
|
14 |
'codeinwp/templates-patterns-collection' =>
|
15 |
array (
|
16 |
-
'pretty_version' => '1.1.
|
17 |
-
'version' => '1.1.
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
+
'pretty_version' => '1.1.10',
|
5 |
+
'version' => '1.1.10.0',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
13 |
array (
|
14 |
'codeinwp/templates-patterns-collection' =>
|
15 |
array (
|
16 |
+
'pretty_version' => '1.1.10',
|
17 |
+
'version' => '1.1.10.0',
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|