/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/kst-util@1.1.2/lib/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";function _typeof(e){return(_typeof="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})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var axios=createCommonjsModule(function(e,t){var r;r=function(){return o={},r.m=n=[function(e,t,r){e.exports=r(1)},function(e,t,r){var n=r(2),o=r(3),i=r(5),a=r(22);function s(e){var t=new i(e),r=o(i.prototype.request,t);return n.extend(r,i.prototype,t),n.extend(r,t),r}var u=s(r(11));u.Axios=i,u.create=function(e){return s(a(u.defaults,e))},u.Cancel=r(23),u.CancelToken=r(24),u.isCancel=r(10),u.all=function(e){return Promise.all(e)},u.spread=r(25),e.exports=u,e.exports.default=u},function(e,t,r){var o=r(3),n=r(4),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:n,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:u,isStream:function(e){return s(e)&&u(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:c,merge:function r(){var n={};function e(e,t){"object"==typeof n[t]&&"object"==typeof e?n[t]=r(n[t],e):n[t]=e}for(var t=0,o=arguments.length;t<o;t++)c(arguments[t],e);return n},deepMerge:function r(){var n={};function e(e,t){"object"==typeof n[t]&&"object"==typeof e?n[t]=r(n[t],e):n[t]="object"==typeof e?r({},e):e}for(var t=0,o=arguments.length;t<o;t++)c(arguments[t],e);return n},extend:function(r,e,n){return c(e,function(e,t){r[t]=n&&"function"==typeof e?o(e,n):e}),r},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports=function(r,n){return function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];return r.apply(n,e)}}},function(e,t){e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}},function(e,t,r){var o=r(2),n=r(6),i=r(7),a=r(8),s=r(22);function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e,t){"string"==typeof e?(e=t||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method=e.method?e.method.toLowerCase():"get";var r=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){r.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){r.push(e.fulfilled,e.rejected)});r.length;)n=n.then(r.shift(),r.shift());return n},u.prototype.getUri=function(e){return e=s(this.defaults,e),n(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},o.forEach(["delete","get","head","options"],function(r){u.prototype[r]=function(e,t){return this.request(o.merge(t||{},{method:r,url:e}))}}),o.forEach(["post","put","patch"],function(n){u.prototype[n]=function(e,t,r){return this.request(o.merge(r||{},{method:n,url:e,data:t}))}}),e.exports=u},function(e,t,r){var a=r(2);function s(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(a.isURLSearchParams(t))n=t.toString();else{var o=[];a.forEach(t,function(e,t){null!=e&&(a.isArray(e)?t+="[]":e=[e],a.forEach(e,function(e){a.isDate(e)?e=e.toISOString():a.isObject(e)&&(e=JSON.stringify(e)),o.push(s(t)+"="+s(e))}))}),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}},function(e,t,r){var n=r(2);function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,function(e){null!==e&&t(e)})},e.exports=o},function(e,t,r){var n=r(2),o=r(9),i=r(10),a=r(11),s=r(20),u=r(21);function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(t){return c(t),t.baseURL&&!s(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),n.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return c(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(c(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(e,t,r){var n=r(2);e.exports=function(t,r,e){return n.forEach(e,function(e){t=e(t,r)}),t}},function(e,t){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){var n=r(2),o=r(12),i={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,u={adapter:("undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)?s=r(13):"undefined"!=typeof XMLHttpRequest&&(s=r(13)),s),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(a(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return 200<=e&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},n.forEach(["delete","get","head"],function(e){u.headers[e]={}}),n.forEach(["post","put","patch"],function(e){u.headers[e]=n.merge(i)}),e.exports=u},function(e,t,r){var o=r(2);e.exports=function(r,n){o.forEach(r,function(e,t){t!==n&&t.toUpperCase()===n.toUpperCase()&&(r[n]=e,delete r[t])})}},function(e,t,f){var l=f(2),p=f(14),d=f(6),h=f(17),m=f(18),y=f(15);e.exports=function(c){return new Promise(function(r,n){var o=c.data,i=c.headers;l.isFormData(o)&&delete i["Content-Type"];var a=new XMLHttpRequest;if(c.auth){var e=c.auth.username||"",t=c.auth.password||"";i.Authorization="Basic "+btoa(e+":"+t)}if(a.open(c.method.toUpperCase(),d(c.url,c.params,c.paramsSerializer),!0),a.timeout=c.timeout,a.onreadystatechange=function(){if(a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in a?h(a.getAllResponseHeaders()):null,t={data:c.responseType&&"text"!==c.responseType?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:e,config:c,request:a};p(r,n,t),a=null}},a.onabort=function(){a&&(n(y("Request aborted",c,"ECONNABORTED",a)),a=null)},a.onerror=function(){n(y("Network Error",c,null,a)),a=null},a.ontimeout=function(){n(y("timeout of "+c.timeout+"ms exceeded",c,"ECONNABORTED",a)),a=null},l.isStandardBrowserEnv()){var s=f(19),u=(c.withCredentials||m(c.url))&&c.xsrfCookieName?s.read(c.xsrfCookieName):void 0;u&&(i[c.xsrfHeaderName]=u)}if("setRequestHeader"in a&&l.forEach(i,function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:a.setRequestHeader(t,e)}),c.withCredentials&&(a.withCredentials=!0),c.responseType)try{a.responseType=c.responseType}catch(e){if("json"!==c.responseType)throw e}"function"==typeof c.onDownloadProgress&&a.addEventListener("progress",c.onDownloadProgress),"function"==typeof c.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",c.onUploadProgress),c.cancelToken&&c.cancelToken.promise.then(function(e){a&&(a.abort(),n(e),a=null)}),void 0===o&&(o=null),a.send(o)})}},function(e,t,r){var o=r(15);e.exports=function(e,t,r){var n=r.config.validateStatus;!n||n(r.status)?e(r):t(o("Request failed with status code "+r.status,r.config,null,r.request,r))}},function(e,t,r){var a=r(16);e.exports=function(e,t,r,n,o){var i=new Error(e);return a(i,t,r,n,o)}},function(e,t){e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){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:this.config,code:this.code}},e}},function(e,t,r){var i=r(2),a=["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"];e.exports=function(e){var t,r,n,o={};return e&&i.forEach(e.split("\n"),function(e){if(n=e.indexOf(":"),t=i.trim(e.substr(0,n)).toLowerCase(),r=i.trim(e.substr(n+1)),t){if(o[t]&&0<=a.indexOf(t))return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}}),o}},function(e,t,r){var n,o,i,a=r(2);function s(e){var t=e;return o&&(i.setAttribute("href",t),t=i.href),i.setAttribute("href",t),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}e.exports=a.isStandardBrowserEnv()?(o=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a"),n=s(window.location.href),function(e){var t=a.isString(e)?s(e):e;return t.protocol===n.protocol&&t.host===n.host}):function(){return!0}},function(e,t,r){var s=r(2);e.exports=s.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),s.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),s.isString(n)&&a.push("path="+n),s.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){var o=r(2);e.exports=function(t,r){r=r||{};var n={};return o.forEach(["url","method","params","data"],function(e){void 0!==r[e]&&(n[e]=r[e])}),o.forEach(["headers","auth","proxy"],function(e){o.isObject(r[e])?n[e]=o.deepMerge(t[e],r[e]):void 0!==r[e]?n[e]=r[e]:o.isObject(t[e])?n[e]=o.deepMerge(t[e]):void 0!==t[e]&&(n[e]=t[e])}),o.forEach(["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"],function(e){void 0!==r[e]?n[e]=r[e]:void 0!==t[e]&&(n[e]=t[e])}),n}},function(e,t){function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,r){var n=r(23);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new n(e),t(r.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},e.exports=o},function(e,t){e.exports=function(t){return function(e){return t.apply(null,e)}}}],r.c=o,r.p="",r(0);function r(e){if(o[e])return o[e].exports;var t=o[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var n,o},e.exports=r()}),throttle=function(o,i){var a=null;if(o){if(!Object.prototype.toString.call(o).includes("unction"))throw new Error("the 1st param must be a Function at throttleUtil");i=i||300;var s=Date.now();return function(){var e=this,t=arguments,r=Date.now(),n=i-(r-s);clearTimeout(a),n<=0?(o.apply(e,t),s=Date.now()):a=setTimeout(function(){o.apply(e,t)},n)}}},PubSub=function(){function e(){_classCallCheck(this,e),this.handlers={}}return _createClass(e,[{key:"on",value:function(e,t){e in this.handlers||(this.handlers[e]=[]),this.handlers[e].push(t)}},{key:"off",value:function(e,t){var r,n=-1,o=this.handlers[e],i=this.handlers[e]?this.handlers[e].length:0;for(r=0;r<i;r++)if(o[r]===t){n=r;break}-1!==n&&(1===i?delete this.handlers[e]:this.handlers[e].splice(n,1))}},{key:"emit",value:function(e){var t,r=Array.prototype.slice.call(arguments,1),n=this.handlers[e],o=this.handlers[e]?this.handlers[e].length:0;for(t=0;t<o;t++)n[t].apply(this,r)}}]),e}(),getBroswerType=function(){return window.ActiveXObject||"ActiveXObject"in window?"IE":-1!==navigator.userAgent.indexOf("Firefox")?"Firefox":-1!==navigator.userAgent.indexOf("Chrome")?"Chrome":-1!==navigator.userAgent.indexOf("Safari")?"Safari":void 0},debounce=function(n,o,i){var a=null;if(n){if(!Object.prototype.toString.call(n).includes("unction"))throw new Error("the 1st param must be a Function at debounceUtil");if(o||(o=300,i=!0),!i){if(!Object.prototype.toString.call(n).includes("unction"))throw new Error("the 1st param must be a Function at debounceUtil");if(Object.prototype.toString.call(o).includes("oolean"))i=o,o=300;else{if(!Object.prototype.toString.call(o).includes("umber"))throw new Error("the 2nd param must be a Number or Boolean at debounceUtil");i=!0}}return function(){var e=this,t=arguments;if(a&&clearTimeout(a),i){var r=!a;a=setTimeout(function(){n.apply(e,t)},o),r&&n.apply(e,t)}else a=setTimeout(function(){n.apply(e,t)},o)}}},getRequestParam=function(e){var t=e||window.location.href.split("?")[1];if(!t)return"urlParamStr param is null";for(var r={},n=t.split("&"),o=0;o<n.length;o++){var i=n[o].split("=");r[i[0]]=decodeURI(i[1])}return r},isBuffer=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},toString=Object.prototype.toString,isBoolean=function(e){return"[object Boolean]"===toString.call(e)},isArray=function(e){return"[object Array]"===toString.call(e)},isArrayBuffer=function(e){return"[object ArrayBuffer]"===toString.call(e)},isFormData=function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString=function(e){return"string"==typeof e},isNumber=function(e){return"number"==typeof e},isUndefined=function(e){return void 0===e},isObject=function(e){return null!==e&&"object"===_typeof(e)},isDate=function(e){return"[object Date]"===toString.call(e)},isFile=function(e){return"[object File]"===toString.call(e)},isBlob=function(e){return"[object Blob]"===toString.call(e)},isFunction=function(e){return"[object Function]"===toString.call(e)},isStream=function(e){return isObject(e)&&isFunction(e.pipe)},isURLSearchParams=function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},trim=function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},isStandardBrowserEnv=function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach=function(e,t){if(null!=e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)};function merge(){var r={};function e(e,t){"object"===_typeof(r[t])&&"object"===_typeof(e)?r[t]=merge(r[t],e):r[t]=e}for(var t=0,n=arguments.length;t<n;t++)forEach(arguments[t],e);return r}function deepMerge(){var r={};function e(e,t){"object"===_typeof(r[t])&&"object"===_typeof(e)?r[t]=deepMerge(r[t],e):"object"===_typeof(e)?r[t]=deepMerge({},e):r[t]=e}for(var t=0,n=arguments.length;t<n;t++)forEach(arguments[t],e);return r}var tplFunc=function(e,r){return e.replace(/\{(\w+)\}/g,function(e,t){return r[t]})},$ajax=axios;Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{value:function(e){var o=[],i=e||1,a=0;return function n(e){e.map(function(e,t,r){Array.isArray(e)?a<i?(a++,n(e)):o.push(e):(o.push(e),r.length===t+1&&(a=0))})}(this),o}});var flat=function(e,t){return e.flat(t)},toggleSkin=function(e){var t=0<arguments.length&&void 0!==e?e:"default";document.getElementById("kst-theme-link").href="/theme/".concat(t,".css")},K={$ajax:$ajax,isArray:isArray,isArrayBuffer:isArrayBuffer,isBoolean:isBoolean,isBuffer:isBuffer,isFormData:isFormData,isArrayBufferView:isArrayBufferView,isString:isString,isNumber:isNumber,isObject:isObject,isUndefined:isUndefined,isDate:isDate,isFile:isFile,isBlob:isBlob,isFunction:isFunction,isStream:isStream,isURLSearchParams:isURLSearchParams,isStandardBrowserEnv:isStandardBrowserEnv,forEach:forEach,merge:merge,deepMerge:deepMerge,trim:trim,tplFunc:tplFunc,flat:flat,throttle:throttle,toggleSkin:toggleSkin,debounce:debounce,pubsub:PubSub,getBroswerType:getBroswerType,getRequestParam:getRequestParam,install:function(e){e.prototype.$K=K}};module.exports=K;
