@hashtagcms/admin-ui-kit 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/admin-ui-kit.min.css +14 -0
- package/dist/admin-ui-kit.min.js +2 -0
- package/dist/admin-ui-kit.min.js.LICENSE.txt +175 -0
- package/package.json +53 -0
- package/packages/components/README.md +92 -0
- package/packages/components/package.json +28 -0
- package/packages/components/src/action-bar.vue +237 -0
- package/packages/components/src/category-platform.vue +97 -0
- package/packages/components/src/category-settings.vue +815 -0
- package/packages/components/src/cms-module-dropdown.vue +78 -0
- package/packages/components/src/downlods.vue +21 -0
- package/packages/components/src/file-uploader.vue +188 -0
- package/packages/components/src/frontend-module-creator.vue +599 -0
- package/packages/components/src/global-site-button.vue +94 -0
- package/packages/components/src/homepage.vue +1087 -0
- package/packages/components/src/html-slot.vue +23 -0
- package/packages/components/src/image-gallery.vue +144 -0
- package/packages/components/src/index.js +53 -0
- package/packages/components/src/info-boxes.vue +68 -0
- package/packages/components/src/info-popup.vue +121 -0
- package/packages/components/src/language-button.vue +80 -0
- package/packages/components/src/language-copier.vue +177 -0
- package/packages/components/src/left-nav.vue +159 -0
- package/packages/components/src/library/copy-paste.vue +186 -0
- package/packages/components/src/library/info-box.vue +102 -0
- package/packages/components/src/library/left-menu-show-hide.vue +47 -0
- package/packages/components/src/library/loader.vue +141 -0
- package/packages/components/src/library/modal-box.vue +136 -0
- package/packages/components/src/library/split-button.vue +127 -0
- package/packages/components/src/library/timer-button.vue +43 -0
- package/packages/components/src/library/toast-box.vue +53 -0
- package/packages/components/src/menu-sorter.vue +265 -0
- package/packages/components/src/module-creator.vue +650 -0
- package/packages/components/src/module-permission.vue +334 -0
- package/packages/components/src/pagination.vue +125 -0
- package/packages/components/src/platform-button.vue +118 -0
- package/packages/components/src/search-bar.vue +144 -0
- package/packages/components/src/site-button.vue +42 -0
- package/packages/components/src/site-cloner.vue +150 -0
- package/packages/components/src/sitewise-copier.vue +234 -0
- package/packages/components/src/sitewise-data.vue +347 -0
- package/packages/components/src/sorter.vue +239 -0
- package/packages/components/src/tabular-view.vue +824 -0
- package/packages/components/src/title-bar.vue +76 -0
- package/packages/components/src/top-nav.vue +96 -0
- package/packages/helpers/README.md +88 -0
- package/packages/helpers/package.json +20 -0
- package/packages/helpers/src/admin-config.js +9 -0
- package/packages/helpers/src/common.js +89 -0
- package/packages/helpers/src/dashboard.js +16 -0
- package/packages/helpers/src/editor.js +163 -0
- package/packages/helpers/src/error-message-handler.js +50 -0
- package/packages/helpers/src/event-bus.js +4 -0
- package/packages/helpers/src/form.js +4 -0
- package/packages/helpers/src/fx.js +106 -0
- package/packages/helpers/src/humanize.js +14 -0
- package/packages/helpers/src/map.js +3 -0
- package/packages/styles/README.md +37 -0
- package/packages/styles/package.json +15 -0
- package/packages/styles/src/_action-bar.scss +35 -0
- package/packages/styles/src/_admin.scss +22 -0
- package/packages/styles/src/_animate.scss +1579 -0
- package/packages/styles/src/_badges.scss +34 -0
- package/packages/styles/src/_category-list.scss +14 -0
- package/packages/styles/src/_common.scss +163 -0
- package/packages/styles/src/_info-box.scss +96 -0
- package/packages/styles/src/_left-nav.scss +59 -0
- package/packages/styles/src/_loader.scss +82 -0
- package/packages/styles/src/_menu-sorter.scss +39 -0
- package/packages/styles/src/_model-creator.scss +48 -0
- package/packages/styles/src/_module-permission.scss +25 -0
- package/packages/styles/src/_page-manager.scss +63 -0
- package/packages/styles/src/_popover-modal.scss +20 -0
- package/packages/styles/src/_table-grid.scss +39 -0
- package/packages/styles/src/_toast.scss +20 -0
- package/packages/styles/src/_variables.scss +37 -0
- package/packages/styles/src/app.scss +2 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see admin-ui-kit.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios"),require("vue")):"function"==typeof define&&define.amd?define(["axios","vue"],t):"object"==typeof exports?exports.HashtagCMS=t(require("axios"),require("vue")):e.HashtagCMS=t(e.axios,e.vue)}(this,(__WEBPACK_EXTERNAL_MODULE__742__,__WEBPACK_EXTERNAL_MODULE__380__)=>(()=>{var __webpack_modules__={80(e){var t;t=()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};e.r(t),e.d(t,{AdminConfig:()=>i,CopyToClipboard:()=>jt,Fetcher:()=>kt,IsJson:()=>Ut,PasteFromClipboard:()=>Ft,Storage:()=>Ct,Utils:()=>Lt,default:()=>Ht,queryBuilder:()=>Pt});var n={};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function r(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}e.r(n),e.d(n,{hasBrowserEnv:()=>pe,hasStandardBrowserEnv:()=>ve,hasStandardBrowserWebWorkerEnv:()=>ye,navigator:()=>ge,origin:()=>be});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appConfig="undefined"!=typeof window&&window.Laravel&&window.Laravel.adminConfig||{}},t=[{key:"get",value:function(e,t){return this.appConfig[e]||t}},{key:"admin_path",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="";if(null!==t&&"[object Object]"===Object.prototype.toString.call(t)){var o=[];Object.entries(t).forEach(function(e){var t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,a,r,i=[],s=!0,l=!1;try{for(a=(t=t.call(e)).next;!(s=(n=a.call(t)).done)&&(i.push(n.value),2!==i.length);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(l)throw o}}return i}}(e)||function(e){if(e){if("string"==typeof e)return a(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(e,2):void 0}}(e)||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.")}()}(e),n=t[0],r=t[1];return o.push(n+"="+r)}),n="?"+o.join("&")}return this.get("base_path")+"/"+e+n}},{key:"admin_asset",value:function(e){return this.get("app_url")+"/"+this.get("theme_assets")+"/"+e}},{key:"get_media",value:function(e){return this.get("media_path")+"/"+e}}],t&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const s=new i;function l(e,t){return function(){return e.apply(t,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:d}=Object,{iterator:u,toStringTag:h}=Symbol,m=(f=Object.create(null),e=>{const t=c.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())});var f;const p=e=>(e=e.toLowerCase(),t=>m(t)===e),g=e=>t=>typeof t===e,{isArray:v}=Array,y=g("undefined");function b(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&S(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const w=p("ArrayBuffer"),E=g("string"),S=g("function"),k=g("number"),_=e=>null!==e&&"object"==typeof e,N=e=>{if("object"!==m(e))return!1;const t=d(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||h in e||u in e)},C=p("Date"),B=p("File"),A=p("Blob"),x=p("FileList"),V=p("URLSearchParams"),[D,M,T,I]=["ReadableStream","Request","Response","Headers"].map(p);function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,a;if("object"!=typeof e&&(e=[e]),v(e))for(o=0,a=e.length;o<a;o++)t.call(null,e[o],o,e);else{if(b(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),r=a.length;let i;for(o=0;o<r;o++)i=a[o],t.call(null,e[i],i,e)}}function P(e,t){if(b(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o,a=n.length;for(;a-- >0;)if(o=n[a],t===o.toLowerCase())return o;return null}const L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e.g,j=e=>!y(e)&&e!==L,F=(R="undefined"!=typeof Uint8Array&&d(Uint8Array),e=>R&&e instanceof R);var R;const U=p("HTMLFormElement"),H=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$=p("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};O(n,(n,a)=>{let r;!1!==(r=t(n,a,e))&&(o[a]=r||n)}),Object.defineProperties(e,o)},q=p("AsyncFunction"),K=(W="function"==typeof setImmediate,J=S(L.postMessage),W?setImmediate:J?(X=`axios@${Math.random()}`,Y=[],L.addEventListener("message",({source:e,data:t})=>{e===L&&t===X&&Y.length&&Y.shift()()},!1),e=>{Y.push(e),L.postMessage(X,"*")}):e=>setTimeout(e));var W,J,X,Y;const G="undefined"!=typeof queueMicrotask?queueMicrotask.bind(L):"undefined"!=typeof process&&process.nextTick||K,Z={isArray:v,isArrayBuffer:w,isBuffer:b,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||S(e.append)&&("formdata"===(t=m(e))||"object"===t&&S(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:E,isNumber:k,isBoolean:e=>!0===e||!1===e,isObject:_,isPlainObject:N,isEmptyObject:e=>{if(!_(e)||b(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:D,isRequest:M,isResponse:T,isHeaders:I,isUndefined:y,isDate:C,isFile:B,isBlob:A,isRegExp:$,isFunction:S,isStream:e=>_(e)&&S(e.pipe),isURLSearchParams:V,isTypedArray:F,isFileList:x,forEach:O,merge:function e(){const{caseless:t,skipUndefined:n}=j(this)&&this||{},o={},a=(a,r)=>{const i=t&&P(o,r)||r;N(o[i])&&N(a)?o[i]=e(o[i],a):N(a)?o[i]=e({},a):v(a)?o[i]=a.slice():n&&y(a)||(o[i]=a)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],a);return o},extend:(e,t,n,{allOwnKeys:o}={})=>(O(t,(t,o)=>{n&&S(t)?Object.defineProperty(e,o,{value:l(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let a,r,i;const s={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),r=a.length;r-- >0;)i=a[r],o&&!o(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&d(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:p,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!k(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[u]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:U,hasOwnProperty:H,hasOwnProp:H,reduceDescriptors:z,freezeMethods:e=>{z(e,(t,n)=>{if(S(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];S(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach(e=>{n[e]=!0})};return v(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:P,global:L,isContextDefined:j,isSpecCompliantForm:function(e){return!!(e&&S(e.append)&&"FormData"===e[h]&&e[u])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(_(e)){if(t.indexOf(e)>=0)return;if(b(e))return e;if(!("toJSON"in e)){t[o]=e;const a=v(e)?[]:{};return O(e,(e,t)=>{const r=n(e,o+1);!y(r)&&(a[t]=r)}),t[o]=void 0,a}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(_(e)||S(e))&&S(e.then)&&S(e.catch),setImmediate:K,asap:G,isIterable:e=>null!=e&&S(e[u])};class Q extends Error{static from(e,t,n,o,a,r){const i=new Q(e.message,t||e.code,n,o,a);return i.cause=e,i.name=e.name,r&&Object.assign(i,r),i}constructor(e,t,n,o,a){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.status}}}Q.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Q.ERR_BAD_OPTION="ERR_BAD_OPTION",Q.ECONNABORTED="ECONNABORTED",Q.ETIMEDOUT="ETIMEDOUT",Q.ERR_NETWORK="ERR_NETWORK",Q.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Q.ERR_DEPRECATED="ERR_DEPRECATED",Q.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Q.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Q.ERR_CANCELED="ERR_CANCELED",Q.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Q.ERR_INVALID_URL="ERR_INVALID_URL";const ee=Q;function te(e){return Z.isPlainObject(e)||Z.isArray(e)}function ne(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function oe(e,t,n){return e?e.concat(t).map(function(e,t){return e=ne(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const ae=Z.toFlatObject(Z,{},null,function(e){return/^is[A-Z]/.test(e)}),re=function(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Z.isUndefined(t[e])})).metaTokens,a=n.visitor||c,r=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Z.isSpecCompliantForm(t);if(!Z.isFunction(a))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Z.isDate(e))return e.toISOString();if(Z.isBoolean(e))return e.toString();if(!s&&Z.isBlob(e))throw new ee("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(e)||Z.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,a){let s=e;if(e&&!a&&"object"==typeof e)if(Z.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(Z.isArray(e)&&function(e){return Z.isArray(e)&&!e.some(te)}(e)||(Z.isFileList(e)||Z.endsWith(n,"[]"))&&(s=Z.toArray(e)))return n=ne(n),s.forEach(function(e,o){!Z.isUndefined(e)&&null!==e&&t.append(!0===i?oe([n],o,r):null===i?n:n+"[]",l(e))}),!1;return!!te(e)||(t.append(oe(a,n,r),l(e)),!1)}const d=[],u=Object.assign(ae,{defaultVisitor:c,convertValue:l,isVisitable:te});if(!Z.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!Z.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+o.join("."));d.push(n),Z.forEach(n,function(n,r){!0===(!(Z.isUndefined(n)||null===n)&&a.call(t,n,Z.isString(r)?r.trim():r,o,u))&&e(n,o?o.concat(r):[r])}),d.pop()}}(e),t};function ie(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function se(e,t){this._pairs=[],e&&re(e,this,t)}const le=se.prototype;le.append=function(e,t){this._pairs.push([e,t])},le.toString=function(e){const t=e?function(t){return e.call(this,t,ie)}:ie;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const ce=se;function de(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ue(e,t,n){if(!t)return e;const o=n&&n.encode||de,a=Z.isFunction(n)?{serialize:n}:n,r=a&&a.serialize;let i;if(i=r?r(t,a):Z.isURLSearchParams(t)?t.toString():new ce(t,a).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const he=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Z.forEach(this.handlers,function(t){null!==t&&e(t)})}},me={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ce,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,ge="object"==typeof navigator&&navigator||void 0,ve=pe&&(!ge||["ReactNative","NativeScript","NS"].indexOf(ge.product)<0),ye="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,be=pe&&window.location.href||"http://localhost",we={...n,...fe},Ee=function(e){function t(e,n,o,a){let r=e[a++];if("__proto__"===r)return!0;const i=Number.isFinite(+r),s=a>=e.length;return r=!r&&Z.isArray(o)?o.length:r,s?(Z.hasOwnProp(o,r)?o[r]=[o[r],n]:o[r]=n,!i):(o[r]&&Z.isObject(o[r])||(o[r]=[]),t(e,n,o[r],a)&&Z.isArray(o[r])&&(o[r]=function(e){const t={},n=Object.keys(e);let o;const a=n.length;let r;for(o=0;o<a;o++)r=n[o],t[r]=e[r];return t}(o[r])),!i)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(e,o)=>{t(function(e){return Z.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),o,n,0)}),n}return null},Se={transitional:me,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,a=Z.isObject(e);if(a&&Z.isHTMLForm(e)&&(e=new FormData(e)),Z.isFormData(e))return o?JSON.stringify(Ee(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let r;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return re(e,new we.classes.URLSearchParams,{visitor:function(e,t,n,o){return we.isNode&&Z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((r=Z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return re(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||o?(t.setContentType("application/json",!1),function(e){if(Z.isString(e))try{return(0,JSON.parse)(e),Z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Se.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw ee.from(e,ee.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:we.classes.FormData,Blob:we.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],e=>{Se.headers[e]={}});const ke=Se,_e=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ne=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function Be(e){return!1===e||null==e?e:Z.isArray(e)?e.map(Be):String(e)}function Ae(e,t,n,o,a){return Z.isFunction(o)?o.call(this,t,n):(a&&(t=n),Z.isString(t)?Z.isString(o)?-1!==t.indexOf(o):Z.isRegExp(o)?o.test(t):void 0:void 0)}class xe{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function a(e,t,n){const a=Ce(t);if(!a)throw new Error("header name must be a non-empty string");const r=Z.findKey(o,a);(!r||void 0===o[r]||!0===n||void 0===n&&!1!==o[r])&&(o[r||t]=Be(e))}const r=(e,t)=>Z.forEach(e,(e,n)=>a(e,n,t));if(Z.isPlainObject(e)||e instanceof this.constructor)r(e,t);else if(Z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))r((e=>{const t={};let n,o,a;return e&&e.split("\n").forEach(function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),o=e.substring(a+1).trim(),!n||t[n]&&_e[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t})(e),t);else if(Z.isObject(e)&&Z.isIterable(e)){let n,o,a={};for(const t of e){if(!Z.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[o=t[0]]=(n=a[o])?Z.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}r(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=Ce(e)){const n=Z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(Z.isFunction(t))return t.call(this,e,n);if(Z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ce(e)){const n=Z.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ae(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function a(e){if(e=Ce(e)){const a=Z.findKey(n,e);!a||t&&!Ae(0,n[a],a,t)||(delete n[a],o=!0)}}return Z.isArray(e)?e.forEach(a):a(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const a=t[n];e&&!Ae(0,this[a],a,e,!0)||(delete this[a],o=!0)}return o}normalize(e){const t=this,n={};return Z.forEach(this,(o,a)=>{const r=Z.findKey(n,a);if(r)return t[r]=Be(o),void delete t[a];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(a):String(a).trim();i!==a&&delete t[a],t[i]=Be(o),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Z.forEach(this,(n,o)=>{null!=n&&!1!==n&&(t[o]=e&&Z.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ne]=this[Ne]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=Ce(e);t[o]||(function(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(e,n,a){return this[o].call(this,t,e,n,a)},configurable:!0})})}(n,e),t[o]=!0)}return Z.isArray(e)?e.forEach(o):o(e),this}}xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(xe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Z.freezeMethods(xe);const Ve=xe;function De(e,t){const n=this||ke,o=t||n,a=Ve.from(o.headers);let r=o.data;return Z.forEach(e,function(e){r=e.call(n,r,a.normalize(),t?t.status:void 0)}),a.normalize(),r}function Me(e){return!(!e||!e.__CANCEL__)}const Te=class extends ee{constructor(e,t,n){super(null==e?"canceled":e,ee.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Ie(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Oe=(e,t,n=3)=>{let o=0;const a=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let a,r=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=o[i];a||(a=l),n[r]=s,o[r]=l;let d=i,u=0;for(;d!==r;)u+=n[d++],d%=e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),l-a<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(e,t){let n,o,a=0,r=1e3/t;const i=(t,r=Date.now())=>{a=r,n=null,o&&(clearTimeout(o),o=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-a;s>=r?i(e,t):(n=e,o||(o=setTimeout(()=>{o=null,i(n)},r-s)))},()=>n&&i(n)]}(n=>{const r=n.loaded,i=n.lengthComputable?n.total:void 0,s=r-o,l=a(s);o=r,e({loaded:r,total:i,progress:i?r/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&r<=i?(i-r)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Pe=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},Le=e=>(...t)=>Z.asap(()=>e(...t)),je=we.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,we.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(we.origin),we.navigator&&/(msie|trident)/i.test(we.navigator.userAgent)):()=>!0,Fe=we.hasStandardBrowserEnv?{write(e,t,n,o,a,r,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),Z.isString(o)&&s.push(`path=${o}`),Z.isString(a)&&s.push(`domain=${a}`),!0===r&&s.push("secure"),Z.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Re(e,t,n){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ue=e=>e instanceof Ve?{...e}:e;function He(e,t){t=t||{};const n={};function o(e,t,n,o){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:o},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function a(e,t,n,a){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:o(void 0,e,0,a):o(e,t,0,a)}function r(e,t){if(!Z.isUndefined(t))return o(void 0,t)}function i(e,t){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function s(n,a,r){return r in t?o(n,a):r in e?o(void 0,n):void 0}const l={url:r,method:r,data:r,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>a(Ue(e),Ue(t),0,!0)};return Z.forEach(Object.keys({...e,...t}),function(o){const r=l[o]||a,i=r(e[o],t[o],o);Z.isUndefined(i)&&r!==s||(n[o]=i)}),n}const $e=e=>{const t=He({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:r,headers:i,auth:s}=t;if(t.headers=i=Ve.from(i),t.url=ue(Re(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Z.isFormData(n))if(we.hasStandardBrowserEnv||we.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(Z.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(we.hasStandardBrowserEnv&&(o&&Z.isFunction(o)&&(o=o(t)),o||!1!==o&&je(t.url))){const e=a&&r&&Fe.read(r);e&&i.set(a,e)}return t},ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const o=$e(e);let a=o.data;const r=Ve.from(o.headers).normalize();let i,s,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:m}=o;function f(){c&&c(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(i),o.signal&&o.signal.removeEventListener("abort",i)}let p=new XMLHttpRequest;function g(){if(!p)return;const o=Ve.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders());Ie(function(e){t(e),f()},function(e){n(e),f()},{data:u&&"text"!==u&&"json"!==u?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:o,config:e,request:p}),p=null}p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout,"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(g)},p.onabort=function(){p&&(n(new ee("Request aborted",ee.ECONNABORTED,e,p)),p=null)},p.onerror=function(t){const o=t&&t.message?t.message:"Network Error",a=new ee(o,ee.ERR_NETWORK,e,p);a.event=t||null,n(a),p=null},p.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const a=o.transitional||me;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new ee(t,a.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,p)),p=null},void 0===a&&r.setContentType(null),"setRequestHeader"in p&&Z.forEach(r.toJSON(),function(e,t){p.setRequestHeader(t,e)}),Z.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),u&&"json"!==u&&(p.responseType=o.responseType),m&&([l,d]=Oe(m,!0),p.addEventListener("progress",l)),h&&p.upload&&([s,c]=Oe(h),p.upload.addEventListener("progress",s),p.upload.addEventListener("loadend",c)),(o.cancelToken||o.signal)&&(i=t=>{p&&(n(!t||t.type?new Te(null,e,p):t),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(i),o.signal&&(o.signal.aborted?i():o.signal.addEventListener("abort",i)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);v&&-1===we.protocols.indexOf(v)?n(new ee("Unsupported protocol "+v+":",ee.ERR_BAD_REQUEST,e)):p.send(a||null)})},qe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const a=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;o.abort(t instanceof ee?t:new Te(t instanceof Error?t.message:t))}};let r=t&&setTimeout(()=>{r=null,a(new ee(`timeout of ${t}ms exceeded`,ee.ETIMEDOUT))},t);const i=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(e=>e.addEventListener("abort",a));const{signal:s}=o;return s.unsubscribe=()=>Z.asap(i),s}},Ke=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let o,a=0;for(;a<n;)o=a+t,yield e.slice(a,o),a=o},We=(e,t,n,o)=>{const a=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ke(n,t)}(e,t);let r,i=0,s=e=>{r||(r=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await a.next();if(t)return s(),void e.close();let r=o.byteLength;if(n){let e=i+=r;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw s(e),e}},cancel:e=>(s(e),a.return())},{highWaterMark:2})},{isFunction:Je}=Z,Xe=(({Request:e,Response:t})=>({Request:e,Response:t}))(Z.global),{ReadableStream:Ye,TextEncoder:Ge}=Z.global,Ze=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Qe=e=>{e=Z.merge.call({skipUndefined:!0},Xe,e);const{fetch:t,Request:n,Response:o}=e,a=t?Je(t):"function"==typeof fetch,r=Je(n),i=Je(o);if(!a)return!1;const s=a&&Je(Ye),l=a&&("function"==typeof Ge?(c=new Ge,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const d=r&&s&&Ze(()=>{let e=!1;const t=new n(we.origin,{body:new Ye,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),u=i&&s&&Ze(()=>Z.isReadableStream(new o("").body)),h={stream:u&&(e=>e.body)};return a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let o=t&&t[e];if(o)return o.call(t);throw new ee(`Response type '${e}' is not supported`,ee.ERR_NOT_SUPPORT,n)})}),async e=>{let{url:a,method:i,data:s,signal:c,cancelToken:m,timeout:f,onDownloadProgress:p,onUploadProgress:g,responseType:v,headers:y,withCredentials:b="same-origin",fetchOptions:w}=$e(e),E=t||fetch;v=v?(v+"").toLowerCase():"text";let S=qe([c,m&&m.toAbortSignal()],f),k=null;const _=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let N;try{if(g&&d&&"get"!==i&&"head"!==i&&0!==(N=await(async(e,t)=>{const o=Z.toFiniteNumber(e.getContentLength());return null==o?(async e=>{if(null==e)return 0;if(Z.isBlob(e))return e.size;if(Z.isSpecCompliantForm(e)){const t=new n(we.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Z.isArrayBufferView(e)||Z.isArrayBuffer(e)?e.byteLength:(Z.isURLSearchParams(e)&&(e+=""),Z.isString(e)?(await l(e)).byteLength:void 0)})(t):o})(y,s))){let e,t=new n(a,{method:"POST",body:s,duplex:"half"});if(Z.isFormData(s)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=Pe(N,Oe(Le(g)));s=We(t.body,65536,e,n)}}Z.isString(b)||(b=b?"include":"omit");const t=r&&"credentials"in n.prototype,c={...w,signal:S,method:i.toUpperCase(),headers:y.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};k=r&&new n(a,c);let m=await(r?E(k,w):E(a,c));const f=u&&("stream"===v||"response"===v);if(u&&(p||f&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=m[t]});const t=Z.toFiniteNumber(m.headers.get("content-length")),[n,a]=p&&Pe(t,Oe(Le(p),!0))||[];m=new o(We(m.body,65536,n,()=>{a&&a(),_&&_()}),e)}v=v||"text";let C=await h[Z.findKey(h,v)||"text"](m,e);return!f&&_&&_(),await new Promise((t,n)=>{Ie(t,n,{data:C,headers:Ve.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:k})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ee("Network Error",ee.ERR_NETWORK,e,k),{cause:t.cause||t});throw ee.from(t,t&&t.code,e,k)}}},et=new Map,tt=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:a}=t,r=[o,a,n];let i,s,l=r.length,c=et;for(;l--;)i=r[l],s=c.get(i),void 0===s&&c.set(i,s=l?new Map:Qe(t)),c=s;return s},nt=(tt(),{http:null,xhr:ze,fetch:{get:tt}});Z.forEach(nt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const ot=e=>`- ${e}`,at=e=>Z.isFunction(e)||null===e||!1===e,rt=function(e,t){e=Z.isArray(e)?e:[e];const{length:n}=e;let o,a;const r={};for(let i=0;i<n;i++){let n;if(o=e[i],a=o,!at(o)&&(a=nt[(n=String(o)).toLowerCase()],void 0===a))throw new ee(`Unknown adapter '${n}'`);if(a&&(Z.isFunction(a)||(a=a.get(t))))break;r[n||"#"+i]=a}if(!a){const e=Object.entries(r).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(ot).join("\n"):" "+ot(e[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function st(e){return it(e),e.headers=Ve.from(e.headers),e.data=De.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rt(e.adapter||ke.adapter,e)(e).then(function(t){return it(e),t.data=De.call(e,e.transformResponse,t),t.headers=Ve.from(t.headers),t},function(t){return Me(t)||(it(e),t&&t.response&&(t.response.data=De.call(e,e.transformResponse,t.response),t.response.headers=Ve.from(t.response.headers))),Promise.reject(t)})}const lt="1.13.4",ct={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ct[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const dt={};ct.transitional=function(e,t,n){function o(e,t){return"[Axios v"+lt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,r)=>{if(!1===e)throw new ee(o(a," has been removed"+(t?" in "+t:"")),ee.ERR_DEPRECATED);return t&&!dt[a]&&(dt[a]=!0,console.warn(o(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,r)}},ct.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ut={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let a=o.length;for(;a-- >0;){const r=o[a],i=t[r];if(i){const t=e[r],n=void 0===t||i(t,r,e);if(!0!==n)throw new ee("option "+r+" must be "+n,ee.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ee("Unknown option "+r,ee.ERR_BAD_OPTION)}},validators:ct},ht=ut.validators;class mt{constructor(e){this.defaults=e||{},this.interceptors={request:new he,response:new he}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=He(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:a}=t;void 0!==n&&ut.assertOptions(n,{silentJSONParsing:ht.transitional(ht.boolean),forcedJSONParsing:ht.transitional(ht.boolean),clarifyTimeoutError:ht.transitional(ht.boolean)},!1),null!=o&&(Z.isFunction(o)?t.paramsSerializer={serialize:o}:ut.assertOptions(o,{encode:ht.function,serialize:ht.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ut.assertOptions(t,{baseUrl:ht.spelling("baseURL"),withXsrfToken:ht.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=a&&Z.merge(a.common,a[t.method]);a&&Z.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=Ve.concat(r,a);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let d,u=0;if(!s){const e=[st.bind(this),void 0];for(e.unshift(...i),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=i.length;let h=t;for(;u<d;){const t=i[u++],n=i[u++];try{h=t(h)}catch(e){n.call(this,e);break}}try{c=st.call(this,h)}catch(e){return Promise.reject(e)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return ue(Re((e=He(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Z.forEach(["delete","get","head","options"],function(e){mt.prototype[e]=function(t,n){return this.request(He(n||{},{method:e,url:t,data:(n||{}).data}))}}),Z.forEach(["post","put","patch"],function(e){function t(t){return function(n,o,a){return this.request(He(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}mt.prototype[e]=t(),mt.prototype[e+"Form"]=t(!0)});const ft=mt;class pt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const o=new Promise(e=>{n.subscribe(e),t=e}).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e(function(e,o,a){n.reason||(n.reason=new Te(e,o,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new pt(function(t){e=t}),cancel:e}}}const gt=pt,vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(vt).forEach(([e,t])=>{vt[t]=e});const yt=vt,bt=function e(t){const n=new ft(t),o=l(ft.prototype.request,n);return Z.extend(o,ft.prototype,n,{allOwnKeys:!0}),Z.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(He(t,n))},o}(ke);bt.Axios=ft,bt.CanceledError=Te,bt.CancelToken=gt,bt.isCancel=Me,bt.VERSION=lt,bt.toFormData=re,bt.AxiosError=ee,bt.Cancel=bt.CanceledError,bt.all=function(e){return Promise.all(e)},bt.spread=function(e){return function(t){return e.apply(null,t)}},bt.isAxiosError=function(e){return Z.isObject(e)&&!0===e.isAxiosError},bt.mergeConfig=He,bt.AxiosHeaders=Ve,bt.formToJSON=e=>Ee(Z.isHTMLForm(e)?new FormData(e):e),bt.getAdapter=rt,bt.HttpStatusCode=yt,bt.default=bt;const wt=bt;function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function St(e){var t=function(e){if("object"!=Et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Et(t)?t:t+""}var kt=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"get",value:function(e,t){return wt.get(e,t)}},{key:"post",value:function(e,t,n){return wt.post(e,t,n)}},{key:"put",value:function(e,t,n){return wt.put(e,t,n)}},{key:"delete",value:function(e,t){return wt.delete(e,t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,St(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function Nt(e){var t=function(e){if("object"!=_t(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_t(t)?t:t+""}var Ct=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.obj={},this.counter=1},(t=[{key:"nextCounter",value:function(){return this.counter++}},{key:"store",value:function(e,t){this.obj[e]=t}},{key:"fetch",value:function(e){return this.obj[e]}},{key:"clear",value:function(e){return delete this.obj[e]}}])&&function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Nt(o.key),o)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Bt(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function r(n,o,a,r){var l=o&&o.prototype instanceof s?o:s,c=Object.create(l.prototype);return At(c,"_invoke",function(n,o,a){var r,s,l,c=0,d=a||[],u=!1,h={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return r=t,s=0,l=e,h.n=n,i}};function m(n,o){for(s=n,l=o,t=0;!u&&c&&!a&&t<d.length;t++){var a,r=d[t],m=h.p,f=r[2];n>3?(a=f===o)&&(l=r[(s=r[4])?5:(s=3,3)],r[4]=r[5]=e):r[0]<=m&&((a=n<2&&m<r[1])?(s=0,h.v=o,h.n=r[1]):m<f&&(a=n<3||r[0]>o||o>f)&&(r[4]=n,r[5]=o,h.n=f,s=0))}if(a||n>1)return i;throw u=!0,o}return function(a,d,f){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,f),s=d,l=f;(t=s<2?e:l)||!u;){r||(s?s<3?(s>1&&(h.n=-1),m(s,l)):h.n=l:h.v=l);try{if(c=2,r){if(s||(a="next"),t=r[a]){if(!(t=t.call(r,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=r.return)&&t.call(r),s<2&&(l=TypeError("The iterator does not provide a '"+a+"' method"),s=1);r=e}else if((t=(u=h.n<0)?l:n.call(o,h))!==i)break}catch(t){r=e,s=1,l=t}finally{c=1}}return{value:t,done:u}}}(n,a,r),!0),c}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(At(t={},o,function(){return this}),t),u=c.prototype=s.prototype=Object.create(d);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,At(e,a,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=c,At(u,"constructor",c),At(c,"constructor",l),l.displayName="GeneratorFunction",At(c,a,"GeneratorFunction"),At(u),At(u,a,"Generator"),At(u,o,function(){return this}),At(u,"toString",function(){return"[object Generator]"}),(Bt=function(){return{w:r,m:h}})()}function At(e,t,n,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}At=function(e,t,n,o){function r(t,n){At(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(r("next",0),r("throw",1),r("return",2))},At(e,t,n,o)}function xt(e,t,n,o,a,r,i){try{var s=e[r](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,a)}function Vt(e){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vt(e)}function Dt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,It(o.key),o)}}function Tt(e,t,n){return t&&Mt(e.prototype,t),n&&Mt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function It(e){var t=function(e){if("object"!=Vt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Vt(t)?t:t+""}var Ot="htcms_cps",Pt=Tt(function e(){Dt(this,e)},null,[{key:"cache",get:function(){return{}}},{key:"get",value:function(e,t){if(this.cache[e])return this.cache[e];for(var n=(void 0===t?"undefined"!=typeof window?window.location.search.substring(1):"":t).split("&"),o={},a=0;a<n.length;a++){var r=n[a].split("="),i=r[0],s=r[1];if(r.length>2&&(r.shift(),s=r.join("=")),o[i]=s,i===e){var l=decodeURIComponent(s);return this.cache[e]=l,l}}return null==e?o:""}},{key:"all",value:function(e){return this.get(null,e)}}]),Lt=Tt(function e(){Dt(this,e)},[{key:"serializeFormArray",value:function(e){if("undefined"==typeof document)return[];var t,n,o=[];if("object"==Vt(e="string"==typeof e?document.getElementById(e):e)&&e&&"FORM"===e.nodeName)for(var a=e.elements.length,r=0;r<a;r++)if((t=e.elements[r]).name&&!t.disabled&&"file"!==t.type&&"reset"!==t.type&&"submit"!==t.type&&"button"!==t.type)if("select-multiple"===t.type){n=e.elements[r].options.length;for(var i=0;i<n;i++)t.options[i].selected&&(o[o.length]={name:t.name,value:t.options[i].value})}else("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&(o[o.length]={name:t.name,value:t.value});return o}}]);function jt(e){if("undefined"!=typeof navigator&&navigator.clipboard)navigator.clipboard.writeText(e);else if("undefined"!=typeof window){window.localStorage.setItem(Ot,e);var t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-99999px",t.style.top="-99999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}function Ft(){return Rt.apply(this,arguments)}function Rt(){var e;return e=Bt().m(function e(){return Bt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(e.p=0,"undefined"!=typeof navigator){e.n=1;break}throw new Error("Navigator not available");case 1:return e.n=2,navigator.permissions.query({name:"clipboard-read"});case 2:if("denied"!==e.v.state){e.n=3;break}throw new Error("Not allowed to read clipboard.");case 3:return e.a(2,navigator.clipboard.read());case 4:return e.p=4,e.v,e.a(2,new Promise(function(e,t){"undefined"!=typeof window&&window.localStorage.getItem(Ot)?e(window.localStorage.getItem(Ot)):t(null)}))}},e,null,[[0,4]])}),Rt=function(){var t=this,n=arguments;return new Promise(function(o,a){var r=e.apply(t,n);function i(e){xt(r,o,a,i,s,"next",e)}function s(e){xt(r,o,a,i,s,"throw",e)}i(void 0)})},Rt.apply(this,arguments)}function Ut(e){try{JSON.parse(e)}catch(e){return!1}return!0}const Ht=s;return t})(),e.exports=t()},127(e){e.exports=function(){var e=[],t=[],n={},o={},a={};function r(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function i(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function s(e,t){return e.replace(t[0],function(n,o){var a,r,s=(a=t[1],r=arguments,a.replace(/\$(\d{1,2})/g,function(e,t){return r[t]||""}));return i(""===n?e[o-1]:n,s)})}function l(e,t,o){if(!e.length||n.hasOwnProperty(e))return t;for(var a=o.length;a--;){var r=o[a];if(r[0].test(t))return s(t,r)}return t}function c(e,t,n){return function(o){var a=o.toLowerCase();return t.hasOwnProperty(a)?i(o,a):e.hasOwnProperty(a)?i(o,e[a]):l(a,o,n)}}function d(e,t,n,o){return function(o){var a=o.toLowerCase();return!!t.hasOwnProperty(a)||!e.hasOwnProperty(a)&&l(a,a,n)===a}}function u(e,t,n){return(n?t+" ":"")+(1===t?u.singular(e):u.plural(e))}return u.plural=c(a,o,e),u.isPlural=d(a,o,e),u.singular=c(o,a,t),u.isSingular=d(o,a,t),u.addPluralRule=function(t,n){e.push([r(t),n])},u.addSingularRule=function(e,n){t.push([r(e),n])},u.addUncountableRule=function(e){"string"!=typeof e?(u.addPluralRule(e,"$0"),u.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},u.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),a[e]=t,o[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return u.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return u.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return u.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(u.addUncountableRule),u}()},262(e,t){"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n}},380(e){"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__380__},602(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{A:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__={mounted:function(){this.normalizeData()},props:["dataOptions","dataSelected","dataParser","dataOnChange","dataBtnCss"],data:function(){return{display:"",formatter:this.dataParser,lists:void 0!==this.dataOptions&&"string"==typeof this.dataOptions?JSON.parse(this.dataOptions):this.dataOptions,current:{},selectedIndex:void 0===this.dataSelected?0:parseInt(this.dataSelected),openCSS:"",btnCss:void 0===this.dataBtnCss?"":this.dataBtnCss}},computed:{onChange:function onChange(){var method=void 0===this.dataOnChange?null:this.dataOnChange;return"string"==typeof method?eval(method):method}},methods:{toggleMenu:function(){this.display=""===this.display?"display:block":"",""!==this.display&&this.bindDocumentClick()},isActive:function(e){return this.current.value===e.value?"dropdown-item active hand":"dropdown-item hand"},normalizeData:function(){var e=this.formatter,t=[];this.lists.forEach(function(n,o){"function"==typeof e?t.push(e(n)):"number"==typeof o&&t.push({label:n,value:n})}),this.lists=t,this.current=this.lists[this.selectedIndex]},setCurrent:function(e){this.current=this.lists[e],this.current.index=e,null!=this.onChange&&"function"==typeof this.onChange&&this.onChange(this.current),this.$emit("change",this.current)},mangeShowHide:function(e){var t=this.$refs.dropdownMenu,n=e.target;t===n||t.contains(n)||(this.display="",this.unBindDocumentClick())},bindDocumentClick:function(){document.addEventListener("mouseup",this.mangeShowHide)},unBindDocumentClick:function(){document.removeEventListener("mouseup",this.mangeShowHide)},setData:function(e){this.lists=[],this.lists=e,this.normalizeData()}}}},742(e){"use strict";e.exports=__WEBPACK_EXTERNAL_MODULE__742__},846(e){var t;t=()=>(()=>{var e={"./src/Base64.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const o={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){let t,n,a,r,i,s,l,c="",d=0;for(e=o._utf8Encode(e);d<e.length;)t=e.charCodeAt(d++),n=e.charCodeAt(d++),a=e.charCodeAt(d++),r=t>>2,i=(3&t)<<4|n>>4,s=(15&n)<<2|a>>6,l=63&a,isNaN(n)?s=l=64:isNaN(a)&&(l=64),c=c+this._keyStr.charAt(r)+this._keyStr.charAt(i)+this._keyStr.charAt(s)+this._keyStr.charAt(l);return c},decode:function(e){let t,n,a,r,i,s,l,c="",d=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");d<e.length;)r=this._keyStr.indexOf(e.charAt(d++)),i=this._keyStr.indexOf(e.charAt(d++)),s=this._keyStr.indexOf(e.charAt(d++)),l=this._keyStr.indexOf(e.charAt(d++)),t=r<<2|i>>4,n=(15&i)<<4|s>>2,a=(3&s)<<6|l,c+=String.fromCharCode(t),64!==s&&(c+=String.fromCharCode(n)),64!==l&&(c+=String.fromCharCode(a));return c=o._utf8Decode(c),c},_utf8Encode:function(e){e=e.replace(/\r\n/g,"\n");let t="";for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8Decode:function(e){let t,n,o,a="",r=0;for(t=n=0;r<e.length;)t=e.charCodeAt(r),t<128?(a+=String.fromCharCode(t),r++):t>191&&t<224?(n=e.charCodeAt(r+1),a+=String.fromCharCode((31&t)<<6|63&n),r+=2):(n=e.charCodeAt(r+1),o=e.charCodeAt(r+2),a+=String.fromCharCode((15&t)<<12|(63&n)<<6|63&o),r+=3);return a}},a=o},"./src/SecureLS.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{SecureLS:()=>v});var o=n("./src/constants.js"),a=n("./src/enc-utf8.js"),r=n("./src/utils.js"),i=n("./node_modules/crypto-js/aes.js"),s=n.n(i),l=n("./node_modules/crypto-js/rabbit.js"),c=n.n(l),d=n("./node_modules/crypto-js/rc4.js"),u=n.n(d),h=n("./node_modules/crypto-js/tripledes.js"),m=n.n(h),f=n("./node_modules/lz-string/libs/lz-string.js"),p=n("./src/Base64.js");const g={[o.default.EncrytionTypes.AES]:s(),[o.default.EncrytionTypes.DES]:m(),[o.default.EncrytionTypes.RABBIT]:c(),[o.default.EncrytionTypes.RC4]:u()};class v{constructor({encryptionSecret:e="",encryptionNamespace:t="",isCompression:n=!0,encodingType:r=o.default.EncrytionTypes.BASE64,storage:i=localStorage,metaKey:l=o.default.metaKey}={}){Object.assign(this,{_name:"secure-ls",Base64:p.default,LZString:{compressToUTF16:f.compressToUTF16,decompressFromUTF16:f.decompressFromUTF16},AES:s(),DES:m(),RABBIT:c(),RC4:u(),enc:a.default}),this.config={encryptionSecret:e,encryptionNamespace:t,isCompression:n,encodingType:r.toLowerCase(),storage:i,metaKey:l},this.encryptionSecret=e,this.storage=i,this.metaKey=l,this.init()}init(){let e=this.getMetaData();this._isBase64=this._isBase64EncryptionType(),this._isAES=this._isAESEncryptionType(),this._isDES=this._isDESEncryptionType(),this._isRabbit=this._isRabbitEncryptionType(),this._isRC4=this._isRC4EncryptionType(),this._isCompression=this._isDataCompressionEnabled(),this.allKeys=e.keys||this.resetAllKeys()}_isBase64EncryptionType(){return p.default&&(void 0===this.config.encodingType||this.config.encodingType===o.default.EncrytionTypes.BASE64)}_isAESEncryptionType(){return s()&&this.config.encodingType===o.default.EncrytionTypes.AES}_isDESEncryptionType(){return m()&&this.config.encodingType===o.default.EncrytionTypes.DES}_isRabbitEncryptionType(){return c()&&this.config.encodingType===o.default.EncrytionTypes.RABBIT}_isRC4EncryptionType(){return u()&&this.config.encodingType===o.default.EncrytionTypes.RC4}_isDataCompressionEnabled(){return this.config.isCompression}getEncryptionSecret(e){let t=this.getMetaData(),n=r.default.getObjectFromKey(t.keys,e);n&&(this._isAES||this._isDES||this._isRabbit||this._isRC4)&&(void 0===this.config.encryptionSecret?(this.encryptionSecret=n.s,this.encryptionSecret||(this.encryptionSecret=r.default.generateSecretKey(),this.setMetaData())):this.encryptionSecret=this.config.encryptionSecret||n.s||"")}getEncryptionType(){const e=this.config.encodingType;return e?e.toLowerCase():o.default.EncrytionTypes.BASE64}getDataFromLocalStorage(e){return this.storage.getItem(e,!0)}setDataToLocalStorage(e,t){this.storage.setItem(e,t)}setMetaData(){let e=this.processData({keys:this.allKeys},!0);this.setDataToLocalStorage(this.getMetaKey(),e)}getMetaData(){return this.get(this.getMetaKey(),!0)||{}}getMetaKey(){return this.metaKey+(this.config.encryptionNamespace?"__"+this.config.encryptionNamespace:"")}resetAllKeys(){return this.allKeys=[],[]}processData(e,t){if(null==e||""===e)return"";let n;try{n=JSON.stringify(e)}catch(e){throw new Error("Could not stringify data",e)}let o=n;if(this._isBase64||t)o=p.default.encode(n);else{const e=g[this.getEncryptionType()];e&&(o=e.encrypt(n,this.encryptionSecret)),o=o&&o.toString()}let a=o;return(this._isCompression||t)&&(a=this.LZString.compressToUTF16(o)),a}getAllKeys(){let e=this.getMetaData();return r.default.extractKeyNames(e)||[]}get(e,t){let n="",i="";if(!r.default.is(e))return r.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED),i;let s=this.getDataFromLocalStorage(e);if(!s)return i;let l=s;if((this._isCompression||t)&&(l=this.LZString.decompressFromUTF16(s)),n=l,this._isBase64||t)n=p.default.decode(l);else{this.getEncryptionSecret(e);const t=g[this.getEncryptionType()];if(t){const e=t.decrypt(l.toString(),this.encryptionSecret);e&&(n=e.toString(a.default._Utf8))}}try{i=JSON.parse(n)}catch(e){throw new Error("Could not parse JSON",e)}return i}set(e,t){let n="";r.default.is(e)?(this.getEncryptionSecret(e),String(e)!==String(this.metaKey)&&(r.default.isKeyPresent(this.allKeys,e)||(this.allKeys.push({k:e,s:this.encryptionSecret}),this.setMetaData())),n=this.processData(t),this.setDataToLocalStorage(e,n)):r.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED)}remove(e){r.default.is(e)?e===this.metaKey&&this.getAllKeys().length?r.default.warn(o.default.WarningEnum.META_KEY_REMOVE):(r.default.isKeyPresent(this.allKeys,e)&&(r.default.removeFromKeysList(this.allKeys,e),this.setMetaData()),this.storage.removeItem(e)):r.default.warn(o.default.WarningEnum.KEY_NOT_PROVIDED)}removeAll(){let e=this.getAllKeys();for(let t=0;t<e.length;t++)this.storage.removeItem(e[t]);this.storage.removeItem(this.metaKey),this.resetAllKeys()}clear(){this.storage.clear(),this.resetAllKeys()}}},"./src/WordArray.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});let o={random:function(e){let t=[],n=function(e){let t=987654321,n=4294967295;return function(){t=36969*(65535&t)+(t>>16)&n;let o=(t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return o/=4294967296,o+=.5,o*(Math.random()>.5?1:-1)}};for(let o,a=0;a<e;a+=4){let e=n(4294967296*(o||Math.random()));o=987654071*e(),t.push(4294967296*e()|0)}return new o.Set(t,e)},Set:function(e,t){e=this.words=e||[],this.sigBytes=void 0!==t?t:8*e.length}};const a=o},"./src/constants.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const o={KEY_NOT_PROVIDED:"keyNotProvided",META_KEY_REMOVE:"metaKeyRemove",DEFAULT_TEXT:"defaultText"},a={};a[o.KEY_NOT_PROVIDED]="Secure LS: Key not provided. Aborting operation!",a[o.META_KEY_REMOVE]="Secure LS: Meta key can not be removed\nunless all keys created by Secure LS are removed!",a[o.DEFAULT_TEXT]="Unexpected output";const r={WarningEnum:o,WarningTypes:a,EncrytionTypes:{BASE64:"base64",AES:"aes",DES:"des",RABBIT:"rabbit",RC4:"rc4"},metaKey:"_secure__ls__metadata",secretPhrase:"s3cr3t$#@135^&*246"}},"./src/enc-utf8.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const o={Latin1:{stringify:e=>{let t,n,o=e.words,a=e.sigBytes,r=[];for(t=0;t<a;t++)n=o[t>>>2]>>>24-t%4*8&255,r.push(String.fromCharCode(n));return r.join("")}},_Utf8:{stringify:e=>{try{return decodeURIComponent(escape(o.Latin1.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data",e)}}}},a=o},"./src/utils.js":(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var o=n("./node_modules/crypto-js/pbkdf2.js"),a=n.n(o),r=n("./src/constants.js"),i=n("./src/WordArray.js");const s={is:e=>!!e,warn:(e=r.default.WarningEnum.DEFAULT_TEXT)=>{console.warn(r.default.WarningTypes[e])},generateSecretKey:()=>{const e=i.default.random(16);return a()(r.default.secretPhrase,e,{keySize:4}).toString()},getObjectFromKey:(e=[],t)=>e.find(e=>e.k===t)||{},extractKeyNames:({keys:e=[]}={})=>e.map(({k:e})=>e),isKeyPresent:(e=[],t)=>e.some(e=>String(e.k)===String(t)),removeFromKeysList:(e=[],t)=>{const n=e.findIndex(e=>e.k===t);return-1!==n&&e.splice(n,1),n}}},"./node_modules/crypto-js/aes.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.BlockCipher,n=e.algo,a=[],r=[],i=[],s=[],l=[],c=[],d=[],u=[],h=[],m=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,o=0;for(t=0;t<256;t++){var f=o^o<<1^o<<2^o<<3^o<<4;f=f>>>8^255&f^99,a[n]=f,r[f]=n;var p=e[n],g=e[p],v=e[g],y=257*e[f]^16843008*f;i[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,l[n]=y<<8|y>>>24,c[n]=y,y=16843009*v^65537*g^257*p^16843008*n,d[f]=y<<24|y>>>8,u[f]=y<<16|y>>>16,h[f]=y<<8|y>>>24,m[f]=y,n?(n=p^e[e[e[v^p]]],o^=e[e[o]]):n=o=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],p=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],i=0;i<o;i++)i<n?r[i]=t[i]:(c=r[i-1],i%n?n>6&&i%n==4&&(c=a[c>>>24]<<24|a[c>>>16&255]<<16|a[c>>>8&255]<<8|a[255&c]):(c=a[(c=c<<8|c>>>24)>>>24]<<24|a[c>>>16&255]<<16|a[c>>>8&255]<<8|a[255&c],c^=f[i/n|0]<<24),r[i]=r[i-n]^c);for(var s=this._invKeySchedule=[],l=0;l<o;l++){if(i=o-l,l%4)var c=r[i];else c=r[i-4];s[l]=l<4||i<=4?c:d[a[c>>>24]]^u[a[c>>>16&255]]^h[a[c>>>8&255]]^m[a[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,i,s,l,c,a)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,d,u,h,m,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,o,a,r,i,s){for(var l=this._nRounds,c=e[t]^n[0],d=e[t+1]^n[1],u=e[t+2]^n[2],h=e[t+3]^n[3],m=4,f=1;f<l;f++){var p=o[c>>>24]^a[d>>>16&255]^r[u>>>8&255]^i[255&h]^n[m++],g=o[d>>>24]^a[u>>>16&255]^r[h>>>8&255]^i[255&c]^n[m++],v=o[u>>>24]^a[h>>>16&255]^r[c>>>8&255]^i[255&d]^n[m++],y=o[h>>>24]^a[c>>>16&255]^r[d>>>8&255]^i[255&u]^n[m++];c=p,d=g,u=v,h=y}p=(s[c>>>24]<<24|s[d>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[m++],g=(s[d>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&c])^n[m++],v=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[c>>>8&255]<<8|s[255&d])^n[m++],y=(s[h>>>24]<<24|s[c>>>16&255]<<16|s[d>>>8&255]<<8|s[255&u])^n[m++],e[t]=p,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(p)}(),o.AES)},"./node_modules/crypto-js/cipher-core.js":function(e,t,n){var o,a,r,i,s,l,c,d,u,h,m,f,p,g,v,y,b,w,E;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/evpkdf.js"),void(o.lib.Cipher||(a=o,r=a.lib,i=r.Base,s=r.WordArray,l=r.BufferedBlockAlgorithm,c=a.enc,c.Utf8,d=c.Base64,u=a.algo.EvpKDF,h=r.Cipher=l.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){l.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?E:b}return function(t){return{encrypt:function(n,o,a){return e(o).encrypt(t,n,o,a)},decrypt:function(n,o,a){return e(o).decrypt(t,n,o,a)}}}}()}),r.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),m=a.mode={},f=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=m.CBC=function(){var e=f.extend();function t(e,t,n){var o,a=this._iv;a?(o=a,this._iv=void 0):o=this._prevBlock;for(var r=0;r<n;r++)e[t+r]^=o[r]}return e.Encryptor=e.extend({processBlock:function(e,n){var o=this._cipher,a=o.blockSize;t.call(this,e,n,a),o.encryptBlock(e,n),this._prevBlock=e.slice(n,n+a)}}),e.Decryptor=e.extend({processBlock:function(e,n){var o=this._cipher,a=o.blockSize,r=e.slice(n,n+a);o.decryptBlock(e,n),t.call(this,e,n,a),this._prevBlock=r}}),e}(),g=(a.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,o=n-e.sigBytes%n,a=o<<24|o<<16|o<<8|o,r=[],i=0;i<o;i+=4)r.push(a);var l=s.create(r,o);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.BlockCipher=h.extend({cfg:h.cfg.extend({mode:p,padding:g}),reset:function(){var e;h.reset.call(this);var t=this.cfg,n=t.iv,o=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=o.createEncryptor:(e=o.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(o,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),v=r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),y=(a.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?s.create([1398893684,1701076831]).concat(n).concat(t):t).toString(d)},parse:function(e){var t,n=d.parse(e),o=n.words;return 1398893684==o[0]&&1701076831==o[1]&&(t=s.create(o.slice(2,4)),o.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:t})}},b=r.SerializableCipher=i.extend({cfg:i.extend({format:y}),encrypt:function(e,t,n,o){o=this.cfg.extend(o);var a=e.createEncryptor(n,o),r=a.finalize(t),i=a.cfg;return v.create({ciphertext:r,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:o.format})},decrypt:function(e,t,n,o){return o=this.cfg.extend(o),t=this._parse(t,o.format),e.createDecryptor(n,o).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),w=(a.kdf={}).OpenSSL={execute:function(e,t,n,o,a){if(o||(o=s.random(8)),a)r=u.create({keySize:t+n,hasher:a}).compute(e,o);else var r=u.create({keySize:t+n}).compute(e,o);var i=s.create(r.words.slice(t),4*n);return r.sigBytes=4*t,v.create({key:r,iv:i,salt:o})}},E=r.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(e,t,n,o){var a=(o=this.cfg.extend(o)).kdf.execute(n,e.keySize,e.ivSize,o.salt,o.hasher);o.iv=a.iv;var r=b.encrypt.call(this,e,t,a.key,o);return r.mixIn(a),r},decrypt:function(e,t,n,o){o=this.cfg.extend(o),t=this._parse(t,o.format);var a=o.kdf.execute(n,e.keySize,e.ivSize,t.salt,o.hasher);return o.iv=a.iv,b.decrypt.call(this,e,t,a.key,o)}}))))},"./node_modules/crypto-js/core.js":function(e,t,n){var o;e.exports=(o=o||function(e){var t;if("undefined"!=typeof window&&window.crypto&&(t=window.crypto),"undefined"!=typeof self&&self.crypto&&(t=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(t=globalThis.crypto),!t&&"undefined"!=typeof window&&window.msCrypto&&(t=window.msCrypto),!t&&void 0!==n.g&&n.g.crypto&&(t=n.g.crypto),!t)try{t=n("?9157")}catch(e){}var o=function(){if(t){if("function"==typeof t.getRandomValues)try{return t.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof t.randomBytes)try{return t.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},s=i.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},l=i.WordArray=s.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,o=this.sigBytes,a=e.sigBytes;if(this.clamp(),o%4)for(var r=0;r<a;r++){var i=n[r>>>2]>>>24-r%4*8&255;t[o+r>>>2]|=i<<24-(o+r)%4*8}else for(var s=0;s<a;s+=4)t[o+s>>>2]=n[s>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(o());return new l.init(t,e)}}),c=r.enc={},d=c.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a++){var r=t[a>>>2]>>>24-a%4*8&255;o.push((r>>>4).toString(16)),o.push((15&r).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o+=2)n[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new l.init(n,t/2)}},u=c.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,o=[],a=0;a<n;a++){var r=t[a>>>2]>>>24-a%4*8&255;o.push(String.fromCharCode(r))}return o.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new l.init(n,t)}},h=c.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},m=i.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,o=this._data,a=o.words,r=o.sigBytes,i=this.blockSize,s=r/(4*i),c=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,d=e.min(4*c,r);if(c){for(var u=0;u<c;u+=i)this._doProcessBlock(a,u);n=a.splice(0,c),o.sigBytes-=d}return new l.init(n,d)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),f=(i.Hasher=m.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new f.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math),o)},"./node_modules/crypto-js/enc-base64.js":function(e,t,n){var o,a,r;e.exports=(o=n("./node_modules/crypto-js/core.js"),r=(a=o).lib.WordArray,a.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,o=this._map;e.clamp();for(var a=[],r=0;r<n;r+=3)for(var i=(t[r>>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,s=0;s<4&&r+.75*s<n;s++)a.push(o.charAt(i>>>6*(3-s)&63));var l=o.charAt(64);if(l)for(;a.length%4;)a.push(l);return a.join("")},parse:function(e){var t=e.length,n=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var a=0;a<n.length;a++)o[n.charCodeAt(a)]=a}var i=n.charAt(64);if(i){var s=e.indexOf(i);-1!==s&&(t=s)}return function(e,t,n){for(var o=[],a=0,i=0;i<t;i++)if(i%4){var s=n[e.charCodeAt(i-1)]<<i%4*2|n[e.charCodeAt(i)]>>>6-i%4*2;o[a>>>2]|=s<<24-a%4*8,a++}return r.create(o,a)}(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},"./node_modules/crypto-js/evpkdf.js":function(e,t,n){var o,a,r,i,s,l,c,d;e.exports=(d=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/sha1.js"),n("./node_modules/crypto-js/hmac.js"),r=(a=(o=d).lib).Base,i=a.WordArray,l=(s=o.algo).MD5,c=s.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:l,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,o=this.cfg,a=o.hasher.create(),r=i.create(),s=r.words,l=o.keySize,c=o.iterations;s.length<l;){n&&a.update(n),n=a.update(e).finalize(t),a.reset();for(var d=1;d<c;d++)n=a.finalize(n),a.reset();r.concat(n)}return r.sigBytes=4*l,r}}),o.EvpKDF=function(e,t,n){return c.create(n).compute(e,t)},d.EvpKDF)},"./node_modules/crypto-js/hmac.js":function(e,t,n){var o,a,r;e.exports=(a=(o=n("./node_modules/crypto-js/core.js")).lib.Base,r=o.enc.Utf8,void(o.algo.HMAC=a.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,o=4*n;t.sigBytes>o&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),i=this._iKey=t.clone(),s=a.words,l=i.words,c=0;c<n;c++)s[c]^=1549556828,l[c]^=909522486;a.sigBytes=i.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})))},"./node_modules/crypto-js/md5.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),function(e){var t=o,n=t.lib,a=n.WordArray,r=n.Hasher,i=t.algo,s=[];!function(){for(var t=0;t<64;t++)s[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=i.MD5=r.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var o=t+n,a=e[o];e[o]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var r=this._hash.words,i=e[t+0],l=e[t+1],m=e[t+2],f=e[t+3],p=e[t+4],g=e[t+5],v=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],E=e[t+10],S=e[t+11],k=e[t+12],_=e[t+13],N=e[t+14],C=e[t+15],B=r[0],A=r[1],x=r[2],V=r[3];B=c(B,A,x,V,i,7,s[0]),V=c(V,B,A,x,l,12,s[1]),x=c(x,V,B,A,m,17,s[2]),A=c(A,x,V,B,f,22,s[3]),B=c(B,A,x,V,p,7,s[4]),V=c(V,B,A,x,g,12,s[5]),x=c(x,V,B,A,v,17,s[6]),A=c(A,x,V,B,y,22,s[7]),B=c(B,A,x,V,b,7,s[8]),V=c(V,B,A,x,w,12,s[9]),x=c(x,V,B,A,E,17,s[10]),A=c(A,x,V,B,S,22,s[11]),B=c(B,A,x,V,k,7,s[12]),V=c(V,B,A,x,_,12,s[13]),x=c(x,V,B,A,N,17,s[14]),B=d(B,A=c(A,x,V,B,C,22,s[15]),x,V,l,5,s[16]),V=d(V,B,A,x,v,9,s[17]),x=d(x,V,B,A,S,14,s[18]),A=d(A,x,V,B,i,20,s[19]),B=d(B,A,x,V,g,5,s[20]),V=d(V,B,A,x,E,9,s[21]),x=d(x,V,B,A,C,14,s[22]),A=d(A,x,V,B,p,20,s[23]),B=d(B,A,x,V,w,5,s[24]),V=d(V,B,A,x,N,9,s[25]),x=d(x,V,B,A,f,14,s[26]),A=d(A,x,V,B,b,20,s[27]),B=d(B,A,x,V,_,5,s[28]),V=d(V,B,A,x,m,9,s[29]),x=d(x,V,B,A,y,14,s[30]),B=u(B,A=d(A,x,V,B,k,20,s[31]),x,V,g,4,s[32]),V=u(V,B,A,x,b,11,s[33]),x=u(x,V,B,A,S,16,s[34]),A=u(A,x,V,B,N,23,s[35]),B=u(B,A,x,V,l,4,s[36]),V=u(V,B,A,x,p,11,s[37]),x=u(x,V,B,A,y,16,s[38]),A=u(A,x,V,B,E,23,s[39]),B=u(B,A,x,V,_,4,s[40]),V=u(V,B,A,x,i,11,s[41]),x=u(x,V,B,A,f,16,s[42]),A=u(A,x,V,B,v,23,s[43]),B=u(B,A,x,V,w,4,s[44]),V=u(V,B,A,x,k,11,s[45]),x=u(x,V,B,A,C,16,s[46]),B=h(B,A=u(A,x,V,B,m,23,s[47]),x,V,i,6,s[48]),V=h(V,B,A,x,y,10,s[49]),x=h(x,V,B,A,N,15,s[50]),A=h(A,x,V,B,g,21,s[51]),B=h(B,A,x,V,k,6,s[52]),V=h(V,B,A,x,f,10,s[53]),x=h(x,V,B,A,E,15,s[54]),A=h(A,x,V,B,l,21,s[55]),B=h(B,A,x,V,b,6,s[56]),V=h(V,B,A,x,C,10,s[57]),x=h(x,V,B,A,v,15,s[58]),A=h(A,x,V,B,_,21,s[59]),B=h(B,A,x,V,p,6,s[60]),V=h(V,B,A,x,S,10,s[61]),x=h(x,V,B,A,m,15,s[62]),A=h(A,x,V,B,w,21,s[63]),r[0]=r[0]+B|0,r[1]=r[1]+A|0,r[2]=r[2]+x|0,r[3]=r[3]+V|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,a=8*t.sigBytes;n[a>>>5]|=128<<24-a%32;var r=e.floor(o/4294967296),i=o;n[15+(a+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n[14+(a+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,l=s.words,c=0;c<4;c++){var d=l[c];l[c]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return s},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,o,a,r,i){var s=e+(t&n|~t&o)+a+i;return(s<<r|s>>>32-r)+t}function d(e,t,n,o,a,r,i){var s=e+(t&o|n&~o)+a+i;return(s<<r|s>>>32-r)+t}function u(e,t,n,o,a,r,i){var s=e+(t^n^o)+a+i;return(s<<r|s>>>32-r)+t}function h(e,t,n,o,a,r,i){var s=e+(n^(t|~o))+a+i;return(s<<r|s>>>32-r)+t}t.MD5=r._createHelper(l),t.HmacMD5=r._createHmacHelper(l)}(Math),o.MD5)},"./node_modules/crypto-js/pbkdf2.js":function(e,t,n){var o,a,r,i,s,l,c,d,u;e.exports=(u=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/sha256.js"),n("./node_modules/crypto-js/hmac.js"),r=(a=(o=u).lib).Base,i=a.WordArray,l=(s=o.algo).SHA256,c=s.HMAC,d=s.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:l,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,o=c.create(n.hasher,e),a=i.create(),r=i.create([1]),s=a.words,l=r.words,d=n.keySize,u=n.iterations;s.length<d;){var h=o.update(t).finalize(r);o.reset();for(var m=h.words,f=m.length,p=h,g=1;g<u;g++){p=o.finalize(p),o.reset();for(var v=p.words,y=0;y<f;y++)m[y]^=v[y]}a.concat(h),l[0]++}return a.sigBytes=4*d,a}}),o.PBKDF2=function(e,t,n){return d.create(n).compute(e,t)},u.PBKDF2)},"./node_modules/crypto-js/rabbit.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.StreamCipher,n=e.algo,a=[],r=[],i=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var o=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,n=0;n<4;n++)l.call(this);for(n=0;n<8;n++)a[n]^=o[n+4&7];if(t){var r=t.words,i=r[0],s=r[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),d=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),u=c>>>16|4294901760&d,h=d<<16|65535&c;for(a[0]^=c,a[1]^=u,a[2]^=d,a[3]^=h,a[4]^=c,a[5]^=u,a[6]^=d,a[7]^=h,n=0;n<4;n++)l.call(this)}},_doProcessBlock:function(e,t){var n=this._X;l.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),e[t+o]^=a[o]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var o=e[n]+t[n],a=65535&o,s=o>>>16,l=((a*a>>>17)+a*s>>>15)+s*s,c=((4294901760&o)*o|0)+((65535&o)*o|0);i[n]=l^c}e[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,e[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,e[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,e[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,e[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,e[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,e[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,e[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}e.Rabbit=t._createHelper(s)}(),o.Rabbit)},"./node_modules/crypto-js/rc4.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib.StreamCipher,n=e.algo,a=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,o=this._S=[],a=0;a<256;a++)o[a]=a;a=0;for(var r=0;a<256;a++){var i=a%n,s=t[i>>>2]>>>24-i%4*8&255;r=(r+o[a]+s)%256;var l=o[a];o[a]=o[r],o[r]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:8,ivSize:0});function r(){for(var e=this._S,t=this._i,n=this._j,o=0,a=0;a<4;a++){n=(n+e[t=(t+1)%256])%256;var r=e[t];e[t]=e[n],e[n]=r,o|=e[(e[t]+e[n])%256]<<24-8*a}return this._i=t,this._j=n,o}e.RC4=t._createHelper(a);var i=n.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)r.call(this)}});e.RC4Drop=t._createHelper(i)}(),o.RC4)},"./node_modules/crypto-js/sha1.js":function(e,t,n){var o,a,r,i,s,l,c,d;e.exports=(a=(o=d=n("./node_modules/crypto-js/core.js")).lib,r=a.WordArray,i=a.Hasher,s=o.algo,l=[],c=s.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],a=n[1],r=n[2],i=n[3],s=n[4],c=0;c<80;c++){if(c<16)l[c]=0|e[t+c];else{var d=l[c-3]^l[c-8]^l[c-14]^l[c-16];l[c]=d<<1|d>>>31}var u=(o<<5|o>>>27)+s+l[c];u+=c<20?1518500249+(a&r|~a&i):c<40?1859775393+(a^r^i):c<60?(a&r|a&i|r&i)-1894007588:(a^r^i)-899497514,s=i,i=r,r=a<<30|a>>>2,a=o,o=u}n[0]=n[0]+o|0,n[1]=n[1]+a|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(o+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),o.SHA1=i._createHelper(c),o.HmacSHA1=i._createHmacHelper(c),d.SHA1)},"./node_modules/crypto-js/sha256.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),function(e){var t=o,n=t.lib,a=n.WordArray,r=n.Hasher,i=t.algo,s=[],l=[];!function(){function t(t){for(var n=e.sqrt(t),o=2;o<=n;o++)if(!(t%o))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var o=2,a=0;a<64;)t(o)&&(a<8&&(s[a]=n(e.pow(o,.5))),l[a]=n(e.pow(o,1/3)),a++),o++}();var c=[],d=i.SHA256=r.extend({_doReset:function(){this._hash=new a.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,o=n[0],a=n[1],r=n[2],i=n[3],s=n[4],d=n[5],u=n[6],h=n[7],m=0;m<64;m++){if(m<16)c[m]=0|e[t+m];else{var f=c[m-15],p=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=c[m-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[m]=p+c[m-7]+v+c[m-16]}var y=o&a^o&r^a&r,b=(o<<30|o>>>2)^(o<<19|o>>>13)^(o<<10|o>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&d^~s&u)+l[m]+c[m];h=u,u=d,d=s,s=i+w|0,i=r,r=a,a=o,o=w+(b+y)|0}n[0]=n[0]+o|0,n[1]=n[1]+a|0,n[2]=n[2]+r|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+d|0,n[6]=n[6]+u|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,o=8*this._nDataBytes,a=8*t.sigBytes;return n[a>>>5]|=128<<24-a%32,n[14+(a+64>>>9<<4)]=e.floor(o/4294967296),n[15+(a+64>>>9<<4)]=o,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=r._createHelper(d),t.HmacSHA256=r._createHmacHelper(d)}(Math),o.SHA256)},"./node_modules/crypto-js/tripledes.js":function(e,t,n){var o;e.exports=(o=n("./node_modules/crypto-js/core.js"),n("./node_modules/crypto-js/enc-base64.js"),n("./node_modules/crypto-js/md5.js"),n("./node_modules/crypto-js/evpkdf.js"),n("./node_modules/crypto-js/cipher-core.js"),function(){var e=o,t=e.lib,n=t.WordArray,a=t.BlockCipher,r=e.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=r.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var o=i[n]-1;t[n]=e[o>>>5]>>>31-o%32&1}for(var a=this._subKeys=[],r=0;r<16;r++){var c=a[r]=[],d=l[r];for(n=0;n<24;n++)c[n/6|0]|=t[(s[n]-1+d)%28]<<31-n%6,c[4+(n/6|0)]|=t[28+(s[n+24]-1+d)%28]<<31-n%6;for(c[0]=c[0]<<1|c[0]>>>31,n=1;n<7;n++)c[n]=c[n]>>>4*(n-1)+3;c[7]=c[7]<<5|c[7]>>>27}var u=this._invSubKeys=[];for(n=0;n<16;n++)u[n]=a[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),h.call(this,1,1431655765);for(var o=0;o<16;o++){for(var a=n[o],r=this._lBlock,i=this._rBlock,s=0,l=0;l<8;l++)s|=c[l][((i^a[l])&d[l])>>>0];this._lBlock=i,this._rBlock=r^s}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,h.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function m(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=a._createHelper(u);var f=r.TripleDES=a.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),o=e.length<4?e.slice(0,2):e.slice(2,4),a=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=u.createEncryptor(n.create(t)),this._des2=u.createEncryptor(n.create(o)),this._des3=u.createEncryptor(n.create(a))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=a._createHelper(f)}(),o.TripleDES)},"./node_modules/lz-string/libs/lz-string.js":(e,t,n)=>{var o,a=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function a(e,t){if(!o[e]){o[e]={};for(var n=0;n<e.length;n++)o[e][e.charAt(n)]=n}return o[e][t]}var r={compressToBase64:function(e){if(null==e)return"";var n=r._compress(e,6,function(e){return t.charAt(e)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:r._decompress(e.length,32,function(n){return a(t,e.charAt(n))})},compressToUTF16:function(t){return null==t?"":r._compress(t,15,function(t){return e(t+32)})+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:r._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=r.compress(e),n=new Uint8Array(2*t.length),o=0,a=t.length;o<a;o++){var i=t.charCodeAt(o);n[2*o]=i>>>8,n[2*o+1]=i%256}return n},decompressFromUint8Array:function(t){if(null==t)return r.decompress(t);for(var n=new Array(t.length/2),o=0,a=n.length;o<a;o++)n[o]=256*t[2*o]+t[2*o+1];var i=[];return n.forEach(function(t){i.push(e(t))}),r.decompress(i.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":r._compress(e,6,function(e){return n.charAt(e)})},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),r._decompress(e.length,32,function(t){return a(n,e.charAt(t))}))},compress:function(t){return r._compress(t,16,function(t){return e(t)})},_compress:function(e,t,n){if(null==e)return"";var o,a,r,i={},s={},l="",c="",d="",u=2,h=3,m=2,f=[],p=0,g=0;for(r=0;r<e.length;r+=1)if(l=e.charAt(r),Object.prototype.hasOwnProperty.call(i,l)||(i[l]=h++,s[l]=!0),c=d+l,Object.prototype.hasOwnProperty.call(i,c))d=c;else{if(Object.prototype.hasOwnProperty.call(s,d)){if(d.charCodeAt(0)<256){for(o=0;o<m;o++)p<<=1,g==t-1?(g=0,f.push(n(p)),p=0):g++;for(a=d.charCodeAt(0),o=0;o<8;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1}else{for(a=1,o=0;o<m;o++)p=p<<1|a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a=0;for(a=d.charCodeAt(0),o=0;o<16;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1}0==--u&&(u=Math.pow(2,m),m++),delete s[d]}else for(a=i[d],o=0;o<m;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1;0==--u&&(u=Math.pow(2,m),m++),i[c]=h++,d=String(l)}if(""!==d){if(Object.prototype.hasOwnProperty.call(s,d)){if(d.charCodeAt(0)<256){for(o=0;o<m;o++)p<<=1,g==t-1?(g=0,f.push(n(p)),p=0):g++;for(a=d.charCodeAt(0),o=0;o<8;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1}else{for(a=1,o=0;o<m;o++)p=p<<1|a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a=0;for(a=d.charCodeAt(0),o=0;o<16;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1}0==--u&&(u=Math.pow(2,m),m++),delete s[d]}else for(a=i[d],o=0;o<m;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1;0==--u&&(u=Math.pow(2,m),m++)}for(a=2,o=0;o<m;o++)p=p<<1|1&a,g==t-1?(g=0,f.push(n(p)),p=0):g++,a>>=1;for(;;){if(p<<=1,g==t-1){f.push(n(p));break}g++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:r._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,n,o){var a,r,i,s,l,c,d,u=[],h=4,m=4,f=3,p="",g=[],v={val:o(0),position:n,index:1};for(a=0;a<3;a+=1)u[a]=a;for(i=0,l=Math.pow(2,2),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;switch(i){case 0:for(i=0,l=Math.pow(2,8),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;d=e(i);break;case 1:for(i=0,l=Math.pow(2,16),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;d=e(i);break;case 2:return""}for(u[3]=d,r=d,g.push(d);;){if(v.index>t)return"";for(i=0,l=Math.pow(2,f),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;switch(d=i){case 0:for(i=0,l=Math.pow(2,8),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;u[m++]=e(i),d=m-1,h--;break;case 1:for(i=0,l=Math.pow(2,16),c=1;c!=l;)s=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=o(v.index++)),i|=(s>0?1:0)*c,c<<=1;u[m++]=e(i),d=m-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,f),f++),u[d])p=u[d];else{if(d!==m)return null;p=r+r.charAt(0)}g.push(p),u[m++]=r+p.charAt(0),r=p,0==--h&&(h=Math.pow(2,f),f++)}}};return r}();void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)},"?9157":()=>{}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var r=t[o]={exports:{}};return e[o].call(r.exports,r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{default:()=>e});const e=n("./src/SecureLS.js").SecureLS})(),o})(),e.exports=t()}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ActionBar:()=>G,AdminConfig:()=>p.AdminConfig,CategoryPlatform:()=>le,CategorySettings:()=>Yn,CmsModuleDropdown:()=>_,CopyPaste:()=>Nh,CopyToClipboard:()=>p.CopyToClipboard,Dashboard:()=>p.Dashboard,DownloadButton:()=>Zn,EditorHelper:()=>im,ErrorMessage:()=>um,Fetcher:()=>p.Fetcher,FileUploader:()=>fo,Form:()=>wa,FrontendModuleCreator:()=>Sa,GlobalSiteButton:()=>Ba,Homepage:()=>Kr,HtmlSlot:()=>Jr,ImageGallery:()=>si,InfoBox:()=>yi,InfoBoxes:()=>Ei,InfoPopup:()=>zr,IsJson:()=>p.IsJson,LanguageButton:()=>B,LanguageCopier:()=>Ti,LeftMenu:()=>p.LeftMenu,LeftMenuShowHide:()=>Ah,LeftNav:()=>Hi,Loader:()=>Jh,MapAPI:()=>hm,MenuSorter:()=>ns,Modal:()=>X,ModalBox:()=>ie,ModuleCreator:()=>xl,ModulePermission:()=>ac,PageManager:()=>sm,Pagination:()=>pc,PasteFromClipboard:()=>p.PasteFromClipboard,PlatformButton:()=>wc,SearchBar:()=>R,SiteButton:()=>_c,SiteCloner:()=>Rc,SitewiseCopier:()=>kd,SitewiseData:()=>Ed,Sorter:()=>Dd,SplitButton:()=>S,Storage:()=>p.Storage,TabularView:()=>mh,TimerButton:()=>Yh,TitleBar:()=>Vh,TitleCase:()=>p.TitleCase,Toast:()=>W,ToastBox:()=>em,TopNav:()=>$h,Utils:()=>p.Utils,VERSION:()=>mm,queryBuilder:()=>p.queryBuilder});var e=__webpack_require__(380);function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(e,t):void 0}}(e)||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 n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var o={class:"container-fluid border-bottom mb-2 pb-2"},a={class:"row"},r={class:"col"},i={class:"btn-toolbar justify-content-between",role:"toolbar","aria-label":"Toolbar with button groups"},s={class:"btn-group",role:"group"},l={class:"moduleTitle"},c={class:"input-group actionToolbar"},d=["href","title"],u={key:1},h=["href"],m={class:"row"},f={key:0,class:"col"},p=__webpack_require__(80);const g=new p.AdminConfig;var v={class:"dropdown"},y=["onClick"],b=__webpack_require__(602),w=__webpack_require__(262);const E=(0,w.A)(b.A,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",v,[(0,e.createElementVNode)("a",{class:(0,e.normalizeClass)("btn btn-secondary dropdown-toggle "+r.btnCss),href:"#",role:"button","data-bs-toggle":"dropdown","aria-expanded":"false",onClick:n[0]||(n[0]=function(e){return i.toggleMenu()})},(0,e.toDisplayString)(r.current.label),3),(0,e.createElementVNode)("ul",{class:"dropdown-menu shadow",style:(0,e.normalizeStyle)(r.display),ref:"dropdownMenu"},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.lists,function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{class:(0,e.normalizeClass)(i.isActive(t)),onClick:function(e){return i.setCurrent(n)}},(0,e.toDisplayString)(t.label),11,y)}),256))],4)])}]]),S=E,k={components:{"split-button":S},props:["dataModules","dataCurrentModule"],mounted:function(){},data:function(){return{modules:void 0===this.dataModules?[]:"string"==typeof this.dataModules?JSON.parse(this.dataModules):this.dataModules,selectedModule:void 0===this.dataCurrentModule?"":this.dataCurrentModule}},computed:{currentIndex:function(){if(this.allModules.length>0)for(var e=0;e<this.allModules.length;e++)if(this.allModules[e].controller_name.toLowerCase()==this.selectedModule.toLowerCase())return e;return 0},allModules:function(){var e=this.modules.child;return e.splice(0,0,{name:this.modules.name,controller_name:this.modules.controller_name}),e}},methods:{hasChild:function(){return 0==this.modules.parent_id&&this.allModules.length>1},parseData:function(e){return{label:e.name,value:e.controller_name}},onChange:function(e){var t=g.admin_path(e.value);window.location=t}}},_=(0,w.A)(k,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("split-button");return i.hasChild()?((0,e.openBlock)(),(0,e.createBlock)(s,{key:0,"data-options":i.allModules,onChange:i.onChange,"data-parser":i.parseData,"data-selected":i.currentIndex,"data-btn-css":"btn-success"},{default:(0,e.withCtx)(function(){return[(0,e.createTextVNode)((0,e.toDisplayString)(r.selectedModule),1)]}),_:1},8,["data-options","onChange","data-parser","data-selected"])):(0,e.createCommentVNode)("v-if",!0)}]]);function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const C={components:{"split-button":S},props:["dataLanguages","dataSelectedLanguage"],mounted:function(){},data:function(){return{languages:void 0===this.dataLanguages?null:JSON.parse(this.dataLanguages),currentLang:void 0===this.dataSelectedLanguage?1:parseInt(this.dataSelectedLanguage)}},computed:{currentIndex:function(){if(null!=this.languages)for(var e=0;e<this.languages.length;e++)if(this.languages[e].id==this.currentLang)return e;return 0}},methods:{hasLanguage:function(){return null!=this.languages&&this.languages.length>1},parseLang:function(e){return{label:e.name,value:e.id}},setLanguage:function(e){var t=g.admin_path("ajax/setLanguage/".concat(e.value));axios.get(t).then(function(e){window.location.reload()}).catch(function(e){console.log(e)})}}},B=(0,w.A)(C,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("split-button");return i.hasLanguage()?((0,e.openBlock)(),(0,e.createBlock)(s,{key:0,"data-options":o.dataLanguages,onChange:i.setLanguage,"data-parser":i.parseLang,"data-selected":i.currentIndex,"data-btn-css":"lang"},{default:(0,e.withCtx)(function(){return function(e){if(Array.isArray(e))return N(e)}(t=n[0]||(n[0]=[(0,e.createTextVNode)("English",-1)]))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}(t)||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.")}();var t}),_:1},8,["data-options","onChange","data-parser","data-selected"])):(0,e.createCommentVNode)("v-if",!0)}]]);var A=["action"],x={class:"row searchForm justify-content-end"},V={class:"col-auto space-between"},D={class:"form-group"},M=["value"],T={class:"col-auto space-between"},I=["value"],O={class:"col-auto space-between"},P=["type"],L={class:"col-auto space-between"},j={class:"input-group-btn"};const F={mounted:function(){this.init()},props:["dataSelectedParams","dataControllerName","dataFields","dataActionFields"],data:function(){return{searchParams:{q:"",f:"id",o:"="},actionUrl:g.admin_path(this.dataControllerName+"/search"),searchFields:this.dataFields&&"null"!=this.dataFields?JSON.parse(this.dataFields):[],operators:["=","!=",">","<",">=","<=","like%","%like%"],hasAction:!(!this.dataActionFields||"null"==this.dataActionFields)&&JSON.parse(this.dataActionFields).length>0,defaultSearchParams:{q:"",f:"id",o:"="},inputType:"text"}},methods:{searchNow:function(){var e;if(""==this.searchParams.q.trim())e=g.admin_path(this.dataControllerName);else{var t=encodeURI(JSON.stringify(this.searchParams)),n=-1==this.actionUrl.indexOf("?")?"?":"&";e=this.actionUrl+n+"q="+t}return window.location.href=e,!1},resetForm:function(){var e=g.admin_path(this.dataControllerName);window.location.href=e},getFieldName:function(e,t){return t=t||"label","string"==typeof e||null==e[t]?e:e[t]},changeInputText:function(){this.searchParams.f.endsWith("_date")||this.searchParams.f.endsWith("_at")?this.inputType="date":this.inputType="text"},init:function(){this.hasAction&&this.searchFields.pop(),this.searchParams=JSON.parse(this.dataSelectedParams),null==this.searchParams.f&&(this.searchParams=this.defaultSearchParams)}}},R=(0,w.A)(F,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("form",{action:r.actionUrl,method:"get",onSubmit:n[5]||(n[5]=(0,e.withModifiers)(function(){return i.searchNow&&i.searchNow.apply(i,arguments)},["prevent"])),class:"form-inline",role:"form"},[(0,e.createElementVNode)("div",x,[(0,e.createElementVNode)("div",V,[(0,e.createElementVNode)("div",D,[(0,e.withDirectives)((0,e.createElementVNode)("select",{name:"fields","onUpdate:modelValue":n[0]||(n[0]=function(e){return r.searchParams.f=e}),class:"form-select",onChange:n[1]||(n[1]=function(e){return i.changeInputText()})},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.searchFields,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:i.getFieldName(t,"key")},(0,e.toDisplayString)(i.getFieldName(t)),9,M)}),256))],544),[[e.vModelSelect,r.searchParams.f]])])]),(0,e.createElementVNode)("div",T,[(0,e.withDirectives)((0,e.createElementVNode)("select",{name:"fields","onUpdate:modelValue":n[2]||(n[2]=function(e){return r.searchParams.o=e}),class:"form-select"},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.operators,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t},(0,e.toDisplayString)(t),9,I)}),256))],512),[[e.vModelSelect,r.searchParams.o]])]),(0,e.createElementVNode)("div",O,[(0,e.withDirectives)((0,e.createElementVNode)("input",{type:r.inputType,"onUpdate:modelValue":n[3]||(n[3]=function(e){return r.searchParams.q=e}),class:"form-control",placeholder:"Search for..."},null,8,P),[[e.vModelDynamic,r.searchParams.q]])]),(0,e.createElementVNode)("div",L,[(0,e.createElementVNode)("span",j,[n[6]||(n[6]=(0,e.createElementVNode)("input",{type:"submit",name:"submit",value:"Search",class:"btn btn-success space-between btn-space"},null,-1)),(0,e.createElementVNode)("input",{type:"reset",name:"reset",onClick:n[4]||(n[4]=function(e){return i.resetForm()}),value:"Reset",class:"btn btn-outline-secondary btn-space"})])])])],40,A)}]]);var U=new function(e){return{all:e=e||new Map,on:function(t,n){var o=e.get(t);o?o.push(n):e.set(t,[n])},off:function(t,n){var o=e.get(t);o&&(n?o.splice(o.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var o=e.get(t);o&&o.slice().map(function(e){e(n)}),(o=e.get("*"))&&o.slice().map(function(e){e(t,n)})}}};function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function $(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,K(o.key),o)}}function q(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K(e){var t=function(e){if("object"!=H(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=H(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==H(t)?t:t+""}p.LeftMenu&&"function"==typeof p.LeftMenu.init&&p.LeftMenu.init(U);var W=function(){return q(function e(){$(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,o=arguments.length>3?arguments[3]:void 0;e.$root.$refs.globalToaster.show(t,n,o)}},{key:"hide",value:function(e){e.$root.$refs.globalToaster.hide()}}])}(),J=function(){return q(function e(){$(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.$root.$refs.globalLoader.show(t,n)}},{key:"hide",value:function(e){e.$root.$refs.globalLoader.hide()}}])}(),X=function(){return q(function e(){$(this,e)},null,[{key:"show",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;e.$root.$refs.globalModalBox.show(t,n,o,a)}},{key:"hide",value:function(e){e.$root.$refs.globalModalBox.hide()}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null!=e&&null!=t&&e.$refs[t].open(n)}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null!=e&&null!=t&&e.$refs[t].hide()}}])}();const Y={components:{"cms-module-dropdown":_,"language-button":B,"search-bar":R},mounted:function(){this.shouldShowSearchPanel()},props:["dataSelectedParams","dataControllerName","dataControllerTitle","dataFields","dataActionFields","dataLanguages","dataSelectedLanguage","dataMoreActions","dataShowAdd","dataHasLangMethod","dataCmsModules","dataShowSearch","dataShowBack","dataLayoutType"],computed:{backURL:function(){return g.admin_path(this.controllerName)},layoutIcon:function(){return"grid"===this.layoutType?"fa fa-th-list":"fa fa-table"},showAddButtonBasedOnAction:function(){return-1!==this.actionFields.indexOf("edit")}},data:function(){return{canAdd:!0,showSearchButton:!(void 0===this.dataShowSearch||""===this.dataShowSearch||"false"===this.dataShowSearch),showSearchPanel:!1,isActive:"btn btn-outline-secondary",searchAnim:"",moreActionButtons:void 0===this.dataMoreActions||""===this.dataMoreActions?[]:JSON.parse(this.dataMoreActions),showAdd:void 0===this.dataShowAdd||"true"===this.dataShowAdd,hasLangMethod:!(void 0===this.dataHasLangMethod||"false"===this.dataHasLangMethod),cmsModules:void 0===this.dataCmsModules||""===this.dataCmsModules?[]:JSON.parse(this.dataCmsModules),selectedParams:void 0===this.dataSelectedParams?"":this.dataSelectedParams,controllerName:void 0===this.dataControllerName?"":this.dataControllerName,controllerTitle:void 0===this.dataControllerTitle?"":this.dataControllerTitle,fields:void 0===this.dataFields||""===this.dataFields?[]:this.dataFields,actionFields:void 0===this.dataActionFields||""===this.dataActionFields?[]:this.dataActionFields,showBack:"true"===this.dataShowBack,layoutType:void 0===this.dataLayoutType||""===this.dataLayoutType?"table":this.dataLayoutType}},methods:{changeLayout:function(){if(W.show(this,"Please wait. Changing listing style for you...",5e3),this.layoutType="table"===this.layoutType?"grid":"table","URLSearchParams"in window){var e=new URLSearchParams(window.location.search);e.set("layout",this.layoutType),window.location.search=e.toString()}},getAction:function(e){return 0===e.indexOf("http")?e:g.admin_path(e)},maintainActiveSearch:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isActive=!0===this.showSearchPanel?"btn btn-success":"btn btn-outline-secondary",this.searchAnim=!0===this.showSearchPanel&&1==e?"animated flipInX":""},showHideSearch:function(){this.showSearchPanel=!this.showSearchPanel,this.maintainActiveSearch()},shouldShowSearchPanel:function(){""!==this.selectedParams&&(JSON.parse(this.selectedParams).q&&(this.showSearchPanel=!0),this.maintainActiveSearch(!1))},addNew:function(){if(""!==this.controllerName){var e=g.admin_path(this.controllerName);window.location.href=e+"/create"}},getButtonType:function(e){return e.as&&"button"!==e.as?e.as:"button"},getTitle:function(e){return"string"!=typeof(t=e)?"":t.replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,function(e){return e.toUpperCase()});var t}}},G=(0,w.A)(Y,[["render",function(n,p,g,v,y,b){var w=(0,e.resolveComponent)("language-button"),E=(0,e.resolveComponent)("search-bar");return(0,e.openBlock)(),(0,e.createElementBlock)("div",o,[(0,e.createElementVNode)("div",a,[(0,e.createElementVNode)("div",r,[(0,e.createElementVNode)("div",i,[(0,e.createElementVNode)("div",s,[(0,e.createElementVNode)("h4",l,(0,e.toDisplayString)(b.getTitle(y.controllerTitle)),1)]),(0,e.createElementVNode)("div",c,[y.hasLangMethod?((0,e.openBlock)(),(0,e.createBlock)(w,{key:0,"data-languages":g.dataLanguages,"data-selected-language":g.dataSelectedLanguage},{default:(0,e.withCtx)(function(){return t(p[3]||(p[3]=[(0,e.createTextVNode)("English",-1)]))}),_:1},8,["data-languages","data-selected-language"])):(0,e.createCommentVNode)("v-if",!0),y.showAdd&&b.showAddButtonBasedOnAction?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:1,title:"Add New",onClick:p[0]||(p[0]=function(){return b.addNew&&b.addNew.apply(b,arguments)}),type:"button",class:"btn btn-outline-secondary","aria-label":"Add New"},t(p[4]||(p[4]=[(0,e.createElementVNode)("i",{class:"fa fa-plus","aria-hidden":"true"},null,-1),(0,e.createTextVNode)(" Add New ",-1)])))):(0,e.createCommentVNode)("v-if",!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(y.moreActionButtons,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("a",{class:"btn btn-outline-secondary",href:b.getAction(t.action),title:t.label},[t.icon_css?((0,e.openBlock)(),(0,e.createElementBlock)("i",{key:0,class:(0,e.normalizeClass)(t.icon_css),"aria-hidden":"true"},null,2)):(0,e.createCommentVNode)("v-if",!0),"button"==b.getButtonType(t)?((0,e.openBlock)(),(0,e.createElementBlock)("span",u,(0,e.toDisplayString)(t.label),1)):(0,e.createCommentVNode)("v-if",!0)],8,d)}),256)),y.showSearchButton?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:2,title:"Search",onClick:p[1]||(p[1]=function(){return b.showHideSearch&&b.showHideSearch.apply(b,arguments)}),type:"button",class:(0,e.normalizeClass)(y.isActive),"aria-label":"Search"},t(p[5]||(p[5]=[(0,e.createElementVNode)("i",{class:"fa fa-search","aria-hidden":"true"},null,-1)])),2)):(0,e.createCommentVNode)("v-if",!0),y.fields.length>0?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:3,title:"Change Layout",onClick:p[2]||(p[2]=function(e){return b.changeLayout()}),type:"button",class:"btn btn-outline-secondary","aria-label":"Layout"},[(0,e.createElementVNode)("i",{class:(0,e.normalizeClass)(b.layoutIcon),"aria-hidden":"true"},null,2)])):(0,e.createCommentVNode)("v-if",!0),y.showBack?((0,e.openBlock)(),(0,e.createElementBlock)("a",{key:4,class:"btn btn-outline-secondary",href:b.backURL},"Back",8,h)):(0,e.createCommentVNode)("v-if",!0)])])])]),(0,e.createElementVNode)("div",m,[y.showSearchPanel?((0,e.openBlock)(),(0,e.createElementBlock)("div",f,[(0,e.createVNode)(E,{class:(0,e.normalizeClass)(y.searchAnim),"data-controller-name":y.controllerName,"data-selected-params":y.selectedParams,"data-fields":y.fields,"data-action-fields":y.actionFields},null,8,["class","data-controller-name","data-selected-params","data-fields","data-action-fields"])])):(0,e.createCommentVNode)("v-if",!0)])])}]]);function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Q={class:"row"},ee={class:"col-auto"},te=["value"],ne={class:"col-auto"},oe={class:"modal-content"},ae={class:"modal-title",style:{width:"100%"}};const re={emits:["onClose"],props:["dataShowModal","dataShowFooter","dataTitleCss","dataContentCss","dataFooterCss","dataModalCss","dataWidth"],mounted:function(){this.visible&&this.open()},data:function(){return{modelCss:"modal modal-lg fade show",titleCss:void 0===this.dataTitleCss?"":this.dataTitleCss,contentCss:void 0===this.dataContentCss?"":this.dataContentCss,footerCss:void 0===this.dataFooterCss?"":this.dataFooterCss,visible:void 0!==this.dataShowModal&&"true"===this.dataShowModal.toString(),style:"",toBeReturned:{},title:"Alert",content:"Modal Content",footerContent:"",backDropStyle:"display:none"}},computed:{showFooter:function(){return void 0!==this.dataShowFooter&&"true"===this.dataShowFooter.toString()||""!==this.footerContent},modalWidth:function(){return void 0!==this.dataWidth&&""!==this.dataWidth?"width:".concat(this.dataWidth):""}},methods:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.visible=!0,this.backDropStyle=this.style="display:block",this.modelCss="modal modal-lg fade show animated bounceInDown",this.toBeReturned=e},close:function(){this.visible=!1,this.modelCss="modal modal-lg animated bounceOutUp",this.backDropStyle="display:none","function"==typeof this.toBeReturned&&this.toBeReturned()},sendData:function(e){this.close(),this.$emit("onClose",e,this.toBeReturned)},show:function(e,t,n,o){"string"==typeof e?this.content=e:(e.title&&(this.title=e.title),e.content&&(this.content=e.content),e.footerContent&&(this.footerContent=e.footerContent)),this.open(n)},hide:function(){this.close()}}},ie=(0,w.A)(re,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)("div",{class:(0,e.normalizeClass)(r.modelCss),tabindex:"-1","aria-hidden":"true",style:(0,e.normalizeStyle)(r.style)},[(0,e.createElementVNode)("div",{class:(0,e.normalizeClass)("modal-dialog modal-dialog-centered modal-dialog-scrollable "+o.dataModalCss),style:(0,e.normalizeStyle)(i.modalWidth)},[(0,e.createElementVNode)("div",oe,[(0,e.createElementVNode)("div",{class:(0,e.normalizeClass)(r.titleCss+" modal-header")},[(0,e.createElementVNode)("h5",ae,[(0,e.renderSlot)(t.$slots,"title",{},function(){return[(0,e.createTextVNode)((0,e.toDisplayString)(r.title),1)]})]),(0,e.createElementVNode)("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close",onClick:n[0]||(n[0]=function(e){return i.sendData(0)})})],2),(0,e.createElementVNode)("div",{class:(0,e.normalizeClass)(r.contentCss+" modal-body")},[(0,e.renderSlot)(t.$slots,"content",{},function(){return[(0,e.createTextVNode)((0,e.toDisplayString)(r.content),1)]})],2),(0,e.withDirectives)((0,e.createElementVNode)("div",{class:(0,e.normalizeClass)(r.footerCss+" modal-footer")},[(0,e.renderSlot)(t.$slots,"footer",{},function(){return[(0,e.createTextVNode)((0,e.toDisplayString)(r.footerContent),1)]})],2),[[e.vShow,i.showFooter]])])],6)],6),(0,e.createElementVNode)("div",{class:"modal-backdrop fade show",style:(0,e.normalizeStyle)(r.backDropStyle)},null,4)],64)}]]),se={components:{"modal-box":ie},mounted:function(){this.verifyAction()},props:["dataPlatforms"],data:function(){return{modelCss:"modal",showHide:!0,platforms:this.dataPlatforms&&"null"!=this.dataPlatforms?JSON.parse(this.dataPlatforms):[],currentPlatform:"",currentTarget:null}},methods:{verifyAction:function(){var e=this;U.on("list-view-pre-edit",function(t){e.currentTarget=t,e.open()})},editNow:function(){var e=this.currentPlatform;if(""===e)return W.show(this,"Please select a platform"),!1;var t=this.currentTarget.getAttribute("data-rowid");window.location=g.admin_path("category/edit/".concat(t,"/").concat(e))},open:function(){this.platforms.length>1?this.$refs.platformbox.open():(this.currentPlatform=this.platforms[0].id,this.editNow())},close:function(){this.$refs.platformbox.close()},hideSpinner:function(){U.emit("list-view-hide-spinner",this)}}},le=(0,w.A)(se,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("modal-box");return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.createVNode)(s,{ref:"platformbox",onOnClose:i.hideSpinner},{title:(0,e.withCtx)(function(){return function(e){if(Array.isArray(e))return Z(e)}(t=n[3]||(n[3]=[(0,e.createTextVNode)(" Select Platform ",-1)]))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(t)||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.")}();var t}),content:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",Q,[(0,e.createElementVNode)("div",ee,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.currentPlatform=e}),class:"form-select select-medium",onChange:n[1]||(n[1]=function(e){return i.editNow()})},[n[4]||(n[4]=(0,e.createElementVNode)("option",{value:""},"Select a platform",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.platforms,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,te)}),256))],544),[[e.vModelSelect,r.currentPlatform]])]),(0,e.createElementVNode)("div",ne,[(0,e.createElementVNode)("button",{class:"btn btn-success btn-from-submit",type:"button",onClick:n[2]||(n[2]=function(e){return i.editNow()})}," Edit Now ")])])]}),_:1},8,["onOnClose"])])}]]);function ce(e){return function(e){if(Array.isArray(e))return de(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return de(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(e,t):void 0}}(e)||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 de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var ue={class:"row"},he={class:"col-auto"},me=["value"],fe={class:"col-auto"},pe=["value"],ge={class:"col-auto"},ve={title:"It will be inserted or deleted for all platforms if checks."},ye={key:0,class:"row mt-3"},be={class:"row mt-3"},we={class:"col-4"},Ee={class:"panel panel-success shadow border"},Se={class:"panel-heading p-4"},ke={key:0,class:"panel-body p-3",style:{"background-color":"#f3f3f3"}},_e=["value"],Ne={key:1,class:"panel-sub-heading",style:{padding:"4px"}},Ce={class:"input-group"},Be={ref:"droppableArea",class:"list-group category-items js_category",style:{"min-height":"200px"}},Ae=["data-cache-category","data-category-id","data-theme-id"],xe=["onUpdate:modelValue"],Ve={class:"text-danger"},De={class:"btn-toolbar pull-right toolbar-category",role:"toolbar"},Me={class:"btn-group"},Te={key:0,"aria-label":"Delete from this platform",class:"btn btn-default icon-btn js_delete",title:"Delete from this platform",type:"button"},Ie={key:1,"aria-label":"More Info",class:"btn btn-default js_info icon-btn",title:"More Info",type:"button"},Oe={class:"col-3"},Pe={class:"panel panel-info margin-top-20"},Le={key:0,class:"panel-sub-heading",style:{padding:"4px"}},je={class:"input-group"},Fe={id:"draggableItems",class:"list-group"},Re=["data-category-id"],Ue={ref:"popover",class:"popover hide bs-popover-end shadow","data-popper-placement":"right",role:"tooltip"},He={class:"popover-header"},$e={class:"popover-body"},ze=["value"],qe={class:"text-center"};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach(function(t){Xe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(){return Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ye.apply(this,arguments)}function Ge(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var Ze=Ge(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Qe=Ge(/Edge/i),et=Ge(/firefox/i),tt=Ge(/safari/i)&&!Ge(/chrome/i)&&!Ge(/android/i),nt=Ge(/iP(ad|od|hone)/i),ot=Ge(/chrome/i)&&Ge(/android/i),at={capture:!1,passive:!1};function rt(e,t,n){e.addEventListener(t,n,!Ze&&at)}function it(e,t,n){e.removeEventListener(t,n,!Ze&&at)}function st(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function lt(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ct(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&st(e,t):st(e,t))||o&&e===n)return e;if(e===n)break}while(e=lt(e))}return null}var dt,ut=/\s+/g;function ht(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(ut," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(ut," ")}}function mt(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function ft(e,t){var n="";if("string"==typeof e)n=e;else do{var o=mt(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function pt(e,t,n){if(e){var o=e.getElementsByTagName(t),a=0,r=o.length;if(n)for(;a<r;a++)n(o[a],a);return o}return[]}function gt(){return document.scrollingElement||document.documentElement}function vt(e,t,n,o,a){if(e.getBoundingClientRect||e===window){var r,i,s,l,c,d,u;if(e!==window&&e.parentNode&&e!==gt()?(i=(r=e.getBoundingClientRect()).top,s=r.left,l=r.bottom,c=r.right,d=r.height,u=r.width):(i=0,s=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!Ze))do{if(a&&a.getBoundingClientRect&&("none"!==mt(a,"transform")||n&&"static"!==mt(a,"position"))){var h=a.getBoundingClientRect();i-=h.top+parseInt(mt(a,"border-top-width")),s-=h.left+parseInt(mt(a,"border-left-width")),l=i+r.height,c=s+r.width;break}}while(a=a.parentNode);if(o&&e!==window){var m=ft(a||e),f=m&&m.a,p=m&&m.d;m&&(l=(i/=p)+(d/=p),c=(s/=f)+(u/=f))}return{top:i,left:s,bottom:l,right:c,width:u,height:d}}}function yt(e,t,n){for(var o=kt(e,!0),a=vt(e)[t];o;){var r=vt(o)[n];if(!("top"===n||"left"===n?a>=r:a<=r))return o;if(o===gt())break;o=kt(o,!1)}return!1}function bt(e,t,n,o){for(var a=0,r=0,i=e.children;r<i.length;){if("none"!==i[r].style.display&&i[r]!==Bn.ghost&&(o||i[r]!==Bn.dragged)&&ct(i[r],n.draggable,e,!1)){if(a===t)return i[r];a++}r++}return null}function wt(e,t){for(var n=e.lastElementChild;n&&(n===Bn.ghost||"none"===mt(n,"display")||t&&!st(n,t));)n=n.previousElementSibling;return n||null}function Et(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Bn.clone||t&&!st(e,t)||n++;return n}function St(e){var t=0,n=0,o=gt();if(e)do{var a=ft(e),r=a.a,i=a.d;t+=e.scrollLeft*r,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function kt(e,t){if(!e||!e.getBoundingClientRect)return gt();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=mt(n);if(n.clientWidth<n.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!n.getBoundingClientRect||n===document.body)return gt();if(o||t)return n;o=!0}}}while(n=n.parentNode);return gt()}function _t(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function Nt(e,t){return function(){if(!dt){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),dt=setTimeout(function(){dt=void 0},t)}}}function Ct(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Bt(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function At(e,t,n){var o={};return Array.from(e.children).forEach(function(a){var r,i,s,l;if(ct(a,t.draggable,e,!1)&&!a.animated&&a!==n){var c=vt(a);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(i=o.top)&&void 0!==i?i:1/0,c.top),o.right=Math.max(null!==(s=o.right)&&void 0!==s?s:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var xt="Sortable"+(new Date).getTime();var Vt=[],Dt={initializeByDefault:!0},Mt={mount:function(e){for(var t in Dt)Dt.hasOwnProperty(t)&&!(t in e)&&(e[t]=Dt[t]);Vt.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Vt.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var a=e+"Global";Vt.forEach(function(o){t[o.pluginName]&&(t[o.pluginName][a]&&t[o.pluginName][a](We({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](We({sortable:t},n)))})},initializePlugins:function(e,t,n,o){for(var a in Vt.forEach(function(o){var a=o.pluginName;if(e.options[a]||o.initializeByDefault){var r=new o(e,t,e.options);r.sortable=e,r.options=e.options,e[a]=r,Ye(n,r.defaults)}}),e.options)if(e.options.hasOwnProperty(a)){var r=this.modifyOption(e,a,e.options[a]);void 0!==r&&(e.options[a]=r)}},getEventProperties:function(e,t){var n={};return Vt.forEach(function(o){"function"==typeof o.eventProperties&&Ye(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return Vt.forEach(function(a){e[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[t]&&(o=a.optionListeners[t].call(e[a.pluginName],n))}),o}};var Tt=["evt"],It=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,a=function(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(n,Tt);Mt.pluginEvent.bind(Bn)(e,t,We({dragEl:Pt,parentEl:Lt,ghostEl:jt,rootEl:Ft,nextEl:Rt,lastDownEl:Ut,cloneEl:Ht,cloneHidden:$t,dragStarted:nn,putSortable:Xt,activeSortable:Bn.active,originalEvent:o,oldIndex:zt,oldDraggableIndex:Kt,newIndex:qt,newDraggableIndex:Wt,hideGhostForTarget:kn,unhideGhostForTarget:_n,cloneNowHidden:function(){$t=!0},cloneNowShown:function(){$t=!1},dispatchSortableEvent:function(e){Ot({sortable:t,name:e,originalEvent:o})}},a))};function Ot(e){!function(e){var t=e.sortable,n=e.rootEl,o=e.name,a=e.targetEl,r=e.cloneEl,i=e.toEl,s=e.fromEl,l=e.oldIndex,c=e.newIndex,d=e.oldDraggableIndex,u=e.newDraggableIndex,h=e.originalEvent,m=e.putSortable,f=e.extraEventProperties;if(t=t||n&&n[xt]){var p,g=t.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||Ze||Qe?(p=document.createEvent("Event")).initEvent(o,!0,!0):p=new CustomEvent(o,{bubbles:!0,cancelable:!0}),p.to=i||n,p.from=s||n,p.item=a||n,p.clone=r,p.oldIndex=l,p.newIndex=c,p.oldDraggableIndex=d,p.newDraggableIndex=u,p.originalEvent=h,p.pullMode=m?m.lastPutMode:void 0;var y=We(We({},f),Mt.getEventProperties(o,t));for(var b in y)p[b]=y[b];n&&n.dispatchEvent(p),g[v]&&g[v].call(t,p)}}(We({putSortable:Xt,cloneEl:Ht,targetEl:Pt,rootEl:Ft,oldIndex:zt,oldDraggableIndex:Kt,newIndex:qt,newDraggableIndex:Wt},e))}var Pt,Lt,jt,Ft,Rt,Ut,Ht,$t,zt,qt,Kt,Wt,Jt,Xt,Yt,Gt,Zt,Qt,en,tn,nn,on,an,rn,sn,ln=!1,cn=!1,dn=[],un=!1,hn=!1,mn=[],fn=!1,pn=[],gn="undefined"!=typeof document,vn=nt,yn=Qe||Ze?"cssFloat":"float",bn=gn&&!ot&&!nt&&"draggable"in document.createElement("div"),wn=function(){if(gn){if(Ze)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),En=function(e,t){var n=mt(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=bt(e,0,t),r=bt(e,1,t),i=a&&mt(a),s=r&&mt(r),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+vt(a).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+vt(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var d="left"===i.float?"left":"right";return!r||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=o&&"none"===n[yn]||r&&"none"===n[yn]&&l+c>o)?"vertical":"horizontal"},Sn=function(e){function t(e,n){return function(o,a,r,i){var s=o.options.group.name&&a.options.group.name&&o.options.group.name===a.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,a,r,i),n)(o,a,r,i);var l=(n?o:a).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==Je(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},kn=function(){!wn&&jt&&mt(jt,"display","none")},_n=function(){!wn&&jt&&mt(jt,"display","")};gn&&!ot&&document.addEventListener("click",function(e){if(cn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),cn=!1,!1},!0);var Nn=function(e){if(Pt){e=e.touches?e.touches[0]:e;var t=(a=e.clientX,r=e.clientY,dn.some(function(e){var t=e[xt].options.emptyInsertThreshold;if(t&&!wt(e)){var n=vt(e),o=a>=n.left-t&&a<=n.right+t,s=r>=n.top-t&&r<=n.bottom+t;return o&&s?i=e:void 0}}),i);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[xt]._onDragOver(n)}}var a,r,i},Cn=function(e){Pt&&Pt.parentNode[xt]._isOutsideThisEl(e.target)};function Bn(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Ye({},t),e[xt]=this;var n,o,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return En(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Bn.supportPointer&&"PointerEvent"in window&&(!tt||nt),emptyInsertThreshold:5};for(var r in Mt.initializePlugins(this,e,a),a)!(r in t)&&(t[r]=a[r]);for(var i in Sn(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&bn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?rt(e,"pointerdown",this._onTapStart):(rt(e,"mousedown",this._onTapStart),rt(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(rt(e,"dragover",this),rt(e,"dragenter",this)),dn.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ye(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==mt(e,"display")&&e!==Bn.ghost){o.push({target:e,rect:vt(e)});var t=We({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=ft(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}})},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var a=!1,r=0;o.forEach(function(e){var n=0,o=e.target,i=o.fromRect,s=vt(o),l=o.prevFromRect,c=o.prevToRect,d=e.rect,u=ft(o,!0);u&&(s.top-=u.f,s.left-=u.e),o.toRect=s,o.thisAnimationDuration&&_t(l,s)&&!_t(i,s)&&(d.top-s.top)/(d.left-s.left)===(i.top-s.top)/(i.left-s.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(d,l,c,t.options)),_t(s,i)||(o.prevFromRect=i,o.prevToRect=s,n||(n=t.options.animation),t.animate(o,d,s,n)),n&&(a=!0,r=Math.max(r,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout(function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null},n),o.thisAnimationDuration=n)}),clearTimeout(n),a?n=setTimeout(function(){"function"==typeof e&&e()},r):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){mt(e,"transition",""),mt(e,"transform","");var a=ft(this.el),r=a&&a.a,i=a&&a.d,s=(t.left-n.left)/(r||1),l=(t.top-n.top)/(i||1);e.animatingX=!!s,e.animatingY=!!l,mt(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),mt(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),mt(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){mt(e,"transition",""),mt(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},o)}}}))}function An(e,t,n,o,a,r,i,s){var l,c,d=e[xt],u=d.options.onMove;return!window.CustomEvent||Ze||Qe?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=o,l.related=a||t,l.relatedRect=r||vt(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),u&&(c=u.call(d,l,i)),c}function xn(e){e.draggable=!1}function Vn(){fn=!1}function Dn(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function Mn(e){return setTimeout(e,0)}function Tn(e){return clearTimeout(e)}Bn.prototype={constructor:Bn,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(on=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Pt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,a=o.preventOnFilter,r=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(i||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;if(function(e){pn.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&pn.push(o)}}(n),!Pt&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!tt||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=ct(s,o.draggable,n,!1))&&s.animated||Ut===s)){if(zt=Et(s),Kt=Et(s,o.draggable),"function"==typeof c){if(c.call(this,e,s,this))return Ot({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),It("filter",t,{evt:e}),void(a&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(o){if(o=ct(l,o.trim(),n,!1))return Ot({sortable:t,rootEl:o,name:"filter",targetEl:s,fromEl:n,toEl:n}),It("filter",t,{evt:e}),!0})))return void(a&&e.preventDefault());o.handle&&!ct(l,o.handle,n,!1)||this._prepareDragStart(e,i,s)}}},_prepareDragStart:function(e,t,n){var o,a=this,r=a.el,i=a.options,s=r.ownerDocument;if(n&&!Pt&&n.parentNode===r){var l=vt(n);if(Ft=r,Lt=(Pt=n).parentNode,Rt=Pt.nextSibling,Ut=n,Jt=i.group,Bn.dragged=Pt,Yt={target:Pt,clientX:(t||e).clientX,clientY:(t||e).clientY},en=Yt.clientX-l.left,tn=Yt.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Pt.style["will-change"]="all",o=function(){It("delayEnded",a,{evt:e}),Bn.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!et&&a.nativeDraggable&&(Pt.draggable=!0),a._triggerDragStart(e,t),Ot({sortable:a,name:"choose",originalEvent:e}),ht(Pt,i.chosenClass,!0))},i.ignore.split(",").forEach(function(e){pt(Pt,e.trim(),xn)}),rt(s,"dragover",Nn),rt(s,"mousemove",Nn),rt(s,"touchmove",Nn),i.supportPointer?(rt(s,"pointerup",a._onDrop),!this.nativeDraggable&&rt(s,"pointercancel",a._onDrop)):(rt(s,"mouseup",a._onDrop),rt(s,"touchend",a._onDrop),rt(s,"touchcancel",a._onDrop)),et&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Pt.draggable=!0),It("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(Qe||Ze))o();else{if(Bn.eventCanceled)return void this._onDrop();i.supportPointer?(rt(s,"pointerup",a._disableDelayedDrag),rt(s,"pointercancel",a._disableDelayedDrag)):(rt(s,"mouseup",a._disableDelayedDrag),rt(s,"touchend",a._disableDelayedDrag),rt(s,"touchcancel",a._disableDelayedDrag)),rt(s,"mousemove",a._delayedDragTouchMoveHandler),rt(s,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&rt(s,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(o,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Pt&&xn(Pt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;it(e,"mouseup",this._disableDelayedDrag),it(e,"touchend",this._disableDelayedDrag),it(e,"touchcancel",this._disableDelayedDrag),it(e,"pointerup",this._disableDelayedDrag),it(e,"pointercancel",this._disableDelayedDrag),it(e,"mousemove",this._delayedDragTouchMoveHandler),it(e,"touchmove",this._delayedDragTouchMoveHandler),it(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?rt(document,"pointermove",this._onTouchMove):rt(document,t?"touchmove":"mousemove",this._onTouchMove):(rt(Pt,"dragend",this),rt(Ft,"dragstart",this._onDragStart));try{document.selection?Mn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ln=!1,Ft&&Pt){It("dragStarted",this,{evt:t}),this.nativeDraggable&&rt(document,"dragover",Cn);var n=this.options;!e&&ht(Pt,n.dragClass,!1),ht(Pt,n.ghostClass,!0),Bn.active=this,e&&this._appendGhost(),Ot({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Gt){this._lastX=Gt.clientX,this._lastY=Gt.clientY,kn();for(var e=document.elementFromPoint(Gt.clientX,Gt.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Gt.clientX,Gt.clientY))!==t;)t=e;if(Pt.parentNode[xt]._isOutsideThisEl(e),t)do{if(t[xt]&&t[xt]._onDragOver({clientX:Gt.clientX,clientY:Gt.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=lt(t));_n()}},_onTouchMove:function(e){if(Yt){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,a=e.touches?e.touches[0]:e,r=jt&&ft(jt,!0),i=jt&&r&&r.a,s=jt&&r&&r.d,l=vn&&sn&&St(sn),c=(a.clientX-Yt.clientX+o.x)/(i||1)+(l?l[0]-mn[0]:0)/(i||1),d=(a.clientY-Yt.clientY+o.y)/(s||1)+(l?l[1]-mn[1]:0)/(s||1);if(!Bn.active&&!ln){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(jt){r?(r.e+=c-(Zt||0),r.f+=d-(Qt||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");mt(jt,"webkitTransform",u),mt(jt,"mozTransform",u),mt(jt,"msTransform",u),mt(jt,"transform",u),Zt=c,Qt=d,Gt=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!jt){var e=this.options.fallbackOnBody?document.body:Ft,t=vt(Pt,!0,vn,!0,e),n=this.options;if(vn){for(sn=e;"static"===mt(sn,"position")&&"none"===mt(sn,"transform")&&sn!==document;)sn=sn.parentNode;sn!==document.body&&sn!==document.documentElement?(sn===document&&(sn=gt()),t.top+=sn.scrollTop,t.left+=sn.scrollLeft):sn=gt(),mn=St(sn)}ht(jt=Pt.cloneNode(!0),n.ghostClass,!1),ht(jt,n.fallbackClass,!0),ht(jt,n.dragClass,!0),mt(jt,"transition",""),mt(jt,"transform",""),mt(jt,"box-sizing","border-box"),mt(jt,"margin",0),mt(jt,"top",t.top),mt(jt,"left",t.left),mt(jt,"width",t.width),mt(jt,"height",t.height),mt(jt,"opacity","0.8"),mt(jt,"position",vn?"absolute":"fixed"),mt(jt,"zIndex","100000"),mt(jt,"pointerEvents","none"),Bn.ghost=jt,e.appendChild(jt),mt(jt,"transform-origin",en/parseInt(jt.style.width)*100+"% "+tn/parseInt(jt.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,a=n.options;It("dragStart",this,{evt:e}),Bn.eventCanceled?this._onDrop():(It("setupClone",this),Bn.eventCanceled||((Ht=Bt(Pt)).removeAttribute("id"),Ht.draggable=!1,Ht.style["will-change"]="",this._hideClone(),ht(Ht,this.options.chosenClass,!1),Bn.clone=Ht),n.cloneId=Mn(function(){It("clone",n),Bn.eventCanceled||(n.options.removeCloneOnHide||Ft.insertBefore(Ht,Pt),n._hideClone(),Ot({sortable:n,name:"clone"}))}),!t&&ht(Pt,a.dragClass,!0),t?(cn=!0,n._loopId=setInterval(n._emulateDragOver,50)):(it(document,"mouseup",n._onDrop),it(document,"touchend",n._onDrop),it(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(n,o,Pt)),rt(document,"drop",n),mt(Pt,"transform","translateZ(0)")),ln=!0,n._dragStartId=Mn(n._dragStarted.bind(n,t,e)),rt(document,"selectstart",n),nn=!0,window.getSelection().removeAllRanges(),tt&&mt(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,a,r=this.el,i=e.target,s=this.options,l=s.group,c=Bn.active,d=Jt===l,u=s.sort,h=Xt||c,m=this,f=!1;if(!fn){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),i=ct(i,s.draggable,r,!0),x("dragOver"),Bn.eventCanceled)return f;if(Pt.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||m._ignoreWhileAnimating===i)return D(!1);if(cn=!1,c&&!s.disabled&&(d?u||(o=Lt!==Ft):Xt===this||(this.lastPutMode=Jt.checkPull(this,c,Pt,e))&&l.checkPut(this,c,Pt,e))){if(a="vertical"===this._getDirection(e,i),t=vt(Pt),x("dragOverValid"),Bn.eventCanceled)return f;if(o)return Lt=Ft,V(),this._hideClone(),x("revert"),Bn.eventCanceled||(Rt?Ft.insertBefore(Pt,Rt):Ft.appendChild(Pt)),D(!0);var p=wt(r,s.draggable);if(!p||function(e,t,n){var o=vt(wt(n.el,n.options.draggable)),a=At(n.el,n.options,jt);return t?e.clientX>a.right+10||e.clientY>o.bottom&&e.clientX>o.left:e.clientY>a.bottom+10||e.clientX>o.right&&e.clientY>o.top}(e,a,this)&&!p.animated){if(p===Pt)return D(!1);if(p&&r===e.target&&(i=p),i&&(n=vt(i)),!1!==An(Ft,r,Pt,t,i,n,e,!!i))return V(),p&&p.nextSibling?r.insertBefore(Pt,p.nextSibling):r.appendChild(Pt),Lt=r,M(),D(!0)}else if(p&&function(e,t,n){var o=vt(bt(n.el,0,n.options,!0)),a=At(n.el,n.options,jt);return t?e.clientX<a.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<a.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,a,this)){var g=bt(r,0,s,!0);if(g===Pt)return D(!1);if(n=vt(i=g),!1!==An(Ft,r,Pt,t,i,n,e,!1))return V(),r.insertBefore(Pt,g),Lt=r,M(),D(!0)}else if(i.parentNode===r){n=vt(i);var v,y,b,w=Pt.parentNode!==r,E=!function(e,t,n){var o=n?e.left:e.top,a=n?e.right:e.bottom,r=n?e.width:e.height,i=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return o===i||a===s||o+r/2===i+l/2}(Pt.animated&&Pt.toRect||t,i.animated&&i.toRect||n,a),S=a?"top":"left",k=yt(i,"top","top")||yt(Pt,"top","top"),_=k?k.scrollTop:void 0;if(on!==i&&(y=n[S],un=!1,hn=!E&&s.invertSwap||w),v=function(e,t,n,o,a,r,i,s){var l=o?e.clientY:e.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!i)if(s&&rn<c*a){if(!un&&(1===an?l>d+c*r/2:l<u-c*r/2)&&(un=!0),un)h=!0;else if(1===an?l<d+rn:l>u-rn)return-an}else if(l>d+c*(1-a)/2&&l<u-c*(1-a)/2)return function(e){return Et(Pt)<Et(e)?1:-1}(t);return(h=h||i)&&(l<d+c*r/2||l>u-c*r/2)?l>d+c/2?1:-1:0}(e,i,n,a,E?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,hn,on===i),0!==v){var N=Et(Pt);do{N-=v,b=Lt.children[N]}while(b&&("none"===mt(b,"display")||b===jt))}if(0===v||b===i)return D(!1);on=i,an=v;var C=i.nextElementSibling,B=!1,A=An(Ft,r,Pt,t,i,n,e,B=1===v);if(!1!==A)return 1!==A&&-1!==A||(B=1===A),fn=!0,setTimeout(Vn,30),V(),B&&!C?r.appendChild(Pt):i.parentNode.insertBefore(Pt,B?C:i),k&&Ct(k,0,_-k.scrollTop),Lt=Pt.parentNode,void 0===y||hn||(rn=Math.abs(y-vt(i)[S])),M(),D(!0)}if(r.contains(Pt))return D(!1)}return!1}function x(s,l){It(s,m,We({evt:e,isOwner:d,axis:a?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:u,fromSortable:h,target:i,completed:D,onMove:function(n,o){return An(Ft,r,Pt,t,n,vt(n),e,o)},changed:M},l))}function V(){x("dragOverAnimationCapture"),m.captureAnimationState(),m!==h&&h.captureAnimationState()}function D(t){return x("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(m),m!==h&&(ht(Pt,Xt?Xt.options.ghostClass:c.options.ghostClass,!1),ht(Pt,s.ghostClass,!0)),Xt!==m&&m!==Bn.active?Xt=m:m===Bn.active&&Xt&&(Xt=null),h===m&&(m._ignoreWhileAnimating=i),m.animateAll(function(){x("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===Pt&&!Pt.animated||i===r&&!i.animated)&&(on=null),s.dragoverBubble||e.rootEl||i===document||(Pt.parentNode[xt]._isOutsideThisEl(e.target),!t&&Nn(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),f=!0}function M(){qt=Et(Pt),Wt=Et(Pt,s.draggable),Ot({sortable:m,name:"change",toEl:r,newIndex:qt,newDraggableIndex:Wt,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){it(document,"mousemove",this._onTouchMove),it(document,"touchmove",this._onTouchMove),it(document,"pointermove",this._onTouchMove),it(document,"dragover",Nn),it(document,"mousemove",Nn),it(document,"touchmove",Nn)},_offUpEvents:function(){var e=this.el.ownerDocument;it(e,"mouseup",this._onDrop),it(e,"touchend",this._onDrop),it(e,"pointerup",this._onDrop),it(e,"pointercancel",this._onDrop),it(e,"touchcancel",this._onDrop),it(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;qt=Et(Pt),Wt=Et(Pt,n.draggable),It("drop",this,{evt:e}),Lt=Pt&&Pt.parentNode,qt=Et(Pt),Wt=Et(Pt,n.draggable),Bn.eventCanceled||(ln=!1,hn=!1,un=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Tn(this.cloneId),Tn(this._dragStartId),this.nativeDraggable&&(it(document,"drop",this),it(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),tt&&mt(document.body,"user-select",""),mt(Pt,"transform",""),e&&(nn&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),jt&&jt.parentNode&&jt.parentNode.removeChild(jt),(Ft===Lt||Xt&&"clone"!==Xt.lastPutMode)&&Ht&&Ht.parentNode&&Ht.parentNode.removeChild(Ht),Pt&&(this.nativeDraggable&&it(Pt,"dragend",this),xn(Pt),Pt.style["will-change"]="",nn&&!ln&&ht(Pt,Xt?Xt.options.ghostClass:this.options.ghostClass,!1),ht(Pt,this.options.chosenClass,!1),Ot({sortable:this,name:"unchoose",toEl:Lt,newIndex:null,newDraggableIndex:null,originalEvent:e}),Ft!==Lt?(qt>=0&&(Ot({rootEl:Lt,name:"add",toEl:Lt,fromEl:Ft,originalEvent:e}),Ot({sortable:this,name:"remove",toEl:Lt,originalEvent:e}),Ot({rootEl:Lt,name:"sort",toEl:Lt,fromEl:Ft,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:Lt,originalEvent:e})),Xt&&Xt.save()):qt!==zt&&qt>=0&&(Ot({sortable:this,name:"update",toEl:Lt,originalEvent:e}),Ot({sortable:this,name:"sort",toEl:Lt,originalEvent:e})),Bn.active&&(null!=qt&&-1!==qt||(qt=zt,Wt=Kt),Ot({sortable:this,name:"end",toEl:Lt,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){It("nulling",this),Ft=Pt=Lt=jt=Rt=Ht=Ut=$t=Yt=Gt=nn=qt=Wt=zt=Kt=on=an=Xt=Jt=Bn.dragged=Bn.ghost=Bn.clone=Bn.active=null,pn.forEach(function(e){e.checked=!0}),pn.length=Zt=Qt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Pt&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,a=n.length,r=this.options;o<a;o++)ct(e=n[o],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||Dn(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(e,t){var a=o.children[t];ct(a,this.options.draggable,o,!1)&&(n[e]=a)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ct(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=Mt.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&Sn(n)},destroy:function(){It("destroy",this);var e=this.el;e[xt]=null,it(e,"mousedown",this._onTapStart),it(e,"touchstart",this._onTapStart),it(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(it(e,"dragover",this),it(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),dn.splice(dn.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!$t){if(It("hideClone",this),Bn.eventCanceled)return;mt(Ht,"display","none"),this.options.removeCloneOnHide&&Ht.parentNode&&Ht.parentNode.removeChild(Ht),$t=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if($t){if(It("showClone",this),Bn.eventCanceled)return;Pt.parentNode!=Ft||this.options.group.revertClone?Rt?Ft.insertBefore(Ht,Rt):Ft.appendChild(Ht):Ft.insertBefore(Ht,Pt),this.options.group.revertClone&&this.animate(Pt,Ht),mt(Ht,"display",""),$t=!1}}else this._hideClone()}},gn&&rt(document,"touchmove",function(e){(Bn.active||ln)&&e.cancelable&&e.preventDefault()}),Bn.utils={on:rt,off:it,css:mt,find:pt,is:function(e,t){return!!ct(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:Nt,closest:ct,toggleClass:ht,clone:Bt,index:Et,nextTick:Mn,cancelNextTick:Tn,detectDirection:En,getChild:bt,expando:xt},Bn.get=function(e){return e[xt]},Bn.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Bn.utils=We(We({},Bn.utils),e.utils)),Mt.mount(e)})},Bn.create=function(e,t){return new Bn(e,t)},Bn.version="1.15.6";var In,On,Pn,Ln,jn,Fn,Rn=[],Un=!1;function Hn(){Rn.forEach(function(e){clearInterval(e.pid)}),Rn=[]}function $n(){clearInterval(Fn)}var zn=Nt(function(e,t,n,o){if(t.scroll){var a,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=gt(),d=!1;On!==n&&(On=n,Hn(),In=t.scroll,a=t.scrollFn,!0===In&&(In=kt(n,!0)));var u=0,h=In;do{var m=h,f=vt(m),p=f.top,g=f.bottom,v=f.left,y=f.right,b=f.width,w=f.height,E=void 0,S=void 0,k=m.scrollWidth,_=m.scrollHeight,N=mt(m),C=m.scrollLeft,B=m.scrollTop;m===c?(E=b<k&&("auto"===N.overflowX||"scroll"===N.overflowX||"visible"===N.overflowX),S=w<_&&("auto"===N.overflowY||"scroll"===N.overflowY||"visible"===N.overflowY)):(E=b<k&&("auto"===N.overflowX||"scroll"===N.overflowX),S=w<_&&("auto"===N.overflowY||"scroll"===N.overflowY));var A=E&&(Math.abs(y-r)<=s&&C+b<k)-(Math.abs(v-r)<=s&&!!C),x=S&&(Math.abs(g-i)<=s&&B+w<_)-(Math.abs(p-i)<=s&&!!B);if(!Rn[u])for(var V=0;V<=u;V++)Rn[V]||(Rn[V]={});Rn[u].vx==A&&Rn[u].vy==x&&Rn[u].el===m||(Rn[u].el=m,Rn[u].vx=A,Rn[u].vy=x,clearInterval(Rn[u].pid),0==A&&0==x||(d=!0,Rn[u].pid=setInterval(function(){o&&0===this.layer&&Bn.active._onTouchMove(jn);var t=Rn[this.layer].vy?Rn[this.layer].vy*l:0,n=Rn[this.layer].vx?Rn[this.layer].vx*l:0;"function"==typeof a&&"continue"!==a.call(Bn.dragged.parentNode[xt],n,t,e,jn,Rn[this.layer].el)||Ct(Rn[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=kt(h,!1)));Un=d}},30),qn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,a=e.activeSortable,r=e.dispatchSortableEvent,i=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||a;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Kn(){}function Wn(){}Kn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=bt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:qn},Ye(Kn,{pluginName:"revertOnSpill"}),Wn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:qn},Ye(Wn,{pluginName:"removeOnSpill"}),Bn.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?rt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?rt(document,"pointermove",this._handleFallbackAutoScroll):t.touches?rt(document,"touchmove",this._handleFallbackAutoScroll):rt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?it(document,"dragover",this._handleAutoScroll):(it(document,"pointermove",this._handleFallbackAutoScroll),it(document,"touchmove",this._handleFallbackAutoScroll),it(document,"mousemove",this._handleFallbackAutoScroll)),$n(),Hn(),clearTimeout(dt),dt=void 0},nulling:function(){jn=On=In=Un=Fn=Pn=Ln=null,Rn.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,a);if(jn=e,t||this.options.forceAutoScrollFallback||Qe||Ze||tt){zn(e,this.options,r,t);var i=kt(r,!0);!Un||Fn&&o===Pn&&a===Ln||(Fn&&$n(),Fn=setInterval(function(){var r=kt(document.elementFromPoint(o,a),!0);r!==i&&(i=r,Hn()),zn(e,n.options,r,t)},10),Pn=o,Ln=a)}else{if(!this.options.bubbleScroll||kt(r,!0)===gt())return void Hn();zn(e,this.options,kt(r,!1),!1)}}},Ye(e,{pluginName:"scroll",initializeByDefault:!0})}),Bn.mount(Wn,Kn);const Jn=Bn,Xn={mounted:function(){this.init()},props:["dataSiteId","dataSitePlatforms","dataSiteCategories","dataSiteThemes","dataSiteMicrosites","dataPlatformId","dataMicrositeId","dataCategories","dataUserRights"],data:function(){return{checkAll:!1,showCheckbox:!1,sitePlatforms:void 0===this.dataSitePlatforms||""===this.dataSitePlatforms?[]:JSON.parse(this.dataSitePlatforms),siteCategories:void 0===this.dataSiteCategories||""===this.dataSiteCategories?[]:JSON.parse(this.dataSiteCategories),siteThemes:void 0===this.dataSiteThemes||""===this.dataSiteThemes?[]:JSON.parse(this.dataSiteThemes),siteMicrosites:void 0===this.dataSiteMicrosites||""===this.dataSiteMicrosites?[]:JSON.parse(this.dataSiteMicrosites),categories:void 0===this.dataCategories||""===this.dataCategories?[]:JSON.parse(this.dataCategories),platformId:void 0===this.dataPlatformId||""===this.dataPlatformId?1:parseInt(this.dataPlatformId),micrositeId:void 0===this.dataMicrositeId||""===this.dataMicrositeId?0:parseInt(this.dataMicrositeId),searchKeyPlatformCategory:"",searchKeyCategory:"",applicableForAllPlatforms:!1,categoryId:0,currentSelection:{category_id:0,theme_id:"",cache_category:""},allCategories:[],allCategoriesInfo:{},allSiteCategories:[],siteId:void 0===this.dataSiteId?1:parseInt(this.dataSiteId),showUpdateAllBtn:!0,showUpdateAllDiv:!1,globalTheme:"",userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[]}},computed:{hasPlatformsMoreThanOne:function(){return this.sitePlatforms.length>1},hasMicrosites:function(){return this.siteMicrosites.length>0},canEdit:function(){return this.userRights.indexOf("edit")>=0},canDelete:function(){return this.userRights.indexOf("delete")>=0}},methods:{init:function(){this.makeData(),this.canEdit&&this.enableSorting()},selectAllData:function(){var e=arguments.length>1?arguments[1]:void 0,t=this,n="allCategories"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories")?this.allCategories:this.allSiteCategories,o=e.checked;n.forEach(function(e){t.$set(e,"selected",o)})},makeData:function(){var e=this,t=this.categories,n=!1;t.length>0&&t.forEach(function(t){var o=t.category_id,a={category_id:o,category_name:t.lang.name||t.category_name,theme_id:t.theme_id,cache_category:t.cache_category,selected:n};e.allCategories.push(a),e.allCategoriesInfo[o.toString()]=a}),(t=this.siteCategories).length>0&&t.forEach(function(t){var o={category_id:t.category_id,category_name:t.name,theme_id:"",cache_category:"",selected:n};e.allSiteCategories.push(o)})},getWhere:function(){return{microsite_id:this.micrositeId,platform_id:this.platformId,category_id:this.categoryId,site_id:this.siteId}},saveNow:function(e,t){return new Promise(function(n,o){axios.post(e,t).then(function(e){n(e)}).catch(function(e){o(e.response)})})},updateIndex:function(){for(var e=this,t=document.querySelectorAll(".js_category li"),n=this.platformId,o=[],a=0;a<t.length;a++){var r=t[a],i={position:a+1},s={category_id:this.getCategoryInfo(r.getAttribute("data-category-id"),"allCategories").category_id,platform_id:n};o.push({where:s,data:i})}if(o.length>0){var l=g.admin_path("category/updateIndex"),c={};c.data=o,this.saveNow(l,c).then(function(t){W.show(e,"Saved...")}).catch(function(t){W.show(e,t.data.message,2e3)})}},showSearch:function(){return("allCategories"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories")?this.allCategories:this.allSiteCategories).length>10},filterData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"allCategories",t="allCategories"===e?this.searchKeyPlatformCategory:this.searchKeyCategory,n="allCategories"===e?this.allCategories:this.allSiteCategories;return""!==t&&null!=t?(t=t.toLowerCase(),n.filter(function(e){var n=e.category_name.toLowerCase();if(e.category_id.toString()===t.toString()||n.includes(t))return e})):"allCategories"===e?this.allCategories:this.allSiteCategories},setCurrentSelection:function(e){var t=e.currentTarget,n=e.target,o=t.getAttribute("data-category-id"),a=t.getAttribute("data-theme-id"),r=this.getCategoryInfo(o,"allCategories");this.currentSelection.theme_id=a,this.currentSelection.category_id=o,this.currentSelection.cache_category=r.cache_category,n.classList.contains("js_info")&&function(e,t){var n,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"center-right";(n=t.classList).remove.apply(n,["animated","fadeOut","hide"]);var r=t,i=e.getBoundingClientRect(),s=r.getBoundingClientRect(),l=i.left+i.width,c=i.top+i.height-s.height/2;"center-right"===((o=t.classList).add.apply(o,["animated","jello"]),a)&&(r.style.position="absolute",r.style.left=l+"px",r.style.top=c+"px")}(t,this.$refs.popover),n.classList.contains("js_delete")},closePopup:function(){var e;(e=this.$refs.popover.classList).add.apply(e,["animated","fadeOut","hide"]),setTimeout(function(){})},fetchNewData:function(){var e=this.getWhere();delete e.category_id,0===e.microsite_id&&delete e.microsite_id,window.location.href=g.admin_path("category/settings",e)},enableSorting:function(){var e=this;this.$nextTick(function(){document.querySelectorAll(".js_category").forEach(function(t){Jn.create(t,{animation:200,filter:".js_delete",group:{name:"droppable",put:"modulesBox"},onFilter:function(t){var n=t.item,o=t.target,a=n.getAttribute("data-category-id");Jn.utils.is(o,".js_delete")&&e.removeCategory(a)},onUpdate:function(t){e.updateIndex()}})})});var t=document.getElementById("draggableItems");Jn.create(t,{animation:200,draggable:".js_item",group:{name:"modulesBox",pull:"clone",revertClone:!0},sort:!1,ghostClass:".js_category",onEnd:function(t){t.to;var n=t.item,o=n.getAttribute("data-category-id");if(o){var a,r=e.getCategoryInfo(o,"allSiteCategories");null!==r&&(a=e.addCategory(r)),n.parentNode.removeChild(n),e.highlightEagerDrop("remove"),!1===a&&W.show(e,"Category is already added in this platform...")}},onStart:function(t){e.highlightEagerDrop("add")}})},highlightEagerDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";document.querySelectorAll(".js_category").forEach(function(t){t.classList[e]("module-drop-eager")})},getCategoryInfo:function(e){for(var t=null,n="allSiteCategories"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"allSiteCategories")?this.allSiteCategories:this.allCategories,o=0;o<n.length;o++){var a=n[o];if(parseInt(a.category_id)===parseInt(e)){t=a;break}}return t},findIndex:function(e){var t=-1,n="allCategories"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"allCategories")?this.allCategories:this.allSiteCategories;if(n.length>0)for(var o=0;o<n.length;o++){var a=n[o];if(parseInt(a.category_id)===parseInt(e)){t=o;break}}return t},addCategory:function(e){var t=this,n=this.findIndex(e.category_id),o=!1;return-1===n&&(this.allCategoriesInfo[e.category_id.toString()]={index:n,info:e},setTimeout(function(){var n,o,a;n=g.admin_path("category/insertCategory"),o=t.getWhere(),a={},delete e.name,e.platform_id=o.platform_id,a.data={category_id:e.category_id,platform_id:o.platform_id,site_id:o.site_id},a.applicableForAllPlatforms=t.applicableForAllPlatforms,t.saveNow(n,a).then(function(e){W.show(t,"Saved...")}).catch(function(e){W.show(t,e.data.message,2e3)})},1),o=this.allCategories.push(e)),o},setThemeEtc:function(){var e=this,t=this.currentSelection,n=this.findIndex(t.category_id);if(-1!==n){this.allCategories[n].theme_id=t.theme_id,this.allCategories[n].cache_category=t.cache_category,this.categoryId=parseInt(t.category_id);var o={};o.where=this.getWhere(),o.data={cache_category:t.cache_category||"",theme_id:t.theme_id},o.applicableForAllPlatforms=e.applicableForAllPlatforms;var a=g.admin_path("category/updateThemeAndEtc");this.saveNow(a,o).then(function(t){W.show(e,"Saved...")}).catch(function(t){W.show(e,t.data.message,2e3)})}this.closePopup()},removeCategory:function(e){var t=this,n=this.findIndex(e);if(-1!==n){var o=this.allCategories.splice(n,1);return function(e){var n=g.admin_path("category/deleteCategory"),o={},a=t.getWhere();o.where={category_id:e.category_id,microsite_id:a.microsite_id},t.applicableForAllPlatforms||(o.where.platform_id=a.platform_id),t.saveNow(n,o).then(function(e){W.show(t,"Saved...")}).catch(function(e){W.show(t,e.data.message,2e3)})}(o[0]),o}},getThemeName:function(e){for(var t=0;t<this.siteThemes.length;t++)if(this.siteThemes[t].id==e)return this.siteThemes[t].name;return""},updateThemeToAllCategories:function(){var e=this,t=g.admin_path("category/updateThemeForAllCategories"),n=this.filterData("allCategories");if(""!==this.globalTheme&&n.length>0){var o=this.getWhere();delete o.category_id,delete o.microsite_id;var a={data:{theme_id:this.globalTheme},where:o};W.show(e,"Please wait..."),this.saveNow(t,a).then(function(t){if(t.data.error)W.show(e,t.data.message,5e3);else{W.show(e,"Saved");for(var o=0;o<n.length;o++)n[o].theme_id=e.globalTheme}}).catch(function(t){W.show(e,t.data.message,2e3)})}}}},Yn=(0,w.A)(Xn,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.withDirectives)((0,e.createElementVNode)("div",ue,[(0,e.withDirectives)((0,e.createElementVNode)("div",he,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.micrositeId=e}),class:"form-select select",onChange:n[1]||(n[1]=function(e){return i.fetchNewData()})},[n[16]||(n[16]=(0,e.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.siteMicrosites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,me)}),256))],544),[[e.vModelSelect,r.micrositeId]])],512),[[e.vShow,i.hasMicrosites]]),(0,e.createElementVNode)("div",fe,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return r.platformId=e}),class:"form-select select",onChange:n[3]||(n[3]=function(e){return i.fetchNewData()})},[n[17]||(n[17]=(0,e.createElementVNode)("option",null,"Select a Platform",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.sitePlatforms,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,pe)}),256))],544),[[e.vShow,i.hasPlatformsMoreThanOne],[e.vModelSelect,r.platformId]])]),(0,e.createElementVNode)("div",ge,[(0,e.withDirectives)((0,e.createElementVNode)("label",ve,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return r.applicableForAllPlatforms=e}),name:"applicableForAll",type:"checkbox"},null,512),[[e.vModelCheckbox,r.applicableForAllPlatforms]]),n[18]||(n[18]=(0,e.createTextVNode)(" Enable add/delete for all platforms",-1))],512),[[e.vShow,i.hasPlatformsMoreThanOne]])])],512),[[e.vShow,i.hasMicrosites||i.hasPlatformsMoreThanOne||i.hasPlatformsMoreThanOne]]),i.canEdit?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("div",ye,ce(n[19]||(n[19]=[(0,e.createElementVNode)("div",{class:"col-auto"},[(0,e.createElementVNode)("p",{class:"alert alert-warning"},"You have read only access.")],-1)])))),(0,e.createElementVNode)("div",be,[(0,e.createElementVNode)("div",we,[(0,e.createElementVNode)("div",Ee,[(0,e.createElementVNode)("div",Se,[(0,e.createElementVNode)("input",{class:"hide",type:"checkbox",onClick:n[5]||(n[5]=function(e){return i.selectAllData("allCategories",e.target)})}),n[21]||(n[21]=(0,e.createTextVNode)(" Drop in below panel to enable the category for this site. ",-1)),r.showUpdateAllBtn?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,"aria-label":"More Info",class:"btn btn-default js_info icon-btn pull-right",style:{top:"-7px",position:"relative",right:"-9px"},title:"Update in all categories",type:"button",onClick:n[6]||(n[6]=function(e){return r.showUpdateAllDiv=!r.showUpdateAllDiv})},ce(n[20]||(n[20]=[(0,e.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-ellipsis-v js_info"},null,-1)])))):(0,e.createCommentVNode)("v-if",!0)]),r.showUpdateAllDiv?((0,e.openBlock)(),(0,e.createElementBlock)("div",ke,[n[23]||(n[23]=(0,e.createElementVNode)("p",{class:"text-danger"}," Be careful while using this. Changing this dropdown will effect to all categories. ",-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return r.globalTheme=e}),class:"form-select margin-bottom-05",onChange:n[8]||(n[8]=function(e){return i.updateThemeToAllCategories()})},[n[22]||(n[22]=(0,e.createElementVNode)("option",{value:""},"Select a Theme",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.siteThemes,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,_e)}),256))],544),[[e.vModelSelect,r.globalTheme]])])):(0,e.createCommentVNode)("v-if",!0),i.showSearch("allCategories")?((0,e.openBlock)(),(0,e.createElementBlock)("div",Ne,[(0,e.createElementVNode)("div",Ce,[n[24]||(n[24]=(0,e.createElementVNode)("span",{class:"input-group-addon"},"Search",-1)),(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[9]||(n[9]=function(e){return r.searchKeyPlatformCategory=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id or name",type:"text"},null,512),[[e.vModelText,r.searchKeyPlatformCategory]])])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("ul",Be,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.filterData("allCategories"),function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{"data-cache-category":t.cache_category,"data-category-id":t.category_id,"data-theme-id":t.theme_id,class:"list-group-item js_item",onClick:n[10]||(n[10]=function(e){return i.setCurrentSelection(e)})},[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":function(e){return t.selected=e},type:"checkbox"},null,8,xe),[[e.vShow,r.showCheckbox],[e.vModelCheckbox,t.selected]]),(0,e.createTextVNode)(" "+(0,e.toDisplayString)(t.category_name)+" ",1),(0,e.withDirectives)((0,e.createElementVNode)("small",{class:"text-info",title:"Theme"}," - "+(0,e.toDisplayString)(i.getThemeName(t.theme_id)),513),[[e.vShow,t.theme_id>0]]),(0,e.withDirectives)((0,e.createElementVNode)("small",Ve,ce(n[25]||(n[25]=[(0,e.createElementVNode)("br",null,null,-1),(0,e.createTextVNode)("Theme is missing",-1)])),512),[[e.vShow,t.theme_id<=0]]),(0,e.createElementVNode)("span",De,[(0,e.createElementVNode)("span",Me,[i.canDelete?((0,e.openBlock)(),(0,e.createElementBlock)("button",Te,ce(n[26]||(n[26]=[(0,e.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-trash-o js_delete"},null,-1)])))):(0,e.createCommentVNode)("v-if",!0),i.canEdit?((0,e.openBlock)(),(0,e.createElementBlock)("button",Ie,ce(n[27]||(n[27]=[(0,e.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-ellipsis-v js_info"},null,-1)])))):(0,e.createCommentVNode)("v-if",!0)])])],8,Ae)}),256))],512)])]),(0,e.createElementVNode)("div",Oe,[(0,e.createElementVNode)("div",Pe,[n[29]||(n[29]=(0,e.createElementVNode)("div",{class:"panel-heading p-4"},"Drag and drop from here",-1)),i.showSearch("allSiteCategories")?((0,e.openBlock)(),(0,e.createElementBlock)("div",Le,[(0,e.createElementVNode)("div",je,[n[28]||(n[28]=(0,e.createElementVNode)("span",{class:"input-group-addon"},"Search",-1)),(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return r.searchKeyCategory=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id or name",type:"text"},null,512),[[e.vModelText,r.searchKeyCategory]])])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("ul",Fe,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.filterData("allSiteCategories"),function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{"data-category-id":t.category_id,class:"list-group-item js_item"},(0,e.toDisplayString)(t.category_name),9,Re)}),256))])])])]),(0,e.createElementVNode)("div",Ue,[(0,e.createElementVNode)("p",He,[n[30]||(n[30]=(0,e.createTextVNode)(" Set theme etc for this category ",-1)),(0,e.createElementVNode)("span",{"aria-label":"Close",class:"pull-right fa fa-close close",title:"Close",onClick:n[12]||(n[12]=function(e){return i.closePopup()})})]),(0,e.createElementVNode)("div",$e,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return r.currentSelection.theme_id=e}),class:"form-select mb-2"},[n[31]||(n[31]=(0,e.createElementVNode)("option",{value:""},"Select a Theme",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.siteThemes,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,ze)}),256))],512),[[e.vModelSelect,r.currentSelection.theme_id]]),(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[14]||(n[14]=function(e){return r.currentSelection.cache_category=e}),class:"form-control mb-2",name:"cache_category",placeholder:"Enter cache category",type:"text"},null,512),[[e.vModelText,r.currentSelection.cache_category]]),(0,e.createElementVNode)("div",qe,[(0,e.createElementVNode)("button",{class:"btn btn-primary text-center",onClick:n[15]||(n[15]=function(e){return i.setThemeEtc()})}," Save Settings ")])])],512)])}]]),Gn={mounted:function(){},props:["dataControllerName"],methods:{downloadNow:function(){window.location.href=g.admin_path(this.dataControllerName+"/download")}}},Zn=(0,w.A)(Gn,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("button",{onClick:n[0]||(n[0]=function(e){return i.downloadNow()}),type:"button",class:"btn btn-dark"},[(0,e.renderSlot)(t.$slots,"default",{},function(){return[n[1]||(n[1]=(0,e.createTextVNode)("Download",-1))]})])}]]);var Qn={ref:"uploaderForm",name:"uploaderForm",enctype:"multipart/form-data"},eo={class:"row"},to={class:"col-5"},no=["accept"],oo={key:0,class:"alert alert-danger mt-1"},ao={class:"col-5"},ro={key:0,class:"alert alert-danger mt-1"},io={class:"col-2"},so={key:0,class:"row"},lo={class:"progress p-0"},co=["aria-valuenow"],uo={key:1,class:"row"},ho={class:"col"};const mo={mounted:function(){},props:["dataTitle","dataAccept"],data:function(){return{title:this.dataTitle,form:{tags:"",files:""},isUploading:!1,errors:{files:!1,tags:!1},percent:0,message:"",msgType:"alert-success",acceptFileType:void 0!==this.dataAccept?this.dataAccept:"image/*"}},methods:{goBack:function(){window.location.href=this.backUrl},checkErrors:function(){this.errors.files=!1,this.errors.tags=!1},resetForm:function(){this.form.tags="",this.form.files="",this.errors.tags=!1,this.errors.files=!1,this.percent=0,this.$refs.uploaderForm.reset()},showMsg:function(e,t){var n=this;this.message=e,t?this.msgType="alert-danger":(this.msgType="alert-success",setTimeout(function(){n.message=""},2e3))},uploadNow:function(){var e=this,t=g.admin_path("gallery/uploadFiles");this.message="";var n=this.$refs.allFilesC.files,o=!1;if(0===n.length&&(o=this.errors.files=!0),""===this.form.tags&&(o=this.errors.tags=!0),o)return!1;this.isUploading=!0;for(var a=new FormData,r=0;r<n.length;r++)a.append("images[]",n[r]);a.append("tags",this.form.tags),a.append("groupName","content"),a.append("mediaType",this.acceptFileType.replace(/[^a-zA-Z,]/g,"")),a.append("_csrf",window.Laravel.csrfToken),axios.post(t,a,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:function(t){!function(t){e.percent=Math.round(100*t.progress)}(t)}}).then(function(t){!function(t){U.emit("gallery-image-uploaded",t.data),e.resetForm(),e.showMsg(t.data.message,!1)}(t)}).catch(function(t){!function(t){e.showMsg(t.response.statusText||"There is some error while uploading. Please try again.",!0),e.resetForm()}(t)}).finally(function(){e.isUploading=!1})}}},fo=(0,w.A)(mo,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)("form",Qn,[(0,e.withDirectives)((0,e.createElementVNode)("div",eo,[(0,e.createElementVNode)("div",to,[(0,e.createElementVNode)("input",{type:"file",ref:"allFilesC",name:"msFiles__[]",multiple:"",class:"form-control",required:"",onChange:n[0]||(n[0]=function(){return i.checkErrors&&i.checkErrors.apply(i,arguments)}),accept:r.acceptFileType},null,40,no),r.errors.files?((0,e.openBlock)(),(0,e.createElementBlock)("div",oo," Please select at least one file. ")):(0,e.createCommentVNode)("v-if",!0)]),(0,e.createElementVNode)("div",ao,[(0,e.withDirectives)((0,e.createElementVNode)("input",{type:"text",name:"msTags__",id:"msTags__",required:"","onUpdate:modelValue":n[1]||(n[1]=function(e){return r.form.tags=e}),class:"form-control",placeholder:"Please enter keyword to search later. User comma for multiple keywords",onChange:n[2]||(n[2]=function(){return i.checkErrors&&i.checkErrors.apply(i,arguments)})},null,544),[[e.vModelText,r.form.tags]]),r.errors.tags?((0,e.openBlock)(),(0,e.createElementBlock)("div",ro," Please enter keywords to search later. ")):(0,e.createCommentVNode)("v-if",!0)]),(0,e.createElementVNode)("div",io,[(0,e.createElementVNode)("input",{type:"button",value:"Upload",class:"btn btn-primary",onClick:n[3]||(n[3]=function(){return i.uploadNow&&i.uploadNow.apply(i,arguments)})})])],512),[[e.vShow,!r.isUploading]])],512),r.isUploading?((0,e.openBlock)(),(0,e.createElementBlock)("div",so,[(0,e.createElementVNode)("div",lo,[(0,e.createElementVNode)("div",{class:"progress-bar progress-bar-striped bg-success",role:"progressbar",style:(0,e.normalizeStyle)("width:"+r.percent+"%"),"aria-valuenow":r.percent,"aria-valuemin":"0","aria-valuemax":"100"},(0,e.toDisplayString)(r.percent)+"% ",13,co)])])):(0,e.createCommentVNode)("v-if",!0),""!==r.message?((0,e.openBlock)(),(0,e.createElementBlock)("div",uo,[(0,e.createElementVNode)("div",ho,[(0,e.createElementVNode)("div",{class:(0,e.normalizeClass)("alert m-1 "+r.msgType)},(0,e.toDisplayString)(r.message),3)])])):(0,e.createCommentVNode)("v-if",!0)],64)}]]);var po=["action"],go={class:"form-group row mb-3"},vo={class:"col-sm-7"},yo={class:"text text-danger"},bo={class:"form-group row mb-3"},wo={class:"col-sm-7"},Eo={class:"text text-danger"},So={class:"form-group row mb-3"},ko={class:"col-sm-7"},_o={class:"text text-danger"},No={class:"form-group row mb-3"},Co={class:"col-sm-7"},Bo={class:"text text-danger"},Ao={class:"form-group row mb-3"},xo={class:"col-sm-7"},Vo={class:"form-group row mb-3"},Do={class:"col-sm-7"},Mo=["value"],To={class:"text text-danger"},Io=["innerHTML"],Oo={class:"form-group row mb-3"},Po={class:"col-sm-7"},Lo={class:"form-group row mb-3"},jo={class:"col-sm-7"},Fo=["value"],Ro={class:"text text-danger"},Uo={class:"form-group row mb-3"},Ho={class:"col-sm-7"},$o={class:"text text-danger"},zo={class:"form-group row mb-3"},qo={class:"col-sm-7"},Ko={class:"text text-danger"},Wo={class:"form-group row mb-3"},Jo={class:"col-sm-7"},Xo={class:"form-group row mb-3"},Yo={class:"col-sm-7"},Go={class:"form-group row mb-3"},Zo={class:"col-sm-7"},Qo={class:"form-group row mb-3"},ea={class:"col-sm-7"},ta={class:"form-group row mb-3"},na={class:"col-sm-7"},oa={class:"form-group row mb-3"},aa={class:"col-sm-7"},ra={class:"form-group row mb-3"},ia={class:"border"},sa={class:"form-group"},la={class:"col-sm-7"},ca={class:"form-group row mb-3"},da={class:"col-sm-7"},ua=["value"],ha={class:"text text-danger"},ma={class:"form-group row mb-3"},fa={class:"col-sm-7"},pa={class:"form-group row mb-3"},ga={class:"col-sm-7"},va={class:"row mb-3"},ya={class:"form-group center-align"},ba=["href"];const wa=p.Form,Ea={mounted:function(){"edit"===this.dataActionPerformed?this.setFormData(this.formData):this.form.site_id=this.dataSiteId},props:["dataControllerName","dataBackUrl","dataSite","dataResults","dataActionPerformed","dataDataTypes","dataDataTypesInfo","dataFormAction","dataSiteId"],data:function(){return{sFont:{"font-size":"14px"},fluidCol:{width:"100%"},allQueryDataTypes:[{name:"param",value:"param"},{name:"data",value:"data"}],conventional:!1,formData:void 0!==this.dataResults?JSON.parse(this.dataResults):[],siteData:void 0!==this.dataSite?JSON.parse(this.dataSite):[],showExtraData:{},allDataTypes:void 0!==this.dataDataTypes?JSON.parse(this.dataDataTypes):[],allMethodTypes:[{name:"GET",value:"GET"},{name:"POST",value:"POST"}],form:new wa({id:0,name:"",icon_css:"",alias:"",view_name:"",cache_group:"",data_type:"",method_type:"",data_handler:"",data_key_map:"",query_statement:"",query_as:"",description:"",site_id:1,is_seo_module:0,individual_cache:0,shared:0,update_inAllSites:0,is_mandatory:0,service_params:"",actionPerformed:this.dataActionPerformed,backURL:this.dataBackUrl,headers:"",live_edit:0,linked_module:""}),errors:{},cacheData:{},sortable:null,sortingInterval:-1,errorMessage:"",dataTypesInfo:void 0!==this.dataDataTypesInfo?JSON.parse(this.dataDataTypesInfo):[],saveURL:this.dataFormAction}},computed:{showQueryForm:function(){return this.form.data_type.toLowerCase().indexOf("queryservice")>-1},showServiceForm:function(){return this.form.data_type.toLowerCase().indexOf("service")>-1},showAllUpdateSection:function(){return"edit"===this.dataActionPerformed&&this.siteData.length>1}},methods:{fillCopiedData:function(){var e=this;(0,p.PasteFromClipboard)().then(function(t){(0,p.IsJson)(e.form.name)&&e.setFormData(JSON.parse(e.form.name))}).catch(function(e){console.log("unable to paste")})},goConventional:function(e){if(!1===this.conventional){var t=this.form.name;this.form.title=t,this.form.alias=("MODULE_"+t.toUpperCase()).replace(/\s/g,"_"),this.form.view_name=t.toLowerCase().replace(/\s/g,"-")}},setFormData:function(e){Object.keys(e).length;var t=document.querySelector("#addEditFrm");for(var n in e){var o=e[n];void 0!==this.form[n]&&"function"!=typeof this.form[n]&&(this.form[n]=o);var a=t[n]||document.getElementById(n);if(a){var r=a.type;"checkbox"!==r&&"radio"!==r||"submit"===r||(this.form[n]=1===o)}}},checkForService:function(e){this.showExtraData.show=""!==e&&(e.indexOf("Service")>-1||e.indexOf("service")>-1)},createModule:function(){var e=this,t=this;t.form.is_seo_module=t.form.is_seo_module?t.form.is_seo_module:0,t.form.individual_cache=t.form.individual_cache?t.form.individual_cache:0,t.form.update_inAllSites=t.form.update_inAllSites?t.form.update_inAllSites:0,t.form.is_mandatory=t.form.is_mandatory?t.form.is_mandatory:0,t.form.service_params=t.form.service_params?t.form.service_params:"",t.form.shared=t.form.shared?t.form.shared:0,t.form.live_edit=t.form.live_edit?t.form.live_edit:0,this.form.post(this.saveURL).then(function(t){e.resetForm(t)}).catch(function(t){e.showError(t)})},showError:function(e){for(var t in e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},resetForm:function(e){function t(e){return"true"===e.toString()||"1"===e.toString()}t(e.isSaved)?(this.errorMessage="",this.dataActionPerformed.toUpperCase(),W.show(this,"Saved..."),t(e.isSaved)&&(window.location.href=e.backURL)):(this.errorMessage={},W.show(this,"There is some error..."),this.errorMessage=e.message)}}},Sa=(0,w.A)(Ea,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.createElementVNode)("form",{id:"addEditFrm",action:r.saveURL,class:"form-group",method:"post",role:"form",onKeyup:n[24]||(n[24]=function(e){return i.hideErrorMessage(e)}),onSubmit:n[25]||(n[25]=(0,e.withModifiers)(function(){return i.createModule&&i.createModule.apply(i,arguments)},["prevent"]))},[(0,e.createElementVNode)("div",go,[n[27]||(n[27]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"name"},"Name",-1)),(0,e.createElementVNode)("div",vo,[(0,e.withDirectives)((0,e.createElementVNode)("input",{onBlur:n[0]||(n[0]=function(){return i.fillCopiedData&&i.fillCopiedData.apply(i,arguments)}),id:"name","onUpdate:modelValue":n[1]||(n[1]=function(e){return r.form.name=e}),class:"form-control",name:"name",placeholder:"Module name",required:"",type:"text"},null,544),[[e.vModelText,r.form.name]]),(0,e.createElementVNode)("label",null,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return r.conventional=e}),type:"checkbox",onClick:n[3]||(n[3]=function(e){return i.goConventional()})},null,512),[[e.vModelCheckbox,r.conventional]]),n[26]||(n[26]=(0,e.createTextVNode)(" Go Conventional",-1))]),(0,e.createElementVNode)("div",yo,(0,e.toDisplayString)(this.errors.name),1)])]),(0,e.createElementVNode)("div",bo,[n[28]||(n[28]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"alias"},"Alias",-1)),(0,e.createElementVNode)("div",wo,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"alias","onUpdate:modelValue":n[4]||(n[4]=function(e){return r.form.alias=e}),class:"form-control",name:"alias",placeholder:"Alias",required:"",type:"text"},null,512),[[e.vModelText,r.form.alias]]),(0,e.createElementVNode)("div",Eo,(0,e.toDisplayString)(this.errors.alias),1)])]),(0,e.createElementVNode)("div",So,[n[29]||(n[29]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"view_name"},"View Name",-1)),(0,e.createElementVNode)("div",ko,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"view_name","onUpdate:modelValue":n[5]||(n[5]=function(e){return r.form.view_name=e}),class:"form-control",name:"view_name",placeholder:"View name",required:"",type:"text"},null,512),[[e.vModelText,r.form.view_name]]),(0,e.createElementVNode)("div",_o,(0,e.toDisplayString)(this.errors.view_name),1)])]),(0,e.createElementVNode)("div",No,[n[30]||(n[30]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"cache_group"},"Cache Group",-1)),(0,e.createElementVNode)("div",Co,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"cache_group","onUpdate:modelValue":n[6]||(n[6]=function(e){return r.form.cache_group=e}),class:"form-control",maxlength:"60",name:"cache_group",placeholder:"Cache Category",type:"text"},null,512),[[e.vModelText,r.form.cache_group]]),(0,e.createElementVNode)("div",Bo,(0,e.toDisplayString)(this.errors.cache_group),1)])]),(0,e.createElementVNode)("div",Ao,[n[31]||(n[31]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"individual_cache"},"Is Individual Cache?",-1)),(0,e.createElementVNode)("label",xo,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"individual_cache","onUpdate:modelValue":n[7]||(n[7]=function(e){return r.form.individual_cache=e}),name:"individual_cache",type:"checkbox"},null,512),[[e.vModelCheckbox,r.form.individual_cache]])])]),(0,e.createElementVNode)("div",Vo,[n[33]||(n[33]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"data_type"},"Data Type",-1)),(0,e.createElementVNode)("div",Do,[(0,e.withDirectives)((0,e.createElementVNode)("select",{id:"data_type","onUpdate:modelValue":n[8]||(n[8]=function(e){return r.form.data_type=e}),class:"form-select select-big",name:"data_type",onChange:n[9]||(n[9]=function(e){return i.checkForService(r.form.data_type)})},[n[32]||(n[32]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allDataTypes,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t},(0,e.toDisplayString)(t),9,Mo)}),256))],544),[[e.vModelSelect,r.form.data_type]]),(0,e.createElementVNode)("div",To,(0,e.toDisplayString)(this.errors.data_type),1),(0,e.withDirectives)((0,e.createElementVNode)("div",{class:"alert alert-info",innerHTML:this.dataTypesInfo[r.form.data_type]||""},null,8,Io),[[e.vShow,""!=r.form.data_type&&this.dataTypesInfo[r.form.data_type]]])])]),(0,e.createElementVNode)("div",Oo,[n[34]||(n[34]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"data_handler"},"Data Handler",-1)),(0,e.createElementVNode)("label",Po,[(0,e.withDirectives)((0,e.createElementVNode)("textarea",{id:"data_handler","onUpdate:modelValue":n[10]||(n[10]=function(e){return r.form.data_handler=e}),class:"form-control input","mb-2s":"5",name:"data_handler",placeholder:"Query or Service URL or filteration for this module",row:"",style:(0,e.normalizeStyle)(r.fluidCol)},null,4),[[e.vModelText,r.form.data_handler]])])]),(0,e.withDirectives)((0,e.createElementVNode)("div",null,[(0,e.createElementVNode)("div",Lo,[n[36]||(n[36]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"method_type"},"Method Type",-1)),(0,e.createElementVNode)("div",jo,[(0,e.withDirectives)((0,e.createElementVNode)("select",{id:"method_type","onUpdate:modelValue":n[11]||(n[11]=function(e){return r.form.method_type=e}),class:"form-select select-big",name:"method_type"},[n[35]||(n[35]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allMethodTypes,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.value},(0,e.toDisplayString)(t.name),9,Fo)}),256))],512),[[e.vModelSelect,r.form.method_type]]),(0,e.createElementVNode)("div",Ro,(0,e.toDisplayString)(this.errors.data_type),1)])]),(0,e.createElementVNode)("div",Uo,[n[37]||(n[37]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"service_params"},"Service Params",-1)),(0,e.createElementVNode)("div",Ho,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"service_params","onUpdate:modelValue":n[12]||(n[12]=function(e){return r.form.service_params=e}),class:"form-control",name:"service_params",placeholder:"Service Params",type:"text"},null,512),[[e.vModelText,r.form.service_params]]),(0,e.createElementVNode)("div",$o,(0,e.toDisplayString)(this.errors.service_params),1)])]),(0,e.createElementVNode)("div",zo,[n[38]||(n[38]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"service_params"},"Service Headers",-1)),(0,e.createElementVNode)("div",qo,[(0,e.withDirectives)((0,e.createElementVNode)("textarea",{id:"headers","onUpdate:modelValue":n[13]||(n[13]=function(e){return r.form.headers=e}),class:"form-control input",name:"headers",placeholder:"Service header as json",rows:"5"},null,512),[[e.vModelText,r.form.headers]]),(0,e.createElementVNode)("div",Ko,(0,e.toDisplayString)(this.errors.headers),1)])])],512),[[e.vShow,i.showServiceForm]]),(0,e.createElementVNode)("div",Wo,[n[39]||(n[39]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"data_key_map"},"Data Key Map",-1)),(0,e.createElementVNode)("label",Jo,[(0,e.withDirectives)((0,e.createElementVNode)("textarea",{id:"data_key_map","onUpdate:modelValue":n[14]||(n[14]=function(e){return r.form.data_key_map=e}),class:"form-control input",name:"data_key_map",placeholder:"key to be replaced in comma seperated. ie: :site_id, :lang_id ",rows:"5",style:(0,e.normalizeStyle)(r.fluidCol)},null,4),[[e.vModelText,r.form.data_key_map]])])]),(0,e.createElementVNode)("div",Xo,[n[40]||(n[40]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"is_seo_module"},"Use this module as seo module",-1)),(0,e.createElementVNode)("label",Yo,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"is_seo_module","onUpdate:modelValue":n[15]||(n[15]=function(e){return r.form.is_seo_module=e}),name:"is_seo_module",type:"checkbox"},null,512),[[e.vModelCheckbox,r.form.is_seo_module]])])]),(0,e.createElementVNode)("div",Go,[n[41]||(n[41]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"is_mandatory"},"Is Mandatory?",-1)),(0,e.createElementVNode)("label",Zo,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"is_mandatory","onUpdate:modelValue":n[16]||(n[16]=function(e){return r.form.is_mandatory=e}),name:"is_mandatory",type:"checkbox"},null,512),[[e.vModelCheckbox,r.form.is_mandatory]])])]),(0,e.createElementVNode)("div",Qo,[n[42]||(n[42]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"shared"},"Is Shared?",-1)),(0,e.createElementVNode)("label",ea,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"shared","onUpdate:modelValue":n[17]||(n[17]=function(e){return r.form.shared=e}),name:"shared",type:"checkbox"},null,512),[[e.vModelCheckbox,r.form.shared]])])]),(0,e.createElementVNode)("div",ta,[n[43]||(n[43]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"linked_module"},"Linked Module Alias",-1)),(0,e.createElementVNode)("label",na,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"linked_module","onUpdate:modelValue":n[18]||(n[18]=function(e){return r.form.linked_module=e}),name:"linked_module",type:"text",class:"form-control"},null,512),[[e.vModelText,r.form.linked_module]])])]),(0,e.createElementVNode)("div",oa,[n[44]||(n[44]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"live_edit"},"Live Edit?",-1)),(0,e.createElementVNode)("label",aa,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"live_edit","onUpdate:modelValue":n[19]||(n[19]=function(e){return r.form.live_edit=e}),name:"live_edit",type:"checkbox"},null,512),[[e.vModelCheckbox,r.form.live_edit]])])]),(0,e.withDirectives)((0,e.createElementVNode)("div",ra,[(0,e.createElementVNode)("fieldset",ia,[n[46]||(n[46]=(0,e.createElementVNode)("legend",null,"Query Service Properties",-1)),(0,e.createElementVNode)("div",sa,[(0,e.createElementVNode)("label",{class:"col-sm-2",for:"query_statement",style:(0,e.normalizeStyle)(r.sFont)},"Query",4),(0,e.createElementVNode)("label",la,[(0,e.withDirectives)((0,e.createElementVNode)("textarea",{id:"query_statement","onUpdate:modelValue":n[20]||(n[20]=function(e){return r.form.query_statement=e}),class:"form-control input",name:"query_statement",rows:"5",style:(0,e.normalizeStyle)(r.fluidCol)},null,4),[[e.vModelText,r.form.query_statement]])])]),(0,e.createElementVNode)("div",ca,[(0,e.createElementVNode)("label",{class:"col-sm-2",for:"query_as",style:(0,e.normalizeStyle)(r.sFont)},"Get query data as",4),(0,e.createElementVNode)("div",da,[(0,e.withDirectives)((0,e.createElementVNode)("select",{id:"query_as","onUpdate:modelValue":n[21]||(n[21]=function(e){return r.form.query_as=e}),class:"form-select select-big",name:"query_as"},[n[45]||(n[45]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allQueryDataTypes,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.value},(0,e.toDisplayString)(t.name),9,ua)}),256))],512),[[e.vModelSelect,r.form.query_as]]),(0,e.createElementVNode)("div",ha,(0,e.toDisplayString)(this.errors.query_as),1)])])])],512),[[e.vShow,i.showQueryForm]]),(0,e.createElementVNode)("div",ma,[n[47]||(n[47]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"description"},"Description or different database connection name if it is a query module",-1)),(0,e.createElementVNode)("label",fa,[(0,e.withDirectives)((0,e.createElementVNode)("textarea",{id:"description","onUpdate:modelValue":n[22]||(n[22]=function(e){return r.form.description=e}),class:"form-control input",name:"description",rows:"5",style:(0,e.normalizeStyle)(r.fluidCol)},null,4),[[e.vModelText,r.form.description]])])]),(0,e.withDirectives)((0,e.createElementVNode)("div",pa,[n[49]||(n[49]=(0,e.createElementVNode)("label",{class:"col-sm-2",for:"update_inAllSites"},"Update in all sites?",-1)),(0,e.createElementVNode)("label",ga,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"update_inAllSites","onUpdate:modelValue":n[23]||(n[23]=function(e){return r.form.update_inAllSites=e}),name:"update_inAllSites",type:"checkbox"},null,512),[[e.vModelCheckbox,r.form.update_inAllSites]]),n[48]||(n[48]=(0,e.createElementVNode)("div",{class:"alert alert-info"}," Be careful by clicking this checkbox. Content will be updated in all sites based on alias. If you are changing alias it will be updated only in this site. ",-1))])],512),[[e.vShow,this.showAllUpdateSection]]),(0,e.createElementVNode)("div",va,[(0,e.withDirectives)((0,e.createElementVNode)("div",{class:"alert alert-danger"},(0,e.toDisplayString)(r.errorMessage),513),[[e.vShow,"string"==typeof r.errorMessage&&""!==r.errorMessage]]),(0,e.createElementVNode)("div",ya,[n[50]||(n[50]=(0,e.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,e.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Back",8,ba)])])],40,po)])}]]);var ka=["value"],_a=__webpack_require__(846),Na=__webpack_require__.n(_a);const Ca={components:{"split-button":S},props:["dataSites","dataCurrentSite","dataSupportedSites","dataIsAdmin"],mounted:function(){this.init()},data:function(){return{sites:void 0===this.dataSites?[]:JSON.parse(this.dataSites),currentSite:void 0===this.dataCurrentSite?1:parseInt(this.dataCurrentSite),supportedSite:void 0===this.dataSupportedSites?[]:JSON.parse(this.dataSupportedSites)}},methods:{init:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this,n=new(Na()),o=n.get("allSites");if(0===o.length||!0===e){var a=g.admin_path("site/getSitesForUsers");axios.get(a,{withCredentials:!1}).then(function(e){t.sites=e.data,n.set("allSites",JSON.stringify(t.sites))}).catch(function(e){console.log(e)})}else t.sites=JSON.parse(o)},hasSites:function(){return null!=this.sites&&this.sites.length>1},parseSite:function(e){return{label:e.name,value:e.id}},setSite:function(e){var t=g.admin_path("ajax/setSiteId/".concat(this.currentSite));axios.get(t).then(function(e){window.location.href=window.location.pathname}).catch(function(e){console.log(e)})}}},Ba=(0,w.A)(Ca,[["render",function(t,n,o,a,r,i){return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)("select",{onClick:n[0]||(n[0]=function(e){return i.init(!0)}),name:"site_combo",class:"form-select",id:"site_combo",onChange:n[1]||(n[1]=function(){return i.setSite&&i.setSite.apply(i,arguments)}),"onUpdate:modelValue":n[2]||(n[2]=function(e){return r.currentSite=e})},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.sites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,ka)}),256))],544)),[[e.vModelSelect,r.currentSite]])}]]);function Aa(e){return function(e){if(Array.isArray(e))return xa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return xa(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xa(e,t):void 0}}(e)||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 xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Va={class:"row mt-2 pb-2 border-bottom"},Da={class:"col-auto"},Ma=["value"],Ta={class:"col-auto"},Ia=["value"],Oa={class:"col-auto"},Pa=["value"],La={class:"col-auto"},ja={class:"col d-flex justify-content-end"},Fa={key:0,class:"btn-group"},Ra={key:0,class:"row mt-3"},Ua={class:"col left-zero"},Ha={class:"alert alert-danger col-md-8"},$a=["innerHTML"],za={class:"row mt-3"},qa={class:"col col-9"},Ka={class:"row homepage-modules"},Wa={class:"non-selectable shadow-sm card mb-3"},Ja=["onDblclick"],Xa={class:"pull-right small"},Ya=["onClick"],Ga=["onClick"],Za=["onClick"],Qa=["data-hook-id"],er=["data-module-id"],tr=["onClick"],nr=["data-hook-id"],or={key:0,class:"card-footer bg-gradient border-light"},ar=["onClick","data-hook-id"],rr={key:0,ref:"savePanel",class:"clearboth text-center pt-5"},ir={key:0,class:"col col-3"},sr={class:"panel-sub-heading"},lr={class:"input-group"},cr={id:"draggableModules",class:"modules-list all-modules-right"},dr=["data-module-id"],ur=["innerHTML"],hr={class:"row"},mr={key:0,class:"col-auto p-1"},fr=["value"],pr={key:1,class:"col-auto p-1"},gr=["value"],vr={key:2,class:"col-auto p-1"},yr=["value"],br={class:"col-auto p-1"},wr=["value"],Er={class:"row mt-2"},Sr={key:0,class:"col-auto p-1"},kr=["value"],_r={key:1,class:"col-auto p-1"},Nr=["value"],Cr={key:2,class:"col-auto p-1"},Br=["value"],Ar={class:"col-auto p-1"},xr=["value"],Vr={class:"row"},Dr={class:"plr5 v-space"},Mr={class:"loader"},Tr={class:"p-2",title:"Delete from other platforms too"},Ir={style:{"text-transform":"capitalize"}},Or={class:"row",style:{"max-height":"500px",overflow:"scroll"}},Pr={class:"table table-striped"},Lr={key:0},jr=["innerHTML"],Fr=["textContent"],Rr={key:0},Ur={style:{"background-color":"#fff",border:"none"}},Hr={class:"text text-danger"};const $r={components:{"modal-box":ie},props:["dataModel","dataModuleRelations","dataId"],mounted:function(){},data:function(){return{model:void 0===this.dataModel||""===this.dataModel?null:this.dataModel,relation:void 0===this.dataModuleRelations||""===this.dataModuleRelations?"":this.dataModuleRelations,id:void 0===this.dataId||""===this.dataId?0:parseInt(this.dataId),resData:[],errorMessage:"",isEditable:!0,excludeFields:[]}},methods:{shouldExclude:function(e){return this.excludeFields.indexOf(e)>=0},getValue:function(e,t){if(!this.isEditable)return t;if("id"===e&&this.isEditable){var n="edit/".concat(t);return n=g.admin_path("".concat(this.model,"/").concat(n)),'<a href="'.concat(n,'">').concat(t,"</a>")}return t},showInfo:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.isEditable="true"===o.toString(),this.excludeFields=n,this.model=e;var a=this;J.show(this),axios.get(g.get("base_path")+"/ajax/getInfo/".concat(e,"/").concat(t)).then(function(e){a.errorMessage="",a.resData={},a.resData=e.data.results,!0===e.data.error&&(a.errorMessage=e.data.message),a.open(),J.hide(a)}).catch(function(e){W.show(a,e.message),J.hide(a)})},open:function(){this.$refs.infoModal.open(),U.emit("info-popup-open")},close:function(){this.$refs.infoModal.close(),U.emit("info-popup-close")}}},zr=(0,w.A)($r,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("modal-box");return(0,e.openBlock)(),(0,e.createBlock)(s,{ref:"infoModal","data-show-footer":"true"},{title:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",Ir,(0,e.toDisplayString)(r.model)+" Info",1)]}),content:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",Or,[(0,e.createElementVNode)("table",Pr,[(0,e.createElementVNode)("tbody",null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.resData,function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[i.shouldExclude(n)?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("tr",Lr,[(0,e.createElementVNode)("td",null,(0,e.toDisplayString)(n),1),(0,e.createElementVNode)("td",null,["id"===n?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:0,innerHTML:i.getValue(n,t)},null,8,jr)):(0,e.createCommentVNode)("v-if",!0),"id"!==n?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:1,textContent:(0,e.toDisplayString)(i.getValue(n,t))},null,8,Fr)):(0,e.createCommentVNode)("v-if",!0)])]))],64)}),256)),""!==r.errorMessage?((0,e.openBlock)(),(0,e.createElementBlock)("tr",Rr,[(0,e.createElementVNode)("td",Ur,[(0,e.createElementVNode)("div",Hr,(0,e.toDisplayString)(r.errorMessage),1)])])):(0,e.createCommentVNode)("v-if",!0)])])])]}),footer:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[0]||(n[0]=function(e){return i.close()})},"Close")]}),_:1},512)}]]),qr={components:{"info-popup":zr,"modal-box":ie},mounted:function(){this.init()},created:function(){},props:["dataCategories","dataMicrosites","dataPlatforms","dataSiteId","dataMicrositeId","dataCategoryId","dataPlatformId","dataSiteInfo","dataHookInfo","dataAllModules","dataCategoryModules","dataCategoryInfo","dataThemeInfo","dataUserRights","dataIsModuleReadonly","dataAllSites"],computed:{hasSiteMoreThanOne:function(){return this.allSites.length>1},hasMicrosites:function(){return this.microsites.length>0},hasPlatformMoreThanOne:function(){return this.platforms.length>1},hasTheme:function(){return this.themeInfo&&this.themeInfo.id},saveButtonCss:function(){return"btn btn-success btn-form-submit"+(!0===this.enableDisableSave()?"":" disabled")},canEdit:function(){return this.userRights.indexOf("edit")>=0&&!1===this.isModuleReadonly},canDelete:function(){return this.userRights.indexOf("delete")>=0&&!1===this.isModuleReadonly},modalCss:function(){return"modal-lg"},fromCategories:function(){return this.categoriesData[this.fromData.site_id]||[]},toCategories:function(){return this.categoriesData[this.toData.site_id]||[]},hasError:function(){return this.errors.length>0},filterModules:function(){var e=this.searchKey;return""!==e&&null!=e?(e=e.toLowerCase(),this.allModules.filter(function(t){var n=t.alias.toLowerCase(),o=t.name.toLowerCase();if(t.id.toString()===e||n.includes(e)||o.includes(e))return!0})):(this.searchKey="",this.allModules)}},data:function(){return{categoriesData:{},categories:void 0===this.dataCategories||""===this.dataCategories?[]:JSON.parse(this.dataCategories),microsites:void 0===this.dataMicrosites||""===this.dataMicrosites?[]:JSON.parse(this.dataMicrosites),platforms:void 0===this.dataPlatforms||""===this.dataPlatforms?[]:JSON.parse(this.dataPlatforms),siteId:void 0===this.dataSiteId||""===this.dataSiteId?1:parseInt(this.dataSiteId),microSiteId:void 0===this.dataMicrositeId||""===this.dataMicrositeId?0:parseInt(this.dataMicrositeId),platformId:void 0===this.dataPlatformId||""===this.dataPlatformId?1:parseInt(this.dataPlatformId),categoryId:void 0===this.dataCategoryId||""===this.dataCategoryId?0:parseInt(this.dataCategoryId),siteInfo:void 0===this.dataSiteInfo||""===this.dataSiteInfo?[]:JSON.parse(this.dataSiteInfo),hookInfo:void 0===this.dataHookInfo||""===this.dataHookInfo?[]:JSON.parse(this.dataHookInfo),allModules:void 0===this.dataAllModules||""===this.dataAllModules?[]:JSON.parse(this.dataAllModules),categoryModules:void 0===this.dataCategoryModules||""===this.dataCategoryModules?[]:JSON.parse(this.dataCategoryModules),categoryInfo:void 0===this.dataCategoryInfo||""===this.dataCategoryInfo?[]:JSON.parse(this.dataCategoryInfo),themeInfo:void 0===this.dataThemeInfo||""===this.dataThemeInfo?[]:JSON.parse(this.dataThemeInfo),hooks:[],hooksInfoCache:{},moduleInfoCache:{},noHookFound:!1,errors:[],enableSave:!1,searchKey:"",applicableForAllPlatforms:!1,fromData:{site_id:0,microsite_id:0,platform_id:0,category_id:0},toData:{site_id:0,microsite_id:0,platform_id:0,category_id:0},isWorking:!1,sortObj:{draggable:null},userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[],isModuleReadonly:"1"===this.dataIsModuleReadonly,allSites:void 0===this.dataAllSites||""===this.dataAllSites?[]:JSON.parse(this.dataAllSites),copyForAllPlatforms:!1}},methods:{init:function(){if(0===this.categories.length&&this.addErrorMessage("No category found!"),0===this.categoryInfo.length&&this.addErrorMessage("There is a mismatch in site default category. Please fix that."),this.hasTheme)this.parseTheme(),this.populateModules(),this.enableSorting(),this.makeCategories();else{var e=g.admin_path("category/settings",{platform_id:this.platformId});this.addErrorMessage("This category/platform/theme is not available in category_site table.\n You need to drag and drop in <a href='".concat(e,"'>category settings</a>.")),this.addErrorMessage("Dont' forget the set the theme there.")}},makeCategories:function(){var e=this.allSites.length;if(e>0)for(var t=0;t<e;t++){var n=this.allSites[t];this.categoriesData[n.id]=n.category}this.setDefaultFromTo()},setDefaultFromTo:function(){this.allSites.length>0?(this.fromData.site_id=this.allSites[0].id,this.toData.site_id=this.siteId):(this.fromData.site_id=this.siteId,this.toData.site_id=this.siteId),this.fromData.platform_id=this.platformId,this.toData.platform_id=this.platformId,this.toData.category_id=this.categoryId},saveNow:function(e,t){var n=this;return J.show(this),new Promise(function(o,a){axios.post(e,t).then(function(e){o(e)}).catch(function(e){a(e.response)}).finally(function(){J.hide(n)})})},getWhere:function(){return{site_id:this.siteId,microsite_id:this.microSiteId,platform_id:this.platformId,category_id:this.categoryId}},saveModules:function(){if(!1===this.enableDisableSave())return!1;var e=this,t={},n=document.querySelectorAll(".js_hook_modules"),o=[];if(n.forEach(function(e){var t=e.querySelectorAll("li.js_item"),n=e.getAttribute("data-hook-id");if(t.length>0){for(var a=[],r=0;r<t.length;r++){var i=t[r].getAttribute("data-module-id");a.push({module_id:i,position:r+1})}var s={hook_id:n,modules:a};o.push(s)}}),o.length>0){var a=e.getWhere();t.data=o,t.where=a,t.applicableForAllPlatforms=!1,this.saveNow(g.admin_path("homepage/saveSettings"),t).then(function(t){W.show(e,"Saved..."),e.enableDisableSave(!1)}).catch(function(t){e.showError(t)})}},populateModules:function(){var e=this,t=this.categoryModules;if(t.length>0)for(var n=0;n<t.length;n++){var o=t[n],a=e.getHookInfoCache(o.hook_id);try{var r=e.getModuleInfo(o.module_id);this.addModule(a.hookIndex,r)}catch(t){console.error("@populateModules: "+t.message),e.showError("@populateModules: "+t.message)}}else console.info("There is no module added for this category."),W.show(this,"There is no module added for this category. Drag from the right panel to the left boxes. ",5e3)},parseTheme:function(){if(this.hasTheme){var e=this,t=this.themeInfo.skeleton.match(/(%{cms.+}%)/gim);if(t&&t.length>0){var n=0;t.forEach(function(t,o){var a=t.replace("%{cms.",""),r=(a=a.replace("}%","")).split("."),i=r[0],s=r[1];if("hook"===i){var l=e.getHookInfo(s);null!==l?(e.addHook({name:s,modules:[],info:l}),e.setHookInfoCache(l.id,{info:l,hookIndex:n}),n++):console.error("@parseTheme "+s+". You need to add in your site")}})}else this.addErrorMessage("There is no hook defined in for this theme (".concat(this.themeInfo.name,"})"))}else this.addErrorMessage("There is no theme available for this category")},addErrorMessage:function(e){this.errors.push({message:e})},findModuleIndex:function(e,t){return null!==this.getHook(e)?this.getHook(e).modules.findIndex(function(e){return t.id===e.id}):-1},removeModules:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"module_id",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("[object Object]"===Object.prototype.toString.call(e)?t=e:(t=this.getWhere())[n]=parseInt(e),null!==o){t.hook_id=parseInt(o);var a=this.getHookInfoCache(o),r=this.getModuleInfo(e),i=this.findModuleIndex(a.hookIndex,r);this.getHook(a.hookIndex).modules.splice(i,1)}var s={};s.where=t,s.applicableForAllPlatforms=this.applicableForAllPlatforms,this.enableDisableSave(!0)},addModule:function(e,t){if(-1===this.findModuleIndex(e,t)){var n=this.getHook(e);return n.modules.push(t),n.modules.length}return!1},refreshRightSide:function(){this.allModules.push(this.allModules[0]),this.allModules.pop()},highlightEagerDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add";document.querySelectorAll(".js_hook_modules").forEach(function(t){t.classList[e]("module-drop-eager"),t.closest("div.js_modules").classList[e]("p-0","m-0")})},setHookInfoCache:function(e,t){return this.hooksInfoCache[e]=t},getHookInfoCache:function(e){return this.hooksInfoCache[e]},getHookInfo:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"alias",n=this.hookInfo,o=0;o<n.length;o++){var a=n[o];if(a[t]===e)return a}return null},addHook:function(e){this.hooks.push(e)},getHook:function(e){return this.hooks[e]||null},getModuleInfo:function(e){if(this.moduleInfoCache[e])return this.moduleInfoCache[e];for(var t=null,n=0;n<this.allModules.length;n++){var o=this.allModules[n];if(o.id.toString()===e.toString()){this.moduleInfoCache[e]=o,t=o;break}}return t},enableDragging:function(){if(!this.canEdit)return!1;var e=this,t=document.getElementById("draggableModules");this.sortObj.draggable=Jn.create(t,{animation:200,draggable:".js_item",group:{name:"modulesBox"},sort:!1,ghostClass:"js_modules",onEnd:function(t){var n=t.to,o=t.item,a=n.getAttribute("data-hook-id"),r=o.getAttribute("data-module-id");if(a){var i=e.getHookInfoCache(a),s=e.getModuleInfo(r),l=e.addModule(i.hookIndex,s);o.parentNode.removeChild(o),e.highlightEagerDrop("remove"),!1===l&&W.show(e,"Module is already added in this hook...")}e.enableDisableSave(!0)},onStart:function(t){e.highlightEagerDrop("add")}})},enableSorting:function(){if(!this.canEdit)return!1;var e=this;this.$nextTick(function(){document.querySelectorAll(".js_modules").forEach(function(t){Jn.create(t,{animation:200,filter:".js_delete",group:{name:"droppable",put:"modulesBox"},onFilter:function(t){var n=t.item,o=t.target,a=n.parentNode.getAttribute("data-hook-id"),r=n.getAttribute("data-module-id");Jn.utils.is(o,".js_delete")&&e.removeModules(r,"module_id",a)},onUpdate:function(t){e.enableDisableSave(!0)}})}),e.enableDragging(!0)})},deleteAllModuleFromHook:function(e){var t=this.getHookInfoCache(e);this.getHook(t.hookIndex).modules=[],this.removeModules(e,"hook_id")},hasAnyModulesInAHook:function(e){return void 0!==e.modules&&e.modules.length>0},enableDisableSave:function(e){if(void 0===e)return this.enableSave;this.enableSave=e},showHideDeleteAlert:function(e){e?X.open(this,"deleteBox"):X.close(this,"deleteBox")},deleteAllFromCategory:function(){this.showHideDeleteAlert(!1);for(var e=this.hooks,t=0;t<e.length;t++)e[t].modules=[];this.removeModules(this.categoryId,"category_id")},showHideCopyAlert:function(){arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?X.close(this,"copyBox"):(this.setDefaultFromTo(),X.open(this,"copyBox"))},copyDataFromCategory:function(){this.isWorking=!0;var e=this,t={fromData:this.fromData,toData:this.toData},n=g.admin_path("homepage/copyData");this.saveNow(n,t).then(function(t){t.data.error?W.show(e,t.data.message,5e3):t.data.success&&(e.showHideCopyAlert(!1),W.show(e,"Copied. Reloading..."),window.location.href=window.location.href),e.isWorking=!1}).catch(function(t){e.showHideCopyAlert(!1),e.isWorking=!1,e.showError(t)})},setWorking:function(){},isValidModule:function(e){var t=null!=e&&void 0!==e&&e.id>0;return!1===t&&console.error("There is some error in db entries for this category. This can be fixed by deleting all modules and drag and drop again."),t},fetchNewData:function(){var e=this.getWhere();delete e.site_id,0===e.microsite_id&&delete e.microsite_id,window.location.href=g.admin_path("homepage/ui",e)},showInfo:function(e,t){this.$refs.infoPopup.showInfo(e,t)},showHideHookPanel:function(e){var t=this.$refs["hook_panel_"+e][0];-1===t.className.indexOf("hide")?t.classList.add("hide"):t.classList.remove("hide")},onlyMe:function(e,t){var n=this,o=this.$refs["panel_"+e][0];function a(e){for(var t=n.$refs.savePanel,o=0;o<n.hooks.length;o++){var a=n.hooks[o],r=n.$refs["panel_"+a.info.id][0];!0===e?(r.classList.add("hide"),r.classList.remove("fixed")):(r.classList.remove("hide"),r.classList.remove("fixed"))}!0===e?t.classList.add("hide"):t.classList.remove("hide")}-1===o.className.indexOf("fixed")?(a(!0),o.classList.remove("hide"),o.classList.add("fixed")):a(!1)},showError:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t="string"==typeof e?e:e&&e.data&&e.data.message?e.data.message:"Unknown error!",W.show(this,t,5e3),n&&setTimeout(function(){window.location.reload()},1e3)}}},Kr=(0,w.A)(qr,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("modal-box"),l=(0,e.resolveComponent)("info-popup");return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)("div",Va,[(0,e.withDirectives)((0,e.createElementVNode)("div",Da,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.microSiteId=e}),class:"form-select select",onChange:n[1]||(n[1]=function(e){return i.fetchNewData()})},[n[24]||(n[24]=(0,e.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.microsites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,Ma)}),256))],544),[[e.vModelSelect,r.microSiteId]])],512),[[e.vShow,i.hasMicrosites]]),(0,e.createElementVNode)("div",Ta,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return r.categoryId=e}),class:"form-select select",onChange:n[3]||(n[3]=function(e){return i.fetchNewData()})},[n[25]||(n[25]=(0,e.createElementVNode)("option",null,"Select a Category",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.categories,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.category_id},(0,e.toDisplayString)(t.name),9,Ia)}),256))],544),[[e.vModelSelect,r.categoryId]])]),(0,e.createElementVNode)("div",Oa,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return r.platformId=e}),class:"form-select select",onChange:n[5]||(n[5]=function(e){return i.fetchNewData()})},[n[26]||(n[26]=(0,e.createElementVNode)("option",null,"Select a Platform",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.platforms,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,Pa)}),256))],544),[[e.vShow,i.hasPlatformMoreThanOne],[e.vModelSelect,r.platformId]])]),(0,e.withDirectives)((0,e.createElementVNode)("div",La,[(0,e.createElementVNode)("span",{class:"hand",title:"Click to see theme info",onClick:n[6]||(n[6]=function(e){return i.showInfo("theme",r.themeInfo.id)})},[n[27]||(n[27]=(0,e.createTextVNode)("Theme: ",-1)),(0,e.createElementVNode)("u",null,(0,e.toDisplayString)(r.themeInfo.name),1)])],512),[[e.vShow,i.hasTheme]]),(0,e.createElementVNode)("div",ja,[i.hasTheme?((0,e.openBlock)(),(0,e.createElementBlock)("div",Fa,[i.canDelete?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,"aria-label":"Delete All Modules form this category",class:"btn btn-danger",title:"Delete All Modules form this category",type:"button",onClick:n[7]||(n[7]=function(e){return i.showHideDeleteAlert(!0)})},Aa(n[28]||(n[28]=[(0,e.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-trash-o"},null,-1)])))):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("button",{"aria-label":"Copy Data From",class:"btn btn-outline-secondary",title:"Copy Data From",type:"button",onClick:n[8]||(n[8]=function(e){return i.showHideCopyAlert(!0)})},Aa(n[29]||(n[29]=[(0,e.createElementVNode)("span",{"aria-hidden":"true",class:"fa fa-copy"},null,-1)])))])):(0,e.createCommentVNode)("v-if",!0)])]),i.hasError?((0,e.openBlock)(),(0,e.createElementBlock)("div",Ra,[(0,e.createElementVNode)("div",Ua,[(0,e.createElementVNode)("div",Ha,[(0,e.createElementVNode)("ul",null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.errors,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{innerHTML:t.message},null,8,$a)}),256))])])])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",za,[(0,e.createElementVNode)("div",qa,[(0,e.createElementVNode)("div",Ka,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.hooks,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("div",{ref_for:!0,ref:"panel_"+t.info.id,class:"col-4"},[(0,e.createElementVNode)("div",Wa,[(0,e.createElementVNode)("div",{class:"card-header hook-header",onDblclick:function(e){return i.showHideHookPanel(t.info.id)}},[(0,e.createElementVNode)("span",Xa,[(0,e.createElementVNode)("span",{class:(0,e.normalizeClass)("fa hand fa-expand"),title:"Expand/Contract",onClick:function(e){return i.onlyMe(t.info.id,e)}},null,8,Ya),n[30]||(n[30]=(0,e.createTextVNode)(" ",-1)),(0,e.createElementVNode)("span",{class:"fa fa-minus hand",title:"Minimize/Maximize",onClick:function(e){return i.showHideHookPanel(t.info.id)}},null,8,Ga)]),(0,e.createElementVNode)("a",{href:"javascript:void(0)",onClick:function(e){return i.showInfo("hook",t.info.id)}},(0,e.toDisplayString)(t.info.name),9,Za)],40,Ja),(0,e.createElementVNode)("div",{ref_for:!0,ref:"hook_panel_"+t.info.id,class:"card-body hook_modules js_modules"},[(0,e.createElementVNode)("ul",{"data-hook-id":t.info.id,class:"list-group list-group-flush modules-list js_modules js_hook_modules"},[t.modules.length>0?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:0},(0,e.renderList)(t.modules,function(n){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{"data-module-id":n.id,class:"js_item"},[(0,e.createElementVNode)("a",{href:"javascript:void(0)",onClick:function(e){return i.showInfo("module",n.id)}},(0,e.toDisplayString)(n.name),9,tr),i.canDelete?((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:0,"data-hook-id":t.info.id,class:"js_delete delete hand pull-right fa fa-trash-o",title:"Delete this module from the hook"},null,8,nr)):(0,e.createCommentVNode)("v-if",!0)],8,er)}),256)):(0,e.createCommentVNode)("v-if",!0)],8,Qa)],512),i.hasAnyModulesInAHook(t)&&i.canDelete?((0,e.openBlock)(),(0,e.createElementBlock)("div",or,[(0,e.createElementVNode)("span",{onClick:function(e){return i.deleteAllModuleFromHook(t.info.id)},class:"js_delete_from_hook hand pull-right fa fa-trash-o",title:"Delete all module from this hook","data-hook-id":t.info.id},null,8,ar)])):(0,e.createCommentVNode)("v-if",!0)])],512)}),256)),i.hasTheme?((0,e.openBlock)(),(0,e.createElementBlock)("div",rr,[(0,e.createElementVNode)("button",{class:(0,e.normalizeClass)(i.saveButtonCss),type:"button",onClick:n[9]||(n[9]=function(e){return i.saveModules()})}," Save Now! ",2)],512)):(0,e.createCommentVNode)("v-if",!0)])]),i.hasError?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("div",ir,[(0,e.createElementVNode)("div",sr,[(0,e.createElementVNode)("div",lr,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[10]||(n[10]=function(e){return r.searchKey=e}),"aria-describedby":"basic-addon3",class:"form-control",placeholder:"Search by id, name or alias",type:"text"},null,512),[[e.vModelText,r.searchKey]])])]),(0,e.createElementVNode)("ul",cr,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.filterModules,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{"data-module-id":t.id,class:"js_item"},[(0,e.createElementVNode)("span",{innerHTML:t.name},null,8,ur),n[31]||(n[31]=(0,e.createElementVNode)("span",{class:"delete hand pull-right fa fa-trash-o"},null,-1))],8,dr)}),256))])]))]),(0,e.createVNode)(s,{ref:"copyBox","data-show-footer":"true","data-modal-css":i.modalCss},{title:(0,e.withCtx)(function(){return Aa(n[32]||(n[32]=[(0,e.createTextVNode)(" Copy Data ",-1)]))}),content:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",hr,[n[37]||(n[37]=(0,e.createElementVNode)("div",{class:"col-1 p-1"},[(0,e.createElementVNode)("label",{class:"col-md-3 d-flex"},"From:")],-1)),i.hasSiteMoreThanOne?((0,e.openBlock)(),(0,e.createElementBlock)("div",mr,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return r.fromData.site_id=e}),class:"form-select select-sm"},[n[33]||(n[33]=(0,e.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allSites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,fr)}),256))],512),[[e.vModelSelect,r.fromData.site_id]])])):(0,e.createCommentVNode)("v-if",!0),i.hasMicrosites?((0,e.openBlock)(),(0,e.createElementBlock)("div",pr,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[12]||(n[12]=function(e){return r.fromData.microsite_id=e}),class:"form-select select-sm"},[n[34]||(n[34]=(0,e.createElementVNode)("option",{value:"0"},"Select a Microsite",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.microsites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,gr)}),256))],512),[[e.vModelSelect,r.fromData.microsite_id]])])):(0,e.createCommentVNode)("v-if",!0),i.hasPlatformMoreThanOne?((0,e.openBlock)(),(0,e.createElementBlock)("div",vr,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return r.fromData.platform_id=e}),class:"form-select select-sm"},[n[35]||(n[35]=(0,e.createElementVNode)("option",{value:"0"},"Select a Platform",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.platforms,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,yr)}),256))],512),[[e.vModelSelect,r.fromData.platform_id]])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",br,[(0,e.withDirectives)((0,e.createElementVNode)("select",{class:"form-select select-sm","onUpdate:modelValue":n[14]||(n[14]=function(e){return r.fromData.category_id=e})},[n[36]||(n[36]=(0,e.createElementVNode)("option",{value:"0"},"Select a Category",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.fromCategories,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.category_id},(0,e.toDisplayString)(t.name),9,wr)}),256))],512),[[e.vModelSelect,r.fromData.category_id]])])]),(0,e.createElementVNode)("div",Er,[n[42]||(n[42]=(0,e.createElementVNode)("div",{class:"col-1 p-1"},[(0,e.createElementVNode)("label",{class:"col-md-3 d-flex"},"To:")],-1)),i.hasSiteMoreThanOne?((0,e.openBlock)(),(0,e.createElementBlock)("div",Sr,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[15]||(n[15]=function(e){return r.toData.site_id=e}),class:"form-select select-sm"},[n[38]||(n[38]=(0,e.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allSites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,kr)}),256))],512),[[e.vModelSelect,r.toData.site_id]])])):(0,e.createCommentVNode)("v-if",!0),i.hasMicrosites?((0,e.openBlock)(),(0,e.createElementBlock)("div",_r,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[16]||(n[16]=function(e){return r.toData.microsite_id=e}),class:"form-select select-sm"},[n[39]||(n[39]=(0,e.createElementVNode)("option",{value:"0"},"Select a MicroSite",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.microsites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,Nr)}),256))],512),[[e.vModelSelect,r.toData.microsite_id]])])):(0,e.createCommentVNode)("v-if",!0),i.hasPlatformMoreThanOne?((0,e.openBlock)(),(0,e.createElementBlock)("div",Cr,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[17]||(n[17]=function(e){return r.toData.platform_id=e}),class:"form-select select-sm"},[n[40]||(n[40]=(0,e.createElementVNode)("option",{value:"0"},"Select a Platform",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.platforms,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,Br)}),256))],512),[[e.vModelSelect,r.toData.platform_id]])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",Ar,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[18]||(n[18]=function(e){return r.toData.category_id=e}),class:"form-select select-sm"},[n[41]||(n[41]=(0,e.createElementVNode)("option",{value:"0"},"Select a Category",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.toCategories,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.category_id},(0,e.toDisplayString)(t.name),9,xr)}),256))],512),[[e.vModelSelect,r.toData.category_id]])])]),(0,e.createElementVNode)("div",Vr,[(0,e.withDirectives)((0,e.createElementVNode)("div",Dr,Aa(n[43]||(n[43]=[(0,e.createElementVNode)("div",{class:"alert alert-info"},[(0,e.createTextVNode)(" Please do not select "),(0,e.createElementVNode)("strong",null,"source platform"),(0,e.createTextVNode)(" if you want to copy modules in all platforms respectively. ")],-1)])),512),[[e.vShow,i.hasPlatformMoreThanOne]])])]}),footer:(0,e.withCtx)(function(){return[(0,e.withDirectives)((0,e.createElementVNode)("div",Mr,Aa(n[44]||(n[44]=[(0,e.createTextVNode)(" Please wait... ",-1),(0,e.createElementVNode)("span",{class:"fa fa-loader"},null,-1)])),512),[[e.vShow,r.isWorking]]),(0,e.createElementVNode)("button",{class:"btn btn-success btn-from-submit",onClick:n[19]||(n[19]=function(e){return i.copyDataFromCategory()})}," Copy Now "),(0,e.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[20]||(n[20]=function(e){return i.showHideCopyAlert(!1)})}," Cancel ")]}),_:1},8,["data-modal-css"]),(0,e.createVNode)(s,{ref:"deleteBox","data-show-footer":"true","data-title-css":"alert-danger"},{title:(0,e.withCtx)(function(){return Aa(n[45]||(n[45]=[(0,e.createTextVNode)(" Warning!!! ",-1)]))}),content:(0,e.withCtx)(function(){return[n[47]||(n[47]=(0,e.createElementVNode)("span",{class:"text-danger"},"Are you sure to delete all modules from this category? Can't be undone.",-1)),(0,e.createElementVNode)("div",null,[(0,e.withDirectives)((0,e.createElementVNode)("label",Tr,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[21]||(n[21]=function(e){return r.applicableForAllPlatforms=e}),type:"checkbox"},null,512),[[e.vModelCheckbox,r.applicableForAllPlatforms]]),n[46]||(n[46]=(0,e.createTextVNode)(" Delete from other platforms too",-1))],512),[[e.vShow,i.hasPlatformMoreThanOne]])])]}),footer:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("button",{class:"btn btn-danger",onClick:n[22]||(n[22]=function(e){return i.deleteAllFromCategory()})}," Yes "),(0,e.createElementVNode)("button",{class:"btn btn-outline-secondary",onClick:n[23]||(n[23]=function(e){return i.showHideDeleteAlert(!1)})}," No ")]}),_:1},512),(0,e.createVNode)(l,{ref:"infoPopup"},null,512)],64)}]]),Wr={mounted:function(){for(var e in this)this.hasOwnProperty(e)},methods:{getAllInputs:function(){console.log("all inputs")}}},Jr=(0,w.A)(Wr,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.renderSlot)(t.$slots,"default")])}]]);function Xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Yr={class:"row"},Gr={class:"col-auto d-flex"},Zr={class:"row"},Qr={key:0,class:"spinner-border text-info",role:"status"},ei={class:"col-auto m-1 border"},ti=["src","onClick"],ni={key:1},oi={class:"container-fluid"};function ai(e){return function(e){if(Array.isArray(e))return ri(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ri(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ri(e,t):void 0}}(e)||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 ri(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const ii={components:{"modal-box":ie,"file-uploader":fo},props:["dataModel","dataModuleRelations","dataId","dataEditor"],mounted:function(){var e=this;U.on("gallery-image-uploaded",function(t){e.data=[].concat(ai(t.data),ai(e.data))})},computed:{galleryCreate:function(){return g.admin_path("gallery/create?return_url="+encodeURIComponent(window.location.href))}},data:function(){return{data:[],loading:!1,searchKey:"",editor:this.dataEditor,form:{file:""}}},methods:{loadData:function(){var e=this;this.data=[],this.loading=!0;var t=g.admin_path("gallery/getAllImages");axios.get(t).then(function(t){e.data=t.data}).catch(function(e){console.log(e)}).finally(function(){e.loading=!1})},getImage:function(e){return g.get_media("".concat(e))},insertContentToEditor:function(e){e='<img src="'.concat(e,'" />'),this.editor&&this.editor.insertContent(e),this.close()},searchImages:function(){var e=this;if(this.searchKey.length>0){this.data=[],this.loading=!0;var t=g.admin_path("gallery/searchImages/".concat(this.searchKey));axios.get(t).then(function(t){e.data=t.data}).catch(function(e){console.log(e)}).finally(function(){e.loading=!1})}else this.loadData()},open:function(e){this.loadData(),e&&(this.editor=e),this.$refs.imageModalBox.open(),U.emit("image-gallery-open")},close:function(){this.$refs.imageModalBox.close(),U.emit("image-gallery-close")}}},si=(0,w.A)(ii,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("file-uploader"),l=(0,e.resolveComponent)("modal-box");return(0,e.openBlock)(),(0,e.createBlock)(l,{ref:"imageModalBox","data-show-footer":"true"},{title:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",Yr,[n[3]||(n[3]=(0,e.createElementVNode)("div",{class:"col-2"},"Gallery",-1)),(0,e.createElementVNode)("div",Gr,[(0,e.withDirectives)((0,e.createElementVNode)("input",{type:"text",class:"form-control me-1",placeholder:"Search image",onKeydown:n[0]||(n[0]=(0,e.withKeys)(function(){return i.searchImages&&i.searchImages.apply(i,arguments)},["enter"])),"onUpdate:modelValue":n[1]||(n[1]=function(e){return r.searchKey=e})},null,544),[[e.vModelText,r.searchKey]]),(0,e.createElementVNode)("input",{type:"button",class:"btn btn-secondary me-1",value:"Search",onClick:n[2]||(n[2]=function(){return i.searchImages&&i.searchImages.apply(i,arguments)})})])])]}),content:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",Zr,[r.loading?((0,e.openBlock)(),(0,e.createElementBlock)("span",Qr,(t=n[4]||(n[4]=[(0,e.createElementVNode)("span",{class:"visually-hidden"},"Loading...",-1)]),function(e){if(Array.isArray(e))return Xr(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Xr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xr(e,t):void 0}}(t)||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.")}()))):(0,e.createCommentVNode)("v-if",!0),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.data,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("div",ei,[(0,e.createElementVNode)("img",{src:i.getImage(t.path),width:"100",onClick:function(e){return i.insertContentToEditor(i.getImage(t.path))}},null,8,ti)])}),256)),0===r.data.length&&!1===r.loading?((0,e.openBlock)(),(0,e.createElementBlock)("div",ni,"No images found")):(0,e.createCommentVNode)("v-if",!0)])];var t}),footer:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",oi,[(0,e.createVNode)(s,{"data-accept":"image/*"})])]}),_:1},512)}]]);var li=["onClick","title"],ci={class:"card mb-3 shadow info-box"},di={class:"card-body"},ui={class:"card-title"},hi=["href"],mi=["innerHTML"],fi={key:1,class:"info-box-text"},pi={key:0,class:"card-text text-center"},gi=new p.Storage;const vi={mounted:function(){},props:["dataInfo","dataColorIndex","dataSubTitle","dataTitle","dataIconCss","dataLink"],data:function(){return{info:void 0===this.dataInfo?null:"string"==typeof this.dataInfo?JSON.parse(this.dataInfo):this.dataInfo,subTitle:void 0!==this.dataSubTitle?this.dataSubTitle:"",iconCss:this.dataIconCss,link:void 0===this.dataLink?"":this.dataLink}},computed:{content:function(){return null!==this.info?this.info.name||this.info.title:this.dataTitle},icon:function(){return void 0!==this.iconCss&&""!==this.iconCss||null===this.info?this.iconCss:this.info.icon_css||this.info.iconCss}},methods:{getIconText:function(){var e;return null!==(e=this.info)&&void 0!==e&&e.icon_css||void 0===this.iconCss?this.content.replace(/[^a-zA-Z- ]/g,"").match(/\b\w/g).join(""):""},getColor:function(){return"color-"+(this.dataColorIndex?this.dataColorIndex:this.getSerialNumber())},getRandom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return e=parseInt(e),t=parseInt(t),Math.floor(Math.random()*(t-e))+e},getSerialNumber:function(){void 0===gi.fetch("counter")&&gi.store("counter",1);var e=gi.fetch("counter");return e>10&&(e=1),gi.store("counter",e+1),e}}},yi=(0,w.A)(vi,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",ci,[(0,e.createElementVNode)("span",{class:(0,e.normalizeClass)(i.getColor()+" info-box-icon")},[(0,e.createElementVNode)("i",{style:{"font-style":"normal"},class:(0,e.normalizeClass)(i.icon)},(0,e.toDisplayString)(i.getIconText()),3)],2),(0,e.createElementVNode)("div",di,[(0,e.createElementVNode)("h5",ui,[""!==r.link?((0,e.openBlock)(),(0,e.createElementBlock)("a",{key:0,href:r.link,class:"info-box-text"},[(0,e.createElementVNode)("span",{class:"info-box-text",innerHTML:i.content},null,8,mi)],8,hi)):(0,e.createCommentVNode)("v-if",!0),""===r.link?((0,e.openBlock)(),(0,e.createElementBlock)("span",fi,(0,e.toDisplayString)(i.content),1)):(0,e.createCommentVNode)("v-if",!0)]),""!==r.subTitle?((0,e.openBlock)(),(0,e.createElementBlock)("p",pi,(0,e.toDisplayString)(r.subTitle),1)):(0,e.createCommentVNode)("v-if",!0)])])}]]),bi={components:{"info-box":yi},mounted:function(){},props:["dataModules","dataModulesAllowed","dataIsAdmin"],data:function(){return{modulesAllowed:this.dataModulesAllowed?JSON.parse(this.dataModulesAllowed):[]}},computed:{allModules:function(){return(void 0===this.dataModules?[]:JSON.parse(this.dataModules)).child}},methods:{navigate:function(e){window.location=g.admin_path(e.controller_name)},hasAccess:function(e){if("1"==this.dataIsAdmin.toString())return!0;for(var t=0;t<this.modulesAllowed.length;t++)if(this.modulesAllowed[t].module_id==e)return!0;return!1}}},wi=(0,w.A)(bi,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("info-box");return(0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.allModules,function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[i.hasAccess(t.id)?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,class:"col-auto hand",onClick:function(e){return i.navigate(t)},title:t.name},[((0,e.openBlock)(),(0,e.createBlock)(s,{key:t.name+n,"data-title":t.name,"data-sub-title":t.sub_title,"data-icon-css":t.icon_css},null,8,["data-title","data-sub-title","data-icon-css"]))],8,li)):(0,e.createCommentVNode)("v-if",!0)],64)}),256)}]]),Ei=wi;var Si={class:"col-lg-6"},ki={class:"mb-2"},_i=["value"],Ni={class:"text text-danger"},Ci={class:"mb-2"},Bi=["value"],Ai={class:"text text-danger"},xi={class:"mb-2"},Vi={class:"text text-danger"},Di={class:"row"};const Mi={mounted:function(){},props:["dataLanguages","dataLanguageTables"],data:function(){return{languages:this.dataLanguages&&"null"!==this.dataLanguages?JSON.parse(this.dataLanguages):[],languageTables:this.dataLanguageTables&&"null"!==this.dataLanguageTables?JSON.parse(this.dataLanguageTables):[],messages:[],form:new wa({tables:[],sourceLang:"",targetLang:""}),errors:{},saveUrl:"language/translateNow",errorMessage:""}},methods:{getCss:function(e){return 0===e.status?"text text-danger":"text text-success"},showError:function(e){for(var t in e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},onSuccess:function(e){console.log(e),0===e.isSaved?(W.show(this,e.message),this.errorMessage={},this.errorMessage=e.message):(this.errorMessage="",this.messages=e.message)},saveNow:function(){var e=this,t=g.admin_path(this.saveUrl);return this.form.post(t).then(function(t){return e.onSuccess(t)}).catch(function(t){return e.showError(t)}),!1}}},Ti=(0,w.A)(Mi,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.createElementVNode)("div",Si,[(0,e.createElementVNode)("form",{id:"addEditFrm",method:"post",class:"form-horizontal",role:"form",onSubmit:n[6]||(n[6]=(0,e.withModifiers)(function(){return i.saveNow&&i.saveNow.apply(i,arguments)},["prevent"])),onKeyup:n[7]||(n[7]=function(e){return i.hideErrorMessage(e)})},[(0,e.createElementVNode)("div",null,[(0,e.createElementVNode)("div",ki,[n[9]||(n[9]=(0,e.createElementVNode)("p",null,[(0,e.createElementVNode)("strong",null,"Source Language:"),(0,e.createTextVNode)(" Data will be copied from the selected lanuage ")],-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{required:"",name:"sourceLang",class:"form-select","onUpdate:modelValue":n[0]||(n[0]=function(e){return r.form.sourceLang=e}),onChange:n[1]||(n[1]=function(e){return i.hideErrorMessage(e)})},[n[8]||(n[8]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.languages,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name)+" - "+(0,e.toDisplayString)(t.iso_code),9,_i)}),256))],544),[[e.vModelSelect,r.form.sourceLang]]),(0,e.createElementVNode)("div",Ni,(0,e.toDisplayString)(this.errors.sourceLang),1)])]),(0,e.createElementVNode)("div",null,[(0,e.createElementVNode)("div",Ci,[n[11]||(n[11]=(0,e.createElementVNode)("p",null,[(0,e.createElementVNode)("strong",null,"Target Language:"),(0,e.createTextVNode)(" New record will be inserted with this language id in selected tables ")],-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{required:"",name:"targetLang",class:"form-select","onUpdate:modelValue":n[2]||(n[2]=function(e){return r.form.targetLang=e}),onChange:n[3]||(n[3]=function(e){return i.hideErrorMessage(e)})},[n[10]||(n[10]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.languages,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name)+" - "+(0,e.toDisplayString)(t.iso_code),9,Bi)}),256))],544),[[e.vModelSelect,r.form.targetLang]]),(0,e.createElementVNode)("div",Ai,(0,e.toDisplayString)(this.errors.targetLang),1)])]),(0,e.createElementVNode)("div",null,[(0,e.createElementVNode)("div",xi,[n[12]||(n[12]=(0,e.createElementVNode)("p",null,"Select tables",-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{required:"",style:{height:"200px"},name:"tables",class:"form-select",multiple:"","onUpdate:modelValue":n[4]||(n[4]=function(e){return r.form.tables=e}),onChange:n[5]||(n[5]=function(e){return i.hideErrorMessage(e)})},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.languageTables,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",null,(0,e.toDisplayString)(t.name),1)}),256))],544),[[e.vModelSelect,r.form.tables]]),(0,e.createElementVNode)("div",Vi,(0,e.toDisplayString)(this.errors.tables),1)])]),(0,e.createElementVNode)("div",Di,[(0,e.withDirectives)((0,e.createElementVNode)("div",{class:"alert alert-danger"},(0,e.toDisplayString)(r.errorMessage),513),[[e.vShow,"string"==typeof r.errorMessage&&""!=r.errorMessage]]),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.messages,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("div",{class:(0,e.normalizeClass)(i.getCss(t))},(0,e.toDisplayString)(t.message),3)}),256)),n[13]||(n[13]=(0,e.createElementVNode)("div",{class:"form-group center-align"},[(0,e.createElementVNode)("input",{type:"submit",name:"submit",value:"Submit and Hold on",class:"btn btn-success btn-large"})],-1))])],32)])])}]]);var Ii={class:"d-flex flex-column flex-shrink-0 t_left js_left_menu"},Oi={class:"list-unstyled ps-0"},Pi={key:0},Li=["title","href"],ji=["title","href"],Fi={class:"dropdown"},Ri=["href"];const Ui={mounted:function(){},props:["dataList","dataControllerName","dataModulesAllowed","dataIsAdmin","dataHashtagcmsVersion"],data:function(){return{allData:this.dataList?JSON.parse(this.dataList):[],modulesAllowed:this.dataModulesAllowed?JSON.parse(this.dataModulesAllowed):[]}},computed:{linkForHashtag:function(){return"https://www.hashtagcms.org/?utm_src=".concat(window.location.href)}},methods:{getIconLabel:function(e){return""!==e.icon_css&&e.icon_css?"":e.controller_name.charAt(0).toUpperCase()},getIconCss:function(e){return""!==e.icon_css&&e.icon_css?e.icon_css:"badge badge-info text-small"},hasChild:function(e){return e.child.length>0},getActiveCss:function(e,t){return this.isActive(e,t)?"active":""},isActive:function(e,t){if(this.dataControllerName===e)return!0;if(t&&t.child&&t.child.length>0){var n=this.dataControllerName;return t.child.find(function(e){return e.controller_name===n})}},getHref:function(e){return g.admin_path(e.controller_name)},hideAll:function(){document.querySelectorAll(".js_left_menu .js_child").forEach(function(e){e.classList.remove("active","animated","fadeIn")})},showHide:function(e){this.hideAll();var t=e.target;t.classList.contains("js_more")&&(e.preventDefault(),t.parentElement.nextElementSibling.classList.add("active","animated","fadeIn"))},hasAccess:function(e){if("1"===this.dataIsAdmin.toString())return!0;for(var t=0;t<this.modulesAllowed.length;t++)if(this.modulesAllowed[t].module_id===e)return!0;return!1},getMinHeight:function(){return"height:".concat(window.innerHeight,"px;")}}},Hi=(0,w.A)(Ui,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",Ii,[(0,e.createElementVNode)("ul",Oi,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allData,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[0===t.parent_id?((0,e.openBlock)(),(0,e.createElementBlock)("li",Pi,[(0,e.createElementVNode)("a",{title:t.sub_title,href:i.getHref(t),class:(0,e.normalizeClass)("text-white "+i.getActiveCss(t.controller_name,t)),"aria-expanded":"true"},[i.hasChild(t)?((0,e.openBlock)(),(0,e.createElementBlock)("i",{key:0,class:"js_more fa fa-ellipsis-v pull-right adjustMore",onClick:n[0]||(n[0]=function(e){return i.showHide(e)})})):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("i",{class:(0,e.normalizeClass)(t.icon_css+" fa-icons"),"aria-hidden":"true"},null,2),(0,e.createTextVNode)(" "+(0,e.toDisplayString)(t.name),1)],10,Li),i.hasChild(t)?((0,e.openBlock)(),(0,e.createElementBlock)("ul",{key:0,class:(0,e.normalizeClass)("js_child btn-toggle-nav list-unstyled fw-normal "+i.getActiveCss(t.controller_name,t))},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.child,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",null,[(0,e.createElementVNode)("a",{title:t.sub_title,href:i.getHref(t),class:(0,e.normalizeClass)("text-white "+i.getActiveCss(t.controller_name,t))},[(0,e.createElementVNode)("i",{class:(0,e.normalizeClass)(t.icon_css+" fa-icons"),"aria-hidden":"true"},null,2),(0,e.createTextVNode)(" "+(0,e.toDisplayString)(t.name),1)],10,ji)])}),256))],2)):(0,e.createCommentVNode)("v-if",!0)])):(0,e.createCommentVNode)("v-if",!0)],64)}),256))]),n[1]||(n[1]=(0,e.createElementVNode)("hr",null,null,-1)),(0,e.createElementVNode)("div",Fi,[(0,e.createElementVNode)("a",{title:"Open HashtagCMS.org",href:i.linkForHashtag,target:"_blank",class:"d-flex align-items-center text-light text-decoration-none","data-bs-toggle":"dropdown","aria-expanded":"false"},[(0,e.createElementVNode)("strong",null,"v"+(0,e.toDisplayString)(o.dataHashtagcmsVersion),1)],8,Ri)])])}]]);function $i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var zi={key:0},qi={class:"sortable-list js_sortable"},Ki=["data-id"],Wi=["innerHTML"],Ji={key:0,class:"inline"},Xi=["for"],Yi=["id"],Gi={class:"child accordion-body js_sortable"},Zi=["data-id"],Qi={key:1,class:"center-align mt-3"};const es={components:{"split-button":S},mounted:function(){this.enableSorting()},props:["dataAllData","dataFields","dataControllerName","dataControllerChildName","dataGroups","dataGroupName","dataShowGroups"],data:function(){return{allData:this.dataAllData&&"null"!==this.dataAllData?JSON.parse(this.dataAllData):[],groups:this.dataGroups&&""!==this.dataGroups?JSON.parse(this.dataGroups):[],groupName:this.dataGroupName&&""!==this.dataGroupName?this.dataGroupName:"",showGroups:!(!this.dataShowGroups||"true"!==this.dataShowGroups)}},computed:{fields:function(){var e=this.dataFields&&"null"!==this.dataFields?JSON.parse(this.dataFields):null;return null===e&&((e={}).id="id",e.label="name",e.isImage=!1),e},controllerName:function(){return(void 0===this.dataControllerName?"":this.dataControllerName.toLowerCase()).replace(/\s/g,"")},controlerChildName:function(){return(void 0===this.dataControllerChildName?"":this.dataControllerChildName.toLowerCase()).replace(/\s/g,"")},selectedIndex:function(){for(var e=0,t=0;t<this.groups.length;t++)if(this.groups[t]===this.groupName){e=t;break}return e}},methods:{isParent:function(e){return 0===e.parent_id||!e.parent_id},arrangeAgain:function(e){window.location.href=g.admin_path(this.controllerName+"/sort/"+e.value)},hasChild:function(e){return e.child&&e.child.length>0},getName:function(e){if(!0===this.fields.isImage){var t=e[this.fields.label]?g.get_media(e[this.fields.label]):g.get_media(e.lang[this.fields.label]);return"<a href='".concat(t,"' target='_blank'><img height='30' src='").concat(t,"' /></a>")}return e[this.fields.label]?e[this.fields.label]:e.lang[this.fields.label]},getId:function(e){return e[this.fields.id]},enableSorting:function(){this.$nextTick(function(){document.querySelectorAll(".js_sortable").forEach(function(e){Jn.create(e,{animation:500,ghostClass:"text-danger",onUpdate:function(e){}})})})},submit:function(e,t,n,o){var a=this;return J.show(this,"Please wait. Saving sorting data..."),new Promise(function(r,i){axios[e](t,n).then(function(e){a.onSuccess(e,o)}).catch(function(e){a.onFailure(e.response)}).finally(function(){J.hide(a)})})},updateIndex:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.querySelectorAll(".item"),n=[],o=this.controllerName,a=!0;""!==this.controlerChildName&&(a=!1),o=!0===e?this.controllerName:""!==this.controlerChildName?this.controlerChildName:this.controllerName;var r=1;console.log("saveAll "+a),t.forEach(function(t,o){if(!0===a){var i=t.getAttribute("data-id"),s=r;n.push({position:s,where:{id:parseInt(i)}}),r+=1}else{var l=t.getAttribute("data-is-parent");if(t.getAttribute("data-id"),e.toString()===l.toString()){var c=t.getAttribute("data-id"),d=r;n.push({position:d,where:{id:parseInt(c)}}),r+=1}}});var i=g.admin_path(o+"/updateIndex");this.submit("post",i,n,o)},onSuccess:function(e,t){W.show(this,t.toUpperCase()+" Sorted.")},onFailure:function(e){W.show(this,(null==e?void 0:e.statusText)||"There is some error! Don't know the reason",5e3),console.log(e)},setData:function(e){this.allData=e}}},ts=(0,w.A)(es,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("split-button");return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[r.showGroups?((0,e.openBlock)(),(0,e.createElementBlock)("h4",zi,[n[1]||(n[1]=(0,e.createTextVNode)(" Arrange Menus ",-1)),(0,e.createVNode)(s,{"data-options":r.groups,onChange:i.arrangeAgain,"data-selected":i.selectedIndex},null,8,["data-options","onChange","data-selected"])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("ul",qi,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allData,function(t,o){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[i.isParent(t)?((0,e.openBlock)(),(0,e.createElementBlock)("li",{key:0,"data-is-parent":"true",class:"item","data-id":i.getId(t)},[(0,e.createElementVNode)("span",{innerHTML:i.getName(t)},null,8,Wi),i.hasChild(t)?((0,e.openBlock)(),(0,e.createElementBlock)("div",Ji,[(0,e.createElementVNode)("label",{for:"item_"+o,class:"accordion-header pull-right"},(a=n[2]||(n[2]=[(0,e.createElementVNode)("span",{class:"fa fa-ellipsis-v ellipsis"},null,-1)]),function(e){if(Array.isArray(e))return $i(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return $i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$i(e,t):void 0}}(a)||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.")}()),8,Xi),(0,e.createElementVNode)("input",{id:"item_"+o,type:"checkbox",class:"accordion-control"},null,8,Yi),(0,e.createElementVNode)("ul",Gi,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.child,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{"data-is-parent":"false",class:"item","data-id":i.getId(t)},(0,e.toDisplayString)(i.getName(t)),9,Zi)}),256))])])):(0,e.createCommentVNode)("v-if",!0)],8,Ki)):(0,e.createCommentVNode)("v-if",!0)],64);var a}),256))]),r.allData.length>1?((0,e.openBlock)(),(0,e.createElementBlock)("div",Qi,[(0,e.createElementVNode)("input",{type:"button",class:"btn btn-success btn-from-submit",value:"Save",onClick:n[0]||(n[0]=function(e){return i.updateIndex()})})])):(0,e.createCommentVNode)("v-if",!0)])}]]),ns=ts;function os(e){return function(e){if(Array.isArray(e))return as(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return as(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?as(e,t):void 0}}(e)||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 as(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var rs=["action"],is={class:"form-group row"},ss={class:"col-sm-10"},ls={class:"form-group row"},cs={class:"col-sm-7"},ds={class:"text text-danger"},us={class:"form-group row"},hs={class:"col-sm-7"},ms={class:"text text-danger"},fs={class:"form-group row"},ps={class:"col-sm-7"},gs={class:"text text-danger"},vs={class:"form-group row"},ys={class:"col-sm-7"},bs=["value"],ws={class:"text text-danger"},Es={class:"form-group row"},Ss={class:"col-sm-7"},ks={class:"text text-danger"},_s={class:"form-group row"},Ns={class:"col-sm-7"},Cs={class:"text text-danger"},Bs={class:"form-group row"},As={class:"col-sm-7"},xs={class:"text text-danger"},Vs={key:0},Ds={class:"form-group row"},Ms={class:"col-sm-7"},Ts=["value"],Is={class:"col-sm-5"},Os={key:0,class:"models"},Ps={class:"form-group row"},Ls={class:"col-sm-7"},js=["value"],Fs={key:0,class:"fieldset"},Rs={class:"models_row"},Us={class:"models"},Hs=["value","onChange"],$s=["onChange"],zs=["onUpdate:modelValue"],qs=["onClick"],Ks={key:0,class:"row"},Ws={key:1,class:"form-group row"},Js={class:"col-auto"},Xs={class:"card shadow-sm models-box"},Ys={class:"card-header"},Gs={class:"card-body p-0 m-0 tables_panel"},Zs={class:"list-group list-group-flush"},Qs=["onClick"],el={class:"col-auto"},tl={class:"card shadow-sm models-box"},nl={class:"card-header"},ol=["onClick"],al={class:"card-body p-0 m-0 tables_panel"},rl={class:"list-group list-group-flush"},il=["onClick"],sl={key:2,class:"row mt-3"},ll={class:"col"},cl={class:"card shadow-sm"},dl={class:"card-header"},ul={class:"card-body"},hl={id:"selectedFields"},ml=["data-fieldname"],fl=["onClick"],pl={class:"row mt-3"},gl={key:0,class:"alert alert-danger"},vl={class:"form-group center-align"},yl=["href"],bl=__webpack_require__(742),wl=__webpack_require__.n(bl),El=__webpack_require__(127),Sl=__webpack_require__.n(El);function kl(e){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kl(e)}function _l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Nl(o.key),o)}}function Nl(e){var t=function(e){if("object"!=kl(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kl(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kl(t)?t:t+""}var Cl=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"data",get:function(){return{}}},{key:"getFields",value:function(e){return new Promise(function(t,n){wl().get("getFields?table="+e).then(function(e){t(e)}).catch(function(){n(this)})})}}],null&&_l(e.prototype,null),t&&_l(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const Bl={mounted:function(){},props:["dataDatabaseTables","dataControllerName","dataBackUrl","dataCmsModules"],computed:{saveURL:function(){return g.admin_path(this.dataControllerName+"/createModule")}},data:function(){return{allTables:void 0!==this.dataDatabaseTables?JSON.parse(this.dataDatabaseTables):[],allModules:void 0!==this.dataCmsModules?JSON.parse(this.dataCmsModules):[],mainModel:{tableName:"",fields:[],modelName:"",selected:[]},relationModels:{tableName:"",models:[]},form:new wa({name:"",controller_name:"",validator_name:"",dataWith:[],dataSource:"",createFiles:!0,selectedFields:[],relationModels:[],parent_id:"",display_name:"",sub_title:"",icon_css:"",list_view_name:"",edit_view_name:""}),errors:{},cacheData:{},sortable:null,sortingInterval:-1,errorMessage:""}},methods:{updateControllerName:function(e){var t=e||this.form.name;t=t.toLowerCase().replace(/\s/g,""),this.form.controller_name=Sl().singular(t),this.form.validator_name=this.form.controller_name,void 0!==e&&this.isControllerExists(this.form.controller_name),this.form.icon_css=this.form.controller_name},getModelName:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(e=Sl().singular(e)+"::class").split("_");return(t=t.map(function(e){return e.charAt(0).toUpperCase()+e.substr(1,e.length)})).join("")},populateMainDataFields:function(){var e=this;""!==this.mainModel.tableName&&(this.mainModel.fields=["Please wait..."],Cl.getFields(this.mainModel.tableName).then(function(t){e.mainModel.fields=t.data}),this.mainModel.modelName=this.getModelName(this.mainModel.tableName),this.form.dataSource=this.mainModel.modelName)},updateWithData:function(){this.form.dataWith=[];for(var e=0;e<this.relationModels.models.length;e++){var t=this.relationModels.models[e];-1===this.form.dataWith.indexOf(t.relationAlias)&&this.form.dataWith.push(t.relationAlias)}},addRelationModel:function(){var e=this;if(""!==this.relationModels.tableName){var t=this.relationModels.tableName,n=this.getModelName(t);if(!1===this.hasInRelationModel(n)){var o;o=t.endsWith("_langs")||t.endsWith("_sites")?t.endsWith("_langs")?"lang":"site":Sl().singular(t.replace(/_/g,"")).toLowerCase();var a={model:n,relationAlias:o,relationType:"hasMany",isLanguage:"lang"===o,fields:[],selected:[]};this.cacheData[n]||this.relationModels.models.push(a),this.cacheData[n]=a,this.cacheData[n].fields=["Please wait..."],Cl.getFields(t).then(function(t){e.cacheData[n].fields=t.data}),this.updateWithData()}}},hasInRelationModel:function(e){return this.cacheData[e]||!1},updateRelationModel:function(e,t,n){var o=this.relationModels.models[t][n];this.relationModels.models[t][n]=e.target.value,"relationAlias"===n&&(this.relationModels.models[t].selected=[],this.removeSelectedRelationFields(o)),this.updateWithData()},removeSelectedRelationFields:function(e){if(this.mainModel.selected.length>0){for(var t=[],n=0;n<this.mainModel.selected.length;n++){var o=this.mainModel.selected[n];o.startsWith(e+".")||t.push(o)}this.mainModel.selected=t}},removeRelationModel:function(e,t){var n=this.relationModels.models[e].relationAlias;delete this.cacheData[t],this.relationModels.models.splice(e,1),this.relationModels.tableName="",this.removeSelectedRelationFields(n)},hasRelation:function(){return this.relationModels.models.length>0},hasMainDataSource:function(){return""!==this.mainModel.tableName},selectAllField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e.selected.length)e.selected=e.fields.slice(),""!==t&&(e.selected=e.selected.map(function(e){return t+"."+e}));else for(var n=0;n<e.fields.length;n++)this.selectField(e.fields[n],e,t);this.enableSorting()},selectField:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e=""!==n?n+"."+e:e,-1===t.selected.indexOf(e)&&t.selected.push(e),this.enableSorting()},removeField:function(e,t){e.selected.splice(t,1)},removeAllField:function(e){e.selected=[],this.form.selectedFields=[]},isControllerExists:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==e){var t=this;wl().get("isControllerExists?name="+e).then(function(e){1===e.data&&W.show(t,"Controller already exist")})}},createModule:function(){var e=this;this.setSortedFields(),this.form.relationModels=this.relationModels,this.form.post(this.saveURL).then(function(t){return e.resetForm(t)}).catch(function(t){return e.showError(t)})},enableSorting:function(){this.$nextTick(function(){null!=this.sortable&&this.sortable.destroy();var e=document.getElementById("selectedFields");this.sortable=Jn.create(e,{onEnd:this.sortingCallback,onStart:this.cancelSortingCallback})})},cancelSortingCallback:function(){-1!==this.sortingInterval&&clearInterval(this.sortingInterval)},sortingCallback:function(){this.cancelSortingCallback()},setSortedFields:function(){var e=document.querySelectorAll("#selectedFields li"),t=e.length;if(t>1){for(var n=[],o=0;o<t;o++){var a=e[o].getAttribute("data-fieldname");n.push(a)}this.form.selectedFields=n}},showError:function(e){for(var t in this.errors={},e.errors)e.errors.hasOwnProperty(t)&&(this.errors[t]=e.errors[t][0]);this.errorMessage=e.message},hideErrorMessage:function(e){var t=e.target.getAttribute("name");this.errors[t]="",""!==this.errorMessage&&(this.errorMessage="")},resetForm:function(e){this.mainModel={tableName:"",fields:[],modelName:"",selected:[]},this.relationModels={tableName:"",models:[]},0===e.created?(W.show(this,"There is some error..."),this.errorMessage=e.message):W.show(this,"Created...")}}},Al=(0,w.A)(Bl,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.createElementVNode)("form",{action:i.saveURL,class:"form-horizontal",method:"post",role:"form",onKeyup:n[17]||(n[17]=function(e){return i.hideErrorMessage(e)}),onSubmit:n[18]||(n[18]=(0,e.withModifiers)(function(){return i.createModule&&i.createModule.apply(i,arguments)},["prevent"]))},[(0,e.createElementVNode)("div",is,[(0,e.createElementVNode)("label",ss,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.form.createFiles=e}),type:"checkbox",name:"create-validator"},null,512),[[e.vModelCheckbox,r.form.createFiles]]),n[19]||(n[19]=(0,e.createTextVNode)(" Create Files (Controller/Model/View/Vaidator) - ",-1)),n[20]||(n[20]=(0,e.createElementVNode)("small",{class:"text-info"},"Try creating it from terminal command. It might not work due to rights",-1))])]),(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[1]||(n[1]=function(e){return r.form.display_name=e}),type:"hidden"},null,512),[[e.vModelText,r.form.display_name]]),(0,e.createElementVNode)("div",ls,[n[21]||(n[21]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Name",-1)),(0,e.createElementVNode)("div",cs,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[2]||(n[2]=function(e){return r.form.name=e}),class:"form-control",name:"name",placeholder:"Module name",required:"",type:"text",onBlur:n[3]||(n[3]=function(e){return i.updateControllerName()})},null,544),[[e.vModelText,r.form.name]]),(0,e.createElementVNode)("div",ds,(0,e.toDisplayString)(this.errors.name),1)])]),(0,e.createElementVNode)("div",us,[n[22]||(n[22]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Sub Title",-1)),(0,e.createElementVNode)("div",hs,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[4]||(n[4]=function(e){return r.form.sub_title=e}),class:"form-control",name:"name",placeholder:"Sub title",type:"text"},null,512),[[e.vModelText,r.form.sub_title]]),(0,e.createElementVNode)("div",ms,(0,e.toDisplayString)(this.errors.sub_title),1)])]),(0,e.createElementVNode)("div",fs,[n[23]||(n[23]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Controller Name (link rewrite)",-1)),(0,e.createElementVNode)("div",ps,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[5]||(n[5]=function(e){return r.form.controller_name=e}),class:"form-control",name:"controller_name",placeholder:"Controller name",required:"",type:"text",onBlur:n[6]||(n[6]=function(e){return i.updateControllerName(r.form.controller_name)})},null,544),[[e.vModelText,r.form.controller_name]]),(0,e.createElementVNode)("div",gs,(0,e.toDisplayString)(this.errors.controller_name),1)])]),(0,e.createElementVNode)("div",vs,[n[25]||(n[25]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Parent",-1)),(0,e.createElementVNode)("div",ys,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[7]||(n[7]=function(e){return r.form.parent_id=e}),class:"form-select select-big"},[n[24]||(n[24]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allModules,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,bs)}),256))],512),[[e.vModelSelect,r.form.parent_id]]),(0,e.createElementVNode)("div",ws,(0,e.toDisplayString)(this.errors.parent_id),1)])]),(0,e.createElementVNode)("div",Es,[n[26]||(n[26]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Icon CSS",-1)),(0,e.createElementVNode)("div",Ss,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[8]||(n[8]=function(e){return r.form.icon_css=e}),class:"form-control",name:"name",placeholder:"Icon CSS",required:"",type:"text"},null,512),[[e.vModelText,r.form.icon_css]]),(0,e.createElementVNode)("div",ks,(0,e.toDisplayString)(this.errors.icon_css),1)])]),(0,e.createElementVNode)("div",_s,[n[27]||(n[27]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"List View Name",-1)),(0,e.createElementVNode)("div",Ns,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[9]||(n[9]=function(e){return r.form.list_view_name=e}),class:"form-control",name:"name",placeholder:"Enter list view Name (Default list view is common/listing)",type:"text"},null,512),[[e.vModelText,r.form.list_view_name]]),(0,e.createElementVNode)("div",Cs,(0,e.toDisplayString)(this.errors.list_view_name),1)])]),(0,e.createElementVNode)("div",Bs,[n[28]||(n[28]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Edit View Name",-1)),(0,e.createElementVNode)("div",As,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[10]||(n[10]=function(e){return r.form.edit_view_name=e}),class:"form-control",name:"name",placeholder:"Edit list view Name (Default edit view is addedit)",type:"text"},null,512),[[e.vModelText,r.form.edit_view_name]]),(0,e.createElementVNode)("div",xs,(0,e.toDisplayString)(this.errors.edit_view_name),1)])]),r.form.createFiles?((0,e.openBlock)(),(0,e.createElementBlock)("div",Vs,[(0,e.createElementVNode)("div",Ds,[n[30]||(n[30]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Data Source",-1)),(0,e.createElementVNode)("div",Ms,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[11]||(n[11]=function(e){return r.mainModel.tableName=e}),class:"form-select select-big",onChange:n[12]||(n[12]=function(e){return i.populateMainDataFields()})},[n[29]||(n[29]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allTables,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.name},(0,e.toDisplayString)(t.name),9,Ts)}),256))],544),[[e.vModelSelect,r.mainModel.tableName]]),(0,e.createElementVNode)("div",Is,[""!=r.mainModel.tableName?((0,e.openBlock)(),(0,e.createElementBlock)("span",Os,(0,e.toDisplayString)(i.getModelName(r.mainModel.tableName)),1)):(0,e.createCommentVNode)("v-if",!0)])])]),(0,e.createElementVNode)("div",Ps,[n[35]||(n[35]=(0,e.createElementVNode)("label",{class:"col-sm-3"},"Data with? Choose another model.",-1)),(0,e.createElementVNode)("div",Ls,[(0,e.withDirectives)((0,e.createElementVNode)("select",{"onUpdate:modelValue":n[13]||(n[13]=function(e){return r.relationModels.tableName=e}),class:"form-select select-big",onChange:n[14]||(n[14]=function(e){return i.addRelationModel()})},[n[31]||(n[31]=(0,e.createElementVNode)("option",{value:""},"Select",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allTables,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.name},(0,e.toDisplayString)(t.name),9,js)}),256))],544),[[e.vModelSelect,r.relationModels.tableName]]),(0,e.createElementVNode)("div",null,[i.hasRelation()?((0,e.openBlock)(),(0,e.createElementBlock)("fieldset",Fs,[n[34]||(n[34]=(0,e.createElementVNode)("legend",{class:"small legendTitle"},"Relation Models",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.relationModels.models,function(t,o){return(0,e.openBlock)(),(0,e.createElementBlock)("div",Rs,[(0,e.createElementVNode)("span",Us,[(0,e.createTextVNode)((0,e.toDisplayString)(t.model)+" ",1),(0,e.createElementVNode)("input",{value:t.relationAlias,name:"relation",placeholder:"Relation name",type:"text",onChange:function(e){return i.updateRelationModel(e,o,"relationAlias")}},null,40,Hs),(0,e.createElementVNode)("select",{class:"select",name:"relationType",onChange:function(e){return i.updateRelationModel(e,o,"relationType")}},os(n[32]||(n[32]=[(0,e.createElementVNode)("option",{value:"hasMany"},"hasMany",-1),(0,e.createElementVNode)("option",{value:"belongsTo"},"belongsTo",-1),(0,e.createElementVNode)("option",{value:"hasOne"},"hasOne",-1)])),40,$s),n[33]||(n[33]=(0,e.createTextVNode)(" isLanguage: ",-1)),(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":function(e){return t.isLanguage=e},type:"checkbox",name:"relationModel"},null,8,zs),[[e.vModelCheckbox,t.isLanguage]]),(0,e.createElementVNode)("span",{class:"small fa fa-close",onClick:function(e){return i.removeRelationModel(o,t.model)}},null,8,qs)])])}),256))])):(0,e.createCommentVNode)("v-if",!0)])])]),i.hasMainDataSource()?((0,e.openBlock)(),(0,e.createElementBlock)("div",Ks,os(n[36]||(n[36]=[(0,e.createElementVNode)("strong",null,"Click on fields to choose",-1)])))):(0,e.createCommentVNode)("v-if",!0),i.hasMainDataSource()?((0,e.openBlock)(),(0,e.createElementBlock)("div",Ws,[(0,e.createElementVNode)("div",Js,[(0,e.createElementVNode)("div",Xs,[(0,e.createElementVNode)("div",Ys,[(0,e.createElementVNode)("span",{class:"text-small pull-right hand text-success",onClick:n[15]||(n[15]=function(e){return i.selectAllField(r.mainModel)})},"Add all »"),(0,e.createTextVNode)((0,e.toDisplayString)(i.getModelName(r.mainModel.tableName)),1),n[37]||(n[37]=(0,e.createElementVNode)("br",null,null,-1))]),(0,e.createElementVNode)("div",Gs,[(0,e.createElementVNode)("ul",Zs,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.mainModel.fields,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{class:"list-group-item",onClick:function(e){return i.selectField(t,r.mainModel)}},(0,e.toDisplayString)(t),9,Qs)}),256))])])])]),i.hasRelation()?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:0},(0,e.renderList)(r.relationModels.models,function(t,o){return(0,e.openBlock)(),(0,e.createElementBlock)("div",el,[(0,e.createElementVNode)("div",tl,[(0,e.createElementVNode)("div",nl,[(0,e.createElementVNode)("span",{class:"text-small pull-right hand text-success",onClick:function(e){return i.selectAllField(r.mainModel,t.relationAlias)}},"Add all »",8,ol),(0,e.createTextVNode)((0,e.toDisplayString)(t.model),1),n[38]||(n[38]=(0,e.createElementVNode)("br",null,null,-1)),(0,e.createTextVNode)("->with['"+(0,e.toDisplayString)(t.relationAlias)+"'] ",1)]),(0,e.createElementVNode)("div",al,[(0,e.createElementVNode)("ul",rl,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.fields,function(n){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{class:"list-group-item",onClick:function(e){return i.selectField(n,r.mainModel,t.relationAlias)}},(0,e.toDisplayString)(n),9,il)}),256))])])])])}),256)):(0,e.createCommentVNode)("v-if",!0)])):(0,e.createCommentVNode)("v-if",!0),r.mainModel.selected.length>0?((0,e.openBlock)(),(0,e.createElementBlock)("div",sl,[(0,e.createElementVNode)("div",ll,[(0,e.createElementVNode)("div",cl,[(0,e.createElementVNode)("div",dl,[n[39]||(n[39]=(0,e.createTextVNode)(" Selected Fields ",-1)),(0,e.createElementVNode)("span",{class:"text-small pull-right hand text-danger",onClick:n[16]||(n[16]=function(e){return i.removeAllField(r.mainModel)})},"Remove all")]),(0,e.createElementVNode)("div",ul,[(0,e.createElementVNode)("ul",hl,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.mainModel.selected,function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{class:"fields non-selectable","data-fieldname":t},[(0,e.createTextVNode)((0,e.toDisplayString)(t)+" ",1),(0,e.createElementVNode)("span",{class:"small fa fa-close",onClick:function(e){return i.removeField(r.mainModel,n)}},null,8,fl)],8,ml)}),256))])])])])])):(0,e.createCommentVNode)("v-if",!0)])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",pl,[""!==r.errorMessage?((0,e.openBlock)(),(0,e.createElementBlock)("div",gl,(0,e.toDisplayString)(r.errorMessage),1)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",vl,[n[40]||(n[40]=(0,e.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,e.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Cancel",8,yl)])])],40,rs)])}]]),xl=Al;var Vl={key:0,class:"alert alert-info"},Dl={key:1,class:"row"},Ml={class:"form-group center-align"},Tl=["href"],Il=["action"],Ol={class:"checkbox title"},Pl={class:"text-info"},Ll={class:"list-unstyled list-permission"},jl={class:"clearfix"},Fl={key:0,class:"row p-2"},Rl={class:"col"},Ul=["onClick","onUpdate:modelValue","id","data-id"],Hl=["for"],$l={class:"col-auto"},zl=["id","onUpdate:modelValue","onClick"],ql={key:1,class:"list-unstyled clearfix",style:{"margin-left":"20px"}},Kl={class:"clearfix"},Wl={class:"row p-2"},Jl={class:"col"},Xl=["onClick","onUpdate:modelValue","id","data-id"],Yl=["for"],Gl={class:"col-auto"},Zl=["id","onUpdate:modelValue","onClick"],Ql={class:"row"},ec={key:0,class:"alert alert-danger"},tc={class:"form-group center-align"},nc=["href"];const oc={mounted:function(){var e=this;this.form.cmsModuleData=this.allModules,this.form.userId=this.userModules.id,this.showSuperAdmin(),U.on("on-paste",function(t){e.handlePaste(t)})},props:["dataCmsModules","dataUserModules","dataControllerName","dataBackUrl","dataIsSuperAdmin"],data:function(){return{userModules:this.dataUserModules?JSON.parse(this.dataUserModules):[],form:new wa({cmsModuleData:[],userId:0}),selectAllModule:!1,superAdmin:!1,errorMessage:""}},computed:{allModules:function(){var e=this.userModules.cmsmodules,t=this.dataCmsModules?JSON.parse(this.dataCmsModules):[],n=[];if(t.length>0)for(var o=0;o<t.length;o++){var a=t[o],r=c(a);if(a.selected=!!r,a.readonly=1===r.readonly,0===a.parent_id&&a.child.length>0)for(var i=0;i<a.child.length;i++){var s=a.child[i],l=c(s);s.selected=!!l,s.readonly=1===l.readonly}0===a.parent_id&&n.push(a)}return n;function c(t){if(e.length>0){var n=e.find(function(e){return e.module_id.toString()===t.id.toString()});return void 0!==n&&n}return!1}},permissionSaveUrl:function(){return g.admin_path(this.dataControllerName+"/saveModulePermissions")},csrfToken:function(){return window.Laravel.csrfToken}},methods:{handlePaste:function(e){var t;function n(e){for(var n in t){var o=document.getElementById("check_"+e),a=document.getElementById("check_readonly_"+e);if(o&&o.checked)return{selected:!0,readonly:a.checked}}return{selected:!1,readonly:!1}}t=JSON.parse(e),this.form.cmsModuleData.forEach(function(e,t){var o=n(e.id);o.selected&&(e.selected=!0,e.readonly=o.readonly),e.child.length>0&&e.child.forEach(function(e,t){var o=n(e.id);o.selected&&(e.selected=!0,e.readonly=o.readonly)})})},hasChild:function(e){return e.child&&e.child.length>0},isParent:function(e){return 0===e.parent_id},selectReadOnly:function(e,t){var n=t.target.checked;!0!==e.selected&&(e.selected=n)},selectAll:function(){for(var e=!1===this.selectAllModule,t=0;t<this.form.cmsModuleData.length;t++){var n=this.form.cmsModuleData[t];n.selected=e,this.selectMe(n,void 0,e)}},selectMe:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=!1===e.selected;if(null!==n&&(o=n),e.child&&e.child.length>0&&e.child.map(function(e){e.selected=o,o||(e.readonly=!1)}),!0!==o&&(e.readonly=!1),t){var a=t.child.find(function(e){return!0===e.selected});(o||a)&&(t.selected=!0)}!1===o&&(this.selectAllModule=!1)},showSuperAdmin:function(){"1"!==this.dataIsSuperAdmin.toString()&&"true"!==this.dataIsSuperAdmin.toString()||(this.superAdmin=!0)},saveData:function(){var e=this;this.form.post(this.permissionSaveUrl,!1).then(function(t){return e.afterFormSaved(t)}).catch(function(t){return e.afterFormSaved(t)})},afterFormSaved:function(e){!0===e.isSaved?W.show(this,"Saved Successfully. "):W.show(this,"There is some error.")},goBack:function(){window.location=this.dataBackUrl}}},ac=(0,w.A)(oc,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[r.superAdmin?((0,e.openBlock)(),(0,e.createElementBlock)("div",Vl,[(0,e.createElementVNode)("strong",null,(0,e.toDisplayString)(r.userModules.name),1),n[3]||(n[3]=(0,e.createTextVNode)(" is admin or super admin. No need to provide module access. ",-1))])):(0,e.createCommentVNode)("v-if",!0),r.superAdmin?((0,e.openBlock)(),(0,e.createElementBlock)("div",Dl,[(0,e.createElementVNode)("div",Ml,[(0,e.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-primary"},"Okay :)",8,Tl)])])):(0,e.createCommentVNode)("v-if",!0),r.superAdmin?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("form",{key:2,action:i.permissionSaveUrl,class:"form-horizontal",method:"post",role:"form",onSubmit:n[2]||(n[2]=(0,e.withModifiers)(function(){return i.saveData&&i.saveData.apply(i,arguments)},["prevent"]))},[(0,e.createElementVNode)("div",Ol,[(0,e.createElementVNode)("h4",null,[(0,e.createElementVNode)("label",null,[(0,e.withDirectives)((0,e.createElementVNode)("input",{"onUpdate:modelValue":n[0]||(n[0]=function(e){return r.selectAllModule=e}),type:"checkbox",onClick:n[1]||(n[1]=function(e){return i.selectAll()})},null,512),[[e.vModelCheckbox,r.selectAllModule]]),n[4]||(n[4]=(0,e.createTextVNode)(" Select ",-1))]),n[5]||(n[5]=(0,e.createTextVNode)(" modules for ",-1)),(0,e.createElementVNode)("span",Pl,(0,e.toDisplayString)(r.userModules.name)+" "+(0,e.toDisplayString)(r.userModules.last_name),1)])]),(0,e.createElementVNode)("ul",Ll,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.form.cmsModuleData,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",jl,[i.isParent(t)?((0,e.openBlock)(),(0,e.createElementBlock)("div",Fl,[(0,e.createElementVNode)("div",Rl,[(0,e.withDirectives)((0,e.createElementVNode)("input",{onClick:function(e){return i.selectMe(t)},class:"form-check-input",type:"checkbox","onUpdate:modelValue":function(e){return t.selected=e},id:"check_"+t.id,"data-id":t.id,"data-is-parent":"true"},null,8,Ul),[[e.vModelCheckbox,t.selected]]),(0,e.createElementVNode)("label",{class:"form-check-label",for:"check_"+t.id}," "+(0,e.toDisplayString)(t.name),9,Hl)]),(0,e.createElementVNode)("div",$l,[(0,e.createElementVNode)("label",null,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"check_readonly_"+t.id,"onUpdate:modelValue":function(e){return t.readonly=e},type:"checkbox",onClick:function(e){return i.selectReadOnly(t,e)},"data-is-readonly-checkbox":"true"},null,8,zl),[[e.vModelCheckbox,t.readonly]]),n[6]||(n[6]=(0,e.createTextVNode)(" Read Only",-1))])])])):(0,e.createCommentVNode)("v-if",!0),i.hasChild(t)?((0,e.openBlock)(),(0,e.createElementBlock)("ul",ql,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.child,function(o){return(0,e.openBlock)(),(0,e.createElementBlock)("li",Kl,[(0,e.createElementVNode)("div",Wl,[(0,e.createElementVNode)("div",Jl,[(0,e.withDirectives)((0,e.createElementVNode)("input",{onClick:function(e){return i.selectMe(o,t)},class:"form-check-input",type:"checkbox","onUpdate:modelValue":function(e){return o.selected=e},id:"check_"+o.id,"data-id":o.id,"data-is-parent":"false"},null,8,Xl),[[e.vModelCheckbox,o.selected]]),(0,e.createElementVNode)("label",{class:"form-check-label",for:"check_"+o.id,"data-is-readonly":"true"}," "+(0,e.toDisplayString)(o.name),9,Yl)]),(0,e.createElementVNode)("div",Gl,[(0,e.createElementVNode)("label",null,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"check_readonly_"+o.id,"onUpdate:modelValue":function(e){return o.readonly=e},type:"checkbox",onClick:function(e){return i.selectReadOnly(o,e,!0)},"data-is-readonly-checkbox":"true"},null,8,Zl),[[e.vModelCheckbox,o.readonly]]),n[7]||(n[7]=(0,e.createTextVNode)(" Read Only",-1))])])])])}),256))])):(0,e.createCommentVNode)("v-if",!0)])}),256))]),(0,e.createElementVNode)("div",Ql,[""!==r.errorMessage?((0,e.openBlock)(),(0,e.createElementBlock)("div",ec,(0,e.toDisplayString)(r.errorMessage),1)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",tc,[n[8]||(n[8]=(0,e.createElementVNode)("input",{class:"btn btn-success btn-from-submit",name:"submit",type:"submit",value:"Save"},null,-1)),(0,e.createElementVNode)("a",{href:o.dataBackUrl,class:"btn btn-outline-secondary"},"Back",8,nc)])])],40,Il))])}]]);var rc={class:"row"},ic={class:"col-auto"},sc={key:0,class:"counters"},lc={class:"col-auto"},cc={key:0,class:"shadow-sm"},dc={class:"pagination"},uc=["href","innerHTML"],hc={key:0,class:"col float-end"},mc={class:"pull-right",style:{"margin-right":"16px"}};const fc={components:{"download-button":Zn},mounted:function(){this.updatePageParams();var e=this;U.on("pagination-on-delete",function(){e.decreaseCounter()})},props:["dataPaginator","dataFirstItem","dataLastItem","dataTotal","dataControllerName","dataNextLabel","dataPreviousLabel","dataShowDownload"],data:function(){return{totalCount:parseInt(this.dataTotal),lastItem:parseInt(this.dataLastItem),controllerName:this.dataControllerName,paginator:JSON.parse(this.dataPaginator),pageLabel:{"pagination.next":this.dataNextLabel,"pagination.previous":this.dataPreviousLabel},showDownload:"true"===this.dataShowDownload||"1"===this.dataShowDownload}},computed:{hasPreviousPage:function(){return null!=this.paginator.prev_page_url},allPages:function(){return this.paginator.links},showPagination:function(){return this.allPages.length>3}},methods:{decreaseCounter:function(){this.totalCount=this.totalCount-1,this.lastItem=this.lastItem-1},getLink:function(e){return null==e.url?"javascript:void(0)":e.url},getLabel:function(e){return this.pageLabel[e]?this.pageLabel[e]:e},getCss:function(e){return null==e.url?"page-item disabled":!0===e.active?"page-item active":"page-item"},updatePageParams:function(){var e=window.location.search.substring(1);null!=e.match(/page=\d+/gi)&&(e=e.replace(/page=\d+/,"")),""!==e&&(e=0===e.indexOf("&")?e:"&"+e,document.querySelectorAll(".pagination a").forEach(function(t,n){var o=t.href;o=(o=(o=o+""+e).replace(/&$/,"")).replace(/&&/,"&"),t.href=o}))}}},pc=(0,w.A)(fc,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("download-button");return(0,e.openBlock)(),(0,e.createElementBlock)("div",rc,[(0,e.createElementVNode)("div",ic,[r.totalCount>0?((0,e.openBlock)(),(0,e.createElementBlock)("span",sc,(0,e.toDisplayString)(o.dataFirstItem)+" - "+(0,e.toDisplayString)(r.lastItem)+" of "+(0,e.toDisplayString)(r.totalCount),1)):(0,e.createCommentVNode)("v-if",!0)]),(0,e.createElementVNode)("div",lc,[i.showPagination?((0,e.openBlock)(),(0,e.createElementBlock)("nav",cc,[(0,e.createElementVNode)("ul",dc,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.allPages,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",{class:(0,e.normalizeClass)(i.getCss(t))},[(0,e.createElementVNode)("a",{class:"page-link",href:i.getLink(t),innerHTML:i.getLabel(t.label)},null,8,uc)],2)}),256))])])):(0,e.createCommentVNode)("v-if",!0)]),r.totalCount>0&&r.showDownload?((0,e.openBlock)(),(0,e.createElementBlock)("div",hc,[(0,e.createElementVNode)("span",mc,[(0,e.createVNode)(s,{"data-controller-name":r.controllerName},null,8,["data-controller-name"])])])):(0,e.createCommentVNode)("v-if",!0)])}]]);var gc=["name","id","multiple"],vc=["value"],yc={class:"fa fa-refresh fa-spin","aria-hidden":"true"};const bc={components:{"split-button":S},props:["dataName","dataId","dataPlatforms","dataSelected","dataMultiple","dataSiteId","dataFetchOnInit"],mounted:function(){!1!==this.fetchOnInit&&this.init(),console.log("selected ",this.selected),U.$on("site_changed",this.populatePlatform)},computed:{selected:{get:function(){return void 0===this.dataMultiple||"true"!==this.dataMultiple?void 0===this.dataSelected?1:parseInt(this.dataSelected):void 0===this.dataSelected?[1]:JSON.parse(this.dataSelected)},set:function(e){return e}}},data:function(){return{platforms:void 0===this.dataPlatforms?[]:JSON.parse(this.dataPlatforms),name:void 0===this.dataName?"platform_id":this.dataName,id:void 0===this.dataId?"platform_id":this.dataId,multiple:void 0===this.dataMultiple?"":"multiple='multiple'",siteId:void 0===this.dataSiteId?1:parseInt(this.dataSiteId),fetchOnInit:void 0!==this.dataFetchOnInit&&"false"!==this.dataFetchOnInit&&this.dataFetchOnInit,isLoading:!1,selectedValue:this.selected}},methods:{init:function(){this.populatePlatform(this.siteId)},setPlatform:function(){U.$emit("platform_changed",this.selected)},populatePlatform:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e||""===e)return this.platforms=[],!1;this.isLoading=!0;var t=this,n=g.admin_path("ajax/getInfo/site/"+e);axios.get(n).then(function(e){t.platforms=e.data.results.platform,t.isLoading=!1}).catch(function(e){console.error(e.data)})}}},wc=(0,w.A)(bc,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.withDirectives)((0,e.createElementVNode)("select",{name:r.name,id:r.id,onChange:n[0]||(n[0]=function(){return i.setPlatform&&i.setPlatform.apply(i,arguments)}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return i.selected=e}),multiple:"true"==o.dataMultiple&&r.multiple},[n[2]||(n[2]=(0,e.createElementVNode)("option",{value:""},"Select Platform",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.platforms,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,vc)}),256))],40,gc),[[e.vModelSelect,i.selected]]),(0,e.withDirectives)((0,e.createElementVNode)("i",yc,null,512),[[e.vShow,r.isLoading]])])}]]);var Ec=["name","id"],Sc=["value"];const kc={components:{"split-button":S},props:["dataName","dataId","dataSites","dataSelected"],mounted:function(){},data:function(){return{sites:void 0===this.dataSites?[]:JSON.parse(this.dataSites),selected:void 0===this.dataSelected?1:parseInt(this.dataSelected),name:void 0===this.dataName?"site_id":this.dataName,id:void 0===this.dataId?"site_id":this.dataId}},methods:{setSite:function(){U.$emit("site_changed",this.selected)}}},_c=(0,w.A)(kc,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.withDirectives)((0,e.createElementVNode)("select",{name:r.name,id:r.id,onChange:n[0]||(n[0]=function(){return i.setSite&&i.setSite.apply(i,arguments)}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return r.selected=e})},[n[2]||(n[2]=(0,e.createElementVNode)("option",{value:""},"Select Site",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.sites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(t.name),9,Sc)}),256))],40,Ec),[[e.vModelSelect,r.selected]])])}]]);function Nc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Cc={class:"row"},Bc={class:"form-group"},Ac={class:"col-sm-4"},xc=["value"],Vc={class:"row margin-top-20"},Dc={class:"form-group"},Mc={class:"col-sm-4"},Tc=["value"],Ic={class:"row margin-top-20"},Oc={class:"form-group"},Pc={class:"col-sm-4"},Lc={class:"alert alert-info text-center"},jc={class:"alert alert-info"};const Fc={mounted:function(){},created:function(){},props:["dataAllSites"],data:function(){return{allSites:void 0===this.dataAllSites?[]:JSON.parse(this.dataAllSites),sourceSiteId:"",targetSiteId:"",isLoading:!1,errorMsg:"",successMsg:[]}},computed:{errorMessage:function(){return""===this.errorMsg?"It's undoable. Please be careful.":this.errorMsg}},methods:{getLabel:function(e){var t="";return e.name||e.alias?t=e.name||e.alias:e.lang&&(t=void 0===e.lang.name?"":e.lang.name),t},loading:function(e){this.isLoading=e},cloneSite:function(){var e=this;console.log("copying now..."),this.loading(1);var t=this,n={sourceSiteId:this.sourceSiteId,tagetSiteId:this.targetSiteId},o=g.admin_path("site/cloneSite");axios.post(o,n).then(function(n){console.log(n),function(e){var n=e.data;t.successMsg=n}(n),e.loading(2)}).catch(function(n){console.log("Error: ",n.response),t.errorMsg=n.response.data.message,e.loading(0)})},doAction:function(){this.cloneSite()}}},Rc=(0,w.A)(Fc,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.createElementVNode)("div",Cc,[(0,e.createElementVNode)("div",Bc,[n[4]||(n[4]=(0,e.createElementVNode)("div",{class:"col-sm-2"},"Copy From:",-1)),(0,e.createElementVNode)("div",Ac,[(0,e.withDirectives)((0,e.createElementVNode)("select",{class:"form-select","onUpdate:modelValue":n[0]||(n[0]=function(e){return r.sourceSiteId=e})},[n[3]||(n[3]=(0,e.createElementVNode)("option",{value:""},"Select Site",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allSites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(i.getLabel(t)),9,xc)}),256))],512),[[e.vModelSelect,r.sourceSiteId]])])])]),(0,e.createElementVNode)("div",Vc,[(0,e.createElementVNode)("div",Dc,[n[6]||(n[6]=(0,e.createElementVNode)("div",{class:"col-sm-2"},"Copy To:",-1)),(0,e.createElementVNode)("div",Mc,[(0,e.withDirectives)((0,e.createElementVNode)("select",{class:"form-select","onUpdate:modelValue":n[1]||(n[1]=function(e){return r.targetSiteId=e})},[n[5]||(n[5]=(0,e.createElementVNode)("option",{value:""},"Select Site",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allSites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(i.getLabel(t)),9,Tc)}),256))],512),[[e.vModelSelect,r.targetSiteId]])])])]),(0,e.createElementVNode)("div",Ic,[(0,e.createElementVNode)("div",Oc,[n[8]||(n[8]=(0,e.createElementVNode)("div",{class:"col-sm-2"}," ",-1)),(0,e.createElementVNode)("div",Pc,[(0,e.withDirectives)((0,e.createElementVNode)("div",{class:"alert alert-danger text-center"},(0,e.toDisplayString)(i.errorMessage),513),[[e.vShow,""!=r.errorMsg&&!r.isLoading]]),(0,e.withDirectives)((0,e.createElementVNode)("div",Lc,(s=n[7]||(n[7]=[(0,e.createElementVNode)("span",{class:"fa fa-spinner fa-pulse fa-fw"}," ",-1),(0,e.createTextVNode)(" Please wait and don't close this window. It's not running in thread :) ",-1)]),function(e){if(Array.isArray(e))return Nc(e)}(s)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return Nc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nc(e,t):void 0}}(s)||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.")}()),512),[[e.vShow,1==r.isLoading]]),(0,e.withDirectives)((0,e.createElementVNode)("div",jc,[(0,e.createElementVNode)("ul",null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.successMsg,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",null,[(0,e.createElementVNode)("span",{class:(0,e.normalizeClass)(!1===t.success?"text-danger":"")},(0,e.toDisplayString)(t.message),3)])}),256))])],512),[[e.vShow,r.isLoading>1]]),(0,e.createElementVNode)("input",{onClick:n[2]||(n[2]=function(e){return i.doAction()}),type:"button",name:"submit",value:"Copy Now!",class:"btn btn-block btn-success"})])])])]);var s}]]);var Uc={class:"col mt-2"},Hc={class:"mb-2"},$c=["value"],zc={class:"row"},qc={class:"col col-4"},Kc={class:"card border-0"},Wc={class:"card-header"},Jc={class:"card-title m-0",style:{"line-height":"inherit"}},Xc={class:"badge text-bg-secondary"},Yc={class:"card-body p-2"},Gc={key:0,class:"card-subtitle mb-2 text-muted"},Zc={class:"inline"},Qc={key:1,class:"panel-sub-heading",style:{padding:"4px"}},ed={class:"input-group"},td={class:"list-group"},nd={class:"list-group-item"},od={class:"normal"},ad=["onUpdate:modelValue"],rd={class:"col col-4"},id={class:"card border-0"},sd={key:0,class:"card-body p-0"},ld=["innerHTML"],cd={class:"card-header"},dd={class:"card-title text-success m-0",style:{"line-height":"inherit"}},ud={class:"badge text-bg-secondary"},hd={class:"card-body"},md={key:0,class:"card-subtitle mb-2 text-muted"},fd={class:"inline"},pd={class:"list-group"},gd={class:"list-group-item"},vd={class:"normal"},yd=["onUpdate:modelValue"];const bd={mounted:function(){},created:function(){},props:["dataMessage","dataAllData","dataSiteData","dataCurrentKey","dataSiteId","dataDefaultActionForSave","dataAlertCss","dataControllerName"],data:function(){return{siteData:void 0===this.dataSiteData||""===this.dataSiteData?[]:JSON.parse(this.dataSiteData),allData:void 0===this.dataAllData||""===this.dataAllData?[]:JSON.parse(this.dataAllData),currentKey:this.dataCurrentKey,searchKey:"",siteId:parseInt(this.dataSiteId),message:void 0===this.dataMessage?"":this.dataMessage,defaultActionForSave:void 0===this.dataDefaultActionForSave?"saveSettings":this.dataDefaultActionForSave,alertCss:void 0===this.dataAlertCss||""===this.dataAlertCss?"alert alert-info":this.dataAlertCss,controllerName:void 0===this.dataControllerName?"site":this.dataControllerName}},computed:{title:function(){return this.allData.label},total:function(){return this.allData.data?this.allData.data.length:0},selectedTotal:function(){return null==this.siteData?0:this.siteData.length},showSearch:function(){return this.allData.data&&this.allData.data.length>10}},methods:{saveNow:function(e,t){var n=this;return J.show(this,"Please wait. Making Changes..."),new Promise(function(o,a){axios.post(e,t).then(function(e){o(e)}).catch(function(e){a(e.response)}).finally(function(){J.hide(n)})})},doAction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"add",t=this,n="add"===e?this.allData.data:this.siteData,o=[],a=[];if(n&&n.length>0){if(n.forEach(function(e){!0===e.selected&&(o.push(e.id),a.push(e))}),"function"==typeof this.defaultActionForSave)return this.defaultActionForSave(e,n,a,o),!1;if(o.length>0){var r={};r.key=this.currentKey,r.ids=o,r.site_id=this.siteId,r.action=e,this.saveNow(g.admin_path(this.controllerName+"/"+this.defaultActionForSave),r).then(function(n){!function(n){console.log(n),"add"===e?a.forEach(function(e){var n=e.id;-1===t.siteData.findIndex(function(e){return e.id===n})&&t.siteData.push(e)}):a.forEach(function(e){var n=e.id,o=t.siteData.findIndex(function(e){return e.id===n});-1!==o&&t.siteData.splice(o,1)})}(n)}).catch(function(e){var n;console.error("error: ",e),W.show(t,(null==e||null===(n=e.data)||void 0===n?void 0:n.message)||"I don't know what went wrong.",5e3)})}}},selectAllData:function(e,t){var n="table"===e?this.allData.data:this.siteData,o=t.checked;n&&n.length>0&&n.forEach(function(e){e.selected=o})},getLabel:function(e){return e.lang?void 0===e.lang.name?"":e.lang.name:e.name||e.alias||""},getLabelForSite:function(e){if(void 0!==e.name||void 0!==e.alias)return e.name||e.alias;if(e.lang)return void 0===e.lang.name?"":e.lang.name;if(this.allData.data&&this.allData.data.length>0){var t=this.allData.data.findIndex(function(t){return t.id===e.id||void 0!==e.link_rewrite&&e.link_rewrite===t.link_rewrite});return-1===t?"":this.getLabel(this.allData.data[t])}return""},filterData:function(){var e=this,t=this.searchKey;return""!==t&&null!=t?(t=t.toLowerCase(),this.allData.data.filter(function(n){return e.getLabel(n).toLowerCase().includes(t)||n.id===t})):this.allData.data},setData:function(e,t){this.allData[e]=t},setSiteData:function(e){this.siteData={},this.siteData=e}}},wd=(0,w.A)(bd,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)("div",qc,[(0,e.createElementVNode)("div",Kc,[(0,e.createElementVNode)("div",Wc,[(0,e.createElementVNode)("h5",Jc,[(0,e.createTextVNode)(" Available "+(0,e.toDisplayString)(i.title)+" ",1),(0,e.createElementVNode)("span",Xc,(0,e.toDisplayString)(i.total),1),(0,e.createElementVNode)("button",{type:"button",title:"Add Selected",onClick:n[0]||(n[0]=function(e){return i.doAction("add")}),class:"hand pull-right btn btn-sm btn-primary"}," Add Selected ")])]),(0,e.createElementVNode)("div",Yc,[i.total>0?((0,e.openBlock)(),(0,e.createElementBlock)("div",Gc,[(0,e.createElementVNode)("label",Zc,[(0,e.createElementVNode)("input",{type:"checkbox",onClick:n[1]||(n[1]=function(e){return i.selectAllData("table",e.target)})}),n[5]||(n[5]=(0,e.createTextVNode)(" Select All",-1))])])):(0,e.createCommentVNode)("v-if",!0),i.showSearch?((0,e.openBlock)(),(0,e.createElementBlock)("div",Qc,[(0,e.createElementVNode)("div",ed,[(0,e.withDirectives)((0,e.createElementVNode)("input",{type:"text",placeholder:"Search",class:"form-control","aria-describedby":"basic-addon3","onUpdate:modelValue":n[2]||(n[2]=function(e){return r.searchKey=e})},null,512),[[e.vModelText,r.searchKey]])])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("ul",td,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.filterData(),function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("li",nd,[(0,e.createElementVNode)("label",od,[(0,e.withDirectives)((0,e.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":function(e){return t.selected=e}},null,8,ad),[[e.vModelCheckbox,t.selected]]),(0,e.createTextVNode)(" "+(0,e.toDisplayString)(i.getLabel(t)),1)])])}),256))])])])]),(0,e.createElementVNode)("div",rd,[(0,e.createElementVNode)("div",id,[r.message.length>0?((0,e.openBlock)(),(0,e.createElementBlock)("div",sd,[(0,e.createElementVNode)("small",{class:(0,e.normalizeClass)(r.alertCss),innerHTML:r.message,style:{display:"block"}},null,10,ld)])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("div",cd,[(0,e.createElementVNode)("h5",dd,[(0,e.createTextVNode)(" Added "+(0,e.toDisplayString)(i.title)+" ",1),(0,e.createElementVNode)("span",ud,(0,e.toDisplayString)(i.selectedTotal),1),(0,e.createElementVNode)("button",{title:"Remove Selected",onClick:n[3]||(n[3]=function(e){return i.doAction("remove")}),class:"btn btn-sm btn-danger pull-right"}," Remove Selected ")])]),(0,e.createElementVNode)("div",hd,[i.selectedTotal>0?((0,e.openBlock)(),(0,e.createElementBlock)("div",md,[(0,e.createElementVNode)("label",fd,[(0,e.createElementVNode)("input",{type:"checkbox",onClick:n[4]||(n[4]=function(e){return i.selectAllData("sitewise",e.target)})}),n[6]||(n[6]=(0,e.createTextVNode)(" Select All",-1))])])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("ul",pd,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.siteData,function(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)("li",gd,[(0,e.createElementVNode)("label",vd,[(0,e.withDirectives)((0,e.createElementVNode)("input",{type:"checkbox","onUpdate:modelValue":function(e){return t.selected=e}},null,8,yd),[[e.vModelCheckbox,t.selected]]),(0,e.createTextVNode)(" "+(0,e.toDisplayString)(i.getLabelForSite(t)),1)])])}),256))])])])])],64)}]]),Ed=wd,Sd={mounted:function(){},components:{"site-wise":Ed},created:function(){},props:["dataAllSites","dataMessage","dataAllData","dataSiteData","dataCurrentKey","dataSiteId","dataAlertCss","dataControllerName"],data:function(){return{allSites:void 0===this.dataAllSites?[]:JSON.parse(this.dataAllSites),siteData:void 0===this.dataSiteData||""===this.dataSiteData?[]:JSON.parse(this.dataSiteData),allData:void 0===this.dataAllData||""===this.dataAllData?[]:JSON.parse(this.dataAllData),currentKey:this.dataCurrentKey,searchKey:"",siteId:parseInt(this.dataSiteId),currentSite:"",controllerName:void 0===this.dataControllerName?"site":this.dataControllerName}},methods:{showHdeLoader:function(e){e?J.show(this,"Please wait..."):J.hide(this)},saveNow:function(e,t){return new Promise(function(n,o){axios.post(e,t).then(function(e){n(e)}).catch(function(e){o(e.response)})})},getLabel:function(e){var t="";return e.name||e.alias?t=e.name||e.alias:e.lang&&(t=void 0===e.lang.name?"":e.lang.name),t},populateData:function(e){this.allData=e,this.$refs.siteWiseComponent.setData("data",e)},getBySite:function(){var e=this;if(""!==this.currentSite){var t=this.currentKey,n=g.admin_path(this.controllerName+"/getBySite/"+this.currentSite+"/"+t);this.showHdeLoader(!0),axios.get(n).then(function(t){e.populateData(t.data)}).catch(function(e){console.log(e)}).finally(function(){e.showHdeLoader(!1)})}else this.populateData([])},actionAdd:function(e,t,n){var o=this;console.log("copying now...");var a=this,r={fromSite:{site_id:this.currentSite,data:t},toSite:{site_id:this.siteId},type:this.currentKey};this.showHdeLoader(!0);var i=g.admin_path(this.controllerName+"/copySettings");axios.post(i,r).then(function(e){console.log(e),function(e){var t=e.data;if(!1===t.inserted)W.show(a,t.message||"Nothing happened.",5e3);else{var n=t.ignored,o=t.copied;a.$refs.siteWiseComponent.setSiteData(t.siteData);var r="".concat(o.length," Copied and ").concat(n.length," ignored. Open console for details");W.show(a,r,7e3),console.info("Copied: ",o),console.info("Ignored: ",n)}}(e)}).catch(function(e){console.log(e)}).finally(function(){o.showHdeLoader(!1)})},actionRemove:function(e,t,n){var o=this,a=t.length>0?t[0].site_id:null;if(null===a)return!1;var r=this,i={site_id:a,ids:n,type:this.currentKey},s=g.admin_path(this.controllerName+"/removeSettings");this.showHdeLoader(!0),axios.post(s,i).then(function(e){!function(e){var t=e.data;0===t.deleted&&W.show(r,"Sorry!, Somehow it's not deleted.",5e3),r.$refs.siteWiseComponent.setSiteData(t.siteData)}(e)}).catch(function(e){console.log(e)}).finally(function(){o.showHdeLoader(!1)})},doAction:function(e,t,n,o){"add"===e?this.actionAdd(t,n,o):this.actionRemove(t,n,o)}}},kd=(0,w.A)(Sd,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("site-wise");return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)("div",Uc,[(0,e.createElementVNode)("div",Hc,[n[3]||(n[3]=(0,e.createTextVNode)(" Copy From: ",-1)),(0,e.withDirectives)((0,e.createElementVNode)("select",{class:"form-select inline width-auto",onChange:n[0]||(n[0]=function(e){return i.getBySite()}),"onUpdate:modelValue":n[1]||(n[1]=function(e){return r.currentSite=e})},[n[2]||(n[2]=(0,e.createElementVNode)("option",{value:""},"Select Site",-1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(r.allSites,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("option",{value:t.id},(0,e.toDisplayString)(i.getLabel(t)),9,$c)}),256))],544),[[e.vModelSelect,r.currentSite]])])]),(0,e.createElementVNode)("div",zc,[(0,e.createVNode)(s,{ref:"siteWiseComponent","data-message":o.dataMessage,"data-site-data":JSON.stringify(r.siteData),"data-all-data":JSON.stringify(r.allData),"data-current-key":r.currentKey,"data-site-id":r.siteId,"data-default-action-for-save":i.doAction,"data-alert-css":o.dataAlertCss},null,8,["data-message","data-site-data","data-all-data","data-current-key","data-site-id","data-default-action-for-save","data-alert-css"])])],64)}]]);var _d={id:"sortableField"},Nd={class:"parent"},Cd={key:0,class:"js_more fa fa-ellipsis-v pull-right adjustMore"},Bd={class:"text"},Ad={key:0},xd={class:"text"};const Vd={mounted:function(){this.enableSorting(),console.log(this.controllerName)},props:["dataAllModules","dataControllerName"],data:function(){return{allData:this.dataAllModules&&"null"!=this.dataAllModules?JSON.parse(this.dataAllModules):[],sortable:null,sortingInterval:-1,updateIndexUrl:g.admin_path(this.controllerName+"/updateIndex"),lastTarget:""}},computed:{controllerName:function(){return(void 0===this.dataControllerName?"":this.dataControllerName.toLocaleLowerCase()).replace(/\s/g,"")}},methods:{hasChild:function(e){return e.child.length>0},hideAll:function(){document.querySelectorAll(".sortElem .parent").forEach(function(e){e.classList.remove("active")})},showHide:function(e){var t=e.target;t.parentElement.parentElement.parentElement!=this.lastTarget?(this.hideAll(),t.classList.contains("js_more")&&(e.preventDefault(),t.parentElement.parentElement.parentElement.classList.add("active","animated","fadeIn")),this.lastTarget=t.parentElement.parentElement.parentElement):t.parentElement.parentElement.parentElement.classList.contains("active")?t.parentElement.parentElement.parentElement.classList.remove("active"):t.parentElement.parentElement.parentElement.classList.add("active")},getActiveCss:function(e,t){return this.isActive(e,t)?"active":""},isActive:function(e,t){if(this.controllerName==e)return!0;if(t&&t.child&&t.child.length>0){var n=this.controllerName;return t.child.find(function(e){return e.controller_name==n})}},enableSorting:function(){this.$nextTick(function(){null!=this.sortable&&this.sortable.destroy();var e=document.getElementById("sortableField");this.sortable=Jn.create(e,{onEnd:this.sortingCallback,onStart:this.cancelSortingCallback})})},cancelSortingCallback:function(){-1!=this.sortingInterval&&clearInterval(this.sortingInterval)},sortingCallback:function(e){var t=this,n=[];document.querySelectorAll(".sortElem .parent").forEach(function(e,o){for(var a=e.children[0].children[0].innerText,r=0;r<t.allData.length;r++)0==t.allData[r].module_pid&&t.allData[r].name==a&&(n[r]={},n[r].id=t.allData[r].id,n[r].position=o,n[r].name=t.allData[r].name)}),this.updateIndex(n),this.cancelSortingCallback()},submit:function(e,t,n){var o=this;return new Promise(function(a,r){axios[e](t,n).then(function(e){o.onSuccess(e)}).catch(function(e){o.onFailure(e.response)})})},updateIndex:function(e){var t=this;this.submit("post",this.updateIndexUrl,e).then(function(e){return t.onSuccess(e)}).catch(function(e){return t.onFailure(e)})},onSuccess:function(e){W.show(this,"Modules Sorted.")},onFailure:function(e){console.log(e)}}},Dd=(0,w.A)(Vd,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",{class:"sortElem",onClick:n[0]||(n[0]=function(e){return i.showHide(e)})},[(0,e.createElementVNode)("ul",_d,[0==t.current.module_pid?((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:0},(0,e.renderList)(r.allData,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",Nd,[(0,e.createElementVNode)("h3",null,[(0,e.createElementVNode)("a",null,[i.hasChild(t)?((0,e.openBlock)(),(0,e.createElementBlock)("i",Cd)):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("span",Bd,(0,e.toDisplayString)(t.name),1)])]),i.hasChild(t)?((0,e.openBlock)(),(0,e.createElementBlock)("ul",Ad,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.child,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("li",null,[(0,e.createElementVNode)("a",null,[(0,e.createElementVNode)("span",xd,(0,e.toDisplayString)(t.name),1)])])}),256))])):(0,e.createCommentVNode)("v-if",!0)])}),256)):(0,e.createCommentVNode)("v-if",!0)])])}]]);function Md(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var Td={class:"clearfix"},Id={key:0,class:"row"},Od=["id"],Pd={class:"table border shadow-sm mt-2 table-grid"},Ld=["innerHTML"],jd=["innerHTML"],Fd={key:1,class:"table border shadow-sm mt-2 table-grid"},Rd=["id"],Ud=["innerHTML"],Hd=["innerHTML"],$d={class:"text-danger"},zd={class:"row"},qd={class:"col-auto"},Kd={class:"form-check pt-2"},Wd={class:"col-auto"},Jd={key:1,class:"row"},Xd={class:"col"},Yd=["innerHTML"];const Gd={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Zd=e=>1e3*e,Qd=e=>e/1e3,eu=()=>{},tu=e=>e;function nu(e,t=!0){if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(e){}}const ou=e=>e(),au=(e,t,n=Gd.duration)=>new Proxy({animations:e.map(ou).filter(Boolean),duration:n,options:t},ru),ru={get:(e,t)=>{const n=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return Qd((null==n?void 0:n[t])||0);case"playbackRate":case"playState":return null==n?void 0:n[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(iu)).catch(eu)),e.finished;case"stop":return()=>{e.animations.forEach(e=>nu(e))};case"forEachNative":return t=>{e.animations.forEach(n=>t(n,e))};default:return void 0===(null==n?void 0:n[t])?void 0:()=>e.animations.forEach(e=>e[t]())}},set:(e,t,n)=>{switch(t){case"currentTime":n=Zd(n);case"playbackRate":for(let o=0;o<e.animations.length;o++)e.animations[o][t]=n;return!0}return!1}},iu=e=>e.finished,su=e=>"object"==typeof e&&Boolean(e.createAnimation),lu=e=>"number"==typeof e,cu=e=>Array.isArray(e)&&!lu(e[0]),du=(e,t,n)=>-n*e+n*t+e,uu=(e,t,n)=>t-e===0?1:(n-e)/(t-e);function hu(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const a=uu(0,t,o);e.push(du(n,1,a))}}const mu=(e,t,n)=>Math.min(Math.max(n,e),t);const fu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function pu(e,t,n,o){if(e===t&&n===o)return tu;return a=>0===a||1===a?a:fu(function(e,t,n,o,a){let r,i,s=0;do{i=t+(n-t)/2,r=fu(i,o,a)-e,r>0?n=i:t=i}while(Math.abs(r)>1e-7&&++s<12);return i}(a,0,1,e,n),t,o)}const gu=e=>"function"==typeof e,vu=e=>Array.isArray(e)&&lu(e[0]),yu={ease:pu(.25,.1,.25,1),"ease-in":pu(.42,0,1,1),"ease-in-out":pu(.42,0,.58,1),"ease-out":pu(0,0,.58,1)},bu=/\((.*?)\)/;function wu(e){if(gu(e))return e;if(vu(e))return pu(...e);const t=yu[e];if(t)return t;if(e.startsWith("steps")){const t=bu.exec(e);if(t){const e=t[1].split(",");return((e,t="end")=>n=>{const o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,a="end"===t?Math.floor(o):Math.ceil(o);return mu(0,1,a/e)})(parseFloat(e[0]),e[1].trim())}}return tu}class Eu{constructor(e,t=[0,1],{easing:n,duration:o=Gd.duration,delay:a=Gd.delay,endDelay:r=Gd.endDelay,repeat:i=Gd.repeat,offset:s,direction:l="normal",autoplay:c=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=tu,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((e,t)=>{this.resolve=e,this.reject=t}),n=n||Gd.easing,su(n)){const e=n.createAnimation(t);n=e.easing,t=e.keyframes||t,o=e.duration||o}this.repeat=i,this.easing=cu(n)?tu:wu(n),this.updateDuration(o);const d=function(e,t=function(e){const t=[0];return hu(t,e-1),t}(e.length),n=tu){const o=e.length,a=o-t.length;return a>0&&hu(t,a),a=>{let r=0;for(;r<o-2&&!(a<t[r+1]);r++);let i=mu(0,1,uu(t[r],t[r+1],a));const s=function(e,t){return cu(e)?e[((e,t,n)=>{const o=t-0;return((n-0)%o+o)%o+0})(0,e.length,t)]:e}(n,r);return i=s(i),du(e[r],e[r+1],i)}}(t,s,cu(n)?n.map(wu):tu);this.tick=t=>{var n;let o=0;o=void 0!==this.pauseTime?this.pauseTime:(t-this.startTime)*this.rate,this.t=o,o/=1e3,o=Math.max(o-a,0),"finished"===this.playState&&void 0===this.pauseTime&&(o=this.totalDuration);const i=o/this.duration;let s=Math.floor(i),c=i%1;!c&&i>=1&&(c=1),1===c&&s--;const u=s%2;("reverse"===l||"alternate"===l&&u||"alternate-reverse"===l&&!u)&&(c=1-c);const h=o>=this.totalDuration?1:Math.min(c,1),m=d(this.easing(h));e(m),void 0===this.pauseTime&&("finished"===this.playState||o>=this.totalDuration+r)?(this.playState="finished",null===(n=this.resolve)||void 0===n||n.call(this,m)):"idle"!==this.playState&&(this.frameRequestId=requestAnimationFrame(this.tick))},c&&this.play()}play(){const e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}class Su{setAnimation(e){this.animation=e,null==e||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const ku=new WeakMap;function _u(e){return ku.has(e)||ku.set(e,{transforms:[],values:new Map}),ku.get(e)}const Nu=["","X","Y","Z"],Cu={x:"translateX",y:"translateY",z:"translateZ"},Bu={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},Au={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:Bu,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:tu},skew:Bu},xu=new Map,Vu=e=>`--motion-${e}`,Du=["x","y","z"];["translate","scale","rotate","skew"].forEach(e=>{Nu.forEach(t=>{Du.push(e+t),xu.set(Vu(e+t),Au[e])})});const Mu=(e,t)=>Du.indexOf(e)-Du.indexOf(t),Tu=new Set(Du),Iu=e=>Tu.has(e),Ou=(e,t)=>`${e} ${t}(var(${Vu(t)}))`,Pu=e=>e.startsWith("--"),Lu=new Set,ju=(e,t)=>document.createElement("div").animate(e,t),Fu={cssRegisterProperty:()=>"undefined"!=typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{ju({opacity:[1]})}catch(e){return!1}return!0},finished:()=>Boolean(ju({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{ju({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}},Ru={},Uu={};for(const e in Fu)Uu[e]=()=>(void 0===Ru[e]&&(Ru[e]=Fu[e]()),Ru[e]);const Hu=(e,t)=>gu(e)?Uu.linearEasing()?`linear(${((e,t)=>{let n="";const o=Math.round(t/.015);for(let t=0;t<o;t++)n+=e(uu(0,o-1,t))+", ";return n.substring(0,n.length-2)})(e,t)})`:Gd.easing:vu(e)?$u(e):e,$u=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`;function zu(e){return Cu[e]&&(e=Cu[e]),Iu(e)?Vu(e):e}const qu=(e,t,n)=>{t=zu(t),Pu(t)?e.style.setProperty(t,n):e.style[t]=n},Ku=e=>"string"==typeof e;function Wu(e,t){var n;let o=(null==t?void 0:t.toDefaultUnit)||tu;const a=e[e.length-1];if(Ku(a)){const e=(null===(n=a.match(/(-?[\d.]+)([a-z%]*)/))||void 0===n?void 0:n[2])||"";e&&(o=t=>t+e)}return o}function Ju(e,t,n,o={},a){const r=window.__MOTION_DEV_TOOLS_RECORD,i=!1!==o.record&&r;let s,{duration:l=Gd.duration,delay:c=Gd.delay,endDelay:d=Gd.endDelay,repeat:u=Gd.repeat,easing:h=Gd.easing,persist:m=!1,direction:f,offset:p,allowWebkitAcceleration:g=!1,autoplay:v=!0}=o;const y=_u(e),b=Iu(t);let w=Uu.waapi();b&&((e,t)=>{Cu[t]&&(t=Cu[t]);const{transforms:n}=_u(e);var o,a;a=t,-1===(o=n).indexOf(a)&&o.push(a),e.style.transform=(e=>e.sort(Mu).reduce(Ou,"").trim())(n)})(e,t);const E=zu(t),S=function(e,t){return e.has(t)||e.set(t,new Su),e.get(t)}(y.values,E),k=xu.get(E);return nu(S.animation,!(su(h)&&S.generator)&&!1!==o.record),()=>{const y=()=>{var t,n;return null!==(n=null!==(t=((e,t)=>{t=zu(t);let n=Pu(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&0!==n){const e=xu.get(t);e&&(n=e.initialValue)}return n})(e,E))&&void 0!==t?t:null==k?void 0:k.initialValue)&&void 0!==n?n:0};let _=function(e,t){for(let n=0;n<e.length;n++)null===e[n]&&(e[n]=n?e[n-1]:t());return e}((e=>Array.isArray(e)?e:[e])(n),y);const N=Wu(_,k);if(su(h)){const e=h.createAnimation(_,"opacity"!==t,y,E,S);h=e.easing,_=e.keyframes||_,l=e.duration||l}if(Pu(E)&&(Uu.cssRegisterProperty()?function(e){if(!Lu.has(e)){Lu.add(e);try{const{syntax:t,initialValue:n}=xu.has(e)?xu.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:n})}catch(e){}}}(E):w=!1),b&&!Uu.linearEasing()&&(gu(h)||cu(h)&&h.some(gu))&&(w=!1),w){k&&(_=_.map(e=>lu(e)?k.toDefaultUnit(e):e)),1!==_.length||Uu.partialKeyframes()&&!i||_.unshift(y());const t={delay:Zd(c),duration:Zd(l),endDelay:Zd(d),easing:cu(h)?void 0:Hu(h,l),direction:f,iterations:u+1,fill:"both"};s=e.animate({[E]:_,offset:p,easing:cu(h)?h.map(e=>Hu(e,l)):void 0},t),s.finished||(s.finished=new Promise((e,t)=>{s.onfinish=e,s.oncancel=t}));const n=_[_.length-1];s.finished.then(()=>{m||(qu(e,E,n),s.cancel())}).catch(eu),g||(s.playbackRate=1.000001)}else if(a&&b)_=_.map(e=>"string"==typeof e?parseFloat(e):e),1===_.length&&_.unshift(parseFloat(y())),s=new a(t=>{qu(e,E,N?N(t):t)},_,Object.assign(Object.assign({},o),{duration:l,easing:h}));else{const t=_[_.length-1];qu(e,E,k&&lu(t)?k.toDefaultUnit(t):t)}return i&&r(e,t,_,{duration:l,delay:c,easing:h,repeat:u,offset:p},"motion-one"),S.setAnimation(s),s&&!v&&s.pause(),s}}const Xu=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function Yu(e,t,n){return gu(e)?e(t,n):e}const Gu=(Zu=Eu,function(e,t,n={}){const o=(e=function(e){return"string"==typeof e?e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}(e)).length;Boolean(o),Boolean(t);const a=[];for(let r=0;r<o;r++){const i=e[r];for(const e in t){const s=Xu(n,e);s.delay=Yu(s.delay,r,o);const l=Ju(i,e,t[e],s,Zu);a.push(l)}}return au(a,n,n.duration)});var Zu;function Qu(e,t={}){return au([()=>{const n=new Eu(e,[0,1],t);return n.finished.catch(()=>{}),n}],t,t.duration)}function eh(e,t,n){return(gu(e)?Qu:Gu)(e,t,n)}function th(e,t,n){const o=Math.max(t-5,0);return a=n-e(o),(r=t-o)?a*(1e3/r):0;var a,r}function nh(e){return lu(e)&&!isNaN(e)}function oh(e){return Ku(e)?parseFloat(e):e}const ah=function(){const e=new WeakMap;return(t={})=>{const n=new Map,o=(e=0,o=100,a=0,r=!1)=>{const i=`${e}-${o}-${a}-${r}`;return n.has(i)||n.set(i,(({stiffness:e=100,damping:t=10,mass:n=1,from:o=0,to:a=1,velocity:r=0,restSpeed:i,restDistance:s}={})=>{r=r?Qd(r):0;const l={done:!1,hasReachedTarget:!1,current:o,target:a},c=a-o,d=Math.sqrt(e/n)/1e3,u=((e=100,t=10,n=1)=>t/(2*Math.sqrt(e*n)))(e,t,n),h=Math.abs(c)<5;let m;if(i||(i=h?.01:2),s||(s=h?.005:.5),u<1){const e=d*Math.sqrt(1-u*u);m=t=>a-Math.exp(-u*d*t)*((u*d*c-r)/e*Math.sin(e*t)+c*Math.cos(e*t))}else m=e=>a-Math.exp(-d*e)*(c+(d*c-r)*e);return e=>{l.current=m(e);const t=0===e?r:th(m,e,l.current),n=Math.abs(t)<=i,c=Math.abs(a-l.current)<=s;var d,u,h;return l.done=n&&c,l.hasReachedTarget=(d=o,u=a,h=l.current,d<u&&h>=u||d>u&&h<=u),l}})(Object.assign({from:e,to:o,velocity:a},t))),n.get(i)},a=(t,n)=>(e.has(t)||e.set(t,function(e,t=tu){let n,o=10,a=e(0);const r=[t(a.current)];for(;!a.done&&o<1e4;)a=e(o),r.push(t(a.done?a.target:a.current)),void 0===n&&a.hasReachedTarget&&(n=o),o+=10;const i=o-10;return 1===r.length&&r.push(a.current),{keyframes:r,duration:i/1e3,overshootDuration:(null!=n?n:i)/1e3}}(t,n)),e.get(t));return{createAnimation:(e,t=!0,n,r,i)=>{let s,l,c,d=0,u=tu;const h=e.length;if(t)if(u=Wu(e,r?xu.get(zu(r)):void 0),c=oh(e[h-1]),h>1&&null!==e[0])l=oh(e[0]);else{const e=null==i?void 0:i.generator;if(e){const{animation:t,generatorStartTime:n}=i,o=(null==t?void 0:t.startTime)||n||0,a=(null==t?void 0:t.currentTime)||performance.now()-o,r=e(a).current;l=r,d=th(t=>e(t).current,a,r)}else n&&(l=oh(n()))}if(nh(l)&&nh(c)){const e=o(l,c,d,null==r?void 0:r.includes("scale"));s=Object.assign(Object.assign({},a(e,u)),{easing:"linear"}),i&&(i.generator=e,i.generatorStartTime=performance.now())}return s||(s={easing:"ease",duration:a(o(0,100)).overshootDuration}),s}}}}();function rh(e){return rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rh(e)}function ih(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,sh(o.key),o)}}function sh(e){var t=function(e){if("object"!=rh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rh(t)?t:t+""}var lh=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"come",value:function(e,t){var n=arguments,o=this;document.querySelectorAll(e).forEach(function(e){e.style.display=""}),eh(e,{opacity:[0,1]},{duration:1}).finished.then(function(){t&&t.apply(o,n)})}},{key:"out",value:function(e,t){var n=arguments,o=this;eh(e,{opacity:[1,0]},{duration:1}).finished.then(function(){document.querySelectorAll(e).forEach(function(e){e.style.display="none"}),t&&t.apply(o,n)})}},{key:"highlight",value:function(e,t){var n=arguments,o=this,a=""===(e="string"==typeof e?document.getElementById(e):e).style.backgroundColor?"#fff":e.style.backgroundColor;"TR"===e.nodeName&&(e=e.querySelectorAll("td")),eh(e,{"background-color":"#fff3cd"},{duration:.5}).finished.then(function(){eh(e,{"background-color":a},{duration:1}).finished.then(function(){t&&t.apply(o,n)})})}},{key:"scrollWinTo",value:function(e,t){var n=arguments,o=this,a=document.querySelector(e);a&&(window.scrollTo({top:a.offsetTop,behavior:"smooth"}),setTimeout(function(){t&&t.apply(o,n)},700))}},{key:"slideLeft",value:function(e,t){var n=arguments,o=this,a=(e=document.querySelector(e)).getBoundingClientRect();e.oldProp=a,eh(e,{x:0},{easing:ah({velocity:-(window.outerWidth+e.getBoundingClientRect().width)})}).finished.then(function(){t&&t.apply(o,n)})}},{key:"slideRight",value:function(e,t){var n=arguments,o=this;eh(e=document.querySelector(e),{x:0},{easing:ah({velocity:window.outerWidth+e.getBoundingClientRect().width})}).finished.then(function(){t&&t.apply(o,n)})}},{key:"cssAnimate",value:function(e,t){(e="string"==typeof e?document.querySelector(e):e).classList.remove("animated",t),e.classList.add("animated",t)}}],null&&ih(e.prototype,null),t&&ih(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ch(e){return function(e){if(Array.isArray(e))return dh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return dh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dh(e,t):void 0}}(e)||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 dh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const uh={components:{"info-popup":zr,"delete-popup":ie},mounted:function(){var e=this;this.highlight(),this.bindAction(),"FALSE"===this.showDeletePopup&&(this.preventDeleteBox=!0),U.on("list-view-hide-spinner",function(){e.showHideSpinner(void 0,"false")}),U.on("info-popup-open",function(){e.removeAllSpinners()})},created:function(){},props:["dataHeaders","dataList","dataActionFields","dataMoreActionFields","dataControllerName","dataActionAsAjax","dataActionCss","dataUserRights","dataMakeFieldAsLink","dataShowDeletePopup","dataEditHandledByOtherComponent","dataMinResultsNeeded","dataLayoutType","dataNoResultsFoundText"],data:function(){return{actionFields:this.dataActionFields&&"null"!==this.dataActionFields.toString()?JSON.parse(this.dataActionFields):[],userRights:this.dataUserRights?JSON.parse(this.dataUserRights):[],moreActions:this.dataMoreActionFields&&"null"!==this.dataMoreActionFields.toString()?JSON.parse(this.dataMoreActionFields):[],actionAjax:this.dataActionAsAjax&&"null"!==this.dataActionAsAjax.toString()?JSON.parse(this.dataActionAsAjax):this.getDefaultValue("action_as_ajax",[]),actionIconCss:this.dataActionCss&&"null"!==this.dataActionCss.toString()?JSON.parse(this.dataActionCss):this.getDefaultValue("action_icon_css",[]),alertMessage:{current:"Are you sure to delete this?",delete:"Are you sure to delete this?",permission:"Sorry! You don't have permission to delete this."},isDelete:!0,currentActionItem:null,preventDeleteBox:!1,makeFieldAsLink:this.dataMakeFieldAsLink?JSON.parse(this.dataMakeFieldAsLink):[],fieldAsLinkCache:{},showDeletePopup:this.dataShowDeletePopup?this.dataShowDeletePopup.toString().toUpperCase():"FALSE",editHandledByOtherComponent:void 0!==this.dataEditHandledByOtherComponent||this.dataEditHandledByOtherComponent&&"true"===this.dataEditHandledByOtherComponent.toString(),minResultsNeeded:void 0===this.dataMinResultsNeeded||""===this.dataMinResultsNeeded?-1:parseInt(this.dataMinResultsNeeded),layoutType:void 0===this.dataLayoutType||""===this.dataLayoutType?"table":this.dataLayoutType,noResultsFoundText:this.dataNoResultsFoundText,spinnerCss:["fa-spinner","fa-pulse","fa-fw"]}},computed:{headings:function(){var e=this.dataHeaders?JSON.parse(this.dataHeaders):[],t=[];return e.length>0&&e.forEach(function(e,n){var o=e.label||e,a=e.key||e,r=!(!e.isImage||"true"!==e.isImage.toString()),i=!(!e.showAllScopes||"true"!==e.showAllScopes.toString());t.push({label:o,key:a,isImage:r,showAllScopes:i})}),t},rows:function(){return this.dataList?JSON.parse(this.dataList):[]}},methods:{isActionFieldKey:function(e){return"action"===(e=void 0===e?"":e.toLowerCase())||"moreactions"===e},isMakeFieldAsLink:function(e){if(void 0!==this.fieldAsLinkCache[e])return this.fieldAsLinkCache[e];var t=this.makeFieldAsLink.find(function(t,n){if(t.key===e||t.action===e)return t});return this.fieldAsLinkCache[e]=void 0===t?-1:t,this.fieldAsLinkCache[e]},getFieldName:function(e,t,n){return t=t||"label","string"==typeof e||void 0===e[t]?e:e[t]},getFieldValue:function(e,t,n){var o=this;if(t.includes(".")){var a=t.split("."),r=a[0],i=a[1];switch(r=e[r],Object.prototype.toString.call(r)){case"[object Undefined]":r="";break;case"[object Array]":r=r.length>0?n.showAllScopes?function(e,t){var n=[];if(e.length>0)for(var o=0,a=e.length;o<a;o++)n.push(e[o][t]);return n.join(",")}(r,i):r[0][i]:r[i];break;case"[object Object]":r=r[i]||""}return r}return function(e,t,n){var a,r,i,s="",l=o.isMakeFieldAsLink(t);if(void 0!==l&&-1!==l){var c=t,d=l.action||c,u=d.charAt(0).toUpperCase()+d.slice(1),h="".concat(d,"/").concat(e.id);h=g.admin_path("".concat(o.dataControllerName,"/").concat(h));var m=e[t],f="",p="";if(o.isAjax(t)){f=o.getAjaxCss(c),f+=" "+t+"_"+e[t];var v=l["css_"+e[t]]||"";m='<i class="js_icon '.concat(v,'"></i>'),o.can(d)||(f+=" disabled"),p=e[t]}s='<a class="'.concat(f,'" data-value="').concat(p,'" data-rowid="').concat(e.id,'" data-action="').concat(d,'" title="').concat(u,'" href="').concat(h,'">').concat(m,"</a>"),"id"===t&&-1===o.actionFields.indexOf("edit")&&(s=m)}else{s=e[t];var y=g.get("media_path");s=!1===n.isImage?s:""!==s&&null!=s?(r=y,i=(a=s).substring(a.lastIndexOf(".")+1),["mp4","mov","ogg"].indexOf(i)>=0?'<a class="table-links" href="'.concat(r,"/").concat(a,'" target="_blank"><video height="30"><source src="').concat(r,"/").concat(a,'"></video></a>'):["apng","avif","gif","jpg","jpeg","jfif","pjpeg","pjp","png","svg","webp","bmp","ico","cur","tif","tiff"].indexOf(i)>=0?'<a class="table-links" href="'.concat(r,"/").concat(a,'" target="_blank"><img height="30" src=\'').concat(r,"/").concat(a,"' /></a>"):'<a class="table-links" href="'.concat(r,"/").concat(a,'" target="_blank">').concat(a,"</a>")):s}return s}(e,t,n)},getActionValue:function(e,t){var n=[];if(this.actionFields.length>0)for(var o=0;o<this.actionFields.length;o++){var a=this.actionFields[o],r=this.getAjaxCss(a),i=a.charAt(0).toUpperCase()+a.slice(1),s="";if("edit"===a?s=g.admin_path("".concat(this.dataControllerName,"/").concat(a,"/").concat(e.id)):"delete"===a?-1!==this.minResultsNeeded&&this.minResultsNeeded>=this.rows.length?console.info("Hiding delete button, because ".concat(this.minResultsNeeded," record(s) needed.")):s=g.admin_path("".concat(this.dataControllerName,"/destroy/").concat(e.id)):s=g.admin_path("".concat(this.dataControllerName,"/").concat(a,"/").concat(e.id)),""!==s){var l='<i class="js_icon '.concat(this.getIconCSS(a),'"></i>'),c='<a class="'.concat(r,'" data-rowid="').concat(e.id,'" data-action="').concat(a,'" title="').concat(i,'" href="').concat(s,'" class="').concat(a,'">').concat(l,"</a>");n.push(c)}}if(this.moreActions.length>0)for(var d=0;d<this.moreActions.length;d++){var u=this.moreActions[d],h=this.getAjaxCss(u),m=u.css||"",f="";if(u.hrefAttributes)for(var p in u.hrefAttributes)u.hrefAttributes.hasOwnProperty(p)&&(f+="".concat(p,"='").concat(u.hrefAttributes[p],"' "));var v=u.action,y=e[u.action_append_field]||"",b=u.label.charAt(0).toUpperCase()+u.label.slice(1),w=g.admin_path("".concat(this.dataControllerName,"/").concat(v,"/").concat(y)),E='<i class="js_icon '.concat(u.icon_css,'"></i>'),S='<a class="'.concat(h," ").concat(m,'" data-rowid="').concat(e.id,'" title="').concat(b,'" href="').concat(w,'" data-action="').concat(v,'" ').concat(f,">").concat(E,"</a>");n.push(S)}return n.join(" ")},can:function(e){return this.userRights.indexOf(e)>=0},isAjax:function(e){return this.actionAjax.indexOf(e)>=0},getAjaxCss:function(e){var t="[object Object]"===Object.prototype.toString.call(e)?e.action:e;return this.isAjax(e)?"js_action js_ajax js_"+t:"js_action js_"+t},getDefaultValue:function(e,t){return window.Laravel.htcmsAdminConfig(e)||t},getIconCSS:function(e){return this.getDefaultValue("action_icon_css","")[e]||""},getTotalColumns:function(){return this.headings.length},getTotalRows:function(){return this.rows.length},isZeroResult:function(){return 0===this.rows.length},highlight:function(){var e=p.queryBuilder.get("id");if(""!==e){var t="row_"+e;lh.scrollWinTo("#"+t,function(){lh.highlight(t)})}},deleteNow:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this,n=-1;try{if(1===e){var o=this.currentActionItem;if(this.can("delete")){n="row_"+o.getAttribute("data-rowid");var a=o.getAttribute("href");this.doAjax("delete",a,function(e){if(200===e.status){var o=t.rows.findIndex(function(t){return t.id.toString()===e.data.id.toString()});o>=0&&(W.show(t,"Record has been deleted",2e3),document.getElementById(n)&&document.getElementById(n).remove(),t.rows.splice(o,1),t.bindAction(),U.emit("pagination-on-delete"))}else t.showHideSpinner(t.currentActionItem,!1),W.show(t,"Ooops! Got some error!")})}else W.show(t,"Sorry! You don't have permission to delete."),setTimeout(function(){t.showHideSpinner(t.currentActionItem,!1)},1e3)}else t.showHideSpinner(t.currentActionItem,!1)}catch(e){t.showHideSpinner(t.currentActionItem,!1),W.show(t,"I don't understand what you are trying to do.",5e3)}this.closeDialog()},showHideSpinner:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.spinnerCss;if(e){var o,a=e instanceof HTMLAnchorElement?e:e.currentTarget;this.removeAllSpinners(),!0===t&&(o=a.firstElementChild.classList).add.apply(o,ch(n))}else this.removeAllSpinners()},removeAllSpinners:function(){var e=this.spinnerCss,t=document.querySelectorAll(".fa-spinner");t.length>0&&t.forEach(function(t){var n;(n=t.classList).remove.apply(n,ch(e))})},closeDialog:function(){this.$refs.deleteBox.close()},doAjax:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"get",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=this;return wl()[e](t).then(function(e){n&&n.apply(this,arguments)}).catch(function(e){o?o.apply(o,arguments):W.show(a,e.message,5e3),a.showHideSpinner(a.currentActionItem,!1)})},initAjaxAction:function(e){e.preventDefault(),e.stopPropagation();var t=this,n=e.currentTarget,o=n.dataset,a=o.action,r=o.value,i=n.getAttribute("href");switch(r&&(i=i+"/"+r),this.currentActionItem=n,a){case"delete":this.alertMessage.current=this.alertMessage.delete,this.isDelete=!0,!1===this.preventDeleteBox?this.openDeleteAlert(n):this.deleteNow(1);break;case"showinfo":var s=o.info,l=o.editable,c=o.rowid,d=o.excludefields||[];this.showInfo(s,c,d,l);break;default:this.doAjax("get",i,function(e){var o;t.showHideSpinner(n,!1);var i,s=t.isMakeFieldAsLink(a),l=n.getElementsByClassName("js_icon"),c=s["css_"+r];l.length>0&&(i=(l=l[0]).classList).remove.apply(i,ch(c.split(" "))),n.setAttribute("data-value",e.data.status),c=s["css_"+e.data.status],(o=l.classList).add.apply(o,ch(c.split(" ")))},function(e){var o;t.showHideSpinner(n,!1),W.show(t,(null==e||null===(o=e.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.message)||"Unknown Error!",3e3)})}},bindAction:function(){for(var e=this.$el.getElementsByClassName("js_action"),t=0;t<e.length;t++){var n=e[t];n.classList.contains("js_ajax")&&n.addEventListener("click",this.initAjaxAction,!1),n.classList.contains("js_action")&&n.addEventListener("click",this.showHideSpinner,!1)}!0===this.editHandledByOtherComponent&&this.$el.querySelectorAll("a[data-action='edit']").forEach(function(e,t){e.addEventListener("click",function(e){e.preventDefault(),U.emit("list-view-pre-edit",this)})})},openDeleteAlert:function(e){this.$refs.deleteBox.open(e)},openPermissionAlert:function(){this.alertMessage.current=this.alertMessage.permission,this.isDelete=!1,this.currentActionItem=null,this.$refs.deleteBox.open()},filterFieldsName:function(e){return(e=e.replace(/\.|_/g," ")).charAt(0).toUpperCase()+e.slice(1)},filterSnakeCase:function(e){return e.replace(/\s|\./g,"_").toLowerCase()},getCssForRow:function(e,t){return e.length-1===t?"active":""},showInfo:function(e,t,n,o){this.$refs.infoPopup.showInfo(e,t,n,o)}}},hh=(0,w.A)(uh,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("delete-popup"),l=(0,e.resolveComponent)("info-popup");return(0,e.openBlock)(),(0,e.createElementBlock)("div",Td,[i.isZeroResult()?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},["grid"===r.layoutType?((0,e.openBlock)(),(0,e.createElementBlock)("div",Id,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.rows,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("div",{id:"row_"+t.id,key:t.key,class:"col"},[(0,e.createElementVNode)("table",Pd,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.headings,function(n,o){return(0,e.openBlock)(),(0,e.createElementBlock)("tr",{class:(0,e.normalizeClass)(i.getCssForRow(n,o))},[(0,e.createElementVNode)("td",{class:(0,e.normalizeClass)("header head_"+i.getFieldName(n))},(0,e.toDisplayString)(i.filterFieldsName(i.getFieldName(n))),3),(0,e.createElementVNode)("td",null,[i.isActionFieldKey(i.getFieldName(n,"key"))?(0,e.createCommentVNode)("v-if",!0):((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:0,innerHTML:i.getFieldValue(t,i.getFieldName(n,"key"),n)},null,8,Ld)),i.isActionFieldKey(i.getFieldName(n,"key"))?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:1,class:"actions",innerHTML:i.getActionValue(t)},null,8,jd)):(0,e.createCommentVNode)("v-if",!0)])],2)}),256))])],8,Od)}),128))])):(0,e.createCommentVNode)("v-if",!0),"table"===r.layoutType?((0,e.openBlock)(),(0,e.createElementBlock)("table",Fd,[(0,e.createElementVNode)("thead",null,[(0,e.createElementVNode)("tr",null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.headings,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("th",{class:(0,e.normalizeClass)("header head_"+i.filterSnakeCase(i.getFieldName(t)))},(0,e.toDisplayString)(i.filterFieldsName(i.getFieldName(t))),3)}),256))])]),(0,e.createElementVNode)("tbody",null,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.rows,function(t){return(0,e.openBlock)(),(0,e.createElementBlock)("tr",{id:"row_"+t.id,key:t.key,class:"list-table-row"},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.headings,function(n){return(0,e.openBlock)(),(0,e.createElementBlock)("td",null,[i.isActionFieldKey(i.getFieldName(n,"key"))?((0,e.openBlock)(),(0,e.createElementBlock)("div",{key:0,class:"actions",innerHTML:i.getActionValue(t)},null,8,Ud)):((0,e.openBlock)(),(0,e.createElementBlock)("span",{key:1,innerHTML:i.getFieldValue(t,i.getFieldName(n,"key"),n)},null,8,Hd))])}),256))],8,Rd)}),128))])])):(0,e.createCommentVNode)("v-if",!0)],64)),(0,e.createVNode)(s,{ref:"deleteBox","data-show-footer":!0,"data-show-modal":!1,onOnClose:i.deleteNow},{title:(0,e.withCtx)(function(){return function(e){if(Array.isArray(e))return Md(e)}(t=n[4]||(n[4]=[(0,e.createTextVNode)("Alert",-1)]))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return Md(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Md(e,t):void 0}}(t)||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.")}();var t}),content:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("span",$d,(0,e.toDisplayString)(r.alertMessage.current),1)]}),footer:(0,e.withCtx)(function(){return[(0,e.createElementVNode)("div",zd,[(0,e.createElementVNode)("div",qd,[(0,e.createElementVNode)("div",Kd,[(0,e.withDirectives)((0,e.createElementVNode)("input",{id:"flexCheckDefault","onUpdate:modelValue":n[0]||(n[0]=function(e){return r.preventDeleteBox=e}),class:"form-check-input",type:"checkbox",value:""},null,512),[[e.vModelCheckbox,r.preventDeleteBox]]),n[5]||(n[5]=(0,e.createElementVNode)("label",{class:"form-check-label",for:"flexCheckDefault"}," Don't ask again ",-1))])]),(0,e.createElementVNode)("div",Wd,[(0,e.withDirectives)((0,e.createElementVNode)("button",{class:"btn btn-default","data-dismiss":"modal",type:"button",onClick:n[1]||(n[1]=function(e){return i.deleteNow(0)})}," No ",512),[[e.vShow,r.isDelete]]),(0,e.withDirectives)((0,e.createElementVNode)("button",{class:"btn btn-primary",type:"button",onClick:n[2]||(n[2]=function(e){return i.deleteNow(1)})}," Yes ",512),[[e.vShow,r.isDelete]]),(0,e.withDirectives)((0,e.createElementVNode)("button",{class:"btn btn-primary",type:"button",onClick:n[3]||(n[3]=function(e){return i.closeDialog()})}," Okay ",512),[[e.vShow,!r.isDelete]])])])]}),_:1},8,["onOnClose"]),(0,e.createVNode)(l,{ref:"infoPopup"},null,512),i.isZeroResult()?((0,e.openBlock)(),(0,e.createElementBlock)("div",Jd,[(0,e.createElementVNode)("div",Xd,[(0,e.createElementVNode)("div",{innerHTML:r.noResultsFoundText},null,8,Yd)])])):(0,e.createCommentVNode)("v-if",!0)])}]]),mh=hh;var fh={class:"btn-toolbar justify-content-between border-bottom mb-2 pb-2",role:"toolbar"},ph={class:"btn-group",role:"group"},gh={key:0,style:{position:"relative",top:"5px"}},vh=["innerHTML"],yh={class:"input-group actionToolbar"};function bh(e){return function(e){if(Array.isArray(e))return wh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return wh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wh(e,t):void 0}}(e)||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 wh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Eh(e){return Eh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Eh(e)}function Sh(e){return function(e){if(Array.isArray(e))return kh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return kh(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kh(e,t):void 0}}(e)||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 kh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const _h={props:["dataIgnoreFields","dataPasteElement","dataForm","dataBackUrl","dataCopyPasteAutoInit","dataShowCopy","dataShowPaste"],mounted:function(){this.autoInit&&this.init()},created:function(){},data:function(){var e;return{ignoreFields:void 0===this.dataIgnoreFields?["id","site_id","backURL","actionPerformed","platform_id","_token","insert_by","update_by"]:JSON.parse(this.dataIgnoreFields),copyKey:"cms_copy_data",backURL:void 0===this.dataBackUrl||""===this.dataBackUrl?"":this.dataBackUrl,autoInit:void 0===this.dataCopyPasteAutoInit||"true"===(null===(e=this.dataCopyPasteAutoInit)||void 0===e?void 0:e.toString()),showCopy:void 0===this.dataShowCopy||"true"===this.dataShowCopy.toString(),showPaste:void 0===this.dataShowPaste||"true"===this.dataShowPaste.toString()}},computed:{form:function(){return void 0!==this.dataForm&&document.getElementById(this.dataForm)?document.getElementById(this.dataForm):document},pasteElement:function(){return void 0===this.dataPasteElement?this.form.querySelectorAll("input[type='text']")[0]:this.form.getElementById(this.dataPasteElement)}},methods:{init:function(){var e=this;this.pasteElement&&this.pasteElement.addEventListener("blur",function(){(0,p.IsJson)(this.value)&&e.pasteNow()})},copyNow:function(){var e=this,t=this.form.querySelectorAll("input"),n=this.form.querySelectorAll("textarea"),o=this.form.querySelectorAll("select"),a=[].concat(Sh(t),Sh(n),Sh(o)),r={};a.forEach(function(t){var n=t.getAttribute("name")||t.getAttribute("id");null!=n&&"object"!==Eh(n)&&-1===function(t){return e.ignoreFields.findIndex(function(e){return t===e})}(n)&&(r[n]="checkbox"===t.type||"radio"===t.type?t.checked:t.value)});var i=JSON.stringify(r);(0,p.CopyToClipboard)(i),U.emit("on-copy",i),W.show(this,"Copied...",1e3)},fillData:function(e){var t=this.form;if(e)for(var n in e)try{var o=t[n]||document.getElementById(n),a=e[n];"checkbox"===o.type||"radio"===o.type?o.checked=a:o.value=a}catch(e){console.info("unable to set value @ "+n)}},pasteNow:function(e){var t=this;(0,p.PasteFromClipboard)().then(function(n){(0,p.IsJson)(n)&&t.fillData(JSON.parse(n)),e&&e(JSON.parse(n)),U.emit("on-paste",n)}).catch(function(e){console.log("unable to paste")})}}},Nh=(0,w.A)(_h,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[r.showCopy?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,"aria-label":"Copy",class:"btn btn-outline-secondary",title:"Copy",type:"button",onClick:n[0]||(n[0]=function(e){return i.copyNow()})},bh(n[2]||(n[2]=[(0,e.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-copy"},null,-1)])))):(0,e.createCommentVNode)("v-if",!0),r.showPaste?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:1,"aria-label":"Paste",class:"btn btn-outline-secondary",title:"Paste",type:"button",onClick:n[1]||(n[1]=function(e){return i.pasteNow()})},bh(n[3]||(n[3]=[(0,e.createElementVNode)("i",{"aria-hidden":"true",class:"fa fa-paste"},null,-1)])))):(0,e.createCommentVNode)("v-if",!0)],64)}]]);var Ch={class:"btn-group"};const Bh={mounted:function(){p.LeftMenu.init(),this.init()},props:["dataIconCss","dataIconCssOff"],data:function(){return{visible:!0,currentCss:"",css:void 0===this.dataIconCss||""===this.dataIconCss?"fa fa-arrow-left hand":this.dataIconCss,cssOff:void 0===this.dataIconCssOff||""===this.dataIconCssOff?"fa fa-arrow-right hand":this.dataIconCssOff}},methods:{init:function(){var e=this;this.currentCss=p.LeftMenu.isVisible()?this.css:this.cssOff,U.on("left-menu-on-show",function(){e.currentCss=e.css}),U.on("left-menu-on-hide",function(){e.currentCss=e.cssOff})},toggleMenu:function(){this.visible=!this.visible,p.LeftMenu.toggleShow()}}},Ah=(0,w.A)(Bh,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("div",Ch,[(0,e.createElementVNode)("span",{onClick:n[0]||(n[0]=function(){return i.toggleMenu&&i.toggleMenu.apply(i,arguments)}),class:(0,e.normalizeClass)(r.currentCss)},null,2)])}]]),xh={components:{"copy-paste":Nh,"left-menu-toggle":Ah},mounted:function(){},props:["dataTitle","dataBackUrl","dataBackTitle","dataShowCopy","dataShowPaste","dataCopyPasteAutoInit","dataShowExpand"],computed:{showBackButton:function(){return void 0!==this.dataBackUrl},showExpand:function(){return void 0!==this.dataShowExpand}},data:function(){return{title:this.dataTitle,backUrl:this.dataBackUrl,backTitle:void 0===this.dataBackTitle?"Back":this.dataBackTitle}},methods:{goBack:function(){window.location.href=this.backUrl}}},Vh=(0,w.A)(xh,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("left-menu-toggle"),l=(0,e.resolveComponent)("copy-paste");return(0,e.openBlock)(),(0,e.createElementBlock)("div",fh,[(0,e.createElementVNode)("div",ph,[i.showExpand?((0,e.openBlock)(),(0,e.createElementBlock)("small",gh,[(0,e.createVNode)(s,{"data-icon-css":"fa fa-arrow-left hand","data-icon-css-off":"fa fa-arrow-right hand"})])):(0,e.createCommentVNode)("v-if",!0),(0,e.createElementVNode)("h4",{class:"moduleTitle",innerHTML:r.title},null,8,vh)]),(0,e.createElementVNode)("div",yh,[(0,e.createVNode)(l,{"data-copy-paste-auto-init":o.dataCopyPasteAutoInit,"data-show-copy":o.dataShowCopy,"data-show-paste":o.dataShowPaste},null,8,["data-copy-paste-auto-init","data-show-copy","data-show-paste"]),i.showBackButton?((0,e.openBlock)(),(0,e.createElementBlock)("button",{key:0,"aria-label":"Back",class:"btn btn-outline-secondary",title:"Back",type:"button",onClick:n[0]||(n[0]=function(e){return i.goBack()})},(0,e.toDisplayString)(r.backTitle),1)):(0,e.createCommentVNode)("v-if",!0)])])}]]);var Dh={class:"navbar navbar-expand-lg bg-light border-bottom"},Mh={class:"container-fluid"},Th={class:"navbar-brand",href:"/",target:"_blank"},Ih=["src","height"],Oh={class:"collapse navbar-collapse",id:"navbarScroll"},Ph={class:"navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll",style:{"--bs-scroll-height":"100px"}},Lh={class:"nav-item"},jh={class:"d-flex"},Fh={class:"text-success"},Rh={class:"navbar-nav me-auto my-2 my-lg-0 navbar-nav-scroll ms-1",style:{"--bs-scroll-height":"100px"}},Uh={class:"nav-item"};const Hh={components:{"global-site-button":Ba},mounted:function(){},props:["dataUsername","dataSiteName","dataCurrentSite","dataSupportedSites","dataIsAdmin","dataSiteCombo","dataLogo","dataLogoHeight"],computed:{logo:function(){return void 0!==this.dataLogo&&""!==this.dataLogo?this.dataLogo:g.admin_asset("img/logo-transparent.png")}},data:function(){return{siteName:this.dataSiteName||"hashtagcms.org",userName:this.dataUsername,isLoggedIn:!(!this.dataUsername||""===this.dataUsername),siteCombo:!(void 0===this.dataSiteCombo||"false"===this.dataSiteCombo),logoHeight:void 0===this.dataLogoHeight||""===this.dataLogoHeight?50:this.dataLogoHeight}},methods:{logout:function(e){document.getElementById("logout-form").submit()}}},$h=(0,w.A)(Hh,[["render",function(t,n,o,a,r,i){var s=(0,e.resolveComponent)("global-site-button");return(0,e.openBlock)(),(0,e.createElementBlock)("nav",Dh,[(0,e.createElementVNode)("div",Mh,[(0,e.createElementVNode)("a",Th,[(0,e.createElementVNode)("img",{class:"cms-logo",src:i.logo,height:r.logoHeight},null,8,Ih),(0,e.createTextVNode)(" "+(0,e.toDisplayString)(r.siteName),1)]),n[2]||(n[2]=(0,e.createElementVNode)("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarScroll","aria-controls":"navbarScroll","aria-expanded":"false","aria-label":"Toggle navigation"},[(0,e.createElementVNode)("span",{class:"navbar-toggler-icon"})],-1)),(0,e.createElementVNode)("div",Oh,[(0,e.createElementVNode)("ul",Ph,[(0,e.createElementVNode)("li",Lh,[(0,e.createVNode)(s,{"data-current-site":o.dataCurrentSite,"data-supported-sites":o.dataSupportedSites,"data-is-admin":o.dataIsAdmin},null,8,["data-current-site","data-supported-sites","data-is-admin"])])]),(0,e.createElementVNode)("div",jh,[n[1]||(n[1]=(0,e.createTextVNode)(" Welcome ",-1)),(0,e.createElementVNode)("span",Fh,(0,e.toDisplayString)(r.userName)+"!",1),(0,e.createElementVNode)("ul",Rh,[(0,e.createElementVNode)("li",Uh,[(0,e.createElementVNode)("a",{href:"/logout",onClick:n[0]||(n[0]=(0,e.withModifiers)(function(){return i.logout&&i.logout.apply(i,arguments)},["prevent"]))},"Logout")])])])])])])}]]);var zh={class:"loaderModal",ref:"loaderModal"},qh={class:"loaderPanel",ref:"loaderSpinner"},Kh=["innerHTML"];const Wh={props:["dataLoadingText","dataAsModal"],mounted:function(){this.fixLayout()},data:function(){return{loadingText:void 0===this.dataLoadingText?"Loading. Please wait...":this.dataLoadingText,asModal:"undefined"==typeof dataAsModal||!0===dataAsModal,visible:!1}},methods:{fixLayout:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=(e=0,t=0,"number"==typeof window.innerWidth?(e=window.innerWidth,t=window.innerHeight):document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)?(e=document.documentElement.clientWidth,t=document.documentElement.clientHeight):document.body&&(document.body.clientWidth||document.body.clientHeight)&&(e=document.body.clientWidth,t=document.body.clientHeight),{width:e,height:t}),a=this.$refs.loaderModal,r=this.$refs.loaderSpinner;a.style.width=o.width+"px",a.style.height=o.height+"px",null!==n&&(n.left&&(r.style.left=n.left+"px"),n.top&&(r.style.top=n.top+"px"),n.right&&(r.style.top=n.right+"px"))},show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.visible=!0,"string"==typeof e&&(this.loadingText=e),this.fixLayout(t)},hide:function(){this.visible=!1}}},Jh=(0,w.A)(Wh,[["render",function(t,n,o,a,r,i){return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)("div",null,[(0,e.withDirectives)((0,e.createElementVNode)("div",zh,null,512),[[e.vShow,r.asModal]]),(0,e.createElementVNode)("div",qh,[n[0]||(n[0]=(0,e.createStaticVNode)('<div class="spinner"><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle class="length" fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg><svg viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke-width="8" stroke-linecap="round" cx="33" cy="33" r="28"></circle></svg></div>',1)),(0,e.createElementVNode)("span",{class:"loaderText",innerHTML:r.loadingText},null,8,Kh)],512)],512)),[[e.vShow,r.visible]])}]]),Xh={props:["dataBackUrl","dataTimeout"],data:function(){return{totalTime:void 0===this.dataTimeout?5:parseInt(this.dataTimeout),timeRemaining:0,intervalId:0,seconds:"Seconds"}},mounted:function(){this.intervalId=setInterval(this.updateTime,1e3)},methods:{goBack:function(){clearInterval(this.intervalId),window.location.href=this.dataBackUrl},updateTime:function(){this.timeRemaining>=this.totalTime?(clearInterval(this.intervalId),this.goBack()):this.timeRemaining++,this.seconds=this.totalTime-this.timeRemaining<=1?"Second":"Seconds"}}},Yh=(0,w.A)(Xh,[["render",function(t,n,o,a,r,i){return(0,e.openBlock)(),(0,e.createElementBlock)("a",{href:"#",onClick:n[0]||(n[0]=function(e){return i.goBack()}),class:"btn btn-outline-secondary"},[(0,e.renderSlot)(t.$slots,"default",{},function(){return[n[1]||(n[1]=(0,e.createTextVNode)("Back in ",-1))]}),(0,e.createElementVNode)("span",null,(0,e.toDisplayString)(r.totalTime-r.timeRemaining)+" "+(0,e.toDisplayString)(r.seconds),1)])}]]);var Gh={class:"toasterHolder jsToast shadow"},Zh={class:"toasterContent"};const Qh={mounted:function(){},data:function(){return{showMe:!1,message:"Toast Content",intervalId:0}},methods:{show:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3,n=arguments.length>2?arguments[2]:void 0;this.hide();var o=this;this.showMe=!0,this.message=""!==e?e:"",this.$nextTick(function(){this.align(n)}),this.intervalId=setTimeout(function(){o.hide()},t)},hide:function(){this.showMe=!1,this.intervalId&&clearInterval(this.intervalId)},align:function(e){var t=void 0!==e?e.left:window.innerWidth/2-this.$el.offsetWidth/2,n=void 0!==e?e.top:window.innerHeight/2-this.$el.offsetHeight/2+window.scrollY;this.$el.style.top=n+"px",this.$el.style.left=t+"px"}}},em=(0,w.A)(Qh,[["render",function(t,n,o,a,r,i){return(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)("div",Gh,[(0,e.createElementVNode)("div",Zh,(0,e.toDisplayString)(r.message),1)],512)),[[e.vShow,r.showMe]])}]]);function tm(e){return tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tm(e)}function nm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function om(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nm(Object(n),!0).forEach(function(t){am(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function am(e,t,n){return(t=function(e){var t=function(e){if("object"!=tm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tm(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}p.Dashboard.data,p.Dashboard.labelsCategories,p.Dashboard.datasCategories,p.Dashboard.labelsContent,p.Dashboard.datasContent,p.Dashboard.bgColors,p.Dashboard.borderColors,p.Dashboard.createChart,p.Dashboard.makeData,p.Dashboard.init;var rm=new p.AdminConfig,im={makeRichEditor:function(e,t){var n={selector:"#"+(e=document.querySelector(e)).id,height:500,theme:"silver",plugins:"code print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern",toolbar1:"formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist | removeformat | customGallery | image | code ",image_advtab:!0,template_popup_height:400,template_popup_width:320,valid_elements:"*[*]",valid_children:"*[*]",document_base_url:rm.get("app_url")+"/",allow_script_urls:!0,convert_urls:!1,relative_urls:!1,remove_script_host:!1,content_css:["//fonts.googleapis.com/css?family=Lato:300,300i,400,400i"],setup:function(e){e.ui.registry.addButton("customGallery",{text:"Insert Image",onAction:function(t){var n;null!==(n=Vue)&&void 0!==n&&null!==(n=n.$refs)&&void 0!==n&&n.imageGallery&&Vue.$refs.imageGallery.open(e)}})}};n=om(om({},n),t),e.editor=tinymce.init(n)}},sm={action:null,content_type:null,id:null,init:function(e,t,n){this.action=e,this.content_type=t,this.id=n,"add"===sm.action?(document.getElementById("lang_name").addEventListener("change",sm.autoUpdateFields),document.getElementById("lang_title").addEventListener("change",sm.autoUpdateUrls),document.getElementById("link_rewrite").addEventListener("keyup",sm.linkRewriteUpdated),document.getElementById("category_id").addEventListener("change",sm.getParentCategory)):this.getParentCategory()},isBlank:function(e){return""===document.getElementById(e).value.replace(/\s/g,"")},autoUpdateFields:function(){var e=this.value;try{if(sm.isBlank("lang_title")){document.getElementById("lang_title").value=e[0].toUpperCase()+e.slice(1),document.getElementById("alias").value=(0,p.CleanForUrl)(e.toUpperCase(),"_");var t=(0,p.CleanForUrl)(e.toLowerCase(),"-");document.getElementById("lang_active_key").value=t,document.getElementById("link_rewrite").value=t}}catch(e){console.error(e.message)}},autoUpdateUrls:function(){var e=this.value;if(!0!==document.getElementById("link_rewrite").edited){e=(e=(0,p.CleanForUrl)(e.toUpperCase(),"_")).substr(0,60),document.getElementById("alias").value=e;var t=(0,p.CleanForUrl)(e.toLowerCase(),"-");t=e.substr(0,128),document.getElementById("lang_active_key").value=t,document.getElementById("link_rewrite").value=t}},linkRewriteUpdated:function(){document.getElementById("link_rewrite").edited=!0},getParentCategory:function(){var e=document.getElementById("parent_id"),t=document.getElementById("category_id").value;if(document.getElementById("parent_id").value="",e.length=0,e.options[0]=new Option("Select",""),t>0){o(!0);var n=rm.admin_path("page/getParentCategory",{content_type:sm.content_type,category_id:t});axios.get(n).then(function(t){!function(t){if(t.length>0)for(var n=1,a=0;a<t.length;a++){var r=t[a];r.id!==sm.id&&(e.options[n]=new Option(r.lang.name,r.id),n++)}else o(!1)}(t.data)}).catch(function(e){o(!1)})}else o(!1);function o(e){document.getElementById("parent_div").style.display=!0===e?"":"none"}}};function lm(e){return lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lm(e)}function cm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,dm(o.key),o)}}function dm(e){var t=function(e){if("object"!=lm(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lm(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lm(t)?t:t+""}var um=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.errors="undefined"==typeof error_messages?[]:error_messages,this.init()},t=[{key:"init",value:function(){var e=this;document.addEventListener("DOMContentLoaded",function(){for(var t in e.errors)e.highlightField(t,e.errors[t][0]);e.focusFirst()})}},{key:"highlightField",value:function(e,t){var n=e;if(!(e=document.getElementById(n)))return console.error("Could not find "+n),!1;e.classList.add("is-invalid");var o=document.createElement("div");o.classList.add("alert","alert-danger","mt-03"),-1!==n.indexOf("lang_")&&(t=t.replace("lang ","")),o.innerHTML=t,e.parentNode.insertBefore(o,e.nextSibling)}},{key:"focusFirst",value:function(){for(var e in this.errors){var t=document.getElementById(e);try{if(t){t.focus();break}}catch(e){console.log(e.message)}}}}],t&&cm(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();const hm=p.MapAPI;var mm="1.0.7"})(),__webpack_exports__})());
|