@melt-js/comps-art 0.0.0-stage → 2026.11.16

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.
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,a=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),s=(t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,l=(e,t)=>{for(var n in t||(t={}))i.call(t,n)&&s(e,n,t[n]);if(r)for(var n of r(t))o.call(t,n)&&s(e,n,t[n]);return e},u=(e,r)=>t(e,n(r)),c=(e,t)=>{var n={};for(var a in e)i.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&r)for(var a of r(e))t.indexOf(a)<0&&o.call(e,a)&&(n[a]=e[a]);return n},f=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{s(n.next(e))}catch(pp){i(pp)}},a=e=>{try{s(n.throw(e))}catch(pp){i(pp)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,a);s((n=n.apply(e,t)).next())}),d=function(e,t){this[0]=e,this[1]=t},h=e=>{var t,n=e[a("asyncIterator")],r=!1,i={};return null==n?(n=e[a("iterator")](),t=e=>i[e]=t=>n[e](t)):(n=n.call(e),t=e=>i[e]=t=>{if(r){if(r=!1,"throw"===e)throw t;return t}return r=!0,{done:!1,value:new d(new Promise(r=>{var i=n[e](t);i instanceof Object||(()=>{throw TypeError("Object expected")})(),r(i)}),1)}}),i[a("iterator")]=()=>i,t("next"),"throw"in n?t("throw"):i.throw=e=>{throw e},"return"in n&&t("return"),i};import{b as p,a as g,c as v,d as m,e as y,f as b,g as w,h as x,i as C,j as E,k,l as S,m as _,n as D,o as A,p as T,q as O,r as P,s as I,t as F,u as B,v as L,w as N,x as M,y as R,z as j,A as H,B as z,C as U,D as W,_ as V,E as G,F as q,G as K,H as Y,I as X,J,K as Z,L as Q,M as ee,N as te,O as ne,P as re,Q as ie,R as oe,S as ae,T as se,U as le,V as ue,W as ce,X as fe,Y as de,Z as he,$ as pe,a0 as ge,a1 as ve,a2 as me,a3 as ye,a4 as be,a5 as we,a6 as xe,a7 as Ce,a8 as Ee,a9 as ke,aa as Se,ab as _e,ac as De}from"./shared-runtime-u88-9G6Q.js";var Ae,Te,Oe={isLoadAssetsCalled:1===(Ae=Ie()).__HEL_LOAD_ASSETS_FLAG__,isFirstMod:void 0===Ae.__HEL_ISO_FLAG__,isBeforeCore:void 0===Ae.__MASTER_APP_LOADED__};void 0===(Te=Ie()).__HEL_ISO_FLAG__&&(Te.__HEL_ISO_FLAG__=1);var Pe=function(){var e=Ie(),t=e.location,n=e.__HEL_MICRO_SHARED__;if(Oe.isLoadAssetsCalled)return!1;if(!Oe.isFirstMod)return!1;if(Oe.isBeforeCore)return!0;var r=function(){var e="";try{throw new Error("codeHost")}catch(n){var t=n.stack.split("\n");e=t[t.length-1]||""}return(e.split("//")[1]||"").split("/")[0]}();if(t&&t.host===r)return!0;if(n){var i=n.cacheRoot,o=i.appGroupName2platform,a=i.appName2platform,s=o||a||{};if(!Object.keys(s).length)return!0}return!1}();function Ie(){return window||global}var Fe=function(){return Pe},Be="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Le(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ne(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Me={exports:{}};function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function je(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach(function(t){je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||Ve(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $e(e){return function(e){if(Array.isArray(e))return Re(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ve(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 We(e){return(We="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 Ve(e,t){if(e){if("string"==typeof e)return Re(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)?Re(e,t):void 0}}var Ge=null;function qe(){return Ge||function(){if("undefined"==typeof window){if("undefined"==typeof global)throw new Error("unable to locate global object");Ge=global}else Ge=window}(),Ge}function Ke(){return qe()}function Ye(){var e=qe();return e.MutationObserver||e.WebKitMutationObserver||e.MozMutationObserver}function Xe(e,t){for(var n=null,r=e.length,i=0;i<r;i++){var o=e[i];if(o.tagName===t){n=o;break}}return n}function Je(e){return Object.keys(e)}function Ze(e){var t,n=null===(t=qe())||void 0===t?void 0:t.localStorage;return null==n?void 0:n.getItem(e)}function Qe(e,t){var n,r=null===(n=qe())||void 0===n?void 0:n.localStorage;return null==r?void 0:r.setItem(e,t)}function et(){var e="";try{throw new Error("getJsRunLocation")}catch(r){var t=r.stack.split("\n"),n=t.length;e=t[n-1]||t[n-2]||""}return e}function tt(e,t,n,r){nt(e,t)[n]=r}function nt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e[t];return r||(r=n,e[t]=r),r}function rt(e,t){Object.keys(t).forEach(function(n){var r=t[n];[null,void 0,""].includes(r)||(e[n]=r)})}function it(e,t){e.includes(t)||e.push(t)}function ot(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.nullValues,r=void 0===n?[null,void 0,""]:n,i=t.emptyObjIsNull,o=void 0===i||i,a=t.emptyArrIsNull,s=void 0===a||a;if(r.includes(e))return!0;if(Array.isArray(e))return!!s&&0===e.length;if("object"===We(e)){var l=Je(e).length;return!!o&&0===l}return!1}function at(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t}var st=ot,lt=it,ut=Je;function ct(e,t){var n=t||function(e){return!st(e)},r={};return ut(e).forEach(function(t){n(e[t])&&(r[t]=e[t])}),r}function ft(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MULTI",n=e.split("\n"),r=n.length-1,i=n.map(function(e,n){var i;if(!e&&(0===n||n===r))return"";var o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=e;return e.endsWith("<br/>")?(r=e.substring(0,r.length-5),"".concat(r).concat(t)):"".concat(r).concat(n)},a=(null===(i=e.trimStart)||void 0===i?void 0:i.call(e))||e;return"MULTI"===t?"".concat(o(a,""),"\n"):a=o(a,"\n"," ")}).join("");return i}function dt(e){return ft(e,"ONE")}function ht(e,t,n){e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(t),n)}function pt(e){ht(e,"heldisabled","1"),e.disabled=!0}var gt=Object.freeze({__proto__:null,noop:at,hasProp:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},isServer:function(){var e=qe();return e.process&&e.global&&!e.document},safeParse:function(e,t,n){if(e&&"string"!=typeof e)return e;try{return JSON.parse(e)||t}catch(r){if(void 0!==t)return t;if(n)throw new Error(n);throw r}},isNull:st,noDupPush:lt,okeys:ut,merge2List:function(e,t){var n=[];return e.forEach(function(e){return lt(n,e)}),t.forEach(function(e){return lt(n,e)}),n},purify:ct,getObjsVal:function(e,t,n){var r,i=n,o=function(e){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=Ve(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(a)throw i}}}}(e);try{for(o.s();!(r=o.n()).done;){var a=r.value[t];if(![null,void 0,""].includes(a)){i=a;break}}}catch(s){o.e(s)}finally{o.f()}return i},pfstr:ft,nbstr:dt,nbalert:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=qe(),i=dt(e),o=r.alert||at;n?(null===(t=r.location)||void 0===t?void 0:t.port)&&o(i):o(i)},setDataset:ht,disableNode:pt}),vt="unpkg",mt="__default_online_ver__",yt=vt,bt={CORE_VER:"4.13.1",DEFAULT_API_PREFIX:"https://unpkg.com",DEFAULT_API_URL:"/openapi/v1/app/info",DEFAULT_ONLINE_VER:mt,DEFAULT_USER_LS_KEY:"HelUserRtxName",DEFAULT_PLAT:yt,LS_LOG_MODE:"HelConfig.logMode",LS_LOG_FILTER:"HelConfig.logFilter",PLAT_HEL:"hel",PLAT_UNPKG:vt,KEY_CSS_STR:"CSS_STR",KEY_ASSET_CTX:"ASSET_CTX",KEY_STYLE_TAG_ADDED:"STYLE_TAG_ADDED",KEY_CSS_LINK_TAG_ADDED:"CSS_LINK_TAG_ADDED",KEY_IGNORE_CSS_PREFIX_LIST:"IGNORE_CSS_PREFIX_LIST",KEY_IGNORE_STYLE_TAG_KEY:"IGNORE_STYLE_TAG_KEY",KEY_IGNORE_CSS_PREFIX_2_KEYS:"IGNORE_CSS_PREFIX_2_KEYS"},wt={SUB_APP_LOADED:"subAppLoaded",SUB_LIB_LOADED:"SubLibLoaded",STYLE_STR_FETCHED:"StyleStrFetched",STYLE_TAG_ADDED:"StyleTagAdded",CSS_LINK_TAG_ADDED:"CssLinkTagAdded"},xt={NOT_LOAD:0,LOADING:1,LOADED:2},Ct=bt.LS_LOG_FILTER,Et=bt.LS_LOG_MODE,kt=0,St=1,_t=2,Dt={isIncludeFilter:function(e,t){return t.includes(",")?t.split(",").some(function(t){return e.includes(t)}):e.includes(t)},getLogFilter:function(){return Pt().logFilter},setLogFilter:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Pt().logFilter=e,t&&Qe(Ct,e)},setLogMode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=parseInt(e,10);[kt,St,_t].includes(n)&&(Pt().logMode=n,t&&Qe(Et,n))},getLogMode:function(){return Pt().logMode}},At={};function Tt(){if(ot(At=Ke().__HEL_MICRO_DEBUG__)){At={logMode:kt,logFilter:"",isInit:!1},Ke().__HEL_MICRO_DEBUG__=At;try{!function(){if(!Pt().isInit){Pt().isInit=!0;var e=(o=function(){var e=function(e){var t=e||{},n=t.search||"";if(!n){var r=(t.hash||"").split("?")[1]||"";r&&(n="?".concat(r))}return n};try{var t;return e(null===(t=qe())||void 0===t||null===(t=t.top)||void 0===t?void 0:t.location)}catch(r){var n;return e(null===(n=qe())||void 0===n?void 0:n.location)}}(),a={},null!=o&&o.startsWith("?")&&o.substring(1).split("&").forEach(function(e){var t=Ue(e.split("="),2),n=t[0],r=t[1];a[n]=r}),a),t=e.hellog,n=e.hellogf,r=t||Ze(Et)||kt;Dt.setLogMode(r,!1);var i=n||Ze(Ct)||"";Dt.setLogFilter(i,!1)}var o,a}()}catch(e){}}else void 0===At.logMode&&(At.logMode=kt,At.logFilter="")}function Ot(){return Dt.getLogMode()!==kt}function Pt(){return At}var It=" %c--\x3e HEL LOG:",Ft="color:#ad4e00;font-weight:600";function Bt(){if(Ot()){for(var e=Dt.getLogMode()===St?console.log:console.trace||console.log,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n.slice(1);if("string"!=typeof i)return e.apply(void 0,[It,Ft].concat(n));var a=Dt.getLogFilter(),s=["".concat(It," ").concat(i),Ft].concat($e(o));a?Dt.isIncludeFilter(i,a)&&e.apply(void 0,$e(s)):e.apply(void 0,$e(s))}}var Lt={};function Nt(e,t,n){if(Ot()&&Lt[e]){var r=Lt[e];Bt("[[ PerfCheck ]] (".concat(e,"/").concat(t,") costs ").concat(Date.now()-r," ms")),n&&Mt(e)}}function Mt(e){Lt[e]=0}var Rt=bt.DEFAULT_API_URL,jt=bt.DEFAULT_USER_LS_KEY,Ht=bt.PLAT_HEL,zt=bt.PLAT_UNPKG,Ut=bt.DEFAULT_API_PREFIX,$t=bt.CORE_VER,Wt=bt.KEY_CSS_LINK_TAG_ADDED,Vt=bt.KEY_STYLE_TAG_ADDED,Gt=bt.KEY_IGNORE_CSS_PREFIX_LIST,qt=bt.KEY_IGNORE_STYLE_TAG_KEY,Kt=bt.KEY_IGNORE_CSS_PREFIX_2_KEYS;function Yt(e){return{apiMode:"get",apiPrefix:(e||{}).apiPrefix,apiSuffix:"",apiPathOfApp:Rt,apiPathOfAppVersion:"",getSubAppAndItsVersionFn:null,customMetaUrl:"",customMetaJsonpUrl:"",getMeta:null,onFetchMetaFailed:null,strictMatchVer:!0,getUserName:null,userLsKey:jt,shouldUseGray:null,trustAppNames:null,semverApi:null,hook:{}}}function Xt(e){return ze(ze({isConfigOverwrite:!1,platform:e,appName2Comp:{},appName2Lib:{},appName2isLibAssigned:{},appName2EmitApp:{},appName2verLoadStatus:{},appName2verEmitLib:{},appName2verEmitApp:{},appName2verStyleStr:{},appName2verStyleFetched:{},appName2verExtraCssList:{},appName2verAppVersion:{},appName2verCustomData:{},appName2app:{},appName2appVersion:{},appName2styleStr:{},appGroupName2firstVer:{},isOriginInitCalled:!1},Yt()),{},{origin:Yt({apiPrefix:Ut})})}function Jt(){var e={};return{on:function(t,n){var r=e[t];if(!r){var i=[];e[t]=i,r=i}r.push(n)},emit:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e[t];o&&o.slice().forEach(function(e){return e.apply(void 0,r)})},off:function(t,n){var r=e[t];if(r)for(var i=0,o=r.length;i<o;i++)if(r[i]===n){r.splice(i,1);break}}}}function Zt(e){[Wt,Vt,Gt,qt,Kt].forEach(function(t){return nt(e,t,function(e){return e===Gt?[]:{}}(t))})}function Qt(){return Ke().__HEL_MICRO_SHARED__}function en(){return yt}function tn(e){var t=e||en(),n=nn(),r=n.caches[t];if(!r){var i=We(e);if("string"!==i)throw console.error("invalid plaform:",e),new Error("fatal error: platform only can be a string, now it is ".concat(i));var o=Xt(e);n.caches[t]=o,r=o}return r}function nn(){return Qt().cacheRoot}var rn={getCustomData:function(e,t,n){var r=n.versionId,i=nt(tn(n.platform).appName2verCustomData,e);return nt(i,t)[r||mt]},getAppMeta:function(e,t){return tn(t).appName2app[e]},setVerLoadStatus:function(e,t,n,r){var i=r||{},o=i.versionId;tt(tn(i.platform)[n],e,o||mt,t)},getVerLoadStatus:function(e,t,n){var r,i=n||{},o=i.versionId,a=tn(i.platform)[t],s=o||mt;return(null===(r=a[e])||void 0===r?void 0:r[s])||xt.NOT_LOAD},ensureOnlineModule:function(e,t,n){if(!e[mt]){var r=rn.getAppMeta(t,n),i=e[null==r?void 0:r.online_version];i&&(e[mt]=i)}}};function on(e,t){Bt("[[ core:setEmitApp ]] appName,emitApp:",e,t);var n=t.versionId,r=tn(t.platform),i=r.appName2verEmitApp,o=r.appName2Comp,a=r.appName2EmitApp;nt(i,e)[mt]||(o[e]=t.Comp,a[e]=t,tt(i,e,mt,t)),n&&tt(i,e,n,t)}var an=bt.KEY_CSS_LINK_TAG_ADDED,sn=bt.KEY_STYLE_TAG_ADDED,ln=bt.KEY_IGNORE_CSS_PREFIX_LIST,un=bt.KEY_IGNORE_STYLE_TAG_KEY,cn=bt.KEY_IGNORE_CSS_PREFIX_2_KEYS;function fn(e){return nt(nn().common,e)}function dn(e){return nn().common[e]}function hn(e,t){var n=fn(e)[t];return void 0!==n?n:null}function pn(e,t,n){fn(e)[t]=n}var gn={setIgnoreCssPrefix:function(e){it(dn(ln),e)},setIgnoreStyleTagKey:function(e){gn.getIgnoreStyleTagMap()[e]=1},getIgnoreStyleTagMap:function(){return dn(un)},setIgnoreCssPrefixKey:function(e,t){var n=hn(cn,e);n||pn(cn,e,n=[]),it(n,t)},getIgnoreCssPrefixKeys:function(e){return dn(cn)[e]||[]},getMatchedIgnoreCssPrefix:function(e){for(var t=dn(ln),n="",r=0;r<t.length;r++){var i=t[r];if(e.startsWith(i)){n=i;break}}return n},getIgnoreCssPrefixCssUrlList:function(e){var t=hn(an,e);return t||pn(an,e,t=[]),t},setIgnoreCssPrefixCssUrl:function(e,t){gn.getIgnoreCssPrefixCssUrlList(e).push(t)},getStyleTagText:function(e){return hn(sn,e)||""},clearStyleTagText:function(e){pn(sn,e,"")},appendStyleTagText:function(e,t){var n=gn.getStyleTagText(e);pn(sn,e,"".concat(n," ").concat(t))}};function vn(e,t){var n=e.apiMode,r=e.apiPrefix,i=e.apiSuffix,o=e.apiPathOfApp,a=e.apiPathOfAppVersion,s=e.getSubAppAndItsVersionFn,l=e.onFetchMetaFailed,u=e.strictMatchVer,c=e.getUserName,f=e.userLsKey,d=e.shouldUseGray,h=e.getApiPrefix,p=e.trustAppNames,g=e.platform,v=e.origin,m={apiMode:n,apiPrefix:r,apiSuffix:i,apiPathOfApp:o,apiPathOfAppVersion:a,getSubAppAndItsVersionFn:s,onFetchMetaFailed:l,strictMatchVer:u,getUserName:c,userLsKey:f,shouldUseGray:d,getApiPrefix:h,trustAppNames:p,hook:e.hook,platform:g,customMetaUrl:e.customMetaUrl,customMetaJsonpUrl:e.customMetaJsonpUrl,getMeta:e.getMeta};return t&&(m.origin=v),m}function mn(e){return nn().appGroupName2platform[e]||en()}function yn(e){return nn().appName2platform[e]||en()}function bn(e,t){var n=t.customKey,r=t.platform,i=nt(tn(void 0===r?yn(e):r).appName2verCustomData,e);return nt(i,n)}var wn=wt.STYLE_TAG_ADDED,xn=wt.CSS_LINK_TAG_ADDED;function Cn(){return Qt().eventBus}var En={styleTagAdded:function(e){return"".concat(wn,"/").concat(e)},cssLinkTagAdded:function(e){return"".concat(xn,"(").concat(e,")")}};function kn(e,t,n){var r=(n||{}).appGroupName,i=t.versionId,o=t.appProperties,a=t.platform||n.platform,s=tn(a),l=s.appName2verEmitLib,u=s.appName2Lib,c=s.appName2isLibAssigned,f=rn.getAppMeta(e,a),d=function(e){var t=u[e];t?"object"===We(t)&&0===Object.keys(t).length&&Object.assign(t,o):u[e]=o,c[e]=!0};d(e),r?d(r):f&&d(f.app_group_name),Bt("[[ core:setEmitLib ]] appMeta:",f),nt(l,e)[mt]||tt(l,e,mt,o),i&&tt(l,e,i,o)}function Sn(e,t){return tn(t).appName2app[e]}function _n(e,t,n){rn.setVerLoadStatus(e,t,"appName2verLoadStatus",n)}function Dn(e,t){return e.split("@").slice(1).join("@")||t||e}function An(e){return"js"===e||"mjs"===e}function Tn(e,t){var n=et();Bt("[[ core:tryGetVersion ]] may include ver source > ".concat(n));var r=tn(t).appGroupName2firstVer[e]||"";if(n.includes("https://")||n.includes("http://")){var i=Ue(n.split("//"),2)[1],o=i.split("/");if(r){if(i.includes("/".concat(r,"/"))){if(r.startsWith("@"))return Dn(r.split("/")[1]||"");var a=o.indexOf(r);if(!o[a-1].startsWith("@"))return Dn(r)}var s=o[1],l=o[2];if("static"===s&&An(l)||An(s))return Dn(r)}if(i.indexOf("@")>=0){var u=o.filter(function(e){return e.includes("@")}),c=u.findIndex(function(e){return e.startsWith("@")});return Dn(c>=0?u[c+1]||"":u[0]||"",r)}var f=Ue(i.split("/".concat(t,"/")),2)[1];return Ue((void 0===f?"":f).split("/"),1)[0]||r}return r}function On(e,t){return e===mt?t||"":e.includes("_")?e.substring(0,e.length-15):t||""}var Pn=!1,In=!1,Fn=bt.KEY_ASSET_CTX;function Bn(e,t){if(!t||!["LINK","SCRIPT"].includes(t.tagName))return e(t);var n=t.href,r=t.tagName,i=t.src,o="LINK"===r,a=hn(Fn,n||i||"")||{},s=a.platform,l=a.groupName,u=a.name,c=a.ver,f=a.beforeAppend,d=t;if(f){var h=o?"href":"src",p=t.getAttribute(h);d=f({el:t,nativeAppend:e,setAssetUrl:function(e){return t.setAttribute(h,e)},url:p,tagName:r})||t}return s&&function(e,t){var n=t.platform,r=t.groupName,i=t.name,o=t.ver;ht(e,"el",t.elName),ht(e,"plat",n),ht(e,"gname",r),ht(e,"name",i),ht(e,"ver",o)}(d,{platform:s,groupName:l,name:u,ver:c,elName:o?"HelLink":"HelScript"}),e(d)}var Ln="preFetch";function Nn(e,t){var n=e.tagName,r=e.innerText,i=e.href;if(["STYLE","LINK"].includes(n))if("STYLE"!==n){var o=function(e,t){var n=Cn(),r=gn.getMatchedIgnoreCssPrefix(t);return r&&(gn.setIgnoreCssPrefixCssUrl(r,t),n.emit(En.cssLinkTagAdded(r),{nodes:[e]})),r}(e,i);o&&pt(e)}else{if(!r)return;var a=r.indexOf("/* @helstart ");if(a<0)return;var s=r.indexOf(" @helend */");if(s<0)return;var l=r.substring(13+a,s);if(l){var u=l.trim(),c="",f=u;if(u.includes("/")){var d=u.split("/");c=d[0],f=d[1]}ht(e,"gname",f),c&&ht(e,"plat",c),t[u]&&pt(e);var h=Cn();gn.appendStyleTagText(u,r),h.emit(En.styleTagAdded(u),{nodes:[e]})}}}function Mn(e,t){var n=e.tagName,r=e.src,i=void 0===r?"":r;if("SCRIPT"!==n)return!1;if(!i.endsWith(".hot-update.js"))return!1;var o=gn.getMatchedIgnoreCssPrefix(i);if(!o)return!1;var a=gn.getIgnoreCssPrefixKeys(o);if(!a.length)return!1;var s=!1;return a.forEach(function(e){t[e]&&(function(e){var t=qe();if(t){var n=t.document.head.querySelectorAll('style[data-gname="'.concat(e,'"]'));n.length&&(gn.clearStyleTagText(e),n.forEach(function(t){pt(t),gn.appendStyleTagText(e,t.innerText)}),Cn().emit(En.styleTagAdded(e),{nodes:n}))}}(e),s=!0)}),s}Un(),Bt("hel-micro-core ver ".concat(bt.CORE_VER));var Rn=wt,jn=xt,Hn=bt,zn=gt;function Un(e){e&&Jn(e),function(e){if(e&&(Pn=!1,In=!1),!In){In=!0;var t=qe();void 0===t.__MASTER_APP_LOADED__&&(t.__MASTER_APP_LOADED__=!0,Pn=!0)}}(!!e),function(){var e=Qt();if(e){var t=e.cacheRoot;nt(t,"appGroupName2platform"),nt(t,"common");var n=t.caches;return Object.keys(n).forEach(function(e){var t=n[e];nt(t,"appGroupName2firstVer"),nt(t,"appName2isLibAssigned"),nt(t,"appName2verExtraCssList"),nt(t,"appName2verCustomData"),nt(t,"hook"),nt(t,"origin",Yt()),nt(t.origin,"hook")}),Zt(t.common),void(e.userEventBus||(e.userEventBus=Jt()))}Zt((e=function(){var e=Xt(zt),t=Xt(Ht),n={platform:Ht,platformHint:"the platform value here does not make any sense!",appName2platform:{},appGroupName2platform:{},caches:je(je({},zt,e),Ht,t),common:{}},r=Jt(),i=Jt();return{ver:$t,isStyleObInit:!1,nativeHeadAppend:null,nativeBodyAppend:null,patchedHeadAppend:null,patchedBodyAppend:null,createFeature:et(),eventBus:r,userEventBus:i,cacheRoot:n,unpkgCache:e,helCache:t,dev:{setLogMode:Dt.setLogMode,setLogFilter:Dt.setLogFilter}}}()).cacheRoot.common),Ke().__HEL_MICRO_SHARED__=e}(),Tt(),function(){var e=qe();if(!e.__POWERED_BY_QIANKUN__&&!e.__DISABLE_HEL_MONKEY_PATCH__){var t=Qt(),n=e.document,r=t.nativeHeadAppend,i=t.nativeBodyAppend;if(!r&&n){var o=n.head,a=n.body;if(r=o.appendChild.bind(o),t.nativeHeadAppend=r,a)i=a.appendChild.bind(a),t.nativeBodyAppend=i;else{var s=new(Ye())(function(e){for(var n,r=0;r<e.length;r++){var o=e[r].addedNodes;if(n=Xe(o,"BODY"))break}n&&(i=n.appendChild.bind(n),t.nativeBodyAppend=i,n.appendChild=function(e){return Bn(u(i,n,"body"),e)},s.disconnect())}),l=Xe(n.childNodes,"HTML");l&&s.observe(l,{childList:!0})}var u=function(n,r,i){var o=t.patchedHeadAppend,a=t.patchedBodyAppend,s="head"===i;if(o&&s)return o;if(a&&!s)return a;if(e.__POWERED_BY_WUJIE__)return n;var l=e.Element;return l?l.prototype.appendChild.bind(r):n};o.appendChild=function(e){return Bn(u(r,o,"head"),e)},a&&(a.appendChild=function(e){return Bn(u(i,a,"body"),e)})}}}(),function(){var e=Qt(),t=qe(),n=e.isStyleObInit,r=t.document;if(!n&&r){e.isStyleObInit=!0;var i=gn.getIgnoreStyleTagMap(),o=Ye();if(o){var a=new o(function(e){e.forEach(function(e){for(var t=e.addedNodes,n=e.removedNodes,r=t.length,o=0;o<r;o++)Nn(t[o],i);for(var a=n.length,s=0;s<a&&!Mn(n[s],i);s++);})});a.observe(document.head,{childList:!0})}}}()}var $n=en,Wn=tn,Vn=Pt,Gn=Ot,qn=Bt,Kn=Nt,Yn=Mt,Xn=qe,Jn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=null;null!==(t=Ge)&&void 0!==t&&t.__HEL_MICRO_SHARED__&&(r=Ge.__HEL_MICRO_SHARED__),Ge=n?ze(ze({},Ge),e):e,r&&(Ge.__HEL_MICRO_SHARED__=r)},Zn=on,Qn=kn,er=Sn,tr=hn,nr=pn,rr=gn,ir=_n,or=Tn,ar=On,sr=mn,lr=yn,ur=Cn,cr=En;const fr=Object.freeze(Object.defineProperty({__proto__:null,allowLog:Gn,appReady:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.lifecycle,i=n.platform||mn(e),o=n.versionId||Tn(e,i),a=n.appName||On(o,e),s={Comp:t,appName:a,appGroupName:e,lifecycle:r,platform:i,versionId:o,isLib:!1};on(a,s),_n(a,xt.LOADED,{versionId:o,platform:i});var l=Cn();Nt(Ln,"appReady"),l.emit(wt.SUB_APP_LOADED,s)},clearPerfMark:Yn,commonDataUtil:rr,commonUtil:zn,evName:cr,getAppMeta:er,getAppPlatform:sr,getAppPlatformByAppName:lr,getAppStyleStr:function(e,t){var n,r=t||{},i=r.platform,o=r.versionId,a=tn(i),s=a.appName2verStyleStr,l=a.appName2styleStr[e]||"";return o?(null===(n=s[e])||void 0===n?void 0:n[o])||l||"":l},getCommonData:tr,getCustomData:function(e,t){var n=bn(e,t)[t.versionId||mt];return void 0!==n?n:null},getGlobalThis:Xn,getHelDebug:Vn,getHelEventBus:ur,getPlatform:$n,getPlatformConfig:function(e){return vn(tn(e),!0)},getSharedCache:Wn,getUserEventBus:function(){return Qt().userEventBus},getVerApp:function(e,t){var n,r=t||{},i=r.versionId,o=r.platform,a=tn(o),s=a.appName2verEmitApp,l=a.appName2Comp,u=a.strictMatchVer,c=a.appName2EmitApp,f=null!==(n=r.strictMatchVer)&&void 0!==n?n:u,d=nt(s,e);rn.ensureOnlineModule(d,e,o);var h=d[i||mt],p=l[e],g=p?{Comp:p}:null,v=f?null:c[e]||g,m=h||v||null;return Bt("[[ core:getVerApp ]] appName,options,result:",e,r,m),m},getVerExtraCssList:function(e,t){var n=t||{},r=n.versionId,i=nt(tn(n.platform).appName2verExtraCssList,e),o=i[r]||i[mt]||[];return Bt("[[ core:getVerExtraCssList ]] options,cssList:",n,o),o},getVerLib:function(e,t){var n,r=t||{},i=r.versionId,o=tn(r.platform),a=o.appName2verEmitLib,s=o.appName2Lib,l=o.strictMatchVer,u=o.appName2isLibAssigned,c=null!==(n=r.strictMatchVer)&&void 0!==n?n:l,f=nt(a,e);rn.ensureOnlineModule(f,e);var d=f[i||mt],h=u[e]?s[e]:null,p=d||(c?null:h)||null;return Bt("[[ core:getVerLib ]] appName,options,result:",e,r,p),p},getVerLoadStatus:function(e,t){return rn.getVerLoadStatus(e,"appName2verLoadStatus",t)},getVerStyleStrStatus:function(e,t){return rn.getVerLoadStatus(e,"appName2verStyleFetched",t)},getVersion:function(e,t){var n,r=t||{},i=r.platform,o=r.versionId,a=tn(i),s=a.appName2verAppVersion,l=a.appName2appVersion[e]||null;return o&&(null===(n=s[e])||void 0===n?void 0:n[o])||l},helConsts:Hn,helEvents:Rn,helLoadStatus:jn,inectPlatToMod:function e(t,n,r){var i=r||{},o=i.ignoreKeys,a=void 0===o?[]:o,s=i.arg1PlatObjFnKeys,l=void 0===s?[]:s,u={};return Object.keys(n).forEach(function(i){var o=n[i];if(a.includes(i))u[i]=o;else{var s=We(o);u[i]=s&&"object"===s?e(t,o,r):"function"!==s?o:function(e,t){var n=this,r=t.fn,i=t.fnName,o=t.arg1PlatObjFnKeys.includes(i);return function(){for(var t=function(t){return ze({platform:e},ct(t||{}))},i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=a[0],u=a[1];return o?a[0]=t(l):a[1]=t(u),r.apply(n,a)}}(t,{arg1PlatObjFnKeys:l,fn:o,fnName:i})}}),u},initGlobalConfig:function(e){var t=Qt(),n=t.nativeHeadAppend,r=t.nativeBodyAppend,i=e.headAppend||null,o=e.bodyAppend||null,a=function(e){return"pass same ".concat(e," handle, hel will ignore it for avlid 'Maximum call stack size exceeded'")};i&&i===n?console.error(a("headAppend")):t.patchedHeadAppend=i,o&&o===r?console.error(a("bodyAppend")):t.patchedBodyAppend=o},initPlatformConfig:function(e,t){var n=tn(t),r=vn(e);n.isConfigOverwrite||(n.isConfigOverwrite=!0,rt(n,r))},isSubApp:function(){return console.log("%c".concat("WARNING: calling isSubApp is unsafe, use hel-iso.isSubApp instead,\nmore details see: https://tnfe.github.io/hel/docs/tutorial/attention-is-subapp"),"color:red;"),!Pn},libReady:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.platform||mn(e),i=n.versionId||Tn(e,r),o=n.appName||On(i,e);Bt("[[ core:libReady ]] appGroupName ".concat(e,", appName ").concat(o,", versionId ").concat(i));var a=Sn(o,r);null!=a&&a.__fromCust&&(i=n.versionId||a.online_version,o=a.name,Bt("[[ core:libReady ]] fromCust, appGroupName ".concat(e,", appName ").concat(o,", versionId ").concat(i)));var s={platform:r,appName:o,appGroupName:e,versionId:i,appProperties:t,Comp:function(){},lifecycle:{}};kn(o,s,{appGroupName:e,platform:r}),_n(o,xt.LOADED,{versionId:i,platform:r});var l=Cn();Nt(Ln,"libReady"),l.emit(wt.SUB_LIB_LOADED,s)},log:qn,originInit:function(e,t){var n=tn(e),r="[[ core:originInit ]] invalid call, it can only been called";if(n.isConfigOverwrite)Bt("".concat(r," before init"));else if(n.isOriginInitCalled)Bt("".concat(r," one time"));else{var i=vn(t);n.isOriginInitCalled=!0,rt(n.origin,i)}},perfMark:function(e){Ot()&&!Lt[e]&&(Lt[e]=Date.now())},perfPeek:Kn,resetGlobalThis:Un,setAppMeta:function(e,t){tn(t).appName2app[e.name]=e},setAppPlatform:function(e,t,n){var r=nn().appGroupName2platform;return!n&&r[e]||(r[e]=t),mn(e)},setAppPlatformByAppName:function(e,t,n){var r=nn().appName2platform;return!n&&r[e]||(r[e]=t),yn(e)},setAppStyleStr:function(e,t,n){var r=n||{},i=r.platform,o=r.versionId,a=tn(i),s=a.appName2verStyleStr,l=a.appName2verStyleFetched,u=a.appName2styleStr;o?(tt(s,e,o,t),tt(l,e,o,xt.LOADED)):u[e]=t},setCommonData:nr,setCustomData:function(e,t){var n=t.customValue,r=t.versionId,i=bn(e,t);i[r||mt]=n,i[mt]||(i[mt]=n)},setEmitApp:Zn,setEmitLib:Qn,setGlobalThis:Jn,setVerExtraCssList:function(e,t,n){var r=n||{},i=r.versionId,o=tn(r.platform).appName2verExtraCssList;Bt("[[ core:setVerExtraCssList ]] cssList:",t),nt(o,e)[mt]||tt(o,e,mt,t),i&&tt(o,e,i,t)},setVerLoadStatus:ir,setVerStyleStrStatus:function(e,t,n){rn.setVerLoadStatus(e,t,"appName2verStyleFetched",n)},setVersion:function(e,t,n){var r=(n||{}).platform,i=tn(r),o=i.appName2verAppVersion,a=i.appGroupName2firstVer,s=i.appName2appVersion,l=t.version_tag||t.sub_app_version;if(l){var u=rn.getAppMeta(e,r);nt(o,e)[mt]||(tt(o,e,mt,t),s[e]=t),tt(o,e,l,t),a[u.app_group_name]=t.sub_app_version}},tryGetAppName:ar,tryGetVersion:or},Symbol.toStringTag,{value:"Module"}));var dr,hr=(dr||(dr=1,function(e,t){var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,n){var r=n||(null===t.getAppPlatform||void 0===t.getAppPlatform?void 0:t.getAppPlatform(e)),i=t.getSharedCache(r).appName2Lib;return i[e]||(i[e]={}),i[e]}var i="4.12.1";t.log("hel-lib-proxy ver ".concat(i));var o=t.getUserEventBus,a=t.helConsts,s=o();function l(e,r){var i=n({},r||{});return i.platform=i.platform||a.DEFAULT_PLAT,t.getVerLib(e,i)}function u(e,n){var i,o=!0,s="";n&&("string"==typeof n?s=n:(s=n.platform||"",o=null===(i=n.asProxy)||void 0===i||i));var l,u,c=r(e,s=s||t.getAppPlatform(e)||a.DEFAULT_PLAT);return"function"==typeof Proxy&&o&&(l=e,u=s,c=new Proxy(c,{get:function(e,n){var i=String(n);return t.log("[[getLibProxy]] call lib [".concat(l,"] method [").concat(i,"]")),Object.keys(e).length?e[i]:r(l,u)[i]}})),t.log("[[ exposeLib ]] libName, libObj",e,c),c}function c(e,r,i){var o,a,s=(o=i,a={allowDup:!1,platform:t.helConsts.DEFAULT_PLAT},n(n({},a),o||{}));t.libReady(e,r,s)}function f(e,n,r){t.appReady(e,n,r)}function d(e,n){return t.getVerApp(e,n)}var h=t.isSubApp;function p(){return!t.isSubApp()}var g=Object.freeze({__proto__:null,VER:i,eventBus:s,getLib:l,exposeLib:u,libReady:c,appReady:f,exposeApp:d,isSubApp:h,isMasterApp:p}),v=t.commonUtil.purify,m=["isMasterApp","isSubApp","eventBus"],y=["appReady","libReady"];function b(e,t){return t&&"object"==typeof t&&!Array.isArray(t)?n({platform:e},v(t)):{platform:e}}var w,x,C=function e(t){var n=function(e,t){var n={};return Object.keys(e).forEach(function(r){var i=e[r];if(m.includes(r))n[r]=i;else if(y.includes(r))n[r]=function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0],o=n[1],a=n[2];return e(i,o,b(t,void 0===a?{}:a))}}(i,t);else{var o="exposeLib"===r;n[r]=function(e,t,n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=r[0],a=r[1];return e(o,!n||"string"!=typeof a&&void 0!==a?b(t,a):a||t)}}(i,t,o)}}),n}(g,t);return n.createInstance=e,n},E=i,k=c,S=u,_=l,D=h,A=p,T=s,O=f,P=d,I={VER:E,libReady:k,exposeLib:S,getLib:_,isSubApp:D,isMasterApp:A,eventBus:T,appReady:O,exposeApp:P,createInstance:C};w=I,x=t.getGlobalThis(),t.commonUtil.isServer()||x.HelLibProxy||(t.log("auto bind hel-lib-proxy to global.HelLibProxy"),x.HelLibProxy=w),e.VER=E,e.appReady=O,e.createInstance=C,e.default=I,e.eventBus=T,e.exposeApp=P,e.exposeLib=S,e.getLib=_,e.isMasterApp=A,e.isSubApp=D,e.libReady=k,Object.defineProperty(e,"__esModule",{value:!0})}(Me.exports,Ne(fr))),Me.exports);const pr=/^[a-z0-9]+(-[a-z0-9]+)*$/,gr=(e,t,n,r="")=>{const i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const e=i.pop(),n=i.pop(),o={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!vr(o)?null:o}const o=i[0],a=o.split("-");if(a.length>1){const e={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!vr(e)?null:e}if(n&&""===r){const e={provider:r,prefix:"",name:o};return t&&!vr(e,n)?null:e}return null},vr=(e,t)=>!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),mr=Object.freeze({left:0,top:0,width:16,height:16}),yr=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),br=Object.freeze(l(l({},mr),yr)),wr=Object.freeze(u(l({},br),{body:"",hidden:!1}));function xr(e,t){const n=function(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}(e,t);for(const r in wr)r in yr?r in e&&!(r in n)&&(n[r]=yr[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function Cr(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(e){o=xr(r[e]||i[e],o)}return a(t),n.forEach(a),xr(e,o)}function Er(e,t){const n=[];if("object"!=typeof e||"object"!=typeof e.icons)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});const r=function(e){const t=e.icons,n=e.aliases||Object.create(null),r=Object.create(null);return Object.keys(t).concat(Object.keys(n)).forEach(function e(i){if(t[i])return r[i]=[];if(!(i in r)){r[i]=null;const t=n[i]&&n[i].parent,o=t&&e(t);o&&(r[i]=[t].concat(o))}return r[i]}),r}(e);for(const i in r){const o=r[i];o&&(t(i,Cr(e,i,o)),n.push(i))}return n}const kr=l({provider:"",aliases:{},not_found:{}},mr);function Sr(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function _r(e){if("object"!=typeof e||null===e)return null;const t=e;if("string"!=typeof t.prefix||!e.icons||"object"!=typeof e.icons)return null;if(!Sr(e,kr))return null;const n=t.icons;for(const i in n){const e=n[i];if(!i||"string"!=typeof e.body||!Sr(e,wr))return null}const r=t.aliases||Object.create(null);for(const i in r){const e=r[i],t=e.parent;if(!i||"string"!=typeof t||!n[t]&&!r[t]||!Sr(e,wr))return null}return t}const Dr=Object.create(null);function Ar(e,t){const n=Dr[e]||(Dr[e]=Object.create(null));return n[t]||(n[t]=function(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}(e,t))}function Tr(e,t){return _r(t)?Er(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let Or=!1;function Pr(e){return"boolean"==typeof e&&(Or=e),Or}const Ir=Object.freeze({width:null,height:null}),Fr=Object.freeze(l(l({},Ir),yr)),Br=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Lr=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Nr(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;const r=e.split(Br);if(null===r||!r.length)return e;const i=[];let o=r.shift(),a=Lr.test(o);for(;;){if(a){const e=parseFloat(o);isNaN(e)?i.push(o):i.push(Math.ceil(e*t*n)/n)}else i.push(o);if(o=r.shift(),void 0===o)return i.join("");a=!a}}const Mr=/\sid="(\S+)"/g,Rr="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let jr=0;const Hr=Object.create(null);function zr(e){return Hr[e]||Hr[""]}function Ur(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(t=e.resources,!(t instanceof Array&&t.length))return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}const $r=Object.create(null),Wr=["https://api.simplesvg.com","https://api.unisvg.com"],Vr=[];for(;Wr.length>0;)1===Wr.length||Math.random()>.5?Vr.push(Wr.shift()):Vr.push(Wr.pop());function Gr(e,t){const n=Ur(t);return null!==n&&($r[e]=n,!0)}function qr(e){return $r[e]}$r[""]=Ur({resources:["https://api.iconify.design"].concat(Vr)});let Kr=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(t){}})();const Yr={prepare:(e,t,n)=>{const r=[],i=function(e,t){const n=qr(e);if(!n)return 0;let r;if(n.maxURL){let e=0;n.resources.forEach(t=>{const n=t;e=Math.max(e,n.length)});const i=t+".json?icons=";r=n.maxURL-e-n.path.length-i.length}else r=0;return r}(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,l)=>{s+=n.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=n.length),a.icons.push(n)}),r.push(a),r},send:(e,t,n)=>{if(!Kr)return void n("abort",424);let r=function(e){if("string"==typeof e){const t=qr(e);if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":{const e=t.prefix,n=t.icons.join(",");r+=e+".json?"+new URLSearchParams({icons:n}).toString();break}case"custom":{const e=t.uri;r+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void n("abort",400)}let i=503;Kr(e+r).then(e=>{const t=e.status;if(200===t)return i=501,e.json();setTimeout(()=>{n(function(e){return 404===e}(t)?"abort":"next",t)})}).then(e=>{"object"==typeof e&&null!==e?setTimeout(()=>{n("success",e)}):setTimeout(()=>{404===e?n("abort",e):n("next",i)})}).catch(()=>{n("next",i)})}};function Xr(e,t){e.forEach(e=>{const n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let Jr=0;var Zr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Qr(e){const t=l(l({},Zr),e);let n=[];function r(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,i,o){const a=function(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let t=e.resources.slice(0);for(a=[];t.length>1;){const e=Math.floor(Math.random()*t.length);a.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}a=a.concat(t)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let l,u="pending",c=0,f=null,d=[],h=[];function p(){f&&(clearTimeout(f),f=null)}function g(){"pending"===u&&(u="aborted"),p(),d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}function v(e,t){t&&(h=[]),"function"==typeof e&&h.push(e)}function m(){u="failed",h.forEach(e=>{e(void 0,l)})}function y(){d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}return"function"==typeof r&&h.push(r),setTimeout(function r(){if("pending"!==u)return;p();const i=a.shift();if(void 0===i)return d.length?void(f=setTimeout(()=>{p(),"pending"===u&&(y(),m())},e.timeout)):void m();const o={status:"pending",resource:i,callback:(t,n)=>{!function(t,n,i){const o="success"!==n;switch(d=d.filter(e=>e!==t),u){case"pending":break;case"failed":if(o||!e.dataAfterTimeout)return;break;default:return}if("abort"===n)return l=i,void m();if(o)return l=i,void(d.length||(a.length?r():m()));if(p(),y(),!e.random){const n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}u="completed",h.forEach(e=>{e(i)})}(o,t,n)}};d.push(o),c++,f=setTimeout(r,e.rotate),n(i,t,o.callback)}),function(){return{startTime:s,payload:t,status:u,queriesSent:c,queriesPending:d.length,subscribe:v,abort:g}}}(t,e,i,(e,t)=>{r(),o&&o(e,t)});return n.push(a),a},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function ei(){}const ti=Object.create(null);const ni="iconify2",ri="iconify",ii=ri+"-count",oi=ri+"-version",ai=36e5;function si(e,t){try{return e.getItem(t)}catch(n){}}function li(e,t,n){try{return e.setItem(t,n),!0}catch(r){}}function ui(e,t){try{e.removeItem(t)}catch(n){}}function ci(e,t){return li(e,ii,t.toString())}function fi(e){return parseInt(si(e,ii))||0}const di={local:!0,session:!0},hi={local:new Set,session:new Set};let pi=!1,gi="undefined"==typeof window?{}:window;function vi(e){const t=e+"Storage";try{if(gi&&gi[t]&&"number"==typeof gi[t].length)return gi[t]}catch(n){}di[e]=!1}function mi(e,t){const n=vi(e);if(!n)return;const r=si(n,oi);if(r!==ni){if(r){const e=fi(n);for(let t=0;t<e;t++)ui(n,ri+t.toString())}return li(n,oi,ni),void ci(n,0)}const i=Math.floor(Date.now()/ai)-168,o=e=>{const r=ri+e.toString(),o=si(n,r);if("string"==typeof o){try{const n=JSON.parse(o);if("object"==typeof n&&"number"==typeof n.cached&&n.cached>i&&"string"==typeof n.provider&&"object"==typeof n.data&&"string"==typeof n.data.prefix&&t(n,e))return!0}catch(a){}ui(n,r)}};let a=fi(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,ci(n,a)):hi[e].add(s))}function yi(){if(!pi){pi=!0;for(const e in di)mi(e,e=>{const t=e.data,n=Ar(e.provider,t.prefix);if(!Tr(n,t).length)return!1;const r=t.lastModified||-1;return n.lastModifiedCached=n.lastModifiedCached?Math.min(n.lastModifiedCached,r):r,!0})}}function bi(){}function wi(e,t,n,r){function i(){const n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&"object"==typeof n)try{if(!Tr(e,n).length)return void i();r&&function(e,t){function n(n){let r;if(!di[n]||!(r=vi(n)))return;const i=hi[n];let o;if(i.size)i.delete(o=Array.from(i).shift());else if(o=fi(r),o>=50||!ci(r,o+1))return;const a={cached:Math.floor(Date.now()/ai),provider:e.provider,data:t};return li(r,ri+o.toString(),JSON.stringify(a))}pi||yi(),t.lastModified&&!function(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in di)mi(r,n=>{const r=n.data;return n.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&delete(t=Object.assign({},t)).not_found,n("local")||n("session"))}(e,n)}catch(o){console.error(o)}i(),function(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(t=>{const o=t.icons,a=o.pending.length;o.pending=o.pending.filter(t=>{if(t.prefix!==i)return!0;const a=t.name;if(e.icons[a])o.loaded.push({provider:r,prefix:i,name:a});else{if(!e.missing.has(a))return n=!0,!0;o.missing.push({provider:r,prefix:i,name:a})}return!1}),o.pending.length!==a&&(n||Xr([e],t.id),t.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),t.abort))})}))}(e)}))}(e)}function xi(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Ci(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:n}=e,r=e.iconsToLoad;if(delete e.iconsToLoad,!r||!r.length)return;const i=e.loadIcon;if(e.loadIcons&&(r.length>1||!i))return void xi(e.loadIcons(r,n,t),t=>{wi(e,r,t,!1)});if(i)return void r.forEach(r=>{xi(i(r,n,t),t=>{wi(e,[r],t?{prefix:n,icons:{[r]:t}}:null,!1)})});const{valid:o,invalid:a}=function(e){const t=[],n=[];return e.forEach(e=>{(e.match(pr)?t:n).push(e)}),{valid:t,invalid:n}}(r);if(a.length&&wi(e,a,null,!1),!o.length)return;const s=n.match(pr)?zr(t):null;s?s.prepare(t,n,o).forEach(n=>{!function(e,t,n){let r,i;if("string"==typeof e){const t=zr(e);if(!t)return n(void 0,424),ei;i=t.send;const o=function(e){if(!ti[e]){const t=qr(e);if(!t)return;const n={config:t,redundancy:Qr(t)};ti[e]=n}return ti[e]}(e);o&&(r=o.redundancy)}else{const t=Ur(e);if(t){r=Qr(t);const n=zr(e.resources?e.resources[0]:"");n&&(i=n.send)}}r&&i?r.query(t,i,n)().abort:n(void 0,424)}(t,n,t=>{wi(e,n.icons,t,!0)})}):wi(e,o,null,!1)}))}const Ei=(e,t)=>{const n=function(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name));let r={provider:"",prefix:"",name:""};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;const i=e.provider,o=e.prefix,a=e.name,s=n[i]||(n[i]=Object.create(null)),l=s[o]||(s[o]=Ar(i,o));let u;u=a in l.icons?t.loaded:""===o||l.missing.has(a)?t.missing:t.pending;const c={provider:i,prefix:o,name:a};u.push(c)}),t}(function(e,t=!0,n=!1){const r=[];return e.forEach(e=>{const i="string"==typeof e?gr(e,t,n):e;i&&r.push(i)}),r}(e,!0,Pr()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,bi)}),()=>{e=!1}}const r=Object.create(null),i=[];let o,a;return n.pending.forEach(e=>{const{provider:t,prefix:n}=e;if(n===a&&t===o)return;o=t,a=n,i.push(Ar(t,n));const s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{const{provider:t,prefix:n,name:i}=e,o=Ar(t,n),a=o.pendingIcons||(o.pendingIcons=new Set);a.has(i)||(a.add(i),r[t][n].push(i))}),i.forEach(e=>{const t=r[e.provider][e.prefix];t.length&&Ci(e,t)}),t?function(e,t,n){const r=Jr++,i=Xr.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(o)}),i}(t,n,i):bi},ki=/[\s,]+/;function Si(e,t){t.split(ki).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}function _i(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===n){const t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}const Di=u(l({},Fr),{inline:!1}),Ai={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ti={display:"inline-block"},Oi={backgroundColor:"currentColor"},Pi={backgroundColor:"transparent"},Ii={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Fi={webkitMask:Oi,mask:Oi,background:Pi};for(const $ in Fi){const e=Fi[$];for(const t in Ii)e[$+t]=Ii[t]}const Bi={};function Li(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Bi[e+"-flip"]=t,Bi[e.slice(0,1)+"-flip"]=t,Bi[e+"Flip"]=t});const Ni=(e,t)=>{const n=function(e,t){const n=l({},Di);for(const r in t){const e=t[r],i=typeof e;r in Ir?(null===e||e&&("string"===i||"number"===i))&&(n[r]=e):i===typeof n[r]&&(n[r]="rotate"===r?e%4:e)}return n}(0,t),r=l({},Ai),i=t.mode||"svg",o={},a=t.style,s="object"!=typeof a||a instanceof Array?{}:a;for(let l in t){const e=t[l];if(void 0!==e)switch(l){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":n[l]=!0===e||"true"===e||1===e;break;case"flip":"string"==typeof e&&Si(n,e);break;case"color":o.color=e;break;case"rotate":"string"==typeof e?n[l]=_i(e):"number"==typeof e&&(n[l]=e);break;case"ariaHidden":case"aria-hidden":!0!==e&&"true"!==e&&delete r["aria-hidden"];break;default:{const t=Bi[l];t?!0!==e&&"true"!==e&&1!==e||(n[t]=!0):void 0===Di[l]&&(r[l]=e)}}}const c=function(e,t){const n=l(l({},br),e),r=l(l({},Fr),t),i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(e=>{const t=[],n=e.hFlip,r=e.vFlip;let a,s=e.rotate;switch(n?r?s+=2:(t.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),t.push("scale(-1 1)"),i.top=i.left=0):r&&(t.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),t.push("scale(1 -1)"),i.top=i.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=i.height/2+i.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:a=i.width/2+i.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(i.left!==i.top&&(a=i.left,i.left=i.top,i.top=a),i.width!==i.height&&(a=i.width,i.width=i.height,i.height=a)),t.length&&(o=function(e,t){const n=function(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("</"+t);if(-1===i||-1===o)break;const a=e.indexOf(">",o);if(-1===a)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}(e);return r=n.defs,i=t+n.content+"</g>",r?"<defs>"+r+"</defs>"+i:i;var r,i}(o,'<g transform="'+t.join(" ")+'">'))});const a=r.width,s=r.height,u=i.width,c=i.height;let f,d;null===a?(d=null===s?"1em":"auto"===s?c:s,f=Nr(d,u/c)):(f="auto"===a?u:a,d=null===s?Nr(f,c/u):"auto"===s?c:s);const h={},p=(e,t)=>{(e=>"unset"===e||"undefined"===e||"none"===e)(t)||(h[e]=t.toString())};p("width",f),p("height",d);const g=[i.left,i.top,u,c];return h.viewBox=g.join(" "),{attributes:h,viewBox:g,body:o}}(e,n),f=c.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),"svg"===i){r.style=l(l({},o),s),Object.assign(r,f);let e=0,n=t.id;return"string"==typeof n&&(n=n.replace(/-/g,"_")),r.innerHTML=function(e,t=Rr){const n=[];let r;for(;r=Mr.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach(n=>{const r="function"==typeof t?t(n):t+(jr++).toString(),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),e=e.replace(new RegExp(i,"g"),"")}(c.body,n?()=>n+"ID"+e++:"iconifyVue"),g("svg",r)}const{body:d,width:h,height:p}=e,v="mask"===i||"bg"!==i&&-1!==d.indexOf("currentColor"),m=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(d,u(l({},f),{width:h+"",height:p+""}));var y;return r.style=l(l(l(u(l({},o),{"--svg":(y=m,'url("'+function(e){return"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(e)}(y)+'")'),width:Li(f.width),height:Li(f.height)}),Ti),v?Oi:Pi),s),g("span",r)};var Mi;if(Pr(!0),Mi=Yr,Hr[""]=Mi,"undefined"!=typeof document&&"undefined"!=typeof window){yi();const e=window;if(void 0!==e.IconifyPreload){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),Or&&!t&&!e.prefix){let t=!1;return _r(e)&&(e.prefix="",Er(e,(e,r)=>{(function(e,t){const r=gr(e,!0,Or);if(!r)return!1;const i=Ar(r.provider,r.prefix);return t?function(e,t,r){try{if("string"==typeof r.body)return e.icons[t]=l({},r),!0}catch(n){}return!1}(i,r.name,t):(i.missing.add(r.name),!0)})(e,r)&&(t=!0)})),t}const r=e.prefix;return!!vr({prefix:r,name:"a"})&&!!Tr(Ar(t,r),e)}(e))&&console.error(n)}catch(pp){console.error(n)}})}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){const n="IconifyProviders["+e+"] is invalid.";try{const r=t[e];if("object"!=typeof r||!r||void 0===r.resources)continue;Gr(e,r)||console.error(n)}catch(pp){console.error(n)}}}}const Ri=u(l({},br),{body:""}),ji=p({inheritAttrs:!1,data:()=>({_name:"",_loadingIcon:null,iconMounted:!1,counter:0}),mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,n){if("object"==typeof e&&null!==e&&"string"==typeof e.body)return this._name="",this.abortLoading(),{data:e};let r;if("string"!=typeof e||null===(r=gr(e,!1,!0)))return this.abortLoading(),null;let i=function(e){const t="string"==typeof e?gr(e,!0,Or):e;if(t){const e=Ar(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}(r);if(!i)return this._loadingIcon&&this._loadingIcon.name===e||(this.abortLoading(),this._name="",null!==i&&(this._loadingIcon={name:e,abort:Ei([r],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),n){i=Object.assign({},i);const e=n(i.body,r.name,r.prefix,r.provider);"string"==typeof e&&(i.body=e)}const o=["iconify"];return""!==r.prefix&&o.push("iconify--"+r.prefix),""!==r.provider&&o.push("iconify--"+r.provider),{data:i,classes:o}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return Ni(Ri,e);let n=e;return t.classes&&(n=u(l({},e),{class:("string"==typeof e.class?e.class+" ":"")+t.classes.join(" ")})),Ni(l(l({},br),t.data),n)}});function Hi(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get("*"))&&r.slice().map(function(e){e(t,n)})}}}function zi(e,t){return!!w()&&(x(e,t),!0)}const Ui=new WeakMap,$i=(...e)=>{var t;const n=e[0],r=null===(t=k())||void 0===t?void 0:t.proxy,i=null!=r?r:w();if(null==i&&!_())throw new Error("injectLocal must be called in setup");return i&&Ui.has(i)&&n in Ui.get(i)?Ui.get(i)[n]:D(...e)},Wi="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const Vi=e=>null!=e,Gi=Object.prototype.toString,qi=()=>{};function Ki(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return"cancel"in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}function Yi(e){return e}function Xi(e){return e.endsWith("rem")?16*Number.parseFloat(e):Number.parseFloat(e)}function Ji(e){return Array.isArray(e)?e:[e]}function Zi(e,t=200,n={}){return Ki(function(e,t={}){let n,r,i=qi,o=qi;const a=v(!1),s=e=>{clearTimeout(e),i(),i=qi};let l;return Object.assign(u=>{const c=C(e),f=C(t.maxWait);return n&&s(n),c<=0||void 0!==f&&f<=0?(r&&(s(r),r=void 0),a.value=!1,Promise.resolve(u())):(a.value=!0,new Promise((e,d)=>{i=t.rejectOnCancel?d:e,o=e,l=u,f&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,a.value=!1,e(l())},f)),n=setTimeout(()=>{r&&s(r),r=void 0,a.value=!1,e(u())},c)}))},{cancel:()=>{n&&(s(n),n=void 0),r&&(s(r),r=void 0),a.value=!1,o=qi},flush:()=>{if(a.value){n&&(clearTimeout(n),n=void 0),r&&(clearTimeout(r),r=void 0),a.value=!1;const e=o;i=qi,o=qi,e(l())}},isPending:m(a)})}(t,n),e)}function Qi(e,t=200,n=!0,r=!0,i=!1){return Ki(function(...e){let t,n,r,i,o,a,s=0,l=!0,u=qi;S(e[0])||"object"!=typeof e[0]?[r,i=!0,o=!0,a=!1]=e:({delay:r,trailing:i=!0,leading:o=!0,rejectOnCancel:a=!1}=e[0]);const c=()=>{t&&(clearTimeout(t),t=void 0,u(),u=qi)};return e=>{const f=C(r),d=Date.now()-s,h=()=>n=e();return c(),f<=0?(s=Date.now(),h()):(d>f?(s=Date.now(),!o&&l||h()):i&&(n=new Promise((e,n)=>{u=a?n:e,t=setTimeout(()=>{s=Date.now(),l=!0,e(h()),c()},Math.max(0,f-d))})),o||t||(t=setTimeout(()=>l=!0,f)),l=!1,n)}}(t,n,r,i),e)}function eo(e,t=!0,n){k()?y(e,n):t?e():b(e)}function to(e,t,n={}){const{immediate:r=!0,immediateCallback:i=!1}=n,o=v(!1);let a;function s(){a&&(clearTimeout(a),a=void 0)}function l(){o.value=!1,s()}function u(...n){i&&e(),s(),o.value=!0,a=setTimeout(()=>{o.value=!1,a=void 0,e(...n)},C(t))}return r&&(o.value=!0,Wi&&u()),zi(l),{isPending:m(o),start:u,stop:l}}const no=Wi?window:void 0,ro=Wi?window.document:void 0,io=Wi?window.navigator:void 0;function oo(e){var t;const n=P(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}function ao(...e){const t=A(()=>{const t=Ji(P(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return E(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>oo(e)))&&void 0!==n?n:[no].filter(e=>null!=e),Ji(P(t.value?e[1]:e[0])),Ji(R(t.value?e[2]:e[1])),P(t.value?e[3]:e[2])]},([e,t,n,r],i,o)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==n?void 0:n.length))return;const a=(s=r,"[object Object]"===Gi.call(s)?l({},r):r);var s;const u=e.flatMap(e=>t.flatMap(t=>n.map(n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,a))));o(()=>{u.forEach(e=>e())})},u(l({},{flush:"post"}),{immediate:!0}))}function so(){const e=T(!1),t=N();return t&&M(()=>{e.value=!0},t),e}function lo(e){const t=so();return A(()=>(t.value,Boolean(e())))}function uo(e,t,n={}){const r=n,{window:i=no}=r,o=c(r,["window"]);let a;const s=lo(()=>i&&"MutationObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=A(()=>{const t=Ji(P(e)).map(oo).filter(Vi);return new Set(t)}),f=O(u,e=>{l(),s.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,o)))},{immediate:!0,flush:"post"}),d=()=>{f(),l()};return zi(d),{isSupported:s,stop:d,takeRecords:()=>null==a?void 0:a.takeRecords()}}function co(e,t={}){const{immediate:n=!0,fpsLimit:r=null,window:i=no,once:o=!1}=t,a=T(!1),s=A(()=>{const e=P(r);return e?1e3/e:null});let l=0,u=null;function c(t){if(!a.value||!i)return;l||(l=t);const n=t-l;if(s.value&&n<s.value)u=i.requestAnimationFrame(c);else{if(l=t,e({delta:n,timestamp:t}),o)return a.value=!1,void(u=null);u=i.requestAnimationFrame(c)}}function f(){!a.value&&i&&(a.value=!0,l=0,u=i.requestAnimationFrame(c))}function d(){a.value=!1,null!=u&&i&&(i.cancelAnimationFrame(u),u=null)}return n&&f(),zi(d),{isActive:I(a),pause:d,resume:f}}const fo=Symbol("vueuse-ssr-width");function ho(){const e=L()?$i(fo,null):null;return"number"==typeof e?e:void 0}function po(e,t={}){const{window:n=no,ssrWidth:r=ho()}=t,i=lo(()=>n&&"matchMedia"in n&&"function"==typeof n.matchMedia),o=T("number"==typeof r),a=T(),s=T(!1);return B(()=>{if(o.value){o.value=!i.value;const t=P(e).split(",");return void(s.value=t.some(e=>{const t=e.includes("not all"),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let o=Boolean(n||i);return n&&o&&(o=r>=Xi(n[1])),i&&o&&(o=r<=Xi(i[1])),t?!o:o}))}i.value&&(a.value=n.matchMedia(P(e)),s.value=a.value.matches)}),ao(a,"change",e=>{s.value=e.matches},{passive:!0}),A(()=>s.value)}function go(e,t={}){function n(t,n){let r=P(e[P(t)]);return null!=n&&(r=function(e,t){var n;if("number"==typeof e)return e+t;const r=(null===(n=e.match(/^-?\d+\.?\d*/))||void 0===n?void 0:n[0])||"",i=e.slice(r.length),o=Number.parseFloat(r)+t;return Number.isNaN(o)?e:o+i}(r,n)),"number"==typeof r&&(r=`${r}px`),r}const{window:r=no,strategy:i="min-width",ssrWidth:o=ho()}=t,a="number"==typeof o,s=a?T(!1):{value:!0};function l(e,t){return!s.value&&a?"min"===e?o>=Xi(t):o<=Xi(t):!!r&&r.matchMedia(`(${e}-width: ${t})`).matches}a&&eo(()=>s.value=!!r);const u=e=>po(()=>`(min-width: ${n(e)})`,t),c=e=>po(()=>`(max-width: ${n(e)})`,t),f=Object.keys(e).reduce((e,t)=>(Object.defineProperty(e,t,{get:()=>"min-width"===i?u(t):c(t),enumerable:!0,configurable:!0}),e),{});function d(){const t=Object.keys(e).map(e=>[e,f[e],Xi(n(e))]).sort((e,t)=>e[2]-t[2]);return A(()=>t.filter(([,e])=>e.value).map(([e])=>e))}return Object.assign(f,{greaterOrEqual:u,smallerOrEqual:c,greater:e=>po(()=>`(min-width: ${n(e,.1)})`,t),smaller:e=>po(()=>`(max-width: ${n(e,-.1)})`,t),between:(e,r)=>po(()=>`(min-width: ${n(e)}) and (max-width: ${n(r,-.1)})`,t),isGreater:e=>l("min",n(e,.1)),isGreaterOrEqual:e=>l("min",n(e)),isSmaller:e=>l("max",n(e,-.1)),isSmallerOrEqual:e=>l("max",n(e)),isInBetween:(e,t)=>l("min",n(e))&&l("max",n(t,-.1)),current:d,active(){const e=d();return A(()=>0===e.value.length?"":e.value.at("min-width"===i?-1:0))}})}function vo(e,t={}){const{controls:n=!1,navigator:r=io}=t,i=lo(()=>r&&"permissions"in r),o=T(),a="string"==typeof e?{name:e}:e,s=T(),l=()=>{var e,t;s.value=null!==(e=null===(t=o.value)||void 0===t?void 0:t.state)&&void 0!==e?e:"prompt"};ao(o,"change",l,{passive:!0});const u=function(){let e;function t(){return e||(e=f(null,null,function*(){if(i.value){if(!o.value)try{o.value=yield r.permissions.query(a)}catch(e){o.value=void 0}finally{l()}return n?j(o.value):void 0}})),e}return t.reset=()=>f(null,null,function*(){const t=e;e=void 0,t&&(yield t)}),t}();return u(),n?{state:s,isSupported:i,query:u}:s}function mo(e={}){const{navigator:t=io,read:n=!1,source:r,copiedDuring:i=1500,legacy:o=!1}=e,a=lo(()=>t&&"clipboard"in t),s=vo("clipboard-read"),l=vo("clipboard-write"),u=A(()=>a.value||o),c=T(""),d=T(!1),h=T(!1),p=to(()=>d.value=!1,i,{immediate:!1});let g=0;function v(e){const t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.opacity="0",t.setAttribute("readonly",""),document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}function m(e){return"granted"===e||"prompt"===e}return u.value&&n&&ao(["copy","cut"],function(){return f(this,null,function*(){let e=!(a.value&&m(s.value));if(!e)try{c.value=yield t.clipboard.readText()}catch(o){e=!0}var n,r,i;e&&(c.value=null!==(n=null===(r=document)||void 0===r||null===(i=r.getSelection)||void 0===i||null===(i=i.call(r))||void 0===i?void 0:i.toString())&&void 0!==n?n:"")})},{passive:!0}),{copyPending:I(h),isSupported:u,text:I(c),copied:I(d),copy:function(e){return f(this,null,function*(){const n=null!=e?e:P(r);if(u.value&&null!=n){h.value=!0;let e=!(a.value&&m(l.value));if(!e)try{const e=function(e){return"string"==typeof e?(c.value=e,new ClipboardItem({"text/plain":e})):new ClipboardItem({"text/plain":e().then((e="")=>(c.value=e,new Blob([e],{type:"text/plain"})))})}(n);yield t.clipboard.write([e])}catch(i){e=!0}if(e)if("string"==typeof n)c.value=n,v(n);else{const e=++g,t=yield n();null!=t&&e===g&&(c.value=t,v(t))}d.value=!0,p.start(),h.value=!1}})}}}function yo(e,t,n={}){const r=n,{window:i=no}=r,o=c(r,["window"]);let a;const s=lo(()=>i&&"ResizeObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=A(()=>{const t=P(e);return Array.isArray(t)?t.map(e=>oo(e)):[oo(t)]}),f=O(u,e=>{if(l(),s.value&&i){a=new ResizeObserver(t);for(const t of e)t instanceof Element&&a.observe(t,o)}},{immediate:!0,flush:"post"}),d=()=>{l(),f()};return zi(d),{isSupported:s,stop:d}}function bo(e,t={}){const{delayEnter:n=0,delayLeave:r=0,triggerOnRemoval:i=!1,window:o=no}=t,a=T(!1);let s;const l=e=>{const t=e?n:r;s&&(clearTimeout(s),s=void 0),t?s=setTimeout(()=>a.value=e,t):a.value=e};return o?(ao(e,"mouseenter",()=>l(!0),{passive:!0}),ao(e,"mouseleave",()=>l(!1),{passive:!0}),i&&function(e,t,n={}){const{window:r=no,document:i=(null==r?void 0:r.document),flush:o="sync"}=n;if(!r||!i)return qi;let a;const s=e=>{null==a||a(),a=e},l=B(()=>{const n=oo(e);if(n){const{stop:e}=uo(i,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===n||e.contains(n))&&t(e)},{window:r,childList:!0,subtree:!0});s(e)}},{flush:o});zi(()=>{l(),s()})}(A(()=>oo(e)),()=>l(!1)),a):a}function wo(e,t={width:0,height:0},n={}){const{window:r=no,box:i="content-box"}=n,o=A(()=>{var t;return null===(t=oo(e))||void 0===t||null===(t=t.namespaceURI)||void 0===t?void 0:t.includes("svg")}),a=T(t.width),s=T(t.height),{stop:l}=yo(e,([t])=>{const n="border-box"===i?t.borderBoxSize:"content-box"===i?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&o.value){const t=oo(e);if(t){const e=t.getBoundingClientRect();a.value=e.width,s.value=e.height}}else if(n){const e=Ji(n);a.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else a.value=t.contentRect.width,s.value=t.contentRect.height},n);eo(()=>{const n=oo(e);if(n&&"offsetWidth"in n)if("content-box"===i&&r){const e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),o=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),l=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);a.value=n.offsetWidth-t-o,s.value=n.offsetHeight-i-l}else a.value=n.offsetWidth,s.value=n.offsetHeight;else n&&(a.value=t.width,s.value=t.height)});const u=O(()=>oo(e),e=>{a.value=e?t.width:0,s.value=e?t.height:0});return{width:a,height:s,stop:function(){l(),u()}}}const xo=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function Co(e,t={}){const{document:n=ro,autoExit:r=!1}=t,i=A(()=>{var t;return null!==(t=oo(e))&&void 0!==t?t:null==n?void 0:n.documentElement}),o=T(!1),a=A(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(e=>n&&e in n||i.value&&e in i.value)),s=A(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(e=>n&&e in n||i.value&&e in i.value)),l=A(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(e=>n&&e in n||i.value&&e in i.value)),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(e=>n&&e in n),c=lo(()=>i.value&&n&&void 0!==a.value&&void 0!==s.value&&void 0!==l.value),d=()=>{if(l.value){if(n&&null!=n[l.value])return n[l.value];{const e=i.value;if(null!=(null==e?void 0:e[l.value]))return Boolean(e[l.value])}}return!1};function h(){return f(this,null,function*(){if(c.value&&o.value){if(s.value)if(null!=(null==n?void 0:n[s.value]))yield n[s.value]();else{const e=i.value;null!=(null==e?void 0:e[s.value])&&(yield e[s.value]())}o.value=!1}})}function p(){return f(this,null,function*(){if(!c.value||o.value)return;d()&&(yield h());const e=i.value;a.value&&null!=(null==e?void 0:e[a.value])&&(yield e[a.value](),o.value=!0)})}const g=()=>{const e=d();(!e||e&&u&&(null==n?void 0:n[u])===i.value)&&(o.value=e)},v={capture:!1,passive:!0};return ao(n,xo,g,v),ao(()=>oo(i),xo,g,v),eo(g,!1),r&&zi(h),{isSupported:c,isFullscreen:o,enter:p,exit:h,toggle:function(){return f(this,null,function*(){yield o.value?h():p()})}}}function Eo(e,t={}){const{throttle:n=0,idle:r=200,onStop:i=qi,onScroll:o=qi,offset:a={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:u="auto",window:c=no,onError:f=e=>{console.error(e)}}=t,d="boolean"==typeof s?{mutation:s}:s,h=T(0),p=T(0),g=A({get:()=>h.value,set(e){m(e,void 0)}}),v=A({get:()=>p.value,set(e){m(void 0,e)}});function m(t,n){var r,i,o,a;if(!c)return;const s=P(e);if(!s)return;null===(r=s instanceof Document?c.document.body:s)||void 0===r||r.scrollTo({top:null!==(i=P(n))&&void 0!==i?i:v.value,left:null!==(o=P(t))&&void 0!==o?o:g.value,behavior:P(u)});const l=(null==s||null===(a=s.document)||void 0===a?void 0:a.documentElement)||(null==s?void 0:s.documentElement)||s;null!=g&&(h.value=l.scrollLeft),null!=v&&(p.value=l.scrollTop)}const y=T(!1),b=F({left:!0,right:!1,top:!0,bottom:!1}),w=F({left:!1,right:!1,top:!1,bottom:!1}),x=e=>{y.value&&(y.value=!1,w.left=!1,w.right=!1,w.top=!1,w.bottom=!1,i(e))},C=Zi(x,n+r),E=e=>{var t;if(!c)return;const n=(null==e||null===(t=e.document)||void 0===t?void 0:t.documentElement)||(null==e?void 0:e.documentElement)||oo(e),{display:r,flexDirection:i,direction:o}=c.getComputedStyle(n),s="rtl"===o?-1:1,l=n.scrollLeft;w.left=l<h.value,w.right=l>h.value;const u=Math.abs(l*s)<=(a.left||0),f=Math.abs(l*s)+n.clientWidth>=n.scrollWidth-(a.right||0)-1;"flex"===r&&"row-reverse"===i?(b.left=f,b.right=u):(b.left=u,b.right=f),h.value=l;let d=n.scrollTop;e!==c.document||d||(d=c.document.body.scrollTop),w.top=d<p.value,w.bottom=d>p.value;const g=Math.abs(d)<=(a.top||0),v=Math.abs(d)+n.clientHeight>=n.scrollHeight-(a.bottom||0)-1;"flex"===r&&"column-reverse"===i?(b.top=v,b.bottom=g):(b.top=g,b.bottom=v),p.value=d},k=e=>{var t;if(!c)return;const n=null!==(t=e.target.documentElement)&&void 0!==t?t:e.target;E(n),y.value=!0,C(e),o(e)};return ao(e,"scroll",n?Qi(k,n,!0,!1):k,l),eo(()=>{try{const t=P(e);if(!t)return;E(t)}catch(pp){f(pp)}}),(null==d?void 0:d.mutation)&&null!=e&&e!==c&&e!==document&&uo(e,()=>{const t=P(e);t&&E(t)},{attributes:!0,childList:!0,subtree:!0}),ao(e,"scrollend",x,l),{x:g,y:v,isScrolling:y,arrivedState:b,directions:w,measure(){const t=P(e);c&&t&&E(t)}}}const ko=Object.assign({},{linear:Yi},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});function So(e,t,n){return e+n*(t-e)}function _o(e,t,n){const r=P(e),i=P(t);if("number"==typeof r&&"number"==typeof i)return So(r,i,n);if(Array.isArray(r)&&Array.isArray(i))return r.map((e,t)=>So(e,P(i[t]),n));throw new TypeError("Unknown transition type, specify an interpolation function.")}function Do(e){var t;return"function"==typeof e?e:null!==(t=P(e))&&void 0!==t?t:Yi}function Ao(e,t={}){let n=0;const r=()=>{const n=P(e);return void 0===t.interpolation&&Array.isArray(n)?n.map(P):n},i=T(r());return O(r,e=>f(null,null,function*(){var r,o;if(P(t.disabled))return;const a=++n;t.delay&&(yield function(e,t=!1,n="Timeout"){return new Promise((r,i)=>{t?setTimeout(i,e,n):setTimeout(r,e)})}(P(t.delay))),a===n&&(null===(r=t.onStarted)||void 0===r||r.call(t),yield function(e,t,n,r={}){var i;const{window:o=no}=r,a=P(t),s=P(n),l=null!==(i=P(r.duration))&&void 0!==i?i:1e3,u=Date.now(),c=Date.now()+l,f="function"==typeof r.interpolation?r.interpolation:_o,d=void 0!==r.easing?Do(r.easing):Do(r.transition),h="function"==typeof d?d:function([e,t,n,r]){const i=(e,t)=>1-3*t+3*e,o=(e,t)=>3*t-6*e,a=e=>3*e,s=(e,t,n)=>((i(t,n)*e+o(t,n))*e+a(t))*e,l=(e,t,n)=>3*i(t,n)*e*e+2*o(t,n)*e+a(t);return i=>e===t&&n===r?i:s((t=>{let r=t;for(let i=0;i<4;++i){const i=l(r,e,n);if(0===i)return r;r-=(s(r,e,n)-t)/i}return r})(i),t,r)}(d);return new Promise(t=>{e.value=a;const n=()=>{var i;if(null===(i=r.abort)||void 0===i?void 0:i.call(r))return void t();const d=Date.now(),p=h((d-u)/l);e.value=f(a,s,p),d<c?null==o||o.requestAnimationFrame(n):(e.value=s,t())};n()})}(i,i.value,e,u(l({},t),{abort:()=>{var e;return a!==n||(null===(e=t.abort)||void 0===e?void 0:e.call(t))}})),null===(o=t.onFinished)||void 0===o||o.call(t))}),{deep:!0}),O(()=>P(t.disabled),e=>{e&&(n++,i.value=r())}),zi(()=>{n++}),A(()=>P(t.disabled)?r():i.value)}function To(e={}){const{window:t=no,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:o=!0,type:a="inner"}=e,s=T(n),l=T(r),u=()=>{if(t)if("outer"===a)s.value=t.outerWidth,l.value=t.outerHeight;else if("visual"===a&&t.visualViewport){const{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),l.value=Math.round(n*r)}else o?(s.value=t.innerWidth,l.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};u(),eo(u);const c={passive:!0};if(ao("resize",u,c),t&&"visual"===a&&t.visualViewport&&ao(t.visualViewport,"resize",u,c),i){const e=po("(orientation: portrait)");O(e,()=>u())}return{width:s,height:l}}var Oo=H({name:"ArrowDownBold",__name:"arrow-down-bold",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496"})]))}),Po=H({name:"ArrowLeft",__name:"arrow-left",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}),Io=H({name:"ArrowRight",__name:"arrow-right",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}),Fo=H({name:"ArrowUpBold",__name:"arrow-up-bold",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M104.704 685.248a64 64 0 0 0 90.496 0l316.8-316.8 316.8 316.8a64 64 0 0 0 90.496-90.496L557.248 232.704a64 64 0 0 0-90.496 0L104.704 594.752a64 64 0 0 0 0 90.496"})]))}),Bo=H({name:"ChatLineRound",__name:"chat-line-round",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),W("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}),Lo=H({name:"Close",__name:"close",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}),No=H({name:"Loading",__name:"loading",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}),Mo=H({name:"Lock",__name:"lock",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),W("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}),Ro=H({name:"Paperclip",__name:"paperclip",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144 45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744z"})]))}),jo=H({name:"Picture",__name:"picture",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),W("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}),Ho=H({name:"Search",__name:"search",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}),zo=H({name:"Unlock",__name:"unlock",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),W("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"})]))}),Uo=H({name:"View",__name:"view",setup:e=>(e,t)=>(z(),U("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[W("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))});const $o={name:"ImgCutter",props:{crossOrigin:{type:Boolean,default:!1,required:!1},crossOriginHeader:{type:String,default:"*",required:!1},label:{type:String,default:"选择图片",required:!1},isModal:{type:Boolean,default:!0,required:!1},lockScroll:{type:Boolean,default:!0,required:!1},showChooseBtn:{type:Boolean,default:!0,required:!1},boxWidth:{type:Number,default:800,required:!1},boxHeight:{type:Number,default:400,required:!1},cutWidth:{type:Number,default:200,required:!1},cutHeight:{type:Number,default:200,required:!1},rate:{type:String,default:null,required:!1},tool:{type:Boolean,default:!0,required:!1},toolBgc:{type:String,default:"#fff",required:!1},imgMove:{type:Boolean,default:!0,required:!1},sizeChange:{type:Boolean,default:!0,required:!1},originalGraph:{type:Boolean,default:!1,required:!1},moveAble:{type:Boolean,default:!0,required:!1},previewMode:{type:Boolean,default:!0,required:!1},CuttingOriginal:{type:Boolean,default:!1,required:!1},WatermarkText:{type:String,default:"",required:!1},WatermarkTextFont:{type:String,default:"12px Sans-serif",required:!1},WatermarkTextColor:{type:String,default:"#fff",required:!1},WatermarkTextX:{type:Number,default:.95,required:!1},WatermarkTextY:{type:Number,default:.95,required:!1},smallToUpload:{type:Boolean,default:!1,required:!1},saveCutPosition:{type:Boolean,default:!1,required:!1},scaleAble:{type:Boolean,default:!0,required:!1},index:{default:null,required:!1},fileType:{default:"png",required:!1,type:String},toolBoxOverflow:{type:Boolean,default:!0,required:!1},DoNotDisplayCopyright:{type:Boolean,default:!1,required:!1},quality:{type:Number,default:1,required:!1},accept:{type:String,default:"image/gif, image/jpeg ,image/png",required:!1}},model:["label","boxWidth","boxHeight","rate","tool","DoNotDisplayCopyright"],data(){let e,t;return e=this.boxWidth/2,t=this.boxHeight/2,{version:"",visible:!1,fileName:"",cutImageObj:null,onPrintImgTimmer:null,toolBoxPosition:{x:0,y:0},drawImg:{img:null,sx:0,sy:0,swidth:0,sheight:0,x:0,y:0,width:0,height:0},toolBox:{disable:!0,width:e,height:t,x:0,y:0,boxMove:{start:{x:0,y:0},moveTo:{x:0,y:0}}},dropImg:{active:!1,pageX:0,pageY:0,params:{}},rotateImg:{angle:0},rotateControl:{active:!1,start:{x:0,y:0},position:100},scaleImg:{rate:0,params:{}},controlBox:{disable:!0,btnName:"",start:{x:0,y:0,width:0,height:0}},selectBox:!1,selectBoxColor:"rgba(0,0,0,0.6)",isFlipHorizontal:!1,isFlipVertically:!1}},mounted(){this.version="3.0.5",!1===this.isModal&&(this.visible=!0,this.$nextTick(()=>{this.$refs.toolBox&&(this.$refs.toolBox.onmousewheel=this.scaleImgWheel,this.$refs.toolBox.addEventListener("DOMMouseScroll",this.scaleImgWheel))}))},methods:{handleOpen(e){let t=e=>{if(this.$refs.toolBox&&(this.$refs.toolBox.onmousewheel=this.scaleImgWheel,this.$refs.toolBox.addEventListener("DOMMouseScroll",this.scaleImgWheel)),!0===this.isModal){!0===this.lockScroll&&(document.body.style.overflowY="hidden");let e=this.$refs.dialogMainModalRef.offsetHeight+200,t=window.innerHeight;this.$refs.mask.style.overflowY=e>t?"scroll":"hidden"}e&&"function"==typeof e&&e()};if(e&&"object"==typeof e&&e.src){if(!e.name)throw new Error("传入参数必须包含:src,name");{let n=new Image;!0===this.crossOrigin&&(n.crossOrigin=this.crossOriginHeader),n.name=e.name,n.style.position="fixed",n.style.top="-5000px",n.style.opacity=0,n.onerror=e=>{console.error("图片加载失败"),this.$emit("error",{index:this.index,event:e,msg:"图片加载失败"}),this.clearCutImageObj()},n.onerror=e=>{throw this.$emit("onImageLoadError",e),new Error("图片加载失败")},n.onload=()=>{if(!0!==n.complete)throw new Error("图片加载失败");this.$emit("onImageLoadComplete",n),this.visible=!0,this.$nextTick(()=>{t(()=>{this.importImgToCanv(n)})})},n.src=e.src,this.cutImageObj=n,document.body.appendChild(n),this.$emit("onChooseImg",e,this.index)}}else this.visible=!0,this.$nextTick(()=>{t()})},handleClose(){this.clearAll(),!0===this.isModal&&(!0===this.lockScroll&&(document.body.style.overflowY="scroll"),this.$nextTick(()=>{this.visible=!1}))},chooseImg(){this.$refs.inputFile.click()},importImgToCanv(e){let t,n=e.height,r=e.width,i=this.boxWidth,o=this.boxHeight,a=l({},this.drawImg);this.fileName=e.name,a.img=e,this.scaleImg.rate=r/n,n<o&&r<i?(t=1,a.x=(i-r)/2,a.y=(o-n)/2):r/n<=i/o?(t=o/n,a.x=(i-r*t)/2):(t=i/r,a.y=(o-n*t)/2),a.swidth=r,a.sheight=n,a.width=r*t,a.height=n*t,a.x=(i-a.width)/2,a.y=(o-a.height)/2,this.drawImg=a,this.printImg(),this.putToolBox()},putImgToCanv(e){let t;if(!e.target.files)return console.error("IE9及以下需要自己传入image对象"),!1;if(t=e.target.files[0]||null,t){this.fileName=t.name;let e=new FileReader;e.readAsDataURL(t),e.onload=n=>{let r=n.target.result,i=document.createElement("img");i.src=r;let o=setInterval(()=>{if(2===e.readyState){if(clearInterval(o),!this.sizeChange&&this.smallToUpload&&i.width<=this.cutWidth&&i.height<=this.cutHeight)return this.handleClose(),t.name=this.changeFileName(t.name,this.fileType),void this.$emit("cutDown",{filename:this.changeFileName(t.name,this.fileType),file:t,index:this.index});let e,n=i.height,r=i.width,a=this.boxWidth,s=this.boxHeight,u=l({},this.drawImg);u.img=i,this.scaleImg.rate=r/n,n<s&&r<a?(e=1,u.x=(a-r)/2,u.y=(s-n)/2):r/n<=a/s?(e=s/n,u.x=(a-r*e)/2):(e=a/r,u.y=(s-n*e)/2),u.swidth=r,u.sheight=n,u.width=r*e,u.height=n*e,u.x=(a-u.width)/2,u.y=(s-u.height)/2,this.drawImg=u,this.printImg(),this.putToolBox()}},200)},this.$emit("onChooseImg",t,this.index)}},putToolBox(){this.toolBox.width!==this.boxWidth/2&&this.toolBox.height!==this.boxHeight/2&&!1!==this.saveCutPosition||(this.toolBox.width=this.cutWidth>this.boxWidth?this.boxWidth:this.cutWidth,this.toolBox.height=this.cutHeight>this.boxHeight?this.boxHeight:this.cutHeight),(0===this.toolBox.x&&0===this.toolBox.y||!1===this.saveCutPosition)&&(this.toolBox.x=this.boxWidth/2-this.toolBox.width/2,this.toolBox.y=this.boxHeight/2-this.toolBox.height/2),this.checkToolBoxOverflow().then(()=>{this.printImg()}),this.drawControlBox(this.toolBox.width,this.toolBox.height,this.toolBox.x,this.toolBox.y)},checkToolBoxOverflow(){return new Promise(e=>{if(!this.toolBoxOverflow){if(this.drawImg.width<this.toolBox.width||this.drawImg.height<this.toolBox.height){const e=this.drawImg.width/this.drawImg.height;this.drawImg.width<this.toolBox.width&&(this.drawImg.width=this.toolBox.width,this.drawImg.height=this.drawImg.width/e),this.drawImg.height<this.toolBox.height&&(this.drawImg.height=this.toolBox.height,this.drawImg.width=this.drawImg.height*e),this.drawImg.x=(this.boxWidth-this.drawImg.width)/2,this.drawImg.y=(this.boxHeight-this.drawImg.height)/2}console.log("this.drawImg.y > this.toolBox.y",this.drawImg.y+this.drawImg.height,this.toolBox.y+this.toolBox.height),this.drawImg.x>this.toolBox.x&&(this.drawImg.x=this.toolBox.x),this.drawImg.x+this.drawImg.width<this.toolBox.x+this.toolBox.width&&(this.drawImg.x=this.toolBox.x+this.toolBox.width-this.drawImg.width),this.drawImg.y>this.toolBox.y&&(this.drawImg.y=this.toolBox.y),this.drawImg.y+this.drawImg.height<this.toolBox.y+this.toolBox.height&&(this.drawImg.y=this.toolBox.y+this.toolBox.height-this.drawImg.height)}e()})},isSupportFileApi:()=>!!(window.File&&window.FileList&&window.FileReader&&window.Blob&&-1===navigator.userAgent.indexOf("Edge")&&-1===navigator.userAgent.indexOf("MSIE")&&-1===navigator.userAgent.indexOf("Trident")),dataURLtoFile(e,t){let n=e.split(","),r=n[0].match(/:(.*?);/)[1],i=atob(n[1]),o=i.length,a=new Uint8Array(o);for(;o--;)a[o]=i.charCodeAt(o);return this.isSupportFileApi()?new File([a],t,{type:r}):"不支持File对象"},clearAll(){let e=this,t=e.$refs.canvas;t.getContext("2d").clearRect(0,0,t.width,t.height);let n=e.$refs.canvasSelectBox;n.getContext("2d").clearRect(0,0,n.width,n.height);let r=e.drawImg.sx,i=e.drawImg.sy;this.drawImg={img:null,sx:r,sy:i,swidth:0,sheight:0,x:0,y:0,width:0,height:0},this.isFlipHorizontal=!1,this.isFlipVertically=!1,this.$refs.inputFile.value="",this.rotateImg.angle=0,this.drawImg.img=null,this.turnReset(),this.clearCutImageObj(),this.$emit("onClearAll",this.index)},clearCutImageObj(){null!==this.cutImageObj&&void 0!==this.cutImageObj&&("function"==typeof this.cutImageObj.remove?this.cutImageObj.remove():this.cutImageObj.removeNode()),this.cutImageObj=null},drawControlBox(e,t,n,r){this.toolBoxOverflow||(e<1&&(e=1),t<1&&(t=1),e>this.drawImg.width&&(e=this.drawImg.width),t>this.drawImg.height&&(t=this.drawImg.height),n<this.drawImg.x&&(n=this.drawImg.x),r<this.drawImg.y&&(r=this.drawImg.y),n>this.drawImg.x+this.drawImg.width-e&&(n=this.drawImg.x+this.drawImg.width-e),r>this.drawImg.y+this.drawImg.height-t&&(r=this.drawImg.y+this.drawImg.height-t)),e>this.boxWidth&&(e=this.boxWidth),t>this.boxHeight&&(t=this.boxHeight),n<0&&(n=0),r<0&&(r=0);let i,o,a=this.$refs.toolBoxControl,s=this.$refs.canvasSelectBox,l=s.getContext("2d");if(l.fillStyle=this.selectBoxColor,l.clearRect(0,0,s.width,s.height),l.fillRect(0,0,s.width,s.height),this.rate&&""!==this.rate){let n=this.rate.split(":")[0]/this.rate.split(":")[1];n>=1?(i=e,o=e/n,o+r>this.drawImg.y+this.drawImg.height&&(o=this.drawImg.y+this.drawImg.height-r,i=o*n)):(i=t*n,o=t)}else i=e,o=t;this.toolBox.width=Math.abs(i),this.toolBox.height=Math.abs(o),a.style.width=Math.abs(i)+"px",a.style.height=Math.abs(o)+"px",this.toolBox.boxMove.moveTo.x=n,this.toolBox.boxMove.moveTo.y=r,i<0&&(n+=i),o<0&&(r+=o),n+this.toolBox.width>this.boxWidth&&(n=this.boxWidth-this.toolBox.width),n<0&&(n=0),r+this.toolBox.height>this.boxHeight&&(r=this.boxHeight-this.toolBox.height),r<0&&(r=0),this.toolBoxPosition.x=n,this.toolBoxPosition.y=r,a.style.left=n+"px",a.style.top=r+"px",l.clearRect(n,r,Math.abs(i),Math.abs(o)),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout(()=>{this.cropPicture(!0)},100)},resetToolBox(){this.toolBox.width<0&&(this.toolBox.boxMove.moveTo.x=this.toolBox.x-this.toolBox.width),this.toolBox.height<0&&(this.toolBox.boxMove.moveTo.y=this.toolBox.y-this.toolBox.height),this.toolBox.width=Math.abs(this.toolBox.width),this.toolBox.height=Math.abs(this.toolBox.height)},toolBoxMouseDown(e){let t=this.$refs.toolBoxControl;this.toolBox.x=parseInt(t.style.left.split("px")[0]),this.toolBox.y=parseInt(t.style.top.split("px")[0]),this.toolBox.disable=!1,this.dropImg.active=!1,this.toolBox.boxMove.start={x:e.pageX,y:e.pageY}},toolBoxMouseMove(e){if(this.dropImg.active&&this.dropImgMove(e),!1===this.toolBox.disable&&!0===this.moveAble){let t=e.pageX-this.toolBox.boxMove.start.x,n=e.pageY-this.toolBox.boxMove.start.y,r=this.toolBox.x+t,i=this.toolBox.y+n;this.drawControlBox(this.toolBox.width,this.toolBox.height,r,i)}},toolBoxMouseLeave(){this.toolBox.disable=!0,this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout(()=>{this.cropPicture(!0)},100),this.resetToolBox()},toolBoxMouseUp(){this.toolBox.x=parseInt(this.toolBoxPosition.x),this.toolBox.y=parseInt(this.toolBoxPosition.y),this.toolBox.disable=!0,this.dropImg.active=!1,this.resetToolBox()},printImg(){if(this.drawImg.img){let e=this.$refs.canvas,t=e.getContext("2d");t.font="18px bold 黑体",t.fillStyle="#ff0",t.textAlign="center",t.textBaseline="middle",t.save(),t.clearRect(0,0,e.width,e.height),t.translate(this.drawImg.x+this.drawImg.width/2,this.drawImg.y+this.drawImg.height/2),t.rotate(this.rotateImg.angle*Math.PI/180),t.translate(-(this.drawImg.x+this.drawImg.width/2),-(this.drawImg.y+this.drawImg.height/2)),t.translate(this.drawImg.x,this.drawImg.y),t.scale(this.isFlipHorizontal?-1:1,this.isFlipVertically?-1:1),t.drawImage(this.drawImg.img,this.drawImg.sx,this.drawImg.sy,this.drawImg.swidth,this.drawImg.sheight,this.isFlipHorizontal?-this.drawImg.width:0,this.isFlipVertically?-this.drawImg.height:0,this.drawImg.width,this.drawImg.height),t.translate(-this.drawImg.x,this.drawImg.y),t.restore(),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout(()=>{this.cropPicture(!0)},100)}},dropImgOn(e){!0===this.imgMove&&(this.dropImg.active=!0,this.dropImg.params=l({},this.drawImg),this.dropImg.pageX=e.pageX,this.dropImg.pageY=e.pageY)},dropImgOff(){this.dropImg.active=!1,this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout(()=>{this.cropPicture(!0)},100)},dropImgMove(e){if(this.dropImg.active&&this.drawImg.img){let t=l({},this.drawImg);t.x=this.dropImg.params.x-(this.dropImg.pageX-e.pageX),t.y=this.dropImg.params.y-(this.dropImg.pageY-e.pageY),this.toolBoxOverflow||(t.x>this.toolBox.x&&(t.x=this.toolBox.x),t.x<this.toolBox.x+this.toolBox.width-t.width&&(t.x=this.toolBox.x+this.toolBox.width-t.width),t.y>this.toolBox.y&&(t.y=this.toolBox.y),t.y<this.toolBox.y+this.toolBox.height-t.height&&(t.y=this.toolBox.y+this.toolBox.height-t.height)),this.drawImg=t,this.printImg(),e.stopPropagation()}},scaleReset(){this.drawImg.width=this.drawImg.swidth,this.drawImg.height=this.drawImg.sheight,this.printImg()},scaleImgWheel(e){if(this.drawImg.img&&!0===this.scaleAble){let t,n=e||window.event;n.wheelDelta?t=-n.wheelDelta/40:n.detail&&(t=n.detail);let r=50;this.drawImg.x=this.drawImg.width-9*t>r?this.drawImg.x+3*t:this.drawImg.x,this.drawImg.y=this.drawImg.width-9*t>r?this.drawImg.y+3*t:this.drawImg.y,this.drawImg.width=this.drawImg.width-9*t>r?this.drawImg.width-9*t:r,this.drawImg.height=this.drawImg.width/this.scaleImg.rate,this.checkToolBoxOverflow().then(()=>{this.printImg(),this.onPrintImgTimmer&&clearTimeout(this.onPrintImgTimmer),this.onPrintImgTimmer=setTimeout(()=>{this.cropPicture(!0)},100)})}return e.preventDefault(),e.returnValue=!1,!1},flipHorizontal(){this.drawImg.img&&(0==this.isFlipHorizontal?this.isFlipHorizontal=!0:this.isFlipHorizontal=!1,this.printImg())},flipVertically(){this.drawImg.img&&(0==this.isFlipVertically?this.isFlipVertically=!0:this.isFlipVertically=!1,this.printImg())},turnImg(e){let t=this.rotateImg.angle+e;t>=-180&&t<=180&&(this.rotateImg.angle=t,this.rotateControl.position=t/180*100+100,this.printImg("rotate"))},turnReset(){this.rotateImg.angle=0,this.rotateControl.position=100,this.printImg("rotate")},controlBtnMouseDown(e,t){this.controlBox.disable=!1,this.controlBox.btnName=t,this.controlBox.start.x=e.clientX,this.controlBox.start.y=e.clientY,this.controlBox.start.width=this.toolBox.width,this.controlBox.start.height=this.toolBox.height,e.stopPropagation()},controlBtnMouseUp(e){this.controlBox.disable=!0,this.dropImgOff(),this.resetToolBox(),this.toolBoxMouseUp(),e.stopPropagation()},controlBtnMouseMove(e){if(!1===this.controlBox.disable){let t,n,r=e.clientX-this.controlBox.start.x,i=e.clientY-this.controlBox.start.y;if("leftUp"==this.controlBox.btnName){if(this.rate){let e=this.rate.split(":")[0]/this.rate.split(":")[1];e>=1?(t=this.toolBox.x+r,n=this.toolBox.y+r/e):(t=this.toolBox.x+i*e,n=this.toolBox.y+i)}else t=this.toolBox.x+r,n=this.toolBox.y+i;this.toolBox.width=this.controlBox.start.width-r,this.toolBox.height=this.controlBox.start.height-i}if("rightUp"==this.controlBox.btnName){if(this.rate){let e=this.rate.split(":")[0]/this.rate.split(":")[1];e>=1?(t=this.toolBox.x,n=this.toolBox.y-r/e):(t=this.toolBox.x,n=this.toolBox.y+i)}else t=this.toolBox.x,n=this.toolBox.y+i;this.toolBox.width=this.controlBox.start.width+r,this.toolBox.height=this.controlBox.start.height-i}if("rightDown"==this.controlBox.btnName&&(t=this.toolBox.x,n=this.toolBox.y,this.toolBox.width=this.controlBox.start.width+r,this.toolBox.height=this.controlBox.start.height+i),"leftDown"==this.controlBox.btnName){if(this.rate){let e=this.rate.split(":")[0]/this.rate.split(":")[1];e>=1?(t=this.toolBox.x+r,n=this.toolBox.y):(t=this.toolBox.x+-i*e,n=this.toolBox.y)}else t=this.toolBox.x+r,n=this.toolBox.y;this.toolBox.width=this.controlBox.start.width-r,this.toolBox.height=this.controlBox.start.height+i}"topCenter"==this.controlBox.btnName&&(t=this.toolBox.x,n=this.toolBox.y+i,this.toolBox.width=this.controlBox.start.width,this.toolBox.height=this.controlBox.start.height-i),"downCenter"==this.controlBox.btnName&&(t=this.toolBox.x,n=this.toolBox.y,this.toolBox.width=this.controlBox.start.width,this.toolBox.height=this.controlBox.start.height+i),"leftCenter"==this.controlBox.btnName&&(t=this.toolBox.x+r,n=this.toolBox.y,this.toolBox.width=this.controlBox.start.width-r,this.toolBox.height=this.controlBox.start.height),"rightCenter"==this.controlBox.btnName&&(t=this.toolBox.x,n=this.toolBox.y,this.toolBox.width=this.controlBox.start.width+r,this.toolBox.height=this.controlBox.start.height),this.drawControlBox(this.toolBox.width,this.toolBox.height,t,n)}e.stopPropagation()},changeFileName(e,t){let n=e.lastIndexOf(".");return e.substr(0,n+1)+("jpeg"===t?"jpg":t)},cropPicture(e){let t=this;if(this.drawImg.img){let n=this.$refs.canvas;if(this.WatermarkText&&!e){let e=n.getContext("2d");e.font=this.WatermarkTextFont,e.fillStyle=this.WatermarkTextColor,e.textAlign="right",e.textBaseline="bottom",e.fillText(this.WatermarkText,this.toolBox.x+this.toolBox.width*this.WatermarkTextX,this.toolBox.y+this.toolBox.height*this.WatermarkTextY)}let r=new Image;!0===this.crossOrigin&&(r.crossOrigin=this.crossOriginHeader),r.src=n.toDataURL(`image/${this.fileType}`,t.quality),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:(e,r,i)=>{window.atob?setTimeout(()=>{let o,a=atob(n.toDataURL(r,i).split(",")[1]),s=a.length,l=new Uint8Array(s);for(let e=0;e<s;e++)l[e]=a.charCodeAt(e);try{o=new Blob([l],{type:`image/${t.fileType}`})}catch(pp){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"==pp.name&&window.BlobBuilder){let e=new(0,window.BlobBuilder);e.append(l.buffer),o=e.getBlob(`image/${t.fileType}`)}"InvalidStateError"==pp.name&&(o=new Blob([l.buffer],{type:`image/${t.fileType}`}))}e(o)},200):e(!1,{type:`image/${t.fileType}`})}}),n.toBlob(n=>{if(n){let i=new FileReader;i.readAsDataURL(n),i.onload=()=>{let n=setInterval(()=>{if(2==i.readyState){clearInterval(n);let i=document.createElement("canvas"),o=i.getContext("2d");if(1==t.originalGraph){let e=t.drawImg.width/t.drawImg.swidth,n=t.toolBox.width/e,r=t.toolBox.height/e;i.width=n,i.height=r;let a=(t.toolBox.x-t.drawImg.x)/e,s=(t.toolBox.y-t.drawImg.y)/e,l=t.drawImg.swidth,u=t.drawImg.sheight;o.translate(-a,-s),o.drawImage(t.drawImg.img,0,0,l,u)}else{i.width=t.toolBox.width,i.height=t.toolBox.height;let e=t.toolBox;if(t.rate){let n=t.rate.split(":")[0]/t.rate.split(":")[1];t.rate.split(":")[0]>=t.rate.split(":")[1]?o.drawImage(r,e.x,e.y,e.width,e.width*n,0,0,e.width,e.width*n):o.drawImage(r,e.x,e.y,e.width,e.width/n,0,0,e.width,e.width/n)}else o.drawImage(r,e.x,e.y,e.width,e.height,0,0,e.width,e.height)}i.toBlob(n=>{let r=t.changeFileName(t.fileName,t.fileType);e?t.previewMode&&t.$emit("onPrintImg",{index:t.index,fileName:r,blob:n,file:t.dataURLtoFile(i.toDataURL(`image/${t.fileType}`,t.quality),r),dataURL:i.toDataURL(`image/${t.fileType}`,t.quality)}):(t.handleClose(),t.$emit("cutDown",{index:t.index,fileName:r,blob:n,file:t.dataURLtoFile(i.toDataURL(`image/${t.fileType}`,t.quality),r),dataURL:i.toDataURL(`image/${t.fileType}`,t.quality)}))},`image/${t.fileType}`,t.quality)}},200)}}else{let n=document.createElement("canvas");n.width=t.toolBox.width,n.height=t.toolBox.height;let i=n.getContext("2d"),o=t.toolBox;if(t.rate){let e=t.rate.split(":")[0]/t.rate.split(":")[1];i.drawImage(r,o.x,o.y,o.width,o.width*e,0,0,o.width,o.width*e)}else i.drawImage(r,o.x,o.y,o.width,o.height,0,0,o.width,o.height);let a=t.changeFileName(t.fileName,t.fileType);e?t.$emit("onPrintImg",{fileName:a,dataURL:n.toDataURL(`image/${t.fileType}`,t.quality)}):(t.handleClose(),t.$emit("cutDown",{fileName:a,dataURL:n.toDataURL(`image/${t.fileType}`,t.quality)}))}},`image/${t.fileType}`,t.quality)}else e||(console.warn("No picture selected"),t.$emit("error",{err:1,msg:"No picture selected"}))},scrollBarControlMove(e){if(this.rotateControl.active){let t=e.pageX-this.rotateControl.start.x,n=this.rotateControl.start.position+t;n<=0&&(n=0),n>=200&&(n=200),this.rotateControl.position=n,this.rotateImg.angle=(n-100)/100*180,this.printImg()}},scrollBarControlOn(e){this.rotateControl.active=!0,this.rotateControl.start.x=e.pageX,this.rotateControl.start.y=e.pageY,this.rotateControl.start.position=this.rotateControl.position},scrollBarControlOff(){this.rotateControl.active=!1}},computed:{showToolBoxWidth(){let e;return e=this.originalGraph?this.toolBox.width/(this.drawImg.width/this.drawImg.swidth):this.toolBox.width,Number(e).toFixed(0)},showToolBoxHeight(){let e;return e=this.originalGraph?this.toolBox.height/(this.drawImg.width/this.drawImg.swidth):this.toolBox.height,Number(e).toFixed(0)},showToolBoxX(){let e;return e=this.toolBoxPosition.x,Number(e).toFixed(0)},showToolBoxY(){let e;return e=this.toolBoxPosition.y,Number(e).toFixed(0)}}},Wo={class:"toolMain"},Vo={key:0,class:"tool-title"},Go={class:"tips"},qo={key:0,class:"dockBtn"},Ko={key:4,class:"dockBtnScrollBar"},Yo={class:"toolBoxControlBox"},Xo={class:"controlBox"},Jo={class:"selectArea"},Zo={class:"copyright"},Qo={key:0,target:"_blank",href:"https://github.com/acccccccb/vue-img-cutter",rel:"nofollow"},ea=["width","height"],ta=["width","height"],na={class:"i-dialog-footer",style:{height:"40px"}},ra=["accept"],ia={key:0,class:"btn btn-primary btn-primary-plain"},oa={class:"btn-group fr"},aa=["disabled"],sa=V($o,[["render",function(e,t,n,r,i,o){return G(),q("div",null,[!0===n.showChooseBtn&&!0===n.isModal?(G(),q("div",{key:0,onClick:t[0]||(t[0]=(...e)=>o.handleOpen&&o.handleOpen(...e))},[K(e.$slots,"openImgCutter",{},void 0,!0),K(e.$slots,"open",{},void 0,!0)])):Y("",!0),e.$slots.openImgCutter||e.$slots.open||!0!==n.isModal?Y("",!0):(G(),q("button",{key:1,type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=(...e)=>o.handleOpen&&o.handleOpen(...e))},X(n.label),1)),J(Z,{name:"fade"},{default:Q(()=>[i.visible?(G(),q("div",{key:0,class:ee(!0===n.isModal?"mask vue-img-cutter":""),ref:"mask"},[i.visible?(G(),q("div",{key:0,class:ee(!0===n.isModal?"dialogBoxModal":"dialogBox")},[J(Z,{name:"fade","enter-class":"fade-in-enter","enter-active-class":"fade-in-active","leave-class":"fade-out-enter","leave-active-class":"fade-out-active"},{default:Q(()=>[te("div",{ref:"dialogMainModalRef",class:ee(!0===n.isModal?"dialogMainModal":"dialogMain"),style:ne("width:"+(!0===n.isModal?n.boxWidth+32:n.boxWidth)+"px")},[te("div",Wo,[!0===n.isModal?(G(),q("div",Vo,[t[37]||(t[37]=re(" 图片裁剪 ",-1)),te("span",{class:"closeIcon",onClick:t[2]||(t[2]=(...e)=>o.handleClose&&o.handleClose(...e))},"×")])):Y("",!0),te("div",{ref:"toolBox",style:ne("height:"+n.boxHeight+"px;width:"+n.boxWidth+"px"),onMousemove:t[30]||(t[30]=(...e)=>o.controlBtnMouseMove&&o.controlBtnMouseMove(...e)),onMouseup:t[31]||(t[31]=(...e)=>o.controlBtnMouseUp&&o.controlBtnMouseUp(...e)),onMouseleave:t[32]||(t[32]=(...e)=>o.controlBtnMouseUp&&o.controlBtnMouseUp(...e)),class:"toolBox"},[ie(te("div",Go,[te("div",{class:"btn btn-warning btn-xs",onClick:t[3]||(t[3]=(...e)=>o.chooseImg&&o.chooseImg(...e))},X(n.label),1)],512),[[oe,!i.drawImg.img&&!0===n.showChooseBtn]]),1==n.tool?ie((G(),q("div",{key:0,class:"dockMain",style:ne("background:"+n.toolBgc),onMouseenter:t[14]||(t[14]=(...e)=>o.dropImgOff&&o.dropImgOff(...e))},[n.rate?(G(),q("div",qo,[K(e.$slots,"ratio",{},()=>[t[38]||(t[38]=re(" Ratio: ",-1))],!0),re(" "+X(n.rate),1)])):Y("",!0),te("div",{class:"dockBtn",onClick:t[4]||(t[4]=(...e)=>o.scaleReset&&o.scaleReset(...e))},[K(e.$slots,"scaleReset",{},()=>[t[39]||(t[39]=re(" Scale: ",-1))],!0),re(" "+X(i.drawImg.swidth>0?(i.drawImg.width/i.drawImg.swidth).toFixed(2):"-"),1)]),!1===n.originalGraph?(G(),q("div",{key:1,onClick:t[5]||(t[5]=e=>o.turnImg(-90)),class:"dockBtn"},[K(e.$slots,"turnLeft",{},()=>[t[40]||(t[40]=re(" ↳ ",-1))],!0)])):Y("",!0),!1===n.originalGraph?(G(),q("div",{key:2,onClick:t[6]||(t[6]=e=>o.turnImg(90)),class:"dockBtn"},[K(e.$slots,"turnRight",{},()=>[t[41]||(t[41]=re(" ↲ ",-1))],!0)])):Y("",!0),!1===n.originalGraph?(G(),q("div",{key:3,onClick:t[7]||(t[7]=e=>o.turnReset()),class:"dockBtn"},[K(e.$slots,"reset",{},()=>[t[42]||(t[42]=re(" ↻ ",-1))],!0)])):Y("",!0),!1===n.originalGraph?(G(),q("div",Ko,[te("div",{ref:"dockBtnScrollControl",onMousemove:t[8]||(t[8]=(...e)=>o.scrollBarControlMove&&o.scrollBarControlMove(...e)),onMousedown:t[9]||(t[9]=(...e)=>o.scrollBarControlOn&&o.scrollBarControlOn(...e)),onMouseleave:t[10]||(t[10]=(...e)=>o.scrollBarControlOff&&o.scrollBarControlOff(...e)),onMouseup:t[11]||(t[11]=(...e)=>o.scrollBarControlOff&&o.scrollBarControlOff(...e)),style:ne("left:"+i.rotateControl.position+"px"),class:"scrollBarControl"},null,36),1==i.rotateControl.active?(G(),q("div",{key:0,class:"scrollBarText",style:ne("left:"+i.rotateControl.position+"px")},X(i.rotateImg.angle.toFixed(0)+"°"),5)):Y("",!0)])):Y("",!0),!1===n.originalGraph?(G(),q("div",{key:5,onClick:t[12]||(t[12]=(...e)=>o.flipHorizontal&&o.flipHorizontal(...e)),class:"dockBtn"},[K(e.$slots,"flipHorizontal",{},()=>[t[43]||(t[43]=re(" ⇆ ",-1))],!0)])):Y("",!0),!1===n.originalGraph?(G(),q("div",{key:6,onClick:t[13]||(t[13]=(...e)=>o.flipVertically&&o.flipVertically(...e)),class:"dockBtn"},[K(e.$slots,"flipVertically",{},()=>[t[44]||(t[44]=re(" ⇅ ",-1))],!0)])):Y("",!0)],36)),[[oe,i.drawImg.img&&!0!==i.dropImg.active&&1==i.controlBox.disable&&1==i.toolBox.disable]]):Y("",!0),ie(te("div",{ref:"toolBoxControl",onMousedown:t[23]||(t[23]=(...e)=>o.toolBoxMouseDown&&o.toolBoxMouseDown(...e)),onMouseup:t[24]||(t[24]=(...e)=>o.toolBoxMouseUp&&o.toolBoxMouseUp(...e)),onMousemove:t[25]||(t[25]=(...e)=>o.toolBoxMouseMove&&o.toolBoxMouseMove(...e)),onMouseleave:t[26]||(t[26]=(...e)=>o.toolBoxMouseLeave&&o.toolBoxMouseLeave(...e)),class:"toolBoxControl",style:ne({pointerEvents:n.moveAble?"auto":"none"})},[te("div",Yo,[te("div",Xo,[t[45]||(t[45]=te("div",{class:"controlBoxInnerLine controlBoxInnerLineTop"},null,-1)),t[46]||(t[46]=te("div",{class:"controlBoxInnerLine controlBoxInnerLineBottom"},null,-1)),t[47]||(t[47]=te("div",{class:"controlBoxInnerLine controlBoxInnerLineLeft"},null,-1)),t[48]||(t[48]=te("div",{class:"controlBoxInnerLine controlBoxInnerLineRight"},null,-1)),te("div",Jo," 宽:"+X(o.showToolBoxWidth)+" 高:"+X(o.showToolBoxHeight)+" (x:"+X(o.showToolBoxX)+",y:"+X(o.showToolBoxY)+") ",1),!0===n.sizeChange?(G(),q("div",{key:0,"data-name":"leftUp",onMousedown:t[15]||(t[15]=e=>o.controlBtnMouseDown(e,"leftUp")),class:"leftUp controlBtn"},null,32)):Y("",!0),!0===n.sizeChange?(G(),q("div",{key:1,"data-name":"leftDown",onMousedown:t[16]||(t[16]=e=>o.controlBtnMouseDown(e,"leftDown")),class:"leftDown controlBtn"},null,32)):Y("",!0),!0===n.sizeChange?(G(),q("div",{key:2,"data-name":"rightUp",onMousedown:t[17]||(t[17]=e=>o.controlBtnMouseDown(e,"rightUp")),class:"rightUp controlBtn"},null,32)):Y("",!0),!0===n.sizeChange?(G(),q("div",{key:3,"data-name":"rightDown",onMousedown:t[18]||(t[18]=e=>o.controlBtnMouseDown(e,"rightDown")),class:"rightDown controlBtn"},null,32)):Y("",!0),!0===n.sizeChange&&!n.rate&&i.toolBox.width>20?(G(),q("div",{key:4,"data-name":"topCenter",onMousedown:t[19]||(t[19]=e=>o.controlBtnMouseDown(e,"topCenter")),class:"topCenter controlBtn"},null,32)):Y("",!0),!0===n.sizeChange&&!n.rate&&i.toolBox.width>20?(G(),q("div",{key:5,"data-name":"downCenter",onMousedown:t[20]||(t[20]=e=>o.controlBtnMouseDown(e,"downCenter")),class:"downCenter controlBtn"},null,32)):Y("",!0),!0===n.sizeChange&&!n.rate&&i.toolBox.height>20?(G(),q("div",{key:6,"data-name":"leftCenter",onMousedown:t[21]||(t[21]=e=>o.controlBtnMouseDown(e,"leftCenter")),class:"leftCenter controlBtn"},null,32)):Y("",!0),!0===n.sizeChange&&!n.rate&&i.toolBox.height>20?(G(),q("div",{key:7,"data-name":"rightCenter",onMousedown:t[22]||(t[22]=e=>o.controlBtnMouseDown(e,"rightCenter")),class:"rightCenter controlBtn"},null,32)):Y("",!0)]),t[49]||(t[49]=te("div",{class:"toolBoxControlLine toolBoxControlLineItem-1"},null,-1)),t[50]||(t[50]=te("div",{class:"toolBoxControlLine toolBoxControlLineItem-2"},null,-1)),t[51]||(t[51]=te("div",{class:"toolBoxControlLine toolBoxControlLineItem-3"},null,-1)),t[52]||(t[52]=te("div",{class:"toolBoxControlLine toolBoxControlLineItem-4"},null,-1))])],36),[[oe,null!=i.drawImg.img]]),te("div",Zo,[n.DoNotDisplayCopyright?Y("",!0):(G(),q("a",Qo," vue-img-cutter "+X(i.version),1))]),te("canvas",{class:"canvasSelectBox",ref:"canvasSelectBox",width:n.boxWidth,onMousedown:t[27]||(t[27]=(...e)=>o.dropImgOn&&o.dropImgOn(...e)),onMouseup:t[28]||(t[28]=(...e)=>o.dropImgOff&&o.dropImgOff(...e)),onMousemove:t[29]||(t[29]=(...e)=>o.dropImgMove&&o.dropImgMove(...e)),height:n.boxHeight},null,40,ea),te("canvas",{class:"canvas",ref:"canvas",width:n.boxWidth,height:n.boxHeight},null,8,ta)],36)]),te("div",na,[te("input",{onChange:t[33]||(t[33]=(...e)=>o.putImgToCanv&&o.putImgToCanv(...e)),ref:"inputFile",type:"file",accept:n.accept,style:{width:"1px",height:"1px",border:"none",opacity:"0"}},null,40,ra),te("span",{onClick:t[34]||(t[34]=(...e)=>o.chooseImg&&o.chooseImg(...e))},[K(e.$slots,"choose",{},()=>[!0===n.showChooseBtn?(G(),q("div",ia,X(n.label),1)):Y("",!0)],!0)]),te("div",oa,[te("span",{onClick:t[35]||(t[35]=(...e)=>o.handleClose&&o.handleClose(...e))},[K(e.$slots,"cancel",{},()=>[t[53]||(t[53]=te("button",{type:"button",class:"btn btn-default"},"取消",-1))],!0)]),te("span",{onClick:t[36]||(t[36]=e=>o.cropPicture(!1))},[K(e.$slots,"confirm",{},()=>[te("button",{type:"button",class:"btn btn-primary",style:{"margin-left":"15px"},disabled:!i.drawImg.img}," 确定 ",8,aa)],!0)])])])],6)]),_:3}),t[54]||(t[54]=te("div",{style:{clear:"both"}},null,-1))],2)):Y("",!0)],2)):Y("",!0)]),_:3})])}],["__scopeId","data-v-0bff7403"]]);function la(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ua,ca={exports:{}};function fa(){return ua||(ua=1,function(){if(function(e){e.version="0.18.5";var t=1200,n=1252,r=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],i={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},o=function(e){-1!=r.indexOf(e)&&(n=i[0]=e)},a=function(e){t=e,o(e)};function s(){a(1200),o(1252)}function l(e){for(var t=[],n=0,r=e.length;n<r;++n)t[n]=e.charCodeAt(n);return t}var u=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return 255==t&&254==n?function(e){for(var t=[],n=0;n<e.length>>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n)+(e.charCodeAt(2*n+1)<<8));return t.join("")}(e.slice(2)):254==t&&255==n?function(e){for(var t=[],n=0;n<e.length>>1;++n)t[n]=String.fromCharCode(e.charCodeAt(2*n+1)+(e.charCodeAt(2*n)<<8));return t.join("")}(e.slice(2)):65279==t?e.slice(1):e},c=function(e){return String.fromCharCode(e)},f=function(e){return String.fromCharCode(e)},d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function h(e){for(var t="",n=0,r=0,i=0,o=0,a=0,s=0,l=0,u=0;u<e.length;)o=(n=e.charCodeAt(u++))>>2,a=(3&n)<<4|(r=e.charCodeAt(u++))>>4,s=(15&r)<<2|(i=e.charCodeAt(u++))>>6,l=63&i,isNaN(r)?s=l=64:isNaN(i)&&(l=64),t+=d.charAt(o)+d.charAt(a)+d.charAt(s)+d.charAt(l);return t}function p(e){var t="",n=0,r=0,i=0,o=0,a=0,s=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)n=d.indexOf(e.charAt(l++))<<2|(o=d.indexOf(e.charAt(l++)))>>4,t+=String.fromCharCode(n),r=(15&o)<<4|(a=d.indexOf(e.charAt(l++)))>>2,64!==a&&(t+=String.fromCharCode(r)),i=(3&a)<<6|(s=d.indexOf(e.charAt(l++))),64!==s&&(t+=String.fromCharCode(i));return t}var g=function(){return"undefined"!=typeof Buffer&&!1}();function v(e){return"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}!function(){if("undefined"!=typeof Buffer){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch(t){e=!0}e||Buffer.from.bind(Buffer)}}();var m=function(e){return e.split("").map(function(e){return 255&e.charCodeAt(0)})};function y(e){if("undefined"==typeof ArrayBuffer)return m(e);for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r!=e.length;++r)n[r]=255&e.charCodeAt(r);return t}function b(e){if(Array.isArray(e))return e.map(function(e){return String.fromCharCode(e)}).join("");for(var t=[],n=0;n<e.length;++n)t[n]=String.fromCharCode(e[n]);return t.join("")}function w(e){if("undefined"==typeof ArrayBuffer)throw new Error("Unsupported");if(e instanceof ArrayBuffer)return w(new Uint8Array(e));for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t}var x=function(e){if("undefined"!=typeof Uint8Array){var t=0,n=0;for(t=0;t<e.length;++t)n+=e[t].length;var r=new Uint8Array(n),i=0;for(t=0,n=0;t<e.length;n+=i,++t)if(i=e[t].length,e[t]instanceof Uint8Array)r.set(e[t],n);else{if("string"==typeof e[t])throw"wtf";r.set(new Uint8Array(e[t]),n)}return r}return[].concat.apply([],e.map(function(e){return Array.isArray(e)?e:[].slice.call(e)}))},C=/\u0000/g,E=/[\u0001-\u0006]/g;function k(e){for(var t="",n=e.length-1;n>=0;)t+=e.charAt(n--);return t}function S(e,t){var n=""+e;return n.length>=t?n:rt("0",t-n.length)+n}function _(e,t){var n=""+e;return n.length>=t?n:rt(" ",t-n.length)+n}function D(e,t){var n=""+e;return n.length>=t?n:n+rt(" ",t-n.length)}var A=Math.pow(2,32);function T(e,t){return e>A||e<-A?function(e,t){var n=""+Math.round(e);return n.length>=t?n:rt("0",t-n.length)+n}(e,t):function(e,t){var n=""+e;return n.length>=t?n:rt("0",t-n.length)+n}(Math.round(e),t)}function O(e,t){return t=t||0,e.length>=7+t&&103==(32|e.charCodeAt(t))&&101==(32|e.charCodeAt(t+1))&&110==(32|e.charCodeAt(t+2))&&101==(32|e.charCodeAt(t+3))&&114==(32|e.charCodeAt(t+4))&&97==(32|e.charCodeAt(t+5))&&108==(32|e.charCodeAt(t+6))}var P=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],I=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],F={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},B={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},L={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function N(e,t,n){for(var r=e<0?-1:1,i=e*r,o=0,a=1,s=0,l=1,u=0,c=0,f=Math.floor(i);u<t&&(s=(f=Math.floor(i))*a+o,c=f*u+l,!(i-f<5e-8));)i=1/(i-f),o=a,a=s,l=u,u=c;if(c>t&&(u>t?(c=l,s=o):(c=u,s=a)),!n)return[0,r*s,c];var d=Math.floor(r*s/c);return[d,r*s-d*c,c]}function M(e,t,n){if(e>2958465||e<0)return null;var r=0|e,i=Math.floor(86400*(e-r)),o=0,a=[],s={D:r,T:i,u:86400*(e-r)-i,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(r+=1462),s.u>.9999&&(s.u=0,86400==++i&&(s.T=i=0,++r,++s.D)),60===r)a=n?[1317,10,29]:[1900,2,29],o=3;else if(0===r)a=n?[1317,8,29]:[1900,1,0],o=6;else{r>60&&--r;var l=new Date(1900,0,1);l.setDate(l.getDate()+r-1),a=[l.getFullYear(),l.getMonth()+1,l.getDate()],o=l.getDay(),r<60&&(o=(o+6)%7),n&&(o=function(e,t){t[0]-=581;var n=e.getDay();return e<60&&(n=(n+6)%7),n}(l,a))}return s.y=a[0],s.m=a[1],s.d=a[2],s.S=i%60,i=Math.floor(i/60),s.M=i%60,i=Math.floor(i/60),s.H=i,s.q=o,s}var R=new Date(1899,11,31,0,0,0),j=R.getTime(),H=new Date(1900,2,1,0,0,0);function z(e,t){var n=e.getTime();return t?n-=1262304e5:e>=H&&(n+=864e5),(n-(j+6e4*(e.getTimezoneOffset()-R.getTimezoneOffset())))/864e5}function U(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function W(e){var t,n=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return t=n>=-4&&n<=-1?e.toPrecision(10+n):Math.abs(n)<=9?function(e){var t=e<0?12:11,n=U(e.toFixed(12));return n.length<=t||(n=e.toPrecision(10)).length<=t?n:e.toExponential(5)}(e):10===n?e.toFixed(10).substr(0,12):function(e){var t=U(e.toFixed(11));return t.length>(e<0?12:11)||"0"===t||"-0"===t?e.toPrecision(6):t}(e),U(function(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(t.toUpperCase()))}function V(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):W(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return fe(14,z(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function G(e,t,n,r){var i,o="",a=0,s=0,l=n.y,u=0;switch(e){case 98:l=n.y+543;case 121:switch(t.length){case 1:case 2:i=l%100,u=2;break;default:i=l%1e4,u=4}break;case 109:switch(t.length){case 1:case 2:i=n.m,u=t.length;break;case 3:return I[n.m-1][1];case 5:return I[n.m-1][0];default:return I[n.m-1][2]}break;case 100:switch(t.length){case 1:case 2:i=n.d,u=t.length;break;case 3:return P[n.q][0];default:return P[n.q][1]}break;case 104:switch(t.length){case 1:case 2:i=1+(n.H+11)%12,u=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:i=n.H,u=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:i=n.M,u=t.length;break;default:throw"bad minute format: "+t}break;case 115:if("s"!=t&&"ss"!=t&&".0"!=t&&".00"!=t&&".000"!=t)throw"bad second format: "+t;return 0!==n.u||"s"!=t&&"ss"!=t?(s=r>=2?3===r?1e3:100:1===r?10:1,(a=Math.round(s*(n.S+n.u)))>=60*s&&(a=0),"s"===t?0===a?"0":""+a/s:(o=S(a,2+r),"ss"===t?o.substr(0,2):"."+o.substr(2,t.length-1))):S(n.S,t.length);case 90:switch(t){case"[h]":case"[hh]":i=24*n.D+n.H;break;case"[m]":case"[mm]":i=60*(24*n.D+n.H)+n.M;break;case"[s]":case"[ss]":i=60*(60*(24*n.D+n.H)+n.M)+Math.round(n.S+n.u);break;default:throw"bad abstime format: "+t}u=3===t.length?1:2;break;case 101:i=l,u=1}return u>0?S(i,u):""}function q(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(n.length>0?",":"")+e.substr(t,3);return n}var K=/%/g;function Y(e,t){var n,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+Y(e,-t);var i=e.indexOf(".");-1===i&&(i=e.indexOf("E"));var o=Math.floor(Math.log(t)*Math.LOG10E)%i;if(o<0&&(o+=i),-1===(n=(t/Math.pow(10,o)).toPrecision(r+1+(i+o)%i)).indexOf("e")){var a=Math.floor(Math.log(t)*Math.LOG10E);for(-1===n.indexOf(".")?n=n.charAt(0)+"."+n.substr(1)+"E+"+(a-n.length+o):n+="E+"+(a-o);"0."===n.substr(0,2);)n=(n=n.charAt(0)+n.substr(2,i)+"."+n.substr(2+i)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(e,t,n,r){return t+n+r.substr(0,(i+o)%i)+"."+r.substr(o)+"E"})}else n=t.toExponential(r);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}var X=/# (\?+)( ?)\/( ?)(\d+)/,J=/^#*0*\.([0#]+)/,Z=/\).*[0#]/,Q=/\(###\) ###\\?-####/;function ee(e){for(var t,n="",r=0;r!=e.length;++r)switch(t=e.charCodeAt(r)){case 35:break;case 63:n+=" ";break;case 48:n+="0";break;default:n+=String.fromCharCode(t)}return n}function te(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n}function ne(e,t){var n=e-Math.floor(e),r=Math.pow(10,t);return t<(""+Math.round(n*r)).length?0:Math.round(n*r)}function re(e,t,n){if(40===e.charCodeAt(0)&&!t.match(Z)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?re("n",r,n):"("+re("n",r,-n)+")"}if(44===t.charCodeAt(t.length-1))return function(e,t,n){for(var r=t.length-1;44===t.charCodeAt(r-1);)--r;return ae(e,t.substr(0,r),n/Math.pow(10,3*(t.length-r)))}(e,t,n);if(-1!==t.indexOf("%"))return function(e,t,n){var r=t.replace(K,""),i=t.length-r.length;return ae(e,r,n*Math.pow(10,2*i))+rt("%",i)}(e,t,n);if(-1!==t.indexOf("E"))return Y(t,n);if(36===t.charCodeAt(0))return"$"+re(e,t.substr(" "==t.charAt(1)?2:1),n);var i,o,a,s,l=Math.abs(n),u=n<0?"-":"";if(t.match(/^00+$/))return u+T(l,t.length);if(t.match(/^[#?]+$/))return"0"===(i=T(n,0))&&(i=""),i.length>t.length?i:ee(t.substr(0,t.length-i.length))+i;if(o=t.match(X))return function(e,t,n){var r=parseInt(e[4],10),i=Math.round(t*r),o=Math.floor(i/r),a=i-o*r,s=r;return n+(0===o?"":""+o)+" "+(0===a?rt(" ",e[1].length+1+e[4].length):_(a,e[1].length)+e[2]+"/"+e[3]+S(s,e[4].length))}(o,l,u);if(t.match(/^#+0+$/))return u+T(l,t.length-t.indexOf("0"));if(o=t.match(J))return i=te(n,o[1].length).replace(/^([^\.]+)$/,"$1."+ee(o[1])).replace(/\.$/,"."+ee(o[1])).replace(/\.(\d*)$/,function(e,t){return"."+t+rt("0",ee(o[1]).length-t.length)}),-1!==t.indexOf("0.")?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),o=t.match(/^(0*)\.(#*)$/))return u+te(l,o[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,o[1].length?"0.":".");if(o=t.match(/^#{1,3},##0(\.?)$/))return u+q(T(l,0));if(o=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+re(e,t,-n):q(""+(Math.floor(n)+function(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}(n,o[1].length)))+"."+S(ne(n,o[1].length),o[1].length);if(o=t.match(/^#,#*,#0/))return re(e,t.replace(/^#,#*,/,""),n);if(o=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=k(re(e,t.replace(/[\\-]/g,""),n)),a=0,k(k(t.replace(/\\/g,"")).replace(/[0#]/g,function(e){return a<i.length?i.charAt(a++):"0"===e?"0":""}));if(t.match(Q))return"("+(i=re(e,"##########",n)).substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var c="";if(o=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(o[4].length,7),s=N(l,Math.pow(10,a)-1,!1),i=""+u," "==(c=ae("n",o[1],s[1])).charAt(c.length-1)&&(c=c.substr(0,c.length-1)+"0"),i+=c+o[2]+"/"+o[3],(c=D(s[2],a)).length<o[4].length&&(c=ee(o[4].substr(o[4].length-c.length))+c),i+=c;if(o=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(o[1].length,o[4].length),7),u+((s=N(l,Math.pow(10,a)-1,!0))[0]||(s[1]?"":"0"))+" "+(s[1]?_(s[1],a)+o[2]+"/"+o[3]+D(s[2],a):rt(" ",2*a+1+o[2].length+o[3].length));if(o=t.match(/^[#0?]+$/))return i=T(n,0),t.length<=i.length?i:ee(t.substr(0,t.length-i.length))+i;if(o=t.match(/^([#0?]+)\.([#0]+)$/)){i=""+n.toFixed(Math.min(o[2].length,10)).replace(/([^0])0+$/,"$1"),a=i.indexOf(".");var f=t.indexOf(".")-a,d=t.length-i.length-f;return ee(t.substr(0,f)+i+t.substr(t.length-d))}if(o=t.match(/^00,000\.([#0]*0)$/))return a=ne(n,o[1].length),n<0?"-"+re(e,t,-n):q(function(e){return e<2147483647&&e>-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(n)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(e){return"00,"+(e.length<3?S(0,3-e.length):"")+e})+"."+S(a,o[1].length);switch(t){case"###,##0.00":return re(e,"#,##0.00",n);case"###,###":case"##,###":case"#,###":var h=q(T(l,0));return"0"!==h?u+h:"";case"###,###.00":return re(e,"###,##0.00",n).replace(/^0\./,".");case"#,###.00":return re(e,"#,##0.00",n).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function ie(e,t){var n,r=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==t)return"0.0E+0";if(t<0)return"-"+ie(e,-t);var i=e.indexOf(".");-1===i&&(i=e.indexOf("E"));var o=Math.floor(Math.log(t)*Math.LOG10E)%i;if(o<0&&(o+=i),!(n=(t/Math.pow(10,o)).toPrecision(r+1+(i+o)%i)).match(/[Ee]/)){var a=Math.floor(Math.log(t)*Math.LOG10E);-1===n.indexOf(".")?n=n.charAt(0)+"."+n.substr(1)+"E+"+(a-n.length+o):n+="E+"+(a-o),n=n.replace(/\+-/,"-")}n=n.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(e,t,n,r){return t+n+r.substr(0,(i+o)%i)+"."+r.substr(o)+"E"})}else n=t.toExponential(r);return e.match(/E\+00$/)&&n.match(/e[+-]\d$/)&&(n=n.substr(0,n.length-1)+"0"+n.charAt(n.length-1)),e.match(/E\-/)&&n.match(/e\+/)&&(n=n.replace(/e\+/,"e")),n.replace("e","E")}function oe(e,t,n){if(40===e.charCodeAt(0)&&!t.match(Z)){var r=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return n>=0?oe("n",r,n):"("+oe("n",r,-n)+")"}if(44===t.charCodeAt(t.length-1))return function(e,t,n){for(var r=t.length-1;44===t.charCodeAt(r-1);)--r;return ae(e,t.substr(0,r),n/Math.pow(10,3*(t.length-r)))}(e,t,n);if(-1!==t.indexOf("%"))return function(e,t,n){var r=t.replace(K,""),i=t.length-r.length;return ae(e,r,n*Math.pow(10,2*i))+rt("%",i)}(e,t,n);if(-1!==t.indexOf("E"))return ie(t,n);if(36===t.charCodeAt(0))return"$"+oe(e,t.substr(" "==t.charAt(1)?2:1),n);var i,o,a,s,l=Math.abs(n),u=n<0?"-":"";if(t.match(/^00+$/))return u+S(l,t.length);if(t.match(/^[#?]+$/))return i=""+n,0===n&&(i=""),i.length>t.length?i:ee(t.substr(0,t.length-i.length))+i;if(o=t.match(X))return function(e,t,n){return n+(0===t?"":""+t)+rt(" ",e[1].length+2+e[4].length)}(o,l,u);if(t.match(/^#+0+$/))return u+S(l,t.length-t.indexOf("0"));if(o=t.match(J))return i=(i=(""+n).replace(/^([^\.]+)$/,"$1."+ee(o[1])).replace(/\.$/,"."+ee(o[1]))).replace(/\.(\d*)$/,function(e,t){return"."+t+rt("0",ee(o[1]).length-t.length)}),-1!==t.indexOf("0.")?i:i.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),o=t.match(/^(0*)\.(#*)$/))return u+(""+l).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,o[1].length?"0.":".");if(o=t.match(/^#{1,3},##0(\.?)$/))return u+q(""+l);if(o=t.match(/^#,##0\.([#0]*0)$/))return n<0?"-"+oe(e,t,-n):q(""+n)+"."+rt("0",o[1].length);if(o=t.match(/^#,#*,#0/))return oe(e,t.replace(/^#,#*,/,""),n);if(o=t.match(/^([0#]+)(\\?-([0#]+))+$/))return i=k(oe(e,t.replace(/[\\-]/g,""),n)),a=0,k(k(t.replace(/\\/g,"")).replace(/[0#]/g,function(e){return a<i.length?i.charAt(a++):"0"===e?"0":""}));if(t.match(Q))return"("+(i=oe(e,"##########",n)).substr(0,3)+") "+i.substr(3,3)+"-"+i.substr(6);var c="";if(o=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(o[4].length,7),s=N(l,Math.pow(10,a)-1,!1),i=""+u," "==(c=ae("n",o[1],s[1])).charAt(c.length-1)&&(c=c.substr(0,c.length-1)+"0"),i+=c+o[2]+"/"+o[3],(c=D(s[2],a)).length<o[4].length&&(c=ee(o[4].substr(o[4].length-c.length))+c),i+=c;if(o=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(o[1].length,o[4].length),7),u+((s=N(l,Math.pow(10,a)-1,!0))[0]||(s[1]?"":"0"))+" "+(s[1]?_(s[1],a)+o[2]+"/"+o[3]+D(s[2],a):rt(" ",2*a+1+o[2].length+o[3].length));if(o=t.match(/^[#0?]+$/))return i=""+n,t.length<=i.length?i:ee(t.substr(0,t.length-i.length))+i;if(o=t.match(/^([#0]+)\.([#0]+)$/)){i=""+n.toFixed(Math.min(o[2].length,10)).replace(/([^0])0+$/,"$1"),a=i.indexOf(".");var f=t.indexOf(".")-a,d=t.length-i.length-f;return ee(t.substr(0,f)+i+t.substr(t.length-d))}if(o=t.match(/^00,000\.([#0]*0)$/))return n<0?"-"+oe(e,t,-n):q(""+n).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(e){return"00,"+(e.length<3?S(0,3-e.length):"")+e})+"."+S(0,o[1].length);switch(t){case"###,###":case"##,###":case"#,###":var h=q(""+l);return"0"!==h?u+h:"";default:if(t.match(/\.[0#?]*$/))return oe(e,t.slice(0,t.lastIndexOf(".")),n)+ee(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function ae(e,t,n){return(0|n)===n?oe(e,t,n):re(e,t,n)}var se=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function le(e){for(var t=0,n="",r="";t<e.length;)switch(n=e.charAt(t)){case"G":O(e,t)&&(t+=6),t++;break;case'"':for(;34!==e.charCodeAt(++t)&&t<e.length;);++t;break;case"\\":case"_":t+=2;break;case"@":++t;break;case"B":case"b":if("1"===e.charAt(t+1)||"2"===e.charAt(t+1))return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if("A/P"===e.substr(t,3).toUpperCase())return!0;if("AM/PM"===e.substr(t,5).toUpperCase())return!0;if("上午/下午"===e.substr(t,5).toUpperCase())return!0;++t;break;case"[":for(r=n;"]"!==e.charAt(t++)&&t<e.length;)r+=e.charAt(t);if(r.match(se))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(n=e.charAt(++t))>-1||"\\"==n&&"-"==e.charAt(t+1)&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===n;);break;case"*":++t," "!=e.charAt(t)&&"*"!=e.charAt(t)||++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;default:++t}return!1}var ue=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function ce(e,t){if(null==t)return!1;var n=parseFloat(t[2]);switch(t[1]){case"=":if(e==n)return!0;break;case">":if(e>n)return!0;break;case"<":if(e<n)return!0;break;case"<>":if(e!=n)return!0;break;case">=":if(e>=n)return!0;break;case"<=":if(e<=n)return!0}return!1}function fe(e,t,n){null==n&&(n={});var r="";switch(typeof e){case"string":r="m/d/yy"==e&&n.dateNF?n.dateNF:e;break;case"number":null==(r=14==e&&n.dateNF?n.dateNF:(null!=n.table?n.table:F)[e])&&(r=n.table&&n.table[B[e]]||F[B[e]]),null==r&&(r=L[e]||"General")}if(O(r,0))return V(t,n);t instanceof Date&&(t=z(t,n.date1904));var i=function(e,t){var n=function(e){for(var t=[],n=!1,r=0,i=0;r<e.length;++r)switch(e.charCodeAt(r)){case 34:n=!n;break;case 95:case 42:case 92:++r;break;case 59:t[t.length]=e.substr(i,r-i),i=r+1}if(t[t.length]=e.substr(i),!0===n)throw new Error("Format |"+e+"| unterminated string ");return t}(e),r=n.length,i=n[r-1].indexOf("@");if(r<4&&i>-1&&--r,n.length>4)throw new Error("cannot find right format for |"+n.join("|")+"|");if("number"!=typeof t)return[4,4===n.length||i>-1?n[n.length-1]:"@"];switch(n.length){case 1:n=i>-1?["General","General","General",n[0]]:[n[0],n[0],n[0],"@"];break;case 2:n=i>-1?[n[0],n[0],n[0],n[1]]:[n[0],n[1],n[0],"@"];break;case 3:n=i>-1?[n[0],n[1],n[0],n[2]]:[n[0],n[1],n[2],"@"]}var o=t>0?n[0]:t<0?n[1]:n[2];if(-1===n[0].indexOf("[")&&-1===n[1].indexOf("["))return[r,o];if(null!=n[0].match(/\[[=<>]/)||null!=n[1].match(/\[[=<>]/)){var a=n[0].match(ue),s=n[1].match(ue);return ce(t,a)?[r,n[0]]:ce(t,s)?[r,n[1]]:[r,n[null!=a&&null!=s?2:1]]}return[r,o]}(r,t);if(O(i[1]))return V(t,n);if(!0===t)t="TRUE";else if(!1===t)t="FALSE";else if(""===t||null==t)return"";return function(e,t,n,r){for(var i,o,a,s=[],l="",u=0,c="",f="t",d="H";u<e.length;)switch(c=e.charAt(u)){case"G":if(!O(e,u))throw new Error("unrecognized character "+c+" in "+e);s[s.length]={t:"G",v:"General"},u+=7;break;case'"':for(l="";34!==(a=e.charCodeAt(++u))&&u<e.length;)l+=String.fromCharCode(a);s[s.length]={t:"t",v:l},++u;break;case"\\":var h=e.charAt(++u),p="("===h||")"===h?h:"t";s[s.length]={t:p,v:h},++u;break;case"_":s[s.length]={t:"t",v:" "},u+=2;break;case"@":s[s.length]={t:"T",v:t},++u;break;case"B":case"b":if("1"===e.charAt(u+1)||"2"===e.charAt(u+1)){if(null==i&&null==(i=M(t,n,"2"===e.charAt(u+1))))return"";s[s.length]={t:"X",v:e.substr(u,2)},f=c,u+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":c=c.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0)return"";if(null==i&&null==(i=M(t,n)))return"";for(l=c;++u<e.length&&e.charAt(u).toLowerCase()===c;)l+=c;"m"===c&&"h"===f.toLowerCase()&&(c="M"),"h"===c&&(c=d),s[s.length]={t:c,v:l},f=c;break;case"A":case"a":case"上":var g={t:c,v:c};if(null==i&&(i=M(t,n)),"A/P"===e.substr(u,3).toUpperCase()?(null!=i&&(g.v=i.H>=12?"P":"A"),g.t="T",d="h",u+=3):"AM/PM"===e.substr(u,5).toUpperCase()?(null!=i&&(g.v=i.H>=12?"PM":"AM"),g.t="T",u+=5,d="h"):"上午/下午"===e.substr(u,5).toUpperCase()?(null!=i&&(g.v=i.H>=12?"下午":"上午"),g.t="T",u+=5,d="h"):(g.t="t",++u),null==i&&"T"===g.t)return"";s[s.length]=g,f=c;break;case"[":for(l=c;"]"!==e.charAt(u++)&&u<e.length;)l+=e.charAt(u);if("]"!==l.slice(-1))throw'unterminated "[" block: |'+l+"|";if(l.match(se)){if(null==i&&null==(i=M(t,n)))return"";s[s.length]={t:"Z",v:l.toLowerCase()},f=l.charAt(1)}else l.indexOf("$")>-1&&(l=(l.match(/\$([^-\[\]]*)/)||[])[1]||"$",le(e)||(s[s.length]={t:"t",v:l}));break;case".":if(null!=i){for(l=c;++u<e.length&&"0"===(c=e.charAt(u));)l+=c;s[s.length]={t:"s",v:l};break}case"0":case"#":for(l=c;++u<e.length&&"0#?.,E+-%".indexOf(c=e.charAt(u))>-1;)l+=c;s[s.length]={t:"n",v:l};break;case"?":for(l=c;e.charAt(++u)===c;)l+=c;s[s.length]={t:c,v:l},f=c;break;case"*":++u," "!=e.charAt(u)&&"*"!=e.charAt(u)||++u;break;case"(":case")":s[s.length]={t:1===r?"t":c,v:c},++u;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(l=c;u<e.length&&"0123456789".indexOf(e.charAt(++u))>-1;)l+=e.charAt(u);s[s.length]={t:"D",v:l};break;case" ":s[s.length]={t:c,v:c},++u;break;case"$":s[s.length]={t:"t",v:"$"},++u;break;default:if(-1===",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(c))throw new Error("unrecognized character "+c+" in "+e);s[s.length]={t:"t",v:c},++u}var v,m=0,y=0;for(u=s.length-1,f="t";u>=0;--u)switch(s[u].t){case"h":case"H":s[u].t=d,f="h",m<1&&(m=1);break;case"s":(v=s[u].v.match(/\.0+$/))&&(y=Math.max(y,v[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":f=s[u].t;break;case"m":"s"===f&&(s[u].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&s[u].v.match(/[Hh]/)&&(m=1),m<2&&s[u].v.match(/[Mm]/)&&(m=2),m<3&&s[u].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:i.u>=.5&&(i.u=0,++i.S),i.S>=60&&(i.S=0,++i.M),i.M>=60&&(i.M=0,++i.H);break;case 2:i.u>=.5&&(i.u=0,++i.S),i.S>=60&&(i.S=0,++i.M)}var b,w="";for(u=0;u<s.length;++u)switch(s[u].t){case"t":case"T":case" ":case"D":break;case"X":s[u].v="",s[u].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":s[u].v=G(s[u].t.charCodeAt(0),s[u].v,i,y),s[u].t="t";break;case"n":case"?":for(b=u+1;null!=s[b]&&("?"===(c=s[b].t)||"D"===c||(" "===c||"t"===c)&&null!=s[b+1]&&("?"===s[b+1].t||"t"===s[b+1].t&&"/"===s[b+1].v)||"("===s[u].t&&(" "===c||"n"===c||")"===c)||"t"===c&&("/"===s[b].v||" "===s[b].v&&null!=s[b+1]&&"?"==s[b+1].t));)s[u].v+=s[b].v,s[b]={v:"",t:";"},++b;w+=s[u].v,u=b-1;break;case"G":s[u].t="t",s[u].v=V(t,n)}var x,C,E="";if(w.length>0){40==w.charCodeAt(0)?(x=t<0&&45===w.charCodeAt(0)?-t:t,C=ae("n",w,x)):(C=ae("n",w,x=t<0&&r>1?-t:t),x<0&&s[0]&&"t"==s[0].t&&(C=C.substr(1),s[0].v="-"+s[0].v)),b=C.length-1;var k=s.length;for(u=0;u<s.length;++u)if(null!=s[u]&&"t"!=s[u].t&&s[u].v.indexOf(".")>-1){k=u;break}var S=s.length;if(k===s.length&&-1===C.indexOf("E")){for(u=s.length-1;u>=0;--u)null!=s[u]&&-1!=="n?".indexOf(s[u].t)&&(b>=s[u].v.length-1?(b-=s[u].v.length,s[u].v=C.substr(b+1,s[u].v.length)):b<0?s[u].v="":(s[u].v=C.substr(0,b+1),b=-1),s[u].t="t",S=u);b>=0&&S<s.length&&(s[S].v=C.substr(0,b+1)+s[S].v)}else if(k!==s.length&&-1===C.indexOf("E")){for(b=C.indexOf(".")-1,u=k;u>=0;--u)if(null!=s[u]&&-1!=="n?".indexOf(s[u].t)){for(o=s[u].v.indexOf(".")>-1&&u===k?s[u].v.indexOf(".")-1:s[u].v.length-1,E=s[u].v.substr(o+1);o>=0;--o)b>=0&&("0"===s[u].v.charAt(o)||"#"===s[u].v.charAt(o))&&(E=C.charAt(b--)+E);s[u].v=E,s[u].t="t",S=u}for(b>=0&&S<s.length&&(s[S].v=C.substr(0,b+1)+s[S].v),b=C.indexOf(".")+1,u=k;u<s.length;++u)if(null!=s[u]&&(-1!=="n?(".indexOf(s[u].t)||u===k)){for(o=s[u].v.indexOf(".")>-1&&u===k?s[u].v.indexOf(".")+1:0,E=s[u].v.substr(0,o);o<s[u].v.length;++o)b<C.length&&(E+=C.charAt(b++));s[u].v=E,s[u].t="t",S=u}}}for(u=0;u<s.length;++u)null!=s[u]&&"n?".indexOf(s[u].t)>-1&&(x=r>1&&t<0&&u>0&&"-"===s[u-1].v?-t:t,s[u].v=ae(s[u].t,s[u].v,x),s[u].t="t");var _="";for(u=0;u!==s.length;++u)null!=s[u]&&(_+=s[u].v);return _}(i[1],t,n,i[0])}function de(e,t){if("number"!=typeof t){t=+t||-1;for(var n=0;n<392;++n)if(null!=F[n]){if(F[n]==e){t=n;break}}else t<0&&(t=n);t<0&&(t=391)}return F[t]=e,t}function he(e){for(var t=0;392!=t;++t)void 0!==e[t]&&de(e[t],t)}function pe(){var e;e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',F=e}var ge,ve,me,ye,be,we,xe,Ce,Ee,ke,Se,_e,De,Ae,Te,Oe,Pe,Ie,Fe,Be={format:fe,load:de,_table:F,load_table:he,parse_date_code:M,is_date:le,get_table:function(){return Be._table=F}},Le={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},Ne=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,Me=(ve={version:"1.2.0"},me=function(){for(var e=0,t=new Array(256),n=0;256!=n;++n)e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=1&(e=n)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1)?-306674912^e>>>1:e>>>1,t[n]=e;return"undefined"!=typeof Int32Array?new Int32Array(t):t}(),ye=function(e){var t=0,n=0,r=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(r=0;256!=r;++r)i[r]=e[r];for(r=0;256!=r;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[255&n];var o=[];for(r=1;16!=r;++r)o[r-1]="undefined"!=typeof Int32Array?i.subarray(256*r,256*r+256):i.slice(256*r,256*r+256);return o}(me),be=ye[0],we=ye[1],xe=ye[2],Ce=ye[3],Ee=ye[4],ke=ye[5],Se=ye[6],_e=ye[7],De=ye[8],Ae=ye[9],Te=ye[10],Oe=ye[11],Pe=ye[12],Ie=ye[13],Fe=ye[14],ve.table=me,ve.bstr=function(e,t){for(var n=-1^t,r=0,i=e.length;r<i;)n=n>>>8^me[255&(n^e.charCodeAt(r++))];return~n},ve.buf=function(e,t){for(var n=-1^t,r=e.length-15,i=0;i<r;)n=Fe[e[i++]^255&n]^Ie[e[i++]^n>>8&255]^Pe[e[i++]^n>>16&255]^Oe[e[i++]^n>>>24]^Te[e[i++]]^Ae[e[i++]]^De[e[i++]]^_e[e[i++]]^Se[e[i++]]^ke[e[i++]]^Ee[e[i++]]^Ce[e[i++]]^xe[e[i++]]^we[e[i++]]^be[e[i++]]^me[e[i++]];for(r+=15;i<r;)n=n>>>8^me[255&(n^e[i++])];return~n},ve.str=function(e,t){for(var n=-1^t,r=0,i=e.length,o=0,a=0;r<i;)(o=e.charCodeAt(r++))<128?n=n>>>8^me[255&(n^o)]:o<2048?n=(n=n>>>8^me[255&(n^(192|o>>6&31))])>>>8^me[255&(n^(128|63&o))]:o>=55296&&o<57344?(o=64+(1023&o),a=1023&e.charCodeAt(r++),n=(n=(n=(n=n>>>8^me[255&(n^(240|o>>8&7))])>>>8^me[255&(n^(128|o>>2&63))])>>>8^me[255&(n^(128|a>>6&15|(3&o)<<4))])>>>8^me[255&(n^(128|63&a))]):n=(n=(n=n>>>8^me[255&(n^(224|o>>12&15))])>>>8^me[255&(n^(128|o>>6&63))])>>>8^me[255&(n^(128|63&o))];return~n},ve),Re=function(){var e,t={};function n(e){if("/"==e.charAt(e.length-1))return-1===e.slice(0,-1).indexOf("/")?e:n(e.slice(0,-1));var t=e.lastIndexOf("/");return-1===t?e:e.slice(0,t+1)}function r(e){if("/"==e.charAt(e.length-1))return r(e.slice(0,-1));var t=e.lastIndexOf("/");return-1===t?e:e.slice(t+1)}function i(e,t){"string"==typeof t&&(t=new Date(t));var n=t.getHours();n=(n=n<<6|t.getMinutes())<<5|t.getSeconds()>>>1,e._W(2,n);var r=t.getFullYear()-1980;r=(r=r<<4|t.getMonth()+1)<<5|t.getDate(),e._W(2,r)}function o(e){kn(e,0);for(var t={},n=0;e.l<=e.length-4;){var r=e._R(2),i=e._R(2),o=e.l+i,a={};21589===r&&(1&(n=e._R(1))&&(a.mtime=e._R(4)),i>5&&(2&n&&(a.atime=e._R(4)),4&n&&(a.ctime=e._R(4))),a.mtime&&(a.mt=new Date(1e3*a.mtime))),e.l=o,t[r]=a}return t}function a(){return e||(e=void 0)}function s(e,t){if(80==e[0]&&75==e[1])return ce(e,t);if(109==(32|e[0])&&105==(32|e[1]))return function(e,t){if("mime-version:"!=T(e.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var n=t&&t.root||"",r=T(e).split("\r\n"),i=0,o="";for(i=0;i<r.length;++i)if(o=r[i],/^Content-Location:/i.test(o)&&(o=o.slice(o.indexOf("file")),n||(n=o.slice(0,o.lastIndexOf("/")+1)),o.slice(0,n.length)!=n))for(;n.length>0&&(n=(n=n.slice(0,n.length-1)).slice(0,n.lastIndexOf("/")+1),o.slice(0,n.length)!=n););var a=(r[1]||"").match(/boundary="(.*?)"/);if(!a)throw new Error("MAD cannot find boundary");var s="--"+(a[1]||""),l={FileIndex:[],FullPaths:[]};d(l);var u,c=0;for(i=0;i<r.length;++i){var f=r[i];f!==s&&f!==s+"--"||(c++&&ve(l,r.slice(u,i),n),u=i)}return l}(e,t);if(e.length<512)throw new Error("CFB file size "+e.length+" < 512");var n,r,i,o,a,s,h=512,p=[],g=e.slice(0,512);kn(g,0);var v=function(e){if(80==e[e.l]&&75==e[e.l+1])return[0,0];e.chk(S,"Header Signature: "),e.l+=16;var t=e._R(2,"u");return[e._R(2,"u"),t]}(g);switch(n=v[0]){case 3:h=512;break;case 4:h=4096;break;case 0:if(0==v[1])return ce(e,t);default:throw new Error("Major Version: Expected 3 or 4 saw "+n)}512!==h&&kn(g=e.slice(0,h),28);var m=e.slice(0,h);!function(e,t){var n;switch(e.l+=2,n=e._R(2)){case 9:if(3!=t)throw new Error("Sector Shift: Expected 9 saw "+n);break;case 12:if(4!=t)throw new Error("Sector Shift: Expected 12 saw "+n);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+n)}e.chk("0600","Mini Sector Shift: "),e.chk("000000000000","Reserved: ")}(g,n);var y=g._R(4,"i");if(3===n&&0!==y)throw new Error("# Directory Sectors: Expected 0 saw "+y);g.l+=4,o=g._R(4,"i"),g.l+=4,g.chk("00100000","Mini Stream Cutoff Size: "),a=g._R(4,"i"),r=g._R(4,"i"),s=g._R(4,"i"),i=g._R(4,"i");for(var b=-1,w=0;w<109&&!((b=g._R(4,"i"))<0);++w)p[w]=b;var x=function(e,t){for(var n=Math.ceil(e.length/t)-1,r=[],i=1;i<n;++i)r[i-1]=e.slice(i*t,(i+1)*t);return r[n-1]=e.slice(n*t),r}(e,h);u(s,i,x,h,p);var C=function(e,t,n,r){var i=e.length,o=[],a=[],s=[],l=[],u=r-1,c=0,f=0,d=0,h=0;for(c=0;c<i;++c)if(s=[],(d=c+t)>=i&&(d-=i),!a[d]){l=[];var p=[];for(f=d;f>=0;){p[f]=!0,a[f]=!0,s[s.length]=f,l.push(e[f]);var g=n[Math.floor(4*f/r)];if(r<4+(h=4*f&u))throw new Error("FAT boundary crossed: "+f+" 4 "+r);if(!e[g])break;if(p[f=vn(e[g],h)])break}o[d]={nodes:s,data:tn([l])}}return o}(x,o,p,h);C[o].name="!Directory",r>0&&a!==k&&(C[a].name="!MiniFAT"),C[p[0]].name="!FAT",C.fat_addrs=p,C.ssz=h;var E=[],_=[],D=[];!function(e,t,n,r,i,o,a,s){for(var u,d=0,h=r.length?2:0,p=t[e].data,g=0,v=0;g<p.length;g+=128){var m=p.slice(g,g+128);kn(m,64),v=m._R(2),u=nn(m,0,v-h),r.push(u);var y={name:u,type:m._R(1),color:m._R(1),L:m._R(4,"i"),R:m._R(4,"i"),C:m._R(4,"i"),clsid:m._R(16),state:m._R(4,"i"),start:0,size:0};0!==m._R(2)+m._R(2)+m._R(2)+m._R(2)&&(y.ct=f(m,m.l-8)),0!==m._R(2)+m._R(2)+m._R(2)+m._R(2)&&(y.mt=f(m,m.l-8)),y.start=m._R(4,"i"),y.size=m._R(4,"i"),y.size<0&&y.start<0&&(y.size=y.type=0,y.start=k,y.name=""),5===y.type?(d=y.start,i>0&&d!==k&&(t[d].name="!StreamData")):y.size>=4096?(y.storage="fat",void 0===t[y.start]&&(t[y.start]=c(n,y.start,t.fat_addrs,t.ssz)),t[y.start].name=y.name,y.content=t[y.start].data.slice(0,y.size)):(y.storage="minifat",y.size<0?y.size=0:d!==k&&y.start!==k&&t[d]&&(y.content=l(y,t[d].data,(t[s]||{}).data))),y.content&&kn(y.content,0),o[u]=y,a.push(y)}}(o,C,x,E,r,{},_,a),function(e,t,n){for(var r=0,i=0,o=0,a=0,s=0,l=n.length,u=[],c=[];r<l;++r)u[r]=c[r]=r,t[r]=n[r];for(;s<c.length;++s)i=e[r=c[s]].L,o=e[r].R,a=e[r].C,u[r]===r&&(-1!==i&&u[i]!==i&&(u[r]=u[i]),-1!==o&&u[o]!==o&&(u[r]=u[o])),-1!==a&&(u[a]=r),-1!==i&&r!=u[r]&&(u[i]=u[r],c.lastIndexOf(i)<s&&c.push(i)),-1!==o&&r!=u[r]&&(u[o]=u[r],c.lastIndexOf(o)<s&&c.push(o));for(r=1;r<l;++r)u[r]===r&&(-1!==o&&u[o]!==o?u[r]=u[o]:-1!==i&&u[i]!==i&&(u[r]=u[i]));for(r=1;r<l;++r)if(0!==e[r].type){if((s=r)!=u[s])do{s=u[s],t[r]=t[s]+"/"+t[r]}while(0!==s&&-1!==u[s]&&s!=u[s]);u[r]=-1}for(t[0]+="/",r=1;r<l;++r)2!==e[r].type&&(t[r]+="/")}(_,D,E),E.shift();var A={FileIndex:_,FullPaths:D};return t&&t.raw&&(A.raw={header:m,sectors:x}),A}function l(e,t,n){for(var r=e.start,i=e.size,o=[],a=r;n&&i>0&&a>=0;)o.push(t.slice(a*w,a*w+w)),i-=w,a=vn(n,4*a);return 0===o.length?Sn(0):x(o).slice(0,e.size)}function u(e,t,n,r,i){var o=k;if(e===k){if(0!==t)throw new Error("DIFAT chain shorter than expected")}else if(-1!==e){var a=n[e],s=(r>>>2)-1;if(!a)return;for(var l=0;l<s&&(o=vn(a,4*l))!==k;++l)i.push(o);u(vn(a,r-4),t-1,n,r,i)}}function c(e,t,n,r,i){var o=[],a=[];i||(i=[]);var s=r-1,l=0,u=0;for(l=t;l>=0;){i[l]=!0,o[o.length]=l,a.push(e[l]);var c=n[Math.floor(4*l/r)];if(r<4+(u=4*l&s))throw new Error("FAT boundary crossed: "+l+" 4 "+r);if(!e[c])break;l=vn(e[c],u)}return{nodes:o,data:tn([a])}}function f(e,t){return new Date(1e3*(gn(e,t+4)/1e7*Math.pow(2,32)+gn(e,t)/1e7-11644473600))}function d(e,t){var n=t||{},r=n.root||"Root Entry";if(e.FullPaths||(e.FullPaths=[]),e.FileIndex||(e.FileIndex=[]),e.FullPaths.length!==e.FileIndex.length)throw new Error("inconsistent CFB structure");0===e.FullPaths.length&&(e.FullPaths[0]=r+"/",e.FileIndex[0]={name:r,type:5}),n.CLSID&&(e.FileIndex[0].clsid=n.CLSID),function(e){var t="Sh33tJ5";if(!Re.find(e,"/"+t)){var n=Sn(4);n[0]=55,n[1]=n[3]=50,n[2]=54,e.FileIndex.push({name:t,type:2,content:n,size:4,L:69,R:69,C:69}),e.FullPaths.push(e.FullPaths[0]+t),g(e)}}(e)}function g(e,t){d(e);for(var i=!1,o=!1,a=e.FullPaths.length-1;a>=0;--a){var s=e.FileIndex[a];switch(s.type){case 0:o?i=!0:(e.FileIndex.pop(),e.FullPaths.pop());break;case 1:case 2:case 5:o=!0,isNaN(s.R*s.L*s.C)&&(i=!0),s.R>-1&&s.L>-1&&s.R==s.L&&(i=!0);break;default:i=!0}}if(i||t){var l=new Date(1987,1,19),u=0,c=Object.create?Object.create(null):{},f=[];for(a=0;a<e.FullPaths.length;++a)c[e.FullPaths[a]]=!0,0!==e.FileIndex[a].type&&f.push([e.FullPaths[a],e.FileIndex[a]]);for(a=0;a<f.length;++a){var h=n(f[a][0]);(o=c[h])||(f.push([h,{name:r(h).replace("/",""),type:1,clsid:D,ct:l,mt:l,content:null}]),c[h]=!0)}for(f.sort(function(e,t){return function(e,t){for(var n=e.split("/"),r=t.split("/"),i=0,o=0,a=Math.min(n.length,r.length);i<a;++i){if(o=n[i].length-r[i].length)return o;if(n[i]!=r[i])return n[i]<r[i]?-1:1}return n.length-r.length}(e[0],t[0])}),e.FullPaths=[],e.FileIndex=[],a=0;a<f.length;++a)e.FullPaths[a]=f[a][0],e.FileIndex[a]=f[a][1];for(a=0;a<f.length;++a){var p=e.FileIndex[a],g=e.FullPaths[a];if(p.name=r(g).replace("/",""),p.L=p.R=p.C=-(p.color=1),p.size=p.content?p.content.length:0,p.start=0,p.clsid=p.clsid||D,0===a)p.C=f.length>1?1:-1,p.size=0,p.type=5;else if("/"==g.slice(-1)){for(u=a+1;u<f.length&&n(e.FullPaths[u])!=g;++u);for(p.C=u>=f.length?-1:u,u=a+1;u<f.length&&n(e.FullPaths[u])!=n(g);++u);p.R=u>=f.length?-1:u,p.type=1}else n(e.FullPaths[a+1]||"")==n(g)&&(p.R=a+1),p.type=2}}}function y(e,t){var n=t||{};if("mad"==n.fileType)return function(e,t){for(var n=t||{},r=n.boundary||"SheetJS",i=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(r="------="+r).slice(2)+'"',"","",""],o=e.FullPaths[0],a=o,s=e.FileIndex[0],l=1;l<e.FullPaths.length;++l)if(a=e.FullPaths[l].slice(o.length),(s=e.FileIndex[l]).size&&s.content&&"Sh33tJ5"!=a){a=a.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(e){return"_x"+e.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(e){return"_u"+e.charCodeAt(0).toString(16)+"_"});for(var u=T(s.content),c=0,f=Math.min(1024,u.length),d=0,h=0;h<=f;++h)(d=u.charCodeAt(h))>=32&&d<128&&++c;var p=c>=4*f/5;i.push(r),i.push("Content-Location: "+(n.root||"file:///C:/SheetJS/")+a),i.push("Content-Transfer-Encoding: "+(p?"quoted-printable":"base64")),i.push("Content-Type: "+he(s,a)),i.push(""),i.push(p?ge(u):pe(u))}return i.push(r+"--\r\n"),i.join("\r\n")}(e,n);if(g(e),"zip"===n.fileType)return function(e,t){var n=t||{},r=[],o=[],a=Sn(1),s=n.compression?8:0,l=0,u=0,c=0,f=0,d=e.FullPaths[0],h=d,p=e.FileIndex[0],g=[],v=0;for(l=1;l<e.FullPaths.length;++l)if(h=e.FullPaths[l].slice(d.length),(p=e.FileIndex[l]).size&&p.content&&"Sh33tJ5"!=h){var m=c,y=Sn(h.length);for(u=0;u<h.length;++u)y._W(1,127&h.charCodeAt(u));y=y.slice(0,y.l),g[f]=Me.buf(p.content,0);var b=p.content;8==s&&(b=O(b)),(a=Sn(30))._W(4,67324752),a._W(2,20),a._W(2,0),a._W(2,s),p.mt?i(a,p.mt):a._W(4,0),a._W(-4,g[f]),a._W(4,b.length),a._W(4,p.content.length),a._W(2,y.length),a._W(2,0),c+=a.length,r.push(a),c+=y.length,r.push(y),c+=b.length,r.push(b),(a=Sn(46))._W(4,33639248),a._W(2,0),a._W(2,20),a._W(2,0),a._W(2,s),a._W(4,0),a._W(-4,g[f]),a._W(4,b.length),a._W(4,p.content.length),a._W(2,y.length),a._W(2,0),a._W(2,0),a._W(2,0),a._W(2,0),a._W(4,0),a._W(4,m),v+=a.l,o.push(a),v+=y.length,o.push(y),++f}return(a=Sn(22))._W(4,101010256),a._W(2,0),a._W(2,0),a._W(2,f),a._W(2,f),a._W(4,v),a._W(4,c),a._W(2,0),x([x(r),x(o),a])}(e,n);var r=function(e){for(var t=0,n=0,r=0;r<e.FileIndex.length;++r){var i=e.FileIndex[r];if(i.content){var o=i.content.length;o>0&&(o<4096?t+=o+63>>6:n+=o+511>>9)}}for(var a=e.FullPaths.length+3>>2,s=t+127>>7,l=(t+7>>3)+n+a+s,u=l+127>>7,c=u<=109?0:Math.ceil((u-109)/127);l+u+c+127>>7>u;)c=++u<=109?0:Math.ceil((u-109)/127);var f=[1,c,u,s,a,n,t,0];return e.FileIndex[0].size=t<<6,f[7]=(e.FileIndex[0].start=f[0]+f[1]+f[2]+f[3]+f[4]+f[5])+(f[6]+7>>3),f}(e),o=Sn(r[7]<<9),a=0,s=0;for(a=0;a<8;++a)o._W(1,_[a]);for(a=0;a<8;++a)o._W(2,0);for(o._W(2,62),o._W(2,3),o._W(2,65534),o._W(2,9),o._W(2,6),a=0;a<3;++a)o._W(2,0);for(o._W(4,0),o._W(4,r[2]),o._W(4,r[0]+r[1]+r[2]+r[3]-1),o._W(4,0),o._W(4,4096),o._W(4,r[3]?r[0]+r[1]+r[2]-1:k),o._W(4,r[3]),o._W(-4,r[1]?r[0]-1:k),o._W(4,r[1]),a=0;a<109;++a)o._W(-4,a<r[2]?r[1]+a:-1);if(r[1])for(s=0;s<r[1];++s){for(;a<236+127*s;++a)o._W(-4,a<r[2]?r[1]+a:-1);o._W(-4,s===r[1]-1?k:s+1)}var l=function(e){for(s+=e;a<s-1;++a)o._W(-4,a+1);e&&(++a,o._W(-4,k))};for(s=a=0,s+=r[1];a<s;++a)o._W(-4,A.DIFSECT);for(s+=r[2];a<s;++a)o._W(-4,A.FATSECT);l(r[3]),l(r[4]);for(var u=0,c=0,f=e.FileIndex[0];u<e.FileIndex.length;++u)(f=e.FileIndex[u]).content&&((c=f.content.length)<4096||(f.start=s,l(c+511>>9)));for(l(r[6]+7>>3);511&o.l;)o._W(-4,A.ENDOFCHAIN);for(s=a=0,u=0;u<e.FileIndex.length;++u)(f=e.FileIndex[u]).content&&(!(c=f.content.length)||c>=4096||(f.start=s,l(c+63>>6)));for(;511&o.l;)o._W(-4,A.ENDOFCHAIN);for(a=0;a<r[4]<<2;++a){var d=e.FullPaths[a];if(d&&0!==d.length){f=e.FileIndex[a],0===a&&(f.start=f.size?f.start-1:k);var h=0===a&&n.root||f.name;if(c=2*(h.length+1),o._W(64,h,"utf16le"),o._W(2,c),o._W(1,f.type),o._W(1,f.color),o._W(-4,f.L),o._W(-4,f.R),o._W(-4,f.C),f.clsid)o._W(16,f.clsid,"hex");else for(u=0;u<4;++u)o._W(4,0);o._W(4,f.state||0),o._W(4,0),o._W(4,0),o._W(4,0),o._W(4,0),o._W(4,f.start),o._W(4,f.size),o._W(4,0)}else{for(u=0;u<17;++u)o._W(4,0);for(u=0;u<3;++u)o._W(4,-1);for(u=0;u<12;++u)o._W(4,0)}}for(a=1;a<e.FileIndex.length;++a)if((f=e.FileIndex[a]).size>=4096){for(o.l=f.start+1<<9,u=0;u<f.size;++u)o._W(1,f.content[u]);for(;511&u;++u)o._W(1,0)}for(a=1;a<e.FileIndex.length;++a)if((f=e.FileIndex[a]).size>0&&f.size<4096){for(u=0;u<f.size;++u)o._W(1,f.content[u]);for(;63&u;++u)o._W(1,0)}for(;o.l<o.length;)o._W(1,0);return o}t.version="1.2.1";var b,w=64,k=-2,S="d0cf11e0a1b11ae1",_=[208,207,17,224,161,177,26,225],D="00000000000000000000000000000000",A={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:k,FREESECT:-1,HEADER_SIGNATURE:S,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:D,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function T(e){for(var t=new Array(e.length),n=0;n<e.length;++n)t[n]=String.fromCharCode(e[n]);return t.join("")}function O(e){return b?b.deflateRawSync(e):te(e)}var P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],F=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function B(e){var t=139536&(e<<1|e<<11)|558144&(e<<5|e<<15);return 255&(t>>16|t>>8|t)}for(var L="undefined"!=typeof Uint8Array,N=L?new Uint8Array(256):[],M=0;M<256;++M)N[M]=B(M);function R(e,t){var n=N[255&e];return t<=8?n>>>8-t:(n=n<<8|N[e>>8&255],t<=16?n>>>16-t:(n=n<<8|N[e>>16&255])>>>24-t)}function j(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=6?0:e[r+1]<<8))>>>n&3}function H(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=5?0:e[r+1]<<8))>>>n&7}function z(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=3?0:e[r+1]<<8))>>>n&31}function U(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=1?0:e[r+1]<<8))>>>n&127}function $(e,t,n){var r=7&t,i=t>>>3,o=(1<<n)-1,a=e[i]>>>r;return n<8-r?a&o:(a|=e[i+1]<<8-r,n<16-r?a&o:(a|=e[i+2]<<16-r,n<24-r?a&o:(a|=e[i+3]<<24-r)&o))}function W(e,t,n){var r=7&t,i=t>>>3;return r<=5?e[i]|=(7&n)<<r:(e[i]|=n<<r&255,e[i+1]=(7&n)>>8-r),t+3}function V(e,t,n){return n=(1&n)<<(7&t),e[t>>>3]|=n,t+1}function G(e,t,n){var r=t>>>3;return n<<=7&t,e[r]|=255&n,n>>>=8,e[r+1]=n,t+8}function q(e,t,n){var r=t>>>3;return n<<=7&t,e[r]|=255&n,n>>>=8,e[r+1]=255&n,e[r+2]=n>>>8,t+16}function K(e,t){var n=e.length,r=2*n>t?2*n:t+5,i=0;if(n>=t)return e;if(L){var o=new Uint8Array(r);if(o.set)o.set(e);else for(;i<n;++i)o[i]=e[i];return o}return e.length=r,e}function Y(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=0;return t}function X(e,t,n){var r=1,i=0,o=0,a=0,s=0,l=e.length,u=L?new Uint16Array(32):Y(32);for(o=0;o<32;++o)u[o]=0;for(o=l;o<n;++o)e[o]=0;l=e.length;var c=L?new Uint16Array(l):Y(l);for(o=0;o<l;++o)u[i=e[o]]++,r<i&&(r=i),c[o]=0;for(u[0]=0,o=1;o<=r;++o)u[o+16]=s=s+u[o-1]<<1;for(o=0;o<l;++o)0!=(s=e[o])&&(c[o]=u[s+16]++);var f=0;for(o=0;o<l;++o)if(0!=(f=e[o]))for(s=R(c[o],r)>>r-f,a=(1<<r+4-f)-1;a>=0;--a)t[s|a<<f]=15&f|o<<4;return r}var J=L?new Uint16Array(512):Y(512),Z=L?new Uint16Array(32):Y(32);if(!L){for(var Q=0;Q<512;++Q)J[Q]=0;for(Q=0;Q<32;++Q)Z[Q]=0}!function(){for(var e=[],t=0;t<32;t++)e.push(5);X(e,Z,32);var n=[];for(t=0;t<=143;t++)n.push(8);for(;t<=255;t++)n.push(9);for(;t<=279;t++)n.push(7);for(;t<=287;t++)n.push(8);X(n,J,288)}();var ee=function(){for(var e=L?new Uint8Array(32768):[],t=0,n=0;t<F.length-1;++t)for(;n<F[t+1];++n)e[n]=t;for(;n<32768;++n)e[n]=29;var r=L?new Uint8Array(259):[];for(t=0,n=0;t<I.length-1;++t)for(;n<I[t+1];++n)r[n]=t;return function(t,n){return t.length<8?function(e,t){for(var n=0;n<e.length;){var r=Math.min(65535,e.length-n),i=n+r==e.length;for(t._W(1,+i),t._W(2,r),t._W(2,65535&~r);r-- >0;)t[t.l++]=e[n++]}return t.l}(t,n):function(t,n){for(var i=0,o=0,a=L?new Uint16Array(32768):[];o<t.length;){var s=Math.min(65535,t.length-o);if(s<10){for(7&(i=W(n,i,+!(o+s!=t.length)))&&(i+=8-(7&i)),n.l=i/8|0,n._W(2,s),n._W(2,65535&~s);s-- >0;)n[n.l++]=t[o++];i=8*n.l}else{i=W(n,i,+!(o+s!=t.length)+2);for(var l=0;s-- >0;){var u=t[o],c=-1,f=0;if((c=a[l=32767&(l<<5^u)])&&((c|=-32768&o)>o&&(c-=32768),c<o))for(;t[c+f]==t[o+f]&&f<250;)++f;if(f>2){(u=r[f])<=22?i=G(n,i,N[u+1]>>1)-1:(G(n,i,3),G(n,i+=5,N[u-23]>>5),i+=3);var d=u<8?0:u-4>>2;d>0&&(q(n,i,f-I[u]),i+=d),u=e[o-c],i=G(n,i,N[u]>>3),i-=3;var h=u<4?0:u-2>>1;h>0&&(q(n,i,o-c-F[u]),i+=h);for(var p=0;p<f;++p)a[l]=32767&o,l=32767&(l<<5^t[o]),++o;s-=f-1}else u<=143?u+=48:i=V(n,i,1),i=G(n,i,N[u]),a[l]=32767&o,++o}i=G(n,i,0)-1}}return n.l=(i+7)/8|0,n.l}(t,n)}}();function te(e){var t=Sn(50+Math.floor(1.1*e.length)),n=ee(e,t);return t.slice(0,n)}var ne=L?new Uint16Array(32768):Y(32768),re=L?new Uint16Array(32768):Y(32768),ie=L?new Uint16Array(128):Y(128),oe=1,ae=1;function se(e,t){var n=z(e,t)+257,r=z(e,t+=5)+1,i=function(e,t){var n=7&t,r=t>>>3;return(e[r]|(n<=4?0:e[r+1]<<8))>>>n&15}(e,t+=5)+4;t+=4;for(var o=0,a=L?new Uint8Array(19):Y(19),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],l=1,u=L?new Uint8Array(8):Y(8),c=L?new Uint8Array(8):Y(8),f=a.length,d=0;d<i;++d)a[P[d]]=o=H(e,t),l<o&&(l=o),u[o]++,t+=3;var h=0;for(u[0]=0,d=1;d<=l;++d)c[d]=h=h+u[d-1]<<1;for(d=0;d<f;++d)0!=(h=a[d])&&(s[d]=c[h]++);var p=0;for(d=0;d<f;++d)if(0!=(p=a[d])){h=N[s[d]]>>8-p;for(var g=(1<<7-p)-1;g>=0;--g)ie[h|g<<p]=7&p|d<<3}var v=[];for(l=1;v.length<n+r;)switch(t+=7&(h=ie[U(e,t)]),h>>>=3){case 16:for(o=3+j(e,t),t+=2,h=v[v.length-1];o-- >0;)v.push(h);break;case 17:for(o=3+H(e,t),t+=3;o-- >0;)v.push(0);break;case 18:for(o=11+U(e,t),t+=7;o-- >0;)v.push(0);break;default:v.push(h),l<h&&(l=h)}var m=v.slice(0,n),y=v.slice(n);for(d=n;d<286;++d)m[d]=0;for(d=r;d<30;++d)y[d]=0;return oe=X(m,ne,286),ae=X(y,re,30),t}function le(e,t){var n=function(e,t){if(3==e[0]&&!(3&e[1]))return[v(t),2];for(var n=0,r=0,i=function(e){return"undefined"!=typeof Uint8Array?new Uint8Array(e):new Array(e)}(t||1<<18),o=0,a=i.length>>>0,s=0,l=0;!(1&r);)if(r=H(e,n),n+=3,r>>>1!=0)for(r>>1==1?(s=9,l=5):(n=se(e,n),s=oe,l=ae);;){!t&&a<o+32767&&(a=(i=K(i,o+32767)).length);var u=$(e,n,s),c=r>>>1==1?J[u]:ne[u];if(n+=15&c,(c>>>=4)>>>8&255){if(256==c)break;var f=(c-=257)<8?0:c-4>>2;f>5&&(f=0);var d=o+I[c];f>0&&(d+=$(e,n,f),n+=f),u=$(e,n,l),n+=15&(c=r>>>1==1?Z[u]:re[u]);var h=(c>>>=4)<4?0:c-2>>1,p=F[c];for(h>0&&(p+=$(e,n,h),n+=h),!t&&a<d&&(a=(i=K(i,d+100)).length);o<d;)i[o]=i[o-p],++o}else i[o++]=c}else{7&n&&(n+=8-(7&n));var g=e[n>>>3]|e[(n>>>3)+1]<<8;if(n+=32,g>0)for(!t&&a<o+g&&(a=(i=K(i,o+g)).length);g-- >0;)i[o++]=e[n>>>3],n+=8}return t?[i,n+7>>>3]:[i.slice(0,o),n+7>>>3]}(e.slice(e.l||0),t);return e.l+=n[1],n[0]}function ue(e,t){if(!e)throw new Error(t);"undefined"!=typeof console&&console.error(t)}function ce(e,t){var n=e;kn(n,0);var r={FileIndex:[],FullPaths:[]};d(r,{root:t.root});for(var i=n.length-4;(80!=n[i]||75!=n[i+1]||5!=n[i+2]||6!=n[i+3])&&i>=0;)--i;n.l=i+4,n.l+=4;var a=n._R(2);n.l+=6;var s=n._R(4);for(n.l=s,i=0;i<a;++i){n.l+=20;var l=n._R(4),u=n._R(4),c=n._R(2),f=n._R(2),h=n._R(2);n.l+=8;var p=n._R(4),g=o(n.slice(n.l+c,n.l+c+f));n.l+=c+f+h;var v=n.l;n.l=p+4,fe(n,l,u,r,g),n.l=v}return r}function fe(e,t,n,r,i){e.l+=2;var a=e._R(2),s=e._R(2),l=function(e){var t=65535&e._R(2),n=65535&e._R(2),r=new Date,i=31&n,o=15&(n>>>=5);n>>>=4,r.setMilliseconds(0),r.setFullYear(n+1980),r.setMonth(o-1),r.setDate(i);var a=31&t,s=63&(t>>>=5);return t>>>=6,r.setHours(t),r.setMinutes(s),r.setSeconds(a<<1),r}(e);if(8257&a)throw new Error("Unsupported ZIP encryption");e._R(4);for(var u=e._R(4),c=e._R(4),f=e._R(2),d=e._R(2),h="",p=0;p<f;++p)h+=String.fromCharCode(e[e.l++]);if(d){var g=o(e.slice(e.l,e.l+d));(g[21589]||{}).mt&&(l=g[21589].mt),((i||{})[21589]||{}).mt&&(l=i[21589].mt)}e.l+=d;var v=e.slice(e.l,e.l+u);switch(s){case 8:v=function(e,t){if(!b)return le(e,t);var n=new(0,b.InflateRaw),r=n._processChunk(e.slice(e.l),n._finishFlushFlag);return e.l+=n.bytesRead,r}(e,c);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+s)}var m=!1;8&a&&(134695760==e._R(4)&&(e._R(4),m=!0),u=e._R(4),c=e._R(4)),u!=t&&ue(m,"Bad compressed size: "+t+" != "+u),c!=n&&ue(m,"Bad uncompressed size: "+n+" != "+c),me(r,h,v,{unsafe:!0,mt:l})}var de={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function he(e,t){if(e.ctype)return e.ctype;var n=e.name||"",r=n.match(/\.([^\.]+)$/);return r&&de[r[1]]||t&&(r=(n=t).match(/[\.\\]([^\.\\])+$/))&&de[r[1]]?de[r[1]]:"application/octet-stream"}function pe(e){for(var t=h(e),n=[],r=0;r<t.length;r+=76)n.push(t.slice(r,r+76));return n.join("\r\n")+"\r\n"}function ge(e){var t=e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"="+(1==t.length?"0"+t:t)});"\n"==(t=t.replace(/ $/gm,"=20").replace(/\t$/gm,"=09")).charAt(0)&&(t="=0D"+t.slice(1));for(var n=[],r=(t=t.replace(/\r(?!\n)/gm,"=0D").replace(/\n\n/gm,"\n=0A").replace(/([^\r\n])\n/gm,"$1=0A")).split("\r\n"),i=0;i<r.length;++i){var o=r[i];if(0!=o.length)for(var a=0;a<o.length;){var s=76,l=o.slice(a,a+s);"="==l.charAt(s-1)?s--:"="==l.charAt(s-2)?s-=2:"="==l.charAt(s-3)&&(s-=3),l=o.slice(a,a+s),(a+=s)<o.length&&(l+="="),n.push(l)}else n.push("")}return n.join("\r\n")}function ve(e,t,n){for(var r,i="",o="",a="",s=0;s<10;++s){var l=t[s];if(!l||l.match(/^\s*$/))break;var u=l.match(/^(.*?):\s*([^\s].*)$/);if(u)switch(u[1].toLowerCase()){case"content-location":i=u[2].trim();break;case"content-type":a=u[2].trim();break;case"content-transfer-encoding":o=u[2].trim()}}switch(++s,o.toLowerCase()){case"base64":r=m(p(t.slice(s).join("")));break;case"quoted-printable":r=function(e){for(var t=[],n=0;n<e.length;++n){for(var r=e[n];n<=e.length&&"="==r.charAt(r.length-1);)r=r.slice(0,r.length-1)+e[++n];t.push(r)}for(var i=0;i<t.length;++i)t[i]=t[i].replace(/[=][0-9A-Fa-f]{2}/g,function(e){return String.fromCharCode(parseInt(e.slice(1),16))});return m(t.join("\r\n"))}(t.slice(s));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+o)}var c=me(e,i.slice(n.length),r,{unsafe:!0});a&&(c.ctype=a)}function me(e,t,n,i){var o=i&&i.unsafe;o||d(e);var a=!o&&Re.find(e,t);if(!a){var s=e.FullPaths[0];t.slice(0,s.length)==s?s=t:("/"!=s.slice(-1)&&(s+="/"),s=(s+t).replace("//","/")),a={name:r(t),type:2},e.FileIndex.push(a),e.FullPaths.push(s),o||Re.utils.cfb_gc(e)}return a.content=n,a.size=n?n.length:0,i&&(i.CLSID&&(a.clsid=i.CLSID),i.mt&&(a.mt=i.mt),i.ct&&(a.ct=i.ct)),a}return t.find=function(e,t){var n=e.FullPaths.map(function(e){return e.toUpperCase()}),r=n.map(function(e){var t=e.split("/");return t[t.length-("/"==e.slice(-1)?2:1)]}),i=!1;47===t.charCodeAt(0)?(i=!0,t=n[0].slice(0,-1)+t):i=-1!==t.indexOf("/");var o=t.toUpperCase(),a=!0===i?n.indexOf(o):r.indexOf(o);if(-1!==a)return e.FileIndex[a];var s=!o.match(E);for(o=o.replace(C,""),s&&(o=o.replace(E,"!")),a=0;a<n.length;++a){if((s?n[a].replace(E,"!"):n[a]).replace(C,"")==o)return e.FileIndex[a];if((s?r[a].replace(E,"!"):r[a]).replace(C,"")==o)return e.FileIndex[a]}return null},t.read=function(t,n){switch(n&&n.type||"base64"){case"file":return function(t,n){return a(),s(e.readFileSync(t),n)}(t,n);case"base64":return s(m(p(t)),n);case"binary":return s(m(t),n)}return s(t,n)},t.parse=s,t.write=function(t,n){var r=y(t,n);switch(n&&n.type||"buffer"){case"file":return a(),e.writeFileSync(n.filename,r),r;case"binary":return"string"==typeof r?r:T(r);case"base64":return h("string"==typeof r?r:T(r));case"buffer":case"array":return"string"==typeof r?m(r):r}return r},t.writeFile=function(t,n,r){a();var i=y(t,r);e.writeFileSync(n,i)},t.utils={cfb_new:function(e){var t={};return d(t,e),t},cfb_add:me,cfb_del:function(e,t){d(e);var n=Re.find(e,t);if(n)for(var r=0;r<e.FileIndex.length;++r)if(e.FileIndex[r]==n)return e.FileIndex.splice(r,1),e.FullPaths.splice(r,1),!0;return!1},cfb_mov:function(e,t,n){d(e);var i=Re.find(e,t);if(i)for(var o=0;o<e.FileIndex.length;++o)if(e.FileIndex[o]==i)return e.FileIndex[o].name=r(n),e.FullPaths[o]=n,!0;return!1},cfb_gc:function(e){g(e,!0)},ReadShift:yn,CheckField:En,prep_blob:kn,bconcat:x,use_zlib:function(e){try{var t=new(0,e.InflateRaw);if(t._processChunk(new Uint8Array([3,0]),t._finishFlushFlag),!t.bytesRead)throw new Error("zlib does not expose bytesRead");b=e}catch(n){console.error("cannot use native zlib: "+(n.message||n))}},_deflateRaw:te,_inflateRaw:le,consts:A},t}();if(void 0!==la)try{ge=void 0}catch(Mo){}function je(e){return"string"==typeof e?y(e):Array.isArray(e)?function(e){if("undefined"==typeof Uint8Array)throw new Error("Unsupported");return new Uint8Array(e)}(e):e}function He(e,t,n){if(void 0!==ge&&ge.writeFileSync)return n?ge.writeFileSync(e,t,n):ge.writeFileSync(e,t);if("undefined"!=typeof Deno){if(n&&"string"==typeof t)switch(n){case"utf8":t=new TextEncoder(n).encode(t);break;case"binary":t=y(t);break;default:throw new Error("Unsupported encoding "+n)}return Deno.writeFileSync(e,t)}var r="utf8"==n?Lt(t):t;if("undefined"!=typeof IE_SaveFile)return IE_SaveFile(r,e);if("undefined"!=typeof Blob){var i=new Blob([je(r)],{type:"application/octet-stream"});if("undefined"!=typeof navigator&&navigator.msSaveBlob)return navigator.msSaveBlob(i,e);if("undefined"!=typeof saveAs)return saveAs(i,e);if("undefined"!=typeof URL&&"undefined"!=typeof document&&document.createElement&&URL.createObjectURL){var o=URL.createObjectURL(i);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&"undefined"!=typeof setTimeout&&setTimeout(function(){URL.revokeObjectURL(o)},6e4),chrome.downloads.download({url:o,filename:e,saveAs:!0});var a=document.createElement("a");if(null!=a.download)return a.download=e,a.href=o,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL&&"undefined"!=typeof setTimeout&&setTimeout(function(){URL.revokeObjectURL(o)},6e4),o}}if("undefined"!=typeof $&&"undefined"!=typeof File&&"undefined"!=typeof Folder)try{var s=File(e);return s.open("w"),s.encoding="binary",Array.isArray(t)&&(t=b(t)),s.write(t),s.close(),t}catch(Ce){if(!Ce.message||!Ce.message.match(/onstruct/))throw Ce}throw new Error("cannot save file "+e)}function ze(e){for(var t=Object.keys(e),n=[],r=0;r<t.length;++r)Object.prototype.hasOwnProperty.call(e,t[r])&&n.push(t[r]);return n}function Ue(e){for(var t=[],n=ze(e),r=0;r!==n.length;++r)t[e[n[r]]]=n[r];return t}function $e(e){for(var t=[],n=ze(e),r=0;r!==n.length;++r)t[e[n[r]]]=parseInt(n[r],10);return t}var We=new Date(1899,11,30,0,0,0);function Ve(e,t){return(e.getTime()-(We.getTime()+6e4*(e.getTimezoneOffset()-We.getTimezoneOffset())))/864e5}var Ge=new Date,qe=We.getTime()+6e4*(Ge.getTimezoneOffset()-We.getTimezoneOffset()),Ke=Ge.getTimezoneOffset();function Ye(e){var t=new Date;return t.setTime(24*e*60*60*1e3+qe),t.getTimezoneOffset()!==Ke&&t.setTime(t.getTime()+6e4*(t.getTimezoneOffset()-Ke)),t}function Xe(e){var t=0,n=0,r=!1,i=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!i)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var o=1;o!=i.length;++o)if(i[o]){switch(n=1,o>3&&(r=!0),i[o].slice(i[o].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+i[o].slice(i[o].length-1));case"D":n*=24;case"H":n*=60;case"M":if(!r)throw new Error("Unsupported ISO Duration Field: M");n*=60}t+=n*parseInt(i[o],10)}return t}var Je=new Date("2017-02-19T19:06:09.000Z"),Ze=isNaN(Je.getFullYear())?new Date("2/19/17"):Je,Qe=2017==Ze.getFullYear();function et(e,t){var n=new Date(e);if(Qe)return t>0?n.setTime(n.getTime()+60*n.getTimezoneOffset()*1e3):t<0&&n.setTime(n.getTime()-60*n.getTimezoneOffset()*1e3),n;if(e instanceof Date)return e;if(1917==Ze.getFullYear()&&!isNaN(n.getFullYear())){var r=n.getFullYear();return e.indexOf(""+r)>-1||n.setFullYear(n.getFullYear()+100),n}var i=e.match(/\d+/g)||["2017","2","19","0","0","0"],o=new Date(+i[0],+i[1]-1,+i[2],+i[3]||0,+i[4]||0,+i[5]||0);return e.indexOf("Z")>-1&&(o=new Date(o.getTime()-60*o.getTimezoneOffset()*1e3)),o}function tt(e,t){if("undefined"!=typeof TextDecoder)try{if(t){if(255==e[0]&&254==e[1])return Lt(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return Lt(new TextDecoder("utf-16be").decode(e.slice(2)))}var n={"€":"€","‚":"‚","ƒ":"ƒ","„":"„","…":"…","†":"†","‡":"‡","ˆ":"ˆ","‰":"‰","Š":"Š","‹":"‹","Œ":"Œ","Ž":"Ž","‘":"‘","’":"’","“":"“","”":"”","•":"•","–":"–","—":"—","˜":"˜","™":"™","š":"š","›":"›","œ":"œ","ž":"ž","Ÿ":"Ÿ"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(e){return n[e]||e})}catch(o){}for(var r=[],i=0;i!=e.length;++i)r.push(String.fromCharCode(e[i]));return r.join("")}function nt(e){if("undefined"!=typeof JSON&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if("object"!=typeof e||null==e)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=nt(e[n]));return t}function rt(e,t){for(var n="";n.length<t;)n+=e;return n}function it(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var n=1,r=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return n*=100,""});return isNaN(t=Number(r))?(r=r.replace(/[(](.*)[)]/,function(e,t){return n=-n,t}),isNaN(t=Number(r))?t:t/n):t/n}var ot=["january","february","march","april","may","june","july","august","september","october","november","december"];function at(e){var t=new Date(e),n=new Date(NaN),r=t.getYear(),i=t.getMonth(),o=t.getDate();if(isNaN(o))return n;var a=e.toLowerCase();if(a.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if((a=a.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,"")).length>3&&-1==ot.indexOf(a))return n}else if(a.match(/[a-z]/))return n;return r<0||r>8099?n:(i>0||o>1)&&101!=r?t:e.match(/[^-0-9:,\/\\]/)?n:t}function st(e){return e?e.content&&e.type?tt(e.content,!0):e.data?u(e.data):e.asNodeBuffer&&g?u(e.asNodeBuffer().toString("binary")):e.asBinary?u(e.asBinary()):e._data&&e._data.getContent?u(tt(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function lt(e){if(!e)return null;if(e.data)return l(e.data);if(e.asNodeBuffer&&g)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return"string"==typeof t?l(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function ut(e,t){for(var n=e.FullPaths||ze(e.files),r=t.toLowerCase().replace(/[\/]/g,"\\"),i=r.replace(/\\/g,"/"),o=0;o<n.length;++o){var a=n[o].replace(/^Root Entry[\/]/,"").toLowerCase();if(r==a||i==a)return e.files?e.files[n[o]]:e.FileIndex[o]}return null}function ct(e,t){var n=ut(e,t);if(null==n)throw new Error("Cannot find file "+t+" in zip");return n}function ft(e,t,n){if(!n)return function(e){return e&&".bin"===e.name.slice(-4)?lt(e):st(e)}(ct(e,t));if(!t)return null;try{return ft(e,t)}catch(r){return null}}function dt(e,t,n){if(!n)return st(ct(e,t));if(!t)return null;try{return dt(e,t)}catch(r){return null}}function ht(e){for(var t=e.FullPaths||ze(e.files),n=[],r=0;r<t.length;++r)"/"!=t[r].slice(-1)&&n.push(t[r].replace(/^Root Entry[\/]/,""));return n.sort()}function pt(e,t,n){if(e.FullPaths){var r;if("string"==typeof n)return r=function(e){for(var t=[],n=0,r=e.length+250,i=v(e.length+255),o=0;o<e.length;++o){var a=e.charCodeAt(o);if(a<128)i[n++]=a;else if(a<2048)i[n++]=192|a>>6&31,i[n++]=128|63&a;else if(a>=55296&&a<57344){a=64+(1023&a);var s=1023&e.charCodeAt(++o);i[n++]=240|a>>8&7,i[n++]=128|a>>2&63,i[n++]=128|s>>6&15|(3&a)<<4,i[n++]=128|63&s}else i[n++]=224|a>>12&15,i[n++]=128|a>>6&63,i[n++]=128|63&a;n>r&&(t.push(i.slice(0,n)),n=0,i=v(65535),r=65530)}return t.push(i.slice(0,n)),x(t)}(n),Re.utils.cfb_add(e,t,r);Re.utils.cfb_add(e,t,n)}else e.file(t,n)}function gt(){return Re.utils.cfb_new()}function vt(e,t){if("/"==e.charAt(0))return e.slice(1);var n=t.split("/");"/"!=t.slice(-1)&&n.pop();for(var r=e.split("/");0!==r.length;){var i=r.shift();".."===i?n.pop():"."!==i&&n.push(i)}return n.join("/")}"abacaba".split(/(:?b)/i).length;var mt='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n',yt=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,bt=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/gm,wt=mt.match(bt)?bt:/<[^>]*>/g,xt=/<\w*:/,Ct=/<(\/?)\w+:/;function Et(e,t,n){for(var r={},i=0,o=0;i!==e.length&&32!==(o=e.charCodeAt(i))&&10!==o&&13!==o;++i);if(t||(r[0]=e.slice(0,i)),i===e.length)return r;var a=e.match(yt),s=0,l="",u=0,c="",f="",d=1;if(a)for(u=0;u!=a.length;++u){for(f=a[u],o=0;o!=f.length&&61!==f.charCodeAt(o);++o);for(c=f.slice(0,o).trim();32==f.charCodeAt(o+1);)++o;for(d=34==(i=f.charCodeAt(o+1))||39==i?1:0,l=f.slice(o+1+d,f.length-d),s=0;s!=c.length&&58!==c.charCodeAt(s);++s);if(s===c.length)c.indexOf("_")>0&&(c=c.slice(0,c.indexOf("_"))),r[c]=l,r[c.toLowerCase()]=l;else{var h=(5===s&&"xmlns"===c.slice(0,5)?"xmlns":"")+c.slice(s+1);if(r[h]&&"ext"==c.slice(s-3,s))continue;r[h]=l,r[h.toLowerCase()]=l}}return r}function kt(e){return e.replace(Ct,"<$1")}var St={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},_t=Ue(St),Dt=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/gi,t=/_x([\da-fA-F]{4})_/gi;return function n(r){var i=r+"",o=i.indexOf("<![CDATA[");if(-1==o)return i.replace(e,function(e,t){return St[e]||String.fromCharCode(parseInt(t,e.indexOf("x")>-1?16:10))||e}).replace(t,function(e,t){return String.fromCharCode(parseInt(t,16))});var a=i.indexOf("]]>");return n(i.slice(0,o))+i.slice(o+9,a)+n(i.slice(a+3))}}(),At=/[&<>'"]/g,Tt=/[\u0000-\u0008\u000b-\u001f]/g;function Ot(e){return(e+"").replace(At,function(e){return _t[e]}).replace(Tt,function(e){return"_x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+"_"})}var Pt=/[\u0000-\u001f]/g;function It(e){return(e+"").replace(At,function(e){return _t[e]}).replace(/\n/g,"<br/>").replace(Pt,function(e){return"&#x"+("000"+e.charCodeAt(0).toString(16)).slice(-4)+";"})}function Ft(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}var Bt=function(e){for(var t="",n=0,r=0,i=0,o=0,a=0,s=0;n<e.length;)(r=e.charCodeAt(n++))<128?t+=String.fromCharCode(r):(i=e.charCodeAt(n++),r>191&&r<224?(a=(31&r)<<6,a|=63&i,t+=String.fromCharCode(a)):(o=e.charCodeAt(n++),r<240?t+=String.fromCharCode((15&r)<<12|(63&i)<<6|63&o):(s=((7&r)<<18|(63&i)<<12|(63&o)<<6|63&(a=e.charCodeAt(n++)))-65536,t+=String.fromCharCode(55296+(s>>>10&1023)),t+=String.fromCharCode(56320+(1023&s)))));return t},Lt=function(e){for(var t=[],n=0,r=0,i=0;n<e.length;)switch(r=e.charCodeAt(n++),!0){case r<128:t.push(String.fromCharCode(r));break;case r<2048:t.push(String.fromCharCode(192+(r>>6))),t.push(String.fromCharCode(128+(63&r)));break;case r>=55296&&r<57344:r-=55296,i=e.charCodeAt(n++)-56320+(r<<10),t.push(String.fromCharCode(240+(i>>18&7))),t.push(String.fromCharCode(144+(i>>12&63))),t.push(String.fromCharCode(128+(i>>6&63))),t.push(String.fromCharCode(128+(63&i)));break;default:t.push(String.fromCharCode(224+(r>>12))),t.push(String.fromCharCode(128+(r>>6&63))),t.push(String.fromCharCode(128+(63&r)))}return t.join("")},Nt=function(){var e={};return function(t,n){var r=t+"|"+(n||"");return e[r]?e[r]:e[r]=new RegExp("<(?:\\w+:)?"+t+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+t+">",n||"")}}(),Mt=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[new RegExp("&"+e[0]+";","ig"),e[1]]});return function(t){for(var n=t.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,"\n").replace(/<[^>]*>/g,""),r=0;r<e.length;++r)n=n.replace(e[r][0],e[r][1]);return n}}(),Rt=function(){var e={};return function(t){return void 0!==e[t]?e[t]:e[t]=new RegExp("<(?:vt:)?"+t+">([\\s\\S]*?)</(?:vt:)?"+t+">","g")}}(),jt=/<\/?(?:vt:)?variant>/g,Ht=/<(?:vt:)([^>]*)>([\s\S]*)</;function zt(e,t){var n=Et(e),r=e.match(Rt(n.baseType))||[],i=[];if(r.length!=n.size){if(t.WTF)throw new Error("unexpected vector length "+r.length+" != "+n.size);return i}return r.forEach(function(e){var t=e.replace(jt,"").match(Ht);t&&i.push({v:Bt(t[2]),t:t[1]})}),i}var Ut=/(^\s|\s$|\n)/;function $t(e,t){return"<"+e+(t.match(Ut)?' xml:space="preserve"':"")+">"+t+"</"+e+">"}function Wt(e){return ze(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function Vt(e,t,n){return"<"+e+(null!=n?Wt(n):"")+(null!=t?(t.match(Ut)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function Gt(e,t){try{return e.toISOString().replace(/\.\d*/,"")}catch(me){if(t)throw me}return""}function qt(e){if("string"==typeof e)return e;if("undefined"!=typeof Uint8Array&&e instanceof Uint8Array)return Bt(b(w(e)));throw new Error("Bad input format: expected Buffer or string")}var Kt=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/gm,Yt="http://schemas.openxmlformats.org/package/2006/content-types",Xt="http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",Jt="http://schemas.openxmlformats.org/officeDocument/2006/relationships",Zt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",Qt="http://www.w3.org/2001/XMLSchema-instance",en=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],tn=function(e){for(var t=[],n=0;n<e[0].length;++n)if(e[0][n])for(var r=0,i=e[0][n].length;r<i;r+=10240)t.push.apply(t,e[0][n].slice(r,r+10240));return t},nn=function(e,t,n){for(var r=[],i=t;i<n;i+=2)r.push(String.fromCharCode(hn(e,i)));return r.join("").replace(C,"")},rn=function(e,t,n){for(var r=[],i=t;i<t+n;++i)r.push(("0"+e[i].toString(16)).slice(-2));return r.join("")},on=function(e,t,n){for(var r=[],i=t;i<n;i++)r.push(String.fromCharCode(dn(e,i)));return r.join("")},an=function(e,t){var n=gn(e,t);return n>0?on(e,t+4,t+4+n-1):""},sn=function(e,t){var n=gn(e,t);return n>0?on(e,t+4,t+4+n-1):""},ln=function(e,t){var n=2*gn(e,t);return n>0?on(e,t+4,t+4+n-1):""},un=function(e,t){var n=gn(e,t);return n>0?nn(e,t+4,t+4+n):""},cn=function(e,t){var n=gn(e,t);return n>0?on(e,t+4,t+4+n):""},fn=function(e,t){return function(e,t){for(var n=1-2*(e[t+7]>>>7),r=((127&e[t+7])<<4)+(e[t+6]>>>4&15),i=15&e[t+6],o=5;o>=0;--o)i=256*i+e[t+o];return 2047==r?0==i?n*(1/0):NaN:(0==r?r=-1022:(r-=1023,i+=Math.pow(2,52)),n*Math.pow(2,r-52)*i)}(e,t)};"undefined"!=typeof $cptable&&(nn=function(e,t,n){return $cptable.utils.decode(1200,e.slice(t,n)).replace(C,"")},on=function(e,t,n){return $cptable.utils.decode(65001,e.slice(t,n))},an=function(e,t){var r=gn(e,t);return r>0?$cptable.utils.decode(n,e.slice(t+4,t+4+r-1)):""},sn=function(e,n){var r=gn(e,n);return r>0?$cptable.utils.decode(t,e.slice(n+4,n+4+r-1)):""},ln=function(e,t){var n=2*gn(e,t);return n>0?$cptable.utils.decode(1200,e.slice(t+4,t+4+n-1)):""},un=function(e,t){var n=gn(e,t);return n>0?$cptable.utils.decode(1200,e.slice(t+4,t+4+n)):""},cn=function(e,t){var n=gn(e,t);return n>0?$cptable.utils.decode(65001,e.slice(t+4,t+4+n)):""});var dn=function(e,t){return e[t]},hn=function(e,t){return 256*e[t+1]+e[t]},pn=function(e,t){var n=256*e[t+1]+e[t];return n<32768?n:-1*(65535-n+1)},gn=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},vn=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},mn=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function yn(e,n){var r,i,o,a,s,l,u="",f=[];switch(n){case"dbcs":for(l=this.l,s=0;s<e;++s)u+=String.fromCharCode(hn(this,l)),l+=2;e*=2;break;case"utf8":u=on(this,this.l,this.l+e);break;case"utf16le":e*=2,u=nn(this,this.l,this.l+e);break;case"wstr":if("undefined"==typeof $cptable)return yn.call(this,e,"dbcs");u=$cptable.utils.decode(t,this.slice(this.l,this.l+2*e)),e*=2;break;case"lpstr-ansi":u=an(this,this.l),e=4+gn(this,this.l);break;case"lpstr-cp":u=sn(this,this.l),e=4+gn(this,this.l);break;case"lpwstr":u=ln(this,this.l),e=4+2*gn(this,this.l);break;case"lpp4":e=4+gn(this,this.l),u=un(this,this.l),2&e&&(e+=2);break;case"8lpp4":e=4+gn(this,this.l),u=cn(this,this.l),3&e&&(e+=4-(3&e));break;case"cstr":for(e=0,u="";0!==(o=dn(this,this.l+e++));)f.push(c(o));u=f.join("");break;case"_wstr":for(e=0,u="";0!==(o=hn(this,this.l+e));)f.push(c(o)),e+=2;e+=2,u=f.join("");break;case"dbcs-cont":for(u="",l=this.l,s=0;s<e;++s){if(this.lens&&-1!==this.lens.indexOf(l))return o=dn(this,l),this.l=l+1,a=yn.call(this,e-s,o?"dbcs-cont":"sbcs-cont"),f.join("")+a;f.push(c(hn(this,l))),l+=2}u=f.join(""),e*=2;break;case"cpstr":if("undefined"!=typeof $cptable){u=$cptable.utils.decode(t,this.slice(this.l,this.l+e));break}case"sbcs-cont":for(u="",l=this.l,s=0;s!=e;++s){if(this.lens&&-1!==this.lens.indexOf(l))return o=dn(this,l),this.l=l+1,a=yn.call(this,e-s,o?"dbcs-cont":"sbcs-cont"),f.join("")+a;f.push(c(dn(this,l))),l+=1}u=f.join("");break;default:switch(e){case 1:return r=dn(this,this.l),this.l++,r;case 2:return r=("i"===n?pn:hn)(this,this.l),this.l+=2,r;case 4:case-4:return"i"!==n&&128&this[this.l+3]?(i=gn(this,this.l),this.l+=4,i):(r=(e>0?vn:mn)(this,this.l),this.l+=4,r);case 8:case-8:if("f"===n)return i=8==e?fn(this,this.l):fn([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,i;e=8;case 16:u=rn(this,this.l,e)}}return this.l+=e,u}var bn=function(e,t,n){e[n]=255&t,e[n+1]=t>>>8&255,e[n+2]=t>>>16&255,e[n+3]=t>>>24&255},wn=function(e,t,n){e[n]=255&t,e[n+1]=t>>8&255,e[n+2]=t>>16&255,e[n+3]=t>>24&255},xn=function(e,t,n){e[n]=255&t,e[n+1]=t>>>8&255};function Cn(e,t,r){var i=0,o=0;if("dbcs"===r){for(o=0;o!=t.length;++o)xn(this,t.charCodeAt(o),this.l+2*o);i=2*t.length}else if("sbcs"===r){if("undefined"!=typeof $cptable&&874==n)for(o=0;o!=t.length;++o){var a=$cptable.utils.encode(n,t.charAt(o));this[this.l+o]=a[0]}else for(t=t.replace(/[^\x00-\x7F]/g,"_"),o=0;o!=t.length;++o)this[this.l+o]=255&t.charCodeAt(o);i=t.length}else{if("hex"===r){for(;o<e;++o)this[this.l++]=parseInt(t.slice(2*o,2*o+2),16)||0;return this}if("utf16le"===r){var s=Math.min(this.l+e,this.length);for(o=0;o<Math.min(t.length,e);++o){var l=t.charCodeAt(o);this[this.l++]=255&l,this[this.l++]=l>>8}for(;this.l<s;)this[this.l++]=0;return this}switch(e){case 1:i=1,this[this.l]=255&t;break;case 2:i=2,this[this.l]=255&t,t>>>=8,this[this.l+1]=255&t;break;case 3:i=3,this[this.l]=255&t,t>>>=8,this[this.l+1]=255&t,t>>>=8,this[this.l+2]=255&t;break;case 4:i=4,bn(this,t,this.l);break;case 8:if(i=8,"f"===r){!function(e,t,n){var r=(t<0||1/t==-1/0?1:0)<<7,i=0,o=0,a=r?-t:t;isFinite(a)?0==a?i=o=0:(i=Math.floor(Math.log(a)/Math.LN2),o=a*Math.pow(2,52-i),i<=-1023&&(!isFinite(o)||o<Math.pow(2,52))?i=-1022:(o-=Math.pow(2,52),i+=1023)):(i=2047,o=isNaN(t)?26985:0);for(var s=0;s<=5;++s,o/=256)e[n+s]=255&o;e[n+6]=(15&i)<<4|15&o,e[n+7]=i>>4|r}(this,t,this.l);break}case 16:break;case-4:i=4,wn(this,t,this.l)}}return this.l+=i,this}function En(e,t){var n=rn(this,this.l,e.length>>1);if(n!==e)throw new Error(t+"Expected "+e+" saw "+n);this.l+=e.length>>1}function kn(e,t){e.l=t,e._R=yn,e.chk=En,e._W=Cn}function Sn(e){var t=v(e);return kn(t,0),t}function _n(e){return parseInt(function(e){return e.replace(/\$(\d+)$/,"$1")}(e),10)-1}function Dn(e){return""+(e+1)}function An(e){for(var t=function(e){return e.replace(/^\$([A-Z])/,"$1")}(e),n=0,r=0;r!==t.length;++r)n=26*n+t.charCodeAt(r)-64;return n-1}function Tn(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function On(e){for(var t=0,n=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);i>=48&&i<=57?t=10*t+(i-48):i>=65&&i<=90&&(n=26*n+(i-64))}return{c:n-1,r:t-1}}function Pn(e){for(var t=e.c+1,n="";t;t=(t-1)/26|0)n=String.fromCharCode((t-1)%26+65)+n;return n+(e.r+1)}function In(e){var t=e.indexOf(":");return-1==t?{s:On(e),e:On(e)}:{s:On(e.slice(0,t)),e:On(e.slice(t+1))}}function Fn(e,t){return void 0===t||"number"==typeof t?Fn(e.s,e.e):("string"!=typeof e&&(e=Pn(e)),"string"!=typeof t&&(t=Pn(t)),e==t?e:e+":"+t)}function Bn(e){var t={s:{c:0,r:0},e:{c:0,r:0}},n=0,r=0,i=0,o=e.length;for(n=0;r<o&&!((i=e.charCodeAt(r)-64)<1||i>26);++r)n=26*n+i;for(t.s.c=--n,n=0;r<o&&!((i=e.charCodeAt(r)-48)<0||i>9);++r)n=10*n+i;if(t.s.r=--n,r===o||10!=i)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++r,n=0;r!=o&&!((i=e.charCodeAt(r)-64)<1||i>26);++r)n=26*n+i;for(t.e.c=--n,n=0;r!=o&&!((i=e.charCodeAt(r)-48)<0||i>9);++r)n=10*n+i;return t.e.r=--n,t}function Ln(e,t,n){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&n&&n.dateNF&&(e.z=n.dateNF),"e"==e.t?Hn[e.v]||e.v:function(e,t){var n="d"==e.t&&t instanceof Date;if(null!=e.z)try{return e.w=fe(e.z,n?Ve(t):t)}catch(r){}try{return e.w=fe((e.XF||{}).numFmtId||(n?14:0),n?Ve(t):t)}catch(r){return""+t}}(e,null==t?e.v:t))}function Nn(e,t){var n=t&&t.sheet?t.sheet:"Sheet1",r={};return r[n]=e,{SheetNames:[n],Sheets:r}}function Mn(e,t,n){var r=n||{},i=e?Array.isArray(e):r.dense,o=e||(i?[]:{}),a=0,s=0;if(o&&null!=r.origin){if("number"==typeof r.origin)a=r.origin;else{var l="string"==typeof r.origin?On(r.origin):r.origin;a=l.r,s=l.c}o["!ref"]||(o["!ref"]="A1:A1")}var u={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(o["!ref"]){var c=Bn(o["!ref"]);u.s.c=c.s.c,u.s.r=c.s.r,u.e.c=Math.max(u.e.c,c.e.c),u.e.r=Math.max(u.e.r,c.e.r),-1==a&&(u.e.r=a=c.e.r+1)}for(var f=0;f!=t.length;++f)if(t[f]){if(!Array.isArray(t[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var d=0;d!=t[f].length;++d)if(void 0!==t[f][d]){var h={v:t[f][d]},p=a+f,g=s+d;if(u.s.r>p&&(u.s.r=p),u.s.c>g&&(u.s.c=g),u.e.r<p&&(u.e.r=p),u.e.c<g&&(u.e.c=g),!t[f][d]||"object"!=typeof t[f][d]||Array.isArray(t[f][d])||t[f][d]instanceof Date)if(Array.isArray(h.v)&&(h.f=t[f][d][1],h.v=h.v[0]),null===h.v)if(h.f)h.t="n";else if(r.nullError)h.t="e",h.v=0;else{if(!r.sheetStubs)continue;h.t="z"}else"number"==typeof h.v?h.t="n":"boolean"==typeof h.v?h.t="b":h.v instanceof Date?(h.z=r.dateNF||F[14],r.cellDates?(h.t="d",h.w=fe(h.z,Ve(h.v))):(h.t="n",h.v=Ve(h.v),h.w=fe(h.z,h.v))):h.t="s";else h=t[f][d];if(i)o[p]||(o[p]=[]),o[p][g]&&o[p][g].z&&(h.z=o[p][g].z),o[p][g]=h;else{var v=Pn({c:g,r:p});o[v]&&o[v].z&&(h.z=o[v].z),o[v]=h}}}return u.s.c<1e7&&(o["!ref"]=Fn(u)),o}function Rn(e,t){return Mn(null,e,t)}var jn=nt([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].map(function(e){return[e>>16&255,e>>8&255,255&e]})),Hn={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},zn={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},Un={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},$n={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function Wn(e,t){var n,r=function(e){for(var t=[],n=ze(e),r=0;r!==n.length;++r)null==t[e[n[r]]]&&(t[e[n[r]]]=[]),t[e[n[r]]].push(n[r]);return t}(Un),i=[];i[i.length]=mt,i[i.length]=Vt("Types",null,{xmlns:Yt,"xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":Qt}),i=i.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(e){return Vt("Default",null,{Extension:e[0],ContentType:e[1]})}));var o=function(r){e[r]&&e[r].length>0&&(n=e[r][0],i[i.length]=Vt("Override",null,{PartName:("/"==n[0]?"":"/")+n,ContentType:$n[r][t.bookType]||$n[r].xlsx}))},a=function(n){(e[n]||[]).forEach(function(e){i[i.length]=Vt("Override",null,{PartName:("/"==e[0]?"":"/")+e,ContentType:$n[n][t.bookType]||$n[n].xlsx})})},s=function(t){(e[t]||[]).forEach(function(e){i[i.length]=Vt("Override",null,{PartName:("/"==e[0]?"":"/")+e,ContentType:r[t][0]})})};return o("workbooks"),a("sheets"),a("charts"),s("themes"),["strs","styles"].forEach(o),["coreprops","extprops","custprops"].forEach(s),s("vba"),s("comments"),s("threadedcomments"),s("drawings"),a("metadata"),s("people"),i.length>2&&(i[i.length]="</Types>",i[1]=i[1].replace("/>",">")),i.join("")}var Vn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function Gn(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function qn(e,t){var n={"!id":{}};if(!e)return n;"/"!==t.charAt(0)&&(t="/"+t);var r={};return(e.match(wt)||[]).forEach(function(e){var i=Et(e);if("<Relationship"===i[0]){var o={};o.Type=i.Type,o.Target=i.Target,o.Id=i.Id,i.TargetMode&&(o.TargetMode=i.TargetMode);var a="External"===i.TargetMode?i.Target:vt(i.Target,t);n[a]=o,r[i.Id]=o}}),n["!id"]=r,n}function Kn(e){var t=[mt,Vt("Relationships",null,{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"})];return ze(e["!id"]).forEach(function(n){t[t.length]=Vt("Relationship",null,e["!id"][n])}),t.length>2&&(t[t.length]="</Relationships>",t[1]=t[1].replace("/>",">")),t.join("")}function Yn(e,t,n,r,i,o){if(i||(i={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),t<0)for(t=e["!idx"];e["!id"]["rId"+t];++t);if(e["!idx"]=t+1,i.Id="rId"+t,i.Type=r,i.Target=n,[Vn.HLINK,Vn.XPATH,Vn.XMISS].indexOf(i.Type)>-1&&(i.TargetMode="External"),e["!id"][i.Id])throw new Error("Cannot rewrite rId "+t);return e["!id"][i.Id]=i,e[("/"+i.Target).replace("//","/")]=i,t}function Xn(e,t,n){return[' <rdf:Description rdf:about="'+e+'">\n',' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(n||"odf")+"#"+t+'"/>\n'," </rdf:Description>\n"].join("")}function Jn(e,t){return[' <rdf:Description rdf:about="'+e+'">\n',' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+t+'"/>\n'," </rdf:Description>\n"].join("")}function Zn(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+e.version+"</meta:generator></office:meta></office:document-meta>"}var Qn=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],er=function(){for(var e=new Array(Qn.length),t=0;t<Qn.length;++t){var n=Qn[t],r="(?:"+n[0].slice(0,n[0].indexOf(":"))+":)"+n[0].slice(n[0].indexOf(":")+1);e[t]=new RegExp("<"+r+"[^>]*>([\\s\\S]*?)</"+r+">")}return e}();function tr(e){var t={};e=Bt(e);for(var n=0;n<Qn.length;++n){var r=Qn[n],i=e.match(er[n]);null!=i&&i.length>0&&(t[r[1]]=Dt(i[1])),"date"===r[2]&&t[r[1]]&&(t[r[1]]=et(t[r[1]]))}return t}function nr(e,t,n,r,i){null==i[e]&&null!=t&&""!==t&&(i[e]=t,t=Ot(t),r[r.length]=n?Vt(e,t,n):$t(e,t))}function rr(e,t){var n=t||{},r=[mt,Vt("cp:coreProperties",null,{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":Qt})],i={};if(!e&&!n.Props)return r.join("");e&&(null!=e.CreatedDate&&nr("dcterms:created","string"==typeof e.CreatedDate?e.CreatedDate:Gt(e.CreatedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},r,i),null!=e.ModifiedDate&&nr("dcterms:modified","string"==typeof e.ModifiedDate?e.ModifiedDate:Gt(e.ModifiedDate,n.WTF),{"xsi:type":"dcterms:W3CDTF"},r,i));for(var o=0;o!=Qn.length;++o){var a=Qn[o],s=n.Props&&null!=n.Props[a[1]]?n.Props[a[1]]:e?e[a[1]]:null;!0===s?s="1":!1===s?s="0":"number"==typeof s&&(s=String(s)),null!=s&&nr(a[0],s,null,r,i)}return r.length>2&&(r[r.length]="</cp:coreProperties>",r[1]=r[1].replace("/>",">")),r.join("")}var ir=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function or(e){var t=[],n=Vt;return e||(e={}),e.Application="SheetJS",t[t.length]=mt,t[t.length]=Vt("Properties",null,{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":Zt}),ir.forEach(function(r){if(void 0!==e[r[1]]){var i;switch(r[2]){case"string":i=Ot(String(e[r[1]]));break;case"bool":i=e[r[1]]?"true":"false"}void 0!==i&&(t[t.length]=n(r[0],i))}}),t[t.length]=n("HeadingPairs",n("vt:vector",n("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+n("vt:variant",n("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),t[t.length]=n("TitlesOfParts",n("vt:vector",e.SheetNames.map(function(e){return"<vt:lpstr>"+Ot(e)+"</vt:lpstr>"}).join(""),{size:e.Worksheets,baseType:"lpstr"})),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var ar=/<[^>]+>[^<]*/g;function sr(e){var t=[mt,Vt("Properties",null,{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties","xmlns:vt":Zt})];if(!e)return t.join("");var n=1;return ze(e).forEach(function(r){++n,t[t.length]=Vt("property",function(e){switch(typeof e){case"string":return Vt("vt:lpwstr",Ot(e)).replace(/&quot;/g,"_x0022_");case"number":return Vt((0|e)==e?"vt:i4":"vt:r8",Ot(String(e)));case"boolean":return Vt("vt:bool",e?"true":"false")}if(e instanceof Date)return Vt("vt:filetime",Gt(e));throw new Error("Unable to serialize "+e)}(e[r]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:n,name:Ot(r)})}),t.length>2&&(t[t.length]="</Properties>",t[1]=t[1].replace("/>",">")),t.join("")}var lr=[2,3,48,49,131,139,140,245],ur=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=Ue({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(t,n){var r=n||{};r.dateNF||(r.dateNF="yyyymmdd");var i=Rn(function(t,n){var r=[],i=v(1);switch(n.type){case"base64":i=m(p(t));break;case"binary":i=m(t);break;case"buffer":case"array":i=t}kn(i,0);var o=i._R(1),a=!!(136&o),s=!1,l=!1;switch(o){case 2:case 3:case 131:case 139:case 245:break;case 48:case 49:s=!0,a=!0;break;case 140:l=!0;break;default:throw new Error("DBF Unsupported Version: "+o.toString(16))}var u=0,c=521;2==o&&(u=i._R(2)),i.l+=3,2!=o&&(u=i._R(4)),u>1048576&&(u=1e6),2!=o&&(c=i._R(2));var f=i._R(2),d=n.codepage||1252;2!=o&&(i.l+=16,i._R(1),0!==i[i.l]&&(d=e[i[i.l]]),i.l+=1,i.l+=2),l&&(i.l+=36);for(var h=[],g={},y=Math.min(i.length,2==o?521:c-10-(s?264:0)),b=l?32:11;i.l<y&&13!=i[i.l];)switch((g={}).name=$cptable.utils.decode(d,i.slice(i.l,i.l+b)).replace(/[\u0000\r\n].*$/g,""),i.l+=b,g.type=String.fromCharCode(i._R(1)),2==o||l||(g.offset=i._R(4)),g.len=i._R(1),2==o&&(g.offset=i._R(2)),g.dec=i._R(1),g.name.length&&h.push(g),2!=o&&(i.l+=l?13:14),g.type){case"B":s&&8==g.len||!n.WTF||console.log("Skipping "+g.name+":"+g.type);break;case"G":case"P":n.WTF&&console.log("Skipping "+g.name+":"+g.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+g.type)}if(13!==i[i.l]&&(i.l=c-1),13!==i._R(1))throw new Error("DBF Terminator not found "+i.l+" "+i[i.l]);i.l=c;var w=0,x=0;for(r[0]=[],x=0;x!=h.length;++x)r[0][x]=h[x].name;for(;u-- >0;)if(42!==i[i.l])for(++i.l,r[++w]=[],x=0,x=0;x!=h.length;++x){var C=i.slice(i.l,i.l+h[x].len);i.l+=h[x].len,kn(C,0);var E=$cptable.utils.decode(d,C);switch(h[x].type){case"C":E.trim().length&&(r[w][x]=E.replace(/\s+$/,""));break;case"D":8===E.length?r[w][x]=new Date(+E.slice(0,4),+E.slice(4,6)-1,+E.slice(6,8)):r[w][x]=E;break;case"F":r[w][x]=parseFloat(E.trim());break;case"+":case"I":r[w][x]=l?2147483648^C._R(-4,"i"):C._R(4,"i");break;case"L":switch(E.trim().toUpperCase()){case"Y":case"T":r[w][x]=!0;break;case"N":case"F":r[w][x]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+E+"|")}break;case"M":if(!a)throw new Error("DBF Unexpected MEMO for type "+o.toString(16));r[w][x]="##MEMO##"+(l?parseInt(E.trim(),10):C._R(4));break;case"N":(E=E.replace(/\u0000/g,"").trim())&&"."!=E&&(r[w][x]=+E||0);break;case"@":r[w][x]=new Date(C._R(-8,"f")-621356832e5);break;case"T":r[w][x]=new Date(864e5*(C._R(4)-2440588)+C._R(4));break;case"Y":r[w][x]=C._R(4,"i")/1e4+C._R(4,"i")/1e4*Math.pow(2,32);break;case"O":r[w][x]=-C._R(-8,"f");break;case"B":if(s&&8==h[x].len){r[w][x]=C._R(8,"f");break}case"G":case"P":C.l+=h[x].len;break;case"0":if("_NullFlags"===h[x].name)break;default:throw new Error("DBF Unsupported data type "+h[x].type)}}else i.l+=f;if(2!=o&&i.l<i.length&&26!=i[i.l++])throw new Error("DBF EOF Marker missing "+(i.l-1)+" of "+i.length+" "+i[i.l-1].toString(16));return n&&n.sheetRows&&(r=r.slice(0,n.sheetRows)),n.DBF=h,r}(t,r),r);return i["!cols"]=r.DBF.map(function(e){return{wch:e.len,DBF:e}}),delete r.DBF,i}var i={B:8,C:250,L:1,D:8,"?":0,"":0};return{to_workbook:function(e,t){try{return Nn(r(e,t),t)}catch(me){if(t&&t.WTF)throw me}return{SheetNames:[],Sheets:{}}},to_sheet:r,from_sheet:function(e,r){var o=r||{};if(+o.codepage>=0&&a(+o.codepage),"string"==o.type)throw new Error("Cannot write DBF to JS string");var s=function(){var e=[],t=2048,n=function(e){var t=Sn(e);return kn(t,0),t},r=n(t),i=function(){r&&(r.length>r.l&&((r=r.slice(0,r.l)).l=r.length),r.length>0&&e.push(r),r=null)},o=function(e){return r&&e<r.length-r.l?r:(i(),r=n(Math.max(e+1,t)))};return{next:o,push:function(e){i(),null==(r=e).l&&(r.l=r.length),o(t)},end:function(){return i(),x(e)},_bufs:e}}(),l=Ao(e,{header:1,raw:!0,cellDates:!0}),u=l[0],c=l.slice(1),f=e["!cols"]||[],d=0,h=0,p=0,g=1;for(d=0;d<u.length;++d)if(((f[d]||{}).DBF||{}).name)u[d]=f[d].DBF.name,++p;else if(null!=u[d]){if(++p,"number"==typeof u[d]&&(u[d]=u[d].toString(10)),"string"!=typeof u[d])throw new Error("DBF Invalid column name "+u[d]+" |"+typeof u[d]+"|");if(u.indexOf(u[d])!==d)for(h=0;h<1024;++h)if(-1==u.indexOf(u[d]+"_"+h)){u[d]+="_"+h;break}}var v=Bn(e["!ref"]),m=[],y=[],b=[];for(d=0;d<=v.e.c-v.s.c;++d){var w="",C="",E=0,k=[];for(h=0;h<c.length;++h)null!=c[h][d]&&k.push(c[h][d]);if(0!=k.length&&null!=u[d]){for(h=0;h<k.length;++h){switch(typeof k[h]){case"number":C="B";break;case"string":default:C="C";break;case"boolean":C="L";break;case"object":C=k[h]instanceof Date?"D":"C"}E=Math.max(E,String(k[h]).length),w=w&&w!=C?"C":C}E>250&&(E=250),"C"==(C=((f[d]||{}).DBF||{}).type)&&f[d].DBF.len>E&&(E=f[d].DBF.len),"B"==w&&"N"==C&&(w="N",b[d]=f[d].DBF.dec,E=f[d].DBF.len),y[d]="C"==w||"N"==C?E:i[w]||0,g+=y[d],m[d]=w}else m[d]="?"}var S=s.next(32);for(S._W(4,318902576),S._W(4,c.length),S._W(2,296+32*p),S._W(2,g),d=0;d<4;++d)S._W(4,0);for(S._W(4,(+t[n]||3)<<8),d=0,h=0;d<u.length;++d)if(null!=u[d]){var _=s.next(32),D=(u[d].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);_._W(1,D,"sbcs"),_._W(1,"?"==m[d]?"C":m[d],"sbcs"),_._W(4,h),_._W(1,y[d]||i[m[d]]||0),_._W(1,b[d]||0),_._W(1,2),_._W(4,0),_._W(1,0),_._W(4,0),_._W(4,0),h+=y[d]||i[m[d]]||0}var A=s.next(264);for(A._W(4,13),d=0;d<65;++d)A._W(4,0);for(d=0;d<c.length;++d){var T=s.next(g);for(T._W(1,0),h=0;h<u.length;++h)if(null!=u[h])switch(m[h]){case"L":T._W(1,null==c[d][h]?63:c[d][h]?84:70);break;case"B":T._W(8,c[d][h]||0,"f");break;case"N":var O="0";for("number"==typeof c[d][h]&&(O=c[d][h].toFixed(b[h]||0)),p=0;p<y[h]-O.length;++p)T._W(1,32);T._W(1,O,"sbcs");break;case"D":c[d][h]?(T._W(4,("0000"+c[d][h].getFullYear()).slice(-4),"sbcs"),T._W(2,("00"+(c[d][h].getMonth()+1)).slice(-2),"sbcs"),T._W(2,("00"+c[d][h].getDate()).slice(-2),"sbcs")):T._W(8,"00000000","sbcs");break;case"C":var P=String(null!=c[d][h]?c[d][h]:"").slice(0,y[h]);for(T._W(1,P,"sbcs"),p=0;p<y[h]-P.length;++p)T._W(1,32)}}return s.next(1)._W(1,26),s.end()}}}(),cr=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("N("+ze(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),n=function(t,n){var r=e[n];return"number"==typeof r?f(r):r},r=function(e,t,n){var r=t.charCodeAt(0)-32<<4|n.charCodeAt(0)-48;return 59==r?e:f(r)};function i(e,i){var o,s=e.split(/[\n\r]+/),l=-1,u=-1,c=0,f=0,d=[],h=[],p=null,g={},v=[],m=[],y=[],b=0;for(+i.codepage>=0&&a(+i.codepage);c!==s.length;++c){b=0;var w,x=s[c].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,r).replace(t,n),C=x.replace(/;;/g,"\0").split(";").map(function(e){return e.replace(/\u0000/g,";")}),E=C[0];if(x.length>0)switch(E){case"ID":case"E":case"B":case"O":case"W":break;case"P":"P"==C[1].charAt(0)&&h.push(x.slice(3).replace(/;;/g,";"));break;case"C":var k=!1,S=!1,_=!1,D=!1,A=-1,T=-1;for(f=1;f<C.length;++f)switch(C[f].charAt(0)){case"A":case"G":break;case"X":u=parseInt(C[f].slice(1))-1,S=!0;break;case"Y":for(l=parseInt(C[f].slice(1))-1,S||(u=0),o=d.length;o<=l;++o)d[o]=[];break;case"K":'"'===(w=C[f].slice(1)).charAt(0)?w=w.slice(1,w.length-1):"TRUE"===w?w=!0:"FALSE"===w?w=!1:isNaN(it(w))?isNaN(at(w).getDate())||(w=et(w)):(w=it(w),null!==p&&le(p)&&(w=Ye(w))),"undefined"!=typeof $cptable&&"string"==typeof w&&"string"!=(i||{}).type&&(i||{}).codepage&&(w=$cptable.utils.decode(i.codepage,w)),k=!0;break;case"E":D=!0;var O=ni(C[f].slice(1),{r:l,c:u});d[l][u]=[d[l][u],O];break;case"S":_=!0,d[l][u]=[d[l][u],"S5S"];break;case"R":A=parseInt(C[f].slice(1))-1;break;case"C":T=parseInt(C[f].slice(1))-1;break;default:if(i&&i.WTF)throw new Error("SYLK bad record "+x)}if(k&&(d[l][u]&&2==d[l][u].length?d[l][u][0]=w:d[l][u]=w,p=null),_){if(D)throw new Error("SYLK shared formula cannot have own formula");var P=A>-1&&d[A][T];if(!P||!P[1])throw new Error("SYLK shared formula cannot find base");d[l][u][1]=oi(P[1],{r:l-A,c:u-T})}break;case"F":var I=0;for(f=1;f<C.length;++f)switch(C[f].charAt(0)){case"X":u=parseInt(C[f].slice(1))-1,++I;break;case"Y":for(l=parseInt(C[f].slice(1))-1,o=d.length;o<=l;++o)d[o]=[];break;case"M":b=parseInt(C[f].slice(1))/20;break;case"F":case"G":case"S":case"D":case"N":break;case"P":p=h[parseInt(C[f].slice(1))];break;case"W":for(y=C[f].slice(1).split(" "),o=parseInt(y[0],10);o<=parseInt(y[1],10);++o)b=parseInt(y[2],10),m[o-1]=0===b?{hidden:!0}:{wch:b},Ir(m[o-1]);break;case"C":m[u=parseInt(C[f].slice(1))-1]||(m[u]={});break;case"R":v[l=parseInt(C[f].slice(1))-1]||(v[l]={}),b>0?(v[l].hpt=b,v[l].hpx=Lr(b)):0===b&&(v[l].hidden=!0);break;default:if(i&&i.WTF)throw new Error("SYLK bad record "+x)}I<1&&(p=null);break;default:if(i&&i.WTF)throw new Error("SYLK bad record "+x)}}return v.length>0&&(g["!rows"]=v),m.length>0&&(g["!cols"]=m),i&&i.sheetRows&&(d=d.slice(0,i.sheetRows)),[d,g]}function o(e,t){var n=function(e,t){switch(t.type){case"base64":return i(p(e),t);case"binary":return i(e,t);case"buffer":return i(b(e),t);case"array":return i(tt(e),t)}throw new Error("Unrecognized type "+t.type)}(e,t),r=n[0],o=n[1],a=Rn(r,t);return ze(o).forEach(function(e){a[e]=o[e]}),a}function s(e,t,n,r){var i="C;Y"+(n+1)+";X"+(r+1)+";K";switch(e.t){case"n":i+=e.v||0,e.f&&!e.F&&(i+=";E"+ii(e.f,{r:n,c:r}));break;case"b":i+=e.v?"TRUE":"FALSE";break;case"e":i+=e.w||e.v;break;case"d":i+='"'+(e.w||e.v)+'"';break;case"s":i+='"'+e.v.replace(/"/g,"").replace(/;/g,";;")+'"'}return i}return e["|"]=254,{to_workbook:function(e,t){return Nn(o(e,t),t)},to_sheet:o,from_sheet:function(e,t){var n,r=["ID;PWXL;N;E"],i=[],o=Bn(e["!ref"]),a=Array.isArray(e),l="\r\n";r.push("P;PGeneral"),r.push("F;P0;DG0G8;M255"),e["!cols"]&&function(e,t){t.forEach(function(t,n){var r="F;W"+(n+1)+" "+(n+1)+" ";t.hidden?r+="0":("number"!=typeof t.width||t.wpx||(t.wpx=Dr(t.width)),"number"!=typeof t.wpx||t.wch||(t.wch=Ar(t.wpx)),"number"==typeof t.wch&&(r+=Math.round(t.wch)))," "!=r.charAt(r.length-1)&&e.push(r)})}(r,e["!cols"]),e["!rows"]&&function(e,t){t.forEach(function(t,n){var r="F;";t.hidden?r+="M0;":t.hpt?r+="M"+20*t.hpt+";":t.hpx&&(r+="M"+20*Br(t.hpx)+";"),r.length>2&&e.push(r+"R"+(n+1))})}(r,e["!rows"]),r.push("B;Y"+(o.e.r-o.s.r+1)+";X"+(o.e.c-o.s.c+1)+";D"+[o.s.c,o.s.r,o.e.c,o.e.r].join(" "));for(var u=o.s.r;u<=o.e.r;++u)for(var c=o.s.c;c<=o.e.c;++c){var f=Pn({r:u,c});(n=a?(e[u]||[])[c]:e[f])&&(null!=n.v||n.f&&!n.F)&&i.push(s(n,0,u,c))}return r.join(l)+l+i.join(l)+l+"E"+l}}}(),fr=function(){function e(e,t){for(var n=e.split("\n"),r=-1,i=-1,o=0,a=[];o!==n.length;++o)if("BOT"!==n[o].trim()){if(!(r<0)){for(var s=n[o].trim().split(","),l=s[0],u=s[1],c=n[++o]||"";1&(c.match(/["]/g)||[]).length&&o<n.length-1;)c+="\n"+n[++o];switch(c=c.trim(),+l){case-1:if("BOT"===c){a[++r]=[],i=0;continue}if("EOD"!==c)throw new Error("Unrecognized DIF special command "+c);break;case 0:"TRUE"===c?a[r][i]=!0:"FALSE"===c?a[r][i]=!1:isNaN(it(u))?isNaN(at(u).getDate())?a[r][i]=u:a[r][i]=et(u):a[r][i]=it(u),++i;break;case 1:(c=(c=c.slice(1,c.length-1)).replace(/""/g,'"'))&&c.match(/^=".*"$/)&&(c=c.slice(2,-1)),a[r][i++]=""!==c?c:null}if("EOD"===c)break}}else a[++r]=[],i=0;return t&&t.sheetRows&&(a=a.slice(0,t.sheetRows)),a}function t(t,n){return Rn(function(t,n){switch(n.type){case"base64":return e(p(t),n);case"binary":return e(t,n);case"buffer":return e(b(t),n);case"array":return e(tt(t),n)}throw new Error("Unrecognized type "+n.type)}(t,n),n)}return{to_workbook:function(e,n){return Nn(t(e,n),n)},to_sheet:t,from_sheet:function(){var e=function(e,t,n,r,i){e.push(t),e.push(n+","+r),e.push('"'+i.replace(/"/g,'""')+'"')},t=function(e,t,n,r){e.push(t+","+n),e.push(1==t?'"'+r.replace(/"/g,'""')+'"':r)};return function(n){var r,i=[],o=Bn(n["!ref"]),a=Array.isArray(n);e(i,"TABLE",0,1,"sheetjs"),e(i,"VECTORS",0,o.e.r-o.s.r+1,""),e(i,"TUPLES",0,o.e.c-o.s.c+1,""),e(i,"DATA",0,0,"");for(var s=o.s.r;s<=o.e.r;++s){t(i,-1,0,"BOT");for(var l=o.s.c;l<=o.e.c;++l){var u=Pn({r:s,c:l});if(r=a?(n[s]||[])[l]:n[u])switch(r.t){case"n":var c=r.w;c||null==r.v||(c=r.v),null==c?r.f&&!r.F?t(i,1,0,"="+r.f):t(i,1,0,""):t(i,0,c,"V");break;case"b":t(i,0,r.v?1:0,r.v?"TRUE":"FALSE");break;case"s":t(i,1,0,isNaN(r.v)?r.v:'="'+r.v+'"');break;case"d":r.w||(r.w=fe(r.z||F[14],Ve(et(r.v)))),t(i,0,r.w,"V");break;default:t(i,1,0,"")}else t(i,1,0,"")}}return t(i,-1,0,"EOD"),i.join("\r\n")}}()}}(),dr=function(){function e(e){return e.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,"\n")}function t(e){return e.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function n(t,n){return Rn(function(t,n){for(var r=t.split("\n"),i=-1,o=-1,a=0,s=[];a!==r.length;++a){var l=r[a].trim().split(":");if("cell"===l[0]){var u=On(l[1]);if(s.length<=u.r)for(i=s.length;i<=u.r;++i)s[i]||(s[i]=[]);switch(i=u.r,o=u.c,l[2]){case"t":s[i][o]=e(l[3]);break;case"v":s[i][o]=+l[3];break;case"vtf":var c=l[l.length-1];case"vtc":"nl"===l[3]?s[i][o]=!!+l[4]:s[i][o]=+l[4],"vtf"==l[2]&&(s[i][o]=[s[i][o],c])}}}return n&&n.sheetRows&&(s=s.slice(0,n.sheetRows)),s}(t,n),n)}var r=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join("\n"),i=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join("\n")+"\n",o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join("\n"),a="--SocialCalcSpreadsheetControlSave--";function s(e){if(!e||!e["!ref"])return"";for(var n,r=[],i=[],o="",a=In(e["!ref"]),s=Array.isArray(e),l=a.s.r;l<=a.e.r;++l)for(var u=a.s.c;u<=a.e.c;++u)if(o=Pn({r:l,c:u}),(n=s?(e[l]||[])[u]:e[o])&&null!=n.v&&"z"!==n.t){switch(i=["cell",o,"t"],n.t){case"s":case"str":i.push(t(n.v));break;case"n":n.f?(i[2]="vtf",i[3]="n",i[4]=n.v,i[5]=t(n.f)):(i[2]="v",i[3]=n.v);break;case"b":i[2]="vt"+(n.f?"f":"c"),i[3]="nl",i[4]=n.v?"1":"0",i[5]=t(n.f||(n.v?"TRUE":"FALSE"));break;case"d":var c=Ve(et(n.v));i[2]="vtc",i[3]="nd",i[4]=""+c,i[5]=n.w||fe(n.z||F[14],c);break;case"e":continue}r.push(i.join(":"))}return r.push("sheet:c:"+(a.e.c-a.s.c+1)+":r:"+(a.e.r-a.s.r+1)+":tvf:1"),r.push("valueformat:1:text-wiki"),r.join("\n")}return{to_workbook:function(e,t){return Nn(n(e,t),t)},to_sheet:n,from_sheet:function(e){return[r,i,o,i,s(e),a].join("\n")}}}(),hr=function(){function e(e,t,n,r,i){i.raw?t[n][r]=e:""===e||("TRUE"===e?t[n][r]=!0:"FALSE"===e?t[n][r]=!1:isNaN(it(e))?isNaN(at(e).getDate())?t[n][r]=e:t[n][r]=et(e):t[n][r]=it(e))}var t={44:",",9:"\t",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function r(e){for(var r={},i=!1,o=0,a=0;o<e.length;++o)34==(a=e.charCodeAt(o))?i=!i:!i&&a in t&&(r[a]=(r[a]||0)+1);for(o in a=[],r)Object.prototype.hasOwnProperty.call(r,o)&&a.push([r[o],o]);if(!a.length)for(o in r=n)Object.prototype.hasOwnProperty.call(r,o)&&a.push([r[o],o]);return a.sort(function(e,t){return e[0]-t[0]||n[e[1]]-n[t[1]]}),t[a.pop()[1]]||44}function i(e,t){var n=t||{},i="",o=n.dense?[]:{},a={s:{c:0,r:0},e:{c:0,r:0}};"sep="==e.slice(0,4)?13==e.charCodeAt(5)&&10==e.charCodeAt(6)?(i=e.charAt(4),e=e.slice(7)):13==e.charCodeAt(5)||10==e.charCodeAt(5)?(i=e.charAt(4),e=e.slice(6)):i=r(e.slice(0,1024)):i=n&&n.FS?n.FS:r(e.slice(0,1024));var s=0,l=0,u=0,c=0,f=0,d=i.charCodeAt(0),h=!1,p=0,g=e.charCodeAt(0);e=e.replace(/\r\n/gm,"\n");var v=null!=n.dateNF?function(e){var t="number"==typeof e?F[e]:e;return t=t.replace(Ne,"(\\d+)"),new RegExp("^"+t+"$")}(n.dateNF):null;function m(){var t=e.slice(c,f),r={};if('"'==t.charAt(0)&&'"'==t.charAt(t.length-1)&&(t=t.slice(1,-1).replace(/""/g,'"')),0===t.length)r.t="z";else if(n.raw)r.t="s",r.v=t;else if(0===t.trim().length)r.t="s",r.v=t;else if(61==t.charCodeAt(0))34==t.charCodeAt(1)&&34==t.charCodeAt(t.length-1)?(r.t="s",r.v=t.slice(2,-1).replace(/""/g,'"')):function(e){return 1!=e.length}(t)?(r.t="n",r.f=t.slice(1)):(r.t="s",r.v=t);else if("TRUE"==t)r.t="b",r.v=!0;else if("FALSE"==t)r.t="b",r.v=!1;else if(isNaN(u=it(t)))if(!isNaN(at(t).getDate())||v&&t.match(v)){r.z=n.dateNF||F[14];var i=0;v&&t.match(v)&&(t=function(e,t,n){var r=-1,i=-1,o=-1,a=-1,s=-1,l=-1;(t.match(Ne)||[]).forEach(function(e,t){var u=parseInt(n[t+1],10);switch(e.toLowerCase().charAt(0)){case"y":r=u;break;case"d":o=u;break;case"h":a=u;break;case"s":l=u;break;case"m":a>=0?s=u:i=u}}),l>=0&&-1==s&&i>=0&&(s=i,i=-1);var u=(""+(r>=0?r:(new Date).getFullYear())).slice(-4)+"-"+("00"+(i>=1?i:1)).slice(-2)+"-"+("00"+(o>=1?o:1)).slice(-2);7==u.length&&(u="0"+u),8==u.length&&(u="20"+u);var c=("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2);return-1==a&&-1==s&&-1==l?u:-1==r&&-1==i&&-1==o?c:u+"T"+c}(0,n.dateNF,t.match(v)||[]),i=1),n.cellDates?(r.t="d",r.v=et(t,i)):(r.t="n",r.v=Ve(et(t,i))),!1!==n.cellText&&(r.w=fe(r.z,r.v instanceof Date?Ve(r.v):r.v)),n.cellNF||delete r.z}else r.t="s",r.v=t;else r.t="n",!1!==n.cellText&&(r.w=t),r.v=u;if("z"==r.t||(n.dense?(o[s]||(o[s]=[]),o[s][l]=r):o[Pn({c:l,r:s})]=r),c=f+1,g=e.charCodeAt(c),a.e.c<l&&(a.e.c=l),a.e.r<s&&(a.e.r=s),p==d)++l;else if(l=0,++s,n.sheetRows&&n.sheetRows<=s)return!0}e:for(;f<e.length;++f)switch(p=e.charCodeAt(f)){case 34:34===g&&(h=!h);break;case d:case 10:case 13:if(!h&&m())break e}return f-c>0&&m(),o["!ref"]=Fn(a),o}function o(t,n){var r="",o="string"==n.type?[0,0,0,0]:po(t,n);switch(n.type){case"base64":r=p(t);break;case"binary":case"string":r=t;break;case"buffer":r=65001==n.codepage?t.toString("utf8"):n.codepage&&"undefined"!=typeof $cptable?$cptable.utils.decode(n.codepage,t):b(t);break;case"array":r=tt(t);break;default:throw new Error("Unrecognized type "+n.type)}return 239==o[0]&&187==o[1]&&191==o[2]?r=Bt(r.slice(3)):"string"!=n.type&&"buffer"!=n.type&&65001==n.codepage?r=Bt(r):"binary"==n.type&&"undefined"!=typeof $cptable&&n.codepage&&(r=$cptable.utils.decode(n.codepage,$cptable.utils.encode(28591,r))),"socialcalc:version:"==r.slice(0,19)?dr.to_sheet("string"==n.type?r:Bt(r),n):function(t,n){return n&&n.PRN?n.FS||"sep="==t.slice(0,4)||t.indexOf("\t")>=0||t.indexOf(",")>=0||t.indexOf(";")>=0?i(t,n):Rn(function(t,n){var r=n||{},i=[];if(!t||0===t.length)return i;for(var o=t.split(/[\r\n]/),a=o.length-1;a>=0&&0===o[a].length;)--a;for(var s=10,l=0,u=0;u<=a;++u)-1==(l=o[u].indexOf(" "))?l=o[u].length:l++,s=Math.max(s,l);for(u=0;u<=a;++u){i[u]=[];var c=0;for(e(o[u].slice(0,s).trim(),i,u,c,r),c=1;c<=(o[u].length-s)/10+1;++c)e(o[u].slice(s+10*(c-1),s+10*c).trim(),i,u,c,r)}return r.sheetRows&&(i=i.slice(0,r.sheetRows)),i}(t,n),n):i(t,n)}(r,n)}return{to_workbook:function(e,t){return Nn(o(e,t),t)},to_sheet:o,from_sheet:function(e){for(var t,n=[],r=Bn(e["!ref"]),i=Array.isArray(e),o=r.s.r;o<=r.e.r;++o){for(var a=[],s=r.s.c;s<=r.e.c;++s){var l=Pn({r:o,c:s});if((t=i?(e[o]||[])[s]:e[l])&&null!=t.v){for(var u=(t.w||(Ln(t),t.w)||"").slice(0,10);u.length<10;)u+=" ";a.push(u+(0===s?" ":""))}else a.push(" ")}n.push(a.join(""))}return n.join("\n")}}}(),pr=function(){var e=Nt("t"),t=Nt("rPr");function n(n){var r=n.match(e);if(!r)return{t:"s",v:""};var o={t:"s",v:Dt(r[1])},a=n.match(t);return a&&(o.s=function(e){var t={},n=e.match(wt),r=0,o=!1;if(n)for(;r!=n.length;++r){var a=Et(n[r]);switch(a[0].replace(/\w*:/g,"")){case"<condense":case"<extend":break;case"<shadow":if(!a.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if("1"==a.val)break;t.cp=i[parseInt(a.val,10)];break;case"<outline":if(!a.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=a.val;break;case"<sz":t.sz=a.val;break;case"<strike":if(!a.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!a.val)break;switch(a.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting"}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if("0"==a.val)break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if("0"==a.val)break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":a.rgb&&(t.color=a.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=a.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=a.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":case"<scheme":case"<scheme>":case"<scheme/>":case"</scheme>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":o=!0;break;case"</ext>":o=!1;break;default:if(47!==a[0].charCodeAt(1)&&!o)throw new Error("Unrecognized rich format "+a[0])}}return t}(a[1])),o}var r=/<(?:\w+:)?r>/g,o=/<\/(?:\w+:)?r>/;return function(e){return e.replace(r,"").split(o).map(n).filter(function(e){return e.v})}}(),gr=function(){var e=/(\r\n|\n)/g;function t(t){var n=[[],t.v,[]];return t.v?(t.s&&function(e,t,n){var r=[];e.u&&r.push("text-decoration: underline;"),e.uval&&r.push("text-underline-style:"+e.uval+";"),e.sz&&r.push("font-size:"+e.sz+"pt;"),e.outline&&r.push("text-effect: outline;"),e.shadow&&r.push("text-shadow: auto;"),t.push('<span style="'+r.join("")+'">'),e.b&&(t.push("<b>"),n.push("</b>")),e.i&&(t.push("<i>"),n.push("</i>")),e.strike&&(t.push("<s>"),n.push("</s>"));var i=e.valign||"";"superscript"==i||"super"==i?i="sup":"subscript"==i&&(i="sub"),""!=i&&(t.push("<"+i+">"),n.push("</"+i+">")),n.push("</span>")}(t.s,n[0],n[2]),n[0].join("")+n[1].replace(e,"<br/>")+n[2].join("")):""}return function(e){return e.map(t).join("")}}(),vr=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,mr=/<(?:\w+:)?r>/,yr=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function br(e,t){var n=!t||t.cellHTML,r={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(r.t=Dt(Bt(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),r.r=Bt(e),n&&(r.h=It(r.t))):e.match(mr)&&(r.r=Bt(e),r.t=Dt(Bt((e.replace(yr,"").match(vr)||[]).join("").replace(wt,""))),n&&(r.h=gr(pr(r.r)))),r):{t:""}}var wr=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,xr=/<(?:\w+:)?(?:si|sstItem)>/g,Cr=/<\/(?:\w+:)?(?:si|sstItem)>/,Er=/^\s|\s$|[\t\n\r]/;function kr(e,t){if(!t.bookSST)return"";var n=[mt];n[n.length]=Vt("sst",null,{xmlns:en[0],count:e.Count,uniqueCount:e.Unique});for(var r=0;r!=e.length;++r)if(null!=e[r]){var i=e[r],o="<si>";i.r?o+=i.r:(o+="<t",i.t||(i.t=""),i.t.match(Er)&&(o+=' xml:space="preserve"'),o+=">"+Ot(i.t)+"</t>"),o+="</si>",n[n.length]=o}return n.length>2&&(n[n.length]="</sst>",n[1]=n[1].replace("/>",">")),n.join("")}function Sr(e,t){if(0===t)return e;var n=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(t,n,r),o=Math.min(t,n,r),a=i-o;if(0===a)return[0,0,t];var s,l=0,u=i+o;switch(s=a/(u>1?2-u:u),i){case t:l=((n-r)/a+6)%6;break;case n:l=(r-t)/a+2;break;case r:l=(t-n)/a+4}return[l/6,s,u/2]}(function(e){var t=e.slice("#"===e[0]?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}(e));return n[2]=t<0?n[2]*(1+t):1-(1-n[2])*(1-t),function(e){for(var t=0,n=1;3!=t;++t)n=256*n+(e[t]>255?255:e[t]<0?0:e[t]);return n.toString(16).toUpperCase().slice(1)}(function(e){var t,n=e[0],r=e[1],i=e[2],o=2*r*(i<.5?i:1-i),a=i-o/2,s=[a,a,a],l=6*n;if(0!==r)switch(0|l){case 0:case 6:t=o*l,s[0]+=o,s[1]+=t;break;case 1:t=o*(2-l),s[0]+=t,s[1]+=o;break;case 2:t=o*(l-2),s[1]+=o,s[2]+=t;break;case 3:t=o*(4-l),s[1]+=t,s[2]+=o;break;case 4:t=o*(l-4),s[2]+=o,s[0]+=t;break;case 5:t=o*(6-l),s[2]+=t,s[0]+=o}for(var u=0;3!=u;++u)s[u]=Math.round(255*s[u]);return s}(n))}var _r=6;function Dr(e){return Math.floor((e+Math.round(128/_r)/256)*_r)}function Ar(e){return Math.floor((e-5)/_r*100+.5)/100}function Tr(e){return Math.round((e*_r+5)/_r*256)/256}function Or(e){return Tr(Ar(Dr(e)))}function Pr(e){var t=Math.abs(e-Or(e)),n=_r;if(t>.005)for(_r=1;_r<15;++_r)Math.abs(e-Or(e))<=t&&(t=Math.abs(e-Or(e)),n=_r);_r=n}function Ir(e){e.width?(e.wpx=Dr(e.width),e.wch=Ar(e.wpx),e.MDW=_r):e.wpx?(e.wch=Ar(e.wpx),e.width=Tr(e.wch),e.MDW=_r):"number"==typeof e.wch&&(e.width=Tr(e.wch),e.wpx=Dr(e.width),e.MDW=_r),e.customWidth&&delete e.customWidth}var Fr=96;function Br(e){return 96*e/Fr}function Lr(e){return e*Fr/96}var Nr=["numFmtId","fillId","fontId","borderId","xfId"],Mr=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"],Rr=function(){var e=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,t=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,n=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,r=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,o=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(a,s,l){var u,c={};return a?((u=(a=a.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"")).match(e))&&function(e,t,n){t.NumberFmt=[];for(var r=ze(F),i=0;i<r.length;++i)t.NumberFmt[r[i]]=F[r[i]];var o=e[0].match(wt);if(o)for(i=0;i<o.length;++i){var a=Et(o[i]);switch(kt(a[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":case"</numFmt>":break;case"<numFmt":var s=Dt(Bt(a.formatCode)),l=parseInt(a.numFmtId,10);if(t.NumberFmt[l]=s,l>0){if(l>392){for(l=392;l>60&&null!=t.NumberFmt[l];--l);t.NumberFmt[l]=s}de(s,l)}break;default:if(n.WTF)throw new Error("unrecognized "+a[0]+" in numFmts")}}}(u,c,l),(u=a.match(r))&&function(e,t,n,r){t.Fonts=[];var o={},a=!1;(e[0].match(wt)||[]).forEach(function(e){var s=Et(e);switch(kt(s[0])){case"<fonts":case"<fonts>":case"</fonts>":case"<font":case"<font>":case"<name/>":case"</name>":case"<sz/>":case"</sz>":case"<vertAlign/>":case"</vertAlign>":case"<family/>":case"</family>":case"<scheme/>":case"</scheme>":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"</font>":case"<font/>":t.Fonts.push(o),o={};break;case"<name":s.val&&(o.name=Bt(s.val));break;case"<b":o.bold=s.val?Ft(s.val):1;break;case"<b/>":o.bold=1;break;case"<i":o.italic=s.val?Ft(s.val):1;break;case"<i/>":o.italic=1;break;case"<u":switch(s.val){case"none":o.underline=0;break;case"single":o.underline=1;break;case"double":o.underline=2;break;case"singleAccounting":o.underline=33;break;case"doubleAccounting":o.underline=34}break;case"<u/>":o.underline=1;break;case"<strike":o.strike=s.val?Ft(s.val):1;break;case"<strike/>":o.strike=1;break;case"<outline":o.outline=s.val?Ft(s.val):1;break;case"<outline/>":o.outline=1;break;case"<shadow":o.shadow=s.val?Ft(s.val):1;break;case"<shadow/>":o.shadow=1;break;case"<condense":o.condense=s.val?Ft(s.val):1;break;case"<condense/>":o.condense=1;break;case"<extend":o.extend=s.val?Ft(s.val):1;break;case"<extend/>":o.extend=1;break;case"<sz":s.val&&(o.sz=+s.val);break;case"<vertAlign":s.val&&(o.vertAlign=s.val);break;case"<family":s.val&&(o.family=parseInt(s.val,10));break;case"<scheme":s.val&&(o.scheme=s.val);break;case"<charset":if("1"==s.val)break;s.codepage=i[parseInt(s.val,10)];break;case"<color":if(o.color||(o.color={}),s.auto&&(o.color.auto=Ft(s.auto)),s.rgb)o.color.rgb=s.rgb.slice(-6);else if(s.indexed){o.color.index=parseInt(s.indexed,10);var l=jn[o.color.index];81==o.color.index&&(l=jn[1]),l||(l=jn[1]),o.color.rgb=l[0].toString(16)+l[1].toString(16)+l[2].toString(16)}else s.theme&&(o.color.theme=parseInt(s.theme,10),s.tint&&(o.color.tint=parseFloat(s.tint)),s.theme&&n.themeElements&&n.themeElements.clrScheme&&(o.color.rgb=Sr(n.themeElements.clrScheme[o.color.theme].rgb,o.color.tint||0)));break;case"<AlternateContent":case"<ext":a=!0;break;case"</AlternateContent>":case"</ext>":a=!1;break;default:if(r&&r.WTF&&!a)throw new Error("unrecognized "+s[0]+" in fonts")}})}(u,c,s,l),(u=a.match(n))&&function(e,t,n,r){t.Fills=[];var i={},o=!1;(e[0].match(wt)||[]).forEach(function(e){var n=Et(e);switch(kt(n[0])){case"<fills":case"<fills>":case"</fills>":case"</fill>":case"<gradientFill>":case"<patternFill/>":case"</patternFill>":case"<bgColor/>":case"</bgColor>":case"<fgColor/>":case"</fgColor>":case"<stop":case"<stop/>":case"</stop>":case"<color":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<fill>":case"<fill":case"<fill/>":i={},t.Fills.push(i);break;case"<gradientFill":case"</gradientFill>":t.Fills.push(i),i={};break;case"<patternFill":case"<patternFill>":n.patternType&&(i.patternType=n.patternType);break;case"<bgColor":i.bgColor||(i.bgColor={}),n.indexed&&(i.bgColor.indexed=parseInt(n.indexed,10)),n.theme&&(i.bgColor.theme=parseInt(n.theme,10)),n.tint&&(i.bgColor.tint=parseFloat(n.tint)),n.rgb&&(i.bgColor.rgb=n.rgb.slice(-6));break;case"<fgColor":i.fgColor||(i.fgColor={}),n.theme&&(i.fgColor.theme=parseInt(n.theme,10)),n.tint&&(i.fgColor.tint=parseFloat(n.tint)),null!=n.rgb&&(i.fgColor.rgb=n.rgb.slice(-6));break;case"<ext":o=!0;break;case"</ext>":o=!1;break;default:if(r&&r.WTF&&!o)throw new Error("unrecognized "+n[0]+" in fills")}})}(u,c,0,l),(u=a.match(o))&&function(e,t,n,r){t.Borders=[];var i={},o=!1;(e[0].match(wt)||[]).forEach(function(e){var n=Et(e);switch(kt(n[0])){case"<borders":case"<borders>":case"</borders>":case"</border>":case"<left/>":case"<left":case"<left>":case"</left>":case"<right/>":case"<right":case"<right>":case"</right>":case"<top/>":case"<top":case"<top>":case"</top>":case"<bottom/>":case"<bottom":case"<bottom>":case"</bottom>":case"<diagonal":case"<diagonal>":case"<diagonal/>":case"</diagonal>":case"<horizontal":case"<horizontal>":case"<horizontal/>":case"</horizontal>":case"<vertical":case"<vertical>":case"<vertical/>":case"</vertical>":case"<start":case"<start>":case"<start/>":case"</start>":case"<end":case"<end>":case"<end/>":case"</end>":case"<color":case"<color>":case"<color/>":case"</color>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<border":case"<border>":case"<border/>":i={},n.diagonalUp&&(i.diagonalUp=Ft(n.diagonalUp)),n.diagonalDown&&(i.diagonalDown=Ft(n.diagonalDown)),t.Borders.push(i);break;case"<ext":o=!0;break;case"</ext>":o=!1;break;default:if(r&&r.WTF&&!o)throw new Error("unrecognized "+n[0]+" in borders")}})}(u,c,0,l),(u=a.match(t))&&function(e,t,n){var r;t.CellXf=[];var i=!1;(e[0].match(wt)||[]).forEach(function(e){var o=Et(e),a=0;switch(kt(o[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":case"</xf>":case"</alignment>":case"<protection":case"</protection>":case"<protection/>":case"<extLst":case"<extLst>":case"</extLst>":break;case"<xf":case"<xf/>":for(delete(r=o)[0],a=0;a<Nr.length;++a)r[Nr[a]]&&(r[Nr[a]]=parseInt(r[Nr[a]],10));for(a=0;a<Mr.length;++a)r[Mr[a]]&&(r[Mr[a]]=Ft(r[Mr[a]]));if(t.NumberFmt&&r.numFmtId>392)for(a=392;a>60;--a)if(t.NumberFmt[r.numFmtId]==t.NumberFmt[a]){r.numFmtId=a;break}t.CellXf.push(r);break;case"<alignment":case"<alignment/>":var s={};o.vertical&&(s.vertical=o.vertical),o.horizontal&&(s.horizontal=o.horizontal),null!=o.textRotation&&(s.textRotation=o.textRotation),o.indent&&(s.indent=o.indent),o.wrapText&&(s.wrapText=Ft(o.wrapText)),r.alignment=s;break;case"<AlternateContent":case"<ext":i=!0;break;case"</AlternateContent>":case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+o[0]+" in cellXfs")}})}(u,c,l),c):c}}();function jr(e,t){var n,r=[mt,Vt("styleSheet",null,{xmlns:en[0],"xmlns:vt":Zt})];return e.SSF&&null!=(n=function(e){var t=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=e[r]&&(t[t.length]=Vt("numFmt",null,{numFmtId:r,formatCode:Ot(e[r])}))}),1===t.length?"":(t[t.length]="</numFmts>",t[0]=Vt("numFmts",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(e.SSF))&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=function(e){var t=[];return t[t.length]=Vt("cellXfs",null),e.forEach(function(e){t[t.length]=Vt("xf",null,e)}),t[t.length]="</cellXfs>",2===t.length?"":(t[0]=Vt("cellXfs",null,{count:t.length-2}).replace("/>",">"),t.join(""))}(t.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}var Hr=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function zr(e,t,n){t.themeElements.clrScheme=[];var r={};(e[0].match(wt)||[]).forEach(function(e){var i=Et(e);switch(i[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":r.rgb=i.val;break;case"<a:sysClr":r.rgb=i.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":"/"===i[0].charAt(1)?(t.themeElements.clrScheme[Hr.indexOf(i[0])]=r,r={}):r.name=i[0].slice(3,i[0].length-1);break;default:if(n&&n.WTF)throw new Error("Unrecognized "+i[0]+" in clrScheme")}})}function Ur(){}function $r(){}var Wr=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,Vr=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,Gr=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/,qr=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function Kr(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var n=[mt];return n[n.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',n[n.length]="<a:themeElements>",n[n.length]='<a:clrScheme name="Office">',n[n.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',n[n.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',n[n.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',n[n.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',n[n.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',n[n.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',n[n.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',n[n.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',n[n.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',n[n.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',n[n.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',n[n.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',n[n.length]="</a:clrScheme>",n[n.length]='<a:fontScheme name="Office">',n[n.length]="<a:majorFont>",n[n.length]='<a:latin typeface="Cambria"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',n[n.length]='<a:font script="Hang" typeface="맑은 고딕"/>',n[n.length]='<a:font script="Hans" typeface="宋体"/>',n[n.length]='<a:font script="Hant" typeface="新細明體"/>',n[n.length]='<a:font script="Arab" typeface="Times New Roman"/>',n[n.length]='<a:font script="Hebr" typeface="Times New Roman"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="MoolBoran"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Times New Roman"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:majorFont>",n[n.length]="<a:minorFont>",n[n.length]='<a:latin typeface="Calibri"/>',n[n.length]='<a:ea typeface=""/>',n[n.length]='<a:cs typeface=""/>',n[n.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',n[n.length]='<a:font script="Hang" typeface="맑은 고딕"/>',n[n.length]='<a:font script="Hans" typeface="宋体"/>',n[n.length]='<a:font script="Hant" typeface="新細明體"/>',n[n.length]='<a:font script="Arab" typeface="Arial"/>',n[n.length]='<a:font script="Hebr" typeface="Arial"/>',n[n.length]='<a:font script="Thai" typeface="Tahoma"/>',n[n.length]='<a:font script="Ethi" typeface="Nyala"/>',n[n.length]='<a:font script="Beng" typeface="Vrinda"/>',n[n.length]='<a:font script="Gujr" typeface="Shruti"/>',n[n.length]='<a:font script="Khmr" typeface="DaunPenh"/>',n[n.length]='<a:font script="Knda" typeface="Tunga"/>',n[n.length]='<a:font script="Guru" typeface="Raavi"/>',n[n.length]='<a:font script="Cans" typeface="Euphemia"/>',n[n.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',n[n.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',n[n.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',n[n.length]='<a:font script="Thaa" typeface="MV Boli"/>',n[n.length]='<a:font script="Deva" typeface="Mangal"/>',n[n.length]='<a:font script="Telu" typeface="Gautami"/>',n[n.length]='<a:font script="Taml" typeface="Latha"/>',n[n.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',n[n.length]='<a:font script="Orya" typeface="Kalinga"/>',n[n.length]='<a:font script="Mlym" typeface="Kartika"/>',n[n.length]='<a:font script="Laoo" typeface="DokChampa"/>',n[n.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',n[n.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',n[n.length]='<a:font script="Viet" typeface="Arial"/>',n[n.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',n[n.length]='<a:font script="Geor" typeface="Sylfaen"/>',n[n.length]="</a:minorFont>",n[n.length]="</a:fontScheme>",n[n.length]='<a:fmtScheme name="Office">',n[n.length]="<a:fillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="1"/>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:lin ang="16200000" scaled="0"/>',n[n.length]="</a:gradFill>",n[n.length]="</a:fillStyleLst>",n[n.length]="<a:lnStyleLst>",n[n.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',n[n.length]="</a:lnStyleLst>",n[n.length]="<a:effectStyleLst>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]="</a:effectStyle>",n[n.length]="<a:effectStyle>",n[n.length]="<a:effectLst>",n[n.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',n[n.length]="</a:effectLst>",n[n.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',n[n.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',n[n.length]="</a:effectStyle>",n[n.length]="</a:effectStyleLst>",n[n.length]="<a:bgFillStyleLst>",n[n.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]='<a:gradFill rotWithShape="1">',n[n.length]="<a:gsLst>",n[n.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',n[n.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',n[n.length]="</a:gsLst>",n[n.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',n[n.length]="</a:gradFill>",n[n.length]="</a:bgFillStyleLst>",n[n.length]="</a:fmtScheme>",n[n.length]="</a:themeElements>",n[n.length]="<a:objectDefaults>",n[n.length]="<a:spDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',n[n.length]="</a:spDef>",n[n.length]="<a:lnDef>",n[n.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',n[n.length]="</a:lnDef>",n[n.length]="</a:objectDefaults>",n[n.length]="<a:extraClrSchemeLst/>",n[n.length]="</a:theme>",n.join("")}function Yr(){var e=[mt];return e.push('<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">\n <metadataTypes count="1">\n <metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>\n </metadataTypes>\n <futureMetadata name="XLDAPR" count="1">\n <bk>\n <extLst>\n <ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">\n <xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>\n </ext>\n </extLst>\n </bk>\n </futureMetadata>\n <cellMetadata count="1">\n <bk>\n <rc t="1" v="0"/>\n </bk>\n </cellMetadata>\n</metadata>'),e.join("")}var Xr=1024;function Jr(e,t){for(var n=[21600,21600],r=["m0,0l0",n[1],n[0],n[1],n[0],"0xe"].join(","),i=[Vt("xml",null,{"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel","xmlns:mv":"http://macVmlSchemaUri"}).replace(/\/>/,">"),Vt("o:shapelayout",Vt("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"}),Vt("v:shapetype",[Vt("v:stroke",null,{joinstyle:"miter"}),Vt("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:n.join(","),path:r})];Xr<1e3*e;)Xr+=1e3;return t.forEach(function(e){var t=On(e[0]),n={color2:"#BEFF82",type:"gradient"};"gradient"==n.type&&(n.angle="-180");var r="gradient"==n.type?Vt("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,o=Vt("v:fill",r,n);++Xr,i=i.concat(["<v:shape"+Wt({id:"_x0000_s"+Xr,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(e[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",o,Vt("v:shadow",null,{on:"t",obscured:"t"}),Vt("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",$t("x:Anchor",[t.c+1,0,t.r+1,0,t.c+3,20,t.r+5,20].join(",")),$t("x:AutoFill","False"),$t("x:Row",String(t.r)),$t("x:Column",String(t.c)),e[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),i.push("</xml>"),i.join("")}function Zr(e,t,n,r){var i,o=Array.isArray(e);t.forEach(function(t){var a=On(t.ref);if(o?(e[a.r]||(e[a.r]=[]),i=e[a.r][a.c]):i=e[t.ref],!i){i={t:"z"},o?e[a.r][a.c]=i:e[t.ref]=i;var s=Bn(e["!ref"]||"BDWGO1000001:A1");s.s.r>a.r&&(s.s.r=a.r),s.e.r<a.r&&(s.e.r=a.r),s.s.c>a.c&&(s.s.c=a.c),s.e.c<a.c&&(s.e.c=a.c);var l=Fn(s);l!==e["!ref"]&&(e["!ref"]=l)}i.c||(i.c=[]);var u={a:t.author,t:t.t,r:t.r,T:n};t.h&&(u.h=t.h);for(var c=i.c.length-1;c>=0;--c){if(!n&&i.c[c].T)return;n&&!i.c[c].T&&i.c.splice(c,1)}if(n&&r)for(c=0;c<r.length;++c)if(u.a==r[c].id){u.a=r[c].name||u.a;break}i.c.push(u)})}function Qr(e){var t=[mt,Vt("comments",null,{xmlns:en[0]})],n=[];return t.push("<authors>"),e.forEach(function(e){e[1].forEach(function(e){var r=Ot(e.a);-1==n.indexOf(r)&&(n.push(r),t.push("<author>"+r+"</author>")),e.T&&e.ID&&-1==n.indexOf("tc="+e.ID)&&(n.push("tc="+e.ID),t.push("<author>tc="+e.ID+"</author>"))})}),0==n.length&&(n.push("SheetJ5"),t.push("<author>SheetJ5</author>")),t.push("</authors>"),t.push("<commentList>"),e.forEach(function(e){var r=0,i=[];if(e[1][0]&&e[1][0].T&&e[1][0].ID?r=n.indexOf("tc="+e[1][0].ID):e[1].forEach(function(e){e.a&&(r=n.indexOf(Ot(e.a))),i.push(e.t||"")}),t.push('<comment ref="'+e[0]+'" authorId="'+r+'"><text>'),i.length<=1)t.push($t("t",Ot(i[0]||"")));else{for(var o="Comment:\n "+i[0]+"\n",a=1;a<i.length;++a)o+="Reply:\n "+i[a]+"\n";t.push($t("t",Ot(o)))}t.push("</text></comment>")}),t.push("</commentList>"),t.length>2&&(t[t.length]="</comments>",t[1]=t[1].replace("/>",">")),t.join("")}function ei(e,t,n){var r=[mt,Vt("ThreadedComments",null,{xmlns:Xt}).replace(/[\/]>/,">")];return e.forEach(function(e){var i="";(e[1]||[]).forEach(function(o,a){if(o.T){o.a&&-1==t.indexOf(o.a)&&t.push(o.a);var s={ref:e[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+n.tcid++).slice(-12)+"}"};0==a?i=s.id:s.parentId=i,o.ID=s.id,o.a&&(s.personId="{54EE7950-7262-4200-6969-"+("000000000000"+t.indexOf(o.a)).slice(-12)+"}"),r.push(Vt("threadedComment",$t("text",o.t||""),s))}else delete o.ID})}),r.push("</ThreadedComments>"),r.join("")}var ti=["xlsb","xlsm","xlam","biff8","xla"],ni=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function n(e,n,r,i){var o=!1,a=!1;0==r.length?a=!0:"["==r.charAt(0)&&(a=!0,r=r.slice(1,-1)),0==i.length?o=!0:"["==i.charAt(0)&&(o=!0,i=i.slice(1,-1));var s=r.length>0?0|parseInt(r,10):0,l=i.length>0?0|parseInt(i,10):0;return o?l+=t.c:--l,a?s+=t.r:--s,n+(o?"":"$")+Tn(l)+(a?"":"$")+Dn(s)}return function(r,i){return t=i,r.replace(e,n)}}(),ri=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,ii=function(){return function(e,t){return e.replace(ri,function(e,n,r,i,o,a){var s=An(i)-(r?0:t.c),l=_n(a)-(o?0:t.r);return n+"R"+(0==l?"":o?l+1:"["+l+"]")+"C"+(0==s?"":r?s+1:"["+s+"]")})}}();function oi(e,t){return e.replace(ri,function(e,n,r,i,o,a){return n+("$"==r?r+i:Tn(An(i)+t.c))+("$"==o?o+a:Dn(_n(a)+t.r))})}function ai(e,t,n){var r=In(t).s,i=On(n);return oi(e,{r:i.r-r.r,c:i.c-r.c})}function si(e){return e.replace(/_xlfn\./g,"")}function li(e){return"of:"==e.slice(0,3)&&(e=e.slice(3)),61==e.charCodeAt(0)&&61==(e=e.slice(1)).charCodeAt(0)&&(e=e.slice(1)),(e=(e=(e=e.replace(/COM\.MICROSOFT\./g,"")).replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(e,t){return t.replace(/\./g,"")})).replace(/\[.(#[A-Z]*[?!])\]/g,"$1")).replace(/[;~]/g,",").replace(/\|/g,";")}function ui(e){return("of:="+e.replace(ri,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")}function ci(e){var t=e.split(":");return[t[0].split(".")[0],t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}function fi(e){return e.replace(/\./,"!")}var di={},hi={},pi="undefined"!=typeof Map;function gi(e,t){var n={min:e+1,max:e+1},r=-1;return t.MDW&&(_r=t.MDW),null!=t.width?n.customWidth=1:null!=t.wpx?r=Ar(t.wpx):null!=t.wch&&(r=t.wch),r>-1?(n.width=Tr(r),n.customWidth=1):null!=t.width&&(n.width=t.width),t.hidden&&(n.hidden=!0),null!=t.level&&(n.outlineLevel=n.level=t.level),n}function vi(e,t,n){var r=n.revssf[null!=t.z?t.z:"General"],i=60,o=e.length;if(null==r&&n.ssf)for(;i<392;++i)if(null==n.ssf[i]){de(t.z,i),n.ssf[i]=t.z,n.revssf[t.z]=r=i;break}for(i=0;i!=o;++i)if(e[i].numFmtId===r)return i;return e[o]={numFmtId:r,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},o}function mi(e,t,n,r,i,o){try{r.cellNF&&(e.z=F[t])}catch(we){if(r.WTF)throw we}if("z"!==e.t||r.cellStyles){if("d"===e.t&&"string"==typeof e.v&&(e.v=et(e.v)),(!r||!1!==r.cellText)&&"z"!==e.t)try{if(null==F[t]&&de(Le[t]||"General",t),"e"===e.t)e.w=e.w||Hn[e.v];else if(0===t)if("n"===e.t)(0|e.v)===e.v?e.w=e.v.toString(10):e.w=W(e.v);else if("d"===e.t){var a=Ve(e.v);e.w=(0|a)===a?a.toString(10):W(a)}else{if(void 0===e.v)return"";e.w=V(e.v,hi)}else"d"===e.t?e.w=fe(t,Ve(e.v),hi):e.w=fe(t,e.v,hi)}catch(we){if(r.WTF)throw we}if(r.cellStyles&&null!=n)try{e.s=o.Fills[n],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=Sr(i.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),r.WTF&&(e.s.fgColor.raw_rgb=i.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=Sr(i.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),r.WTF&&(e.s.bgColor.raw_rgb=i.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(we){if(r.WTF&&o.Fills)throw we}}}function yi(e,t,n){if(e&&e["!ref"]){var r=Bn(e["!ref"]);if(r.e.c<r.s.c||r.e.r<r.s.r)throw new Error("Bad range ("+n+"): "+e["!ref"])}}var bi=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,wi=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,xi=/<(?:\w:)?hyperlink [^>]*>/gm,Ci=/"(\w*:\w*)"/,Ei=/<(?:\w:)?col\b[^>]*[\/]?>/g,ki=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,Si=/<(?:\w:)?pageMargins[^>]*\/>/g,_i=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,Di=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,Ai=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function Ti(e,t,n,r){var i=Et(e);n.Sheets[r]||(n.Sheets[r]={}),i.codeName&&(n.Sheets[r].CodeName=Dt(Bt(i.codeName)))}var Oi=["objects","scenarios","selectLockedCells","selectUnlockedCells"],Pi=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"],Ii=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function Fi(e,t,n,r){if(e.c&&n["!comments"].push([t,e.c]),void 0===e.v&&"string"!=typeof e.f||"z"===e.t&&!e.f)return"";var i="",o=e.t,a=e.v;if("z"!==e.t)switch(e.t){case"b":i=e.v?"1":"0";break;case"n":i=""+e.v;break;case"e":i=Hn[e.v];break;case"d":r&&r.cellDates?i=et(e.v,-1).toISOString():((e=nt(e)).t="n",i=""+(e.v=Ve(et(e.v)))),void 0===e.z&&(e.z=F[14]);break;default:i=e.v}var s=$t("v",Ot(i)),l={r:t},u=vi(r.cellXfs,e,r);switch(0!==u&&(l.s=u),e.t){case"n":case"z":break;case"d":l.t="d";break;case"b":l.t="b";break;case"e":l.t="e";break;default:if(null==e.v){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(r&&r.bookSST){s=$t("v",""+function(e,t,n){var r=0,i=e.length;if(n){if(pi?n.has(t):Object.prototype.hasOwnProperty.call(n,t))for(var o=pi?n.get(t):n[t];r<o.length;++r)if(e[o[r]].t===t)return e.Count++,o[r]}else for(;r<i;++r)if(e[r].t===t)return e.Count++,r;return e[i]={t},e.Count++,e.Unique++,n&&(pi?(n.has(t)||n.set(t,[]),n.get(t).push(i)):(Object.prototype.hasOwnProperty.call(n,t)||(n[t]=[]),n[t].push(i))),i}(r.Strings,e.v,r.revStrings)),l.t="s";break}l.t="str"}if(e.t!=o&&(e.t=o,e.v=a),"string"==typeof e.f&&e.f){var c=e.F&&e.F.slice(0,t.length)==t?{t:"array",ref:e.F}:null;s=Vt("f",Ot(e.f),c)+(null!=e.v?s:"")}return e.l&&n["!links"].push([t,e.l]),e.D&&(l.cm=1),Vt("c",s,l)}var Bi=function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,n=/r=["']([^"']*)["']/,r=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,i=/ref=["']([^"']*)["']/,o=Nt("v"),a=Nt("f");return function(s,l,u,c,f,d){for(var h,p,g,v,m,y=0,b="",w=[],x=[],C=0,E=0,k=0,S="",_=0,D=0,A=0,T=0,O=Array.isArray(d.CellXf),P=[],I=[],B=Array.isArray(l),L=[],N={},M=!1,R=!!u.sheetStubs,j=s.split(t),H=0,z=j.length;H!=z;++H){var U=(b=j[H].trim()).length;if(0!==U){var $=0;e:for(y=0;y<U;++y)switch(b[y]){case">":if("/"!=b[y-1]){++y;break e}if(u&&u.cellStyles){if(_=null!=(p=Et(b.slice($,y),!0)).r?parseInt(p.r,10):_+1,D=-1,u.sheetRows&&u.sheetRows<_)continue;N={},M=!1,p.ht&&(M=!0,N.hpt=parseFloat(p.ht),N.hpx=Lr(N.hpt)),"1"==p.hidden&&(M=!0,N.hidden=!0),null!=p.outlineLevel&&(M=!0,N.level=+p.outlineLevel),M&&(L[_-1]=N)}break;case"<":$=y}if($>=y)break;if(_=null!=(p=Et(b.slice($,y),!0)).r?parseInt(p.r,10):_+1,D=-1,!(u.sheetRows&&u.sheetRows<_)){c.s.r>_-1&&(c.s.r=_-1),c.e.r<_-1&&(c.e.r=_-1),u&&u.cellStyles&&(N={},M=!1,p.ht&&(M=!0,N.hpt=parseFloat(p.ht),N.hpx=Lr(N.hpt)),"1"==p.hidden&&(M=!0,N.hidden=!0),null!=p.outlineLevel&&(M=!0,N.level=+p.outlineLevel),M&&(L[_-1]=N)),w=b.slice(y).split(e);for(var W=0;W!=w.length&&"<"==w[W].trim().charAt(0);++W);for(w=w.slice(W),y=0;y!=w.length;++y)if(0!==(b=w[y].trim()).length){if(x=b.match(n),C=y,E=0,k=0,b="<c "+("<"==b.slice(0,1)?">":"")+b,null!=x&&2===x.length){for(C=0,S=x[1],E=0;E!=S.length&&!((k=S.charCodeAt(E)-64)<1||k>26);++E)C=26*C+k;D=--C}else++D;for(E=0;E!=b.length&&62!==b.charCodeAt(E);++E);if(++E,(p=Et(b.slice(0,E),!0)).r||(p.r=Pn({r:_-1,c:D})),h={t:""},null!=(x=(S=b.slice(E)).match(o))&&""!==x[1]&&(h.v=Dt(x[1])),u.cellFormula){if(null!=(x=S.match(a))&&""!==x[1]){if(h.f=Dt(Bt(x[1])).replace(/\r\n/g,"\n"),u.xlfn||(h.f=si(h.f)),x[0].indexOf('t="array"')>-1)h.F=(S.match(i)||[])[1],h.F.indexOf(":")>-1&&P.push([Bn(h.F),h.F]);else if(x[0].indexOf('t="shared"')>-1){v=Et(x[0]);var V=Dt(Bt(x[1]));u.xlfn||(V=si(V)),I[parseInt(v.si,10)]=[v,V,p.r]}}else(x=S.match(/<f[^>]*\/>/))&&I[(v=Et(x[0])).si]&&(h.f=ai(I[v.si][1],I[v.si][2],p.r));var G=On(p.r);for(E=0;E<P.length;++E)G.r>=P[E][0].s.r&&G.r<=P[E][0].e.r&&G.c>=P[E][0].s.c&&G.c<=P[E][0].e.c&&(h.F=P[E][1])}if(null==p.t&&void 0===h.v)if(h.f||h.F)h.v=0,h.t="n";else{if(!R)continue;h.t="z"}else h.t=p.t||"n";switch(c.s.c>D&&(c.s.c=D),c.e.c<D&&(c.e.c=D),h.t){case"n":if(""==h.v||null==h.v){if(!R)continue;h.t="z"}else h.v=parseFloat(h.v);break;case"s":if(void 0===h.v){if(!R)continue;h.t="z"}else g=di[parseInt(h.v,10)],h.v=g.t,h.r=g.r,u.cellHTML&&(h.h=g.h);break;case"str":h.t="s",h.v=null!=h.v?Bt(h.v):"",u.cellHTML&&(h.h=It(h.v));break;case"inlineStr":x=S.match(r),h.t="s",null!=x&&(g=br(x[1]))?(h.v=g.t,u.cellHTML&&(h.h=g.h)):h.v="";break;case"b":h.v=Ft(h.v);break;case"d":u.cellDates?h.v=et(h.v,1):(h.v=Ve(et(h.v,1)),h.t="n");break;case"e":u&&!1===u.cellText||(h.w=h.v),h.v=zn[h.v]}if(A=T=0,m=null,O&&void 0!==p.s&&null!=(m=d.CellXf[p.s])&&(null!=m.numFmtId&&(A=m.numFmtId),u.cellStyles&&null!=m.fillId&&(T=m.fillId)),mi(h,A,T,u,f,d),u.cellDates&&O&&"n"==h.t&&le(F[A])&&(h.t="d",h.v=Ye(h.v)),p.cm&&u.xlmeta){var q=(u.xlmeta.Cell||[])[+p.cm-1];q&&"XLDAPR"==q.type&&(h.D=!0)}if(B){var K=On(p.r);l[K.r]||(l[K.r]=[]),l[K.r][K.c]=h}else l[p.r]=h}}}}L.length>0&&(l["!rows"]=L)}}();function Li(e,t,n,r){var i,o=[mt,Vt("worksheet",null,{xmlns:en[0],"xmlns:r":Jt})],a=n.SheetNames[e],s="",l=n.Sheets[a];null==l&&(l={});var u=l["!ref"]||"A1",c=Bn(u);if(c.e.c>16383||c.e.r>1048575){if(t.WTF)throw new Error("Range "+u+" exceeds format limit A1:XFD1048576");c.e.c=Math.min(c.e.c,16383),c.e.r=Math.min(c.e.c,1048575),u=Fn(c)}r||(r={}),l["!comments"]=[];var f=[];!function(e,t,n,r,i){var o=!1,a={},s=null;if("xlsx"!==r.bookType&&t.vbaraw){var l=t.SheetNames[n];try{t.Workbook&&(l=t.Workbook.Sheets[n].CodeName||l)}catch(u){}o=!0,a.codeName=Lt(Ot(l))}if(e&&e["!outline"]){var c={summaryBelow:1,summaryRight:1};e["!outline"].above&&(c.summaryBelow=0),e["!outline"].left&&(c.summaryRight=0),s=(s||"")+Vt("outlinePr",null,c)}(o||s)&&(i[i.length]=Vt("sheetPr",s,a))}(l,n,e,t,o),o[o.length]=Vt("dimension",null,{ref:u}),o[o.length]=function(e,t,n,r){var i={workbookViewId:"0"};return(((r||{}).Workbook||{}).Views||[])[0]&&(i.rightToLeft=r.Workbook.Views[0].RTL?"1":"0"),Vt("sheetViews",Vt("sheetView",null,i),{})}(0,0,0,n),t.sheetFormat&&(o[o.length]=Vt("sheetFormatPr",null,{defaultRowHeight:t.sheetFormat.defaultRowHeight||"16",baseColWidth:t.sheetFormat.baseColWidth||"10",outlineLevelRow:t.sheetFormat.outlineLevelRow||"7"})),null!=l["!cols"]&&l["!cols"].length>0&&(o[o.length]=function(e,t){for(var n,r=["<cols>"],i=0;i!=t.length;++i)(n=t[i])&&(r[r.length]=Vt("col",null,gi(i,n)));return r[r.length]="</cols>",r.join("")}(0,l["!cols"])),o[i=o.length]="<sheetData/>",l["!links"]=[],null!=l["!ref"]&&(s=function(e,t){var n,r,i=[],o=[],a=Bn(e["!ref"]),s="",l="",u=[],c=0,f=0,d=e["!rows"],h=Array.isArray(e),p={r:l},g=-1;for(f=a.s.c;f<=a.e.c;++f)u[f]=Tn(f);for(c=a.s.r;c<=a.e.r;++c){for(o=[],l=Dn(c),f=a.s.c;f<=a.e.c;++f){n=u[f]+l;var v=h?(e[c]||[])[f]:e[n];void 0!==v&&null!=(s=Fi(v,n,e,t))&&o.push(s)}(o.length>0||d&&d[c])&&(p={r:l},d&&d[c]&&((r=d[c]).hidden&&(p.hidden=1),g=-1,r.hpx?g=Br(r.hpx):r.hpt&&(g=r.hpt),g>-1&&(p.ht=g,p.customHeight=1),r.level&&(p.outlineLevel=r.level)),i[i.length]=Vt("row",o.join(""),p))}if(d)for(;c<d.length;++c)d&&d[c]&&(p={r:c+1},(r=d[c]).hidden&&(p.hidden=1),g=-1,r.hpx?g=Br(r.hpx):r.hpt&&(g=r.hpt),g>-1&&(p.ht=g,p.customHeight=1),r.level&&(p.outlineLevel=r.level),i[i.length]=Vt("row","",p));return i.join("")}(l,t),s.length>0&&(o[o.length]=s)),o.length>i+1&&(o[o.length]="</sheetData>",o[i]=o[i].replace("/>",">")),l["!protect"]&&(o[o.length]=function(e){var t={sheet:1};return Oi.forEach(function(n){null!=e[n]&&e[n]&&(t[n]="1")}),Pi.forEach(function(n){null==e[n]||e[n]||(t[n]="0")}),e.password&&(t.password=crypto_CreatePasswordVerifier_Method1(e.password).toString(16).toUpperCase()),Vt("sheetProtection",null,t)}(l["!protect"])),null!=l["!autofilter"]&&(o[o.length]=function(e,t,n,r){var i="string"==typeof e.ref?e.ref:Fn(e.ref);n.Workbook||(n.Workbook={Sheets:[]}),n.Workbook.Names||(n.Workbook.Names=[]);var o=n.Workbook.Names,a=In(i);a.s.r==a.e.r&&(a.e.r=In(t["!ref"]).e.r,i=Fn(a));for(var s=0;s<o.length;++s){var l=o[s];if("_xlnm._FilterDatabase"==l.Name&&l.Sheet==r){l.Ref="'"+n.SheetNames[r]+"'!"+i;break}}return s==o.length&&o.push({Name:"_xlnm._FilterDatabase",Sheet:r,Ref:"'"+n.SheetNames[r]+"'!"+i}),Vt("autoFilter",null,{ref:i})}(l["!autofilter"],l,n,e)),null!=l["!merges"]&&l["!merges"].length>0&&(o[o.length]=function(e){if(0===e.length)return"";for(var t='<mergeCells count="'+e.length+'">',n=0;n!=e.length;++n)t+='<mergeCell ref="'+Fn(e[n])+'"/>';return t+"</mergeCells>"}(l["!merges"]));var d,h=-1,p=-1;return l["!links"].length>0&&(o[o.length]="<hyperlinks>",l["!links"].forEach(function(e){e[1].Target&&(d={ref:e[0]},"#"!=e[1].Target.charAt(0)&&(p=Yn(r,-1,Ot(e[1].Target).replace(/#.*$/,""),Vn.HLINK),d["r:id"]="rId"+p),(h=e[1].Target.indexOf("#"))>-1&&(d.location=Ot(e[1].Target.slice(h+1))),e[1].Tooltip&&(d.tooltip=Ot(e[1].Tooltip)),o[o.length]=Vt("hyperlink",null,d))}),o[o.length]="</hyperlinks>"),delete l["!links"],null!=l["!margins"]&&(o[o.length]=function(e){return function(e){if(e){var t=[.7,.7,.75,.75,.3,.3];null==e.left&&(e.left=t[0]),null==e.right&&(e.right=t[1]),null==e.top&&(e.top=t[2]),null==e.bottom&&(e.bottom=t[3]),null==e.header&&(e.header=t[4]),null==e.footer&&(e.footer=t[5])}}(e),Vt("pageMargins",null,e)}(l["!margins"])),t&&!t.ignoreEC&&null!=t.ignoreEC||(o[o.length]=$t("ignoredErrors",Vt("ignoredError",null,{numberStoredAsText:1,sqref:u}))),f.length>0&&(p=Yn(r,-1,"../drawings/drawing"+(e+1)+".xml",Vn.DRAW),o[o.length]=Vt("drawing",null,{"r:id":"rId"+p}),l["!drawing"]=f),l["!comments"].length>0&&(p=Yn(r,-1,"../drawings/vmlDrawing"+(e+1)+".vml",Vn.VML),o[o.length]=Vt("legacyDrawing",null,{"r:id":"rId"+p}),l["!legacy"]=p),o.length>1&&(o[o.length]="</worksheet>",o[1]=o[1].replace("/>",">")),o.join("")}Vn.CS="http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet";var Ni=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],Mi=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],Ri=[],ji=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function Hi(e,t){for(var n=0;n!=e.length;++n)for(var r=e[n],i=0;i!=t.length;++i){var o=t[i];if(null==r[o[0]])r[o[0]]=o[1];else switch(o[2]){case"bool":"string"==typeof r[o[0]]&&(r[o[0]]=Ft(r[o[0]]));break;case"int":"string"==typeof r[o[0]]&&(r[o[0]]=parseInt(r[o[0]],10))}}}function zi(e,t){for(var n=0;n!=t.length;++n){var r=t[n];if(null==e[r[0]])e[r[0]]=r[1];else switch(r[2]){case"bool":"string"==typeof e[r[0]]&&(e[r[0]]=Ft(e[r[0]]));break;case"int":"string"==typeof e[r[0]]&&(e[r[0]]=parseInt(e[r[0]],10))}}}var Ui="][*?/\\".split("");function $i(e,t){if(e.length>31)throw new Error("Sheet names cannot exceed 31 chars");return Ui.forEach(function(t){if(-1!=e.indexOf(t))throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),!0}function Wi(e){if(!e||!e.SheetNames||!e.Sheets)throw new Error("Invalid Workbook");if(!e.SheetNames.length)throw new Error("Workbook is empty");var t=e.Workbook&&e.Workbook.Sheets||[];!function(e,t,n){e.forEach(function(r,i){$i(r);for(var o=0;o<i;++o)if(r==e[o])throw new Error("Duplicate Sheet Name: "+r);if(n){var a=t&&t[i]&&t[i].CodeName||r;if(95==a.charCodeAt(0)&&a.length>22)throw new Error("Bad Code Name: Worksheet"+a)}})}(e.SheetNames,t,!!e.vbaraw);for(var n=0;n<e.SheetNames.length;++n)yi(e.Sheets[e.SheetNames[n]],e.SheetNames[n],n)}var Vi=/<\w+:workbook/;function Gi(e){var t=[mt];t[t.length]=Vt("workbook",null,{xmlns:en[0],"xmlns:r":Jt});var n=e.Workbook&&(e.Workbook.Names||[]).length>0,r={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(Ni.forEach(function(t){null!=e.Workbook.WBProps[t[0]]&&e.Workbook.WBProps[t[0]]!=t[1]&&(r[t[0]]=e.Workbook.WBProps[t[0]])}),e.Workbook.WBProps.CodeName&&(r.codeName=e.Workbook.WBProps.CodeName,delete r.CodeName)),t[t.length]=Vt("workbookPr",null,r);var i=e.Workbook&&e.Workbook.Sheets||[],o=0;if(i&&i[0]&&i[0].Hidden){for(t[t.length]="<bookViews>",o=0;o!=e.SheetNames.length&&i[o]&&i[o].Hidden;++o);o==e.SheetNames.length&&(o=0),t[t.length]='<workbookView firstSheet="'+o+'" activeTab="'+o+'"/>',t[t.length]="</bookViews>"}for(t[t.length]="<sheets>",o=0;o!=e.SheetNames.length;++o){var a={name:Ot(e.SheetNames[o].slice(0,31))};if(a.sheetId=""+(o+1),a["r:id"]="rId"+(o+1),i[o])switch(i[o].Hidden){case 1:a.state="hidden";break;case 2:a.state="veryHidden"}t[t.length]=Vt("sheet",null,a)}return t[t.length]="</sheets>",n&&(t[t.length]="<definedNames>",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(e){var n={name:e.Name};e.Comment&&(n.comment=e.Comment),null!=e.Sheet&&(n.localSheetId=""+e.Sheet),e.Hidden&&(n.hidden="1"),e.Ref&&(t[t.length]=Vt("definedName",Ot(e.Ref),n))}),t[t.length]="</definedNames>"),t.length>2&&(t[t.length]="</workbook>",t[1]=t[1].replace("/>",">")),t.join("")}function qi(e,t,n,r,i){return(".bin"===t.slice(-4)?write_ws_bin:Li)(e,n,r,i)}function Ki(e,t,n){return(".bin"===t.slice(-4)?write_comments_bin:Qr)(e,n)}function Yi(e,t,n,r){for(var i=e["!merges"]||[],o=[],a=t.s.c;a<=t.e.c;++a){for(var s=0,l=0,u=0;u<i.length;++u)if(!(i[u].s.r>n||i[u].s.c>a||i[u].e.r<n||i[u].e.c<a)){if(i[u].s.r<n||i[u].s.c<a){s=-1;break}s=i[u].e.r-i[u].s.r+1,l=i[u].e.c-i[u].s.c+1;break}if(!(s<0)){var c=Pn({r:n,c:a}),f=r.dense?(e[n]||[])[a]:e[c],d=f&&null!=f.v&&(f.h||It(f.w||(Ln(f),f.w)||""))||"",h={};s>1&&(h.rowspan=s),l>1&&(h.colspan=l),r.editable?d='<span contenteditable="true">'+d+"</span>":f&&(h["data-t"]=f&&f.t||"z",null!=f.v&&(h["data-v"]=f.v),null!=f.z&&(h["data-z"]=f.z),f.l&&"#"!=(f.l.Target||"#").charAt(0)&&(d='<a href="'+f.l.Target+'">'+d+"</a>")),h.id=(r.id||"sjs")+"-"+c,o.push(Vt("td",d,h))}}return"<tr>"+o.join("")+"</tr>"}function Xi(e,t){var n=t||{},r=null!=n.header?n.header:'<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',i=null!=n.footer?n.footer:"</body></html>",o=[r],a=In(e["!ref"]);n.dense=Array.isArray(e),o.push(function(e,t,n){return[].join("")+"<table"+(n&&n.id?' id="'+n.id+'"':"")+">"}(0,0,n));for(var s=a.s.r;s<=a.e.r;++s)o.push(Yi(e,a,s,n));return o.push("</table>"+i),o.join("")}function Ji(e,t,n){var r=n||{},i=0,o=0;if(null!=r.origin)if("number"==typeof r.origin)i=r.origin;else{var a="string"==typeof r.origin?On(r.origin):r.origin;i=a.r,o=a.c}var s=t.getElementsByTagName("tr"),l=Math.min(r.sheetRows||1e7,s.length),u={s:{r:0,c:0},e:{r:i,c:o}};if(e["!ref"]){var c=In(e["!ref"]);u.s.r=Math.min(u.s.r,c.s.r),u.s.c=Math.min(u.s.c,c.s.c),u.e.r=Math.max(u.e.r,c.e.r),u.e.c=Math.max(u.e.c,c.e.c),-1==i&&(u.e.r=i=c.e.r+1)}var f=[],d=0,h=e["!rows"]||(e["!rows"]=[]),p=0,g=0,v=0,m=0,y=0,b=0;for(e["!cols"]||(e["!cols"]=[]);p<s.length&&g<l;++p){var w=s[p];if(Qi(w)){if(r.display)continue;h[g]={hidden:!0}}var x=w.children;for(v=m=0;v<x.length;++v){var C=x[v];if(!r.display||!Qi(C)){var E=C.hasAttribute("data-v")?C.getAttribute("data-v"):C.hasAttribute("v")?C.getAttribute("v"):Mt(C.innerHTML),k=C.getAttribute("data-z")||C.getAttribute("z");for(d=0;d<f.length;++d){var S=f[d];S.s.c==m+o&&S.s.r<g+i&&g+i<=S.e.r&&(m=S.e.c+1-o,d=-1)}b=+C.getAttribute("colspan")||1,((y=+C.getAttribute("rowspan")||1)>1||b>1)&&f.push({s:{r:g+i,c:m+o},e:{r:g+i+(y||1)-1,c:m+o+(b||1)-1}});var _={t:"s",v:E},D=C.getAttribute("data-t")||C.getAttribute("t")||"";null!=E&&(0==E.length?_.t=D||"z":r.raw||0==E.trim().length||"s"==D||("TRUE"===E?_={t:"b",v:!0}:"FALSE"===E?_={t:"b",v:!1}:isNaN(it(E))?isNaN(at(E).getDate())||(_={t:"d",v:et(E)},r.cellDates||(_={t:"n",v:Ve(_.v)}),_.z=r.dateNF||F[14]):_={t:"n",v:it(E)})),void 0===_.z&&null!=k&&(_.z=k);var A="",T=C.getElementsByTagName("A");if(T&&T.length)for(var O=0;O<T.length&&(!T[O].hasAttribute("href")||"#"==(A=T[O].getAttribute("href")).charAt(0));++O);A&&"#"!=A.charAt(0)&&(_.l={Target:A}),r.dense?(e[g+i]||(e[g+i]=[]),e[g+i][m+o]=_):e[Pn({c:m+o,r:g+i})]=_,u.e.c<m+o&&(u.e.c=m+o),m+=b}}++g}return f.length&&(e["!merges"]=(e["!merges"]||[]).concat(f)),u.e.r=Math.max(u.e.r,g-1+i),e["!ref"]=Fn(u),g>=l&&(e["!fullref"]=Fn((u.e.r=s.length-p+g-1+i,u))),e}function Zi(e,t){return Ji((t||{}).dense?[]:{},e,t)}function Qi(e){var t="",n=function(e){return e.ownerDocument.defaultView&&"function"==typeof e.ownerDocument.defaultView.getComputedStyle?e.ownerDocument.defaultView.getComputedStyle:"function"==typeof getComputedStyle?getComputedStyle:null}(e);return n&&(t=n(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),"none"===t}function eo(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(e,t){return Array(parseInt(t,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"\t").replace(/<text:line-break\/>/g,"\n");return[Dt(t.replace(/<[^>]*>/g,""))]}var to={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function no(e,t){t=t||{},ut(e,"META-INF/manifest.xml")&&function(e,t){for(var n,r,i=qt(e);n=Kt.exec(i);)switch(n[3]){case"manifest":break;case"file-entry":if("/"==(r=Et(n[0],!1)).path&&"application/vnd.oasis.opendocument.spreadsheet"!==r.type)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw n}}(ft(e,"META-INF/manifest.xml"),t);var n=dt(e,"content.xml");if(!n)throw new Error("Missing content.xml in ODS / UOF file");var r=function(e,t){var n,r,i,o,a,s,l=t||{},u=qt(e),c=[],f={name:""},d="",h=0,p={},g=[],v=l.dense?[]:{},m={value:""},y="",b=0,w=[],x=-1,C=-1,E={s:{r:1e6,c:1e7},e:{r:0,c:0}},k=0,S={},_=[],D={},A=[],T=1,O=1,P=[],I={Names:[]},F={},B=["",""],L=[],N={},M="",R=0,j=!1,H=!1,z=0;for(Kt.lastIndex=0,u=u.replace(/<!--([\s\S]*?)-->/gm,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");a=Kt.exec(u);)switch(a[3]=a[3].replace(/_.*$/,"")){case"table":case"工作表":"/"===a[1]?(E.e.c>=E.s.c&&E.e.r>=E.s.r?v["!ref"]=Fn(E):v["!ref"]="A1:A1",l.sheetRows>0&&l.sheetRows<=E.e.r&&(v["!fullref"]=v["!ref"],E.e.r=l.sheetRows-1,v["!ref"]=Fn(E)),_.length&&(v["!merges"]=_),A.length&&(v["!rows"]=A),i.name=i["名称"]||i.name,"undefined"!=typeof JSON&&JSON.stringify(i),g.push(i.name),p[i.name]=v,H=!1):"/"!==a[0].charAt(a[0].length-2)&&(i=Et(a[0],!1),x=C=-1,E.s.r=E.s.c=1e7,E.e.r=E.e.c=0,v=l.dense?[]:{},_=[],A=[],H=!0);break;case"table-row-group":"/"===a[1]?--k:++k;break;case"table-row":case"行":if("/"===a[1]){x+=T,T=1;break}if((o=Et(a[0],!1))["行号"]?x=o["行号"]-1:-1==x&&(x=0),(T=+o["number-rows-repeated"]||1)<10)for(z=0;z<T;++z)k>0&&(A[x+z]={level:k});C=-1;break;case"covered-table-cell":"/"!==a[1]&&++C,l.sheetStubs&&(l.dense?(v[x]||(v[x]=[]),v[x][C]={t:"z"}):v[Pn({r:x,c:C})]={t:"z"}),y="",w=[];break;case"table-cell":case"数据":if("/"===a[0].charAt(a[0].length-2))++C,m=Et(a[0],!1),O=parseInt(m["number-columns-repeated"]||"1",10),s={t:"z",v:null},m.formula&&0!=l.cellFormula&&(s.f=li(Dt(m.formula))),"string"==(m["数据类型"]||m["value-type"])&&(s.t="s",s.v=Dt(m["string-value"]||""),l.dense?(v[x]||(v[x]=[]),v[x][C]=s):v[Pn({r:x,c:C})]=s),C+=O-1;else if("/"!==a[1]){y="",b=0,w=[],O=1;var U=T?x+T-1:x;if(++C>E.e.c&&(E.e.c=C),C<E.s.c&&(E.s.c=C),x<E.s.r&&(E.s.r=x),U>E.e.r&&(E.e.r=U),L=[],N={},s={t:(m=Et(a[0],!1))["数据类型"]||m["value-type"],v:null},l.cellFormula)if(m.formula&&(m.formula=Dt(m.formula)),m["number-matrix-columns-spanned"]&&m["number-matrix-rows-spanned"]&&(D={s:{r:x,c:C},e:{r:x+(parseInt(m["number-matrix-rows-spanned"],10)||0)-1,c:C+(parseInt(m["number-matrix-columns-spanned"],10)||0)-1}},s.F=Fn(D),P.push([D,s.F])),m.formula)s.f=li(m.formula);else for(z=0;z<P.length;++z)x>=P[z][0].s.r&&x<=P[z][0].e.r&&C>=P[z][0].s.c&&C<=P[z][0].e.c&&(s.F=P[z][1]);switch((m["number-columns-spanned"]||m["number-rows-spanned"])&&(D={s:{r:x,c:C},e:{r:x+(parseInt(m["number-rows-spanned"],10)||0)-1,c:C+(parseInt(m["number-columns-spanned"],10)||0)-1}},_.push(D)),m["number-columns-repeated"]&&(O=parseInt(m["number-columns-repeated"],10)),s.t){case"boolean":s.t="b",s.v=Ft(m["boolean-value"]);break;case"float":case"percentage":case"currency":s.t="n",s.v=parseFloat(m.value);break;case"date":s.t="d",s.v=et(m["date-value"]),l.cellDates||(s.t="n",s.v=Ve(s.v)),s.z="m/d/yy";break;case"time":s.t="n",s.v=Xe(m["time-value"])/86400,l.cellDates&&(s.t="d",s.v=Ye(s.v)),s.z="HH:MM:SS";break;case"number":s.t="n",s.v=parseFloat(m["数据数值"]);break;default:if("string"!==s.t&&"text"!==s.t&&s.t)throw new Error("Unsupported value type "+s.t);s.t="s",null!=m["string-value"]&&(y=Dt(m["string-value"]),w=[])}}else{if(j=!1,"s"===s.t&&(s.v=y||"",w.length&&(s.R=w),j=0==b),F.Target&&(s.l=F),L.length>0&&(s.c=L,L=[]),y&&!1!==l.cellText&&(s.w=y),j&&(s.t="z",delete s.v),(!j||l.sheetStubs)&&!(l.sheetRows&&l.sheetRows<=x))for(var $=0;$<T;++$){if(O=parseInt(m["number-columns-repeated"]||"1",10),l.dense)for(v[x+$]||(v[x+$]=[]),v[x+$][C]=0==$?s:nt(s);--O>0;)v[x+$][C+O]=nt(s);else for(v[Pn({r:x+$,c:C})]=s;--O>0;)v[Pn({r:x+$,c:C+O})]=nt(s);E.e.c<=C&&(E.e.c=C)}C+=(O=parseInt(m["number-columns-repeated"]||"1",10))-1,O=0,s={},y="",w=[]}F={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if("/"===a[1]){if((n=c.pop())[0]!==a[3])throw"Bad state: "+n}else"/"!==a[0].charAt(a[0].length-2)&&c.push([a[3],!0]);break;case"annotation":if("/"===a[1]){if((n=c.pop())[0]!==a[3])throw"Bad state: "+n;N.t=y,w.length&&(N.R=w),N.a=M,L.push(N)}else"/"!==a[0].charAt(a[0].length-2)&&c.push([a[3],!1]);M="",R=0,y="",b=0,w=[];break;case"creator":"/"===a[1]?M=u.slice(R,a.index):R=a.index+a[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if("/"===a[1]){if((n=c.pop())[0]!==a[3])throw"Bad state: "+n}else"/"!==a[0].charAt(a[0].length-2)&&c.push([a[3],!1]);y="",b=0,w=[];break;case"scientific-number":case"currency-symbol":case"currency-style":case"script":case"libraries":case"automatic-styles":case"default-style":case"page-layout":case"style":case"map":case"font-face":case"paragraph-properties":case"table-properties":case"table-column-properties":case"table-row-properties":case"table-cell-properties":case"fraction":case"boolean-style":case"boolean":case"text-style":case"text-content":case"text-properties":case"embedded-text":case"body":case"电子表格":case"forms":case"table-column":case"table-header-rows":case"table-rows":case"table-column-group":case"table-header-columns":case"table-columns":case"null-date":case"graphic-properties":case"calculation-settings":case"named-expressions":case"label-range":case"label-ranges":case"named-expression":case"sort":case"sort-by":case"sort-groups":case"tab":case"line-break":case"span":case"s":case"date":case"object":case"title":case"标题":case"desc":case"binary-data":case"table-source":case"scenario":case"iteration":case"content-validations":case"content-validation":case"help-message":case"error-message":case"database-ranges":case"filter":case"filter-and":case"filter-or":case"filter-condition":case"list-level-style-bullet":case"list-level-style-number":case"list-level-properties":case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":case"event-listener":case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":case"config-item":case"page-number":case"page-count":case"time":case"cell-range-source":case"detective":case"operation":case"highlighted-range":case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":case"rect":case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":case"properties":case"property":case"table-protection":case"data-pilot-grand-total":case"office-document-common-attrs":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if("/"===a[1]){if(S[f.name]=d,(n=c.pop())[0]!==a[3])throw"Bad state: "+n}else"/"!==a[0].charAt(a[0].length-2)&&(d="",f=Et(a[0],!1),c.push([a[3],!0]));break;case"number":case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(c[c.length-1][0]){case"time-style":case"date-style":r=Et(a[0],!1),d+=to[a[3]]["long"===r.style?1:0]}break;case"text":if("/>"===a[0].slice(-2))break;if("/"===a[1])switch(c[c.length-1][0]){case"number-style":case"date-style":case"time-style":d+=u.slice(h,a.index)}else h=a.index+a[0].length;break;case"named-range":B=ci((r=Et(a[0],!1))["cell-range-address"]);var W={Name:r.name,Ref:B[0]+"!"+B[1]};H&&(W.Sheet=g.length),I.Names.push(W);break;case"p":case"文本串":if(["master-styles"].indexOf(c[c.length-1][0])>-1)break;if("/"!==a[1]||m&&m["string-value"])Et(a[0],!1),b=a.index+a[0].length;else{var V=eo(u.slice(b,a.index));y=(y.length>0?y+"\n":"")+V[0]}break;case"database-range":if("/"===a[1])break;try{p[(B=ci(Et(a[0])["target-range-address"]))[0]]["!autofilter"]={ref:B[1]}}catch(q){}break;case"a":if("/"!==a[1]){if(!(F=Et(a[0],!1)).href)break;F.Target=Dt(F.href),delete F.href,"#"==F.Target.charAt(0)&&F.Target.indexOf(".")>-1?(B=ci(F.Target.slice(1)),F.Target="#"+B[0]+"!"+B[1]):F.Target.match(/^\.\.[\\\/]/)&&(F.Target=F.Target.slice(3))}break;default:switch(a[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(l.WTF)throw new Error(a)}}var G={Sheets:p,SheetNames:g,Workbook:I};return l.bookSheets&&delete G.Sheets,G}(Bt(n),t);return ut(e,"meta.xml")&&(r.Props=tr(ft(e,"meta.xml"))),r}var ro=function(){var e=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),t="<office:document-styles "+Wt({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+e+"</office:document-styles>";return function(){return mt+t}}(),io=function(){var e=function(e){return Ot(e).replace(/ +/g,function(e){return'<text:s text:c="'+e.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},t=" <table:table-cell />\n",n=function(n,r,i){var o=[];o.push(' <table:table table:name="'+Ot(r.SheetNames[i])+'" table:style-name="ta1">\n');var a=0,s=0,l=In(n["!ref"]||"A1"),u=n["!merges"]||[],c=0,f=Array.isArray(n);if(n["!cols"])for(s=0;s<=l.e.c;++s)o.push(" <table:table-column"+(n["!cols"][s]?' table:style-name="co'+n["!cols"][s].ods+'"':"")+"></table:table-column>\n");var d="",h=n["!rows"]||[];for(a=0;a<l.s.r;++a)d=h[a]?' table:style-name="ro'+h[a].ods+'"':"",o.push(" <table:table-row"+d+"></table:table-row>\n");for(;a<=l.e.r;++a){for(d=h[a]?' table:style-name="ro'+h[a].ods+'"':"",o.push(" <table:table-row"+d+">\n"),s=0;s<l.s.c;++s)o.push(t);for(;s<=l.e.c;++s){var p=!1,g={},v="";for(c=0;c!=u.length;++c)if(!(u[c].s.c>s||u[c].s.r>a||u[c].e.c<s||u[c].e.r<a)){u[c].s.c==s&&u[c].s.r==a||(p=!0),g["table:number-columns-spanned"]=u[c].e.c-u[c].s.c+1,g["table:number-rows-spanned"]=u[c].e.r-u[c].s.r+1;break}if(p)o.push(" <table:covered-table-cell/>\n");else{var m=Pn({r:a,c:s}),y=f?(n[a]||[])[s]:n[m];if(y&&y.f&&(g["table:formula"]=Ot(ui(y.f)),y.F&&y.F.slice(0,m.length)==m)){var b=In(y.F);g["table:number-matrix-columns-spanned"]=b.e.c-b.s.c+1,g["table:number-matrix-rows-spanned"]=b.e.r-b.s.r+1}if(y){switch(y.t){case"b":v=y.v?"TRUE":"FALSE",g["office:value-type"]="boolean",g["office:boolean-value"]=y.v?"true":"false";break;case"n":v=y.w||String(y.v||0),g["office:value-type"]="float",g["office:value"]=y.v||0;break;case"s":case"str":v=null==y.v?"":y.v,g["office:value-type"]="string";break;case"d":v=y.w||et(y.v).toISOString(),g["office:value-type"]="date",g["office:date-value"]=et(y.v).toISOString(),g["table:style-name"]="ce1";break;default:o.push(t);continue}var w=e(v);if(y.l&&y.l.Target){var x=y.l.Target;"#"==(x="#"==x.charAt(0)?"#"+fi(x.slice(1)):x).charAt(0)||x.match(/^\w+:/)||(x="../"+x),w=Vt("text:a",w,{"xlink:href":x.replace(/&/g,"&amp;")})}o.push(" "+Vt("table:table-cell",Vt("text:p",w,{}),g)+"\n")}else o.push(t)}}o.push(" </table:table-row>\n")}return o.push(" </table:table>\n"),o.join("")};return function(e,t){var r=[mt],i=Wt({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),o=Wt({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==t.bookType?(r.push("<office:document"+i+o+">\n"),r.push(Zn().replace(/office:document-meta/g,"office:meta"))):r.push("<office:document-content"+i+">\n"),function(e,t){e.push(" <office:automatic-styles>\n"),e.push(' <number:date-style style:name="N37" number:automatic-order="true">\n'),e.push(' <number:month number:style="long"/>\n'),e.push(" <number:text>/</number:text>\n"),e.push(' <number:day number:style="long"/>\n'),e.push(" <number:text>/</number:text>\n"),e.push(" <number:year/>\n"),e.push(" </number:date-style>\n");var n=0;t.SheetNames.map(function(e){return t.Sheets[e]}).forEach(function(t){if(t&&t["!cols"])for(var r=0;r<t["!cols"].length;++r)if(t["!cols"][r]){var i=t["!cols"][r];if(null==i.width&&null==i.wpx&&null==i.wch)continue;Ir(i),i.ods=n;var o=t["!cols"][r].wpx+"px";e.push(' <style:style style:name="co'+n+'" style:family="table-column">\n'),e.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+o+'"/>\n'),e.push(" </style:style>\n"),++n}});var r=0;t.SheetNames.map(function(e){return t.Sheets[e]}).forEach(function(t){if(t&&t["!rows"])for(var n=0;n<t["!rows"].length;++n)if(t["!rows"][n]){t["!rows"][n].ods=r;var i=t["!rows"][n].hpx+"px";e.push(' <style:style style:name="ro'+r+'" style:family="table-row">\n'),e.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+i+'"/>\n'),e.push(" </style:style>\n"),++r}}),e.push(' <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">\n'),e.push(' <style:table-properties table:display="true" style:writing-mode="lr-tb"/>\n'),e.push(" </style:style>\n"),e.push(' <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>\n'),e.push(" </office:automatic-styles>\n")}(r,e),r.push(" <office:body>\n"),r.push(" <office:spreadsheet>\n");for(var a=0;a!=e.SheetNames.length;++a)r.push(n(e.Sheets[e.SheetNames[a]],e,a));return r.push(" </office:spreadsheet>\n"),r.push(" </office:body>\n"),"fods"==t.bookType?r.push("</office:document>"):r.push("</office:document-content>"),r.join("")}}();function oo(e,t){if("fods"==t.bookType)return io(e,t);var n=gt(),r="",i=[],o=[];return pt(n,r="mimetype","application/vnd.oasis.opendocument.spreadsheet"),pt(n,r="content.xml",io(e,t)),i.push([r,"text/xml"]),o.push([r,"ContentFile"]),pt(n,r="styles.xml",ro()),i.push([r,"text/xml"]),o.push([r,"StylesFile"]),pt(n,r="meta.xml",mt+Zn()),i.push([r,"text/xml"]),o.push([r,"MetadataFile"]),pt(n,r="manifest.rdf",function(e){var t=[mt];t.push('<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">\n');for(var n=0;n!=e.length;++n)t.push(Xn(e[n][0],e[n][1])),t.push(Jn("",e[n][0]));return t.push(Xn("","Document","pkg")),t.push("</rdf:RDF>"),t.join("")}(o)),i.push([r,"application/rdf+xml"]),pt(n,r="META-INF/manifest.xml",function(e){var t=[mt];t.push('<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">\n'),t.push(' <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>\n');for(var n=0;n<e.length;++n)t.push(' <manifest:file-entry manifest:full-path="'+e[n][0]+'" manifest:media-type="'+e[n][1]+'"/>\n');return t.push("</manifest:manifest>"),t.join("")}(i)),n}function ao(e){return function(t){for(var n=0;n!=e.length;++n){var r=e[n];void 0===t[r[0]]&&(t[r[0]]=r[1]),"n"===r[2]&&(t[r[0]]=Number(t[r[0]]))}}}function so(e){ao([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(e)}function lo(e){return Vn.WS.indexOf(e)>-1?"sheet":Vn.CS&&e==Vn.CS?"chart":e==Vn.DS?"dialog":e==Vn.MS?"macro":e&&e.length?e:"sheet"}function uo(e,t,n,r,i,o,a,s,l,u,c,f){try{o[r]=qn(dt(e,n,!0),t);var d,h=ft(e,t);switch(s){case"sheet":d=function(e,t,n,r,i,o,a,s){return".bin"===t.slice(-4)?parse_ws_bin(e,r,n,i,o,a,s):function(e,t,n,r,i,o,a){if(!e)return e;r||(r={"!id":{}});var s=t.dense?[]:{},l={s:{r:2e6,c:2e6},e:{r:0,c:0}},u="",c="",f=e.match(wi);f?(u=e.slice(0,f.index),c=e.slice(f.index+f[0].length)):u=c=e;var d=u.match(_i);d?Ti(d[0],0,i,n):(d=u.match(Di))&&function(e,t,n,r,i){Ti(e.slice(0,e.indexOf(">")),0,r,i)}(d[0],d[1],0,i,n);var h=(u.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(h>0){var p=u.slice(h,h+50).match(Ci);p&&function(e,t){var n=Bn(t);n.s.r<=n.e.r&&n.s.c<=n.e.c&&n.s.r>=0&&n.s.c>=0&&(e["!ref"]=Fn(n))}(s,p[1])}var g=u.match(Ai);g&&g[1]&&function(e,t){t.Views||(t.Views=[{}]),(e.match(Ii)||[]).forEach(function(e,n){var r=Et(e);t.Views[n]||(t.Views[n]={}),+r.zoomScale&&(t.Views[n].zoom=+r.zoomScale),Ft(r.rightToLeft)&&(t.Views[n].RTL=!0)})}(g[1],i);var v=[];if(t.cellStyles){var m=u.match(Ei);m&&function(e,t){for(var n=!1,r=0;r!=t.length;++r){var i=Et(t[r],!0);i.hidden&&(i.hidden=Ft(i.hidden));var o=parseInt(i.min,10)-1,a=parseInt(i.max,10)-1;for(i.outlineLevel&&(i.level=+i.outlineLevel||0),delete i.min,delete i.max,i.width=+i.width,!n&&i.width&&(n=!0,Pr(i.width)),Ir(i);o<=a;)e[o++]=nt(i)}}(v,m)}f&&Bi(f[1],s,t,l,o,a);var y=c.match(ki);y&&(s["!autofilter"]=function(e){return{ref:(e.match(/ref="([^"]*)"/)||[])[1]}}(y[0]));var b=[],w=c.match(bi);if(w)for(h=0;h!=w.length;++h)b[h]=Bn(w[h].slice(w[h].indexOf('"')+1));var x=c.match(xi);x&&function(e,t,n){for(var r=Array.isArray(e),i=0;i!=t.length;++i){var o=Et(Bt(t[i]),!0);if(!o.ref)return;var a=((n||{})["!id"]||[])[o.id];a?(o.Target=a.Target,o.location&&(o.Target+="#"+Dt(o.location))):(o.Target="#"+Dt(o.location),a={Target:o.Target,TargetMode:"Internal"}),o.Rel=a,o.tooltip&&(o.Tooltip=o.tooltip,delete o.tooltip);for(var s=Bn(o.ref),l=s.s.r;l<=s.e.r;++l)for(var u=s.s.c;u<=s.e.c;++u){var c=Pn({c:u,r:l});r?(e[l]||(e[l]=[]),e[l][u]||(e[l][u]={t:"z",v:void 0}),e[l][u].l=o):(e[c]||(e[c]={t:"z",v:void 0}),e[c].l=o)}}}(s,x,r);var C=c.match(Si);if(C&&(s["!margins"]=function(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(n){e[n]&&(t[n]=parseFloat(e[n]))}),t}(Et(C[0]))),!s["!ref"]&&l.e.c>=l.s.c&&l.e.r>=l.s.r&&(s["!ref"]=Fn(l)),t.sheetRows>0&&s["!ref"]){var E=Bn(s["!ref"]);t.sheetRows<=+E.e.r&&(E.e.r=t.sheetRows-1,E.e.r>l.e.r&&(E.e.r=l.e.r),E.e.r<E.s.r&&(E.s.r=E.e.r),E.e.c>l.e.c&&(E.e.c=l.e.c),E.e.c<E.s.c&&(E.s.c=E.e.c),s["!fullref"]=s["!ref"],s["!ref"]=Fn(E))}return v.length>0&&(s["!cols"]=v),b.length>0&&(s["!merges"]=b),s}(e,r,n,i,o,a,s)}(h,t,i,l,o[r],u,c,f);break;case"chart":if(!(d=function(e,t,n,r,i,o,a,s){return".bin"===t.slice(-4)?parse_cs_bin(e,r,n,i,o,a,s):function(e,t,n,r,i){if(!e)return e;r||(r={"!id":{}});var o,a={"!type":"chart","!drawel":null,"!rel":""},s=e.match(_i);return s&&Ti(s[0],0,i,n),(o=e.match(/drawing r:id="(.*?)"/))&&(a["!rel"]=o[1]),r["!id"][a["!rel"]]&&(a["!drawel"]=r["!id"][a["!rel"]]),a}(e,0,n,i,o)}(h,t,i,l,o[r],u,c,f))||!d["!drawel"])break;var p=vt(d["!drawel"].Target,t),g=Gn(p),v=function(e,t){if(!e)return"??";var n=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][n].Target}(dt(e,p,!0),qn(dt(e,g,!0),p)),m=vt(v,p),y=Gn(m);d=function(e,t,n,r,i,o){var a=o||{"!type":"chart"};if(!e)return o;var s=0,l=0,u="A",c={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(e){var t=function(e){var t,n=[],r=e.match(/^<c:numCache>/);(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/gm)||[]).forEach(function(e){var t=e.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);t&&(n[+t[1]]=r?+t[2]:t[2])});var i=Dt((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/gm)||[]).forEach(function(e){t=e.replace(/<.*?>/g,"")}),[n,i,t]}(e);c.s.r=c.s.c=0,c.e.c=s,u=Tn(s),t[0].forEach(function(e,n){a[u+Dn(n)]={t:"n",v:e,z:t[1]},l=n}),c.e.r<l&&(c.e.r=l),++s}),s>0&&(a["!ref"]=Fn(c)),a}(dt(e,m,!0),0,0,qn(dt(e,y,!0),m),0,d);break;case"macro":d=function(e,t){return t.slice(-4),{"!type":"macro"}}(0,t,o[r]);break;case"dialog":d=function(e,t){return t.slice(-4),{"!type":"dialog"}}(0,t,o[r]);break;default:throw new Error("Unrecognized sheet type "+s)}a[r]=d;var b=[];o&&o[r]&&ze(o[r]).forEach(function(n){var i="";if(o[r][n].Type==Vn.CMNT){i=vt(o[r][n].Target,t);var a=function(e,t,n){return".bin"===t.slice(-4)?parse_comments_bin(e,n):function(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var n=[],r=[],i=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);i&&i[1]&&i[1].split(/<\/\w*:?author>/).forEach(function(e){if(""!==e&&""!==e.trim()){var t=e.match(/<(?:\w+:)?author[^>]*>(.*)/);t&&n.push(t[1])}});var o=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return o&&o[1]&&o[1].split(/<\/\w*:?comment>/).forEach(function(e){if(""!==e&&""!==e.trim()){var i=e.match(/<(?:\w+:)?comment[^>]*>/);if(i){var o=Et(i[0]),a={author:o.authorId&&n[o.authorId]||"sheetjsghost",ref:o.ref,guid:o.guid},s=On(o.ref);if(!(t.sheetRows&&t.sheetRows<=s.r)){var l=e.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),u=!!l&&!!l[1]&&br(l[1])||{r:"",t:"",h:""};a.r=u.r,"<t></t>"==u.r&&(u.t=u.h=""),a.t=(u.t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),t.cellHTML&&(a.h=u.h),r.push(a)}}}}),r}(e,n)}(ft(e,i,!0),i,l);if(!a||!a.length)return;Zr(d,a,!1)}o[r][n].Type==Vn.TCMNT&&(i=vt(o[r][n].Target,t),b=b.concat(function(e,t){var n=[],r=!1,i={},o=0;return e.replace(wt,function(a,s){var l=Et(a);switch(kt(l[0])){case"<?xml":case"<ThreadedComments":case"</ThreadedComments>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<threadedComment":i={author:l.personId,guid:l.id,ref:l.ref,T:1};break;case"</threadedComment>":null!=i.t&&n.push(i);break;case"<text>":case"<text":o=s+a.length;break;case"</text>":i.t=e.slice(o,s).replace(/\r\n/g,"\n").replace(/\r/g,"\n");break;case"<mentions":case"<mentions>":case"<ext":r=!0;break;case"</mentions>":case"</ext>":r=!1;break;default:if(!r&&t.WTF)throw new Error("unrecognized "+l[0]+" in threaded comments")}return a}),n}(ft(e,i,!0),l)))}),b&&b.length&&Zr(d,b,!0,l.people||[])}catch(w){if(l.WTF)throw w}}function co(e){return"/"==e.charAt(0)?e.slice(1):e}function fo(e,t){if(pe(),function(e){ao([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}(t=t||{}),ut(e,"META-INF/manifest.xml"))return no(e,t);if(ut(e,"objectdata.xml"))return no(e,t);if(ut(e,"Index/Document.iwa")){if("undefined"==typeof Uint8Array)throw new Error("NUMBERS file parsing requires Uint8Array support");if("undefined"!=typeof parse_numbers_iwa){if(e.FileIndex)return parse_numbers_iwa(e);var n=Re.utils.cfb_new();return ht(e).forEach(function(t){pt(n,t,function(e,t){return lt(ct(e,t))}(e,t))}),parse_numbers_iwa(n)}throw new Error("Unsupported NUMBERS file")}if(!ut(e,"[Content_Types].xml")){if(ut(e,"index.xml.gz"))throw new Error("Unsupported NUMBERS 08 file");if(ut(e,"index.xml"))throw new Error("Unsupported NUMBERS 09 file");throw new Error("Unsupported ZIP file")}var r,i,o=ht(e),a=function(e){var t={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};if(!e||!e.match)return t;var n={};if((e.match(wt)||[]).forEach(function(e){var r=Et(e);switch(r[0].replace(xt,"<")){case"<?xml":break;case"<Types":t.xmlns=r["xmlns"+(r[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":n[r.Extension]=r.ContentType;break;case"<Override":void 0!==t[Un[r.ContentType]]&&t[Un[r.ContentType]].push(r.PartName)}}),t.xmlns!==Yt)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=n,delete t.calcchains,t}(dt(e,"[Content_Types].xml")),s=!1;if(0===a.workbooks.length&&ft(e,i="xl/workbook.xml",!0)&&a.workbooks.push(i),0===a.workbooks.length){if(!ft(e,i="xl/workbook.bin",!0))throw new Error("Could not find workbook");a.workbooks.push(i),s=!0}"bin"==a.workbooks[0].slice(-3)&&(s=!0);var l={},u={};if(!t.bookSheets&&!t.bookProps){if(di=[],a.sst)try{di=function(e,t,n){return".bin"===t.slice(-4)?parse_sst_bin(e,n):function(e,t){var n=[],r="";if(!e)return n;var i=e.match(wr);if(i){r=i[2].replace(xr,"").split(Cr);for(var o=0;o!=r.length;++o){var a=br(r[o].trim(),t);null!=a&&(n[n.length]=a)}i=Et(i[1]),n.Count=i.count,n.Unique=i.uniqueCount}return n}(e,n)}(ft(e,co(a.sst)),a.sst,t)}catch(ke){if(t.WTF)throw ke}t.cellStyles&&a.themes.length&&(l=function(e,t,n){return function(e,t){var n;e&&0!==e.length||(e=Kr());var r={};if(!(n=e.match(qr)))throw new Error("themeElements not found in theme");return function(e,t,n){var r;t.themeElements={},[["clrScheme",Wr,zr],["fontScheme",Vr,Ur],["fmtScheme",Gr,$r]].forEach(function(i){if(!(r=e.match(i[1])))throw new Error(i[0]+" not found in themeElements");i[2](r,t,n)})}(n[0],r,t),r.raw=e,r}(e,n)}(dt(e,a.themes[0].replace(/^\//,""),!0)||"",a.themes[0],t)),a.style&&(u=function(e,t,n,r){return".bin"===t.slice(-4)?parse_sty_bin(e,n,r):Rr(e,n,r)}(ft(e,co(a.style)),a.style,l,t))}a.links.map(function(n){try{return qn(dt(e,Gn(co(n))),n),function(e,t,n,r){if(".bin"===n.slice(-4))return function(e,t,n,r){if(!e)return e;var i=r||{},o=!1;!function(e,t,n){if(e){var r,i,o;kn(e,e.l||0);for(var a=e.length,s=0,l=0;e.l<a;){128&(s=e._R(1))&&(s=(127&s)+((127&e._R(1))<<7));var u=XLSBRecordEnum[s]||XLSBRecordEnum[65535];for(o=127&(r=e._R(1)),i=1;i<4&&128&r;++i)o+=(127&(r=e._R(1)))<<7*i;if(l=e.l+o,u.f&&u.f(e,o,n),e.l=l,t(0,u,s))return}}}(e,function(e,t,n){switch(n){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:o=!0;break;case 36:o=!1;break;default:if(t.T);else if(!o||i.WTF)throw new Error("Unexpected record 0x"+n.toString(16))}},i)}(e,0,0,r)}(ft(e,co(n)),0,n,t)}catch(r){}});var c=function(e,t,n){return".bin"===t.slice(-4)?parse_wb_bin(e,n):function(e,t){if(!e)throw new Error("Could not find file");var n={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},r=!1,i="xmlns",o={},a=0;if(e.replace(wt,function(s,l){var u=Et(s);switch(kt(u[0])){case"<?xml":case"</workbook>":case"<fileVersion/>":case"</fileVersion>":case"<fileSharing":case"<fileSharing/>":case"</workbookPr>":case"<workbookProtection":case"<workbookProtection/>":case"<bookViews":case"<bookViews>":case"</bookViews>":case"</workbookView>":case"<sheets":case"<sheets>":case"</sheets>":case"</sheet>":case"<functionGroups":case"<functionGroups/>":case"<functionGroup":case"<externalReferences":case"</externalReferences>":case"<externalReferences>":case"<externalReference":case"<definedNames/>":case"<definedName/>":case"</calcPr>":case"<oleSize":case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":case"<customWorkbookView":case"</customWorkbookView>":case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":case"<pivotCache":case"<smartTagPr":case"<smartTagPr/>":case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":case"<smartTagType":case"<webPublishing":case"<webPublishing/>":case"<fileRecoveryPr":case"<fileRecoveryPr/>":case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":case"<webPublishObject":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":case"<ArchID":case"<revisionPtr":break;case"<workbook":s.match(Vi)&&(i="xmlns"+s.match(/<(\w+):/)[1]),n.xmlns=u[i];break;case"<fileVersion":delete u[0],n.AppVersion=u;break;case"<workbookPr":case"<workbookPr/>":Ni.forEach(function(e){if(null!=u[e[0]])switch(e[2]){case"bool":n.WBProps[e[0]]=Ft(u[e[0]]);break;case"int":n.WBProps[e[0]]=parseInt(u[e[0]],10);break;default:n.WBProps[e[0]]=u[e[0]]}}),u.codeName&&(n.WBProps.CodeName=Bt(u.codeName));break;case"<workbookView":case"<workbookView/>":delete u[0],n.WBView.push(u);break;case"<sheet":switch(u.state){case"hidden":u.Hidden=1;break;case"veryHidden":u.Hidden=2;break;default:u.Hidden=0}delete u.state,u.name=Dt(Bt(u.name)),delete u[0],n.Sheets.push(u);break;case"<definedNames>":case"<definedNames":case"<ext":case"<AlternateContent":case"<AlternateContent>":r=!0;break;case"</definedNames>":case"</ext>":case"</AlternateContent>":r=!1;break;case"<definedName":(o={}).Name=Bt(u.name),u.comment&&(o.Comment=u.comment),u.localSheetId&&(o.Sheet=+u.localSheetId),Ft(u.hidden||"0")&&(o.Hidden=!0),a=l+s.length;break;case"</definedName>":o.Ref=Dt(Bt(e.slice(a,l))),n.Names.push(o);break;case"<calcPr":case"<calcPr/>":delete u[0],n.CalcPr=u;break;default:if(!r&&t.WTF)throw new Error("unrecognized "+u[0]+" in workbook")}return s}),-1===en.indexOf(n.xmlns))throw new Error("Unknown Namespace: "+n.xmlns);return function(e){zi(e.WBProps,Ni),zi(e.CalcPr,ji),Hi(e.WBView,Mi),Hi(e.Sheets,Ri),hi.date1904=Ft(e.WBProps.date1904)}(n),n}(e,n)}(ft(e,co(a.workbooks[0])),a.workbooks[0],t),f={},d="";a.coreprops.length&&((d=ft(e,co(a.coreprops[0]),!0))&&(f=tr(d)),0!==a.extprops.length&&(d=ft(e,co(a.extprops[0]),!0))&&function(e,t,n){var r={};t||(t={}),e=Bt(e),ir.forEach(function(n){var i=(e.match(Nt(n[0]))||[])[1];switch(n[2]){case"string":i&&(t[n[1]]=Dt(i));break;case"bool":t[n[1]]="true"===i;break;case"raw":var o=e.match(new RegExp("<"+n[0]+"[^>]*>([\\s\\S]*?)</"+n[0]+">"));o&&o.length>0&&(r[n[1]]=o[1])}}),r.HeadingPairs&&r.TitlesOfParts&&function(e,t,n,r){var i=[];if("string"==typeof e)i=zt(e,r);else for(var o=0;o<e.length;++o)i=i.concat(e[o].map(function(e){return{v:e}}));var a="string"==typeof t?zt(t,r).map(function(e){return e.v}):t,s=0,l=0;if(a.length>0)for(var u=0;u!==i.length;u+=2){switch(l=+i[u+1].v,i[u].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":n.Worksheets=l,n.SheetNames=a.slice(s,s+l);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":n.NamedRanges=l,n.DefinedNames=a.slice(s,s+l);break;case"Charts":case"Diagramme":n.Chartsheets=l,n.ChartNames=a.slice(s,s+l)}s+=l}}(r.HeadingPairs,r.TitlesOfParts,t,n)}(d,f,t));var h={};t.bookSheets&&!t.bookProps||0!==a.custprops.length&&(d=dt(e,co(a.custprops[0]),!0))&&(h=function(e,t){var n={},r="",i=e.match(ar);if(i)for(var o=0;o!=i.length;++o){var a=i[o],s=Et(a);switch(s[0]){case"<?xml":case"<Properties":break;case"<property":r=Dt(s.name);break;case"</property>":r=null;break;default:if(0===a.indexOf("<vt:")){var l=a.split(">"),u=l[0].slice(4),c=l[1];switch(u){case"lpstr":case"bstr":case"lpwstr":case"cy":case"error":n[r]=Dt(c);break;case"bool":n[r]=Ft(c);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":n[r]=parseInt(c,10);break;case"r4":case"r8":case"decimal":n[r]=parseFloat(c);break;case"filetime":case"date":n[r]=et(c);break;default:if("/"==u.slice(-1))break;t.WTF&&"undefined"!=typeof console&&console.warn("Unexpected",a,u,l)}}else if("</"===a.slice(0,2));else if(t.WTF)throw new Error(a)}}return n}(d,t));var p={};if((t.bookSheets||t.bookProps)&&(c.Sheets?r=c.Sheets.map(function(e){return e.name}):f.Worksheets&&f.SheetNames.length>0&&(r=f.SheetNames),t.bookProps&&(p.Props=f,p.Custprops=h),t.bookSheets&&void 0!==r&&(p.SheetNames=r),t.bookSheets?p.SheetNames:t.bookProps))return p;r={};var g={};t.bookDeps&&a.calcchain&&(g=function(e,t,n){return".bin"===t.slice(-4)?parse_cc_bin(e,t,n):parse_cc_xml(e,t,n)}(ft(e,co(a.calcchain)),a.calcchain,t));var v,m,y=0,b={},w=c.Sheets;f.Worksheets=w.length,f.SheetNames=[];for(var x=0;x!=w.length;++x)f.SheetNames[x]=w[x].name;var C=s?"bin":"xml",E=a.workbooks[0].lastIndexOf("/"),k=(a.workbooks[0].slice(0,E+1)+"_rels/"+a.workbooks[0].slice(E+1)+".rels").replace(/^\//,"");ut(e,k)||(k="xl/_rels/workbook."+C+".rels");var S=qn(dt(e,k,!0),k.replace(/_rels.*/,"s5s"));(a.metadata||[]).length>=1&&(t.xlmeta=function(e,t,n){return".bin"===t.slice(-4)?parse_xlmeta_bin(e,t,n):function(e,t,n){var r={Types:[],Cell:[],Value:[]};if(!e)return r;var i,o=!1,a=2;return e.replace(wt,function(e){var t=Et(e);switch(kt(t[0])){case"<?xml":case"<metadata":case"</metadata>":case"<metadataTypes":case"</metadataTypes>":case"</metadataType>":case"</futureMetadata>":case"<bk>":case"</bk>":case"</rc>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<metadataType":r.Types.push({name:t.name});break;case"<futureMetadata":for(var s=0;s<r.Types.length;++s)r.Types[s].name==t.name&&(i=r.Types[s]);break;case"<rc":1==a?r.Cell.push({type:r.Types[t.t-1].name,index:+t.v}):0==a&&r.Value.push({type:r.Types[t.t-1].name,index:+t.v});break;case"<cellMetadata":a=1;break;case"</cellMetadata>":case"</valueMetadata>":a=2;break;case"<valueMetadata":a=0;break;case"<ext":o=!0;break;case"</ext>":o=!1;break;case"<rvb":if(!i)break;i.offsets||(i.offsets=[]),i.offsets.push(+t.i);break;default:if(!o&&n.WTF)throw new Error("unrecognized "+t[0]+" in metadata")}return e}),r}(e,0,n)}(ft(e,co(a.metadata[0])),a.metadata[0],t)),(a.people||[]).length>=1&&(t.people=function(e,t){var n=[],r=!1;return e.replace(wt,function(e){var i=Et(e);switch(kt(i[0])){case"<?xml":case"<personList":case"</personList>":case"</person>":case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<person":n.push({name:i.displayname,id:i.id});break;case"<ext":r=!0;break;case"</ext>":r=!1;break;default:if(!r&&t.WTF)throw new Error("unrecognized "+i[0]+" in threaded comments")}return e}),n}(ft(e,co(a.people[0])),t)),S&&(S=function(e,t){if(!e)return 0;try{e=t.map(function(t){return t.id||(t.id=t.strRelID),[t.name,e["!id"][t.id].Target,lo(e["!id"][t.id].Type)]})}catch(n){return null}return e&&0!==e.length?e:null}(S,c.Sheets));var _=ft(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(y=0;y!=f.Worksheets;++y){var D="sheet";if(S&&S[y]?(v="xl/"+S[y][1].replace(/[\/]?xl\//,""),ut(e,v)||(v=S[y][1]),ut(e,v)||(v=k.replace(/_rels\/.*$/,"")+S[y][1]),D=S[y][2]):v=(v="xl/worksheets/sheet"+(y+1-_)+"."+C).replace(/sheet0\./,"sheet."),m=v.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&null!=t.sheets)switch(typeof t.sheets){case"number":if(y!=t.sheets)continue e;break;case"string":if(f.SheetNames[y].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var A=!1,T=0;T!=t.sheets.length;++T)"number"==typeof t.sheets[T]&&t.sheets[T]==y&&(A=1),"string"==typeof t.sheets[T]&&t.sheets[T].toLowerCase()==f.SheetNames[y].toLowerCase()&&(A=1);if(!A)continue e}}uo(e,v,m,f.SheetNames[y],y,b,r,D,t,c,l,u)}return p={Directory:a,Workbook:c,Props:f,Custprops:h,Deps:g,Sheets:r,SheetNames:f.SheetNames,Strings:di,Styles:u,Themes:l,SSF:nt(F)},t&&t.bookFiles&&(e.files?(p.keys=o,p.files=e.files):(p.keys=[],p.files={},e.FullPaths.forEach(function(t,n){t=t.replace(/^Root Entry[\/]/,""),p.keys.push(t),p.files[t]=e.FileIndex[n]}))),t&&t.bookVBA&&(a.vba.length>0?p.vbaraw=ft(e,co(a.vba[0]),!0):a.defaults&&"application/vnd.ms-office.vbaProject"===a.defaults.bin&&(p.vbaraw=ft(e,"xl/vbaProject.bin",!0))),p}function ho(e,t){Xr=1024,e&&!e.SSF&&(e.SSF=nt(F)),e&&e.SSF&&(pe(),he(e.SSF),t.revssf=$e(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,pi?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n="xml",r=ti.indexOf(t.bookType)>-1,i={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};so(t=t||{});var o=gt(),a="",s=0;if(t.cellXfs=[],vi(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),pt(o,a="docProps/core.xml",rr(e.Props,t)),i.coreprops.push(a),Yn(t.rels,2,a,Vn.CORE_PROPS),a="docProps/app.xml",e.Props&&e.Props.SheetNames);else if(e.Workbook&&e.Workbook.Sheets){for(var l=[],u=0;u<e.SheetNames.length;++u)2!=(e.Workbook.Sheets[u]||{}).Hidden&&l.push(e.SheetNames[u]);e.Props.SheetNames=l}else e.Props.SheetNames=e.SheetNames;e.Props.Worksheets=e.Props.SheetNames.length,pt(o,a,or(e.Props)),i.extprops.push(a),Yn(t.rels,3,a,Vn.EXT_PROPS),e.Custprops!==e.Props&&ze(e.Custprops||{}).length>0&&(pt(o,a="docProps/custom.xml",sr(e.Custprops)),i.custprops.push(a),Yn(t.rels,4,a,Vn.CUST_PROPS));var c=["SheetJ5"];for(t.tcid=0,s=1;s<=e.SheetNames.length;++s){var f={"!id":{}},d=e.Sheets[e.SheetNames[s-1]];if((d||{})["!type"],pt(o,a="xl/worksheets/sheet"+s+"."+n,Li(s-1,t,e,f)),i.sheets.push(a),Yn(t.wbrels,-1,"worksheets/sheet"+s+"."+n,Vn.WS[0]),d){var h=d["!comments"],p=!1,g="";if(h&&h.length>0){var v=!1;h.forEach(function(e){e[1].forEach(function(e){1==e.T&&(v=!0)})}),v&&(pt(o,g="xl/threadedComments/threadedComment"+s+"."+n,ei(h,c,t)),i.threadedcomments.push(g),Yn(f,-1,"../threadedComments/threadedComment"+s+"."+n,Vn.TCMNT)),pt(o,g="xl/comments"+s+"."+n,Qr(h)),i.comments.push(g),Yn(f,-1,"../comments"+s+"."+n,Vn.CMNT),p=!0}d["!legacy"]&&p&&pt(o,"xl/drawings/vmlDrawing"+s+".vml",Jr(s,d["!comments"])),delete d["!comments"],delete d["!legacy"]}f["!id"].rId1&&pt(o,Gn(a),Kn(f))}return null!=t.Strings&&t.Strings.length>0&&(pt(o,a="xl/sharedStrings."+n,kr(t.Strings,t)),i.strs.push(a),Yn(t.wbrels,-1,"sharedStrings."+n,Vn.SST)),pt(o,a="xl/workbook."+n,Gi(e)),i.workbooks.push(a),Yn(t.rels,1,a,Vn.WB),pt(o,a="xl/theme/theme1.xml",Kr(e.Themes,t)),i.themes.push(a),Yn(t.wbrels,-1,"theme/theme1.xml",Vn.THEME),pt(o,a="xl/styles."+n,jr(e,t)),i.styles.push(a),Yn(t.wbrels,-1,"styles."+n,Vn.STY),e.vbaraw&&r&&(pt(o,a="xl/vbaProject.bin",e.vbaraw),i.vba.push(a),Yn(t.wbrels,-1,"vbaProject.bin",Vn.VBA)),pt(o,a="xl/metadata."+n,Yr()),i.metadata.push(a),Yn(t.wbrels,-1,"metadata."+n,Vn.XLMETA),c.length>1&&(pt(o,a="xl/persons/person.xml",function(e){var t=[mt,Vt("personList",null,{xmlns:Xt,"xmlns:x":en[0]}).replace(/[\/]>/,">")];return e.forEach(function(e,n){t.push(Vt("person",null,{displayName:e,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:e,providerId:"None"}))}),t.push("</personList>"),t.join("")}(c)),i.people.push(a),Yn(t.wbrels,-1,"persons/person.xml",Vn.PEOPLE)),pt(o,"[Content_Types].xml",Wn(i,t)),pt(o,"_rels/.rels",Kn(t.rels)),pt(o,"xl/_rels/workbook.xml.rels",Kn(t.wbrels)),delete t.revssf,delete t.ssf,o}function po(e,t){var n="";switch((t||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":n=p(e.slice(0,12));break;case"binary":n=e;break;default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function go(e,t){var n=0;e:for(;n<e.length;)switch(e.charCodeAt(n)){case 10:case 13:case 32:++n;break;case 60:return parse_xlml(e.slice(n),t);default:break e}return hr.to_workbook(e,t)}function vo(e,t,n,r){return r?(n.type="string",hr.to_workbook(e,n)):hr.to_workbook(t,n)}function mo(e,t){s();var n=t||{};if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer)return mo(new Uint8Array(e),((n=nt(n)).type="array",n));"undefined"!=typeof Uint8Array&&e instanceof Uint8Array&&!n.type&&(n.type="undefined"!=typeof Deno?"buffer":"array");var r,i=e,o=!1;if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),hi={},n.dateNF&&(hi.dateNF=n.dateNF),n.type||(n.type="base64"),"file"==n.type&&(n.type="binary",i=function(e){if(void 0!==ge)return ge.readFileSync(e);if("undefined"!=typeof Deno)return Deno.readFileSync(e);if("undefined"!=typeof $&&"undefined"!=typeof File&&"undefined"!=typeof Folder)try{var t=File(e);t.open("r"),t.encoding="binary";var n=t.read();return t.close(),n}catch(i){if(!i.message||!i.message.match(/onstruct/))throw i}throw new Error("Cannot access file "+e)}(e),"undefined"==typeof Uint8Array||g||(n.type="array")),"string"==n.type&&(o=!0,n.type="binary",n.codepage=65001,i=function(e){return e.match(/[^\x00-\x7F]/)?Lt(e):e}(e)),"array"==n.type&&"undefined"!=typeof Uint8Array&&e instanceof Uint8Array&&"undefined"!=typeof ArrayBuffer){var a=new ArrayBuffer(3),l=new Uint8Array(a);if(l.foo="bar",!l.foo)return(n=nt(n)).type="array",mo(w(i),n)}switch((r=po(i,n))[0]){case 208:if(207===r[1]&&17===r[2]&&224===r[3]&&161===r[4]&&177===r[5]&&26===r[6]&&225===r[7])return function(e,t){return Re.find(e,"EncryptedPackage")?function(e,t){var n=t||{},r="Workbook",i=Re.find(e,r);try{if(r="/!DataSpaces/Version",!(i=Re.find(e,r))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+r);if(parse_DataSpaceVersionInfo(i.content),r="/!DataSpaces/DataSpaceMap",!(i=Re.find(e,r))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+r);var o=parse_DataSpaceMap(i.content);if(1!==o.length||1!==o[0].comps.length||0!==o[0].comps[0].t||"StrongEncryptionDataSpace"!==o[0].name||"EncryptedPackage"!==o[0].comps[0].v)throw new Error("ECMA-376 Encrypted file bad "+r);if(r="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",!(i=Re.find(e,r))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+r);var a=parse_DataSpaceDefinition(i.content);if(1!=a.length||"StrongEncryptionTransform"!=a[0])throw new Error("ECMA-376 Encrypted file bad "+r);if(r="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",!(i=Re.find(e,r))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+r);parse_Primary(i.content)}catch(l){}if(r="/EncryptionInfo",!(i=Re.find(e,r))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+r);var s=parse_EncryptionInfo(i.content);if(r="/EncryptedPackage",!(i=Re.find(e,r))||!i.content)throw new Error("ECMA-376 Encrypted file missing "+r);if(4==s[0]&&"undefined"!=typeof decrypt_agile)return decrypt_agile(s[1],i.content,n.password||"",n);if(2==s[0]&&"undefined"!=typeof decrypt_std76)return decrypt_std76(s[1],i.content,n.password||"",n);throw new Error("File is password-protected")}(e,t):parse_xlscfb(e,t)}(Re.read(i,n),n);break;case 9:if(r[1]<=8)return parse_xlscfb(i,n);break;case 60:return parse_xlml(i,n);case 73:if(73===r[1]&&42===r[2]&&0===r[3])throw new Error("TIFF Image File is not a spreadsheet");if(68===r[1])return function(e,t){var n=t||{},r=!!n.WTF;n.WTF=!0;try{var i=cr.to_workbook(e,n);return n.WTF=r,i}catch(o){if(n.WTF=r,!o.message.match(/SYLK bad record ID/)&&r)throw o;return hr.to_workbook(e,t)}}(i,n);break;case 84:if(65===r[1]&&66===r[2]&&76===r[3])return fr.to_workbook(i,n);break;case 80:return 75===r[1]&&r[2]<9&&r[3]<9?function(e,t){var n,r=e,i=t||{};return i.type||(i.type="base64"),n=function(e,t){switch(t.type){case"base64":return Re.read(e,{type:"base64"});case"binary":return Re.read(e,{type:"binary"});case"buffer":case"array":return Re.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}(r,i),fo(n,i)}(i,n):vo(e,i,n,o);case 239:return 60===r[3]?parse_xlml(i,n):vo(e,i,n,o);case 255:if(254===r[1])return function(e,t){var n=e;return"base64"==t.type&&(n=p(n)),n=$cptable.utils.decode(1200,n.slice(2),"str"),t.type="binary",go(n,t)}(i,n);if(0===r[1]&&2===r[2]&&0===r[3])return WK_.to_workbook(i,n);break;case 0:if(0===r[1]){if(r[2]>=2&&0===r[3])return WK_.to_workbook(i,n);if(0===r[2]&&(8===r[3]||9===r[3]))return WK_.to_workbook(i,n)}break;case 3:case 131:case 139:case 140:return ur.to_workbook(i,n);case 123:if(92===r[1]&&114===r[2]&&116===r[3])return RTF.to_workbook(i,n);break;case 10:case 13:case 32:return function(e,t){var n="",r=po(e,t);switch(t.type){case"base64":n=p(e);break;case"binary":n=e;break;case"buffer":n=e.toString("binary");break;case"array":n=tt(e);break;default:throw new Error("Unrecognized type "+t.type)}return 239==r[0]&&187==r[1]&&191==r[2]&&(n=Bt(n)),t.type="binary",go(n,t)}(i,n);case 137:if(80===r[1]&&78===r[2]&&71===r[3])throw new Error("PNG Image File is not a spreadsheet")}return lr.indexOf(r[0])>-1&&r[2]<=12&&r[3]<=31?ur.to_workbook(i,n):vo(e,i,n,o)}function yo(e,t){var n=t||{};return n.type="file",mo(e,n)}function bo(e,t){switch(t.type){case"base64":case"binary":break;case"buffer":case"array":t.type="";break;case"file":return He(t.file,Re.write(e,{type:""}));case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");default:throw new Error("Unrecognized type "+t.type)}return Re.write(e,t)}function wo(e,t){var n={},r="undefined"!=typeof Uint8Array?"array":"string";if(t.compression&&(n.compression="DEFLATE"),t.password)n.type=r;else switch(t.type){case"base64":n.type="base64";break;case"binary":n.type="string";break;case"string":throw new Error("'string' output type invalid for '"+t.bookType+"' files");case"buffer":case"file":n.type=r;break;default:throw new Error("Unrecognized type "+t.type)}var i=e.FullPaths?Re.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[n.type]||n.type,compression:!!t.compression}):e.generate(n);if("undefined"!=typeof Deno&&"string"==typeof i){if("binary"==t.type||"base64"==t.type)return i;i=new Uint8Array(y(i))}return t.password&&"undefined"!=typeof encrypt_agile?bo(encrypt_agile(i,t.password),t):"file"===t.type?He(t.file,i):"string"==t.type?Bt(i):i}function xo(e,t,n){n||(n="");var r=n+e;switch(t.type){case"base64":return h(Lt(r));case"binary":return Lt(r);case"string":return e;case"file":return He(t.file,r,"utf8");case"buffer":return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(r):xo(r,{type:"binary"}).split("").map(function(e){return e.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}function Co(e,t){switch(t.type){case"string":case"base64":case"binary":for(var n="",r=0;r<e.length;++r)n+=String.fromCharCode(e[r]);return"base64"==t.type?h(n):"string"==t.type?Bt(n):n;case"file":return He(t.file,e);case"buffer":return e;default:throw new Error("Unrecognized type "+t.type)}}function Eo(e,t){s(),Wi(e);var n=nt(t||{});if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),"array"==n.type){n.type="binary";var r=Eo(e,n);return n.type="array",y(r)}return function(e,t){var n=nt(t||{});return wo(ho(e,n),n)}(e,n)}function ko(e,t){s(),Wi(e);var n=nt(t||{});if(n.cellStyles&&(n.cellNF=!0,n.sheetStubs=!0),"array"==n.type){n.type="binary";var r=ko(e,n);return n.type="array",y(r)}var i=0;if(n.sheet&&(i="number"==typeof n.sheet?n.sheet:e.SheetNames.indexOf(n.sheet),!e.SheetNames[i]))throw new Error("Sheet not found: "+n.sheet+" : "+typeof n.sheet);switch(n.bookType||"xlsb"){case"xml":case"xlml":return xo(write_xlml(e,n),n);case"slk":case"sylk":return xo(cr.from_sheet(e.Sheets[e.SheetNames[i]]),n);case"htm":case"html":return xo(Xi(e.Sheets[e.SheetNames[i]],n),n);case"txt":return function(e,t){switch(t.type){case"base64":return h(e);case"binary":case"string":return e;case"file":return He(t.file,e,"binary");case"buffer":return e.split("").map(function(e){return e.charCodeAt(0)})}throw new Error("Unrecognized type "+t.type)}(Io(e.Sheets[e.SheetNames[i]],n),n);case"csv":return xo(Po(e.Sheets[e.SheetNames[i]],n),n,"\ufeff");case"dif":return xo(fr.from_sheet(e.Sheets[e.SheetNames[i]]),n);case"dbf":return Co(ur.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"prn":return xo(hr.from_sheet(e.Sheets[e.SheetNames[i]]),n);case"rtf":return xo(RTF.from_sheet(e.Sheets[e.SheetNames[i]],n),n);case"eth":return xo(dr.from_sheet(e.Sheets[e.SheetNames[i]]),n);case"fods":return xo(oo(e,n),n);case"wk1":return Co(WK_.sheet_to_wk1(e.Sheets[e.SheetNames[i]],n),n);case"wk3":return Co(WK_.book_to_wk3(e,n),n);case"biff2":n.biff||(n.biff=2);case"biff3":n.biff||(n.biff=3);case"biff4":return n.biff||(n.biff=4),Co(write_biff_buf(e,n),n);case"biff5":n.biff||(n.biff=5);case"biff8":case"xla":case"xls":return n.biff||(n.biff=8),function(e,t){var n=t||{};return bo(write_xlscfb(e,n),n)}(e,n);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function(e,t){var n=nt(t||{});return wo(function(e,t){return"ods"==t.bookType?oo(e,t):"numbers"==t.bookType?write_numbers_iwa(e,t):"xlsb"==t.bookType?function(e,t){Xr=1024,e&&!e.SSF&&(e.SSF=nt(F)),e&&e.SSF&&(pe(),he(e.SSF),t.revssf=$e(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),t.rels={},t.wbrels={},t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,pi?t.revStrings=new Map:(t.revStrings={},t.revStrings.foo=[],delete t.revStrings.foo);var n="xlsb"==t.bookType?"bin":"xml",r=ti.indexOf(t.bookType)>-1,i={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};so(t=t||{});var o=gt(),a="",s=0;if(t.cellXfs=[],vi(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),pt(o,a="docProps/core.xml",rr(e.Props,t)),i.coreprops.push(a),Yn(t.rels,2,a,Vn.CORE_PROPS),a="docProps/app.xml",e.Props&&e.Props.SheetNames);else if(e.Workbook&&e.Workbook.Sheets){for(var l=[],u=0;u<e.SheetNames.length;++u)2!=(e.Workbook.Sheets[u]||{}).Hidden&&l.push(e.SheetNames[u]);e.Props.SheetNames=l}else e.Props.SheetNames=e.SheetNames;for(e.Props.Worksheets=e.Props.SheetNames.length,pt(o,a,or(e.Props)),i.extprops.push(a),Yn(t.rels,3,a,Vn.EXT_PROPS),e.Custprops!==e.Props&&ze(e.Custprops||{}).length>0&&(pt(o,a="docProps/custom.xml",sr(e.Custprops)),i.custprops.push(a),Yn(t.rels,4,a,Vn.CUST_PROPS)),s=1;s<=e.SheetNames.length;++s){var c={"!id":{}},f=e.Sheets[e.SheetNames[s-1]];if((f||{})["!type"],pt(o,a="xl/worksheets/sheet"+s+"."+n,qi(s-1,a,t,e,c)),i.sheets.push(a),Yn(t.wbrels,-1,"worksheets/sheet"+s+"."+n,Vn.WS[0]),f){var d=f["!comments"],h=!1,p="";d&&d.length>0&&(pt(o,p="xl/comments"+s+"."+n,Ki(d,p,t)),i.comments.push(p),Yn(c,-1,"../comments"+s+"."+n,Vn.CMNT),h=!0),f["!legacy"]&&h&&pt(o,"xl/drawings/vmlDrawing"+s+".vml",Jr(s,f["!comments"])),delete f["!comments"],delete f["!legacy"]}c["!id"].rId1&&pt(o,Gn(a),Kn(c))}return null!=t.Strings&&t.Strings.length>0&&(pt(o,a="xl/sharedStrings."+n,function(e,t,n){return(".bin"===t.slice(-4)?write_sst_bin:kr)(e,n)}(t.Strings,a,t)),i.strs.push(a),Yn(t.wbrels,-1,"sharedStrings."+n,Vn.SST)),pt(o,a="xl/workbook."+n,function(e,t,n){return(".bin"===t.slice(-4)?write_wb_bin:Gi)(e,n)}(e,a,t)),i.workbooks.push(a),Yn(t.rels,1,a,Vn.WB),pt(o,a="xl/theme/theme1.xml",Kr(e.Themes,t)),i.themes.push(a),Yn(t.wbrels,-1,"theme/theme1.xml",Vn.THEME),pt(o,a="xl/styles."+n,function(e,t,n){return(".bin"===t.slice(-4)?write_sty_bin:jr)(e,n)}(e,a,t)),i.styles.push(a),Yn(t.wbrels,-1,"styles."+n,Vn.STY),e.vbaraw&&r&&(pt(o,a="xl/vbaProject.bin",e.vbaraw),i.vba.push(a),Yn(t.wbrels,-1,"vbaProject.bin",Vn.VBA)),pt(o,a="xl/metadata."+n,function(e){return(".bin"===e.slice(-4)?write_xlmeta_bin:Yr)()}(a)),i.metadata.push(a),Yn(t.wbrels,-1,"metadata."+n,Vn.XLMETA),pt(o,"[Content_Types].xml",Wn(i,t)),pt(o,"_rels/.rels",Kn(t.rels)),pt(o,"xl/_rels/workbook."+n+".rels",Kn(t.wbrels)),delete t.revssf,delete t.ssf,o}(e,t):ho(e,t)}(e,n),n)}(e,n);default:throw new Error("Unrecognized bookType |"+n.bookType+"|")}}function So(e){if(!e.bookType){var t=e.file.slice(e.file.lastIndexOf(".")).toLowerCase();t.match(/^\.[a-z]+$/)&&(e.bookType=t.slice(1)),e.bookType={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"}[e.bookType]||e.bookType}}function _o(e,t,n){var r=n||{};return r.type="file",r.file=t,So(r),ko(e,r)}function Do(e,t,n,r,i,o,a,s){var l=Dn(n),u=s.defval,c=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),f=!0,d=1===i?[]:{};if(1!==i)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:n,enumerable:!1})}catch(De){d.__rowNum__=n}else d.__rowNum__=n;if(!a||e[n])for(var h=t.s.c;h<=t.e.c;++h){var p=a?e[n][h]:e[r[h]+l];if(void 0!==p&&void 0!==p.t){var g=p.v;switch(p.t){case"z":if(null==g)break;continue;case"e":g=0==g?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+p.t)}if(null!=o[h]){if(null==g)if("e"==p.t&&null===g)d[o[h]]=null;else if(void 0!==u)d[o[h]]=u;else{if(!c||null!==g)continue;d[o[h]]=null}else d[o[h]]=c&&("n"!==p.t||"n"===p.t&&!1!==s.rawNumbers)?g:Ln(p,g,s);null!=g&&(f=!1)}}else{if(void 0===u)continue;null!=o[h]&&(d[o[h]]=u)}}return{row:d,isempty:f}}function Ao(e,t){if(null==e||null==e["!ref"])return[];var n={t:"n",v:0},r=0,i=1,o=[],a=0,s="",l={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},c=null!=u.range?u.range:e["!ref"];switch(1===u.header?r=1:"A"===u.header?r=2:Array.isArray(u.header)?r=3:null==u.header&&(r=0),typeof c){case"string":l=Bn(c);break;case"number":(l=Bn(e["!ref"])).s.r=c;break;default:l=c}r>0&&(i=0);var f=Dn(l.s.r),d=[],h=[],p=0,g=0,v=Array.isArray(e),m=l.s.r,y=0,b={};v&&!e[m]&&(e[m]=[]);var w=u.skipHidden&&e["!cols"]||[],x=u.skipHidden&&e["!rows"]||[];for(y=l.s.c;y<=l.e.c;++y)if(!(w[y]||{}).hidden)switch(d[y]=Tn(y),n=v?e[m][y]:e[d[y]+f],r){case 1:o[y]=y-l.s.c;break;case 2:o[y]=d[y];break;case 3:o[y]=u.header[y-l.s.c];break;default:if(null==n&&(n={w:"__EMPTY",t:"s"}),s=a=Ln(n,null,u),g=b[a]||0){do{s=a+"_"+g++}while(b[s]);b[a]=g,b[s]=1}else b[a]=1;o[y]=s}for(m=l.s.r+i;m<=l.e.r;++m)if(!(x[m]||{}).hidden){var C=Do(e,l,m,d,r,o,v,u);(!1===C.isempty||(1===r?!1!==u.blankrows:u.blankrows))&&(h[p++]=C.row)}return h.length=p,h}var To=/"/g;function Oo(e,t,n,r,i,o,a,s){for(var l=!0,u=[],c="",f=Dn(n),d=t.s.c;d<=t.e.c;++d)if(r[d]){var h=s.dense?(e[n]||[])[d]:e[r[d]+f];if(null==h)c="";else if(null!=h.v){l=!1,c=""+(s.rawNumbers&&"n"==h.t?h.v:Ln(h,null,s));for(var p=0,g=0;p!==c.length;++p)if((g=c.charCodeAt(p))===i||g===o||34===g||s.forceQuotes){c='"'+c.replace(To,'""')+'"';break}"ID"==c&&(c='"ID"')}else null==h.f||h.F?c="":(l=!1,(c="="+h.f).indexOf(",")>=0&&(c='"'+c.replace(To,'""')+'"'));u.push(c)}return!1===s.blankrows&&l?null:u.join(a)}function Po(e,t){var n=[],r=null==t?{}:t;if(null==e||null==e["!ref"])return"";var i=Bn(e["!ref"]),o=void 0!==r.FS?r.FS:",",a=o.charCodeAt(0),s=void 0!==r.RS?r.RS:"\n",l=s.charCodeAt(0),u=new RegExp(("|"==o?"\\|":o)+"+$"),c="",f=[];r.dense=Array.isArray(e);for(var d=r.skipHidden&&e["!cols"]||[],h=r.skipHidden&&e["!rows"]||[],p=i.s.c;p<=i.e.c;++p)(d[p]||{}).hidden||(f[p]=Tn(p));for(var g=0,v=i.s.r;v<=i.e.r;++v)(h[v]||{}).hidden||null!=(c=Oo(e,i,v,f,a,l,o,r))&&(r.strip&&(c=c.replace(u,"")),(c||!1!==r.blankrows)&&n.push((g++?s:"")+c));return delete r.dense,n.join("")}function Io(e,t){t||(t={}),t.FS="\t",t.RS="\n";var n=Po(e,t);if("undefined"==typeof $cptable||"string"==t.type)return n;var r=$cptable.utils.encode(1200,n,"str");return String.fromCharCode(255)+String.fromCharCode(254)+r}function Fo(e,t,n){var r,i=n||{},o=+!i.skipHeader,a=e||{},s=0,l=0;if(a&&null!=i.origin)if("number"==typeof i.origin)s=i.origin;else{var u="string"==typeof i.origin?On(i.origin):i.origin;s=u.r,l=u.c}var c={s:{c:0,r:0},e:{c:l,r:s+t.length-1+o}};if(a["!ref"]){var f=Bn(a["!ref"]);c.e.c=Math.max(c.e.c,f.e.c),c.e.r=Math.max(c.e.r,f.e.r),-1==s&&(s=f.e.r+1,c.e.r=s+t.length-1+o)}else-1==s&&(s=0,c.e.r=t.length-1+o);var d=i.header||[],h=0;t.forEach(function(e,t){ze(e).forEach(function(n){-1==(h=d.indexOf(n))&&(d[h=d.length]=n);var u=e[n],c="z",f="",p=Pn({c:l+h,r:s+t+o});r=Bo(a,p),!u||"object"!=typeof u||u instanceof Date?("number"==typeof u?c="n":"boolean"==typeof u?c="b":"string"==typeof u?c="s":u instanceof Date?(c="d",i.cellDates||(c="n",u=Ve(u)),f=i.dateNF||F[14]):null===u&&i.nullError&&(c="e",u=0),r?(r.t=c,r.v=u,delete r.w,delete r.R,f&&(r.z=f)):a[p]=r={t:c,v:u},f&&(r.z=f)):a[p]=u})}),c.e.c=Math.max(c.e.c,l+d.length-1);var p=Dn(s);if(o)for(h=0;h<d.length;++h)a[Tn(h+l)+p]={t:"s",v:d[h]};return a["!ref"]=Fn(c),a}function Bo(e,t,n){if("string"==typeof t){if(Array.isArray(e)){var r=On(t);return e[r.r]||(e[r.r]=[]),e[r.r][r.c]||(e[r.r][r.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return Bo(e,Pn("number"!=typeof t?t:{r:t,c:n||0}))}function Lo(e,t,n){return t?(e.l={Target:t},n&&(e.l.Tooltip=n)):delete e.l,e}var No={encode_col:Tn,encode_row:Dn,encode_cell:Pn,encode_range:Fn,decode_col:An,decode_row:_n,split_cell:function(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")},decode_cell:On,decode_range:In,format_cell:Ln,sheet_add_aoa:Mn,sheet_add_json:Fo,sheet_add_dom:Ji,aoa_to_sheet:Rn,json_to_sheet:function(e,t){return Fo(null,e,t)},table_to_sheet:Zi,table_to_book:function(e,t){return Nn(Zi(e,t),t)},sheet_to_csv:Po,sheet_to_txt:Io,sheet_to_json:Ao,sheet_to_html:Xi,sheet_to_formulae:function(e){var t,n="",r="";if(null==e||null==e["!ref"])return[];var i,o=Bn(e["!ref"]),a="",s=[],l=[],u=Array.isArray(e);for(i=o.s.c;i<=o.e.c;++i)s[i]=Tn(i);for(var c=o.s.r;c<=o.e.r;++c)for(a=Dn(c),i=o.s.c;i<=o.e.c;++i)if(n=s[i]+a,r="",void 0!==(t=u?(e[c]||[])[i]:e[n])){if(null!=t.F){if(n=t.F,!t.f)continue;r=t.f,-1==n.indexOf(":")&&(n=n+":"+n)}if(null!=t.f)r=t.f;else{if("z"==t.t)continue;if("n"==t.t&&null!=t.v)r=""+t.v;else if("b"==t.t)r=t.v?"TRUE":"FALSE";else if(void 0!==t.w)r="'"+t.w;else{if(void 0===t.v)continue;r="s"==t.t?"'"+t.v:""+t.v}}l[l.length]=n+"="+r}return l},sheet_to_row_object_array:Ao,sheet_get_cell:Bo,book_new:function(){return{SheetNames:[],Sheets:{}}},book_append_sheet:function(e,t,n,r){var i=1;if(!n)for(;i<=65535&&-1!=e.SheetNames.indexOf(n="Sheet"+i);++i,n=void 0);if(!n||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(r&&e.SheetNames.indexOf(n)>=0){var o=n.match(/(^.*?)(\d+)$/);i=o&&+o[2]||0;var a=o&&o[1]||n;for(++i;i<=65535&&-1!=e.SheetNames.indexOf(n=a+i);++i);}if($i(n),e.SheetNames.indexOf(n)>=0)throw new Error("Worksheet with name |"+n+"| already exists!");return e.SheetNames.push(n),e.Sheets[n]=t,n},book_set_sheet_visibility:function(e,t,n){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var r=function(e,t){if("number"==typeof t){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}if("string"==typeof t){var n=e.SheetNames.indexOf(t);if(n>-1)return n;throw new Error("Cannot find sheet name |"+t+"|")}throw new Error("Cannot find sheet |"+t+"|")}(e,t);switch(e.Workbook.Sheets[r]||(e.Workbook.Sheets[r]={}),n){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+n)}e.Workbook.Sheets[r].Hidden=n},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:Lo,cell_set_internal_link:function(e,t,n){return Lo(e,"#"+t,n)},cell_add_comment:function(e,t,n){e.c||(e.c=[]),e.c.push({t,a:n||"SheetJS"})},sheet_set_array_formula:function(e,t,n,r){for(var i="string"!=typeof t?t:Bn(t),o="string"==typeof t?t:Fn(t),a=i.s.r;a<=i.e.r;++a)for(var s=i.s.c;s<=i.e.c;++s){var l=Bo(e,a,s);l.t="n",l.F=o,delete l.v,a==i.s.r&&s==i.s.c&&(l.f=n,r&&(l.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};if("undefined"!=typeof parse_xlscfb&&(e.parse_xlscfb=parse_xlscfb),e.parse_zip=fo,e.read=mo,e.readFile=yo,e.readFileSync=yo,e.write=ko,e.writeFile=_o,e.writeFileSync=_o,e.writeFileAsync=function(e,t,n,r){var i=n||{};i.type="file",i.file=e,So(i),i.type="buffer";var o=r;return o instanceof Function||(o=n),ge.writeFile(e,ko(t,i),o)},e.utils=No,e.writeXLSX=Eo,e.writeFileXLSX=function(e,t,n){var r=n||{};return r.type="file",r.file=t,So(r),Eo(e,r)},e.SSF=Be,"undefined"!=typeof __stream&&(e.stream=__stream),void 0!==Re&&(e.CFB=Re),void 0!==la){({}).Readable&&set_readable((void 0).Readable)}}(ca.exports),"undefined"!=typeof window&&!window.XLSX)try{window.XLSX={}}catch(pp){}}()),ca.exports}var da,ha,pa=fa(),ga={exports:{}},va=(da||(da=1,ha=ga,function(){function e(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){o(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function t(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(n){}return 200<=t.status&&299>=t.status}function n(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof Be&&Be.global===Be?Be:void 0,i=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(i,o,a){var s=r.URL||r.webkitURL,l=document.createElement("a");o=o||i.name||"download",l.download=o,l.rel="noopener","string"==typeof i?(l.href=i,l.origin===location.origin?n(l):t(l.href)?e(i,o,a):n(l,l.target="_blank")):(l.href=s.createObjectURL(i),setTimeout(function(){s.revokeObjectURL(l.href)},4e4),setTimeout(function(){n(l)},0))}:"msSaveOrOpenBlob"in navigator?function(r,i,o){if(i=i||r.name||"download","string"!=typeof r)navigator.msSaveOrOpenBlob((s=r,void 0===(l=o)?l={autoBom:!1}:"object"!=typeof l&&(console.warn("Deprecated: Expected third argument to be a object"),l={autoBom:!l}),l.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\ufeff",s],{type:s.type}):s),i);else if(t(r))e(r,i,o);else{var a=document.createElement("a");a.href=r,a.target="_blank",setTimeout(function(){n(a)})}var s,l}:function(t,n,o,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,o);var s="application/octet-stream"===t.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||s&&l||i)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},c.readAsDataURL(t)}else{var f=r.URL||r.webkitURL,d=f.createObjectURL(t);a?a.location=d:location.href=d,a=null,setTimeout(function(){f.revokeObjectURL(d)},4e4)}});r.saveAs=o.saveAs=o,ha.exports=o}()),ga.exports);const ma=Le(va);var ya=Object.defineProperty,ba=Object.getOwnPropertySymbols,wa=Object.prototype.hasOwnProperty,xa=Object.prototype.propertyIsEnumerable,Ca=(e,t,n)=>t in e?ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ea=(e,t)=>{for(var n in t||(t={}))wa.call(t,n)&&Ca(e,n,t[n]);if(ba)for(var n of ba(t))xa.call(t,n)&&Ca(e,n,t[n]);return e},ka=(e,t)=>{var n={};for(var r in e)wa.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ba)for(var r of ba(e))t.indexOf(r)<0&&xa.call(e,r)&&(n[r]=e[r]);return n};const Sa="[vue-draggable-plus]: ";function _a(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function Da(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Aa(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function Ta(e,t,n){const r=e.children[n];e.insertBefore(t,r)}function Oa(e){e.parentNode&&e.parentNode.removeChild(e)}function Pa(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}const Ia=Object.assign;function Fa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fa(Object(n),!0).forEach(function(t){Na(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function La(e){return(La="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 Na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ma(){return Ma=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ma.apply(this,arguments)}function Ra(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var ja=Ra(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ha=Ra(/Edge/i),za=Ra(/firefox/i),Ua=Ra(/safari/i)&&!Ra(/chrome/i)&&!Ra(/android/i),$a=Ra(/iP(ad|od|hone)/i),Wa=Ra(/chrome/i)&&Ra(/android/i),Va={capture:!1,passive:!1};function Ga(e,t,n){e.addEventListener(t,n,!ja&&Va)}function qa(e,t,n){e.removeEventListener(t,n,!ja&&Va)}function Ka(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(ZG){return!1}return!1}}function Ya(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Xa(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Ka(e,t):Ka(e,t))||r&&e===n)return e;if(e===n)break}while(e=Ya(e))}return null}var Ja,Za=/\s+/g;function Qa(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(Za," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(Za," ")}}function es(e,t,n){var r=e&&e.style;if(r){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 r)&&-1===t.indexOf("webkit")&&(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function ts(e,t){var n="";if("string"==typeof e)n=e;else do{var r=es(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ns(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function rs(){return document.scrollingElement||document.documentElement}function is(e,t,n,r,i){if(e.getBoundingClientRect||e===window){var o,a,s,l,u,c,f;if(e!==window&&e.parentNode&&e!==rs()?(a=(o=e.getBoundingClientRect()).top,s=o.left,l=o.bottom,u=o.right,c=o.height,f=o.width):(a=0,s=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!ja))do{if(i&&i.getBoundingClientRect&&("none"!==es(i,"transform")||n&&"static"!==es(i,"position"))){var d=i.getBoundingClientRect();a-=d.top+parseInt(es(i,"border-top-width")),s-=d.left+parseInt(es(i,"border-left-width")),l=a+o.height,u=s+o.width;break}}while(i=i.parentNode);if(r&&e!==window){var h=ts(i||e),p=h&&h.a,g=h&&h.d;h&&(l=(a/=g)+(c/=g),u=(s/=p)+(f/=p))}return{top:a,left:s,bottom:l,right:u,width:f,height:c}}}function os(e,t,n){for(var r=cs(e,!0),i=is(e)[t];r;){if(!(i>=is(r)[n]))return r;if(r===rs())break;r=cs(r,!1)}return!1}function as(e,t,n,r){for(var i=0,o=0,a=e.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==hl.ghost&&(r||a[o]!==hl.dragged)&&Xa(a[o],n.draggable,e,!1)){if(i===t)return a[o];i++}o++}return null}function ss(e,t){for(var n=e.lastElementChild;n&&(n===hl.ghost||"none"===es(n,"display")||t&&!Ka(n,t));)n=n.previousElementSibling;return n||null}function ls(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"!==e.nodeName.toUpperCase()&&e!==hl.clone&&(!t||Ka(e,t))&&n++;return n}function us(e){var t=0,n=0,r=rs();if(e)do{var i=ts(e),o=i.a,a=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}function cs(e,t){if(!e||!e.getBoundingClientRect)return rs();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=es(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return rs();if(r||t)return n;r=!0}}}while(n=n.parentNode);return rs()}function fs(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 ds(e,t){return function(){if(!Ja){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),Ja=setTimeout(function(){Ja=void 0},t)}}}function hs(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function ps(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 gs(e,t,n){var r={};return Array.from(e.children).forEach(function(i){var o,a,s,l;if(Xa(i,t.draggable,e,!1)&&!i.animated&&i!==n){var u=is(i);r.left=Math.min(null!==(o=r.left)&&void 0!==o?o:1/0,u.left),r.top=Math.min(null!==(a=r.top)&&void 0!==a?a:1/0,u.top),r.right=Math.max(null!==(s=r.right)&&void 0!==s?s:-1/0,u.right),r.bottom=Math.max(null!==(l=r.bottom)&&void 0!==l?l:-1/0,u.bottom)}}),r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}var vs="Sortable"+(new Date).getTime();var ms=[],ys={initializeByDefault:!0},bs={mount:function(e){for(var t in ys)ys.hasOwnProperty(t)&&!(t in e)&&(e[t]=ys[t]);ms.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ms.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var i=e+"Global";ms.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](Ba({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](Ba({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var i in ms.forEach(function(r){var i=r.pluginName;if(e.options[i]||r.initializeByDefault){var o=new r(e,t,e.options);o.sortable=e,o.options=e.options,e[i]=o,Ma(n,o.defaults)}}),e.options)if(e.options.hasOwnProperty(i)){var o=this.modifyOption(e,i,e.options[i]);void 0!==o&&(e.options[i]=o)}},getEventProperties:function(e,t){var n={};return ms.forEach(function(r){"function"==typeof r.eventProperties&&Ma(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return ms.forEach(function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(r=i.optionListeners[t].call(e[i.pluginName],n))}),r}},ws=["evt"],xs=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,ws);bs.pluginEvent.bind(hl)(e,t,Ba({dragEl:Es,parentEl:ks,ghostEl:Ss,rootEl:_s,nextEl:Ds,lastDownEl:As,cloneEl:Ts,cloneHidden:Os,dragStarted:$s,putSortable:Ns,activeSortable:hl.active,originalEvent:r,oldIndex:Ps,oldDraggableIndex:Fs,newIndex:Is,newDraggableIndex:Bs,hideGhostForTarget:ul,unhideGhostForTarget:cl,cloneNowHidden:function(){Os=!0},cloneNowShown:function(){Os=!1},dispatchSortableEvent:function(e){Cs({sortable:t,name:e,originalEvent:r})}},i))};function Cs(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,o=e.cloneEl,a=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,f=e.newDraggableIndex,d=e.originalEvent,h=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[vs]){var g,v=t.options,m="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||ja||Ha?(g=document.createEvent("Event")).initEvent(r,!0,!0):g=new CustomEvent(r,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=s||n,g.item=i||n,g.clone=o,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=c,g.newDraggableIndex=f,g.originalEvent=d,g.pullMode=h?h.lastPutMode:void 0;var y=Ba(Ba({},p),bs.getEventProperties(r,t));for(var b in y)g[b]=y[b];n&&n.dispatchEvent(g),v[m]&&v[m].call(t,g)}}(Ba({putSortable:Ns,cloneEl:Ts,targetEl:Es,rootEl:_s,oldIndex:Ps,oldDraggableIndex:Fs,newIndex:Is,newDraggableIndex:Bs},e))}var Es,ks,Ss,_s,Ds,As,Ts,Os,Ps,Is,Fs,Bs,Ls,Ns,Ms,Rs,js,Hs,zs,Us,$s,Ws,Vs,Gs,qs,Ks=!1,Ys=!1,Xs=[],Js=!1,Zs=!1,Qs=[],el=!1,tl=[],nl="undefined"!=typeof document,rl=$a,il=Ha||ja?"cssFloat":"float",ol=nl&&!Wa&&!$a&&"draggable"in document.createElement("div"),al=function(){if(nl){if(ja)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),sl=function(e,t){var n=es(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=as(e,0,t),o=as(e,1,t),a=i&&es(i),s=o&&es(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+is(i).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+is(o).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(i&&a.float&&"none"!==a.float){var c="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==c?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[il]||o&&"none"===n[il]&&l+u>r)?"vertical":"horizontal"},ll=function(e){function t(e,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.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(r,i,o,a),n)(r,i,o,a);var l=(n?r:i).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;(!r||"object"!=La(r))&&(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},ul=function(){!al&&Ss&&es(Ss,"display","none")},cl=function(){!al&&Ss&&es(Ss,"display","")};nl&&!Wa&&document.addEventListener("click",function(e){if(Ys)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ys=!1,!1},!0);var fl=function(e){if(Es){var t=function(e,t){var n;return Xs.some(function(r){var i=r[vs].options.emptyInsertThreshold;if(i&&!ss(r)){var o=is(r),a=e>=o.left-i&&e<=o.right+i,s=t>=o.top-i&&t<=o.bottom+i;if(a&&s)return n=r}}),n}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[vs]._onDragOver(n)}}},dl=function(e){Es&&Es.parentNode[vs]._isOutsideThisEl(e.target)};function hl(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=Ma({},t),e[vs]=this;var n={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 sl(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!==hl.supportPointer&&"PointerEvent"in window&&!Ua,emptyInsertThreshold:5};for(var r in bs.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in ll(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&ol,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Ga(e,"pointerdown",this._onTapStart):(Ga(e,"mousedown",this._onTapStart),Ga(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ga(e,"dragover",this),Ga(e,"dragenter",this)),Xs.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Ma(this,function(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==es(e,"display")&&e!==hl.ghost){t.push({target:e,rect:is(e)});var n=Ba({},t[t.length-1].rect);if(e.thisAnimationDuration){var r=ts(e,!0);r&&(n.top-=r.f,n.left-=r.e)}e.fromRect=n}})},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof n&&n());var i=!1,o=0;t.forEach(function(e){var t=0,n=e.target,a=n.fromRect,s=is(n),l=n.prevFromRect,u=n.prevToRect,c=e.rect,f=ts(n,!0);f&&(s.top-=f.f,s.left-=f.e),n.toRect=s,n.thisAnimationDuration&&fs(l,s)&&!fs(a,s)&&(c.top-s.top)/(c.left-s.left)===(a.top-s.top)/(a.left-s.left)&&(t=function(e,t,n,r){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))*r.animation}(c,l,u,r.options)),fs(s,a)||(n.prevFromRect=a,n.prevToRect=s,t||(t=r.options.animation),r.animate(n,c,s,t)),t&&(i=!0,o=Math.max(o,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},t),n.thisAnimationDuration=t)}),clearTimeout(e),i?e=setTimeout(function(){"function"==typeof n&&n()},o):"function"==typeof n&&n(),t=[]},animate:function(e,t,n,r){if(r){es(e,"transition",""),es(e,"transform","");var i=ts(this.el),o=i&&i.a,a=i&&i.d,s=(t.left-n.left)/(o||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,es(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),es(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),es(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){es(e,"transition",""),es(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}}())}function pl(e,t,n,r,i,o,a,s){var l,u,c=e[vs],f=c.options.onMove;return!window.CustomEvent||ja||Ha?(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=r,l.related=i||t,l.relatedRect=o||is(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),f&&(u=f.call(c,l,a)),u}function gl(e){e.draggable=!1}function vl(){el=!1}function ml(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function yl(e){return setTimeout(e,0)}function bl(e){return clearTimeout(e)}hl.prototype={constructor:hl,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ws=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Es):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=r.filter;if(function(e){tl.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&tl.push(r)}}(n),!Es&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Ua||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=Xa(s,r.draggable,n,!1))&&s.animated||As===s)){if(Ps=ls(s),Fs=ls(s,r.draggable),"function"==typeof u){if(u.call(this,e,s,this))return Cs({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),xs("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some(function(r){if(r=Xa(l,r.trim(),n,!1))return Cs({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),xs("filter",t,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!Xa(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!Es&&n.parentNode===o){var l=is(n);if(_s=o,ks=(Es=n).parentNode,Ds=Es.nextSibling,As=n,Ls=a.group,hl.dragged=Es,Ms={target:Es,clientX:(t||e).clientX,clientY:(t||e).clientY},zs=Ms.clientX-l.left,Us=Ms.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Es.style["will-change"]="all",r=function(){xs("delayEnded",i,{evt:e}),hl.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!za&&i.nativeDraggable&&(Es.draggable=!0),i._triggerDragStart(e,t),Cs({sortable:i,name:"choose",originalEvent:e}),Qa(Es,a.chosenClass,!0))},a.ignore.split(",").forEach(function(e){ns(Es,e.trim(),gl)}),Ga(s,"dragover",fl),Ga(s,"mousemove",fl),Ga(s,"touchmove",fl),Ga(s,"mouseup",i._onDrop),Ga(s,"touchend",i._onDrop),Ga(s,"touchcancel",i._onDrop),za&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Es.draggable=!0),xs("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(Ha||ja))r();else{if(hl.eventCanceled)return void this._onDrop();Ga(s,"mouseup",i._disableDelayedDrag),Ga(s,"touchend",i._disableDelayedDrag),Ga(s,"touchcancel",i._disableDelayedDrag),Ga(s,"mousemove",i._delayedDragTouchMoveHandler),Ga(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Ga(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.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(){Es&&gl(Es),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;qa(e,"mouseup",this._disableDelayedDrag),qa(e,"touchend",this._disableDelayedDrag),qa(e,"touchcancel",this._disableDelayedDrag),qa(e,"mousemove",this._delayedDragTouchMoveHandler),qa(e,"touchmove",this._delayedDragTouchMoveHandler),qa(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Ga(document,"pointermove",this._onTouchMove):Ga(document,t?"touchmove":"mousemove",this._onTouchMove):(Ga(Es,"dragend",this),Ga(_s,"dragstart",this._onDragStart));try{document.selection?yl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(Aie){}},_dragStarted:function(e,t){if(Ks=!1,_s&&Es){xs("dragStarted",this,{evt:t}),this.nativeDraggable&&Ga(document,"dragover",dl);var n=this.options;!e&&Qa(Es,n.dragClass,!1),Qa(Es,n.ghostClass,!0),hl.active=this,e&&this._appendGhost(),Cs({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Rs){this._lastX=Rs.clientX,this._lastY=Rs.clientY,ul();for(var e=document.elementFromPoint(Rs.clientX,Rs.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Rs.clientX,Rs.clientY))!==t;)t=e;if(Es.parentNode[vs]._isOutsideThisEl(e),t)do{if(t[vs]&&t[vs]._onDragOver({clientX:Rs.clientX,clientY:Rs.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);cl()}},_onTouchMove:function(e){if(Ms){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,o=Ss&&ts(Ss,!0),a=Ss&&o&&o.a,s=Ss&&o&&o.d,l=rl&&qs&&us(qs),u=(i.clientX-Ms.clientX+r.x)/(a||1)+(l?l[0]-Qs[0]:0)/(a||1),c=(i.clientY-Ms.clientY+r.y)/(s||1)+(l?l[1]-Qs[1]:0)/(s||1);if(!hl.active&&!Ks){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Ss){o?(o.e+=u-(js||0),o.f+=c-(Hs||0)):o={a:1,b:0,c:0,d:1,e:u,f:c};var f="matrix(".concat(o.a,",").concat(o.b,",").concat(o.c,",").concat(o.d,",").concat(o.e,",").concat(o.f,")");es(Ss,"webkitTransform",f),es(Ss,"mozTransform",f),es(Ss,"msTransform",f),es(Ss,"transform",f),js=u,Hs=c,Rs=i}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Ss){var e=this.options.fallbackOnBody?document.body:_s,t=is(Es,!0,rl,!0,e),n=this.options;if(rl){for(qs=e;"static"===es(qs,"position")&&"none"===es(qs,"transform")&&qs!==document;)qs=qs.parentNode;qs!==document.body&&qs!==document.documentElement?(qs===document&&(qs=rs()),t.top+=qs.scrollTop,t.left+=qs.scrollLeft):qs=rs(),Qs=us(qs)}Qa(Ss=Es.cloneNode(!0),n.ghostClass,!1),Qa(Ss,n.fallbackClass,!0),Qa(Ss,n.dragClass,!0),es(Ss,"transition",""),es(Ss,"transform",""),es(Ss,"box-sizing","border-box"),es(Ss,"margin",0),es(Ss,"top",t.top),es(Ss,"left",t.left),es(Ss,"width",t.width),es(Ss,"height",t.height),es(Ss,"opacity","0.8"),es(Ss,"position",rl?"absolute":"fixed"),es(Ss,"zIndex","100000"),es(Ss,"pointerEvents","none"),hl.ghost=Ss,e.appendChild(Ss),es(Ss,"transform-origin",zs/parseInt(Ss.style.width)*100+"% "+Us/parseInt(Ss.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;xs("dragStart",this,{evt:e}),hl.eventCanceled?this._onDrop():(xs("setupClone",this),hl.eventCanceled||((Ts=ps(Es)).removeAttribute("id"),Ts.draggable=!1,Ts.style["will-change"]="",this._hideClone(),Qa(Ts,this.options.chosenClass,!1),hl.clone=Ts),n.cloneId=yl(function(){xs("clone",n),!hl.eventCanceled&&(n.options.removeCloneOnHide||_s.insertBefore(Ts,Es),n._hideClone(),Cs({sortable:n,name:"clone"}))}),!t&&Qa(Es,i.dragClass,!0),t?(Ys=!0,n._loopId=setInterval(n._emulateDragOver,50)):(qa(document,"mouseup",n._onDrop),qa(document,"touchend",n._onDrop),qa(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,Es)),Ga(document,"drop",n),es(Es,"transform","translateZ(0)")),Ks=!0,n._dragStartId=yl(n._dragStarted.bind(n,t,e)),Ga(document,"selectstart",n),$s=!0,Ua&&es(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,i,o=this.el,a=e.target,s=this.options,l=s.group,u=hl.active,c=Ls===l,f=s.sort,d=Ns||u,h=this,p=!1;if(!el){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),a=Xa(a,s.draggable,o,!0),T("dragOver"),hl.eventCanceled)return p;if(Es.contains(e.target)||a.animated&&a.animatingX&&a.animatingY||h._ignoreWhileAnimating===a)return P(!1);if(Ys=!1,u&&!s.disabled&&(c?f||(r=ks!==_s):Ns===this||(this.lastPutMode=Ls.checkPull(this,u,Es,e))&&l.checkPut(this,u,Es,e))){if(i="vertical"===this._getDirection(e,a),t=is(Es),T("dragOverValid"),hl.eventCanceled)return p;if(r)return ks=_s,O(),this._hideClone(),T("revert"),hl.eventCanceled||(Ds?_s.insertBefore(Es,Ds):_s.appendChild(Es)),P(!0);var g=ss(o,s.draggable);if(!g||function(e,t,n){var r=is(ss(n.el,n.options.draggable)),i=gs(n.el,n.options,Ss);return t?e.clientX>i.right+10||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+10||e.clientX>r.right&&e.clientY>r.top}(e,i,this)&&!g.animated){if(g===Es)return P(!1);if(g&&o===e.target&&(a=g),a&&(n=is(a)),!1!==pl(_s,o,Es,t,a,n,e,!!a))return O(),g&&g.nextSibling?o.insertBefore(Es,g.nextSibling):o.appendChild(Es),ks=o,I(),P(!0)}else if(g&&function(e,t,n){var r=is(as(n.el,0,n.options,!0)),i=gs(n.el,n.options,Ss);return t?e.clientX<i.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<i.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,i,this)){var v=as(o,0,s,!0);if(v===Es)return P(!1);if(n=is(a=v),!1!==pl(_s,o,Es,t,a,n,e,!1))return O(),o.insertBefore(Es,v),ks=o,I(),P(!0)}else if(a.parentNode===o){n=is(a);var m,y,b,w=Es.parentNode!==o,x=!function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,o=n?e.width:e.height,a=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===a||i===s||r+o/2===a+l/2}(Es.animated&&Es.toRect||t,a.animated&&a.toRect||n,i),C=i?"top":"left",E=os(a,"top","top")||os(Es,"top","top"),k=E?E.scrollTop:void 0;if(Ws!==a&&(y=n[C],Js=!1,Zs=!x&&s.invertSwap||w),m=function(e,t,n,r,i,o,a,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,c=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a)if(s&&Gs<u*i){if(!Js&&(1===Vs?l>c+u*o/2:l<f-u*o/2)&&(Js=!0),Js)d=!0;else if(1===Vs?l<c+Gs:l>f-Gs)return-Vs}else if(l>c+u*(1-i)/2&&l<f-u*(1-i)/2)return function(e){return ls(Es)<ls(e)?1:-1}(t);return(d=d||a)&&(l<c+u*o/2||l>f-u*o/2)?l>c+u/2?1:-1:0}(e,a,n,i,x?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,Zs,Ws===a),0!==m){var S=ls(Es);do{S-=m,b=ks.children[S]}while(b&&("none"===es(b,"display")||b===Ss))}if(0===m||b===a)return P(!1);Ws=a,Vs=m;var _=a.nextElementSibling,D=!1,A=pl(_s,o,Es,t,a,n,e,D=1===m);if(!1!==A)return(1===A||-1===A)&&(D=1===A),el=!0,setTimeout(vl,30),O(),D&&!_?o.appendChild(Es):a.parentNode.insertBefore(Es,D?_:a),E&&hs(E,0,k-E.scrollTop),ks=Es.parentNode,void 0!==y&&!Zs&&(Gs=Math.abs(y-is(a)[C])),I(),P(!0)}if(o.contains(Es))return P(!1)}return!1}function T(s,l){xs(s,h,Ba({evt:e,isOwner:c,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:f,fromSortable:d,target:a,completed:P,onMove:function(n,r){return pl(_s,o,Es,t,n,is(n),e,r)},changed:I},l))}function O(){T("dragOverAnimationCapture"),h.captureAnimationState(),h!==d&&d.captureAnimationState()}function P(t){return T("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(h),h!==d&&(Qa(Es,Ns?Ns.options.ghostClass:u.options.ghostClass,!1),Qa(Es,s.ghostClass,!0)),Ns!==h&&h!==hl.active?Ns=h:h===hl.active&&Ns&&(Ns=null),d===h&&(h._ignoreWhileAnimating=a),h.animateAll(function(){T("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(a===Es&&!Es.animated||a===o&&!a.animated)&&(Ws=null),!s.dragoverBubble&&!e.rootEl&&a!==document&&(Es.parentNode[vs]._isOutsideThisEl(e.target),!t&&fl(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),p=!0}function I(){Is=ls(Es),Bs=ls(Es,s.draggable),Cs({sortable:h,name:"change",toEl:o,newIndex:Is,newDraggableIndex:Bs,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){qa(document,"mousemove",this._onTouchMove),qa(document,"touchmove",this._onTouchMove),qa(document,"pointermove",this._onTouchMove),qa(document,"dragover",fl),qa(document,"mousemove",fl),qa(document,"touchmove",fl)},_offUpEvents:function(){var e=this.el.ownerDocument;qa(e,"mouseup",this._onDrop),qa(e,"touchend",this._onDrop),qa(e,"pointerup",this._onDrop),qa(e,"touchcancel",this._onDrop),qa(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;Is=ls(Es),Bs=ls(Es,n.draggable),xs("drop",this,{evt:e}),ks=Es&&Es.parentNode,Is=ls(Es),Bs=ls(Es,n.draggable),hl.eventCanceled||(Ks=!1,Zs=!1,Js=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),bl(this.cloneId),bl(this._dragStartId),this.nativeDraggable&&(qa(document,"drop",this),qa(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ua&&es(document.body,"user-select",""),es(Es,"transform",""),e&&($s&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Ss&&Ss.parentNode&&Ss.parentNode.removeChild(Ss),(_s===ks||Ns&&"clone"!==Ns.lastPutMode)&&Ts&&Ts.parentNode&&Ts.parentNode.removeChild(Ts),Es&&(this.nativeDraggable&&qa(Es,"dragend",this),gl(Es),Es.style["will-change"]="",$s&&!Ks&&Qa(Es,Ns?Ns.options.ghostClass:this.options.ghostClass,!1),Qa(Es,this.options.chosenClass,!1),Cs({sortable:this,name:"unchoose",toEl:ks,newIndex:null,newDraggableIndex:null,originalEvent:e}),_s!==ks?(Is>=0&&(Cs({rootEl:ks,name:"add",toEl:ks,fromEl:_s,originalEvent:e}),Cs({sortable:this,name:"remove",toEl:ks,originalEvent:e}),Cs({rootEl:ks,name:"sort",toEl:ks,fromEl:_s,originalEvent:e}),Cs({sortable:this,name:"sort",toEl:ks,originalEvent:e})),Ns&&Ns.save()):Is!==Ps&&Is>=0&&(Cs({sortable:this,name:"update",toEl:ks,originalEvent:e}),Cs({sortable:this,name:"sort",toEl:ks,originalEvent:e})),hl.active&&((null==Is||-1===Is)&&(Is=Ps,Bs=Fs),Cs({sortable:this,name:"end",toEl:ks,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){xs("nulling",this),_s=Es=ks=Ss=Ds=Ts=As=Os=Ms=Rs=$s=Is=Bs=Ps=Fs=Ws=Vs=Ns=Ls=hl.dragged=hl.ghost=hl.clone=hl.active=null,tl.forEach(function(e){e.checked=!0}),tl.length=js=Hs=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Es&&(this._onDragOver(e),(t=e).dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault());break;case"selectstart":e.preventDefault()}var t},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)Xa(e=n[r],o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||ml(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var i=r.children[t];Xa(i,this.options.draggable,r,!1)&&(n[e]=i)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Xa(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=bs.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&ll(n)},destroy:function(){xs("destroy",this);var e=this.el;e[vs]=null,qa(e,"mousedown",this._onTapStart),qa(e,"touchstart",this._onTapStart),qa(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(qa(e,"dragover",this),qa(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Xs.splice(Xs.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Os){if(xs("hideClone",this),hl.eventCanceled)return;es(Ts,"display","none"),this.options.removeCloneOnHide&&Ts.parentNode&&Ts.parentNode.removeChild(Ts),Os=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(Os){if(xs("showClone",this),hl.eventCanceled)return;Es.parentNode!=_s||this.options.group.revertClone?Ds?_s.insertBefore(Ts,Ds):_s.appendChild(Ts):_s.insertBefore(Ts,Es),this.options.group.revertClone&&this.animate(Es,Ts),es(Ts,"display",""),Os=!1}}else this._hideClone()}},nl&&Ga(document,"touchmove",function(e){(hl.active||Ks)&&e.cancelable&&e.preventDefault()}),hl.utils={on:Ga,off:qa,css:es,find:ns,is:function(e,t){return!!Xa(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:ds,closest:Xa,toggleClass:Qa,clone:ps,index:ls,nextTick:yl,cancelNextTick:bl,detectDirection:sl,getChild:as},hl.get=function(e){return e[vs]},hl.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&&(hl.utils=Ba(Ba({},hl.utils),e.utils)),bs.mount(e)})},hl.create=function(e,t){return new hl(e,t)},hl.version="1.15.2";var wl,xl,Cl,El,kl,Sl,_l=[],Dl=!1;function Al(){_l.forEach(function(e){clearInterval(e.pid)}),_l=[]}function Tl(){clearInterval(Sl)}var Ol=ds(function(e,t,n,r){if(t.scroll){var i,o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,u=rs(),c=!1;xl!==n&&(xl=n,Al(),wl=t.scroll,i=t.scrollFn,!0===wl&&(wl=cs(n,!0)));var f=0,d=wl;do{var h=d,p=is(h),g=p.top,v=p.bottom,m=p.left,y=p.right,b=p.width,w=p.height,x=void 0,C=void 0,E=h.scrollWidth,k=h.scrollHeight,S=es(h),_=h.scrollLeft,D=h.scrollTop;h===u?(x=b<E&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),C=w<k&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(x=b<E&&("auto"===S.overflowX||"scroll"===S.overflowX),C=w<k&&("auto"===S.overflowY||"scroll"===S.overflowY));var A=x&&(Math.abs(y-o)<=s&&_+b<E)-(Math.abs(m-o)<=s&&!!_),T=C&&(Math.abs(v-a)<=s&&D+w<k)-(Math.abs(g-a)<=s&&!!D);if(!_l[f])for(var O=0;O<=f;O++)_l[O]||(_l[O]={});(_l[f].vx!=A||_l[f].vy!=T||_l[f].el!==h)&&(_l[f].el=h,_l[f].vx=A,_l[f].vy=T,clearInterval(_l[f].pid),(0!=A||0!=T)&&(c=!0,_l[f].pid=setInterval(function(){r&&0===this.layer&&hl.active._onTouchMove(kl);var t=_l[this.layer].vy?_l[this.layer].vy*l:0,n=_l[this.layer].vx?_l[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(hl.dragged.parentNode[vs],n,t,e,kl,_l[this.layer].el)||hs(_l[this.layer].el,n,t)}.bind({layer:f}),24))),f++}while(t.bubbleScroll&&d!==u&&(d=cs(d,!1)));Dl=c}},30),Pl=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||i;a();var u=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,c=document.elementFromPoint(u.clientX,u.clientY);s(),l&&!l.el.contains(c)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Il(){}function Fl(){}function Bl(e){return null==e?e:JSON.parse(JSON.stringify(e))}Il.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 r=as(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Pl},Ma(Il,{pluginName:"revertOnSpill"}),Fl.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:Pl},Ma(Fl,{pluginName:"removeOnSpill"}),hl.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?Ga(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ga(document,"pointermove",this._handleFallbackAutoScroll):t.touches?Ga(document,"touchmove",this._handleFallbackAutoScroll):Ga(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;!this.options.dragOverBubble&&!t.rootEl&&this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?qa(document,"dragover",this._handleAutoScroll):(qa(document,"pointermove",this._handleFallbackAutoScroll),qa(document,"touchmove",this._handleFallbackAutoScroll),qa(document,"mousemove",this._handleFallbackAutoScroll)),Tl(),Al(),clearTimeout(Ja),Ja=void 0},nulling:function(){kl=xl=wl=Dl=Sl=Cl=El=null,_l.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,o=document.elementFromPoint(r,i);if(kl=e,t||this.options.forceAutoScrollFallback||Ha||ja||Ua){Ol(e,this.options,o,t);var a=cs(o,!0);Dl&&(!Sl||r!==Cl||i!==El)&&(Sl&&Tl(),Sl=setInterval(function(){var o=cs(document.elementFromPoint(r,i),!0);o!==a&&(a=o,Al()),Ol(e,n.options,o,t)},10),Cl=r,El=i)}else{if(!this.options.bubbleScroll||cs(o,!0)===rs())return void Al();Ol(e,this.options,cs(o,!1),!1)}}},Ma(e,{pluginName:"scroll",initializeByDefault:!0})}),hl.mount(Fl,Il);let Ll=null,Nl=null;function Ml(e=null,t=null){Ll=e,Nl=t}const Rl=Symbol("cloneElement");function jl(...e){var t,n;const r=null==(t=he())?void 0:t.proxy;let i=null;const o=e[0];let[,a,s]=e;Array.isArray(ue(a))||(s=a,a=null);let l=null;const{immediate:u=!0,clone:c=Bl,customUpdate:f}=null!=(n=ue(s))?n:{},d={onUpdate:function(e){if(f)return void f(e);const{from:t,item:n,oldIndex:r,oldDraggableIndex:i,newDraggableIndex:o}=e;if(Oa(n),Ta(t,n,r),ye(a)){const e=[...ue(a)];return void(a.value=_a(e,i,o))}_a(ue(a),i,o)},onStart:function(e){var t;const{from:n,oldIndex:r,item:o}=e;i=Array.from(n.childNodes);const s=ue(null==(t=ue(a))?void 0:t[r]),l=c(s);Ml(s,l),o[Rl]=l},onAdd:function(e){const t=e.item[Rl];if(!function(e){return void 0===e}(t)){if(Oa(e.item),ye(a)){const n=[...ue(a)];return void(a.value=Aa(n,e.newDraggableIndex,t))}Aa(ue(a),e.newDraggableIndex,t)}},onRemove:function(e){const{from:t,item:n,oldIndex:r,oldDraggableIndex:i,pullMode:o,clone:s}=e;if(Ta(t,n,r),"clone"!==o){if(ye(a)){const e=[...ue(a)];return void(a.value=Da(e,i))}Da(ue(a),i)}else Oa(s)},onEnd:function(e){const{newIndex:t,oldIndex:n,from:r,to:o}=e;let a=null;const s=t===n&&r===o;try{if(s){let e=null;null==i||i.some((t,n)=>{if(e&&(null==i?void 0:i.length)!==o.childNodes.length)return r.insertBefore(e,t.nextSibling),!0;const a=o.childNodes[n];e=null==o?void 0:o.replaceChild(t,a)})}}catch(l){a=l}finally{i=null}ve(()=>{if(Ml(),a)throw a})}};function h(e){const t=ue(o);return e||(e=function(e){return"string"==typeof e}(t)?function(e,t=document){var n;let r=null;return r="function"==typeof(null==t?void 0:t.querySelector)?null==(n=null==t?void 0:t.querySelector)?void 0:n.call(t,e):document.querySelector(e),r||function(e){console.warn(Sa+e)}(`Element not found: ${e}`),r}(t,null==r?void 0:r.$el):t),e&&!function(e){return e instanceof HTMLElement}(e)&&(e=e.$el),e||console.error(Sa+"Root element not found"),e}function p(){var e;const t=null!=(e=ue(s))?e:{},{immediate:n,clone:r}=t,i=ka(t,["immediate","clone"]);return Pa(i,(e,t)=>{(function(e){return 111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)})(e)&&(i[e]=(e,...n)=>(Ia(e,{data:Ll,clonedData:Nl}),t(e,...n)))}),function(e,t){const n=Ea({},e);return Object.keys(t).forEach(r=>{n[r]?n[r]=function(e,t,n=null){return function(...r){return e.apply(n,r),t.apply(n,r)}}(e[r],t[r]):n[r]=t[r]}),n}(null===a?{}:d,i)}const g=e=>{e=h(e),l&&v.destroy(),l=new hl(e,p())};pe(()=>s,()=>{l&&Pa(p(),(e,t)=>{null==l||l.option(e,t)})},{deep:!0});const v={option:(e,t)=>null==l?void 0:l.option(e,t),destroy:()=>{null==l||l.destroy(),l=null},save:()=>null==l?void 0:l.save(),toArray:()=>null==l?void 0:l.toArray(),closest:(...e)=>null==l?void 0:l.closest(...e)};return function(e){he()?ge(e):ve(e)}(()=>{u&&g()}),function(e){he()&&me(e)}(v.destroy),Ea({start:g,pause:()=>null==v?void 0:v.option("disabled",!0),resume:()=>null==v?void 0:v.option("disabled",!1)},v)}const Hl=["update","start","add","remove","choose","unchoose","end","sort","filter","clone","move","change"],zl=["clone","animation","ghostClass","group","sort","disabled","store","handle","draggable","swapThreshold","invertSwap","invertedSwapThreshold","removeCloneOnHide","direction","chosenClass","dragClass","ignore","filter","preventOnFilter","easing","setData","dropBubble","dragoverBubble","dataIdAttr","delay","delayOnTouchOnly","touchStartThreshold","forceFallback","fallbackClass","fallbackOnBody","fallbackTolerance","fallbackOffset","supportPointer","emptyInsertThreshold","scroll","forceAutoScrollFallback","scrollSensitivity","scrollSpeed","bubbleScroll","modelValue","tag","target","customUpdate",...Hl.map(e=>`on${e.replace(/^\S/,e=>e.toUpperCase())}`)],Ul=ae({name:"VueDraggable",model:{prop:"modelValue",event:"update:modelValue"},props:zl,emits:["update:modelValue",...Hl],setup(e,{slots:t,emit:n,expose:r,attrs:i}){const o=Hl.reduce((e,t)=>(e[`on${t.replace(/^\S/,e=>e.toUpperCase())}`]=(...e)=>n(t,...e),e),{}),a=se(()=>{const t=le(e),{modelValue:n}=t,r=ka(t,["modelValue"]),a=Object.entries(r).reduce((e,[t,n])=>{const r=ue(n);return void 0!==r&&(e[t]=r),e},{});return Ea(Ea({},o),function(e){return Object.keys(e).reduce((t,n)=>(void 0!==e[n]&&(t[function(e){return e.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}(n)]=e[n]),t),{})}(Ea(Ea({},i),a)))}),s=se({get:()=>e.modelValue,set:e=>n("update:modelValue",e)}),l=ce(),u=fe(jl(e.target||l,s,a));return r(u),()=>{var n;return de(e.tag||"div",{ref:l},null==(n=null==t?void 0:t.default)?void 0:n.call(t,u))}}});function $l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$l(Object(n),!0).forEach(function(t){Yl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vl(e){return(Vl="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 Gl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ou(r.key),r)}}function Kl(e,t,n){return t&&ql(e.prototype,t),n&&ql(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yl(e,t,n){return(t=ou(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xl(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zl(e,t)}function Jl(e){return(Jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Zl(e,t){return(Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ql(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Ql(e)}function tu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(pp){return!1}}();return function(){var n,r=Jl(e);if(t){var i=Jl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eu(this,n)}}function nu(){return nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Jl(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},nu.apply(this,arguments)}function ru(e){return function(e){if(Array.isArray(e))return iu(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 iu(e,t);var n=Object.prototype.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)?iu(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 iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ou(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var au,su={exports:{}},lu=(au||(au=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,o,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,o),!0;case 6:return c.fn.call(c.context,t,r,i,o,a),!0}for(u=1,l=new Array(f-1);u<f;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(f-1);d<f;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(su)),su.exports);const uu=Le(lu);var cu="undefined"!=typeof window&&window.location&&window.location.href.indexOf("xgplayerdebugger=1")>-1,fu={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},du="%c[xgplayer]",hu={config:{debug:cu?3:0},logInfo:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.config.debug>=3&&(t=console).log.apply(t,[du,fu.info,e].concat(r))},logWarn:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.config.debug>=1&&(t=console).warn.apply(t,[du,fu.warn,e].concat(r))},logError:function(e){var t;if(!(this.config.debug<1)){for(var n=this.config.debug>=2?"trace":"error",r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(t=console)[n].apply(t,[du,fu.error,e].concat(i))}}},pu=function(){function e(t){Gl(this,e),this.bufferedList=t}return Kl(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}(),gu={};function vu(e){var t=Vl(e);return null!==e&&("object"===t||"function"===t)}gu.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=document.createElement(e);return i.className=r,i.innerHTML=t,Object.keys(n).forEach(function(t){var r=t,o=n[t];"video"===e||"audio"===e||"live-video"===e?o&&i.setAttribute(r,o):i.setAttribute(r,o)}),i},gu.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var r=document.createElement("div");r.innerHTML=e;var i=r.children;return r=null,i.length>0?(i=i[0],n&&gu.addClass(i,n),t&&Object.keys(t).forEach(function(e){i.setAttribute(e,t[e])}),i):null}catch(o){return hu.logError("util.createDomFromHtml",o),null}},gu.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,function(e){return e===t})}catch(pp){var n=e.className&&"object"===Vl(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},gu.addClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(t){t&&e.classList.add(t)})}catch(pp){gu.hasClass(e,t)||(e.className&&"object"===Vl(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},gu.removeClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach(function(t){t&&e.classList.remove(t)})}catch(pp){gu.hasClass(e,t)&&t.split(/\s+/g).forEach(function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===Vl(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")})}},gu.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach(function(t){gu.hasClass(e,t)?gu.removeClass(e,t):gu.addClass(e,t)})},gu.classNames=function(){for(var e=arguments,t=[],n=function(n){"String"===gu.typeOf(e[n])?t.push(e[n]):"Object"===gu.typeOf(e[n])&&Object.keys(e[n]).map(function(r){e[n][r]&&t.push(r)})},r=0;r<arguments.length;r++)n(r);return t.join(" ")},gu.findDom=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(n)}catch(pp){hu.logError("util.findDom",pp),0===n.indexOf("#")&&(e=t.getElementById(n.slice(1)))}return e},gu.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},gu.padStart=function(e,t,n){for(var r=String(n),i=0|t,o=Math.ceil(i/r.length),a=[],s=String(e);o--;)a.push(r);return a.join("").substring(0,i-s.length)+s},gu.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=gu.padStart(Math.floor(e/3600),2,0),n=gu.padStart(Math.floor((e-3600*t)/60),2,0),r=gu.padStart(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")},gu.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},gu.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},gu.deepCopy=function(e,t){if("Object"===gu.typeOf(t)&&"Object"===gu.typeOf(e))return Object.keys(t).forEach(function(n){"Object"!==gu.typeOf(t[n])||t[n]instanceof Node?"Array"===gu.typeOf(t[n])?e[n]="Array"===gu.typeOf(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:void 0===e[n]||void 0===e[n]?e[n]=t[n]:gu.deepCopy(e[n],t[n])}),e},gu.deepMerge=function(e,t){return Object.keys(t).map(function(n){var r;"Array"===gu.typeOf(t[n])&&"Array"===gu.typeOf(e[n])?"Array"===gu.typeOf(e[n])&&(r=e[n]).push.apply(r,ru(t[n])):gu.typeOf(e[n])!==gu.typeOf(t[n])||null===e[n]||"Object"!==gu.typeOf(e[n])||t[n]instanceof window.Node?null!==t[n]&&(e[n]=t[n]):gu.deepMerge(e[n],t[n])}),e},gu.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href},gu.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,function(e){t.setAttribute(e.name,e.value)}),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},gu.setInterval=function(e,t,n,r){e._interval[t]||(e._interval[t]=window.setInterval(n.bind(e),r))},gu.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},gu.setTimeout=function(e,t,n){e._timers||(e._timers=[]);var r=setTimeout(function(){t(),gu.clearTimeout(e,r)},n);return e._timers.push(r),r},gu.clearTimeout=function(e,t){var n=e._timers;if("Array"===gu.typeOf(n)){for(var r=0;r<n.length;r++)if(n[r]===t){n.splice(r,1),clearTimeout(t);break}}else clearTimeout(t)},gu.clearAllTimers=function(e){var t=e._timers;"Array"===gu.typeOf(t)&&(t.map(function(e){clearTimeout(e)}),e._timerIds=[])},gu.createImgBtn=function(e,t,n,r){var i,o,a,s=gu.createDom("xg-".concat(e),"",{},"xgplayer-".concat(e,"-img"));return s.style.backgroundImage='url("'.concat(t,'")'),n&&r&&(["px","rem","em","pt","dp","vw","vh","vm","%"].every(function(e){return!(n.indexOf(e)>-1&&r.indexOf(e)>-1&&(i=parseFloat(n.slice(0,n.indexOf(e)).trim()),o=parseFloat(r.slice(0,r.indexOf(e)).trim()),a=e,1))}),s.style.width="".concat(i).concat(a),s.style.height="".concat(o).concat(a),s.style.backgroundSize="".concat(i).concat(a," ").concat(o).concat(a),s.style.margin="start"===e?"-".concat(o/2).concat(a," auto auto -").concat(i/2).concat(a):"auto 5px auto 5px"),s},gu.Hex2RGBA=function(e,t){var n=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var r="#";e.replace(/[0-9A-F]/gi,function(e){r+=e+e}),e=r}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,function(e){n.push(parseInt(e,16))}),"rgba(".concat(n.join(","),", ").concat(t,")")):"rgba(255, 255, 255, 0.1)"},gu.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},gu.checkIsFunction=function(e){return e&&"function"==typeof e},gu.checkIsObject=function(e){return null!==e&&"object"===Vl(e)},gu.hide=function(e){e.style.display="none"},gu.show=function(e,t){e.style.display=t||"block"},gu.isUndefined=function(e){if(null==e)return!0},gu.isNotNull=function(e){return!(null==e)},gu.setStyleFromCsstext=function(e,t){t&&("String"===gu.typeOf(t)?t.replace(/\s+/g,"").split(";").map(function(t){if(t){var n=t.split(":");n.length>1&&(e.style[n[0]]=n[1])}}):Object.keys(t).map(function(n){e.style[n]=t[n]}))},gu.filterStyleFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],n=e.style.cssText;if(!n)return{};var r=n.replace(/\s+/g,"").split(";"),i={},o={};return r.map(function(e){if(e){var n=e.split(":");n.length>1&&(function(e,t){for(var n=0,r=t.length;n<r;n++)if(e.indexOf(t[n])>-1)return!0;return!1}(n[0],t)?i[n[0]]=n[1]:o[n[0]]=n[1])}}),e.setAttribute("style",""),Object.keys(o).map(function(t){e.style[t]=o[t]}),i},gu.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var n=t.replace(/\s+/g,"").split(";"),r={};return n.map(function(e){if(e){var t=e.split(":");t.length>1&&(r[t[0]]=t[1])}}),r},gu.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var r=new window.Image;r.onload=function(e){r=null,t&&t(e)},r.onerror=function(e){r=null,n&&n(e)},r.src=e}},gu.stopPropagation=function(e){e&&e.stopPropagation()},gu.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},gu.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},gu.checkTouchSupport=function(){return"ontouchstart"in window},gu.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});n.sort(function(e,t){return e.start-t.start||t.end-e.end});var i=[];if(t)for(var o=0;o<n.length;o++){var a=i.length;if(a){var s=i[a-1].end;n[o].start-s<t?n[o].end>s&&(i[a-1].end=n[o].end):i.push(n[o])}else i.push(n[o])}else i=n;return new pu(i)},gu.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},gu.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},gu.getHostFromUrl=function(e){if("String"!==gu.typeOf(e))return"";var t=e.split("/"),n="";return t.length>3&&t[2]&&(n=t[2]),n},gu.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},gu.isMSE=function(e){return e.media&&(e=e.media),!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},gu.isBlob=function(e){return"string"==typeof e&&/^blob/.test(e)},gu.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=parseInt(e)}catch(pp){e=0}t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=parseInt(window.performance.now()));var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)});return n},gu.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},gu.adjustTimeByDuration=function(e,t,n){return t&&e&&(e>t||n&&e<t)?t:e},gu.createPositionBar=function(e,t){var n=gu.createDom("xg-bar","",{"data-index":-1},e);return t.appendChild(n),n},gu.getTransformStyle=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={scale:"".concat(e.scale||1),translate:"".concat(e.x||0,"%, ").concat(e.y||0,"%"),rotate:"".concat(e.rotate||0,"deg")};return Object.keys(n).forEach(function(e){var r=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),i="".concat(e,"(").concat(n[e],")");r.test(t)?(r.lastIndex=-1,t=t.replace(r,i)):t+="".concat(i," ")}),t},gu.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},gu.getIndexByTime=function(e,t){var n=t.length,r=-1;if(n<1)return r;if(e<=t[0].end||n<2)r=0;else if(e>t[n-1].end)r=n-1;else for(var i=1;i<n;i++)if(e>t[i-1].end&&e<=t[i].end){r=i;break}return r},gu.getOffsetCurrentTime=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if((n=r>=0&&r<t.length?r:gu.getIndexByTime(e,t))<0)return-1;var i=t.length,o=t[n],a=o.start,s=o.end,l=o.cTime,u=o.offset;return e<a?l:e>=a&&e<=s?e-u:e>s&&n>=i-1?s:-1},gu.getCurrentTimeByOffset=function(e,t){var n=-1;if(!t||t.length<0)return e;for(var r=0;r<t.length;r++)if(e<=t[r].duration){n=r;break}if(-1!==n){var i=t[n].start;return n-1<0?i+e:i+(e-t[n-1].duration)}return e};var mu=/(Android)\s([\d.]+)/,yu=/(Version)\/([\d.]+)/,bu=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],wu={get device(){return wu.os.isPc?"pc":"mobile"},get browser(){if("undefined"==typeof navigator)return"";var e=navigator.userAgent.toLowerCase(),t={ie:/rv:([\d.]+)\) like gecko/,firefox:/firefox\/([\d.]+)/,chrome:/chrome\/([\d.]+)/,opera:/opera.([\d.]+)/,safari:/version\/([\d.]+).*safari/};return[].concat(Object.keys(t).filter(function(n){return t[n].test(e)}))[0]},get os(){if("undefined"==typeof navigator)return{};var e=navigator.userAgent,t=/(?:Windows Phone)/.test(e),n=/(?:SymbianOS)/.test(e)||t,r=/(?:Android)/.test(e),i=/(?:Firefox)/.test(e),o=/(?:iPad|PlayBook)/.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,a=o||r&&!/(?:Mobile)/.test(e)||i&&/(?:Tablet)/.test(e),s=/(?:iPhone)/.test(e)&&!a;return{isTablet:a,isPhone:s,isIpad:o,isIos:s||o,isAndroid:r,isPc:!(s||r||n||a),isSymbian:n,isWindowsPhone:t,isFireFox:i}},get osVersion(){if("undefined"==typeof navigator)return 0;var e=navigator.userAgent,t="",n=(t=/(?:iPhone)|(?:iPad|PlayBook)/.test(e)?yu:mu)?t.exec(e):[];if(n&&n.length>=3){var r=n[2].split(".");return r.length>0?parseInt(r[0]):0}return 0},get isWeixin(){return"undefined"!=typeof navigator&&!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&bu.map(function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))}),this.supportResult=e,t=null,e},isMSESupport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch(t){return this._logger.error(e,t),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Promise.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var n=e.video||{},r=e.audio||{};try{var i=MediaSource.isTypeSupported(n.contentType),o=MediaSource.isTypeSupported(r.contentType);return Promise.resolve({supported:i&&o,smooth:!1,powerEfficient:!1})}catch(pp){return Promise.resolve(t)}}},xu="3.0.20",Cu={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},Eu={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},ku=Kl(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};Gl(this,e);var r=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var i=n.mediaError?n.mediaError:t.media.error||{},o=t.duration,a=t.currentTime,s=t.ended,l=t.src,u=t.currentSrc,c=t.media,f=c.readyState,d=c.networkState,h=n.errorCode||i.code;Eu[h]&&(h=Eu[h]);var p={playerVersion:xu,currentTime:a,duration:o,ended:s,readyState:f,networkState:d,src:l||u,errorType:n.errorType,errorCode:h,message:n.errorMessage||i.message,mediaError:i,originError:n.originError?n.originError.stack:"",host:gu.getHostFromUrl(l||u)};return n.ext&&Object.keys(n.ext).map(function(e){p[e]=n.ext[e]}),p}if(arguments.length>1){for(var g={playerVersion:xu,domain:document.domain},v=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m<arguments.length;m++)g[v[m]]=arguments[m];return g.ex=r?(r[arguments[0]]||{}).msg:"",g}}),Su="play",_u="playing",Du="ended",Au="pause",Tu="error",Ou="seeking",Pu="seeked",Iu="timeupdate",Fu="waiting",Bu="canplay",Lu="durationchange",Nu="volumechange",Mu="loadeddata",Ru="ratechange",ju="progress",Hu="loadstart",zu="emptied",Uu="focus",$u="blur",Wu="ready",Vu="urlNull",Gu="autoplay_started",qu="autoplay_was_prevented",Ku="complete",Yu="replay",Xu="destroy",Ju="urlchange",Zu="download_speed_change",Qu="leaveplayer",ec="enterplayer",tc="loading",nc="fullscreen_change",rc="cssFullscreen_change",ic="mini_state_change",oc="definition_change",ac="after_definition_change",sc="video_resize",lc="pip_change",uc="rotate",cc="screenShot",fc="playnext",dc="shortcut",hc="xglog",pc="user_action",gc="reset",vc="source_error",mc="source_success",yc=["play","playing","ended","pause","error","seeking","seeked","timeupdate","waiting","canplay","canplaythrough","durationchange","volumechange","loadeddata","loadedmetadata","ratechange","progress","loadstart","emptied","stalled","suspend","abort","lowdecode"],bc={STATS_INFO:"stats_info",STATS_DOWNLOAD:"stats_download",STATS_RESET:"stats_reset"},wc="fps_stuck";const xc=Object.freeze(Object.defineProperty({__proto__:null,ABORT:"abort",AFTER_DEFINITION_CHANGE:ac,AUTOPLAY_PREVENTED:qu,AUTOPLAY_STARTED:Gu,BEFORE_DEFINITION_CHANGE:"before_definition_change",BUFFER_CHANGE:"bufferedChange",CANPLAY:Bu,CANPLAY_THROUGH:"canplaythrough",COMPLETE:Ku,CSS_FULLSCREEN_CHANGE:rc,DEFINITION_CHANGE:oc,DESTROY:Xu,DOWNLOAD_SPEED_CHANGE:Zu,DURATION_CHANGE:Lu,EMPTIED:zu,ENDED:Du,ENTER_PLAYER:ec,ERROR:Tu,FPS_STUCK:wc,FULLSCREEN_CHANGE:nc,LEAVE_PLAYER:Qu,LOADED_DATA:Mu,LOADED_METADATA:"loadedmetadata",LOADING:tc,LOAD_START:Hu,MINI_STATE_CHANGE:ic,PAUSE:Au,PIP_CHANGE:lc,PLAY:Su,PLAYER_BLUR:$u,PLAYER_FOCUS:Uu,PLAYING:_u,PLAYNEXT:fc,PROGRESS:ju,RATE_CHANGE:Ru,READY:Wu,REPLAY:Yu,RESET:gc,RETRY:"retry",ROTATE:uc,SCREEN_SHOT:cc,SEEKED:Pu,SEEKING:Ou,SEI_PARSED:"SEI_PARSED",SHORTCUT:dc,SOURCE_ERROR:vc,SOURCE_SUCCESS:mc,STALLED:"stalled",STATS_EVENTS:bc,SUSPEND:"suspend",SWITCH_SUBTITLE:"switch_subtitle",TIME_UPDATE:Iu,URL_CHANGE:Ju,URL_NULL:Vu,USER_ACTION:pc,VIDEO_EVENTS:yc,VIDEO_RESIZE:sc,VOLUME_CHANGE:Nu,WAITING:Fu,XGLOG:hc},Symbol.toStringTag,{value:"Module"}));function Cc(e,t){this&&this.emit&&("error"===e?this.errorHandler(e,t.error):this.emit(e,t))}var Ec=function(){Xl(t,uu);var e=tu(t);function t(n){var r;Gl(this,t),(r=e.call(this,n))._hasStart=!1,r._currentTime=0,r._duration=0,r._internalOp={},r._lastMuted=!1,r.vtype="MP4",r._rate=-1,r.mediaConfig=Object.assign({},{controls:!1,autoplay:n.autoplay,playsinline:n.playsinline,"x5-playsinline":n.playsinline,"webkit-playsinline":n.playsinline,"x5-video-player-fullscreen":n["x5-video-player-fullscreen"]||n.x5VideoPlayerFullscreen,"x5-video-orientation":n["x5-video-orientation"]||n.x5VideoOrientation,airplay:n.airplay,"webkit-airplay":n.airplay,tabindex:0|n.tabindex,mediaType:n.mediaType||"video","data-index":-1},n.videoConfig,n.videoAttributes);var i=n["x5-video-player-type"]||n.x5VideoPlayerType;return wu.isWeixin&&wu.os.isAndroid&&i&&(r.mediaConfig["x5-video-player-type"]=i,delete r.mediaConfig.playsinline,delete r.mediaConfig["webkit-playsinline"],delete r.mediaConfig["x5-playsinline"]),n.loop&&(r.mediaConfig.loop="loop"),n.autoplayMuted&&!Object.prototype.hasOwnProperty.call(r.mediaConfig,"muted")&&(r.mediaConfig.muted=!0),r.media=gu.createDom(r.mediaConfig.mediaType,"",r.mediaConfig,""),n.defaultPlaybackRate&&(r.media.defaultPlaybackRate=r.media.playbackRate=n.defaultPlaybackRate),"Number"===gu.typeOf(n.volume)&&(r.volume=n.volume),n.autoplayMuted&&(r.media.muted=!0,r._lastMuted=!0),n.autoplay&&(r.media.autoplay=!0),r._interval={},r.mediaEventMiddleware={},r.attachVideoEvents(),r}return Kl(t,[{key:"setEventsMiddleware",value:function(e){var t=this;Object.keys(e).map(function(n){t.mediaEventMiddleware[n]=e[n]})}},{key:"removeEventsMiddleware",value:function(e){var t=this;Object.keys(e).map(function(e){delete t.mediaEventMiddleware[e]})}},{key:"attachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers||(this._evHandlers=yc.map(function(t){var n="on".concat(t.charAt(0).toUpperCase()).concat(t.slice(1));return"function"==typeof e[n]&&e.on(t,e[n]),Yl({},t,function(e,t){return function(n,r){var i={player:t,eventName:e,originalEvent:n,detail:n.detail||{},timeStamp:n.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[n.type],muted:t.muted,volume:t.volume,host:gu.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(n.type),"timeupdate"===e&&(t._currentTime=t.media&&t.media.currentTime),"ratechange"===e){var o=t.media?t.media.playbackRate:0;if(o&&t._rate===o)return;t._rate=t.media&&t.media.playbackRate}if("durationchange"===e&&(t._duration=t.media.duration),"volumechange"===e&&(i.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(i.error=r||t.video.error),t.mediaEventMiddleware[e]){var a=Cc.bind(t,e,i);try{t.mediaEventMiddleware[e].call(t,i,a)}catch(s){throw Cc.call(t,e,i),s}}else Cc.call(t,e,i)}}(t,e))})),this._evHandlers.forEach(function(e){var n=Object.keys(e)[0];t.addEventListener(n,e[n],!1)})}},{key:"detachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers.forEach(function(e){var n=Object.keys(e)[0];t.removeEventListener(n,e[n],!1)}),this._evHandlers.forEach(function(t){var n=Object.keys(t)[0],r="on".concat(n.charAt(0).toUpperCase()).concat(n.slice(1));"function"==typeof e[r]&&e.off(n,e[r])}),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var n=this;e.removeAttribute("src"),e.load(),t.forEach(function(e,t){n.media.appendChild(gu.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))});var r=e.children;if(r){this._videoSourceCount=r.length,this._videoSourceIndex=r.length,this._vLoadeddata=function(e){n.emit(mc,{src:e.target.currentSrc,host:gu.getHostFromUrl(e.target.currentSrc)})};for(var i=null,o=0;o<this._evHandlers.length;o++)if("error"===Object.keys(this._evHandlers[o])[0]){i=this._evHandlers[o];break}!this._sourceError&&(this._sourceError=function(e){var t=parseInt(e.target.getAttribute("data-index"),10);if(n._videoSourceIndex--,0===n._videoSourceIndex||t>=n._videoSourceCount){var r={code:4,message:"sources_load_error"};i?i.error(e,r):n.errorHandler("error",r)}var o=Cu[4];n.emit(vc,new ku(n,{errorType:o,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var a=0;a<r.length;a++)r[a].addEventListener("error",this._sourceError);e.addEventListener("loadeddata",this._vLoadeddata)}}},{key:"_detachSourceEvents",value:function(e){var t=e.children;if(t&&0!==t.length&&this._sourceError){for(var n=0;n<t.length;n++)t[n].removeEventListener("error",this._sourceError);for(;t.length>0;)e.removeChild(t[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.media&&(this.media.error||t)){var n=this.media.error||t,r=n.code?Cu[n.code]:"other";n.message,this.media.currentSrc||(n={code:6,message:"empty_src"}),this.emit(e,new ku(this,{errorType:r,errorCode:n.code,errorMessage:n.message||"",mediaError:n}))}}},{key:"destroy",value:function(){for(var e in this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null,this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){return this.media?this.media.play():null}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return!!this.media&&this.media.canPlayType(e)}},{key:"getBufferedRange",value:function(e){var t=[0,0];if(!this.media)return t;e||(e=this.media.buffered);var n=this.media.currentTime;if(e)for(var r=0,i=e.length;r<i&&(t[0]=e.start(r),t[1]=e.end(r),!(t[0]<=n&&n<=t[1]));r++);return t[0]-n<=0&&n-t[1]<=0?t:[0,0]}},{key:"autoplay",get:function(){return!!this.media&&this.media.autoplay},set:function(e){this.media&&(this.media.autoplay=e)}},{key:"buffered",get:function(){return this.media?this.media.buffered:null}},{key:"buffered2",get:function(){return this.media&&this.media.buffered?gu.getBuffered2(this.media.buffered):null}},{key:"bufferedPoint",get:function(){var e={start:0,end:0};if(!this.media)return e;var t=this.media.buffered;if(!t||0===t.length)return e;for(var n=0;n<t.length;n++)if((t.start(n)<=this.currentTime||t.start(n)<.1)&&t.end(n)>=this.currentTime)return{start:t.start(n),end:t.end(n)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?void 0!==this.media.currentTime?this.media.currentTime:this._currentTime:0},set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return!!this.media&&this.media.defaultMuted},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return!!this.media&&this.media.ended}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){return this.media.error?["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][this.media.error.code-1]:""}},{key:"loop",get:function(){return!!this.media&&this.media.loop},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return!!this.media&&this.media.muted},set:function(e){this.media&&this.media.muted!==e&&(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return!this.media||this.media.paused}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){this.media&&e!==1/0&&(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return!!this.media&&this.media.preload},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return!!this.media&&this.media.seekable}},{key:"seeking",get:function(){return!!this.media&&this.media.seeking}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){this.media&&(this.emit(Ju,e),this.emit(Fu),this._currentTime=0,this._duration=0,gu.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===gu.typeOf(e)?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()))}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e!==1/0&&this.media&&(this.media.volume=e)}},{key:"aspectRatio",get:function(){return this.media?this.media.videoWidth/this.media.videoHeight:0}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,n){for(var r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];(r=nu(Jl(t.prototype),"emit",this)).call.apply(r,[this,e,n].concat(o))}},{key:"on",value:function(e,n){for(var r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];(r=nu(Jl(t.prototype),"on",this)).call.apply(r,[this,e,n].concat(o))}},{key:"once",value:function(e,n){for(var r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];(r=nu(Jl(t.prototype),"once",this)).call.apply(r,[this,e,n].concat(o))}},{key:"off",value:function(e,n){for(var r,i=arguments.length,o=new Array(i>2?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];(r=nu(Jl(t.prototype),"off",this)).call.apply(r,[this,e,n].concat(o))}},{key:"offAll",value:function(){nu(Jl(t.prototype),"removeAllListeners",this).call(this)}}]),t}(),kc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};Gl(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return Kl(e,[{key:"openDB",value:function(e){var t=this,n=this,r=this.myDB.version||1,i=n.indexedDB.open(n.myDB.name,r);i.onerror=function(e){},i.onsuccess=function(r){t.myDB.db=r.target.result,e.call(n)},i.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(n.myDB.ojstore.name)||t.createObjectStore(n.myDB.ojstore.name,{keyPath:n.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var n,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.add(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"putData",value:function(e,t){for(var n,r=this.myDB.db.transaction(e,"readwrite").objectStore(e),i=0;i<t.length;i++)(n=r.put(t[i])).onerror=function(){},n.onsuccess=function(){}}},{key:"getDataByKey",value:function(e,t,n){var r=this,i=this.myDB.db.transaction(e,"readwrite").objectStore(e).get(t);i.onerror=function(){n.call(r,null)},i.onsuccess=function(e){var t=e.target.result;n.call(r,t)}}},{key:"deleteData",value:function(e,t){this.myDB.db.transaction(e,"readwrite").objectStore(e).delete(t)}},{key:"clearData",value:function(e){this.myDB.db.transaction(e,"readwrite").objectStore(e).clear()}}]),e}(),Sc=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],_c=["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],Dc=["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],Ac="data-xgplayerid";function Tc(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a=t.call.apply(t,[e].concat(i));n&&"function"==typeof n&&(a&&a.then?a.then(function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];n.call.apply(n,[e].concat(r))}):n.call.apply(n,[e].concat(i)))}function Oc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var r=arguments,i=this;if(n.pre)try{var o;(o=n.pre).call.apply(o,[this].concat(Array.prototype.slice.call(arguments)))}catch(pp){throw pp.message="[pluginName: ".concat(this.pluginName,":").concat(e,":pre error] >> ").concat(pp.message),pp}if(this.__hooks&&this.__hooks[e])try{var a=Rc(this,e,t);a?a.then?a.then(function(e){!1!==e&&Tc.apply(void 0,[i,t,n.next].concat(ru(r)))}).catch(function(e){throw e}):Tc.apply(void 0,[this,t,n.next].concat(Array.prototype.slice.call(arguments))):void 0===a&&Tc.apply(void 0,[this,t,n.next].concat(Array.prototype.slice.call(arguments)))}catch(pp){throw pp.message="[pluginName: ".concat(this.pluginName,":").concat(e,"] >> ").concat(pp.message),pp}else Tc.apply(void 0,[this,t,n.next].concat(Array.prototype.slice.call(arguments)))}.bind(this)}function Pc(e,t){var n=this.__hooks;if(!n||!Array.isArray(n[e]))return-1;for(var r=n[e],i=0;i<r.length;i++)if(r[i]===t)return i;return-1}function Ic(e,t){var n=this.__hooks;if(n)return n.hasOwnProperty(e)?(Array.isArray(n[e])||(n[e]=[]),-1===Pc.call(this,e,t)&&n[e].push(t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function Fc(e,t){var n=this.__hooks;if(n){if(Array.isArray(n[e])){var r=n[e],i=Pc.call(this,e,t);-1!==i&&r.splice(i,1)}delete n[e]}}function Bc(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.useHooks&&t.useHooks.apply(t,r)}}function Lc(e){if(this.plugins&&this.plugins[e.toLowerCase()]){var t=this.plugins[e.toLowerCase()];if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.removeHooks&&t.removeHooks.apply(t,r)}}}function Nc(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&t.map(function(t){e.__hooks[t]=null}),Object.defineProperty(e,"hooks",{get:function(){return e.__hooks&&Object.keys(e.__hooks).map(function(t){if(e.__hooks[t])return t})}})}function Mc(e){e.__hooks=null}function Rc(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(e.__hooks&&Array.isArray(e.__hooks[t])){var a=e.__hooks[t],s=-1;return function e(t,n,r){for(var i=arguments.length,o=new Array(i>3?i-3:0),l=3;l<i;l++)o[l-3]=arguments[l];if(s++,0===a.length||s===a.length)return r.call.apply(r,[t,t].concat(o));var u=a[s],c=u.call.apply(u,[t,t].concat(o));return c&&c.then?c.then(function(i){return!1===i?null:e.apply(void 0,[t,n,r].concat(o))}).catch(function(e){console.warn("[runHooks]".concat(n," reject"),e.message)}):!1!==c?e.apply(void 0,[t,n,r].concat(o)):void 0}.apply(void 0,[e,t,n].concat(i))}return n.call.apply(n,[e,e].concat(i))}function jc(e,t){hu.logError("[".concat(e,"] event or callback cant be undefined or null when call ").concat(t))}var Hc,zc,Uc,$c,Wc=function(){function e(t){Gl(this,e),gu.checkIsFunction(this.beforeCreate)&&this.beforeCreate(t),Nc(this),this.__args=t,this.__events={},this.__onceEvents={},this.config=t.config||{},this.player=null,this.playerConfig={},this.pluginName="",this.__init(t)}return Kl(e,[{key:"beforeCreate",value:function(e){}},{key:"afterCreate",value:function(){}},{key:"beforePlayerInit",value:function(){}},{key:"onPluginsReady",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"destroy",value:function(){}},{key:"__init",value:function(e){this.player=e.player,this.playerConfig=e.player&&e.player.config,this.pluginName=e.pluginName?e.pluginName.toLowerCase():this.constructor.pluginName.toLowerCase(),this.logger=e.player&&e.player.logger}},{key:"updateLang",value:function(e){e||(e=this.lang)}},{key:"lang",get:function(){return this.player.lang}},{key:"i18n",get:function(){return this.player.i18n}},{key:"i18nKeys",get:function(){return this.player.i18nKeys}},{key:"domEventType",get:function(){var e=gu.checkTouchSupport()?"touch":"mouse";return!this.playerConfig||"touch"!==this.playerConfig.domEventType&&"mouse"!==this.playerConfig.domEventType||(e=this.playerConfig.domEventType),e}},{key:"on",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__events[e]=t,this.player.on(e,t)):Array.isArray(e)&&e.forEach(function(e){n.__events[e]=t,n.player.on(e,t)}):jc(this.pluginName,"plugin.on(event, callback)")}},{key:"once",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(this.__onceEvents[e]=t,this.player.once(e,t)):Array.isArray(e)&&e.forEach(function(r){n.__onceEvents[r]=t,n.player.once(e,t)}):jc(this.pluginName,"plugin.once(event, callback)")}},{key:"off",value:function(e,t){var n=this;e&&t&&this.player?"string"==typeof e?(delete this.__events[e],this.player.off(e,t)):Array.isArray(e)&&e.forEach(function(r){delete n.__events[e],n.player.off(r,t)}):jc(this.pluginName,"plugin.off(event, callback)")}},{key:"offAll",value:function(){var e=this;["__events","__onceEvents"].forEach(function(t){Object.keys(e[t]).forEach(function(n){e[t][n]&&e.off(n,e[t][n]),n&&delete e[t][n]})}),this.__events={},this.__onceEvents={}}},{key:"emit",value:function(e){var t;if(this.player){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=this.player).emit.apply(t,[e].concat(r))}}},{key:"emitUserAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var r=Wl(Wl({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,t,r)}}},{key:"hook",value:function(e,t){return Oc.call.apply(Oc,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return Ic.call.apply(Ic,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return Fc.call.apply(Fc,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return n&&(t.pluginName=n),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e=this,t=this.player,n=this.pluginName;this.offAll(),gu.clearAllTimers(this),gu.checkIsFunction(this.destroy)&&this.destroy(),["player","playerConfig","pluginName","logger","__args","__hooks"].map(function(t){e[t]=null}),t.unRegisterPlugin(n),Mc(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&Object.defineProperty(e,n,t[n])}},{key:"defineMethod",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&"function"==typeof t[n]&&Object.defineProperty(e,n,{configurable:!0,value:t[n]})}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),Vc=function(){if($c)return Uc;$c=1;var e=function(){if(zc)return Hc;if(zc=1,"undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return Hc=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}}();function t(e,t,r,i,o){var a=n.apply(this,arguments);return e.addEventListener(r,a,o),{destroy:function(){e.removeEventListener(r,a,o)}}}function n(t,n,r,i){return function(r){r.delegateTarget=e(r.target,n),r.delegateTarget&&i.call(t,r)}}return Uc=function(e,n,r,i,o){return"function"==typeof e.addEventListener?t.apply(null,arguments):"function"==typeof r?t.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return t(e,n,r,i,o)}))}}();const Gc=Le(Vc);var qc={CONTROLS:"controls",ROOT:"root"},Kc={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"},Yc="xg-icon-disable";function Xc(e){return!!e&&e.indexOf&&/^(?:http|data:|\/)/.test(e)}function Jc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=null;if(e instanceof window.Element)return gu.addClass(e,n),Object.keys(r).map(function(t){e.setAttribute(t,r[t])}),e;if(Xc(e)||Xc(e.url))return r.src=Xc(e)?e:e.url||"",o=gu.createDom(e.tag||"img","",r,"xg-img ".concat(n));if("function"==typeof e)try{return(o=e())instanceof window.Element?(gu.addClass(o,n),Object.keys(r).map(function(e){o.setAttribute(e,r[e])}),o):(hu.logWarn("warn>>icons.".concat(t," in config of plugin named [").concat(i,"] is a function mast return an Element Object")),null)}catch(pp){return hu.logError("Plugin named [".concat(i,"]:createIcon"),pp),null}return"string"==typeof e?gu.createDomFromHtml(e,r,n):(hu.logWarn("warn>>icons.".concat(t," in config of plugin named [").concat(i,"] is invalid")),null)}var Zc=function(){Xl(t,Wc);var e=tu(t);function t(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Gl(this,t),(n=e.call(this,r)).__delegates=[],n}return Kl(t,[{key:"__init",value:function(e){if(nu(Jl(t.prototype),"__init",this).call(this,e),e.root){var n=e.root,r=null;this.icons={},this.root=null,this.parent=null,function(e,t){var n=t.config.icons||t.playerConfig.icons;Object.keys(e).map(function(r){var i=e[r],o=i&&i.class?i.class:"",a=i&&i.attr?i.attr:{},s=null;n&&n[r]&&(o=function(e,t){return"object"===Vl(e)&&e.class&&"string"==typeof e.class?"".concat(t," ").concat(e.class):t}(n[r],o),a=function(e,t){return"object"===Vl(e)&&e.attr&&"object"===Vl(e.attr)&&Object.keys(e.attr).map(function(n){t[n]=e.attr[n]}),t}(n[r],a),s=Jc(n[r],r,o,a,t.pluginName)),!s&&i&&(s=Jc(i.icon?i.icon:i,a,o,{},t.pluginName)),t.icons[r]=s})}(this.registerIcons()||{},this),this.langText={};var i,o,a=this.registerLanguageTexts()||{};i=a,o=this,Object.keys(i).map(function(e){Object.defineProperty(o.langText,e,{get:function(){var t=o.lang,n=o.i18n;return n[e]?n[e]:i[e]&&i[e][t]||""}})});var s="";try{s=this.render()}catch(pp){throw hu.logError("Plugin:".concat(this.pluginName,":render"),pp),new Error("Plugin:".concat(this.pluginName,":render:").concat(pp.message))}if(s)(r=t.insert(s,n,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(r=gu.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),n.appendChild(r)}this.root=r,this.parent=n;var l=this.config.attr||{},u=this.config.style||{};this.setAttr(l),this.setStyle(u),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t=this.children();t&&"object"===Vl(t)&&Object.keys(t).length>0&&Object.keys(t).map(function(n){var r,i,o=n,a=t[o],s={root:e.root};"function"==typeof a?(r=e.config[o]||{},i=a):"object"===Vl(a)&&"function"==typeof a.plugin&&(r=a.options?gu.deepCopy(e.config[o]||{},a.options):e.config[o]||{},i=a.plugin),s.config=r,void 0!==r.index&&(s.index=r.index),r.root&&(s.root=r.root),e.registerPlugin(i,s,o)})}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,n=this.i18n,r=this.langText;t&&function e(t,n){for(var r=0;r<t.children.length;r++)t.children[r].children.length>0?e(t.children[r],n):n(t.children[r])}(t,function(t){var i=t.getAttribute&&t.getAttribute("lang-key");if(i){var o=n[i.toUpperCase()]||r[i];o&&(t.innerHTML="function"==typeof o?o(e):o)}})}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=this.i18n||{},r=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var i=n[t]||r[t]||"";i&&(e.innerHTML=i)}},{key:"plugins",value:function(){return this._children}},{key:"disable",value:function(){this.config.disable=!0,gu.addClass(this.find(".xgplayer-icon"),Yc)}},{key:"enable",value:function(){this.config.disable=!1,gu.removeClass(this.find(".xgplayer-icon"),Yc)}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.root=n.root||this.root;var i=nu(Jl(t.prototype),"registerPlugin",this).call(this,e,n,r);return this._children.push(i),i}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,n,r){var i=this;if(arguments.length<3&&"function"==typeof n)Array.isArray(e)?e.forEach(function(e){i.bindEL(e,n)}):this.bindEL(e,n);else{var o=t.delegate.call(this,this.root,e,n,r);this.__delegates=this.__delegates.concat(o)}}},{key:"unbind",value:function(e,t){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach(function(e){n.unbindEL(e,t)}):this.unbindEL(e,t);else for(var r="".concat(e,"_").concat(t),i=0;i<this.__delegates.length;i++)if(this.__delegates[i].key===r){this.__delegates[i].destroy(),this.__delegates.splice(i,1);break}}},{key:"setStyle",value:function(e,t){var n=this;if(this.root)return"String"===gu.typeOf(e)?this.root.style[e]=t:void("Object"===gu.typeOf(e)&&Object.keys(e).map(function(t){n.root.style[t]=e[t]}))}},{key:"setAttr",value:function(e,t){var n=this;if(this.root)return"String"===gu.typeOf(e)?this.root.setAttribute(e,t):void("Object"===gu.typeOf(e)&&Object.keys(e).map(function(t){n.root.setAttribute(t,e[t])}))}},{key:"setHtml",value:function(e,t){this.root&&(this.root.innerHTML=e,"function"==typeof t&&t())}},{key:"bindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,n)}},{key:"unbindEL",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,n)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?this.find(e).appendChild(t):e.appendChild(t)}catch(n){return hu.logError("Plugin:appendChild",n),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e=this,n=this.player;this.__delegates.map(function(e){e.destroy()}),this.__delegates=[],this._children instanceof Array&&(this._children.map(function(e){n.unRegisterPlugin(e.pluginName)}),this._children=null),this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),nu(Jl(t.prototype),"__destroy",this).call(this),this.icons={},["root","parent"].map(function(t){e[t]=null})}}],[{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.children.length,i=Number(n),o=e instanceof window.Node;if(r){for(var a=0,s=null,l="";a<r;a++){s=t.children[a];var u=Number(s.getAttribute("data-index"));if(u>=i){l="beforebegin";break}u<i&&(l="afterend")}return o?"afterend"===l?t.appendChild(e):t.insertBefore(e,s):s.insertAdjacentHTML(l,e),"afterend"===l?t.children[t.children.length-1]:t.children[a]}return o?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.children[t.children.length-1]}},{key:"defaultConfig",get:function(){return{}}},{key:"delegate",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=[];if(e instanceof window.Node&&"function"==typeof r)if(Array.isArray(n))n.forEach(function(n){var a=Gc(e,t,n,r,i);a.key="".concat(t,"_").concat(n),o.push(a)});else{var a=Gc(e,t,n,r,i);a.key="".concat(t,"_").concat(n),o.push(a)}return o}},{key:"ROOT_TYPES",get:function(){return qc}},{key:"POSITIONS",get:function(){return Kc}}]),t}(),Qc=function(){function e(){var t=this;if(Gl(this,e),Yl(this,"__trigger",function(e){var n=(new Date).getTime();t.timeStamp=n;for(var r=0;r<e.length;r++)t.__runHandler(e[r].target)}),this.__handlers=[],this.timeStamp=0,this.observer=null,window.ResizeObserver)try{this.observer=new window.ResizeObserver(function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return vu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,f=!1,d=!0,h=!t&&0!==t&&"function"==typeof window.requestAnimationFrame;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function g(e,t){return h?(window.cancelAnimationFrame(s),window.requestAnimationFrame(e)):setTimeout(e,t)}function v(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-u>=o}function m(){var e=Date.now();if(v(e))return y(e);s=g(m,function(e){var n=e-u,r=t-(e-l);return f?Math.min(r,o-n):r}(e))}function y(e){return s=void 0,d&&r?p(e):(r=i=void 0,a)}function b(){for(var e=Date.now(),n=v(e),o=arguments.length,d=new Array(o),h=0;h<o;h++)d[h]=arguments[h];if(r=d,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=g(m,t),c?p(e):a}(l);if(f)return s=g(m,t),p(l)}return void 0===s&&(s=g(m,t)),a}return t=+t||0,vu(n)&&(c=!!n.leading,o=(f="maxWait"in n)?Math.max(+n.maxWait||0,t):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==s&&function(e){if(h)return window.cancelAnimationFrame(e);clearTimeout(e)}(s),u=0,r=l=i=s=void 0},b.flush=function(){return void 0===s?a:y(Date.now())},b.pending=function(){return void 0!==s},b}(e,100,{leading:r,trailing:i,maxWait:100})}(this.__trigger,0,{trailing:!0})),this.timeStamp=(new Date).getTime()}catch(pp){console.error(pp)}}return Kl(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer.observe(e);for(var n=e.getAttribute(Ac),r=this.__handlers,i=-1,o=0;o<r.length;o++)r[o]&&e===r[o].target&&(i=o);i>-1?this.__handlers[i].handler=t:this.__handlers.push({target:e,handler:t,playerId:n})}}},{key:"unObserver",value:function(e){var t=-1;this.__handlers.map(function(n,r){e===n.target&&(t=r)});try{var n;null===(n=this.observer)||void 0===n||n.unobserve(e)}catch(pp){}t>-1&&this.__handlers.splice(t,1)}},{key:"destroyObserver",value:function(){var e;null===(e=this.observer)||void 0===e||e.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){try{t[n].handler(e)}catch(r){console.error(r)}return!0}return!1}}]),e}(),ef=null,tf={pluginGroup:{},init:function(e){var t,n,r=e._pluginInfoId;r||(r=(new Date).getTime(),e._pluginInfoId=r),!e.config.closeResizeObserver&&(t=e.root,n=function(){e.resize()},ef||(ef=new Qc),ef.addObserver(t,n)),this.pluginGroup[r]={_originalOptions:e.config||{},_plugins:{}}},formatPluginInfo:function(e,t){var n=null,r=null;return e.plugin&&"function"==typeof e.plugin?(n=e.plugin,r=e.options):(n=e,r={}),t&&(r.config=t||{}),{PLUFGIN:n,options:r}},checkPluginIfExits:function(e,t){for(var n=0;n<t.length;n++)if(e.toLowerCase()===t[n].pluginName.toLowerCase())return!0;return!1},getRootByConfig:function(e,t){for(var n=Object.keys(t),r=null,i=0;i<n.length;i++)if(e.toLowerCase()===n[i].toLowerCase()){r=t[n[i]];break}return"Object"===gu.typeOf(r)?{root:r.root,position:r.position}:{}},lazyRegister:function(e,t){var n=this,r=t.timeout||1500;return Promise.race([t.loader().then(function(t){var r;r=t&&t.__esModule?t.default:t,n.register(e,r,t.options)}),new Promise(function(e,t){setTimeout(function(){t(new Error("timeout"))},r)})])},register:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var r=e._pluginInfoId;if(r&&this.pluginGroup[r]){this.pluginGroup[r]._plugins||(this.pluginGroup[r]._plugins={});var i=this.pluginGroup[r]._plugins,o=this.pluginGroup[r]._originalOptions;n.player=e;var a=n.pluginName||t.pluginName;if(!a)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){n.config||(n.config={});for(var s=Object.keys(o),l=0;l<s.length;l++)if(a.toLowerCase()===s[l].toLowerCase()){var u=o[s[l]];"Object"===gu.typeOf(u)?n.config=Object.assign({},n.config,o[s[l]]):"Boolean"===gu.typeOf(u)&&(n.config.disable=!u);break}t.defaultConfig&&Object.keys(t.defaultConfig).forEach(function(e){void 0===n.config[e]&&(n.config[e]=t.defaultConfig[e])}),n.root?"string"==typeof n.root&&(n.root=e[n.root]):n.root=e.root,n.index=n.config.index||0;try{i[a.toLowerCase()]&&(this.unRegister(r,a.toLowerCase()),console.warn("the is one plugin with same pluginName [".concat(a,"] exist, destroy the old instance")));var c=new t(n);return i[a.toLowerCase()]=c,i[a.toLowerCase()].func=t,c&&"function"==typeof c.afterCreate&&c.afterCreate(),c}catch(f){throw console.error(f),f}}else console.warn("not supported plugin [".concat(a,"]"))}}},unRegister:function(e,t){e._pluginInfoId&&(e=e._pluginInfoId),t=t.toLowerCase();try{var n=this.pluginGroup[e]._plugins[t];n&&(n.pluginName&&n.__destroy(),delete this.pluginGroup[e]._plugins[t])}catch(pp){console.error("[unRegister:".concat(t,"] cgid:[").concat(e,"] error"),pp)}},deletePlugin:function(e,t){var n=e._pluginInfoId;n&&this.pluginGroup[n]&&this.pluginGroup[n]._plugins&&delete this.pluginGroup[n]._plugins[t]},getPlugins:function(e){var t=e._pluginInfoId;return t&&this.pluginGroup[t]?this.pluginGroup[t]._plugins:{}},findPlugin:function(e,t){var n=e._pluginInfoId;if(!n||!this.pluginGroup[n])return null;var r=t.toLowerCase();return this.pluginGroup[n]._plugins[r]},beforeInit:function(e){var t=this;function n(e){return e&&e.then?e:new Promise(function(e){e()})}return new Promise(function(r){if(t.pluginGroup)return(e._loadingPlugins&&e._loadingPlugins.length?Promise.all(e._loadingPlugins):Promise.resolve()).then(function(){var i=e._pluginInfoId;if(t.pluginGroup[i]){var o=t.pluginGroup[i]._plugins,a=[];Object.keys(o).forEach(function(e){if(o[e]&&o[e].beforePlayerInit)try{var t=o[e].beforePlayerInit();a.push(n(t))}catch(pp){throw a.push(n(null)),pp}}),Promise.all([].concat(a)).then(function(){r()}).catch(function(e){console.error(e),r()})}else r()})})},afterInit:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins;Object.keys(n).forEach(function(e){n[e]&&n[e].afterPlayerInit&&n[e].afterPlayerInit()})}},setLang:function(e,t){var n=t._pluginInfoId;if(n&&this.pluginGroup[n]){var r=this.pluginGroup[n]._plugins;Object.keys(r).forEach(function(t){if(r[t].updateLang)r[t].updateLang(e);else try{r[t].lang=e}catch(n){console.warn("".concat(t," setLang"))}})}},reRender:function(e){var t=this,n=e._pluginInfoId;if(n&&this.pluginGroup[n]){var r=[],i=this.pluginGroup[n]._plugins;Object.keys(i).forEach(function(e){"controls"!==e&&i[e]&&(r.push({plugin:i[e].func,options:i[e].__args}),t.unRegister(n,e))}),r.forEach(function(n){t.register(e,n.plugin,n.options)})}},onPluginsReady:function(e){var t=e._pluginInfoId;if(t&&this.pluginGroup[t]){var n=this.pluginGroup[t]._plugins||{};Object.keys(n).forEach(function(e){n[e].onPluginsReady&&"function"==typeof n[e].onPluginsReady&&n[e].onPluginsReady()})}},destroy:function(e){var t=e._pluginInfoId;if(this.pluginGroup[t]){var n,r;n=e.root,null===(r=ef)||void 0===r||r.unObserver(n,void 0);for(var i=this.pluginGroup[t]._plugins,o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];this.unRegister(t,s)}delete this.pluginGroup[t],delete e._pluginInfoId}}},nf={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"};function rf(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:(e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase(),"zh-cn"===e&&(e="zh"),e),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}};var e}var of=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onMouseEnter",function(e){var t=Ql(n),r=t.player;t.playerConfig.closeControlsBlur&&r.focus({autoHide:!1})}),Yl(Ql(n),"onMouseLeave",function(e){Ql(n).player.focus()}),n}return Kl(t,[{key:"beforeCreate",value:function(e){e.config.mode||"mobile"!==wu.device||(e.config.mode="flex"),e.player.config.marginControls&&(e.config.autoHide=!1)}},{key:"afterCreate",value:function(){var e=this,t=this.config,n=t.disable,r=t.height,i=t.mode;if(!n){"flex"===i&&this.player.addClass(nf.FLEX_CONTROLS);var o={height:"".concat(r,"px")};Object.keys(o).map(function(t){e.root.style[t]=o[t]}),this.left=this.find("xg-left-grid"),this.center=this.find("xg-center-grid"),this.right=this.find("xg-right-grid"),this.innerRoot=this.find("xg-inner-controls"),this.on(ic,function(t){t?gu.addClass(e.root,"mini-controls"):gu.removeClass(e.root,"mini-controls")});var a=this.playerConfig.isMobileSimulateMode;"mobile"!==wu.device&&"mobile"!==a&&(this.bind("mouseenter",this.onMouseEnter),this.bind("mouseleave",this.onMouseLeave))}}},{key:"focus",value:function(){this.player.focus({autoHide:!1})}},{key:"focusAwhile",value:function(){this.player.focus({autoHide:!0})}},{key:"blur",value:function(){this.player.blur({ignorePaused:!0})}},{key:"recoverAutoHide",value:function(){this.config.autoHide&&gu.addClass(this.root,nf.CONTROLS_AUTOHIDE)}},{key:"pauseAutoHide",value:function(){gu.removeClass(this.root,nf.CONTROLS_AUTOHIDE)}},{key:"show",value:function(e){this.root.style.display="",this.player.focus()}},{key:"hide",value:function(){this.root.style.display="none"}},{key:"mode",get:function(){return this.config.mode}},{key:"registerPlugin",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(this.root){var i=e.defaultConfig||{};if(!n.root){switch(n.position?n.position:n.config&&n.config.position?n.config.position:i.position){case Kc.CONTROLS_LEFT:n.root=this.left;break;case Kc.CONTROLS_RIGHT:n.root=this.right;break;case Kc.CONTROLS_CENTER:n.root=this.center;break;case Kc.CONTROLS:n.root=this.root;break;default:n.root=this.left}return nu(Jl(t.prototype),"registerPlugin",this).call(this,e,n,r)}}}},{key:"destroy",value:function(){"mobile"!==wu.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var e=this.config,t=e.mode,n=e.autoHide,r=e.initShow;if(!e.disable){var i=gu.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},Yl({},nf.CONTROLS_AUTOHIDE,n),{"xgplayer-controls-initshow":r||!n});return'<xg-controls class="'.concat(i,'" unselectable="on">\n <xg-inner-controls class="xg-inner-controls xg-pos">\n <xg-left-grid class="xg-left-grid">\n </xg-left-grid>\n <xg-center-grid class="xg-center-grid"></xg-center-grid>\n <xg-right-grid class="xg-right-grid">\n </xg-right-grid>\n </xg-inner-controls>\n </xg-controls>')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),t}(),af={lang:{},langKeys:[],textKeys:[]};function sf(e,t){return Object.keys(t).forEach(function(n){var r,i=gu.typeOf(t[n]),o=gu.typeOf(e[n]);"Array"===i?("Array"!==o&&(e[n]=[]),(r=e[n]).push.apply(r,ru(t[n]))):"Object"===i?("Object"!==o&&(e[n]={}),sf(e[n],t[n])):e[n]=t[n]}),e}function lf(){Object.keys(af.lang.en).map(function(e){af.textKeys[e]=e})}function uf(e,t){var n=e.LANG;if(t||(t=af),t.lang){var r=e.TEXT||{};"zh"===n&&(n="zh-cn"),t.lang[n]?sf(t.lang[n],r):(t.langKeys.push(n),t.lang[n]=r),lf()}}uf({LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}});var cf={get textKeys(){return af.textKeys},get langKeys(){return af.langKeys},get lang(){var e={};return af.langKeys.map(function(t){e[t]=af.lang[t]}),af.lang["zh-cn"]&&(e.zh=af.lang["zh-cn"]||{}),e},extend:function(e,t){var n=[];if(t||(t=af),t.lang){n="Array"!==gu.typeOf(e)?Object.keys(e).map(function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}}):e;var r=t.lang;n.map(function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),r[e.LANG]?sf(r[e.LANG]||{},e.TEXT||{}):uf(e,t)}),lf()}},use:uf,init:function(e){var t,n={lang:{},langKeys:[],textKeys:{},pId:e};return sf(n.lang,af.lang),(t=n.langKeys).push.apply(t,ru(af.langKeys)),sf(n.textKeys,af.textKeys),n}},ff=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],df={},hf=null,pf=function(){Xl(t,lu.EventEmitter);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"add",value:function(e){e&&(df[e.playerId]=e,1===Object.keys(df).length&&this.setActive(e.playerId,!0))}},{key:"remove",value:function(e){e&&(e.isUserActive,delete df[e.playerId])}},{key:"_iterate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var n in df)if(Object.prototype.hasOwnProperty.call(df,n)){var r=df[n];if(t){if(e(r))break}else e(r)}}},{key:"forEach",value:function(e){this._iterate(e)}},{key:"find",value:function(e){var t=null;return this._iterate(function(n){var r=e(n);return r&&(t=n),r},!0),t}},{key:"findAll",value:function(e){var t=[];return this._iterate(function(n){e(n)&&t.push(n)}),t}},{key:"setActive",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(df[e])return t?this.forEach(function(t){e===t.playerId?(t.isUserActive=!0,t.isInstNext=!1):t.isUserActive=!1}):df[e].isUserActive=t,e}},{key:"getActiveId",value:function(){for(var e=Object.keys(df),t=0;t<e.length;t++){var n=df[e[t]];if(n&&n.isUserActive)return e[t]}return null}},{key:"setNext",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(df[e])return t?this.forEach(function(t){e===t.playerId?(t.isUserActive=!1,t.isInstNext=!0):t.isInstNext=!1}):df[e].isInstNext=t,e}}],[{key:"getInstance",value:function(){return hf||(hf=new t),hf}}]),t}(),gf=["play","pause","replay","retry"],vf=0,mf=0,yf=null,bf=function(){Xl(t,Ec);var e=tu(t);function t(n){var r;Gl(this,t);var i,o=gu.deepMerge(rf(),n);Yl(Ql(r=e.call(this,o)),"canPlayFunc",function(){if(r.config){var e=r.config,t=e.autoplay,n=e.defaultPlaybackRate;hu.logInfo("player","canPlayFunc, startTime",r.__startTime),r._seekToStartTime(),r.playbackRate=n,(t||r._useAutoplay)&&r.mediaPlay(),r.off(Bu,r.canPlayFunc),r.removeClass(nf.ENTER)}}),Yl(Ql(r),"onFullscreenChange",function(e,t){var n=function(){gu.setTimeout(Ql(r),function(){r.resize()},100)},i=gu.getFullScreenEl();r._fullActionFrom?r._fullActionFrom="":r.emit(pc,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:r.currentTime,duration:r.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var o=function(e,t,n){if(e){var r=e.getAttribute(n);return!(!r||r!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(i,r.playerId,Ac);if(t||i&&(i===r._fullscreenEl||o))n(),!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!0,r.changeFullStyle(r.root,i,nf.FULLSCREEN),r.emit(nc,!0,r._fullScreenOffset),r.cssfullscreen&&r.exitCssFullscreen();else if(r.fullscreen){n();var a=Ql(r),s=a._fullScreenOffset;if(a.config.needFullscreenScroll?(window.scrollTo(s.left,s.top),gu.setTimeout(Ql(r),function(){r.fullscreen=!1,r._fullScreenOffset=null},100)):(!r.config.closeFocusVideoFocus&&r.media.focus(),r.fullscreen=!1,r._fullScreenOffset=null),r.cssfullscreen)r.removeClass(nf.FULLSCREEN);else{var l=r._fullscreenEl;l||!r.root.contains(e.target)&&e.target!==r.root||(l=e.target),r.recoverFullStyle(r.root,l,nf.FULLSCREEN)}r._fullscreenEl=null,r.emit(nc,!1)}}),Yl(Ql(r),"_onWebkitbeginfullscreen",function(e){r._fullscreenEl=r.media,r.onFullscreenChange(e,!0)}),Yl(Ql(r),"_onWebkitendfullscreen",function(e){r.onFullscreenChange(e,!1)}),Nc(Ql(r),gf),r.config=o,r._pluginInfoId=gu.generateSessionId(),(i=Ql(r)).logInfo=hu.logInfo.bind(i),i.logWarn=hu.logWarn.bind(i),i.logError=hu.logError.bind(i);var a=r.constructor.defaultPreset;if(r.config.presets.length){var s=r.config.presets.indexOf("default");s>=0&&a&&(r.config.presets[s]=a)}else a&&r.config.presets.push(a);if(r.userTimer=null,r.waitTimer=null,r.handleSource=!0,r._state=1,r.isAd=!1,r.isError=!1,r._hasStart=!1,r.isSeeking=!1,r.isCanplay=!1,r._useAutoplay=!1,r.__startTime=-1,r.rotateDeg=0,r.isActive=!1,r.fullscreen=!1,r.cssfullscreen=!1,r.isRotateFullscreen=!1,r._fullscreenEl=null,r.timeSegments=[],r._cssfullscreenEl=null,r.curDefinition=null,r._orgCss="",r._fullScreenOffset=null,r._videoHeight=0,r._videoWidth=0,r.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},r.sizeInfo={width:0,height:0,left:0,top:0},r._accPlayed={t:0,acc:0,loopAcc:0},r._offsetInfo={currentTime:-1,duration:0},r.innerContainer=null,r.controls=null,r.topBar=null,r.root=null,r.__i18n=cf.init(r._pluginInfoId),wu.os.isAndroid&&wu.osVersion>0&&wu.osVersion<6&&(r.config.autoplay=!1),r.database=new kc,r.isUserActive=!1,r._onceSeekCanplay=null,r._isPauseBeforeSeek=0,r.innerStates={isActiveLocked:!1},r.instManager=yf,!r._initDOM())return console.error(new Error("can't find the dom which id is ".concat(r.config.id," or this.config.el does not exist"))),eu(r);var l=r.config,u=l.definition,c=void 0===u?{}:u;if(!l.url&&c.list&&c.list.length>0){var f=c.list.find(function(e){return e.definition&&e.definition===c.defaultDefinition});f||(c.defaultDefinition=c.list[0].definition,f=c.list[0]),r.config.url=f.url,r.curDefinition=f}return r._bindEvents(),r._registerPresets(),r._registerPlugins(),tf.onPluginsReady(Ql(r)),r.getInitDefinition(),r.setState(2),gu.setTimeout(Ql(r),function(){r.emit(Wu)},0),r.onReady&&r.onReady(),(r.config.videoInit||r.config.autoplay)&&(!r.hasStart||r.state<4)&&r.start(),r}return Kl(t,[{key:"_initDOM",value:function(){var e,t=this;if(this.root=this.config.id?document.getElementById(this.config.id):null,!this.root){var n=this.config.el;if(!n||1!==n.nodeType)return this.emit(Tu,new ku("use",this.config.vid,{line:32,handle:"Constructor",msg:"container id can't be empty"})),console.error("this.confg.id or this.config.el can't be empty"),!1;this.root=n}var r=function(e){for(var t=Object.keys(df),n=0;n<t.length;n++){var r=df[t[n]];if(r.root===e)return r}return null}(this.root);r&&(hu.logWarn("The is an Player instance already exists in this.root, destroy it and reinitialize"),r.destroy()),this.root.setAttribute(Ac,this.playerId),null===(e=yf)||void 0===e||e.add(this),tf.init(this),this._initBaseDoms();var i=this.constructor.XgVideoProxy;if(i&&this.mediaConfig.mediaType===i.mediaType){var o=this.innerContainer||this.root;this.detachVideoEvents(this.media);var a=new i(o,this.config,this.mediaConfig);this.attachVideoEvents(a),this.media=a}if(this.media.setAttribute(Ac,this.playerId),this.config.controls){var s=this.config.controls.root||null,l=tf.register(this,of,{root:s});this.controls=l}var u="mobile"===this.config.isMobileSimulateMode?"mobile":wu.device;if(this.addClass("".concat(nf.DEFAULT," ").concat(nf.INACTIVE," xgplayer-").concat(u," ").concat(this.config.controls?"":nf.NO_CONTROLS)),this.config.autoplay?this.addClass(nf.ENTER):this.addClass(nf.NO_START),this.config.fluid){var c=this.config,f=c.width,d=c.height;"number"==typeof f&&"number"==typeof d||(f=600,d=337.5);var h={width:"100%",height:"0","max-width":"100%","padding-top":"".concat(100*d/f,"%")};Object.keys(h).forEach(function(e){t.root.style[e]=h[e]})}else["width","height"].forEach(function(e){t.config[e]&&("number"!=typeof t.config[e]?t.root.style[e]=t.config[e]:t.root.style[e]="".concat(t.config[e],"px"))});var p=this.root.getBoundingClientRect(),g=p.width,v=p.height,m=p.left,y=p.top;return this.sizeInfo.width=g,this.sizeInfo.height=v,this.sizeInfo.left=m,this.sizeInfo.top=y,!0}},{key:"_initBaseDoms",value:function(){this.topBar=null,this.leftBar=null,this.rightBar=null,this.config.marginControls&&(this.innerContainer=gu.createDom("xg-video-container","",{"data-index":-1},"xg-video-container"),this.root.appendChild(this.innerContainer))}},{key:"_bindEvents",value:function(){var e=this;["focus","blur"].forEach(function(t){e.on(t,e["on"+t.charAt(0).toUpperCase()+t.slice(1)])}),Sc.forEach(function(t){document&&document.addEventListener(t,e.onFullscreenChange)}),wu.os.isIos&&(this.media.addEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.addEventListener("webkitendfullscreen",this._onWebkitendfullscreen)),this.once(Mu,this.resize),this.playFunc=function(){e.config.closeFocusVideoFocus||e.media.focus()},this.once(Su,this.playFunc)}},{key:"_unbindEvents",value:function(){var e=this;this.root.removeEventListener("mousemove",this.mousemoveFunc),Sc.forEach(function(t){document.removeEventListener(t,e.onFullscreenChange)}),this.playFunc&&this.off(Su,this.playFunc),this.off(Bu,this.canPlayFunc),this.media.removeEventListener("webkitbeginfullscreen",this._onWebkitbeginfullscreen),this.media.removeEventListener("webkitendfullscreen",this._onWebkitendfullscreen)}},{key:"_clearUserTimer",value:function(){this.userTimer&&(gu.clearTimeout(this,this.userTimer),this.userTimer=null)}},{key:"_startInit",value:function(e){var t=this;if(this.media&&(e&&""!==e&&("Array"!==gu.typeOf(e)||0!==e.length)||(e="",this.emit(Vu),hu.logWarn("config.url is null, please get url and run player._startInit(url)"),!this.config.nullUrlStart))){this.handleSource&&(this._detachSourceEvents(this.media),"Array"===gu.typeOf(e)&&e.length>0?this._attachSourceEvents(this.media,e):this.media.src&&this.media.src===e?e||this.media.removeAttribute("src"):this.media.src=e),"Number"===gu.typeOf(this.config.volume)&&(this.volume=this.config.volume);var n=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!n.contains(this.media)&&n.insertBefore(this.media,n.firstChild);var r=this.media.readyState;hu.logInfo("_startInit readyState",r),this.config.autoplay&&(!gu.isMSE(this.media)&&this.load(),(wu.os.isIpad||wu.os.isPhone)&&this.mediaPlay());var i=this.config.startTime;this.__startTime=i>0?i:-1,this.config.startTime=0,r>=2&&this.duration>0?this.canPlayFunc():this.on(Bu,this.canPlayFunc),(!this.hasStart||this.state<4)&&tf.afterInit(this),this.hasStart=!0,this.setState(4),gu.setTimeout(this,function(){t.emit(Ku)},0)}}},{key:"_registerPlugins",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var n=this.config.ignores||[],r=this.config.plugins||[],i=this.config.i18n||[];t&&cf.extend(i,this.__i18n);var o=n.join("||").toLowerCase().split("||"),a=this.plugins;r.forEach(function(n){try{var r=n.plugin?n.plugin.pluginName:n.pluginName;if(r&&o.indexOf(r.toLowerCase())>-1)return null;if(!t&&a[r.toLowerCase()])return;if(n.lazy&&n.loader){var i=tf.lazyRegister(e,n);return void(n.forceBeforeInit&&(i.then(function(){e._loadingPlugins.splice(e._loadingPlugins.indexOf(i),1)}).catch(function(t){hu.logError("_registerPlugins:loadingPlugin",t),e._loadingPlugins.splice(e._loadingPlugins.indexOf(i),1)}),e._loadingPlugins.push(i)))}return e.registerPlugin(n)}catch(s){hu.logError("_registerPlugins:",s)}})}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach(function(t){!function(e,t){var n,r,i=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),o=i.plugins,a=void 0===o?[]:o,s=i.ignores,l=void 0===s?[]:s,u=i.icons,c=void 0===u?{}:u,f=i.i18n,d=void 0===f?[]:f;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(n=e.config.plugins).push.apply(n,ru(a)),(r=e.config.ignores).push.apply(r,ru(l)),Object.keys(c).map(function(t){e.config.icons[t]||(e.config.icons[t]=c[t])});var h=e.config.i18n||[];d.push.apply(d,ru(h)),e.config.i18n=d}(e,t)})}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case Kc.ROOT_RIGHT:this.rightBar||(this.rightBar=gu.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case Kc.ROOT_LEFT:this.leftBar||(this.leftBar=gu.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case Kc.ROOT_TOP:this.topBar||(this.topBar=gu.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&gu.addClass(this.topBar,nf.TOP_BAR_AUTOHIDE)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var n=tf.formatPluginInfo(e,t),r=n.PLUFGIN,i=n.options,o=this.config.plugins;!tf.checkPluginIfExits(r.pluginName,o)&&o.push(r);var a=tf.getRootByConfig(r.pluginName,this.config);a.root&&(i.root=a.root),a.position&&(i.position=a.position);var s,l=i.position?i.position:i.config&&i.config.position||r.defaultConfig&&r.defaultConfig.position;return!i.root&&"string"==typeof l&&l.indexOf("controls")>-1?null===(s=this.controls)||void 0===s?void 0:s.registerPlugin(r,i,r.pluginName):(i.root||(i.root=this._getRootByPosition(l)),tf.register(this,r,i))}},{key:"deregister",value:function(e){"string"==typeof e?tf.unRegister(this,e):e instanceof Wc&&tf.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.deregister(e),t&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var t;if("string"==typeof e?t=e:e instanceof Wc&&(t=e.pluginName),t)for(var n=this.config.plugins.length-1;n>-1;n--)if(this.config.plugins[n].pluginName.toLowerCase()===t.toLowerCase()){this.config.plugins.splice(n,1);break}}},{key:"plugins",get:function(){return tf.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=tf.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(gu.hasClass(this.root,e)||gu.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&gu.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return gu.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!(this.state>3))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(3),this._registerPlugins(!1),tf.beforeInit(this).then(function(){if(t.config){e||(e=t.url||t.config.url);var n=t._preProcessUrl(e);return t._startInit(n.url)}}).catch(function(e){throw e.fileName="player",e.lineNumber="236",hu.logError("start:beforeInit:",e),e})}},{key:"switchURL",value:function(e,t){var n=this,r=e;"Object"===gu.typeOf(e)&&(r=e.url),r=this._preProcessUrl(r).url;var i=this.currentTime;this.__startTime=i;var o=this.paused&&!this.isError;return this.src=r,new Promise(function(e,t){var i=function(e){n.off("timeupdate",a),n.off("canplay",a),t(e)},a=function(){n._seekToStartTime(),o&&n.pause(),n.off("error",i),e(!0)};n.once("error",i),r?(wu.os.isAndroid?n.once("timeupdate",a):n.once("canplay",a),n.play()):n.errorHandler("error",{code:6,message:"empty_src"})})}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state<4)return this.removeClass(nf.NO_START),this.addClass(nf.ENTER),this.start(),void(this._useAutoplay=!0);this.state<6&&(this.removeClass(nf.NO_START),!this.isCanplay&&this.addClass(nf.ENTER));var n=nu(Jl(t.prototype),"play",this).call(this);return void 0!==n&&n&&n.then?n.then(function(){e.removeClass(nf.NOT_ALLOW_AUTOPLAY),e.addClass(nf.PLAYING),e.state<6&&(hu.logInfo(">>>>playPromise.then"),e.setState(6),e.emit(Gu))}).catch(function(t){if(hu.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(nf.ENTER);"NotAllowedError"===t.name&&(e._errorTimer=gu.setTimeout(e,function(){e._errorTimer=null,e.emit(qu),e.addClass(nf.NOT_ALLOW_AUTOPLAY),e.removeClass(nf.ENTER),e.pause(),e.setState(5)},0))}):(hu.logWarn("video.play not return promise"),this.state<6&&(this.setState(6),this.removeClass(nf.NOT_ALLOW_AUTOPLAY),this.removeClass(nf.NO_START),this.removeClass(nf.ENTER),this.addClass(nf.PLAYING),this.emit(Gu))),n}},{key:"mediaPause",value:function(){nu(Jl(t.prototype),"pause",this).call(this)}},{key:"videoPause",value:function(){nu(Jl(t.prototype),"pause",this).call(this)}},{key:"play",value:function(){var e=this;return this.removeClass(nf.PAUSED),Rc(this,"play",function(){return e.mediaPlay()})}},{key:"pause",value:function(){var e=this;Rc(this,"pause",function(){nu(Jl(t.prototype),"pause",e).call(e)})}},{key:"seek",value:function(e,t){var n=this;if(this.media&&!Number.isNaN(Number(e))&&this.hasStart){var r=this.config,i=r.isSeekedPlay,o=r.seekedStatus,a=t||(i?"play":o);e=e<0?0:e>this.duration?parseInt(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(Pu,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(n.removeClass(nf.ENTER),n.isSeeking=!1,a){case"play":n.play();break;case"pause":n.pause();break;default:n._isPauseBeforeSeek>1||n.paused?n.pause():n.play()}n._isPauseBeforeSeek=0,n._onceSeekCanplay=null},this.once(Pu,this._onceSeekCanplay),this.state<6?(this.removeClass(nf.NO_START),this.currentTime=e,this.play()):this.currentTime=e}}},{key:"getInitDefinition",value:function(){var e=this,t=this.config,n=t.definition;!t.url&&n&&n.list&&n.list.length>0&&n.defaultDefinition&&n.list.map(function(t){t.definition===n.defaultDefinition&&(e.config.url=t.url,e.curDefinition=t)})}},{key:"changeDefinition",value:function(e,t){var n=this,r=this.config.definition;if(Array.isArray(null==r?void 0:r.list)&&r.list.forEach(function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)}),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=parseInt(e.bitrate,10)||0),this.emit(oc,{from:t,to:e}),this.hasStart){var i=this.switchURL(e.url,Wl({seamless:!1!==r.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));i&&i.then?i.then(function(){n.emit(ac,{from:t,to:e})}):this.emit(ac,{from:t,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(Mu,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[nf.NOT_ALLOW_AUTOPLAY,nf.PLAYING,nf.NO_START,nf.PAUSED,nf.REPLAY,nf.ENTER,nf.ENDED,nf.ERROR,nf.LOADING];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach(function(t){e.removeClass(t)}),this.addClass(nf.NO_START),this.emit(gc)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(t.map(function(t){e.deregister(t)}),n)){var r=rf();Object.keys(this.config).keys(function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=r[t])})}}},{key:"destroy",value:function(){var e,n=this,r=this.innerContainer,i=this.root,o=this.media;if(i&&o){if(this.hasStart=!1,this._useAutoplay=!1,i.removeAttribute(Ac),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),gu.clearAllTimers(this),this.emit(Xu),null===(e=yf)||void 0===e||e.remove(this),tf.destroy(this),Mc(this),nu(Jl(t.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),r)for(var a=r.children,s=0;s<a.length;s++)r.removeChild(a[s]);!r&&o instanceof window.Node&&i.contains(o)&&i.removeChild(o),["topBar","leftBar","rightBar","innerContainer"].map(function(e){n[e]&&i.removeChild(n[e]),n[e]=null});var l=i.className.split(" ");l.length>0?i.className=l.filter(function(e){return e.indexOf("xgplayer")<0}).join(" "):i.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach(function(e){n[e]=!1})}}},{key:"replay",value:function(){var e=this;this.removeClass(nf.ENDED),this.currentTime=0,this.isSeeking=!1,Rc(this,"replay",function(){e.once(Pu,function(){var t=e.mediaPlay();t&&t.catch&&t.catch(function(e){console.log(e)})}),e.emit(Yu),e.onPlay()})}},{key:"retry",value:function(){var e=this;this.removeClass(nf.ERROR),this.addClass(nf.LOADING),Rc(this,"retry",function(){var t=e.currentTime,n=e.config.url,r=gu.isMSE(e.media)?{url:n}:e._preProcessUrl(n);e.src=r.url,!e.config.isLive&&(e.currentTime=t),e.once(Bu,function(){e.mediaPlay()})})}},{key:"changeFullStyle",value:function(e,t,n,r){e&&(r||(r=nf.PARENT_FULLSCREEN),this._orgCss||(this._orgCss=gu.filterStyleFromText(e)),gu.addClass(e,n),t&&t!==e&&!this._orgPCss&&(this._orgPCss=gu.filterStyleFromText(t),gu.addClass(t,r),t.setAttribute(Ac,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,n,r){r||(r=nf.PARENT_FULLSCREEN),this._orgCss&&(gu.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),gu.removeClass(e,n),t&&t!==e&&this._orgPCss&&(gu.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",gu.removeClass(t,r),t.removeAttribute(Ac))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,n=this.media;if("video"!==e&&"media"!==e||(e=this[e]),e||(e=t),this._fullScreenOffset={top:gu.scrollTop(),left:gu.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",gu.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Promise.resolve();try{for(var r=0;r<_c.length;r++){var i=_c[r];if(e[i]){var o="webkitRequestFullscreen"===i?e.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT):e[i]();return o&&o.then?o:Promise.resolve()}}return n.fullscreenEnabled||n.webkitSupportsFullscreen?(n.webkitEnterFullscreen(),Promise.resolve()):Promise.reject(new Error("call getFullscreen fail"))}catch(a){return Promise.reject(new Error("call getFullscreen fail"))}}},{key:"exitFullscreen",value:function(e){if(this.isRotateFullscreen&&this.exitRotateFullscreen(),this._fullscreenEl||gu.getFullScreenEl()){this.root;var t=this.media;this._fullActionFrom="exit";try{for(var n=0;n<Dc.length;n++){var r=Dc[n];if(document[r]){var i=document[r]();return i&&i.then?i:Promise.resolve()}}return t&&t.webkitSupportsFullscreen?(t.webkitExitFullScreen(),Promise.resolve()):Promise.reject(new Error("call exitFullscreen fail"))}catch(o){return Promise.reject(new Error("call exitFullscreen fail"))}}}},{key:"getCssFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var t=e?"".concat(nf.INNER_FULLSCREEN," ").concat(nf.CSS_FULLSCREEN):nf.CSS_FULLSCREEN;this.changeFullStyle(this.root,e,t);var n=this.config.fullscreen,r=void 0===n?{}:n;(!0===r.useCssFullscreen||"function"==typeof r.useCssFullscreen&&r.useCssFullscreen())&&(this.fullscreen=!0,this.emit(nc,!0)),this._cssfullscreenEl=e,this.cssfullscreen=!0,this.emit(rc,!0)}},{key:"exitCssFullscreen",value:function(){var e=this._cssfullscreenEl?"".concat(nf.INNER_FULLSCREEN," ").concat(nf.CSS_FULLSCREEN):nf.CSS_FULLSCREEN;if(this.fullscreen){var t=this.config.fullscreen,n=void 0===t?{}:t;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,e),this.fullscreen=!1,this.emit(nc,!1)):this.removeClass(e)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,e);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(rc,!1)}},{key:"getRotateFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(e);var t=e?"".concat(nf.INNER_FULLSCREEN," ").concat(nf.ROTATE_FULLSCREEN):nf.ROTATE_FULLSCREEN;this._fullscreenEl=e||this.root,this.changeFullStyle(this.root,e,t,nf.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(nc,!0)}},{key:"exitRotateFullscreen",value:function(e){var t=this._fullscreenEl!==this.root?"".concat(nf.INNER_FULLSCREEN," ").concat(nf.ROTATE_FULLSCREEN):nf.ROTATE_FULLSCREEN;this.recoverFullStyle(this.root,this._fullscreenEl,t,nf.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(nc,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){90===window.orientation||-90===window.orientation?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};this.isActive?this.onFocus(e):this.emit(Uu,Wl({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignorePaused:!1};this.isActive?(this._clearUserTimer(),this.emit($u,Wl({paused:this.paused,ended:this.ended},e))):this.onBlur(e)}},{key:"onFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!0,delay:3e3},n=this.innerStates;if(this.isActive=!0,this.removeClass(nf.INACTIVE),this._clearUserTimer(),void 0!==t.isLock&&(n.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||n.isActiveLocked)this._clearUserTimer();else{var r=t&&t.delay?t.delay:this.config.inactive;this.userTimer=gu.setTimeout(this,function(){e.userTimer=null,e.blur()},r)}}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(!this.innerStates.isActiveLocked){var n=this.config.closePauseVideoFocus;this.isActive=!1,(t||n||!this.paused&&!this.ended)&&this.addClass(nf.INACTIVE)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(nf.ENTER),this.removeClass(nf.ERROR),this.removeClass(nf.LOADING),this.isCanplay=!0,this.waitTimer&&gu.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){var e=this;this.isError=!1,this.isSeeking=!1,this.__startTime>0&&(this.duration>0?this._seekToStartTime():this.once(Lu,function(){e._seekToStartTime()}))}},{key:"onLoadstart",value:function(){this.removeClass(nf.ERROR),this.isCanplay=!1}},{key:"onPlay",value:function(){7===this.state&&this.setState(6),this.removeClass(nf.PAUSED),this.ended&&this.removeClass(nf.ENDED),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(nf.PAUSED),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this._clearUserTimer(),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(nf.ENDED),this.setState(7)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(nf.NOT_ALLOW_AUTOPLAY),this.removeClass(nf.NO_START),this.removeClass(nf.ENTER),this.removeClass(nf.LOADING),this.addClass(nf.ERROR)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(nf.SEEKING)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&gu.clearTimeout(this,this.waitTimer),this.removeClass(nf.LOADING),this.removeClass(nf.SEEKING)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&gu.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=gu.setTimeout(this,function(){e.addClass(nf.LOADING),e.emit(tc),gu.clearTimeout(e,e.waitTimer),e.waitTimer=null},this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[nf.NO_START,nf.PAUSED,nf.ENDED,nf.ERROR,nf.REPLAY,nf.LOADING].forEach(function(t){e.removeClass(t)}),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(nf.LOADING))&&this.media.readyState>2&&(this.removeClass(nf.LOADING),gu.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&5===this.state&&this.duration&&(this.setState(6),this.emit(Gu)),this._accPlayed.t||this.paused||this.ended||(this._accPlayed.t=(new Date).getTime())}},{key:"onVolumechange",value:function(){"Number"===gu.typeOf(this.config.volume)&&(this.config.volume=this.volume)}},{key:"onRatechange",value:function(){this.config.defaultPlaybackRate=this.playbackRate}},{key:"emitUserAction",value:function(e,t,n){if(this.media&&t&&e){var r="String"===gu.typeOf(e)?e:e.type||"";n.props&&"Array"!==gu.typeOf(n.props)&&(n.props=[n.props]),this.emit(pc,Wl({eventType:r,action:t,currentTime:this.currentTime,duration:this.duration,ended:this.ended,event:e},n))}}},{key:"updateAcc",value:function(e){if(this._accPlayed.t){var t=(new Date).getTime()-this._accPlayed.t;this._accPlayed.acc+=t,this._accPlayed.t=0,("ended"===e||this.ended)&&(this._accPlayed.loopAcc=this._accPlayed.acc)}}},{key:"checkBuffer",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{startDiff:0,endDiff:0})||{},n=t.startDiff,r=void 0===n?0:n,i=t.endDiff,o=void 0===i?0:i,a=this.media.buffered;if(!a||0===a.length||!this.duration)return!0;for(var s=e||this.media.currentTime||.2,l=a.length,u=0;u<l;u++)if(a.start(u)+r<=s&&a.end(u)-o>s)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.vy,n=e.vx,r=e.h,i=e.w,o=this.videoPos.rotate;if(!(o<0&&r<0&&i<0)){var a=this.videoPos._pi;if(!a&&this.media.videoHeight&&(a=this.media.videoWidth/this.media.videoHeight*100),a){this.videoPos.pi=a;var s={rotate:o=o<0?0:o},l=0,u=0,c=1,f=Math.abs(o/90),d=this.root,h=this.innerContainer,p=d.offsetWidth,g=h?h.offsetHeight:d.offsetHeight,v=g,m=p;if(f%2==0)c=r>0?100/r:i>0?100/i:1,s.scale=c,l=t>0?(100-r)/2-t:0,s.y=2===f?0-l:l,u=n>0?(100-i)/2-n:0,s.x=2===f?0-u:u,this.media.style.width="".concat(m,"px"),this.media.style.height="".concat(v,"px");else if(f%2==1){v=p;var y=g-p;u=-y/2/(m=g)*100,s.x=3===f?u+t/2:u-t/2,l=y/2/v*100,s.y=3===f?l+n/2:l-n/2,s.scale=c,this.media.style.width="".concat(m,"px"),this.media.style.height="".concat(v,"px")}var b=gu.getTransformStyle(s,this.media.style.transform||this.media.style.webkitTransform);this.media.style.transform=b,this.media.style.webkitTransform=b}}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t=this;e&&Object.keys(e).map(function(n){if("plugins"!==n){t.config[n]=e[n];var r=t.plugins[n.toLowerCase()];r&&"Function"===gu.typeOf(r.setConfig)&&r.setConfig(e[n])}})}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,Rc(this,"playnext",function(){t.start(),t.emit(fc,e)})}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.root.getBoundingClientRect();this.sizeInfo.width=t.width,this.sizeInfo.height=t.height,this.sizeInfo.left=t.left,this.sizeInfo.top=t.top;var n=this.media,r=n.videoWidth,i=n.videoHeight,o=this.config,a=o.fitVideoSize,s=o.videoFillMode;if("fill"!==s&&"cover"!==s&&"contain"!==s||this.setAttribute("data-xgfill",s),i&&r){this._videoHeight=i,this._videoWidth=r;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,u=t.width,c=t.height-l,f=parseInt(r/i*1e3,10),d=parseInt(u/c*1e3,10),h=u,p=c,g={};"auto"===a&&d>f||"fixWidth"===a?(p=u/f*1e3,this.config.fluid?g.paddingTop="".concat(100*p/h,"%"):g.height="".concat(p+l,"px")):("auto"===a&&d<f||"fixHeight"===a)&&(h=f*c/1e3,g.width="".concat(h,"px")),this.fullscreen||this.cssfullscreen||Object.keys(g).forEach(function(t){e.root.style[t]=g[t]}),("fillHeight"===s&&d<f||"fillWidth"===s&&d>f)&&this.setAttribute("data-xgfill","cover");var v={videoScale:f,vWidth:h,vHeight:p,cWidth:h,cHeight:p+l};this.resizePosition(),this.emit(sc,v)}}}},{key:"updateObjectPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(e,t):this.media.style.objectPosition="".concat(100*e,"% ").concat(100*t,"%")}},{key:"setState",value:function(e){hu.logInfo("setState","state from:".concat(ff[this.state]," to:").concat(ff[e])),this._state=e}},{key:"_preProcessUrl",value:function(e,t){var n=this.config,r=n.preProcessUrl,i=n.preProcessUrlOptions,o=Object.assign({},i,t);return gu.isBlob(e)||"function"!=typeof r?{url:e}:r(e,o)}},{key:"_seekToStartTime",value:function(){this.__startTime>0&&this.duration>0&&(this.currentTime=this.__startTime>this.duration?this.duration:this.__startTime,this.__startTime=-1)}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){"boolean"==typeof e&&(this._hasStart=e,!1===e&&this.setState(2),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return 6===this._state||7===this._state},set:function(e){e?this.setState(6):this._state>=6&&this.setState(4)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,n=this.config.definition,r=null,i=null;n.list=e,this.emit("resourceReady",e),e.forEach(function(e){var o;(null===(o=t.curDefinition)||void 0===o?void 0:o.definition)===e.definition&&(r=e),n.defaultDefinition===e.definition&&(i=e)}),!i&&e.length>0&&(i=e[0]),r?this.changeDefinition(r):i&&this.changeDefinition(i)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=parseInt(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){0!==cf.langKeys.filter(function(t){return t===e}).length||"zh"===e?(this.config.lang=e,tf.setLang(e,this)):console.error("Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [").concat(cf.langKeys.join(),"] "))}},{key:"i18n",get:function(){var e=this.config.lang;return"zh"===e&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return xu}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return nu(Jl(t.prototype),"readyState",this)}},{key:"error",get:function(){var e=nu(Jl(t.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return nu(Jl(t.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,n=e.t;return n?(new Date).getTime()-n+t:t}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){(e=gu.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return mf},set:function(e){mf=e}},{key:"realTimeSpeed",get:function(){return vf},set:function(e){vf=e}},{key:"offsetCurrentTime",get:function(){return this._offsetInfo.currentTime||0},set:function(e){this._offsetInfo.currentTime=e}},{key:"offsetDuration",get:function(){return this._offsetInfo.duration||0},set:function(e){this._offsetInfo.duration=e||0}},{key:"hook",value:function(e,t){return Oc.call.apply(Oc,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(e,t){return Ic.call.apply(Ic,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(e,t){return Fc.call.apply(Fc,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"usePluginHooks",value:function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return Bc.call.apply(Bc,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removePluginHooks",value:function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return Lc.call.apply(Lc,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"setUserActive",value:function(e,t){var n;"boolean"==typeof t&&t!==this.muted&&(this.addInnerOP("volumechange"),gu.typeOf(t)===Boolean&&(this.muted=t)),null===(n=yf)||void 0===n||n.setActive(this.playerId,e)}}],[{key:"debugger",get:function(){return hu.config.debug},set:function(e){hu.config.debug=e}},{key:"instManager",get:function(){return yf},set:function(e){yf=e}},{key:"getCurrentUserActivePlayerId",value:function(){var e;return null===(e=yf)||void 0===e?void 0:e.getActiveId()}},{key:"setCurrentUserActive",value:function(e,t){var n;null===(n=yf)||void 0===n||n.setActive(e,t)}},{key:"isHevcSupported",value:function(){return wu.isHevcSupported()}},{key:"probeConfigSupported",value:function(e){return wu.probeConfigSupported(e)}},{key:"install",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]||(t.plugins[e]=n)}},{key:"use",value:function(e,n){t.plugins||(t.plugins={}),t.plugins[e]=n}}]),t}();function wf(){return(new Date).getTime()}Yl(bf,"defaultPreset",null),Yl(bf,"XgVideoProxy",null),bf.instManager=pf.getInstance();var xf="waitingStart",Cf=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"_onTimeupdate",function(){n._state.isTimeUpdate=!0,n._state.autoplayStart&&(hu.logInfo("[xgLogger]".concat(n.player.playerId," _onTimeupdate")),n._sendFF("onTimeupdate"))}),Yl(Ql(n),"_onAutoplayStart",function(){hu.logInfo("[xgLogger]".concat(n.player.playerId," _onAutoplayStart")),n._state.autoplayStart=!0,n.vt&&n._sendFF("onAutoplayStart")}),Yl(Ql(n),"_onReset",function(){n._state={autoplayStart:!1,isFFLoading:!1,isTimeUpdate:!1,isFFSend:!1,isLs:!1},n.vt=0,n.pt=0,n.fvt=0,n.newPointTime=wf(),n.loadedCostTime=0,n.startCostTime=0,n._isSeeking=!1,n.seekingStart=0,n.waitingStart=0,n.fixedWaitingStart=0,n._isWaiting=!1,n._waitTimer&&gu.clearTimeout(Ql(n),n._waitTimer),n._waittTimer&&gu.clearTimeout(Ql(n),n._waittTimer),n._waitTimer=null,n._waittTimer=null,n._waitType=0}),Yl(Ql(n),"_onSeeking",function(){n.seekingStart||(n.suspendWaitingStatus("seek"),n.seekingStart=wf(),n.emitLog("seekStart",{start:wf()}))}),Yl(Ql(n),"_onSeeked",function(){n.suspendSeekingStatus("seeked")}),Yl(Ql(n),"_onWaitingLoadStart",function(){n._isWaiting||n.vt||(n._isWaiting=!0,n.waitingStart=wf(),n.fixedWaitingStart=wf(),n._waitType=1,n.emitLog(xf,{fixedStart:n.fixedWaitingStart,start:n.waitingStart,type:1,endType:"loadstart"}))}),Yl(Ql(n),"_onWaiting",function(){!n._isWaiting&&n.vt&&(n._isWaiting=!0,n.vt?n.seekingStart?n._waitType=2:n._waitType=0:n._waitType=1,n.fixedWaitingStart=wf(),n._waitTimer=gu.setTimeout(Ql(n),function(){n._isWaiting&&(n.waitingStart=wf(),gu.clearTimeout(Ql(n),n._waitTimer),n._waitTimer=null,n._startWaitTimeout(),n.emitLog(xf,{fixedStart:n.fixedWaitingStart,start:n.waitingStart,type:n._waitType,endType:2===n._waitType?"seek":"playing"}))},200))}),Yl(Ql(n),"_onError",function(){n.suspendSeekingStatus("error"),n.suspendWaitingStatus("error")}),Yl(Ql(n),"_onPlaying",function(){n._isWaiting&&n.suspendWaitingStatus("playing")}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this;this._onReset(),this._waitType="firstFrame",this._initOnceEvents(),this.newPointTime=wf(),this.loadedCostTime=0,this.startCostTime=0,this.on(Hu,function(){var t=e._state,n=t.autoplayStart,r=t.isFFSend;e.startCostTime=wf()-e.newPointTime,hu.logInfo("[xgLogger]".concat(e.player.playerId," LOAD_START"),"autoplayStart:".concat(n," isFFSend:").concat(r," startCostTime:").concat(e.startCostTime," newPointTime").concat(e.newPointTime)),r||(!t.isLs&&e.emitLog("loadstart",{}),t.isLs=!0,t.isTimeUpdate=!1,t.isFFLoading=!0,e.pt=wf(),e.vt=0,e.fvt=0,e._initOnceEvents(),e._onWaitingLoadStart())}),this.on(Mu,function(){e.vt=wf(),e.fvt=e.vt-e.pt,e.loadedCostTime=e.vt-e.newPointTime;var t=e._state,n=t.isTimeUpdate,r=t.isFFSend,i=t.autoplayStart;hu.logInfo("[xgLogger]".concat(e.player.playerId," LOADED_DATA"),"fvt:".concat(e.fvt," isTimeUpdate:").concat(e._state.isTimeUpdate," loadedCostTime:").concat(e.loadedCostTime)),(n||i)&&e._sendFF("loadedData"),r||e.emitLog("loadeddata",{}),e.suspendWaitingStatus("loadeddata")}),this.on(Ou,this._onSeeking),this.on(Pu,this._onSeeked),this.on(Xu,function(){e.endState("destroy")}),this.on(Ju,function(){e.endState("urlChange"),hu.logInfo("[xgLogger]".concat(e.player.playerId," URL_CHANGE")),e._state.isFFSend&&e._onReset()}),this.on([_u,Bu],this._onPlaying),this.on(Fu,this._onWaiting),this.on(Tu,this._onError),this.on(gc,function(){hu.logInfo("[xgLogger]".concat(e.player.playerId," RESET")),e.endState("reset"),e._initOnceEvents(),e._onReset()})}},{key:"_initOnceEvents",value:function(){this.off(Gu,this._onAutoplayStart),this.off(Iu,this._onTimeupdate),this.once(Gu,this._onAutoplayStart),this.once(Iu,this._onTimeupdate)}},{key:"_sendFF",value:function(e){this.s=wf();var t=this._state,n=t.isFFLoading,r=t.isFFSend;hu.logInfo("[xgLogger]".concat(this.player.playerId," _sendFF"),"".concat(e," fvt:").concat(this.fvt," isFFLoading:").concat(n," !isFFSend:").concat(!r)),this.vt>0&&n&&!r&&(hu.logInfo("[xgLogger]".concat(this.player.playerId," emitLog_firstFrame"),e),this._state.isFFLoading=!1,this._state.isFFSend=!0,this.emitLog("firstFrame",{fvt:this.fvt,costTime:this.fvt,vt:this.vt,startCostTime:this.startCostTime,loadedCostTime:this.loadedCostTime}))}},{key:"_startWaitTimeout",value:function(){var e=this;this._waittTimer&&gu.clearTimeout(this,this._waittTimer),this._waittTimer=gu.setTimeout(this,function(){e.suspendWaitingStatus("timeout"),gu.clearTimeout(e,e._waittTimer),e._waittTimer=null},this.config.waitTimeout)}},{key:"endState",value:function(e){this.suspendWaitingStatus(e),this.suspendSeekingStatus(e)}},{key:"suspendSeekingStatus",value:function(e){if(this.seekingStart){var t=wf(),n=t-this.seekingStart;this.seekingStart=0,this.emitLog("seekEnd",{end:t,costTime:n,endType:e})}}},{key:"suspendWaitingStatus",value:function(e){if(this._waitTimer&&(gu.clearTimeout(this,this._waitTimer),this._waitTimer=null),this._waittTimer&&(gu.clearTimeout(this,this._waittTimer),this._waittTimer=null),this._isWaiting=!1,this.waitingStart){var t=wf(),n=t-this.waitingStart,r=t-this.fixedWaitingStart,i=this.config.waitTimeout;this._isWaiting=!1,this.waitingStart=0,this.fixedWaitingStart=0,this.emitLog("waitingEnd",{fixedCostTime:r>i?i:r,costTime:n>i?i:n,type:"loadeddata"===e?1:this._waitType,endType:2===this._waitType?"seek":e})}}},{key:"emitLog",value:function(e,t){var n=this.player;this.emit(hc,Wl({t:wf(),host:gu.getHostFromUrl(n.currentSrc),vtype:n.vtype,eventType:e,currentTime:this.player.currentTime,readyState:n.video.readyState,networkState:n.video.networkState},t))}}],[{key:"pluginName",get:function(){return"xgLogger"}},{key:"defaultConfig",get:function(){return{waitTimeout:1e4}}}]),t}();function Ef(){return(new DOMParser).parseFromString('<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78" width="78" height="78">\n <path fill="#fff" transform="translate(20, 20)" d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var kf=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"registerIcons",value:function(){return{replay:Ef}}},{key:"afterCreate",value:function(){var e=this;Zc.insert(this.icons.replay,this.root,0),this.__handleReplay=this.hook("replayClick",function(){e.player.replay()},{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(".xgplayer-replay",["click","touchend"],this.__handleReplay),this.on(Du,function(){if(e.playerConfig.loop||gu.addClass(e.player.root,"replay"),!e.config.disable){e.show();var t=e.root.querySelector("path");if(t){var n=window.getComputedStyle(t).getPropertyValue("transform");if("string"==typeof n&&n.indexOf("none")>-1)return null;t.setAttribute("transform",n)}}}),this.on(Su,function(){e.hide()})}},{key:"handleReplay",value:function(e){e.preventDefault(),e.stopPropagation(),this.player.replay(),gu.removeClass(this.player.root,"replay")}},{key:"show",value:function(e){this.config.disable||(this.root.style.display="flex")}},{key:"enable",value:function(){this.config.disable=!1}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){this.unbind(".xgplayer-replay",["click","touchend"],this.__handleReplay)}},{key:"render",value:function(){return'<xg-replay class="xgplayer-replay">\n <xg-replay-txt class="xgplayer-replay-txt" lang-key="'.concat(this.i18nKeys.REPLAY,'">').concat(this.i18n.REPLAY,"</xg-replay-txt>\n </xg-replay>")}}],[{key:"pluginName",get:function(){return"replay"}},{key:"defaultConfig",get:function(){return{disable:!1}}}]),t}(),Sf=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){gu.addClass(this.root,"hide")}},{key:"show",value:function(e){gu.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){"string"==typeof e.player.config.poster&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(Du,function(){e.isEndedShow&&gu.removeClass(e.root,"hide")}),this.config.hideCanplay?(this.once(Iu,function(){e.onTimeUpdate()}),this.on(Ju,function(){gu.removeClass(e.root,"hide"),gu.addClass(e.root,"xg-showplay"),e.once(Iu,function(){e.onTimeUpdate()})})):this.on(Su,function(){gu.addClass(e.root,"hide")})}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]});var n=this.config.poster;this.update(n)}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?gu.removeClass(this.root,"xg-showplay"):this.once(Iu,function(){e.onTimeUpdate()})}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"getBgSize",value:function(e){var t="";switch(e){case"cover":t="cover";break;case"contain":t="contain";break;case"fixHeight":t="auto 100%";break;default:t=""}return t?"background-size: ".concat(t,";"):""}},{key:"render",value:function(){var e=this.config,t=e.poster,n=e.hideCanplay,r=e.fillMode,i=e.notHidden,o=this.getBgSize(r),a=t?"background-image:url(".concat(t,");").concat(o):o;return'<xg-poster class="xgplayer-poster '.concat(i?"xg-not-hidden":n?"xg-showplay":"",'" style="').concat(a,'">\n </xg-poster>')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,notHidden:!1,poster:"",fillMode:"fixWidth"}}}]),t}();function _f(){return(new DOMParser).parseFromString('<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n',"image/svg+xml").firstChild}function Df(){return(new DOMParser).parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Af={};function Tf(e){e?window.clearTimeout(e):Object.keys(Af).map(function(e){window.clearTimeout(Af[e].id),delete Af[e]})}var Of=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"onPlayerReset",function(){r.autoPlayStart=!1;var e="auto"===r.config.mode?"auto-hide":"hide";r.setAttr("data-state","play"),gu.removeClass(r.root,e),r.show()}),Yl(Ql(r),"onAutoplayStart",function(){if(!r.autoPlayStart){var e="auto"===r.config.mode?"auto-hide":"hide";gu.addClass(r.root,e),r.autoPlayStart=!0,r.toggleTo("play")}}),r.autoPlayStart=!1,r}return Kl(t,[{key:"afterCreate",value:function(){var e=this.playerConfig;this.initIcons(),this.listenEvents(),this.bindClickEvents(),e.autoplay||this.show()}},{key:"listenEvents",value:function(){var e=this,t=this.player,n=this.playerConfig;this.once(Wu,function(){n&&(n.lang&&"en"===n.lang?gu.addClass(t.root,"lang-is-en"):"jp"===n.lang&&gu.addClass(t.root,"lang-is-jp"))}),this.on(Gu,this.onAutoplayStart),this.on(qu,function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),gu.removeClass(e.root,t),e.show()}),this.on(Su,function(){e.toggleTo("play")}),this.on(Au,function(){e.toggleTo("pause")}),this.on(gc,function(){e.onPlayerReset()})}},{key:"bindClickEvents",value:function(){var e=this;this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(t){t.cancelable&&t.preventDefault(),t.stopPropagation();var n=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:n,to:!n})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:_f,class:"xg-icon-play"},startPause:{icon:Df,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){gu.addClass(this.root,"hide")}},{key:"show",value:function(e){gu.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){gu.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){gu.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;this._animateId=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return Af[e]&&window.clearTimeout(Af[e].id),Af[e]={},n.start&&n.start(),Af[e].id=window.setTimeout(function(){n.end&&n.end(),window.clearTimeout(Af[e].id),delete Af[e]},t),Af[e].id}("pauseplay",400,{start:function(){gu.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){gu.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){gu.removeClass(this.root,"interact"),Tf(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state<2||(this.player.paused||6!==t.state?t.play():t.pause())}},{key:"onPlayPause",value:function(e){this.toggleTo(e)}},{key:"toggleTo",value:function(e){var t=this.config,n=this.player;if(n&&!(n.state<6)&&this.autoPlayStart){if("show"===t.mode)return this.switchStatus(),void this.show();if("auto"!==t.mode){if(t.isShowPause&&n.paused&&!n.ended||t.isShowEnd&&n.ended)return this.switchStatus(),this.show(),void this.endAnimate();if(t.disableAnimate)return this.switchStatus(),void this.hide();if("play"===e)this.autoPlayStart?this.animate():this.hide();else{if(!this.autoPlayStart||n.ended)return;this.animate()}}else this.switchStatus()}}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.clickHandler),Tf(this._animateId)}},{key:"render",value:function(){var e=this.playerConfig.autoplay?"auto"===this.config.mode?"auto-hide":"hide":"";return'\n <xg-start class="xgplayer-start '.concat(e,'">\n <xg-start-inner></xg-start-inner>\n </xg-start>')}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),t}(),Pf=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"render",value:function(){var e=this.config.innerHtml,t=gu.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)t.appendChild(e);else if(e&&"string"==typeof e)t.innerHTML=e;else{for(var n="",r=1;r<=12;r++)n+='<div class="xgplayer-enter-bar'.concat(r,'"></div>');t.innerHTML='<div class="xgplayer-enter-spinner">'.concat(n,"</div>")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),t}();function If(e,t,n){try{return' <div class="xg-tips '.concat(n?"hide":" ",'" lang-key="').concat(e.i18nKeys[t],'">\n ').concat(e.i18n[t],"\n </div>")}catch(pp){return'<div class="xg-tips hide"></div>'}}var Ff=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e="MINISCREEN";return'\n <xg-icon class="xgplayer-miniicon">\n <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="'.concat(this.i18nKeys[e],'">').concat(this.i18n[e],"</span></div>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:10}}}]),t}();function Bf(e){var t=parseFloat(e);return-1===e.indexOf("%")&&!Number.isNaN(t)&&t}var Lf=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],Nf=Lf.length;function Mf(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===Vl(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t<Nf;t++)e[Lf[t]]=0;return e}();var n={};n.width=e.offsetWidth,n.height=e.offsetHeight;for(var r=n.isBorderBox="border-box"===t.boxSizing,i=0;i<Nf;i++){var o=Lf[i],a=t[o],s=parseFloat(a);n[o]=Number.isNaN(s)?0:s}var l=n.paddingLeft+n.paddingRight,u=n.paddingTop+n.paddingBottom,c=n.marginLeft+n.marginRight,f=n.marginTop+n.marginBottom,d=n.borderLeftWidth+n.borderRightWidth,h=n.borderTopWidth+n.borderBottomWidth,p=r,g=Bf(t.width);!1!==g&&(n.width=g+(p?0:l+d));var v=Bf(t.height);return!1!==v&&(n.height=v+(p?0:u+h)),n.innerWidth=n.width-(l+d),n.innerHeight=n.height-(u+h),n.outerWidth=n.width+c,n.outerHeight=n.height+f,n}}function Rf(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.identifier===t)return r}}var jf={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]},Hf=function(){Xl(t,uu);var e=tu(t);function t(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Gl(this,t),(r=e.call(this)).isEnabled=!0,r.isDragging=!1,r.isDown=!1,r.position={},r.downPoint={},r.dragPoint={x:0,y:0},r.startPos={x:0,y:0},r._root=n instanceof Element?n:document.querySelector(n),r._handlerDom=i.handle instanceof Element?i.handle:document.querySelector(i.handle),r._root&&r._handlerDom?(r._bindStartEvent(),r):eu(r)}return Kl(t,[{key:"_bindStartEvent",value:function(){var e=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),jf[this._startKey].map(function(t){e["on".concat(t)]=e["on".concat(t)].bind(e)})}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var t=this;if(e){var n=jf[this._startKey];n.map(function(e){window.addEventListener(e,t["on".concat(e)])}),this._boundPointerEvents=n}}},{key:"_unbindPostStartEvents",value:function(){var e=this;this._boundPointerEvents&&(this._boundPointerEvents.map(function(t){window.removeEventListener(t,e["on".concat(t)])}),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame(function(){e.animate()}))}},{key:"positionDrag",value:function(){var e="translate3d(".concat(this.dragPoint.x,"px, ").concat(this.dragPoint.y,"px, 0)");this._root.style.transform=e,this._root.style.webKitTransform=e}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var t=e.changedTouches[0];this.dragStart(e,t),this.touchIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var t=Rf(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=Rf(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=Rf(e.changedTouches,this.touchIdentifier);t&&this.dragCancel(e,t)}},{key:"dragStart",value:function(e,t){if(this._root&&!this.isDown&&this.isEnabled){this.downPoint=t,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var n=Mf(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-n.height,this.startPos.maxX=window.innerWidth-n.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit("dragStart",this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit("dragEnded")),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var n={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(n)&&this.dragRealStart(e,t),n}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var n=this.startPos,r=n.x,i=n.y,o=this._dragPointerMove(e,t),a=o.x,s=o.y;a=this.checkContain("x",a,r),s=this.checkContain("y",s,i),this.position.x=r+a,this.position.y=i+s,this.dragPoint.x=a,this.dragPoint.y=s,this.emit("dragMove",this.position)}}},{key:"dragCancel",value:function(e,t){this.dragEnd(e,t)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,t,n){return t+n<0?0-n:"x"===e&&t+n>this.startPos.maxX?this.startPos.maxX-n:"y"===e&&t+n>this.startPos.maxY?this.startPos.maxY-n:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),n=this._getPositionCoord(e.top,"height");this.position.x=Number.isNaN(t)?0:t,this.position.y=Number.isNaN(n)?0:n,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===t.indexOf("matrix")){var n=t.split(","),r=0===t.indexOf("matrix3d")?12:4,i=parseInt(n[r],10),o=parseInt(n[r+1],10);this.position.x+=i,this.position.y+=o}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==e.indexOf("%")){var n=Mf(this._root.parentNode);return n?parseFloat(e)/100*n[t]:0}return parseInt(e,10)}}]),t}(),zf=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;Gl(this,t),Yl(Ql(r=e.call(this,n)),"onCancelClick",function(e){r.exitMini(),r.isClose=!0}),Yl(Ql(r),"onCenterClick",function(e){var t=Ql(r).player;t.paused?t.play():t.pause()}),Yl(Ql(r),"onScroll",function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-r.pos.scrollY)<50)){var t=parseInt(gu.getCss(r.player.root,"height"));t+=r.config.scrollTop,r.pos.scrollY=window.scrollY,window.scrollY>t+5?!r.isMini&&!r.isClose&&r.getMini():window.scrollY<=t&&(r.isMini&&r.exitMini(),r.isClose=!1)}}),r.isMini=!1,r.isClose=!1;var i=Ql(r).config;return r.pos={left:i.left<0?window.innerWidth-i.width-20:i.left,top:i.top<0?window.innerHeight-i.height-20:i.top,height:r.config.height,width:r.config.width,scrollY:window.scrollY||0},r.lastStyle=null,r}return Kl(t,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.mini&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(Au,function(){e.setAttr("data-state","pause")}),this.on(Su,function(){e.setAttr("data-state","play")})}},{key:"onPluginsReady",value:function(){var e=this,t=this.player;if(!this.config.disable){if(this.config.isShowIcon){var n={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(Ff,n,Ff.pluginName)}var r=gu.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",r,this.onCancelClick),this.bind(".play-icon",r,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new Hf(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:_f,class:"xg-icon-play"},pause:{icon:Df,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e=this;if(!this.isMini){var t=this.player,n=this.playerConfig,r=this.config.target||this.player.root;this.lastStyle={},gu.addClass(t.root,"xgplayer-mini"),["width","height","top","left"].map(function(t){e.lastStyle[t]=r.style[t],r.style[t]="".concat(e.pos[t],"px")}),n.fluid&&(r.style["padding-top"]=""),this.emit(ic,!0),t.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t=this.player,n=this.playerConfig,r=this.config.target||this.player.root;gu.removeClass(t.root,"xgplayer-mini"),this.lastStyle&&Object.keys(this.lastStyle).map(function(t){r.style[t]=e.lastStyle[t]}),this.lastStyle=null,n.fluid&&(t.root.style.width="100%",t.root.style.height="0",t.root.style["padding-top"]="".concat(100*n.height/n.width,"%")),this.emit(ic,!1),this.isMini=t.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=gu.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-mini-layer class="xg-mini-layer">\n <xg-mini-header class="xgplayer-mini-header">\n '.concat(If(this,"MINI_DRAG",this.playerConfig.isHideTips),'\n </xg-mini-header>\n <div class="mini-cancel-btn">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">\n <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>\n </svg>\n </div>\n <div class="play-icon">\n </div>\n </xg-mini-layer>')}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),t}(),Uf={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},$f=["videoClick","videoDbClick"],Wf=function(){Xl(t,Wc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onMouseMove",function(e){var t=Ql(n),r=t.player,i=t.playerConfig;r.isActive||(r.focus({autoHide:!i.closeDelayBlur}),!i.closeFocusVideoFocus&&r.media.focus())}),Yl(Ql(n),"onMouseEnter",function(e){var t=Ql(n),r=t.playerConfig,i=t.player;!r.closeFocusVideoFocus&&i.media.focus(),r.closeDelayBlur?i.focus({autoHide:!1}):i.focus(),n.emit(ec)}),Yl(Ql(n),"onMouseLeave",function(e){var t=n.playerConfig,r=t.closePlayerBlur,i=t.leavePlayerTime,o=t.closeDelayBlur;r||o||(i?n.player.focus({autoHide:!0,delay:i}):n.player.blur({ignorePaused:!0})),n.emit(Qu)}),Yl(Ql(n),"onVideoClick",function(e){var t=Ql(n),r=t.player,i=t.playerConfig;e.target&&i.closeVideoClick||e.target!==r.root&&e.target!==r.media&&e.target!==r.innerContainer&&e.target!==r.media.__canvas||(e.preventDefault(),i.closeVideoStopPropagation||e.stopPropagation(),n._clickCount++,n.clickTimer&&(clearTimeout(n.clickTimer),n.clickTimer=null),n.clickTimer=setTimeout(function(){n._clickCount&&(n._clickCount--,Rc(Ql(n),$f[0],function(e,t){n.switchPlayPause(t.e)},{e,paused:r.paused}),clearTimeout(n.clickTimer),n.clickTimer=null)},300))}),Yl(Ql(n),"onVideoDblClick",function(e){var t=Ql(n),r=t.player,i=t.playerConfig;i.closeVideoDblclick||!e.target||e.target!==r.media&&e.target!==r.media.__canvas||(!i.closeVideoClick&&n._clickCount<2?n._clickCount=0:(n._clickCount=0,n.clickTimer&&(clearTimeout(n.clickTimer),n.clickTimer=null),e.preventDefault(),e.stopPropagation(),Rc(Ql(n),$f[1],function(e,t){n.emitUserAction(t.e,"switch_fullscreen",{props:"fullscreen",from:r.fullscreen,to:!r.fullscreen}),r.fullscreen?r.exitFullscreen():r.getFullscreen()},{e,fullscreen:r.fullscreen})))}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this;this._clickCount=0,$f.map(function(t){e.__hooks[t]=null}),"mobile"===this.playerConfig.isMobileSimulateMode||"mobile"===wu.device&&!wu.os.isIpad||this.initEvents()}},{key:"initEvents",value:function(){var e=this,t=this.player,n=t.media,r=t.root,i=this.playerConfig.enableContextmenu;r&&r.addEventListener("click",this.onVideoClick,!1),r&&r.addEventListener("dblclick",this.onVideoDblClick,!1),Object.keys(Uf).map(function(t){r.addEventListener(t,e[Uf[t]],!1)}),!i&&n&&n.addEventListener("contextmenu",this.onContextmenu,!1)}},{key:"switchPlayPause",value:function(e){var t=this.player;this.emitUserAction(e,"switch_play_pause",{props:"paused",from:t.paused,to:!t.paused}),t.ended?t.duration!==1/0&&t.duration>0&&t.replay():t.paused?t.play():t.pause()}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e=this,t=this.player,n=t.video,r=t.root;this.clickTimer&&clearTimeout(this.clickTimer),r.removeEventListener("click",this.onVideoClick,!1),r.removeEventListener("dblclick",this.onVideoDblClick,!1),n.removeEventListener("contextmenu",this.onContextmenu,!1),Object.keys(Uf).map(function(t){r.removeEventListener(t,e[Uf[t]],!1)})}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),t}(),Vf="pressend",Gf={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},qf={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function Kf(e){return e&&e.length>0?e[e.length-1]:null}var Yf=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};Gl(this,e),Yl(this,"onTouchStart",function(e){var t=n._pos,r=n.root,i=Kf(e.touches);t.x=i?parseInt(i.pageX,10):e.pageX,t.y=i?parseInt(i.pageX,10):e.pageX,t.start=!0,n.__setPress(e),r.addEventListener(n.events.end,n.onTouchEnd),r.addEventListener(n.events.cancel,n.onTouchCancel),r.addEventListener(n.events.move,n.onTouchMove),n.trigger("touchstart",e)}),Yl(this,"onTouchCancel",function(e){n.onTouchEnd(e)}),Yl(this,"onTouchEnd",function(e){var t=n._pos,r=n.root;n.__clearPress(),r.removeEventListener(n.events.cancel,n.onTouchCancel),r.removeEventListener(n.events.end,n.onTouchEnd),r.removeEventListener(n.events.move,n.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&n.trigger(Vf,e),n.trigger("touchend",e),!t.press&&!t.moving&&n.__setDb(e),t.press=!1,t.start=!1,t.moving=!1}),Yl(this,"onTouchMove",function(e){var t=n._pos,r=n.config,i=Kf(e.touches),o=i?parseInt(i.pageX,10):e.pageX,a=i?parseInt(i.pageY,10):e.pageX,s=o-t.x,l=a-t.y;Math.abs(l)<r.miniStep&&Math.abs(s)<r.miniStep||(n.__clearPress(),t.press&&n.trigger(Vf,e),t.press=!1,t.moving=!0,n.trigger("touchmove",e))}),this._pos={moving:!1,start:!1,x:0,y:0},this.config={pressDelay:600,dbClickDelay:200,disablePress:!1,disableDbClick:!1,miniStep:2,needPreventDefault:!0},Object.keys(r).map(function(e){n.config[e]=r[e]}),this.root=t,this.events="mouse"===r.eventType?qf:Gf,this.pressIntrvalId=null,this.dbIntrvalId=null,this.__handlers={},this._initEvent()}return Kl(e,[{key:"_initEvent",value:function(){this.root.addEventListener(this.events.start,this.onTouchStart)}},{key:"__setPress",value:function(e){var t=this,n=this.config;this.pressIntrvalId&&this.__clearPress(),this.pressIntrvalId=setTimeout(function(){t.trigger("press",e),t._pos.press=!0,t.__clearPress()},n.pressDelay)}},{key:"__clearPress",value:function(){window.clearTimeout(this.pressIntrvalId),this.pressIntrvalId=null}},{key:"__setDb",value:function(e){var t=this,n=this.config;if(this.dbIntrvalId)return this.__clearDb(),void this.trigger("doubleclick",e);this.dbIntrvalId=setTimeout(function(){t.__clearDb(),t._pos.start||t._pos.press||t._pos.moving||t.trigger("click",e)},n.dbClickDelay)}},{key:"__clearDb",value:function(){clearTimeout(this.dbIntrvalId),this.dbIntrvalId=null}},{key:"on",value:function(e,t){this.__handlers[e]||(this.__handlers[e]=[]),this.__handlers[e].push(t)}},{key:"off",value:function(e,t){if(this.__handlers[e]){for(var n=this.__handlers[e],r=-1,i=0;i<n.length;i++)if(n[i]===t){r=i;break}r>=0&&this.__handlers[e].splice(r,1)}}},{key:"trigger",value:function(e,t){this.__handlers[e]&&this.__handlers[e].map(function(n){try{n(t)}catch(r){console.error("trigger>>:".concat(e),r)}})}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};Object.keys(t).forEach(function(n){e.root.removeEventListener(n,e[t[n]])})}}]),e}();function Xf(){return(new DOMParser).parseFromString('<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <path opacity="0.54"\n d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"\n fill="white" />\n <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>\n</svg>',"image/svg+xml").firstChild}var Jf="auto",Zf=["videoClick","videoDbClick"],Qf=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"onTouchStart",function(e){var t=Ql(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=r.getTouche(e);if(s&&!i.disableGesture&&r.duration>0&&!n.ended){o.isStart=!0,r.timer&&clearTimeout(r.timer),gu.checkIsFunction(a.disableSwipeHandler)&&a.disableSwipeHandler(),r.find(".xg-dur").innerHTML=gu.format(r.duration);var l=r.root.getBoundingClientRect();90===n.rotateDeg?(o.top=l.left,o.left=l.top,o.width=l.height,o.height=l.width):(o.top=l.top,o.left=l.left,o.width=l.width,o.height=l.height);var u=parseInt(s.pageX-o.left,10),c=parseInt(s.pageY-o.top,10);o.x=90===n.rotateDeg?c:u,o.y=90===n.rotateDeg?u:c,o.scopeL=i.scopeL*o.width,o.scopeR=(1-i.scopeR)*o.width,o.scopeM1=o.width*(1-i.scopeM)/2,o.scopeM2=o.width-o.scopeM1}}),Yl(Ql(r),"onTouchMove",function(e){var t=r.getTouche(e),n=Ql(r),i=n.pos,o=n.config,a=n.player;if(t&&!o.disableGesture&&r.duration&&i.isStart){var s=o.miniMoveStep,l=o.hideControlsActive,u=parseInt(t.pageX-i.left,10),c=parseInt(t.pageY-i.top,10),f=90===a.rotateDeg?c:u,d=90===a.rotateDeg?u:c;if(Math.abs(f-i.x)>s||Math.abs(d-i.y)>s){var h=f-i.x,p=d-i.y,g=i.scope;if(-1===g&&(0===(g=r.checkScope(f,d,h,p,i))&&(l?a.blur():a.focus({autoHide:!1}),!i.time&&(i.time=parseInt(1e3*a.currentTime,10)+1e3*r.timeOffset)),i.scope=g),-1===g||g>0&&!o.gestureY||0===g&&!o.gestureX)return;r.executeMove(h,p,g,i.width,i.height),i.x=f,i.y=d}}}),Yl(Ql(r),"onTouchEnd",function(e){var t=Ql(r),n=t.player,i=t.pos,o=t.playerConfig;if(setTimeout(function(){n.getPlugin("progress")&&n.getPlugin("progress").resetSeekState()},10),i.isStart){i.scope>-1&&e.cancelable&&e.preventDefault();var a=r.config,s=a.disableGesture,l=a.gestureX;!s&&l?r.endLastMove(i.scope):i.time=0,i.scope=-1,r.resetPos(),gu.checkIsFunction(o.enableSwipeHandler)&&o.enableSwipeHandler(),r.changeAction(Jf)}}),Yl(Ql(r),"onRootTouchMove",function(e){!r.config.disableGesture&&r.config.gestureX&&r.checkIsRootTarget(e)&&(e.stopPropagation(),r.pos.isStart?r.onTouchMove(e):r.onTouchStart(e))}),Yl(Ql(r),"onRootTouchEnd",function(e){r.pos.scope>-1&&r.onTouchEnd(e)}),r.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},r.timer=null,r}return Kl(t,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:Xf,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e=this;Zf.map(function(t){e.__hooks[t]=null});var t=this.playerConfig,n=this.config,r=this.player;!0===t.closeVideoDblclick&&(n.closedbClick=!0),this.resetPos(),gu.isUndefined(t.disableGesture)||(n.disableGesture=!!t.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=gu.createDom("xg-mask","",{},"xgmask"),r.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var i="mouse"===this.domEventType?"mouse":"touch";this.touch=new Yf(this.root,{eventType:i,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",function(e){e.preventDefault()}),r.root.addEventListener("touchmove",this.onRootTouchMove,!0),r.root.addEventListener("touchend",this.onRootTouchEnd,!0),r.root.addEventListener("touchcancel",this.onRootTouchEnd,!0);var o=this.player.controls;o&&o.center&&(o.center.addEventListener("touchmove",this.onRootTouchMove,!0),o.center.addEventListener("touchend",this.onRootTouchEnd,!0),o.center.addEventListener("touchcancel",this.onRootTouchEnd,!0)),this.on(Lu,function(){var t=e.player,n=e.config;t.duration>0&&1e3*t.duration<n.moveDuration&&(n.moveDuration=1e3*t.duration)}),this.on([Bu,Du],function(){var t=e.pos,n=t.time;!t.isStart&&n>0&&(e.pos.time=0)});var a={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Object.keys(a).map(function(t){e.touch.on(t,function(n){e[a[t]](n)})}),!n.disableActive){var s=r.plugins.progress;s&&(s.addCallBack("dragmove",function(t){e.activeSeekNote(t.currentTime,t.forward)}),["dragend","click"].forEach(function(t){s.addCallBack(t,function(){e.changeAction(Jf)})}))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=this.find(".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,n=e.progressColor,r=e.timePreviewStyle,i=e.curTimeColor,o=e.durationColor;if(t&&(this.find(".xg-curbar").style.backgroundColor=t),n&&(this.find(".xg-bar").style.backgroundColor=n),r){var a=this.find(".time-preview");Object.keys(r).forEach(function(e){a.style[e]=r[e]})}var s=i||t,l=o;s&&(this.find(".xg-cur").style.color=s),l&&(this.find(".xg-dur").style.color=l),this.config.disableTimeProgress&&gu.addClass(this.find(".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"].map(function(t){e.pos[t]=0})):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var n=t.plugins.start;n&&n.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,n,r,i){var o=i.width,a=-1;if(e<0||e>o)return a;var s=0===r?Math.abs(n):Math.abs(n/r);return Math.abs(n)>0&&s>=1.73&&e>i.scopeM1&&e<i.scopeM2?a=0:(0===Math.abs(n)||s<=.57)&&(a=e<i.scopeL?1:e>i.scopeR?2:3),a}},{key:"executeMove",value:function(e,t,n,r,i){switch(n){case 0:this.updateTime(e/r*this.config.scopeM);break;case 1:this.updateBrightness(t/i);break;case 2:wu.os.isIos||this.updateVolume(t/i)}}},{key:"endLastMove",value:function(e){var t=this,n=this.pos,r=this.player,i=this.config,o=(n.time-this.timeOffset)/1e3;0===e&&(r.seek(Number(o).toFixed(1)),i.hideControlsEnd?r.blur():r.focus(),this.timer=setTimeout(function(){t.pos.time=0},500)),this.changeAction(Jf)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"sendUseAction",value:function(e){var t=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t,to:!t})}},{key:"clickHandler",value:function(e){var t=this.player,n=this.config,r=this.playerConfig;t.state<6?r.closeVideoClick||(this.sendUseAction(gu.createEvent("click")),t.play()):!n.closedbClick||r.closeVideoClick?t.isActive?t.blur():t.focus():r.closeVideoClick||((t.isActive||n.focusVideoClick)&&(this.sendUseAction(gu.createEvent("click")),this.switchPlayPause()),t.focus())}},{key:"dbClickHandler",value:function(e){var t=this.config,n=this.player;!t.closedbClick&&n.state>=6&&(this.sendUseAction(gu.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,n=this.player;Rc(this,Zf[0],function(e,n){t.clickHandler(n.e)},{e,paused:n.paused})}},{key:"onDbClick",value:function(e){var t=this,n=this.player;Rc(this,Zf[1],function(e,n){t.dbClickHandler(n.e)},{e,paused:n.paused})}},{key:"onPress",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:r.playbackRate,to:n.pressRate}),r.playbackRate=n.pressRate,this.changeAction("playbackrate"))}},{key:"onPressEnd",value:function(e){var t=this.pos,n=this.config,r=this.player;n.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:r.playbackRate,to:t.rate}),r.playbackRate=t.rate,t.rate=1,this.changeAction(Jf))}},{key:"updateTime",value:function(e){var t=this.player,n=this.config,r=this.player.duration;e=Number(e.toFixed(4));var i=parseInt(e*n.moveDuration,10)+this.timeOffset;i=(i+=this.pos.time)<0?0:i>1e3*r?1e3*r-200:i,t.getPlugin("time")&&t.getPlugin("time").updateTime(i/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(i/1e3/this.duration,!0),this.activeSeekNote(i/1e3,e>0),n.isTouchingSeek&&t.seek(Number((i-this.timeOffset)/1e3).toFixed(1)),this.pos.time=i}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,n=this.pos;if(e=parseInt(100*e,10),n.volume+=e,!(Math.abs(n.volume)<10)){var r=parseInt(10*t.volume,10)-parseInt(n.volume/10,10);r=r>10?10:r<1?0:r,t.volume=r/10,n.volume=0}}},{key:"updateBrightness",value:function(e){var t=this.pos,n=this.config,r=this.xgMask;if(n.darkness){this.player.rotateDeg&&(e=-e);var i=t.light+.8*e;i=i>n.maxDarkness?n.maxDarkness:i<0?0:i,r&&(r.style.backgroundColor="rgba(0,0,0,".concat(i,")")),t.light=i}}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player,r=this.config,i=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!i&&!r.disableActive){e<0?e=0:e>n.duration&&(e=n.duration-.2),this.changeAction("seeking");var o=n.plugins.start;o&&o.focusHide(),this.find(".xg-dur").innerHTML=gu.format(this.duration),this.find(".xg-cur").innerHTML=gu.format(e),this.find(".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t?gu.removeClass(this.find(".xg-seek-show"),"xg-back"):gu.addClass(this.find(".xg-seek-show"),"xg-back"),this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state<4)return!1;e.ended||(e.paused?e.play():e.pause())}},{key:"disableGesture",value:function(){this.config.disableGesture=!0}},{key:"enableGesture",value:function(){this.config.disableGesture=!1}},{key:"destroy",value:function(){var e=this.player;this.timer&&clearTimeout(this.timer),this.thumbnail=null,e.root.removeChild(this.xgMask),this.xgMask=null,this.touch&&this.touch.destroy(),this.touch=null,e.root.removeEventListener("touchmove",this.onRootTouchMove,!0),e.root.removeEventListener("touchend",this.onRootTouchEnd,!0),e.root.removeEventListener("touchcancel",this.onRootTouchEnd,!0);var t=this.player.controls;t&&t.center&&(t.center.removeEventListener("touchmove",this.onRootTouchMove,!0),t.center.removeEventListener("touchend",this.onRootTouchEnd,!0),t.center.removeEventListener("touchcancel",this.onRootTouchEnd,!0))}},{key:"render",value:function(){var e="normal"!==this.config.gradient?"gradient ".concat(this.config.gradient):"gradient";return'\n <xg-trigger class="trigger">\n <div class="'.concat(e,'"></div>\n <div class="time-preview">\n <div class="xg-seek-show ').concat(this.config.disableSeekIcon?" hide-seek-icon":"",'">\n <i class="xg-seek-icon"></i>\n <span class="xg-cur">00:00</span>\n <span class="xg-separator">/</span>\n <span class="xg-dur">00:00</span>\n </div>\n <div class="xg-bar xg-timebar">\n <div class="xg-curbar"></div>\n </div>\n </div>\n <div class="xg-playbackrate xg-top-note">\n <span><i>').concat(this.config.pressRate,"X</i>").concat(this.i18n.FORWARD,"</span>\n </div>\n </xg-trigger>\n ")}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),t}();function ed(e){e.preventDefault(),e.returnValue=!1}function td(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var nd=function(){Xl(t,Wc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onBodyKeyDown",function(e){if(n.player){var t=e||window.event,r=t.keyCode,i=Ql(n),o=i._keyState,a=i.player,s=n.config,l=s.disable,u=s.disableBodyTrigger,c=s.isIgnoreUserActive;l||u||!a.isUserActive&&!c||td(t.target)||!n.checkIsVisible()||t.metaKey||t.altKey||t.ctrlKey?o.isBodyKeyDown=!1:(e.repeat||o.isKeyDown||((t.target===document.body||n.config.isGlobalTrigger&&!td(t.target))&&n.checkCode(r,!0)&&(o.isBodyKeyDown=!0),document.addEventListener("keyup",n.onBodyKeyUp)),o.isBodyKeyDown&&n.handleKeyDown(t))}}),Yl(Ql(n),"onBodyKeyUp",function(e){n.player&&(document.removeEventListener("keyup",n.onBodyKeyUp),n.handleKeyUp(e))}),Yl(Ql(n),"onKeydown",function(e){if(n.player){var t=e||window.event,r=Ql(n)._keyState;if(!t.repeat){if(n.config.disable||n.config.disableRootTrigger||t.metaKey||t.altKey||t.ctrlKey)return;!t||37!==t.keyCode&&!n.checkCode(t.keyCode)||t.target!==n.player.root&&t.target!==n.player.video&&t.target!==n.player.controls.el||(r.isKeyDown=!0),n.player.root.addEventListener("keyup",n.onKeyup)}r.isKeyDown&&n.handleKeyDown(t)}}),Yl(Ql(n),"onKeyup",function(e){n.player&&(n.player.root.removeEventListener("keyup",n.onKeyup),n.handleKeyUp(e))}),n}return Kl(t,[{key:"mergekeyCodeMap",value:function(){var e=this,t=this.config.keyCodeMap;t&&Object.keys(t).map(function(n){e.keyCodeMap[n]?["keyCode","action","disable","pressAction","disablePress","isBodyTarget"].map(function(r){t[n][r]&&(e.keyCodeMap[n][r]=t[n][r])}):e.keyCodeMap[n]=t[n]})}},{key:"afterCreate",value:function(){this.config.disable=!this.playerConfig.keyShortcut;var e="function"==typeof this.config.seekStep?this.config.seekStep(this.player):this.config.seekStep;e&&"number"==typeof e&&(this.seekStep=e),this.keyCodeMap={space:{keyCode:32,action:"playPause",disable:!1,disablePress:!1,noBodyTarget:!1},up:{keyCode:38,action:"upVolume",disable:!1,disablePress:!1,noBodyTarget:!0},down:{keyCode:40,action:"downVolume",disable:!1,disablePress:!1,noBodyTarget:!0},left:{keyCode:37,action:"seekBack",disablePress:!1,disable:!1},right:{keyCode:39,action:"seek",pressAction:"changePlaybackRate",disablePress:!1,disable:!1},esc:{keyCode:27,action:"exitFullscreen",disablePress:!0,disable:!1}},this.mergekeyCodeMap(),this._keyState={isKeyDown:!1,isBodyKeyDown:!1,isPress:!1,tt:0,playbackRate:0},this.player.root.addEventListener("keydown",this.onKeydown),document.addEventListener("keydown",this.onBodyKeyDown)}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]})}},{key:"checkIsVisible",value:function(){if(!this.config.checkVisible)return!0;var e=this.player.root.getBoundingClientRect(),t=e.height,n=e.top,r=e.bottom,i=window.innerHeight;return!(n<0&&n<0-.9*t||r>0&&r-i>.9*t)}},{key:"checkCode",value:function(e,t){var n=this,r=!1;return Object.keys(this.keyCodeMap).map(function(i){n.keyCodeMap[i]&&e===n.keyCodeMap[i].keyCode&&!n.keyCodeMap[i].disable&&(r=!t||t&&!n.keyCodeMap[i].noBodyTarget)}),r}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var n=parseFloat((t.volume-.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n>=0?n:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var n=parseFloat((t.volume+.1).toFixed(1)),r={volume:{from:t.volume,to:n}};this.emitUserAction(e,"change_volume",{props:r}),t.volume=n<=1?n:1}}},{key:"seek",value:function(e){var t=this.player,n=t.currentTime,r=t.offsetCurrentTime,i=t.duration,o=t.offsetDuration,a=t.timeSegments,s=r>-1?r:n,l=o||i,u=e.repeat&&this.seekStep>=4?parseInt(this.seekStep/2,10):this.seekStep;s+u<=l?s+=u:s=l;var c=gu.getCurrentTimeByOffset(s,a),f={currentTime:{from:n,to:c}};this.emitUserAction(e,"seek",{props:f}),this.player.currentTime=c}},{key:"seekBack",value:function(e){var t=this.player,n=t.currentTime,r=t.offsetCurrentTime,i=t.timeSegments,o=(r>-1?r:n)-(e.repeat?parseInt(this.seekStep/2,10):this.seekStep);o<0&&(o=0);var a={currentTime:{from:n,to:o=gu.getCurrentTimeByOffset(o,i)}};this.emitUserAction(e,"seek",{props:a}),this.player.currentTime=o}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,n=this.config,r=this.player;0===t.playbackRate&&(t.playbackRate=r.playbackRate,r.playbackRate=n.playbackRate)}},{key:"playPause",value:function(e){var t=this.player;t&&(this.emitUserAction(e,"switch_play_pause"),t.paused?t.play():t.pause())}},{key:"exitFullscreen",value:function(e){var t=this.player,n=t.fullscreen,r=t.cssfullscreen;n&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:n,to:!n}),t.exitFullscreen()),r&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:r,to:!r}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(e.repeat){t.isPress=!0;var n=Date.now();if(n-t.tt<200)return;t.tt=n}this.handleKeyCode(e.keyCode,e,t.isPress)}},{key:"handleKeyUp",value:function(e){var t=this._keyState;t.playbackRate>0&&(this.player.playbackRate=t.playbackRate,t.playbackRate=0),t.isKeyDown=!1,t.isPress=!1,t.tt=0}},{key:"handleKeyCode",value:function(e,t,n){for(var r=Object.keys(this.keyCodeMap),i=0;i<r.length;i++){var o=this.keyCodeMap[r[i]],a=o.action,s=o.keyCode,l=o.disable,u=o.pressAction,c=o.disablePress;if(s===e){if(!(l||n&&c)){var f=n&&u||a;"function"==typeof f?a(t,this.player,n):"string"==typeof f&&"function"==typeof this[f]&&this[f](t,this.player,n),this.emit(dc,Wl({key:r[i],target:t.target,isPress:n},this.keyCodeMap[r[i]]))}ed(t),t.stopPropagation();break}}}},{key:"destroy",value:function(){this.player.root.removeEventListener("keydown",this.onKeydown),document.removeEventListener("keydown",this.onBodyKeyDown),this.player.root.removeEventListener("keyup",this.onKeyup),document.removeEventListener("keyup",this.onBodyKeyUp)}},{key:"disable",value:function(){this.config.disable=!0}},{key:"enable",value:function(){this.config.disable=!1}}],[{key:"pluginName",get:function(){return"keyboard"}},{key:"defaultConfig",get:function(){return{seekStep:10,checkVisible:!1,disableBodyTrigger:!1,disableRootTrigger:!1,isGlobalTrigger:!0,keyCodeMap:{},disable:!1,playbackRate:2,isIgnoreUserActive:!0}}}]),t}();function rd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">\n <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>\n</svg>\n',"image/svg+xml").firstChild}var id=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"registerIcons",value:function(){return{loadingIcon:rd}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return'\n <xg-loading class="xgplayer-loading">\n <xg-loading-inner></xg-loading-inner>\n </xg-loading>'}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:Kc.ROOT}}}]),t}(),od=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],ad=function(){function e(t){Gl(this,e),this.fragments=t.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=t.actionCallback,this.fragConfig={fragFocusClass:t.fragFocusClass||"inner-focus-point",fragAutoFocus:!!t.fragAutoFocus,fragClass:t.fragClass||""},this.style=t.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return Kl(e,[{key:"updateDuration",value:function(e){var t=this;this.duration=e;var n=0,r=this.fragments;this.fragments=r.map(function(e){return e.start=parseInt(n,10),e.end=parseInt(n+e.percent*t.duration,10),e.duration=parseInt(e.percent*t.duration,10),n+=e.percent*t.duration,e})}},{key:"updateProgress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},n=this.progressList,r=this.fragments;if(!(n.length<1)){var i=t.newIndex,o=t.curIndex,a=t.millisecond;i!==o&&n.map(function(t,n){n<i?t[e].style.width="100%":n>i&&(t[e].style.width=0)});var s=r[i],l=0===a?0:(a-s.start)/s.duration;n[i][e].style.width=l<0?0:"".concat(100*l,"%")}}},{key:"updateFocus",value:function(e){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(e){var t=this.findIndex(1e3*e.currentTime,this.focusIndex);if(t>=0&&t!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(t);var n={index:t,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=t,this._callBack&&this._callBack(n)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var r={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(r),this.focusIndex=-1}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(!this.duration||parseInt(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(parseInt(1e3*t,10))}var n=this.playedIndex,r=this.cachedIndex;if("Undefined"!==gu.typeOf(e.played)){var i=this.findIndex(1e3*e.played,n);if(i<0)return;this.updateProgress("played",{newIndex:i,curIndex:n,millisecond:parseInt(1e3*e.played,10)}),this.playedIndex=i}if("Undefined"!==gu.typeOf(e.cached)){var o=this.findIndex(1e3*e.cached,r);if(o<0)return;this.updateProgress("cached",{newIndex:o,curIndex:r,millisecond:parseInt(1e3*e.cached,10)}),this.cachedIndex=o}}},{key:"findIndex",value:function(e,t){var n=this.fragments;if(!n||0===n.length)return-1;if(1===n.length)return 0;if(t>-1&&t<n.length&&e>n[t].start&&e<n[t].end)return t;if(e>n[n.length-1].start)return n.length-1;for(var r=0;r<n.length;r++)if(e>n[r].start&&e<=n[r].end){t=r;break}return t}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)if(gu.hasClass(e[t],this.fragConfig.fragFocusClass))return{dom:e[t],pos:e[t].getBoundingClientRect()}}},{key:"findFragment",value:function(e){var t=this.root.children;return e<0||e>=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var e=this.root.children,t=0;t<e.length;t++)gu.removeClass(e[t],this.fragConfig.fragFocusClass)}},{key:"setHightLight",value:function(e){var t=this.root.children;if(e<t.length)return gu.addClass(t[e],this.fragConfig.fragFocusClass),{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"destroy",value:function(){this.progressList=null,this.fragments=null,this.root.innerHTML=""}},{key:"reset",value:function(e){var t=this;if(Object.keys(this.fragConfig).forEach(function(n){void 0!==e[n]&&(t.fragConfig[n]=e[n])}),e.fragments){if(this.fragments=0===e.fragments.length?[{percent:1}]:e.fragments,this.updateDuration(this.duration),this.playedIndex=0,this.cachedIndex=0,this.root)for(var n=this.root.children;n.length>0;)this.root.removeChild(n[0]);this.render()}}},{key:"render",value:function(){var e=this,t=this.style.progressColor;if(this.root||(this.root=gu.createDom("xg-inners","",{},"progress-list")),this.fragments){var n=this.fragConfig,r=n.fragClass,i=n.fragFocusClass;this.progressList=this.fragments.map(function(n){var o=gu.createDom("xg-inner","",{style:t?"background:".concat(t,"; flex: ").concat(n.percent):"flex: ".concat(n.percent)},"".concat(n.isFocus?i:""," xgplayer-progress-inner ").concat(r));return e.root.appendChild(o),od.forEach(function(t){o.appendChild(gu.createDom(t.tag,"",{style:t.styleKey?"background: ".concat(e.style[t.styleKey],"; width:0;"):"width:0;"},t.className))}),{cached:o.children[0],played:o.children[1]}})}return this.root}}]),e}(),sd={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},ld=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"onMoveOnly",function(e,t){var n=Ql(r),i=n.pos,o=n.config,a=n.player,s=t;if(e){gu.event(e);var l=gu.getEventPos(e,a.zoom),u=90===a.rotateDeg?l.clientY:l.clientX;if(i.moving&&Math.abs(i.x-u)<o.miniMoveStep)return;i.moving=!0,i.x=u,s=r.computeTime(e,u)}r.triggerCallbacks("dragmove",s,e),r._updateInnerFocus(s)}),Yl(Ql(r),"onBodyClick",function(e){r.pos.isLocked&&(r.pos.isLocked=!1,e.preventDefault(),e.stopPropagation())}),Yl(Ql(r),"_mouseDownHandler",function(e,t){r._state.time=t.currentTime,r.updateWidth(t.currentTime,t.seekTime,t.percent,0),r._updateInnerFocus(t)}),Yl(Ql(r),"_mouseUpHandler",function(e,t){Ql(r).pos.moving&&r.updateWidth(t.currentTime,t.seekTime,t.percent,2)}),Yl(Ql(r),"_mouseMoveHandler",function(e,t){var n=Ql(r),i=n._state,o=n.pos,a=n.config,s=n.player;i.time<t.currentTime?t.forward=!0:t.forward=!1,i.time=t.currentTime,o.isDown&&!o.moving&&(o.moving=!0,a.isPauseMoving&&s.pause(),r.triggerCallbacks("dragstart",t,e),r.emitUserAction("drag","dragstart",t)),r.updateWidth(t.currentTime,t.seekTime,t.percent,1),r.triggerCallbacks("dragmove",t,e),r._updateInnerFocus(t)}),Yl(Ql(r),"onMouseDown",function(e){var t=Ql(r),n=t._state,i=t.player,o=t.pos,a=t.config,s=t.playerConfig,l=gu.getEventPos(e,i.zoom),u=90===i.rotateDeg?l.clientY:l.clientX;if(!(i.isMini||a.closeMoveSeek||!s.allowSeekAfterEnded&&i.ended)){if(i.duration||i.isPlaying){e.stopPropagation(),r.focus(),gu.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),gu.checkIsFunction(a.onMoveStart)&&a.onMoveStart(),gu.event(e),o.x=u,o.isDown=!0,o.moving=!1,n.prePlayTime=i.currentTime,i.focus({autoHide:!1}),r.isProgressMoving=!0,gu.addClass(r.progressBtn,"active");var c=r.computeTime(e,u);return c.prePlayTime=n.prePlayTime,r._mouseDownHandlerHook(e,c),"touchstart"===e.type?(r.root.addEventListener("touchmove",r.onMouseMove),r.root.addEventListener("touchend",r.onMouseUp),r.root.addEventListener("touchcancel",r.onMouseUp)):(r.unbind("mousemove",r.onMoveOnly),document.addEventListener("mousemove",r.onMouseMove,!1),document.addEventListener("mouseup",r.onMouseUp,!1)),!0}i.play()}}),Yl(Ql(r),"onMouseUp",function(e){var t=Ql(r),n=t.player,i=t.config,o=t.pos,a=t.playerConfig,s=t._state;e.stopPropagation(),e.preventDefault(),gu.checkIsFunction(a.enableSwipeHandler)&&a.enableSwipeHandler(),gu.checkIsFunction(i.onMoveEnd)&&i.onMoveEnd(),gu.event(e),gu.removeClass(r.progressBtn,"active");var l=r.computeTime(e,o.x);l.prePlayTime=s.prePlayTime,o.moving?(r.triggerCallbacks("dragend",l,e),r.emitUserAction("drag","dragend",l)):(r.triggerCallbacks("click",l,e),r.emitUserAction("click","click",l)),r._mouseUpHandlerHook(e,l),o.moving=!1,o.isDown=!1,o.x=0,o.y=0,o.isLocked=!0,s.prePlayTime=0,s.time=0;var u=e.type;"touchend"===u||"touchcancel"===u?(r.root.removeEventListener("touchmove",r.onMouseMove),r.root.removeEventListener("touchend",r.onMouseUp),r.root.removeEventListener("touchcancel",r.onMouseUp),r.blur()):(document.removeEventListener("mousemove",r.onMouseMove,!1),document.removeEventListener("mouseup",r.onMouseUp,!1),o.isEnter?"mobile"!==a.isMobileSimulateMode&&r.bind("mousemove",r.onMoveOnly):r.onMouseLeave(e)),gu.setTimeout(Ql(r),function(){r.resetSeekState()},1),n.focus()}),Yl(Ql(r),"onMouseMove",function(e){var t=Ql(r),n=t._state,i=t.pos,o=t.player,a=t.config;gu.checkTouchSupport()&&e.preventDefault(),gu.event(e);var s=gu.getEventPos(e,o.zoom),l=90===o.rotateDeg?s.clientY:s.clientX,u=Math.abs(i.x-l);if(!(i.moving&&u<a.miniMoveStep||!i.moving&&u<a.miniStartStep)){i.x=l;var c=r.computeTime(e,l);c.prePlayTime=n.prePlayTime,r._mouseMoveHandlerHook(e,c)}}),Yl(Ql(r),"onMouseOut",function(e){r.triggerCallbacks("mouseout",null,e)}),Yl(Ql(r),"onMouseOver",function(e){r.triggerCallbacks("mouseover",null,e)}),Yl(Ql(r),"onMouseEnter",function(e){var t=Ql(r),n=t.player,i=t.pos;if(!(i.isDown||i.isEnter||n.isMini||!n.config.allowSeekAfterEnded&&n.ended)){i.isEnter=!0,r.bind("mousemove",r.onMoveOnly),r.bind("mouseleave",r.onMouseLeave),gu.event(e);var o=gu.getEventPos(e,n.zoom),a=90===n.rotateDeg?o.clientY:o.clientX,s=r.computeTime(e,a);r.triggerCallbacks("mouseenter",s,e),r.focus()}}),Yl(Ql(r),"onMouseLeave",function(e){r.triggerCallbacks("mouseleave",null,e),r.unlock(),r._updateInnerFocus(null)}),Yl(Ql(r),"onVideoResize",function(){var e=r.pos,t=e.x,n=e.isDown;if(e.isEnter&&!n){var i=r.computeTime(null,t);r.onMoveOnly(null,i)}}),r.useable=!1,r.isProgressMoving=!1,r.__dragCallBacks=[],r._state={now:-1,direc:0,time:0,prePlayTime:-1},r._disableBlur=!1,"boolean"==typeof r.config.isDragingSeek&&(console.warn("[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"),r.config.isDraggingSeek=r.config.isDragingSeek),r}return Kl(t,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n+this.timeOffset}},{key:"changeState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=e}},{key:"show",value:function(e){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t&&0!==t.length||(t=[{percent:1}]);var r=Wl(Wl({fragments:t},n),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(r):(this.innerList=new ad(r),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),["findHightLight","unHightLight","setHightLight","findFragment"].map(function(t){e[t]=e.innerList[t].bind(e.innerList)}))}},{key:"_updateInnerFocus",value:function(e){this.innerList&&this.innerList.updateFocus(e)}},{key:"afterCreate",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=this.find("xg-outer");var e=this.config,t=e.fragFocusClass,n=e.fragAutoFocus,r=e.fragClass;this._initInner(this.config.fragments,{fragFocusClass:t,fragAutoFocus:n,fragClass:r,style:this.playerConfig.commonStyle||{}}),"mobile"===wu.device&&(this.config.isDraggingSeek=!1,this.isMobile=!0),this.progressBtn=this.find(".xgplayer-progress-btn"),this.listenEvents(),this.bindDomEvents(),this.initCustomStyle()}}},{key:"listenEvents",value:function(){var e=this;this.on(Lu,function(){e.onMouseLeave()}),this.on(Iu,function(){e.onTimeupdate()}),this.on(Pu,function(){e.onTimeupdate(),e.onCacheUpdate()}),this.on(ju,function(){e.onCacheUpdate()}),this.on(Du,function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0}),this.on(zu,function(){e.onReset()}),this.on(sc,function(){e.onVideoResize()})}},{key:"setConfig",value:function(e){var t=this,n=null;Object.keys(e).forEach(function(r){t.config[r]=e[r],"fragments"===r&&(n=e[r])}),n&&this._initInner(n,e)}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle.sliderBtnStyle,t=this.progressBtn;e&&("string"==typeof e?t.style.boxShadow=e:"object"===Vl(e)&&Object.keys(e).map(function(n){t.style[n]=e[n]}))}},{key:"triggerCallbacks",value:function(e,t,n){this.__dragCallBacks.length>0&&this.__dragCallBacks.map(function(r){if(r&&r.handler&&r.type===e)try{r.handler(t,n)}catch(i){console.error("[XGPLAYER][triggerCallbacks] ".concat(r," error"),i)}})}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var n=this.__dragCallBacks,r=-1;n.map(function(n,i){n&&n.type===e&&n.handler===t&&(r=i)}),r>-1&&n.splice(r,1)}},{key:"unlock",value:function(){var e=this.player,t=this.pos;t.isEnter=!1,t.isLocked=!1,e.isMini||(this.unbind("mousemove",this.onMoveOnly),t.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var e=this.player.config;this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||this.root.addEventListener("touchstart",this.onMouseDown),"mouse"!==this.domEventType&&"compatible"!==this.domEventType||(this.bind("mousedown",this.onMouseDown),"mobile"!==e.isMobileSimulateMode&&this.bind("mouseenter",this.onMouseEnter),this.bind("mouseover",this.onMouseOver),this.bind("mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),gu.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),gu.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,t,n,r){var i=this.config,o=this.player;if(!i.isCloseClickSeek||0!==r){var a=t=t>=o.duration?o.duration-i.endedDiff:Number(t).toFixed(1);this.updatePercent(n),this.updateTime(e),(1!==r||i.isDraggingSeek&&"audio"!==o.config.mediaType)&&(this._state.now=a,this._state.direc=a>o.currentTime?0:1,o.seek(a))}}},{key:"computeTime",value:function(e,t){var n,r,i=this.player,o=this.root.getBoundingClientRect(),a=o.width,s=o.height,l=o.top,u=o.left,c=t;90===i.rotateDeg?(n=s,r=l):(n=a,r=u);var f=c-r,d=(f=f>n?n:f<0?0:f)/n;d=d<0?0:d>1?1:d;var h=parseInt(d*this.offsetDuration*1e3,10)/1e3;return{percent:d,currentTime:h,seekTime:gu.getCurrentTimeByOffset(h,i.timeSegments),offset:f,width:n,left:r,e}}},{key:"updateTime",value:function(e){var t=this.player,n=this.duration;e>n?e=n:e<0&&(e=0);var r=t.plugins.time;r&&r.updateTime(e)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var e=this.player.plugins.time;e&&e.resetActive()}},{key:"updatePercent",value:function(e,t){if(this.isProgressMoving=!0,!this.config.disable){e=e>1?1:e<0?0:e,this.progressBtn.style.left="".concat(100*e,"%"),this.innerList.update({played:e*this.offsetDuration},this.offsetDuration);var n=this.player.plugins.miniprogress;n&&n.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var t=this.player,n=this._state,r=this.offsetDuration;if(!(t.isSeeking&&t.media.seeking||this.isProgressMoving)&&t.hasStart){if(n.now>-1){var i=parseInt(1e3*n.now,10)-parseInt(1e3*t.currentTime,10);if(0===n.direc&&i>300||1===n.direc&&i>-300)return void(n.now=-1);n.now=-1}var o=this.currentTime;o=gu.adjustTimeByDuration(o,r,e),this.innerList.update({played:o},r),this.progressBtn.style.left="".concat(o/r*100,"%")}}},{key:"onCacheUpdate",value:function(e){var t=this.player,n=this.duration;if(t){var r=t.bufferedPoint.end;r=gu.adjustTimeByDuration(r,n,e),this.innerList.update({cached:r},n)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0),this.progressBtn.style.left="0%"}},{key:"destroy",value:function(){var e=this.player;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var t=this.domEventType;"touch"!==t&&"compatible"!==t||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),this.root.removeEventListener("touchcancel",this.onMouseUp)),"mouse"!==t&&"compatible"!==t||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),e.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var e=this.player.controls?this.player.controls.config.mode:"";return'\n <xg-progress class="xgplayer-progress '.concat("bottom"===e?"xgplayer-progress-bottom":"",'">\n <xg-outer class="xgplayer-progress-outer">\n <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>\n </xg-outer>\n </xg-progress>\n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_CENTER,index:0,disable:!1,isDraggingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:sd.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return sd}}]),t}(),ud=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"_onMouseenter",function(e){n.emit("icon_mouseenter",{pluginName:n.pluginName})}),Yl(Ql(n),"_onMouseLeave",function(e){n.emit("icon_mouseleave",{pluginName:n.pluginName})}),n}return Kl(t,[{key:"afterCreate",value:function(){this.bind("mouseenter",this._onMouseenter),this.bind("mouseleave",this._onMouseLeave),this.config.disable&&this.disable()}},{key:"destroy",value:function(){this.unbind("mouseenter",this._onMouseenter),this.unbind("mouseleave",this._onMouseLeave)}}]),t}(),cd=function(){Xl(t,ud);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"btnClick",function(e){e.preventDefault(),e.stopPropagation();var t=Ql(n).player;return n.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t.paused,to:!t.paused}),t.ended?t.replay():t.paused?(t.play(),n.animate(!1)):(t.pause(),n.animate(!0)),!1}),n}return Kl(t,[{key:"afterCreate",value:function(){nu(Jl(t.prototype),"afterCreate",this).call(this),this.config.disable||(this.initIcons(),this.bind(["touchend","click"],this.btnClick),this.listenEvents(),this.animate(!0))}},{key:"listenEvents",value:function(){var e=this,t=this.player;this.on([Su,Au,Tu,zu],function(){e.animate(t.paused)})}},{key:"registerIcons",value:function(){return{play:{icon:_f,class:"xg-icon-play"},pause:{icon:Df,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.play),this.appendChild(".xgplayer-icon",e.pause)}},{key:"animate",value:function(e){if(this.player){var t=this.i18nKeys,n=this.find(".xg-tips");e?(this.setAttr("data-state","pause"),n&&this.changeLangTextKey(n,t.PLAY_TIPS)):(this.setAttr("data-state","play"),n&&this.changeLangTextKey(n,t.PAUSE_TIPS))}}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this),this.unbind(["touchend","click"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-play">\n <div class="xgplayer-icon">\n </div>\n '.concat(If(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_LEFT,index:0,disable:!1}}}]),t}();function fd(){return(new DOMParser).parseFromString('<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>\n </g>\n</svg>',"image/svg+xml").firstChild}var dd=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:fd,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){gu.addClass(this.root,"show")}},{key:"hide",value:function(){gu.removeClass(this.root,"show")}},{key:"render",value:function(){return'<xg-icon class="xgplayer-back">\n </xg-icon>'}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:Kc.ROOT_TOP,index:0}}}]),t}();function hd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n',"image/svg+xml").firstChild}function pd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n',"image/svg+xml").firstChild}var gd=function(){Xl(t,ud);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"_onOrientationChange",function(e){n.player.fullscreen&&n.config.rotateFullscreen&&(90===window.orientation||-90===window.orientation?n.player.setRotateDeg(0):n.player.setRotateDeg(90))}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this;nu(Jl(t.prototype),"afterCreate",this).call(this);var n=this.config,r=this.playerConfig;if(!n.disable){n.target&&(this.playerConfig.fullscreenTarget=this.config.target);var i=gu.getFullScreenEl();r.fullscreenTarget===i&&this.player.getFullscreen().catch(function(e){}),this.initIcons(),this.handleFullscreen=this.hook("fullscreenChange",this.toggleFullScreen,{pre:function(t){var n=e.player.fullscreen;e.emitUserAction(t,"switch_fullscreen",{prop:"fullscreen",from:n,to:!n})}}),this.bind(".xgplayer-fullscreen",["touchend","click"],this.handleFullscreen),this.on(nc,function(t){var n=e.find(".xg-tips");n&&e.changeLangTextKey(n,t?e.i18nKeys.EXITFULLSCREEN_TIPS:e.i18nKeys.FULLSCREEN_TIPS),e.animate(t)}),this.config.needBackIcon&&(this.topBackIcon=this.player.registerPlugin({plugin:dd,options:{config:{onClick:function(t){e.handleFullscreen(t)}}}})),"mobile"===wu.device&&window.addEventListener("orientationchange",this._onOrientationChange)}}},{key:"registerIcons",value:function(){return{fullscreen:{icon:hd,class:"xg-get-fullscreen"},exitFullscreen:{icon:pd,class:"xg-exit-fullscreen"}}}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon","mobile"===wu.device?"touchend":"click",this.handleFullscreen),"mobile"===wu.device&&window.removeEventListener("orientationchange",this._onOrientationChange)}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.fullscreen),this.appendChild(".xgplayer-icon",e.exitFullscreen)}},{key:"toggleFullScreen",value:function(e){e&&(e.preventDefault(),e.stopPropagation());var t=this.player,n=this.config;!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen()?(t.fullscreen?t.exitCssFullscreen():t.getCssFullscreen(),this.animate(t.fullscreen)):n.rotateFullscreen?(t.fullscreen?t.exitRotateFullscreen():t.getRotateFullscreen(),this.animate(t.fullscreen)):n.switchCallback&&"function"==typeof n.switchCallback?n.switchCallback(t.fullscreen):t.fullscreen?(t.exitFullscreen(),n.useScreenOrientation&&this.unlockScreen()):(t.getFullscreen().catch(function(e){}),n.useScreenOrientation&&t.aspectRatio>1&&this.lockScreen(n.lockOrientationType))}},{key:"animate",value:function(e){e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.topBackIcon&&(e?(this.topBackIcon.show(),this.hide()):(this.topBackIcon.hide(),this.show()))}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-fullscreen">\n <div class="xgplayer-icon">\n </div>\n '.concat(If(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}},{key:"lockScreen",value:function(e){try{screen.orientation.lock(e).catch(function(e){})}catch(pp){}}},{key:"unlockScreen",value:function(){try{screen.orientation.unlock().catch(function(e){})}catch(pp){}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,useScreenOrientation:!1,lockOrientationType:"landscape",switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),t}(),vd=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),(r=e.call(this,n)).isActiving=!1,r}return Kl(t,[{key:"duration",get:function(){var e=this.player,t=e.offsetDuration,n=e.duration;return this.playerConfig.customDuration||t||n}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var e=this.player.controls.config.mode;this.mode="flex"===e?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=this.find(".time-duration"),this.timeDom=this.find(".time-current"),this.listenEvents())}},{key:"listenEvents",value:function(){var e=this;this.on([Lu,Pu,Iu],function(t){"durationchange"===t.eventName&&(e.isActiving=!1),e.onTimeUpdate()}),this.on(Du,function(){e.onTimeUpdate(!0)}),this.on(zu,function(){e.onReset()})}},{key:"show",value:function(e){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(e){var t=this.player,n=this.config,r=this.duration;if(!n.disable&&!this.isActiving&&t.hasStart){var i=this.currentTime+this.timeOffset;i=gu.adjustTimeByDuration(i,r,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(gu.format(i)),r!==1/0&&r>0&&(this.centerDurDom.innerHTML=gu.format(r))):(this.timeDom.innerHTML=this.minWidthTime(gu.format(i)),r!==1/0&&r>0&&(this.durationDom.innerHTML=gu.format(r)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(gu.format(0)),this.centerDurDom.innerHTML=gu.format(0)):(this.timeDom.innerHTML=this.minWidthTime(gu.format(0)),this.durationDom.innerHTML=gu.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=gu.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=gu.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),t.children.length>0?t.insertBefore(this.centerCurDom,t.children[0]):t.appendChild(this.centerCurDom),t.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var e=this.config;this.duration===1/0||this.playerConfig.isLive?(gu.hide(this.durationDom),gu.hide(this.timeDom),gu.hide(this.find(".time-separator")),gu.show(this.find(".time-live-tag"))):gu.hide(this.find(".time-live-tag")),e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(gu.hide(this.durationDom),gu.hide(this.timeDom),gu.hide(this.find(".time-separator")),gu.show(this.find(".time-live-tag"))):(gu.hide(this.find(".time-live-tag")),gu.show(this.find(".time-separator")),gu.show(this.durationDom),gu.show(this.timeDom))}},{key:"updateTime",value:function(e){this.isActiving=!0,!e&&0!==e||e>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(gu.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(gu.format(e)))}},{key:"minWidthTime",value:function(e){return e.split(":").map(function(e){return'<span class="time-min-width">'.concat(e,"</span>")}).join(":")}},{key:"resetActive",value:function(){var e=this,t=this.player,n=function(){e.isActiving=!1};this.off(Pu,n),t.isSeeking&&t.media.seeking?this.once(Pu,n):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-time">\n <span class="time-current">00:00</span>\n <span class="time-separator">/</span>\n <span class="time-duration">00:00</span>\n <span class="time-live-tag">'.concat(this.i18n.LIVE_TIP,"</span>\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_LEFT,index:2,disable:!1}}}]),t}(),md=function(){Xl(t,Wc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"_onDurationChange",function(){n.updateSegments();var e=n.player,t=e.currentTime,r=e.timeSegments;if(n._checkIfEnabled(r)){var i=gu.getIndexByTime(t,r),o=gu.getOffsetCurrentTime(t,r,i);n.player.offsetCurrentTime=o,n.changeIndex(i,r)}}),Yl(Ql(n),"_onLoadedData",function(){var e=n.player.timeSegments;if(n._checkIfEnabled(e)){var t=gu.getOffsetCurrentTime(0,e);n.player.offsetCurrentTime=t,n.changeIndex(0,e),n.curPos.start>0&&(n.player.currentTime=n.curPos.start)}}),Yl(Ql(n),"_onTimeupdate",function(){var e=n.player,t=e.currentTime,r=e.timeSegments;if(n._checkIfEnabled(r)){var i=r.length;n.lastCurrentTime=t;var o=gu.getIndexByTime(t,r);o!==n.curIndex&&n.changeIndex(o,r);var a=gu.getOffsetCurrentTime(t,r,o);if(n.player.offsetCurrentTime=a,n.curPos){var s=n.curPos,l=s.start,u=s.end;t<l?n.player.currentTime=l:t>u&&o>=i-1&&n.player.pause()}}}),Yl(Ql(n),"_onSeeking",function(){var e=n.player,t=e.currentTime,r=e.timeSegments;if(n._checkIfEnabled(r))if(t<r[0].start)n.player.currentTime=r[0].start;else if(t>r[r.length-1].end)n.player.currentTime=r[r.length-1].end;else{var i=gu.getIndexByTime(t,r);if(i>=0){var o=n.getSeekTime(t,n.lastCurrentTime,i,r);o>=0&&(n.player.currentTime=o)}}}),Yl(Ql(n),"_onPlay",function(){var e=n.player,t=e.currentTime,r=e.timeSegments;n._checkIfEnabled(r)&&t>=r[r.length-1].end&&(n.player.currentTime=r[0].start)}),n}return Kl(t,[{key:"afterCreate",value:function(){this.curIndex=-1,this.curPos=null,this.lastCurrentTime=0,this.updateSegments(),this.on(Lu,this._onDurationChange),this.on(Mu,this._onLoadedData),this.on(Iu,this._onTimeupdate),this.on(Ou,this._onSeeking),this.on(Su,this._onPlay)}},{key:"setConfig",value:function(e){var t=this;if(e){var n=Object.keys(e);n.length<1||(n.forEach(function(n){t.config[n]=e[n]}),this.updateSegments())}}},{key:"updateSegments",value:function(){var e=this.config,t=e.disable,n=e.segments,r=this.player;if(t||!n||0===n.length)r.timeSegments=[],r.offsetDuration=0,r.offsetCurrentTime=-1;else{var i=this.formatTimeSegments(n,r.duration);r.timeSegments=i,r.offsetDuration=i.length>0?i[i.length-1].duration:0}}},{key:"formatTimeSegments",value:function(e,t){var n=[];return e?(e.sort(function(e,t){return e.start-t.start}),e.forEach(function(e,r){var i={};if(i.start=e.start<0?0:e.start,i.end=t>0&&e.end>t?t:e.end,!(t>0&&i.start>t)){n.push(i);var o=i.end-i.start;if(0===r)i.offset=e.start,i.cTime=0,i.segDuration=o,i.duration=o;else{var a=n[r-1];i.offset=a.offset+(i.start-a.end),i.cTime=a.duration+a.cTime,i.segDuration=o,i.duration=a.duration+o}}}),n):[]}},{key:"getSeekTime",value:function(e,t,n,r){var i=-1,o=r[n],a=o.start,s=o.end;if(e>=a&&e<=s)return i;var l=e-t;if(l<0&&e<a){var u=t>a?t-a:0;return n-1>=0?r[n-1].end+l+u:0}return-1}},{key:"_checkIfEnabled",value:function(e){return!(!e||e.length<1)}},{key:"changeIndex",value:function(e,t){this.curIndex=e,e>=0&&t.length>0?this.curPos=t[e]:this.curPos=null}}],[{key:"pluginName",get:function(){return"TimeSegmentsControls"}},{key:"defaultConfig",get:function(){return{disable:!0,segments:[]}}}]),t}();function yd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function bd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n',"image/svg+xml").firstChild}function wd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n',"image/svg+xml").firstChild}var xd=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onBarMousedown",function(e){var t=Ql(n).player,r=n.find(".xgplayer-bar");gu.event(e);var i=r.getBoundingClientRect(),o=gu.getEventPos(e,t.zoom),a=i.height-(o.clientY-i.top);if(o.h=a,o.barH=i.height,n.pos=o,!(a<-2))return n.updateVolumePos(a,e),document.addEventListener("mouseup",n.onBarMouseUp),n._d.isStart=!0,!1}),Yl(Ql(n),"onBarMouseMove",function(e){var t=Ql(n)._d;if(t.isStart){var r=Ql(n),i=r.pos,o=r.player;e.preventDefault(),e.stopPropagation(),gu.event(e);var a=gu.getEventPos(e,o.zoom);t.isMoving=!0;var s=i.h-a.clientY+i.clientY;s>i.barH||n.updateVolumePos(s,e)}}),Yl(Ql(n),"onBarMouseUp",function(e){gu.event(e),document.removeEventListener("mouseup",n.onBarMouseUp);var t=Ql(n)._d;t.isStart=!1,t.isMoving=!1}),Yl(Ql(n),"onMouseenter",function(e){n._d.isActive=!0,n.focus(),n.emit("icon_mouseenter",{pluginName:n.pluginName})}),Yl(Ql(n),"onMouseleave",function(e){n._d.isActive=!1,n.unFocus(100,!1,e),n.emit("icon_mouseleave",{pluginName:n.pluginName})}),Yl(Ql(n),"onVolumeChange",function(e){if(n.player){var t=n.player,r=t.muted,i=t.volume;n._d.isMoving||(n.find(".xgplayer-drag").style.height=r||0===i?"4px":"".concat(100*i,"%"),n.config.showValueLabel&&n.updateVolumeValue()),n.animate(r,i)}}),n}return Kl(t,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:bd,class:"xg-volume-small"},volumeLarge:{icon:yd,class:"xg-volume"},volumeMuted:{icon:wd,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,n=t.commonStyle,r=t.volume;n.volumeColor&&(this.find(".xgplayer-drag").style.backgroundColor=n.volumeColor),this.changeMutedHandler=this.hook("mutedChange",function(t){e.changeMuted(t)},{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==wu.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(Nu,this.onVolumeChange),this.once(Mu,this.onVolumeChange),"Number"!==gu.typeOf(r)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var n=this.player,r=this.find(".xgplayer-drag"),i=this.find(".xgplayer-bar");if(i&&r){var o=parseInt(e/i.getBoundingClientRect().height*1e3,10);r.style.height="".concat(e,"px");var a=Math.max(Math.min(o/1e3,1),0),s={volume:{from:n.volume,to:a}};n.muted&&(s.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:n.muted,volume:n.volume,props:s}),n.volume=Math.max(Math.min(o/1e3,1),0),n.muted&&(n.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,n=e.muted,r=this.find(".xgplayer-value-label"),i=Math.max(Math.min(t,1),0);r.innerText=n?0:Math.round(100*i)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(gu.clearTimeout(this,this._timerId),this._timerId=null),gu.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this._d,o=this.player;i.isActive||(this._timerId&&(gu.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=gu.setTimeout(this,function(){i.isActive||(n?o.blur():o.focus(),gu.removeClass(e.root,"slide-show"),i.isStart&&e.onBarMouseUp(r)),e._timerId=null},t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(gu.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon","mobile"===wu.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){if(!this.config.disable){var e=this.config.default||this.player.volume,t=this.config.showValueLabel;return'\n <xg-icon class="xgplayer-volume" data-state="normal">\n <div class="xgplayer-icon">\n </div>\n <xg-slider class="xgplayer-slider">\n '.concat(t?'<div class="xgplayer-value-label">'.concat(100*e,"</div>"):"",'\n <div class="xgplayer-bar">\n <xg-drag class="xgplayer-drag" style="height: ').concat(100*e,'%"></xg-drag>\n </div>\n </xg-slider>\n </xg-icon>')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),t}();function Cd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-4 -6 40 40" fill="none">\n <g>\n <path transform="scale(1.5 1.5)" d="M11.6665 9.16663H4.1665C2.78579 9.16663 1.6665 10.2859 1.6665 11.6666V15.8333C1.6665 17.214 2.78579 18.3333 4.1665 18.3333H11.6665C13.0472 18.3333 14.1665 17.214 14.1665 15.8333V11.6666C14.1665 10.2859 13.0472 9.16663 11.6665 9.16663Z" fill="white"/>\n <path transform="scale(1.5 1.5)" fill-rule="evenodd" clip-rule="evenodd" d="M3.88148 4.06298C3.75371 4.21005 3.67667 4.40231 3.67749 4.61242C3.67847 4.87253 3.79852 5.10435 3.98581 5.25646L6.99111 8.05895C7.32771 8.37283 7.85502 8.35443 8.16891 8.01782C8.48279 7.68122 8.46437 7.15391 8.12778 6.84003L6.62061 5.43457L9.8198 5.4224C9.82848 5.42239 9.8372 5.42221 9.84591 5.4219C10.9714 5.38233 12.0885 5.6285 13.0931 6.13744C14.0976 6.64635 14.957 7.40148 15.5908 8.33234C16.2246 9.2632 16.6122 10.3394 16.7177 11.4606C16.823 12.5819 16.6427 13.7115 16.1934 14.7442C16.0098 15.1661 16.203 15.6571 16.6251 15.8408C17.0471 16.0243 17.5381 15.8311 17.7216 15.4091C18.2833 14.1183 18.5087 12.7063 18.3771 11.3047C18.2453 9.90318 17.7607 8.55792 16.9684 7.39433C16.1761 6.23073 15.1021 5.28683 13.8463 4.65065C12.5946 4.01651 11.203 3.70872 9.80072 3.75583L6.43415 3.76862L7.96326 2.12885C8.27715 1.79225 8.25872 1.26494 7.92213 0.951061C7.58553 0.63718 7.05822 0.655585 6.74433 0.99219L3.90268 4.0395C3.89545 4.04724 3.88841 4.05509 3.88154 4.06303L3.88148 4.06298Z" fill="white"/>\n </g>\n <defs>\n <clipPath>\n <rect width="40" height="40" fill="white"/>\n </clipPath>\n </defs>\n</svg>\n',"image/svg+xml").firstChild}var Ed=function(){Xl(t,ud);var e=tu(t);function t(n){var r;return Gl(this,t),(r=e.call(this,n)).rotateDeg=r.config.rotateDeg||0,r}return Kl(t,[{key:"afterCreate",value:function(){var e=this;if(!this.config.disable){nu(Jl(t.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.rotate),this.onBtnClick=this.onBtnClick.bind(this),this.bind(".xgplayer-icon",["click","touchend"],this.onBtnClick),this.on(sc,function(){e.rotateDeg&&e.config.innerRotate&&gu.setTimeout(e,function(){e.updateRotateDeg(e.rotateDeg,e.config.innerRotate)},100)});var n=this.player.root;this.rootWidth=n.style.width||n.offsetWidth||n.clientWidth,this.rootHeight=n.style.height||n.offsetHeight||n.clientHeight,this.rotateDeg&&this.updateRotateDeg(this.rotateDeg,this.config.innerRotate)}}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon",["click","touchend"],this.onBtnClick)}},{key:"onBtnClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"rotate"),this.rotate(this.config.clockwise,this.config.innerRotate,1)}},{key:"updateRotateDeg",value:function(e,t){if(e||(e=0),t)this.player.videoRotateDeg=e;else{var n=this.player,r=this.rootWidth,i=this.rootHeight,o=n.root,a=n.innerContainer,s=n.media,l=o.offsetWidth,u=a&&t?a.offsetHeight:o.offsetHeight,c=r,f=i,d=0,h=0;.75!==e&&.25!==e||(c="".concat(u,"px"),f="".concat(l,"px"),d=-(u-l)/2,h=-(l-u)/2);var p="translate(".concat(d,"px,").concat(h,"px) rotate(").concat(e,"turn)"),g={transformOrigin:"center center",transform:p,webKitTransform:p,height:f,width:c},v=t?s:o,m=t?n.getPlugin("poster"):null;Object.keys(g).map(function(e){v.style[e]=g[e],m&&m.root&&(m.root.style[e]=g[e])})}}},{key:"rotate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.player;this.rotateDeg||(this.rotateDeg=0);var i=e?1:-1;this.rotateDeg=(this.rotateDeg+1+.25*i*n)%1,this.updateRotateDeg(this.rotateDeg,t),r.emit(uc,360*this.rotateDeg)}},{key:"registerIcons",value:function(){return{rotate:Cd}}},{key:"render",value:function(){if(!this.config.disable)return'\n <xg-icon class="xgplayer-rotate">\n <div class="xgplayer-icon">\n </div>\n '.concat(If(this,"ROTATE_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"rotate"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:6,innerRotate:!0,clockwise:!1,rotateDeg:0,disable:!1}}}]),t}();function kd(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}function Sd(){return(new DOMParser).parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"\n fill="white" />\n</svg>',"image/svg+xml").firstChild}var _d="picture-in-picture",Dd="inline",Ad="fullscreen",Td=function(){Xl(t,ud);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"switchPIP",function(e){if(!n.isPIPAvailable())return!1;e.stopPropagation&&e.stopPropagation(),n.isPip?(n.exitPIP(),n.emitUserAction(e,"change_pip",{props:"pip",from:!0,to:!1}),n.setAttr("data-state","normal")):4===n.player.media.readyState&&(n.requestPIP(),n.emitUserAction(e,"change_pip",{props:"pip",from:!1,to:!0}),n.setAttr("data-state","pip"))}),n}return Kl(t,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.pip&&(e.config.showIcon=e.player.config.pip)}},{key:"afterCreate",value:function(){var e=this;this.isPIPAvailable()&&(nu(Jl(t.prototype),"afterCreate",this).call(this),this.pMode=Dd,this.initPipEvents(),this.config.showIcon&&this.initIcons(),this.once(Ku,function(){e.config.showIcon&&(gu.removeClass(e.find(".xgplayer-icon"),"xg-icon-disable"),e.bind("click",e.switchPIP))}))}},{key:"registerIcons",value:function(){return{pipIcon:{icon:kd,class:"xg-get-pip"},pipIconExit:{icon:Sd,class:"xg-exit-pip"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.pipIcon),this.appendChild(".xgplayer-icon",e.pipIconExit)}},{key:"initPipEvents",value:function(){var e=this,n=this.player;this.leavePIPCallback=function(){var t=n.paused;gu.setTimeout(e,function(){!t&&n.mediaPlay()},0),!t&&n.mediaPlay(),e.setAttr("data-state","normal"),e.pipWindow=null,n.emit(lc,!1)},this.enterPIPCallback=function(t){n.emit(lc,!0),null!=t&&t.pictureInPictureWindow&&(e.pipWindow=t.pictureInPictureWindow),e.setAttr("data-state","pip")},this.onWebkitpresentationmodechanged=function(t){var r=n.media.webkitPresentationMode;e.pMode===Ad&&r!==Ad&&n.onFullscreenChange(null,!1),e.pMode=r,r===_d?e.enterPIPCallback(t):r===Dd&&e.leavePIPCallback(t)},n.media&&(n.media.addEventListener("enterpictureinpicture",this.enterPIPCallback),n.media.addEventListener("leavepictureinpicture",this.leavePIPCallback),t.checkWebkitSetPresentationMode(n.media)&&n.media.addEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged))}},{key:"copyStyleIntoPiPWindow",value:function(e){var t=ru(document.styleSheets).map(function(t){try{return ru(t.cssRules).map(function(e){return e.cssText}).join("")}catch(pp){var n=document.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media,n.href=t.href,e.document.head.appendChild(n)}return""}).filter(Boolean).join("\n"),n=document.createElement("style");n.textContent=t,e.document.head.appendChild(n)}},{key:"requestPIP",value:function(){var e=this,n=this.player,r=this.playerConfig,i=this.config;if(this.isPIPAvailable()&&!this.isPip)try{var o=r.poster;if(o&&(n.media.poster="String"===gu.typeOf(o)?o:o.poster),i.preferDocument&&this.isDocPIPAvailable()){var a={};if(i.width&&i.height)a.width=i.width,a.height=i.height;else{var s=n.root.getBoundingClientRect();a.width=s.width,a.height=s.height}documentPictureInPicture.requestWindow(a).then(function(t){var r=i.docPiPNode,o=i.docPiPStyle;e.enterPIPCallback();var a=r||n.root,s=a.parentElement,l=a.previousSibling,u=a.nextSibling;e.copyStyleIntoPiPWindow(t);var c=document.createElement("style");if(c.append("body{padding:0; margin:0;}"),o){var f="";"string"==typeof o?f=o:"function"==typeof o&&(f=o.call(i)),f&&c.append(f)}else a===n.root&&c.append("\n .xgplayer{width: 100%!important; height: 100%!important;}\n ");t.document.head.append(c),t.document.body.append(a),t.addEventListener("pagehide",function(t){s&&(u?s.insertBefore(a,u):l?s.insertBefore(a,l.nextSibling):s.appendChild(a)),e.leavePIPCallback()},{once:!0})})}else t.checkWebkitSetPresentationMode(n.media)?n.media.webkitSetPresentationMode("picture-in-picture"):n.media.requestPictureInPicture();return!0}catch(l){return console.error("requestPiP",l),!1}}},{key:"exitPIP",value:function(){var e=this.player;try{var n;return this.isPIPAvailable()&&this.isPip&&(this.isDocPIPAvailable()&&null!==(n=documentPictureInPicture)&&void 0!==n&&n.window?documentPictureInPicture.window.close():t.checkWebkitSetPresentationMode(e.media)?e.media.webkitSetPresentationMode("inline"):document.exitPictureInPicture()),!0}catch(r){return console.error("exitPIP",r),!1}}},{key:"isPip",get:function(){var e,t=this.player;return!(!this.isDocPIPAvailable()||null===(e=documentPictureInPicture)||void 0===e||!e.window)||document.pictureInPictureElement&&document.pictureInPictureElement===t.media||t.media.webkitPresentationMode===_d}},{key:"isPIPAvailable",value:function(){var e=this.player.media;return"Boolean"===gu.typeOf(document.pictureInPictureEnabled)&&document.pictureInPictureEnabled&&("Boolean"===gu.typeOf(e.disablePictureInPicture)&&!e.disablePictureInPicture||e.webkitSupportsPresentationMode&&"Function"===gu.typeOf(e.webkitSetPresentationMode))||this.isDocPIPAvailable()}},{key:"isDocPIPAvailable",value:function(){return"documentPictureInPicture"in window&&/^(https|file)/.test(location.protocol)}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this);var e=this.player;e.media.removeEventListener("enterpictureinpicture",this.enterPIPCallback),e.media.removeEventListener("leavepictureinpicture",this.leavePIPCallback),t.checkWebkitSetPresentationMode(e.media)&&e.media.removeEventListener("webkitpresentationmodechanged",this.onWebkitpresentationmodechanged),this.exitPIP(),this.unbind("click",this.btnClick)}},{key:"render",value:function(){if(this.config.showIcon&&this.isPIPAvailable())return'<xg-icon class="xgplayer-pip">\n <div class="xgplayer-icon xg-icon-disable">\n </div>\n '.concat(If(this,"PIP",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:6,showIcon:!1,preferDocument:!1,width:void 0,height:void 0,docPiPNode:void 0,docPiPStyle:void 0}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),t}();function Od(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="40" viewBox="10 0 24 40">\n <path transform="scale(0.038 0.028)" d="M800 380v768h-128v-352l-320 320v-704l320 320v-352z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Pd,Id=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"playNext",function(e){var t=Ql(r).player;e.preventDefault(),e.stopPropagation(),r.idx+1<r.config.urlList.length?(r.idx++,r.nextHandler(r.config.urlList[r.idx],r.idx),t.emit(fc,r.idx+1)):(r.nextHandler(),t.emit(fc))}),r.idx=-1,r}return Kl(t,[{key:"afterCreate",value:function(){this.config.urlList&&0!==this.config.urlList.length&&(this.appendChild(".xgplayer-icon",this.icons.playNext),this.initEvents())}},{key:"registerIcons",value:function(){return{playNext:Od}}},{key:"initEvents",value:function(){this.nextHandler=this.hook("nextClick",this.changeSrc);var e="mobile"===wu.device?"touchend":"click";this.bind(e,this.playNext),this.show()}},{key:"changeSrc",value:function(e){var t=this.player;e&&(t.pause(),t.currentTime=0,t.switchURL?t.switchURL(e):t.src=e,t.config.url=e,t.play())}},{key:"destroy",value:function(){this.unbind(["touchend","click"],this.playNext)}},{key:"render",value:function(){if(this.config.urlList&&0!==this.config.urlList.length)return'\n <xg-icon class="xgplayer-playnext">\n <div class="xgplayer-icon">\n </div>\n '.concat(If(this,"PLAYNEXT_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>\n ")}}],[{key:"pluginName",get:function(){return"playNext"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_LEFT,index:1,url:null,urlList:[]}}}]),t}(),Fd={exports:{}},Bd=(Pd||(Pd=1,Fd.exports=function e(t,n,r){var i,o,a=window,s="application/octet-stream",l=r||s,u=t,c=!n&&!r&&u,f=document.createElement("a"),d=function(e){return String(e)},h=a.Blob||a.MozBlob||a.WebKitBlob||d,p=n||"download";if(h=h.call?h.bind(a):Blob,"true"===String(this)&&(l=(u=[u,l])[0],u=u[1]),c&&c.length<2048&&(p=c.split("/").pop().split("?")[0],f.href=c,-1!==f.href.indexOf(c))){var g=new XMLHttpRequest;return g.open("GET",c,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,p,s)},setTimeout(function(){g.send()},0),g}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u)){if(!(u.length>2096103.424&&h!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(u),p):w(u);l=(u=b(u)).type||s}else if(/([\x80-\xff])/.test(u)){for(var v=0,m=new Uint8Array(u.length),y=m.length;v<y;++v)m[v]=u.charCodeAt(v);u=new h([m],{type:l})}function b(e){for(var t=e.split(/[:;,]/),n=t[1],r=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),i=r.length,o=0,a=new Uint8Array(i);o<i;++o)a[o]=r.charCodeAt(o);return new h([a],{type:n})}function w(e,t){if("download"in f)return f.href=e,f.setAttribute("download",p),f.className="download-js-link",f.innerHTML="downloading...",f.style.display="none",document.body.appendChild(f),setTimeout(function(){f.click(),document.body.removeChild(f),!0===t&&setTimeout(function(){a.URL.revokeObjectURL(f.href)},250)},66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var n=document.createElement("iframe");document.body.appendChild(n),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,s)),n.src=e,setTimeout(function(){document.body.removeChild(n)},333)}if(i=u instanceof h?u:new h([u],{type:l}),navigator.msSaveBlob)return navigator.msSaveBlob(i,p);if(a.URL)w(a.URL.createObjectURL(i),!0);else{if("string"==typeof i||i.constructor===d)try{return w("data:"+l+";base64,"+a.btoa(i))}catch(x){return w("data:"+l+","+encodeURIComponent(i))}(o=new FileReader).onload=function(e){w(this.result)},o.readAsDataURL(i)}return!0}),Fd.exports);const Ld=Le(Bd);function Nd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-488.000000, -340.000000)" fill="#FFFFFF">\n <g id="Group-2">\n <g id="volme_big-copy" transform="translate(488.000000, 340.000000)">\n <rect id="Rectangle-18" x="11" y="4" width="2" height="12" rx="1"></rect>\n <rect id="Rectangle-2" x="3" y="18" width="18" height="2" rx="1"></rect>\n <rect id="Rectangle-2" transform="translate(4.000000, 17.500000) rotate(90.000000) translate(-4.000000, -17.500000) " x="1.5" y="16.5" width="5" height="2" rx="1"></rect><rect id="Rectangle-2-Copy-3" transform="translate(20.000000, 17.500000) rotate(90.000000) translate(-20.000000, -17.500000) " x="17.5" y="16.5" width="5" height="2" rx="1"></rect>\n <path d="M9.48791171,8.26502656 L9.48791171,14.2650266 C9.48791171,14.8173113 9.04019646,15.2650266 8.48791171,15.2650266 C7.93562696,15.2650266 7.48791171,14.8173113 7.48791171,14.2650266 L7.48791171,7.26502656 C7.48791171,6.71274181 7.93562696,6.26502656 8.48791171,6.26502656 L15.4879117,6.26502656 C16.0401965,6.26502656 16.4879117,6.71274181 16.4879117,7.26502656 C16.4879117,7.81731131 16.0401965,8.26502656 15.4879117,8.26502656 L9.48791171,8.26502656 Z" id="Combined-Shape" transform="translate(11.987912, 10.765027) scale(1, -1) rotate(45.000000) translate(-11.987912, -10.765027) "></path>\n </g>\n </g>\n </g>\n </g>\n</svg>\n',"image/svg+xml").firstChild}var Md=function(){Xl(t,ud);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"download",function(e){if(!r.isLock){r.emitUserAction(e,"download");var t=r.playerConfig.url,n="";"String"===gu.typeOf(t)?n=t:"Array"===gu.typeOf(t)&&t.length>0&&(n=t[0].src);var i=r.getAbsoluteURL(n);Ld(i),r.isLock=!0,r.timer=window.setTimeout(function(){r.isLock=!1,window.clearTimeout(r.timer),r.timer=null},300)}}),r.timer=null,r.isLock=!1,r}return Kl(t,[{key:"afterCreate",value:function(){nu(Jl(t.prototype),"afterCreate",this).call(this),this.config.disable||(this.appendChild(".xgplayer-icon",this.icons.download),this._handler=this.hook("click",this.download,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this._handler))}},{key:"registerIcons",value:function(){return{download:Nd}}},{key:"getAbsoluteURL",value:function(e){if(!e.match(/^https?:\/\//)){var t=document.createElement("div");t.innerHTML='<a href="'.concat(e,'">x</a>'),e=t.firstChild.href}return e}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.download),window.clearTimeout(this.timer),this.timer=null}},{key:"render",value:function(){if(!this.config.disable)return'<xg-icon class="xgplayer-download">\n <div class="xgplayer-icon">\n </div>\n '.concat(If(this,"DOWNLOAD_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"download"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:3,disable:!0}}}]),t}(),Rd=function(){Xl(t,ud);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.screenShot&&(e.config.disable=!e.player.config.screenShot)}},{key:"afterCreate",value:function(){nu(Jl(t.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.screenshotIcon);var e=this.config;this.initSize=function(t){e.fitVideo&&(e.width=t.vWidth,e.height=t.vHeight)},this.once(sc,this.initSize)}},{key:"onPluginsReady",value:function(){this.show(),this.onClickBtn=this.onClickBtn.bind(this),this.bind(["click","touchend"],this.onClickBtn)}},{key:"saveScreenShot",value:function(e,t){var n,r=document.createElement("a");r.href=e,r.download=t;try{"undefined"!=typeof MouseEvent?n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}):(n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}catch(pp){console.error("MouseEvent unsupported",pp)}n&&r.dispatchEvent(n)}},{key:"createCanvas",value:function(e,t){var n=document.createElement("canvas"),r=n.getContext("2d");this.canvasCtx=r,this.canvas=n,n.width=e||this.config.width,n.height=t||this.config.height,r.imageSmoothingEnabled=!0,r.imageSmoothingEnabled&&(r.imageSmoothingQuality="high")}},{key:"onClickBtn",value:function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"shot");var n=this.config;this.shot(n.width,n.height).then(function(e){t.emit(cc,e),n.saveImg&&t.saveScreenShot(e,n.name+n.format)})}},{key:"shot",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{quality:.92,type:"image/png"},i=this.config,o=this.player,a=r.quality||i.quality,s=r.type||i.type;return new Promise(function(r,l){var u,c=null;if(o.media.canvas)c=o.media.canvas;else{n.canvas?(n.canvas.width=e||i.width,n.canvas.height=t||i.height):n.createCanvas(e,t),c=n.canvas,u=n.canvasCtx;var f,d,h,p,g=o.media.videoWidth/o.media.videoHeight,v=c.width/c.height,m=o.media.videoWidth,y=o.media.videoHeight;g>v?(h=c.width,p=c.width/g,f=0,d=Math.round((c.height-p)/2)):g===v?(h=c.width,p=c.height,f=0,d=0):g<v&&(h=c.height*g,p=c.height,f=Math.round((c.width-h)/2),d=0),u.drawImage(o.media,0,0,m,y,f,d,h,p)}var b=c.toDataURL(s,a).replace(s,"image/octet-stream");r(b=b.replace(/^data:image\/[^;]+/,"data:application/octet-stream"))})}},{key:"registerIcons",value:function(){return{screenshotIcon:null}}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.onClickBtn),this.off(sc,this.initSize)}},{key:"render",value:function(){if(!this.config.disable){var e=this.icons.screenshotIcon?"xgplayer-icon":"xgplayer-icon btn-text",t="SCREENSHOT";return'\n <xg-icon class="xgplayer-shot">\n <div class="'.concat(e,'">\n ').concat(this.icons.screenshotIcon?"":'<span lang-key="'.concat(this.i18nKeys[t],'">').concat(this.i18n[t],"</span>"),"\n </div>\n </xg-icon>")}}}],[{key:"pluginName",get:function(){return"screenShot"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:5,quality:.92,type:"image/png",format:".png",width:600,height:337,saveImg:!0,fitVideo:!0,disable:!1,name:"screenshot"}}}]),t}(),jd=function(){function e(t){Gl(this,e),this.config=t.config,this.parent=t.root,this.root=gu.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var n=this.config.maxHeight;n&&this.setStyle({maxHeight:n}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var r="touch"===this.config.domEventType?"touchend":"click";this._delegates=Zc.delegate.call(this,this.root,"li",r,this.onItemClick)}return Kl(e,[{key:"renderItemList",value:function(e){var t=this,n=this.config,r=this.root;e?n.data=e:e=n.data,n.style&&Object.keys(n.style).map(function(e){r.style[e]=n[e]}),e.length>0&&(this.attrKeys=Object.keys(e[0])),this.root.innerHTML="",e.map(function(e,n){var r=e.selected?"option-item selected":"option-item";e["data-index"]=n,t.root.appendChild(gu.createDom("li","<span>".concat(e.showText,"</span>"),e,r))})}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&gu.hasClass(t,"selected"))return!1;var n="function"==typeof this.config.onItemClick?this.config.onItemClick:null,r=this.root.querySelector(".selected");gu.addClass(t,"selected"),r&&gu.removeClass(r,"selected"),n(e,{from:r?this.getAttrObj(r,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var n={};t.map(function(t){n[t]=e.getAttribute(t)});var r=e.getAttribute("data-index");return r&&(n.index=Number(r)),n}},{key:"show",value:function(){gu.removeClass(this.root,"hide"),gu.addClass(this.root,"active")}},{key:"hide",value:function(){gu.removeClass(this.root,"active"),gu.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.root.style[n]=e[n]})}},{key:"destroy",value:function(){this._delegates&&(this._delegates.map(function(e){e.destroy&&e.destroy()}),this._delegates=null),this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}(),Hd="side",zd="middle",Ud="click",$d="mobile"===wu.device,Wd=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"onEnter",function(e){e.stopPropagation(),r.emit("icon_mouseenter",{pluginName:r.pluginName}),r.switchActiveState(e)}),Yl(Ql(r),"switchActiveState",function(e){e.stopPropagation(),r.config.toggleMode===Ud?r.toggle(!r.isActive):r.toggle(!0)}),Yl(Ql(r),"onLeave",function(e){e.stopPropagation(),r.emit("icon_mouseleave",{pluginName:r.pluginName}),r.config.listType!==Hd&&r.isActive&&r.toggle(!1)}),Yl(Ql(r),"onListEnter",function(e){r.enterType=2}),Yl(Ql(r),"onListLeave",function(e){r.enterType=0,r.isActive&&r.toggle(!1)}),r.isIcons=!1,r.isActive=!1,r.curValue=null,r.curIndex=0,r}return Kl(t,[{key:"updateLang",value:function(e){this.renderItemList(this.config.list,this.curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.initIcons(),($d=$d||"touch"===this.domEventType)&&"mobile"===wu.device&&"default"===t.listType&&(t.listType=Hd),t.hidePortrait&&gu.addClass(this.root,"portrait"),this.on([sc,nc],function(){e._resizeList()}),this.once(Bu,function(){t.list&&t.list.length>0&&(e.renderItemList(t.list),e.show())}),$d&&this.on(Uu,function(){e.isActive&&(e.optionsList&&e.optionsList.hide(),e.isActive=!1)}),$d?(t.toggleMode=Ud,this.activeEvent="touchend"):this.activeEvent=t.toggleMode===Ud?"click":"mouseenter",t.toggleMode===Ud?this.bind(this.activeEvent,this.switchActiveState):(this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)),this.isIcons&&this.bind("click",this.onIconClick)}},{key:"initIcons",value:function(){var e=this,t=this.icons,n=Object.keys(t),r=!1;n.length>0&&(n.forEach(function(n){e.appendChild(".xgplayer-icon",t[n]),!r&&(r=t[n])}),this.isIcons=r),r||(this.appendChild(".xgplayer-icon",gu.createDom("span","",{},"icon-text")),gu.addClass(this.find(".xgplayer-icon"),"btn-text"))}},{key:"show",value:function(e){!this.config.list||this.config.list.length<2||gu.addClass(this.root,"show")}},{key:"hide",value:function(){gu.removeClass(this.root,"show")}},{key:"getTextByLang",value:function(e,t,n){if(void 0===e)return"";var r=this.config.list;!n&&(n=this.player.lang),t=!t||gu.isUndefined(e[t])?"text":t,"number"==typeof e&&(e=r[e]);try{return"object"===Vl(e[t])?e[t][n]||e[t].en:e[t]}catch(i){return console.warn(i),""}}},{key:"toggle",value:function(e){if(e!==this.isActive&&!this.config.disable){var t=this.player.controls,n=this.config.listType;e?(n===Hd?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(n===Hd?t.focus():t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this.isActive=e}}},{key:"onItemClick",value:function(e,t){e.stopPropagation();var n=this.config,r=n.listType,i=n.list;this.curIndex=t.to.index,this.curItem=i[this.curIndex],this.changeCurrentText(),(this.config.isItemClickHide||$d||r===Hd)&&this.toggle(!1)}},{key:"onIconClick",value:function(e){}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e=this.config.list,t=e[this.curIndex<e.length?this.curIndex:0];t&&(this.find(".icon-text").innerHTML=this.getTextByLang(t,"iconText"))}}},{key:"renderItemList",value:function(e,t){var n=this,r=this.config,i=this.optionsList,o=this.player;if("number"==typeof t&&(this.curIndex=t,this.curItem=r.list[t]),i)return i.renderItemList(e),void this.changeCurrentText();var a,s,l={config:{data:e||[],className:(a=r.listType,s=r.position,a===Hd?s===Kc.CONTROLS_LEFT?"xg-side-list xg-left-side":"xg-side-list xg-right-side":""),onItemClick:function(e,t){n.onItemClick(e,t)},domEventType:$d?"touch":"mouse"},root:r.listType===Hd?o.innerContainer||o.root:this.root};if(this.config.isShowIcon){var u=this.player.root.getBoundingClientRect().height,c=r.listType===zd?u-50:u;c&&r.heightLimit&&(l.config.maxHeight="".concat(c,"px")),this.optionsList=new jd(l),this.changeCurrentText(),this.show()}this._resizeList()}},{key:"_resizeList",value:function(){if(this.config.heightLimit){var e=this.player.root.getBoundingClientRect().height,t=this.config.listType===zd?e-50:e;this.optionsList&&this.optionsList.setStyle({maxHeight:"".concat(t,"px")})}}},{key:"destroy",value:function(){this.config.toggleMode===Ud?this.unbind(this.activeEvent,this.switchActiveState):(this.unbind(this.activeEvent,this.onEnter),this.unbind("mouseleave",this.onLeave)),this.isIcons&&this.unbind("click",this.onIconClick),this.optionsList&&(this.optionsList.destroy(),this.optionsList=null)}},{key:"render",value:function(){if(this.config.isShowIcon)return'<xg-icon class="xg-options-icon '.concat(this.config.className||"",'">\n <div class="xgplayer-icon">\n </div>\n </xg-icon>')}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:100,list:[],listType:"default",listStyle:{},hidePortrait:!0,isShowIcon:!1,isItemClickHide:!0,toggleMode:"hover",heightLimit:!0}}}]),t}(),Vd=function(){Xl(t,Wd);var e=tu(t);function t(n){var r;return Gl(this,t),(r=e.call(this,n)).curTime=0,r.isPaused=!0,r}return Kl(t,[{key:"beforeCreate",value:function(e){var t=e.config.list;Array.isArray(t)&&t.length>0&&(e.config.list=t.map(function(e){return!e.text&&e.name&&(e.text=e.name),e.text||(e.text=e.definition),e}))}},{key:"afterCreate",value:function(){var e=this;nu(Jl(t.prototype),"afterCreate",this).call(this),this.on("resourceReady",function(t){e.changeDefinitionList(t)}),this.on(oc,function(t){e.renderItemList(e.config.list,t.to)}),this.player.definitionList.length<2&&this.hide()}},{key:"show",value:function(e){!this.config.list||this.config.list.length<2||gu.addClass(this.root,"show")}},{key:"initDefinition",value:function(){var e=this.config,t=e.list,n=e.defaultDefinition;if(t.length>0){var r=null;t.map(function(e){e.definition===n&&(r=e)}),r||(r=t[0]),this.changeDefinition(r)}}},{key:"renderItemList",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.list||[],r=arguments.length>1?arguments[1]:void 0,i=r&&r.definition?r.definition:this.config.defaultDefinition;r&&n.forEach(function(e){e.selected=!1});var o=0,a=n.map(function(t,n){var r=Wl(Wl({},t),{},{showText:e.getTextByLang(t)||t.definition,selected:!1});return(t.selected||t.definition&&t.definition==i)&&(r.selected=!0,o=n),r});nu(Jl(t.prototype),"renderItemList",this).call(this,a,o)}},{key:"changeDefinitionList",value:function(e){Array.isArray(e)&&(this.config.list=e.map(function(e){return!e.text&&e.name&&(e.text=e.name),e.text||(e.text=e.definition),e}),this.renderItemList(),this.config.list.length<2?this.hide():this.show())}},{key:"changeDefinition",value:function(e,t){this.player.changeDefinition(e,t)}},{key:"onItemClick",value:function(e,n){var r=this.player.definitionList;nu(Jl(t.prototype),"onItemClick",this).apply(this,arguments),this.emitUserAction(e,"change_definition",{from:n.from,to:n.to});for(var i=0;i<r.length;i++)n.to&&r[i].definition===n.to.definition&&(n.to.url=r[i].url),n.from&&r[i].definition===n.from.definition&&(n.from.url=r[i].url);this.player.changeDefinition(n.to,n.from)}}],[{key:"pluginName",get:function(){return"definition"}},{key:"defaultConfig",get:function(){return Wl(Wl({},Wd.defaultConfig),{},{position:Kc.CONTROLS_RIGHT,index:3,list:[],defaultDefinition:"",disable:!1,hidePortrait:!1,className:"xgplayer-definition",isShowIcon:!0})}}]),t}(),Gd=function(){Xl(t,Wd);var e=tu(t);function t(n){var r;return Gl(this,t),(r=e.call(this,n)).curRate=1,r}return Kl(t,[{key:"beforeCreate",value:function(e){var t=e.player.config.playbackRate,n=t?Array.isArray(t)?t:e.config.list:[];Array.isArray(n)&&(e.config.list=n.map(function(e){return"number"==typeof e?e={rate:e,text:"".concat(e,"x")}:!e.text&&e.rate&&(e.text="".concat(e.rate,"x")),e}))}},{key:"afterCreate",value:function(){var e=this;nu(Jl(t.prototype),"afterCreate",this).call(this),this.on(Ru,function(){e.curValue!==e.player.playbackRate&&e.renderItemList()}),this.renderItemList()}},{key:"show",value:function(e){this.config.list&&0!==this.config.list.length&&nu(Jl(t.prototype),"show",this).call(this)}},{key:"onItemClick",value:function(e,n){nu(Jl(t.prototype),"onItemClick",this).call(this,e,n);var r=e.delegateTarget,i=Number(r.getAttribute("rate"));if(!i||i===this.curValue)return!1;var o={playbackRate:{from:this.player.playbackRate,to:i}};this.emitUserAction(e,"change_rate",{props:o}),this.curValue=i,this.player.playbackRate=i}},{key:"renderItemList",value:function(){var e=this,n=this.player.playbackRate||1;this.curValue=n;var r=-1,i=this.config.list.map(function(t,i){var o={rate:t.rate};return o.rate===n&&(o.selected=!0,r=i),o.showText=e.getTextByLang(t),o});nu(Jl(t.prototype),"renderItemList",this).call(this,i,r)}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e,t=this.config.list,n=t[this.curIndex<t.length?this.curIndex:0];e=!n||this.curIndex<0?"".concat(this.player.playbackRate,"x"):this.getTextByLang(n,"iconText"),this.find(".icon-text").innerHTML=e}}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this)}}],[{key:"pluginName",get:function(){return"playbackRate"}},{key:"defaultConfig",get:function(){return Wl(Wl({},Wd.defaultConfig),{},{position:Kc.CONTROLS_RIGHT,index:4,list:[2,1.5,1,.75,.5],className:"xgplayer-playbackrate",isShowIcon:!0,hidePortrait:!1})}}]),t}();function qd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" class=\'path_full\' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}function Kd(){return(new DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n',"image/svg+xml").firstChild}var Yd=function(){Xl(t,ud);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.cssFullscreen&&(e.config.disable=!e.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var e=this;nu(Jl(t.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(rc,function(t){e.animate(t)}),this.btnClick=this.btnClick.bind(this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,t=this.find(".xgplayer-icon");t.appendChild(e.cssFullscreen),t.appendChild(e.exitCssFullscreen)}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player.isCssfullScreen;this.emitUserAction(e,"switch_cssfullscreen",{cssfullscreen:t}),t?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){var t=this.i18nKeys,n=this.find(".xg-tips");n&&this.changeLangTextKey(n,e?t.EXITCSSFULLSCREEN_TIPS:t.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:qd,class:"xg-get-cssfull"},exitCssFullscreen:{icon:Kd,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){nu(Jl(t.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"<xg-icon class='xgplayer-cssfullscreen'>\n <div class=\"xgplayer-icon\">\n </div>\n ".concat(If(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n </xg-icon>")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:Kc.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),t}(),Xd=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"afterCreate",value:function(){var e=this;this.clickHandler=this.hook("errorRetry",this.errorRetry,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.onError=this.hook("showError",this.handleError),this.bind(".xgplayer-error-refresh","click",this.clickHandler),this.on(Tu,function(t){e.onError(t)})}},{key:"errorRetry",value:function(e){this.emitUserAction(e,"error_retry",{}),this.player.retry()}},{key:"handleError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.player,n=e.errorType,r=t.errorNote?this.i18n[t.errorNote]:"";if(!r)switch(n){case"decoder":r=this.i18n.MEDIA_ERR_DECODE;break;case"network":r=this.i18n.MEDIA_ERR_NETWORK;break;default:r=this.i18n.MEDIA_ERR_SRC_NOT_SUPPORTED}this.find(".xgplayer-error-text").innerHTML=r,this.find(".xgplayer-error-tips").innerHTML="".concat(this.i18n.REFRESH_TIPS,'<span class="xgplayer-error-refresh">').concat(this.i18n.REFRESH,"</span>")}},{key:"destroy",value:function(){this.unbind(".xgplayer-error-refresh","click",this.clickHandler)}},{key:"render",value:function(){return'<xg-error class="xgplayer-error">\n <div class="xgplayer-errornote">\n <span class="xgplayer-error-text"></span>\n <span class="xgplayer-error-tips"><em class="xgplayer-error-refresh"></em></span>\n </div>\n </xg-error>'}}],[{key:"pluginName",get:function(){return"error"}}]),t}(),Jd=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"afterCreate",value:function(){var e=this;this.intervalId=0,this.customConfig=null,this.bind(".highlight",["click","touchend"],function(t){(e.config.onClick||e.customOnClick)&&(t.preventDefault(),t.stopPropagation(),e.customOnClick?e.customOnClick(t):e.config.onClick(t))}),this.player.showPrompt=function(){e.showPrompt.apply(e,arguments)},this.player.hidePrompt=function(){e.hide()}}},{key:"setStyle",value:function(e){var t=this;Object.keys(e).map(function(n){t.root.style[n]=e[n]})}},{key:"showPrompt",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){this.customOnClick=r;var i=this.config.interval;if(this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),gu.addClass(this.root,"show"),"arrow"===n.mode&&gu.addClass(this.root,"arrow"),this.find(".xgplayer-prompt-detail").innerHTML="string"==typeof e?e:"".concat(e.text||"")+"".concat(e.highlight?'<i class="highlight">'.concat(e.highlight,"</i>"):""),n.style&&this.setStyle(n.style),"boolean"==typeof n.autoHide?n.autoHide:this.config.autoHide){var o=n.interval||i;this.intervalId=setTimeout(function(){t.hide()},o)}}}},{key:"hide",value:function(){gu.removeClass(this.root,"show"),gu.removeClass(this.root,"arrow"),this.root.removeAttribute("style"),this.customOnClick=null}},{key:"render",value:function(){return'<xg-prompt class="xgplayer-prompt '.concat(nf.CONTROLS_FOLLOW,'">\n <span class="xgplayer-prompt-detail"></span>\n </xg-prompt>')}}],[{key:"pluginName",get:function(){return"prompt"}},{key:"defaultConfig",get:function(){return{interval:3e3,style:{},mode:"arrow",autoHide:!0,detail:{text:"",highlight:""},onClick:function(){}}}}]),t}(),Zd={time:0,text:"",id:1,duration:1,color:"#fff",style:{},width:6,height:6};function Qd(e){Object.keys(Zd).map(function(t){void 0===e[t]&&(e[t]=Zd[t])})}var eh={_updateDotDom:function(e,t){if(t){var n=this.calcuPosition(e.time,e.duration),r=e.style||{};r.left="".concat(n.left,"%"),r.width="".concat(n.width,"%"),t.setAttribute("data-text",e.text),t.setAttribute("data-time",e.time),n.isMini?gu.addClass(t,"mini"):gu.removeClass(t,"mini"),Object.keys(r).map(function(e){t.style[e]=r[e]})}},initDots:function(){var e=this;this._ispots.map(function(t){e.createDot(t,!1)}),this.ispotsInit=!0},createDot:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.player.plugins.progress;if(n&&(t&&(Qd(e),this._ispots.push(e)),this.ispotsInit||!t)){var r=this.calcuPosition(e.time,e.duration),i=e.style||{};i.left="".concat(r.left,"%"),i.width="".concat(r.width,"%");var o="xgspot_".concat(e.id," xgplayer-spot");r.isMini&&(o+=" mini");var a=e.template?'<div class="xgplayer-spot-pop">'.concat(e.template,"</div>"):"",s=gu.createDom("xg-spot",a,{"data-text":e.text,"data-time":e.time,"data-id":e.id},o);Object.keys(i).map(function(e){s.style[e]=i[e]}),n.outer&&n.outer.appendChild(s),this.positionDot(s,e.id)}},findDot:function(e){if(this.player.plugins.progress){var t=this._ispots.filter(function(t,n){return t.id===e});return t.length>0?t[0]:null}},updateDot:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.player.plugins.progress;if(n){var r=this.findDot(e.id);if(r&&Object.keys(e).map(function(t){r[t]=e[t]}),this.ispotsInit){var i=n.find('xg-spot[data-id="'.concat(e.id,'"]'));i&&(this._updateDotDom(e,i),t&&this.showDot(e.id))}}},deleteDot:function(e){var t=this._ispots,n=this.player.plugins.progress;if(n){for(var r=[],i=0;i<t.length;i++)t[i].id===e&&r.push(i);for(var o=r.length-1;o>=0;o--)if(t.splice(r[o],1),this.ispotsInit){var a=n.find('xg-spot[data-id="'.concat(e,'"]'));a&&a.parentElement.removeChild(a)}}},deleteAllDots:function(){var e=this.player.plugins.progress;if(e)if(this.ispotsInit){for(var t=e.root.getElementsByTagName("xg-spot"),n=t.length-1;n>=0;n--)e.outer.removeChild(t[n]);this._ispots=[]}else this._ispots=[]},updateAllDots:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.player.plugins.progress;if(n)if(this.ispotsInit){this._ispots=[];var r=n.root.getElementsByTagName("xg-spot"),i=r.length;if(i>t.length)for(var o=i-1;o>t.length-1;o--)n.outer.removeChild(r[o]);t.forEach(function(t,n){n<i?(r[n].setAttribute("data-id","".concat(t.id)),e._ispots.push(t),e.updateDot(t)):e.createDot(t)})}else this._ispots=t},positionDots:function(){var e=this,t=this._ispots,n=this.playerSize,r=this.player.sizeInfo,i=this.player.plugins.progress;i&&r.width!==n.width&&(n.width=r.width,n.left=r.left,t.forEach(function(t){var n=i.find('xg-spot[data-id="'.concat(t.id,'"]'));n&&e.positionDot(n,t.id)}))},positionDot:function(e,t){var n=gu.findDom(e,".xgplayer-spot-pop");if(n){var r=this.playerSize,i=e.getBoundingClientRect(),o=n.getBoundingClientRect(),a=i.left-r.left,s=r.width-a-i.width/2;if(a<o.width/2||r.width<o.width){var l=o.width/2-a;n.style.left="".concat(l,"px")}else if(s<o.width/2){var u=s-o.width/2+i.width/2;n.style.left="".concat(u,"px")}else n.style.left="50%"}},updateDuration:function(){var e=this,t=this.player.plugins.progress;t&&this._ispots.forEach(function(n){var r=t.find('xg-spot[data-id="'.concat(n.id,'"]'));e._updateDotDom(n,r)})},getAllDotsDom:function(){var e=this.player.plugins.progress;return e?e.root.getElementsByTagName("xg-spot"):[]},getDotDom:function(e){var t=this.player.plugins.progress;if(t)return t.find('xg-spot[data-id="'.concat(e,'"]'))}},th={dragmove:"onProgressMove",dragstart:"onProgressDragStart",dragend:"onProgressDragEnd",click:"onProgressClick",mouseover:"onProgressMouseOver",mouseenter:"onProgressMouseOver"},nh=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),Yl(Ql(r=e.call(this,n)),"onMousemove",function(e){r.config.disable||(gu.hasClass(e.target,"xg-spot-content")&&r.config.isHideThumbnailHover?r.player.plugins.progress.onMouseLeave(e):(r._state.f||gu.hasClass(e.target,"xg-spot-content"))&&(gu.event(e),e.stopPropagation()))}),Yl(Ql(r),"onMousedown",function(e){r.config.disable||(r._state.f||gu.hasClass(e.target,"xg-spot-content"))&&(gu.event(e),e.stopPropagation())}),Yl(Ql(r),"onMouseup",function(e){if(r.isDrag){var t=r.player.plugins.progress;t&&t.pos&&(t.onMouseUp(e),!t.pos.isEnter&&t.onMouseLeave(e))}}),Yl(Ql(r),"onDotMouseLeave",function(e){if(!r.config.disable){r._curDot.removeEventListener("mouseleave",r.onDotMouseLeave),r.blurDot(e.target),r._curDot=null;var t=r.player.plugins.progress;t&&t.enableBlur(),r.show()}}),Yl(Ql(r),"onProgressMouseOver",function(e,t){if(!r.config.disable&&gu.hasClass(t.target,"xgplayer-spot")&&!r._curDot){r._curDot=t.target,r.focusDot(t.target),r._curDot.children.length>0&&r.hide();var n=r.player.plugins.progress;n&&n.disableBlur(),r._curDot.addEventListener("mouseleave",r.onDotMouseLeave)}}),r._ispots=[],r.videoPreview=null,r.videothumbnail=null,r.thumbnail=null,r.timeStr="",r._state={now:0,f:!1},r}return Kl(t,[{key:"beforeCreate",value:function(e){var t=e.player.plugins.progress;t&&(e.root=t.root)}},{key:"afterCreate",value:function(){var e=this;this._curDot=null,this.handlerSpotClick=this.hook("spotClick",function(t,n){n.seekTime&&e.player.seek(n.seekTime)}),this.transformTimeHook=this.hook("transformTime",function(t){e.setTimeContent(gu.format(t))}),function(e){var t=e.config,n=e.player;Object.keys(eh).map(function(t){e[t]=eh[t].bind(e)});var r=n.config.progressDot||t.ispots||[];e._ispots=r.map(function(e){return Qd(e),e}),e.ispotsInit=!1,e.playerSize={left:n.sizeInfo.left,width:n.sizeInfo.width},e.on(Lu,function(){e.ispotsInit?e.updateDuration():e.initDots()}),e.on(sc,function(){e.positionDots()})}(this),this.on(Lu,function(){e.show()}),this.config.disable&&this.disable(),this.extTextRoot=this.find(".xg-spot-ext-text")}},{key:"setConfig",value:function(e){var t=this;e&&Object.keys(e).map(function(n){t.config[n]=e[n]})}},{key:"onPluginsReady",value:function(){this.player.plugins.progress&&(this.previewLine=this.find(".xg-spot-line"),this.timePoint=this.find(".xgplayer-progress-point"),this.timeText=this.find(".xg-spot-time"),this.tipText=this.find(".spot-inner-text"),this._hasThumnail=!1,this.registerThumbnail(),this.bindEvents())}},{key:"bindEvents",value:function(){var e=this,t=this.player.plugins.progress;if(t&&(Object.keys(th).map(function(n){e[th[n]]=e[th[n]].bind(e),t.addCallBack(n,e[th[n]])}),"mobile"!==wu.device)){this.bind(".xg-spot-info","mousemove",this.onMousemove),this.bind(".xg-spot-info","mousedown",this.onMousedown),this.bind(".xg-spot-info","mouseup",this.onMouseup);var n=this.hook("previewClick",function(){});this.handlerPreviewClick=function(t){t.stopPropagation(),n(parseInt(1e3*e._state.now,10)/1e3,t)},this.bind(".xg-spot-content","mouseup",this.handlerPreviewClick)}}},{key:"onProgressMove",value:function(e,t){!this.config.disable&&this.player.duration&&this.updatePosition(e.offset,e.width,e.currentTime,e.e)}},{key:"onProgressDragStart",value:function(e){!this.config.disable&&this.player.duration&&(this.isDrag=!0,this.videoPreview&&gu.addClass(this.videoPreview,"show"))}},{key:"onProgressDragEnd",value:function(e){!this.config.disable&&this.player.duration&&(this.isDrag=!1,this.videoPreview&&gu.removeClass(this.videoPreview,"show"))}},{key:"onProgressClick",value:function(e,t){this.config.disable||gu.hasClass(t.target,"xgplayer-spot")&&(t.stopPropagation(),t.preventDefault(),["time","id","text"].map(function(n){e[n]=t.target.getAttribute("data-".concat(n))}),e.time&&(e.time=Number(e.time)),this.handlerSpotClick(t,e))}},{key:"updateLinePos",value:function(e,t){var n=this.root,r=this.previewLine,i=this.player,o=this.config,a="flex"===i.controls.mode,s=n.getBoundingClientRect().width;if(s||!this._hasThumnail){var l,u=e-(s=this._hasThumnail&&s<o.width?o.width:s)/2;u<0&&!a?(u=0,l=e-s/2):u>t-s&&!a?(l=u-(t-s),u=t-s):l=0,void 0!==l&&(r.style.transform="translateX(".concat(l.toFixed(2),"px)")),n.style.transform="translateX(".concat(u.toFixed(2),"px) translateZ(0)")}}},{key:"updateTimeText",value:function(e){var t=this.timeText,n=this.timePoint;t.innerHTML=e,!this.thumbnail&&(n.innerHTML=e)}},{key:"updatePosition",value:function(e,t,n,r){var i=this.root,o=this.config,a=this._state;if(i){a.now=n,this.transformTimeHook(n);var s=this.timeStr;r&&r.target&&gu.hasClass(r.target,"xgplayer-spot")?(this.showTips(r.target.getAttribute("data-text"),!1,s),this.focusDot(r.target),a.f=!0,o.isFocusDots&&a.f&&(a.now=parseInt(r.target.getAttribute("data-time"),10))):o.defaultText?(a.f=!1,this.showTips(o.defaultText,!0,s)):(a.f=!1,this.hideTips("")),this.updateTimeText(s),this.updateThumbnails(a.now),this.updateLinePos(e,t)}}},{key:"setTimeContent",value:function(e){this.timeStr=e}},{key:"updateThumbnails",value:function(e){var t=this.player,n=this.videoPreview,r=this.config,i=t.plugins.thumbnail;if(i&&i.usable){this.thumbnail&&i.update(this.thumbnail,e,r.width,r.height);var o=n&&n.getBoundingClientRect();this.videothumbnail&&i.update(this.videothumbnail,e,o.width,o.height)}}},{key:"registerThumbnail",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("mobile"!==wu.device){var t=this.player,n=this.config,r=t.getPlugin("thumbnail");if(r&&r.setConfig(e),r&&r.usable&&n.isShowThumbnail){gu.removeClass(this.root,"short-line no-thumbnail"),"short"===n.mode&&gu.addClass(this.root,"short-line"),this._hasThumnail=!0;var i=this.find(".xg-spot-thumbnail");this.thumbnail=r.createThumbnail(i,"progress-thumbnail"),n.isShowCoverPreview&&(this.videoPreview=gu.createDom("xg-video-preview","",{},"xgvideo-preview"),t.root.appendChild(this.videoPreview),this.videothumbnail=r.createThumbnail(this.videoPreview,"xgvideo-thumbnail")),this.updateThumbnails(0)}else gu.addClass(this.root,"short-line no-thumbnail")}}},{key:"calcuPosition",value:function(e,t){var n=this.player.plugins.progress,r=this.player,i=n.root.getBoundingClientRect().width,o=r.duration/i*6;return e+t>r.duration&&(t=r.duration-e),r.duration,r.duration,{left:e/r.duration*100,width:t/r.duration*100,isMini:t<o}}},{key:"showDot",value:function(e){var t=this.findDot(e);if(t){var n=this.root.getBoundingClientRect().width,r=t.time/this.player.duration*n;this.updatePosition(r,n,t.time)}}},{key:"focusDot",value:function(e,t){e&&(t||(t=e.getAttribute("data-id")),gu.addClass(e,"active"),this._activeDotId=t)}},{key:"blurDot",value:function(e){if(!e){var t=this._activeDotId;e=this.getDotDom(t)}e&&(gu.removeClass(e,"active"),this._activeDotId=null)}},{key:"showTips",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";gu.addClass(this.root,"no-timepoint"),e&&(gu.addClass(this.find(".xg-spot-content"),"show-text"),t&&"production"===this.config.mode?(gu.addClass(this.root,"product"),this.tipText.textContent=e):(gu.removeClass(this.root,"product"),this.tipText.textContent=this._hasThumnail?e:"".concat(n," ").concat(e)))}},{key:"hideTips",value:function(){gu.removeClass(this.root,"no-timepoint"),this.tipText.textContent="",gu.removeClass(this.find(".xg-spot-content"),"show-text"),gu.removeClass(this.root,"product")}},{key:"hide",value:function(){gu.addClass(this.root,"hide")}},{key:"show",value:function(e){gu.removeClass(this.root,"hide")}},{key:"enable",value:function(){var e=this.config,t=this.playerConfig;this.config.disable=!1,this.show(),!this.thumbnail&&e.isShowThumbnail&&this.registerThumbnail(t.thumbnail||{})}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){var e=this,t=this.player.plugins.progress;t&&Object.keys(th).map(function(n){t.removeCallBack(n,e[th[n]])}),this.videothumbnail=null,this.thumbnail=null,this.videoPreview&&this.player.root.removeChild(this.videoPreview),this.unbind(".xg-spot-info","mousemove",this.onMousemove),this.unbind(".xg-spot-info","mousedown",this.onMousedown),this.unbind(".xg-spot-info","mouseup",this.onMouseup),this.unbind(".xg-spot-content","mouseup",this.handlerPreviewClick)}},{key:"render",value:function(){return"mobile"===wu.device||"mobile"===this.playerConfig.isMobileSimulateMode?"":'<div class="xg-spot-info hide '.concat("short"===this.config.mode?"short-line":"",'">\n <div class="xg-spot-content">\n <div class="xg-spot-thumbnail">\n <span class="xg-spot-time"></span>\n </div>\n <div class="xg-spot-text"><span class="spot-inner-text"></span></div>\n </div>\n <div class="xgplayer-progress-point">00:00</div>\n <div class="xg-spot-ext-text"></div>\n <div class="xg-spot-line"></div>\n </div>')}}],[{key:"pluginName",get:function(){return"progresspreview"}},{key:"defaultConfig",get:function(){return{index:1,miniWidth:6,ispots:[],defaultText:"",isFocusDots:!0,isHideThumbnailHover:!0,isShowThumbnail:!0,isShowCoverPreview:!1,mode:"",disable:!1,width:160,height:90}}}]),t}(),rh=function(){Xl(t,Zc);var e=tu(t);function t(n){var r;return Gl(this,t),(r=e.call(this,n)).ratio=1,r.interval=null,r._preloadMark={},r}return Kl(t,[{key:"afterCreate",value:function(){var e=this;this.usable&&this.initThumbnail(),this.on([Lu],function(){var t=e.config,n=t.pic_num,r=t.interval;e.usable&&(e.interval=r>0?r:Math.round(1e3*e.player.duration/n)/1e3)})}},{key:"setConfig",value:function(e){var t=this;if(e){var n=Object.keys(e);n.length<1||(n.forEach(function(n){t.config[n]=e[n]}),this.usable&&this.initThumbnail())}}},{key:"usable",get:function(){var e=this.config,t=e.urls,n=e.pic_num;return t&&t.length>0&&n>0}},{key:"initThumbnail",value:function(){var e=this.config,t=e.width,n=e.height,r=e.pic_num,i=e.interval;this.ratio=t/n*100,this.interval=i||Math.round(this.player.duration/r),this._preloadMark={}}},{key:"getUrlByIndex",value:function(e){return e>=0&&e<this.config.urls.length?this.config.urls[e]:""}},{key:"preload",value:function(e){var t=this;if(!this._preloadMark[e]){var n=this.config.urls,r=n.length,i=[];e>0&&i.push(e-1),i.push(e),e>0&&e<r-1&&i.push(e+1),i.map(function(e){!t._preloadMark[e]&&e>=0&&e<r&&(t._preloadMark[e]=1,gu.preloadImg(n[e],function(){t._preloadMark[e]=2}))})}}},{key:"getPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.config,i=r.pic_num,o=r.row,a=r.col,s=r.width,l=r.height;this.interval=Math.round(this.player.duration/i);var u=Math.ceil(e/this.interval),c=(u=u>i?i:u)<o*a?0:Math.ceil(u/(o*a))-1,f=u-c*(a*o),d=f>0?Math.ceil(f/a)-1:0,h=f>0?f-d*a-1:0,p=0,g=0;t&&n?t/n<s/l?p=(g=n)*(s/l):g=(p=t)/(s/l):n?t||(p=(g=n||l)*(s/l)):g=(p=t||s)/(s/l);var v=this.getUrlByIndex(c);return{urlIndex:c,rowIndex:d,colIndex:h,url:v,height:g,width:p,style:{backgroundImage:"url(".concat(v,")"),backgroundSize:"".concat(p*a,"px auto"),backgroundPosition:"-".concat(h*p,"px -").concat(d*g,"px"),width:"".concat(p,"px"),height:"".concat(g,"px")}}}},{key:"update",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=this.config,a=o.pic_num,s=o.urls;if(!(a<=0)&&s&&0!==s.length){var l=this.getPosition(t,n,r);this.preload(l.urlIndex),Object.keys(l.style).map(function(t){e.style[t]=l.style[t]}),Object.keys(i).map(function(t){e.style[t]=i[t]})}}},{key:"changeConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setConfig(e)}},{key:"createThumbnail",value:function(e,t){var n=gu.createDom("xg-thumbnail","",{},"thumbnail ".concat(t));return e&&e.appendChild(n),n}}],[{key:"pluginName",get:function(){return"thumbnail"}},{key:"defaultConfig",get:function(){return{isShow:!1,urls:[],pic_num:0,col:0,row:0,height:90,width:160,scale:1,className:"",hidePortrait:!1}}}]),t}();function ih(e){return e?"background:".concat(e,";"):""}var oh=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onTimeupdate",function(){var e=n.player.ended,t=Ql(n).offsetDuration,r=n.currentTime;r=gu.adjustTimeByDuration(r,t,e),n.update({played:r},t)}),n}return Kl(t,[{key:"offsetDuration",get:function(){return this.playerConfig.customDuration||this.player.offsetDuration||this.player.duration}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,n=e.currentTime;return t>=0?t:n}},{key:"afterCreate",value:function(){var e=this;this.root&&(this.on(Iu,this.onTimeupdate),this.on(zu,function(){e.reset()}))}},{key:"reset",value:function(){this.update({played:0,cached:0},0)}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;t&&this.root&&(e.cached&&(this.find("xg-mini-progress-cache").style.width="".concat(e.cached/t*100,"%")),e.played&&(this.find("xg-mini-progress-played").style.width="".concat(e.played/t*100,"%")))}},{key:"render",value:function(){var e=this.playerConfig,t=e.commonStyle;if(e.miniprogress){var n=this.config,r=n.mode,i=n.height,o={cached:ih(t.cachedColor),played:ih(t.playedColor),progress:ih(t.progressColor),height:i>0&&2!==i?"height: ".concat(i,"px;"):""};return'<xg-mini-progress class="xg-mini-progress '.concat("show"===r?"xg-mini-progress-show":"",'" style="').concat(o.progress," ").concat(o.height,'">\n <xg-mini-progress-cache class="xg-mini-progress-cache" style="').concat(o.cached,'"></xg-mini-progress-cache>\n <xg-mini-progress-played class="xg-mini-progress-played" style="').concat(o.played,'"></xg-mini-progress-played>\n </xg-mini-progress>')}}}],[{key:"pluginName",get:function(){return"MiniProgress"}},{key:"defaultConfig",get:function(){return{mode:"auto",height:2}}}]),t}(),ah="realtime",sh="firstframe",lh="poster",uh=null,ch=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onLoadedData",function(e){n.player&&(n._frameCount=n.config.startFrameCount,n.stop(),n.renderOnTimeupdate(e),n.off(Iu,n.renderOnTimeupdate),n.on(Iu,n.renderOnTimeupdate))}),Yl(Ql(n),"onVisibilitychange",function(e){"visible"===document.visibilityState?n._checkIfCanStart()&&n.start():"hidden"===document.visibilityState&&n.stop()}),Yl(Ql(n),"renderOnTimeupdate",function(e){if(n._frameCount>0)n.renderOnce(),n._frameCount--;else{n._isLoaded=!0,n.off(Iu,n.renderOnTimeupdate);var t=n.config.startInterval;!n.player.paused&&n._checkIfCanStart()&&n.start(0,t)}}),Yl(Ql(n),"start",function(e,t){var r=n.player.video,i=function(){try{return parseInt(window.performance.now(),10)}catch(pp){return(new Date).getTime()}}(),o=n.checkVideoIsSupport(r);o&&n.canvasCtx&&(t||(t=n.interval),n.stop(),r.videoWidth&&r.videoHeight&&(n.videoPI=r.videoHeight>0?parseInt(r.videoWidth/r.videoHeight*100,10):0,(n.config.mode===ah||i-n.preTime>=t)&&(r&&r.videoWidth&&n.update(o,n.videoPI),n.preTime=i)),n.frameId="timer"===n._loopType?gu.setTimeout(Ql(n),n.start,t):gu.requestAnimationFrame(n.start))}),Yl(Ql(n),"stop",function(){n.frameId&&("timer"===n._loopType?gu.clearTimeout(Ql(n),n.frameId):gu.cancelAnimationFrame(n.frameId),n.frameId=null)}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this;!0===this.playerConfig.dynamicBg&&(this.config.disable=!1),t.isSupport||(this.config.disable=!0);var n=this.config,r=n.disable,i=n.mode,o=n.frameRate;r||(this._pos={width:0,height:0,rwidth:0,rheight:0,x:0,y:0,pi:0},this.isStart=!1,this._isLoaded=!1,this.videoPI=0,this.preTime=0,this.interval=parseInt(1e3/o,10),this.canvas=null,this.canvasCtx=null,this._frameCount=0,this._loopType=this.config.mode!==ah&&this.interval>=1e3?"timer":"animation",this.once(Ku,function(){e.player&&(e.init(),e.renderByPoster(),e.player.paused||e.start())}),i!==lh&&(i!==sh&&(this.on(zu,function(){e.stop()}),this.on(Su,function(){var t=e.config.startInterval;e._checkIfCanStart()&&e.start(0,t)}),this.on(Au,function(){e.stop()})),this.on(Mu,this.onLoadedData),this.on(Hu,function(){e._isLoaded=!1,e.stop()}),document.addEventListener("visibilitychange",this.onVisibilitychange)))}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach(function(n){"root"===n&&e[n]!==t.config[n]?t.reRender(e[n]):"frameRate"===n?t.interval=parseInt(1e3/e[n],10):"disable"===n&&e[n]&&t.stop(),t.config[n]=e[n]})}},{key:"init",value:function(e){var n=this.player,r=this.config;this.canvasFilter=t.supportCanvasFilter();try{var i=e||r.root;i||(i=r.isInnerRender&&n.innerContainer||n.root),i.insertAdjacentHTML("afterbegin",'<div class="xgplayer-dynamic-bg" data-index="'.concat(r.index,'"><canvas>\n </canvas><xgmask></xgmask></div>')),this.root=i.children[0],this.canvas=this.find("canvas"),this.canvasFilter||(this.canvas.style.filter=r.filter,this.canvas.style.webkitFilter=r.filter),this.mask=this.find("xgmask"),r.addMask&&(this.mask.style.background=r.maskBg),this.canvasCtx=this.canvas.getContext("2d")}catch(pp){hu.logError("plugin:DynamicBg",pp)}}},{key:"reRender",value:function(e){if(this.config.disable||this.root){this.stop();var t=this.root?this.root.parentElement:null;if(t!==e&&t.removeChild(this.root),e){this.init(e),this.renderOnce();var n=this.config.startInterval;this._checkIfCanStart()&&this.start(0,n)}else this.root=null}}},{key:"checkVideoIsSupport",value:function(e){if(!e)return null;var t=e&&e instanceof window.HTMLVideoElement?e:e.canvas?e.canvas:e.flyVideo?e.flyVideo:null;if(t&&("safari"!==wu.browser||!gu.isMSE(t)))return t;var n=t?t.tagName.toLowerCase():"";return"canvas"===n||"img"===n?t:null}},{key:"renderByPoster",value:function(){var e=this.playerConfig.poster;if(e){var t="String"===gu.typeOf(e)?e:"String"===gu.typeOf(e.poster)?e.poster:null;this.updateImg(t)}}},{key:"_checkIfCanStart",value:function(){var e=this.config.mode;return this._isLoaded&&!this.player.paused&&e!==sh&&e!==lh}},{key:"renderOnce",value:function(){var e=this.player.video;if(e.videoWidth&&e.videoHeight){this.videoPI=parseInt(e.videoWidth/e.videoHeight*100,10);var t=this.checkVideoIsSupport(e);t&&this.update(t,this.videoPI)}}},{key:"updateImg",value:function(e){var t=this;if(e){var n=this.canvas.getBoundingClientRect(),r=n.width,i=n.height,o=new window.Image;o.onload=function(){if(t.canvas&&!t.frameId&&!t.isStart){t.canvas.height=i,t.canvas.width=r;var e=parseInt(r/i*100,10);t.update(o,e),o=null}},o.src=e}}},{key:"update",value:function(e,t){if(this.canvas&&this.canvasCtx&&t)try{var n=this._pos,r=this.config,i=this.canvas.getBoundingClientRect(),o=i.width,a=i.height;if(o!==n.width||a!==n.height||n.pi!==t){var s=parseInt(o/a*100,10);n.pi=t,n.width!==o&&(n.width=this.canvas.width=o),n.height!==a&&(n.height=this.canvas.height=a);var l=a,u=o;s<t?u=parseInt(a*t/100,10):s>t&&(l=parseInt(100*o/t,10)),n.rwidth=u*r.multiple,n.rheight=l*r.multiple,n.x=(o-n.rwidth)/2,n.y=(a-n.rheight)/2}this.canvasFilter&&(this.canvasCtx.filter=r.filter),this.canvasCtx.drawImage(e,n.x,n.y,n.rwidth,n.rheight)}catch(pp){hu.logError("plugin:DynamicBg",pp)}}},{key:"destroy",value:function(){this.stop(),document.removeEventListener("visibilitychange",this.onVisibilitychange),this.canvasCtx=null,this.canvas=null}},{key:"render",value:function(){return""}}],[{key:"pluginName",get:function(){return"dynamicBg"}},{key:"defaultConfig",get:function(){return{isInnerRender:!1,disable:!0,index:-1,mode:"framerate",frameRate:10,filter:"blur(50px)",startFrameCount:2,startInterval:0,addMask:!0,multiple:1.2,maskBg:"rgba(0,0,0,0.7)"}}},{key:"isSupport",get:function(){return"boolean"==typeof uh?uh:uh=function(){try{return!!document.createElement("canvas").getContext}catch(pp){return!1}}()}},{key:"supportCanvasFilter",value:function(){return!("safari"===wu.browser||"firefox"===wu.browser)}}]),t}(),fh="info",dh=bc,hh=function(){Xl(t,Wc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"_recordUserActions",function(e){var t=n._getTime(),r=Object.assign({},e,{msg:e.msg||e.action});n._stats[fh].push(Wl(Wl({type:"userAction"},t),{},{payload:r}))}),Yl(Ql(n),"_onReset",function(){n.reset()}),Yl(Ql(n),"_recordInfo",function(e){n.info(e)}),Yl(Ql(n),"_downloadStats",function(){var e=n.getStats(),t=new Blob([JSON.stringify(e)],{type:"application/json"}),r=window.URL.createObjectURL(t),i=document.createElement("a");i.style.display="none",i.href=r,i.download="player.txt",i.disabled=!1,i.click()}),n}return Kl(t,[{key:"_getTime",value:function(){return{timestamp:Date.now(),timeFormat:(new Date).toISOString()}}},{key:"afterCreate",value:function(){this.reset(),this.on(pc,this._recordUserActions),this.on(dh.STATS_INFO,this._recordInfo),this.on(dh.STATS_DOWNLOAD,this._downloadStats),this.on(dh.STATS_RESET,this._onReset)}},{key:"destroy",value:function(){this.offAll()}},{key:"downloadStats",value:function(){this._downloadStats()}},{key:"info",value:function(e){e.profile?this._infoProfile(e):this._info(e)}},{key:"_info",value:function(e){var t=this._getTime();this._stats[fh].push(Wl(Wl({},t),{},{payload:e}))}},{key:"_infoProfile",value:function(e){if(e&&e.startMs){var t=Wl({cat:"function",dur:Date.now()-e.startMs,name:e.name||e.msg,ph:"X",pid:0,tid:0,ts:e.startMs,profile:!0},e);this._info(t)}else console.warn("infoProfile need object data, include startMs")}},{key:"reset",value:function(){var e;this._stats=(Yl(e={},fh,[]),Yl(e,"media",{}),e)}},{key:"getStats",value:function(){for(var e=this.player.media,t=[],n=0;n<e.buffered.length;n++)t.push({start:e.buffered.start(n),end:e.buffered.end(n)});var r={currentTime:e.currentTime,readyState:e.readyState,buffered:t,paused:e.paused,ended:e.ended};return this._stats.media=r,{raw:this._stats,timestat:this._getTimeStats(),profile:this._getProfile()}}},{key:"_getTimeStats",value:function(){return this._stats[fh].map(function(e){var t=e.payload.data,n="";try{t instanceof Error?n=t.msg:void 0!==t&&(n=JSON.stringify(t))}catch(r){console.log("err",r)}return"[".concat(e.timeFormat,"] : ").concat(e.payload.msg," ").concat(n," ")})}},{key:"_getProfile",value:function(){var e={traceEvents:[]};return this._stats[fh].forEach(function(t){t.payload.profile&&e.traceEvents.push(t.payload)}),e}}],[{key:"pluginName",get:function(){return"stats"}},{key:"defaultConfig",get:function(){return{}}}]),t}(),ph=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onGapJump",function(){var e=Ql(n),r=e.player,i=e.config;if(r.media.readyState!==HTMLMediaElement.HAVE_NOTHING){if(r.media.seeking){if(!n.seekingEventReceived)return}else n.seekingEventReceived=!1;if(!r.media.paused||0===r.media.currentTime||!n.hasPlayed){var o=r.media.buffered,a=i.smallGapLimit||.5,s=i.gapDetectionThreshold||.3,l=r.media.currentTime,u=n._getIndex(o,l,s);if(null!==u&&0!==u){console.log("GapJump bufferRange ",o.start(u),o.end(u));var c=o.start(u)+.1;if(!(c>r.media.duration)){var f=c-l,d=f<=a;f<t.BROWSER_GAP_TOLERANCE||d&&(!1!==i.useGapJump&&(r.media.currentTime=n.isSafari?c+.1:c),n.player&&n.player.emit("detectGap"),console.log("gapJump gapIndex",u," isGapSamll:",d," currentTime:",r.media.currentTime," jumpSize:",l-r.media.currentTime),.08!==c&&r&&r.emit("log",{type:"oneevent",end_type:"gap",vid:r.config.vid,ext:{video_postion:Math.floor(1e3*c)}}))}}}}}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this;!1!==this.config.useGapJump&&(this.hasPlayed=!1,this.seekingEventReceived=!1,this.isSafari=/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),this.on(Fu,this.onGapJump),this.on(Su,function(){e.hasPlayed=!0}),this.on(Ou,function(){e.seekingEventReceived=!0}))}},{key:"_getIndex",value:function(e,t,n){if(!e||!e.length)return null;if(1===e.length&&e.end(0)-e.start(0)<1e-6)return null;for(var r=this._getBuffered(e),i=null,o=0;o<r.length;o++)if(r[o].start>t&&(0===o||r[o-1].end-t<=n)){i=o;break}return i}},{key:"_getBuffered",value:function(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}}],[{key:"pluginName",get:function(){return"gapJump"}},{key:"defaultConfig",get:function(){return{useGapJump:!1,smallGapLimit:.5,gapDetectionThreshold:.3}}}]),t}();ph.BROWSER_GAP_TOLERANCE=.001;var gh=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"onWaiting",function(){var e=Ql(n).config;n.jumpCnt>e.jumpCntMax||n.timer||!1===e.useWaitingTimeoutJump||(n.timer=setTimeout(n.onJump,1e3*e.waitingTime))}),Yl(Ql(n),"onJump",function(){var e=Ql(n),t=e.player,r=e.config;if(clearTimeout(n.timer),n.timer=null,!(n.jumpCnt>r.jumpCntMax||!1===r.useWaitingTimeoutJump||t.media.paused&&0!==t.media.currentTime&&n.hasPlayed)){n.jumpSize=r.jumpSize*(n.jumpCnt+1),n.jumpCnt===r.jumpSize&&n.jumpSize<6&&(n.jumpSize=6);var i=t.currentTime+n.jumpSize;i>t.media.duration||(n.jumpCnt++,t.currentTime=i)}}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this,t=this.config,n=t.useWaitingTimeoutJump,r=t.jumpSize;!1!==n&&(this.hasPlayed=!1,this.jumpCnt=0,this.timer=null,this.jumpSize=r,this.on(Fu,this.onWaiting),this.on([_u,Bu],function(){clearTimeout(e.timer),e.timer=null,e.jumpSize=e.config.jumpSize}),this.on(Su,function(){e.hasPlayed=!0}))}}],[{key:"pluginName",get:function(){return"waitingTimeoutJump"}},{key:"defaultConfig",get:function(){return{useWaitingTimeoutJump:!1,waitingTime:15,jumpSize:2,jumpCntMax:4}}}]),t}(),vh="cdn",mh=["cdn"],yh=function(){Xl(t,Zc);var e=tu(t);function t(){var n;Gl(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return Yl(Ql(n=e.call.apply(e,[this].concat(i))),"getSpeed",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vh;if(!n.speedListCache||!n.speedListCache[e])return 0;if(n.speedListCache[e].length<=0)return 0;var t=0;return n.speedListCache[e].map(function(e){t+=e}),Math.floor(t/n.speedListCache[e].length)}),Yl(Ql(n),"startTimer",function(){gu.isMSE(n.player.video)||(n.initSpeedList(),n.cnt=0,n.timer=setTimeout(n.testSpeed,n.config.testTimeStep))}),Yl(Ql(n),"initSpeedList",function(){n.speedListCache={},mh.forEach(function(e){n.speedListCache[e]=[]})}),Yl(Ql(n),"_onRealSpeedChange",function(e){e.speed&&n.appendList(e.speed,e.type||vh)}),Yl(Ql(n),"testSpeed",function(){if(clearTimeout(n.timer),n.timer=null,n.player&&n.config.openSpeed){var e=n.config,t=e.url,r=e.loadSize,i=e.testCnt,o=e.testTimeStep,a=t+(t.indexOf("?")<0?"?testst=":"&testst=")+Date.now();if(!(n.cnt>=i)){n.cnt++;try{var s=(new Date).getTime(),l=null,u=new XMLHttpRequest;n.xhr=u,u.open("GET",a);var c={},f=Math.floor(10*Math.random());c.Range="bytes="+f+"-"+(r+f),c&&Object.keys(c).forEach(function(e){u.setRequestHeader(e,c[e])}),u.onreadystatechange=function(){if(4===u.readyState){n.xhr=null,l=(new Date).getTime();var e=u.getResponseHeader("Content-Length")/1024*8,t=Math.round(1e3*e/(l-s));n.appendList(t),n.timer=setTimeout(n.testSpeed,o)}},u.send()}catch(pp){console.error(pp)}}}}),Yl(Ql(n),"appendList",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vh;if(n.speedListCache&&n.speedListCache[t]){var r=n.config.saveSpeedMax;n.speedListCache[t].length>=r&&n.speedListCache[t].shift(),n.speedListCache[t].push(e);var i=Ql(n).player;i&&(t===vh?i.realTimeSpeed=e:i[n.getSpeedName("realTime",t)]=e),n.updateSpeed(t)}}),Yl(Ql(n),"updateSpeed",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vh,t=n.getSpeed(e),r=Ql(n).player;if(r)if(e===vh)r.avgSpeed&&t===r.avgSpeed||(r.avgSpeed=t,r.emit(Zu,{speed:t,realTimeSpeed:r.realTimeSpeed}));else{var i=n.getSpeedName("avg",e);r[i]&&t===r[i]||(r[i]=t,r.emit(Zu,{speed:t,realTimeSpeed:r.realTimeSpeed}))}}),n}return Kl(t,[{key:"afterCreate",value:function(){var e=this.config,t=e.openSpeed,n=e.addSpeedTypeList;(null==n?void 0:n.length)>0&&mh.push.apply(mh,ru(n)),this.initSpeedList(),this.on("real_time_speed",this._onRealSpeedChange),this.timer=null,this.cnt=0,this.xhr=null,t&&this.on([Mu,Yu],this.startTimer)}},{key:"getSpeedName",value:function(e,t){return e+"Speed"+t.toUpperCase()}},{key:"openSpeed",get:function(){return this.config.openSpeed},set:function(e){if(this.config.openSpeed=e,!e&&this.timer)return clearTimeout(this.timer),void(this.timer=null);if(this.config.openSpeed){if(this.timer)return;this.timer=setTimeout(this.testSpeed,this.config.testTimeStep)}}},{key:"destroy",value:function(){var e=this;this.off("real_time_speed",this._onRealSpeedChange),this.off([Mu,Yu],this.startTimer),mh.forEach(function(t){e.speedListCache&&e.speedListCache[t]&&(e.speedListCache[t]=[])}),this.speedListCache&&(this.speedListCache={}),clearTimeout(this.timer),this.timer=null,this.xhr&&4!==this.xhr.readyState&&(this.xhr.cancel&&this.xhr.cancel(),this.xhr=null)}}],[{key:"pluginName",get:function(){return"testspeed"}},{key:"defaultConfig",get:function(){return{openSpeed:!1,testCnt:3,loadSize:204800,testTimeStep:3e3,url:"",saveSpeedMax:5,addSpeedTypeList:[]}}}]),t}(),bh=function(){Xl(t,Zc);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t,[{key:"afterCreate",value:function(){var e=this,t=this.player,n=this.config,r=t.media||t.video;this.timer=null,this._lastDecodedFrames=0,this._currentStuckCount=0,this._lastCheckPoint=null,this._payload=[],n.disabled||r.getVideoPlaybackQuality&&(this.on(Su,function(){e._startTick()}),this.on(Au,function(){e._stopTick()}),this.on(Du,function(){e._stopTick()}),this.on(zu,function(){e._stopTick()}))}},{key:"_startTick",value:function(){var e=this;this._stopTick(),this._timer=setTimeout(function(){e._checkDecodeFPS(),e._startTick()},this.config.tick)}},{key:"_stopTick",value:function(){clearTimeout(this._timer),this._timer=null}},{key:"_checkBuffer",value:function(e,t){for(var n=!1,r=[],i=0;i<t.length;i++){var o=t.start(i),a=t.end(i);if(r.push({start:o,end:a}),o<=e&&e<=a-1){n=!0;break}}return{enoughBuffer:n,buffers:r}}},{key:"_checkStuck",value:function(e,t,n,r){var i=this.player.media||this.player.video,o=document.hidden,a=i.paused,s=i.readyState,l=i.currentTime,u=i.buffered;if(!(o||a||s<4)){var c=this._checkBuffer(l,u),f=c.enoughBuffer,d=c.buffers;f&&(e<=this.config.reportFrame?(this._currentStuckCount++,this._payload.push({currentTime:l,buffers:d,curDecodedFrames:e,totalVideoFrames:t,droppedVideoFrames:n,checkInterval:r}),this._currentStuckCount>=this.config.stuckCount&&(this.emit(wc,this._payload),this._reset())):this._reset())}}},{key:"_reset",value:function(){this._payload=[],this._currentStuckCount=0}},{key:"_checkDecodeFPS",value:function(){var e=this.player.media||this.player.video;if(e){var t=e.getVideoPlaybackQuality(),n=t.totalVideoFrames,r=t.droppedVideoFrames,i=performance.now();if(n&&this._lastCheckPoint){var o=n-this._lastDecodedFrames,a=i-this._lastCheckPoint;this._checkStuck(o,n,r,a)}this._lastDecodedFrames=n,this._lastCheckPoint=i}}},{key:"destroy",value:function(){this._stopTick()}}],[{key:"pluginName",get:function(){return"FpsDetect"}},{key:"defaultConfig",get:function(){return{disabled:!1,tick:1e3,stuckCount:3,reportFrame:0}}}]),t}();cf.use({LANG:"zh-cn",TEXT:{ERROR_TYPES:{network:{code:1,msg:"视频下载错误"},mse:{code:2,msg:"流追加错误"},parse:{code:3,msg:"解析错误"},format:{code:4,msg:"格式错误"},decoder:{code:5,msg:"解码错误"},runtime:{code:6,msg:"语法错误"},timeout:{code:7,msg:"播放超时"},other:{code:8,msg:"其他错误"}},HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"网络错误",MEDIA_ERR_DECODE:"解码错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题",PLAY_TIPS:"播放",PAUSE_TIPS:"暂停",PLAYNEXT_TIPS:"下一集",DOWNLOAD_TIPS:"下载",ROTATE_TIPS:"旋转",RELOAD_TIPS:"重新载入",FULLSCREEN_TIPS:"进入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"进入样式全屏",EXITCSSFULLSCREEN_TIPS:"退出样式全屏",TEXTTRACK:"字幕",PIP:"画中画",SCREENSHOT:"截图",LIVE:"正在直播",OFF:"关闭",OPEN:"开启",MINI_DRAG:"点击按住可拖动视频",MINISCREEN:"小屏幕",REFRESH_TIPS:"请试试",REFRESH:"刷新",FORWARD:"快进中",LIVE_TIP:"直播"}});var wh=Kl(function e(t,n){var r,i,o;Gl(this,e);var a=n&&"mobile"===n.isMobileSimulateMode,s=n.isLive,l=[].concat(s?[]:[md,ld,oh,nh,vd],[cd,gd,Ed,Id,Vd,Gd,Md,Rd,xd,Td]),u=[kf,Sf,Of,id,Pf,Xd,Jd,rh,zf];this.plugins=[hh,Cf].concat(ru(l),u,[ph,gh]);var c=a?"mobile":wu.device;switch(c){case"pc":(r=this.plugins).push.apply(r,[nd,Wf,Yd,yh,bh]);break;case"mobile":(i=this.plugins).push.apply(i,[Qf]);break;default:(o=this.plugins).push.apply(o,[nd,Wf,Yd])}(wu.os.isIpad||"pc"===c)&&this.plugins.push(ch),wu.os.isIpad&&this.plugins.push(Wf),this.ignores=[],this.i18n=[]}),xh=function(){Xl(t,bf);var e=tu(t);function t(){return Gl(this,t),e.apply(this,arguments)}return Kl(t)}();Yl(xh,"defaultPreset",wh),Yl(xh,"Util",gu),Yl(xh,"Sniffer",wu),Yl(xh,"Errors",ku),Yl(xh,"Events",xc),Yl(xh,"Plugin",Zc),Yl(xh,"BasePlugin",Wc),Yl(xh,"I18N",cf),Yl(xh,"STATE_CLASS",nf),Yl(xh,"InstManager",pf);var Ch="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Eh(e){var t={exports:{}};return e(t,t.exports),t.exports}var kh,Sh,_h=function(e){return e&&e.Math==Math&&e},Dh=_h("object"==typeof globalThis&&globalThis)||_h("object"==typeof window&&window)||_h("object"==typeof self&&self)||_h("object"==typeof Ch&&Ch)||function(){return this}()||Function("return this")(),Ah=Function.prototype,Th=Ah.apply,Oh=Ah.bind,Ph=Ah.call,Ih="object"==typeof Reflect&&Reflect.apply||(Oh?Ph.bind(Th):function(){return Ph.apply(Th,arguments)}),Fh=Function.prototype,Bh=Fh.bind,Lh=Fh.call,Nh=Bh&&Bh.bind(Lh),Mh=Bh?function(e){return e&&Nh(Lh,e)}:function(e){return e&&function(){return Lh.apply(e,arguments)}},Rh=function(e){return"function"==typeof e},jh=function(e){try{return!!e()}catch(t){return!0}},Hh=!jh(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),zh=Function.prototype.call,Uh=zh.bind?zh.bind(zh):function(){return zh.apply(zh,arguments)},$h={}.propertyIsEnumerable,Wh=Object.getOwnPropertyDescriptor,Vh=Wh&&!$h.call({1:2},1)?function(e){var t=Wh(this,e);return!!t&&t.enumerable}:$h,Gh={f:Vh},qh=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Kh=Mh({}.toString),Yh=Mh("".slice),Xh=function(e){return Yh(Kh(e),8,-1)},Jh=Dh.Object,Zh=Mh("".split),Qh=jh(function(){return!Jh("z").propertyIsEnumerable(0)})?function(e){return"String"==Xh(e)?Zh(e,""):Jh(e)}:Jh,ep=Dh.TypeError,tp=function(e){if(null==e)throw ep("Can't call method on "+e);return e},np=function(e){return Qh(tp(e))},rp=function(e){return"object"==typeof e?null!==e:Rh(e)},ip={},op=function(e){return Rh(e)?e:void 0},ap=function(e,t){return arguments.length<2?op(ip[e])||op(Dh[e]):ip[e]&&ip[e][t]||Dh[e]&&Dh[e][t]},sp=Mh({}.isPrototypeOf),lp=ap("navigator","userAgent")||"",up=Dh.process,cp=Dh.Deno,fp=up&&up.versions||cp&&cp.version,dp=fp&&fp.v8;dp&&(Sh=(kh=dp.split("."))[0]>0&&kh[0]<4?1:+(kh[0]+kh[1])),!Sh&&lp&&(!(kh=lp.match(/Edge\/(\d+)/))||kh[1]>=74)&&(kh=lp.match(/Chrome\/(\d+)/))&&(Sh=+kh[1]);var hp,pp,gp=Sh,vp=!!Object.getOwnPropertySymbols&&!jh(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&gp&&gp<41}),mp=vp&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,yp=Dh.Object,bp=mp?function(e){return"symbol"==typeof e}:function(e){var t=ap("Symbol");return Rh(t)&&sp(t.prototype,yp(e))},wp=Dh.String,xp=function(e){try{return wp(e)}catch(t){return"Object"}},Cp=Dh.TypeError,Ep=function(e){if(Rh(e))return e;throw Cp(xp(e)+" is not a function")},kp=function(e,t){var n=e[t];return null==n?void 0:Ep(n)},Sp=Dh.TypeError,_p=Object.defineProperty,Dp=Dh["__core-js_shared__"]||function(e,t){try{_p(Dh,e,{value:t,configurable:!0,writable:!0})}catch(ZG){Dh[e]=t}return t}("__core-js_shared__",{}),Ap=Eh(function(e){(e.exports=function(e,t){return Dp[e]||(Dp[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Tp=Dh.Object,Op=function(e){return Tp(tp(e))},Pp=Mh({}.hasOwnProperty),Ip=Object.hasOwn||function(e,t){return Pp(Op(e),t)},Fp=0,Bp=Math.random(),Lp=Mh(1..toString),Np=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Lp(++Fp+Bp,36)},Mp=Ap("wks"),Rp=Dh.Symbol,jp=Rp&&Rp.for,Hp=mp?Rp:Rp&&Rp.withoutSetter||Np,zp=function(e){if(!Ip(Mp,e)||!vp&&"string"!=typeof Mp[e]){var t="Symbol."+e;vp&&Ip(Rp,e)?Mp[e]=Rp[e]:Mp[e]=mp&&jp?jp(t):Hp(t)}return Mp[e]},Up=Dh.TypeError,$p=zp("toPrimitive"),Wp=function(e){var t=function(e){if(!rp(e)||bp(e))return e;var t,n=kp(e,$p);if(n){if(t=Uh(n,e,"string"),!rp(t)||bp(t))return t;throw Up("Can't convert object to primitive value")}return function(e){var t,n;if(Rh(t=e.toString)&&!rp(n=Uh(t,e)))return n;if(Rh(t=e.valueOf)&&!rp(n=Uh(t,e)))return n;throw Sp("Can't convert object to primitive value")}(e)}(e);return bp(t)?t:t+""},Vp=Dh.document,Gp=rp(Vp)&&rp(Vp.createElement),qp=function(e){return Gp?Vp.createElement(e):{}},Kp=!Hh&&!jh(function(){return 7!=Object.defineProperty(qp("div"),"a",{get:function(){return 7}}).a}),Yp=Object.getOwnPropertyDescriptor,Xp=Hh?Yp:function(e,t){if(e=np(e),t=Wp(t),Kp)try{return Yp(e,t)}catch(n){}if(Ip(e,t))return qh(!Uh(Gh.f,e,t),e[t])},Jp={f:Xp},Zp=/#|\.prototype\./,Qp=function(e,t){var n=tg[eg(e)];return n==rg||n!=ng&&(Rh(t)?jh(t):!!t)},eg=Qp.normalize=function(e){return String(e).replace(Zp,".").toLowerCase()},tg=Qp.data={},ng=Qp.NATIVE="N",rg=Qp.POLYFILL="P",ig=Qp,og=Mh(Mh.bind),ag=function(e,t){return Ep(e),void 0===t?e:og?og(e,t):function(){return e.apply(t,arguments)}},sg=Dh.String,lg=Dh.TypeError,ug=function(e){if(rp(e))return e;throw lg(sg(e)+" is not an object")},cg=Dh.TypeError,fg=Object.defineProperty,dg=Hh?fg:function(e,t,n){if(ug(e),t=Wp(t),ug(n),Kp)try{return fg(e,t,n)}catch(r){}if("get"in n||"set"in n)throw cg("Accessors not supported");return"value"in n&&(e[t]=n.value),e},hg={f:dg},pg=Hh?function(e,t,n){return hg.f(e,t,qh(1,n))}:function(e,t,n){return e[t]=n,e},gg=Jp.f,vg=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Ih(e,this,arguments)};return t.prototype=e.prototype,t},mg=function(e,t){var n,r,i,o,a,s,l,u,c=e.target,f=e.global,d=e.stat,h=e.proto,p=f?Dh:d?Dh[c]:(Dh[c]||{}).prototype,g=f?ip:ip[c]||pg(ip,c,{})[c],v=g.prototype;for(i in t)n=!ig(f?i:c+(d?".":"#")+i,e.forced)&&p&&Ip(p,i),a=g[i],n&&(s=e.noTargetGet?(u=gg(p,i))&&u.value:p[i]),o=n&&s?s:t[i],n&&typeof a==typeof o||(l=e.bind&&n?ag(o,Dh):e.wrap&&n?vg(o):h&&Rh(o)?Mh(o):o,(e.sham||o&&o.sham||a&&a.sham)&&pg(l,"sham",!0),pg(g,i,l),h&&(Ip(ip,r=c+"Prototype")||pg(ip,r,{}),pg(ip[r],i,o),e.real&&v&&!v[i]&&pg(v,i,o)))},yg=Ap("keys"),bg=function(e){return yg[e]||(yg[e]=Np(e))},wg=!jh(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),xg=bg("IE_PROTO"),Cg=Dh.Object,Eg=Cg.prototype,kg=wg?Cg.getPrototypeOf:function(e){var t=Op(e);if(Ip(t,xg))return t[xg];var n=t.constructor;return Rh(n)&&t instanceof n?n.prototype:t instanceof Cg?Eg:null},Sg=Dh.String,_g=Dh.TypeError,Dg=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Mh(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return ug(n),function(e){if("object"==typeof e||Rh(e))return e;throw _g("Can't set "+Sg(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ag=Math.ceil,Tg=Math.floor,Og=function(e){var t=+e;return t!=t||0===t?0:(t>0?Tg:Ag)(t)},Pg=Math.max,Ig=Math.min,Fg=function(e,t){var n=Og(e);return n<0?Pg(n+t,0):Ig(n,t)},Bg=Math.min,Lg=function(e){return(t=e.length)>0?Bg(Og(t),9007199254740991):0;var t},Ng={indexOf:(pp=!1,function(e,t,n){var r=np(e),i=Lg(r),o=Fg(n,i);for(pp;i>o;o++)if(o in r&&r[o]===t)return o||0;return-1})},Mg={},Rg=Ng.indexOf,jg=Mh([].push),Hg=function(e,t){var n,r=np(e),i=0,o=[];for(n in r)!Ip(Mg,n)&&Ip(r,n)&&jg(o,n);for(;t.length>i;)Ip(r,n=t[i++])&&(~Rg(o,n)||jg(o,n));return o},zg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ug=zg.concat("length","prototype"),$g=Object.getOwnPropertyNames||function(e){return Hg(e,Ug)},Wg={f:$g},Vg={f:Object.getOwnPropertySymbols},Gg=Mh([].concat),qg=ap("Reflect","ownKeys")||function(e){var t=Wg.f(ug(e)),n=Vg.f;return n?Gg(t,n(e)):t},Kg=Object.keys||function(e){return Hg(e,zg)},Yg=Hh?Object.defineProperties:function(e,t){ug(e);for(var n,r=np(t),i=Kg(t),o=i.length,a=0;o>a;)hg.f(e,n=i[a++],r[n]);return e},Xg=ap("document","documentElement"),Jg=bg("IE_PROTO"),Zg=function(){},Qg=function(e){return"<script>"+e+"<\/script>"},ev=function(e){e.write(Qg("")),e.close();var t=e.parentWindow.Object;return e=null,t},tv=function(){try{hp=new ActiveXObject("htmlfile")}catch(r){}var e,t;tv="undefined"!=typeof document?document.domain&&hp?ev(hp):((t=qp("iframe")).style.display="none",Xg.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Qg("document.F=Object")),e.close(),e.F):ev(hp);for(var n=zg.length;n--;)delete tv.prototype[zg[n]];return tv()};Mg[Jg]=!0;var nv=Object.create||function(e,t){var n;return null!==e?(Zg.prototype=ug(e),n=new Zg,Zg.prototype=null,n[Jg]=e):n=tv(),void 0===t?n:Yg(n,t)},rv=function(e,t,n){var r=Wp(t);r in e?hg.f(e,r,qh(0,n)):e[r]=n},iv=Dh.Array,ov=Math.max,av=function(e,t,n){for(var r=Lg(e),i=Fg(t,r),o=Fg(r,r),a=iv(ov(o-i,0)),s=0;i<o;i++,s++)rv(a,s,e[i]);return a.length=s,a},sv=Mh("".replace),lv=Mh("".split),uv=Mh([].join),cv=String(Error("zxcasd").stack),fv=/\n\s*at [^:]*:[^\n]*/,dv=fv.test(cv),hv=/@[^\n]*\n/.test(cv)&&!/zxcasd/.test(cv),pv={},gv=zp("iterator"),vv=Array.prototype,mv={};mv[zp("toStringTag")]="z";var yv="[object z]"===String(mv),bv=zp("toStringTag"),wv=Dh.Object,xv="Arguments"==Xh(function(){return arguments}()),Cv=yv?Xh:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=wv(e),bv))?n:xv?Xh(t):"Object"==(r=Xh(t))&&Rh(t.callee)?"Arguments":r},Ev=zp("iterator"),kv=function(e){if(null!=e)return kp(e,Ev)||kp(e,"@@iterator")||pv[Cv(e)]},Sv=Dh.TypeError,_v=function(e,t,n){var r,i;ug(e);try{if(!(r=kp(e,"return"))){if("throw"===t)throw n;return n}r=Uh(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return ug(r),n},Dv=Dh.TypeError,Av=function(e,t){this.stopped=e,this.result=t},Tv=Av.prototype,Ov=Dh.String,Pv=function(e){if("Symbol"===Cv(e))throw TypeError("Cannot convert a Symbol value to a string");return Ov(e)},Iv=!jh(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",qh(1,7)),7!==e.stack)}),Fv=zp("toStringTag"),Bv=Dh.Error,Lv=[].push,Nv=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=sp(Mv,this);Dg?n=Dg(new Bv(void 0),i?kg(this):Mv):(n=i?this:nv(Mv),pg(n,Fv,"Error")),pg(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:Pv(e)}(t,"")),Iv&&pg(n,"stack",function(e,t){if("string"!=typeof e)return e;if(dv)for(;t--;)e=sv(e,fv,"");else if(hv)return uv(av(lv(e,"\n"),t),"\n");return e}(n.stack,1)),function(e,t){rp(t)&&"cause"in t&&pg(e,"cause",t.cause)}(n,r);var o=[];return function(e,t,n){var r,i,o,a,s,l,u,c,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),p=ag(Lv,n&&n.that),g=function(e){return r&&_v(r,"normal",e),new Av(!0,e)},v=function(e){return f?(ug(e),h?p(e[0],e[1],g):p(e[0],e[1])):h?p(e,g):p(e)};if(d)r=e;else{if(!(i=kv(e)))throw Dv(xp(e)+" is not iterable");if(void 0!==(c=i)&&(pv.Array===c||vv[gv]===c)){for(o=0,a=Lg(e);a>o;o++)if((s=v(e[o]))&&sp(Tv,s))return s;return new Av(!1)}r=function(e,t){var n=arguments.length<2?kv(e):t;if(Ep(n))return ug(Uh(n,e));throw Sv(xp(e)+" is not iterable")}(e,i)}for(l=r.next;!(u=Uh(l,r)).done;){try{s=v(u.value)}catch(c){_v(r,"throw",c)}if("object"==typeof s&&s&&sp(Tv,s))return s}new Av(!1)}(e,0,{that:o}),pg(n,"errors",o),n};Dg?Dg(Nv,Bv):function(e,t){for(var n=qg(t),r=hg.f,i=Jp.f,o=0;o<n.length;o++){var a=n[o];Ip(e,a)||r(e,a,i(t,a))}}(Nv,Bv);var Mv=Nv.prototype=nv(Bv.prototype,{constructor:qh(1,Nv),message:qh(1,""),name:qh(1,"AggregateError")});mg({global:!0},{AggregateError:Nv});var Rv=Mh(Function.toString);Rh(Dp.inspectSource)||(Dp.inspectSource=function(e){return Rv(e)});var jv,Hv,zv,Uv=Dp.inspectSource,$v=Dh.WeakMap,Wv=Rh($v)&&/native code/.test(Uv($v)),Vv=Dh.TypeError,Gv=Dh.WeakMap;if(Wv||Dp.state){var qv=Dp.state||(Dp.state=new Gv),Kv=Mh(qv.get),Yv=Mh(qv.has),Xv=Mh(qv.set);jv=function(e,t){if(Yv(qv,e))throw new Vv("Object already initialized");return t.facade=e,Xv(qv,e,t),t},Hv=function(e){return Kv(qv,e)||{}},zv=function(e){return Yv(qv,e)}}else{var Jv=bg("state");Mg[Jv]=!0,jv=function(e,t){if(Ip(e,Jv))throw new Vv("Object already initialized");return t.facade=e,pg(e,Jv,t),t},Hv=function(e){return Ip(e,Jv)?e[Jv]:{}},zv=function(e){return Ip(e,Jv)}}var Zv,Qv,em,tm={set:jv,get:Hv,has:zv,enforce:function(e){return zv(e)?Hv(e):jv(e,{})},getterFor:function(e){return function(t){var n;if(!rp(t)||(n=Hv(t)).type!==e)throw Vv("Incompatible receiver, "+e+" required");return n}}},nm=Function.prototype,rm=Hh&&Object.getOwnPropertyDescriptor,im=Ip(nm,"name"),om={PROPER:im&&"something"===function(){}.name,CONFIGURABLE:im&&(!Hh||Hh&&rm(nm,"name").configurable)},am=function(e,t,n,r){pg(e,t,n)},sm=zp("iterator"),lm=!1;[].keys&&("next"in(em=[].keys())?(Qv=kg(kg(em)))!==Object.prototype&&(Zv=Qv):lm=!0);var um=null==Zv||jh(function(){var e={};return Zv[sm].call(e)!==e});Zv=um?{}:nv(Zv),Rh(Zv[sm])||am(Zv,sm,function(){return this});var cm={IteratorPrototype:Zv,BUGGY_SAFARI_ITERATORS:lm},fm=yv?{}.toString:function(){return"[object "+Cv(this)+"]"},dm=hg.f,hm=zp("toStringTag"),pm=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ip(i,hm)||dm(i,hm,{configurable:!0,value:t}),r&&!yv&&pg(i,"toString",fm)}},gm=cm.IteratorPrototype,vm=function(){return this},mm=om.PROPER,ym=cm.BUGGY_SAFARI_ITERATORS,bm=zp("iterator"),wm=function(){return this},xm=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=nv(gm,{next:qh(1,l)}),pm(s,u,!1,!0),pv[u]=vm;var c,f,d=function(e){if(e===i&&m)return m;if(!ym&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[bm]||g["@@iterator"]||i&&g[i],m=!ym&&v||d(i),y="Array"==t&&g.entries||v;return y&&(c=kg(y.call(new e)))!==Object.prototype&&c.next&&(pm(c,h,!0,!0),pv[h]=wm),mm&&"values"==i&&v&&"values"!==v.name&&(p=!0,m=function(){return Uh(v,this)}),i&&(f={values:d("values"),keys:d("keys"),entries:d("entries")},a||mg({target:t,proto:!0,forced:ym||p},f)),pv[t]=m,f},Cm=tm.set,Em=tm.getterFor("Array Iterator");xm(Array,"Array",function(e,t){Cm(this,{type:"Array Iterator",target:np(e),index:0,kind:t})},function(){var e=Em(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),pv.Arguments=pv.Array;var km=Mh("".charAt),Sm=Mh("".charCodeAt),_m=Mh("".slice),Dm=function(e,t){var n,r,i=Pv(tp(e)),o=Og(t),a=i.length;return o<0||o>=a?"":(n=Sm(i,o))<55296||n>56319||o+1===a||(r=Sm(i,o+1))<56320||r>57343?km(i,o):_m(i,o,o+2)},Am=tm.set,Tm=tm.getterFor("String Iterator");xm(String,"String",function(e){Am(this,{type:"String Iterator",string:Pv(e),index:0})},function(){var e,t=Tm(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Dm(n,r),t.index+=e.length,{value:e,done:!1})});var Om=ip.AggregateError,Pm=zp("toStringTag");for(var Im in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Fm=Dh[Im],Bm=Fm&&Fm.prototype;Bm&&Cv(Bm)!==Pm&&pg(Bm,Pm,Im),pv[Im]=pv.Array}var Lm,Nm,Mm=Om,Rm=function(e){return e&&e.Math==Math&&e},jm=Rm("object"==typeof globalThis&&globalThis)||Rm("object"==typeof window&&window)||Rm("object"==typeof self&&self)||Rm("object"==typeof Ch&&Ch)||function(){return this}()||Function("return this")(),Hm=function(e){try{return!!e()}catch(t){return!0}},zm=!Hm(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),Um=Function.prototype.call,$m=Um.bind?Um.bind(Um):function(){return Um.apply(Um,arguments)},Wm={}.propertyIsEnumerable,Vm=Object.getOwnPropertyDescriptor,Gm=Vm&&!Wm.call({1:2},1)?function(e){var t=Vm(this,e);return!!t&&t.enumerable}:Wm,qm={f:Gm},Km=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ym=Function.prototype,Xm=Ym.bind,Jm=Ym.call,Zm=Xm&&Xm.bind(Jm),Qm=Xm?function(e){return e&&Zm(Jm,e)}:function(e){return e&&function(){return Jm.apply(e,arguments)}},ey=Qm({}.toString),ty=Qm("".slice),ny=function(e){return ty(ey(e),8,-1)},ry=jm.Object,iy=Qm("".split),oy=Hm(function(){return!ry("z").propertyIsEnumerable(0)})?function(e){return"String"==ny(e)?iy(e,""):ry(e)}:ry,ay=jm.TypeError,sy=function(e){if(null==e)throw ay("Can't call method on "+e);return e},ly=function(e){return oy(sy(e))},uy=function(e){return"function"==typeof e},cy=function(e){return"object"==typeof e?null!==e:uy(e)},fy=function(e,t){return arguments.length<2?function(e){return uy(e)?e:void 0}(jm[e]):jm[e]&&jm[e][t]},dy=Qm({}.isPrototypeOf),hy=fy("navigator","userAgent")||"",py=jm.process,gy=jm.Deno,vy=py&&py.versions||gy&&gy.version,my=vy&&vy.v8;my&&(Nm=(Lm=my.split("."))[0]>0&&Lm[0]<4?1:+(Lm[0]+Lm[1])),!Nm&&hy&&(!(Lm=hy.match(/Edge\/(\d+)/))||Lm[1]>=74)&&(Lm=hy.match(/Chrome\/(\d+)/))&&(Nm=+Lm[1]);var yy=Nm,by=!!Object.getOwnPropertySymbols&&!Hm(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&yy&&yy<41}),wy=by&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xy=jm.Object,Cy=wy?function(e){return"symbol"==typeof e}:function(e){var t=fy("Symbol");return uy(t)&&dy(t.prototype,xy(e))},Ey=jm.String,ky=function(e){try{return Ey(e)}catch(t){return"Object"}},Sy=jm.TypeError,_y=function(e){if(uy(e))return e;throw Sy(ky(e)+" is not a function")},Dy=function(e,t){var n=e[t];return null==n?void 0:_y(n)},Ay=jm.TypeError,Ty=Object.defineProperty,Oy=function(e,t){try{Ty(jm,e,{value:t,configurable:!0,writable:!0})}catch(ZG){jm[e]=t}return t},Py=jm["__core-js_shared__"]||Oy("__core-js_shared__",{}),Iy=Eh(function(e){(e.exports=function(e,t){return Py[e]||(Py[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Fy=jm.Object,By=function(e){return Fy(sy(e))},Ly=Qm({}.hasOwnProperty),Ny=Object.hasOwn||function(e,t){return Ly(By(e),t)},My=0,Ry=Math.random(),jy=Qm(1..toString),Hy=function(e){return"Symbol("+(void 0===e?"":e)+")_"+jy(++My+Ry,36)},zy=Iy("wks"),Uy=jm.Symbol,$y=Uy&&Uy.for,Wy=wy?Uy:Uy&&Uy.withoutSetter||Hy,Vy=function(e){if(!Ny(zy,e)||!by&&"string"!=typeof zy[e]){var t="Symbol."+e;by&&Ny(Uy,e)?zy[e]=Uy[e]:zy[e]=wy&&$y?$y(t):Wy(t)}return zy[e]},Gy=jm.TypeError,qy=Vy("toPrimitive"),Ky=function(e){var t=function(e){if(!cy(e)||Cy(e))return e;var t,n=Dy(e,qy);if(n){if(t=$m(n,e,"string"),!cy(t)||Cy(t))return t;throw Gy("Can't convert object to primitive value")}return function(e){var t,n;if(uy(t=e.toString)&&!cy(n=$m(t,e)))return n;if(uy(t=e.valueOf)&&!cy(n=$m(t,e)))return n;throw Ay("Can't convert object to primitive value")}(e)}(e);return Cy(t)?t:t+""},Yy=jm.document,Xy=cy(Yy)&&cy(Yy.createElement),Jy=function(e){return Xy?Yy.createElement(e):{}},Zy=!zm&&!Hm(function(){return 7!=Object.defineProperty(Jy("div"),"a",{get:function(){return 7}}).a}),Qy=Object.getOwnPropertyDescriptor,eb=zm?Qy:function(e,t){if(e=ly(e),t=Ky(t),Zy)try{return Qy(e,t)}catch(n){}if(Ny(e,t))return Km(!$m(qm.f,e,t),e[t])},tb={f:eb},nb=jm.String,rb=jm.TypeError,ib=function(e){if(cy(e))return e;throw rb(nb(e)+" is not an object")},ob=jm.TypeError,ab=Object.defineProperty,sb=zm?ab:function(e,t,n){if(ib(e),t=Ky(t),ib(n),Zy)try{return ab(e,t,n)}catch(r){}if("get"in n||"set"in n)throw ob("Accessors not supported");return"value"in n&&(e[t]=n.value),e},lb={f:sb},ub=zm?function(e,t,n){return lb.f(e,t,Km(1,n))}:function(e,t,n){return e[t]=n,e},cb=Qm(Function.toString);uy(Py.inspectSource)||(Py.inspectSource=function(e){return cb(e)});var fb,db,hb,pb=Py.inspectSource,gb=jm.WeakMap,vb=uy(gb)&&/native code/.test(pb(gb)),mb=Iy("keys"),yb=function(e){return mb[e]||(mb[e]=Hy(e))},bb={},wb=jm.TypeError,xb=jm.WeakMap;if(vb||Py.state){var Cb=Py.state||(Py.state=new xb),Eb=Qm(Cb.get),kb=Qm(Cb.has),Sb=Qm(Cb.set);fb=function(e,t){if(kb(Cb,e))throw new wb("Object already initialized");return t.facade=e,Sb(Cb,e,t),t},db=function(e){return Eb(Cb,e)||{}},hb=function(e){return kb(Cb,e)}}else{var _b=yb("state");bb[_b]=!0,fb=function(e,t){if(Ny(e,_b))throw new wb("Object already initialized");return t.facade=e,ub(e,_b,t),t},db=function(e){return Ny(e,_b)?e[_b]:{}},hb=function(e){return Ny(e,_b)}}var Db={set:fb,get:db,has:hb,enforce:function(e){return hb(e)?db(e):fb(e,{})},getterFor:function(e){return function(t){var n;if(!cy(t)||(n=db(t)).type!==e)throw wb("Incompatible receiver, "+e+" required");return n}}},Ab=Function.prototype,Tb=zm&&Object.getOwnPropertyDescriptor,Ob=Ny(Ab,"name"),Pb={PROPER:Ob&&"something"===function(){}.name,CONFIGURABLE:Ob&&(!zm||zm&&Tb(Ab,"name").configurable)},Ib=Eh(function(e){var t=Pb.CONFIGURABLE,n=Db.get,r=Db.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;uy(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ny(o,"name")||t&&o.name!==f)&&ub(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==jm?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:ub(e,n,o)):u?e[n]=o:Oy(n,o)})(Function.prototype,"toString",function(){return uy(this)&&n(this).source||pb(this)})}),Fb=Math.ceil,Bb=Math.floor,Lb=function(e){var t=+e;return t!=t||0===t?0:(t>0?Bb:Fb)(t)},Nb=Math.max,Mb=Math.min,Rb=function(e,t){var n=Lb(e);return n<0?Nb(n+t,0):Mb(n,t)},jb=Math.min,Hb=function(e){return e>0?jb(Lb(e),9007199254740991):0},zb=function(e){return Hb(e.length)},Ub=function(e){return function(t,n,r){var i=ly(t),o=zb(i),a=Rb(r,o);for(e;o>a;a++)if(a in i&&i[a]===n)return a||0;return-1}}(!1),$b=Qm([].push),Wb=function(e,t){var n,r=ly(e),i=0,o=[];for(n in r)!Ny(bb,n)&&Ny(r,n)&&$b(o,n);for(;t.length>i;)Ny(r,n=t[i++])&&(~Ub(o,n)||$b(o,n));return o},Vb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Gb=Vb.concat("length","prototype"),qb=Object.getOwnPropertyNames||function(e){return Wb(e,Gb)},Kb={f:qb},Yb={f:Object.getOwnPropertySymbols},Xb=Qm([].concat),Jb=fy("Reflect","ownKeys")||function(e){var t=Kb.f(ib(e)),n=Yb.f;return n?Xb(t,n(e)):t},Zb=function(e,t){for(var n=Jb(t),r=lb.f,i=tb.f,o=0;o<n.length;o++){var a=n[o];Ny(e,a)||r(e,a,i(t,a))}},Qb=/#|\.prototype\./,ew=function(e,t){var n=nw[tw(e)];return n==iw||n!=rw&&(uy(t)?Hm(t):!!t)},tw=ew.normalize=function(e){return String(e).replace(Qb,".").toLowerCase()},nw=ew.data={},rw=ew.NATIVE="N",iw=ew.POLYFILL="P",ow=ew,aw=tb.f,sw=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?jm:u?jm[s]||Oy(s,{}):(jm[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=aw(n,r))&&a.value:n[r],!ow(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;Zb(o,i)}(e.sham||i&&i.sham)&&ub(o,"sham",!0),Ib(n,r,o,e)}},lw={};lw[Vy("toStringTag")]="z";var uw,cw="[object z]"===String(lw),fw=Vy("toStringTag"),dw=jm.Object,hw="Arguments"==ny(function(){return arguments}()),pw=cw?ny:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=dw(e),fw))?n:hw?ny(t):"Object"==(r=ny(t))&&uy(t.callee)?"Arguments":r},gw=jm.String,vw=function(e){if("Symbol"===pw(e))throw TypeError("Cannot convert a Symbol value to a string");return gw(e)},mw=function(){var e=ib(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},yw=jm.RegExp,bw=Hm(function(){var e=yw("a","y");return e.lastIndex=2,null!=e.exec("abcd")});bw||Hm(function(){return!yw("a","y").sticky});var ww=bw||Hm(function(){var e=yw("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),xw={BROKEN_CARET:ww},Cw=Object.keys||function(e){return Wb(e,Vb)},Ew=zm?Object.defineProperties:function(e,t){ib(e);for(var n,r=ly(t),i=Cw(t),o=i.length,a=0;o>a;)lb.f(e,n=i[a++],r[n]);return e},kw=fy("document","documentElement"),Sw=yb("IE_PROTO"),_w=function(){},Dw=function(e){return"<script>"+e+"<\/script>"},Aw=function(e){e.write(Dw("")),e.close();var t=e.parentWindow.Object;return e=null,t},Tw=function(){try{uw=new ActiveXObject("htmlfile")}catch(r){}var e,t;Tw="undefined"!=typeof document?document.domain&&uw?Aw(uw):((t=Jy("iframe")).style.display="none",kw.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Dw("document.F=Object")),e.close(),e.F):Aw(uw);for(var n=Vb.length;n--;)delete Tw.prototype[Vb[n]];return Tw()};bb[Sw]=!0;var Ow,Pw,Iw=Object.create||function(e,t){var n;return null!==e?(_w.prototype=ib(e),n=new _w,_w.prototype=null,n[Sw]=e):n=Tw(),void 0===t?n:Ew(n,t)},Fw=jm.RegExp,Bw=Hm(function(){var e=Fw(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),Lw=jm.RegExp,Nw=Hm(function(){var e=Lw("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Mw=Db.get,Rw=Iy("native-string-replace",String.prototype.replace),jw=RegExp.prototype.exec,Hw=jw,zw=Qm("".charAt),Uw=Qm("".indexOf),$w=Qm("".replace),Ww=Qm("".slice),Vw=(Pw=/b*/g,$m(jw,Ow=/a/,"a"),$m(jw,Pw,"a"),0!==Ow.lastIndex||0!==Pw.lastIndex),Gw=xw.BROKEN_CARET,qw=void 0!==/()??/.exec("")[1];(Vw||qw||Gw||Bw||Nw)&&(Hw=function(e){var t,n,r,i,o,a,s,l=this,u=Mw(l),c=vw(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=$m(Hw,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=Gw&&l.sticky,p=$m(mw,l),g=l.source,v=0,m=c;if(h&&(p=$w(p,"y",""),-1===Uw(p,"g")&&(p+="g"),m=Ww(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==zw(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),qw&&(n=new RegExp("^"+g+"$(?!\\s)",p)),Vw&&(r=l.lastIndex),i=$m(jw,h?n:l,m),h?i?(i.input=Ww(i.input,v),i[0]=Ww(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:Vw&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),qw&&i&&i.length>1&&$m(Rw,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=Iw(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var Kw=Hw;sw({target:"RegExp",proto:!0,forced:/./.exec!==Kw},{exec:Kw}),Vy("species");var Yw=RegExp.prototype,Xw=Qm("".charAt),Jw=Qm("".charCodeAt),Zw=Qm("".slice),Qw={charAt:function(e,t){var n,r,i=vw(sy(e)),o=Lb(t),a=i.length;return o<0||o>=a?"":(n=Jw(i,o))<55296||n>56319||o+1===a||(r=Jw(i,o+1))<56320||r>57343?Xw(i,o):Zw(i,o,o+2)}},ex=Qw.charAt,tx=function(e,t,n){return t+(n?ex(e,t).length:1)},nx=jm.TypeError,rx=function(e,t){var n=e.exec;if(uy(n)){var r=$m(n,e,t);return null!==r&&ib(r),r}if("RegExp"===ny(e))return $m(Kw,e,t);throw nx("RegExp#exec called on incompatible receiver")};!function(e){var t=Vy(e),n=!Hm(function(){var n={};return n[t]=function(){return 7},7!=""[e](n)}),r=n&&!Hm(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},n[t](""),!e});if(!n||!r){var i=Qm(/./[t]),o=function(e,t,n){return[function(t){var n=sy(this),r=null==t?void 0:Dy(t,e);return r?$m(r,t,n):new RegExp(t)[e](vw(n))},function(e){var r=ib(this),i=vw(e),o=n(t,r,i);if(o.done)return o.value;if(!r.global)return rx(r,i);var a=r.unicode;r.lastIndex=0;for(var s,l=[],u=0;null!==(s=rx(r,i));){var c=vw(s[0]);l[u]=c,""===c&&(r.lastIndex=tx(i,Hb(r.lastIndex),a)),u++}return 0===u?null:l}]}(t,""[e],function(e,t,r,o,a){var s=Qm(e),l=t.exec;return l===Kw||l===Yw.exec?n&&!a?{done:!0,value:i(t,r,o)}:{done:!0,value:s(r,t,o)}:{done:!1}});Ib(String.prototype,e,o[0]),Ib(Yw,t,o[1])}}("match"),sw({global:!0},{globalThis:jm});var ix=!Hm(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),ox=yb("IE_PROTO"),ax=jm.Object,sx=ax.prototype,lx=ix?ax.getPrototypeOf:function(e){var t=By(e);if(Ny(t,ox))return t[ox];var n=t.constructor;return uy(n)&&t instanceof n?n.prototype:t instanceof ax?sx:null},ux=jm.String,cx=jm.TypeError,fx=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Qm(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return ib(n),function(e){if("object"==typeof e||uy(e))return e;throw cx("Can't set "+ux(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),dx=jm.Array,hx=Math.max,px=Qm("".replace),gx=Qm("".split),vx=Qm([].join),mx=String(Error("zxcasd").stack),yx=/\n\s*at [^:]*:[^\n]*/,bx=yx.test(mx),wx=/@[^\n]*\n/.test(mx)&&!/zxcasd/.test(mx),xx=Qm(Qm.bind),Cx=function(e,t){return _y(e),void 0===t?e:xx?xx(e,t):function(){return e.apply(t,arguments)}},Ex={},kx=Vy("iterator"),Sx=Array.prototype,_x=Vy("iterator"),Dx=function(e){if(null!=e)return Dy(e,_x)||Dy(e,"@@iterator")||Ex[pw(e)]},Ax=jm.TypeError,Tx=function(e,t,n){var r,i;ib(e);try{if(!(r=Dy(e,"return"))){if("throw"===t)throw n;return n}r=$m(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return ib(r),n},Ox=jm.TypeError,Px=function(e,t){this.stopped=e,this.result=t},Ix=Px.prototype,Fx=!Hm(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Km(1,7)),7!==e.stack)}),Bx=Vy("toStringTag"),Lx=jm.Error,Nx=[].push,Mx=function(e,t){var n,r=arguments.length>2?arguments[2]:void 0,i=dy(Rx,this);fx?n=fx(new Lx(void 0),i?lx(this):Rx):(n=i?this:Iw(Rx),ub(n,Bx,"Error")),ub(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:vw(e)}(t,"")),Fx&&ub(n,"stack",function(e,t){if("string"!=typeof e)return e;if(bx)for(;t--;)e=px(e,yx,"");else if(wx)return vx(function(e,t){for(var n,r,i,o,a=zb(e),s=Rb(t,a),l=Rb(a,a),u=dx(hx(l-s,0)),c=0;s<l;s++,c++)n=u,r=c,i=e[s],(o=Ky(r))in n?lb.f(n,o,Km(0,i)):n[o]=i;return u.length=c,u}(gx(e,"\n"),t),"\n");return e}(n.stack,1)),function(e,t){cy(t)&&"cause"in t&&ub(e,"cause",t.cause)}(n,r);var o=[];return function(e,t,n){var r,i,o,a,s,l,u,c,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),p=Cx(Nx,n&&n.that),g=function(e){return r&&Tx(r,"normal",e),new Px(!0,e)},v=function(e){return f?(ib(e),h?p(e[0],e[1],g):p(e[0],e[1])):h?p(e,g):p(e)};if(d)r=e;else{if(!(i=Dx(e)))throw Ox(ky(e)+" is not iterable");if(void 0!==(c=i)&&(Ex.Array===c||Sx[kx]===c)){for(o=0,a=zb(e);a>o;o++)if((s=v(e[o]))&&dy(Ix,s))return s;return new Px(!1)}r=function(e,t){var n=arguments.length<2?Dx(e):t;if(_y(n))return ib($m(n,e));throw Ax(ky(e)+" is not iterable")}(e,i)}for(l=r.next;!(u=$m(l,r)).done;){try{s=v(u.value)}catch(c){Tx(r,"throw",c)}if("object"==typeof s&&s&&dy(Ix,s))return s}new Px(!1)}(e,0,{that:o}),ub(n,"errors",o),n};fx?fx(Mx,Lx):Zb(Mx,Lx);var Rx=Mx.prototype=Iw(Lx.prototype,{constructor:Km(1,Mx),message:Km(1,""),name:Km(1,"AggregateError")});sw({global:!0},{AggregateError:Mx});var jx=Vy("unscopables"),Hx=Array.prototype;null==Hx[jx]&&lb.f(Hx,jx,{configurable:!0,value:Iw(null)});var zx,Ux,$x,Wx=function(e){Hx[jx][e]=!0},Vx=Vy("iterator"),Gx=!1;[].keys&&("next"in($x=[].keys())?(Ux=lx(lx($x)))!==Object.prototype&&(zx=Ux):Gx=!0);var qx=null==zx||Hm(function(){var e={};return zx[Vx].call(e)!==e});qx&&(zx={}),uy(zx[Vx])||Ib(zx,Vx,function(){return this});var Kx={IteratorPrototype:zx,BUGGY_SAFARI_ITERATORS:Gx},Yx=lb.f,Xx=Vy("toStringTag"),Jx=function(e,t,n){e&&!Ny(e=n?e:e.prototype,Xx)&&Yx(e,Xx,{configurable:!0,value:t})},Zx=Kx.IteratorPrototype,Qx=function(){return this},eC=Pb.PROPER,tC=Pb.CONFIGURABLE,nC=Kx.IteratorPrototype,rC=Kx.BUGGY_SAFARI_ITERATORS,iC=Vy("iterator"),oC=function(){return this},aC=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=Iw(Zx,{next:Km(1,l)}),Jx(s,u,!1),Ex[u]=Qx;var c,f,d=function(e){if(e===i&&m)return m;if(!rC&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[iC]||g["@@iterator"]||i&&g[i],m=!rC&&v||d(i),y="Array"==t&&g.entries||v;return y&&(c=lx(y.call(new e)))!==Object.prototype&&c.next&&(lx(c)!==nC&&(fx?fx(c,nC):uy(c[iC])||Ib(c,iC,oC)),Jx(c,h,!0)),eC&&"values"==i&&v&&"values"!==v.name&&(tC?ub(g,"name","values"):(p=!0,m=function(){return $m(v,this)})),i&&(f={values:d("values"),keys:d("keys"),entries:d("entries")},a||sw({target:t,proto:!0,forced:rC||p},f)),g[iC]!==m&&Ib(g,iC,m,{name:i}),Ex[t]=m,f},sC=Db.set,lC=Db.getterFor("Array Iterator"),uC=aC(Array,"Array",function(e,t){sC(this,{type:"Array Iterator",target:ly(e),index:0,kind:t})},function(){var e=lC(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");Ex.Arguments=Ex.Array,Wx("keys"),Wx("values"),Wx("entries");var cC=Qw.charAt,fC=Db.set,dC=Db.getterFor("String Iterator");aC(String,"String",function(e){fC(this,{type:"String Iterator",string:vw(e),index:0})},function(){var e,t=dC(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=cC(n,r),t.index+=e.length,{value:e,done:!1})});var hC,pC={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},gC=Jy("span").classList,vC=gC&&gC.constructor&&gC.constructor.prototype,mC=vC===Object.prototype?void 0:vC,yC=Vy("iterator"),bC=Vy("toStringTag"),wC=uC.values,xC=function(e,t){if(e){if(e[yC]!==wC)try{ub(e,yC,wC)}catch(r){e[yC]=wC}if(e[bC]||ub(e,bC,t),pC[t])for(var n in uC)if(e[n]!==uC[n])try{ub(e,n,uC[n])}catch(r){e[n]=uC[n]}}};for(var CC in pC)xC(jm[CC]&&jm[CC].prototype,CC);function EC(){"undefined"==typeof globalThis&&(window.globalThis=window)}function kC(){void 0===Mm&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}xC(mC,"DOMTokenList"),"undefined"==typeof global?("ActiveXObject"in window&&console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser."),EC(),kC()):global&&(null===(hC=global.navigator)||void 0===hC?void 0:hC.userAgent.match("QQBrowser"))&&(EC(),kC());var SC=Array.isArray||function(e){return"Array"==Xh(e)},_C=function(){},DC=[],AC=ap("Reflect","construct"),TC=/^\s*(?:class|function)\b/,OC=Mh(TC.exec),PC=!TC.exec(_C),IC=function(e){if(!Rh(e))return!1;try{return AC(_C,DC,e),!0}catch(t){return!1}},FC=!AC||jh(function(){var e;return IC(IC.call)||!IC(Object)||!IC(function(){e=!0})||e})?function(e){if(!Rh(e))return!1;switch(Cv(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return PC||!!OC(TC,Uv(e))}:IC,BC=zp("species"),LC=Dh.Array,NC=function(e,t){return new(SC(n=e)&&(r=n.constructor,(FC(r)&&(r===LC||SC(r.prototype))||rp(r)&&null===(r=r[BC]))&&(r=void 0)),void 0===r?LC:r)(0===t?0:t);var n,r},MC=zp("species"),RC=zp("isConcatSpreadable"),jC=Dh.TypeError,HC=gp>=51||!jh(function(){var e=[];return e[RC]=!1,e.concat()[0]!==e}),zC=gp>=51||!jh(function(){var e=[];return(e.constructor={})[MC]=function(){return{foo:1}},1!==e.concat(Boolean).foo}),UC=function(e){if(!rp(e))return!1;var t=e[RC];return void 0!==t?!!t:SC(e)};mg({target:"Array",proto:!0,forced:!HC||!zC},{concat:function(e){var t,n,r,i,o,a=Op(this),s=NC(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(UC(o=-1===t?a:arguments[t])){if(l+(i=Lg(o))>9007199254740991)throw jC("Maximum allowed index exceeded");for(n=0;n<i;n++,l++)n in o&&rv(s,l,o[n])}else{if(l>=9007199254740991)throw jC("Maximum allowed index exceeded");rv(s,l++,o)}return s.length=l,s}});var $C=Wg.f,WC="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],VC={f:function(e){return WC&&"Window"==Xh(e)?function(e){try{return $C(e)}catch(t){return av(WC)}}(e):$C(np(e))}},GC=Mh([].slice),qC={f:zp},KC=hg.f,YC=function(e){var t=ip.Symbol||(ip.Symbol={});Ip(t,e)||KC(t,e,{value:qC.f(e)})},XC=(Mh([].push),function(e,t,n,r){for(var i=Op(e),o=Qh(i),a=ag(t,n),s=Lg(o),l=0,u=void 0;s>l;l++)l in o&&a(o[l],l,i);return u}),JC=bg("hidden"),ZC=zp("toPrimitive"),QC=tm.set,eE=tm.getterFor("Symbol"),tE=Object.prototype,nE=Dh.Symbol,rE=nE&&nE.prototype,iE=Dh.TypeError,oE=Dh.QObject,aE=ap("JSON","stringify"),sE=Jp.f,lE=hg.f,uE=VC.f,cE=Gh.f,fE=Mh([].push),dE=Ap("symbols"),hE=Ap("op-symbols"),pE=Ap("string-to-symbol-registry"),gE=Ap("symbol-to-string-registry"),vE=Ap("wks"),mE=!oE||!oE.prototype||!oE.prototype.findChild,yE=Hh&&jh(function(){return 7!=nv(lE({},"a",{get:function(){return lE(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=sE(tE,t);r&&delete tE[t],lE(e,t,n),r&&e!==tE&&lE(tE,t,r)}:lE,bE=function(e,t){var n=dE[e]=nv(rE);return QC(n,{type:"Symbol",tag:e,description:t}),Hh||(n.description=t),n},wE=function(e,t,n){e===tE&&wE(hE,t,n),ug(e);var r=Wp(t);return ug(n),Ip(dE,r)?(n.enumerable?(Ip(e,JC)&&e[JC][r]&&(e[JC][r]=!1),n=nv(n,{enumerable:qh(0,!1)})):(Ip(e,JC)||lE(e,JC,qh(1,{})),e[JC][r]=!0),yE(e,r,n)):lE(e,r,n)},xE=function(e,t){ug(e);var n=np(t),r=Kg(n).concat(SE(n));return XC(r,function(t){Hh&&!Uh(CE,n,t)||wE(e,t,n[t])}),e},CE=function(e){var t=Wp(e),n=Uh(cE,this,t);return!(this===tE&&Ip(dE,t)&&!Ip(hE,t))&&(!(n||!Ip(this,t)||!Ip(dE,t)||Ip(this,JC)&&this[JC][t])||n)},EE=function(e,t){var n=np(e),r=Wp(t);if(n!==tE||!Ip(dE,r)||Ip(hE,r)){var i=sE(n,r);return!i||!Ip(dE,r)||Ip(n,JC)&&n[JC][r]||(i.enumerable=!0),i}},kE=function(e){var t=uE(np(e)),n=[];return XC(t,function(e){Ip(dE,e)||Ip(Mg,e)||fE(n,e)}),n},SE=function(e){var t=e===tE,n=uE(t?hE:np(e)),r=[];return XC(n,function(e){!Ip(dE,e)||t&&!Ip(tE,e)||fE(r,dE[e])}),r};if(vp||(rE=(nE=function(){if(sp(rE,this))throw iE("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Pv(arguments[0]):void 0,t=Np(e),n=function(e){this===tE&&Uh(n,hE,e),Ip(this,JC)&&Ip(this[JC],t)&&(this[JC][t]=!1),yE(this,t,qh(1,e))};return Hh&&mE&&yE(tE,t,{configurable:!0,set:n}),bE(t,e)}).prototype,am(rE,"toString",function(){return eE(this).tag}),am(nE,"withoutSetter",function(e){return bE(Np(e),e)}),Gh.f=CE,hg.f=wE,Jp.f=EE,Wg.f=VC.f=kE,Vg.f=SE,qC.f=function(e){return bE(zp(e),e)},Hh&&lE(rE,"description",{configurable:!0,get:function(){return eE(this).description}})),mg({global:!0,wrap:!0,forced:!vp,sham:!vp},{Symbol:nE}),XC(Kg(vE),function(e){YC(e)}),mg({target:"Symbol",stat:!0,forced:!vp},{for:function(e){var t=Pv(e);if(Ip(pE,t))return pE[t];var n=nE(t);return pE[t]=n,gE[n]=t,n},keyFor:function(e){if(!bp(e))throw iE(e+" is not a symbol");if(Ip(gE,e))return gE[e]},useSetter:function(){mE=!0},useSimple:function(){mE=!1}}),mg({target:"Object",stat:!0,forced:!vp,sham:!Hh},{create:function(e,t){return void 0===t?nv(e):xE(nv(e),t)},defineProperty:wE,defineProperties:xE,getOwnPropertyDescriptor:EE}),mg({target:"Object",stat:!0,forced:!vp},{getOwnPropertyNames:kE,getOwnPropertySymbols:SE}),mg({target:"Object",stat:!0,forced:jh(function(){Vg.f(1)})},{getOwnPropertySymbols:function(e){return Vg.f(Op(e))}}),aE){var _E=!vp||jh(function(){var e=nE();return"[null]"!=aE([e])||"{}"!=aE({a:e})||"{}"!=aE(Object(e))});mg({target:"JSON",stat:!0,forced:_E},{stringify:function(e,t,n){var r=GC(arguments),i=t;if((rp(t)||void 0!==e)&&!bp(e))return SC(t)||(t=function(e,t){if(Rh(i)&&(t=Uh(i,this,e,t)),!bp(t))return t}),r[1]=t,Ih(aE,null,r)}})}if(!rE[ZC]){var DE=rE.valueOf;am(rE,ZC,function(e){return Uh(DE,this)})}pm(nE,"Symbol"),Mg[JC]=!0,YC("asyncIterator"),YC("hasInstance"),YC("isConcatSpreadable"),YC("iterator"),YC("match"),YC("matchAll"),YC("replace"),YC("search"),YC("species"),YC("split"),YC("toPrimitive"),YC("toStringTag"),YC("unscopables"),pm(Dh.JSON,"JSON",!0);var AE=ip.Symbol;YC("asyncDispose"),YC("dispose"),YC("matcher"),YC("metadata"),YC("observable"),YC("patternMatch"),YC("replaceAll");var TE=AE,OE=qC.f("iterator"),PE=Eh(function(e){function t(n){return"function"==typeof TE&&"symbol"==typeof OE?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof TE&&e.constructor===TE&&e!==TE.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),IE=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(PE),FE=tb.f,BE=Hm(function(){FE(1)});if(sw({target:"Object",stat:!0,forced:!zm||BE,sham:!zm},{getOwnPropertyDescriptor:function(e,t){return FE(ly(e),t)}}),"object"===("undefined"==typeof global?"undefined":IE(global))){var LE=Object.getOwnPropertyDescriptor(global,"window");global.window&&!LE.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}function NE(e){return"[object Object]"===Object.prototype.toString.call(e)}function ME(e){var t,n;return!1!==NE(e)&&(void 0===(t=e.constructor)||!1!==NE(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function RE(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(e){return"'"+e+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function jE(e){return!!e&&!!e[Ek]}function HE(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===kk}(e)||Array.isArray(e)||!!e[Ck]||!!e.constructor[Ck]||VE(e)||GE(e))}function zE(e,t,n){void 0===n&&(n=!1),0===UE(e)?(n?Object.keys:Sk)(e).forEach(function(r){n&&"symbol"==typeof r||t(r,e[r],e)}):e.forEach(function(n,r){return t(r,n,e)})}function UE(e){var t=e[Ek];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:VE(e)?2:GE(e)?3:0}function $E(e,t){return 2===UE(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function WE(e,t,n){var r=UE(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function VE(e){return yk&&e instanceof Map}function GE(e){return bk&&e instanceof Set}function qE(e){return e.o||e.t}function KE(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=_k(e);delete t[Ek];for(var n=Sk(t),r=0;r<n.length;r++){var i=n[r],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function YE(e,t){return void 0===t&&(t=!1),JE(e)||jE(e)||!HE(e)||(UE(e)>1&&(e.set=e.add=e.clear=e.delete=XE),Object.freeze(e),t&&zE(e,function(e,t){return YE(t,!0)},!0)),e}function XE(){RE(2)}function JE(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function ZE(e){var t=Dk[e];return t||RE(18,e),t}function QE(){return vk}function ek(e,t){t&&(ZE("Patches"),e.u=[],e.s=[],e.v=t)}function tk(e){nk(e),e.p.forEach(ik),e.p=null}function nk(e){e===vk&&(vk=e.l)}function rk(e){return vk={p:[],l:vk,h:e,m:!0,_:0}}function ik(e){var t=e[Ek];0===t.i||1===t.i?t.j():t.O=!0}function ok(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||ZE("ES5").S(t,e,r),r?(n[Ek].P&&(tk(t),RE(4)),HE(e)&&(e=ak(t,e),t.l||lk(t,e)),t.u&&ZE("Patches").M(n[Ek],e,t.u,t.s)):e=ak(t,n,[]),tk(t),t.u&&t.v(t.u,t.s),e!==xk?e:void 0}function ak(e,t,n){if(JE(t))return t;var r=t[Ek];if(!r)return zE(t,function(i,o){return sk(e,r,t,i,o,n)},!0),t;if(r.A!==e)return t;if(!r.P)return lk(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=KE(r.k):r.o;zE(3===r.i?new Set(i):i,function(t,o){return sk(e,r,i,t,o,n)}),lk(e,i,!1),n&&e.u&&ZE("Patches").R(r,n,e.u,e.s)}return r.o}function sk(e,t,n,r,i,o){if(jE(i)){var a=ak(e,i,o&&t&&3!==t.i&&!$E(t.D,r)?o.concat(r):void 0);if(WE(n,r,a),!jE(a))return;e.m=!1}if(HE(i)&&!JE(i)){if(!e.h.F&&e._<1)return;ak(e,i),t&&t.A.l||lk(e,i)}}function lk(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&YE(t,n)}function uk(e,t){var n=e[Ek];return(n?qE(n):e)[t]}function ck(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function fk(e){e.P||(e.P=!0,e.l&&fk(e.l))}function dk(e){e.o||(e.o=KE(e.t))}function hk(e,t,n){var r=VE(t)?ZE("MapSet").N(t,n):GE(t)?ZE("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:QE(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=Ak;n&&(i=[r],o=Tk);var a=Proxy.revocable(i,o),s=a.revoke,l=a.proxy;return r.k=l,r.j=s,l}(t,n):ZE("ES5").J(t,n);return(n?n.A:QE()).p.push(r),r}function pk(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return KE(e)}var gk,vk,mk="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),yk="undefined"!=typeof Map,bk="undefined"!=typeof Set,wk="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,xk=mk?Symbol.for("immer-nothing"):((gk={})["immer-nothing"]=!0,gk),Ck=mk?Symbol.for("immer-draftable"):"__$immer_draftable",Ek=mk?Symbol.for("immer-state"):"__$immer_state",kk=""+Object.prototype.constructor,Sk="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,_k=Object.getOwnPropertyDescriptors||function(e){var t={};return Sk(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Dk={},Ak={get:function(e,t){if(t===Ek)return e;var n=qE(e);if(!$E(n,t))return function(e,t,n){var r,i=ck(t,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!HE(r)?r:r===uk(e.t,t)?(dk(e),e.o[t]=hk(e.A.h,r,e)):r},has:function(e,t){return t in qE(e)},ownKeys:function(e){return Reflect.ownKeys(qE(e))},set:function(e,t,n){var r,i,o=ck(qE(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,n),!0;if(!e.P){var a=uk(qE(e),t),s=null==a?void 0:a[Ek];if(s&&s.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(((r=n)===(i=a)?0!==r||1/r==1/i:r!=r&&i!=i)&&(void 0!==n||$E(e.t,t)))return!0;dk(e),fk(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==uk(e.t,t)||t in e.t?(e.D[t]=!1,dk(e),fk(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=qE(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){RE(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){RE(12)}},Tk={};zE(Ak,function(e,t){Tk[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Tk.deleteProperty=function(e,t){return Ak.deleteProperty.call(this,e[0],t)},Tk.set=function(e,t,n){return Ak.set.call(this,e[0],t,n,e[0])};var Ok=function(){function e(e){var t=this;this.g=wk,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var o=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return o.produce(e,function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))})}}var a;if("function"!=typeof n&&RE(6),void 0!==r&&"function"!=typeof r&&RE(7),HE(e)){var s=rk(t),l=hk(t,e,void 0),u=!0;try{a=n(l),u=!1}finally{u?tk(s):nk(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then(function(e){return ek(s,r),ok(e,s)},function(e){throw tk(s),e}):(ek(s,r),ok(a,s))}if(!e||"object"!=typeof e){if((a=n(e))===xk)return;return void 0===a&&(a=e),t.F&&YE(a,!0),a}RE(21,e)},this.produceWithPatches=function(e,n){return"function"==typeof e?function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return t.produceWithPatches(n,function(t){return e.apply(void 0,[t].concat(i))})}:[t.produce(e,n,function(e,t){r=e,i=t}),r,i];var r,i},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){HE(e)||RE(8),jE(e)&&(e=function(e){return jE(e)||RE(22,e),function e(t){if(!HE(t))return t;var n,r=t[Ek],i=UE(t);if(r){if(!r.P&&(r.i<4||!ZE("ES5").K(r)))return r.t;r.I=!0,n=pk(t,i),r.I=!1}else n=pk(t,i);return zE(n,function(t,i){var o,a;r&&(a=t,(2===UE(o=r.t)?o.get(a):o[a])===i)||WE(n,t,e(i))}),3===i?new Set(n):n}(e)}(e));var t=rk(this),n=hk(this,e,void 0);return n[Ek].C=!0,nk(t),n},t.finishDraft=function(e,t){var n=(e&&e[Ek]).A;return ek(n,t),ok(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!wk&&RE(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=ZE("Patches").$;return jE(e)?i(e,t):this.produce(e,function(e){return i(e,t)})},e}(),Pk=new Ok,Ik=Pk.produce;Pk.produceWithPatches.bind(Pk),Pk.setAutoFreeze.bind(Pk),Pk.setUseProxies.bind(Pk),Pk.applyPatches.bind(Pk);var Fk=Pk.createDraft.bind(Pk),Bk=Pk.finishDraft.bind(Pk);function Lk(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nk=new WeakMap,Mk=new WeakMap,Rk=new WeakMap,jk=new WeakMap,Hk=new WeakMap,zk=new WeakMap;function Uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uk(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Wk(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Vk,Gk=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,r=t?Zk(e):e,i=Vk.None,o=Vk.None,a=0,s=null;for(var l of r){var u=l.codePointAt(0);if(!u)break;var c=cS(l,u);if([i,o]=n?[o,c]:[c,i],fS(i,Vk.ZWJ)&&fS(o,Vk.ExtPict)&&!gS(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(fS(i,Vk.RI)&&fS(o,Vk.RI)&&!(s=null!==s?!s:!!n||mS(e.substring(0,e.length-a))))break;if(i!==Vk.None&&o!==Vk.None&&hS(i,o))break;a+=l.length}return a||1},qk=/\s/,Kk=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Yk=/['\u2018\u2019]/,Xk=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},Jk=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(qk.test(t))return!1;if(Yk.test(t)){var i=Gk(n,r),[o,a]=Xk(n,i,r);if(e(o,a,r))return!0}return!Kk.test(t)},Zk=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(eS(r.charCodeAt(0))){var i=e.charAt(t-n-1);if(Qk(i.charCodeAt(0))){yield i+r,n++;continue}}yield r}},Qk=e=>e>=55296&&e<=56319,eS=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(Vk||(Vk={}));var tS=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,nS=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,rS=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,iS=/^[\u1100-\u115F\uA960-\uA97C]$/,oS=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,aS=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,sS=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,lS=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,uS=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,cS=(e,t)=>{var n=Vk.Any;return-1!==e.search(tS)&&(n|=Vk.Extend),8205===t&&(n|=Vk.ZWJ),t>=127462&&t<=127487&&(n|=Vk.RI),-1!==e.search(nS)&&(n|=Vk.Prepend),-1!==e.search(rS)&&(n|=Vk.SpacingMark),-1!==e.search(iS)&&(n|=Vk.L),-1!==e.search(oS)&&(n|=Vk.V),-1!==e.search(aS)&&(n|=Vk.T),-1!==e.search(sS)&&(n|=Vk.LV),-1!==e.search(lS)&&(n|=Vk.LVT),-1!==e.search(uS)&&(n|=Vk.ExtPict),n};function fS(e,t){return 0!=(e&t)}var dS=[[Vk.L,Vk.L|Vk.V|Vk.LV|Vk.LVT],[Vk.LV|Vk.V,Vk.V|Vk.T],[Vk.LVT|Vk.T,Vk.T],[Vk.Any,Vk.Extend|Vk.ZWJ],[Vk.Any,Vk.SpacingMark],[Vk.Prepend,Vk.Any],[Vk.ZWJ,Vk.ExtPict],[Vk.RI,Vk.RI]];function hS(e,t){return-1===dS.findIndex(n=>fS(e,n[0])&&fS(t,n[1]))}var pS=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,gS=e=>-1!==e.search(pS),vS=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,mS=e=>{var t=e.match(vS);return null!==t&&t[0].length/2%2==1},yS=e=>ME(e)&&OS.isNodeList(e.children)&&!SS.isEditor(e),bS={isAncestor:e=>ME(e)&&OS.isNodeList(e.children),isElement:yS,isElementList:e=>Array.isArray(e)&&e.every(e=>bS.isElement(e)),isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return yS(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},wS=["text"],xS=["text"];function CS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ES(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CS(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kS=new WeakMap,SS={above(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:i=e.selection,match:o}=t;if(i){var a=SS.path(e,i),s="lowest"===r;for(var[l,u]of SS.levels(e,{at:a,voids:n,match:o,reverse:s}))if(!YS.isText(l)&&!BS.equals(a,u))return[l,u]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:SS.point(e,t,{edge:"end"}),focus:SS.end(e,[])},{distance:o=1}=r,a=0;for(var s of SS.positions(e,ES(ES({},r),{},{at:i}))){if(a>o)break;0!==a&&(n=s),a++}return n},before(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:SS.start(e,[]),focus:SS.point(e,t,{edge:"start"})},{distance:o=1}=r,a=0;for(var s of SS.positions(e,ES(ES({},r),{},{at:i,reverse:!0}))){if(a>o)break;0!==a&&(n=s),a++}return n},deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges:(e,t)=>[SS.start(e,t),SS.end(e,t)],end:(e,t)=>SS.point(e,t,{edge:"end"}),first(e,t){var n=SS.path(e,t,{edge:"start"});return SS.node(e,n)},fragment(e,t){var n=SS.range(e,t);return OS.fragment(e,n)},hasBlocks:(e,t)=>t.children.some(t=>SS.isBlock(e,t)),hasInlines:(e,t)=>t.children.some(t=>YS.isText(t)||SS.isInline(e,t)),hasTexts:(e,t)=>t.children.every(e=>YS.isText(e)),insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>bS.isElement(t)&&!e.isInline(t),isEditor(e){if(!ME(e))return!1;var t=kS.get(e);if(void 0!==t)return t;var n="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isInline&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&(null===e.marks||ME(e.marks))&&(null===e.selection||US.isRange(e.selection))&&OS.isNodeList(e.children)&&FS.isOperationList(e.operations);return kS.set(e,n),n},isEnd(e,t,n){var r=SS.end(e,n);return RS.equals(t,r)},isEdge:(e,t,n)=>SS.isStart(e,t,n)||SS.isEnd(e,t,n),isEmpty(e,t){var{children:n}=t,[r]=n;return 0===n.length||1===n.length&&YS.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:(e,t)=>bS.isElement(t)&&e.isInline(t),isNormalizing(e){var t=Rk.get(e);return void 0===t||t},isStart(e,t,n){if(0!==t.offset)return!1;var r=SS.start(e,n);return RS.equals(t,r)},isVoid:(e,t)=>bS.isElement(t)&&e.isVoid(t),last(e,t){var n=SS.path(e,t,{edge:"end"});return SS.node(e,n)},leaf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=SS.path(e,t,n);return[OS.leaf(e,r),r]},*levels(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:o}=t;if(null==o&&(o=()=>!0),n){var a=[],s=SS.path(e,n);for(var[l,u]of OS.levels(e,s))if(o(l,u)&&(a.push([l,u]),!i&&SS.isVoid(e,l)))break;r&&a.reverse(),yield*h(a)}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(US.isExpanded(n)){var[r]=SS.nodes(e,{match:YS.isText});if(r){var[i]=r;return Wk(i,wS)}return{}}var{anchor:o}=n,{path:a}=o,[s]=SS.leaf(e,a);if(0===o.offset){var l=SS.previous(e,{at:a,match:YS.isText}),u=SS.above(e,{match:t=>SS.isBlock(e,t)});if(l&&u){var[c,f]=l,[,d]=u;BS.isAncestor(d,f)&&(s=c)}}return Wk(s,xS)},next(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=SS.after(e,o,{voids:r});if(a){var[,s]=SS.last(e,[]),l=[a.path,s];if(BS.isPath(o)&&0===o.length)throw new Error("Cannot get the next node from the root node!");if(null==i)if(BS.isPath(o)){var[u]=SS.parent(e,o);i=e=>u.children.includes(e)}else i=()=>!0;var[c]=SS.nodes(e,{at:l,match:i,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=SS.path(e,t,n);return[OS.get(e,r),r]},*nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:s}=t;if(s||(s=()=>!0),n){var l,u;if(_S.isSpan(n))l=n[0],u=n[1];else{var c=SS.path(e,n,{edge:"start"}),f=SS.path(e,n,{edge:"end"});l=o?f:c,u=o?c:f}var d,p=OS.nodes(e,{reverse:o,from:l,to:u,pass:t=>{var[n]=t;return!a&&SS.isVoid(e,n)}}),g=[];for(var[v,m]of p){var y=d&&0===BS.compare(m,d[1]);if("highest"!==r||!y)if(s(v,m))if("lowest"===r&&y)d=[v,m];else{var b="lowest"===r?d:[v,m];b&&(i?g.push(b):yield b),d=[v,m]}else if(i&&!y&&YS.isText(v))return}"lowest"===r&&d&&(i?g.push(d):yield d),i&&(yield*h(g))}},normalize(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1}=t,r=e=>Nk.get(e)||[];if(SS.isNormalizing(e)){if(n){var i=Array.from(OS.nodes(e),e=>{var[,t]=e;return t});Nk.set(e,i)}0!==r(e).length&&SS.withoutNormalizing(e,()=>{for(var t of r(e))if(OS.has(e,t)){var n=SS.node(e,t),[i,o]=n;bS.isElement(i)&&0===i.children.length&&e.normalizeNode(n)}for(var a=42*r(e).length,s=0;0!==r(e).length;){if(s>a)throw new Error("\n Could not completely normalize the editor after ".concat(a," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var l=r(e).pop();if(OS.has(e,l)){var u=SS.node(e,l);e.normalizeNode(u)}s++}})}},parent(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=SS.path(e,t,n),i=BS.parent(r);return SS.node(e,i)},path(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:i}=n;if(BS.isPath(t))if("start"===i){var[,o]=OS.first(e,t);t=o}else if("end"===i){var[,a]=OS.last(e,t);t=a}return US.isRange(t)&&(t="start"===i?US.start(t):"end"===i?US.end(t):BS.common(t.anchor.path,t.focus.path)),RS.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:(e,t)=>OS.has(e,t),pathRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return SS.pathRefs(e).delete(i),i.current=null,t}};return SS.pathRefs(e).add(i),i},pathRefs(e){var t=jk.get(e);return t||(t=new Set,jk.set(e,t)),t},point(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(BS.isPath(t)){var i;if("end"===r){var[,o]=OS.last(e,t);i=o}else{var[,a]=OS.first(e,t);i=a}var s=OS.get(e,i);if(!YS.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:i,offset:"end"===r?s.text.length:0}}if(US.isRange(t)){var[l,u]=US.edges(t);return"start"===r?l:u}return t},pointRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return SS.pointRefs(e).delete(i),i.current=null,t}};return SS.pointRefs(e).add(i),i},pointRefs(e){var t=Hk.get(e);return t||(t=new Set,Hk.set(e,t)),t},*positions(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1}=t;if(n){var a=SS.range(e,n),[s,l]=US.edges(a),u=i?l:s,c=!1,f="",d=0,h=0,p=0;for(var[g,v]of SS.nodes(e,{at:n,reverse:i,voids:o})){if(bS.isElement(g)){if(!o&&e.isVoid(g)){yield SS.start(e,v);continue}if(e.isInline(g))continue;if(SS.hasInlines(e,g)){var m=BS.isAncestor(v,l.path)?l:SS.end(e,v),y=BS.isAncestor(v,s.path)?s:SS.start(e,v);f=SS.string(e,{anchor:y,focus:m},{voids:o}),c=!0}}if(YS.isText(g)){var b=BS.equals(v,u.path);for(b?(h=i?u.offset:g.text.length-u.offset,p=u.offset):(h=g.text.length,p=i?h:0),(b||c||"offset"===r)&&(yield{path:v,offset:p},c=!1);;){if(0===d){if(""===f)break;d=w(f,r,i),f=Xk(f,d,i)[1]}if(p=i?p-d:p+d,(h-=d)<0){d=-h;break}d=0,yield{path:v,offset:p}}}}}function w(e,t,n){return"character"===t?Gk(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var i=Gk(e,t),[o,a]=Xk(e,i,t);if(Jk(o,a,t))r=!0,n+=i;else{if(r)break;n+=i}e=a}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=SS.before(e,o,{voids:r});if(a){var[,s]=SS.first(e,[]),l=[a.path,s];if(BS.isPath(o)&&0===o.length)throw new Error("Cannot get the previous node from the root node!");if(null==i)if(BS.isPath(o)){var[u]=SS.parent(e,o);i=e=>u.children.includes(e)}else i=()=>!0;var[c]=SS.nodes(e,{reverse:!0,at:l,match:i,mode:n,voids:r});return c}}},range:(e,t,n)=>US.isRange(t)&&!n?t:{anchor:SS.start(e,t),focus:SS.end(e,n||t)},rangeRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:t}=i;return SS.rangeRefs(e).delete(i),i.current=null,t}};return SS.rangeRefs(e).add(i),i},rangeRefs(e){var t=zk.get(e);return t||(t=new Set,zk.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){Rk.set(e,t)},start:(e,t)=>SS.point(e,t,{edge:"start"}),string(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,i=SS.range(e,t),[o,a]=US.edges(i),s="";for(var[l,u]of SS.nodes(e,{at:i,match:YS.isText,voids:r})){var c=l.text;BS.equals(u,a.path)&&(c=c.slice(0,a.offset)),BS.equals(u,o.path)&&(c=c.slice(o.offset)),s+=c}return s},unhangRange(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[i,o]=US.edges(t);if(0!==i.offset||0!==o.offset||US.isCollapsed(t))return t;var a=SS.above(e,{at:o,match:t=>SS.isBlock(e,t)}),s=a?a[1]:[],l={anchor:SS.start(e,[]),focus:o},u=!0;for(var[c,f]of SS.nodes(e,{at:l,match:YS.isText,reverse:!0,voids:r}))if(u)u=!1;else if(""!==c.text||BS.isBefore(f,s)){o={path:f,offset:c.text.length};break}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return SS.above(e,ES(ES({},t),{},{match:t=>SS.isVoid(e,t)}))},withoutNormalizing(e,t){var n=SS.isNormalizing(e);SS.setNormalizing(e,!1);try{t()}finally{SS.setNormalizing(e,n)}SS.normalize(e)}},_S={isSpan:e=>Array.isArray(e)&&2===e.length&&e.every(BS.isPath)},DS=["children"],AS=["text"],TS=new WeakMap,OS={ancestor(e,t){var n=OS.get(e,t);if(YS.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of BS.ancestors(t,n)){var i=[OS.ancestor(e,r),r];yield i}},child(e,t){if(YS.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{reverse:r=!1}=n,i=OS.ancestor(e,t),{children:o}=i,a=r?o.length-1:0;r?a>=0:a<o.length;){var s=OS.child(i,a),l=t.concat(a);yield[s,l],a=r?a-1:a+1}},common(e,t,n){var r=BS.common(t,n);return[OS.get(e,r),r]},descendant(e,t){var n=OS.get(e,t);if(SS.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(n));return n},*descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of OS.nodes(e,t))0!==r.length&&(yield[n,r])},*elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of OS.nodes(e,t))bS.isElement(n)&&(yield[n,r])},extractProps:e=>bS.isAncestor(e)?Wk(e,DS):Wk(e,AS),first(e,t){for(var n=t.slice(),r=OS.get(e,n);r&&!YS.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(YS.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=Ik({children:e.children},e=>{var[n,r]=US.edges(t),i=OS.nodes(e,{reverse:!0,pass:e=>{var[,n]=e;return!US.includes(t,n)}});for(var[,o]of i){if(!US.includes(t,o)){var a=OS.parent(e,o),s=o[o.length-1];a.children.splice(s,1)}if(BS.equals(o,r.path)){var l=OS.leaf(e,o);l.text=l.text.slice(0,r.offset)}if(BS.equals(o,n.path)){var u=OS.leaf(e,o);u.text=u.text.slice(n.offset)}}SS.isEditor(e)&&(e.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(YS.isText(n)||!n.children[i])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));n=n.children[i]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var i=t[r];if(YS.isText(n)||!n.children[i])return!1;n=n.children[i]}return!0},isNode:e=>YS.isText(e)||bS.isElement(e)||SS.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=TS.get(e);if(void 0!==t)return t;var n=e.every(e=>OS.isNode(e));return TS.set(e,n),n},last(e,t){for(var n=t.slice(),r=OS.get(e,n);r&&!YS.isText(r)&&0!==r.children.length;){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=OS.get(e,t);if(!YS.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of BS.levels(t,n)){var i=OS.get(e,r);yield[i,r]}},matches:(e,t)=>bS.isElement(e)&&bS.isElementProps(t)&&bS.matches(e,t)||YS.isText(e)&&YS.isTextProps(t)&&YS.matches(e,t),*nodes(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:i=[],to:o}=t,a=new Set,s=[],l=e;!o||!(r?BS.isBefore(s,o):BS.isAfter(s,o));)if(a.has(l)||(yield[l,s]),a.has(l)||YS.isText(l)||0===l.children.length||null!=n&&!1!==n([l,s])){if(0===s.length)break;if(!r){var u=BS.next(s);if(OS.has(e,u)){s=u,l=OS.get(e,s);continue}}r&&0!==s[s.length-1]?(s=BS.previous(s),l=OS.get(e,s)):(s=BS.parent(s),l=OS.get(e,s),a.add(l))}else{a.add(l);var c=r?l.children.length-1:0;BS.isAncestor(s,i)&&(c=i[s.length]),s=s.concat(c),l=OS.get(e,s)}},parent(e,t){var n=BS.parent(t),r=OS.get(e,n);if(YS.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>YS.isText(e)?e.text:e.children.map(OS.string).join(""),*texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of OS.nodes(e,t))YS.isText(n)&&(yield[n,r])}};function PS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PS(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var FS={isNodeOperation:e=>FS.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!ME(e))return!1;switch(e.type){case"insert_node":case"remove_node":return BS.isPath(e.path)&&OS.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&BS.isPath(e.path);case"merge_node":return"number"==typeof e.position&&BS.isPath(e.path)&&ME(e.properties);case"move_node":return BS.isPath(e.path)&&BS.isPath(e.newPath);case"set_node":return BS.isPath(e.path)&&ME(e.properties)&&ME(e.newProperties);case"set_selection":return null===e.properties&&US.isRange(e.newProperties)||null===e.newProperties&&US.isRange(e.properties)||ME(e.properties)&&ME(e.newProperties);case"split_node":return BS.isPath(e.path)&&"number"==typeof e.position&&ME(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>FS.isOperation(e)),isSelectionOperation:e=>FS.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>FS.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return IS(IS({},e),{},{type:"remove_node"});case"insert_text":return IS(IS({},e),{},{type:"remove_text"});case"merge_node":return IS(IS({},e),{},{type:"split_node",path:BS.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(BS.equals(t,n))return e;if(BS.isSibling(n,t))return IS(IS({},e),{},{path:t,newPath:n});var r=BS.transform(n,e),i=BS.transform(BS.next(n),e);return IS(IS({},e),{},{path:r,newPath:i});case"remove_node":return IS(IS({},e),{},{type:"insert_node"});case"remove_text":return IS(IS({},e),{},{type:"insert_text"});case"set_node":var{properties:o,newProperties:a}=e;return IS(IS({},e),{},{properties:a,newProperties:o});case"set_selection":var{properties:s,newProperties:l}=e;return IS(IS({},e),{},null==s?{properties:l,newProperties:null}:null==l?{properties:null,newProperties:s}:{properties:l,newProperties:s});case"split_node":return IS(IS({},e),{},{type:"merge_node",path:BS.next(e.path)})}}},BS={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=BS.levels(e,t);return n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var i=e[r];if(i!==t[r])break;n.push(i)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return BS.equals(r,i)&&o>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),i=t.slice(0,n);return BS.equals(r,i)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return BS.equals(r,i)&&o<a},equals:(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===BS.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===BS.compare(e,t),isBefore:(e,t)=>-1===BS.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===BS.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===BS.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===BS.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===BS.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&BS.equals(n,r)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=[],i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!BS.isAncestor(t,e)&&!BS.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ik(e,r=>{var{affinity:i="forward"}=n;if(e&&0!==(null==e?void 0:e.length)){if(null===r)return null;switch(t.type){case"insert_node":var{path:o}=t;(BS.equals(o,r)||BS.endsBefore(o,r)||BS.isAncestor(o,r))&&(r[o.length-1]+=1);break;case"remove_node":var{path:a}=t;if(BS.equals(a,r)||BS.isAncestor(a,r))return null;BS.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:s,position:l}=t;BS.equals(s,r)||BS.endsBefore(s,r)?r[s.length-1]-=1:BS.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=l);break;case"split_node":var{path:u,position:c}=t;if(BS.equals(u,r)){if("forward"===i)r[r.length-1]+=1;else if("backward"!==i)return null}else BS.endsBefore(u,r)?r[u.length-1]+=1:BS.isAncestor(u,r)&&e[u.length]>=c&&(r[u.length-1]+=1,r[u.length]-=c);break;case"move_node":var{path:f,newPath:d}=t;if(BS.equals(f,d))return;if(BS.isAncestor(f,r)||BS.equals(f,r)){var h=d.slice();return BS.endsBefore(f,d)&&f.length<d.length&&(h[f.length-1]-=1),h.concat(r.slice(f.length))}BS.isSibling(f,d)&&(BS.isAncestor(d,r)||BS.equals(d,r))?BS.endsBefore(f,r)?r[f.length-1]-=1:r[f.length-1]+=1:BS.endsBefore(d,r)||BS.equals(d,r)||BS.isAncestor(d,r)?(BS.endsBefore(f,r)&&(r[f.length-1]-=1),r[d.length-1]+=1):BS.endsBefore(f,r)&&(BS.equals(d,r)&&(r[d.length-1]+=1),r[f.length-1]-=1)}}})}},LS={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var i=BS.transform(n,t,{affinity:r});e.current=i,null==i&&e.unref()}}};function NS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NS(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var RS={compare(e,t){var n=BS.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>1===RS.compare(e,t),isBefore:(e,t)=>-1===RS.compare(e,t),equals:(e,t)=>e.offset===t.offset&&BS.equals(e.path,t.path),isPoint:e=>ME(e)&&"number"==typeof e.offset&&BS.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ik(e,e=>{if(null===e)return null;var{affinity:r="forward"}=n,{path:i,offset:o}=e;switch(t.type){case"insert_node":case"move_node":e.path=BS.transform(i,t,n);break;case"insert_text":BS.equals(t.path,i)&&t.offset<=o&&(e.offset+=t.text.length);break;case"merge_node":BS.equals(t.path,i)&&(e.offset+=t.position),e.path=BS.transform(i,t,n);break;case"remove_text":BS.equals(t.path,i)&&t.offset<=o&&(e.offset-=Math.min(o-t.offset,t.text.length));break;case"remove_node":if(BS.equals(t.path,i)||BS.isAncestor(t.path,i))return null;e.path=BS.transform(i,t,n);break;case"split_node":if(BS.equals(t.path,i)){if(t.position===o&&null==r)return null;(t.position<o||t.position===o&&"forward"===r)&&(e.offset-=t.position,e.path=BS.transform(i,t,MS(MS({},n),{},{affinity:"forward"})))}else e.path=BS.transform(i,t,n)}})}},jS={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var i=RS.transform(n,t,{affinity:r});e.current=i,null==i&&e.unref()}}},HS=["anchor","focus"];function zS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var US={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:i}=e;return US.isBackward(e)===n?[r,i]:[i,r]},end(e){var[,t]=US.edges(e);return t},equals:(e,t)=>RS.equals(e.anchor,t.anchor)&&RS.equals(e.focus,t.focus),includes(e,t){if(US.isRange(t)){if(US.includes(e,t.anchor)||US.includes(e,t.focus))return!0;var[n,r]=US.edges(e),[i,o]=US.edges(t);return RS.isBefore(n,i)&&RS.isAfter(r,o)}var[a,s]=US.edges(e),l=!1,u=!1;return RS.isPoint(t)?(l=RS.compare(t,a)>=0,u=RS.compare(t,s)<=0):(l=BS.compare(t,a.path)>=0,u=BS.compare(t,s.path)<=0),l&&u},intersection(e,t){var n=Wk(e,HS),[r,i]=US.edges(e),[o,a]=US.edges(t),s=RS.isBefore(r,o)?o:r,l=RS.isBefore(i,a)?i:a;return RS.isBefore(l,s)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zS(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({anchor:s,focus:l},n)},isBackward(e){var{anchor:t,focus:n}=e;return RS.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return RS.equals(t,n)},isExpanded:e=>!US.isCollapsed(e),isForward:e=>!US.isBackward(e),isRange:e=>ME(e)&&RS.isPoint(e.anchor)&&RS.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=US.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Ik(e,e=>{if(null===e)return null;var r,i,{affinity:o="inward"}=n;if("inward"===o){var a=US.isCollapsed(e);US.isForward(e)?(r="forward",i=a?r:"backward"):(r="backward",i=a?r:"forward")}else"outward"===o?US.isForward(e)?(r="backward",i="forward"):(r="forward",i="backward"):(r=o,i=o);var s=RS.transform(e.anchor,t,{affinity:r}),l=RS.transform(e.focus,t,{affinity:i});if(!s||!l)return null;e.anchor=s,e.focus=l})}},$S={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var i=US.transform(n,t,{affinity:r});e.current=i,null==i&&e.unref()}}},WS=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(ME(r)&&ME(i)){if(!WS(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==i[o])return!1}else if(r!==i)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},VS=["text"],GS=["anchor","focus"];function qS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qS(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var YS={equals(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function i(e){return Wk(e,VS)}return WS(r?i(e):e,r?i(t):t)},isText:e=>ME(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>YS.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[KS({},e)];for(var r of t){var i=Wk(r,GS),[o,a]=US.edges(r),s=[],l=0;for(var u of n){var{length:c}=u.text,f=l;if(l+=c,o.offset<=f&&a.offset>=l)Object.assign(u,i),s.push(u);else if(o.offset!==a.offset&&(o.offset===l||a.offset===f)||o.offset>l||a.offset<f||a.offset===f&&0!==f)s.push(u);else{var d=u,h=void 0,p=void 0;if(a.offset<l){var g=a.offset-f;p=KS(KS({},d),{},{text:d.text.slice(g)}),d=KS(KS({},d),{},{text:d.text.slice(0,g)})}if(o.offset>f){var v=o.offset-f;h=KS(KS({},d),{},{text:d.text.slice(0,v)}),d=KS(KS({},d),{},{text:d.text.slice(v)})}Object.assign(d,i),h&&s.push(h),s.push(d),p&&s.push(p)}}n=s}return n}};function XS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?XS(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ZS={transform(e,t){e.children=Fk(e.children);var n=e.selection&&Fk(e.selection);try{n=((e,t,n)=>{switch(n.type){case"insert_node":var{path:r,node:i}=n,o=OS.parent(e,r),a=r[r.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[s,l]of US.points(t))t[l]=RS.transform(s,n);break;case"insert_text":var{path:u,offset:c,text:f}=n;if(0===f.length)break;var d=OS.leaf(e,u),h=d.text.slice(0,c),p=d.text.slice(c);if(d.text=h+f+p,t)for(var[g,v]of US.points(t))t[v]=RS.transform(g,n);break;case"merge_node":var{path:m}=n,y=OS.get(e,m),b=BS.previous(m),w=OS.get(e,b),x=OS.parent(e,m),C=m[m.length-1];if(YS.isText(y)&&YS.isText(w))w.text+=y.text;else{if(YS.isText(y)||YS.isText(w))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(y," ").concat(w));w.children.push(...y.children)}if(x.children.splice(C,1),t)for(var[E,k]of US.points(t))t[k]=RS.transform(E,n);break;case"move_node":var{path:S,newPath:_}=n;if(BS.isAncestor(S,_))throw new Error("Cannot move a path [".concat(S,"] to new path [").concat(_,"] because the destination is inside itself."));var D=OS.get(e,S),A=OS.parent(e,S),T=S[S.length-1];A.children.splice(T,1);var O=BS.transform(S,n),P=OS.get(e,BS.parent(O)),I=O[O.length-1];if(P.children.splice(I,0,D),t)for(var[F,B]of US.points(t))t[B]=RS.transform(F,n);break;case"remove_node":var{path:L}=n,N=L[L.length-1];if(OS.parent(e,L).children.splice(N,1),t)for(var[M,R]of US.points(t)){var j=RS.transform(M,n);if(null!=t&&null!=j)t[R]=j;else{var H=void 0,z=void 0;for(var[U,$]of OS.texts(e)){if(-1!==BS.compare($,L)){z=[U,$];break}H=[U,$]}var W=!1;H&&z&&(W=BS.equals(z[1],L)?!BS.hasPrevious(z[1]):BS.common(H[1],L).length<BS.common(z[1],L).length),H&&!W?(M.path=H[1],M.offset=H[0].text.length):z?(M.path=z[1],M.offset=0):t=null}}break;case"remove_text":var{path:V,offset:G,text:q}=n;if(0===q.length)break;var K=OS.leaf(e,V),Y=K.text.slice(0,G),X=K.text.slice(G+q.length);if(K.text=Y+X,t)for(var[J,Z]of US.points(t))t[Z]=RS.transform(J,n);break;case"set_node":var{path:Q,properties:ee,newProperties:te}=n;if(0===Q.length)throw new Error("Cannot set properties on the root node!");var ne=OS.get(e,Q);for(var re in te){if("children"===re||"text"===re)throw new Error('Cannot set the "'.concat(re,'" property of nodes!'));var ie=te[re];null==ie?delete ne[re]:ne[re]=ie}for(var oe in ee)te.hasOwnProperty(oe)||delete ne[oe];break;case"set_selection":var{newProperties:ae}=n;if(null==ae)t=ae;else{if(null==t){if(!US.isRange(ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(ae)," when there is no current selection."));t=JS({},ae)}for(var se in ae){var le=ae[se];if(null==le){if("anchor"===se||"focus"===se)throw new Error('Cannot remove the "'.concat(se,'" selection property'));delete t[se]}else t[se]=le}}break;case"split_node":var{path:ue,position:ce,properties:fe}=n;if(0===ue.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(ue,"] because the root node cannot be split."));var de,he=OS.get(e,ue),pe=OS.parent(e,ue),ge=ue[ue.length-1];if(YS.isText(he)){var ve=he.text.slice(0,ce),me=he.text.slice(ce);he.text=ve,de=JS(JS({},fe),{},{text:me})}else{var ye=he.children.slice(0,ce),be=he.children.slice(ce);he.children=ye,de=JS(JS({},fe),{},{children:be})}if(pe.children.splice(ge+1,0,de),t)for(var[we,xe]of US.points(t))t[xe]=RS.transform(we,n)}return t})(e,n,t)}finally{e.children=Bk(e.children),e.selection=n?jE(n)?Bk(n):n:null}}},QS=["text"],e_=["children"];function t_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?t_(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var r_={insertNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};SS.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:a,match:s,select:l}=n;if(OS.isNode(t)&&(t=[t]),0!==t.length){var[u]=t;if(a||(a=e.selection?e.selection:e.children.length>0?SS.end(e,[]):[0],l=!0),null==l&&(l=!1),US.isRange(a))if(r||(a=SS.unhangRange(e,a)),US.isCollapsed(a))a=a.anchor;else{var[,c]=US.edges(a),f=SS.pointRef(e,c);h_.delete(e,{at:a}),a=f.unref()}if(RS.isPoint(a)){null==s&&(s=YS.isText(u)?e=>YS.isText(e):e.isInline(u)?t=>YS.isText(t)||SS.isInline(e,t):t=>SS.isBlock(e,t));var[d]=SS.nodes(e,{at:a.path,match:s,mode:o,voids:i});if(!d)return;var[,h]=d,p=SS.pathRef(e,h),g=SS.isEnd(e,a,h);h_.splitNodes(e,{at:a,match:s,mode:o,voids:i});var v=p.unref();a=g?BS.next(v):v}var m=BS.parent(a),y=a[a.length-1];if(i||!SS.void(e,{at:m})){for(var b of t){var w=m.concat(y);y++,e.apply({type:"insert_node",path:w,node:b}),a=BS.next(a)}if(a=BS.previous(a),l){var x=SS.end(e,a);x&&h_.select(e,x)}}}})},liftNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SS.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:i=!1}=t,{match:o}=t;if(null==o&&(o=BS.isPath(n)?a_(e,n):t=>SS.isBlock(e,t)),n){var a=SS.nodes(e,{at:n,match:o,mode:r,voids:i}),s=Array.from(a,t=>{var[,n]=t;return SS.pathRef(e,n)});for(var l of s){var u=l.unref();if(u.length<2)throw new Error("Cannot lift node at a path [".concat(u,"] because it has a depth of less than `2`."));var c=SS.node(e,BS.parent(u)),[f,d]=c,h=u[u.length-1],{length:p}=f.children;if(1===p){var g=BS.next(d);h_.moveNodes(e,{at:u,to:g,voids:i}),h_.removeNodes(e,{at:d,voids:i})}else if(0===h)h_.moveNodes(e,{at:u,to:d,voids:i});else if(h===p-1){var v=BS.next(d);h_.moveNodes(e,{at:u,to:v,voids:i})}else{var m=BS.next(u),y=BS.next(d);h_.splitNodes(e,{at:m,voids:i}),h_.moveNodes(e,{at:u,to:y,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SS.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(r){if(null==n)if(BS.isPath(r)){var[s]=SS.parent(e,r);n=e=>s.children.includes(e)}else n=t=>SS.isBlock(e,t);if(!i&&US.isRange(r)&&(r=SS.unhangRange(e,r)),US.isRange(r))if(US.isCollapsed(r))r=r.anchor;else{var[,l]=US.edges(r),u=SS.pointRef(e,l);h_.delete(e,{at:r}),r=u.unref(),null==t.at&&h_.select(e,r)}var[c]=SS.nodes(e,{at:r,match:n,voids:o,mode:a}),f=SS.previous(e,{at:r,match:n,voids:o,mode:a});if(c&&f){var[d,h]=c,[p,g]=f;if(0!==h.length&&0!==g.length){var v,m,y=BS.next(g),b=BS.common(h,g),w=BS.isSibling(h,g),x=Array.from(SS.levels(e,{at:h}),e=>{var[t]=e;return t}).slice(b.length).slice(0,-1),C=SS.above(e,{at:h,mode:"highest",match:t=>x.includes(t)&&i_(e,t)}),E=C&&SS.pathRef(e,C[1]);if(YS.isText(d)&&YS.isText(p)){var k=Wk(d,QS);m=p.text.length,v=k}else{if(!bS.isElement(d)||!bS.isElement(p))throw new Error("Cannot merge the node at path [".concat(h,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(p)));k=Wk(d,e_),m=p.children.length,v=k}w||h_.moveNodes(e,{at:h,to:y,voids:o}),E&&h_.removeNodes(e,{at:E.current,voids:o}),bS.isElement(p)&&SS.isEmpty(e,p)||YS.isText(p)&&""===p.text&&0!==g[g.length-1]?h_.removeNodes(e,{at:g,voids:o}):e.apply({type:"merge_node",path:y,position:m,properties:v}),E&&E.unref()}}}})},moveNodes(e,t){SS.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(r){null==a&&(a=BS.isPath(r)?a_(e,r):t=>SS.isBlock(e,t));var s=SS.pathRef(e,n),l=SS.nodes(e,{at:r,match:a,mode:i,voids:o}),u=Array.from(l,t=>{var[,n]=t;return SS.pathRef(e,n)});for(var c of u){var f=c.unref(),d=s.current;0!==f.length&&e.apply({type:"move_node",path:f,newPath:d}),s.current&&BS.isSibling(d,f)&&BS.isAfter(d,f)&&(s.current=BS.next(s.current))}s.unref()}})},removeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SS.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(o){null==a&&(a=BS.isPath(o)?a_(e,o):t=>SS.isBlock(e,t)),!n&&US.isRange(o)&&(o=SS.unhangRange(e,o));var s=SS.nodes(e,{at:o,match:a,mode:i,voids:r}),l=Array.from(s,t=>{var[,n]=t;return SS.pathRef(e,n)});for(var u of l){var c=u.unref();if(c){var[f]=SS.node(e,c);e.apply({type:"remove_node",path:c,node:f})}}}})},setNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};SS.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:o=!1,mode:a="lowest",split:s=!1,voids:l=!1}=n;if(i){if(null==r&&(r=BS.isPath(i)?a_(e,i):t=>SS.isBlock(e,t)),!o&&US.isRange(i)&&(i=SS.unhangRange(e,i)),s&&US.isRange(i)){if(US.isCollapsed(i)&&SS.leaf(e,i.anchor)[0].text.length>0)return;var u=SS.rangeRef(e,i,{affinity:"inward"}),[c,f]=US.edges(i),d="lowest"===a?"lowest":"highest",h=SS.isEnd(e,f,f.path);h_.splitNodes(e,{at:f,match:r,mode:d,voids:l,always:!h});var p=SS.isStart(e,c,c.path);h_.splitNodes(e,{at:c,match:r,mode:d,voids:l,always:!p}),i=u.unref(),null==n.at&&h_.select(e,i)}for(var[g,v]of SS.nodes(e,{at:i,match:r,mode:a,voids:l})){var m={},y={};if(0!==v.length){var b=!1;for(var w in t)"children"!==w&&"text"!==w&&t[w]!==g[w]&&(b=!0,g.hasOwnProperty(w)&&(m[w]=g[w]),null!=t[w]&&(y[w]=t[w]));b&&e.apply({type:"set_node",path:v,properties:m,newProperties:y})}}}})},splitNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SS.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection,height:a=0,always:s=!1}=t;if(null==i&&(i=t=>SS.isBlock(e,t)),US.isRange(o)&&(o=o_(e,o)),BS.isPath(o)){var l=o,u=SS.point(e,l),[c]=SS.parent(e,l);i=e=>e===c,a=u.path.length-l.length+1,o=u,s=!0}if(o){var f=SS.pointRef(e,o,{affinity:"backward"}),[d]=SS.nodes(e,{at:o,match:i,mode:n,voids:r});if(d){var h=SS.void(e,{at:o,mode:"highest"});if(!r&&h){var[p,g]=h;if(bS.isElement(p)&&e.isInline(p)){var v=SS.after(e,g);if(!v){var m=BS.next(g);h_.insertNodes(e,{text:""},{at:m,voids:r}),v=SS.point(e,m)}o=v,s=!0}a=o.path.length-g.length+1,s=!0}var y=SS.pointRef(e,o),b=o.path.length-a,[,w]=d,x=o.path.slice(0,b),C=0===a?o.offset:o.path[b]+0;for(var[E,k]of SS.levels(e,{at:x,reverse:!0,voids:r})){var S=!1;if(k.length<w.length||0===k.length||!r&&SS.isVoid(e,E))break;var _=f.current,D=SS.isEnd(e,_,k);if(s||!f||!SS.isEdge(e,_,k)){S=!0;var A=OS.extractProps(E);e.apply({type:"split_node",path:k,position:C,properties:A})}C=k[k.length-1]+(S||D?1:0)}if(null==t.at){var T=y.current||SS.end(e,[]);h_.select(e,T)}f.unref(),y.unref()}}})},unsetNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;h_.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SS.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(o){null==a&&(a=BS.isPath(o)?a_(e,o):t=>SS.isBlock(e,t)),BS.isPath(o)&&(o=SS.range(e,o));var s=US.isRange(o)?SS.rangeRef(e,o):null,l=SS.nodes(e,{at:o,match:a,mode:n,voids:i}),u=Array.from(l,t=>{var[,n]=t;return SS.pathRef(e,n)}).reverse(),c=function(t){var n=t.unref(),[o]=SS.node(e,n),a=SS.range(e,n);r&&s&&(a=US.intersection(s.current,a)),h_.liftNodes(e,{at:a,match:e=>bS.isAncestor(o)&&o.children.includes(e),voids:i})};for(var f of u)c(f);s&&s.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};SS.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{match:a,at:s=e.selection}=n;if(s){if(null==a&&(a=BS.isPath(s)?a_(e,s):e.isInline(t)?t=>SS.isInline(e,t)||YS.isText(t):t=>SS.isBlock(e,t)),i&&US.isRange(s)){var[l,u]=US.edges(s),c=SS.rangeRef(e,s,{affinity:"inward"});h_.splitNodes(e,{at:u,match:a,voids:o}),h_.splitNodes(e,{at:l,match:a,voids:o}),s=c.unref(),null==n.at&&h_.select(e,s)}var f=Array.from(SS.nodes(e,{at:s,match:e.isInline(t)?t=>SS.isBlock(e,t):e=>SS.isEditor(e),mode:"lowest",voids:o}));for(var[,d]of f){var h=US.isRange(s)?US.intersection(s,SS.range(e,d)):s;if(h){var p=Array.from(SS.nodes(e,{at:h,match:a,mode:r,voids:o}));if(p.length>0&&"continue"===function(){var[n]=p,r=p[p.length-1],[,i]=n,[,a]=r;if(0===i.length&&0===a.length)return"continue";var s=BS.equals(i,a)?BS.parent(i):BS.common(i,a),l=SS.range(e,i,a),u=SS.node(e,s),[c]=u,f=s.length+1,d=BS.next(a.slice(0,f)),h=n_(n_({},t),{},{children:[]});h_.insertNodes(e,h,{at:d,voids:o}),h_.moveNodes(e,{at:l,match:e=>bS.isAncestor(c)&&c.children.includes(e),to:d.concat(0),voids:o})}())continue}}}})}},i_=(e,t)=>{if(bS.isElement(t)){var n=t;return!!SS.isVoid(e,t)||1===n.children.length&&i_(e,n.children[0])}return!SS.isEditor(t)},o_=(e,t)=>{if(US.isCollapsed(t))return t.anchor;var[,n]=US.edges(t),r=SS.pointRef(e,n);return h_.delete(e,{at:t}),r.unref()},a_=(e,t)=>{var[n]=SS.node(e,t);return e=>e===n};function s_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s_(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var u_={collapse(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r)if("anchor"===n)h_.select(e,r.anchor);else if("focus"===n)h_.select(e,r.focus);else if("start"===n){var[i]=US.edges(r);h_.select(e,i)}else if("end"===n){var[,o]=US.edges(r);h_.select(e,o)}},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=US.isBackward(n)?"focus":"anchor"),"end"===a&&(a=US.isBackward(n)?"anchor":"focus");var{anchor:s,focus:l}=n,u={distance:r,unit:i},c={};if(null==a||"anchor"===a){var f=o?SS.before(e,s,u):SS.after(e,s,u);f&&(c.anchor=f)}if(null==a||"focus"===a){var d=o?SS.before(e,l,u):SS.after(e,l,u);d&&(c.focus=d)}h_.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=SS.range(e,t),n)h_.setSelection(e,t);else{if(!US.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=e,{edge:i="both"}=n;if(r){"start"===i&&(i=US.isBackward(r)?"focus":"anchor"),"end"===i&&(i=US.isBackward(r)?"anchor":"focus");var{anchor:o,focus:a}=r,s="anchor"===i?o:a;h_.setSelection(e,{["anchor"===i?"anchor":"focus"]:l_(l_({},s),t)})}},setSelection(e,t){var{selection:n}=e,r={},i={};if(n){for(var o in t)("anchor"===o&&null!=t.anchor&&!RS.equals(t.anchor,n.anchor)||"focus"===o&&null!=t.focus&&!RS.equals(t.focus,n.focus)||"anchor"!==o&&"focus"!==o&&t[o]!==n[o])&&(r[o]=n[o],i[o]=t[o]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}}},c_={delete(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SS.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(a){if(US.isRange(a)&&US.isCollapsed(a)&&(a=a.anchor),RS.isPoint(a)){var l=SS.void(e,{at:a,mode:"highest"});if(!o&&l){var[,u]=l;a=u}else{var c={unit:r,distance:i};a={anchor:a,focus:n?SS.before(e,a,c)||SS.start(e,[]):SS.after(e,a,c)||SS.end(e,[])},s=!0}}if(BS.isPath(a))h_.removeNodes(e,{at:a,voids:o});else if(!US.isCollapsed(a)){if(!s){var[,f]=US.edges(a),d=SS.end(e,[]);RS.equals(f,d)||(a=SS.unhangRange(e,a,{voids:o}))}var[h,p]=US.edges(a),g=SS.above(e,{match:t=>SS.isBlock(e,t),at:h,voids:o}),v=SS.above(e,{match:t=>SS.isBlock(e,t),at:p,voids:o}),m=g&&v&&!BS.equals(g[1],v[1]),y=BS.equals(h.path,p.path),b=o?null:SS.void(e,{at:h,mode:"highest"}),w=o?null:SS.void(e,{at:p,mode:"highest"});if(b){var x=SS.before(e,h);x&&g&&BS.isAncestor(g[1],x.path)&&(h=x)}if(w){var C=SS.after(e,p);C&&v&&BS.isAncestor(v[1],C.path)&&(p=C)}var E,k=[];for(var S of SS.nodes(e,{at:a,voids:o})){var[_,D]=S;E&&0===BS.compare(D,E)||(!o&&SS.isVoid(e,_)||!BS.isCommon(D,h.path)&&!BS.isCommon(D,p.path))&&(k.push(S),E=D)}var A=Array.from(k,t=>{var[,n]=t;return SS.pathRef(e,n)}),T=SS.pointRef(e,h),O=SS.pointRef(e,p);if(!y&&!b){var P=T.current,[I]=SS.leaf(e,P),{path:F}=P,{offset:B}=h,L=I.text.slice(B);L.length>0&&e.apply({type:"remove_text",path:F,offset:B,text:L})}for(var N of A){var M=N.unref();h_.removeNodes(e,{at:M,voids:o})}if(!w){var R=O.current,[j]=SS.leaf(e,R),{path:H}=R,z=y?h.offset:0,U=j.text.slice(z,p.offset);U.length>0&&e.apply({type:"remove_text",path:H,offset:z,text:U})}!y&&m&&O.current&&T.current&&h_.mergeNodes(e,{at:O.current,hanging:!0,voids:o});var $=n?T.unref()||O.unref():O.unref()||T.unref();null==t.at&&$&&h_.select(e,$)}}})},insertFragment(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};SS.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:o=e.selection}=n;if(t.length&&o){if(US.isRange(o))if(r||(o=SS.unhangRange(e,o)),US.isCollapsed(o))o=o.anchor;else{var[,a]=US.edges(o);if(!i&&SS.void(e,{at:a}))return;var s=SS.pointRef(e,a);h_.delete(e,{at:o}),o=s.unref()}else BS.isPath(o)&&(o=SS.start(e,o));if(i||!SS.void(e,{at:o})){var l=SS.above(e,{at:o,match:t=>SS.isInline(e,t),mode:"highest",voids:i});if(l){var[,u]=l;SS.isEnd(e,o,u)?o=SS.after(e,u):SS.isStart(e,o,u)&&(o=SS.before(e,u))}var c=SS.above(e,{match:t=>SS.isBlock(e,t),at:o,voids:i}),[,f]=c,d=SS.isStart(e,o,f),h=SS.isEnd(e,o,f),p=d&&h,g=!d||d&&h,v=!h,[,m]=OS.first({children:t},[]),[,y]=OS.last({children:t},[]),b=[],w=t=>{var[n,r]=t;return!(0===r.length||!p&&(g&&BS.isAncestor(r,m)&&bS.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)||v&&BS.isAncestor(r,y)&&bS.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))};for(var x of OS.nodes({children:t},{pass:w}))w(x)&&b.push(x);var C=[],E=[],k=[],S=!0,_=!1;for(var[D]of b)bS.isElement(D)&&!e.isInline(D)?(S=!1,_=!0,E.push(D)):S?C.push(D):k.push(D);var[A]=SS.nodes(e,{at:o,match:t=>YS.isText(t)||SS.isInline(e,t),mode:"highest",voids:i}),[,T]=A,O=SS.isStart(e,o,T),P=SS.isEnd(e,o,T),I=SS.pathRef(e,h?BS.next(f):f),F=SS.pathRef(e,P?BS.next(T):T),B=SS.pathRef(e,f);h_.splitNodes(e,{at:o,match:t=>_?SS.isBlock(e,t):YS.isText(t)||SS.isInline(e,t),mode:_?"lowest":"highest",voids:i});var L=SS.pathRef(e,!O||O&&P?BS.next(T):T);if(h_.insertNodes(e,C,{at:L.current,match:t=>YS.isText(t)||SS.isInline(e,t),mode:"highest",voids:i}),p&&E.length&&h_.delete(e,{at:B.unref(),voids:i}),h_.insertNodes(e,E,{at:I.current,match:t=>SS.isBlock(e,t),mode:"lowest",voids:i}),h_.insertNodes(e,k,{at:F.current,match:t=>YS.isText(t)||SS.isInline(e,t),mode:"highest",voids:i}),!n.at){var N;N=k.length>0?BS.previous(F.current):E.length>0?BS.previous(I.current):BS.previous(L.current);var M=SS.end(e,N);h_.select(e,M)}L.unref(),I.unref(),F.unref()}}})},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};SS.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=e.selection}=n;if(i){if(BS.isPath(i)&&(i=SS.range(e,i)),US.isRange(i))if(US.isCollapsed(i))i=i.anchor;else{var o=US.end(i);if(!r&&SS.void(e,{at:o}))return;var a=SS.pointRef(e,o);h_.delete(e,{at:i,voids:r}),i=a.unref(),h_.setSelection(e,{anchor:i,focus:i})}if(r||!SS.void(e,{at:i})){var{path:s,offset:l}=i;t.length>0&&e.apply({type:"insert_text",path:s,offset:l,text:t})}}})}};function f_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f_(Object(n),!0).forEach(function(t){Lk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f_(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var h_=d_(d_(d_(d_({},ZS),r_),u_),c_),p_="[object Map]",g_="[object Set]",v_=/^\[object .+?Constructor\]$/,m_=/^(?:0|[1-9]\d*)$/,y_="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",b_="\\ud83c[\\udffb-\\udfff]",w_="[^\\ud800-\\udfff]",x_="(?:\\ud83c[\\udde6-\\uddff]){2}",C_="[\\ud800-\\udbff][\\udc00-\\udfff]",E_="(?:"+y_+"|"+b_+")?",k_="[\\ufe0e\\ufe0f]?"+E_+"(?:\\u200d(?:"+[w_,x_,C_].join("|")+")[\\ufe0e\\ufe0f]?"+E_+")*",S_="(?:"+[w_+y_+"?",y_,x_,C_,"[\\ud800-\\udfff]"].join("|")+")",__=RegExp(b_+"(?="+b_+")|"+S_+k_,"g"),D_=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),A_="object"==typeof Ch&&Ch&&Ch.Object===Object&&Ch,T_="object"==typeof self&&self&&self.Object===Object&&self,O_=A_||T_||Function("return this")();function P_(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function I_(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var F_,B_,L_=Function.prototype,N_=Object.prototype,M_=O_["__core-js_shared__"],R_=function(){var e=/[^.]+$/.exec(M_&&M_.keys&&M_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),j_=L_.toString,H_=N_.hasOwnProperty,z_=N_.toString,U_=RegExp("^"+j_.call(H_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$_=O_.Symbol,W_=$_?$_.iterator:void 0,V_=N_.propertyIsEnumerable,G_=(F_=Object.keys,B_=Object,function(e){return F_(B_(e))}),q_=rD(O_,"DataView"),K_=rD(O_,"Map"),Y_=rD(O_,"Promise"),X_=rD(O_,"Set"),J_=rD(O_,"WeakMap"),Z_=aD(q_),Q_=aD(K_),eD=aD(Y_),tD=aD(X_),nD=aD(J_);function rD(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){if(!cD(e)||R_&&R_ in e)return!1;var t=uD(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?U_:v_;return t.test(aD(e))}(r)?r:void 0}var iD=function(e){return z_.call(e)};function oD(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||m_.test(e))&&e>-1&&e%1==0&&e<t}function aD(e){if(null!=e){try{return j_.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(q_&&"[object DataView]"!=iD(new q_(new ArrayBuffer(1)))||K_&&iD(new K_)!=p_||Y_&&"[object Promise]"!=iD(Y_.resolve())||X_&&iD(new X_)!=g_||J_&&"[object WeakMap]"!=iD(new J_))&&(iD=function(e){var t=z_.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?aD(n):void 0;if(r)switch(r){case Z_:return"[object DataView]";case Q_:return p_;case eD:return"[object Promise]";case tD:return g_;case nD:return"[object WeakMap]"}return t});var sD=Array.isArray;function lD(e){return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=9007199254740991&&!uD(e);var t}function uD(e){var t=cD(e)?z_.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function cD(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function fD(e){return!!e&&"object"==typeof e}function dD(e){return e?function(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n]);return i}(t,function(t){return e[t]})}(e,lD(t=e)?function(e){var t,n,r=sD(e)||fD(n=t=e)&&lD(n)&&H_.call(t,"callee")&&(!V_.call(t,"callee")||"[object Arguments]"==z_.call(t))?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],i=r.length,o=!!i;for(var a in e)!H_.call(e,a)||o&&("length"==a||oD(a,i))||r.push(a);return r}(t):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||N_))return G_(e);var t,n,r=[];for(var i in Object(e))H_.call(e,i)&&"constructor"!=i&&r.push(i);return r}(t)):[];var t}var hD=function(e){if(!e)return[];if(lD(e))return"string"==typeof(t=e)||!sD(t)&&fD(t)&&"[object String]"==z_.call(t)?function(e){return t=e,D_.test(t)?function(e){return e.match(__)||[]}(e):function(e){return e.split("")}(e);var t}(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);var t;if(W_&&e[W_])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[W_]());var n=iD(e);return(n==p_?P_:n==g_?I_:dD)(e)};function pD(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function gD(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach(function(n){void 0===e[n]?e[n]=t[n]:pD(t[n])&&pD(e[n])&&Object.keys(t[n]).length>0&&gD(e[n],t[n])})}var vD={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function mD(){var e="undefined"!=typeof document?document:{};return gD(e,vD),e}var yD={document:vD,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function bD(){var e="undefined"!=typeof window?window:{};return gD(e,yD),e}function wD(e){return(wD=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xD(e,t){return(xD=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function CD(e,t,n){return CD=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&xD(i,n.prototype),i},CD.apply(null,arguments)}function ED(e){var t="function"==typeof Map?new Map:void 0;return ED=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return CD(e,arguments,wD(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),xD(r,e)},ED(e)}var kD=function(e){var t,n;function r(t){var n,r,i;return r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call.apply(e,[this].concat(t))||this),i=r.__proto__,Object.defineProperty(r,"__proto__",{get:function(){return i},set:function(e){i.__proto__=e}}),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(ED(Array));function SD(e){void 0===e&&(e=[]);var t=[];return e.forEach(function(e){Array.isArray(e)?t.push.apply(t,SD(e)):t.push(e)}),t}function _D(e,t){return Array.prototype.filter.call(e,t)}function DD(e,t){var n=bD(),r=mD(),i=[];if(!t&&e instanceof kD)return e;if(!e)return new kD(i);if("string"==typeof e){var o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var a="div";0===o.indexOf("<li")&&(a="ul"),0===o.indexOf("<tr")&&(a="tbody"),0!==o.indexOf("<td")&&0!==o.indexOf("<th")||(a="tr"),0===o.indexOf("<tbody")&&(a="table"),0===o.indexOf("<option")&&(a="select");var s=r.createElement(a);s.innerHTML=o;for(var l=0;l<s.childNodes.length;l+=1)i.push(s.childNodes[l])}else i=function(e,t){if("string"!=typeof e)return[e];for(var n=[],r=t.querySelectorAll(e),i=0;i<r.length;i+=1)n.push(r[i]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)i.push(e);else if(Array.isArray(e)){if(e instanceof kD)return e;i=e}return new kD(function(e){for(var t=[],n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(i))}function AD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=SD(t.map(function(e){return e.split(" ")}));return this.forEach(function(e){var t;(t=e.classList).add.apply(t,r)}),this}function TD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=SD(t.map(function(e){return e.split(" ")}));return this.forEach(function(e){var t;(t=e.classList).remove.apply(t,r)}),this}function OD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=SD(t.map(function(e){return e.split(" ")}));return _D(this,function(e){return r.filter(function(t){return e.classList.contains(t)}).length>0}).length>0}function PD(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(var r in e)this[n][r]=e[r],this[n].setAttribute(r,e[r]);return this}function ID(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function FD(){var e=this[0];if(e){var t,n={};if(e.dataset)for(var r in e.dataset)n[r]=e.dataset[r];else for(var i=0;i<e.attributes.length;i+=1){var o=e.attributes[i];o.name.indexOf("data-")>=0&&(n[t=o.name.split("data-")[1],t.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=o.value)}for(var a in n)"false"===n[a]?n[a]=!1:"true"===n[a]?n[a]=!0:parseFloat(n[a])===1*n[a]&&(n[a]*=1);return n}}function BD(e){if(void 0===e){var t=this[0];if(!t)return;if(t.multiple&&"select"===t.nodeName.toLowerCase()){for(var n=[],r=0;r<t.selectedOptions.length;r+=1)n.push(t.selectedOptions[r].value);return n}return t.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(e)&&o.multiple&&"select"===o.nodeName.toLowerCase())for(var a=0;a<o.options.length;a+=1)o.options[a].selected=e.indexOf(o.options[a].value)>=0;else o.value=e}return this}function LD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=t[2],a=t[3];function s(e){var t=e.target;if(t){var n=e.target.dom7EventData||[];if(n.indexOf(e)<0&&n.unshift(e),DD(t).is(i))o.apply(t,n);else for(var r=DD(t).parents(),a=0;a<r.length;a+=1)DD(r[a]).is(i)&&o.apply(r[a],n)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),o.apply(this,t)}"function"==typeof t[1]&&(r=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);for(var u,c=r.split(" "),f=0;f<this.length;f+=1){var d=this[f];if(i)for(u=0;u<c.length;u+=1){var h=c[u];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[h]||(d.dom7LiveListeners[h]=[]),d.dom7LiveListeners[h].push({listener:o,proxyListener:s}),d.addEventListener(h,s,a)}else for(u=0;u<c.length;u+=1){var p=c[u];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[p]||(d.dom7Listeners[p]=[]),d.dom7Listeners[p].push({listener:o,proxyListener:l}),d.addEventListener(p,l,a)}}return this}function ND(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=t[1],o=t[2],a=t[3];"function"==typeof t[1]&&(r=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);for(var s=r.split(" "),l=0;l<s.length;l+=1)for(var u=s[l],c=0;c<this.length;c+=1){var f=this[c],d=void 0;if(!i&&f.dom7Listeners?d=f.dom7Listeners[u]:i&&f.dom7LiveListeners&&(d=f.dom7LiveListeners[u]),d&&d.length)for(var h=d.length-1;h>=0;h-=1){var p=d[h];o&&p.listener===o||o&&p.listener&&p.listener.dom7proxy&&p.listener.dom7proxy===o?(f.removeEventListener(u,p.proxyListener,a),d.splice(h,1)):o||(f.removeEventListener(u,p.proxyListener,a),d.splice(h,1))}}return this}function MD(){var e=bD();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function RD(){var e=bD();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function jD(){if(this.length>0){var e=bD(),t=mD(),n=this[0],r=n.getBoundingClientRect(),i=t.body,o=n.clientTop||i.clientTop||0,a=n.clientLeft||i.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,l=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-o,left:r.left+l-a}}return null}function HD(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this}function zD(){for(var e=bD(),t=0;t<this.length;t+=1){var n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function UD(e,t){var n,r=bD();if(1===arguments.length){if("string"!=typeof e){for(n=0;n<this.length;n+=1)for(var i in e)this[n].style[i]=e[i];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function $D(e){return e?(this.forEach(function(t,n){e.apply(t,[t,n])}),this):this}function WD(e){return DD(_D(this,e))}function VD(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function GD(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function qD(e){var t,n,r=bD(),i=mD(),o=this[0];if(!o||void 0===e)return!1;if("string"==typeof e){if(o.matches)return o.matches(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);for(t=DD(e),n=0;n<t.length;n+=1)if(t[n]===o)return!0;return!1}if(e===i)return o===i;if(e===r)return o===r;if(e.nodeType||e instanceof kD){for(t=e.nodeType?[e]:e,n=0;n<t.length;n+=1)if(t[n]===o)return!0;return!1}return!1}function KD(){for(var e,t=mD(),n=0;n<arguments.length;n+=1){e=n<0||arguments.length<=n?void 0:arguments[n];for(var r=0;r<this.length;r+=1)if("string"==typeof e){var i=t.createElement("div");for(i.innerHTML=e;i.firstChild;)this[r].appendChild(i.firstChild)}else if(e instanceof kD)for(var o=0;o<e.length;o+=1)this[r].appendChild(e[o]);else this[r].appendChild(e)}return this}function YD(e){var t,n,r=mD();for(t=0;t<this.length;t+=1)if("string"==typeof e){var i=r.createElement("div");for(i.innerHTML=e,n=i.childNodes.length-1;n>=0;n-=1)this[t].insertBefore(i.childNodes[n],this[t].childNodes[0])}else if(e instanceof kD)for(n=0;n<e.length;n+=1)this[t].insertBefore(e[n],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this}function XD(e){for(var t=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?DD(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return DD(t)}function JD(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)e?DD(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return DD(t)}function ZD(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(e),i=0;i<r.length;i+=1)t.push(r[i]);return DD(t)}function QD(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].children,i=0;i<r.length;i+=1)e&&!DD(r[i]).is(e)||t.push(r[i]);return DD(t)}function eA(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function tA(){for(var e=0;e<this.length;e+=1){var t=this[e];if(1===t.nodeType){for(var n=0;n<t.childNodes.length;n+=1)t.childNodes[n].parentNode&&t.childNodes[n].parentNode.removeChild(t.childNodes[n]);t.textContent=""}}return this}DD.fn=kD.prototype;var nA="resize scroll".split(" ");function rA(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(void 0===n[0]){for(var i=0;i<this.length;i+=1)nA.indexOf(e)<0&&(e in this[i]?this[i][e]():DD(this[i]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}}var iA=rA("click"),oA=rA("focus"),aA=/^(?:0|[1-9]\d*)$/;function sA(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var lA,uA=Object.prototype,cA=uA.hasOwnProperty,fA=uA.toString,dA=uA.propertyIsEnumerable,hA=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),pA=(lA=function(e,t){return e&&gA(e,t,bA)},function(e,t){if(null==e)return e;if(!yA(e))return lA(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););return e}),gA=function(){return function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e}}();function vA(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||aA.test(e))&&e>-1&&e%1==0&&e<t}var mA=Array.isArray;function yA(e){return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=9007199254740991&&!function(e){var t,n,r=(n=typeof(t=e),!t||"object"!=n&&"function"!=n?"":fA.call(e));return"[object Function]"==r||"[object GeneratorFunction]"==r}(e);var t}function bA(e){return yA(e)?function(e){var t,n,r=mA(e)||function(e){return!!e&&"object"==typeof e}(n=t=e)&&yA(n)&&cA.call(t,"callee")&&(!dA.call(t,"callee")||"[object Arguments]"==fA.call(t))?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],i=r.length,o=!!i;for(var a in e)!cA.call(e,a)||o&&("length"==a||vA(a,i))||r.push(a);return r}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||uA))return hA(e);var t,n,r=[];for(var i in Object(e))cA.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e)}function wA(e){return e}var xA=function(e,t){return(mA(e)?sA:pA)(e,"function"==typeof t?t:wA)};let CA=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t};var EA=/^\s+|\s+$/g,kA=/^[-+]0x[0-9a-f]+$/i,SA=/^0b[01]+$/i,_A=/^0o[0-7]+$/i,DA=parseInt,AA="object"==typeof Ch&&Ch&&Ch.Object===Object&&Ch,TA="object"==typeof self&&self&&self.Object===Object&&self,OA=AA||TA||Function("return this")(),PA=Object.prototype.toString,IA=Math.max,FA=Math.min,BA=function(){return OA.Date.now()};function LA(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function NA(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||function(e){return!!e&&"object"==typeof e}(t)&&"[object Symbol]"==PA.call(t))return NaN;var t;if(LA(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=LA(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(EA,"");var r=SA.test(e);return r||_A.test(e)?DA(e.slice(2),r?2:8):kA.test(e)?NaN:+e}var MA=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return LA(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-u>=o}function g(){var e,n,r=BA();if(p(r))return v(r);s=setTimeout(g,(n=t-((e=r)-l),f?FA(n,o-(e-u)):n))}function v(e){return s=void 0,d&&r?h(e):(r=i=void 0,a)}function m(){var e=BA(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?h(e):a}(l);if(f)return s=setTimeout(g,t),h(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=NA(t)||0,LA(n)&&(c=!!n.leading,o=(f="maxWait"in n)?IA(NA(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},m.flush=function(){return void 0===s?a:v(BA())},m}(e,t,{leading:r,maxWait:t,trailing:i})};const RA={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}};function jA(e,t,n,r,i){return{sel:e,data:t,children:n,text:r,elm:i,key:void 0===t?void 0:t.key}}const HA=Array.isArray;function zA(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function UA(e){return void 0===e}function $A(e){return void 0!==e}const WA=jA("",{},[],void 0,void 0);function VA(e,t){var n,r;const i=e.key===t.key,o=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is);return e.sel===t.sel&&i&&o}function GA(e,t,n){var r;const i={};for(let o=t;o<=n;++o){const t=null===(r=e[o])||void 0===r?void 0:r.key;void 0!==t&&(i[t]=o)}return i}const qA=["create","update","remove","destroy","pre","post"];function KA(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=RA;for(const c of qA)for(const t of e){const e=t[c];void 0!==e&&n[c].push(e)}function i(e,t){return function(){if(0==--t){const t=r.parentNode(e);r.removeChild(t,e)}}}function o(e,t){var i,a;let s,l=e.data;if(void 0!==l){const t=null===(i=l.hook)||void 0===i?void 0:i.init;$A(t)&&(t(e),l=e.data)}const u=e.children,c=e.sel;if("!"===c)UA(e.text)&&(e.text=""),e.elm=r.createComment(e.text);else if(void 0!==c){const i=c.indexOf("#"),f=c.indexOf(".",i),d=i>0?i:c.length,h=f>0?f:c.length,p=-1!==i||-1!==f?c.slice(0,Math.min(d,h)):c,g=e.elm=$A(l)&&$A(s=l.ns)?r.createElementNS(s,p,l):r.createElement(p,l);for(d<h&&g.setAttribute("id",c.slice(d+1,h)),f>0&&g.setAttribute("class",c.slice(h+1).replace(/\./g," ")),s=0;s<n.create.length;++s)n.create[s](WA,e);if(HA(u))for(s=0;s<u.length;++s){const e=u[s];null!=e&&r.appendChild(g,o(e,t))}else zA(e.text)&&r.appendChild(g,r.createTextNode(e.text));const v=e.data.hook;$A(v)&&(null===(a=v.create)||void 0===a||a.call(v,WA,e),v.insert&&t.push(e))}else e.elm=r.createTextNode(e.text);return e.elm}function a(e,t,n,i,a,s){for(;i<=a;++i){const a=n[i];null!=a&&r.insertBefore(e,o(a,s),t)}}function s(e){var t,r;const i=e.data;if(void 0!==i){null===(r=null===(t=null==i?void 0:i.hook)||void 0===t?void 0:t.destroy)||void 0===r||r.call(t,e);for(let t=0;t<n.destroy.length;++t)n.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&s(n)}}}function l(e,t,o,a){for(var l,u;o<=a;++o){let a,c;const f=t[o];if(null!=f)if($A(f.sel)){s(f),a=n.remove.length+1,c=i(f.elm,a);for(let t=0;t<n.remove.length;++t)n.remove[t](f,c);const e=null===(u=null===(l=null==f?void 0:f.data)||void 0===l?void 0:l.hook)||void 0===u?void 0:u.remove;$A(e)?e(f,c):c()}else r.removeChild(e,f.elm)}}function u(e,t,i){var s,c,f,d,h;const p=null===(s=t.data)||void 0===s?void 0:s.hook;null===(c=null==p?void 0:p.prepatch)||void 0===c||c.call(p,e,t);const g=t.elm=e.elm,v=e.children,m=t.children;if(e!==t){if(void 0!==t.data){for(let r=0;r<n.update.length;++r)n.update[r](e,t);null===(d=null===(f=t.data.hook)||void 0===f?void 0:f.update)||void 0===d||d.call(f,e,t)}UA(t.text)?$A(v)&&$A(m)?v!==m&&function(e,t,n,i){let s,c,f,d,h=0,p=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],w=n[y];for(;h<=g&&p<=y;)null==v?v=t[++h]:null==m?m=t[--g]:null==b?b=n[++p]:null==w?w=n[--y]:VA(v,b)?(u(v,b,i),v=t[++h],b=n[++p]):VA(m,w)?(u(m,w,i),m=t[--g],w=n[--y]):VA(v,w)?(u(v,w,i),r.insertBefore(e,v.elm,r.nextSibling(m.elm)),v=t[++h],w=n[--y]):VA(m,b)?(u(m,b,i),r.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++p]):(void 0===s&&(s=GA(t,h,g)),c=s[b.key],UA(c)?r.insertBefore(e,o(b,i),v.elm):(f=t[c],f.sel!==b.sel?r.insertBefore(e,o(b,i),v.elm):(u(f,b,i),t[c]=void 0,r.insertBefore(e,f.elm,v.elm))),b=n[++p]);(h<=g||p<=y)&&(h>g?(d=null==n[y+1]?null:n[y+1].elm,a(e,d,n,p,y,i)):l(e,t,h,g))}(g,v,m,i):$A(m)?($A(e.text)&&r.setTextContent(g,""),a(g,null,m,0,m.length-1,i)):$A(v)?l(g,v,0,v.length-1):$A(e.text)&&r.setTextContent(g,""):e.text!==t.text&&($A(v)&&l(g,v,0,v.length-1),r.setTextContent(g,t.text)),null===(h=null==p?void 0:p.postpatch)||void 0===h||h.call(p,e,t)}}return function(e,t){let i,a,s;const c=[];for(i=0;i<n.pre.length;++i)n.pre[i]();for(void 0!==e.sel||(e=function(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),i=n?"."+n.split(" ").join("."):"";return jA(r.tagName(e).toLowerCase()+t+i,{},[],void 0,e)}(e)),VA(e,t)?u(e,t,c):(a=e.elm,s=r.parentNode(a),o(t,c),null!==s&&(r.insertBefore(s,t.elm,r.nextSibling(a)),l(s,[e],0,0))),i=0;i<c.length;++i)c[i].data.hook.insert(c[i]);for(i=0;i<n.post.length;++i)n.post[i]();return t}}function YA(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let r=0;r<t.length;++r){const e=t[r].data;void 0!==e&&YA(e,t[r].children,t[r].sel)}}function XA(e,t,n){let r,i,o,a={};if(void 0!==n?(null!==t&&(a=t),HA(n)?r=n:zA(n)?i=n.toString():n&&n.sel&&(r=[n])):null!=t&&(HA(t)?r=t:zA(t)?i=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(o=0;o<r.length;++o)zA(r[o])&&(r[o]=jA(void 0,void 0,void 0,r[o],void 0));return"s"!==e[0]||"v"!==e[1]||"g"!==e[2]||3!==e.length&&"."!==e[3]&&"#"!==e[3]||YA(a,r,e),jA(e,a,r,i,void 0)}function JA(e,t){let n;const r=t.elm;let i=e.data.attrs,o=t.data.attrs;if((i||o)&&i!==o){for(n in i=i||{},o=o||{},o){const e=o[n];i[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in i)n in o||r.removeAttribute(n)}}const ZA={create:JA,update:JA};function QA(e,t){let n,r;const i=t.elm;let o=e.data.class,a=t.data.class;if((o||a)&&o!==a){for(r in o=o||{},a=a||{},o)o[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&i.classList.remove(r);for(r in a)n=a[r],n!==o[r]&&i.classList[n?"add":"remove"](r)}}const eT={create:QA,update:QA},tT=/[A-Z]/g;function nT(e,t){const n=t.elm;let r,i=e.data.dataset,o=t.data.dataset;if(!i&&!o)return;if(i===o)return;i=i||{},o=o||{};const a=n.dataset;for(r in i)o[r]||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(tT,"-$&").toLowerCase()));for(r in o)i[r]!==o[r]&&(a?a[r]=o[r]:n.setAttribute("data-"+r.replace(tT,"-$&").toLowerCase(),o[r]))}const rT={create:nT,update:nT};function iT(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)iT(e[r],t,n)}function oT(e,t){const n=e.type,r=t.data.on;r&&r[n]&&iT(r[n],t,e)}function aT(e,t){const n=e.data.on,r=e.listener,i=e.elm,o=t&&t.data.on,a=t&&t.elm;let s;if(n!==o){if(n&&r)if(o)for(s in n)o[s]||i.removeEventListener(s,r,!1);else for(s in n)i.removeEventListener(s,r,!1);if(o){const r=t.listener=e.listener||function e(t){oT(t,e.vnode)};if(r.vnode=t,n)for(s in o)n[s]||a.addEventListener(s,r,!1);else for(s in o)a.addEventListener(s,r,!1)}}}const sT={create:aT,update:aT,destroy:aT};function lT(e,t){let n,r,i;const o=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],i=a[n],i===r||"value"===n&&o[n]===r||(o[n]=r)}const uT={create:lT,update:lT},cT="undefined"!=typeof window&&window.requestAnimationFrame.bind(window)||setTimeout;let fT=!1;function dT(e,t,n){var r;r=function(){e[t]=n},cT(function(){cT(r)})}function hT(e,t){let n,r;const i=t.elm;let o=e.data.style,a=t.data.style;if(!o&&!a)return;if(o===a)return;o=o||{},a=a||{};const s="delayed"in o;for(r in o)a[r]||("-"===r[0]&&"-"===r[1]?i.style.removeProperty(r):i.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===o.delayed[e]||dT(i.style,e,n);else"remove"!==r&&n!==o[r]&&("-"===r[0]&&"-"===r[1]?i.style.setProperty(r,n):i.style[r]=n)}const pT={pre:function(){fT=!1},create:hT,update:hT,destroy:function(e){let t,n;const r=e.elm,i=e.data.style;if(i&&(t=i.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;fT||(e.elm.offsetLeft,fT=!0);const i=e.elm;let o=0;const a=n.remove;let s=0;const l=[];for(r in a)l.push(r),i.style[r]=a[r];const u=getComputedStyle(i)["transition-property"].split(", ");for(;o<u.length;++o)-1!==l.indexOf(u[o])&&s++;i.addEventListener("transitionend",function(e){e.target===i&&--s,0===s&&t()})}};function gT(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?gT(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(jA(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function vT(e,t,...n){const r=gT(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?XA(e,t,r[0].text):XA(e,t,r)}vT||(vT={});var mT,yT=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bT=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wT="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xT="["+wT+"]",CT="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",ET="\\d+",kT="[a-z\\xdf-\\xf6\\xf8-\\xff]",ST="[^\\ud800-\\udfff"+wT+ET+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_T="\\ud83c[\\udffb-\\udfff]",DT="[^\\ud800-\\udfff]",AT="(?:\\ud83c[\\udde6-\\uddff]){2}",TT="[\\ud800-\\udbff][\\udc00-\\udfff]",OT="[A-Z\\xc0-\\xd6\\xd8-\\xde]",PT="(?:"+kT+"|"+ST+")",IT="(?:"+OT+"|"+ST+")",FT="(?:"+CT+"|"+_T+")?",BT="[\\ufe0e\\ufe0f]?"+FT+"(?:\\u200d(?:"+[DT,AT,TT].join("|")+")[\\ufe0e\\ufe0f]?"+FT+")*",LT="(?:"+["[\\u2700-\\u27bf]",AT,TT].join("|")+")"+BT,NT="(?:"+[DT+CT+"?",CT,AT,TT,"[\\ud800-\\udfff]"].join("|")+")",MT=RegExp("['’]","g"),RT=RegExp(CT,"g"),jT=RegExp(_T+"(?="+_T+")|"+NT+BT,"g"),HT=RegExp([OT+"?"+kT+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[xT,OT,"$"].join("|")+")",IT+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[xT,OT+PT,"$"].join("|")+")",OT+"?"+PT+"+(?:['’](?:d|ll|m|re|s|t|ve))?",OT+"+(?:['’](?:D|LL|M|RE|S|T|VE))?",ET,LT].join("|"),"g"),zT=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),UT=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$T="object"==typeof Ch&&Ch&&Ch.Object===Object&&Ch,WT="object"==typeof self&&self&&self.Object===Object&&self,VT=$T||WT||Function("return this")(),GT=(mT={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(e){return null==mT?void 0:mT[e]});function qT(e){return zT.test(e)}var KT=Object.prototype.toString,YT=VT.Symbol,XT=YT?YT.prototype:void 0,JT=XT?XT.toString:void 0;function ZT(e){return null==e?"":function(e){if("string"==typeof e)return e;if("symbol"==typeof(t=e)||function(e){return!!e&&"object"==typeof e}(t)&&"[object Symbol]"==KT.call(t))return JT?JT.call(e):"";var t,n=e+"";return"0"==n&&1/e==-1/0?"-0":n}(e)}for(var QT,eO=(QT=function(e,t,n){return t=t.toLowerCase(),e+(n?tO(ZT(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,i=e?e.length:0;++r<i;)n=t(n,e[r],r,e);return n}(function(e){return t=e=ZT(e),UT.test(t)?function(e){return e.match(HT)||[]}(e):function(e){return e.match(yT)||[]}(e);var t}((t=e,(t=ZT(t))&&t.replace(bT,GT).replace(RT,"")).replace(MT,"")),QT,"");var t}),tO=function(e){var t=qT(e=ZT(e))?function(e){return qT(e)?e.match(jT)||[]:e.split("")}(e):void 0,n=t?t[0]:e.charAt(0),r=t?function(e,t,n){var r=e.length;return function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}(e,1,n=void 0===n?r:n)}(t).join(""):e.slice(1);return n.toUpperCase()+r},nO=eO,rO="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),iO={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},oO={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:rO?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},aO={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},sO=1;sO<20;sO++)aO["f"+sO]=111+sO;function lO(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return function(e,t){var n=t&&t.byKey,r={},i=(e=e.replace("++","+add")).split("+"),o=i.length;for(var a in iO)r[iO[a]]=!1;var s=!0,l=!1,u=void 0;try{for(var c,f=i[Symbol.iterator]();!(s=(c=f.next()).done);s=!0){var d=c.value,h=d.endsWith("?")&&d.length>1;h&&(d=d.slice(0,-1));var p=cO(d),g=iO[p];if(d.length>1&&!g&&!oO[d]&&!aO[p])throw new TypeError('Unknown modifier: "'+d+'"');1!==o&&g||(n?r.key=p:r.which=uO(d)),g&&(r[g]=!h||null)}}catch(v){l=!0,u=v}finally{try{!s&&f.return&&f.return()}finally{if(l)throw u}}return r}(e,t)}),i=function(e){return r.some(function(t){return function(e,t){for(var n in e){var r=e[n],i=void 0;if(null!=r&&(null!=(i="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&i!==r)return!1}return!0}(t,e)})};return null==n?i:i(n)}function uO(e){return e=cO(e),aO[e]||e.toUpperCase().charCodeAt(0)}function cO(e){return e=e.toLowerCase(),oO[e]||e}var fO=lO,dO=function(e,t){return lO(e,{byKey:!0},t)},hO=/^\s+|\s+$/g,pO=/^[-+]0x[0-9a-f]+$/i,gO=/^0b[01]+$/i,vO=/^0o[0-7]+$/i,mO=parseInt,yO="object"==typeof Ch&&Ch&&Ch.Object===Object&&Ch,bO="object"==typeof self&&self&&self.Object===Object&&self,wO=yO||bO||Function("return this")(),xO=Object.prototype.toString,CO=Math.max,EO=Math.min,kO=function(){return wO.Date.now()};function SO(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function _O(e){if("number"==typeof e)return e;if("symbol"==typeof(t=e)||function(e){return!!e&&"object"==typeof e}(t)&&"[object Symbol]"==xO.call(t))return NaN;var t;if(SO(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=SO(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(hO,"");var r=gO.test(e);return r||vO.test(e)?mO(e.slice(2),r?2:8):pO.test(e)?NaN:+e}var DO,AO=function(e,t,n){var r,i,o,a,s,l,u=0,c=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function h(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function p(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-u>=o}function g(){var e,n,r=kO();if(p(r))return v(r);s=setTimeout(g,(n=t-((e=r)-l),f?EO(n,o-(e-u)):n))}function v(e){return s=void 0,d&&r?h(e):(r=i=void 0,a)}function m(){var e=kO(),n=p(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?h(e):a}(l);if(f)return s=setTimeout(g,t),h(l)}return void 0===s&&(s=setTimeout(g,t)),a}return t=_O(t)||0,SO(n)&&(c=!!n.leading,o=(f="maxWait"in n)?CO(_O(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},m.flush=function(){return void 0===s?a:v(kO())},m},TO=Eh(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Boolean]",a="[object Date]",s="[object Function]",l="[object GeneratorFunction]",u="[object Map]",c="[object Number]",f="[object Object]",d="[object Promise]",h="[object RegExp]",p="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",C="[object Int8Array]",E="[object Int16Array]",k="[object Int32Array]",S="[object Uint8Array]",_="[object Uint8ClampedArray]",D="[object Uint16Array]",A="[object Uint32Array]",T=/\w*$/,O=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,I={};I[i]=I["[object Array]"]=I[y]=I[b]=I[o]=I[a]=I[w]=I[x]=I[C]=I[E]=I[k]=I[u]=I[c]=I[f]=I[h]=I[p]=I[g]=I[v]=I[S]=I[_]=I[D]=I[A]=!0,I["[object Error]"]=I[s]=I[m]=!1;var F="object"==typeof Ch&&Ch&&Ch.Object===Object&&Ch,B="object"==typeof self&&self&&self.Object===Object&&self,L=F||B||Function("return this")(),N=t&&!t.nodeType&&t,M=N&&e&&!e.nodeType&&e,R=M&&M.exports===N;function j(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function z(e,t,n,r){for(var i=-1,o=e?e.length:0;++i<o;)n=t(n,e[i],i,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function W(e,t){return function(n){return e(t(n))}}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var G=Array.prototype,q=Function.prototype,K=Object.prototype,Y=L["__core-js_shared__"],X=function(){var e=/[^.]+$/.exec(Y&&Y.keys&&Y.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=q.toString,Z=K.hasOwnProperty,Q=K.toString,ee=RegExp("^"+J.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=R?L.Buffer:void 0,ne=L.Symbol,re=L.Uint8Array,ie=W(Object.getPrototypeOf,Object),oe=Object.create,ae=K.propertyIsEnumerable,se=G.splice,le=Object.getOwnPropertySymbols,ue=te?te.isBuffer:void 0,ce=W(Object.keys,Object),fe=Be(L,"DataView"),de=Be(L,"Map"),he=Be(L,"Promise"),pe=Be(L,"Set"),ge=Be(L,"WeakMap"),ve=Be(Object,"create"),me=je(fe),ye=je(de),be=je(he),we=je(pe),xe=je(ge),Ce=ne?ne.prototype:void 0,Ee=Ce?Ce.valueOf:void 0;function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _e(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){this.__data__=new Se(e)}function Ae(e,t,n){var r=e[t];Z.call(e,t)&&He(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function Te(e,t){for(var n=e.length;n--;)if(He(e[n][0],t))return n;return-1}function Oe(e,t,n,r,d,m,O){var P;if(r&&(P=m?r(e,d,m,O):r(e)),void 0!==P)return P;if(!Ve(e))return e;var F,B,L,N=ze(e);if(N){if(B=(F=e).length,L=F.constructor(B),B&&"string"==typeof F[0]&&Z.call(F,"index")&&(L.index=F.index,L.input=F.input),P=L,!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,P)}else{var M=Ne(e),R=M==s||M==l;if($e(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(M==f||M==i||R&&!m){if(U(e))return m?e:{};if(P=function(e){return"function"!=typeof e.constructor||Re(e)?{}:Ve(t=ie(e))?oe(t):{};var t}(R?{}:e),!t)return function(e,t){return Ie(e,Le(e),t)}(e,function(e,t){return e&&Ie(t,Ge(t),e)}(P,e))}else{if(!I[M])return m?e:{};P=function(e,t,n,r){var i,s,l=e.constructor;switch(t){case y:return Pe(e);case o:case a:return new l(+e);case b:return i=e,s=r?Pe(i.buffer):i.buffer,new i.constructor(s,i.byteOffset,i.byteLength);case w:case x:case C:case E:case k:case S:case _:case D:case A:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case u:return function(e,t,n){return z(t?n($(e),!0):$(e),j,new e.constructor)}(e,r,n);case c:case g:return new l(e);case h:return function(e){var t=new e.constructor(e.source,T.exec(e));return t.lastIndex=e.lastIndex,t}(e);case p:return function(e,t,n){return z(t?n(V(e),!0):V(e),H,new e.constructor)}(e,r,n);case v:return function(e){return Ee?Object(Ee.call(e)):{}}(e)}}(e,M,Oe,t)}}O||(O=new De);var W=O.get(e);if(W)return W;if(O.set(e,P),!N)var G=n?function(e){return function(e,t,n){var r=t(e);return ze(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ge,Le)}(e):Ge(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n););}(G||e,function(i,o){G&&(i=e[o=i]),Ae(P,o,Oe(i,t,n,r,o,e,O))}),P}function Pe(e){var t=new e.constructor(e.byteLength);return new re(t).set(new re(e)),t}function Ie(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i];Ae(n,a,e[a])}return n}function Fe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Be(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!Ve(e)||(t=e,X&&X in t))&&(We(e)||U(e)?ee:O).test(je(e));var t}(r)?r:void 0}ke.prototype.clear=function(){this.__data__=ve?ve(null):{}},ke.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ke.prototype.get=function(e){var t=this.__data__;if(ve){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},ke.prototype.has=function(e){var t=this.__data__;return ve?void 0!==t[e]:Z.call(t,e)},ke.prototype.set=function(e,t){return this.__data__[e]=ve&&void 0===t?n:t,this},Se.prototype.clear=function(){this.__data__=[]},Se.prototype.delete=function(e){var t=this.__data__,n=Te(t,e);return!(n<0||(n==t.length-1?t.pop():se.call(t,n,1),0))},Se.prototype.get=function(e){var t=this.__data__,n=Te(t,e);return n<0?void 0:t[n][1]},Se.prototype.has=function(e){return Te(this.__data__,e)>-1},Se.prototype.set=function(e,t){var n=this.__data__,r=Te(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},_e.prototype.clear=function(){this.__data__={hash:new ke,map:new(de||Se),string:new ke}},_e.prototype.delete=function(e){return Fe(this,e).delete(e)},_e.prototype.get=function(e){return Fe(this,e).get(e)},_e.prototype.has=function(e){return Fe(this,e).has(e)},_e.prototype.set=function(e,t){return Fe(this,e).set(e,t),this},De.prototype.clear=function(){this.__data__=new Se},De.prototype.delete=function(e){return this.__data__.delete(e)},De.prototype.get=function(e){return this.__data__.get(e)},De.prototype.has=function(e){return this.__data__.has(e)},De.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Se){var r=n.__data__;if(!de||r.length<199)return r.push([e,t]),this;n=this.__data__=new _e(r)}return n.set(e,t),this};var Le=le?W(le,Object):function(){return[]},Ne=function(e){return Q.call(e)};function Me(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||P.test(e))&&e>-1&&e%1==0&&e<t}function Re(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||K)}function je(e){if(null!=e){try{return J.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function He(e,t){return e===t||e!=e&&t!=t}(fe&&Ne(new fe(new ArrayBuffer(1)))!=b||de&&Ne(new de)!=u||he&&Ne(he.resolve())!=d||pe&&Ne(new pe)!=p||ge&&Ne(new ge)!=m)&&(Ne=function(e){var t=Q.call(e),n=t==f?e.constructor:void 0,r=n?je(n):void 0;if(r)switch(r){case me:return b;case ye:return u;case be:return d;case we:return p;case xe:return m}return t});var ze=Array.isArray;function Ue(e){return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=r&&!We(e);var t}var $e=ue||function(){return!1};function We(e){var t=Ve(e)?Q.call(e):"";return t==s||t==l}function Ve(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ge(e){return Ue(e)?function(e){var t,n,r=ze(e)||function(e){return!!e&&"object"==typeof e}(n=t=e)&&Ue(n)&&Z.call(t,"callee")&&(!ae.call(t,"callee")||Q.call(t)==i)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,a=!!o;for(var s in e)!Z.call(e,s)||a&&("length"==s||Me(s,o))||r.push(s);return r}(e):function(e){if(!Re(e))return ce(e);var t=[];for(var n in Object(e))Z.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Oe(e,!0,!0)}});function OO(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var PO=0;function IO(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,i)=>{""!==e&&r.push(e),t<i.length-1&&r.push(n)})),r}function FO(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const i of Object.keys(t))if("_"!==i){let e=t[i];"string"==typeof e&&(e=n[Symbol.replace](e,"$$$$")),r=IO(r,new RegExp(`%\\{${i}\\}`,"g"),e)}return r}var BO=(DO="__private_"+PO+++"_apply",class{constructor(e){Object.defineProperty(this,DO,{value:LO}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(e)?e.forEach(OO(this,DO)[DO],this):OO(this,DO)[DO](e)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(n=this.locale.strings,r=e,!Object.prototype.hasOwnProperty.call(n,r))throw new Error(`missing string: ${e}`);var n,r;const i=this.locale.strings[e];if("object"==typeof i){if(t&&void 0!==t.smart_count)return FO(i[this.locale.pluralize(t.smart_count)],t);throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return FO(i,t)}});function LO(e){if(null==e||!e.strings)return;const t=this.locale;this.locale=u(l({},t),{strings:l(l({},t.strings),e.strings)}),this.locale.pluralize=e.pluralize||t.pluralize}var NO=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,i,o,a,s){var l=function(e){for(var n=t[e]?t[e]:[],r=e.indexOf(":"),i=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],o=Object.keys(t),a=0,s=o.length;a<s;a++){var l=o[a];if("*"===l&&(n=n.concat(t[l])),2===i.length&&i[0]===l){n=n.concat(t[l]);break}}return n}(e);l.length&&function(e,t,n){for(var r=0,i=t.length;r<i&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,l,[n,r,i,o,a,s])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function r(){n.apply(this,arguments),e.off(t,r)})},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],i=0,o=r?r.length:0;i<o;i++)r[i]!==t&&n.push(r[i]);n.length?this._fns[e]=n:delete this._fns[e]},e},MO={nanoid:(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=63&n[e];t+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return t}},RO=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var i=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+i:(t?"-":"")+e.toFixed(1)+" "+i};function jO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}jO.prototype.match=function(e){var t,n,r=!0,i=this.parts,o=i.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<o;t++)"*"!==i[t]&&(r=t<n.length&&i[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r};var HO=/[\/\+\.]/,zO=0,UO="__private_"+zO+++"_publish";class $O{constructor(){Object.defineProperty(this,UO,{value:WO}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t=l({},this.state),n=l(l({},this.state),e);this.state=n,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,UO)[UO](t,n,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function WO(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(e=>{e(...t)})}$O.VERSION="2.0.3";var VO=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}},GO={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function qO(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>{return t+=`-${n=e,n.charCodeAt(0).toString(32)}`,"/";var n})+t}var KO=function(e){if(null==e&&(e="undefined"!=typeof navigator?navigator.userAgent:null),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,i]=n.split(".");return r=parseInt(r,10),i=parseInt(i,10),r<15||15===r&&i<15063||r>18||18===r&&i>=18218};function YO(e){return e<10?`0${e}`:e.toString()}var XO=function(){const e=new Date;return`${YO(e.getHours())}:${YO(e.getMinutes())}:${YO(e.getSeconds())}`},JO={justErrorsLogger:{debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${XO()}]`,...t)}},debugLogger:{debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.debug(`[Uppy] [${XO()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.warn(`[Uppy] [${XO()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return console.error(`[Uppy] [${XO()}]`,...t)}}},ZO={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",backToSearch:"Back to Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}},QO=MO;let eP,tP;function nP(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var rP=0;function iP(e){return"__private_"+rP+++"_"+e}const{nanoid:oP}=QO,{justErrorsLogger:aP,debugLogger:sP}=JO;class lP extends Error{constructor(){super(...arguments),this.isRestriction=!0}}"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});class uP extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var cP=iP("plugins"),fP=iP("storeUnsubscribe"),dP=iP("emitter"),hP=iP("preProcessors"),pP=iP("uploaders"),gP=iP("postProcessors"),vP=iP("checkRestrictions"),mP=iP("checkMinNumberOfFiles"),yP=iP("checkRequiredMetaFieldsOnFile"),bP=iP("checkRequiredMetaFields"),wP=iP("showOrLogErrorAndThrow"),xP=iP("assertNewUploadAllowed"),CP=iP("checkAndCreateFileStateObject"),EP=iP("startIfAutoProceed"),kP=iP("addListeners"),SP=iP("updateOnlineStatus"),_P=iP("createUpload"),DP=iP("getUpload"),AP=iP("removeUpload"),TP=iP("runUpload");eP=Symbol.for("uppy test: getPlugins"),tP=Symbol.for("uppy test: createUpload");class OP{constructor(e){Object.defineProperty(this,TP,{value:$P}),Object.defineProperty(this,AP,{value:UP}),Object.defineProperty(this,DP,{value:zP}),Object.defineProperty(this,_P,{value:HP}),Object.defineProperty(this,kP,{value:jP}),Object.defineProperty(this,EP,{value:RP}),Object.defineProperty(this,CP,{value:MP}),Object.defineProperty(this,xP,{value:NP}),Object.defineProperty(this,wP,{value:LP}),Object.defineProperty(this,bP,{value:BP}),Object.defineProperty(this,yP,{value:FP}),Object.defineProperty(this,mP,{value:IP}),Object.defineProperty(this,vP,{value:PP}),Object.defineProperty(this,cP,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,fP,{writable:!0,value:void 0}),Object.defineProperty(this,dP,{writable:!0,value:NO()}),Object.defineProperty(this,hP,{writable:!0,value:new Set}),Object.defineProperty(this,pP,{writable:!0,value:new Set}),Object.defineProperty(this,gP,{writable:!0,value:new Set}),Object.defineProperty(this,SP,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=ZO;const t={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:new $O,logger:aP,infoTimeout:5e3};if(this.opts=u(l(l({},t),e),{restrictions:l(l({},t.restrictions),e&&e.restrictions)}),e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=sP),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&null!==this.opts.restrictions.allowedFileTypes&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=MA(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:KO(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:l({},this.opts.meta),info:[],recoveredState:null}),nP(this,fP)[fP]=this.store.subscribe((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),nP(this,kP)[kP]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];nP(this,dP)[dP].emit(e,...n)}on(e,t){return nP(this,dP)[dP].on(e,t),this}once(e,t){return nP(this,dP)[dP].once(e,t),this}off(e,t){return nP(this,dP)[dP].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:u(l({},this.getState().files),{[e]:l(l({},this.getState().files[e]),t)})})}i18nInit(){const e=new BO([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts=u(l(l({},this.opts),e),{restrictions:l(l({},this.opts.restrictions),e&&e.restrictions)}),e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(e=>{e.setOptions()}),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t=l({},this.getState().files),n={};Object.keys(t).forEach(r=>{const i=l({},t[r]);i.progress=l(l({},i.progress),e),n[r]=i}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){nP(this,hP)[hP].add(e)}removePreProcessor(e){return nP(this,hP)[hP].delete(e)}addPostProcessor(e){nP(this,gP)[gP].add(e)}removePostProcessor(e){return nP(this,gP)[gP].delete(e)}addUploader(e){nP(this,pP)[pP].add(e)}removeUploader(e){return nP(this,pP)[pP].delete(e)}setMeta(e){const t=l(l({},this.getState().meta),e),n=l({},this.getState().files);Object.keys(n).forEach(t=>{n[t]=u(l({},n[t]),{meta:l(l({},n[t].meta),e)})}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n=l({},this.getState().files);if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r=l(l({},n[e].meta),t);n[e]=u(l({},n[e]),{meta:r}),this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),i=r.filter(e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted}),o=r.filter(e=>!e.progress.uploadStarted),a=r.filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess),s=r.filter(e=>e.progress.uploadStarted),l=r.filter(e=>e.isPaused),u=r.filter(e=>e.progress.uploadComplete),c=r.filter(e=>e.error),f=i.filter(e=>!e.isPaused),d=r.filter(e=>e.progress.preprocess||e.progress.postprocess);return{newFiles:o,startedFiles:a,uploadStartedFiles:s,pausedFiles:l,completeFiles:u,erroredFiles:c,inProgressFiles:i,inProgressNotPausedFiles:f,processingFiles:d,isUploadStarted:s.length>0,isAllComplete:100===t&&u.length===r.length&&0===d.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==i.length&&l.length===i.length,isUploadInProgress:i.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){try{return nP(this,vP)[vP](e,t),{result:!0}}catch(n){return{result:!1,reason:n.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){nP(this,xP)[xP](e);const{files:t}=this.getState();let n=nP(this,CP)[CP](t,e);return t[n.id]&&t[n.id].isGhost&&(n=u(l({},t[n.id]),{data:e.data,isGhost:!1}),this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:u(l({},t),{[n.id]:n})}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),nP(this,EP)[EP](),n.id}addFiles(e){nP(this,xP)[xP]();const t=l({},this.getState().files),n=[],r=[];for(let o=0;o<e.length;o++)try{let r=nP(this,CP)[CP](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r=u(l({},t[r.id]),{data:e[o].data,isGhost:!1}),this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(i){i.isRestriction||r.push(i)}if(this.setState({files:t}),n.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)}),n.length>0&&nP(this,EP)[EP](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),i=l({},n),o=l({},r),a=Object.create(null);function s(e){return void 0===a[e]}e.forEach(e=>{n[e]&&(a[e]=n[e],delete i[e])}),Object.keys(o).forEach(e=>{const t=r[e].fileIDs.filter(s);0!==t.length?o[e]=u(l({},r[e]),{fileIDs:t}):delete o[e]});const c={currentUploads:o,files:i};0===Object.keys(i).length&&(c.allowNewUpload=!0,c.error=null,c.recoveredState=null),this.setState(c),this.calculateTotalProgress();const f=Object.keys(a);f.forEach(e=>{this.emit("file-removed",a[e],t)}),f.length>5?this.log(`Removed ${f.length} files`):this.log(`Removed files: ${f.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!this.getFile(e).isPaused;return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e=l({},this.getState().files);Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n=u(l({},e[t]),{isPaused:!0});e[t]=n}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e=l({},this.getState().files);Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n=u(l({},e[t]),{isPaused:!1,error:null});e[t]=n}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e=l({},this.getState().files),t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{const n=u(l({},e[t]),{isPaused:!1,error:null});e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=nP(this,_P)[_P](t,{forceAllowNewUpload:!0});return nP(this,TP)[TP](n)}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=nP(this,_P)[_P]([e],{forceAllowNewUpload:!0});return nP(this,TP)[TP](t)}reset(){this.cancelAll()}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,t){if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:u(l({},this.getFile(e.id).progress),{bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0})}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter(e=>null!=e.progress.bytesTotal),n=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),i=Math.round(r/t*100);return void this.setState({totalProgress:i})}let r=t.reduce((e,t)=>e+t.progress.bytesTotal,0);const i=r/t.length;r+=i*n.length;let o=0;t.forEach(e=>{o+=e.progress.bytesUploaded}),n.forEach(e=>{o+=i*(e.progress.percentage||0)/100});let a=0===r?0:Math.round(o/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e)throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`);const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const i=this.getPlugin(r);if(i){const e=`Already found a plugin named '${i.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in nP(this,cP)[cP]?nP(this,cP)[cP][n.type].push(n):nP(this,cP)[cP][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(nP(this,cP)[cP])){const n=t.find(t=>t.id===e);if(null!=n)return n}}[eP](e){return nP(this,cP)[cP][e]}iteratePlugins(e){Object.values(nP(this,cP)[cP]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=nP(this,cP)[cP][e.type],n=t.findIndex(t=>t.id===e.id);-1!==n&&t.splice(n,1);const r={plugins:u(l({},this.getState().plugins),{[e.id]:void 0})};this.setState(r)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),nP(this,fP)[fP](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",nP(this,SP)[SP]),window.removeEventListener("offline",nP(this,SP)[SP]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?nP(this,TP)[TP](e):(nP(this,AP)[AP](e),Promise.reject(new Error("Nonexistent upload")))}[tP](){return nP(this,_P)[_P](...arguments)}addResultData(e,t){if(!nP(this,DP)[DP](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r=u(l({},n[e]),{result:l(l({},n[e].result),t)});this.setState({currentUploads:u(l({},n),{[e]:r})})}upload(){var e;null!=(e=nP(this,cP)[cP].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const n=this.opts.onBeforeUpload(t);return!1===n?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&"object"==typeof n&&(t=n,this.setState({files:t})),Promise.resolve().then(()=>{nP(this,mP)[mP](t),nP(this,bP)[bP](t)}).catch(e=>{nP(this,wP)[wP](e)}).then(()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)});const i=nP(this,_P)[_P](r);return nP(this,TP)[TP](i)}).catch(e=>{nP(this,wP)[wP](e,{showInformer:!1})}))}}function PP(e,t){void 0===t&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:a}=this.opts.restrictions;if(o&&t.length+1>o)throw new lP(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(t=>t.indexOf("/")>-1?!!e.type&&function(e,t){function n(t){var n=function(e,t){var n=new jO(e,HO||/[\/\.]/);return void 0!==t?n.match(t):n}(t,e);return n&&n.length>=2}return t?n(t.split(";")[0]):n}(e.type.replace(/;.*?$/,""),t):!("."!==t[0]||!e.extension)&&e.extension.toLowerCase()===t.substr(1).toLowerCase())){const e=a.join(", ");throw new lP(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}if(i&&null!=e.size){let n=0;if(n+=e.size,t.forEach(e=>{n+=e.size}),n>i)throw new lP(this.i18n("exceedsSize",{size:RO(i),file:e.name}))}if(n&&null!=e.size&&e.size>n)throw new lP(this.i18n("exceedsSize",{size:RO(n),file:e.name}));if(r&&null!=e.size&&e.size<r)throw new lP(this.i18n("inferiorSize",{size:RO(r)}))}function IP(e){const{minNumberOfFiles:t}=this.opts.restrictions;if(Object.keys(e).length<t)throw new lP(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:t})}`)}function FP(e){const{requiredMetaFields:t}=this.opts.restrictions,{hasOwnProperty:n}=Object.prototype,r=[],i=[];for(let o=0;o<t.length;o++)if(!n.call(e.meta,t[o])||""===e.meta[t[o]]){const n=new lP(`${this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})}`);r.push(n),i.push(t[o]),nP(this,wP)[wP](n,{file:e,showInformer:!1,throwErr:!1})}return this.setFileState(e.id,{missingRequiredMetaFields:i}),r}function BP(e){const t=Object.keys(e).flatMap(e=>{const t=this.getFile(e);return nP(this,yP)[yP](t)});if(t.length)throw new uP(t,`${this.i18n("missingRequiredMetaField")}`)}function LP(e,t){let{showInformer:n=!0,file:r=null,throwErr:i=!0}=void 0===t?{}:t;const o="object"==typeof e?e.message:e,a="object"==typeof e&&e.details?e.details:"";let s=o;if(a&&(s+=` ${a}`),e.isRestriction?(this.log(s),this.emit("restriction-failed",r,e)):this.log(s,"error"),n&&this.info({message:o,details:a},"error",this.opts.infoTimeout),i)throw"object"==typeof e?e:new Error(e)}function NP(e){const{allowNewUpload:t}=this.getState();!1===t&&nP(this,wP)[wP](new lP(this.i18n("noMoreFilesAllowed")),{file:e})}function MP(e,t){const n=function(e){var t;if(e.type)return e.type;const n=e.name?null==(t=VO(e.name).extension)?void 0:t.toLowerCase():null;return n&&n in GO?GO[n]:"application/octet-stream"}(t),r=(s=n,(c=t).name?c.name:"image"===s.split("/")[0]?`${s.split("/")[0]}.${s.split("/")[1]}`:"noname"),i=VO(r).extension,o=Boolean(t.isRemote),a=function(e){let t="uppy";return"string"==typeof e.name&&(t+=`-${qO(e.name.toLowerCase())}`),void 0!==e.type&&(t+=`-${e.type}`),e.meta&&"string"==typeof e.meta.relativePath&&(t+=`-${qO(e.meta.relativePath.toLowerCase())}`),void 0!==e.data.size&&(t+=`-${e.data.size}`),void 0!==e.data.lastModified&&(t+=`-${e.data.lastModified}`),t}(u(l({},t),{type:n}));var s,c;if(this.checkIfFileAlreadyExists(a)){const e=new lP(this.i18n("noDuplicates",{fileName:r}));nP(this,wP)[wP](e,{file:t})}const f=t.meta||{};f.name=r,f.type=n;const d=Number.isFinite(t.data.size)?t.data.size:null;let h={source:t.source||"",id:a,name:r,extension:i||"",meta:l(l({},this.getState().meta),f),type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:d,uploadComplete:!1,uploadStarted:null},size:d,isRemote:o,remote:t.remote||"",preview:t.preview};const p=this.opts.onBeforeFileAdded(h,e);!1===p?nP(this,wP)[wP](new lP("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:t}):"object"==typeof p&&null!==p&&(h=p);try{const t=Object.keys(e).map(t=>e[t]);nP(this,vP)[vP](h,t)}catch(s){nP(this,wP)[wP](s,{file:h})}return h}function RP(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function jP(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:t.name}),nP(this,wP)[wP](e,{throwErr:!1})}else nP(this,wP)[wP](n,{throwErr:!1})}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",e=>{this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,t)=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:u(l({},n),{postprocess:nP(this,gP)[gP].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal}),response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,t)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:u(l({},this.getFile(e.id).progress),{preprocess:t})}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on("preprocess-complete",e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const t=l({},this.getState().files);t[e.id]=u(l({},t[e.id]),{progress:l({},t[e.id].progress)}),delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{this.getFile(e.id)?this.setFileState(e.id,{progress:u(l({},this.getState().files[e.id].progress),{postprocess:t})}):this.log(`Not setting progress for a file that has been removed: ${e.id}`)}),this.on("postprocess-complete",e=>{if(!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${e.id}`);const t=l({},this.getState().files);t[e.id]=u(l({},t[e.id]),{progress:l({},t[e.id].progress)}),delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&nP(this,yP)[yP](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",nP(this,SP)[SP]),window.addEventListener("offline",nP(this,SP)[SP]),setTimeout(nP(this,SP)[SP],3e3))}function HP(e,t){void 0===t&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=oP();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:u(l({},i),{[o]:{fileIDs:e,step:0,result:{}}})}),o}function zP(e){const{currentUploads:t}=this.getState();return t[e]}function UP(e){const t=l({},this.getState().currentUploads);delete t[e],this.setState({currentUploads:t})}function $P(e){return f(this,null,function*(){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...nP(this,hP)[hP],...nP(this,pP)[pP],...nP(this,gP)[gP]];try{for(let o=r;o<i.length&&n;o++){const r=i[o],a=u(l({},n),{step:o});this.setState({currentUploads:u(l({},t),{[e]:a})}),yield r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(a){throw this.emit("error",a),nP(this,AP)[AP](e),a}if(n){n.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const r=n.fileIDs.map(e=>this.getFile(e)),i=r.filter(e=>!e.error),o=r.filter(e=>e.error);yield this.addResultData(e,{successful:i,failed:o,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let o;return n&&(o=n.result,this.emit("complete",o),nP(this,AP)[AP](e)),null==o&&this.log(`Not setting result for an upload that has been removed: ${e}`),o})}OP.VERSION="2.1.3";var WP=OP,VP=Eh(function(e,t){var n,r,i,o,a,s,l,u,c={},f=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,r){var i,o,a,s={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return v(e,s,i,o,null)}function v(e,t,n,o,a){var s={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=r.vnode&&r.vnode(s),s}function m(e){return e.children}function y(e,t){this.props=e,this.context=t}function b(e,t){if(null==t)return e.__?b(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?b(e):null}function w(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return w(e)}}function x(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!C.__r++||l!==r.debounceRendering)&&((l=r.debounceRendering)||s)(C)}function C(){for(var e;C.__r=a.length;)e=a.sort(function(e,t){return e.__v.__b-t.__v.__b}),a=[],e.some(function(e){var t,n,r,i,o,a;e.__d&&(o=(i=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=h({},i)).__v=i.__v+1,O(a,i,r,t.__n,void 0!==a.ownerSVGElement,null!=i.__h?[o]:null,n,null==o?b(i):o,i.__h),P(n,i),i.__e!=o&&w(i)))})}function E(e,t,n,r,i,o,a,s,l,u){var d,h,p,g,y,w,x,C=r&&r.__k||f,E=C.length;for(n.__k=[],d=0;d<t.length;d++)if(null!=(g=n.__k[d]=null==(g=t[d])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g||"bigint"==typeof g?v(null,g,null,null,g):Array.isArray(g)?v(m,{children:g},null,null,null):g.__b>0?v(g.type,g.props,g.key,null,g.__v):g)){if(g.__=n,g.__b=n.__b+1,null===(p=C[d])||p&&g.key==p.key&&g.type===p.type)C[d]=void 0;else for(h=0;h<E;h++){if((p=C[h])&&g.key==p.key&&g.type===p.type){C[h]=void 0;break}p=null}O(e,g,p=p||c,i,o,a,s,l,u),y=g.__e,(h=g.ref)&&p.ref!=h&&(x||(x=[]),p.ref&&x.push(p.ref,null,g),x.push(h,g.__c||y,g)),null!=y?(null==w&&(w=y),"function"==typeof g.type&&g.__k===p.__k?g.__d=l=k(g,l,e):l=S(e,g,p,C,y,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=b(p))}for(n.__e=w,d=E;d--;)null!=C[d]&&("function"==typeof n.type&&null!=C[d].__e&&C[d].__e==n.__d&&(n.__d=b(r,d+1)),F(C[d],C[d]));if(x)for(d=0;d<x.length;d++)I(x[d],x[++d],x[++d])}function k(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?k(r,t,n):S(n,r,r,i,r.__e,t));return t}function S(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function _(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function D(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||_(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||_(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?T:A,o):e.removeEventListener(t,o?T:A,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(a){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function A(e){this.l[e.type+!1](r.event?r.event(e):e)}function T(e){this.l[e.type+!0](r.event?r.event(e):e)}function O(e,t,i,o,a,s,l,u,f){var d,g,v,w,x,C,k,S,_,A,T,O=t.type;if(void 0!==t.constructor)return null;null!=i.__h&&(f=i.__h,u=t.__e=i.__e,t.__h=null,s=[u]),(d=r.__b)&&d(t);try{e:if("function"==typeof O){if(S=t.props,_=(d=O.contextType)&&o[d.__c],A=d?_?_.props.value:d.__:o,i.__c?k=(g=t.__c=i.__c).__=g.__E:("prototype"in O&&O.prototype.render?t.__c=g=new O(S,A):(t.__c=g=new y(S,A),g.constructor=O,g.render=B),_&&_.sub(g),g.props=S,g.state||(g.state={}),g.context=A,g.__n=o,v=g.__d=!0,g.__h=[]),null==g.__s&&(g.__s=g.state),null!=O.getDerivedStateFromProps&&(g.__s==g.state&&(g.__s=h({},g.__s)),h(g.__s,O.getDerivedStateFromProps(S,g.__s))),w=g.props,x=g.state,v)null==O.getDerivedStateFromProps&&null!=g.componentWillMount&&g.componentWillMount(),null!=g.componentDidMount&&g.__h.push(g.componentDidMount);else{if(null==O.getDerivedStateFromProps&&S!==w&&null!=g.componentWillReceiveProps&&g.componentWillReceiveProps(S,A),!g.__e&&null!=g.shouldComponentUpdate&&!1===g.shouldComponentUpdate(S,g.__s,A)||t.__v===i.__v){g.props=S,g.state=g.__s,t.__v!==i.__v&&(g.__d=!1),g.__v=t,t.__e=i.__e,t.__k=i.__k,t.__k.forEach(function(e){e&&(e.__=t)}),g.__h.length&&l.push(g);break e}null!=g.componentWillUpdate&&g.componentWillUpdate(S,g.__s,A),null!=g.componentDidUpdate&&g.__h.push(function(){g.componentDidUpdate(w,x,C)})}g.context=A,g.props=S,g.state=g.__s,(d=r.__r)&&d(t),g.__d=!1,g.__v=t,g.__P=e,d=g.render(g.props,g.state,g.context),g.state=g.__s,null!=g.getChildContext&&(o=h(h({},o),g.getChildContext())),v||null==g.getSnapshotBeforeUpdate||(C=g.getSnapshotBeforeUpdate(w,x)),T=null!=d&&d.type===m&&null==d.key?d.props.children:d,E(e,Array.isArray(T)?T:[T],t,i,o,a,s,l,u,f),g.base=t.__e,t.__h=null,g.__h.length&&l.push(g),k&&(g.__E=g.__=null),g.__e=!1}else null==s&&t.__v===i.__v?(t.__k=i.__k,t.__e=i.__e):t.__e=function(e,t,r,i,o,a,s,l){var u,f,d,h=r.props,g=t.props,v=t.type,m=0;if("svg"===v&&(o=!0),null!=a)for(;m<a.length;m++)if((u=a[m])&&"setAttribute"in u==!!v&&(v?u.localName===v:3===u.nodeType)){e=u,a[m]=null;break}if(null==e){if(null===v)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,g.is&&g),a=null,l=!1}if(null===v)h===g||l&&e.data===g||(e.data=g);else{if(a=a&&n.call(e.childNodes),f=(h=r.props||c).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!l){if(null!=a)for(h={},m=0;m<e.attributes.length;m++)h[e.attributes[m].name]=e.attributes[m].value;(d||f)&&(d&&(f&&d.__html==f.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||D(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||D(e,o,t[o],n[o],r)}(e,g,h,o,l),d)t.__k=[];else if(m=t.props.children,E(e,Array.isArray(m)?m:[m],t,r,i,o&&"foreignObject"!==v,a,s,a?a[0]:r.__k&&b(r,0),l),null!=a)for(m=a.length;m--;)null!=a[m]&&p(a[m]);l||("value"in g&&void 0!==(m=g.value)&&(m!==h.value||m!==e.value||"progress"===v&&!m)&&D(e,"value",m,h.value,!1),"checked"in g&&void 0!==(m=g.checked)&&m!==e.checked&&D(e,"checked",m,h.checked,!1))}return e}(i.__e,t,i,o,a,s,l,f);(d=r.diffed)&&d(t)}catch(P){t.__v=null,(f||null!=s)&&(t.__e=u,t.__h=!!f,s[s.indexOf(u)]=null),r.__e(P,t,i)}}function P(e,t){r.__c&&r.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(n){r.__e(n,t.__v)}})}function I(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(i){r.__e(i,n)}}function F(e,t,n){var i,o;if(r.unmount&&r.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||I(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(a){r.__e(a,t)}i.base=i.__P=null}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&F(i[o],t,"function"!=typeof e.type);n||null==e.__e||p(e.__e),e.__e=e.__d=void 0}function B(e,t,n){return this.constructor(e,n)}function L(e,t,i){var o,a,s;r.__&&r.__(e,t),a=(o="function"==typeof i)?null:i&&i.__k||t.__k,s=[],O(t,e=(!o&&i||t).__k=g(m,null,[e]),a||c,c,void 0!==t.ownerSVGElement,!o&&i?[i]:a?null:t.firstChild?n.call(t.childNodes):null,s,!o&&i?i:a?a.__e:t.firstChild,o),P(s,e)}n=f.slice,r={__e:function(e,t){for(var n,r,i;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),i=n.__d),i)return n.__E=n}catch(o){e=o}throw e}},i=0,o=function(e){return null!=e&&void 0===e.constructor},y.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),x(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},y.prototype.render=m,a=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,C.__r=0,u=0,t.Component=y,t.Fragment=m,t.cloneElement=function(e,t,r){var i,o,a,s=h({},e.props);for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];return arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),v(e.type,s,i||e.key,o||e.ref,null)},t.createContext=function(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(x)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},t.createElement=g,t.createRef=function(){return{current:null}},t.h=g,t.hydrate=function e(t,n){L(t,n,e)},t.isValidElement=o,t.options=r,t.render=L,t.toChildArray=function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some(function(t){e(t,n)}):n.push(t)),n}}),GP=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:u(l({},t),{[this.id]:l(l({},t[this.id]),e)})})}setOptions(e){this.opts=l(l({},this.opts),e),this.setPluginState(),this.i18nInit()}i18nInit(){const e=new BO([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function qP(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var KP=0;const{render:YP}=VP;var XP="__private_"+KP+++"_updateUI";class JP extends GP{constructor(){super(...arguments),Object.defineProperty(this,XP,{writable:!0,value:void 0})}mount(e,t){const n=t.id,r=function(e,t){return void 0===t&&(t=document),"string"==typeof e?t.querySelector(e):(null==(n=e)?void 0:n.nodeType)===Node.ELEMENT_NODE?e:null;var n}(e);if(r){this.isTargetDOMEl=!0;const t=document.createDocumentFragment();return qP(this,XP)[XP]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=i,t||(t=Promise.resolve().then(()=>(t=null,e(...n)))),t}}(e=>{this.uppy.getPlugin(this.id)&&(YP(this.render(e),t),this.afterUpdate())}),this.uppy.log(`Installing ${n} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(r.innerHTML=""),YP(this.render(this.uppy.getState()),t),this.el=t.firstElementChild,r.appendChild(t),this.onMount(),this.el}let i;if("object"==typeof e&&e instanceof JP)i=e;else if("function"==typeof e){const t=e;this.uppy.iteratePlugins(e=>{if(e instanceof t)return i=e,!1})}if(i)return this.uppy.log(`Installing ${n} to ${i.id}`),this.parent=i,this.el=i.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let o=`Invalid target option given to ${n}.`;throw o+="function"==typeof e?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(o)}update(e){var t,n;null!=this.el&&(null==(t=(n=qP(this,XP))[XP])||t.call(n,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove()),this.onUnmount()}onMount(){}onUnmount(){}}var ZP=JP;const{debugLogger:QP}=JO;var eI=WP,tI=WP,nI=ZP,rI=GP,iI=QP;eI.Uppy=tI,eI.UIPlugin=nI,eI.BasePlugin=rI,eI.debugLogger=iI;class oI extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}var aI=oI,sI=function(){return fetch(...arguments).catch(e=>{throw"AbortError"===e.name?e:new aI(e)})};class lI extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}var uI,cI,fI,dI,hI,pI=lI;function gI(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var vI=0;function mI(e){return"__private_"+vI+++"_"+e}function yI(e){return f(this,null,function*(){if(401===e.status)throw new pI;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=yield t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t})}var bI=(cI=mI("getPostResponseFunc"),fI=mI("getUrl"),dI=mI("errorHandler"),hI=uI=class e{constructor(e,t){Object.defineProperty(this,dI,{value:xI}),Object.defineProperty(this,fI,{value:wI}),Object.defineProperty(this,cI,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){const t=this.opts.companionHeaders||{};return Promise.resolve(l(l({},e.defaultHeaders),t))}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:u(l({},t),{[n]:r.get("i-am")})}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(gI(this,fI)[fI](e),{method:"OPTIONS"}).then(e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map(e=>e.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then(e=>{let[t,n]=e;return Object.keys(n).forEach(e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])}),n})}get(e,t){return this.preflightAndHeaders(e).then(t=>sI(gI(this,fI)[fI](e),{method:"get",headers:t,credentials:this.opts.companionCookiesRule||"same-origin"})).then(gI(this,cI)[cI](t)).then(yI).catch(gI(this,dI)[dI]("get",e))}post(e,t,n){const r="post";return this.preflightAndHeaders(e).then(n=>sI(gI(this,fI)[fI](e),{method:r,headers:n,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(t)})).then(gI(this,cI)[cI](n)).then(yI).catch(gI(this,dI)[dI](r,e))}delete(e,t,n){const r="delete";return this.preflightAndHeaders(e).then(n=>sI(`${this.hostname}/${e}`,{method:r,headers:n,credentials:this.opts.companionCookiesRule||"same-origin",body:t?JSON.stringify(t):null})).then(gI(this,cI)[cI](n)).then(yI).catch(gI(this,dI)[dI](r,e))}},uI.VERSION="2.0.4",uI.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${uI.VERSION}`},hI);function wI(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function xI(e,t){return n=>{var r;if(null==(r=n)||!r.isAuthError){const r=new Error(`Could not ${e} ${gI(this,fI)[fI](t)}`);r.cause=n,n=r}return Promise.reject(n)}}var CI,EI,kI,SI,_I,DI={setItem:(e,t)=>new Promise(n=>{localStorage.setItem(e,t),n()}),getItem:e=>Promise.resolve(localStorage.getItem(e)),removeItem:e=>new Promise(t=>{localStorage.removeItem(e),t()})};let AI,TI;function OI(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var PI=0;function II(e){return"__private_"+PI+++"_"+e}var FI,BI,LI=(CI=II("queued"),EI=II("emitter"),kI=II("isOpen"),SI=II("socket"),_I=II("handleMessage"),AI=Symbol.for("uppy test: getSocket"),TI=Symbol.for("uppy test: getQueued"),class{constructor(e){Object.defineProperty(this,CI,{writable:!0,value:[]}),Object.defineProperty(this,EI,{writable:!0,value:NO()}),Object.defineProperty(this,kI,{writable:!0,value:!1}),Object.defineProperty(this,SI,{writable:!0,value:void 0}),Object.defineProperty(this,_I,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(t){console.log(t)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return OI(this,kI)[kI]}[AI](){return OI(this,SI)[SI]}[TI](){return OI(this,CI)[CI]}open(){OI(this,SI)[SI]=new WebSocket(this.opts.target),OI(this,SI)[SI].onopen=()=>{for(OI(this,kI)[kI]=!0;OI(this,CI)[CI].length>0&&OI(this,kI)[kI];){const e=OI(this,CI)[CI].shift();this.send(e.action,e.payload)}},OI(this,SI)[SI].onclose=()=>{OI(this,kI)[kI]=!1},OI(this,SI)[SI].onmessage=OI(this,_I)[_I]}close(){var e;null==(e=OI(this,SI)[SI])||e.close()}send(e,t){OI(this,kI)[kI]?OI(this,SI)[SI].send(JSON.stringify({action:e,payload:t})):OI(this,CI)[CI].push({action:e,payload:t})}on(e,t){OI(this,EI)[EI].on(e,t)}emit(e,t){OI(this,EI)[EI].emit(e,t)}once(e,t){OI(this,EI)[EI].once(e,t)}}),NI={RequestClient:bI,Provider:class extends bI{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||(()=>this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "))(),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),l(l({},t),r)})}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}authUrl(e){return void 0===e&&(e={}),this.preAuthToken&&(e.uppyPreAuthToken=this.preAuthToken),`${this.hostname}/${this.id}/connect?${new URLSearchParams(e)}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}fetchPreAuthToken(){return this.companionKeysParams?this.post(`${this.id}/preauth/`,{params:this.companionKeysParams}).then(e=>{this.preAuthToken=e.token}).catch(e=>{this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}):Promise.resolve()}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then(e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(e=>{let[t]=e;return t})}static initPlugin(e,t,n){if(e.type="acquirer",e.files=[],n&&(e.opts=l(l({},n),t)),t.serverUrl||t.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(t.companionAllowedHosts){const n=t.companionAllowedHosts;if(!("string"==typeof n||Array.isArray(n)||n instanceof RegExp))throw new TypeError(`${e.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);e.opts.companionAllowedHosts=n}else/^(?!https?:\/\/).*$/i.test(t.companionUrl)?e.opts.companionAllowedHosts=`https://${t.companionUrl.replace(/^\/\//,"")}`:e.opts.companionAllowedHosts=new URL(t.companionUrl).origin;e.storage=e.opts.storage||DI}},Socket:LI},MI=MA(function(e,t,n){const{progress:r,bytesUploaded:i,bytesTotal:o}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:i,bytesTotal:o}))},300,{leading:!0,trailing:!0});function RI(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var jI=0;function HI(e){return"__private_"+jI+++"_"+e}var zI=(FI=HI("emitter"),BI=HI("events"),class{constructor(e){Object.defineProperty(this,FI,{writable:!0,value:void 0}),Object.defineProperty(this,BI,{writable:!0,value:[]}),RI(this,FI)[FI]=e}on(e,t){return RI(this,BI)[BI].push([e,t]),RI(this,FI)[FI].on(e,t)}remove(){for(const[e,t]of RI(this,BI)[BI].splice(0))RI(this,FI)[FI].off(e,t)}});function UI(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var $I=0;function WI(e){return"__private_"+$I+++"_"+e}var VI=WI("aliveTimer"),GI=WI("isDone"),qI=WI("onTimedOut"),KI=WI("timeout"),YI=class{constructor(e,t){Object.defineProperty(this,VI,{writable:!0,value:void 0}),Object.defineProperty(this,GI,{writable:!0,value:!1}),Object.defineProperty(this,qI,{writable:!0,value:void 0}),Object.defineProperty(this,KI,{writable:!0,value:void 0}),UI(this,KI)[KI]=e,UI(this,qI)[qI]=t}progress(){UI(this,GI)[GI]||UI(this,KI)[KI]>0&&(clearTimeout(UI(this,VI)[VI]),UI(this,VI)[VI]=setTimeout(UI(this,qI)[qI],UI(this,KI)[KI]))}done(){UI(this,GI)[GI]||(clearTimeout(UI(this,VI)[VI]),UI(this,VI)[VI]=null,UI(this,GI)[GI]=!0)}};function XI(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var JI=0;function ZI(e){return"__private_"+JI+++"_"+e}var QI=ZI("activeRequests"),eF=ZI("queuedHandlers"),tF=ZI("call"),nF=ZI("queueNext"),rF=ZI("next"),iF=ZI("queue"),oF=ZI("dequeue");function aF(e){XI(this,QI)[QI]+=1;let t,n=!1;try{t=e()}catch(r){throw XI(this,QI)[QI]-=1,r}return{abort:()=>{n||(n=!0,XI(this,QI)[QI]-=1,t(),XI(this,nF)[nF]())},done:()=>{n||(n=!0,XI(this,QI)[QI]-=1,XI(this,nF)[nF]())}}}function sF(){queueMicrotask(()=>XI(this,rF)[rF]())}function lF(){if(XI(this,QI)[QI]>=this.limit)return;if(0===XI(this,eF)[eF].length)return;const e=XI(this,eF)[eF].shift(),t=XI(this,tF)[tF](e.fn);e.abort=t.abort,e.done=t.done}function uF(e,t){void 0===t&&(t={});const n={fn:e,priority:t.priority||0,abort:()=>{XI(this,oF)[oF](n)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},r=XI(this,eF)[eF].findIndex(e=>n.priority>e.priority);return-1===r?XI(this,eF)[eF].push(n):XI(this,eF)[eF].splice(r,0,n),n}function cF(e){const t=XI(this,eF)[eF].indexOf(e);-1!==t&&XI(this,eF)[eF].splice(t,1)}var fF,dF,hF={RateLimitedQueue:class{constructor(e){Object.defineProperty(this,oF,{value:cF}),Object.defineProperty(this,iF,{value:uF}),Object.defineProperty(this,rF,{value:lF}),Object.defineProperty(this,nF,{value:sF}),Object.defineProperty(this,tF,{value:aF}),Object.defineProperty(this,QI,{writable:!0,value:0}),Object.defineProperty(this,eF,{writable:!0,value:[]}),this.limit="number"!=typeof e||0===e?1/0:e}run(e,t){return XI(this,QI)[QI]<this.limit?XI(this,tF)[tF](e):XI(this,iF)[iF](e,t)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];let a;const s=new Promise((r,o)=>{a=n.run(()=>{let t,n;try{n=Promise.resolve(e(...i))}catch(s){n=Promise.reject(s)}return n.then(e=>{t?o(t):(a.done(),r(e))},e=>{t?o(t):(a.done(),o(e))}),()=>{t=new Error("Cancelled")}},t)});return s.abort=()=>{a.abort()},s}}},internalRateLimitedQueue:Symbol("__queue")},pF=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)},gF={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}};const{nanoid:vF}=QO,{Provider:mF,RequestClient:yF,Socket:bF}=NI,{RateLimitedQueue:wF,internalRateLimitedQueue:xF}=hF;function CF(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),pF(e)?(n=new aI(n,e),n):(n.request=e,n)}function EF(e){return e.data.slice(0,e.data.size,e.meta.type)}var kF=(dF=fF=class extends GP{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=gF;const n={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(r){e.log(r)}return n},getResponseError(e,t){let n=new Error("Upload error");return pF(t)&&(n=new aI(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts=l(l({},n),t),this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),xF in this.opts?this.requests=this.opts[xF]:this.requests=new wF(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r=u(l(l(l({},this.opts),t||{}),e.xhrUpload||{}),{headers:{}});return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach(n=>{e.append(n,t[n])})}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=EF(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach(e=>{const t=this.getOptions(e),r=EF(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)}),n}upload(e,t,n){const r=this.getOptions(e);return this.uppy.log(`uploading ${t} of ${n}`),new Promise((t,n)=>{this.uppy.emit("upload-started",e);const i=r.formData?this.createFormDataUpload(e,r):e.data,o=new XMLHttpRequest;this.uploaderEvents[e.id]=new zI(this.uppy);const a=new YI(r.timeout,()=>{o.abort(),l.done();const t=new Error(this.i18n("timedOut",{seconds:Math.ceil(r.timeout/1e3)}));this.uppy.emit("upload-error",e,t),n(t)}),s=vF();o.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${s} started`)}),o.upload.addEventListener("progress",t=>{this.uppy.log(`[XHRUpload] ${s} progress: ${t.loaded} / ${t.total}`),a.progress(),t.lengthComputable&&this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded,bytesTotal:t.total})}),o.addEventListener("load",i=>{if(this.uppy.log(`[XHRUpload] ${s} finished`),a.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r.validateStatus(i.target.status,o.responseText,o)){const n=r.getResponseData(o.responseText,o),a=n[r.responseUrlFieldName],s={status:i.target.status,body:n,uploadURL:a};return this.uppy.emit("upload-success",e,s),a&&this.uppy.log(`Download ${e.name} from ${a}`),t(e)}const u=r.getResponseData(o.responseText,o),c=CF(o,r.getResponseError(o.responseText,o)),f={status:i.target.status,body:u};return this.uppy.emit("upload-error",e,c,f),n(c)}),o.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${s} errored`),a.done(),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null);const t=CF(o,r.getResponseError(o.responseText,o));return this.uppy.emit("upload-error",e,t),n(t)}),o.open(r.method.toUpperCase(),r.endpoint,!0),o.withCredentials=r.withCredentials,""!==r.responseType&&(o.responseType=r.responseType);const l=this.requests.run(()=>{this.uppy.emit("upload-started",e);const t=this.getOptions(e);return Object.keys(t.headers).forEach(e=>{o.setRequestHeader(e,t.headers[e])}),o.send(i),()=>{a.done(),o.abort()}});this.onFileRemove(e.id,()=>{l.abort(),n(new Error("File removed"))}),this.onCancelAll(e.id,()=>{l.abort(),n(new Error("Upload cancelled"))})})}uploadRemote(e){const t=this.getOptions(e);return new Promise((n,r)=>{this.uppy.emit("upload-started",e);const i={};(Array.isArray(t.metaFields)?t.metaFields:Object.keys(e.meta)).forEach(t=>{i[t]=e.meta[t]}),new(e.remote.providerOptions.provider?mF:yF)(this.uppy,e.remote.providerOptions).post(e.remote.url,u(l({},e.remote.body),{endpoint:t.endpoint,size:e.data.size,fieldname:t.fieldName,metadata:i,httpMethod:t.method,useFormData:t.formData,headers:t.headers})).then(i=>{const{token:o}=i,a=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}(e.remote.companionUrl),s=new bF({target:`${a}/api/${o}`,autoOpen:!1});this.uploaderEvents[e.id]=new zI(this.uppy),this.onFileRemove(e.id,()=>{s.send("cancel",{}),l.abort(),n(`upload ${e.id} was removed`)}),this.onCancelAll(e.id,()=>{s.send("cancel",{}),l.abort(),n(`upload ${e.id} was canceled`)}),this.onRetry(e.id,()=>{s.send("pause",{}),s.send("resume",{})}),this.onRetryAll(e.id,()=>{s.send("pause",{}),s.send("resume",{})}),s.on("progress",t=>MI(this,t,e)),s.on("success",r=>{const i=t.getResponseData(r.response.responseText,r.response),o=i[t.responseUrlFieldName],a={status:r.response.status,body:i,uploadURL:o};return this.uppy.emit("upload-success",e,a),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),n()}),s.on("error",n=>{const i=n.response,o=i?t.getResponseError(i.responseText,i):Object.assign(new Error(n.error.message),{cause:n.error});this.uppy.emit("upload-error",e,o),l.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r(o)});const l=this.requests.run(()=>(s.open(),e.isPaused&&s.send("pause",{}),()=>s.close()))}).catch(t=>{this.uppy.emit("upload-error",e,t),r(t)})})}uploadBundle(e){return new Promise((t,n)=>{const{endpoint:r}=this.opts,{method:i}=this.opts,o=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,l(l({},this.opts),o||{})),s=new XMLHttpRequest,u=new YI(this.opts.timeout,()=>{s.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));c(e),n(e)}),c=t=>{e.forEach(e=>{this.uppy.emit("upload-error",e,t)})};s.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),u.progress()}),s.upload.addEventListener("progress",t=>{u.progress(),t.lengthComputable&&e.forEach(e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})})}),s.addEventListener("load",r=>{if(u.done(),this.opts.validateStatus(r.target.status,s.responseText,s)){const n=this.opts.getResponseData(s.responseText,s),i={status:r.target.status,body:n};return e.forEach(e=>{this.uppy.emit("upload-success",e,i)}),t()}const i=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return i.request=s,c(i),n(i)}),s.addEventListener("error",()=>{u.done();const e=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return c(e),n(e)}),this.uppy.on("cancel-all",()=>{u.done(),s.abort()}),s.open(i.toUpperCase(),r,!0),s.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(e=>{s.setRequestHeader(e,this.opts.headers[e])}),s.send(a),e.forEach(e=>{this.uppy.emit("upload-started",e)})})}uploadFiles(e){const t=e.map((t,n)=>{const r=parseInt(n,10)+1,i=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,i):this.upload(t,r,i)});return function(e){const t=[],n=[];function r(e){t.push(e)}function i(e){n.push(e)}return Promise.all(e.map(e=>e.then(r,i))).then(()=>({successful:t,failed:n}))}(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",n=>{e===n.id&&t(n.id)})}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",()=>{this.uppy.getFile(e)&&t()})}onCancelAll(e,t){this.uploaderEvents[e].on("cancel-all",()=>{this.uppy.getFile(e)&&t()})}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[xF]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map(e=>this.uppy.getFile(e));if(this.opts.bundle){if(t.some(e=>e.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:u(l({},e),{individualCancellation:!1})})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:u(l({},e),{individualCancellation:!0})})}this.uppy.removeUploader(this.handleUpload)}},fF.VERSION="2.0.6",dF),SF="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _F(e){var t={exports:{}};return e(t,t.exports),t.exports}var DF,AF,TF=function(e){return e&&e.Math==Math&&e},OF=TF("object"==typeof globalThis&&globalThis)||TF("object"==typeof window&&window)||TF("object"==typeof self&&self)||TF("object"==typeof SF&&SF)||function(){return this}()||Function("return this")(),PF=Object.defineProperty,IF=function(e,t){try{PF(OF,e,{value:t,configurable:!0,writable:!0})}catch(ZG){OF[e]=t}return t},FF=OF["__core-js_shared__"]||IF("__core-js_shared__",{}),BF=_F(function(e){(e.exports=function(e,t){return FF[e]||(FF[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),LF=Function.prototype,NF=LF.bind,MF=LF.call,RF=NF&&NF.bind(MF),jF=NF?function(e){return e&&RF(MF,e)}:function(e){return e&&function(){return MF.apply(e,arguments)}},HF=OF.TypeError,zF=function(e){if(null==e)throw HF("Can't call method on "+e);return e},UF=OF.Object,$F=function(e){return UF(zF(e))},WF=jF({}.hasOwnProperty),VF=Object.hasOwn||function(e,t){return WF($F(e),t)},GF=0,qF=Math.random(),KF=jF(1..toString),YF=function(e){return"Symbol("+(void 0===e?"":e)+")_"+KF(++GF+qF,36)},XF=function(e){return"function"==typeof e},JF=function(e,t){return arguments.length<2?function(e){return XF(e)?e:void 0}(OF[e]):OF[e]&&OF[e][t]},ZF=JF("navigator","userAgent")||"",QF=OF.process,eB=OF.Deno,tB=QF&&QF.versions||eB&&eB.version,nB=tB&&tB.v8;nB&&(AF=(DF=nB.split("."))[0]>0&&DF[0]<4?1:+(DF[0]+DF[1])),!AF&&ZF&&(!(DF=ZF.match(/Edge\/(\d+)/))||DF[1]>=74)&&(DF=ZF.match(/Chrome\/(\d+)/))&&(AF=+DF[1]);var rB=AF,iB=function(e){try{return!!e()}catch(t){return!0}},oB=!!Object.getOwnPropertySymbols&&!iB(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&rB&&rB<41}),aB=oB&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,sB=BF("wks"),lB=OF.Symbol,uB=lB&&lB.for,cB=aB?lB:lB&&lB.withoutSetter||YF,fB=function(e){if(!VF(sB,e)||!oB&&"string"!=typeof sB[e]){var t="Symbol."+e;oB&&VF(lB,e)?sB[e]=lB[e]:sB[e]=aB&&uB?uB(t):cB(t)}return sB[e]},dB={};dB[fB("toStringTag")]="z";var hB="[object z]"===String(dB),pB=!iB(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),gB=function(e){return"object"==typeof e?null!==e:XF(e)},vB=OF.document,mB=gB(vB)&&gB(vB.createElement),yB=function(e){return mB?vB.createElement(e):{}},bB=!pB&&!iB(function(){return 7!=Object.defineProperty(yB("div"),"a",{get:function(){return 7}}).a}),wB=OF.String,xB=OF.TypeError,CB=function(e){if(gB(e))return e;throw xB(wB(e)+" is not an object")},EB=Function.prototype.call,kB=EB.bind?EB.bind(EB):function(){return EB.apply(EB,arguments)},SB=jF({}.isPrototypeOf),_B=OF.Object,DB=aB?function(e){return"symbol"==typeof e}:function(e){var t=JF("Symbol");return XF(t)&&SB(t.prototype,_B(e))},AB=OF.String,TB=function(e){try{return AB(e)}catch(t){return"Object"}},OB=OF.TypeError,PB=function(e){if(XF(e))return e;throw OB(TB(e)+" is not a function")},IB=function(e,t){var n=e[t];return null==n?void 0:PB(n)},FB=OF.TypeError,BB=OF.TypeError,LB=fB("toPrimitive"),NB=function(e){var t=function(e){if(!gB(e)||DB(e))return e;var t,n=IB(e,LB);if(n){if(t=kB(n,e,"string"),!gB(t)||DB(t))return t;throw BB("Can't convert object to primitive value")}return function(e){var t,n;if(XF(t=e.toString)&&!gB(n=kB(t,e)))return n;if(XF(t=e.valueOf)&&!gB(n=kB(t,e)))return n;throw FB("Can't convert object to primitive value")}(e)}(e);return DB(t)?t:t+""},MB=OF.TypeError,RB=Object.defineProperty,jB={f:pB?RB:function(e,t,n){if(CB(e),t=NB(t),CB(n),bB)try{return RB(e,t,n)}catch(r){}if("get"in n||"set"in n)throw MB("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},HB=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},zB=pB?function(e,t,n){return jB.f(e,t,HB(1,n))}:function(e,t,n){return e[t]=n,e},UB=jF(Function.toString);XF(FF.inspectSource)||(FF.inspectSource=function(e){return UB(e)});var $B,WB,VB,GB=FF.inspectSource,qB=OF.WeakMap,KB=XF(qB)&&/native code/.test(GB(qB)),YB=BF("keys"),XB=function(e){return YB[e]||(YB[e]=YF(e))},JB={},ZB=OF.TypeError,QB=OF.WeakMap;if(KB||FF.state){var eL=FF.state||(FF.state=new QB),tL=jF(eL.get),nL=jF(eL.has),rL=jF(eL.set);$B=function(e,t){if(nL(eL,e))throw new ZB("Object already initialized");return t.facade=e,rL(eL,e,t),t},WB=function(e){return tL(eL,e)||{}},VB=function(e){return nL(eL,e)}}else{var iL=XB("state");JB[iL]=!0,$B=function(e,t){if(VF(e,iL))throw new ZB("Object already initialized");return t.facade=e,zB(e,iL,t),t},WB=function(e){return VF(e,iL)?e[iL]:{}},VB=function(e){return VF(e,iL)}}var oL={set:$B,get:WB,has:VB,enforce:function(e){return VB(e)?WB(e):$B(e,{})},getterFor:function(e){return function(t){var n;if(!gB(t)||(n=WB(t)).type!==e)throw ZB("Incompatible receiver, "+e+" required");return n}}},aL=Function.prototype,sL=pB&&Object.getOwnPropertyDescriptor,lL=VF(aL,"name"),uL={EXISTS:lL,PROPER:lL&&"something"===function(){}.name,CONFIGURABLE:lL&&(!pB||pB&&sL(aL,"name").configurable)},cL=_F(function(e){var t=uL.CONFIGURABLE,n=oL.get,r=oL.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;XF(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!VF(o,"name")||t&&o.name!==f)&&zB(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==OF?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:zB(e,n,o)):u?e[n]=o:IF(n,o)})(Function.prototype,"toString",function(){return XF(this)&&n(this).source||GB(this)})}),fL=jF({}.toString),dL=jF("".slice),hL=function(e){return dL(fL(e),8,-1)},pL=fB("toStringTag"),gL=OF.Object,vL="Arguments"==hL(function(){return arguments}()),mL=hB?hL:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=gL(e),pL))?n:vL?hL(t):"Object"==(r=hL(t))&&XF(t.callee)?"Arguments":r},yL=hB?{}.toString:function(){return"[object "+mL(this)+"]"};hB||cL(Object.prototype,"toString",yL,{unsafe:!0});var bL={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},wL=yB("span").classList,xL=wL&&wL.constructor&&wL.constructor.prototype,CL=xL===Object.prototype?void 0:xL,EL=jF(jF.bind),kL=function(e,t){return PB(e),void 0===t?e:EL?EL(e,t):function(){return e.apply(t,arguments)}},SL=OF.Object,_L=jF("".split),DL=iB(function(){return!SL("z").propertyIsEnumerable(0)})?function(e){return"String"==hL(e)?_L(e,""):SL(e)}:SL,AL=Math.ceil,TL=Math.floor,OL=function(e){var t=+e;return t!=t||0===t?0:(t>0?TL:AL)(t)},PL=Math.min,IL=function(e){return e>0?PL(OL(e),9007199254740991):0},FL=function(e){return IL(e.length)},BL=Array.isArray||function(e){return"Array"==hL(e)},LL=function(){},NL=[],ML=JF("Reflect","construct"),RL=/^\s*(?:class|function)\b/,jL=jF(RL.exec),HL=!RL.exec(LL),zL=function(e){if(!XF(e))return!1;try{return ML(LL,NL,e),!0}catch(t){return!1}},UL=!ML||iB(function(){var e;return zL(zL.call)||!zL(Object)||!zL(function(){e=!0})||e})?function(e){if(!XF(e))return!1;switch(mL(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return HL||!!jL(RL,GB(e))}:zL,$L=fB("species"),WL=OF.Array,VL=function(e,t){return new(BL(n=e)&&(r=n.constructor,(UL(r)&&(r===WL||BL(r.prototype))||gB(r)&&null===(r=r[$L]))&&(r=void 0)),void 0===r?WL:r)(0===t?0:t);var n,r},GL=jF([].push),qL=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=$F(l),g=DL(p),v=kL(u,c),m=FL(g),y=0,b=f||VL,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:GL(w,d)}else switch(e){case 4:return!1;case 7:GL(w,d)}return o?-1:r||i?i:w}},KL={forEach:qL(0),map:qL(1),filter:qL(2),find:qL(5),findIndex:qL(6)},YL=function(e,t){var n=[][e];return!!n&&iB(function(){n.call(null,t||function(){throw 1},1)})},XL=KL.forEach,JL=YL("forEach")?[].forEach:function(e){return XL(this,e,arguments.length>1?arguments[1]:void 0)},ZL=function(e){if(e&&e.forEach!==JL)try{zB(e,"forEach",JL)}catch(t){e.forEach=JL}};for(var QL in bL)bL[QL]&&ZL(OF[QL]&&OF[QL].prototype);ZL(CL);var eN={}.propertyIsEnumerable,tN=Object.getOwnPropertyDescriptor,nN=tN&&!eN.call({1:2},1)?function(e){var t=tN(this,e);return!!t&&t.enumerable}:eN,rN={f:nN},iN=function(e){return DL(zF(e))},oN=Object.getOwnPropertyDescriptor,aN={f:pB?oN:function(e,t){if(e=iN(e),t=NB(t),bB)try{return oN(e,t)}catch(n){}if(VF(e,t))return HB(!kB(rN.f,e,t),e[t])}},sN=Math.max,lN=Math.min,uN=function(e,t){var n=OL(e);return n<0?sN(n+t,0):lN(n,t)},cN=function(e){return function(t,n,r){var i,o=iN(t),a=FL(o),s=uN(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},fN={includes:cN(!0),indexOf:cN(!1)},dN=fN.indexOf,hN=jF([].push),pN=function(e,t){var n,r=iN(e),i=0,o=[];for(n in r)!VF(JB,n)&&VF(r,n)&&hN(o,n);for(;t.length>i;)VF(r,n=t[i++])&&(~dN(o,n)||hN(o,n));return o},gN=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vN=gN.concat("length","prototype"),mN={f:Object.getOwnPropertyNames||function(e){return pN(e,vN)}},yN={f:Object.getOwnPropertySymbols},bN=jF([].concat),wN=JF("Reflect","ownKeys")||function(e){var t=mN.f(CB(e)),n=yN.f;return n?bN(t,n(e)):t},xN=function(e,t){for(var n=wN(t),r=jB.f,i=aN.f,o=0;o<n.length;o++){var a=n[o];VF(e,a)||r(e,a,i(t,a))}},CN=/#|\.prototype\./,EN=function(e,t){var n=SN[kN(e)];return n==DN||n!=_N&&(XF(t)?iB(t):!!t)},kN=EN.normalize=function(e){return String(e).replace(CN,".").toLowerCase()},SN=EN.data={},_N=EN.NATIVE="N",DN=EN.POLYFILL="P",AN=EN,TN=aN.f,ON=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?OF:u?OF[s]||IF(s,{}):(OF[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=TN(n,r))&&a.value:n[r],!AN(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;xN(o,i)}(e.sham||i&&i.sham)&&zB(o,"sham",!0),cL(n,r,o,e)}},PN=Object.keys||function(e){return pN(e,gN)},IN=iB(function(){PN(1)});function FN(e){return"[object Object]"===Object.prototype.toString.call(e)}ON({target:"Object",stat:!0,forced:IN},{keys:function(e){return PN($F(e))}});var BN={isHistory(e){return!1!==FN(t=e)&&(void 0===(n=t.constructor)||!1!==FN(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||FS.isOperationList(e.redos[0]))&&(0===e.undos.length||FS.isOperationList(e.undos[0]));var t,n,r}},LN=new WeakMap,NN=new WeakMap,MN={isHistoryEditor:e=>BN.isHistory(e.history)&&SS.isEditor(e),isMerging:e=>NN.get(e),isSaving:e=>LN.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=MN.isMerging(e);NN.set(e,!1),t(),NN.set(e,n)},withoutSaving(e,t){var n=MN.isSaving(e);LN.set(e,!1),t(),LN.set(e,n)}},RN=OF.String,jN=function(e){if("Symbol"===mL(e))throw TypeError("Cannot convert a Symbol value to a string");return RN(e)},HN=function(){var e=CB(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},zN=uL.PROPER,UN=RegExp.prototype,$N=UN.toString,WN=jF(HN),VN=iB(function(){return"/a/b"!=$N.call({source:"a",flags:"b"})}),GN=zN&&"toString"!=$N.name;(VN||GN)&&cL(RegExp.prototype,"toString",function(){var e=CB(this),t=jN(e.source),n=e.flags;return"/"+t+"/"+jN(void 0===n&&SB(UN,e)&&!("flags"in UN)?WN(e):n)},{unsafe:!0});var qN,KN=pB?Object.defineProperties:function(e,t){CB(e);for(var n,r=iN(t),i=PN(t),o=i.length,a=0;o>a;)jB.f(e,n=i[a++],r[n]);return e},YN=JF("document","documentElement"),XN=XB("IE_PROTO"),JN=function(){},ZN=function(e){return"<script>"+e+"<\/script>"},QN=function(e){e.write(ZN("")),e.close();var t=e.parentWindow.Object;return e=null,t},eM=function(){try{qN=new ActiveXObject("htmlfile")}catch(r){}var e,t;eM="undefined"!=typeof document?document.domain&&qN?QN(qN):((t=yB("iframe")).style.display="none",YN.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(ZN("document.F=Object")),e.close(),e.F):QN(qN);for(var n=gN.length;n--;)delete eM.prototype[gN[n]];return eM()};JB[XN]=!0;var tM=Object.create||function(e,t){var n;return null!==e?(JN.prototype=CB(e),n=new JN,JN.prototype=null,n[XN]=e):n=eM(),void 0===t?n:KN(n,t)},nM=fB("unscopables"),rM=Array.prototype;null==rM[nM]&&jB.f(rM,nM,{configurable:!0,value:tM(null)});var iM=function(e){rM[nM][e]=!0},oM=fN.includes;ON({target:"Array",proto:!0},{includes:function(e){return oM(this,e,arguments.length>1?arguments[1]:void 0)}}),iM("includes");var aM=fB("match"),sM=function(e){var t;return gB(e)&&(void 0!==(t=e[aM])?!!t:"RegExp"==hL(e))},lM=OF.TypeError,uM=function(e){if(sM(e))throw lM("The method doesn't accept regular expressions");return e},cM=fB("match"),fM=function(e){var t=/./;try{"/./"[e](t)}catch(ZG){try{return t[cM]=!1,"/./"[e](t)}catch(n){}}return!1},dM=jF("".indexOf);ON({target:"String",proto:!0,forced:!fM("includes")},{includes:function(e){return!!~dM(jN(zF(this)),jN(uM(e)),arguments.length>1?arguments[1]:void 0)}});var hM=/"/g,pM=jF("".replace);ON({target:"String",proto:!0,forced:iB(function(){var e="".anchor('"');return e!==e.toLowerCase()||e.split('"').length>3})},{anchor:function(e){return t=e,n=jN(zF(this)),r="<a",(r+=' name="'+pM(jN(t),hM,"&quot;")+'"')+">"+n+"</a>";var t,n,r}});var gM=function(e,t,n){var r,i;CB(e);try{if(!(r=IB(e,"return"))){if("throw"===t)throw n;return n}r=kB(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return CB(r),n},vM=function(e,t,n,r){try{return r?t(CB(n)[0],n[1]):t(n)}catch(i){gM(e,"throw",i)}},mM={},yM=fB("iterator"),bM=Array.prototype,wM=function(e){return void 0!==e&&(mM.Array===e||bM[yM]===e)},xM=function(e,t,n){var r=NB(t);r in e?jB.f(e,r,HB(0,n)):e[r]=n},CM=fB("iterator"),EM=function(e){if(null!=e)return IB(e,CM)||IB(e,"@@iterator")||mM[mL(e)]},kM=OF.TypeError,SM=function(e,t){var n=arguments.length<2?EM(e):t;if(PB(n))return CB(kB(n,e));throw kM(TB(e)+" is not iterable")},_M=OF.Array,DM=fB("iterator"),AM=!1;try{var TM=0,OM={next:function(){return{done:!!TM++}},return:function(){AM=!0}};OM[DM]=function(){return this},Array.from(OM,function(){throw 2})}catch(ATe){}var PM=function(e,t){if(!AM)return!1;var n=!1;try{var r={};r[DM]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(i){}return n},IM=!PM(function(e){Array.from(e)});ON({target:"Array",stat:!0,forced:IM},{from:function(e){var t=$F(e),n=UL(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=kL(i,r>2?arguments[2]:void 0));var a,s,l,u,c,f,d=EM(t),h=0;if(!d||this==_M&&wM(d))for(a=FL(t),s=n?new this(a):_M(a);a>h;h++)f=o?i(t[h],h):t[h],xM(s,h,f);else for(c=(u=SM(t,d)).next,s=n?new this:[];!(l=kB(c,u)).done;h++)f=o?vM(u,i,[l.value,h],!0):l.value,xM(s,h,f);return s.length=h,s}});var FM,BM,LM,NM=jF("".charAt),MM=jF("".charCodeAt),RM=jF("".slice),jM={charAt:function(e,t){var n,r,i=jN(zF(e)),o=OL(t),a=i.length;return o<0||o>=a?"":(n=MM(i,o))<55296||n>56319||o+1===a||(r=MM(i,o+1))<56320||r>57343?NM(i,o):RM(i,o,o+2)}},HM=!iB(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),zM=XB("IE_PROTO"),UM=OF.Object,$M=UM.prototype,WM=HM?UM.getPrototypeOf:function(e){var t=$F(e);if(VF(t,zM))return t[zM];var n=t.constructor;return XF(n)&&t instanceof n?n.prototype:t instanceof UM?$M:null},VM=fB("iterator"),GM=!1;[].keys&&("next"in(LM=[].keys())?(BM=WM(WM(LM)))!==Object.prototype&&(FM=BM):GM=!0);var qM=null==FM||iB(function(){var e={};return FM[VM].call(e)!==e});qM&&(FM={}),XF(FM[VM])||cL(FM,VM,function(){return this});var KM={IteratorPrototype:FM,BUGGY_SAFARI_ITERATORS:GM},YM=jB.f,XM=fB("toStringTag"),JM=function(e,t,n){e&&!VF(e=n?e:e.prototype,XM)&&YM(e,XM,{configurable:!0,value:t})},ZM=KM.IteratorPrototype,QM=function(){return this},eR=OF.String,tR=OF.TypeError,nR=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=jF(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return CB(n),function(e){if("object"==typeof e||XF(e))return e;throw tR("Can't set "+eR(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),rR=uL.PROPER,iR=uL.CONFIGURABLE,oR=KM.IteratorPrototype,aR=KM.BUGGY_SAFARI_ITERATORS,sR=fB("iterator"),lR=function(){return this},uR=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=tM(ZM,{next:HB(1,l)}),JM(s,u,!1),mM[u]=QM;var c,f,d,h=function(e){if(e===i&&y)return y;if(!aR&&e in v)return v[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},p=t+" Iterator",g=!1,v=e.prototype,m=v[sR]||v["@@iterator"]||i&&v[i],y=!aR&&m||h(i),b="Array"==t&&v.entries||m;if(b&&(c=WM(b.call(new e)))!==Object.prototype&&c.next&&(WM(c)!==oR&&(nR?nR(c,oR):XF(c[sR])||cL(c,sR,lR)),JM(c,p,!0)),rR&&"values"==i&&m&&"values"!==m.name&&(iR?zB(v,"name","values"):(g=!0,y=function(){return kB(m,this)})),i)if(f={values:h("values"),keys:o?y:h("keys"),entries:h("entries")},a)for(d in f)(aR||g||!(d in v))&&cL(v,d,f[d]);else ON({target:t,proto:!0,forced:aR||g},f);return v[sR]!==y&&cL(v,sR,y,{name:i}),mM[t]=y,f},cR=jM.charAt,fR=oL.set,dR=oL.getterFor("String Iterator");uR(String,"String",function(e){fR(this,{type:"String Iterator",string:jN(e),index:0})},function(){var e,t=dR(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=cR(n,r),t.index+=e.length,{value:e,done:!1})});var hR,pR=aN.f,gR=jF("".endsWith),vR=jF("".slice),mR=Math.min,yR=fM("endsWith"),bR=!(yR||(hR=pR(String.prototype,"endsWith"),!hR||hR.writable));ON({target:"String",proto:!0,forced:!bR&&!yR},{endsWith:function(e){var t=jN(zF(this));uM(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,i=void 0===n?r:mR(IL(n),r),o=jN(e);return gR?gR(t,o,i):vR(t,i-o.length,i)===o}});var wR=jF([].join),xR=DL!=Object,CR=YL("join",",");ON({target:"Array",proto:!0,forced:xR||!CR},{join:function(e){return wR(iN(this),void 0===e?",":e)}});var ER=fB("species"),kR=function(e){return rB>=51||!iB(function(){var t=[];return(t.constructor={})[ER]=function(){return{foo:1}},1!==t[e](Boolean).foo})},SR=KL.map,_R=kR("map");ON({target:"Array",proto:!0,forced:!_R},{map:function(e){return SR(this,e,arguments.length>1?arguments[1]:void 0)}});var DR=OF.RegExp,AR=iB(function(){var e=DR("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),TR=AR||iB(function(){return!DR("a","y").sticky}),OR={BROKEN_CARET:AR||iB(function(){var e=DR("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),MISSED_STICKY:TR,UNSUPPORTED_Y:AR},PR=OF.RegExp,IR=iB(function(){var e=PR(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),FR=OF.RegExp,BR=iB(function(){var e=FR("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),LR=oL.get,NR=BF("native-string-replace",String.prototype.replace),MR=RegExp.prototype.exec,RR=MR,jR=jF("".charAt),HR=jF("".indexOf),zR=jF("".replace),UR=jF("".slice),$R=function(){var e=/a/,t=/b*/g;return kB(MR,e,"a"),kB(MR,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),WR=OR.BROKEN_CARET,VR=void 0!==/()??/.exec("")[1];($R||VR||WR||IR||BR)&&(RR=function(e){var t,n,r,i,o,a,s,l=this,u=LR(l),c=jN(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=kB(RR,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=WR&&l.sticky,p=kB(HN,l),g=l.source,v=0,m=c;if(h&&(p=zR(p,"y",""),-1===HR(p,"g")&&(p+="g"),m=UR(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==jR(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),VR&&(n=new RegExp("^"+g+"$(?!\\s)",p)),$R&&(r=l.lastIndex),i=kB(MR,h?n:l,m),h?i?(i.input=UR(i.input,v),i[0]=UR(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:$R&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),VR&&i&&i.length>1&&kB(NR,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=tM(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var GR=RR;ON({target:"RegExp",proto:!0,forced:/./.exec!==GR},{exec:GR});var qR=Function.prototype,KR=qR.apply,YR=qR.bind,XR=qR.call,JR="object"==typeof Reflect&&Reflect.apply||(YR?XR.bind(KR):function(){return XR.apply(KR,arguments)}),ZR=fB("species"),QR=RegExp.prototype,ej=function(e,t,n,r){var i=fB(e),o=!iB(function(){var t={};return t[i]=function(){return 7},7!=""[e](t)}),a=o&&!iB(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ZR]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});if(!o||!a||n){var s=jF(/./[i]),l=t(i,""[e],function(e,t,n,r,i){var a=jF(e),l=t.exec;return l===GR||l===QR.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}});cL(String.prototype,e,l[0]),cL(QR,i,l[1])}r&&zB(QR[i],"sham",!0)},tj=jM.charAt,nj=function(e,t,n){return t+(n?tj(e,t).length:1)},rj=Math.floor,ij=jF("".charAt),oj=jF("".replace),aj=jF("".slice),sj=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lj=/\$([$&'`]|\d{1,2})/g,uj=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=lj;return void 0!==i&&(i=$F(i),l=sj),oj(o,l,function(o,l){var u;switch(ij(l,0)){case"$":return"$";case"&":return e;case"`":return aj(t,0,n);case"'":return aj(t,a);case"<":u=i[aj(l,1,-1)];break;default:var c=+l;if(0===c)return o;if(c>s){var f=rj(c/10);return 0===f?o:f<=s?void 0===r[f-1]?ij(l,1):r[f-1]+ij(l,1):o}u=r[c-1]}return void 0===u?"":u})},cj=OF.TypeError,fj=function(e,t){var n=e.exec;if(XF(n)){var r=kB(n,e,t);return null!==r&&CB(r),r}if("RegExp"===hL(e))return kB(GR,e,t);throw cj("RegExp#exec called on incompatible receiver")},dj=fB("replace"),hj=Math.max,pj=Math.min,gj=jF([].concat),vj=jF([].push),mj=jF("".indexOf),yj=jF("".slice),bj="$0"==="a".replace(/./,"$0"),wj=!!/./[dj]&&""===/./[dj]("a","$0");ej("replace",function(e,t,n){var r=wj?"$":"$0";return[function(e,n){var r=zF(this),i=null==e?void 0:IB(e,dj);return i?kB(i,e,r,n):kB(t,jN(r),e,n)},function(e,i){var o=CB(this),a=jN(e);if("string"==typeof i&&-1===mj(i,r)&&-1===mj(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var l=XF(i);l||(i=jN(i));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var f=[];;){var d=fj(o,a);if(null===d)break;if(vj(f,d),!u)break;""===jN(d[0])&&(o.lastIndex=nj(a,IL(o.lastIndex),c))}for(var h,p="",g=0,v=0;v<f.length;v++){for(var m=jN((d=f[v])[0]),y=hj(pj(OL(d.index),a.length),0),b=[],w=1;w<d.length;w++)vj(b,void 0===(h=d[w])?h:String(h));var x=d.groups;if(l){var C=gj([m],b,y,a);void 0!==x&&vj(C,x);var E=jN(JR(i,void 0,C))}else E=uj(m,a,y,b,x,i);y>=g&&(p+=yj(a,g,y)+E,g=y+m.length)}return p+yj(a,g)}]},!!iB(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!bj||wj);var xj=function(e,t){return(xj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Cj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}xj(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ej=function(){return Ej=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ej.apply(this,arguments)};function kj(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Sj(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function _j(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var Dj=0,Aj=function(){this.id=""+Dj++},Tj=oL.set,Oj=oL.getterFor("Array Iterator"),Pj=uR(Array,"Array",function(e,t){Tj(this,{type:"Array Iterator",target:iN(e),index:0,kind:t})},function(){var e=Oj(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");mM.Arguments=mM.Array,iM("keys"),iM("values"),iM("entries");var Ij=function(e,t,n){for(var r in t)cL(e,r,t[r],n);return e},Fj=OF.Array,Bj=Math.max,Lj=function(e,t,n){for(var r=FL(e),i=uN(t,r),o=uN(void 0===n?r:n,r),a=Fj(Bj(o-i,0)),s=0;i<o;i++,s++)xM(a,s,e[i]);return a.length=s,a},Nj=mN.f,Mj="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Rj={f:function(e){return Mj&&"Window"==hL(e)?function(e){try{return Nj(e)}catch(t){return Lj(Mj)}}(e):Nj(iN(e))}},jj=iB(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Hj=Object.isExtensible,zj=iB(function(){Hj(1)})||jj?function(e){return!!gB(e)&&(!jj||"ArrayBuffer"!=hL(e))&&(!Hj||Hj(e))}:Hj,Uj=!iB(function(){return Object.isExtensible(Object.preventExtensions({}))}),$j=_F(function(e){var t=jB.f,n=!1,r=YF("meta"),i=0,o=function(e){t(e,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=mN.f,t=jF([].splice),i={};i[r]=1,e(i).length&&(mN.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===r){t(i,o,1);break}return i},ON({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Rj.f}))},fastKey:function(e,t){if(!gB(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!VF(e,r)){if(!zj(e))return"F";if(!t)return"E";o(e)}return e[r].objectID},getWeakData:function(e,t){if(!VF(e,r)){if(!zj(e))return!0;if(!t)return!1;o(e)}return e[r].weakData},onFreeze:function(e){return Uj&&n&&zj(e)&&!VF(e,r)&&o(e),e}};JB[r]=!0}),Wj=OF.TypeError,Vj=function(e,t){this.stopped=e,this.result=t},Gj=Vj.prototype,qj=function(e,t,n){var r,i,o,a,s,l,u,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),p=kL(t,c),g=function(e){return r&&gM(r,"normal",e),new Vj(!0,e)},v=function(e){return f?(CB(e),h?p(e[0],e[1],g):p(e[0],e[1])):h?p(e,g):p(e)};if(d)r=e;else{if(!(i=EM(e)))throw Wj(TB(e)+" is not iterable");if(wM(i)){for(o=0,a=FL(e);a>o;o++)if((s=v(e[o]))&&SB(Gj,s))return s;return new Vj(!1)}r=SM(e,i)}for(l=r.next;!(u=kB(l,r)).done;){try{s=v(u.value)}catch(m){gM(r,"throw",m)}if("object"==typeof s&&s&&SB(Gj,s))return s}return new Vj(!1)},Kj=OF.TypeError,Yj=function(e,t){if(SB(t,e))return e;throw Kj("Incorrect invocation")},Xj=function(e,t,n){var r,i;return nR&&XF(r=t.constructor)&&r!==n&&gB(i=r.prototype)&&i!==n.prototype&&nR(e,i),e},Jj=function(e,t,n){var r=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),o=r?"set":"add",a=OF[e],s=a&&a.prototype,l=a,u={},c=function(e){var t=jF(s[e]);cL(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!gB(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!gB(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!gB(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(AN(e,!XF(a)||!(i||s.forEach&&!iB(function(){(new a).entries().next()}))))l=n.getConstructor(t,e,r,o),$j.enable();else if(AN(e,!0)){var f=new l,d=f[o](i?{}:-0,1)!=f,h=iB(function(){f.has(1)}),p=PM(function(e){new a(e)}),g=!i&&iB(function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)});p||((l=t(function(e,t){Yj(e,s);var n=Xj(new a,e,l);return null!=t&&qj(t,n[o],{that:n,AS_ENTRIES:r}),n})).prototype=s,s.constructor=l),(h||g)&&(c("delete"),c("has"),r&&c("get")),(g||d)&&c(o),i&&s.clear&&delete s.clear}return u[e]=l,ON({global:!0,forced:l!=a},u),JM(l,e),i||n.setStrong(l,e,r),l},Zj=$j.getWeakData,Qj=oL.set,eH=oL.getterFor,tH=KL.find,nH=KL.findIndex,rH=jF([].splice),iH=0,oH=function(e){return e.frozen||(e.frozen=new aH)},aH=function(){this.entries=[]},sH=function(e,t){return tH(e.entries,function(e){return e[0]===t})};aH.prototype={get:function(e){var t=sH(this,e);if(t)return t[1]},has:function(e){return!!sH(this,e)},set:function(e,t){var n=sH(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=nH(this.entries,function(t){return t[0]===e});return~t&&rH(this.entries,t,1),!!~t}};var lH,uH={getConstructor:function(e,t,n,r){var i=e(function(e,i){Yj(e,o),Qj(e,{type:t,id:iH++,frozen:void 0}),null!=i&&qj(i,e[r],{that:e,AS_ENTRIES:n})}),o=i.prototype,a=eH(t),s=function(e,t,n){var r=a(e),i=Zj(CB(t),!0);return!0===i?oH(r).set(t,n):i[r.id]=n,e};return Ij(o,{delete:function(e){var t=a(this);if(!gB(e))return!1;var n=Zj(e);return!0===n?oH(t).delete(e):n&&VF(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!gB(e))return!1;var n=Zj(e);return!0===n?oH(t).has(e):n&&VF(n,t.id)}}),Ij(o,n?{get:function(e){var t=a(this);if(gB(e)){var n=Zj(e);return!0===n?oH(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},cH=oL.enforce,fH=!OF.ActiveXObject&&"ActiveXObject"in OF,dH=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},hH=Jj("WeakMap",dH,uH);if(KB&&fH){lH=uH.getConstructor(dH,"WeakMap",!0),$j.enable();var pH=hH.prototype,gH=jF(pH.delete),vH=jF(pH.has),mH=jF(pH.get),yH=jF(pH.set);Ij(pH,{delete:function(e){if(gB(e)&&!zj(e)){var t=cH(this);return t.frozen||(t.frozen=new lH),gH(this,e)||t.frozen.delete(e)}return gH(this,e)},has:function(e){if(gB(e)&&!zj(e)){var t=cH(this);return t.frozen||(t.frozen=new lH),vH(this,e)||t.frozen.has(e)}return vH(this,e)},get:function(e){if(gB(e)&&!zj(e)){var t=cH(this);return t.frozen||(t.frozen=new lH),vH(this,e)?mH(this,e):t.frozen.get(e)}return mH(this,e)},set:function(e,t){if(gB(e)&&!zj(e)){var n=cH(this);n.frozen||(n.frozen=new lH),vH(this,e)?yH(this,e,t):n.frozen.set(e,t)}else yH(this,e,t);return this}})}var bH=fB("iterator"),wH=fB("toStringTag"),xH=Pj.values,CH=function(e,t){if(e){if(e[bH]!==xH)try{zB(e,bH,xH)}catch(r){e[bH]=xH}if(e[wH]||zB(e,wH,t),bL[t])for(var n in Pj)if(e[n]!==Pj[n])try{zB(e,n,Pj[n])}catch(r){e[n]=Pj[n]}}};for(var EH in bL)CH(OF[EH]&&OF[EH].prototype,EH);CH(CL,"DOMTokenList");var kH=new WeakMap,SH=new WeakMap,_H=new WeakMap,DH=new WeakMap,AH=new WeakMap,TH=new WeakMap,OH=new WeakMap,PH=new WeakMap,IH=new WeakMap,FH=new WeakMap,BH=new WeakMap,LH=new WeakMap,NH=new WeakMap,MH=new WeakMap,RH=new WeakMap,jH=new WeakMap,HH=new WeakMap,zH=new WeakMap,UH=new WeakMap,$H=new WeakMap,WH=new WeakMap,VH=new WeakMap,GH=new WeakMap,qH=new WeakMap,KH=new WeakMap,YH=KL.find,XH=!0;"find"in[]&&Array(1).find(function(){XH=!1}),ON({target:"Array",proto:!0,forced:XH},{find:function(e){return YH(this,e,arguments.length>1?arguments[1]:void 0)}}),iM("find"),ON({global:!0},{globalThis:OF});const JH=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];UD&&(DD.fn.css=UD),KD&&(DD.fn.append=KD),AD&&(DD.fn.addClass=AD),TD&&(DD.fn.removeClass=TD),OD&&(DD.fn.hasClass=OD),LD&&(DD.fn.on=LD),oA&&(DD.fn.focus=oA),PD&&(DD.fn.attr=PD),ID&&(DD.fn.removeAttr=ID),HD&&(DD.fn.hide=HD),zD&&(DD.fn.show=zD),jD&&(DD.fn.offset=jD),MD&&(DD.fn.width=MD),RD&&(DD.fn.height=RD),XD&&(DD.fn.parent=XD),JD&&(DD.fn.parents=JD),qD&&(DD.fn.is=qD),FD&&(DD.fn.dataset=FD),BD&&(DD.fn.val=BD),GD&&(DD.fn.text=GD),VD&&(DD.fn.html=VD),QD&&(DD.fn.children=QD),eA&&(DD.fn.remove=eA),ZD&&(DD.fn.find=ZD),$D&&(DD.fn.each=$D),tA&&(DD.fn.empty=tA);var ZH,QH,ez=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},tz=function(e){return nz(e)&&1===e.nodeType},nz=function(e){var t=ez(e);return!!t&&e instanceof t.Node},rz=function(e){var t=e&&e.anchorNode&&ez(e.anchorNode);return!!t&&e instanceof t.Selection},iz=function(e){return nz(e)&&3===e.nodeType},oz=function(e){var t,n,r;return null!==(t=window.document.getElementById(e))&&void 0!==t?t:(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},az=function(e,t,n){for(var r,i=e.childNodes,o=i[t],a=t,s=!1,l=!1;(nz(r=o)&&8===r.nodeType||tz(o)&&0===o.childNodes.length||tz(o)&&"false"===o.getAttribute("contenteditable"))&&(!s||!l);)a>=i.length?(s=!0,a=t-1,n="backward"):a<0?(l=!0,a=t+1,n="forward"):(o=i[a],t=a,a+="forward"===n?1:-1);return[o,t]},sz=function(e,t,n){return Sj(az(e,t,n),1)[0]},lz=function e(t){var n,r,i="";if(iz(t)&&t.nodeValue)return t.nodeValue;if(tz(t)){try{for(var o=kj(Array.from(t.childNodes)),a=o.next();!a.done;a=o.next())i+=e(a.value)}catch(pp){n={error:pp}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}var s=getComputedStyle(t).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==t.tagName||(i+="\n")}return i};function uz(e,t){if(!(e instanceof HTMLElement&&"true"===e.dataset.slateVoid))for(var n=e.childNodes,r=n.length;r--;){var i=n[r],o=i.nodeType;3==o?t(i,e):1!=o&&9!=o&&11!=o||uz(i,t)}}function cz(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==ZH.ELEMENT_NODE?"":t.tagName.toLowerCase()}(QH=ZH||(ZH={}))[QH.ELEMENT_NODE=1]="ELEMENT_NODE",QH[QH.TEXT_NODE=3]="TEXT_NODE",QH[QH.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",QH[QH.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",QH[QH.COMMENT_NODE=8]="COMMENT_NODE",QH[QH.DOCUMENT_NODE=9]="DOCUMENT_NODE",QH[QH.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",QH[QH.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var fz="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),dz="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),hz="undefined"!=typeof navigator&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),pz="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),gz="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),vz="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),mz=!gz&&!pz&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,yz={getWindow:function(e){var t=WH.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=$H.get(t);return n||(n=new Aj,$H.set(t,n)),n},setNewKey:function(e){var t=new Aj;$H.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var i=RH.get(r);if(null==i){if(SS.isEditor(r))return n;break}var o=MH.get(r);if(null==o)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=yz.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&null!=n.getSelection?n:t.ownerDocument},getParentNode:function(e,t){return RH.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var i=yz.getParentNode(e,r);if(null==i)break;n.push(i),r=i}return n},getTopNode:function(e,t){var n=[yz.findPath(e,t)[0]];return OS.get(e,n)},toDOMNode:function(e,t){var n;if(SS.isEditor(t))n=jH.get(e);else{var r=yz.findKey(e,t);n=zH.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,i=n.editable,o=void 0!==i&&i,a=yz.toDOMNode(e,e);try{r=tz(t)?t:t.parentElement}catch(s){if(!s.message.includes('Permission denied to access property "nodeType"'))throw s}return!!r&&r.closest("[data-slate-editor]")===a&&(!o||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=US.isBackward(t),o=yz.toDOMPoint(e,n),a=US.isCollapsed(t)?o:yz.toDOMPoint(e,r),s=yz.getWindow(e).document.createRange(),l=Sj(i?a:o,2),u=l[0],c=l[1],f=Sj(i?o:a,2),d=f[0],h=f[1],p=!!(tz(u)?u:u.parentElement).getAttribute("data-slate-zero-width"),g=!!(tz(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return s.setStart(u,p?1:c),s.setEnd(d,g?1:h),s},toDOMPoint:function(e,t){var n,r,i,o=Sj(SS.node(e,t.path),1)[0],a=yz.toDOMNode(e,o);SS.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),l=0;try{for(var u=kj(s),c=u.next();!c.done;c=u.next()){var f=c.value,d=f.childNodes[0];if(null!=d&&null!=d.textContent){var h=d.textContent.length,p=f.getAttribute("data-slate-length"),g=l+(null==p?h:parseInt(p,10));if(t.offset<=g){i=[d,Math.min(h,Math.max(0,t.offset-l))];break}l=g}}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(t));return i},toSlateNode:function(e,t){var n=tz(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?HH.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: "+n);return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,i=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);var o,a=yz.toSlateNode(e,t.target),s=yz.findPath(e,a);if(SS.isVoid(e,a)){var l=i.getBoundingClientRect(),u=e.isInline(a)?n-l.left<l.left+l.width-n:r-l.top<l.top+l.height-r,c=SS.point(e,s,{edge:u?"start":"end"}),f=u?SS.before(e,c):SS.after(e,c);if(f)return SS.range(e,f)}var d=this.getWindow(e).document;if(d.caretRangeFromPoint)o=d.caretRangeFromPoint(n,r);else{var h=d.caretPositionFromPoint(n,r);h&&((o=d.createRange()).setStart(h.offsetNode,h.offset),o.setEnd(h.offsetNode,h.offset))}if(!o)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);return yz.toSlateRange(e,o,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,i,o,a,s,l=n.exactMatch,u=n.suppressThrow;if((rz(t)?t.anchorNode:t.startContainer)&&(rz(t)?(r=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,s=vz&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==o||null==i||null==a)throw new Error("Cannot resolve a Slate range from DOM range: "+t);var c=yz.toSlatePoint(e,[r,i],{exactMatch:l,suppressThrow:u});if(!c)return null;var f=s?c:yz.toSlatePoint(e,[o,a],{exactMatch:l,suppressThrow:u});if(!f)return null;var d={anchor:c,focus:f};return US.isExpanded(d)&&US.isForward(d)&&tz(o)&&SS.void(e,{at:d.focus,mode:"highest"})&&(d=SS.unhangRange(e,d,{voids:!0})),d},toSlatePoint:function(e,t,n){var r,i=n.exactMatch,o=n.suppressThrow,a=Sj(i?t:function(e){var t,n=Sj(e,2),r=n[0],i=n[1];if(tz(r)&&r.childNodes.length){var o=i===r.childNodes.length,a=o?i-1:i;for(r=(t=Sj(az(r,a,o?"backward":"forward"),2))[0],o=(a=t[1])<i;tz(r)&&r.childNodes.length;){var s=o?r.childNodes.length-1:0;r=sz(r,s,o?"backward":"forward")}i=o&&null!=r.textContent?r.textContent.length:0}return[r,i]}(t),2),s=a[0],l=a[1],u=s.parentNode,c=null,f=0;if(u){var d=u.closest('[data-slate-void="true"]'),h=u.closest("[data-slate-leaf]"),p=null;if(h){c=h.closest('[data-slate-node="text"]');var g=yz.getWindow(e).document.createRange();g.setStart(c,0),g.setEnd(s,l);var v=g.cloneContents();_j(_j([],Sj(hD(v.querySelectorAll("[data-slate-zero-width]")))),Sj(hD(v.querySelectorAll("[contenteditable=false]")))).forEach(function(e){e.parentNode.removeChild(e)}),f=v.textContent.length,p=c}else d&&((h=d.querySelector("[data-slate-leaf]"))?(c=h.closest('[data-slate-node="text"]'),f=(p=h).textContent.length,p.querySelectorAll("[data-slate-zero-width]").forEach(function(e){f-=e.textContent.length})):f=1);p&&f===p.textContent.length&&(u.hasAttribute("data-slate-zero-width")||dz&&(null===(r=p.textContent)||void 0===r?void 0:r.endsWith("\n")))&&f--}if(!c){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var m=yz.toSlateNode(e,c);return{path:yz.findPath(e,m),offset:f}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return SS.hasPath(e,n.path)&&SS.hasPath(e,r.path)},getNodeType:function(e){return bS.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return OS.string(e)}).join("")},getSelectedElems:function(e){var t,n,r=[],i=SS.nodes(e,{universal:!0});try{for(var o=kj(i),a=o.next();!a.done;a=o.next()){var s=Sj(a.value,1)[0];bS.isElement(s)&&r.push(s)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Sj(SS.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1)[0];return null==r?null:r[0]},getSelectedTextNode:function(e){var t=Sj(SS.nodes(e,{match:function(e){return YS.isText(e)},universal:!0}),1)[0];return null==t?null:t[0]},isNodeSelected:function(e,t){var n=Sj(SS.nodes(e,{match:function(e){return e===t},universal:!0}),1)[0];return null!=n&&Sj(n,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(SS.isEnd(e,n.anchor,t)||SS.isEnd(e,n.focus,t))},getTextarea:function(e){var t=kH.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return DH.get(e)||null},getHoverbar:function(e){return TH.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var i=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return i<=0&&r&&r(e),i},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,i,o=yz.getTextarea(e).$textArea,a=null==o?void 0:o[0].childNodes;if(a)try{for(var s=kj(Array.from(a)),l=s.next();!l.done;l=s.next()){var u=l.value;if(3!==u.nodeType)break;u.remove()}}catch(g){t={error:g}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=SS.nodes(e,{match:function(t){return!(!bS.isElement(t)||e.isInline(t))},universal:!0});try{for(var f=kj(c),d=f.next();!d.done;d=f.next()){var h=d.value;if(null!=h){var p=h[0];uz(yz.toDOMNode(e,p),function(e,t){var n=DD(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(g){r={error:g}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=SS.nodes(e,{match:function(t){return e.isVoid(t)}}),i=0;try{for(var o=kj(r),a=o.next();!a.done;a=o.next())a.value,i++}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(US.isExpanded(t))return!1;var n=yz.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=SS.node(e,t);if(null==n)return!1;var r=Sj(n,1)[0].children;return 1===r.length&&""===r[0].text}},bz=1,wz={},xz={},Cz=KL.filter,Ez=kR("filter");ON({target:"Array",proto:!0,forced:!Ez},{filter:function(e){return Cz(this,e,arguments.length>1?arguments[1]:void 0)}});var kz="\t\n\v\f\r                 \u2028\u2029\ufeff",Sz=jF("".replace),_z="["+kz+"]",Dz=RegExp("^"+_z+_z+"*"),Az=RegExp(_z+_z+"*$"),Tz={trim:function(e){var t=jN(zF(e));return t=Sz(t,Dz,""),t=Sz(t,Az,"")}},Oz=uL.PROPER,Pz=Tz.trim;ON({target:"String",proto:!0,forced:function(e){return iB(function(){return!!kz[e]()||"​…᠎"!=="​…᠎"[e]()||Oz&&kz[e].name!==e})}("trim")},{trim:function(){return Pz(this)}});var Iz=[],Fz={};function Bz(e,t,n){var r=n.isInline(e)?"span":"div";return"<"+r+">"+t+"</"+r+">"}var Lz,Nz,Mz,Rz,jz=OF.Promise,Hz=fB("species"),zz=function(e){var t=JF(e),n=jB.f;pB&&t&&!t[Hz]&&n(t,Hz,{configurable:!0,get:function(){return this}})},Uz=OF.TypeError,$z=fB("species"),Wz=function(e,t){var n,r=CB(e).constructor;return void 0===r||null==(n=CB(r)[$z])?t:function(e){if(UL(e))return e;throw Uz(TB(e)+" is not a constructor")}(n)},Vz=jF([].slice),Gz=/(?:ipad|iphone|ipod).*applewebkit/i.test(ZF),qz="process"==hL(OF.process),Kz=OF.setImmediate,Yz=OF.clearImmediate,Xz=OF.process,Jz=OF.Dispatch,Zz=OF.Function,Qz=OF.MessageChannel,eU=OF.String,tU=0,nU={};try{Lz=OF.location}catch(ATe){}var rU=function(e){if(VF(nU,e)){var t=nU[e];delete nU[e],t()}},iU=function(e){return function(){rU(e)}},oU=function(e){rU(e.data)},aU=function(e){OF.postMessage(eU(e),Lz.protocol+"//"+Lz.host)};Kz&&Yz||(Kz=function(e){var t=Vz(arguments,1);return nU[++tU]=function(){JR(XF(e)?e:Zz(e),void 0,t)},Nz(tU),tU},Yz=function(e){delete nU[e]},qz?Nz=function(e){Xz.nextTick(iU(e))}:Jz&&Jz.now?Nz=function(e){Jz.now(iU(e))}:Qz&&!Gz?(Rz=(Mz=new Qz).port2,Mz.port1.onmessage=oU,Nz=kL(Rz.postMessage,Rz)):OF.addEventListener&&XF(OF.postMessage)&&!OF.importScripts&&Lz&&"file:"!==Lz.protocol&&!iB(aU)?(Nz=aU,OF.addEventListener("message",oU,!1)):Nz="onreadystatechange"in yB("script")?function(e){YN.appendChild(yB("script")).onreadystatechange=function(){YN.removeChild(this),rU(e)}}:function(e){setTimeout(iU(e),0)});var sU,lU,uU,cU,fU,dU,hU,pU,gU={set:Kz},vU=/ipad|iphone|ipod/i.test(ZF)&&void 0!==OF.Pebble,mU=/web0s(?!.*chrome)/i.test(ZF),yU=aN.f,bU=gU.set,wU=OF.MutationObserver||OF.WebKitMutationObserver,xU=OF.document,CU=OF.process,EU=OF.Promise,kU=yU(OF,"queueMicrotask"),SU=kU&&kU.value;SU||(sU=function(){var e,t;for(qz&&(e=CU.domain)&&e.exit();lU;){t=lU.fn,lU=lU.next;try{t()}catch(n){throw lU?cU():uU=void 0,n}}uU=void 0,e&&e.enter()},Gz||qz||mU||!wU||!xU?!vU&&EU&&EU.resolve?((hU=EU.resolve(void 0)).constructor=EU,pU=kL(hU.then,hU),cU=function(){pU(sU)}):qz?cU=function(){CU.nextTick(sU)}:(bU=kL(bU,OF),cU=function(){bU(sU)}):(fU=!0,dU=xU.createTextNode(""),new wU(sU).observe(dU,{characterData:!0}),cU=function(){dU.data=fU=!fU}));var _U,DU,AU,TU,OU=SU||function(e){var t={fn:e,next:void 0};uU&&(uU.next=t),lU||(lU=t,cU()),uU=t},PU=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=PB(t),this.reject=PB(n)},IU={f:function(e){return new PU(e)}},FU=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},BU="object"==typeof window,LU=gU.set,NU=fB("species"),MU="Promise",RU=oL.getterFor(MU),jU=oL.set,HU=oL.getterFor(MU),zU=jz&&jz.prototype,UU=jz,$U=zU,WU=OF.TypeError,VU=OF.document,GU=OF.process,qU=IU.f,KU=qU,YU=!!(VU&&VU.createEvent&&OF.dispatchEvent),XU=XF(OF.PromiseRejectionEvent),JU=!1,ZU=AN(MU,function(){var e=GB(UU),t=e!==String(UU);if(!t&&66===rB)return!0;if(rB>=51&&/native code/.test(e))return!1;var n=new UU(function(e){e(1)}),r=function(e){e(function(){},function(){})};return(n.constructor={})[NU]=r,!(JU=n.then(function(){})instanceof r)||!t&&BU&&!XU}),QU=ZU||!PM(function(e){UU.all(e).catch(function(){})}),e$=function(e){var t;return!(!gB(e)||!XF(t=e.then))&&t},t$=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;OU(function(){for(var r=e.value,i=1==e.state,o=0;n.length>o;){var a,s,l,u=n[o++],c=i?u.ok:u.fail,f=u.resolve,d=u.reject,h=u.domain;try{c?(i||(2===e.rejection&&o$(e),e.rejection=1),!0===c?a=r:(h&&h.enter(),a=c(r),h&&(h.exit(),l=!0)),a===u.promise?d(WU("Promise-chain cycle")):(s=e$(a))?kB(s,a,f,d):f(a)):d(r)}catch(p){h&&!l&&h.exit(),d(p)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&r$(e)})}},n$=function(e,t,n){var r,i;YU?((r=VU.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),OF.dispatchEvent(r)):r={promise:t,reason:n},!XU&&(i=OF["on"+e])?i(r):"unhandledrejection"===e&&function(e,t){var n=OF.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},r$=function(e){kB(LU,OF,function(){var t,n=e.facade,r=e.value;if(i$(e)&&(t=FU(function(){qz?GU.emit("unhandledRejection",r,n):n$("unhandledrejection",n,r)}),e.rejection=qz||i$(e)?2:1,t.error))throw t.value})},i$=function(e){return 1!==e.rejection&&!e.parent},o$=function(e){kB(LU,OF,function(){var t=e.facade;qz?GU.emit("rejectionHandled",t):n$("rejectionhandled",t,e.value)})},a$=function(e,t,n){return function(r){e(t,r,n)}},s$=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,t$(e,!0))},l$=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw WU("Promise can't be resolved itself");var r=e$(t);r?OU(function(){var n={done:!1};try{kB(r,t,a$(l$,n,e),a$(s$,n,e))}catch(i){s$(n,i,e)}}):(e.value=t,e.state=1,t$(e,!1))}catch(i){s$({done:!1},i,e)}}};if(ZU&&($U=(UU=function(e){Yj(this,$U),PB(e),kB(_U,this);var t=RU(this);try{e(a$(l$,t),a$(s$,t))}catch(n){s$(t,n)}}).prototype,(_U=function(e){jU(this,{type:MU,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ij($U,{then:function(e,t){var n=HU(this),r=n.reactions,i=qU(Wz(this,UU));return i.ok=!XF(e)||e,i.fail=XF(t)&&t,i.domain=qz?GU.domain:void 0,n.parent=!0,r[r.length]=i,0!=n.state&&t$(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),DU=function(){var e=new _U,t=RU(e);this.promise=e,this.resolve=a$(l$,t),this.reject=a$(s$,t)},IU.f=qU=function(e){return e===UU||e===AU?new DU(e):KU(e)},XF(jz)&&zU!==Object.prototype)){TU=zU.then,JU||(cL(zU,"then",function(e,t){var n=this;return new UU(function(e,t){kB(TU,n,e,t)}).then(e,t)},{unsafe:!0}),cL(zU,"catch",$U.catch,{unsafe:!0}));try{delete zU.constructor}catch(ATe){}nR&&nR(zU,$U)}ON({global:!0,wrap:!0,forced:ZU},{Promise:UU}),JM(UU,MU,!1),zz(MU),AU=JF(MU),ON({target:MU,stat:!0,forced:ZU},{reject:function(e){var t=qU(this);return kB(t.reject,void 0,e),t.promise}}),ON({target:MU,stat:!0,forced:ZU},{resolve:function(e){return function(e,t){if(CB(e),gB(t)&&t.constructor===e)return t;var n=IU.f(e);return(0,n.resolve)(t),n.promise}(this,e)}}),ON({target:MU,stat:!0,forced:QU},{all:function(e){var t=this,n=qU(t),r=n.resolve,i=n.reject,o=FU(function(){var n=PB(t.resolve),o=[],a=0,s=1;qj(e,function(e){var l=a++,u=!1;s++,kB(n,t,e).then(function(e){u||(u=!0,o[l]=e,--s||r(o))},i)}),--s||r(o)});return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=qU(t),r=n.reject,i=FU(function(){var i=PB(t.resolve);qj(e,function(e){kB(i,t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var u$=OR.UNSUPPORTED_Y,c$=Math.min,f$=[].push,d$=jF(/./.exec),h$=jF(f$),p$=jF("".slice);function g$(e){Promise.resolve().then(e)}function v$(e,t){return bS.isElement(e)?function(e,t){var n=e.type,r=void 0===n?"":n,i=e.children,o=void 0===i?[]:i,a=SS.isVoid(t,e),s="";a||(s=o.map(function(e){return v$(e,t)}).join(""));var l=(Fz[r]||Bz)(e,s,t),u="";if(u="string"==typeof l?l:l.html||"",a||Iz.forEach(function(t){return u=t(e,u)}),"string"==typeof l)return u;var c=l.prefix,f=void 0===c?"":c,d=l.suffix,h=void 0===d?"":d;return f&&(u=f+u),h&&(u+=h),u}(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text "+JSON.stringify(e));var r=n;r=r.replace(/ {2}/g," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;");var i=yz.getParentsNodes(t,e).some(function(e){return"pre"===yz.getNodeType(e)});if(i||(r=r.replace(/\r\n|\r|\n/g,"<br>")),i&&(r=r.replace(/&nbsp;/g," ")),""===r){var o=yz.getParentNode(null,e);if(!o||0!==o.children.length)return r;r="<br>"}return Iz.forEach(function(t){return r=t(e,r)}),r}(e,t)}function m$(e){return"w-e-element-"+e}ej("split",function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=jN(zF(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!sM(e))return kB(t,r,e,i);for(var o,a,s,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,f=new RegExp(e.source,u+"g");(o=kB(GR,f,r))&&!((a=f.lastIndex)>c&&(h$(l,p$(r,c,o.index)),o.length>1&&o.index<r.length&&JR(f$,l,Lj(o,1)),s=o[0].length,c=a,l.length>=i));)f.lastIndex===o.index&&f.lastIndex++;return c===r.length?!s&&d$(f,"")||h$(l,""):h$(l,p$(r,c)),l.length>i?Lj(l,0,i):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:kB(t,this,e,n)}:t,[function(t,n){var i=zF(this),o=null==t?void 0:IB(t,e);return o?kB(o,t,i,n):kB(r,jN(i),t,n)},function(e,i){var o=CB(this),a=jN(e),s=n(r,o,a,i,r!==t);if(s.done)return s.value;var l=Wz(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(u$?"g":"y"),f=new l(u$?"^(?:"+o.source+")":o,c),d=void 0===i?4294967295:i>>>0;if(0===d)return[];if(0===a.length)return null===fj(f,a)?[a]:[];for(var h=0,p=0,g=[];p<a.length;){f.lastIndex=u$?0:p;var v,m=fj(f,u$?p$(a,p):a);if(null===m||(v=c$(IL(f.lastIndex+(u$?p:0)),a.length))===h)p=nj(a,p,u);else{if(h$(g,p$(a,h,p)),g.length===d)return g;for(var y=1;y<=m.length-1;y++)if(h$(g,m[y]),g.length===d)return g;p=h=v}}return h$(g,p$(a,h)),g}]},!!iB(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),u$);var y$=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},b$=function(e,t,n){var r=yz.toDOMRange(e,t).getBoundingClientRect(),i=yz.toDOMRange(e,n).getBoundingClientRect();return y$(r,i)&&y$(i,r)},w$=["span","b","strong","i","em","s","strike","u","font","sub","sup"],x$=[],C$=[],E$={},k$=jB.f,S$=mN.f,_$=oL.enforce,D$=fB("match"),A$=OF.RegExp,T$=A$.prototype,O$=OF.SyntaxError,P$=jF(HN),I$=jF(T$.exec),F$=jF("".charAt),B$=jF("".replace),L$=jF("".indexOf),N$=jF("".slice),M$=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,R$=/a/g,j$=/a/g,H$=new A$(R$)!==R$,z$=OR.MISSED_STICKY,U$=OR.UNSUPPORTED_Y,$$=pB&&(!H$||z$||IR||BR||iB(function(){return j$[D$]=!1,A$(R$)!=R$||A$(j$)==j$||"/a/i"!=A$(R$,"i")}));if(AN("RegExp",$$)){for(var W$=function(e,t){var n,r,i,o,a,s,l=SB(T$,this),u=sM(e),c=void 0===t,f=[],d=e;if(!l&&u&&c&&e.constructor===W$)return e;if((u||SB(T$,e))&&(e=e.source,c&&(t="flags"in d?d.flags:P$(d))),e=void 0===e?"":jN(e),t=void 0===t?"":jN(t),d=e,IR&&"dotAll"in R$&&(r=!!t&&L$(t,"s")>-1)&&(t=B$(t,/s/g,"")),n=t,z$&&"sticky"in R$&&(i=!!t&&L$(t,"y")>-1)&&U$&&(t=B$(t,/y/g,"")),BR&&(e=(o=function(e){for(var t,n=e.length,r=0,i="",o=[],a={},s=!1,l=!1,u=0,c="";r<=n;r++){if("\\"===(t=F$(e,r)))t+=F$(e,++r);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:I$(M$,N$(e,r+1))&&(r+=2,l=!0),i+=t,u++;continue;case">"===t&&l:if(""===c||VF(a,c))throw new O$("Invalid capture group name");a[c]=!0,o[o.length]=[c,u],l=!1,c="";continue}l?c+=t:i+=t}return[i,o]}(e))[0],f=o[1]),a=Xj(A$(e,t),l?this:T$,W$),(r||i||f.length)&&(s=_$(a),r&&(s.dotAll=!0,s.raw=W$(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<=n;r++)"\\"!==(t=F$(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+F$(e,++r);return i}(e),n)),i&&(s.sticky=!0),f.length&&(s.groups=f)),e!==d)try{zB(a,"source",""===d?"(?:)":d)}catch(h){}return a},V$=function(e){e in W$||k$(W$,e,{configurable:!0,get:function(){return A$[e]},set:function(t){A$[e]=t}})},G$=S$(A$),q$=0;G$.length>q$;)V$(G$[q$++]);T$.constructor=W$,W$.prototype=T$,cL(OF,"RegExp",W$)}zz("RegExp");var K$=new RegExp(String.fromCharCode(160),"g");function Y$(e){return e.replace(K$," ")}function X$(e,t){var n=e.length;if(n){var r=e[n-1];if(YS.isText(r)){var i=Object.keys(r);if(1===i.length&&"text"===i[0])return r.text=r.text+t,!0}}return!1}function J$(e,t,n){return{type:"paragraph",children:[{text:DD(e).text().replace(/\s+/gm," ")}]}}function Z$(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(e){if(e.nodeType!==ZH.ELEMENT_NODE)if(e.nodeType!==ZH.TEXT_NODE);else{var r=e.textContent||"";if(""===r.trim()&&r.indexOf("\n")>=0)return;r&&(r=Y$(r),X$(n,r)||n.push({text:r}))}else{if("BR"===e.nodeName)return void(X$(n,"\n")||n.push({text:"\n"}));var i=eW(DD(e),t);Array.isArray(i)?i.forEach(function(e){return n.push(e)}):n.push(i)}}),n)}(e,t),r=function(e){for(var t in E$)if(e[0].matches(t))return E$[t];return J$}(e)(e[0],n,t);return Array.isArray(r)||(r=[r]),r.forEach(function(r){SS.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),C$.forEach(function(n){r=n(e[0],r,t)}))}),r}function Q$(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=e[0].textContent||"",r={text:n=Y$(n=n.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"'))};return C$.forEach(function(n){r=n(e[0],r,t)}),r}function eW(e,t){x$.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=DD(r(e[0])))});var n=cz(e);return"span"===n?e.attr("data-w-e-type")?Z$(e,t):Q$(e,t):"code"===n?"pre"===cz(e.parent())?Z$(e,t):Q$(e,t):w$.includes(n)?Q$(e,t):Z$(e,t)}function tW(e,t,n){var r=DD(n);return!!r.attr(t)||(r.attr(t,"true"),e.on("destroyed",function(){r.removeAttr(t)}),!1)}function nW(e,t){void 0===t&&(t="");var n=[];""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>"+e+"</p>"}).join(""));var r=DD("<div>"+t+"</div>");return Array.from(r.children()).forEach(function(t){var r=eW(DD(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}var rW=jB.f,iW=$j.fastKey,oW=oL.set,aW=oL.getterFor,sW={getConstructor:function(e,t,n,r){var i=e(function(e,i){Yj(e,o),oW(e,{type:t,index:tM(null),first:void 0,last:void 0,size:0}),pB||(e.size=0),null!=i&&qj(i,e[r],{that:e,AS_ENTRIES:n})}),o=i.prototype,a=aW(t),s=function(e,t,n){var r,i,o=a(e),s=l(e,t);return s?s.value=n:(o.last=s={index:i=iW(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),pB?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},l=function(e,t){var n,r=a(e),i=iW(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return Ij(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,pB?e.size=0:this.size=0},delete:function(e){var t=this,n=a(t),r=l(t,e);if(r){var i=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=i),i&&(i.previous=o),n.first==r&&(n.first=i),n.last==r&&(n.last=o),pB?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=a(this),r=kL(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),Ij(o,n?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),pB&&rW(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=aW(t),o=aW(r);uR(e,t,function(e,t){oW(this,{type:r,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),zz(t)}};Jj("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},sW);var lW=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function uW(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):h_.insertNodes(e,t,{mode:"highest"})}var cW=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(e){var n=t.selection;if(n){var r=Sj(US.edges(n),2),i=r[0],o=r[1],a=SS.void(t,{at:i.path}),s=SS.void(t,{at:o.path});if(!US.isCollapsed(n)||a){var l=yz.toDOMRange(t,n),u=l.cloneContents(),c=u.childNodes[0];if(u.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var f=Sj(s,1)[0],d=l.cloneRange(),h=yz.toDOMNode(t,f);d.setEndAfter(h),u=d.cloneContents()}if(a&&(c=u.querySelector("[data-slate-spacer]")),Array.from(u.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),iz(c)){var p=c.ownerDocument.createElement("span");p.style.whiteSpace="pre",p.appendChild(c),u.appendChild(p),c=p}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=u.ownerDocument.createElement("div");return y.appendChild(u),y.setAttribute("hidden","true"),u.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",lz(y)),u.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var r,i,o=e.getData("application/x-slate-fragment");if(o){var a=decodeURIComponent(window.atob(o)),s=JSON.parse(a);t.insertFragment(s)}else{var l=e.getData("text/plain"),u=e.getData("text/html");if(u)t.dangerouslyInsertHtml(u);else if(l){var c=l.split(/\r\n|\r|\n/),f=!1;try{for(var d=kj(c),h=d.next();!h.done;h=d.next()){var p=h.value;f&&h_.splitNodes(t,{always:!0}),n(p),f=!0}}catch(g){r={error:g}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}}}},t},fW=function(e){return null!=e},dW={object:!0,function:!0,undefined:!0},hW=/^\s*class[\s{/}]/,pW=Function.prototype.toString,gW=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!function(e){if(!fW(t=e)||!hasOwnProperty.call(dW,typeof t))return!1;var t;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}(e)}(e)&&!hW.test(pW.call(e))},vW=function(e){return null!=e},mW=Object.keys,yW=function(){try{return Object.keys("primitive"),!0}catch(pp){return!1}}()?Object.keys:function(e){return mW(vW(e)?Object(e):e)},bW=Math.max,wW=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var n,r,i,o=bW(arguments.length,2);for(e=Object(function(e){if(!vW(e))throw new TypeError("Cannot use null or undefined");return e}(e)),i=function(r){try{e[r]=t[r]}catch(i){n||(n=i)}},r=1;r<o;++r)yW(t=arguments[r]).forEach(i);if(void 0!==n)throw n;return e},xW=Array.prototype.forEach,CW=Object.create,EW=function(e){var t=CW(null);return xW.call(arguments,function(e){vW(e)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(e),t)}),t},kW="razdwatrzy",SW=String.prototype.indexOf,_W="function"==typeof kW.contains&&!0===kW.contains("dwa")&&!1===kW.contains("foo")?String.prototype.contains:function(e){return SW.call(this,e,arguments[1])>-1},DW=_F(function(e){var t=e.exports=function(e,t){var n,r,i,o,a;return arguments.length<2||"string"!=typeof e?(o=t,t=e,e=null):o=arguments[2],fW(e)?(n=_W.call(e,"c"),r=_W.call(e,"e"),i=_W.call(e,"w")):(n=i=!0,r=!1),a={value:t,configurable:n,enumerable:r,writable:i},o?wW(EW(o),a):a};t.gs=function(e,t,n){var r,i,o,a;return"string"!=typeof e?(o=n,n=t,t=e,e=null):o=arguments[3],fW(t)?gW(t)?fW(n)?gW(n)||(o=n,n=void 0):n=void 0:(o=t,t=n=void 0):t=void 0,fW(e)?(r=_W.call(e,"c"),i=_W.call(e,"e")):(r=!0,i=!1),a={get:t,set:n,configurable:r,enumerable:i},o?wW(EW(o),a):a}}),AW=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},TW=_F(function(e,t){var n,r,i,o,a,s,l,u=Function.prototype.apply,c=Function.prototype.call,f=Object.create,d=Object.defineProperty,h=Object.defineProperties,p=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r,o;return AW(t),o=this,n.call(this,e,r=function(){i.call(o,e,r),u.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e){var t,n,r,i,o;if(p.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(i=i.slice(),t=0;r=i[t];++t)u.call(r,this,o)}else switch(arguments.length){case 1:c.call(i,this);break;case 2:c.call(i,this,arguments[1]);break;case 3:c.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];u.call(i,this,o)}},a={on:n=function(e,t){var n;return AW(t),p.call(this,"__ee__")?n=this.__ee__:(n=g.value=f(null),d(this,"__ee__",g),g.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:i=function(e,t){var n,r,i,o;if(AW(t),!p.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(o=0;i=r[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:o},s={on:DW(n),once:DW(r),off:DW(i),emit:DW(o)},l=h({},s),e.exports=t=function(e){return null==e?f(l):h(Object(e),s)},t.methods=a});function OW(e){var t=qH.get(e);return null==t&&(t=TW(),qH.set(e,t)),t}var PW=new WeakMap;function IW(e,t){var n=PW.get(e);null==n&&(n=new Set,PW.set(e,n)),n.add(t)}function FW(e){var t=yz.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),i=t.offset();return{top:i.top,left:i.left,width:n,height:r}}function BW(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=FW(e);if(null==r)return t;var i=r.top,o=r.left,a=r.width,s=r.height,l=yz.toDOMRange(e,n).getClientRects()[0];if(null==l)return t;l.width;var u=l.height,c={},f=l.top-i,d=l.left-o;if(d>a/2){var h=a-d;c.right=h+5+"px"}else c.left=d+5+"px";if(f>s/2){var p=s-f;c.bottom=p+5+"px"}else{var g=f+u;g<0&&(g=0),c.top=g+5+"px"}return c}function LW(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var i=bS.isElement(t)&&e.isVoid(t),o=bS.isElement(t)&&e.isInline(t),a=UH.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),l=s.top,u=s.left,c=s.height,f=s.width;if(i){var d=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if(++n>1e4)break;var i=r.nodeName;if(1===r.nodeType){var o=i.toLowerCase();if(JH.includes(o)||"iframe"===o||"video"===o)return r;var a=r.children||[],s=a.length;if(s)for(var l=s-1;l>=0;l--)t.push(a[l])}}return null}(a);if(null!=d){var h=d.getBoundingClientRect();l=h.top,c=h.height}}var p=FW(e);if(null==p)return r;var g,v=p.top,m=p.left,y=p.width,b=p.height,w={},x=l-v,C=u-m;if("bar"===n)return w.left=C+"px",x>40?w.bottom=b-x+5+"px":w.top=x+c+5+"px",w;if("modal"===n)return i?o?C>(y-f)/2?w.right=y-C+5+"px":w.left=C+f+5+"px":w.left="20px":w.left=C+"px",i?((g=x)<0&&(g=0),w.top=g+"px"):x>(b-c)/2?w.bottom=b-x+5+"px":((g=x+c)<0&&(g=0),w.top=g+5+"px"),w;throw new Error("type '"+n+"' is invalid")}function NW(e,t){g$(function(){var n=FW(e);if(null!=n){var r,i=n.top,o=n.left,a=n.width,s=n.height,l=t.offset(),u=l.top,c=l.left,f=t.width(),d=t.height(),h=u-i,p=c-o,g=t.attr("style");if(g.indexOf("top")>=0&&(r=h+d-s)>0){var v=t.css("top"),m=parseInt(v.toString())-r;m<0&&(m=0),t.css("top",m+"px")}if(g.indexOf("bottom")>=0&&u<0){var y=t.css("bottom"),b=parseInt(y.toString())-Math.abs(u);t.css("bottom",b+"px")}if(g.indexOf("left")>=0&&(r=p+f-a)>0){var w=t.css("left"),x=parseInt(w.toString())-r;x<0&&(x=0),t.css("left",x+"px")}if(g.indexOf("right")>=0&&c<0){var C=t.css("right"),E=parseInt(C.toString())-Math.abs(c);t.css("right",E+"px")}}})}var MW=kR("slice"),RW=fB("species"),jW=OF.Array,HW=Math.max;ON({target:"Array",proto:!0,forced:!MW},{slice:function(e,t){var n,r,i,o=iN(this),a=FL(o),s=uN(e,a),l=uN(void 0===t?a:t,a);if(BL(o)&&(n=o.constructor,(UL(n)&&(n===jW||BL(n.prototype))||gB(n)&&null===(n=n[RW]))&&(n=void 0),n===jW||void 0===n))return Vz(o,s,l);for(r=new(void 0===n?jW:n)(HW(l-s,0)),i=0;s<l;s++,i++)s in o&&xM(r,i,o[s]);return r.length=i,r}});var zW=aN.f,UW=jF("".startsWith),$W=jF("".slice),WW=Math.min,VW=fM("startsWith"),GW=!VW&&!!function(){var e=zW(String.prototype,"startsWith");return e&&!e.writable}();ON({target:"String",proto:!0,forced:!GW&&!VW},{startsWith:function(e){var t=jN(zF(this));uM(e);var n=IL(WW(arguments.length>1?arguments[1]:void 0,t.length)),r=jN(e);return UW?UW(t,r,n):$W(t,n,n+r.length)===r}});var qW=Object.assign,KW=Object.defineProperty,YW=jF([].concat),XW=!qW||iB(function(){if(pB&&1!==qW({b:1},qW(KW({},"a",{enumerable:!0,get:function(){KW(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=qW({},e)[n]||PN(qW({},t)).join("")!=r})?function(e,t){for(var n=$F(e),r=arguments.length,i=1,o=yN.f,a=rN.f;r>i;)for(var s,l=DL(arguments[i++]),u=o?YW(PN(l),o(l)):PN(l),c=u.length,f=0;c>f;)s=u[f++],pB&&!kB(a,l,s)||(n[s]=l[s]);return n}:qW;ON({target:"Object",stat:!0,forced:Object.assign!==XW},{assign:XW});var JW=["props","attrs","style","dataset","on","hook"];function ZW(e){var t=e.data,n=void 0===t?{}:t,r=e.children,i=void 0===r?[]:r;Object.keys(n).forEach(function(t){var r,i,o=n[t];if("key"!==t){if(!JW.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=nO(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={}),Object.assign(n.dataset,t)}(e,((r={})[a]=o,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,t)}(e,(i={},i[t]=o,i)),delete n[t]}}else e.key=o}),i.length>0&&i.forEach(function(e){"string"!=typeof e&&ZW(e)})}var QW=[],eV={};function tV(e,t,n){return vT(n.isInline(e)?"span":"div",null,t)}function nV(e,t){return void 0===t&&(t=!1),vT("span",{"data-slate-string":!0},t?e+"\n":e)}function rV(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),vT("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?vT("br",null):null)}function iV(e,t,n,r){return MH.set(e,t),RH.set(e,n),bS.isElement(e)?function(e,t){var n,r=yz.findKey(t,e),i=t.isInline(e),o=SS.isVoid(t,e),a=m$(r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":i},l=e.type,u=e.children,c=void 0===u?[]:u,f=eV[l]||tV;n=o?null:c.map(function(n,r){return iV(n,r,e,t)});var d,h,p,g=f(e,n,t);if(o){s["data-slate-void"]=!0;var v=i?"span":"div",m=Sj(OS.texts(e),1),y=Sj(m[0],1)[0],b=vT(v,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},iV(y,0,e,t));g=vT(v,{style:{position:"relative"}},g,b),MH.set(y,0),RH.set(y,e)}return null==g.data&&(g.data={}),Object.assign(g.data,s),o||i||(d=e,p=h=g,QW.forEach(function(e){p=e(d,h)}),g=p),g$(function(){var t=oz(a);null!=t&&(zH.set(r,t),UH.set(e,t),HH.set(t,e))}),g}(e,r):function(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text "+JSON.stringify(e));var r=yz.findKey(n,e),i=n.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var o=yz.findPath(n,e),a=i([e,o]),s=YS.decorations(e,a),l=s.map(function(r,i){var o,a,l=function(e,t,n,r,i){void 0===t&&(t=!1);var o=e.text,a=yz.findPath(i,n),s=BS.parent(a);if(SS.isEditor(r))throw new Error("Text node "+JSON.stringify(n)+" parent is Editor");return i.isVoid(r)?rV(OS.string(r).length):""!==o||r.children[r.children.length-1]!==n||i.isInline(r)||""!==SS.string(i,s)?""===o?rV():t&&"\n"===o.slice(-1)?nV(o,!0):nV(o):rV(0,!0)}(r,i===s.length-1,e,t,n);return o=r,a=l,QW.forEach(function(e){a=e(o,a)}),vT("span",{"data-slate-leaf":!0},l=a)}),u="w-e-text-"+r.id,c=vT("span",{"data-slate-node":"text",id:u,key:r.id},l);return g$(function(){var t=oz(u);null!=t&&(zH.set(r,t),UH.set(e,t),HH.set(t,e))}),c}(e,n,r)}function oV(e,t){var n,r,i=e.$scroll,o="w-e-textarea-"+e.id,a=t.getConfig(),s=a.readOnly,l=a.autoFocus,u=(void 0===(r=s)&&(r=!1),XA("div#"+o,{props:{contentEditable:!r}})),c=t.children||[];u.children=c.map(function(e,n){var r=iV(e,n,t,t);return ZW(r),r});var f=BH.get(e);if(null==f&&(f=!0),f){var d=function(e){return DD('<div\n id="'+e+'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>')}(o);i.append(d),e.$textArea=d,n=d[0],(p=KA([eT,uT,pT,rT,sT,ZA]))(n,u),BH.set(e,!1),LH.set(e,p)}else{var h=NH.get(e),p=LH.get(e);if(null==h||null==p)return;n=h.elm,p(h,u)}if(null!=n||null!=(n=oz(o))){if((f?l:t.isFocused())&&n.focus({preventScroll:!0}),f){var g=ez(n);g&&WH.set(t,g)}jH.set(t,n),UH.set(t,n),HH.set(n,t),NH.set(e,u)}}function aV(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function sV(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function lV(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return sV(n.overflowY,t)||sV(n.overflowX,t)||!!(i=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(t){return null}}(r=e))&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}var r,i;return!1}function uV(e,t,n,r,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=n||a>=t&&s>=n?o-e-r:a>t&&s<n||o<e&&s>n?a-t+i:0}function cV(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!aV(e))throw new TypeError("Invalid target");for(var u=document.scrollingElement||document.documentElement,c=[],f=e;aV(f)&&l(f);){if((f=f.parentElement)===u){c.push(f);break}null!=f&&f===document.body&&lV(f)&&!lV(document.documentElement)||null!=f&&lV(f,s)&&c.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,p=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),m=v.height,y=v.width,b=v.top,w=v.right,x=v.bottom,C=v.left,E="start"===i||"nearest"===i?b:"end"===i?x:b+m/2,k="center"===o?C+y/2:"end"===o?w:C,S=[],_=0;_<c.length;_++){var D=c[_],A=D.getBoundingClientRect(),T=A.height,O=A.width,P=A.top,I=A.right,F=A.bottom,B=A.left;if("if-needed"===r&&b>=0&&C>=0&&x<=h&&w<=d&&b>=P&&x<=F&&C>=B&&w<=I)return S;var L=getComputedStyle(D),N=parseInt(L.borderLeftWidth,10),M=parseInt(L.borderTopWidth,10),R=parseInt(L.borderRightWidth,10),j=parseInt(L.borderBottomWidth,10),H=0,z=0,U="offsetWidth"in D?D.offsetWidth-D.clientWidth-N-R:0,$="offsetHeight"in D?D.offsetHeight-D.clientHeight-M-j:0;if(u===D)H="start"===i?E:"end"===i?E-h:"nearest"===i?uV(g,g+h,h,M,j,g+E,g+E+m,m):E-h/2,z="start"===o?k:"center"===o?k-d/2:"end"===o?k-d:uV(p,p+d,d,N,R,p+k,p+k+y,y),H=Math.max(0,H+g),z=Math.max(0,z+p);else{H="start"===i?E-P-M:"end"===i?E-F+j+$:"nearest"===i?uV(P,F,T,M,j+$,E,E+m,m):E-(P+T/2)+$/2,z="start"===o?k-B-N:"center"===o?k-(B+O/2)+U/2:"end"===o?k-I+R+U:uV(B,I,O,N,R+U,k,k+y,y);var W=D.scrollLeft,V=D.scrollTop;E+=V-(H=Math.max(0,Math.min(V+H,D.scrollHeight-T+$))),k+=W-(z=Math.max(0,Math.min(W+z,D.scrollWidth-O+U)))}S.push({el:D,top:H,left:z})}return S}function fV(e){return e===Object(e)&&0!==Object.keys(e).length}function dV(e,t){return nz(t)&&yz.hasDOMNode(e,t,{editable:!0})}function hV(e,t){if(e.getConfig().readOnly)return!1;var n=pV(e,t)&&yz.toSlateNode(e,t);return SS.isVoid(e,n)}function pV(e,t){return nz(t)&&yz.hasDOMNode(e,t)}function gV(e,t,n){void 0===n&&(n=!1);var r=t.selection,i=t.getConfig(),o=yz.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==o.type;if(r||a){var s=jH.get(t),l=!1;if(s.contains(o.anchorNode)&&s.contains(o.focusNode)&&(l=!0),a&&l&&r){var u=yz.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(u&&US.equals(u,r)){var c=!0;if(US.isCollapsed(r)){var f=o.anchorNode,d=o.anchorOffset;if(f===s){var h=s.childNodes,p=void 0;(p=h[d])&&p.matches("table")&&(c=!1),(p=h[d-1])&&p.matches("table")&&(c=!1)}}if(c)return}}if(!r||yz.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&yz.toDOMRange(t,r);if(g){US.isBackward(r)?o.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):o.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;(function(e,t){var n,r=!e.ownerDocument.documentElement.contains(e);if(fV(t)&&"function"==typeof t.behavior)return t.behavior(r?[]:cV(e,t));if(!r){var i=!1===(n=t)?{block:"end",inline:"nearest"}:fV(n)?n:{block:"start",inline:"nearest"};!function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(e){var r=e.el,i=e.top,o=e.left;r.scroll&&n?r.scroll({top:i,left:o,behavior:t}):(r.scrollTop=i,r.scrollLeft=o)})}(cV(e,i),i.behavior)}})(v,{scrollMode:"if-needed",boundary:i.scroll?s.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else o.removeAllRanges();setTimeout(function(){g&&dz&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=yz.toSlateRange(t,o,{exactMatch:!1,suppressThrow:!1})}}}var vV=new WeakMap,mV=new WeakMap,yV={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},bV={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},wV={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},xV=function(e){var t=yV[e],n=bV[e],r=wV[e],i=t&&dO(t),o=n&&dO(n),a=r&&dO(r);return function(e){return!(!i||!i(e))||!!(fz&&o&&o(e))||!(fz||!a||!a(e))}},CV={isBold:xV("bold"),isCompose:xV("compose"),isMoveBackward:xV("moveBackward"),isMoveForward:xV("moveForward"),isDeleteBackward:xV("deleteBackward"),isDeleteForward:xV("deleteForward"),isDeleteLineBackward:xV("deleteLineBackward"),isDeleteLineForward:xV("deleteLineForward"),isDeleteWordBackward:xV("deleteWordBackward"),isDeleteWordForward:xV("deleteWordForward"),isExtendBackward:xV("extendBackward"),isExtendForward:xV("extendForward"),isExtendLineBackward:xV("extendLineBackward"),isExtendLineForward:xV("extendLineForward"),isItalic:xV("italic"),isMoveLineBackward:xV("moveLineBackward"),isMoveLineForward:xV("moveLineForward"),isMoveWordBackward:xV("moveWordBackward"),isMoveWordForward:xV("moveWordForward"),isRedo:xV("redo"),isSplitBlock:xV("splitBlock"),isTransposeCharacter:xV("transposeCharacter"),isUndo:xV("undo"),isTab:xV("tab"),isSelectAll:xV("selectAll")};function EV(e){e.preventDefault()}var kV={beforeinput:function(e,t,n){var r=e,i=n.getConfig().readOnly;if(mz&&!i&&dV(n,r.target)){var o=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var l=Sj(r.getTargetRanges(),1)[0];if(l){var u=yz.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});o&&US.equals(o,u)||h_.select(n,u)}}if(o&&US.isExpanded(o)&&a.startsWith("delete")){var c=a.endsWith("Backward")?"backward":"forward";SS.deleteFragment(n,{direction:c})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":SS.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":SS.deleteForward(n);break;case"deleteContentBackward":SS.deleteBackward(n);break;case"deleteEntireSoftLine":SS.deleteBackward(n,{unit:"line"}),SS.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":SS.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":SS.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":SS.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":SS.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":SS.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":SS.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":SS.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!KH.get(n))break;s instanceof DataTransfer?n.insertData(s):"string"==typeof s&&SS.insertText(n,s)}}}},blur:function(e,t,n){var r=e,i=t.isUpdatingSelection,o=t.latestElement;if(!n.getConfig().readOnly&&!i&&dV(n,r.target)){var a=yz.findDocumentOrShadowRoot(n);if(o!==a.activeElement){var s=r.relatedTarget;if(!(s===yz.toDOMNode(n,n)||tz(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&nz(s)&&yz.hasDOMNode(n,s)){var l=yz.toSlateNode(n,s);if(bS.isElement(l)&&!n.isVoid(l))return}if(hz){var u=a.getSelection();null==u||u.removeAllRanges()}VH.delete(n)}}}},focus:function(e,t,n){var r=yz.toDOMNode(n,n),i=yz.findDocumentOrShadowRoot(n);t.latestElement=i.activeElement,dz&&e.target!==r?r.focus():VH.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&pV(n,e.target)&&nz(e.target)){var r=yz.toSlateNode(n,e.target),i=yz.findPath(n,r);if(SS.hasPath(n,i)&&OS.get(n,i)===r){var o=SS.start(n,i),a=SS.end(n,i),s=SS.void(n,{at:o}),l=SS.void(n,{at:a});if(s&&l&&BS.equals(s[1],l[1])){var u=SS.range(n,o);h_.select(n,u)}}}},compositionstart:function(e,t,n){if(dV(n,e.target)){var r=n.selection;if(r&&US.isExpanded(r)&&(SS.deleteFragment(n),Promise.resolve().then(function(){gV(t,n,!0)})),r&&US.isCollapsed(r)){var i=yz.toDOMRange(n,r).startContainer,o=i.textContent||"";vV.set(n,o),mV.set(n,i)}t.isComposing=!0,a=t,(s=n).getConfig().placeholder&&s.isEmpty()&&a.showPlaceholder&&(null===(l=a.$placeholder)||void 0===l||l.hide(),a.showPlaceholder=!1)}var a,s,l},compositionend:function(e,t,n){var r=e;if(dV(n,r.target)){t.isComposing=!1;var i=n.selection;if(null!=i){(vz||dz)&&yz.cleanExposedTexNodeInSelectionBlock(n);for(var o=US.isBackward(i)?i.focus:i.anchor,a=Sj(SS.node(n,[o.path[0]]),1)[0],s=0;s<o.path.length;s++){var l=Sj(SS.node(n,o.path.slice(0,s+1)),1)[0];if(bS.isElement(l)&&((hz||dz)&&"link"===l.type||"code"===l.type)){yz.setNewKey(a);break}}var u=r.data;if(u){if(n.getConfig().maxLength){var c=yz.getLeftLengthOfMaxLength(n);c<u.length?(yz.toDOMRange(n,i).startContainer.textContent=vV.get(n)||"",c>0&&SS.insertText(n,u.slice(0,c)),t.changeViewState()):SS.insertText(n,u)}else SS.insertText(n,u);hz||setTimeout(function(){var e=n.selection;if(null!=e){var t=mV.get(n);null!=t&&yz.toDOMRange(n,e).startContainer!==t&&(t.textContent=vV.get(n)||"")}})}}}},compositionupdate:function(e,t,n){dV(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,i=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&dV(n,r.target)){if(function(e,t){var n=DH.get(e),r=n&&n.getMenus(),i=TH.get(e),o=i&&i.getMenus(),a=Ej(Ej({},r),o);for(var s in a){var l=a[s],u=l.hotkey;if(u&&fO(u,t)&&!l.isDisabled(e)){var c=l.getValue(e);l.exec(e,c)}}}(n,r),CV.isTab(r))return EV(r),void n.handleTab();if(CV.isRedo(r))return EV(r),void("function"==typeof n.redo&&n.redo());if(CV.isUndo(r))return EV(r),void("function"==typeof n.undo&&n.undo());if(CV.isMoveLineBackward(r))return EV(r),void h_.move(n,{unit:"line",reverse:!0});if(CV.isMoveLineForward(r))return EV(r),void h_.move(n,{unit:"line"});if(CV.isExtendLineBackward(r))return EV(r),void h_.move(n,{unit:"line",edge:"focus",reverse:!0});if(CV.isExtendLineForward(r))return EV(r),void h_.move(n,{unit:"line",edge:"focus"});if(CV.isMoveBackward(r))return EV(r),void(i&&US.isCollapsed(i)?h_.move(n,{reverse:!0}):h_.collapse(n,{edge:"start"}));if(CV.isMoveForward(r))return EV(r),void(i&&US.isCollapsed(i)?h_.move(n):h_.collapse(n,{edge:"end"}));if(CV.isMoveWordBackward(r))return EV(r),i&&US.isExpanded(i)&&h_.collapse(n,{edge:"focus"}),void h_.move(n,{unit:"word",reverse:!0});if(CV.isMoveWordForward(r))return EV(r),i&&US.isExpanded(i)&&h_.collapse(n,{edge:"focus"}),void h_.move(n,{unit:"word"});if(CV.isSelectAll(r))return EV(r),void n.selectAll();if(mz){if((vz||hz)&&i&&(CV.isDeleteBackward(r)||CV.isDeleteForward(r))&&US.isCollapsed(i)){var o=OS.parent(n,i.anchor.path);if(bS.isElement(o)&&SS.isVoid(n,o)&&SS.isInline(n,o))return r.preventDefault(),void h_.delete(n,{unit:"block"})}}else{if(CV.isBold(r)||CV.isItalic(r)||CV.isTransposeCharacter(r))return void EV(r);if(CV.isSplitBlock(r))return EV(r),void SS.insertBreak(n);if(CV.isDeleteBackward(r))return EV(r),void(i&&US.isExpanded(i)?SS.deleteFragment(n,{direction:"backward"}):SS.deleteBackward(n));if(CV.isDeleteForward(r))return EV(r),void(i&&US.isExpanded(i)?SS.deleteFragment(n,{direction:"forward"}):SS.deleteForward(n));if(CV.isDeleteLineBackward(r))return EV(r),void(i&&US.isExpanded(i)?SS.deleteFragment(n,{direction:"backward"}):SS.deleteBackward(n,{unit:"line"}));if(CV.isDeleteLineForward(r))return EV(r),void(i&&US.isExpanded(i)?SS.deleteFragment(n,{direction:"forward"}):SS.deleteForward(n,{unit:"line"}));if(CV.isDeleteWordBackward(r))return EV(r),void(i&&US.isExpanded(i)?SS.deleteFragment(n,{direction:"backward"}):SS.deleteBackward(n,{unit:"word"}));if(CV.isDeleteWordForward(r))return EV(r),void(i&&US.isExpanded(i)?SS.deleteFragment(n,{direction:"forward"}):SS.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!mz&&!n.getConfig().readOnly&&dV(n,e.target)){e.preventDefault();var r=e.key;SS.insertText(n,r)}},copy:function(e,t,n){var r=e;if(dV(n,r.target)){r.preventDefault();var i=r.clipboardData;null!=i&&n.setFragmentData(i)}},cut:function(e,t,n){var r=e,i=n.selection;if(!n.getConfig().readOnly&&dV(n,r.target)){r.preventDefault();var o=r.clipboardData;if(null!=o&&(n.setFragmentData(o),i))if(US.isExpanded(i))SS.deleteFragment(n);else{var a=OS.parent(n,i.anchor.path);SS.isVoid(n,a)&&h_.delete(n)}}},paste:function(e,t,n){KH.set(n,!0);var r,i=e;if(!n.getConfig().readOnly&&dV(n,i.target)){var o=n.getConfig().customPaste;if(o&&!1===o(n,i))return void KH.set(n,!1);if(!mz||(r=i).clipboardData&&""!==r.clipboardData.getData("text/plain")&&1===r.clipboardData.types.length){i.preventDefault();var a=i.clipboardData;null!=a&&n.insertData(a)}}},dragover:function(e,t,n){if(pV(n,e.target)){var r=yz.toSlateNode(n,e.target);SS.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(pV(n,r.target)&&!n.getConfig().readOnly){var i=yz.toSlateNode(n,r.target),o=yz.findPath(n,i);if(SS.isVoid(n,i)||SS.void(n,{at:o,voids:!0})){var a=SS.range(n,o);h_.select(n,a)}var s=r.dataTransfer;null!=s&&(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&pV(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,i=r.dataTransfer;if(!n.getConfig().readOnly&&pV(n,r.target)&&null!=i&&!(mz&&hz&&i.files.length>0)){r.preventDefault();var o=n.selection,a=yz.findEventRange(n,r);h_.select(n,a),t.isDraggingInternally&&(o&&h_.delete(n,{at:o}),t.isDraggingInternally=!1),n.insertData(i),n.isFocused()||n.focus()}}},SV=1,_V=function(){function e(e){var t=this;this.id=SV++,this.$textArea=null,this.$progressBar=DD('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=DD('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=MA(function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,i=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||i)){var o=yz.findDocumentOrShadowRoot(t),a=o.activeElement,s=yz.toDOMNode(t,t),l=o.getSelection();if(a===s?(e.latestElement=a,VH.set(t,!0)):VH.delete(t),!l)return h_.deselect(t);var u=l.anchorNode,c=l.focusNode,f=dV(t,u)||hV(t,u),d=dV(t,c)||hV(t,c);if(f&&d){var h=yz.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!1});h_.select(t,h)}else h_.deselect(t)}}(t,e)},100);var n=DD(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '"+e+"'");this.$box=n;var r=DD('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var i=DD('<div class="w-e-scroll"></div>');r.append(i),this.$scroll=i,this.$textAreaContainer=r,g$(function(){var e=t.editorInstance,n=yz.getWindow(e);n.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on("destroyed",function(){n.document.removeEventListener("selectionchange",t.onDOMSelectionChange)}),r.on("click",function(){return e.hidePanelOrModal()}),e.on("change",t.changeViewState.bind(t));var i=e.getConfig().onChange;i&&e.on("change",function(){return i(e)}),t.onFocusAndOnBlur(),e.on("change",t.changeMaxLengthInfo.bind(t)),t.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=SH.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(xA(kV,function(n,i){t.on(i,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",MA(function(){r.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,i=n.onFocus;this.latestEditorSelection=t.selection,t.on("change",function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){return i&&i(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){return r&&r(t)}),e.latestEditorSelection=t.selection})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-yz.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML=n+"/"+t}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width",e+"%"),e>=100&&setTimeout(function(){t.hide(),t.css("width","0"),t.show()},1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;oV(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var i=t.isEmpty();if(i&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var o=DD('<div class="w-e-text-placeholder">'+r+"</div>");e.$textAreaContainer.append(o),e.$placeholder=o}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!i&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),g$(function(){gV(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function DV(e){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&DV(t)}function AV(){return DD('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function TV(){return DD('<div class="w-e-bar-divider"></div>')}function OV(e,t,n,r,i){if(void 0===i&&(i=!1),t){if(r){var o=fz?"cmd":"ctrl";r=r.replace("mod",o)}if(i)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?n+"\n"+r:n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}ej("match",function(e,t,n){return[function(t){var n=zF(this),r=null==t?void 0:IB(t,e);return r?kB(r,t,n):new RegExp(t)[e](jN(n))},function(e){var r=CB(this),i=jN(e),o=n(t,r,i);if(o.done)return o.value;if(!r.global)return fj(r,i);var a=r.unicode;r.lastIndex=0;for(var s,l=[],u=0;null!==(s=fj(r,i));){var c=jN(s[0]);l[u]=c,""===c&&(r.lastIndex=nj(i,IL(r.lastIndex),a)),u++}return 0===u?null:l}]});var PV=function(){function e(e,t,n){var r=this;void 0===n&&(n=!1),this.$elem=DD('<div class="w-e-bar-item"></div>'),this.$button=DD('<button type="button"></button>'),this.disabled=!1,this.menu=t;var i=t.tag,o=t.width;if("button"!==i)throw new Error("Invalid tag '"+i+"', expected 'button'");var a=t.title,s=t.hotkey,l=void 0===s?"":s,u=t.iconSvg,c=void 0===u?"":u,f=this.$button;if(c){var d=DD(c);DV(d),f.append(d)}else f.text(a);OV(f,c,a,l,n),n&&c&&f.append(DD('<span class="title">'+a+"</span>")),o&&f.css("width",o+"px"),f.attr("data-menu-key",e),this.$elem.append(f),g$(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),WV(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=WV(this),t=this.menu,n=t.getValue(e);t.exec(e,n)},e.prototype.setActive=function(){var e=WV(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=WV(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),IV=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Cj(t,e),t.prototype.onButtonClick=function(){},t}(PV),FV=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=PH.get(e);null==t&&(t=new Set,PH.set(e,t)),t.add(this),IH.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=IH.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=IH.get(this);e&&e.emit("modalOrPanelHide")}},e}(),BV=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=DD('<div class="w-e-drop-panel"></div>'),n}return Cj(t,e),t.prototype.genSelfElem=function(){return null},t}(FV),LV=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,n,r)||this;if(i.dropPanel=null,i.menu=n,n.showDropPanel){var o=AV();i.$button.append(o)}return i}return Cj(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=WV(this);if(null==this.dropPanel){var n=new BV(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var i=this.dropPanel;i.isShow?i.hide():(r=e.getPanelContentElem(t),i.renderContent(r),i.show())}var o=this.dropPanel;if(o.isShow){var a=this.$elem,s=a.offset().left,l=a.parents(".w-e-bar");s-l.offset().left>=l.width()/2?o.$elem.css({left:"none",right:"0"}):o.$elem.css({left:"0",right:"none"})}}},t}(PV),NV=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=DD('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",function(e){return e.stopPropagation()}),i.on("keyup",function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())}),r}return Cj(t,e),t.prototype.genSelfElem=function(){var e=this,t=DD('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg></span>'),n=IH.get(this);return t.on("click",function(){e.hide(),null==n||n.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width",t+"px"),n.css(e)},t}(FV);function MV(e,t,n){var r=DD('<label class="babel-container"></label>');r.append("<span>"+e+"</span>");var i=DD('<input type="text" id="'+t+'" placeholder="'+(n||"")+'">');return r.append(i),[r[0],i[0]]}function RV(e,t){var n=DD('<div class="button-container"></div>'),r=DD('<button type="button" id="'+e+'">'+t+"</button>");return n.append(r),[n[0],r[0]]}var jV=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,n,r)||this;return i.$body=DD("body"),i.modal=null,i.menu=n,i}return Cj(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=WV(this),t=this.menu.getModalPositionNode(e);return bS.isElement(t)?LW(e,t,"modal"):BW(e)},t.prototype.handleModal=function(){var e=WV(this),t=this.menu;if(null==this.modal){var n=new NV(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=WV(this),r=this.menu;if(null!=r.getModalContentElem){var i=yz.getTextarea(n),o=yz.getToolbar(n),a=((null==o?void 0:o.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var l=this.getPosition();e.setStyle(l)}t&&(a?e.appendTo(this.$body):e.appendTo(i.$textAreaContainer)),e.show(),a||NW(n,e.$elem),setTimeout(function(){n.blur()})}},t}(PV),HV=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=DD('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width",n+"px"),r.$elem.on("click",function(e){e.stopPropagation()}),r}return Cj(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=DD("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,i=e.selected,o=e.styleForRenderMenuList,a=DD('<li data-value="'+t+'"></li>');if(o&&a.css(o),i){var s=DD('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(DD('<span data-value="'+t+'">'+r+"</span>")),a.attr("title",r),n.append(a)}),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(FV),zV=function(){function e(e,t,n){var r=this;void 0===n&&(n=!1),this.$elem=DD('<div class="w-e-bar-item"></div>'),this.$button=DD('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=t.tag,o=t.title,a=t.width,s=t.iconSvg,l=void 0===s?"":s,u=t.hotkey,c=void 0===u?"":u;if("select"!==i)throw new Error("Invalid tag '"+i+"', expected 'select'");var f=this.$button;a&&f.css("width",a+"px"),f.attr("data-menu-key",e),OV(f,l,o,c,n),this.$elem.append(f),this.menu=t,g$(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),WV(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=WV(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new HV(t,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(t);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=DD(n).attr("data-value");e.onChange(r)}})}else(r=this.selectList).isShow?r.hide():(i=n.getOptions(t),r.renderList(i),r.show())}},e.prototype.onChange=function(e){var t=WV(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=WV(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",i=0;i<n;i++){var o=e[i];if(o.value===t){r=o.text;break}}return r}(t.getOptions(e),n.toString()),i=this.$button,o=AV();i.empty(),i.text(r),i.append(o)},e.prototype.setDisabled=function(){var e=WV(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),UV=function(){function e(e){this.$elem=DD('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=DD('<div class="w-e-bar-item-menus-container"></div>'),this.$button=DD('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,i=this.$elem,o=this.$button;if(n){var a=DD(n);DV(a),o.append(a)}else o.text(r);o.attr("data-menu-key",t);var s=AV();o.append(s),i.append(o);var l=this.$container;i.append(l);var u=this.createObserver();this.observe(u)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver(function(){var i=t.find("button"),o=i.length;if(0!==o){var a=0;i.each(function(e){DD(e).hasClass("disabled")&&a++}),r.disconnect(),a===o?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),$V=new WeakMap;function WV(e){var t=OH.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function VV(e,t,n){void 0===n&&(n=!1);var r=$V.get(t);if(r)return r;var i=t.tag;if("button"===i){var o=t.showDropPanel,a=t.showModal;r=o?new LV(e,t,n):a?new jV(e,t,n):new IV(e,t,n)}if("select"===i&&(r=new zV(e,t,n)),null==r)throw new Error("Invalid tag in menu "+JSON.stringify(t));return $V.set(t,r),r}function GV(e,t){var n=e.selection;return null!=n&&!US.isCollapsed(n)&&!yz.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)||void 0})&&!!YS.isText(t)}var qV=function(){function e(){var e=this;this.$elem=DD('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.changeHoverbarState=AO(function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,i=void 0===r?null:r,o=n.menuKeys,a=void 0===o?[]:o;null!=i&&e.changeItemsState(),i&&bS.isElement(i)&&t&&e.isSamePath(i,e.prevSelectedNode)||(e.hideAndClean(),null!=i&&(e.registerItems(a),e.setPosition(i),e.show()),e.prevSelectedNode=i)},200),g$(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),yz.getTextarea(t).$textAreaContainer.append(n),t.on("change",e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on("scroll",r),t.on("fullScreen",r),t.on("unFullScreen",r)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n=window.innerHeight;n&&n>=360&&n-e[0].getBoundingClientRect().bottom<360&&(t=!0),t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;g$(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var r=TV();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var i=xz[e];if(null==i)throw new Error("Not found menu item factory by key '"+e+"'");if("function"!=typeof i)throw new Error("Menu item factory (key='"+e+"') is not a function");r=i(),n[e]=r}var o=VV(e,r);this.hoverbarItems.push(o),OH.set(o,t),this.$elem.append(o.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),bS.isElement(e)){var r=LW(t,e,"bar");return n.css(r),void NW(t,n)}if(YS.isText(e))return r=BW(t),n.css(r),void NW(t,n);throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],i=function(i){var o=t[i],a=o.match,s=o.menuKeys,l=void 0===s?[]:s,u=a||function(e,t){return yz.checkNodeType(t,i)},c=Sj(SS.nodes(e,{match:function(t){return u(e,t)},universal:!0}),1)[0];if(null!=c)return n=c[0],r=l,"break"};for(var o in t)if("break"===i(o))break;return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=AH.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=GV),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=yz.findPath(null,e),r=yz.findPath(null,t);return BS.equals(n,r)},e.prototype.destroy=function(){this.changeHoverbarState.cancel(),this.$elem.remove(),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function KV(e,t,n,r){if(MH.set(e,t),RH.set(e,n),bS.isElement(e)){var i=e.children;if((void 0===i?[]:i).forEach(function(t,n){return KV(t,n,e,r)}),SS.isVoid(r,e)){var o=Sj(OS.texts(e),1),a=Sj(o[0],1)[0];MH.set(a,0),RH.set(a,e)}}}function YV(e){var t,n=e.selector,r=void 0===n?"":n,i=e.config,o=void 0===i?{}:i,a=e.content,s=e.html,l=e.plugins,u=void 0===l?[]:l,c=(e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];MN.withoutSaving(t,()=>{SS.withoutNormalizing(t,()=>{for(var e of r)t.apply(e)})}),e.redos.pop(),e.undos.push(r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];MN.withoutSaving(t,()=>{SS.withoutNormalizing(t,()=>{var e=r.map(FS.inverse).reverse();for(var n of e)t.apply(n)})}),e.redos.push(r),e.undos.pop()}},t.apply=e=>{var r,{operations:i,history:o}=t,{undos:a}=o,s=a[a.length-1],l=s&&s[s.length-1],u=!(!(r=l)||"set_selection"!==e.type||"set_selection"!==r.type),c=MN.isSaving(t),f=MN.isMerging(t);if(null==c&&(c=(e=>"set_selection"!==e.type||null!=e.properties&&null!=e.newProperties)(e)),c){if(null==f&&(f=null!=s&&(0!==i.length||((e,t)=>"set_selection"===e.type||!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!BS.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!BS.equals(e.path,t.path)))(e,l)||u)),s&&f)u&&s.pop(),s.push(e);else{var d=[e];a.push(d)}for(;a.length>100;)a.shift();(e=>"set_selection"!==e.type)(e)&&(o.redos=[])}n(e)},t})(function(e){var t=e,n=t.insertText,r=t.insertNode,i=t.insertFragment,o=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=yz.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=yz.getLeftLengthOfMaxLength(t);n<=0||n<OS.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength)if(1!==e.length)e.forEach(function(e){t.insertNode(e)});else{var n=e[0];if(yz.getLeftLengthOfMaxLength(t)<OS.string(n).length)return;i(e)}else i(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=yz.getLeftLengthOfMaxLength(t);if(!(r<=0)){var i=document.createElement("div");i.innerHTML=e,r<Array.from(i.childNodes).reduce(function(e,t){var n=t.nodeType,r=t.nodeName;return t?n===ZH.TEXT_NODE?e+(t.textContent||""):n===ZH.ELEMENT_NODE?lW.has(r.toLowerCase())?e:e+(t.textContent||""):e:e},"").length||o(e,n)}}else o(e,n)},t}(function(e){var t=e;return t.on=function(e,n){var r=OW(t);if(r.on(e,n),"destroyed"===e&&IW(t,n),"destroyed"!==e){var i=function(){return r.off(e,n)};r.on("destroyed",i),IW(t,i)}},t.once=function(e,n){OW(t).once(e,n)},t.off=function(e,n){OW(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=OW(t);i.emit.apply(i,_j([e],Sj(n))),"destroyed"===e&&(function(e){return PW.get(e)||new Set}(t).forEach(function(e){return i.off("destroyed",e)}),function(e){PW.set(e,new Set)}(t))},t}(function(e){var t=e;return t.select=function(e){h_.select(t,e)},t.deselect=function(){var n=t.selection,r=yz.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&h_.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||h_.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=GH.get(t);null!=e&&(t.focus(),h_.select(t,e))},t.getSelectionPosition=function(){return BW(t)},t.getNodePosition=function(e){return LW(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=Sj(US.edges(e),2),r=n[0],i=n[1],o=Sj(SS.edges(t,[]),2),a=o[0],s=o[1];return!(!RS.equals(r,a)||!RS.equals(i,s))},t.selectAll=function(){var e=SS.start(t,[]),n=SS.end(t,[]);h_.select(t,{anchor:e,focus:n})},t}(function(e){var t=e,n=t.onChange,r=t.insertText,i=t.apply,o=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,o,a,s,l,u,c,f=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var d=kj(SS.levels(t,{at:e.path})),h=d.next();!h.done;h=d.next()){var p=Sj(h.value,2),g=p[0],v=p[1],m=yz.findKey(t,g);f.push([v,m])}}catch(D){n={error:D}}finally{try{h&&!h.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var y=kj(SS.levels(t,{at:BS.parent(e.path)})),b=y.next();!b.done;b=y.next()){var w=Sj(b.value,2);g=w[0],v=w[1],m=yz.findKey(t,g),f.push([v,m])}}catch(D){o={error:D}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}break;case"move_node":try{for(var x=kj(SS.levels(t,{at:BS.common(BS.parent(e.path),BS.parent(e.newPath))})),C=x.next();!C.done;C=x.next()){var E=Sj(C.value,2);g=E[0],v=E[1],m=yz.findKey(t,g),f.push([v,m])}}catch(D){s={error:D}}finally{try{C&&!C.done&&(l=x.return)&&l.call(x)}finally{if(s)throw s.error}}}i(e);try{for(var k=kj(f),S=k.next();!S.done;S=k.next()){var _=Sj(S.value,2);v=_[0],m=_[1],g=Sj(SS.node(t,v),1)[0],$H.set(g,m)}}catch(D){u={error:D}}finally{try{S&&!S.done&&(c=k.return)&&c.call(k)}finally{if(u)throw u.error}}},t.deleteBackward=function(n){if("line"!==n)return o(n);if(e.selection&&US.isCollapsed(e.selection)){var r=SS.above(e,{match:function(t){return SS.isBlock(e,t)},at:e.selection});if(r){var i=Sj(r,2)[1],a=SS.range(e,i,e.selection.anchor),s=function(e,t){var n=SS.range(e,US.end(t)),r=Array.from(SS.positions(e,{at:t})),i=0,o=r.length,a=Math.floor(o/2);if(b$(e,SS.range(e,r[i]),n))return SS.range(e,r[i],n);if(r.length<2)return SS.range(e,r[r.length-1],n);for(;a!==r.length&&a!==i;)b$(e,SS.range(e,r[a]),n)?o=a:i=a,a=Math.floor((i+o)/2);return SS.range(e,r[o],n)}(t,a);US.isCollapsed(s)||h_.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&GH.set(t,e),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return v$(e,t)}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return OS.string(e)}).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":SS.string(e,n)},t.getElemsByType=function(e,n){var r,i;void 0===n&&(n=!1);var o=[],a=SS.nodes(t,{at:[],universal:!0});try{for(var s=kj(a),l=s.next();!l.done;l=s.next()){var u=Sj(l.value,1)[0];if(bS.isElement(u)&&(n?u.type.indexOf(e)>=0:u.type===e)){var c=m$(yz.findKey(t,u).id);o.push(Ej(Ej({},u),{id:c}))}}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(bS.isElement(r)&&"paragraph"===r.type){var i=r.children,o=void 0===i?[]:i;if(o.length>1)return!1;var a=o[0];if(null==a)return!0;if(YS.isText(a)&&""===a.text)return!0}return!1},t.clear=function(){h_.delete(t,{at:{anchor:SS.start(t,[]),focus:SS.end(t,[])}}),0===t.children.length&&h_.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return yz.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var i=Array.from(r.childNodes);if(0!==(i=i.filter(function(e){var t=e.nodeType,n=e.nodeName;return t===ZH.TEXT_NODE||t===ZH.ELEMENT_NODE&&!lW.has(n.toLowerCase())})).length){var o=t.selection;if(null!=o){var a=null;yz.isSelectedEmptyParagraph(t)&&!n&&(a=[o.focus.path[0]]),r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;i.forEach(function(e){var n=e.nodeType,r=e.nodeName,i=e.textContent,o=void 0===i?"":i;if(n!==ZH.TEXT_NODE)if("BR"!==r){var a=e,l=!1;if(w$.includes(r.toLowerCase()))l=!0;else for(var u in E$)if(a.matches(u)){l=!0;break}if(l){var c=eW(DD(a),t);return Array.isArray(c)?(c.forEach(function(e){return uW(t,e)}),s++):(uW(t,c),s++),void(yz.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(a).display;yz.isSelectedEmptyParagraph(t)||f.indexOf("inline")<0&&t.insertBreak(),t.dangerouslyInsertHtml(a.innerHTML,!0)}else t.insertText("\n");else{if(!o||!o.trim())return;t.insertNode({text:o})}}),s&&a&&yz.isEmptyPath(t,a)&&h_.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),i=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var o=nW(t,e);if(h_.insertFragment(t,o),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(i))}catch(a){t.select(SS.start(t,[]))}},t}(function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in xz)e.push(t);return e},t.getConfig=function(){var e=FH.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t}((t=cW((()=>{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of SS.pathRefs(e))LS.transform(n,t);for(var r of SS.pointRefs(e))jS.transform(r,t);for(var i of SS.rangeRefs(e))$S.transform(i,t);var o=new Set,a=[],s=e=>{if(e){var t=e.join(",");o.has(t)||(o.add(t),a.push(e))}},l=Nk.get(e)||[],u=(e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":var{path:t}=e;return BS.levels(t);case"insert_node":var{node:n,path:r}=e;return[...BS.levels(r),...YS.isText(n)?[]:Array.from(OS.nodes(n),e=>{var[,t]=e;return r.concat(t)})];case"merge_node":var{path:i}=e;return[...BS.ancestors(i),BS.previous(i)];case"move_node":var{path:o,newPath:a}=e;if(BS.equals(o,a))return[];var s=[],l=[];for(var u of BS.ancestors(o)){var c=BS.transform(u,e);s.push(c)}for(var f of BS.ancestors(a)){var d=BS.transform(f,e);l.push(d)}var h=l[l.length-1],p=a[a.length-1],g=h.concat(p);return[...s,...l,g];case"remove_node":var{path:v}=e;return[...BS.ancestors(v)];case"split_node":var{path:m}=e;return[...BS.levels(m),BS.next(m)];default:return[]}})(t);for(var c of l)s(BS.transform(c,t));for(var f of u)s(f);Nk.set(e,a),h_.transform(e,t),e.operations.push(t),SS.normalize(e),"set_selection"===t.type&&(e.marks=null),Mk.get(e)||(Mk.set(e,!0),Promise.resolve().then(()=>{Mk.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(US.isExpanded(r))h_.setNodes(e,{[t]:n},{match:YS.isText,split:!0});else{var i=$k($k({},SS.marks(e)||{}),{},{[t]:n});e.marks=i,Mk.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&US.isCollapsed(n)&&h_.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&US.isCollapsed(n)&&h_.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&US.isExpanded(n)&&h_.delete(e,{reverse:"backward"===t})},getFragment:()=>{var{selection:t}=e;return t?OS.fragment(e,t):[]},insertBreak:()=>{h_.splitNodes(e,{always:!0})},insertFragment:t=>{h_.insertFragment(e,t)},insertNode:t=>{h_.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var i=$k({text:t},r);h_.insertNodes(e,i)}else h_.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!YS.isText(n))if(bS.isElement(n)&&0===n.children.length)h_.insertNodes(e,{text:""},{at:r.concat(0),voids:!0});else for(var i=!SS.isEditor(n)&&bS.isElement(n)&&(e.isInline(n)||0===n.children.length||YS.isText(n.children[0])||e.isInline(n.children[0])),o=0,a=0;a<n.children.length;a++,o++){var s=OS.get(e,r);if(!YS.isText(s)){var l=n.children[a],u=s.children[o-1],c=a===n.children.length-1;(YS.isText(l)||bS.isElement(l)&&e.isInline(l))!==i?(h_.removeNodes(e,{at:r.concat(o),voids:!0}),o--):bS.isElement(l)?e.isInline(l)&&(null!=u&&YS.isText(u)?c&&(h_.insertNodes(e,{text:""},{at:r.concat(o+1),voids:!0}),o++):(h_.insertNodes(e,{text:""},{at:r.concat(o),voids:!0}),o++)):null!=u&&YS.isText(u)&&(YS.equals(l,u,{loose:!0})?(h_.mergeNodes(e,{at:r.concat(o),voids:!0}),o--):""===u.text?(h_.removeNodes(e,{at:r.concat(o-1),voids:!0}),o--):""===l.text&&(h_.removeNodes(e,{at:r.concat(o),voids:!0}),o--))}}},removeMark:t=>{var{selection:n}=e;if(n)if(US.isExpanded(n))h_.unsetNodes(e,t,{match:YS.isText,split:!0});else{var r=$k({},SS.marks(e)||{});delete r[t],e.marks=r,Mk.get(e)||e.onChange()}}};return e})()),t.id="wangEditor-"+bz++,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(yz.toDOMNode(t,t).focus({preventScroll:!0}),VH.set(t,!0),e){var n=SS.end(t,[]);h_.select(t,n)}else{var r=GH.get(t);r?h_.select(t,r):h_.select(t,SS.start(t,[]))}},t.isFocused=function(){return!!VH.get(t)},t.blur=function(){yz.toDOMNode(t,t).blur(),h_.deselect(t),VH.set(t,!1)},t.updateView=function(){yz.getTextarea(t).changeViewState();var e=yz.getToolbar(t);e&&e.changeToolbarState();var n=yz.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=yz.getTextarea(t);e.destroy(),kH.delete(t),SH.delete(e);var n=yz.getToolbar(t);n&&(n.destroy(),DH.delete(t),_H.delete(n));var r=yz.getHoverbar(t);r&&(r.destroy(),TH.delete(t),AH.delete(r)),t.isDestroyed=!0,t.emit("destroyed")}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=DD("#"+e);if(0!==r.length){var i=r[0];if(!yz.hasDOMNode(t,i))return n="Element (found by id is '"+e+"') is not in editor DOM",n+="\n 通过 id '"+e+"' 找到的 element 不在 editor DOM 之内",void console.error(n,i);var o=yz.getTextarea(t),a=o.$textAreaContainer,s=o.$scroll,l=r.offset().top,u=a.offset().top;s[0].scrollBy({top:l-u,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||yz.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=PH.get(t);null!=e&&e.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return yz.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=yz.getToolbar(t);n&&(e=n.$box);var r=yz.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0])throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致");r.addClass("w-e-full-screen-container");var i=r.css("z-index");r.attr("data-z-index",i.toString()),t.isFullScreen=!0,t.emit("fullScreen")}},t.unFullScreen=function(){if(t.isFullScreen){var e=yz.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit("unFullScreen")},200)}},t.getEditableContainer=function(){return yz.getTextarea(t).$textAreaContainer[0]},t)))))));if(r&&function(e,t){return tW(e,"data-w-e-textarea",t)}(c,r))throw new Error("Repeated create editor by selector '"+r+"'");var f=function(e){void 0===e&&(e={});var t=TO(wz),n={},r=e.MENU_CONF,i=void 0===r?{}:r;return xA(t,function(e,t){n[t]=Ej(Ej({},e),i[t]||{})}),delete e.MENU_CONF,Ej({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert(t+":\n"+e)}},e)}(o);FH.set(c,f);var d=f.hoverbarKeys,h=void 0===d?{}:d;if(u.forEach(function(e){c=e(c)}),null!=s&&(c.children=nW(c,s)),a&&a.length&&(c.children=a),0===c.children.length&&(c.children=[{type:"paragraph",children:[{text:""}]}]),yz.normalizeContent(c),r){var p=new _V(r);kH.set(c,p),SH.set(p,c),p.changeViewState(),g$(function(){var e=p.$scroll;null!=e&&e.height()<300&&console.warn("编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常\nTextarea height < 300px . This may be cause modal and hoverbar position error",e)});var g=void 0;Object.keys(h).length>0&&(g=new qV,AH.set(g,c),TH.set(c,g)),c.on("change",function(){c.hidePanelOrModal()}),c.on("scroll",function(){c.hidePanelOrModal()})}else c.children.forEach(function(e,t){return KV(e,t,c,c)});var v=f.onCreated,m=f.onDestroyed;return v&&c.on("created",function(){return v(c)}),m&&c.on("destroyed",function(){return m(c)}),g$(function(){return c.emit("created")}),c}var XV=kR("splice"),JV=OF.TypeError,ZV=Math.max,QV=Math.min;ON({target:"Array",proto:!0,forced:!XV},{splice:function(e,t){var n,r,i,o,a,s,l=$F(this),u=FL(l),c=uN(e,u),f=arguments.length;if(0===f?n=r=0:1===f?(n=0,r=u-c):(n=f-2,r=QV(ZV(OL(t),0),u-c)),u+n-r>9007199254740991)throw JV("Maximum allowed length exceeded");for(i=VL(l,r),o=0;o<r;o++)(a=c+o)in l&&xM(i,o,l[a]);if(i.length=r,n<r){for(o=c;o<u-r;o++)s=o+n,(a=o+r)in l?l[s]=l[a]:delete l[s];for(o=u;o>u-r+n;o--)delete l[o-1]}else if(n>r)for(o=u-r;o>c;o--)s=o+n-1,(a=o+r-1)in l?l[s]=l[a]:delete l[s];for(o=0;o<n;o++)l[o+c]=arguments[o+2];return l.length=u-r+n,i}});var eG=function(){function e(e,t){var n=this;this.$toolbar=DD('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=AO(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=DD(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '"+e+"'");this.$box=r;var i=this.$toolbar;i.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),r.append(i),g$(function(){n.registerItems(),n.changeToolbarState(),n.getEditorInstance().on("change",n.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,i=r.toolbarKeys,o=void 0===i?[]:i,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,l=r.excludeKeys,u=void 0===l?[]:l,c=TO(o);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach(function(e,t){c.splice(s.index+t,0,e)}));var f=c.filter(function(e){if("string"==typeof e){if(u.includes(e))return!1}else if(u.includes(e.key))return!1;return!0}),d=f.length;f.forEach(function(r,i){if("|"===r){if(0===i)return;if(i+1===d)return;if("|"===t)return;var o=TV();return n.append(o),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"})},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=new UV(e),i=e.menuKeys,o=void 0===i?[]:i,a=this.config.excludeKeys,s=void 0===a?[]:a;o.forEach(function(e){s.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof UV,i=this.menus,o=i[e];if(null==o){var a=xz[e];if(null==a)throw new Error("Not found menu item factory by key '"+e+"'");if("function"!=typeof a)throw new Error("Menu item factory (key='"+e+"') is not a function");o=a(),i[e]=o}else console.warn("Duplicated toolbar menu key '"+e+"'\n重复注册了菜单栏 menu '"+e+"'");var s=VV(e,o,r);this.toolbarItems.push(s),OH.set(s,n),r?t.appendBarItem(s):t.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var e=_H.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}(),tG=uL.EXISTS,nG=jB.f,rG=Function.prototype,iG=jF(rG.toString),oG=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,aG=jF(oG.exec);function sG(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,i=void 0===r?"":r,o=e.maxFileSize,a=void 0===o?10485760:o,s=e.maxNumberOfFiles,l=void 0===s?100:s,u=e.meta,c=void 0===u?{}:u,f=e.metaWithUrl,d=void 0!==f&&f,h=e.headers,p=void 0===h?{}:h,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,w=void 0===b?function(e){return e}:b,x=e.onSuccess,C=void 0===x?function(e,t){}:x,E=e.onError,k=void 0===E?function(e,t,n){console.error(e.name+" upload error",t,n)}:E,S=e.onProgress,_=void 0===S?function(e){}:S;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!i)throw new Error("Cannot get fieldName\n没有配置 fieldName");var D=n;d&&(D=function(e,t){var n=Sj(e.split("#"),2),r=n[0],i=n[1],o=[];xA(t,function(e,t){o.push(t+"="+e)});var a=o.join("&");return r=r.indexOf("?")>0?r+"&"+a:r+"?"+a,i?r+"#"+i:r}(D,c));var A=new eI({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:l},meta:c}).use(kF,{endpoint:D,headers:p,formData:!0,fieldName:i,bundle:!0,withCredentials:v,timeout:y});return A.on("upload-success",function(e,t){var n=t.body,r=void 0===n?{}:n;try{C(e,r)}catch(i){console.error("wangEditor upload file - onSuccess error",i)}A.removeFile(e.id)}),A.on("progress",function(e){e<1||_(e)}),A.on("upload-error",function(e,t,n){try{k(e,t,n)}catch(r){console.error("wangEditor upload file - onError error",r)}A.removeFile(e.id)}),A.on("restriction-failed",function(e,t){try{k(e,t)}catch(n){console.error("wangEditor upload file - onError error",n)}A.removeFile(e.id)}),A}function lG(e){return(lG="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 uG(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),r.forEach(function(t){uG(e,t,n[t])})}return e}function fG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hG(e,t,n){return t&&dG(e.prototype,t),n&&dG(e,n),e}function pG(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gG(e,t){if(t&&("object"===lG(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pG(e)}function vG(e){return(vG=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mG(e,t){return(mG=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yG(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mG(e,t)}pB&&!tG&&nG(rG,"name",{configurable:!0,get:function(){try{return aG(oG,iG(this))[1]}catch(pp){return""}}});var bG={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},wG=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fG(this,e),this.init(t,n)}return hG(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||bG,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,cG({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),xG=function(){function e(){fG(this,e),this.observers={}}return hG(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)}),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter(function(e){return e!==t}):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach(function(e){e.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(t){t.apply(t,[e].concat(n))})}}]),e}();function CG(){var e,t,n=new Promise(function(n,r){e=n,t=r});return n.resolve=e,n.reject=t,n}function EG(e){return null==e?"":""+e}function kG(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function SG(e,t,n){var r=kG(e,t,Object);r.obj[r.k]=n}function _G(e,t){var n=kG(e,t),r=n.obj,i=n.k;if(r)return r[i]}function DG(e,t,n){var r=_G(e,n);return void 0!==r?r:_G(t,n)}function AG(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):AG(e[r],t[r],n):e[r]=t[r]);return e}function TG(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var OG={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function PG(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return OG[e]}):e}var IG="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function FG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];void 0===l&&r.length>o+a;)a++,l=i[s=r.slice(o,o+a).join(n)];if(void 0===l)return;if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s];var u=r.slice(o+a).join(n);return u?FG(l,u,n):void 0}i=i[r[o]]}return i}}var BG=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return fG(this,e),n=gG(this,vG(e).call(this)),IG&&xG.call(pG(n)),n.data=t||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),void 0===n.options.ignoreJSONStructure&&(n.options.ignoreJSONStructure=!0),n}return yG(e,xG),hG(e,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=_G(this.data,a);return s||!o||"string"!=typeof n?s:FG(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),SG(this.data,a,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=_G(this.data,a)||{};r?AG(s,n,i):s=cG({},s,n),SG(this.data,a,s),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?cG({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),e}(),LG={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach(function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))}),t}},NG={},MG=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fG(this,e),n=gG(this,vG(e).call(this)),IG&&xG.call(pG(n)),function(e,t,n){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(function(e){t[e]&&(n[e]=t[e])})}(0,t,pG(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=wG.create("translator"),n}return yG(e,xG),hG(e,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:i};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(t,n,r){var i=this;if("object"!==lG(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(t[t.length-1],n),s=a.key,l=a.namespaces,u=l[l.length-1],c=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(f){var d=n.nsSeparator||this.options.nsSeparator;return u+d+s}return s}var h=this.resolve(t,n),p=h&&h.res,g=h&&h.usedKey||s,v=h&&h.exactUsedKey||s,m=Object.prototype.toString.apply(p),y=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&p&&"string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p&&["[object Number]","[object Function]","[object RegExp]"].indexOf(m)<0&&("string"!=typeof y||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,cG({},n,{ns:l})):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(o){var w="[object Array]"===m,x=w?[]:{},C=w?v:g;for(var E in p)if(Object.prototype.hasOwnProperty.call(p,E)){var k="".concat(C).concat(o).concat(E);x[E]=this.translate(k,cG({},n,{joinArrays:!1,ns:l})),x[E]===k&&(x[E]=p[E])}p=x}}else if(b&&"string"==typeof y&&"[object Array]"===m)(p=p.join(y))&&(p=this.extendTranslation(p,t,n,r));else{var S=!1,_=!1,D=void 0!==n.count&&"string"!=typeof n.count,A=e.hasDefaultValue(n),T=D?this.pluralResolver.getSuffix(c,n.count):"",O=n["defaultValue".concat(T)]||n.defaultValue;!this.isValidLookup(p)&&A&&(S=!0,p=O),this.isValidLookup(p)||(_=!0,p=s);var P=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&_?void 0:p,I=A&&O!==p&&this.options.updateMissing;if(_||S||I){if(this.logger.log(I?"updateKey":"missingKey",c,u,s,I?O:p),o){var F=this.resolve(s,cG({},n,{keySeparator:!1}));F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&L&&L[0])for(var N=0;N<L.length;N++)B.push(L[N]);else"all"===this.options.saveMissingTo?B=this.languageUtils.toResolveHierarchy(n.lng||this.language):B.push(n.lng||this.language);var M=function(e,t,r){i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,t,I?r:P,I,n):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,t,I?r:P,I,n),i.emit("missingKey",e,u,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?B.forEach(function(e){i.pluralResolver.getSuffixes(e).forEach(function(t){M([e],s+t,n["defaultValue".concat(t)]||O)})}):M(B,s,O))}p=this.extendTranslation(p,t,n,h,r),_&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(u,":").concat(s)),(_||S)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(cG({},n,{interpolation:cG({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=cG({},this.options.interpolation.defaultVariables,u)),e=this.interpolator.interpolate(e,u,n.lng||this.language,n),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))},n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=LG.handle(d,e,t,this.options&&this.options.postProcessPassResolved?cG({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),u=l.key;n=u;var c=l.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach(function(e){a.isValidLookup(t)||(o=e,!NG["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(o)&&(NG["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(function(n){if(!a.isValidLookup(t)){i=n;var o,l,c=u,h=[c];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(h,u,n,e,s):(f&&(o=a.pluralResolver.getSuffix(n,s.count)),f&&d&&h.push(c+o),d&&h.push(c+="".concat(a.options.contextSeparator).concat(s.context)),f&&h.push(c+=o));l=h.pop();)a.isValidLookup(t)||(r=l,t=a.getResource(n,e,l,s))}}))})}}),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),e}();function RG(e){return e.charAt(0).toUpperCase()+e.slice(1)}var jG=function(){function e(t){fG(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wG.create("languageUtils")}return hG(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map(function(e){return e.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=RG(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=RG(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=RG(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach(function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}}),!t&&this.options.supportedLngs&&e.forEach(function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find(function(e){if(0===e.indexOf(r))return e})}}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach(function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))}),i}}]),e}(),HG=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],zG={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},UG=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fG(this,e),this.languageUtils=t,this.options=n,this.logger=wG.create("pluralResolver"),this.rules=function(){var e={};return HG.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:zG[t.fc]}})}),e}()}return hG(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map(function(e){return t+e})}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map(function(n){return t.getSuffix(e,n)}):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var i=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),o=r.numbers[i];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),$G=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};fG(this,e),this.logger=wG.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return hG(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:PG,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?TG(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?TG(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?TG(t.nestingPrefix):t.nestingPrefixEscaped||TG("$t("),this.nestingSuffix=t.nestingSuffix?TG(t.nestingSuffix):t.nestingSuffixEscaped||TG(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var i=DG(t,l,e);return s.alwaysFormat?s.format(i,void 0,n,cG({},r,t,{interpolationkey:e})):i}var o=e.split(s.formatSeparator),a=o.shift().trim(),u=o.join(s.formatSeparator).trim();return s.format(DG(t,l,a),u,n,cG({},r,t,{interpolationkey:a}))};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach(function(t){for(a=0;i=t.regex.exec(e);){if(void 0===(o=c(i[1].trim())))if("function"==typeof f){var n=f(e,i,r);o="string"==typeof n?n:""}else{if(d){o=i[0];continue}s.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o=""}else"string"==typeof o||s.useRawValueToEscape||(o=EG(o));var l=t.safeValue(o);if(e=e.replace(i[0],l),d?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}}),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=cG({},o);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0],i=(i=this.interpolate(i,a)).replace(/'/g,'"');try{a=JSON.parse(i),t&&(a=cG({},t,a))}catch(o){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),o),"".concat(e).concat(n).concat(i)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(e){return e.trim()});n[1]=c.shift(),l=c,u=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=EG(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),u&&(r=l.reduce(function(e,t){return i.format(e,t,o.lng,cG({},o,{interpolationkey:n[1].trim()}))},r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),WG=function(){function e(t,n,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return fG(this,e),i=gG(this,vG(e).call(this)),IG&&xG.call(pG(i)),i.backend=t,i.store=n,i.services=r,i.languageUtils=r.languageUtils,i.options=o,i.logger=wG.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(r,o.backend,o),i}return yG(e,xG),hG(e,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o=[],a=[],s=[],l=[];return e.forEach(function(e){var r=!0;t.forEach(function(t){var s="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[s]=2:i.state[s]<0||(1===i.state[s]?a.indexOf(s)<0&&a.push(s):(i.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),o.indexOf(s)<0&&o.push(s),l.indexOf(t)<0&&l.push(t)))}),r||s.push(e)}),(o.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:o,pending:a,toLoadLanguages:s,toLoadNamespaces:l}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var a={};this.queue.forEach(function(n){var r,s,l,u,c;r=n.loaded,s=o,(u=(l=kG(r,[i],Object)).obj)[c=l.k]=u[c]||[],u[c].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach(function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach(function(t){a[e].indexOf(t)<0&&a[e].push(t)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(function(e){return!e.done})}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,function(s,l){s&&l&&i<5?setTimeout(function(){r.read.call(r,e,t,n,i+1,2*o,a)},o):a(s,l)}):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(e){n.loadOne(e)})}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),a),t.loaded(e,r,a)})}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,cG({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),e}();function VG(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function GG(){}var qG=function(){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(fG(this,e),t=gG(this,vG(e).call(this)),IG&&xG.call(pG(t)),t.options=VG(n),t.services={},t.logger=wG,t.modules={external:[]},r&&!t.isInitialized&&!n.isClone){if(!t.options.initImmediate)return t.init(n,r),gG(t,pG(t));setTimeout(function(){t.init(n,r)},0)}return t}return yG(e,xG),hG(e,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=cG({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===lG(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===lG(e[2])||"object"===lG(e[3])){var n=e[3]||e[2];Object.keys(n).forEach(function(e){t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,VG(t)),this.format=this.options.interpolation.format,n||(n=GG),!this.options.isClone){this.modules.logger?wG.init(r(this.modules.logger),this.options):wG.init(null,this.options);var i=new jG(this.options);this.store=new BG(this.options.resources,this.options);var o=this.services;o.logger=wG,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new UG(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new $G(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new WG(r(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))}),this.modules.languageDetector&&(o.languageDetector=r(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=r(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new MG(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))}),this.modules.external.forEach(function(t){t.init&&t.init(e)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}});var s=CG(),l=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:GG,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var i=[],o=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach(function(e){i.indexOf(e)<0&&i.push(e)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(e){return o(e)}),this.options.preload&&this.options.preload.forEach(function(e){return o(e)}),this.services.backendConnector.load(i,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=CG();return e||(e=this.languages),t||(t=this.options.ns),n||(n=GG),this.services.backendConnector.reload(e,t,function(e){r.resolve(),n(e)}),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&LG.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=CG();this.emit("languageChanging",e);var i=function(i){e||i||!n.services.languageDetector||(i=[]);var o="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,function(e){var i,a;i=e,(a=o)?(n.language=a,n.languages=n.services.languageUtils.toResolveHierarchy(a),n.translator.changeLanguage(a),n.isLanguageChangingTo=void 0,n.emit("languageChanged",a),n.logger.log("languageChanged",a)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),t&&t(i,function(){return n.t.apply(n,arguments)})})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==lG(i)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([t,i].concat(s))}else o=cG({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns;var u=r.options.keySeparator||".",c=n?"".concat(n).concat(u).concat(t):t;return r.t(c,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||i&&!a(o,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=CG();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),this.loadResources(function(e){r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=CG();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter(function(e){return r.indexOf(e)<0});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(e){n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new e(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:GG,i=cG({},this.options,n,{isClone:!0}),o=new e(i);return["store","services","language"].forEach(function(e){o[e]=t[e]}),o.services=cG({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new MG(o.services,o.options),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))}),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),e}(),KG=new qG;function YG(e,t){KG.addResourceBundle(e,"translation",t,!0,!0)}KG.init({lng:"zh-CN",resources:{}});var XG=KG.t.bind(KG);YG("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),YG("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var JG=cw?{}.toString:function(){return"[object "+pw(this)+"]"};cw||Ib(Object.prototype,"toString",JG,{unsafe:!0});Array.isArray;var ZG,QG=function(){},eq=[],tq=fy("Reflect","construct"),nq=/^\s*(?:class|function)\b/,rq=Qm(nq.exec),iq=!nq.exec(QG),oq=function(e){if(!uy(e))return!1;try{return tq(QG,eq,e),!0}catch(t){return!1}},aq=(!tq||Hm(function(){var e;return oq(oq.call)||!oq(Object)||!oq(function(){e=!0})||e}),Vy("species"),jm.Array,Qm([].push),function(e,t,n,r){for(var i=By(e),o=oy(i),a=Cx(t,n),s=zb(o),l=0,u=void 0;s>l;l++)l in o&&a(o[l],l,i);return u}),sq=(ZG=[].forEach)&&Hm(function(){ZG.call(null,function(){throw 1},1)})?[].forEach:function(e){return aq(this,e,arguments.length>1?arguments[1]:void 0)},lq=function(e){if(e&&e.forEach!==sq)try{ub(e,"forEach",sq)}catch(t){e.forEach=sq}};for(var uq in pC)pC[uq]&&lq(jm[uq]&&jm[uq].prototype);lq(mC),YG("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"}}),YG("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"}});var cq={type:"paragraph",renderElem:function(e,t,n){return vT("p",null,t)}},fq="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function dq(e){var t={exports:{}};return e(t,t.exports),t.exports}var hq,pq,gq=function(e){return e&&e.Math==Math&&e},vq=gq("object"==typeof globalThis&&globalThis)||gq("object"==typeof window&&window)||gq("object"==typeof self&&self)||gq("object"==typeof fq&&fq)||function(){return this}()||Function("return this")(),mq=function(e){try{return!!e()}catch(t){return!0}},yq=!mq(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),bq=Function.prototype.call,wq=bq.bind?bq.bind(bq):function(){return bq.apply(bq,arguments)},xq={}.propertyIsEnumerable,Cq=Object.getOwnPropertyDescriptor,Eq=Cq&&!xq.call({1:2},1)?function(e){var t=Cq(this,e);return!!t&&t.enumerable}:xq,kq={f:Eq},Sq=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_q=Function.prototype,Dq=_q.bind,Aq=_q.call,Tq=Dq&&Dq.bind(Aq),Oq=Dq?function(e){return e&&Tq(Aq,e)}:function(e){return e&&function(){return Aq.apply(e,arguments)}},Pq=Oq({}.toString),Iq=Oq("".slice),Fq=function(e){return Iq(Pq(e),8,-1)},Bq=vq.Object,Lq=Oq("".split),Nq=mq(function(){return!Bq("z").propertyIsEnumerable(0)})?function(e){return"String"==Fq(e)?Lq(e,""):Bq(e)}:Bq,Mq=vq.TypeError,Rq=function(e){if(null==e)throw Mq("Can't call method on "+e);return e},jq=function(e){return Nq(Rq(e))},Hq=function(e){return"function"==typeof e},zq=function(e){return"object"==typeof e?null!==e:Hq(e)},Uq=function(e,t){return arguments.length<2?function(e){return Hq(e)?e:void 0}(vq[e]):vq[e]&&vq[e][t]},$q=Oq({}.isPrototypeOf),Wq=Uq("navigator","userAgent")||"",Vq=vq.process,Gq=vq.Deno,qq=Vq&&Vq.versions||Gq&&Gq.version,Kq=qq&&qq.v8;Kq&&(pq=(hq=Kq.split("."))[0]>0&&hq[0]<4?1:+(hq[0]+hq[1])),!pq&&Wq&&(!(hq=Wq.match(/Edge\/(\d+)/))||hq[1]>=74)&&(hq=Wq.match(/Chrome\/(\d+)/))&&(pq=+hq[1]);var Yq=pq,Xq=!!Object.getOwnPropertySymbols&&!mq(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Yq&&Yq<41}),Jq=Xq&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Zq=vq.Object,Qq=Jq?function(e){return"symbol"==typeof e}:function(e){var t=Uq("Symbol");return Hq(t)&&$q(t.prototype,Zq(e))},eK=vq.String,tK=function(e){try{return eK(e)}catch(t){return"Object"}},nK=vq.TypeError,rK=function(e){if(Hq(e))return e;throw nK(tK(e)+" is not a function")},iK=function(e,t){var n=e[t];return null==n?void 0:rK(n)},oK=vq.TypeError,aK=Object.defineProperty,sK=function(e,t){try{aK(vq,e,{value:t,configurable:!0,writable:!0})}catch(ZG){vq[e]=t}return t},lK=vq["__core-js_shared__"]||sK("__core-js_shared__",{}),uK=dq(function(e){(e.exports=function(e,t){return lK[e]||(lK[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),cK=vq.Object,fK=function(e){return cK(Rq(e))},dK=Oq({}.hasOwnProperty),hK=Object.hasOwn||function(e,t){return dK(fK(e),t)},pK=0,gK=Math.random(),vK=Oq(1..toString),mK=function(e){return"Symbol("+(void 0===e?"":e)+")_"+vK(++pK+gK,36)},yK=uK("wks"),bK=vq.Symbol,wK=bK&&bK.for,xK=Jq?bK:bK&&bK.withoutSetter||mK,CK=function(e){if(!hK(yK,e)||!Xq&&"string"!=typeof yK[e]){var t="Symbol."+e;Xq&&hK(bK,e)?yK[e]=bK[e]:yK[e]=Jq&&wK?wK(t):xK(t)}return yK[e]},EK=vq.TypeError,kK=CK("toPrimitive"),SK=function(e){var t=function(e){if(!zq(e)||Qq(e))return e;var t,n=iK(e,kK);if(n){if(t=wq(n,e,"string"),!zq(t)||Qq(t))return t;throw EK("Can't convert object to primitive value")}return function(e){var t,n;if(Hq(t=e.toString)&&!zq(n=wq(t,e)))return n;if(Hq(t=e.valueOf)&&!zq(n=wq(t,e)))return n;throw oK("Can't convert object to primitive value")}(e)}(e);return Qq(t)?t:t+""},_K=vq.document,DK=zq(_K)&&zq(_K.createElement),AK=function(e){return DK?_K.createElement(e):{}},TK=!yq&&!mq(function(){return 7!=Object.defineProperty(AK("div"),"a",{get:function(){return 7}}).a}),OK=Object.getOwnPropertyDescriptor,PK={f:yq?OK:function(e,t){if(e=jq(e),t=SK(t),TK)try{return OK(e,t)}catch(n){}if(hK(e,t))return Sq(!wq(kq.f,e,t),e[t])}},IK=vq.String,FK=vq.TypeError,BK=function(e){if(zq(e))return e;throw FK(IK(e)+" is not an object")},LK=vq.TypeError,NK=Object.defineProperty,MK={f:yq?NK:function(e,t,n){if(BK(e),t=SK(t),BK(n),TK)try{return NK(e,t,n)}catch(r){}if("get"in n||"set"in n)throw LK("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},RK=yq?function(e,t,n){return MK.f(e,t,Sq(1,n))}:function(e,t,n){return e[t]=n,e},jK=Oq(Function.toString);Hq(lK.inspectSource)||(lK.inspectSource=function(e){return jK(e)});var HK,zK,UK,$K=lK.inspectSource,WK=vq.WeakMap,VK=Hq(WK)&&/native code/.test($K(WK)),GK=uK("keys"),qK=function(e){return GK[e]||(GK[e]=mK(e))},KK={},YK=vq.TypeError,XK=vq.WeakMap;if(VK||lK.state){var JK=lK.state||(lK.state=new XK),ZK=Oq(JK.get),QK=Oq(JK.has),eY=Oq(JK.set);HK=function(e,t){if(QK(JK,e))throw new YK("Object already initialized");return t.facade=e,eY(JK,e,t),t},zK=function(e){return ZK(JK,e)||{}},UK=function(e){return QK(JK,e)}}else{var tY=qK("state");KK[tY]=!0,HK=function(e,t){if(hK(e,tY))throw new YK("Object already initialized");return t.facade=e,RK(e,tY,t),t},zK=function(e){return hK(e,tY)?e[tY]:{}},UK=function(e){return hK(e,tY)}}var nY={get:zK,enforce:function(e){return UK(e)?zK(e):HK(e,{})}},rY=Function.prototype,iY=yq&&Object.getOwnPropertyDescriptor,oY=hK(rY,"name"),aY={EXISTS:oY,PROPER:oY&&"something"===function(){}.name,CONFIGURABLE:oY&&(!yq||yq&&iY(rY,"name").configurable)},sY=dq(function(e){var t=aY.CONFIGURABLE,n=nY.get,r=nY.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;Hq(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!hK(o,"name")||t&&o.name!==f)&&RK(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==vq?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:RK(e,n,o)):u?e[n]=o:sK(n,o)})(Function.prototype,"toString",function(){return Hq(this)&&n(this).source||$K(this)})}),lY=Math.ceil,uY=Math.floor,cY=function(e){var t=+e;return t!=t||0===t?0:(t>0?uY:lY)(t)},fY=Math.max,dY=Math.min,hY=function(e,t){var n=cY(e);return n<0?fY(n+t,0):dY(n,t)},pY=Math.min,gY=function(e){return e>0?pY(cY(e),9007199254740991):0},vY=function(e){return gY(e.length)},mY=function(e){return function(t,n,r){var i,o=jq(t),a=vY(o),s=hY(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},yY={includes:mY(!0),indexOf:mY(!1)},bY=yY.indexOf,wY=Oq([].push),xY=function(e,t){var n,r=jq(e),i=0,o=[];for(n in r)!hK(KK,n)&&hK(r,n)&&wY(o,n);for(;t.length>i;)hK(r,n=t[i++])&&(~bY(o,n)||wY(o,n));return o},CY=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],EY=CY.concat("length","prototype"),kY={f:Object.getOwnPropertyNames||function(e){return xY(e,EY)}},SY={f:Object.getOwnPropertySymbols},_Y=Oq([].concat),DY=Uq("Reflect","ownKeys")||function(e){var t=kY.f(BK(e)),n=SY.f;return n?_Y(t,n(e)):t},AY=function(e,t){for(var n=DY(t),r=MK.f,i=PK.f,o=0;o<n.length;o++){var a=n[o];hK(e,a)||r(e,a,i(t,a))}},TY=/#|\.prototype\./,OY=function(e,t){var n=IY[PY(e)];return n==BY||n!=FY&&(Hq(t)?mq(t):!!t)},PY=OY.normalize=function(e){return String(e).replace(TY,".").toLowerCase()},IY=OY.data={},FY=OY.NATIVE="N",BY=OY.POLYFILL="P",LY=OY,NY=PK.f,MY=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?vq:u?vq[s]||sK(s,{}):(vq[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=NY(n,r))&&a.value:n[r],!LY(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;AY(o,i)}(e.sham||i&&i.sham)&&RK(o,"sham",!0),sY(n,r,o,e)}},RY=Oq(Oq.bind),jY=Array.isArray||function(e){return"Array"==Fq(e)},HY={};HY[CK("toStringTag")]="z";var zY="[object z]"===String(HY),UY=CK("toStringTag"),$Y=vq.Object,WY="Arguments"==Fq(function(){return arguments}()),VY=zY?Fq:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=$Y(e),UY))?n:WY?Fq(t):"Object"==(r=Fq(t))&&Hq(t.callee)?"Arguments":r},GY=function(){},qY=[],KY=Uq("Reflect","construct"),YY=/^\s*(?:class|function)\b/,XY=Oq(YY.exec),JY=!YY.exec(GY),ZY=function(e){if(!Hq(e))return!1;try{return KY(GY,qY,e),!0}catch(t){return!1}},QY=!KY||mq(function(){var e;return ZY(ZY.call)||!ZY(Object)||!ZY(function(){e=!0})||e})?function(e){if(!Hq(e))return!1;switch(VY(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return JY||!!XY(YY,$K(e))}:ZY,eX=CK("species"),tX=vq.Array,nX=function(e,t){return new(jY(n=e)&&(r=n.constructor,(QY(r)&&(r===tX||jY(r.prototype))||zq(r)&&null===(r=r[eX]))&&(r=void 0)),void 0===r?tX:r)(0===t?0:t);var n,r},rX=Oq([].push),iX=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=fK(l),g=Nq(p),v=function(e,t){return rK(e),void 0===t?e:RY?RY(e,t):function(){return e.apply(t,arguments)}}(u,c),m=vY(g),y=0,b=f||nX,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:rX(w,d)}else switch(e){case 4:return!1;case 7:rX(w,d)}return o?-1:r||i?i:w}},oX={forEach:iX(0),map:iX(1),filter:iX(2),find:iX(5)},aX=CK("species"),sX=function(e){return Yq>=51||!mq(function(){var t=[];return(t.constructor={})[aX]=function(){return{foo:1}},1!==t[e](Boolean).foo})},lX=oX.filter;MY({target:"Array",proto:!0,forced:!sX("filter")},{filter:function(e){return lX(this,e,arguments.length>1?arguments[1]:void 0)}});var uX=zY?{}.toString:function(){return"[object "+VY(this)+"]"};zY||sY(Object.prototype,"toString",uX,{unsafe:!0});var cX,fX=vq.String,dX=function(e){if("Symbol"===VY(e))throw TypeError("Cannot convert a Symbol value to a string");return fX(e)},hX=function(){var e=BK(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},pX=vq.RegExp,gX=mq(function(){var e=pX("a","y");return e.lastIndex=2,null!=e.exec("abcd")});gX||mq(function(){return!pX("a","y").sticky});var vX={BROKEN_CARET:gX||mq(function(){var e=pX("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),UNSUPPORTED_Y:gX},mX=Object.keys||function(e){return xY(e,CY)},yX=yq?Object.defineProperties:function(e,t){BK(e);for(var n,r=jq(t),i=mX(t),o=i.length,a=0;o>a;)MK.f(e,n=i[a++],r[n]);return e},bX=Uq("document","documentElement"),wX=qK("IE_PROTO"),xX=function(){},CX=function(e){return"<script>"+e+"<\/script>"},EX=function(e){e.write(CX("")),e.close();var t=e.parentWindow.Object;return e=null,t},kX=function(){try{cX=new ActiveXObject("htmlfile")}catch(r){}var e,t;kX="undefined"!=typeof document?document.domain&&cX?EX(cX):((t=AK("iframe")).style.display="none",bX.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(CX("document.F=Object")),e.close(),e.F):EX(cX);for(var n=CY.length;n--;)delete kX.prototype[CY[n]];return kX()};KK[wX]=!0;var SX,_X,DX=Object.create||function(e,t){var n;return null!==e?(xX.prototype=BK(e),n=new xX,xX.prototype=null,n[wX]=e):n=kX(),void 0===t?n:yX(n,t)},AX=vq.RegExp,TX=mq(function(){var e=AX(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),OX=vq.RegExp,PX=mq(function(){var e=OX("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),IX=nY.get,FX=uK("native-string-replace",String.prototype.replace),BX=RegExp.prototype.exec,LX=BX,NX=Oq("".charAt),MX=Oq("".indexOf),RX=Oq("".replace),jX=Oq("".slice),HX=(_X=/b*/g,wq(BX,SX=/a/,"a"),wq(BX,_X,"a"),0!==SX.lastIndex||0!==_X.lastIndex),zX=vX.BROKEN_CARET,UX=void 0!==/()??/.exec("")[1];(HX||UX||zX||TX||PX)&&(LX=function(e){var t,n,r,i,o,a,s,l=this,u=IX(l),c=dX(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=wq(LX,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=zX&&l.sticky,p=wq(hX,l),g=l.source,v=0,m=c;if(h&&(p=RX(p,"y",""),-1===MX(p,"g")&&(p+="g"),m=jX(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==NX(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),UX&&(n=new RegExp("^"+g+"$(?!\\s)",p)),HX&&(r=l.lastIndex),i=wq(BX,h?n:l,m),h?i?(i.input=jX(i.input,v),i[0]=jX(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:HX&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),UX&&i&&i.length>1&&wq(FX,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=DX(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var $X=LX;MY({target:"RegExp",proto:!0,forced:/./.exec!==$X},{exec:$X});var WX=Function.prototype,VX=WX.apply,GX=WX.bind,qX=WX.call,KX="object"==typeof Reflect&&Reflect.apply||(GX?qX.bind(VX):function(){return qX.apply(VX,arguments)}),YX=CK("species"),XX=RegExp.prototype,JX=function(e,t,n,r){var i=CK(e),o=!mq(function(){var t={};return t[i]=function(){return 7},7!=""[e](t)}),a=o&&!mq(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[YX]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});if(!o||!a||n){var s=Oq(/./[i]),l=t(i,""[e],function(e,t,n,r,i){var a=Oq(e),l=t.exec;return l===$X||l===XX.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}});sY(String.prototype,e,l[0]),sY(XX,i,l[1])}r&&RK(XX[i],"sham",!0)},ZX=Oq("".charAt),QX=Oq("".charCodeAt),eJ=Oq("".slice),tJ=function(e,t){var n,r,i=dX(Rq(e)),o=cY(t),a=i.length;return o<0||o>=a?"":(n=QX(i,o))<55296||n>56319||o+1===a||(r=QX(i,o+1))<56320||r>57343?ZX(i,o):eJ(i,o,o+2)},nJ=function(e,t,n){return t+(n?tJ(e,t).length:1)},rJ=Math.floor,iJ=Oq("".charAt),oJ=Oq("".replace),aJ=Oq("".slice),sJ=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lJ=/\$([$&'`]|\d{1,2})/g,uJ=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=lJ;return void 0!==i&&(i=fK(i),l=sJ),oJ(o,l,function(o,l){var u;switch(iJ(l,0)){case"$":return"$";case"&":return e;case"`":return aJ(t,0,n);case"'":return aJ(t,a);case"<":u=i[aJ(l,1,-1)];break;default:var c=+l;if(0===c)return o;if(c>s){var f=rJ(c/10);return 0===f?o:f<=s?void 0===r[f-1]?iJ(l,1):r[f-1]+iJ(l,1):o}u=r[c-1]}return void 0===u?"":u})},cJ=vq.TypeError,fJ=function(e,t){var n=e.exec;if(Hq(n)){var r=wq(n,e,t);return null!==r&&BK(r),r}if("RegExp"===Fq(e))return wq($X,e,t);throw cJ("RegExp#exec called on incompatible receiver")},dJ=CK("replace"),hJ=Math.max,pJ=Math.min,gJ=Oq([].concat),vJ=Oq([].push),mJ=Oq("".indexOf),yJ=Oq("".slice),bJ="$0"==="a".replace(/./,"$0"),wJ=!!/./[dJ]&&""===/./[dJ]("a","$0");JX("replace",function(e,t,n){var r=wJ?"$":"$0";return[function(e,n){var r=Rq(this),i=null==e?void 0:iK(e,dJ);return i?wq(i,e,r,n):wq(t,dX(r),e,n)},function(e,i){var o=BK(this),a=dX(e);if("string"==typeof i&&-1===mJ(i,r)&&-1===mJ(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var l=Hq(i);l||(i=dX(i));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var f=[];;){var d=fJ(o,a);if(null===d)break;if(vJ(f,d),!u)break;""===dX(d[0])&&(o.lastIndex=nJ(a,gY(o.lastIndex),c))}for(var h,p="",g=0,v=0;v<f.length;v++){for(var m=dX((d=f[v])[0]),y=hJ(pJ(cY(d.index),a.length),0),b=[],w=1;w<d.length;w++)vJ(b,void 0===(h=d[w])?h:String(h));var x=d.groups;if(l){var C=gJ([m],b,y,a);void 0!==x&&vJ(C,x);var E=dX(KX(i,void 0,C))}else E=uJ(m,a,y,b,x,i);y>=g&&(p+=yJ(a,g,y)+E,g=y+m.length)}return p+yJ(a,g)}]},!!mq(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!bJ||wJ);var xJ=CK("unscopables"),CJ=Array.prototype;null==CJ[xJ]&&MK.f(CJ,xJ,{configurable:!0,value:DX(null)});var EJ=function(e){CJ[xJ][e]=!0},kJ=oX.find,SJ=!0;"find"in[]&&Array(1).find(function(){SJ=!1}),MY({target:"Array",proto:!0,forced:SJ},{find:function(e){return kJ(this,e,arguments.length>1?arguments[1]:void 0)}}),EJ("find");var _J=CK("match"),DJ=function(e){var t;return zq(e)&&(void 0!==(t=e[_J])?!!t:"RegExp"==Fq(e))},AJ=vq.TypeError,TJ=CK("species"),OJ=function(e,t,n){var r=SK(t);r in e?MK.f(e,r,Sq(0,n)):e[r]=n},PJ=vq.Array,IJ=Math.max,FJ=function(e,t,n){for(var r=vY(e),i=hY(t,r),o=hY(void 0===n?r:n,r),a=PJ(IJ(o-i,0)),s=0;i<o;i++,s++)OJ(a,s,e[i]);return a.length=s,a},BJ=vX.UNSUPPORTED_Y,LJ=Math.min,NJ=[].push,MJ=Oq(/./.exec),RJ=Oq(NJ),jJ=Oq("".slice);JX("split",function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=dX(Rq(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!DJ(e))return wq(t,r,e,i);for(var o,a,s,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,f=new RegExp(e.source,u+"g");(o=wq($X,f,r))&&!((a=f.lastIndex)>c&&(RJ(l,jJ(r,c,o.index)),o.length>1&&o.index<r.length&&KX(NJ,l,FJ(o,1)),s=o[0].length,c=a,l.length>=i));)f.lastIndex===o.index&&f.lastIndex++;return c===r.length?!s&&MJ(f,"")||RJ(l,""):RJ(l,jJ(r,c)),l.length>i?FJ(l,0,i):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:wq(t,this,e,n)}:t,[function(t,n){var i=Rq(this),o=null==t?void 0:iK(t,e);return o?wq(o,t,i,n):wq(r,dX(i),t,n)},function(e,i){var o=BK(this),a=dX(e),s=n(r,o,a,i,r!==t);if(s.done)return s.value;var l,u,c,f=(l=RegExp,void 0===(c=BK(o).constructor)||null==(u=BK(c)[TJ])?l:function(e){if(QY(e))return e;throw AJ(tK(e)+" is not a constructor")}(u)),d=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(BJ?"g":"y"),p=new f(BJ?"^(?:"+o.source+")":o,h),g=void 0===i?4294967295:i>>>0;if(0===g)return[];if(0===a.length)return null===fJ(p,a)?[a]:[];for(var v=0,m=0,y=[];m<a.length;){p.lastIndex=BJ?0:m;var b,w=fJ(p,BJ?jJ(a,m):a);if(null===w||(b=LJ(gY(p.lastIndex+(BJ?m:0)),a.length))===v)m=nJ(a,m,d);else{if(RJ(y,jJ(a,v,m)),y.length===g)return y;for(var x=1;x<=w.length-1;x++)if(RJ(y,w[x]),y.length===g)return y;m=v=b}}return RJ(y,jJ(a,v)),y}]},!!mq(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),BJ);var HJ="\t\n\v\f\r                 \u2028\u2029\ufeff",zJ=Oq("".replace),UJ="["+HJ+"]",$J=RegExp("^"+UJ+UJ+"*"),WJ=RegExp(UJ+UJ+"*$"),VJ={trim:function(e){var t=dX(Rq(e));return t=zJ(t,$J,""),t=zJ(t,WJ,"")}},GJ=aY.PROPER,qJ=VJ.trim;function KJ(e){return 0===DD("<div>"+e+"</div>").children().filter(function(e){return"BR"!==e.tagName}).length}function YJ(e){return 0===e.length?"":e[0].outerHTML}function XJ(e){return e.length?e[0].tagName.toLowerCase():""}function JJ(e,t){for(var n="",r=(e.attr("style")||"").split(";"),i=r.length,o=0;o<i;o++){var a=r[o];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}MY({target:"String",proto:!0,forced:mq(function(){return!!HJ.trim()||"​…᠎"!=="​…᠎".trim()||GJ&&"trim"!==HJ.trim.name})},{trim:function(){return qJ(this)}}),MY({global:!0},{globalThis:vq}),UD&&(DD.fn.css=UD),KD&&(DD.fn.append=KD),YD&&(DD.fn.prepend=YD),AD&&(DD.fn.addClass=AD),TD&&(DD.fn.removeClass=TD),OD&&(DD.fn.hasClass=OD),LD&&(DD.fn.on=LD),ND&&(DD.fn.off=ND),oA&&(DD.fn.focus=oA),PD&&(DD.fn.attr=PD),ID&&(DD.fn.removeAttr=ID),HD&&(DD.fn.hide=HD),zD&&(DD.fn.show=zD),JD&&(DD.fn.parents=JD),FD&&(DD.fn.dataset=FD),BD&&(DD.fn.val=BD),GD&&(DD.fn.text=GD),VD&&(DD.fn.html=VD),QD&&(DD.fn.children=QD),eA&&(DD.fn.remove=eA),ZD&&(DD.fn.find=ZD),MD&&(DD.fn.width=MD),RD&&(DD.fn.height=RD),WD&&(DD.fn.filter=WD),tA&&(DD.fn.empty=tA);var ZJ={selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e);return 0===(t=t.filter(function(e){return!!YS.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}},QJ=function(e,t){return QJ=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},QJ(e,t)};function eZ(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}QJ(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var tZ=function(){return tZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},tZ.apply(this,arguments)};function nZ(e,t,n,r){return new(n||(n=Promise))(function(t,i){function o(e){try{s(r.next(e))}catch(t){i(t)}}function a(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n(function(e){e(r)})).then(o,a)}s((r=r.apply(e,[])).next())})}function rZ(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function iZ(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function oZ(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function aZ(e){var t=oZ(SS.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1)[0];if(null==t)return!1;var n=t[0];if(!bS.isElement(n))return!1;if("paragraph"===n.type)return!1;if(""!==OS.string(n))return!1;var r=n.children,i=void 0===r?[]:r;return!!YS.isText(i[0])&&(h_.setNodes(e,{type:"paragraph"}),!0)}var sZ={renderElems:[cq],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>"+t+"</p>"}}],parseElemsHtml:[ZJ],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward;e.insertText,e.insertBreak;var r=e;return r.deleteBackward=function(e){aZ(r)||t(e)},r.deleteForward=function(e){aZ(r)||n(e)},r}},lZ=/"/g,uZ=Oq("".replace),cZ=function(e,t,n,r){var i=dX(Rq(e)),o="<"+t;return""!==n&&(o+=" "+n+'="'+uZ(dX(r),lZ,"&quot;")+'"'),o+">"+i+"</"+t+">"},fZ=function(e){return mq(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})};function dZ(e,t){var n=t,r=e,i=r.bold,o=r.italic,a=r.underline;return i&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),o&&(n="<em>"+n+"</em>"),a&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function hZ(e,t){return 0!==e.length&&(!!e[0].matches(t)||e.find(t).length>0)}MY({target:"String",proto:!0,forced:fZ("bold")},{bold:function(){return cZ(this,"b","","")}}),MY({target:"String",proto:!0,forced:fZ("italics")},{italics:function(){return cZ(this,"i","","")}}),MY({target:"String",proto:!0,forced:fZ("sub")},{sub:function(){return cZ(this,"sub","","")}}),MY({target:"String",proto:!0,forced:fZ("sup")},{sup:function(){return cZ(this,"sup","","")}});var pZ={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},gZ=AK("span").classList,vZ=gZ&&gZ.constructor&&gZ.constructor.prototype,mZ=vZ===Object.prototype?void 0:vZ,yZ=function(e,t){var n=[][e];return!!n&&mq(function(){n.call(null,t||function(){throw 1},1)})},bZ=oX.forEach,wZ=yZ("forEach")?[].forEach:function(e){return bZ(this,e,arguments.length>1?arguments[1]:void 0)},xZ=function(e){if(e&&e.forEach!==wZ)try{RK(e,"forEach",wZ)}catch(t){e.forEach=wZ}};for(var CZ in pZ)pZ[CZ]&&xZ(vq[CZ]&&vq[CZ].prototype);function EZ(e,t){return null==e.selection||!!oZ(SS.nodes(e,{match:function(t){return"pre"===yz.getNodeType(t)||!!SS.isVoid(e,t)},universal:!0}),1)[0]}function kZ(e,t){Object.keys(t).forEach(function(t){"text"!==t&&SS.removeMark(e,t)})}xZ(mZ),MY({target:"Object",stat:!0,forced:mq(function(){mX(1)})},{keys:function(e){return mX(fK(e))}});var SZ=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=SS.marks(e);return n?n[t]:!!oZ(SS.nodes(e,{match:function(e){return!0===e[t]}}),1)[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return EZ(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach(function(t){return e.removeMark(t)}))},e}(),_Z='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',DZ='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',AZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="bold",t.title=XG("textStyle.bold"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',t.hotkey="mod+b",t}return eZ(t,e),t}(SZ),TZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="code",t.title=XG("textStyle.code"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',t.hotkey="mod+e",t}return eZ(t,e),t}(SZ),OZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="italic",t.title=XG("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return eZ(t,e),t}(SZ),PZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="through",t.title=XG("textStyle.through"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',t.hotkey="mod+shift+x",t}return eZ(t,e),t}(SZ),IZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="underline",t.title=XG("textStyle.underline"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',t.hotkey="mod+u",t}return eZ(t,e),t}(SZ),FZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=XG("textStyle.sub"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return eZ(t,e),t}(SZ),BZ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=XG("textStyle.sup"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return eZ(t,e),t}(SZ),LZ=function(){function e(){this.title=XG("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return EZ(e)},e.prototype.exec=function(e,t){var n,r,i=SS.nodes(e,{match:function(e){return YS.isText(e)},universal:!0});try{for(var o=iZ(i),a=o.next();!a.done;a=o.next())kZ(e,a.value[0])}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e}(),NZ={renderStyle:function(e,t){var n=e,r=n.bold,i=n.italic,o=n.underline,a=n.code,s=n.through,l=n.sub,u=n.sup,c=t;return r&&(c=vT("strong",null,c)),a&&(c=vT("code",null,c)),i&&(c=vT("em",null,c)),o&&(c=vT("u",null,c)),s&&(c=vT("s",null,c)),l&&(c=vT("sub",null,c)),u&&(c=vT("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new AZ}},{key:"underline",factory:function(){return new IZ}},{key:"italic",factory:function(){return new OZ}},{key:"through",factory:function(){return new PZ}},{key:"code",factory:function(){return new TZ}},{key:"sub",factory:function(){return new FZ}},{key:"sup",factory:function(){return new BZ}},{key:"clearStyle",factory:function(){return new LZ}}],styleToHtml:function(e,t){if(!YS.isText(e))return t;if(KJ(t))return dZ(e,t);var n=DD(t);if("br"===XJ(n))return dZ(e,"<br>");var r=n.html();return r=dZ(e,r),n.html(r),YJ(n)},parseStyleHtml:function(e,t,n){var r=DD(e);if(!YS.isText(t))return t;var i=t;return hZ(r,"b,strong")&&(i.bold=!0),hZ(r,"i,em")&&(i.italic=!0),hZ(r,"u")&&(i.underline=!0),hZ(r,"s,strike")&&(i.through=!0),hZ(r,"sub")&&(i.sub=!0),hZ(r,"sup")&&(i.sup=!0),hZ(r,"code")&&(i.code=!0),i}};function MZ(e){return function(t,n,r){return vT("h"+e,null,n)}}var RZ={type:"header1",renderElem:MZ(1)},jZ={type:"header2",renderElem:MZ(2)},HZ={type:"header3",renderElem:MZ(3)},zZ={type:"header4",renderElem:MZ(4)},UZ={type:"header5",renderElem:MZ(5)},$Z=aY.PROPER,WZ=RegExp.prototype,VZ=WZ.toString,GZ=Oq(hX),qZ=mq(function(){return"/a/b"!=VZ.call({source:"a",flags:"b"})}),KZ=$Z&&"toString"!=VZ.name;(qZ||KZ)&&sY(RegExp.prototype,"toString",function(){var e=BK(this),t=dX(e.source),n=e.flags;return"/"+t+"/"+dX(void 0===n&&$q(WZ,e)&&!("flags"in WZ)?GZ(e):n)},{unsafe:!0});var YZ,XZ=vq.TypeError,JZ=function(e){if(DJ(e))throw XZ("The method doesn't accept regular expressions");return e},ZZ=CK("match"),QZ=function(e){var t=/./;try{"/./"[e](t)}catch(ZG){try{return t[ZZ]=!1,"/./"[e](t)}catch(n){}}return!1},eQ=PK.f,tQ=Oq("".startsWith),nQ=Oq("".slice),rQ=Math.min,iQ=QZ("startsWith");function oQ(e){var t=oZ(SS.nodes(e,{match:function(e){return yz.getNodeType(e).startsWith("header")},universal:!0}),1)[0];if(null==t)return"paragraph";var n=oZ(t,1)[0];return yz.getNodeType(n)}function aQ(e){return null==e.selection||!oZ(SS.nodes(e,{match:function(e){var t=yz.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1)[0]}function sQ(e,t){t&&h_.setNodes(e,{type:t})}MY({target:"String",proto:!0,forced:!(!iQ&&(YZ=eQ(String.prototype,"startsWith"),YZ&&!YZ.writable)||iQ)},{startsWith:function(e){var t=dX(Rq(this));JZ(e);var n=gY(rQ(arguments.length>1?arguments[1]:void 0,t.length)),r=dX(e);return tQ?tQ(t,r,n):nQ(t,n,n+r.length)===r}});var lQ=function(){function e(){this.title=XG("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(e){var t=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"paragraph",text:XG("header.text")}],n=this.getValue(e).toString();return t.forEach(function(e){e.value===n?e.selected=!0:delete e.selected}),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return oQ(e)},e.prototype.isDisabled=function(e){return aQ(e)},e.prototype.exec=function(e,t){sQ(e,t.toString())},e}(),uQ=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return oQ(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return aQ(e)},e.prototype.exec=function(e,t){var n=this.type;sQ(e,t===n?"paragraph":n)},e}(),cQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="H1",t.type="header1",t}return eZ(t,e),t}(uQ),fQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="H2",t.type="header2",t}return eZ(t,e),t}(uQ),dQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="H3",t.type="header3",t}return eZ(t,e),t}(uQ),hQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="H4",t.type="header4",t}return eZ(t,e),t}(uQ),pQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="H5",t.type="header5",t}return eZ(t,e),t}(uQ),gQ={key:"headerSelect",factory:function(){return new lQ}},vQ={key:"header1",factory:function(){return new cQ}},mQ={key:"header2",factory:function(){return new fQ}},yQ={key:"header3",factory:function(){return new dQ}},bQ={key:"header4",factory:function(){return new hQ}},wQ={key:"header5",factory:function(){return new pQ}};function xQ(e){return function(t,n){return"<h"+e+">"+n+"</h"+e+">"}}function CQ(e){return function(t,n,r){var i=DD(t);return 0===(n=n.filter(function(e){return!!YS.isText(e)||!!r.isInline(e)})).length&&(n=[{text:i.text().replace(/\s+/gm," ")}]),{type:"header"+e,children:n}}}var EQ={renderElems:[RZ,jZ,HZ,zZ,UZ],elemsToHtml:[{type:"header1",elemToHtml:xQ(1)},{type:"header2",elemToHtml:xQ(2)},{type:"header3",elemToHtml:xQ(3)},{type:"header4",elemToHtml:xQ(4)},{type:"header5",elemToHtml:xQ(5)}],parseElemsHtml:[{selector:"h1:not([data-w-e-type])",parseElemHtml:CQ(1)},{selector:"h2:not([data-w-e-type])",parseElemHtml:CQ(2)},{selector:"h3:not([data-w-e-type])",parseElemHtml:CQ(3)},{selector:"h4:not([data-w-e-type])",parseElemHtml:CQ(4)},{selector:"h5:not([data-w-e-type])",parseElemHtml:CQ(5)}],menus:[gQ,vQ,mQ,yQ,bQ,wQ],editorPlugin:function(e){var t=e.insertBreak;e.insertNode;var n=e;return n.insertBreak=function(){var r=oZ(SS.nodes(n,{match:function(e){return yz.getNodeType(e).startsWith("header")},universal:!0}),1)[0];r&&yz.isSelectionAtLineEnd(e,r[1])?h_.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"}):t()},n}},kQ=Object.assign,SQ=Object.defineProperty,_Q=Oq([].concat),DQ=!kQ||mq(function(){if(yq&&1!==kQ({b:1},kQ(SQ({},"a",{enumerable:!0,get:function(){SQ(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=kQ({},e)[n]||mX(kQ({},t)).join("")!=r})?function(e,t){for(var n=fK(e),r=arguments.length,i=1,o=SY.f,a=kq.f;r>i;)for(var s,l=Nq(arguments[i++]),u=o?_Q(mX(l),o(l)):mX(l),c=u.length,f=0;c>f;)s=u[f++],yq&&!wq(a,l,s)||(n[s]=l[s]);return n}:kQ;function AQ(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}MY({target:"Object",stat:!0,forced:Object.assign!==DQ},{assign:DQ});var TQ={selector:"font",preParseHtml:function(e){var t=DD(e);if("font"!==XJ(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}},OQ=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=SS.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return null==e.selection||!!oZ(SS.nodes(e,{match:function(t){return"pre"===yz.getNodeType(t)||!!SS.isVoid(e,t)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=DD('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var i=DD(r).attr("data-value");"0"===i?SS.removeMark(e,t):SS.addMark(e,t,i)}}),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var i=this.getValue(e),o=e.getMenuConfig(t).colors;(void 0===o?[]:o).forEach(function(e){var t=DD('<div class="color-block" data-value="'+e+'"></div>');t.css("background-color",e);var n=DD('<li data-value="'+e+'"></li>');i===e&&n.addClass("active"),n.append(t),r.append(n)});var a="";"color"===t&&(a=XG("color.default")),"bgColor"===t&&(a=XG("color.clear"));var s=DD('\n <li data-value="0" class="clear">\n <svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>\n '+a+"\n </li>\n ");return r.prepend(s),r[0]},e}(),PQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("color.color"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',t.mark="color",t}return eZ(t,e),t}(OQ),IQ=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("color.bgColor"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',t.mark="bgColor",t}return eZ(t,e),t}(OQ),FQ=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"],BQ={renderStyle:function(e,t){var n=e,r=n.color,i=n.bgColor,o=t;return r&&AQ(o,{color:r}),i&&AQ(o,{backgroundColor:i}),o},styleToHtml:function(e,t){if(!YS.isText(e))return t;var n,r=e,i=r.color,o=r.bgColor;return i||o?((KJ(t)||"span"!==XJ(n=DD(t)))&&(n=DD("<span>"+t+"</span>")),i&&n.css("color",i),o&&n.css("background-color",o),YJ(n)):t},preParseHtml:[TQ],parseStyleHtml:function(e,t,n){var r=DD(e);if(!YS.isText(t))return t;var i=t,o=JJ(r,"color");o&&(i.color=o);var a=JJ(r,"background-color");return a||(a=JJ(r,"background")),a&&(i.bgColor=a),i},menus:[{key:"color",factory:function(){return new PQ},config:{colors:FQ}},{key:"bgColor",factory:function(){return new IQ},config:{colors:FQ}}]},LQ=/^(?:\w+:)?\/\/(\S+)$/,NQ=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,MQ=/^[^\s\.]+\.\S{2,}$/,RQ=yY.includes;function jQ(e){return void 0===e&&(e="r"),e+"-"+CA()}function HQ(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function zQ(e,t,n,r){return nZ(this,0,void 0,function(){var i,o;return rZ(this,function(a){switch(a.label){case 0:return(i=t.getMenuConfig(e).checkLink)?[4,i(n,r)]:[3,2];case 1:if("string"==typeof(o=a.sent()))return t.alert(o,"error"),[2,!1];if(null==o)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function UQ(e,t,n){return nZ(this,0,void 0,function(){var r;return rZ(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function $Q(e){return null==e.selection||!!yz.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)||void 0})}function WQ(e,t){return{type:"link",url:HQ(e),children:t?[{text:t}]:[]}}function VQ(e,t,n){return nZ(this,0,void 0,function(){var r,i,o;return rZ(this,function(a){switch(a.label){case 0:return n?(t||(t=n),e.restoreSelection(),$Q(e)?[2]:[4,zQ("insertLink",e,t,n)]):[2];case 1:return a.sent()?[4,UQ("insertLink",e,n)]:[2];case 2:return r=a.sent(),null==(i=e.selection)||(US.isCollapsed(i)?(e.insertText(" "),o=WQ(r,t),h_.insertNodes(e,o),e.insertFragment([{text:" "}])):SS.string(e,i)!==t?(e.deleteFragment(),o=WQ(r,t),h_.insertNodes(e,o)):(o=WQ(r),h_.wrapNodes(e,o,{split:!0}),h_.collapse(e,{edge:"end"}))),[2]}})})}MY({target:"Array",proto:!0},{includes:function(e){return RQ(this,e,arguments.length>1?arguments[1]:void 0)}}),EJ("includes");var GQ={type:"link",renderElem:function(e,t,n){var r=e,i=r.url,o=r.target;return vT("a",{href:i,target:void 0===o?"_blank":o},t)}},qQ={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e);return 0===(t=t.filter(function(e){return!!YS.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};function KQ(){return jQ("w-e-insert-link")}var YQ=function(){function e(){this.title=XG("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=KQ(),this.urlInputId=KQ(),this.buttonId=KQ()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return $Q(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,i=n.urlInputId,o=n.buttonId,a=oZ(MV(XG("link.text"),r),2),s=a[0],l=DD(a[1]),u=oZ(MV(XG("link.url"),i),2),c=u[0],f=DD(u[1]),d=oZ(RV(o,XG("common.ok")),1)[0];if(null==this.$content){var h=DD("<div></div>");h.on("click","#"+o,function(t){t.preventDefault();var n=h.find("#"+r).val(),o=h.find("#"+i).val();VQ(e,n,o),e.hidePanelOrModal()}),this.$content=h}var p=this.$content;if(p.empty(),p.append(s),p.append(c),p.append(d),null==t||US.isCollapsed(t))l.val("");else{var g=SS.string(e,t);l.val(g)}return f.val(""),setTimeout(function(){l.focus()}),p[0]},e}();function XQ(){return jQ("w-e-update-link")}var JQ=function(){function e(){this.title=XG("link.edit"),this.iconSvg=_Z,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=XQ(),this.buttonId=XQ()}return e.prototype.getSelectedLinkElem=function(e){var t=yz.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return yz.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=oZ(MV(XG("link.url"),t),2),i=r[0],o=DD(r[1]),a=oZ(RV(n,XG("common.ok")),1)[0];if(null==this.$content){var s=DD("<div></div>");s.on("click","button",function(n){n.preventDefault(),e.restoreSelection();var r=yz.getSelectedNodeByType(e,"link"),i=r?OS.string(r):"",o=s.find("#"+t).val();!function(e,t,n){nZ(this,0,void 0,function(){var r,i;return rZ(this,function(o){switch(o.label){case 0:return n?[4,zQ("editLink",e,t,n)]:[2];case 1:return o.sent()?[4,UQ("editLink",e,n)]:[2];case 2:return r=o.sent(),i={url:HQ(r)},h_.setNodes(e,i,{match:function(e){return yz.checkNodeType(e,"link")}}),[2]}})})}(e,i,o),e.hidePanelOrModal()}),this.$content=s}var l=this.$content;l.empty(),l.append(i),l.append(a);var u=this.getValue(e);return o.val(u),setTimeout(function(){o.focus()}),l[0]},e}(),ZQ=function(){function e(){this.title=XG("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==yz.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||h_.unwrapNodes(e,{match:function(e){return yz.checkNodeType(e,"link")}})},e}(),QQ=function(){function e(){this.title=XG("link.view"),this.iconSvg=DZ,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=yz.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '"+t+"'");window.open(t,"_blank")}},e}(),e0={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},t0={renderElems:[GQ],elemsToHtml:[{type:"link",elemToHtml:function(e,t){var n=e,r=n.url,i=n.target;return'<a href="'+r+'" target="'+(void 0===i?"_blank":i)+'">'+t+"</a>"}}],parseElemsHtml:[qQ],menus:[{key:"insertLink",factory:function(){return new YQ},config:e0},{key:"editLink",factory:function(){return new JQ},config:e0},{key:"unLink",factory:function(){return new ZQ}},{key:"viewLink",factory:function(){return new QQ}}],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode;e.insertNode,e.insertText;var i=e;return i.isInline=function(e){return"link"===e.type||t(e)},i.insertData=function(e){var t=e.getData("text/plain");if(function(e){if("string"!=typeof e)return!1;var t=e.match(LQ);if(!t)return!1;var n=t[1];return!(!n||!NQ.test(n)&&!MQ.test(n))}(t)){if(!$Q(i)){var r=i.selection;if(null!=r){var o=SS.string(i,r);VQ(i,o,t)}}}else n(e)},i.normalizeNode=function(e){var t=oZ(e,2),n=t[0],o=t[1];return"link"!==yz.getNodeType(n)?r([n,o]):""===OS.string(n)?h_.removeNodes(i,{at:o}):r([n,o])},i}},n0=Oq(1..valueOf),r0=vq.RangeError,i0=vq.RangeError,o0=vq.String,a0=Math.floor,s0=Oq(function(e){var t=dX(Rq(this)),n="",r=cY(e);if(r<0||r==1/0)throw r0("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}),l0=Oq("".slice),u0=Oq(1..toFixed),c0=function(e,t,n){return 0===t?n:t%2==1?c0(e,t-1,n*e):c0(e*e,t/2,n)},f0=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=a0(i/1e7)},d0=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=a0(r/t),r=r%t*1e7},h0=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=o0(e[t]);n=""===n?r:n+s0("0",7-r.length)+r}return n};function p0(e,t){return"w-e-image-container-"+yz.findKey(e,t).id}MY({target:"Number",proto:!0,forced:mq(function(){return"0.000"!==u0(8e-5,3)||"1"!==u0(.9,0)||"1.25"!==u0(1.255,2)||"1000000000000000128"!==u0(0xde0b6b3a7640080,0)})||!mq(function(){u0({})})},{toFixed:function(e){var t,n,r,i,o=n0(this),a=cY(e),s=[0,0,0,0,0,0],l="",u="0";if(a<0||a>20)throw i0("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return o0(o);if(o<0&&(l="-",o=-o),o>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(o*c0(2,69,1))-69)<0?o*c0(2,-t,1):o/c0(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f0(s,0,n),r=a;r>=7;)f0(s,1e7,0),r-=7;for(f0(s,c0(10,r,1),0),r=t-1;r>=23;)d0(s,1<<23),r-=23;d0(s,1<<r),f0(s,1,1),d0(s,2),u=h0(s)}else f0(s,0,n),f0(s,1<<-t,0),u=h0(s)+s0("0",a);return a>0?l+((i=u.length)<=a?"0."+s0("0",a-i)+u:l0(u,0,i-a)+"."+l0(u,i-a)):l+u}});var g0={type:"image",renderElem:function(e,t,n){var r=e,i=r.src,o=r.alt,a=void 0===o?"":o,s=r.href,l=void 0===s?"":s,u=r.style,c=void 0===u?{}:u,f=c.width,d=void 0===f?"":f,h=c.height,p=void 0===h?"":h,g=yz.isNodeSelected(n,e),v={};d&&(v.width="100%"),p&&(v.height="100%");var m,y,b,w,x,C,E,k=vT("img",{style:v,src:i,alt:a,"data-href":l}),S=n.isDisabled();return g&&!S?function(e,t,n,r){var i=DD("body"),o=p0(e,t),a=r.width,s=r.height,l=0,u=0,c=0,f=!1,d=null,h=MA(function(e){e.preventDefault();var t=e.clientX,n=u+(f?l-t:t-l),r=c*(n/u);null!=d&&(n<=15||r<=15||(d.css("width",n+"px"),d.css("height",r+"px")))},100);function p(n){if(i.off("mousemove",h),null!=d){var r=d.width().toFixed(2),o=d.height().toFixed(2),a={style:tZ(tZ({},t.style),{width:r+"px",height:o+"px"})};h_.setNodes(e,a,{at:yz.findPath(e,t)}),i.off("mouseup",p)}}var g={};return a&&(g.width=a),s&&(g.height=s),vT("div",{id:o,style:g,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(t){var n=DD(t.target);n.hasClass("w-e-image-dragger")&&(t.preventDefault(),(n.hasClass("left-top")||n.hasClass("left-bottom"))&&(f=!0),function(t){d=function(){var e=DD("#"+o);if(0===e.length)throw new Error("Cannot find image container elem");return e}(),l=t;var n=d.find("img");if(0===n.length)throw new Error("Cannot find image elem");u=n.width(),c=n.height(),i.on("mousemove",h),i.on("mouseup",p);var r=yz.getHoverbar(e);r&&r.hideAndClean()}(t.clientX))}}},n,vT("div",{className:"w-e-image-dragger left-top"}),vT("div",{className:"w-e-image-dragger right-top"}),vT("div",{className:"w-e-image-dragger left-bottom"}),vT("div",{className:"w-e-image-dragger right-bottom"}))}(n,e,k,{width:d,height:p}):(m=n,y=e,b=k,C=(w={width:d,height:p}).height,E={},(x=w.width)&&(E.width=x),C&&(E.height=C),vT("div",{id:p0(m,y),style:E,className:"w-e-image-container"},b))}},v0={selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e),i=r.attr("data-href")||"";return i=decodeURIComponent(i),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:i,style:{width:JJ(r,"width"),height:JJ(r,"height")},children:[{text:""}]}}};function m0(e,t,n,r,i){return void 0===r&&(r=""),void 0===i&&(i=""),nZ(this,0,void 0,function(){var o,a;return rZ(this,function(s){switch(s.label){case 0:return(o=t.getMenuConfig(e).checkImage)?[4,o(n,r,i)]:[3,2];case 1:if("string"==typeof(a=s.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];s.label=2;case 2:return[2,!0]}})})}function y0(e,t,n){return nZ(this,0,void 0,function(){var r;return rZ(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function b0(e,t,n,r){return void 0===n&&(n=""),void 0===r&&(r=""),nZ(this,0,void 0,function(){var i,o,a;return rZ(this,function(s){switch(s.label){case 0:return[4,m0("insertImage",e,t,n,r)];case 1:return s.sent()?[4,y0("insertImage",e,t)]:[2];case 2:return i=s.sent(),o={type:"image",src:HQ(i),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),yz.getSelectedNodeByType(e,"image")&&e.move(1),w0(e)||(h_.insertNodes(e,o),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(o)),[2]}})})}function w0(e){var t=e.selection;return null==t||!US.isCollapsed(t)||!!oZ(SS.nodes(e,{match:function(t){var n=yz.getNodeType(t);return"code"===n||"pre"===n||"link"===n||"list-item"===n||!!n.startsWith("header")||"blockquote"===n||!!SS.isVoid(e,t)},universal:!0}),1)[0]}function x0(){return jQ("w-e-insert-image")}var C0=function(){function e(){this.title=XG("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=x0(),this.altInputId=x0(),this.hrefInputId=x0(),this.buttonId=x0()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return w0(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,i=n.altInputId,o=n.hrefInputId,a=n.buttonId,s=oZ(MV(XG("image.src"),r),2),l=s[0],u=DD(s[1]),c=oZ(MV(XG("image.desc"),i),2),f=c[0],d=DD(c[1]),h=oZ(MV(XG("image.link"),o),2),p=h[0],g=DD(h[1]),v=oZ(RV(a,XG("common.ok")),1)[0];if(null==this.$content){var m=DD("<div></div>");m.on("click","#"+a,function(n){n.preventDefault();var a=m.find("#"+r).val().trim(),s=m.find("#"+i).val().trim(),l=m.find("#"+o).val().trim();t.insertImage(e,a,s,l),e.hidePanelOrModal()}),this.$content=m}var y=this.$content;return y.empty(),y.append(l),y.append(f),y.append(p),y.append(v),u.val(""),d.val(""),g.val(""),setTimeout(function(){u.focus()}),y[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||b0(e,t,n,r))},e}(),E0=function(){function e(){this.title=XG("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==yz.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||h_.removeNodes(e,{match:function(e){return yz.checkNodeType(e,"image")}})},e}();function k0(){return jQ("w-e-edit-image")}var S0=function(){function e(){this.title=XG("image.edit"),this.iconSvg=_Z,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=k0(),this.altInputId=k0(),this.hrefInputId=k0(),this.buttonId=k0()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return yz.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"image")},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,i=n.altInputId,o=n.hrefInputId,a=n.buttonId,s=this.getImageNode(e);if(null==s)throw new Error("Not found selected image node");var l=oZ(MV(XG("image.src"),r),2),u=l[0],c=DD(l[1]),f=oZ(MV(XG("image.desc"),i),2),d=f[0],h=DD(f[1]),p=oZ(MV(XG("image.link"),o),2),g=p[0],v=DD(p[1]),m=oZ(RV(a,XG("common.ok")),1)[0];if(null==this.$content){var y=DD("<div></div>");y.on("click","#"+a,function(n){n.preventDefault();var a=y.find("#"+r).val(),s=y.find("#"+i).val(),l=y.find("#"+o).val();t.updateImage(e,a,s,l),e.hidePanelOrModal()}),this.$content=y}var b=this.$content;b.empty(),b.append(u),b.append(d),b.append(g),b.append(m);var w=s,x=w.src,C=w.alt,E=void 0===C?"":C,k=w.href,S=void 0===k?"":k;return c.val(x),h.val(E),v.val(S),setTimeout(function(){c.focus()}),b[0]},e.prototype.updateImage=function(e,t,n,r,i){void 0===n&&(n=""),void 0===r&&(r=""),void 0===i&&(i={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t,n,r,i){void 0===n&&(n=""),void 0===r&&(r=""),void 0===i&&(i={}),nZ(this,0,void 0,function(){var o,a,s,l,u,c;return rZ(this,function(f){switch(f.label){case 0:return[4,m0("editImage",e,t,n,r)];case 1:return f.sent()?[4,y0("editImage",e,t)]:[2];case 2:return o=f.sent(),null==(a=yz.getSelectedNodeByType(e,"image"))||(s=a.style,l={src:o,alt:n,href:r,style:tZ(tZ({},void 0===s?{}:s),i)},h_.setNodes(e,l,{match:function(e){return yz.checkNodeType(e,"image")}}),u=yz.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(u)),[2]}})})}(e,t,n,r,i))},e}(),_0=function(){function e(){this.title=XG("image.viewLink"),this.iconSvg=DZ,this.tag="button"}return e.prototype.getValue=function(e){var t=yz.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '"+t+"'");window.open(t,"_blank")}},e}(),D0=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return yz.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=yz.getHoverbar(e);r&&r.hideAndClean();var i=n.style,o={style:tZ(tZ({},void 0===i?{}:i),{width:this.value,height:""})};h_.setNodes(e,o,{match:function(e){return yz.checkNodeType(e,"image")}})}}},e}(),A0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="30%",t.value="30%",t}return eZ(t,e),t}(D0),T0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="50%",t.value="50%",t}return eZ(t,e),t}(D0),O0=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title="100%",t.value="100%",t}return eZ(t,e),t}(D0),P0={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}},I0={renderElems:[g0],elemsToHtml:[{type:"image",elemToHtml:function(e,t){var n=e,r=n.src,i=n.alt,o=void 0===i?"":i,a=n.href,s=void 0===a?"":a,l=n.style,u=void 0===l?{}:l,c=u.width,f=void 0===c?"":c,d=u.height,h=void 0===d?"":d,p="";return f&&(p+="width: "+f+";"),h&&(p+="height: "+h+";"),'<img src="'+r+'" alt="'+o+'" data-href="'+s+'" style="'+p+'"/>'}}],parseElemsHtml:[v0],menus:[{key:"insertImage",factory:function(){return new C0},config:P0},{key:"deleteImage",factory:function(){return new E0}},{key:"editImage",factory:function(){return new S0},config:P0},{key:"viewImageLink",factory:function(){return new _0}},{key:"imageWidth30",factory:function(){return new A0}},{key:"imageWidth50",factory:function(){return new T0}},{key:"imageWidth100",factory:function(){return new O0}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid;e.insertNode;var r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},F0={type:"todo",renderElem:function(e,t,n){var r=!1;return n.isDisabled()&&(r=!0),vT("div",{style:{margin:"5px 0"}},vT("span",{contentEditable:!1,style:{marginRight:"0.5em"}},vT("input",{type:"checkbox",checked:e.checked,disabled:r,on:{change:function(t){var r=yz.findPath(n,e),i={checked:t.target.checked};h_.setNodes(n,i,{at:r})}}})),vT("span",null,t))}},B0=function(){function e(){this.title=XG("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!yz.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!yz.getSelectedElems(e).some(function(t){if(SS.isVoid(e,t)&&SS.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)||void 0})},e.prototype.exec=function(e,t){var n=this.isActive(e);h_.setNodes(e,{type:n?"paragraph":"todo"})},e}(),L0={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=DD(e);0===(t=t.filter(function(e){return!!YS.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var i=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(i=!0),{type:"todo",checked:i,children:t}}},N0={renderElems:[F0],elemsToHtml:[{type:"todo",elemToHtml:function(e,t){return'<div data-w-e-type="todo"><input type="checkbox" disabled '+(e.checked?"checked":"")+">"+t+"</div>"}}],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=DD(e).find("li"),n=DD('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML=n[0].innerHTML+t[0].innerHTML,n[0]}}],parseElemsHtml:[L0],menus:[{key:"todo",factory:function(){return new B0}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&US.isCollapsed(r)){var i=yz.getSelectedNodeByType(e,"todo");if(i&&0===OS.string(i).length)return void h_.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},M0={type:"blockquote",renderElem:function(e,t,n){return vT("blockquote",null,t)}},R0={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e);return 0===(t=t.filter(function(e){return!!YS.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}},j0=function(){function e(){this.title=XG("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!yz.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){return null==e.selection||!oZ(SS.nodes(e,{match:function(e){var t=yz.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1)[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";h_.setNodes(e,{type:n},{mode:"highest"})}},e}(),H0={key:"blockquote",factory:function(){return new j0}},z0=Oq([].slice),U0=sX("slice"),$0=CK("species"),W0=vq.Array,V0=Math.max;MY({target:"Array",proto:!0,forced:!U0},{slice:function(e,t){var n,r,i,o=jq(this),a=vY(o),s=hY(e,a),l=hY(void 0===t?a:t,a);if(jY(o)&&(n=o.constructor,(QY(n)&&(n===W0||jY(n.prototype))||zq(n)&&null===(n=n[$0]))&&(n=void 0),n===W0||void 0===n))return z0(o,s,l);for(r=new(void 0===n?W0:n)(V0(l-s,0)),i=0;s<l;s++,i++)s in o&&OJ(r,i,o[s]);return r.length=i,r}});var G0={renderElems:[M0],elemsToHtml:[{type:"blockquote",elemToHtml:function(e,t){return"<blockquote>"+t+"</blockquote>"}}],parseElemsHtml:[R0],menus:[H0],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var i=r.selection;if(null==i)return t();var o=oZ(SS.nodes(e,{match:function(e){return yz.checkNodeType(e,"blockquote")},universal:!0}),1)[0];if(!o)return t();var a=o[0],s=yz.findPath(e,a),l=SS.end(e,s);if(RS.equals(l,i.focus)){var u=OS.string(a);if(u&&"\n"===u.slice(-1))return e.deleteBackward("character"),void h_.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n("\n")},r}},q0=function(){function e(){this.title=XG("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!oZ(SS.nodes(e,{match:function(t){return"pre"===yz.getNodeType(t)||!!SS.isVoid(e,t)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=DD('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=DD(n).text();e.insertText(r)}}),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach(function(e){var t=DD("<li>"+e+"</li>");n.append(t)}),n[0]},e}(),K0={menus:[{key:"emotion",factory:function(){return new q0},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]},Y0={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},X0={selector:"font",preParseHtml:function(e){var t=DD(e);if("font"!==XJ(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",Y0[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}},J0=Oq("".indexOf);MY({target:"String",proto:!0,forced:!QZ("includes")},{includes:function(e){return!!~J0(dX(Rq(this)),dX(JZ(e)),arguments.length>1?arguments[1]:void 0)}});var Z0,Q0,e1=function(e){return e&&e.Math==Math&&e},t1=e1("object"==typeof globalThis&&globalThis)||e1("object"==typeof window&&window)||e1("object"==typeof self&&self)||e1("object"==typeof fq&&fq)||function(){return this}()||Function("return this")(),n1=Function.prototype,r1=n1.apply,i1=n1.bind,o1=n1.call,a1="object"==typeof Reflect&&Reflect.apply||(i1?o1.bind(r1):function(){return o1.apply(r1,arguments)}),s1=Function.prototype,l1=s1.bind,u1=s1.call,c1=l1&&l1.bind(u1),f1=l1?function(e){return e&&c1(u1,e)}:function(e){return e&&function(){return u1.apply(e,arguments)}},d1=function(e){return"function"==typeof e},h1=function(e){try{return!!e()}catch(t){return!0}},p1=!h1(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),g1=Function.prototype.call,v1=g1.bind?g1.bind(g1):function(){return g1.apply(g1,arguments)},m1={}.propertyIsEnumerable,y1=Object.getOwnPropertyDescriptor,b1=y1&&!m1.call({1:2},1)?function(e){var t=y1(this,e);return!!t&&t.enumerable}:m1,w1={f:b1},x1=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},C1=f1({}.toString),E1=f1("".slice),k1=function(e){return E1(C1(e),8,-1)},S1=t1.Object,_1=f1("".split),D1=h1(function(){return!S1("z").propertyIsEnumerable(0)})?function(e){return"String"==k1(e)?_1(e,""):S1(e)}:S1,A1=t1.TypeError,T1=function(e){if(null==e)throw A1("Can't call method on "+e);return e},O1=function(e){return D1(T1(e))},P1=function(e){return"object"==typeof e?null!==e:d1(e)},I1={},F1=function(e){return d1(e)?e:void 0},B1=function(e,t){return arguments.length<2?F1(I1[e])||F1(t1[e]):I1[e]&&I1[e][t]||t1[e]&&t1[e][t]},L1=f1({}.isPrototypeOf),N1=B1("navigator","userAgent")||"",M1=t1.process,R1=t1.Deno,j1=M1&&M1.versions||R1&&R1.version,H1=j1&&j1.v8;H1&&(Q0=(Z0=H1.split("."))[0]>0&&Z0[0]<4?1:+(Z0[0]+Z0[1])),!Q0&&N1&&(!(Z0=N1.match(/Edge\/(\d+)/))||Z0[1]>=74)&&(Z0=N1.match(/Chrome\/(\d+)/))&&(Q0=+Z0[1]);var z1=Q0,U1=!!Object.getOwnPropertySymbols&&!h1(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&z1&&z1<41}),$1=U1&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,W1=t1.Object,V1=$1?function(e){return"symbol"==typeof e}:function(e){var t=B1("Symbol");return d1(t)&&L1(t.prototype,W1(e))},G1=t1.String,q1=t1.TypeError,K1=function(e){if(d1(e))return e;throw q1(function(e){try{return G1(e)}catch(t){return"Object"}}(e)+" is not a function")},Y1=t1.TypeError,X1=Object.defineProperty,J1=t1["__core-js_shared__"]||function(e,t){try{X1(t1,e,{value:t,configurable:!0,writable:!0})}catch(ZG){t1[e]=t}return t}("__core-js_shared__",{}),Z1=dq(function(e){(e.exports=function(e,t){return J1[e]||(J1[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"pure",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Q1=t1.Object,e2=function(e){return Q1(T1(e))},t2=f1({}.hasOwnProperty),n2=Object.hasOwn||function(e,t){return t2(e2(e),t)},r2=0,i2=Math.random(),o2=f1(1..toString),a2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o2(++r2+i2,36)},s2=Z1("wks"),l2=t1.Symbol,u2=l2&&l2.for,c2=$1?l2:l2&&l2.withoutSetter||a2,f2=function(e){if(!n2(s2,e)||!U1&&"string"!=typeof s2[e]){var t="Symbol."+e;U1&&n2(l2,e)?s2[e]=l2[e]:s2[e]=$1&&u2?u2(t):c2(t)}return s2[e]},d2=t1.TypeError,h2=f2("toPrimitive"),p2=function(e){var t=function(e){if(!P1(e)||V1(e))return e;var t,n,r=null==(t=e[h2])?void 0:K1(t);if(r){if(n=v1(r,e,"string"),!P1(n)||V1(n))return n;throw d2("Can't convert object to primitive value")}return function(e){var t,n;if(d1(t=e.toString)&&!P1(n=v1(t,e)))return n;if(d1(t=e.valueOf)&&!P1(n=v1(t,e)))return n;throw Y1("Can't convert object to primitive value")}(e)}(e);return V1(t)?t:t+""},g2=t1.document,v2=P1(g2)&&P1(g2.createElement),m2=function(e){return v2?g2.createElement(e):{}},y2=!p1&&!h1(function(){return 7!=Object.defineProperty(m2("div"),"a",{get:function(){return 7}}).a}),b2=Object.getOwnPropertyDescriptor,w2={f:p1?b2:function(e,t){if(e=O1(e),t=p2(t),y2)try{return b2(e,t)}catch(n){}if(n2(e,t))return x1(!v1(w1.f,e,t),e[t])}},x2=/#|\.prototype\./,C2=function(e,t){var n=k2[E2(e)];return n==_2||n!=S2&&(d1(t)?h1(t):!!t)},E2=C2.normalize=function(e){return String(e).replace(x2,".").toLowerCase()},k2=C2.data={},S2=C2.NATIVE="N",_2=C2.POLYFILL="P",D2=C2,A2=f1(f1.bind),T2=function(e,t){return K1(e),void 0===t?e:A2?A2(e,t):function(){return e.apply(t,arguments)}},O2=t1.String,P2=t1.TypeError,I2=function(e){if(P1(e))return e;throw P2(O2(e)+" is not an object")},F2=t1.TypeError,B2=Object.defineProperty,L2={f:p1?B2:function(e,t,n){if(I2(e),t=p2(t),I2(n),y2)try{return B2(e,t,n)}catch(r){}if("get"in n||"set"in n)throw F2("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},N2=p1?function(e,t,n){return L2.f(e,t,x1(1,n))}:function(e,t,n){return e[t]=n,e},M2=w2.f,R2=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return a1(e,this,arguments)};return t.prototype=e.prototype,t},j2=function(e,t){var n,r,i,o,a,s,l,u,c=e.target,f=e.global,d=e.stat,h=e.proto,p=f?t1:d?t1[c]:(t1[c]||{}).prototype,g=f?I1:I1[c]||N2(I1,c,{})[c],v=g.prototype;for(i in t)n=!D2(f?i:c+(d?".":"#")+i,e.forced)&&p&&n2(p,i),a=g[i],n&&(s=e.noTargetGet?(u=M2(p,i))&&u.value:p[i]),o=n&&s?s:t[i],n&&typeof a==typeof o||(l=e.bind&&n?T2(o,t1):e.wrap&&n?R2(o):h&&d1(o)?f1(o):o,(e.sham||o&&o.sham||a&&a.sham)&&N2(l,"sham",!0),N2(g,i,l),h&&(n2(I1,r=c+"Prototype")||N2(I1,r,{}),N2(I1[r],i,o),e.real&&v&&!v[i]&&N2(v,i,o)))},H2=Array.isArray||function(e){return"Array"==k1(e)},z2=Math.ceil,U2=Math.floor,$2=function(e){var t=+e;return t!=t||0===t?0:(t>0?U2:z2)(t)},W2=Math.min,V2=function(e){return(t=e.length)>0?W2($2(t),9007199254740991):0;var t},G2=function(e,t,n){var r=p2(t);r in e?L2.f(e,r,x1(0,n)):e[r]=n},q2={};q2[f2("toStringTag")]="z";var K2="[object z]"===String(q2),Y2=f2("toStringTag"),X2=t1.Object,J2="Arguments"==k1(function(){return arguments}()),Z2=K2?k1:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=X2(e),Y2))?n:J2?k1(t):"Object"==(r=k1(t))&&d1(t.callee)?"Arguments":r},Q2=f1(Function.toString);d1(J1.inspectSource)||(J1.inspectSource=function(e){return Q2(e)});var e4=J1.inspectSource,t4=function(){},n4=[],r4=B1("Reflect","construct"),i4=/^\s*(?:class|function)\b/,o4=f1(i4.exec),a4=!i4.exec(t4),s4=function(e){if(!d1(e))return!1;try{return r4(t4,n4,e),!0}catch(t){return!1}},l4=!r4||h1(function(){var e;return s4(s4.call)||!s4(Object)||!s4(function(){e=!0})||e})?function(e){if(!d1(e))return!1;switch(Z2(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return a4||!!o4(i4,e4(e))}:s4,u4=f2("species"),c4=t1.Array,f4=function(e,t){return new(H2(n=e)&&(r=n.constructor,(l4(r)&&(r===c4||H2(r.prototype))||P1(r)&&null===(r=r[u4]))&&(r=void 0)),void 0===r?c4:r)(0===t?0:t);var n,r},d4=f2("species"),h4=f2("isConcatSpreadable"),p4=t1.TypeError,g4=z1>=51||!h1(function(){var e=[];return e[h4]=!1,e.concat()[0]!==e}),v4=z1>=51||!h1(function(){var e=[];return(e.constructor={})[d4]=function(){return{foo:1}},1!==e.concat(Boolean).foo}),m4=function(e){if(!P1(e))return!1;var t=e[h4];return void 0!==t?!!t:H2(e)};j2({target:"Array",proto:!0,forced:!g4||!v4},{concat:function(e){var t,n,r,i,o,a=e2(this),s=f4(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(m4(o=-1===t?a:arguments[t])){if(l+(i=V2(o))>9007199254740991)throw p4("Maximum allowed index exceeded");for(n=0;n<i;n++,l++)n in o&&G2(s,l,o[n])}else{if(l>=9007199254740991)throw p4("Maximum allowed index exceeded");G2(s,l++,o)}return s.length=l,s}});var y4,b4=t1.String,w4=function(e){if("Symbol"===Z2(e))throw TypeError("Cannot convert a Symbol value to a string");return b4(e)},x4=Math.max,C4=Math.min,E4=function(e,t){var n=$2(e);return n<0?x4(n+t,0):C4(n,t)},k4={indexOf:function(e){return function(t,n,r){var i=O1(t),o=V2(i),a=E4(r,o);for(e;o>a;a++)if(a in i&&i[a]===n)return a||0;return-1}}(!1)},S4={},_4=k4.indexOf,D4=f1([].push),A4=function(e,t){var n,r=O1(e),i=0,o=[];for(n in r)!n2(S4,n)&&n2(r,n)&&D4(o,n);for(;t.length>i;)n2(r,n=t[i++])&&(~_4(o,n)||D4(o,n));return o},T4=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],O4=Object.keys||function(e){return A4(e,T4)},P4=p1?Object.defineProperties:function(e,t){I2(e);for(var n,r=O1(t),i=O4(t),o=i.length,a=0;o>a;)L2.f(e,n=i[a++],r[n]);return e},I4=B1("document","documentElement"),F4=Z1("keys"),B4=function(e){return F4[e]||(F4[e]=a2(e))},L4=B4("IE_PROTO"),N4=function(){},M4=function(e){return"<script>"+e+"<\/script>"},R4=function(e){e.write(M4("")),e.close();var t=e.parentWindow.Object;return e=null,t},j4=function(){try{y4=new ActiveXObject("htmlfile")}catch(r){}var e,t;j4="undefined"!=typeof document?document.domain&&y4?R4(y4):((t=m2("iframe")).style.display="none",I4.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(M4("document.F=Object")),e.close(),e.F):R4(y4);for(var n=T4.length;n--;)delete j4.prototype[T4[n]];return j4()};S4[L4]=!0;var H4,z4,U4,$4=Object.create||function(e,t){var n;return null!==e?(N4.prototype=I2(e),n=new N4,N4.prototype=null,n[L4]=e):n=j4(),void 0===t?n:P4(n,t)},W4=T4.concat("length","prototype"),V4={f:Object.getOwnPropertyNames||function(e){return A4(e,W4)}},G4=t1.Array,q4=Math.max,K4=V4.f,Y4="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],X4={f:function(e){return Y4&&"Window"==k1(e)?function(e){try{return K4(e)}catch(t){return function(e){for(var t=V2(e),n=E4(void 0,t),r=E4(t,t),i=G4(q4(r-n,0)),o=0;n<r;n++,o++)G2(i,o,e[n]);return i.length=o,i}(Y4)}}(e):K4(O1(e))}},J4={f:Object.getOwnPropertySymbols},Z4=f1([].slice),Q4=function(e,t,n,r){N2(e,t,n)},e3={f:f2},t3=L2.f,n3=function(e){var t=I1.Symbol||(I1.Symbol={});n2(t,e)||t3(t,e,{value:e3.f(e)})},r3=K2?{}.toString:function(){return"[object "+Z2(this)+"]"},i3=L2.f,o3=f2("toStringTag"),a3=function(e,t,n,r){if(e){var i=n?e:e.prototype;n2(i,o3)||i3(i,o3,{configurable:!0,value:t}),r&&!K2&&N2(i,"toString",r3)}},s3=t1.WeakMap,l3=d1(s3)&&/native code/.test(e4(s3)),u3=t1.TypeError,c3=t1.WeakMap;if(l3||J1.state){var f3=J1.state||(J1.state=new c3),d3=f1(f3.get),h3=f1(f3.has),p3=f1(f3.set);H4=function(e,t){if(h3(f3,e))throw new u3("Object already initialized");return t.facade=e,p3(f3,e,t),t},z4=function(e){return d3(f3,e)||{}},U4=function(e){return h3(f3,e)}}else{var g3=B4("state");S4[g3]=!0,H4=function(e,t){if(n2(e,g3))throw new u3("Object already initialized");return t.facade=e,N2(e,g3,t),t},z4=function(e){return n2(e,g3)?e[g3]:{}},U4=function(e){return n2(e,g3)}}var v3={set:H4,get:z4,has:U4,enforce:function(e){return U4(e)?z4(e):H4(e,{})},getterFor:function(e){return function(t){var n;if(!P1(t)||(n=z4(t)).type!==e)throw u3("Incompatible receiver, "+e+" required");return n}}},m3=f1([].push),y3=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=e2(l),g=D1(p),v=T2(u,c),m=V2(g),y=0,b=f||f4,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:m3(w,d)}else switch(e){case 4:return!1;case 7:m3(w,d)}return o?-1:r||i?i:w}},b3=[y3(0),y3(1),y3(2),y3(3),y3(4),y3(5),y3(6),y3(7)][0],w3=B4("hidden"),x3=f2("toPrimitive"),C3=v3.set,E3=v3.getterFor("Symbol"),k3=Object.prototype,S3=t1.Symbol,_3=S3&&S3.prototype,D3=t1.TypeError,A3=t1.QObject,T3=B1("JSON","stringify"),O3=w2.f,P3=L2.f,I3=X4.f,F3=w1.f,B3=f1([].push),L3=Z1("symbols"),N3=Z1("op-symbols"),M3=Z1("string-to-symbol-registry"),R3=Z1("symbol-to-string-registry"),j3=Z1("wks"),H3=!A3||!A3.prototype||!A3.prototype.findChild,z3=p1&&h1(function(){return 7!=$4(P3({},"a",{get:function(){return P3(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=O3(k3,t);r&&delete k3[t],P3(e,t,n),r&&e!==k3&&P3(k3,t,r)}:P3,U3=function(e,t){var n=L3[e]=$4(_3);return C3(n,{type:"Symbol",tag:e,description:t}),p1||(n.description=t),n},$3=function(e,t,n){e===k3&&$3(N3,t,n),I2(e);var r=p2(t);return I2(n),n2(L3,r)?(n.enumerable?(n2(e,w3)&&e[w3][r]&&(e[w3][r]=!1),n=$4(n,{enumerable:x1(0,!1)})):(n2(e,w3)||P3(e,w3,x1(1,{})),e[w3][r]=!0),z3(e,r,n)):P3(e,r,n)},W3=function(e,t){I2(e);var n=O1(t),r=O4(n).concat(K3(n));return b3(r,function(t){p1&&!v1(V3,n,t)||$3(e,t,n[t])}),e},V3=function(e){var t=p2(e),n=v1(F3,this,t);return!(this===k3&&n2(L3,t)&&!n2(N3,t))&&(!(n||!n2(this,t)||!n2(L3,t)||n2(this,w3)&&this[w3][t])||n)},G3=function(e,t){var n=O1(e),r=p2(t);if(n!==k3||!n2(L3,r)||n2(N3,r)){var i=O3(n,r);return!i||!n2(L3,r)||n2(n,w3)&&n[w3][r]||(i.enumerable=!0),i}},q3=function(e){var t=I3(O1(e)),n=[];return b3(t,function(e){n2(L3,e)||n2(S4,e)||B3(n,e)}),n},K3=function(e){var t=e===k3,n=I3(t?N3:O1(e)),r=[];return b3(n,function(e){!n2(L3,e)||t&&!n2(k3,e)||B3(r,L3[e])}),r};if(U1||(_3=(S3=function(){if(L1(_3,this))throw D3("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?w4(arguments[0]):void 0,t=a2(e),n=function(e){this===k3&&v1(n,N3,e),n2(this,w3)&&n2(this[w3],t)&&(this[w3][t]=!1),z3(this,t,x1(1,e))};return p1&&H3&&z3(k3,t,{configurable:!0,set:n}),U3(t,e)}).prototype,Q4(_3,"toString",function(){return E3(this).tag}),Q4(S3,"withoutSetter",function(e){return U3(a2(e),e)}),w1.f=V3,L2.f=$3,w2.f=G3,V4.f=X4.f=q3,J4.f=K3,e3.f=function(e){return U3(f2(e),e)},p1&&P3(_3,"description",{configurable:!0,get:function(){return E3(this).description}})),j2({global:!0,wrap:!0,forced:!U1,sham:!U1},{Symbol:S3}),b3(O4(j3),function(e){n3(e)}),j2({target:"Symbol",stat:!0,forced:!U1},{for:function(e){var t=w4(e);if(n2(M3,t))return M3[t];var n=S3(t);return M3[t]=n,R3[n]=t,n},keyFor:function(e){if(!V1(e))throw D3(e+" is not a symbol");if(n2(R3,e))return R3[e]},useSetter:function(){H3=!0},useSimple:function(){H3=!1}}),j2({target:"Object",stat:!0,forced:!U1,sham:!p1},{create:function(e,t){return void 0===t?$4(e):W3($4(e),t)},defineProperty:$3,defineProperties:W3,getOwnPropertyDescriptor:G3}),j2({target:"Object",stat:!0,forced:!U1},{getOwnPropertyNames:q3,getOwnPropertySymbols:K3}),j2({target:"Object",stat:!0,forced:h1(function(){J4.f(1)})},{getOwnPropertySymbols:function(e){return J4.f(e2(e))}}),T3){var Y3=!U1||h1(function(){var e=S3();return"[null]"!=T3([e])||"{}"!=T3({a:e})||"{}"!=T3(Object(e))});j2({target:"JSON",stat:!0,forced:Y3},{stringify:function(e,t,n){var r=Z4(arguments),i=t;if((P1(t)||void 0!==e)&&!V1(e))return H2(t)||(t=function(e,t){if(d1(i)&&(t=v1(i,this,e,t)),!V1(t))return t}),r[1]=t,a1(T3,null,r)}})}if(!_3[x3]){var X3=_3.valueOf;Q4(_3,x3,function(e){return v1(X3,this)})}a3(S3,"Symbol"),S4[w3]=!0,n3("asyncIterator"),n3("hasInstance"),n3("isConcatSpreadable"),n3("iterator"),n3("match"),n3("matchAll"),n3("replace"),n3("search"),n3("species"),n3("split"),n3("toPrimitive"),n3("toStringTag"),n3("unscopables"),a3(t1.JSON,"JSON",!0);var J3,Z3,Q3,e6=I1.Symbol,t6={},n6=Function.prototype,r6=p1&&Object.getOwnPropertyDescriptor,i6=n2(n6,"name"),o6={PROPER:i6&&"something"===function(){}.name,CONFIGURABLE:i6&&(!p1||p1&&r6(n6,"name").configurable)},a6=!h1(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),s6=B4("IE_PROTO"),l6=t1.Object,u6=l6.prototype,c6=a6?l6.getPrototypeOf:function(e){var t=e2(e);if(n2(t,s6))return t[s6];var n=t.constructor;return d1(n)&&t instanceof n?n.prototype:t instanceof l6?u6:null},f6=f2("iterator"),d6=!1;[].keys&&("next"in(Q3=[].keys())?(Z3=c6(c6(Q3)))!==Object.prototype&&(J3=Z3):d6=!0);var h6=null==J3||h1(function(){var e={};return J3[f6].call(e)!==e});J3=h6?{}:$4(J3),d1(J3[f6])||Q4(J3,f6,function(){return this});var p6={IteratorPrototype:J3,BUGGY_SAFARI_ITERATORS:d6},g6=p6.IteratorPrototype,v6=function(){return this};t1.String,t1.TypeError,Object.setPrototypeOf||"__proto__"in{}&&function(){try{f1(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set)({},[])}catch(e){}}();var m6=o6.PROPER,y6=p6.BUGGY_SAFARI_ITERATORS,b6=f2("iterator"),w6=function(){return this},x6=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=$4(g6,{next:x1(1,l)}),a3(s,u,!1,!0),t6[u]=v6;var c,f,d=function(e){if(e===i&&m)return m;if(!y6&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[b6]||g["@@iterator"]||i&&g[i],m=!y6&&v||d(i),y="Array"==t&&g.entries||v;return y&&(c=c6(y.call(new e)))!==Object.prototype&&c.next&&(a3(c,h,!0,!0),t6[h]=w6),m6&&"values"==i&&v&&"values"!==v.name&&(p=!0,m=function(){return v1(v,this)}),i&&(f={values:d("values"),keys:d("keys"),entries:d("entries")},a||j2({target:t,proto:!0,forced:y6||p},f)),t6[t]=m,f},C6=v3.set,E6=v3.getterFor("Array Iterator");x6(Array,"Array",function(e,t){C6(this,{type:"Array Iterator",target:O1(e),index:0,kind:t})},function(){var e=E6(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),t6.Arguments=t6.Array;var k6=f2("toStringTag");for(var S6 in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var _6=t1[S6],D6=_6&&_6.prototype;D6&&Z2(D6)!==k6&&N2(D6,k6,S6),t6[S6]=t6.Array}var A6=e6;n3("asyncDispose"),n3("dispose"),n3("matcher"),n3("metadata"),n3("observable"),n3("patternMatch"),n3("replaceAll");var T6=A6,O6=f1("".charAt),P6=f1("".charCodeAt),I6=f1("".slice),F6=function(e,t){var n,r,i=w4(T1(e)),o=$2(t),a=i.length;return o<0||o>=a?"":(n=P6(i,o))<55296||n>56319||o+1===a||(r=P6(i,o+1))<56320||r>57343?O6(i,o):I6(i,o,o+2)},B6=v3.set,L6=v3.getterFor("String Iterator");x6(String,"String",function(e){B6(this,{type:"String Iterator",string:w4(e),index:0})},function(){var e,t=L6(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=F6(n,r),t.index+=e.length,{value:e,done:!1})});var N6=e3.f("iterator"),M6=dq(function(e){function t(n){return"function"==typeof T6&&"symbol"==typeof N6?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof T6&&e.constructor===T6&&e!==T6.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),R6=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(M6),j6=aY.EXISTS,H6=MK.f,z6=Function.prototype,U6=Oq(z6.toString),$6=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,W6=Oq($6.exec);yq&&!j6&&H6(z6,"name",{configurable:!0,get:function(){try{return W6($6,U6(this))[1]}catch(pp){return""}}});var V6=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=SS.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){return null==e.selection||(this.mark,!!oZ(SS.nodes(e,{match:function(t){return"pre"===yz.getNodeType(t)||!!SS.isVoid(e,t)},universal:!0}),1)[0])},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),G6=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return eZ(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:XG("fontSize.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"===R6(e)){var n=e.name,r=e.value;t.push({text:n,value:r})}});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},t}(V6),q6=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("fontFamily.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',t.mark="fontFamily",t.selectPanelWidth=150,t}return eZ(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:XG("fontFamily.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"===R6(e)){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},t}(V6),K6={renderStyle:function(e,t){var n=e,r=n.fontSize,i=n.fontFamily,o=t;return r&&AQ(o,{fontSize:r}),i&&AQ(o,{fontFamily:i}),o},styleToHtml:function(e,t){if(!YS.isText(e))return t;var n,r=e,i=r.fontSize,o=r.fontFamily;return i||o?((KJ(t)||"span"!==XJ(n=DD(t)))&&(n=DD("<span>"+t+"</span>")),i&&n.css("font-size",i),o&&n.css("font-family",o),YJ(n)):t},preParseHtml:[X0],parseStyleHtml:function(e,t,n){var r=DD(e);if(!YS.isText(t))return t;var i=t,o=n.getMenuConfig("fontSize").fontSizeList,a=void 0===o?[]:o,s=JJ(r,"font-size"),l=a.find(function(e){return e.value&&e.value===s})||a.includes(s);s&&l&&(i.fontSize=s);var u=n.getMenuConfig("fontFamily").fontFamilyList,c=void 0===u?[]:u,f=JJ(r,"font-family").replace(/"/g,""),d=c.find(function(e){return e.value&&e.value===f})||c.includes(f);return f&&d&&(i.fontFamily=f),i},menus:[{key:"fontSize",factory:function(){return new G6},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new q6},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]},Y6={selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=DD(e),n=JJ(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}},X6=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=oZ(SS.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1)[0];return null==t?"":oZ(t,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=oZ(SS.nodes(e,{match:function(e){var t=yz.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return null==t?null:t[0]},e}(),J6=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return eZ(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){h_.setNodes(e,{indent:null},{match:function(e){return bS.isElement(e)}})},t}(X6),Z6=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t}return eZ(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.exec=function(e,t){h_.setNodes(e,{indent:"2em"},{match:function(e){return bS.isElement(e)},mode:"highest"})},t}(X6),Q6={renderStyle:function(e,t){if(!bS.isElement(e))return t;var n=e.indent,r=t;return n&&AQ(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!bS.isElement(e))return t;var n=e.indent;if(!n)return t;var r=DD(t);return r.css("text-indent",n),YJ(r)},preParseHtml:[Y6],parseStyleHtml:function(e,t,n){var r=DD(e);if(!bS.isElement(t))return t;var i=t,o=JJ(r,"text-indent"),a=parseInt(o,10);return o&&a>0&&(i.indent=o),i},menus:[{key:"indent",factory:function(){return new Z6}},{key:"delIndent",factory:function(){return new J6}}]},e5=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=oZ(SS.nodes(e,{match:function(e){var t=yz.getNodeType(e);return"paragraph"===t||"blockquote"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1)[0];return null==t?null:t[0]},e.prototype.isDisabled=function(e){return null==e.selection||!!yz.getSelectedElems(e).some(function(t){if(SS.isVoid(e,t)&&SS.isBlock(e,t))return!0;var n=t.type;return!!["pre","code"].includes(n)||void 0})},e}(),t5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("justify.left"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return eZ(t,e),t.prototype.exec=function(e,t){h_.setNodes(e,{textAlign:"left"},{match:function(t){return bS.isElement(t)&&!e.isInline(t)}})},t}(e5),n5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("justify.right"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return eZ(t,e),t.prototype.exec=function(e,t){h_.setNodes(e,{textAlign:"right"},{match:function(t){return bS.isElement(t)&&!e.isInline(t)}})},t}(e5),r5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("justify.center"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return eZ(t,e),t.prototype.exec=function(e,t){h_.setNodes(e,{textAlign:"center"},{match:function(t){return bS.isElement(t)&&!e.isInline(t)}})},t}(e5),i5=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.title=XG("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return eZ(t,e),t.prototype.exec=function(e,t){h_.setNodes(e,{textAlign:"justify"},{match:function(t){return bS.isElement(t)&&!e.isInline(t)}})},t}(e5),o5={renderStyle:function(e,t){if(!bS.isElement(e))return t;var n=e.textAlign,r=t;return n&&AQ(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!bS.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=DD(t);return r.css("text-align",n),YJ(r)},parseStyleHtml:function(e,t,n){var r=DD(e);if(!bS.isElement(t))return t;var i=t,o=JJ(r,"text-align");return o&&(i.textAlign=o),i},menus:[{key:"justifyLeft",factory:function(){return new t5}},{key:"justifyRight",factory:function(){return new n5}},{key:"justifyCenter",factory:function(){return new r5}},{key:"justifyJustify",factory:function(){return new i5}}]},a5=function(){function e(){this.title=XG("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:XG("lineHeight.default"),value:""}),r.forEach(function(e){t.push({text:e,value:e})});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},e.prototype.getMatchNode=function(e){var t=oZ(SS.nodes(e,{match:function(e){var t=yz.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1)[0];return null==t?null:t[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":bS.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){h_.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}(),s5={renderStyle:function(e,t){if(!bS.isElement(e))return t;var n=e.lineHeight,r=t;return n&&AQ(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!bS.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=DD(t);return r.css("line-height",n),YJ(r)},parseStyleHtml:function(e,t,n){var r=DD(e);if(!bS.isElement(t))return t;var i=t,o=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===o?[]:o,s=JJ(r,"line-height");return s&&a.includes(s)&&(i.lineHeight=s),i},menus:[{key:"lineHeight",factory:function(){return new a5},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]},l5=function(){function e(){this.title=XG("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),u5=function(){function e(){this.title=XG("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),c5={menus:[{key:"redo",factory:function(){return new l5}},{key:"undo",factory:function(){return new u5}}]},f5={type:"divider",renderElem:function(e,t,n){return XA("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:yz.isNodeSelected(n,e)?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[XA("hr")])}},d5=function(){function e(){this.title=XG("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!yz.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=yz.getNodeType(t);return"table"===n||"pre"===n||void 0})},e.prototype.exec=function(e,t){h_.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}(),h5={renderElems:[f5],elemsToHtml:[{type:"divider",elemToHtml:function(e,t){return"<hr/>"}}],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new d5}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=oZ(e,2),i=t[0],o=t[1];if("divider"!==yz.getNodeType(i))return n([i,o]);yz.isLastNode(r,i)&&h_.insertNodes(r,yz.genEmptyParagraph(),{at:[o[0]+1]})},r}},p5=oX.map;MY({target:"Array",proto:!0,forced:!sX("map")},{map:function(e){return p5(this,e,arguments.length>1?arguments[1]:void 0)}});var g5=Oq([].join),v5=Nq!=Object,m5=yZ("join",",");MY({target:"Array",proto:!0,forced:v5||!m5},{join:function(e){return g5(jq(this),void 0===e?",":e)}});var y5=function(){function e(){this.title=XG("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=yz.getSelectedNodeByType(e,"code");if(null==t)return null;var n=yz.getParentNode(e,t);return null==n||"pre"!==yz.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);return null==t?"":t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=yz.getSelectedElems(e);return!!t.some(function(t){return e.isVoid(t)})||!t.some(function(e){var t=yz.getNodeType(e);if("pre"===t||"paragraph"===t)return!0})},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=OS.string(t);h_.removeNodes(e,{mode:"highest"});var r=n.split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}});h_.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,i=[],o=SS.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=iZ(o),s=a.next();!s.done;s=a.next()){var l=oZ(s.value,1)[0];l&&i.push(OS.string(l))}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}h_.removeNodes(e,{mode:"highest"});var u={type:"pre",children:[{type:"code",language:t,children:[{text:i.join("\n")}]}]};h_.insertNodes(e,u,{mode:"highest"})},e}(),b5={key:"codeBlock",factory:function(){return new y5}};MY({target:"String",proto:!0,forced:fZ("anchor")},{anchor:function(e){return cZ(this,"a","name",e)}}),JX("match",function(e,t,n){return[function(t){var n=Rq(this),r=null==t?void 0:iK(t,e);return r?wq(r,t,n):new RegExp(t)[e](dX(n))},function(e){var r=BK(this),i=dX(e),o=n(t,r,i);if(o.done)return o.value;if(!r.global)return fJ(r,i);var a=r.unicode;r.lastIndex=0;for(var s,l=[],u=0;null!==(s=fJ(r,i));){var c=dX(s[0]);l[u]=c,""===c&&(r.lastIndex=nJ(i,gY(r.lastIndex),a)),u++}return 0===u?null:l}]});var w5={selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e);return 0===(t=t.filter(function(e){return"code"===yz.getNodeType(e)})).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(e){return"code"===yz.getNodeType(e)})}}},x5={menus:[b5],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var i=e;return i.insertBreak=function(){var e=yz.getSelectedNodeByType(i,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=OS.string(e),i=n.anchor.offset,o=r.slice(0,i).split("\n"),a=o.length;return 0===a?"":o[a-1]}(e,i);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var o=r[0];return void i.insertText("\n"+o)}}i.insertText("\n")}else t()},i.normalizeNode=function(e){var t=oZ(e,2),r=t[0],o=t[1],a=yz.getNodeType(r);return"code"===a&&o.length<=1&&h_.setNodes(i,{type:"paragraph"},{at:o}),"pre"===a&&(yz.isLastNode(i,r)&&h_.insertNodes(i,yz.genEmptyParagraph(),{at:[o[0]+1]}),"code"!==yz.getNodeType(r.children[0])&&(h_.unwrapNodes(i),h_.setNodes(i,{type:"paragraph"},{mode:"highest"}))),n([r,o])},i.insertData=function(e){if(null!=yz.getSelectedNodeByType(i,"code")){var t=e.getData("text/plain");SS.insertText(i,t)}else r(e)},i},renderElems:[{type:"pre",renderElem:function(e,t,n){return vT("pre",null,t)}},{type:"code",renderElem:function(e,t,n){return vT("code",null,t)}}],elemsToHtml:[{type:"code",elemToHtml:function(e,t){return"<code>"+t+"</code>"}},{type:"pre",elemToHtml:function(e,t){return"<pre>"+t+"</pre>"}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=DD(e);if("code"!==XJ(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:DD(e)[0].textContent||""}]}}},w5]},C5=function(){function e(){this.title=XG("fullScreen.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),E5={menus:[{key:"fullScreen",factory:function(){return new C5}}]},k5=function(){function e(){this.title=XG("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!US.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];h_.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(SS.start(e,r))}},e}(),S5=[NZ,BQ,K6,Q6,o5,s5,I0,h5,K0,t0,x5,G0,EQ,sZ,N0,c5,E5,{menus:[{key:"enter",factory:function(){return new k5}}]}];YG("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),YG("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var _5="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D5(e){var t={exports:{}};return e(t,t.exports),t.exports}var A5,T5,O5=function(e){return e&&e.Math==Math&&e},P5=O5("object"==typeof globalThis&&globalThis)||O5("object"==typeof window&&window)||O5("object"==typeof self&&self)||O5("object"==typeof _5&&_5)||function(){return this}()||Function("return this")(),I5=Function.prototype,F5=I5.bind,B5=I5.call,L5=F5&&F5.bind(B5),N5=F5?function(e){return e&&L5(B5,e)}:function(e){return e&&function(){return B5.apply(e,arguments)}},M5=function(e){try{return!!e()}catch(t){return!0}},R5=N5({}.toString),j5=N5("".slice),H5=function(e){return j5(R5(e),8,-1)},z5=P5.Object,U5=N5("".split),$5=M5(function(){return!z5("z").propertyIsEnumerable(0)})?function(e){return"String"==H5(e)?U5(e,""):z5(e)}:z5,W5=P5.TypeError,V5=function(e){if(null==e)throw W5("Can't call method on "+e);return e},G5=function(e){return $5(V5(e))},q5=Object.defineProperty,K5=function(e,t){try{q5(P5,e,{value:t,configurable:!0,writable:!0})}catch(ZG){P5[e]=t}return t},Y5=P5["__core-js_shared__"]||K5("__core-js_shared__",{}),X5=D5(function(e){(e.exports=function(e,t){return Y5[e]||(Y5[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),J5=P5.Object,Z5=function(e){return J5(V5(e))},Q5=N5({}.hasOwnProperty),e8=Object.hasOwn||function(e,t){return Q5(Z5(e),t)},t8=0,n8=Math.random(),r8=N5(1..toString),i8=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r8(++t8+n8,36)},o8=function(e){return"function"==typeof e},a8=function(e,t){return arguments.length<2?function(e){return o8(e)?e:void 0}(P5[e]):P5[e]&&P5[e][t]},s8=a8("navigator","userAgent")||"",l8=P5.process,u8=P5.Deno,c8=l8&&l8.versions||u8&&u8.version,f8=c8&&c8.v8;f8&&(T5=(A5=f8.split("."))[0]>0&&A5[0]<4?1:+(A5[0]+A5[1])),!T5&&s8&&(!(A5=s8.match(/Edge\/(\d+)/))||A5[1]>=74)&&(A5=s8.match(/Chrome\/(\d+)/))&&(T5=+A5[1]);var d8,h8=T5,p8=!!Object.getOwnPropertySymbols&&!M5(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&h8&&h8<41}),g8=p8&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,v8=X5("wks"),m8=P5.Symbol,y8=m8&&m8.for,b8=g8?m8:m8&&m8.withoutSetter||i8,w8=function(e){if(!e8(v8,e)||!p8&&"string"!=typeof v8[e]){var t="Symbol."+e;p8&&e8(m8,e)?v8[e]=m8[e]:v8[e]=g8&&y8?y8(t):b8(t)}return v8[e]},x8=function(e){return"object"==typeof e?null!==e:o8(e)},C8=P5.String,E8=P5.TypeError,k8=function(e){if(x8(e))return e;throw E8(C8(e)+" is not an object")},S8=!M5(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),_8=P5.document,D8=x8(_8)&&x8(_8.createElement),A8=function(e){return D8?_8.createElement(e):{}},T8=!S8&&!M5(function(){return 7!=Object.defineProperty(A8("div"),"a",{get:function(){return 7}}).a}),O8=Function.prototype.call,P8=O8.bind?O8.bind(O8):function(){return O8.apply(O8,arguments)},I8=N5({}.isPrototypeOf),F8=P5.Object,B8=g8?function(e){return"symbol"==typeof e}:function(e){var t=a8("Symbol");return o8(t)&&I8(t.prototype,F8(e))},L8=P5.String,N8=function(e){try{return L8(e)}catch(t){return"Object"}},M8=P5.TypeError,R8=function(e){if(o8(e))return e;throw M8(N8(e)+" is not a function")},j8=function(e,t){var n=e[t];return null==n?void 0:R8(n)},H8=P5.TypeError,z8=P5.TypeError,U8=w8("toPrimitive"),$8=function(e){var t=function(e){if(!x8(e)||B8(e))return e;var t,n=j8(e,U8);if(n){if(t=P8(n,e,"string"),!x8(t)||B8(t))return t;throw z8("Can't convert object to primitive value")}return function(e){var t,n;if(o8(t=e.toString)&&!x8(n=P8(t,e)))return n;if(o8(t=e.valueOf)&&!x8(n=P8(t,e)))return n;throw H8("Can't convert object to primitive value")}(e)}(e);return B8(t)?t:t+""},W8=P5.TypeError,V8=Object.defineProperty,G8={f:S8?V8:function(e,t,n){if(k8(e),t=$8(t),k8(n),T8)try{return V8(e,t,n)}catch(r){}if("get"in n||"set"in n)throw W8("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},q8=Math.ceil,K8=Math.floor,Y8=function(e){var t=+e;return t!=t||0===t?0:(t>0?K8:q8)(t)},X8=Math.max,J8=Math.min,Z8=function(e,t){var n=Y8(e);return n<0?X8(n+t,0):J8(n,t)},Q8=Math.min,e7=function(e){return e>0?Q8(Y8(e),9007199254740991):0},t7=function(e){return e7(e.length)},n7=function(e){return function(t,n,r){var i,o=G5(t),a=t7(o),s=Z8(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},r7={includes:n7(!0),indexOf:n7(!1)},i7={},o7=r7.indexOf,a7=N5([].push),s7=function(e,t){var n,r=G5(e),i=0,o=[];for(n in r)!e8(i7,n)&&e8(r,n)&&a7(o,n);for(;t.length>i;)e8(r,n=t[i++])&&(~o7(o,n)||a7(o,n));return o},l7=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],u7=Object.keys||function(e){return s7(e,l7)},c7=S8?Object.defineProperties:function(e,t){k8(e);for(var n,r=G5(t),i=u7(t),o=i.length,a=0;o>a;)G8.f(e,n=i[a++],r[n]);return e},f7=a8("document","documentElement"),d7=X5("keys"),h7=function(e){return d7[e]||(d7[e]=i8(e))},p7=h7("IE_PROTO"),g7=function(){},v7=function(e){return"<script>"+e+"<\/script>"},m7=function(e){e.write(v7("")),e.close();var t=e.parentWindow.Object;return e=null,t},y7=function(){try{d8=new ActiveXObject("htmlfile")}catch(r){}var e,t;y7="undefined"!=typeof document?document.domain&&d8?m7(d8):((t=A8("iframe")).style.display="none",f7.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(v7("document.F=Object")),e.close(),e.F):m7(d8);for(var n=l7.length;n--;)delete y7.prototype[l7[n]];return y7()};i7[p7]=!0;var b7=Object.create||function(e,t){var n;return null!==e?(g7.prototype=k8(e),n=new g7,g7.prototype=null,n[p7]=e):n=y7(),void 0===t?n:c7(n,t)},w7=w8("unscopables"),x7=Array.prototype;null==x7[w7]&&G8.f(x7,w7,{configurable:!0,value:b7(null)});var C7=function(e){x7[w7][e]=!0},E7={},k7=N5(Function.toString);o8(Y5.inspectSource)||(Y5.inspectSource=function(e){return k7(e)});var S7,_7,D7,A7=Y5.inspectSource,T7=P5.WeakMap,O7=o8(T7)&&/native code/.test(A7(T7)),P7=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},I7=S8?function(e,t,n){return G8.f(e,t,P7(1,n))}:function(e,t,n){return e[t]=n,e},F7=P5.TypeError,B7=P5.WeakMap;if(O7||Y5.state){var L7=Y5.state||(Y5.state=new B7),N7=N5(L7.get),M7=N5(L7.has),R7=N5(L7.set);S7=function(e,t){if(M7(L7,e))throw new F7("Object already initialized");return t.facade=e,R7(L7,e,t),t},_7=function(e){return N7(L7,e)||{}},D7=function(e){return M7(L7,e)}}else{var j7=h7("state");i7[j7]=!0,S7=function(e,t){if(e8(e,j7))throw new F7("Object already initialized");return t.facade=e,I7(e,j7,t),t},_7=function(e){return e8(e,j7)?e[j7]:{}},D7=function(e){return e8(e,j7)}}var H7,z7,U7,$7={set:S7,get:_7,has:D7,enforce:function(e){return D7(e)?_7(e):S7(e,{})},getterFor:function(e){return function(t){var n;if(!x8(t)||(n=_7(t)).type!==e)throw F7("Incompatible receiver, "+e+" required");return n}}},W7={}.propertyIsEnumerable,V7=Object.getOwnPropertyDescriptor,G7={f:V7&&!W7.call({1:2},1)?function(e){var t=V7(this,e);return!!t&&t.enumerable}:W7},q7=Object.getOwnPropertyDescriptor,K7={f:S8?q7:function(e,t){if(e=G5(e),t=$8(t),T8)try{return q7(e,t)}catch(n){}if(e8(e,t))return P7(!P8(G7.f,e,t),e[t])}},Y7=Function.prototype,X7=S8&&Object.getOwnPropertyDescriptor,J7=e8(Y7,"name"),Z7={PROPER:J7&&"something"===function(){}.name,CONFIGURABLE:J7&&(!S8||S8&&X7(Y7,"name").configurable)},Q7=D5(function(e){var t=Z7.CONFIGURABLE,n=$7.get,r=$7.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;o8(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!e8(o,"name")||t&&o.name!==f)&&I7(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==P5?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:I7(e,n,o)):u?e[n]=o:K5(n,o)})(Function.prototype,"toString",function(){return o8(this)&&n(this).source||A7(this)})}),e9=l7.concat("length","prototype"),t9={f:Object.getOwnPropertyNames||function(e){return s7(e,e9)}},n9={f:Object.getOwnPropertySymbols},r9=N5([].concat),i9=a8("Reflect","ownKeys")||function(e){var t=t9.f(k8(e)),n=n9.f;return n?r9(t,n(e)):t},o9=function(e,t){for(var n=i9(t),r=G8.f,i=K7.f,o=0;o<n.length;o++){var a=n[o];e8(e,a)||r(e,a,i(t,a))}},a9=/#|\.prototype\./,s9=function(e,t){var n=u9[l9(e)];return n==f9||n!=c9&&(o8(t)?M5(t):!!t)},l9=s9.normalize=function(e){return String(e).replace(a9,".").toLowerCase()},u9=s9.data={},c9=s9.NATIVE="N",f9=s9.POLYFILL="P",d9=s9,h9=K7.f,p9=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?P5:u?P5[s]||K5(s,{}):(P5[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=h9(n,r))&&a.value:n[r],!d9(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;o9(o,i)}(e.sham||i&&i.sham)&&I7(o,"sham",!0),Q7(n,r,o,e)}},g9=!M5(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),v9=h7("IE_PROTO"),m9=P5.Object,y9=m9.prototype,b9=g9?m9.getPrototypeOf:function(e){var t=Z5(e);if(e8(t,v9))return t[v9];var n=t.constructor;return o8(n)&&t instanceof n?n.prototype:t instanceof m9?y9:null},w9=w8("iterator"),x9=!1;[].keys&&("next"in(U7=[].keys())?(z7=b9(b9(U7)))!==Object.prototype&&(H7=z7):x9=!0);var C9=null==H7||M5(function(){var e={};return H7[w9].call(e)!==e});C9&&(H7={}),o8(H7[w9])||Q7(H7,w9,function(){return this});var E9={IteratorPrototype:H7,BUGGY_SAFARI_ITERATORS:x9},k9=G8.f,S9=w8("toStringTag"),_9=function(e,t,n){e&&!e8(e=n?e:e.prototype,S9)&&k9(e,S9,{configurable:!0,value:t})},D9=E9.IteratorPrototype,A9=function(){return this},T9=P5.String,O9=P5.TypeError,P9=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=N5(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return k8(n),function(e){if("object"==typeof e||o8(e))return e;throw O9("Can't set "+T9(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),I9=Z7.PROPER,F9=Z7.CONFIGURABLE,B9=E9.IteratorPrototype,L9=E9.BUGGY_SAFARI_ITERATORS,N9=w8("iterator"),M9=function(){return this},R9=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=b7(D9,{next:P7(1,l)}),_9(s,u,!1),E7[u]=A9;var c,f,d=function(e){if(e===i&&m)return m;if(!L9&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[N9]||g["@@iterator"]||i&&g[i],m=!L9&&v||d(i),y="Array"==t&&g.entries||v;return y&&(c=b9(y.call(new e)))!==Object.prototype&&c.next&&(b9(c)!==B9&&(P9?P9(c,B9):o8(c[N9])||Q7(c,N9,M9)),_9(c,h,!0)),I9&&"values"==i&&v&&"values"!==v.name&&(F9?I7(g,"name","values"):(p=!0,m=function(){return P8(v,this)})),i&&(f={values:d("values"),keys:d("keys"),entries:d("entries")},a||p9({target:t,proto:!0,forced:L9||p},f)),g[N9]!==m&&Q7(g,N9,m,{name:i}),E7[t]=m,f},j9=$7.set,H9=$7.getterFor("Array Iterator"),z9=R9(Array,"Array",function(e,t){j9(this,{type:"Array Iterator",target:G5(e),index:0,kind:t})},function(){var e=H9(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");E7.Arguments=E7.Array,C7("keys"),C7("values"),C7("entries");var U9={};U9[w8("toStringTag")]="z";var $9="[object z]"===String(U9),W9=w8("toStringTag"),V9=P5.Object,G9="Arguments"==H5(function(){return arguments}()),q9=$9?H5:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=V9(e),W9))?n:G9?H5(t):"Object"==(r=H5(t))&&o8(t.callee)?"Arguments":r},K9=$9?{}.toString:function(){return"[object "+q9(this)+"]"};$9||Q7(Object.prototype,"toString",K9,{unsafe:!0});var Y9=P5.String,X9=function(e){if("Symbol"===q9(e))throw TypeError("Cannot convert a Symbol value to a string");return Y9(e)},J9=N5("".charAt),Z9=N5("".charCodeAt),Q9=N5("".slice),eee={charAt:function(e,t){var n,r,i=X9(V5(e)),o=Y8(t),a=i.length;return o<0||o>=a?"":(n=Z9(i,o))<55296||n>56319||o+1===a||(r=Z9(i,o+1))<56320||r>57343?J9(i,o):Q9(i,o,o+2)}},tee=eee.charAt,nee=$7.set,ree=$7.getterFor("String Iterator");R9(String,"String",function(e){nee(this,{type:"String Iterator",string:X9(e),index:0})},function(){var e,t=ree(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=tee(n,r),t.index+=e.length,{value:e,done:!1})});var iee=function(e,t,n){for(var r in t)Q7(e,r,t[r],n);return e},oee=P5.Array,aee=Math.max,see=t9.f,lee="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],uee={f:function(e){return lee&&"Window"==H5(e)?function(e){try{return see(e)}catch(t){return function(e){for(var t,n,r,i,o=t7(e),a=Z8(void 0,o),s=Z8(o,o),l=oee(aee(s-a,0)),u=0;a<s;a++,u++)t=l,n=u,r=e[a],(i=$8(n))in t?G8.f(t,i,P7(0,r)):t[i]=r;return l.length=u,l}(lee)}}(e):see(G5(e))}},cee=M5(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),fee=Object.isExtensible,dee=M5(function(){fee(1)})||cee?function(e){return!!x8(e)&&(!cee||"ArrayBuffer"!=H5(e))&&(!fee||fee(e))}:fee,hee=!M5(function(){return Object.isExtensible(Object.preventExtensions({}))}),pee=D5(function(e){var t=G8.f,n=!1,r=i8("meta"),i=0,o=function(e){t(e,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=t9.f,t=N5([].splice),i={};i[r]=1,e(i).length&&(t9.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===r){t(i,o,1);break}return i},p9({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:uee.f}))},fastKey:function(e,t){if(!x8(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!e8(e,r)){if(!dee(e))return"F";if(!t)return"E";o(e)}return e[r].objectID},getWeakData:function(e,t){if(!e8(e,r)){if(!dee(e))return!0;if(!t)return!1;o(e)}return e[r].weakData},onFreeze:function(e){return hee&&n&&dee(e)&&!e8(e,r)&&o(e),e}};i7[r]=!0}),gee=N5(N5.bind),vee=function(e,t){return R8(e),void 0===t?e:gee?gee(e,t):function(){return e.apply(t,arguments)}},mee=w8("iterator"),yee=Array.prototype,bee=w8("iterator"),wee=function(e){if(null!=e)return j8(e,bee)||j8(e,"@@iterator")||E7[q9(e)]},xee=P5.TypeError,Cee=function(e,t,n){var r,i;k8(e);try{if(!(r=j8(e,"return"))){if("throw"===t)throw n;return n}r=P8(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return k8(r),n},Eee=P5.TypeError,kee=function(e,t){this.stopped=e,this.result=t},See=kee.prototype,_ee=function(e,t,n){var r,i,o,a,s,l,u,c,f=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=vee(t,f),v=function(e){return r&&Cee(r,"normal",e),new kee(!0,e)},m=function(e){return d?(k8(e),p?g(e[0],e[1],v):g(e[0],e[1])):p?g(e,v):g(e)};if(h)r=e;else{if(!(i=wee(e)))throw Eee(N8(e)+" is not iterable");if(void 0!==(c=i)&&(E7.Array===c||yee[mee]===c)){for(o=0,a=t7(e);a>o;o++)if((s=m(e[o]))&&I8(See,s))return s;return new kee(!1)}r=function(e,t){var n=arguments.length<2?wee(e):t;if(R8(n))return k8(P8(n,e));throw xee(N8(e)+" is not iterable")}(e,i)}for(l=r.next;!(u=P8(l,r)).done;){try{s=m(u.value)}catch(y){Cee(r,"throw",y)}if("object"==typeof s&&s&&I8(See,s))return s}return new kee(!1)},Dee=P5.TypeError,Aee=function(e,t){if(I8(t,e))return e;throw Dee("Incorrect invocation")},Tee=w8("iterator"),Oee=!1;try{var Pee=0,Iee={next:function(){return{done:!!Pee++}},return:function(){Oee=!0}};Iee[Tee]=function(){return this},Array.from(Iee,function(){throw 2})}catch(TTe){}var Fee=Array.isArray||function(e){return"Array"==H5(e)},Bee=function(){},Lee=[],Nee=a8("Reflect","construct"),Mee=/^\s*(?:class|function)\b/,Ree=N5(Mee.exec),jee=!Mee.exec(Bee),Hee=function(e){if(!o8(e))return!1;try{return Nee(Bee,Lee,e),!0}catch(t){return!1}},zee=!Nee||M5(function(){var e;return Hee(Hee.call)||!Hee(Object)||!Hee(function(){e=!0})||e})?function(e){if(!o8(e))return!1;switch(q9(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return jee||!!Ree(Mee,A7(e))}:Hee,Uee=w8("species"),$ee=P5.Array,Wee=function(e,t){return new(Fee(n=e)&&(r=n.constructor,(zee(r)&&(r===$ee||Fee(r.prototype))||x8(r)&&null===(r=r[Uee]))&&(r=void 0)),void 0===r?$ee:r)(0===t?0:t);var n,r},Vee=N5([].push),Gee=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=Z5(l),g=$5(p),v=vee(u,c),m=t7(g),y=0,b=f||Wee,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:Vee(w,d)}else switch(e){case 4:return!1;case 7:Vee(w,d)}return o?-1:r||i?i:w}},qee={filter:Gee(2),find:Gee(5),findIndex:Gee(6)},Kee=pee.getWeakData,Yee=$7.set,Xee=$7.getterFor,Jee=qee.find,Zee=qee.findIndex,Qee=N5([].splice),ete=0,tte=function(e){return e.frozen||(e.frozen=new nte)},nte=function(){this.entries=[]},rte=function(e,t){return Jee(e.entries,function(e){return e[0]===t})};nte.prototype={get:function(e){var t=rte(this,e);if(t)return t[1]},has:function(e){return!!rte(this,e)},set:function(e,t){var n=rte(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=Zee(this.entries,function(t){return t[0]===e});return~t&&Qee(this.entries,t,1),!!~t}};var ite,ote={getConstructor:function(e,t,n,r){var i=e(function(e,i){Aee(e,o),Yee(e,{type:t,id:ete++,frozen:void 0}),null!=i&&_ee(i,e[r],{that:e,AS_ENTRIES:n})}),o=i.prototype,a=Xee(t),s=function(e,t,n){var r=a(e),i=Kee(k8(t),!0);return!0===i?tte(r).set(t,n):i[r.id]=n,e};return iee(o,{delete:function(e){var t=a(this);if(!x8(e))return!1;var n=Kee(e);return!0===n?tte(t).delete(e):n&&e8(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!x8(e))return!1;var n=Kee(e);return!0===n?tte(t).has(e):n&&e8(n,t.id)}}),iee(o,n?{get:function(e){var t=a(this);if(x8(e)){var n=Kee(e);return!0===n?tte(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},ate=$7.enforce,ste=!P5.ActiveXObject&&"ActiveXObject"in P5,lte=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},ute=function(e,t,n){var r=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),o=r?"set":"add",a=P5[e],s=a&&a.prototype,l=a,u={},c=function(e){var t=N5(s[e]);Q7(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!x8(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!x8(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!x8(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(d9(e,!o8(a)||!(i||s.forEach&&!M5(function(){(new a).entries().next()}))))l=n.getConstructor(t,e,r,o),pee.enable();else if(d9(e,!0)){var f=new l,d=f[o](i?{}:-0,1)!=f,h=M5(function(){f.has(1)}),p=function(){if(!Oee)return!1;var e=!1;try{var t={};t[Tee]=function(){return{next:function(){return{done:e=!0}}}},new a(t)}catch(n){}return e}(),g=!i&&M5(function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)});p||((l=t(function(e,t){Aee(e,s);var n,i,u,c,f=(n=new a,i=l,P9&&o8(u=e.constructor)&&u!==i&&x8(c=u.prototype)&&c!==i.prototype&&P9(n,c),n);return null!=t&&_ee(t,f[o],{that:f,AS_ENTRIES:r}),f})).prototype=s,s.constructor=l),(h||g)&&(c("delete"),c("has"),r&&c("get")),(g||d)&&c(o),i&&s.clear&&delete s.clear}return u[e]=l,p9({global:!0,forced:l!=a},u),_9(l,e),i||n.setStrong(l,e,r),l}("WeakMap",lte,ote);if(O7&&ste){ite=ote.getConstructor(lte,"WeakMap",!0),pee.enable();var cte=ute.prototype,fte=N5(cte.delete),dte=N5(cte.has),hte=N5(cte.get),pte=N5(cte.set);iee(cte,{delete:function(e){if(x8(e)&&!dee(e)){var t=ate(this);return t.frozen||(t.frozen=new ite),fte(this,e)||t.frozen.delete(e)}return fte(this,e)},has:function(e){if(x8(e)&&!dee(e)){var t=ate(this);return t.frozen||(t.frozen=new ite),dte(this,e)||t.frozen.has(e)}return dte(this,e)},get:function(e){if(x8(e)&&!dee(e)){var t=ate(this);return t.frozen||(t.frozen=new ite),dte(this,e)?hte(this,e):t.frozen.get(e)}return hte(this,e)},set:function(e,t){if(x8(e)&&!dee(e)){var n=ate(this);n.frozen||(n.frozen=new ite),dte(this,e)?pte(this,e,t):n.frozen.set(e,t)}else pte(this,e,t);return this}})}var gte={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vte=A8("span").classList,mte=vte&&vte.constructor&&vte.constructor.prototype,yte=mte===Object.prototype?void 0:mte,bte=w8("iterator"),wte=w8("toStringTag"),xte=z9.values,Cte=function(e,t){if(e){if(e[bte]!==xte)try{I7(e,bte,xte)}catch(r){e[bte]=xte}if(e[wte]||I7(e,wte,t),gte[t])for(var n in z9)if(e[n]!==z9[n])try{I7(e,n,z9[n])}catch(r){e[n]=z9[n]}}};for(var Ete in gte)Cte(P5[Ete]&&P5[Ete].prototype,Ete);Cte(yte,"DOMTokenList");var kte=new WeakMap,Ste={type:"list-item",renderElem:function(e,t,n){kte.set(e,n);var r=e,i=r.level,o=void 0===i?0:i,a=r.ordered,s={margin:"5px 0 5px "+20*o+"px"},l="";return l=void 0!==a&&a?function(e,t){var n=t,r=n.type,i=n.level,o=void 0===i?0:i,a=n.ordered,s=void 0!==a&&a;if(!s)return-1;var l=1,u=t,c=yz.findPath(e,u);if(0===c[0])return 1;for(;c[0]>0;){var f=BS.previous(c),d=SS.node(e,f);if(null==d)break;var h=d[0],p=h.level,g=void 0===p?0:p,v=h.type,m=h.ordered;if(v!==r)break;if(g<o)break;if(g===o){if(m!==s)break;l++}u=h,c=f}return l}(n,e)+".":function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(o),vT("div",{style:s},vT("span",{contentEditable:!1,style:{marginRight:"0.5em",color:function(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var i=0;i<r&&!t;i++){var o=n[i];YS.isText(o)&&(t=o)}return null==t?"":t.color||""}(e)},"data-w-e-reserve":!0},l),vT("span",null,t))}},_te=function(e,t){return _te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},_te(e,t)};function Dte(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}_te(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Ate(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Tte(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Ote(e){return SS.nodes(e,{at:e.selection||void 0,match:function(t){return 1===yz.findPath(e,t).length}})}var Pte=r7.includes;p9({target:"Array",proto:!0},{includes:function(e){return Pte(this,e,arguments.length>1?arguments[1]:void 0)}}),C7("includes");var Ite,Fte,Bte=function(){var e=k8(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Lte=P5.RegExp,Nte=M5(function(){var e=Lte("a","y");return e.lastIndex=2,null!=e.exec("abcd")});Nte||M5(function(){return!Lte("a","y").sticky});var Mte={BROKEN_CARET:Nte||M5(function(){var e=Lte("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},Rte=P5.RegExp,jte=M5(function(){var e=Rte(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),Hte=P5.RegExp,zte=M5(function(){var e=Hte("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Ute=$7.get,$te=X5("native-string-replace",String.prototype.replace),Wte=RegExp.prototype.exec,Vte=Wte,Gte=N5("".charAt),qte=N5("".indexOf),Kte=N5("".replace),Yte=N5("".slice),Xte=(Fte=/b*/g,P8(Wte,Ite=/a/,"a"),P8(Wte,Fte,"a"),0!==Ite.lastIndex||0!==Fte.lastIndex),Jte=Mte.BROKEN_CARET,Zte=void 0!==/()??/.exec("")[1];(Xte||Zte||Jte||jte||zte)&&(Vte=function(e){var t,n,r,i,o,a,s,l=this,u=Ute(l),c=X9(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=P8(Vte,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=Jte&&l.sticky,p=P8(Bte,l),g=l.source,v=0,m=c;if(h&&(p=Kte(p,"y",""),-1===qte(p,"g")&&(p+="g"),m=Yte(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Gte(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),Zte&&(n=new RegExp("^"+g+"$(?!\\s)",p)),Xte&&(r=l.lastIndex),i=P8(Wte,h?n:l,m),h?i?(i.input=Yte(i.input,v),i[0]=Yte(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:Xte&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),Zte&&i&&i.length>1&&P8($te,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=b7(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var Qte=Vte;p9({target:"RegExp",proto:!0,forced:/./.exec!==Qte},{exec:Qte});var ene=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return yz.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!yz.getSelectedElems(e).some(function(t){if(SS.isVoid(e,t)&&SS.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)||void 0})},e.prototype.exec=function(e,t){this.isActive(e)?h_.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):h_.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),tne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ordered=!1,t.title=XG("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return Dte(t,e),t}(ene),nne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ordered=!0,t.title=XG("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return Dte(t,e),t}(ene),rne={key:"bulletedList",factory:function(){return new tne}},ine={key:"numberedList",factory:function(){return new nne}},one=[],ane={type:"list-item",elemToHtml:function(e,t){var n="",r="",i=e.ordered,o=void 0!==i&&i?"ol":"ul",a=function(e){var t=kte.get(e);if(null==t)return 0;var n=e,r=n.type,i=n.ordered,o=void 0!==i&&i,a=n.level,s=void 0===a?0:a,l=yz.findPath(t,e);if(0===l[0])return s+1;var u=BS.previous(l),c=SS.node(t,u);if(!c)return 0;var f=Tte(c,1)[0];if(yz.getNodeType(f)!==r)return s+1;var d=f,h=d.ordered,p=void 0!==h&&h,g=d.level,v=void 0===g?0:g;return v<s?s-v:v>s?0:v===s?p===o?0:1:0}(e);if(a>0)for(var s=0;s<a;s++)n+="<"+o+">",one.push(o);var l=function(e){var t=kte.get(e);if(null==t)return 0;var n=e,r=n.type,i=n.ordered,o=void 0!==i&&i,a=n.level,s=void 0===a?0:a,l=yz.findPath(t,e);if(l[0]===t.children.length-1)return s+1;var u=BS.next(l),c=SS.node(t,u);if(!c)return 0;var f=Tte(c,1)[0];if(yz.getNodeType(f)!==r)return s+1;var d=f,h=d.ordered,p=void 0!==h&&h,g=d.level,v=void 0===g?0:g;return v<s?s-v:v>s?0:v===s?p===o?0:1:0}(e);if(l>0)for(s=0;s<l;s++)r+="</"+one.pop()+">";return{html:"<li>"+t+"</li>",prefix:n,suffix:r}}},sne=w8("species"),lne=qee.filter,une=h8>=51||!M5(function(){var e=[];return(e.constructor={})[sne]=function(){return{foo:1}},1!==e.filter(Boolean).foo});p9({target:"Array",proto:!0,forced:!une},{filter:function(e){return lne(this,e,arguments.length>1?arguments[1]:void 0)}});var cne=Function.prototype,fne=cne.apply,dne=cne.bind,hne=cne.call,pne="object"==typeof Reflect&&Reflect.apply||(dne?hne.bind(fne):function(){return hne.apply(fne,arguments)}),gne=(w8("species"),RegExp.prototype),vne=eee.charAt,mne=function(e,t,n){return t+(n?vne(e,t).length:1)},yne=Math.floor,bne=N5("".charAt),wne=N5("".replace),xne=N5("".slice),Cne=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ene=/\$([$&'`]|\d{1,2})/g,kne=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=Ene;return void 0!==i&&(i=Z5(i),l=Cne),wne(o,l,function(o,l){var u;switch(bne(l,0)){case"$":return"$";case"&":return e;case"`":return xne(t,0,n);case"'":return xne(t,a);case"<":u=i[xne(l,1,-1)];break;default:var c=+l;if(0===c)return o;if(c>s){var f=yne(c/10);return 0===f?o:f<=s?void 0===r[f-1]?bne(l,1):r[f-1]+bne(l,1):o}u=r[c-1]}return void 0===u?"":u})},Sne=P5.TypeError,_ne=function(e,t){var n=e.exec;if(o8(n)){var r=P8(n,e,t);return null!==r&&k8(r),r}if("RegExp"===H5(e))return P8(Qte,e,t);throw Sne("RegExp#exec called on incompatible receiver")},Dne=w8("replace"),Ane=Math.max,Tne=Math.min,One=N5([].concat),Pne=N5([].push),Ine=N5("".indexOf),Fne=N5("".slice),Bne="$0"==="a".replace(/./,"$0"),Lne=!!/./[Dne]&&""===/./[Dne]("a","$0");!function(e,t,n){var r=w8(e),i=!M5(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)}),o=i&&!M5(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},t[r](""),!e});if(!i||!o||n){var a=N5(/./[r]),s=function(e,t){var n=Lne?"$":"$0";return[function(e,n){var r=V5(this),i=null==e?void 0:j8(e,Dne);return i?P8(i,e,r,n):P8(t,X9(r),e,n)},function(e,r){var o=k8(this),s=X9(e);if("string"==typeof r&&-1===Ine(r,n)&&-1===Ine(r,"$<")){var l=function(e,t,n,r){var o=N5(e),s=t.exec;return s===Qte||s===gne.exec?i?{done:!0,value:a(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}(t,o,s,r);if(l.done)return l.value}var u=o8(r);u||(r=X9(r));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var h=_ne(o,s);if(null===h)break;if(Pne(d,h),!c)break;""===X9(h[0])&&(o.lastIndex=mne(s,e7(o.lastIndex),f))}for(var p,g="",v=0,m=0;m<d.length;m++){for(var y=X9((h=d[m])[0]),b=Ane(Tne(Y8(h.index),s.length),0),w=[],x=1;x<h.length;x++)Pne(w,void 0===(p=h[x])?p:String(p));var C=h.groups;if(u){var E=One([y],w,b,s);void 0!==C&&Pne(E,C);var k=X9(pne(r,void 0,E))}else k=kne(y,s,b,w,C,r);b>=v&&(g+=Fne(s,v,b)+k,v=b+y.length)}return g+Fne(s,v)}]}(0,""[e]);Q7(String.prototype,e,s[0]),Q7(gne,r,s[1])}}("replace",0,!!M5(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!Bne||Lne);var Nne=P5.TypeError,Mne=function(e,t,n,r,i,o,a,s){for(var l,u,c=i,f=0,d=!!a&&vee(a,s);f<r;){if(f in n){if(l=d?d(n[f],f,t):n[f],o>0&&Fee(l))u=t7(l),c=Mne(e,t,l,u,c,o-1)-1;else{if(c>=9007199254740991)throw Nne("Exceed the acceptable array length");e[c]=l}c++}f++}return c},Rne=Mne;function jne(e){return e.length?e[0].tagName.toLowerCase():""}p9({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Z5(this),n=t7(t),r=Wee(t,0);return r.length=Rne(r,t,t,n,0,void 0===e?1:Y8(e)),r}}),C7("flat"),p9({global:!0},{globalThis:P5}),KD&&(DD.fn.append=KD),PD&&(DD.fn.attr=PD),XD&&(DD.fn.parent=XD);var Hne={renderElems:[Ste],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,i=e;return i.deleteBackward=function(e){var n=i.selection;if(null!=n)if(US.isExpanded(n))t(e);else{var r=yz.getSelectedNodeByType(i,"list-item");if(null!=r)if(0!==n.focus.offset)t(e);else{var o=r.level,a=void 0===o?0:o;a>0?h_.setNodes(i,{level:a-1}):h_.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(e)}else t(e)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(US.isCollapsed(a)){var s=yz.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var l=s.level,u=void 0===l?0:l;return void h_.setNodes(i,{level:u+1})}}if(US.isExpanded(a)){var c=0,f=!1;try{for(var d=Ate(Ote(i)),h=d.next();!h.done;h=d.next()){var p=Tte(h.value,1)[0];"list-item"===yz.getNodeType(p)?c++:f=!0}}catch(w){e={error:w}}finally{try{h&&!h.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}if(f||c<=1)return void n();try{for(var g=Ate(Ote(i)),v=g.next();!v.done;v=g.next()){var m=Tte(v.value,2),y=(p=m[0],m[1]),b=p.level;u=void 0===b?0:b,h_.setNodes(i,{level:u+1},{at:y})}}catch(x){r={error:x}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=Tte(e,2),n=t[0],o=t[1],a=yz.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||h_.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[rne,ine],elemsToHtml:[ane],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e);return 0===(t=t.filter(function(e){return!!YS.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"list-item",ordered:"ol"===jne(r.parent()),level:function(e){for(var t=0,n=e.parent(),r=jne(n);"ul"===r||"ol"===r;)r=jne(n=n.parent()),t++;return t-1}(r),children:t}}}]},zne=Eh(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",s="[object Date]",l="[object Error]",u="[object Function]",c="[object Map]",f="[object Number]",d="[object Object]",h="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",m="[object WeakMap]",y="[object ArrayBuffer]",b="[object DataView]",w=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[i]=C[o]=C[y]=C[a]=C[b]=C[s]=C[l]=C[u]=C[c]=C[f]=C[d]=C[p]=C[g]=C[v]=C[m]=!1;var E="object"==typeof Ch&&Ch&&Ch.Object===Object&&Ch,k="object"==typeof self&&self&&self.Object===Object&&self,S=E||k||Function("return this")(),_=t&&!t.nodeType&&t,D=_&&e&&!e.nodeType&&e,A=D&&D.exports===_,T=A&&E.process,O=function(){try{return T&&T.binding&&T.binding("util")}catch(pp){}}(),P=O&&O.isTypedArray;function I(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function F(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function B(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var L=Array.prototype,N=Function.prototype,M=Object.prototype,R=S["__core-js_shared__"],j=N.toString,H=M.hasOwnProperty,z=function(){var e=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),U=M.toString,$=RegExp("^"+j.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),W=A?S.Buffer:void 0,V=S.Symbol,G=S.Uint8Array,q=M.propertyIsEnumerable,K=L.splice,Y=V?V.toStringTag:void 0,X=Object.getOwnPropertySymbols,J=W?W.isBuffer:void 0,Z=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Q=ke(S,"DataView"),ee=ke(S,"Map"),te=ke(S,"Promise"),ne=ke(S,"Set"),re=ke(S,"WeakMap"),ie=ke(Object,"create"),oe=Ae(Q),ae=Ae(ee),se=Ae(te),le=Ae(ne),ue=Ae(re),ce=V?V.prototype:void 0,fe=ce?ce.valueOf:void 0;function de(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ge(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new pe;++t<n;)this.add(e[t])}function ve(e){var t=this.__data__=new he(e);this.size=t.size}function me(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ye(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Y&&Y in Object(e)?function(e){var t=H.call(e,Y),n=e[Y];try{e[Y]=void 0;var r=!0}catch(o){}var i=U.call(e);return r&&(t?e[Y]=n:delete e[Y]),i}(e):(t=e,U.call(t));var t}function be(e){return Ne(e)&&ye(e)==i}function we(e,t,n,r,u){return e===t||(null==e||null==t||!Ne(e)&&!Ne(t)?e!=e&&t!=t:function(e,t,n,r,u,h){var m=Pe(e),w=Pe(t),x=m?o:_e(e),C=w?o:_e(t),E=(x=x==i?d:x)==d,k=(C=C==i?d:C)==d,S=x==C;if(S&&Ie(e)){if(!Ie(t))return!1;m=!0,E=!1}if(S&&!E)return h||(h=new ve),m||Me(e)?xe(e,t,n,r,u,h):function(e,t,n,r,i,o,u){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!o(new G(e),new G(t)));case a:case s:case f:return Te(+e,+t);case l:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case c:var d=F;case g:var h=1&r;if(d||(d=B),e.size!=t.size&&!h)return!1;var m=u.get(e);if(m)return m==t;r|=2,u.set(e,t);var w=xe(d(e),d(t),r,i,o,u);return u.delete(e),w;case"[object Symbol]":if(fe)return fe.call(e)==fe.call(t)}return!1}(e,t,x,n,r,u,h);if(!(1&n)){var _=E&&H.call(e,"__wrapped__"),D=k&&H.call(t,"__wrapped__");if(_||D){var A=_?e.value():e,T=D?t.value():t;return h||(h=new ve),u(A,T,n,r,h)}}return!!S&&(h||(h=new ve),function(e,t,n,r,i,o){var a=1&n,s=Ce(e),l=s.length;if(l!=Ce(t).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in t:H.call(t,c)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var d=!0;o.set(e,t),o.set(t,e);for(var h=a;++u<l;){var p=e[c=s[u]],g=t[c];if(r)var v=a?r(g,p,c,t,e,o):r(p,g,c,e,t,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){d=!1;break}h||(h="constructor"==c)}if(d&&!h){var m=e.constructor,y=t.constructor;m==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y||(d=!1)}return o.delete(e),o.delete(t),d}(e,t,n,r,u,h))}(e,t,n,r,we,u))}function xe(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,f=!0,d=2&n?new ge:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var h=e[c],p=t[c];if(r)var g=a?r(p,h,c,t,e,o):r(h,p,c,e,t,o);if(void 0!==g){if(g)continue;f=!1;break}if(d){if(!I(t,function(e,t){if(a=t,!d.has(a)&&(h===e||i(h,e,n,r,o)))return d.push(t);var a})){f=!1;break}}else if(h!==p&&!i(h,p,n,r,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Ce(e){return n=Se,r=function(e){return null!=(t=e)&&Be(t.length)&&!Fe(t)?function(e){var t=Pe(e),n=!t&&Oe(e),r=!t&&!n&&Ie(e),i=!t&&!n&&!r&&Me(e),o=t||n||r||i,a=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],s=a.length;for(var l in e)!H.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||De(l,s))||a.push(l);return a}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||M))return Z(e);var t,n,r=[];for(var i in Object(e))H.call(e,i)&&"constructor"!=i&&r.push(i);return r}(e);var t}(t=e),Pe(t)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(t));var t,n,r}function Ee(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function ke(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!Le(e)||(t=e,z&&z in t))&&(Fe(e)?$:w).test(Ae(e));var t}(r)?r:void 0}de.prototype.clear=function(){this.__data__=ie?ie(null):{},this.size=0},de.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},de.prototype.get=function(e){var t=this.__data__;if(ie){var r=t[e];return r===n?void 0:r}return H.call(t,e)?t[e]:void 0},de.prototype.has=function(e){var t=this.__data__;return ie?void 0!==t[e]:H.call(t,e)},de.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ie&&void 0===t?n:t,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(e){var t=this.__data__,n=me(t,e);return!(n<0||(n==t.length-1?t.pop():K.call(t,n,1),--this.size,0))},he.prototype.get=function(e){var t=this.__data__,n=me(t,e);return n<0?void 0:t[n][1]},he.prototype.has=function(e){return me(this.__data__,e)>-1},he.prototype.set=function(e,t){var n=this.__data__,r=me(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new de,map:new(ee||he),string:new de}},pe.prototype.delete=function(e){var t=Ee(this,e).delete(e);return this.size-=t?1:0,t},pe.prototype.get=function(e){return Ee(this,e).get(e)},pe.prototype.has=function(e){return Ee(this,e).has(e)},pe.prototype.set=function(e,t){var n=Ee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ge.prototype.add=ge.prototype.push=function(e){return this.__data__.set(e,n),this},ge.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},ve.prototype.get=function(e){return this.__data__.get(e)},ve.prototype.has=function(e){return this.__data__.has(e)},ve.prototype.set=function(e,t){var n=this.__data__;if(n instanceof he){var r=n.__data__;if(!ee||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new pe(r)}return n.set(e,t),this.size=n.size,this};var Se=X?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a)&&(o[i++]=a)}return o}(X(e),function(t){return q.call(e,t)}))}:function(){return[]},_e=ye;function De(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function Ae(e){if(null!=e){try{return j.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Te(e,t){return e===t||e!=e&&t!=t}(Q&&_e(new Q(new ArrayBuffer(1)))!=b||ee&&_e(new ee)!=c||te&&_e(te.resolve())!=h||ne&&_e(new ne)!=g||re&&_e(new re)!=m)&&(_e=function(e){var t=ye(e),n=t==d?e.constructor:void 0,r=n?Ae(n):"";if(r)switch(r){case oe:return b;case ae:return c;case se:return h;case le:return g;case ue:return m}return t});var Oe=be(function(){return arguments}())?be:function(e){return Ne(e)&&H.call(e,"callee")&&!q.call(e,"callee")},Pe=Array.isArray,Ie=J||function(){return!1};function Fe(e){if(!Le(e))return!1;var t=ye(e);return t==u||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Le(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ne(e){return null!=e&&"object"==typeof e}var Me=P?function(e){return function(t){return e(t)}}(P):function(e){return Ne(e)&&Be(e.length)&&!!C[ye(e)]};e.exports=function(e,t){return we(e,t)}});YG("en",{tableModule:{deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header"}}),YG("zh-CN",{tableModule:{deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头"}});var Une="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function $ne(e){var t={exports:{}};return e(t,t.exports),t.exports}var Wne,Vne,Gne=function(e){return e&&e.Math==Math&&e},qne=Gne("object"==typeof globalThis&&globalThis)||Gne("object"==typeof window&&window)||Gne("object"==typeof self&&self)||Gne("object"==typeof Une&&Une)||function(){return this}()||Function("return this")(),Kne=function(e){try{return!!e()}catch(t){return!0}},Yne=!Kne(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),Xne=Function.prototype.call,Jne=Xne.bind?Xne.bind(Xne):function(){return Xne.apply(Xne,arguments)},Zne={}.propertyIsEnumerable,Qne=Object.getOwnPropertyDescriptor,ere={f:Qne&&!Zne.call({1:2},1)?function(e){var t=Qne(this,e);return!!t&&t.enumerable}:Zne},tre=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},nre=Function.prototype,rre=nre.bind,ire=nre.call,ore=rre&&rre.bind(ire),are=rre?function(e){return e&&ore(ire,e)}:function(e){return e&&function(){return ire.apply(e,arguments)}},sre=are({}.toString),lre=are("".slice),ure=function(e){return lre(sre(e),8,-1)},cre=qne.Object,fre=are("".split),dre=Kne(function(){return!cre("z").propertyIsEnumerable(0)})?function(e){return"String"==ure(e)?fre(e,""):cre(e)}:cre,hre=qne.TypeError,pre=function(e){if(null==e)throw hre("Can't call method on "+e);return e},gre=function(e){return dre(pre(e))},vre=function(e){return"function"==typeof e},mre=function(e){return"object"==typeof e?null!==e:vre(e)},yre=function(e,t){return arguments.length<2?function(e){return vre(e)?e:void 0}(qne[e]):qne[e]&&qne[e][t]},bre=are({}.isPrototypeOf),wre=yre("navigator","userAgent")||"",xre=qne.process,Cre=qne.Deno,Ere=xre&&xre.versions||Cre&&Cre.version,kre=Ere&&Ere.v8;kre&&(Vne=(Wne=kre.split("."))[0]>0&&Wne[0]<4?1:+(Wne[0]+Wne[1])),!Vne&&wre&&(!(Wne=wre.match(/Edge\/(\d+)/))||Wne[1]>=74)&&(Wne=wre.match(/Chrome\/(\d+)/))&&(Vne=+Wne[1]);var Sre=Vne,_re=!!Object.getOwnPropertySymbols&&!Kne(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Sre&&Sre<41}),Dre=_re&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Are=qne.Object,Tre=Dre?function(e){return"symbol"==typeof e}:function(e){var t=yre("Symbol");return vre(t)&&bre(t.prototype,Are(e))},Ore=qne.String,Pre=function(e){try{return Ore(e)}catch(t){return"Object"}},Ire=qne.TypeError,Fre=function(e){if(vre(e))return e;throw Ire(Pre(e)+" is not a function")},Bre=function(e,t){var n=e[t];return null==n?void 0:Fre(n)},Lre=qne.TypeError,Nre=Object.defineProperty,Mre=function(e,t){try{Nre(qne,e,{value:t,configurable:!0,writable:!0})}catch(ZG){qne[e]=t}return t},Rre=qne["__core-js_shared__"]||Mre("__core-js_shared__",{}),jre=$ne(function(e){(e.exports=function(e,t){return Rre[e]||(Rre[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Hre=qne.Object,zre=function(e){return Hre(pre(e))},Ure=are({}.hasOwnProperty),$re=Object.hasOwn||function(e,t){return Ure(zre(e),t)},Wre=0,Vre=Math.random(),Gre=are(1..toString),qre=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Gre(++Wre+Vre,36)},Kre=jre("wks"),Yre=qne.Symbol,Xre=Yre&&Yre.for,Jre=Dre?Yre:Yre&&Yre.withoutSetter||qre,Zre=function(e){if(!$re(Kre,e)||!_re&&"string"!=typeof Kre[e]){var t="Symbol."+e;_re&&$re(Yre,e)?Kre[e]=Yre[e]:Kre[e]=Dre&&Xre?Xre(t):Jre(t)}return Kre[e]},Qre=qne.TypeError,eie=Zre("toPrimitive"),tie=function(e){var t=function(e){if(!mre(e)||Tre(e))return e;var t,n=Bre(e,eie);if(n){if(t=Jne(n,e,"string"),!mre(t)||Tre(t))return t;throw Qre("Can't convert object to primitive value")}return function(e){var t,n;if(vre(t=e.toString)&&!mre(n=Jne(t,e)))return n;if(vre(t=e.valueOf)&&!mre(n=Jne(t,e)))return n;throw Lre("Can't convert object to primitive value")}(e)}(e);return Tre(t)?t:t+""},nie=qne.document,rie=mre(nie)&&mre(nie.createElement),iie=function(e){return rie?nie.createElement(e):{}},oie=!Yne&&!Kne(function(){return 7!=Object.defineProperty(iie("div"),"a",{get:function(){return 7}}).a}),aie=Object.getOwnPropertyDescriptor,sie={f:Yne?aie:function(e,t){if(e=gre(e),t=tie(t),oie)try{return aie(e,t)}catch(n){}if($re(e,t))return tre(!Jne(ere.f,e,t),e[t])}},lie=qne.String,uie=qne.TypeError,cie=function(e){if(mre(e))return e;throw uie(lie(e)+" is not an object")},fie=qne.TypeError,die=Object.defineProperty,hie={f:Yne?die:function(e,t,n){if(cie(e),t=tie(t),cie(n),oie)try{return die(e,t,n)}catch(r){}if("get"in n||"set"in n)throw fie("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},pie=Yne?function(e,t,n){return hie.f(e,t,tre(1,n))}:function(e,t,n){return e[t]=n,e},gie=are(Function.toString);vre(Rre.inspectSource)||(Rre.inspectSource=function(e){return gie(e)});var vie,mie,yie,bie=Rre.inspectSource,wie=qne.WeakMap,xie=vre(wie)&&/native code/.test(bie(wie)),Cie=jre("keys"),Eie=function(e){return Cie[e]||(Cie[e]=qre(e))},kie={},Sie=qne.TypeError,_ie=qne.WeakMap;if(xie||Rre.state){var Die=Rre.state||(Rre.state=new _ie),Aie=are(Die.get),Tie=are(Die.has),Oie=are(Die.set);vie=function(e,t){if(Tie(Die,e))throw new Sie("Object already initialized");return t.facade=e,Oie(Die,e,t),t},mie=function(e){return Aie(Die,e)||{}},yie=function(e){return Tie(Die,e)}}else{var Pie=Eie("state");kie[Pie]=!0,vie=function(e,t){if($re(e,Pie))throw new Sie("Object already initialized");return t.facade=e,pie(e,Pie,t),t},mie=function(e){return $re(e,Pie)?e[Pie]:{}},yie=function(e){return $re(e,Pie)}}var Iie={get:mie,enforce:function(e){return yie(e)?mie(e):vie(e,{})}},Fie=Function.prototype,Bie=Yne&&Object.getOwnPropertyDescriptor,Lie=$re(Fie,"name"),Nie={PROPER:Lie&&"something"===function(){}.name,CONFIGURABLE:Lie&&(!Yne||Yne&&Bie(Fie,"name").configurable)},Mie=$ne(function(e){var t=Nie.CONFIGURABLE,n=Iie.get,r=Iie.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;vre(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!$re(o,"name")||t&&o.name!==f)&&pie(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==qne?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:pie(e,n,o)):u?e[n]=o:Mre(n,o)})(Function.prototype,"toString",function(){return vre(this)&&n(this).source||bie(this)})}),Rie=Math.ceil,jie=Math.floor,Hie=function(e){var t=+e;return t!=t||0===t?0:(t>0?jie:Rie)(t)},zie=Math.max,Uie=Math.min,$ie=function(e,t){var n=Hie(e);return n<0?zie(n+t,0):Uie(n,t)},Wie=Math.min,Vie=function(e){return e>0?Wie(Hie(e),9007199254740991):0},Gie=function(e){return Vie(e.length)},qie=function(e){return function(t,n,r){var i=gre(t),o=Gie(i),a=$ie(r,o);for(e;o>a;a++)if(a in i&&i[a]===n)return a||0;return-1}}(!1),Kie=are([].push),Yie=function(e,t){var n,r=gre(e),i=0,o=[];for(n in r)!$re(kie,n)&&$re(r,n)&&Kie(o,n);for(;t.length>i;)$re(r,n=t[i++])&&(~qie(o,n)||Kie(o,n));return o},Xie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Jie=Xie.concat("length","prototype"),Zie={f:Object.getOwnPropertyNames||function(e){return Yie(e,Jie)}},Qie={f:Object.getOwnPropertySymbols},eoe=are([].concat),toe=yre("Reflect","ownKeys")||function(e){var t=Zie.f(cie(e)),n=Qie.f;return n?eoe(t,n(e)):t},noe=function(e,t){for(var n=toe(t),r=hie.f,i=sie.f,o=0;o<n.length;o++){var a=n[o];$re(e,a)||r(e,a,i(t,a))}},roe=/#|\.prototype\./,ioe=function(e,t){var n=aoe[ooe(e)];return n==loe||n!=soe&&(vre(t)?Kne(t):!!t)},ooe=ioe.normalize=function(e){return String(e).replace(roe,".").toLowerCase()},aoe=ioe.data={},soe=ioe.NATIVE="N",loe=ioe.POLYFILL="P",uoe=ioe,coe=sie.f,foe=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?qne:u?qne[s]||Mre(s,{}):(qne[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=coe(n,r))&&a.value:n[r],!uoe(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;noe(o,i)}(e.sham||i&&i.sham)&&pie(o,"sham",!0),Mie(n,r,o,e)}},doe={};doe[Zre("toStringTag")]="z";var hoe="[object z]"===String(doe),poe=Zre("toStringTag"),goe=qne.Object,voe="Arguments"==ure(function(){return arguments}()),moe=hoe?ure:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=goe(e),poe))?n:voe?ure(t):"Object"==(r=ure(t))&&vre(t.callee)?"Arguments":r},yoe=qne.String,boe=function(e){if("Symbol"===moe(e))throw TypeError("Cannot convert a Symbol value to a string");return yoe(e)},woe=/"/g,xoe=are("".replace);foe({target:"String",proto:!0,forced:Kne(function(){var e="".anchor('"');return e!==e.toLowerCase()||e.split('"').length>3})},{anchor:function(e){return t=e,n=boe(pre(this)),r="<a",(r+=' name="'+xoe(boe(t),woe,"&quot;")+'"')+">"+n+"</a>";var t,n,r}});var Coe,Eoe=function(){var e=cie(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},koe=qne.RegExp,Soe=Kne(function(){var e=koe("a","y");return e.lastIndex=2,null!=e.exec("abcd")});Soe||Kne(function(){return!koe("a","y").sticky});var _oe={BROKEN_CARET:Soe||Kne(function(){var e=koe("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),UNSUPPORTED_Y:Soe},Doe=Object.keys||function(e){return Yie(e,Xie)},Aoe=Yne?Object.defineProperties:function(e,t){cie(e);for(var n,r=gre(t),i=Doe(t),o=i.length,a=0;o>a;)hie.f(e,n=i[a++],r[n]);return e},Toe=yre("document","documentElement"),Ooe=Eie("IE_PROTO"),Poe=function(){},Ioe=function(e){return"<script>"+e+"<\/script>"},Foe=function(e){e.write(Ioe("")),e.close();var t=e.parentWindow.Object;return e=null,t},Boe=function(){try{Coe=new ActiveXObject("htmlfile")}catch(r){}var e,t;Boe="undefined"!=typeof document?document.domain&&Coe?Foe(Coe):((t=iie("iframe")).style.display="none",Toe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Ioe("document.F=Object")),e.close(),e.F):Foe(Coe);for(var n=Xie.length;n--;)delete Boe.prototype[Xie[n]];return Boe()};kie[Ooe]=!0;var Loe,Noe,Moe=Object.create||function(e,t){var n;return null!==e?(Poe.prototype=cie(e),n=new Poe,Poe.prototype=null,n[Ooe]=e):n=Boe(),void 0===t?n:Aoe(n,t)},Roe=qne.RegExp,joe=Kne(function(){var e=Roe(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),Hoe=qne.RegExp,zoe=Kne(function(){var e=Hoe("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Uoe=Iie.get,$oe=jre("native-string-replace",String.prototype.replace),Woe=RegExp.prototype.exec,Voe=Woe,Goe=are("".charAt),qoe=are("".indexOf),Koe=are("".replace),Yoe=are("".slice),Xoe=(Noe=/b*/g,Jne(Woe,Loe=/a/,"a"),Jne(Woe,Noe,"a"),0!==Loe.lastIndex||0!==Noe.lastIndex),Joe=_oe.BROKEN_CARET,Zoe=void 0!==/()??/.exec("")[1];(Xoe||Zoe||Joe||joe||zoe)&&(Voe=function(e){var t,n,r,i,o,a,s,l=this,u=Uoe(l),c=boe(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=Jne(Voe,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=Joe&&l.sticky,p=Jne(Eoe,l),g=l.source,v=0,m=c;if(h&&(p=Koe(p,"y",""),-1===qoe(p,"g")&&(p+="g"),m=Yoe(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Goe(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),Zoe&&(n=new RegExp("^"+g+"$(?!\\s)",p)),Xoe&&(r=l.lastIndex),i=Jne(Woe,h?n:l,m),h?i?(i.input=Yoe(i.input,v),i[0]=Yoe(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:Xoe&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),Zoe&&i&&i.length>1&&Jne($oe,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=Moe(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var Qoe=Voe;foe({target:"RegExp",proto:!0,forced:/./.exec!==Qoe},{exec:Qoe});var eae=Array.isArray||function(e){return"Array"==ure(e)},tae=function(){},nae=[],rae=yre("Reflect","construct"),iae=/^\s*(?:class|function)\b/,oae=are(iae.exec),aae=!iae.exec(tae),sae=function(e){if(!vre(e))return!1;try{return rae(tae,nae,e),!0}catch(t){return!1}},lae=!rae||Kne(function(){var e;return sae(sae.call)||!sae(Object)||!sae(function(){e=!0})||e})?function(e){if(!vre(e))return!1;switch(moe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return aae||!!oae(iae,bie(e))}:sae,uae=function(e,t,n){var r=tie(t);r in e?hie.f(e,r,tre(0,n)):e[r]=n},cae=Zre("species"),fae=function(e){return Sre>=51||!Kne(function(){var t=[];return(t.constructor={})[cae]=function(){return{foo:1}},1!==t[e](Boolean).foo})},dae=are([].slice),hae=fae("slice"),pae=Zre("species"),gae=qne.Array,vae=Math.max;function mae(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function yae(e){var t=e.selection;if(null==t)return!1;var n=mae(SS.nodes(e,{match:function(e){return yz.checkNodeType(e,"table-cell")}}),1)[0];if(n){var r=mae(n,2)[1],i=SS.start(e,r);if(RS.equals(t.anchor,i))return!0}return!1}function bae(e,t){var n,r,i=SS.nodes(e,{at:t,match:function(e){return"table"===yz.getNodeType(e)}}),o=!1;try{for(var a=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),s=a.next();!s.done;s=a.next())s.value,o=!0}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}foe({target:"Array",proto:!0,forced:!hae},{slice:function(e,t){var n,r,i,o=gre(this),a=Gie(o),s=$ie(e,a),l=$ie(void 0===t?a:t,a);if(eae(o)&&(n=o.constructor,(lae(n)&&(n===gae||eae(n.prototype))||mre(n)&&null===(n=n[pae]))&&(n=void 0),n===gae||void 0===n))return dae(o,s,l);for(r=new(void 0===n?gae:n)(vae(l-s,0)),i=0;s<l;s++,i++)s in o&&uae(r,i,o[s]);return r.length=i,r}});var wae=are(are.bind),xae=Zre("species"),Cae=qne.Array,Eae=function(e,t){return new(eae(n=e)&&(r=n.constructor,(lae(r)&&(r===Cae||eae(r.prototype))||mre(r)&&null===(r=r[xae]))&&(r=void 0)),void 0===r?Cae:r)(0===t?0:t);var n,r},kae=are([].push),Sae=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=zre(l),g=dre(p),v=function(e,t){return Fre(e),void 0===t?e:wae?wae(e,t):function(){return e.apply(t,arguments)}}(u,c),m=Gie(g),y=0,b=f||Eae,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:kae(w,d)}else switch(e){case 4:return!1;case 7:kae(w,d)}return o?-1:r||i?i:w}},_ae={forEach:Sae(0),map:Sae(1),filter:Sae(2),find:Sae(5)},Dae=_ae.map;foe({target:"Array",proto:!0,forced:!fae("map")},{map:function(e){return Dae(this,e,arguments.length>1?arguments[1]:void 0)}});var Aae=hoe?{}.toString:function(){return"[object "+moe(this)+"]"};function Tae(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function Oae(e){return Tae(e).every(function(e){return!!e.isHeader})}hoe||Mie(Object.prototype,"toString",Aae,{unsafe:!0});var Pae=Nie.PROPER,Iae=RegExp.prototype,Fae=Iae.toString,Bae=are(Eoe),Lae=Kne(function(){return"/a/b"!=Fae.call({source:"a",flags:"b"})}),Nae=Pae&&"toString"!=Fae.name;(Lae||Nae)&&Mie(RegExp.prototype,"toString",function(){var e=cie(this),t=boe(e.source),n=e.flags;return"/"+t+"/"+boe(void 0===n&&bre(Iae,e)&&!("flags"in Iae)?Bae(e):n)},{unsafe:!0});var Mae=Zre("unscopables"),Rae=Array.prototype;null==Rae[Mae]&&hie.f(Rae,Mae,{configurable:!0,value:Moe(null)});var jae=_ae.find,Hae=!0;"find"in[]&&Array(1).find(function(){Hae=!1}),foe({target:"Array",proto:!0,forced:Hae},{find:function(e){return jae(this,e,arguments.length>1?arguments[1]:void 0)}}),Rae[Mae].find=!0;var zae=Function.prototype,Uae=zae.apply,$ae=zae.bind,Wae=zae.call,Vae="object"==typeof Reflect&&Reflect.apply||($ae?Wae.bind(Uae):function(){return Wae.apply(Uae,arguments)}),Gae=Zre("species"),qae=RegExp.prototype,Kae=function(e,t,n,r){var i=Zre(e),o=!Kne(function(){var t={};return t[i]=function(){return 7},7!=""[e](t)}),a=o&&!Kne(function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Gae]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});if(!o||!a||n){var s=are(/./[i]),l=t(i,""[e],function(e,t,n,r,i){var a=are(e),l=t.exec;return l===Qoe||l===qae.exec?o&&!i?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}});Mie(String.prototype,e,l[0]),Mie(qae,i,l[1])}r&&pie(qae[i],"sham",!0)},Yae=Zre("match"),Xae=qne.TypeError,Jae=Zre("species"),Zae=are("".charAt),Qae=are("".charCodeAt),ese=are("".slice),tse=function(e,t){var n,r,i=boe(pre(e)),o=Hie(t),a=i.length;return o<0||o>=a?"":(n=Qae(i,o))<55296||n>56319||o+1===a||(r=Qae(i,o+1))<56320||r>57343?Zae(i,o):ese(i,o,o+2)},nse=function(e,t,n){return t+(n?tse(e,t).length:1)},rse=qne.Array,ise=Math.max,ose=function(e,t,n){for(var r=Gie(e),i=$ie(t,r),o=$ie(void 0===n?r:n,r),a=rse(ise(o-i,0)),s=0;i<o;i++,s++)uae(a,s,e[i]);return a.length=s,a},ase=qne.TypeError,sse=function(e,t){var n=e.exec;if(vre(n)){var r=Jne(n,e,t);return null!==r&&cie(r),r}if("RegExp"===ure(e))return Jne(Qoe,e,t);throw ase("RegExp#exec called on incompatible receiver")},lse=_oe.UNSUPPORTED_Y,use=Math.min,cse=[].push,fse=are(/./.exec),dse=are(cse),hse=are("".slice);Kae("split",function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r,i,o=boe(pre(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[o];if(!mre(r=e)||!(void 0!==(i=r[Yae])?i:"RegExp"==ure(r)))return Jne(t,o,e,a);for(var s,l,u,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,f+"g");(s=Jne(Qoe,h,o))&&!((l=h.lastIndex)>d&&(dse(c,hse(o,d,s.index)),s.length>1&&s.index<o.length&&Vae(cse,c,ose(s,1)),u=s[0].length,d=l,c.length>=a));)h.lastIndex===s.index&&h.lastIndex++;return d===o.length?!u&&fse(h,"")||dse(c,""):dse(c,hse(o,d)),c.length>a?ose(c,0,a):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:Jne(t,this,e,n)}:t,[function(t,n){var i=pre(this),o=null==t?void 0:Bre(t,e);return o?Jne(o,t,i,n):Jne(r,boe(i),t,n)},function(e,i){var o=cie(this),a=boe(e),s=n(r,o,a,i,r!==t);if(s.done)return s.value;var l,u,c,f=(l=RegExp,void 0===(c=cie(o).constructor)||null==(u=cie(c)[Jae])?l:function(e){if(lae(e))return e;throw Xae(Pre(e)+" is not a constructor")}(u)),d=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(lse?"g":"y"),p=new f(lse?"^(?:"+o.source+")":o,h),g=void 0===i?4294967295:i>>>0;if(0===g)return[];if(0===a.length)return null===sse(p,a)?[a]:[];for(var v=0,m=0,y=[];m<a.length;){p.lastIndex=lse?0:m;var b,w=sse(p,lse?hse(a,m):a);if(null===w||(b=use(Vie(p.lastIndex+(lse?m:0)),a.length))===v)m=nse(a,m,d);else{if(dse(y,hse(a,v,m)),y.length===g)return y;for(var x=1;x<=w.length-1;x++)if(dse(y,w[x]),y.length===g)return y;m=v=b}}return dse(y,hse(a,v)),y}]},!!Kne(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),lse);var pse="\t\n\v\f\r                 \u2028\u2029\ufeff",gse=are("".replace),vse="["+pse+"]",mse=RegExp("^"+vse+vse+"*"),yse=RegExp(vse+vse+"*$"),bse={trim:function(e){var t=boe(pre(e));return t=gse(t,mse,""),t=gse(t,yse,"")}},wse=Nie.PROPER,xse=bse.trim;function Cse(e){return e.length?e[0].tagName.toLowerCase():""}foe({target:"String",proto:!0,forced:function(e){return Kne(function(){return!!pse[e]()||"​…᠎"!=="​…᠎"[e]()||wse&&pse[e].name!==e})}("trim")},{trim:function(){return xse(this)}}),foe({global:!0},{globalThis:qne}),KD&&(DD.fn.append=KD),LD&&(DD.fn.on=LD),oA&&(DD.fn.focus=oA),PD&&(DD.fn.attr=PD),BD&&(DD.fn.val=BD),VD&&(DD.fn.html=VD),FD&&(DD.fn.dataset=FD),AD&&(DD.fn.addClass=AD),TD&&(DD.fn.removeClass=TD),QD&&(DD.fn.children=QD),$D&&(DD.fn.each=$D),ZD&&(DD.fn.find=ZD);var Ese=!1,kse=0,Sse=0,_se=null,Dse=null,Ase=DD("body");function Tse(e){Ese=!1,Dse=null,_se=null,Ase.off("mousemove",Ose),Ase.off("mouseup",Tse)}Ase.on("mousedown",function(e){var t=e.target;if(("TH"===t.tagName||"TD"===t.tagName)&&"col-resize"===t.style.cursor){t.style.cursor="auto",e.preventDefault(),Ese=!0;var n=e.clientX;kse=n;var r=t.getBoundingClientRect().width;Sse=r,Ase.on("mousemove",Ose),Ase.on("mouseup",Tse)}});var Ose=MA(function(e){if(Ese&&null!=Dse&&null!=_se){e.preventDefault();var t=e.clientX,n=Sse+(t-kse);(n=Math.floor(100*n)/100)<30&&(n=30),h_.setNodes(Dse,{width:n.toString()},{at:_se})}},100),Pse={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(US.isCollapsed(n))return!0;var r=n.anchor,i=n.focus,o=yz.findPath(e,t),a=SS.start(e,o),s=SS.end(e,o),l=RS.compare(r,s)<=0&&RS.compare(r,a)>=0,u=RS.compare(i,s)<=0&&RS.compare(i,a)>=0;return!!(l&&u&&BS.equals(r.path.slice(0,3),i.path.slice(0,3)))}(n,e),i=e.width,o=void 0===i?"auto":i;return vT("div",{className:"table-container","data-selected":yz.isNodeSelected(n,e),on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){var r=yz.findPath(n,e),i=SS.start(n,r),o=n.selection;null!=o?o.anchor.path[0]!==r[0]&&n.select(i):n.select(i)}}}},vT("table",{width:o,contentEditable:r},vT("colgroup",null,Tae(e).map(function(e){var t=e.width;return vT("col",{width:void 0===t?"auto":t})})),vT("tbody",null,t)))}},Ise={type:"table-row",renderElem:function(e,t,n){return vT("tr",null,t)}},Fse={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=yz.getParentNode(e,t);if(null==n)return!1;var r=yz.getParentNode(e,n);return null!=r&&Tae(r).some(function(e){return e===t})}(n,e),i=e,o=i.colSpan,a=void 0===o?1:o,s=i.rowSpan,l=void 0===s?1:s,u=i.isHeader;return r?vT(void 0!==u&&u?"th":"td",{colSpan:a,rowSpan:l,style:{borderRightWidth:"3px"},on:{mousemove:MA(function(t){var r=this.elm;if(null!=r){var i=r.getBoundingClientRect(),o=i.left,a=i.width,s=i.top,l=i.height,u=t.clientX,c=t.clientY;Ese||(u>o+a-5&&u<o+a&&c>s&&c<s+l?(r.style.cursor="col-resize",Dse=n,_se=yz.findPath(n,e)):Ese||(r.style.cursor="auto",Dse=null,_se=null))}},100)}},t):vT("td",{colSpan:a,rowSpan:l},t)}},Bse={selector:"table",preParseHtml:function(e){var t=DD(e);if("table"!==Cse(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}},Lse=_ae.filter;foe({target:"Array",proto:!0,forced:!fae("filter")},{filter:function(e){return Lse(this,e,arguments.length>1?arguments[1]:void 0)}});var Nse=Math.floor,Mse=are("".charAt),Rse=are("".replace),jse=are("".slice),Hse=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,zse=/\$([$&'`]|\d{1,2})/g,Use=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=zse;return void 0!==i&&(i=zre(i),l=Hse),Rse(o,l,function(o,l){var u;switch(Mse(l,0)){case"$":return"$";case"&":return e;case"`":return jse(t,0,n);case"'":return jse(t,a);case"<":u=i[jse(l,1,-1)];break;default:var c=+l;if(0===c)return o;if(c>s){var f=Nse(c/10);return 0===f?o:f<=s?void 0===r[f-1]?Mse(l,1):r[f-1]+Mse(l,1):o}u=r[c-1]}return void 0===u?"":u})},$se=Zre("replace"),Wse=Math.max,Vse=Math.min,Gse=are([].concat),qse=are([].push),Kse=are("".indexOf),Yse=are("".slice),Xse="$0"==="a".replace(/./,"$0"),Jse=!!/./[$se]&&""===/./[$se]("a","$0");Kae("replace",function(e,t,n){var r=Jse?"$":"$0";return[function(e,n){var r=pre(this),i=null==e?void 0:Bre(e,$se);return i?Jne(i,e,r,n):Jne(t,boe(r),e,n)},function(e,i){var o=cie(this),a=boe(e);if("string"==typeof i&&-1===Kse(i,r)&&-1===Kse(i,"$<")){var s=n(t,o,a,i);if(s.done)return s.value}var l=vre(i);l||(i=boe(i));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var f=[];;){var d=sse(o,a);if(null===d)break;if(qse(f,d),!u)break;""===boe(d[0])&&(o.lastIndex=nse(a,Vie(o.lastIndex),c))}for(var h,p="",g=0,v=0;v<f.length;v++){for(var m=boe((d=f[v])[0]),y=Wse(Vse(Hie(d.index),a.length),0),b=[],w=1;w<d.length;w++)qse(b,void 0===(h=d[w])?h:String(h));var x=d.groups;if(l){var C=Gse([m],b,y,a);void 0!==x&&qse(C,x);var E=boe(Vae(i,void 0,C))}else E=Use(m,a,y,b,x,i);y>=g&&(p+=Yse(a,g,y)+E,g=y+m.length)}return p+Yse(a,g)}]},!!Kne(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!Xse||Jse);var Zse={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e);0===(t=t.filter(function(e){return!!YS.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var i=parseInt(r.attr("colSpan")||"1"),o=parseInt(r.attr("rowSpan")||"1"),a=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===Cse(r),colSpan:i,rowSpan:o,width:a,children:t}}},Qse={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"table-row",children:t.filter(function(e){return"table-cell"===yz.getNodeType(e)})}}},ele={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=DD(e),i="auto";return"100%"===function(e){for(var t="",n=(e.attr("style")||"").split(";"),r=n.length,i=0;i<r;i++){var o=n[i];if(o){var a=o.split(":");"width"===a[0].trim()&&(t=a[1].trim())}}return t}(r)&&(i="100%"),"100%"===r.attr("width")&&(i="100%"),{type:"table",width:i,children:t.filter(function(e){return"table-row"===yz.getNodeType(e)})}}},tle=function(){function e(){this.title=XG("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||!!yz.getSelectedElems(e).some(function(t){var n=yz.getNodeType(t);return"pre"===n||"table"===n||"list-item"===n||!!e.isVoid(t)})},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=DD('<div class="w-e-panel-content-table"></div>'),r=DD("<span>0 &times; 0</span>"),i=DD("<table></table>"),o=0;o<10;o++){for(var a=DD("<tr></tr>"),s=0;s<10;s++){var l=DD("<td></td>");l.attr("data-x",s.toString()),l.attr("data-y",o.toString()),a.append(l),l.on("mouseenter",function(e){var t=e.target;if(null!=t){var n=DD(t).dataset(),o=n.x,a=n.y;r[0].innerHTML=o+1+" &times; "+(a+1),i.children().each(function(e){DD(e).children().each(function(e){var t=DD(e),n=t.dataset(),r=n.x,i=n.y;r<=o&&i<=a?t.addClass("active"):t.removeClass("active")})})}}),l.on("click",function(n){n.preventDefault();var r=n.target;if(null!=r){var i=DD(r).dataset(),o=i.x,a=i.y;t.insertTable(e,a+1,o+1)}})}i.append(a)}return n.append(i),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),i=parseInt(n,10);if(r&&i&&!(r<=0||i<=0)){yz.isSelectedEmptyParagraph(e)&&h_.removeNodes(e,{mode:"highest"});var o=function(e,t){for(var n=[],r=0;r<e;r++){for(var i=[],o=0;o<t;o++){var a={type:"table-cell",children:[{text:""}]};0===r&&(a.isHeader=!0),i.push(a)}n.push({type:"table-row",children:i})}return{type:"table",width:"auto",children:n}}(r,i);h_.insertNodes(e,o,{mode:"highest"})}},e}(),nle=function(){function e(){this.title=XG("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==yz.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||h_.removeNodes(e,{mode:"highest"})},e}(),rle=function(){function e(){this.title=XG("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=mae(SS.nodes(e,{match:function(e){return yz.checkNodeType(e,"table-cell")},universal:!0}),1),r=mae(n[0],2),i=r[0],o=r[1],a=yz.getParentNode(e,i),s=(null==a?void 0:a.children.length)||0;if(0!==s){for(var l={type:"table-row",children:[]},u=0;u<s;u++)l.children.push({type:"table-cell",children:[{text:""}]});var c=BS.parent(o),f=BS.next(c);h_.insertNodes(e,l,{at:f})}}},e}(),ile=function(){function e(){this.title=XG("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"table-row")},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=mae(SS.nodes(e,{match:function(e){return yz.checkNodeType(e,"table-row")},universal:!0}),1),r=mae(n[0],2),i=r[0],o=r[1],a=yz.getParentNode(e,i);((null==a?void 0:a.children.length)||0)<=1?h_.removeNodes(e,{mode:"highest"}):h_.removeNodes(e,{at:o})}},e}(),ole={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ale=iie("span").classList,sle=ale&&ale.constructor&&ale.constructor.prototype,lle=sle===Object.prototype?void 0:sle,ule=_ae.forEach,cle=function(){var e=[].forEach;return!!e&&Kne(function(){e.call(null,function(){throw 1},1)})}(),fle=cle?[].forEach:function(e){return ule(this,e,arguments.length>1?arguments[1]:void 0)},dle=function(e){if(e&&e.forEach!==fle)try{pie(e,"forEach",fle)}catch(t){e.forEach=fle}};for(var hle in ole)ole[hle]&&dle(qne[hle]&&qne[hle].prototype);dle(lle);var ple=function(){function e(){this.title=XG("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=mae(SS.nodes(e,{match:function(e){return yz.checkNodeType(e,"table-cell")},universal:!0}),1),r=mae(n[0],2),i=r[0],o=r[1],a=yz.getParentNode(e,i);if(null!=a){var s=yz.getParentNode(e,a);null!=s&&(s.children||[]).forEach(function(t,n){bS.isElement(t)&&(t.children||[]).forEach(function(t){var r=yz.findPath(e,t);if(r.length===o.length&&zne(r.slice(-1),o.slice(-1))){var i={type:"table-cell",children:[{text:""}]};0===n&&Oae(s)&&(i.isHeader=!0),h_.insertNodes(e,i,{at:r})}})})}}},e}(),gle=function(){function e(){this.title=XG("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"table-cell")},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=mae(SS.nodes(e,{match:function(e){return yz.checkNodeType(e,"table-cell")},universal:!0}),1),r=mae(n[0],2),i=r[0],o=r[1],a=yz.getParentNode(e,i),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)h_.removeNodes(e,{mode:"highest"});else{var l=yz.getParentNode(e,a);null!=l&&(l.children||[]).forEach(function(t){bS.isElement(t)&&(t.children||[]).forEach(function(t){var n=yz.findPath(e,t);n.length===o.length&&zne(n.slice(-1),o.slice(-1))&&h_.removeNodes(e,{at:n})})})}}},e}(),vle=function(){function e(){this.title=XG("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=yz.getSelectedNodeByType(e,"table");return null!=t&&Oae(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=yz.getSelectedNodeByType(e,"table");null!=r&&Tae(r).forEach(function(t){return h_.setNodes(e,{isHeader:n},{at:yz.findPath(e,t)})})}},e}(),mle=function(){function e(){this.title=XG("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=yz.getSelectedNodeByType(e,"table");return null!=t&&"100%"===t.width},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||null==yz.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n={width:t?"auto":"100%"};h_.setNodes(e,n,{mode:"highest"})}},e}(),yle={renderElems:[Pse,Ise,Fse],elemsToHtml:[{type:"table",elemToHtml:function(e,t){var n=e.width;return'<table style="width: '+(void 0===n?"auto":n)+';"><tbody>'+t+"</tbody></table>"}},{type:"table-row",elemToHtml:function(e,t){return"<tr>"+t+"</tr>"}},{type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,i=void 0===r?1:r,o=n.rowSpan,a=void 0===o?1:o,s=n.isHeader,l=void 0!==s&&s,u=n.width,c=l?"th":"td";return"<"+c+' colSpan="'+i+'" rowSpan="'+a+'" width="'+(void 0===u?"auto":u)+'">'+t+"</"+c+">"}}],preParseHtml:[Bse],parseElemsHtml:[Zse,Qse,ele],menus:[{key:"insertTable",factory:function(){return new tle}},{key:"deleteTable",factory:function(){return new nle}},{key:"insertTableRow",factory:function(){return new rle}},{key:"deleteTableRow",factory:function(){return new ile}},{key:"insertTableCol",factory:function(){return new ple}},{key:"deleteTableCol",factory:function(){return new gle}},{key:"tableHeader",factory:function(){return new vle}},{key:"tableFullWidth",factory:function(){return new mle}}],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,i=e.normalizeNode,o=e.insertData,a=e.handleTab,s=e.selectAll,l=e;return l.insertBreak=function(){null==yz.getSelectedNodeByType(l,"table")?t():l.insertText("\n")},l.deleteBackward=function(e){if(!yae(l)){var t=l.selection;if(t){var r=SS.before(l,t);if(r){var i=bae(l,r),o=bae(l,t);if(i&&!o)return}}n(e)}},l.handleTab=function(){var t;if(yz.getSelectedNodeByType(l,"table")){var n=SS.above(e);yz.checkNodeType(n[0],"table-cell")&&h_.select(e,n[1]);var r=SS.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=SS.above(e,{at:r[1]}))&&void 0!==t?t:r),h_.select(e,r[1]);else{var i=l.children||[],o=i.length;if(yz.checkNodeType(i[o-1],"table")){var s=yz.genEmptyParagraph();h_.insertNodes(l,s,{at:[o]}),l.handleTab()}}}else a()},l.deleteForward=function(e){yae(l)||r(e)},l.normalizeNode=function(e){var t=mae(e,2),n=t[0],r=t[1];if("table"!==yz.getNodeType(n))return i([n,r]);if(yz.isLastNode(l,n)){var o=yz.genEmptyParagraph();h_.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=yz.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?o(e):SS.insertText(l,t)}else o(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=yz.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(BS.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==OS.string(t).length){var i=yz.findPath(l,t),o={anchor:SS.start(l,i),focus:SS.end(l,i)};l.select(o)}else s();else s()}else s()}else s()},l}};YG("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",width:"Width",height:"Height"}}),YG("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",width:"宽度",height:"高度"}});var ble=function(){return ble=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ble.apply(this,arguments)};function wle(e,t,n,r){return new(n||(n=Promise))(function(t,i){function o(e){try{s(r.next(e))}catch(t){i(t)}}function a(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n(function(e){e(r)})).then(o,a)}s((r=r.apply(e,[])).next())})}function xle(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Cle(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var Ele="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function kle(e){var t={exports:{}};return e(t,t.exports),t.exports}var Sle,_le,Dle=function(e){return e&&e.Math==Math&&e},Ale=Dle("object"==typeof globalThis&&globalThis)||Dle("object"==typeof window&&window)||Dle("object"==typeof self&&self)||Dle("object"==typeof Ele&&Ele)||function(){return this}()||Function("return this")(),Tle=function(e){try{return!!e()}catch(t){return!0}},Ole=!Tle(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ple=Function.prototype.call,Ile=Ple.bind?Ple.bind(Ple):function(){return Ple.apply(Ple,arguments)},Fle={}.propertyIsEnumerable,Ble=Object.getOwnPropertyDescriptor,Lle={f:Ble&&!Fle.call({1:2},1)?function(e){var t=Ble(this,e);return!!t&&t.enumerable}:Fle},Nle=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Mle=Function.prototype,Rle=Mle.bind,jle=Mle.call,Hle=Rle&&Rle.bind(jle),zle=Rle?function(e){return e&&Hle(jle,e)}:function(e){return e&&function(){return jle.apply(e,arguments)}},Ule=zle({}.toString),$le=zle("".slice),Wle=function(e){return $le(Ule(e),8,-1)},Vle=Ale.Object,Gle=zle("".split),qle=Tle(function(){return!Vle("z").propertyIsEnumerable(0)})?function(e){return"String"==Wle(e)?Gle(e,""):Vle(e)}:Vle,Kle=Ale.TypeError,Yle=function(e){if(null==e)throw Kle("Can't call method on "+e);return e},Xle=function(e){return qle(Yle(e))},Jle=function(e){return"function"==typeof e},Zle=function(e){return"object"==typeof e?null!==e:Jle(e)},Qle=function(e,t){return arguments.length<2?function(e){return Jle(e)?e:void 0}(Ale[e]):Ale[e]&&Ale[e][t]},eue=zle({}.isPrototypeOf),tue=Qle("navigator","userAgent")||"",nue=Ale.process,rue=Ale.Deno,iue=nue&&nue.versions||rue&&rue.version,oue=iue&&iue.v8;oue&&(_le=(Sle=oue.split("."))[0]>0&&Sle[0]<4?1:+(Sle[0]+Sle[1])),!_le&&tue&&(!(Sle=tue.match(/Edge\/(\d+)/))||Sle[1]>=74)&&(Sle=tue.match(/Chrome\/(\d+)/))&&(_le=+Sle[1]);var aue=_le,sue=!!Object.getOwnPropertySymbols&&!Tle(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&aue&&aue<41}),lue=sue&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,uue=Ale.Object,cue=lue?function(e){return"symbol"==typeof e}:function(e){var t=Qle("Symbol");return Jle(t)&&eue(t.prototype,uue(e))},fue=Ale.String,due=function(e){try{return fue(e)}catch(t){return"Object"}},hue=Ale.TypeError,pue=function(e){if(Jle(e))return e;throw hue(due(e)+" is not a function")},gue=function(e,t){var n=e[t];return null==n?void 0:pue(n)},vue=Ale.TypeError,mue=Object.defineProperty,yue=function(e,t){try{mue(Ale,e,{value:t,configurable:!0,writable:!0})}catch(ZG){Ale[e]=t}return t},bue=Ale["__core-js_shared__"]||yue("__core-js_shared__",{}),wue=kle(function(e){(e.exports=function(e,t){return bue[e]||(bue[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),xue=Ale.Object,Cue=function(e){return xue(Yle(e))},Eue=zle({}.hasOwnProperty),kue=Object.hasOwn||function(e,t){return Eue(Cue(e),t)},Sue=0,_ue=Math.random(),Due=zle(1..toString),Aue=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Due(++Sue+_ue,36)},Tue=wue("wks"),Oue=Ale.Symbol,Pue=Oue&&Oue.for,Iue=lue?Oue:Oue&&Oue.withoutSetter||Aue,Fue=function(e){if(!kue(Tue,e)||!sue&&"string"!=typeof Tue[e]){var t="Symbol."+e;sue&&kue(Oue,e)?Tue[e]=Oue[e]:Tue[e]=lue&&Pue?Pue(t):Iue(t)}return Tue[e]},Bue=Ale.TypeError,Lue=Fue("toPrimitive"),Nue=function(e){var t=function(e){if(!Zle(e)||cue(e))return e;var t,n=gue(e,Lue);if(n){if(t=Ile(n,e,"string"),!Zle(t)||cue(t))return t;throw Bue("Can't convert object to primitive value")}return function(e){var t,n;if(Jle(t=e.toString)&&!Zle(n=Ile(t,e)))return n;if(Jle(t=e.valueOf)&&!Zle(n=Ile(t,e)))return n;throw vue("Can't convert object to primitive value")}(e)}(e);return cue(t)?t:t+""},Mue=Ale.document,Rue=Zle(Mue)&&Zle(Mue.createElement),jue=function(e){return Rue?Mue.createElement(e):{}},Hue=!Ole&&!Tle(function(){return 7!=Object.defineProperty(jue("div"),"a",{get:function(){return 7}}).a}),zue=Object.getOwnPropertyDescriptor,Uue={f:Ole?zue:function(e,t){if(e=Xle(e),t=Nue(t),Hue)try{return zue(e,t)}catch(n){}if(kue(e,t))return Nle(!Ile(Lle.f,e,t),e[t])}},$ue=Ale.String,Wue=Ale.TypeError,Vue=function(e){if(Zle(e))return e;throw Wue($ue(e)+" is not an object")},Gue=Ale.TypeError,que=Object.defineProperty,Kue={f:Ole?que:function(e,t,n){if(Vue(e),t=Nue(t),Vue(n),Hue)try{return que(e,t,n)}catch(r){}if("get"in n||"set"in n)throw Gue("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Yue=Ole?function(e,t,n){return Kue.f(e,t,Nle(1,n))}:function(e,t,n){return e[t]=n,e},Xue=zle(Function.toString);Jle(bue.inspectSource)||(bue.inspectSource=function(e){return Xue(e)});var Jue,Zue,Que,ece=bue.inspectSource,tce=Ale.WeakMap,nce=Jle(tce)&&/native code/.test(ece(tce)),rce=wue("keys"),ice=function(e){return rce[e]||(rce[e]=Aue(e))},oce={},ace=Ale.TypeError,sce=Ale.WeakMap;if(nce||bue.state){var lce=bue.state||(bue.state=new sce),uce=zle(lce.get),cce=zle(lce.has),fce=zle(lce.set);Jue=function(e,t){if(cce(lce,e))throw new ace("Object already initialized");return t.facade=e,fce(lce,e,t),t},Zue=function(e){return uce(lce,e)||{}},Que=function(e){return cce(lce,e)}}else{var dce=ice("state");oce[dce]=!0,Jue=function(e,t){if(kue(e,dce))throw new ace("Object already initialized");return t.facade=e,Yue(e,dce,t),t},Zue=function(e){return kue(e,dce)?e[dce]:{}},Que=function(e){return kue(e,dce)}}var hce={set:Jue,get:Zue,has:Que,enforce:function(e){return Que(e)?Zue(e):Jue(e,{})},getterFor:function(e){return function(t){var n;if(!Zle(t)||(n=Zue(t)).type!==e)throw ace("Incompatible receiver, "+e+" required");return n}}},pce=Function.prototype,gce=Ole&&Object.getOwnPropertyDescriptor,vce=kue(pce,"name"),mce={EXISTS:vce,PROPER:vce&&"something"===function(){}.name,CONFIGURABLE:vce&&(!Ole||Ole&&gce(pce,"name").configurable)},yce=kle(function(e){var t=mce.CONFIGURABLE,n=hce.get,r=hce.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;Jle(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!kue(o,"name")||t&&o.name!==f)&&Yue(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==Ale?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:Yue(e,n,o)):u?e[n]=o:yue(n,o)})(Function.prototype,"toString",function(){return Jle(this)&&n(this).source||ece(this)})}),bce=Math.ceil,wce=Math.floor,xce=function(e){var t=+e;return t!=t||0===t?0:(t>0?wce:bce)(t)},Cce=Math.max,Ece=Math.min,kce=function(e,t){var n=xce(e);return n<0?Cce(n+t,0):Ece(n,t)},Sce=Math.min,_ce=function(e){return e>0?Sce(xce(e),9007199254740991):0},Dce=function(e){return _ce(e.length)},Ace=function(e){return function(t,n,r){var i,o=Xle(t),a=Dce(o),s=kce(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},Tce={includes:Ace(!0),indexOf:Ace(!1)},Oce=Tce.indexOf,Pce=zle([].push),Ice=function(e,t){var n,r=Xle(e),i=0,o=[];for(n in r)!kue(oce,n)&&kue(r,n)&&Pce(o,n);for(;t.length>i;)kue(r,n=t[i++])&&(~Oce(o,n)||Pce(o,n));return o},Fce=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Bce=Fce.concat("length","prototype"),Lce={f:Object.getOwnPropertyNames||function(e){return Ice(e,Bce)}},Nce={f:Object.getOwnPropertySymbols},Mce=zle([].concat),Rce=Qle("Reflect","ownKeys")||function(e){var t=Lce.f(Vue(e)),n=Nce.f;return n?Mce(t,n(e)):t},jce=function(e,t){for(var n=Rce(t),r=Kue.f,i=Uue.f,o=0;o<n.length;o++){var a=n[o];kue(e,a)||r(e,a,i(t,a))}},Hce=/#|\.prototype\./,zce=function(e,t){var n=$ce[Uce(e)];return n==Vce||n!=Wce&&(Jle(t)?Tle(t):!!t)},Uce=zce.normalize=function(e){return String(e).replace(Hce,".").toLowerCase()},$ce=zce.data={},Wce=zce.NATIVE="N",Vce=zce.POLYFILL="P",Gce=zce,qce=Uue.f,Kce=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?Ale:u?Ale[s]||yue(s,{}):(Ale[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=qce(n,r))&&a.value:n[r],!Gce(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;jce(o,i)}(e.sham||i&&i.sham)&&Yue(o,"sham",!0),yce(n,r,o,e)}},Yce={};Yce[Fue("toStringTag")]="z";var Xce="[object z]"===String(Yce),Jce=Fue("toStringTag"),Zce=Ale.Object,Qce="Arguments"==Wle(function(){return arguments}()),efe=Xce?Wle:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Zce(e),Jce))?n:Qce?Wle(t):"Object"==(r=Wle(t))&&Jle(t.callee)?"Arguments":r},tfe=Ale.String,nfe=function(e){if("Symbol"===efe(e))throw TypeError("Cannot convert a Symbol value to a string");return tfe(e)},rfe="\t\n\v\f\r                 \u2028\u2029\ufeff",ife=zle("".replace),ofe="["+rfe+"]",afe=RegExp("^"+ofe+ofe+"*"),sfe=RegExp(ofe+ofe+"*$"),lfe={trim:function(e){var t=nfe(Yle(e));return t=ife(t,afe,""),t=ife(t,sfe,"")}},ufe=mce.PROPER,cfe=lfe.trim;function ffe(e){return e.length?e[0].tagName.toLowerCase():""}function dfe(e,t,n){void 0===t&&(t="auto"),void 0===n&&(n="auto");var r=DD(e);return r.attr("width",t),r.attr("height",n),r[0].outerHTML}Kce({target:"String",proto:!0,forced:Tle(function(){return!!rfe.trim()||"​…᠎"!=="​…᠎".trim()||ufe&&"trim"!==rfe.trim.name})},{trim:function(){return cfe(this)}}),Kce({global:!0},{globalThis:Ale}),KD&&(DD.fn.append=KD),LD&&(DD.fn.on=LD),oA&&(DD.fn.focus=oA),PD&&(DD.fn.attr=PD),BD&&(DD.fn.val=BD),VD&&(DD.fn.html=VD),XD&&(DD.fn.parent=XD),OD&&(DD.fn.hasClass=OD),tA&&(DD.fn.empty=tA);var hfe,pfe={type:"video",renderElem:function(e,t,n){var r,i=e,o=i.src,a=void 0===o?"":o,s=i.poster,l=void 0===s?"":s,u=i.width,c=void 0===u?"auto":u,f=i.height,d=void 0===f?"auto":f,h=yz.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe "))r=vT("div",{className:"w-e-textarea-video-container","data-selected":h?"true":"",innerHTML:dfe(a,c,d)});else{var p=vT("video",{poster:l,controls:!0},vT("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==c&&(p.data.width=c),"auto"!==d&&(p.data.height=d),r=vT("div",{className:"w-e-textarea-video-container","data-selected":h?"true":""},p)}return XA("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r)}},gfe={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,i=void 0===r?"":r,o=n.poster,a=void 0===o?"":o,s=n.width,l=void 0===s?"auto":s,u=n.height,c=void 0===u?"auto":u,f='<div data-w-e-type="video" data-w-e-is-void>\n';return 0===i.trim().indexOf("<iframe ")?f+=dfe(i,l,c):f+='<video poster="'+a+'" controls="true" width="'+l+'" height="'+c+'"><source src="'+i+'" type="video/mp4"/></video>',f+"\n</div>"}},vfe=Object.keys||function(e){return Ice(e,Fce)},mfe=Ole?Object.defineProperties:function(e,t){Vue(e);for(var n,r=Xle(t),i=vfe(t),o=i.length,a=0;o>a;)Kue.f(e,n=i[a++],r[n]);return e},yfe=Qle("document","documentElement"),bfe=ice("IE_PROTO"),wfe=function(){},xfe=function(e){return"<script>"+e+"<\/script>"},Cfe=function(e){e.write(xfe("")),e.close();var t=e.parentWindow.Object;return e=null,t},Efe=function(){try{hfe=new ActiveXObject("htmlfile")}catch(r){}var e,t;Efe="undefined"!=typeof document?document.domain&&hfe?Cfe(hfe):((t=jue("iframe")).style.display="none",yfe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(xfe("document.F=Object")),e.close(),e.F):Cfe(hfe);for(var n=Fce.length;n--;)delete Efe.prototype[Fce[n]];return Efe()};oce[bfe]=!0;var kfe=Object.create||function(e,t){var n;return null!==e?(wfe.prototype=Vue(e),n=new wfe,wfe.prototype=null,n[bfe]=e):n=Efe(),void 0===t?n:mfe(n,t)},Sfe=Fue("unscopables"),_fe=Array.prototype;null==_fe[Sfe]&&Kue.f(_fe,Sfe,{configurable:!0,value:kfe(null)});var Dfe=function(e){_fe[Sfe][e]=!0},Afe=Tce.includes;Kce({target:"Array",proto:!0},{includes:function(e){return Afe(this,e,arguments.length>1?arguments[1]:void 0)}}),Dfe("includes");var Tfe={selector:"iframe,video,p",preParseHtml:function(e){var t=DD(e),n=t;if("p"===ffe(t)){var r=t.children();if(1===r.length){var i=r[0],o=i.tagName.toLowerCase();["iframe","video"].includes(o)&&(n=DD(i))}}var a=ffe(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=DD('<div data-w-e-type="video" data-w-e-is-void></div>');return s.append(n),s[0]}},Ofe=zle(zle.bind),Pfe=function(e,t){return pue(e),void 0===t?e:Ofe?Ofe(e,t):function(){return e.apply(t,arguments)}},Ife=Array.isArray||function(e){return"Array"==Wle(e)},Ffe=function(){},Bfe=[],Lfe=Qle("Reflect","construct"),Nfe=/^\s*(?:class|function)\b/,Mfe=zle(Nfe.exec),Rfe=!Nfe.exec(Ffe),jfe=function(e){if(!Jle(e))return!1;try{return Lfe(Ffe,Bfe,e),!0}catch(t){return!1}},Hfe=!Lfe||Tle(function(){var e;return jfe(jfe.call)||!jfe(Object)||!jfe(function(){e=!0})||e})?function(e){if(!Jle(e))return!1;switch(efe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Rfe||!!Mfe(Nfe,ece(e))}:jfe,zfe=Fue("species"),Ufe=Ale.Array,$fe=function(e,t){return new(Ife(n=e)&&(r=n.constructor,(Hfe(r)&&(r===Ufe||Ife(r.prototype))||Zle(r)&&null===(r=r[zfe]))&&(r=void 0)),void 0===r?Ufe:r)(0===t?0:t);var n,r},Wfe=zle([].push),Vfe=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=Cue(l),g=qle(p),v=Pfe(u,c),m=Dce(g),y=0,b=f||$fe,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:Wfe(w,d)}else switch(e){case 4:return!1;case 7:Wfe(w,d)}return o?-1:r||i?i:w}},Gfe={find:Vfe(5),findIndex:Vfe(6)},qfe=Gfe.find,Kfe=!0;"find"in[]&&Array(1).find(function(){Kfe=!1}),Kce({target:"Array",proto:!0,forced:Kfe},{find:function(e){return qfe(this,e,arguments.length>1?arguments[1]:void 0)}}),Dfe("find");var Yfe=Xce?{}.toString:function(){return"[object "+efe(this)+"]"};function Xfe(e,t,n,r){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),{type:"video",src:e,poster:t,width:n,height:r,children:[{text:""}]}}Xce||yce(Object.prototype,"toString",Yfe,{unsafe:!0});var Jfe,Zfe,Qfe={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=DD(e),i="",o="",a="auto",s="auto",l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",Xfe(i=l[0].outerHTML,o,a,s);var u=r.find("video");return(i=u.attr("src")||"")||u.length>0&&(i=u.find("source").attr("src")||""),a=u.attr("width")||"auto",s=u.attr("height")||"auto",Xfe(i,o=u.attr("poster")||"",a,s)}},ede=function(){var e=Vue(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},tde=Ale.RegExp,nde=Tle(function(){var e=tde("a","y");return e.lastIndex=2,null!=e.exec("abcd")});nde||Tle(function(){return!tde("a","y").sticky});var rde={BROKEN_CARET:nde||Tle(function(){var e=tde("^r","gy");return e.lastIndex=2,null!=e.exec("str")})},ide=Ale.RegExp,ode=Tle(function(){var e=ide(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),ade=Ale.RegExp,sde=Tle(function(){var e=ade("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),lde=hce.get,ude=wue("native-string-replace",String.prototype.replace),cde=RegExp.prototype.exec,fde=cde,dde=zle("".charAt),hde=zle("".indexOf),pde=zle("".replace),gde=zle("".slice),vde=(Zfe=/b*/g,Ile(cde,Jfe=/a/,"a"),Ile(cde,Zfe,"a"),0!==Jfe.lastIndex||0!==Zfe.lastIndex),mde=rde.BROKEN_CARET,yde=void 0!==/()??/.exec("")[1];(vde||yde||mde||ode||sde)&&(fde=function(e){var t,n,r,i,o,a,s,l=this,u=lde(l),c=nfe(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=Ile(fde,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=mde&&l.sticky,p=Ile(ede,l),g=l.source,v=0,m=c;if(h&&(p=pde(p,"y",""),-1===hde(p,"g")&&(p+="g"),m=gde(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==dde(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),yde&&(n=new RegExp("^"+g+"$(?!\\s)",p)),vde&&(r=l.lastIndex),i=Ile(cde,h?n:l,m),h?i?(i.input=gde(i.input,v),i[0]=gde(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:vde&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),yde&&i&&i.length>1&&Ile(ude,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=kfe(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var bde=fde;Kce({target:"RegExp",proto:!0,forced:/./.exec!==bde},{exec:bde});var wde=Function.prototype,xde=wde.apply,Cde=wde.bind,Ede=wde.call,kde="object"==typeof Reflect&&Reflect.apply||(Cde?Ede.bind(xde):function(){return Ede.apply(xde,arguments)}),Sde=(Fue("species"),RegExp.prototype),_de=zle("".charAt),Dde=zle("".charCodeAt),Ade=zle("".slice),Tde={charAt:function(e,t){var n,r,i=nfe(Yle(e)),o=xce(t),a=i.length;return o<0||o>=a?"":(n=Dde(i,o))<55296||n>56319||o+1===a||(r=Dde(i,o+1))<56320||r>57343?_de(i,o):Ade(i,o,o+2)}},Ode=Tde.charAt,Pde=function(e,t,n){return t+(n?Ode(e,t).length:1)},Ide=Math.floor,Fde=zle("".charAt),Bde=zle("".replace),Lde=zle("".slice),Nde=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Mde=/\$([$&'`]|\d{1,2})/g,Rde=function(e,t,n,r,i,o){var a=n+e.length,s=r.length,l=Mde;return void 0!==i&&(i=Cue(i),l=Nde),Bde(o,l,function(o,l){var u;switch(Fde(l,0)){case"$":return"$";case"&":return e;case"`":return Lde(t,0,n);case"'":return Lde(t,a);case"<":u=i[Lde(l,1,-1)];break;default:var c=+l;if(0===c)return o;if(c>s){var f=Ide(c/10);return 0===f?o:f<=s?void 0===r[f-1]?Fde(l,1):r[f-1]+Fde(l,1):o}u=r[c-1]}return void 0===u?"":u})},jde=Ale.TypeError,Hde=function(e,t){var n=e.exec;if(Jle(n)){var r=Ile(n,e,t);return null!==r&&Vue(r),r}if("RegExp"===Wle(e))return Ile(bde,e,t);throw jde("RegExp#exec called on incompatible receiver")},zde=Fue("replace"),Ude=Math.max,$de=Math.min,Wde=zle([].concat),Vde=zle([].push),Gde=zle("".indexOf),qde=zle("".slice),Kde="$0"==="a".replace(/./,"$0"),Yde=!!/./[zde]&&""===/./[zde]("a","$0");function Xde(e){return e+"-"+CA()}!function(e,t,n){var r=Fue(e),i=!Tle(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)}),o=i&&!Tle(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},t[r](""),!e});if(!i||!o||n){var a=zle(/./[r]),s=function(e,t){var n=Yde?"$":"$0";return[function(e,n){var r=Yle(this),i=null==e?void 0:gue(e,zde);return i?Ile(i,e,r,n):Ile(t,nfe(r),e,n)},function(e,r){var o=Vue(this),s=nfe(e);if("string"==typeof r&&-1===Gde(r,n)&&-1===Gde(r,"$<")){var l=function(e,t,n,r){var o=zle(e),s=t.exec;return s===bde||s===Sde.exec?i?{done:!0,value:a(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}(t,o,s,r);if(l.done)return l.value}var u=Jle(r);u||(r=nfe(r));var c=o.global;if(c){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var h=Hde(o,s);if(null===h)break;if(Vde(d,h),!c)break;""===nfe(h[0])&&(o.lastIndex=Pde(s,_ce(o.lastIndex),f))}for(var p,g="",v=0,m=0;m<d.length;m++){for(var y=nfe((h=d[m])[0]),b=Ude($de(xce(h.index),s.length),0),w=[],x=1;x<h.length;x++)Vde(w,void 0===(p=h[x])?p:String(p));var C=h.groups;if(u){var E=Wde([y],w,b,s);void 0!==C&&Vde(E,C);var k=nfe(kde(r,void 0,E))}else k=Rde(y,s,b,w,C,r);b>=v&&(g+=qde(s,v,b)+k,v=b+y.length)}return g+qde(s,v)}]}(0,""[e]);yce(String.prototype,e,s[0]),yce(Sde,r,s[1])}}("replace",0,!!Tle(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!Kde||Yde);var Jde=Ale.Promise,Zde=function(e,t,n){for(var r in t)yce(e,r,t[r],n);return e},Qde=Ale.String,ehe=Ale.TypeError,the=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=zle(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return Vue(n),function(e){if("object"==typeof e||Jle(e))return e;throw ehe("Can't set "+Qde(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),nhe=Kue.f,rhe=Fue("toStringTag"),ihe=function(e,t,n){e&&!kue(e=n?e:e.prototype,rhe)&&nhe(e,rhe,{configurable:!0,value:t})},ohe=Fue("species"),ahe=Ale.TypeError,she=function(e,t){if(eue(t,e))return e;throw ahe("Incorrect invocation")},lhe={},uhe=Fue("iterator"),che=Array.prototype,fhe=Fue("iterator"),dhe=function(e){if(null!=e)return gue(e,fhe)||gue(e,"@@iterator")||lhe[efe(e)]},hhe=Ale.TypeError,phe=function(e,t,n){var r,i;Vue(e);try{if(!(r=gue(e,"return"))){if("throw"===t)throw n;return n}r=Ile(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return Vue(r),n},ghe=Ale.TypeError,vhe=function(e,t){this.stopped=e,this.result=t},mhe=vhe.prototype,yhe=function(e,t,n){var r,i,o,a,s,l,u,c,f=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=Pfe(t,f),v=function(e){return r&&phe(r,"normal",e),new vhe(!0,e)},m=function(e){return d?(Vue(e),p?g(e[0],e[1],v):g(e[0],e[1])):p?g(e,v):g(e)};if(h)r=e;else{if(!(i=dhe(e)))throw ghe(due(e)+" is not iterable");if(void 0!==(c=i)&&(lhe.Array===c||che[uhe]===c)){for(o=0,a=Dce(e);a>o;o++)if((s=m(e[o]))&&eue(mhe,s))return s;return new vhe(!1)}r=function(e,t){var n=arguments.length<2?dhe(e):t;if(pue(n))return Vue(Ile(n,e));throw hhe(due(e)+" is not iterable")}(e,i)}for(l=r.next;!(u=Ile(l,r)).done;){try{s=m(u.value)}catch(y){phe(r,"throw",y)}if("object"==typeof s&&s&&eue(mhe,s))return s}return new vhe(!1)},bhe=Fue("iterator"),whe=!1;try{var xhe=0,Che={next:function(){return{done:!!xhe++}},return:function(){whe=!0}};Che[bhe]=function(){return this},Array.from(Che,function(){throw 2})}catch(TTe){}var Ehe,khe,She,_he,Dhe=function(e,t){if(!whe)return!1;var n=!1;try{var r={};r[bhe]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(i){}return n},Ahe=Ale.TypeError,The=Fue("species"),Ohe=zle([].slice),Phe=/(?:ipad|iphone|ipod).*applewebkit/i.test(tue),Ihe="process"==Wle(Ale.process),Fhe=Ale.setImmediate,Bhe=Ale.clearImmediate,Lhe=Ale.process,Nhe=Ale.Dispatch,Mhe=Ale.Function,Rhe=Ale.MessageChannel,jhe=Ale.String,Hhe=0,zhe={};try{Ehe=Ale.location}catch(TTe){}var Uhe=function(e){if(kue(zhe,e)){var t=zhe[e];delete zhe[e],t()}},$he=function(e){return function(){Uhe(e)}},Whe=function(e){Uhe(e.data)},Vhe=function(e){Ale.postMessage(jhe(e),Ehe.protocol+"//"+Ehe.host)};Fhe&&Bhe||(Fhe=function(e){var t=Ohe(arguments,1);return zhe[++Hhe]=function(){kde(Jle(e)?e:Mhe(e),void 0,t)},khe(Hhe),Hhe},Bhe=function(e){delete zhe[e]},Ihe?khe=function(e){Lhe.nextTick($he(e))}:Nhe&&Nhe.now?khe=function(e){Nhe.now($he(e))}:Rhe&&!Phe?(_he=(She=new Rhe).port2,She.port1.onmessage=Whe,khe=Pfe(_he.postMessage,_he)):Ale.addEventListener&&Jle(Ale.postMessage)&&!Ale.importScripts&&Ehe&&"file:"!==Ehe.protocol&&!Tle(Vhe)?(khe=Vhe,Ale.addEventListener("message",Whe,!1)):khe="onreadystatechange"in jue("script")?function(e){yfe.appendChild(jue("script")).onreadystatechange=function(){yfe.removeChild(this),Uhe(e)}}:function(e){setTimeout($he(e),0)});var Ghe,qhe,Khe,Yhe,Xhe,Jhe,Zhe,Qhe,epe={set:Fhe},tpe=/ipad|iphone|ipod/i.test(tue)&&void 0!==Ale.Pebble,npe=/web0s(?!.*chrome)/i.test(tue),rpe=Uue.f,ipe=epe.set,ope=Ale.MutationObserver||Ale.WebKitMutationObserver,ape=Ale.document,spe=Ale.process,lpe=Ale.Promise,upe=rpe(Ale,"queueMicrotask"),cpe=upe&&upe.value;cpe||(Ghe=function(){var e,t;for(Ihe&&(e=spe.domain)&&e.exit();qhe;){t=qhe.fn,qhe=qhe.next;try{t()}catch(n){throw qhe?Yhe():Khe=void 0,n}}Khe=void 0,e&&e.enter()},Phe||Ihe||npe||!ope||!ape?!tpe&&lpe&&lpe.resolve?((Zhe=lpe.resolve(void 0)).constructor=lpe,Qhe=Pfe(Zhe.then,Zhe),Yhe=function(){Qhe(Ghe)}):Ihe?Yhe=function(){spe.nextTick(Ghe)}:(ipe=Pfe(ipe,Ale),Yhe=function(){ipe(Ghe)}):(Xhe=!0,Jhe=ape.createTextNode(""),new ope(Ghe).observe(Jhe,{characterData:!0}),Yhe=function(){Jhe.data=Xhe=!Xhe}));var fpe,dpe,hpe,ppe,gpe=cpe||function(e){var t={fn:e,next:void 0};Khe&&(Khe.next=t),qhe||(qhe=t,Yhe()),Khe=t},vpe=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=pue(t),this.reject=pue(n)},mpe={f:function(e){return new vpe(e)}},ype=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},bpe="object"==typeof window,wpe=epe.set,xpe=Fue("species"),Cpe="Promise",Epe=hce.getterFor(Cpe),kpe=hce.set,Spe=hce.getterFor(Cpe),_pe=Jde&&Jde.prototype,Dpe=Jde,Ape=_pe,Tpe=Ale.TypeError,Ope=Ale.document,Ppe=Ale.process,Ipe=mpe.f,Fpe=Ipe,Bpe=!!(Ope&&Ope.createEvent&&Ale.dispatchEvent),Lpe=Jle(Ale.PromiseRejectionEvent),Npe=!1,Mpe=Gce(Cpe,function(){var e=ece(Dpe),t=e!==String(Dpe);if(!t&&66===aue)return!0;if(aue>=51&&/native code/.test(e))return!1;var n=new Dpe(function(e){e(1)}),r=function(e){e(function(){},function(){})};return(n.constructor={})[xpe]=r,!(Npe=n.then(function(){})instanceof r)||!t&&bpe&&!Lpe}),Rpe=Mpe||!Dhe(function(e){Dpe.all(e).catch(function(){})}),jpe=function(e){var t;return!(!Zle(e)||!Jle(t=e.then))&&t},Hpe=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;gpe(function(){for(var r=e.value,i=1==e.state,o=0;n.length>o;){var a,s,l,u=n[o++],c=i?u.ok:u.fail,f=u.resolve,d=u.reject,h=u.domain;try{c?(i||(2===e.rejection&&Wpe(e),e.rejection=1),!0===c?a=r:(h&&h.enter(),a=c(r),h&&(h.exit(),l=!0)),a===u.promise?d(Tpe("Promise-chain cycle")):(s=jpe(a))?Ile(s,a,f,d):f(a)):d(r)}catch(p){h&&!l&&h.exit(),d(p)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Upe(e)})}},zpe=function(e,t,n){var r,i;Bpe?((r=Ope.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),Ale.dispatchEvent(r)):r={promise:t,reason:n},!Lpe&&(i=Ale["on"+e])?i(r):"unhandledrejection"===e&&function(e,t){var n=Ale.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},Upe=function(e){Ile(wpe,Ale,function(){var t,n=e.facade,r=e.value;if($pe(e)&&(t=ype(function(){Ihe?Ppe.emit("unhandledRejection",r,n):zpe("unhandledrejection",n,r)}),e.rejection=Ihe||$pe(e)?2:1,t.error))throw t.value})},$pe=function(e){return 1!==e.rejection&&!e.parent},Wpe=function(e){Ile(wpe,Ale,function(){var t=e.facade;Ihe?Ppe.emit("rejectionHandled",t):zpe("rejectionhandled",t,e.value)})},Vpe=function(e,t,n){return function(r){e(t,r,n)}},Gpe=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Hpe(e,!0))},qpe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw Tpe("Promise can't be resolved itself");var r=jpe(t);r?gpe(function(){var n={done:!1};try{Ile(r,t,Vpe(qpe,n,e),Vpe(Gpe,n,e))}catch(i){Gpe(n,i,e)}}):(e.value=t,e.state=1,Hpe(e,!1))}catch(i){Gpe({done:!1},i,e)}}};if(Mpe&&(Ape=(Dpe=function(e){she(this,Ape),pue(e),Ile(fpe,this);var t=Epe(this);try{e(Vpe(qpe,t),Vpe(Gpe,t))}catch(n){Gpe(t,n)}}).prototype,(fpe=function(e){kpe(this,{type:Cpe,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Zde(Ape,{then:function(e,t){var n,r,i,o=Spe(this),a=o.reactions,s=Ipe((n=Dpe,void 0===(i=Vue(this).constructor)||null==(r=Vue(i)[The])?n:function(e){if(Hfe(e))return e;throw Ahe(due(e)+" is not a constructor")}(r)));return s.ok=!Jle(e)||e,s.fail=Jle(t)&&t,s.domain=Ihe?Ppe.domain:void 0,o.parent=!0,a[a.length]=s,0!=o.state&&Hpe(o,!1),s.promise},catch:function(e){return this.then(void 0,e)}}),dpe=function(){var e=new fpe,t=Epe(e);this.promise=e,this.resolve=Vpe(qpe,t),this.reject=Vpe(Gpe,t)},mpe.f=Ipe=function(e){return e===Dpe||e===hpe?new dpe(e):Fpe(e)},Jle(Jde)&&_pe!==Object.prototype)){ppe=_pe.then,Npe||(yce(_pe,"then",function(e,t){var n=this;return new Dpe(function(e,t){Ile(ppe,n,e,t)}).then(e,t)},{unsafe:!0}),yce(_pe,"catch",Ape.catch,{unsafe:!0}));try{delete _pe.constructor}catch(TTe){}the&&the(_pe,Ape)}function Kpe(e,t,n){return void 0===n&&(n=""),wle(this,0,void 0,function(){var r,i,o,a,s,l,u;return xle(this,function(c){switch(c.label){case 0:return t?(e.restoreSelection(),r=e.getMenuConfig("insertVideo"),i=r.onInsertedVideo,o=r.checkVideo,a=r.parseVideoSrc,[4,o(t,n)]):[2];case 1:return"string"==typeof(s=c.sent())?(e.alert(s,"error"),[2]):null==s?[2]:[4,a(t)];case 2:return 0!==(l=c.sent()).trim().indexOf("<iframe ")&&(l=l.replace(/</g,"&lt;").replace(/>/g,"&gt;")),u={type:"video",src:l,poster:n,children:[{text:""}]},Promise.resolve().then(function(){h_.insertNodes(e,u)}),i(u),[2]}})})}function Ype(){return Xde("w-e-insert-video")}Kce({global:!0,wrap:!0,forced:Mpe},{Promise:Dpe}),ihe(Dpe,Cpe,!1),function(){var e=Qle("Promise"),t=Kue.f;Ole&&e&&!e[ohe]&&t(e,ohe,{configurable:!0,get:function(){return this}})}(),hpe=Qle(Cpe),Kce({target:Cpe,stat:!0,forced:Mpe},{reject:function(e){var t=Ipe(this);return Ile(t.reject,void 0,e),t.promise}}),Kce({target:Cpe,stat:!0,forced:Mpe},{resolve:function(e){return function(e,t){if(Vue(e),Zle(t)&&t.constructor===e)return t;var n=mpe.f(e);return(0,n.resolve)(t),n.promise}(this,e)}}),Kce({target:Cpe,stat:!0,forced:Rpe},{all:function(e){var t=this,n=Ipe(t),r=n.resolve,i=n.reject,o=ype(function(){var n=pue(t.resolve),o=[],a=0,s=1;yhe(e,function(e){var l=a++,u=!1;s++,Ile(n,t,e).then(function(e){u||(u=!0,o[l]=e,--s||r(o))},i)}),--s||r(o)});return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=Ipe(t),r=n.reject,i=ype(function(){var i=pue(t.resolve);yhe(e,function(e){Ile(i,t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var Xpe=function(){function e(){this.title=XG("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Ype(),this.posterInputId=Ype(),this.buttonId=Ype()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||!!yz.getSelectedElems(e).some(function(t){var n=yz.getNodeType(t);return"pre"===n||"list-item"===n||!!e.isVoid(t)})},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,i=n.posterInputId,o=n.buttonId,a=Cle(MV(XG("videoModule.videoSrc"),r,XG("videoModule.videoSrcPlaceHolder")),2),s=a[0],l=a[1],u=Cle(MV(XG("videoModule.videoPoster"),i,XG("videoModule.videoPosterPlaceHolder")),2),c=u[0],f=u[1],d=DD(l),h=DD(f),p=Cle(RV(o,XG("videoModule.ok")),1)[0];if(null==this.$content){var g=DD("<div></div>");g.on("click","#"+o,function(n){return wle(t,0,void 0,function(){var t,o;return xle(this,function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#"+r).val().trim(),o=g.find("#"+i).val().trim(),[4,Kpe(e,t,o)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(p),d.val(""),h.val(""),setTimeout(function(){d.focus()}),v[0]},e}(),Jpe=zle([].join),Zpe=qle!=Object,Qpe=function(){var e=[].join;return!!e&&Tle(function(){e.call(null,",",1)})}();Kce({target:"Array",proto:!0,forced:Zpe||!Qpe},{join:function(e){return Jpe(Xle(this),void 0===e?",":e)}});var ege,tge,nge,rge=!Tle(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),ige=ice("IE_PROTO"),oge=Ale.Object,age=oge.prototype,sge=rge?oge.getPrototypeOf:function(e){var t=Cue(e);if(kue(t,ige))return t[ige];var n=t.constructor;return Jle(n)&&t instanceof n?n.prototype:t instanceof oge?age:null},lge=Fue("iterator"),uge=!1;[].keys&&("next"in(nge=[].keys())?(tge=sge(sge(nge)))!==Object.prototype&&(ege=tge):uge=!0);var cge=null==ege||Tle(function(){var e={};return ege[lge].call(e)!==e});cge&&(ege={}),Jle(ege[lge])||yce(ege,lge,function(){return this});var fge={IteratorPrototype:ege,BUGGY_SAFARI_ITERATORS:uge},dge=fge.IteratorPrototype,hge=function(){return this},pge=mce.PROPER,gge=mce.CONFIGURABLE,vge=fge.IteratorPrototype,mge=fge.BUGGY_SAFARI_ITERATORS,yge=Fue("iterator"),bge=function(){return this},wge=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=kfe(dge,{next:Nle(1,l)}),ihe(s,u,!1),lhe[u]=hge;var c,f,d=function(e){if(e===i&&m)return m;if(!mge&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[yge]||g["@@iterator"]||i&&g[i],m=!mge&&v||d(i),y="Array"==t&&g.entries||v;return y&&(c=sge(y.call(new e)))!==Object.prototype&&c.next&&(sge(c)!==vge&&(the?the(c,vge):Jle(c[yge])||yce(c,yge,bge)),ihe(c,h,!0)),pge&&"values"==i&&v&&"values"!==v.name&&(gge?Yue(g,"name","values"):(p=!0,m=function(){return Ile(v,this)})),i&&(f={values:d("values"),keys:d("keys"),entries:d("entries")},a||Kce({target:t,proto:!0,forced:mge||p},f)),g[yge]!==m&&yce(g,yge,m,{name:i}),lhe[t]=m,f},xge=hce.set,Cge=hce.getterFor("Array Iterator"),Ege=wge(Array,"Array",function(e,t){xge(this,{type:"Array Iterator",target:Xle(e),index:0,kind:t})},function(){var e=Cge(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");lhe.Arguments=lhe.Array,Dfe("keys"),Dfe("values"),Dfe("entries");var kge=Tde.charAt,Sge=hce.set,_ge=hce.getterFor("String Iterator");wge(String,"String",function(e){Sge(this,{type:"String Iterator",string:nfe(e),index:0})},function(){var e,t=_ge(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=kge(n,r),t.index+=e.length,{value:e,done:!1})});var Dge=function(e,t,n){var r=Nue(t);r in e?Kue.f(e,r,Nle(0,n)):e[r]=n},Age=Ale.Array,Tge=Math.max,Oge=Lce.f,Pge="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ige={f:function(e){return Pge&&"Window"==Wle(e)?function(e){try{return Oge(e)}catch(t){return function(e){for(var t=Dce(e),n=kce(void 0,t),r=kce(t,t),i=Age(Tge(r-n,0)),o=0;n<r;n++,o++)Dge(i,o,e[n]);return i.length=o,i}(Pge)}}(e):Oge(Xle(e))}},Fge=Tle(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Bge=Object.isExtensible,Lge=Tle(function(){Bge(1)})||Fge?function(e){return!!Zle(e)&&(!Fge||"ArrayBuffer"!=Wle(e))&&(!Bge||Bge(e))}:Bge,Nge=!Tle(function(){return Object.isExtensible(Object.preventExtensions({}))}),Mge=kle(function(e){var t=Kue.f,n=!1,r=Aue("meta"),i=0,o=function(e){t(e,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=Lce.f,t=zle([].splice),i={};i[r]=1,e(i).length&&(Lce.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===r){t(i,o,1);break}return i},Kce({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Ige.f}))},fastKey:function(e,t){if(!Zle(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!kue(e,r)){if(!Lge(e))return"F";if(!t)return"E";o(e)}return e[r].objectID},getWeakData:function(e,t){if(!kue(e,r)){if(!Lge(e))return!0;if(!t)return!1;o(e)}return e[r].weakData},onFreeze:function(e){return Nge&&n&&Lge(e)&&!kue(e,r)&&o(e),e}};oce[r]=!0}),Rge=Mge.getWeakData,jge=hce.set,Hge=hce.getterFor,zge=Gfe.find,Uge=Gfe.findIndex,$ge=zle([].splice),Wge=0,Vge=function(e){return e.frozen||(e.frozen=new Gge)},Gge=function(){this.entries=[]},qge=function(e,t){return zge(e.entries,function(e){return e[0]===t})};Gge.prototype={get:function(e){var t=qge(this,e);if(t)return t[1]},has:function(e){return!!qge(this,e)},set:function(e,t){var n=qge(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=Uge(this.entries,function(t){return t[0]===e});return~t&&$ge(this.entries,t,1),!!~t}};var Kge,Yge={getConstructor:function(e,t,n,r){var i=e(function(e,i){she(e,o),jge(e,{type:t,id:Wge++,frozen:void 0}),null!=i&&yhe(i,e[r],{that:e,AS_ENTRIES:n})}),o=i.prototype,a=Hge(t),s=function(e,t,n){var r=a(e),i=Rge(Vue(t),!0);return!0===i?Vge(r).set(t,n):i[r.id]=n,e};return Zde(o,{delete:function(e){var t=a(this);if(!Zle(e))return!1;var n=Rge(e);return!0===n?Vge(t).delete(e):n&&kue(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!Zle(e))return!1;var n=Rge(e);return!0===n?Vge(t).has(e):n&&kue(n,t.id)}}),Zde(o,n?{get:function(e){var t=a(this);if(Zle(e)){var n=Rge(e);return!0===n?Vge(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},Xge=hce.enforce,Jge=!Ale.ActiveXObject&&"ActiveXObject"in Ale,Zge=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Qge=function(e,t,n){var r=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),o=r?"set":"add",a=Ale[e],s=a&&a.prototype,l=a,u={},c=function(e){var t=zle(s[e]);yce(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!Zle(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!Zle(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!Zle(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Gce(e,!Jle(a)||!(i||s.forEach&&!Tle(function(){(new a).entries().next()}))))l=n.getConstructor(t,e,r,o),Mge.enable();else if(Gce(e,!0)){var f=new l,d=f[o](i?{}:-0,1)!=f,h=Tle(function(){f.has(1)}),p=Dhe(function(e){new a(e)}),g=!i&&Tle(function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)});p||((l=t(function(e,t){she(e,s);var n,i,u,c,f=(n=new a,i=l,the&&Jle(u=e.constructor)&&u!==i&&Zle(c=u.prototype)&&c!==i.prototype&&the(n,c),n);return null!=t&&yhe(t,f[o],{that:f,AS_ENTRIES:r}),f})).prototype=s,s.constructor=l),(h||g)&&(c("delete"),c("has"),r&&c("get")),(g||d)&&c(o),i&&s.clear&&delete s.clear}return u[e]=l,Kce({global:!0,forced:l!=a},u),ihe(l,e),i||n.setStrong(l,e,r),l}("WeakMap",Zge,Yge);if(nce&&Jge){Kge=Yge.getConstructor(Zge,"WeakMap",!0),Mge.enable();var eve=Qge.prototype,tve=zle(eve.delete),nve=zle(eve.has),rve=zle(eve.get),ive=zle(eve.set);Zde(eve,{delete:function(e){if(Zle(e)&&!Lge(e)){var t=Xge(this);return t.frozen||(t.frozen=new Kge),tve(this,e)||t.frozen.delete(e)}return tve(this,e)},has:function(e){if(Zle(e)&&!Lge(e)){var t=Xge(this);return t.frozen||(t.frozen=new Kge),nve(this,e)||t.frozen.has(e)}return nve(this,e)},get:function(e){if(Zle(e)&&!Lge(e)){var t=Xge(this);return t.frozen||(t.frozen=new Kge),nve(this,e)?rve(this,e):t.frozen.get(e)}return rve(this,e)},set:function(e,t){if(Zle(e)&&!Lge(e)){var n=Xge(this);n.frozen||(n.frozen=new Kge),nve(this,e)?ive(this,e,t):n.frozen.set(e,t)}else ive(this,e,t);return this}})}var ove={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ave=jue("span").classList,sve=ave&&ave.constructor&&ave.constructor.prototype,lve=sve===Object.prototype?void 0:sve,uve=Fue("iterator"),cve=Fue("toStringTag"),fve=Ege.values,dve=function(e,t){if(e){if(e[uve]!==fve)try{Yue(e,uve,fve)}catch(r){e[uve]=fve}if(e[cve]||Yue(e,cve,t),ove[t])for(var n in Ege)if(e[n]!==Ege[n])try{Yue(e,n,Ege[n])}catch(r){e[n]=Ege[n]}}};for(var hve in ove)dve(Ale[hve]&&Ale[hve].prototype,hve);dve(lve,"DOMTokenList");var pve=mce.EXISTS,gve=Kue.f,vve=Function.prototype,mve=zle(vve.toString),yve=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,bve=zle(yve.exec);Ole&&!pve&&gve(vve,"name",{configurable:!0,get:function(){try{return bve(yve,mve(this))[1]}catch(pp){return""}}});var wve=Fue("species"),xve=aue>=51||!Tle(function(){var e=[];return(e.constructor={})[wve]=function(){return{foo:1}},1!==e.slice(Boolean).foo}),Cve=Fue("species"),Eve=Ale.Array,kve=Math.max;function Sve(e){return e.getMenuConfig("uploadVideo")}Kce({target:"Array",proto:!0,forced:!xve},{slice:function(e,t){var n,r,i,o=Xle(this),a=Dce(o),s=kce(e,a),l=kce(void 0===t?a:t,a);if(Ife(o)&&(n=o.constructor,(Hfe(n)&&(n===Eve||Ife(n.prototype))||Zle(n)&&null===(n=n[Cve]))&&(n=void 0),n===Eve||void 0===n))return Ohe(o,s,l);for(r=new(void 0===n?Eve:n)(kve(l-s,0)),i=0;s<l;s++,i++)s in o&&Dge(r,i,o[s]);return r.length=i,r}});var _ve=new WeakMap;function Dve(e,t){return wle(this,0,void 0,function(){var n,r,i,o;return xle(this,function(a){switch(a.label){case 0:return n=function(e){var t=_ve.get(e);if(null!=t)return t;var n=Sve(e),r=n.onSuccess,i=n.onProgress,o=n.onFailed,a=n.customInsert,s=n.onError;return t=sG(ble(ble({},n),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n){return Kpe(e,t,n)}),void r(t,n);var i=n.errno,s=void 0===i?1:i,l=n.data,u=void 0===l?{}:l;if(0===s){var c=u.url,f=void 0===c?"":c,d=u.poster;Kpe(e,f,void 0===d?"":d),r(t,n)}else o(t,n)},onError:function(e,t,n){s(e,t,n)}})),_ve.set(e,t),t}(e),r=t.name,i=t.type,o=t.size,n.addFile({name:r,type:i,size:o,data:t}),[4,n.upload()];case 1:return a.sent(),[2]}})})}var Ave=function(){function e(){this.title=XG("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,i=void 0===r?[]:r,o=n.customBrowseAndUpload;if(o)o(function(t,n){return Kpe(e,t,n)});else{var a="";i.length>0&&(a='accept="'+i.join(", ")+'"');var s=DD("body"),l=DD('<input type="file" '+a+" multiple/>");l.hide(),s.append(l),l.click(),l.on("change",function(){var t=l[0].files;!function(e,t){var n,r;wle(this,0,void 0,function(){var i,o,a,s,l,u;return xle(this,function(c){switch(c.label){case 0:if(null==t)return[2];i=Array.prototype.slice.call(t),o=Sve(e).customUpload,c.label=1;case 1:c.trys.push([1,9,10,15]),a=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,a,s,l;o=r,a=i,s=(t=e[n](t)).done,l=t.value,Promise.resolve(l).then(function(e){o({value:e,done:s})},a)})}}}(i),c.label=2;case 2:return[4,a.next()];case 3:return(s=c.sent()).done?[3,8]:(l=s.value,o?[4,o(l,function(t,n){return Kpe(e,t,n)})]:[3,5]);case 4:return c.sent(),[3,7];case 5:return[4,Dve(e,l)];case 6:c.sent(),c.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return u=c.sent(),n={error:u},[3,15];case 10:return c.trys.push([10,,13,14]),s&&!s.done&&(r=a.return)?[4,r.call(a)]:[3,12];case 11:c.sent(),c.label=12;case 12:return[3,14];case 13:if(n)throw n.error;return[7];case 14:return[7];case 15:return[2]}})})}(e,t)})}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!US.isCollapsed(t)||!!yz.getSelectedElems(e).some(function(t){var n=yz.getNodeType(t);return"pre"===n||"list-item"===n||!!e.isVoid(t)})},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}(),Tve=mce.PROPER,Ove=RegExp.prototype,Pve=Ove.toString,Ive=zle(ede),Fve=Tle(function(){return"/a/b"!=Pve.call({source:"a",flags:"b"})}),Bve=Tve&&"toString"!=Pve.name;function Lve(){return Xde("w-e-insert-video")}(Fve||Bve)&&yce(RegExp.prototype,"toString",function(){var e=Vue(this),t=nfe(e.source),n=e.flags;return"/"+t+"/"+nfe(void 0===n&&eue(Ove,e)&&!("flags"in Ove)?Ive(e):n)},{unsafe:!0});var Nve=function(){function e(){this.title=XG("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Lve(),this.heightInputId=Lve(),this.buttonId=Lve()}return e.prototype.getSelectedVideoNode=function(e){return yz.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,i=t.buttonId,o=Cle(MV(XG("videoModule.width"),n,"auto"),2),a=o[0],s=DD(o[1]),l=Cle(MV(XG("videoModule.height"),r,"auto"),2),u=l[0],c=DD(l[1]),f=Cle(RV(i,XG("videoModule.ok")),1)[0];if(null==this.$content){var d=DD("<div></div>");d.on("click","#"+i,function(t){t.preventDefault();var i=d.find("#"+n).val().trim(),o=d.find("#"+r).val().trim(),a=parseInt(i),s=parseInt(o),l=a?a.toString():"auto",u=s?s.toString():"auto";e.restoreSelection(),h_.setNodes(e,{width:l,height:u},{match:function(e){return yz.checkNodeType(e,"video")}}),e.hidePanelOrModal()}),this.$content=d}var h=this.$content;h.empty(),h.append(a),h.append(u),h.append(f);var p=this.getSelectedVideoNode(e);if(null==p)return h[0];var g=p.width,v=void 0===g?"auto":g,m=p.height,y=void 0===m?"auto":m;return s.val(v),c.val(y),setTimeout(function(){s.focus()}),h[0]},e}(),Mve={renderElems:[pfe],elemsToHtml:[gfe],preParseHtml:[Tfe],parseElemsHtml:[Qfe],menus:[{key:"insertVideo",factory:function(){return new Xpe},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new Ave},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'"+e.name+"' upload failed",t)},onError:function(e,t,n){console.error("'"+e.name+" upload error",t,n)}}},{key:"editVideoSize",factory:function(){return new Nve}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=Cle(e,2),i=t[0],o=t[1];return"video"===yz.getNodeType(i)&&yz.isLastNode(r,i)&&h_.insertNodes(r,yz.genEmptyParagraph(),{at:[o[0]+1]}),n([i,o])},r}};YG("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),YG("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});var Rve="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function jve(e){var t={exports:{}};return e(t,t.exports),t.exports}var Hve,zve,Uve=function(e){return e&&e.Math==Math&&e},$ve=Uve("object"==typeof globalThis&&globalThis)||Uve("object"==typeof window&&window)||Uve("object"==typeof self&&self)||Uve("object"==typeof Rve&&Rve)||function(){return this}()||Function("return this")(),Wve=function(e){try{return!!e()}catch(t){return!0}},Vve=!Wve(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),Gve=Function.prototype.call,qve=Gve.bind?Gve.bind(Gve):function(){return Gve.apply(Gve,arguments)},Kve={}.propertyIsEnumerable,Yve=Object.getOwnPropertyDescriptor,Xve={f:Yve&&!Kve.call({1:2},1)?function(e){var t=Yve(this,e);return!!t&&t.enumerable}:Kve},Jve=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Zve=Function.prototype,Qve=Zve.bind,eme=Zve.call,tme=Qve&&Qve.bind(eme),nme=Qve?function(e){return e&&tme(eme,e)}:function(e){return e&&function(){return eme.apply(e,arguments)}},rme=nme({}.toString),ime=nme("".slice),ome=function(e){return ime(rme(e),8,-1)},ame=$ve.Object,sme=nme("".split),lme=Wve(function(){return!ame("z").propertyIsEnumerable(0)})?function(e){return"String"==ome(e)?sme(e,""):ame(e)}:ame,ume=$ve.TypeError,cme=function(e){if(null==e)throw ume("Can't call method on "+e);return e},fme=function(e){return lme(cme(e))},dme=function(e){return"function"==typeof e},hme=function(e){return"object"==typeof e?null!==e:dme(e)},pme=function(e,t){return arguments.length<2?function(e){return dme(e)?e:void 0}($ve[e]):$ve[e]&&$ve[e][t]},gme=nme({}.isPrototypeOf),vme=pme("navigator","userAgent")||"",mme=$ve.process,yme=$ve.Deno,bme=mme&&mme.versions||yme&&yme.version,wme=bme&&bme.v8;wme&&(zve=(Hve=wme.split("."))[0]>0&&Hve[0]<4?1:+(Hve[0]+Hve[1])),!zve&&vme&&(!(Hve=vme.match(/Edge\/(\d+)/))||Hve[1]>=74)&&(Hve=vme.match(/Chrome\/(\d+)/))&&(zve=+Hve[1]);var xme=zve,Cme=!!Object.getOwnPropertySymbols&&!Wve(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xme&&xme<41}),Eme=Cme&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kme=$ve.Object,Sme=Eme?function(e){return"symbol"==typeof e}:function(e){var t=pme("Symbol");return dme(t)&&gme(t.prototype,kme(e))},_me=$ve.String,Dme=function(e){try{return _me(e)}catch(t){return"Object"}},Ame=$ve.TypeError,Tme=function(e){if(dme(e))return e;throw Ame(Dme(e)+" is not a function")},Ome=function(e,t){var n=e[t];return null==n?void 0:Tme(n)},Pme=$ve.TypeError,Ime=Object.defineProperty,Fme=function(e,t){try{Ime($ve,e,{value:t,configurable:!0,writable:!0})}catch(ZG){$ve[e]=t}return t},Bme=$ve["__core-js_shared__"]||Fme("__core-js_shared__",{}),Lme=jve(function(e){(e.exports=function(e,t){return Bme[e]||(Bme[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Nme=$ve.Object,Mme=function(e){return Nme(cme(e))},Rme=nme({}.hasOwnProperty),jme=Object.hasOwn||function(e,t){return Rme(Mme(e),t)},Hme=0,zme=Math.random(),Ume=nme(1..toString),$me=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ume(++Hme+zme,36)},Wme=Lme("wks"),Vme=$ve.Symbol,Gme=Vme&&Vme.for,qme=Eme?Vme:Vme&&Vme.withoutSetter||$me,Kme=function(e){if(!jme(Wme,e)||!Cme&&"string"!=typeof Wme[e]){var t="Symbol."+e;Cme&&jme(Vme,e)?Wme[e]=Vme[e]:Wme[e]=Eme&&Gme?Gme(t):qme(t)}return Wme[e]},Yme=$ve.TypeError,Xme=Kme("toPrimitive"),Jme=function(e){var t=function(e){if(!hme(e)||Sme(e))return e;var t,n=Ome(e,Xme);if(n){if(t=qve(n,e,"string"),!hme(t)||Sme(t))return t;throw Yme("Can't convert object to primitive value")}return function(e){var t,n;if(dme(t=e.toString)&&!hme(n=qve(t,e)))return n;if(dme(t=e.valueOf)&&!hme(n=qve(t,e)))return n;throw Pme("Can't convert object to primitive value")}(e)}(e);return Sme(t)?t:t+""},Zme=$ve.document,Qme=hme(Zme)&&hme(Zme.createElement),eye=function(e){return Qme?Zme.createElement(e):{}},tye=!Vve&&!Wve(function(){return 7!=Object.defineProperty(eye("div"),"a",{get:function(){return 7}}).a}),nye=Object.getOwnPropertyDescriptor,rye={f:Vve?nye:function(e,t){if(e=fme(e),t=Jme(t),tye)try{return nye(e,t)}catch(n){}if(jme(e,t))return Jve(!qve(Xve.f,e,t),e[t])}},iye=$ve.String,oye=$ve.TypeError,aye=function(e){if(hme(e))return e;throw oye(iye(e)+" is not an object")},sye=$ve.TypeError,lye=Object.defineProperty,uye={f:Vve?lye:function(e,t,n){if(aye(e),t=Jme(t),aye(n),tye)try{return lye(e,t,n)}catch(r){}if("get"in n||"set"in n)throw sye("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},cye=Vve?function(e,t,n){return uye.f(e,t,Jve(1,n))}:function(e,t,n){return e[t]=n,e},fye=nme(Function.toString);dme(Bme.inspectSource)||(Bme.inspectSource=function(e){return fye(e)});var dye,hye,pye,gye=Bme.inspectSource,vye=$ve.WeakMap,mye=dme(vye)&&/native code/.test(gye(vye)),yye=Lme("keys"),bye=function(e){return yye[e]||(yye[e]=$me(e))},wye={},xye=$ve.TypeError,Cye=$ve.WeakMap;if(mye||Bme.state){var Eye=Bme.state||(Bme.state=new Cye),kye=nme(Eye.get),Sye=nme(Eye.has),_ye=nme(Eye.set);dye=function(e,t){if(Sye(Eye,e))throw new xye("Object already initialized");return t.facade=e,_ye(Eye,e,t),t},hye=function(e){return kye(Eye,e)||{}},pye=function(e){return Sye(Eye,e)}}else{var Dye=bye("state");wye[Dye]=!0,dye=function(e,t){if(jme(e,Dye))throw new xye("Object already initialized");return t.facade=e,cye(e,Dye,t),t},hye=function(e){return jme(e,Dye)?e[Dye]:{}},pye=function(e){return jme(e,Dye)}}var Aye={set:dye,get:hye,has:pye,enforce:function(e){return pye(e)?hye(e):dye(e,{})},getterFor:function(e){return function(t){var n;if(!hme(t)||(n=hye(t)).type!==e)throw xye("Incompatible receiver, "+e+" required");return n}}},Tye=Function.prototype,Oye=Vve&&Object.getOwnPropertyDescriptor,Pye=jme(Tye,"name"),Iye={EXISTS:Pye,PROPER:Pye&&"something"===function(){}.name,CONFIGURABLE:Pye&&(!Vve||Vve&&Oye(Tye,"name").configurable)},Fye=jve(function(e){var t=Iye.CONFIGURABLE,n=Aye.get,r=Aye.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;dme(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!jme(o,"name")||t&&o.name!==f)&&cye(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==$ve?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:cye(e,n,o)):u?e[n]=o:Fme(n,o)})(Function.prototype,"toString",function(){return dme(this)&&n(this).source||gye(this)})}),Bye=Math.ceil,Lye=Math.floor,Nye=function(e){var t=+e;return t!=t||0===t?0:(t>0?Lye:Bye)(t)},Mye=Math.max,Rye=Math.min,jye=function(e,t){var n=Nye(e);return n<0?Mye(n+t,0):Rye(n,t)},Hye=Math.min,zye=function(e){return e>0?Hye(Nye(e),9007199254740991):0},Uye=function(e){return zye(e.length)},$ye=function(e){return function(t,n,r){var i=fme(t),o=Uye(i),a=jye(r,o);for(e;o>a;a++)if(a in i&&i[a]===n)return a||0;return-1}}(!1),Wye=nme([].push),Vye=function(e,t){var n,r=fme(e),i=0,o=[];for(n in r)!jme(wye,n)&&jme(r,n)&&Wye(o,n);for(;t.length>i;)jme(r,n=t[i++])&&(~$ye(o,n)||Wye(o,n));return o},Gye=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qye=Gye.concat("length","prototype"),Kye={f:Object.getOwnPropertyNames||function(e){return Vye(e,qye)}},Yye={f:Object.getOwnPropertySymbols},Xye=nme([].concat),Jye=pme("Reflect","ownKeys")||function(e){var t=Kye.f(aye(e)),n=Yye.f;return n?Xye(t,n(e)):t},Zye=function(e,t){for(var n=Jye(t),r=uye.f,i=rye.f,o=0;o<n.length;o++){var a=n[o];jme(e,a)||r(e,a,i(t,a))}},Qye=/#|\.prototype\./,ebe=function(e,t){var n=nbe[tbe(e)];return n==ibe||n!=rbe&&(dme(t)?Wve(t):!!t)},tbe=ebe.normalize=function(e){return String(e).replace(Qye,".").toLowerCase()},nbe=ebe.data={},rbe=ebe.NATIVE="N",ibe=ebe.POLYFILL="P",obe=ebe,abe=rye.f,sbe=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?$ve:u?$ve[s]||Fme(s,{}):($ve[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=abe(n,r))&&a.value:n[r],!obe(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;Zye(o,i)}(e.sham||i&&i.sham)&&cye(o,"sham",!0),Fye(n,r,o,e)}},lbe=Array.isArray||function(e){return"Array"==ome(e)},ube={};ube[Kme("toStringTag")]="z";var cbe="[object z]"===String(ube),fbe=Kme("toStringTag"),dbe=$ve.Object,hbe="Arguments"==ome(function(){return arguments}()),pbe=cbe?ome:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=dbe(e),fbe))?n:hbe?ome(t):"Object"==(r=ome(t))&&dme(t.callee)?"Arguments":r},gbe=function(){},vbe=[],mbe=pme("Reflect","construct"),ybe=/^\s*(?:class|function)\b/,bbe=nme(ybe.exec),wbe=!ybe.exec(gbe),xbe=function(e){if(!dme(e))return!1;try{return mbe(gbe,vbe,e),!0}catch(t){return!1}},Cbe=!mbe||Wve(function(){var e;return xbe(xbe.call)||!xbe(Object)||!xbe(function(){e=!0})||e})?function(e){if(!dme(e))return!1;switch(pbe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return wbe||!!bbe(ybe,gye(e))}:xbe,Ebe=function(e,t,n){var r=Jme(t);r in e?uye.f(e,r,Jve(0,n)):e[r]=n},kbe=Kme("species"),Sbe=nme([].slice),_be=xme>=51||!Wve(function(){var e=[];return(e.constructor={})[kbe]=function(){return{foo:1}},1!==e.slice(Boolean).foo}),Dbe=Kme("species"),Abe=$ve.Array,Tbe=Math.max;sbe({target:"Array",proto:!0,forced:!_be},{slice:function(e,t){var n,r,i,o=fme(this),a=Uye(o),s=jye(e,a),l=jye(void 0===t?a:t,a);if(lbe(o)&&(n=o.constructor,(Cbe(n)&&(n===Abe||lbe(n.prototype))||hme(n)&&null===(n=n[Dbe]))&&(n=void 0),n===Abe||void 0===n))return Sbe(o,s,l);for(r=new(void 0===n?Abe:n)(Tbe(l-s,0)),i=0;s<l;s++,i++)s in o&&Ebe(r,i,o[s]);return r.length=i,r}});var Obe=cbe?{}.toString:function(){return"[object "+pbe(this)+"]"};cbe||Fye(Object.prototype,"toString",Obe,{unsafe:!0});var Pbe,Ibe=$ve.String,Fbe=function(e){if("Symbol"===pbe(e))throw TypeError("Cannot convert a Symbol value to a string");return Ibe(e)},Bbe=function(){var e=aye(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Lbe=$ve.RegExp,Nbe=Wve(function(){var e=Lbe("a","y");return e.lastIndex=2,null!=e.exec("abcd")});Nbe||Wve(function(){return!Lbe("a","y").sticky});var Mbe={BROKEN_CARET:Nbe||Wve(function(){var e=Lbe("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),UNSUPPORTED_Y:Nbe},Rbe=Object.keys||function(e){return Vye(e,Gye)},jbe=Vve?Object.defineProperties:function(e,t){aye(e);for(var n,r=fme(t),i=Rbe(t),o=i.length,a=0;o>a;)uye.f(e,n=i[a++],r[n]);return e},Hbe=pme("document","documentElement"),zbe=bye("IE_PROTO"),Ube=function(){},$be=function(e){return"<script>"+e+"<\/script>"},Wbe=function(e){e.write($be("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vbe=function(){try{Pbe=new ActiveXObject("htmlfile")}catch(r){}var e,t;Vbe="undefined"!=typeof document?document.domain&&Pbe?Wbe(Pbe):((t=eye("iframe")).style.display="none",Hbe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write($be("document.F=Object")),e.close(),e.F):Wbe(Pbe);for(var n=Gye.length;n--;)delete Vbe.prototype[Gye[n]];return Vbe()};wye[zbe]=!0;var Gbe,qbe,Kbe=Object.create||function(e,t){var n;return null!==e?(Ube.prototype=aye(e),n=new Ube,Ube.prototype=null,n[zbe]=e):n=Vbe(),void 0===t?n:jbe(n,t)},Ybe=$ve.RegExp,Xbe=Wve(function(){var e=Ybe(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),Jbe=$ve.RegExp,Zbe=Wve(function(){var e=Jbe("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Qbe=Aye.get,ewe=Lme("native-string-replace",String.prototype.replace),twe=RegExp.prototype.exec,nwe=twe,rwe=nme("".charAt),iwe=nme("".indexOf),owe=nme("".replace),awe=nme("".slice),swe=(qbe=/b*/g,qve(twe,Gbe=/a/,"a"),qve(twe,qbe,"a"),0!==Gbe.lastIndex||0!==qbe.lastIndex),lwe=Mbe.BROKEN_CARET,uwe=void 0!==/()??/.exec("")[1];(swe||uwe||lwe||Xbe||Zbe)&&(nwe=function(e){var t,n,r,i,o,a,s,l=this,u=Qbe(l),c=Fbe(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=qve(nwe,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=lwe&&l.sticky,p=qve(Bbe,l),g=l.source,v=0,m=c;if(h&&(p=owe(p,"y",""),-1===iwe(p,"g")&&(p+="g"),m=awe(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==rwe(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),uwe&&(n=new RegExp("^"+g+"$(?!\\s)",p)),swe&&(r=l.lastIndex),i=qve(twe,h?n:l,m),h?i?(i.input=awe(i.input,v),i[0]=awe(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:swe&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),uwe&&i&&i.length>1&&qve(ewe,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=Kbe(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var cwe=nwe;sbe({target:"RegExp",proto:!0,forced:/./.exec!==cwe},{exec:cwe});var fwe=Function.prototype,dwe=fwe.apply,hwe=fwe.bind,pwe=fwe.call,gwe="object"==typeof Reflect&&Reflect.apply||(hwe?pwe.bind(dwe):function(){return pwe.apply(dwe,arguments)}),vwe=Kme("species"),mwe=RegExp.prototype,ywe=Kme("match"),bwe=$ve.TypeError,wwe=Kme("species"),xwe=function(e,t){var n,r=aye(e).constructor;return void 0===r||null==(n=aye(r)[wwe])?t:function(e){if(Cbe(e))return e;throw bwe(Dme(e)+" is not a constructor")}(n)},Cwe=nme("".charAt),Ewe=nme("".charCodeAt),kwe=nme("".slice),Swe={charAt:function(e,t){var n,r,i=Fbe(cme(e)),o=Nye(t),a=i.length;return o<0||o>=a?"":(n=Ewe(i,o))<55296||n>56319||o+1===a||(r=Ewe(i,o+1))<56320||r>57343?Cwe(i,o):kwe(i,o,o+2)}},_we=Swe.charAt,Dwe=function(e,t,n){return t+(n?_we(e,t).length:1)},Awe=$ve.Array,Twe=Math.max,Owe=function(e,t,n){for(var r=Uye(e),i=jye(t,r),o=jye(void 0===n?r:n,r),a=Awe(Twe(o-i,0)),s=0;i<o;i++,s++)Ebe(a,s,e[i]);return a.length=s,a},Pwe=$ve.TypeError,Iwe=function(e,t){var n=e.exec;if(dme(n)){var r=qve(n,e,t);return null!==r&&aye(r),r}if("RegExp"===ome(e))return qve(cwe,e,t);throw Pwe("RegExp#exec called on incompatible receiver")},Fwe=Mbe.UNSUPPORTED_Y,Bwe=Math.min,Lwe=[].push,Nwe=nme(/./.exec),Mwe=nme(Lwe),Rwe=nme("".slice);!function(e,t,n,r){var i,o,a,s=Kme(e),l=!Wve(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)}),u=l&&!Wve(function(){var e=!1,t=/a/;return(t={}).constructor={},t.constructor[vwe]=function(){return t},t.flags="",t[s]=/./[s],t.exec=function(){return e=!0,null},t[s](""),!e});if(!l||!u||n){var c=nme(/./[s]),f=(i=s,o=""[e],a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var n,r,i=Fbe(cme(this)),a=void 0===t?4294967295:t>>>0;if(0===a)return[];if(void 0===e)return[i];if(!hme(n=e)||!(void 0!==(r=n[ywe])?r:"RegExp"==ome(n)))return qve(o,i,e,a);for(var s,l,u,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,f+"g");(s=qve(cwe,h,i))&&!((l=h.lastIndex)>d&&(Mwe(c,Rwe(i,d,s.index)),s.length>1&&s.index<i.length&&gwe(Lwe,c,Owe(s,1)),u=s[0].length,d=l,c.length>=a));)h.lastIndex===s.index&&h.lastIndex++;return d===i.length?!u&&Nwe(h,"")||Mwe(c,""):Mwe(c,Rwe(i,d)),c.length>a?Owe(c,0,a):c}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:qve(o,this,e,t)}:o,[function(e,t){var n=cme(this),r=null==e?void 0:Ome(e,i);return r?qve(r,e,n,t):qve(a,Fbe(n),e,t)},function(e,t){var n=aye(this),r=Fbe(e),i=function(e,t,n,r,i){var o=nme(e),a=t.exec;return a===cwe||a===mwe.exec?l&&!i?{done:!0,value:c(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}(a,n,r,t,a!==o);if(i.done)return i.value;var s=xwe(n,RegExp),u=n.unicode,f=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(Fwe?"g":"y"),d=new s(Fwe?"^(?:"+n.source+")":n,f),h=void 0===t?4294967295:t>>>0;if(0===h)return[];if(0===r.length)return null===Iwe(d,r)?[r]:[];for(var p=0,g=0,v=[];g<r.length;){d.lastIndex=Fwe?0:g;var m,y=Iwe(d,Fwe?Rwe(r,g):r);if(null===y||(m=Bwe(zye(d.lastIndex+(Fwe?g:0)),r.length))===p)g=Dwe(r,g,u);else{if(Mwe(v,Rwe(r,p,g)),v.length===h)return v;for(var b=1;b<=y.length-1;b++)if(Mwe(v,y[b]),v.length===h)return v;g=p=m}}return Mwe(v,Rwe(r,p)),v}]);Fye(String.prototype,e,f[0]),Fye(mwe,s,f[1])}r&&cye(mwe[s],"sham",!0)}("split",0,!!Wve(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),Fwe);var jwe=function(){return jwe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},jwe.apply(this,arguments)};function Hwe(e,t,n,r){return new(n||(n=Promise))(function(t,i){function o(e){try{s(r.next(e))}catch(t){i(t)}}function a(e){try{s(r.throw(e))}catch(t){i(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof n?r:new n(function(e){e(r)})).then(o,a)}s((r=r.apply(e,[])).next())})}function zwe(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}var Uwe=Kme("unscopables"),$we=Array.prototype;null==$we[Uwe]&&uye.f($we,Uwe,{configurable:!0,value:Kbe(null)});var Wwe,Vwe,Gwe,qwe=function(e){$we[Uwe][e]=!0},Kwe={},Ywe=!Wve(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Xwe=bye("IE_PROTO"),Jwe=$ve.Object,Zwe=Jwe.prototype,Qwe=Ywe?Jwe.getPrototypeOf:function(e){var t=Mme(e);if(jme(t,Xwe))return t[Xwe];var n=t.constructor;return dme(n)&&t instanceof n?n.prototype:t instanceof Jwe?Zwe:null},exe=Kme("iterator"),txe=!1;[].keys&&("next"in(Gwe=[].keys())?(Vwe=Qwe(Qwe(Gwe)))!==Object.prototype&&(Wwe=Vwe):txe=!0);var nxe=null==Wwe||Wve(function(){var e={};return Wwe[exe].call(e)!==e});nxe&&(Wwe={}),dme(Wwe[exe])||Fye(Wwe,exe,function(){return this});var rxe={IteratorPrototype:Wwe,BUGGY_SAFARI_ITERATORS:txe},ixe=uye.f,oxe=Kme("toStringTag"),axe=function(e,t,n){e&&!jme(e=n?e:e.prototype,oxe)&&ixe(e,oxe,{configurable:!0,value:t})},sxe=rxe.IteratorPrototype,lxe=function(){return this},uxe=$ve.String,cxe=$ve.TypeError,fxe=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=nme(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(r){}return function(n,r){return aye(n),function(e){if("object"==typeof e||dme(e))return e;throw cxe("Can't set "+uxe(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),dxe=Iye.PROPER,hxe=Iye.CONFIGURABLE,pxe=rxe.IteratorPrototype,gxe=rxe.BUGGY_SAFARI_ITERATORS,vxe=Kme("iterator"),mxe=function(){return this},yxe=function(e,t,n,r,i,o,a){var s,l,u;l=r,u=t+" Iterator",(s=n).prototype=Kbe(sxe,{next:Jve(1,l)}),axe(s,u,!1),Kwe[u]=lxe;var c,f,d=function(e){if(e===i&&m)return m;if(!gxe&&e in g)return g[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},h=t+" Iterator",p=!1,g=e.prototype,v=g[vxe]||g["@@iterator"]||i&&g[i],m=!gxe&&v||d(i),y="Array"==t&&g.entries||v;return y&&(c=Qwe(y.call(new e)))!==Object.prototype&&c.next&&(Qwe(c)!==pxe&&(fxe?fxe(c,pxe):dme(c[vxe])||Fye(c,vxe,mxe)),axe(c,h,!0)),dxe&&"values"==i&&v&&"values"!==v.name&&(hxe?cye(g,"name","values"):(p=!0,m=function(){return qve(v,this)})),i&&(f={values:d("values"),keys:d("keys"),entries:d("entries")},a||sbe({target:t,proto:!0,forced:gxe||p},f)),g[vxe]!==m&&Fye(g,vxe,m,{name:i}),Kwe[t]=m,f},bxe=Aye.set,wxe=Aye.getterFor("Array Iterator"),xxe=yxe(Array,"Array",function(e,t){bxe(this,{type:"Array Iterator",target:fme(e),index:0,kind:t})},function(){var e=wxe(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");Kwe.Arguments=Kwe.Array,qwe("keys"),qwe("values"),qwe("entries");var Cxe=Swe.charAt,Exe=Aye.set,kxe=Aye.getterFor("String Iterator");yxe(String,"String",function(e){Exe(this,{type:"String Iterator",string:Fbe(e),index:0})},function(){var e,t=kxe(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Cxe(n,r),t.index+=e.length,{value:e,done:!1})});var Sxe=function(e,t,n){for(var r in t)Fye(e,r,t[r],n);return e},_xe=Kye.f,Dxe="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Axe={f:function(e){return Dxe&&"Window"==ome(e)?function(e){try{return _xe(e)}catch(t){return Owe(Dxe)}}(e):_xe(fme(e))}},Txe=Wve(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Oxe=Object.isExtensible,Pxe=Wve(function(){Oxe(1)})||Txe?function(e){return!!hme(e)&&(!Txe||"ArrayBuffer"!=ome(e))&&(!Oxe||Oxe(e))}:Oxe,Ixe=!Wve(function(){return Object.isExtensible(Object.preventExtensions({}))}),Fxe=jve(function(e){var t=uye.f,n=!1,r=$me("meta"),i=0,o=function(e){t(e,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=Kye.f,t=nme([].splice),i={};i[r]=1,e(i).length&&(Kye.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===r){t(i,o,1);break}return i},sbe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Axe.f}))},fastKey:function(e,t){if(!hme(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!jme(e,r)){if(!Pxe(e))return"F";if(!t)return"E";o(e)}return e[r].objectID},getWeakData:function(e,t){if(!jme(e,r)){if(!Pxe(e))return!0;if(!t)return!1;o(e)}return e[r].weakData},onFreeze:function(e){return Ixe&&n&&Pxe(e)&&!jme(e,r)&&o(e),e}};wye[r]=!0}),Bxe=nme(nme.bind),Lxe=function(e,t){return Tme(e),void 0===t?e:Bxe?Bxe(e,t):function(){return e.apply(t,arguments)}},Nxe=Kme("iterator"),Mxe=Array.prototype,Rxe=Kme("iterator"),jxe=function(e){if(null!=e)return Ome(e,Rxe)||Ome(e,"@@iterator")||Kwe[pbe(e)]},Hxe=$ve.TypeError,zxe=function(e,t,n){var r,i;aye(e);try{if(!(r=Ome(e,"return"))){if("throw"===t)throw n;return n}r=qve(r,e)}catch(o){i=!0,r=o}if("throw"===t)throw n;if(i)throw r;return aye(r),n},Uxe=$ve.TypeError,$xe=function(e,t){this.stopped=e,this.result=t},Wxe=$xe.prototype,Vxe=function(e,t,n){var r,i,o,a,s,l,u,c,f=n&&n.that,d=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),g=Lxe(t,f),v=function(e){return r&&zxe(r,"normal",e),new $xe(!0,e)},m=function(e){return d?(aye(e),p?g(e[0],e[1],v):g(e[0],e[1])):p?g(e,v):g(e)};if(h)r=e;else{if(!(i=jxe(e)))throw Uxe(Dme(e)+" is not iterable");if(void 0!==(c=i)&&(Kwe.Array===c||Mxe[Nxe]===c)){for(o=0,a=Uye(e);a>o;o++)if((s=m(e[o]))&&gme(Wxe,s))return s;return new $xe(!1)}r=function(e,t){var n=arguments.length<2?jxe(e):t;if(Tme(n))return aye(qve(n,e));throw Hxe(Dme(e)+" is not iterable")}(e,i)}for(l=r.next;!(u=qve(l,r)).done;){try{s=m(u.value)}catch(y){zxe(r,"throw",y)}if("object"==typeof s&&s&&gme(Wxe,s))return s}return new $xe(!1)},Gxe=$ve.TypeError,qxe=function(e,t){if(gme(t,e))return e;throw Gxe("Incorrect invocation")},Kxe=Kme("iterator"),Yxe=!1;try{var Xxe=0,Jxe={next:function(){return{done:!!Xxe++}},return:function(){Yxe=!0}};Jxe[Kxe]=function(){return this},Array.from(Jxe,function(){throw 2})}catch(TTe){}var Zxe=function(e,t){if(!Yxe)return!1;var n=!1;try{var r={};r[Kxe]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(i){}return n},Qxe=Kme("species"),eCe=$ve.Array,tCe=function(e,t){return new(lbe(n=e)&&(r=n.constructor,(Cbe(r)&&(r===eCe||lbe(r.prototype))||hme(r)&&null===(r=r[Qxe]))&&(r=void 0)),void 0===r?eCe:r)(0===t?0:t);var n,r},nCe=nme([].push),rCe=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=Mme(l),g=lme(p),v=Lxe(u,c),m=Uye(g),y=0,b=f||tCe,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:nCe(w,d)}else switch(e){case 4:return!1;case 7:nCe(w,d)}return o?-1:r||i?i:w}},iCe={forEach:rCe(0),find:rCe(5),findIndex:rCe(6)},oCe=Fxe.getWeakData,aCe=Aye.set,sCe=Aye.getterFor,lCe=iCe.find,uCe=iCe.findIndex,cCe=nme([].splice),fCe=0,dCe=function(e){return e.frozen||(e.frozen=new hCe)},hCe=function(){this.entries=[]},pCe=function(e,t){return lCe(e.entries,function(e){return e[0]===t})};hCe.prototype={get:function(e){var t=pCe(this,e);if(t)return t[1]},has:function(e){return!!pCe(this,e)},set:function(e,t){var n=pCe(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=uCe(this.entries,function(t){return t[0]===e});return~t&&cCe(this.entries,t,1),!!~t}};var gCe,vCe={getConstructor:function(e,t,n,r){var i=e(function(e,i){qxe(e,o),aCe(e,{type:t,id:fCe++,frozen:void 0}),null!=i&&Vxe(i,e[r],{that:e,AS_ENTRIES:n})}),o=i.prototype,a=sCe(t),s=function(e,t,n){var r=a(e),i=oCe(aye(t),!0);return!0===i?dCe(r).set(t,n):i[r.id]=n,e};return Sxe(o,{delete:function(e){var t=a(this);if(!hme(e))return!1;var n=oCe(e);return!0===n?dCe(t).delete(e):n&&jme(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!hme(e))return!1;var n=oCe(e);return!0===n?dCe(t).has(e):n&&jme(n,t.id)}}),Sxe(o,n?{get:function(e){var t=a(this);if(hme(e)){var n=oCe(e);return!0===n?dCe(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},mCe=Aye.enforce,yCe=!$ve.ActiveXObject&&"ActiveXObject"in $ve,bCe=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},wCe=function(e,t,n){var r=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),o=r?"set":"add",a=$ve[e],s=a&&a.prototype,l=a,u={},c=function(e){var t=nme(s[e]);Fye(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!hme(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!hme(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!hme(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(obe(e,!dme(a)||!(i||s.forEach&&!Wve(function(){(new a).entries().next()}))))l=n.getConstructor(t,e,r,o),Fxe.enable();else if(obe(e,!0)){var f=new l,d=f[o](i?{}:-0,1)!=f,h=Wve(function(){f.has(1)}),p=Zxe(function(e){new a(e)}),g=!i&&Wve(function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)});p||((l=t(function(e,t){qxe(e,s);var n,i,u,c,f=(n=new a,i=l,fxe&&dme(u=e.constructor)&&u!==i&&hme(c=u.prototype)&&c!==i.prototype&&fxe(n,c),n);return null!=t&&Vxe(t,f[o],{that:f,AS_ENTRIES:r}),f})).prototype=s,s.constructor=l),(h||g)&&(c("delete"),c("has"),r&&c("get")),(g||d)&&c(o),i&&s.clear&&delete s.clear}return u[e]=l,sbe({global:!0,forced:l!=a},u),axe(l,e),i||n.setStrong(l,e,r),l}("WeakMap",bCe,vCe);if(mye&&yCe){gCe=vCe.getConstructor(bCe,"WeakMap",!0),Fxe.enable();var xCe=wCe.prototype,CCe=nme(xCe.delete),ECe=nme(xCe.has),kCe=nme(xCe.get),SCe=nme(xCe.set);Sxe(xCe,{delete:function(e){if(hme(e)&&!Pxe(e)){var t=mCe(this);return t.frozen||(t.frozen=new gCe),CCe(this,e)||t.frozen.delete(e)}return CCe(this,e)},has:function(e){if(hme(e)&&!Pxe(e)){var t=mCe(this);return t.frozen||(t.frozen=new gCe),ECe(this,e)||t.frozen.has(e)}return ECe(this,e)},get:function(e){if(hme(e)&&!Pxe(e)){var t=mCe(this);return t.frozen||(t.frozen=new gCe),ECe(this,e)?kCe(this,e):t.frozen.get(e)}return kCe(this,e)},set:function(e,t){if(hme(e)&&!Pxe(e)){var n=mCe(this);n.frozen||(n.frozen=new gCe),ECe(this,e)?SCe(this,e,t):n.frozen.set(e,t)}else SCe(this,e,t);return this}})}var _Ce={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},DCe=eye("span").classList,ACe=DCe&&DCe.constructor&&DCe.constructor.prototype,TCe=ACe===Object.prototype?void 0:ACe,OCe=Kme("iterator"),PCe=Kme("toStringTag"),ICe=xxe.values,FCe=function(e,t){if(e){if(e[OCe]!==ICe)try{cye(e,OCe,ICe)}catch(r){e[OCe]=ICe}if(e[PCe]||cye(e,PCe,t),_Ce[t])for(var n in xxe)if(e[n]!==xxe[n])try{cye(e,n,xxe[n])}catch(r){e[n]=xxe[n]}}};for(var BCe in _Ce)FCe($ve[BCe]&&$ve[BCe].prototype,BCe);FCe(TCe,"DOMTokenList");var LCe=function(e,t){var n=[][e];return!!n&&Wve(function(){n.call(null,t||function(){throw 1},1)})},NCe=iCe.forEach,MCe=LCe("forEach")?[].forEach:function(e){return NCe(this,e,arguments.length>1?arguments[1]:void 0)},RCe=function(e){if(e&&e.forEach!==MCe)try{cye(e,"forEach",MCe)}catch(t){e.forEach=MCe}};for(var jCe in _Ce)_Ce[jCe]&&RCe($ve[jCe]&&$ve[jCe].prototype);RCe(TCe);var HCe,zCe,UCe,$Ce,WCe=$ve.Promise,VCe=Kme("species"),GCe=/(?:ipad|iphone|ipod).*applewebkit/i.test(vme),qCe="process"==ome($ve.process),KCe=$ve.setImmediate,YCe=$ve.clearImmediate,XCe=$ve.process,JCe=$ve.Dispatch,ZCe=$ve.Function,QCe=$ve.MessageChannel,eEe=$ve.String,tEe=0,nEe={};try{HCe=$ve.location}catch(TTe){}var rEe=function(e){if(jme(nEe,e)){var t=nEe[e];delete nEe[e],t()}},iEe=function(e){return function(){rEe(e)}},oEe=function(e){rEe(e.data)},aEe=function(e){$ve.postMessage(eEe(e),HCe.protocol+"//"+HCe.host)};KCe&&YCe||(KCe=function(e){var t=Sbe(arguments,1);return nEe[++tEe]=function(){gwe(dme(e)?e:ZCe(e),void 0,t)},zCe(tEe),tEe},YCe=function(e){delete nEe[e]},qCe?zCe=function(e){XCe.nextTick(iEe(e))}:JCe&&JCe.now?zCe=function(e){JCe.now(iEe(e))}:QCe&&!GCe?($Ce=(UCe=new QCe).port2,UCe.port1.onmessage=oEe,zCe=Lxe($Ce.postMessage,$Ce)):$ve.addEventListener&&dme($ve.postMessage)&&!$ve.importScripts&&HCe&&"file:"!==HCe.protocol&&!Wve(aEe)?(zCe=aEe,$ve.addEventListener("message",oEe,!1)):zCe="onreadystatechange"in eye("script")?function(e){Hbe.appendChild(eye("script")).onreadystatechange=function(){Hbe.removeChild(this),rEe(e)}}:function(e){setTimeout(iEe(e),0)});var sEe,lEe,uEe,cEe,fEe,dEe,hEe,pEe,gEe={set:KCe},vEe=/ipad|iphone|ipod/i.test(vme)&&void 0!==$ve.Pebble,mEe=/web0s(?!.*chrome)/i.test(vme),yEe=rye.f,bEe=gEe.set,wEe=$ve.MutationObserver||$ve.WebKitMutationObserver,xEe=$ve.document,CEe=$ve.process,EEe=$ve.Promise,kEe=yEe($ve,"queueMicrotask"),SEe=kEe&&kEe.value;SEe||(sEe=function(){var e,t;for(qCe&&(e=CEe.domain)&&e.exit();lEe;){t=lEe.fn,lEe=lEe.next;try{t()}catch(n){throw lEe?cEe():uEe=void 0,n}}uEe=void 0,e&&e.enter()},GCe||qCe||mEe||!wEe||!xEe?!vEe&&EEe&&EEe.resolve?((hEe=EEe.resolve(void 0)).constructor=EEe,pEe=Lxe(hEe.then,hEe),cEe=function(){pEe(sEe)}):qCe?cEe=function(){CEe.nextTick(sEe)}:(bEe=Lxe(bEe,$ve),cEe=function(){bEe(sEe)}):(fEe=!0,dEe=xEe.createTextNode(""),new wEe(sEe).observe(dEe,{characterData:!0}),cEe=function(){dEe.data=fEe=!fEe}));var _Ee,DEe,AEe,TEe,OEe=SEe||function(e){var t={fn:e,next:void 0};uEe&&(uEe.next=t),lEe||(lEe=t,cEe()),uEe=t},PEe=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r}),this.resolve=Tme(t),this.reject=Tme(n)},IEe={f:function(e){return new PEe(e)}},FEe=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},BEe="object"==typeof window,LEe=gEe.set,NEe=Kme("species"),MEe="Promise",REe=Aye.getterFor(MEe),jEe=Aye.set,HEe=Aye.getterFor(MEe),zEe=WCe&&WCe.prototype,UEe=WCe,$Ee=zEe,WEe=$ve.TypeError,VEe=$ve.document,GEe=$ve.process,qEe=IEe.f,KEe=qEe,YEe=!!(VEe&&VEe.createEvent&&$ve.dispatchEvent),XEe=dme($ve.PromiseRejectionEvent),JEe=!1,ZEe=obe(MEe,function(){var e=gye(UEe),t=e!==String(UEe);if(!t&&66===xme)return!0;if(xme>=51&&/native code/.test(e))return!1;var n=new UEe(function(e){e(1)}),r=function(e){e(function(){},function(){})};return(n.constructor={})[NEe]=r,!(JEe=n.then(function(){})instanceof r)||!t&&BEe&&!XEe}),QEe=ZEe||!Zxe(function(e){UEe.all(e).catch(function(){})}),eke=function(e){var t;return!(!hme(e)||!dme(t=e.then))&&t},tke=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;OEe(function(){for(var r=e.value,i=1==e.state,o=0;n.length>o;){var a,s,l,u=n[o++],c=i?u.ok:u.fail,f=u.resolve,d=u.reject,h=u.domain;try{c?(i||(2===e.rejection&&oke(e),e.rejection=1),!0===c?a=r:(h&&h.enter(),a=c(r),h&&(h.exit(),l=!0)),a===u.promise?d(WEe("Promise-chain cycle")):(s=eke(a))?qve(s,a,f,d):f(a)):d(r)}catch(p){h&&!l&&h.exit(),d(p)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&rke(e)})}},nke=function(e,t,n){var r,i;YEe?((r=VEe.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),$ve.dispatchEvent(r)):r={promise:t,reason:n},!XEe&&(i=$ve["on"+e])?i(r):"unhandledrejection"===e&&function(e,t){var n=$ve.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},rke=function(e){qve(LEe,$ve,function(){var t,n=e.facade,r=e.value;if(ike(e)&&(t=FEe(function(){qCe?GEe.emit("unhandledRejection",r,n):nke("unhandledrejection",n,r)}),e.rejection=qCe||ike(e)?2:1,t.error))throw t.value})},ike=function(e){return 1!==e.rejection&&!e.parent},oke=function(e){qve(LEe,$ve,function(){var t=e.facade;qCe?GEe.emit("rejectionHandled",t):nke("rejectionhandled",t,e.value)})},ake=function(e,t,n){return function(r){e(t,r,n)}},ske=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,tke(e,!0))},lke=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw WEe("Promise can't be resolved itself");var r=eke(t);r?OEe(function(){var n={done:!1};try{qve(r,t,ake(lke,n,e),ake(ske,n,e))}catch(i){ske(n,i,e)}}):(e.value=t,e.state=1,tke(e,!1))}catch(i){ske({done:!1},i,e)}}};if(ZEe&&($Ee=(UEe=function(e){qxe(this,$Ee),Tme(e),qve(_Ee,this);var t=REe(this);try{e(ake(lke,t),ake(ske,t))}catch(n){ske(t,n)}}).prototype,(_Ee=function(e){jEe(this,{type:MEe,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Sxe($Ee,{then:function(e,t){var n=HEe(this),r=n.reactions,i=qEe(xwe(this,UEe));return i.ok=!dme(e)||e,i.fail=dme(t)&&t,i.domain=qCe?GEe.domain:void 0,n.parent=!0,r[r.length]=i,0!=n.state&&tke(n,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),DEe=function(){var e=new _Ee,t=REe(e);this.promise=e,this.resolve=ake(lke,t),this.reject=ake(ske,t)},IEe.f=qEe=function(e){return e===UEe||e===AEe?new DEe(e):KEe(e)},dme(WCe)&&zEe!==Object.prototype)){TEe=zEe.then,JEe||(Fye(zEe,"then",function(e,t){var n=this;return new UEe(function(e,t){qve(TEe,n,e,t)}).then(e,t)},{unsafe:!0}),Fye(zEe,"catch",$Ee.catch,{unsafe:!0}));try{delete zEe.constructor}catch(TTe){}fxe&&fxe(zEe,$Ee)}sbe({global:!0,wrap:!0,forced:ZEe},{Promise:UEe}),axe(UEe,MEe,!1),function(){var e=pme("Promise"),t=uye.f;Vve&&e&&!e[VCe]&&t(e,VCe,{configurable:!0,get:function(){return this}})}(),AEe=pme(MEe),sbe({target:MEe,stat:!0,forced:ZEe},{reject:function(e){var t=qEe(this);return qve(t.reject,void 0,e),t.promise}}),sbe({target:MEe,stat:!0,forced:ZEe},{resolve:function(e){return function(e,t){if(aye(e),hme(t)&&t.constructor===e)return t;var n=IEe.f(e);return(0,n.resolve)(t),n.promise}(this,e)}}),sbe({target:MEe,stat:!0,forced:QEe},{all:function(e){var t=this,n=qEe(t),r=n.resolve,i=n.reject,o=FEe(function(){var n=Tme(t.resolve),o=[],a=0,s=1;Vxe(e,function(e){var l=a++,u=!1;s++,qve(n,t,e).then(function(e){u||(u=!0,o[l]=e,--s||r(o))},i)}),--s||r(o)});return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=qEe(t),r=n.reject,i=FEe(function(){var i=Tme(t.resolve);Vxe(e,function(e){qve(i,t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var uke=Iye.PROPER,cke=RegExp.prototype,fke=cke.toString,dke=nme(Bbe),hke=Wve(function(){return"/a/b"!=fke.call({source:"a",flags:"b"})}),pke=uke&&"toString"!=fke.name;(hke||pke)&&Fye(RegExp.prototype,"toString",function(){var e=aye(this),t=Fbe(e.source),n=e.flags;return"/"+t+"/"+Fbe(void 0===n&&gme(cke,e)&&!("flags"in cke)?dke(e):n)},{unsafe:!0});var gke=Iye.EXISTS,vke=uye.f,mke=Function.prototype,yke=nme(mke.toString),bke=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,wke=nme(bke.exec);Vve&&!gke&&vke(mke,"name",{configurable:!0,get:function(){try{return wke(bke,yke(this))[1]}catch(pp){return""}}});var xke=new WeakMap;function Cke(e){return e.getMenuConfig("uploadImage")}function Eke(e,t){return Hwe(this,0,void 0,function(){return zwe(this,function(n){return[2,new Promise(function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var i=r.result;if(i){var o=i.toString(),a=0===o.indexOf("data:image")?"":o;b0(e,o,t.name,a),n("ok")}}})]})})}function kke(e,t){return Hwe(this,0,void 0,function(){var n,r,i,o;return zwe(this,function(a){switch(a.label){case 0:return n=function(e){var t=xke.get(e);if(null!=t)return t;var n=Cke(e),r=n.onSuccess,i=n.onProgress,o=n.onFailed,a=n.customInsert,s=n.onError;return t=sG(jwe(jwe({},n),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n,r){return b0(e,t,n,r)}),void r(t,n);var i=n.errno,s=void 0===i?1:i,l=n.data,u=void 0===l?{}:l;if(0===s){if(Array.isArray(u))u.forEach(function(t){var n=t.url,r=void 0===n?"":n,i=t.alt,o=void 0===i?"":i,a=t.href;b0(e,r,o,void 0===a?"":a)});else{var c=u.url,f=void 0===c?"":c,d=u.alt,h=void 0===d?"":d,p=u.href;b0(e,f,h,void 0===p?"":p)}r(t,n)}else o(t,n)},onError:function(e,t,n){s(e,t,n)}})),xke.set(e,t),t}(e),r=t.name,i=t.type,o=t.size,n.addFile({name:r,type:i,size:o,data:t}),[4,n.upload()];case 1:return a.sent(),[2]}})})}function Ske(e,t){var n,r;return Hwe(this,0,void 0,function(){var i,o,a,s,l,u,c,f,d;return zwe(this,function(h){switch(h.label){case 0:if(null==t)return[2];i=Array.prototype.slice.call(t),o=Cke(e),a=o.customUpload,s=o.base64LimitSize,h.label=1;case 1:h.trys.push([1,11,12,17]),l=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var o,a,s,l;o=r,a=i,s=(t=e[n](t)).done,l=t.value,Promise.resolve(l).then(function(e){o({value:e,done:s})},a)})}}}(i),h.label=2;case 2:return[4,l.next()];case 3:return(u=h.sent()).done?[3,10]:(c=u.value,f=c.size,s&&f<=s?[4,Eke(e,c)]:[3,5]);case 4:return h.sent(),[3,9];case 5:return a?[4,a(c,function(t,n,r){return b0(e,t,n,r)})]:[3,7];case 6:return h.sent(),[3,9];case 7:return[4,kke(e,c)];case 8:h.sent(),h.label=9;case 9:return[3,2];case 10:return[3,17];case 11:return d=h.sent(),n={error:d},[3,17];case 12:return h.trys.push([12,,15,16]),u&&!u.done&&(r=l.return)?[4,r.call(l)]:[3,14];case 13:h.sent(),h.label=14;case 14:return[3,16];case 15:if(n)throw n.error;return[7];case 16:return[7];case 17:return[2]}})})}var _ke=nme([].join),Dke=lme!=Object,Ake=LCe("join",",");sbe({target:"Array",proto:!0,forced:Dke||!Ake},{join:function(e){return _ke(fme(this),void 0===e?",":e)}}),KD&&(DD.fn.append=KD),LD&&(DD.fn.on=LD),eA&&(DD.fn.remove=eA),BD&&(DD.fn.val=BD),iA&&(DD.fn.click=iA),HD&&(DD.fn.hide=HD);var Tke=function(){function e(){this.title=XG("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return w0(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,i=void 0===r?[]:r,o=n.customBrowseAndUpload;if(o)o(function(t,n,r){return b0(e,t,n,r)});else{var a="";i.length>0&&(a='accept="'+i.join(", ")+'"');var s=DD("body"),l=DD('<input type="file" '+a+" multiple/>");l.hide(),s.append(l),l.click(),l.on("change",function(){var t=l[0].files;Ske(e,t)})}},e}(),Oke={menus:[{key:"uploadImage",factory:function(){return new Tke},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'"+e.name+"' upload failed",t)},onError:function(e,t,n){console.error("'"+e.name+"' upload error",n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(w0(n))t(r);else if(r.getData("text/plain"))t(r);else{var i=r.files;i.length<=0?t(r):Array.prototype.slice.call(i).some(function(e){return"image"===function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(e.type.split("/"),1)[0]})?Ske(e,i):t(r)}},n}};YG("en",{highLightModule:{selectLang:"Language"}}),YG("zh-CN",{highLightModule:{selectLang:"选择语言"}});var Pke="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ike(e){var t={exports:{}};return e(t,t.exports),t.exports}var Fke,Bke,Lke=function(e){return e&&e.Math==Math&&e},Nke=Lke("object"==typeof globalThis&&globalThis)||Lke("object"==typeof window&&window)||Lke("object"==typeof self&&self)||Lke("object"==typeof Pke&&Pke)||function(){return this}()||Function("return this")(),Mke=Object.defineProperty,Rke=function(e,t){try{Mke(Nke,e,{value:t,configurable:!0,writable:!0})}catch(ZG){Nke[e]=t}return t},jke=Nke["__core-js_shared__"]||Rke("__core-js_shared__",{}),Hke=Ike(function(e){(e.exports=function(e,t){return jke[e]||(jke[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),zke=Function.prototype,Uke=zke.bind,$ke=zke.call,Wke=Uke&&Uke.bind($ke),Vke=Uke?function(e){return e&&Wke($ke,e)}:function(e){return e&&function(){return $ke.apply(e,arguments)}},Gke=Nke.TypeError,qke=function(e){if(null==e)throw Gke("Can't call method on "+e);return e},Kke=Nke.Object,Yke=function(e){return Kke(qke(e))},Xke=Vke({}.hasOwnProperty),Jke=Object.hasOwn||function(e,t){return Xke(Yke(e),t)},Zke=0,Qke=Math.random(),eSe=Vke(1..toString),tSe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+eSe(++Zke+Qke,36)},nSe=function(e){return"function"==typeof e},rSe=function(e,t){return arguments.length<2?function(e){return nSe(e)?e:void 0}(Nke[e]):Nke[e]&&Nke[e][t]},iSe=rSe("navigator","userAgent")||"",oSe=Nke.process,aSe=Nke.Deno,sSe=oSe&&oSe.versions||aSe&&aSe.version,lSe=sSe&&sSe.v8;lSe&&(Bke=(Fke=lSe.split("."))[0]>0&&Fke[0]<4?1:+(Fke[0]+Fke[1])),!Bke&&iSe&&(!(Fke=iSe.match(/Edge\/(\d+)/))||Fke[1]>=74)&&(Fke=iSe.match(/Chrome\/(\d+)/))&&(Bke=+Fke[1]);var uSe=Bke,cSe=function(e){try{return!!e()}catch(t){return!0}},fSe=!!Object.getOwnPropertySymbols&&!cSe(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&uSe&&uSe<41}),dSe=fSe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,hSe=Hke("wks"),pSe=Nke.Symbol,gSe=pSe&&pSe.for,vSe=dSe?pSe:pSe&&pSe.withoutSetter||tSe,mSe=function(e){if(!Jke(hSe,e)||!fSe&&"string"!=typeof hSe[e]){var t="Symbol."+e;fSe&&Jke(pSe,e)?hSe[e]=pSe[e]:hSe[e]=dSe&&gSe?gSe(t):vSe(t)}return hSe[e]},ySe={};ySe[mSe("toStringTag")]="z";var bSe="[object z]"===String(ySe),wSe=!cSe(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),xSe=function(e){return"object"==typeof e?null!==e:nSe(e)},CSe=Nke.document,ESe=xSe(CSe)&&xSe(CSe.createElement),kSe=function(e){return ESe?CSe.createElement(e):{}},SSe=!wSe&&!cSe(function(){return 7!=Object.defineProperty(kSe("div"),"a",{get:function(){return 7}}).a}),_Se=Nke.String,DSe=Nke.TypeError,ASe=function(e){if(xSe(e))return e;throw DSe(_Se(e)+" is not an object")},TSe=Function.prototype.call,OSe=TSe.bind?TSe.bind(TSe):function(){return TSe.apply(TSe,arguments)},PSe=Vke({}.isPrototypeOf),ISe=Nke.Object,FSe=dSe?function(e){return"symbol"==typeof e}:function(e){var t=rSe("Symbol");return nSe(t)&&PSe(t.prototype,ISe(e))},BSe=Nke.String,LSe=function(e){try{return BSe(e)}catch(t){return"Object"}},NSe=Nke.TypeError,MSe=function(e){if(nSe(e))return e;throw NSe(LSe(e)+" is not a function")},RSe=function(e,t){var n=e[t];return null==n?void 0:MSe(n)},jSe=Nke.TypeError,HSe=Nke.TypeError,zSe=mSe("toPrimitive"),USe=function(e){var t=function(e){if(!xSe(e)||FSe(e))return e;var t,n=RSe(e,zSe);if(n){if(t=OSe(n,e,"string"),!xSe(t)||FSe(t))return t;throw HSe("Can't convert object to primitive value")}return function(e){var t,n;if(nSe(t=e.toString)&&!xSe(n=OSe(t,e)))return n;if(nSe(t=e.valueOf)&&!xSe(n=OSe(t,e)))return n;throw jSe("Can't convert object to primitive value")}(e)}(e);return FSe(t)?t:t+""},$Se=Nke.TypeError,WSe=Object.defineProperty,VSe={f:wSe?WSe:function(e,t,n){if(ASe(e),t=USe(t),ASe(n),SSe)try{return WSe(e,t,n)}catch(r){}if("get"in n||"set"in n)throw $Se("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},GSe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},qSe=wSe?function(e,t,n){return VSe.f(e,t,GSe(1,n))}:function(e,t,n){return e[t]=n,e},KSe=Vke(Function.toString);nSe(jke.inspectSource)||(jke.inspectSource=function(e){return KSe(e)});var YSe,XSe,JSe,ZSe=jke.inspectSource,QSe=Nke.WeakMap,e_e=nSe(QSe)&&/native code/.test(ZSe(QSe)),t_e=Hke("keys"),n_e=function(e){return t_e[e]||(t_e[e]=tSe(e))},r_e={},i_e=Nke.TypeError,o_e=Nke.WeakMap;if(e_e||jke.state){var a_e=jke.state||(jke.state=new o_e),s_e=Vke(a_e.get),l_e=Vke(a_e.has),u_e=Vke(a_e.set);YSe=function(e,t){if(l_e(a_e,e))throw new i_e("Object already initialized");return t.facade=e,u_e(a_e,e,t),t},XSe=function(e){return s_e(a_e,e)||{}},JSe=function(e){return l_e(a_e,e)}}else{var c_e=n_e("state");r_e[c_e]=!0,YSe=function(e,t){if(Jke(e,c_e))throw new i_e("Object already initialized");return t.facade=e,qSe(e,c_e,t),t},XSe=function(e){return Jke(e,c_e)?e[c_e]:{}},JSe=function(e){return Jke(e,c_e)}}var f_e={get:XSe,enforce:function(e){return JSe(e)?XSe(e):YSe(e,{})}},d_e=Function.prototype,h_e=wSe&&Object.getOwnPropertyDescriptor,p_e=Jke(d_e,"name"),g_e={PROPER:p_e&&"something"===function(){}.name,CONFIGURABLE:p_e&&(!wSe||wSe&&h_e(d_e,"name").configurable)},v_e=Ike(function(e){var t=g_e.CONFIGURABLE,n=f_e.get,r=f_e.enforce,i=String(String).split("String");(e.exports=function(e,n,o,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;nSe(o)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Jke(o,"name")||t&&o.name!==f)&&qSe(o,"name",f),(s=r(o)).source||(s.source=i.join("string"==typeof f?f:""))),e!==Nke?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=o:qSe(e,n,o)):u?e[n]=o:Rke(n,o)})(Function.prototype,"toString",function(){return nSe(this)&&n(this).source||ZSe(this)})}),m_e=Vke({}.toString),y_e=Vke("".slice),b_e=function(e){return y_e(m_e(e),8,-1)},w_e=mSe("toStringTag"),x_e=Nke.Object,C_e="Arguments"==b_e(function(){return arguments}()),E_e=bSe?b_e:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=x_e(e),w_e))?n:C_e?b_e(t):"Object"==(r=b_e(t))&&nSe(t.callee)?"Arguments":r},k_e=bSe?{}.toString:function(){return"[object "+E_e(this)+"]"};bSe||v_e(Object.prototype,"toString",k_e,{unsafe:!0});var S_e,__e={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},D_e=kSe("span").classList,A_e=D_e&&D_e.constructor&&D_e.constructor.prototype,T_e=A_e===Object.prototype?void 0:A_e,O_e=Vke(Vke.bind),P_e=Nke.Object,I_e=Vke("".split),F_e=cSe(function(){return!P_e("z").propertyIsEnumerable(0)})?function(e){return"String"==b_e(e)?I_e(e,""):P_e(e)}:P_e,B_e=Math.ceil,L_e=Math.floor,N_e=function(e){var t=+e;return t!=t||0===t?0:(t>0?L_e:B_e)(t)},M_e=Math.min,R_e=function(e){return e>0?M_e(N_e(e),9007199254740991):0},j_e=function(e){return R_e(e.length)},H_e=Array.isArray||function(e){return"Array"==b_e(e)},z_e=function(){},U_e=[],$_e=rSe("Reflect","construct"),W_e=/^\s*(?:class|function)\b/,V_e=Vke(W_e.exec),G_e=!W_e.exec(z_e),q_e=function(e){if(!nSe(e))return!1;try{return $_e(z_e,U_e,e),!0}catch(t){return!1}},K_e=!$_e||cSe(function(){var e;return q_e(q_e.call)||!q_e(Object)||!q_e(function(){e=!0})||e})?function(e){if(!nSe(e))return!1;switch(E_e(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return G_e||!!V_e(W_e,ZSe(e))}:q_e,Y_e=mSe("species"),X_e=Nke.Array,J_e=function(e,t){return new(H_e(n=e)&&(r=n.constructor,(K_e(r)&&(r===X_e||H_e(r.prototype))||xSe(r)&&null===(r=r[Y_e]))&&(r=void 0)),void 0===r?X_e:r)(0===t?0:t);var n,r},Z_e=Vke([].push),Q_e=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(l,u,c,f){for(var d,h,p=Yke(l),g=F_e(p),v=function(e,t){return MSe(e),void 0===t?e:O_e?O_e(e,t):function(){return e.apply(t,arguments)}}(u,c),m=j_e(g),y=0,b=f||J_e,w=t?b(l,m):n||a?b(l,0):void 0;m>y;y++)if((s||y in g)&&(h=v(d=g[y],y,p),e))if(t)w[y]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return y;case 2:Z_e(w,d)}else switch(e){case 4:return!1;case 7:Z_e(w,d)}return o?-1:r||i?i:w}},eDe=[Q_e(0),Q_e(1),Q_e(2),Q_e(3),Q_e(4),Q_e(5),Q_e(6),Q_e(7)][0],tDe=(S_e=[].forEach)&&cSe(function(){S_e.call(null,function(){throw 1},1)})?[].forEach:function(e){return eDe(this,e,arguments.length>1?arguments[1]:void 0)},nDe=function(e){if(e&&e.forEach!==tDe)try{qSe(e,"forEach",tDe)}catch(t){e.forEach=tDe}};for(var rDe in __e)__e[rDe]&&nDe(Nke[rDe]&&Nke[rDe].prototype);nDe(T_e);var iDe={}.propertyIsEnumerable,oDe=Object.getOwnPropertyDescriptor,aDe={f:oDe&&!iDe.call({1:2},1)?function(e){var t=oDe(this,e);return!!t&&t.enumerable}:iDe},sDe=function(e){return F_e(qke(e))},lDe=Object.getOwnPropertyDescriptor,uDe={f:wSe?lDe:function(e,t){if(e=sDe(e),t=USe(t),SSe)try{return lDe(e,t)}catch(n){}if(Jke(e,t))return GSe(!OSe(aDe.f,e,t),e[t])}},cDe=Math.max,fDe=Math.min,dDe=function(e,t){var n=N_e(e);return n<0?cDe(n+t,0):fDe(n,t)},hDe=function(e){return function(t,n,r){var i=sDe(t),o=j_e(i),a=dDe(r,o);for(e;o>a;a++)if(a in i&&i[a]===n)return a||0;return-1}}(!1),pDe=Vke([].push),gDe=function(e,t){var n,r=sDe(e),i=0,o=[];for(n in r)!Jke(r_e,n)&&Jke(r,n)&&pDe(o,n);for(;t.length>i;)Jke(r,n=t[i++])&&(~hDe(o,n)||pDe(o,n));return o},vDe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mDe=vDe.concat("length","prototype"),yDe={f:Object.getOwnPropertyNames||function(e){return gDe(e,mDe)}},bDe={f:Object.getOwnPropertySymbols},wDe=Vke([].concat),xDe=rSe("Reflect","ownKeys")||function(e){var t=yDe.f(ASe(e)),n=bDe.f;return n?wDe(t,n(e)):t},CDe=function(e,t){for(var n=xDe(t),r=VSe.f,i=uDe.f,o=0;o<n.length;o++){var a=n[o];Jke(e,a)||r(e,a,i(t,a))}},EDe=/#|\.prototype\./,kDe=function(e,t){var n=_De[SDe(e)];return n==ADe||n!=DDe&&(nSe(t)?cSe(t):!!t)},SDe=kDe.normalize=function(e){return String(e).replace(EDe,".").toLowerCase()},_De=kDe.data={},DDe=kDe.NATIVE="N",ADe=kDe.POLYFILL="P",TDe=kDe,ODe=uDe.f,PDe=function(e,t){var n,r,i,o,a,s=e.target,l=e.global,u=e.stat;if(n=l?Nke:u?Nke[s]||Rke(s,{}):(Nke[s]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(a=ODe(n,r))&&a.value:n[r],!TDe(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==i){if(typeof o==typeof i)continue;CDe(o,i)}(e.sham||i&&i.sham)&&qSe(o,"sham",!0),v_e(n,r,o,e)}},IDe=Object.keys||function(e){return gDe(e,vDe)},FDe=Object.assign,BDe=Object.defineProperty,LDe=Vke([].concat),NDe=!FDe||cSe(function(){if(wSe&&1!==FDe({b:1},FDe(BDe({},"a",{enumerable:!0,get:function(){BDe(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=FDe({},e)[n]||IDe(FDe({},t)).join("")!=r})?function(e,t){for(var n=Yke(e),r=arguments.length,i=1,o=bDe.f,a=aDe.f;r>i;)for(var s,l=F_e(arguments[i++]),u=o?LDe(IDe(l),o(l)):IDe(l),c=u.length,f=0;c>f;)s=u[f++],wSe&&!OSe(a,l,s)||(n[s]=l[s]);return n}:FDe;PDe({target:"Object",stat:!0,forced:Object.assign!==NDe},{assign:NDe});var MDe=Ike(function(e){var t=function(e){var t=/\blang(?:uage)?-([\w-]+)\b/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},i.util.type(t)){case"Object":if(o=i.util.objId(t),n[o])return n[o];for(var a in r={},n[o]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return o=i.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e&&!t.test(e.className);)e=e.parentElement;return e?(e.className.match(t)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||i.languages)[e],a={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(a[l]=n[l]);n.hasOwnProperty(s)||(a[s]=o[s])}var u=r[e];return r[e]=a,i.languages.DFS(i.languages,function(t,n){n===u&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,o){o=o||{};var a=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],u=i.util.type(l);"Object"!==u||o[a(l)]?"Array"!==u||o[a(l)]||(o[a(l)]=!0,e(l,n,s,o)):(o[a(l)]=!0,e(l,n,null,o))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};i.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run("before-all-elements-highlight",r);for(var o,a=0;o=r.elements[a++];)i.highlightElement(o,!0===t,r.callback)},highlightElement:function(n,r,o){var a=i.util.getLanguage(n),s=i.languages[a];n.className=n.className.replace(t,"").replace(/\s+/g," ")+" language-"+a;var l=n.parentElement;l&&"pre"===l.nodeName.toLowerCase()&&(l.className=l.className.replace(t,"").replace(/\s+/g," ")+" language-"+a);var u={element:n,language:a,grammar:s,code:n.textContent};function c(e){u.highlightedCode=e,i.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,i.hooks.run("after-highlight",u),i.hooks.run("complete",u),o&&o.call(u.element)}if(i.hooks.run("before-sanity-check",u),(l=u.element.parentElement)&&"pre"===l.nodeName.toLowerCase()&&!l.hasAttribute("tabindex")&&l.setAttribute("tabindex","0"),!u.code)return i.hooks.run("complete",u),void(o&&o.call(u.element));if(i.hooks.run("before-highlight",u),u.grammar)if(r&&e.Worker){var f=new Worker(i.filename);f.onmessage=function(e){c(e.data)},f.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else c(i.highlight(u.code,u.grammar,u.language));else c(i.util.encode(u.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};return i.hooks.run("before-tokenize",r),r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run("after-tokenize",r),o.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new l;return u(i,i.head,e),s(e,i,t,i.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var o=i[1].length;i.index+=o,i[0]=i[0].slice(o)}return i}function s(e,t,n,r,l,f){for(var d in n)if(n.hasOwnProperty(d)&&n[d]){var h=n[d];h=Array.isArray(h)?h:[h];for(var p=0;p<h.length;++p){if(f&&f.cause==d+","+p)return;var g=h[p],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var w=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,w+"g")}for(var x=g.pattern||g,C=r.next,E=l;C!==t.tail&&!(f&&E>=f.reach);E+=C.value.length,C=C.next){var k=C.value;if(t.length>e.length)return;if(!(k instanceof o)){var S,_=1;if(y){if(!(S=a(x,E,e,m)))break;var D=S.index,A=S.index+S[0].length,T=E;for(T+=C.value.length;D>=T;)T+=(C=C.next).value.length;if(E=T-=C.value.length,C.value instanceof o)continue;for(var O=C;O!==t.tail&&(T<A||"string"==typeof O.value);O=O.next)_++,T+=O.value.length;_--,k=e.slice(E,T),S.index-=E}else if(!(S=a(x,0,k,m)))continue;D=S.index;var P=S[0],I=k.slice(0,D),F=k.slice(D+P.length),B=E+k.length;f&&B>f.reach&&(f.reach=B);var L=C.prev;if(I&&(L=u(t,L,I),E+=I.length),c(t,L,_),C=u(t,L,new o(d,v?i.tokenize(P,v):P,b,P)),F&&u(t,C,F),_>1){var N={cause:d+","+p,reach:B};s(e,t,n,C.prev,E,N),f&&N.reach>f.reach&&(f.reach=N.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function u(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function c(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}if(e.Prism=i,o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(o.classes,a):o.classes.push(a)),i.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,a=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),a&&e.close()},!1),i):i;var f=i.util.currentScript();function d(){i.manual||i.highlightAll()}if(f&&(i.filename=f.src,f.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var h=document.readyState;"loading"===h||"interactive"===h&&f&&f.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),void 0!==Pke&&(Pke.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:i},t.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r='pre[data-src]:not([data-src-status="loaded"]):not([data-src-status="loading"])',i=/\blang(?:uage)?-([\w-]+)\b/i;t.hooks.add("before-highlightall",function(e){e.selector+=", "+r}),t.hooks.add("before-sanity-check",function(i){var o=i.element;if(o.matches(r)){i.code="",o.setAttribute(n,"loading");var s=o.appendChild(document.createElement("CODE"));s.textContent="Loading…";var l=o.getAttribute("data-src"),u=i.language;if("none"===u){var c=(/\.(\w+)$/.exec(l)||[,"none"])[1];u=e[c]||c}a(s,u),a(o,u);var f=t.plugins.autoloader;f&&f.loadLanguages(u);var d=new XMLHttpRequest;d.open("GET",l,!0),d.onreadystatechange=function(){4==d.readyState&&(d.status<400&&d.responseText?(o.setAttribute(n,"loaded"),s.textContent=d.responseText,t.highlightElement(s)):(o.setAttribute(n,"failed"),d.status>=400?s.textContent="✖ Error "+d.status+" while fetching file: "+d.statusText:s.textContent="✖ Error: File does not exist or is empty"))},d.send(null)}}),t.plugins.fileHighlight={highlight:function(e){for(var n,i=(e||document).querySelectorAll(r),o=0;n=i[o++];)t.highlightElement(n)}};var o=!1;t.fileHighlight=function(){o||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),o=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}function a(e,t){var n=e.className;n=n.replace(i," ")+" language-"+t,e.className=n.replace(/\s+/g," ").trim()}}()});!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return i}),RegExp(e,t)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var i=t[r],o=!1;if("string"!=typeof i&&("tag"===i.type&&i.content[0]&&"tag"===i.content[0].type?"</"===i.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:a(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var l=a(i);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(l+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=a(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}i.content&&"string"!=typeof i.content&&s(i.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(Prism),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/}),delete Prism.languages.go["class-name"],function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:o};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:module|import)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism),function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",o="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var u=l(o),c=RegExp(l(i+" "+o+" "+a+" "+s)),f=l(o+" "+a+" "+s),d=l(i+" "+o+" "+s),h=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),p=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,h]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[f,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[h,p,y]),x=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[x,m,y]),E={keyword:c,punctuation:/[<>()?,.:[\]]/},k=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,_=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[_]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0},{pattern:RegExp(k),greedy:!0,alias:"character"}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[u,v]),lookbehind:!0,inside:E},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:E},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:E},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,d,g]),inside:E}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|typeof|sizeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[p]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,m]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,h]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(h),alias:"class-name",inside:E}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[u,v,g,C,c.source,p,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,p]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var D=S+"|"+k,A=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),T=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[A]),2),O=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,P=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,T]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[O,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[O]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[T]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var I=/:[^}\r\n]+/.source,F=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[A]),2),B=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[F,I]),L=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[D]),2),N=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,I]);function M(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,I]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[B]),lookbehind:!0,greedy:!0,inside:M(B,F)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:M(N,L)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp,Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?)[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Until|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp(/%r/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp(/%[qQiIwWxs]?/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S])*\)/.source,/\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S])*\]/.source,/<(?:[^<>\\]|\\[\s\S])*>/.source].join("|")+")"),greedy:!0,inside:{interpolation:t}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?/}},interpolation:t}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?'|'$/}}}}],e.languages.rb=e.languages.ruby}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:true|false)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:true|false)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,a=0;a<i.length;a++)o[i[a]]=e.languages.bash[i[a]];e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var i=t[n];if("code"===i.type){var o=i.content[1],a=i.content[3];if(o&&a&&"code-language"===o.type&&"code-block"===a.type&&"string"==typeof o.content){var s=o.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),l="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(i.content)}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,i=t.classes.length;r<i;r++){var o=t.classes[r],u=/language-(.+)/.exec(o);if(u){n=u[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(t.content.replace(a,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e}),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var f="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=f,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(f);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:/\b(?:as|def|in|abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/&lt;/g,"<").replace(/&amp;/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}});var RDe=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function jDe(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce(function(e,t){return e+jDe(t)},0)}var HDe,zDe=Nke.String,UDe=function(e){if("Symbol"===E_e(e))throw TypeError("Cannot convert a Symbol value to a string");return zDe(e)},$De=function(){var e=ASe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},WDe=Nke.RegExp,VDe=cSe(function(){var e=WDe("a","y");return e.lastIndex=2,null!=e.exec("abcd")});VDe||cSe(function(){return!WDe("a","y").sticky});var GDe={BROKEN_CARET:VDe||cSe(function(){var e=WDe("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),UNSUPPORTED_Y:VDe},qDe=wSe?Object.defineProperties:function(e,t){ASe(e);for(var n,r=sDe(t),i=IDe(t),o=i.length,a=0;o>a;)VSe.f(e,n=i[a++],r[n]);return e},KDe=rSe("document","documentElement"),YDe=n_e("IE_PROTO"),XDe=function(){},JDe=function(e){return"<script>"+e+"<\/script>"},ZDe=function(e){e.write(JDe("")),e.close();var t=e.parentWindow.Object;return e=null,t},QDe=function(){try{HDe=new ActiveXObject("htmlfile")}catch(r){}var e,t;QDe="undefined"!=typeof document?document.domain&&HDe?ZDe(HDe):((t=kSe("iframe")).style.display="none",KDe.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(JDe("document.F=Object")),e.close(),e.F):ZDe(HDe);for(var n=vDe.length;n--;)delete QDe.prototype[vDe[n]];return QDe()};r_e[YDe]=!0;var eAe,tAe,nAe=Object.create||function(e,t){var n;return null!==e?(XDe.prototype=ASe(e),n=new XDe,XDe.prototype=null,n[YDe]=e):n=QDe(),void 0===t?n:qDe(n,t)},rAe=Nke.RegExp,iAe=cSe(function(){var e=rAe(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),oAe=Nke.RegExp,aAe=cSe(function(){var e=oAe("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),sAe=f_e.get,lAe=Hke("native-string-replace",String.prototype.replace),uAe=RegExp.prototype.exec,cAe=uAe,fAe=Vke("".charAt),dAe=Vke("".indexOf),hAe=Vke("".replace),pAe=Vke("".slice),gAe=(tAe=/b*/g,OSe(uAe,eAe=/a/,"a"),OSe(uAe,tAe,"a"),0!==eAe.lastIndex||0!==tAe.lastIndex),vAe=GDe.BROKEN_CARET,mAe=void 0!==/()??/.exec("")[1];(gAe||mAe||vAe||iAe||aAe)&&(cAe=function(e){var t,n,r,i,o,a,s,l=this,u=sAe(l),c=UDe(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=OSe(cAe,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,h=vAe&&l.sticky,p=OSe($De,l),g=l.source,v=0,m=c;if(h&&(p=hAe(p,"y",""),-1===dAe(p,"g")&&(p+="g"),m=pAe(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==fAe(c,l.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,v++),n=new RegExp("^(?:"+g+")",p)),mAe&&(n=new RegExp("^"+g+"$(?!\\s)",p)),gAe&&(r=l.lastIndex),i=OSe(uAe,h?n:l,m),h?i?(i.input=pAe(i.input,v),i[0]=pAe(i[0],v),i.index=l.lastIndex,l.lastIndex+=i[0].length):l.lastIndex=0:gAe&&i&&(l.lastIndex=l.global?i.index+i[0].length:r),mAe&&i&&i.length>1&&OSe(lAe,i[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)}),i&&d)for(i.groups=a=nAe(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var yAe=cAe;PDe({target:"RegExp",proto:!0,forced:/./.exec!==yAe},{exec:yAe});var bAe=Function.prototype,wAe=bAe.apply,xAe=bAe.bind,CAe=bAe.call,EAe="object"==typeof Reflect&&Reflect.apply||(xAe?CAe.bind(wAe):function(){return CAe.apply(wAe,arguments)}),kAe=mSe("species"),SAe=RegExp.prototype,_Ae=mSe("match"),DAe=Nke.TypeError,AAe=mSe("species"),TAe=Vke("".charAt),OAe=Vke("".charCodeAt),PAe=Vke("".slice),IAe=function(e,t){var n,r,i=UDe(qke(e)),o=N_e(t),a=i.length;return o<0||o>=a?"":(n=OAe(i,o))<55296||n>56319||o+1===a||(r=OAe(i,o+1))<56320||r>57343?TAe(i,o):PAe(i,o,o+2)},FAe=function(e,t,n){return t+(n?IAe(e,t).length:1)},BAe=Nke.Array,LAe=Math.max,NAe=function(e,t,n){for(var r,i,o,a,s=j_e(e),l=dDe(t,s),u=dDe(void 0===n?s:n,s),c=BAe(LAe(u-l,0)),f=0;l<u;l++,f++)r=c,i=f,o=e[l],(a=USe(i))in r?VSe.f(r,a,GSe(0,o)):r[a]=o;return c.length=f,c},MAe=Nke.TypeError,RAe=function(e,t){var n=e.exec;if(nSe(n)){var r=OSe(n,e,t);return null!==r&&ASe(r),r}if("RegExp"===b_e(e))return OSe(yAe,e,t);throw MAe("RegExp#exec called on incompatible receiver")},jAe=GDe.UNSUPPORTED_Y,HAe=Math.min,zAe=[].push,UAe=Vke(/./.exec),$Ae=Vke(zAe),WAe=Vke("".slice);!function(e,t,n,r){var i,o,a,s=mSe(e),l=!cSe(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)}),u=l&&!cSe(function(){var e=!1,t=/a/;return(t={}).constructor={},t.constructor[kAe]=function(){return t},t.flags="",t[s]=/./[s],t.exec=function(){return e=!0,null},t[s](""),!e});if(!l||!u||n){var c=Vke(/./[s]),f=(i=s,o=""[e],a="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var n,r,i=UDe(qke(this)),a=void 0===t?4294967295:t>>>0;if(0===a)return[];if(void 0===e)return[i];if(!xSe(n=e)||!(void 0!==(r=n[_Ae])?r:"RegExp"==b_e(n)))return OSe(o,i,e,a);for(var s,l,u,c=[],f=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=new RegExp(e.source,f+"g");(s=OSe(yAe,h,i))&&!((l=h.lastIndex)>d&&($Ae(c,WAe(i,d,s.index)),s.length>1&&s.index<i.length&&EAe(zAe,c,NAe(s,1)),u=s[0].length,d=l,c.length>=a));)h.lastIndex===s.index&&h.lastIndex++;return d===i.length?!u&&UAe(h,"")||$Ae(c,""):$Ae(c,WAe(i,d)),c.length>a?NAe(c,0,a):c}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:OSe(o,this,e,t)}:o,[function(e,t){var n=qke(this),r=null==e?void 0:RSe(e,i);return r?OSe(r,e,n,t):OSe(a,UDe(n),e,t)},function(e,t){var n=ASe(this),r=UDe(e),i=function(e,t,n,r,i){var o=Vke(e),a=t.exec;return a===yAe||a===SAe.exec?l&&!i?{done:!0,value:c(t,n,r)}:{done:!0,value:o(n,t,r)}:{done:!1}}(a,n,r,t,a!==o);if(i.done)return i.value;var s,u,f,d=(s=RegExp,void 0===(f=ASe(n).constructor)||null==(u=ASe(f)[AAe])?s:function(e){if(K_e(e))return e;throw DAe(LSe(e)+" is not a constructor")}(u)),h=n.unicode,p=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(jAe?"g":"y"),g=new d(jAe?"^(?:"+n.source+")":n,p),v=void 0===t?4294967295:t>>>0;if(0===v)return[];if(0===r.length)return null===RAe(g,r)?[r]:[];for(var m=0,y=0,b=[];y<r.length;){g.lastIndex=jAe?0:y;var w,x=RAe(g,jAe?WAe(r,y):r);if(null===x||(w=HAe(R_e(g.lastIndex+(jAe?y:0)),r.length))===m)y=FAe(r,y,h);else{if($Ae(b,WAe(r,m,y)),b.length===v)return b;for(var C=1;C<=x.length-1;C++)if($Ae(b,x[C]),b.length===v)return b;y=m=w}}return $Ae(b,WAe(r,m)),b}]);v_e(String.prototype,e,f[0]),v_e(SAe,s,f[1])}r&&qSe(SAe[s],"sham",!0)}("split",0,!!cSe(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),jAe),PDe({global:!0},{globalThis:Nke}),PD&&(DD.fn.attr=PD);var VAe=g_e.PROPER,GAe=RegExp.prototype,qAe=GAe.toString,KAe=Vke($De),YAe=cSe(function(){return"/a/b"!=qAe.call({source:"a",flags:"b"})}),XAe=VAe&&"toString"!=qAe.name;(YAe||XAe)&&v_e(RegExp.prototype,"toString",function(){var e=ASe(this),t=UDe(e.source),n=e.flags;return"/"+t+"/"+UDe(void 0===n&&PSe(GAe,e)&&!("flags"in GAe)?KAe(e):n)},{unsafe:!0});var JAe=function(){function e(){this.title=XG("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("codeSelectLang").codeLangs,r=void 0===n?[]:n;t.push({text:"plain text",value:""}),r.forEach(function(e){var n=e.text,r=e.value;t.push({text:n,value:r})});var i=this.getValue(e);return t.forEach(function(e){e.value===i?e.selected=!0:delete e.selected}),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return"";if(!bS.isElement(t))return"";var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some(function(e){return e.value===n})?n:""},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};h_.setNodes(e,n,{match:function(e){return yz.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=yz.getSelectedNodeByType(e,"code");if(null==t)return null;var n=yz.getParentNode(e,t);return bS.isElement(n)?"pre"!==n.type?null:t:null},e}(),ZAe={renderStyle:function(e,t){var n=e,r=t,i="";return RDe.forEach(function(e){n[e]&&(i=e)}),i&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,i="token "+i),r},parseStyleHtml:function(e,t,n){var r=DD(e);if(!bS.isElement(t))return t;if("code"!==yz.getNodeType(t))return t;var i=t,o=r.attr("class")||"";return 0===o.indexOf("language-")?i.language=o.split("-")[1]||"":i.language=o.toLowerCase(),i},menus:[{key:"codeSelectLang",factory:function(){return new JAe},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"}]}}],elemsToHtml:[{type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n;return"<code "+(r?'class="language-'+r+'"':"")+">"+t+"</code>"}}]},QAe=/"/g,eTe=Vke("".replace);PDe({target:"String",proto:!0,forced:cSe(function(){var e="".anchor('"');return e!==e.toLowerCase()||e.split('"').length>3})},{anchor:function(e){return t=e,n=UDe(qke(this)),r="<a",(r+=' name="'+eTe(UDe(t),QAe,"&quot;")+'"')+">"+n+"</a>";var t,n,r}});var tTe=function(e){var t,n,r,i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(e,2),o=i[0],a=i[1],s=[],l=function(e){if(!YS.isText(e))return null;var t=yz.getParentNode(null,e);if(t&&"code"===yz.getNodeType(t)){var n=yz.getParentNode(null,t);if(n&&"pre"===yz.getNodeType(n))return t}return null}(o);if(null==l)return s;var u=l.language,c=void 0===u?"":u;if(!c)return s;var f=function(e,t){if(!t)return[];var n=MDe.languages[t];return n?MDe.tokenize(e.text,n):[]}(o,c),d=0;try{for(var h=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(f),p=h.next();!p.done;p=h.next()){var g=p.value,v=d+jDe(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:d},r.focus={path:a,offset:v},r)),d=v}}catch(m){t={error:m}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}return s},nTe=function(){return nTe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nTe.apply(this,arguments)},rTe=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=nTe(nTe({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=nTe(nTe({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=nTe(nTe({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=nTe(nTe({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){!function(e,t){var n,r=e.key,i=e.factory,o=e.config,a=Ej(Ej({},o),t||{});if(null!=xz[r])throw new Error("Duplicated key '"+r+"' in menu items");xz[r]=i,null!=(n=a)&&(wz[r]=n)}(e,t)},e.registerRenderElem=function(e){!function(e){var t=e.type,n=e.renderElem;eV[t||""]=n}(e)},e.registerRenderStyle=function(e){var t;t=e,QW.push(t)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;Fz[t||""]=n}(e)},e.registerStyleToHtml=function(e){var t;t=e,Iz.push(t)},e.registerPreParseHtml=function(e){var t;t=e,x$.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;E$[t]=n}(e)},e.registerParseStyleHtml=function(e){var t;t=e,C$.push(t)},e.registerModule=function(e){iTe(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function iTe(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,i=e.elemsToHtml,o=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,l=e.parseStyleHtml,u=e.editorPlugin;t&&t.forEach(function(e){return rTe.registerMenu(e)}),n&&n.forEach(function(e){return rTe.registerRenderElem(e)}),r&&rTe.registerRenderStyle(r),i&&i.forEach(function(e){return rTe.registerElemToHtml(e)}),o&&rTe.registerStyleToHtml(o),a&&a.forEach(function(e){return rTe.registerPreParseHtml(e)}),s&&s.forEach(function(e){return rTe.registerParseElemHtml(e)}),l&&rTe.registerParseStyleHtml(l),u&&rTe.registerPlugin(u)}S5.forEach(function(e){return iTe(e)}),iTe(Hne),iTe(yle),iTe(Mve),iTe(Oke),iTe(ZAe);var oTe='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',aTe={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize"]}},sTe={hoverbarKeys:nTe(nTe({},aTe),{text:{menuKeys:["headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};rTe.setEditorConfig(nTe(nTe({},sTe),{decorate:tTe}));var lTe={hoverbarKeys:aTe};rTe.setSimpleEditorConfig(nTe(nTe({},lTe),{decorate:tTe}));var uTe={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:XG("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:XG("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:XG("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:XG("editor.image"),iconSvg:oTe,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:XG("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]};rTe.setToolbarConfig(uTe);var cTe={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:XG("editor.image"),iconSvg:oTe,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};rTe.setSimpleToolbarConfig(cTe);var fTe=Object.defineProperty,dTe=Object.defineProperties,hTe=Object.getOwnPropertyDescriptors,pTe=Object.getOwnPropertySymbols,gTe=Object.prototype.hasOwnProperty,vTe=Object.prototype.propertyIsEnumerable,mTe=(e,t,n)=>t in e?fTe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yTe=(e,t)=>{for(var n in t||(t={}))gTe.call(t,n)&&mTe(e,n,t[n]);if(pTe)for(var n of pTe(t))vTe.call(t,n)&&mTe(e,n,t[n]);return e},bTe=(e,t)=>dTe(e,hTe(t));function wTe(e){let t=`请使用 '@${e}' 事件,不要放在 props 中`;return t+=`\nPlease use '@${e}' event instead of props`,t}var xTe=(e,t)=>{for(const[n,r]of t)e[n]=r;return e};const CTe=be({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(e,t){const n=we(null),r=xe(null),i=we("");return Ce(()=>{(()=>{if(!n.value)return;const o=Se(e.defaultContent);!function(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,i=void 0===r?[]:r,o=e.html,a=e.config,s=void 0===a?{}:a,l=e.mode,u="simple"===(void 0===l?"default":l)?rTe.simpleEditorConfig:rTe.editorConfig,c=nTe(nTe({},u.hoverbarKeys||{}),s.hoverbarKeys||{});YV({selector:n,config:nTe(nTe(nTe({},u),s),{hoverbarKeys:c}),content:i,html:o,plugins:rTe.plugins})}({selector:n.value,mode:e.mode,content:o||[],html:e.defaultHtml||e.modelValue||"",config:bTe(yTe({},e.defaultConfig),{onCreated(n){if(r.value=n,t.emit("onCreated",n),e.defaultConfig.onCreated){const e=wTe("onCreated");throw new Error(e)}},onChange(n){const r=n.getHtml();if(i.value=r,t.emit("update:modelValue",r),t.emit("onChange",n),e.defaultConfig.onChange){const e=wTe("onChange");throw new Error(e)}},onDestroyed(n){if(t.emit("onDestroyed",n),e.defaultConfig.onDestroyed){const e=wTe("onDestroyed");throw new Error(e)}},onMaxLength(n){if(t.emit("onMaxLength",n),e.defaultConfig.onMaxLength){const e=wTe("onMaxLength");throw new Error(e)}},onFocus(n){if(t.emit("onFocus",n),e.defaultConfig.onFocus){const e=wTe("onFocus");throw new Error(e)}},onBlur(n){if(t.emit("onBlur",n),e.defaultConfig.onBlur){const e=wTe("onBlur");throw new Error(e)}},customAlert(n,r){if(t.emit("customAlert",n,r),e.defaultConfig.customAlert){const e=wTe("customAlert");throw new Error(e)}},customPaste:(n,r)=>{if(e.defaultConfig.customPaste){const e=wTe("customPaste");throw new Error(e)}let i;return t.emit("customPaste",n,r,e=>{i=e}),i}})})})()}),Ee(()=>e.modelValue,e=>{e!==i.value&&function(e){const t=r.value;null!=t&&t.setHtml(e)}(e)}),{box:n}}}),ETe={ref:"box",style:{height:"100%"}};var kTe=xTe(CTe,[["render",function(e,t,n,r,i,o){return _e(),De("div",ETe,null,512)}]]);const STe=be({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const t=we(null);return ke(()=>{const{editor:n}=e;null!=n&&(n=>{if(t.value){if(null==n)throw new Error("Not found instance of Editor when create <Toolbar/> component");yz.getToolbar(n)||function(e){var t=e.selector,n=e.editor,r=e.config,i=void 0===r?{}:r,o=e.mode,a=void 0===o?"default":o;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?rTe.simpleToolbarConfig:rTe.toolbarConfig;!function(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,i=void 0===r?{}:r;if(tW(e,"data-w-e-toolbar",n))throw new Error("Repeated create toolbar by selector '"+n+"'");var o=Ej({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},i||{}),a=new eG(n,o);_H.set(a,e),DH.set(e,a)}(n,{selector:t,config:nTe(nTe({},s),i)})}({editor:n,selector:t.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}})(n)}),{selector:t}}}),_Te={ref:"selector"};var DTe=xTe(STe,[["render",function(e,t,n,r,i,o){return _e(),De("div",_Te,null,512)}]]);export{zo as A,Fo as B,Oo as C,go as D,mo as E,ma as F,yo as G,Ul as H,ji as I,DTe as J,kTe as K,xh as P,ko as T,jo as a,To as b,Lo as c,Ao as d,sa as e,Qi as f,wo as g,hr as h,Fe as i,bo as j,Zi as k,No as l,Hi as m,co as n,to as o,Ro as p,ao as q,Po as r,Ho as s,Io as t,Eo as u,Co as v,Uo as w,pa as x,Bo as y,Mo as z};