/*! For license information please see 30846.bedd397f.js.LICENSE.txt */ !function(e,t){"object"==typeof module&&"object"==typeof module.exports?t():"function"==typeof define&&define.amd?define([],t):(e="undefined"!=typeof globalThis?globalThis:e||self)&&t()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).xss={})}(this,function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n/g,a=/&#([a-zA-Z0-9]*);?/gim,s=/"/g,u=/:?/gim,c=/&newline;?/gim,l=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,f=/u\s*r\s*l\s*\(.*/gi,d=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,p=/"/g,h=function(e){return e.replace(i,"<").replace(o,">")},v={indexOf:function(e,t){var n,r;for(n=0,r=e.length;n127&&r<2048?t+=String.fromCharCode(r>>6|192)+String.fromCharCode(63&r|128):t+=String.fromCharCode(r>>12|224)+String.fromCharCode(r>>6&63|128)+String.fromCharCode(63&r|128)}return t}(e);l>2,o=(3&t)<<4|(n=e.charCodeAt(l++))>>4,a=(15&n)<<2|(r=e.charCodeAt(l++))>>6,s=63&r,isNaN(n)?a=s=64:isNaN(r)&&(s=64),c=c+u.charAt(i)+u.charAt(o)+u.charAt(a)+u.charAt(s);return c}function b(e){var t,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");c>4,n=(15&i)<<4|(o=s.indexOf(e.charAt(c++)))>>2,r=(3&o)<<6|(a=s.indexOf(e.charAt(c++))),u+=String.fromCharCode(t),64!==o&&(u+=String.fromCharCode(n)),64!==a&&(u+=String.fromCharCode(r));return function(e){for(var t="",n=0,r=0,i=0,o=0;n191&&r<224?(t+=String.fromCharCode((31&r)<<6|63&(o=e.charCodeAt(n+1))),n+=2):(o=e.charCodeAt(n+1),t+=String.fromCharCode((15&r)<<12|(63&o)<<6|63&(i=e.charCodeAt(n+2))),n+=3);return t}(u)}function E(e,t,n){var r="",i=0,o=!1,a=!1,s=0,u=e.length,c="",l="";e:for(s=0;s"===f||s===u-1){r+=n(e.slice(i,o)),c=function(e){var t,n=v.spaceIndex(e);return t=-1===n?e.slice(1,-1):e.slice(1,n+1),"/"===(t=v.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}(l=e.slice(o,s+1)),r+=t(o,r.length,c,l,"0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}return -1}(e,c-1))){u(a,m(v.trim(e.slice(n,c)))),a=!1,n=c+1;continue}}}else{if(-1===(f=e.indexOf(l,c+1)))break;u(a,v.trim(e.slice(i+1,f))),a=!1,n=(c=f)+1}}else a=e.slice(n,c),n=c+1,i='"'===e.charAt(n)||"'"===e.charAt(n)?n:function(e,t){for(;te.charCodeAt(n)?" ":e.charAt(n);return v.trim(t)}(e=(e=(e=e.replace(s,'"')).replace(a,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})).replace(u,":").replace(c," "))}(n),"href"===t||"src"===t){if("#"===(n=v.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(l.lastIndex=0,l.test(n))return""}else if("style"===t&&(d.lastIndex=0,d.test(n)||(f.lastIndex=0,f.test(n)&&(l.lastIndex=0,l.test(n)))))return"";return n=function(e){return e=h(e=e.replace(p,"""))}(n)}var w=function(e){return"string"==typeof e?e.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},C=function(){function e(e){var t=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{});t.stripIgnoreTag&&(t.onIgnoreTag,t.onIgnoreTag=function(){return""}),t.whiteList={},t.onTag=function(){},t.onTagAttr=function(){},t.onIgnoreTag=function(){},t.onIgnoreTagAttr=function(){},t.safeAttrValue=_,t.escapeHtml=h,this.options=Object.assign(t,e)}return e.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t,n,r,i,o,a,s=this.options,u=s.whiteList,c=s.onTag,l=s.onIgnoreTag,f=s.onTagAttr,d=s.onIgnoreTagAttr,p=s.safeAttrValue,h=s.escapeHtml;s.stripBlankChar&&(e=(t=(t=e.split("")).filter(function(e){var t=e.charCodeAt(0);return!(127===t||t<=31&&10!==t&&13!==t)})).join("")),s.allowCommentTag||(e=function(e){for(var t="",n=0;n");var s=function(e){var t=v.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=v.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=v.trim(e.slice(0,-1))),{html:e,closing:n}}(r),g=u[n],m=x(s.html,function(e,t){var r=-1!==v.indexOf(g,e),i=f(n,e,t,r);return null==i?r?(t=p(n,e,t,null))?"".concat(e,'="').concat(t,'"'):e:null==(i=d(n,e,t,r))?void 0:i:i});return r="<".concat(n),m&&(r+=" ".concat(m)),s.closing&&(r+=" /"),r+=">"}return null==(a=l(n,r,o))?h(r):a},h);return g&&(m=g.remove(m)),m},e}(),S=Function("\nvar _checkXSS = function (it) {\n return it && it.Math == Math && it;\n};\nreturn _checkXSS(typeof globalThis === 'object' && globalThis) ||\n_checkXSS(typeof window === 'object' && window) ||\n_checkXSS(typeof self === 'object' && self) ||\n_checkXSS(typeof global === 'object' && global) ||\nFunction('return this')();\n")(),T=new(function(){function e(){var e=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var t,n,r="douyin_web";if(!v.includes(r,"bid"))return r;if(e.config&&e.config.bid)return e.config.bid;if(S&&S._xssBid)return S._xssBid;if(S&&S.slardar&&"function"==typeof S.slardar.config){var i=(S.slardar.config()||{}).bid;if(i)return i}if(S&&S.Slardar&&"function"==typeof S.Slardar.config){var o=(S.Slardar.config()||{}).bid;if(o)return o}return(null===(n=null===(t=null==S?void 0:S.Slardar)||void 0===t?void 0:t._baseParams)||void 0===n?void 0:n.bid)||"argus"},this.getConfigRegion=function(){var t;return v.includes("cn","region")?e.config&&e.config.region?e.config.region:((null===(t=null==S?void 0:S.gfdatav1)||void 0===t?void 0:t.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var t={cn:b("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:b("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:b("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:b("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[e.getConfigRegion()];if(t)return t+e.getSlardarBid()}}return e.prototype.setConfig=function(e){this.config=e},e.prototype.upload=function(){var e=this,t=this.gerReportUrl();!this.lock&&t&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var n=e.batchData.slice(0,100);e.batchData=e.batchData.slice(100),S.fetch(t,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).catch(function(e){}),e.lock=!1,e.upload()},this.timeout))},e.prototype.generateKey=function(e){return e.collectKey?[e.collectMode,e.collectKey].join("___"):""},e.prototype.push=function(e){this.batchData.push(e),this.upload()},e.prototype.report=function(e){var t=this.generateKey(e);if(S.fetch&&e.collectKey){var n="object"==typeof window?window.location.href:"SSR";e.documentUrl=n;var r={age:Math.floor(Date.now()),type:"xss",url:n,body:e,"user-agent":""};"enforce"===e.disposition&&"SSR"!==n||(r.url=t),"SSR"===n&&(r.url="SSR___".concat(r.url),r.body.ssr=!0),this.push(r)}},e}()),O=function(e){for(var t=0,n=function(n){Array.isArray(e[n])?0===e[n].length?delete e[n]:(e[n]=v.from(v.uniq(e[n])),t+=e[n].length):0===v.keys(e[n]).length?delete e[n]:v.keys(e[n]).forEach(function(r){e[n][r]=v.from(v.uniq(e[n][r])),t+=e[n][r].length})},r=0,i=v.keys(e);r0)return t&&t("javascript:"),!1;if(/^javascript:/i.test(e)){var i=e.slice(11).replace(/\s/g,"").trim();return!!v.some(["void","void(0)","void0","false","undefined",";"],function(e){return e===i})||(t&&t("javascript:"),!1)}return!0}var N=function(e,t){var n,r,i="<%= isSaveValidUrl =>";if("string"!=typeof e||(r=Number("<%= urlLimit =>"),void 0!==n&&(r=n),"NaN"!==e.toString()&&-1!==r&&e.length>=r)||I(e,t))return e;try{if(!0===(i=JSON.parse(i))||"true"===i){var o=new URL(e);return o.origin+o.pathname}}catch(e){}return"#"};function R(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=[]),"string"!=typeof e)return!0;if(!I(e=A(e)))return!1;var i,o={url:(i=e.match(/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/)||[])[0],scheme:i[1],slash:i[2],host:i[3],port:i[4],path:i[5],query:i[6],hash:i[7]},a=o.scheme,s=o.host;return r?!!r(e):!(!a||!s)&&(!v.includes(["http","https","file"],a)||("object"==typeof window&&window&&(t=n(n([],t,!0),[location.host],!1)),v.some(t,function(e){return!!(e instanceof RegExp&&e.test(s))||e===s})))}var L={a:["target","title","spellcheck","rel"],canvas:[],abbr:["title"],address:[],area:["shape","coords","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:["dir"],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["alt","title","width","height","decoding"],ins:["datetime"],li:[],mark:[],nav:[],ol:["start"],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],delete:[],form:[],strong:[],mask:["maskunits","x","y","width","height","fill"],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],wbr:[],video:["autoplay","controls","loop","preload","height","width"],svg:["viewBox","version","xmlns","fill","width","height","stroke","stroke-width","style"],path:["d","fill","opacity","stroke","p-id","fill-rule","clip-rule","stroke-width","stroke-linecap","stroke-linejoin","fill-opacity","mask"],rect:["x","y","width","height","fill","stroke","rx"],g:[]},j={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var e=O(this.collect),t=e.count,n=e.ret;return this.collect=null,{collectKey:0===t?null:JSON.stringify(n),collectMode:"white"}},onIgnoreTagAttr:function(e,t,r){return e&&v.indexOf(["href","src"],t)>-1?j.domainWhiteList&&Array.isArray(j.domainWhiteList)&&j.domainWhiteList.length>0&&!R(r,n([],j.domainWhiteList,!0))?"":"".concat(t,'="').concat(N(r,function(e){var t;null===(t=j.collect)||void 0===t||t.filterProtocol.push(e)}),'"'):e&&(v.indexOf(["style","class","id"],t)>-1||t.indexOf("data-")>-1)?"".concat(t,'="').concat(r,'"'):(j.collect.whiteList[e]=j.collect.whiteList[e]||[],void j.collect.whiteList[e].push(t))},onIgnoreTag:function(e,t){if("style"===e)return t;E(t,function(e,t,n,r){x(P(r).html.replace("/",""),function(e){j.collect.whiteList[n]=j.collect.whiteList[n]||[],j.collect.whiteList[n].push(e)})},h)},whiteList:L,mergeWhiteList:function(e){for(var t,n={},r=0,i=v.keys(L);r");var o=P(r),a=x(o.html,function(e,t){var r,i=0;if(U.blackList[n]&&v.includes(U.blackList[n],e)&&(H.collect.blackList[n]=H.collect.blackList[n]||[],H.collect.blackList[n].push(e),i++),U.blackAttrRegExps.length&&U.blackAttrRegExps.some(function(t){return t.test(e)})&&v.forEach(U.blackAttrRegExps,function(t){t.test(e)&&(H.collect.blackAttrRegExps.push("".concat(t.toString(),"->").concat(e)),i++)}),U.blackAttrs.length&&v.includes(U.blackAttrs,e)&&(U.blackAttrs.push(e),i++),!i){if(U.filterList&&U.filterList[n]&&v.includes(U.filterList[n],e)){var o=N(t,function(e){var t;null===(t=H.collect)||void 0===t||t.filterProtocol.push(e)});return o!==t&&(H.collect.filterList[n]=H.collect.filterList[n]||[],H.collect.filterList[n].push(e)),t?"".concat(e,"='").concat(o,"'"):e}return U.filterAttrs&&v.includes(U.filterAttrs,e)?((o=N(t,function(e){var t;null===(t=H.collect)||void 0===t||t.filterProtocol.push(e)}))!==t&&(null===(r=H.collect)||void 0===r||r.filterAttrs.push(e)),t?"".concat(e,"='").concat(o,"'"):e):t?"".concat(e,"='").concat(t,"'"):e}});return r="<".concat(n),a&&(r+=" ".concat(a)),o.closing&&(r+=" /"),r+=">"},h);null===(n=H.collect)||void 0===n||n.blackTags.push(e)}},Z=function(e){var t=e.reportOnly,n=void 0===t||t,r=e.block;return n&&"all"===n?"report":("string"==typeof n&&("true"===n&&(n=!0),"false"===n&&(n=!1)),r?"enforce":n?"report":"enforce")},G=function(e){return function(n,r,i){if(!n||"string"!=typeof n)return n;var o=r;e===k&&(o=j).initCollect();var a=e(n,o);if(w(a)===w(n))return n;if(!i)return a;var s=i.logType,u=Z(i),c=o.removeCollect();return T.report(t(t({type:s,disposition:u},c),{sourceText:y(n),filterText:y(a)})),"enforce"===u?a:n}},W=G(function(e,t){return void 0===t&&(t={}),t&&t.whiteList||(t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}),new C(t).process(e)}),X=G(k),K=function(e,t,n){var r=[],i=N(e,function(e){r.push(e)});if(i===e)return e;r=v.from(v.uniq(r));var o=t||n||{};if(!o)return i;var a=o.logType,s=Z(n);return T.report({type:a,disposition:s,collectKey:r.join("___"),collectData:JSON.stringify(r),collectMode:"black",sourceText:y(e),filterText:y(i)}),"enforce"===s?i:e},q=S._xssProject||{},z=S.xssNamespace||{},V="3.0.26",J={FilterXSS:C,version:V,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:W,_filterXSS:X,filterUrl:K,Config:j,BlackConfig:H,project:q,setProjectName:function(e){q[e]=this,S._xssProjectName=e}};z.douyin_web=J,S.xssNamespace=z,S.Math&&!S.Math.xssNamespace&&(S.Math.xssNamespace=z),q[V]=J,S.globalThis=S,S.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:J},S.xss=J,S.isSafeUrl=R,S.isSafeDomain=R,S.isSafeProtocol=I,S._xssProject=q,S._xssProjectName&&(q[S._xssProjectName]=J);var Y=J.setProjectName.bind(J);e.BlackConfig=H,e.Config=j,e.FilterXSS=C,e._filterXSS=X,e.filterUrl=K,e.filterXSS=W,e.isSafeDomain=R,e.isSafeProtocol=I,e.isSafeUrl=R,e.project=q,e.setProjectName=Y,e.setXssNamespace=function(e){var t=e.appId,n=e.bid,r=e.region;z[t]=J;j.bid=n,j.region=r,j.enabled=!0},e.xssNamespace=z,Object.defineProperty(e,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["30846"],{459076:function(e,t,n){"use strict";n.r(t),n.d(t,{BATCH_REPORT_PATH:function(){return tU},DEFAULT_IGNORE_PATHS:function(){return tZ},DEFAULT_SAMPLE_CONFIG:function(){return tX},DEFAULT_SAMPLE_GRANULARITY:function(){return tG},DEFAULT_SENDER_SIZE:function(){return tK},DEVICE_ID_COOKIE_NAME:function(){return tH},EV_METHOD_MAP:function(){return ng},EXTRA_INDEPENDENT_PLUGINS:function(){return tW},InjectConfigPlugin:function(){return nO},InjectEnvPlugin:function(){return nv},InjectQueryPlugin:function(){return nk},ObserveErrorPlugin:function(){return nC},PLUGINS_LOAD_PREFIX:function(){return tj},PluginMap:function(){return nI},PrecollectPlugin:function(){return n_},REPORT_DOMAIN:function(){return tR},SDK_NAME:function(){return tD},SDK_VERSION:function(){return tM},SETTINGS_DOMAIN:function(){return tL},SETTINGS_PATH:function(){return t$},STORAGE_PREFIX:function(){return tF},TimeCalibrationPlugin:function(){return nS},USER_ID_COOKIE_NAME:function(){return tB},addConfigToReportEvent:function(){return nT},addEnvToSendEvent:function(){return nh},applyPlugin:function(){return tQ},browserBuilder:function(){return np},buildSelfErrorEvent:function(){return nw},configHolder:function(){return nc},createBrowserClient:function(){return nN},createBrowserConfigManager:function(){return nl},createMinimalBrowserClient:function(){return nA},createStore:function(){return nm},default:function(){return nL},doesPluginExistInRegistry:function(){return t1},filterIfPluginDisabled:function(){return nx},getConsumeStored:function(){return nE},getDefaultConfig:function(){return nP},getDefaultSessionId:function(){return ne},getDefaultUserIdAndDeviceId:function(){return na},getGlobalInstance:function(){return nr},getGlobalName:function(){return nn},getPluginFromRegistry:function(){return t0},getReportUrl:function(){return t7},getServerConfig:function(){return nf},getSettingsUrl:function(){return t8},getStorageKey:function(){return ni},getStoreOrConsume:function(){return nb},glueCodeForStorageSecurity:function(){return no},hasSetStorageItem:function(){return ns},loadCombinedPlugins:function(){return tz},loadIndependentPlugins:function(){return tV},loadNow:function(){return tY},loadPlugins:function(){return tJ},loadPluginsOnPageLoad:function(){return tq},mergeSampleConfig:function(){return nd},normalizeInitConfig:function(){return t6},normalizeStrictFields:function(){return t3},normalizeUserConfig:function(){return t9},parseServerConfig:function(){return t5},register:function(){return t2},reverseMap:function(){return ny},setStorageUserIdAndDeviceId:function(){return nu},toObservableArray:function(){return nt},validateInitConfig:function(){return t4}});var r,i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(e,t,n){if(n||2==arguments.length)for(var r,i=0,o=t.length;i=0){var r=e.slice();return r.splice(n,1),r}return e},x=function(e,t,n){for(var r,i=o(t.split(".")),a=i[0],s=i.slice(1);e&&s.length>0;)e=e[a],a=(r=o(s))[0],s=r.slice(1);if(!!e)return n(e,a)},_=function(e,t){var n,r=h(n=e||[])?n.length?function(e){for(var t=[],n=e.length,r=0;r>>((3&n)<<3)&255;return e}();return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(e){for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);var r=0;return[t[e[r++]],t[e[r++]],t[e[r++]],t[e[r++]],"-",t[e[r++]],t[e[r++]],"-",t[e[r++]],t[e[r++]],"-",t[e[r++]],t[e[r++]],"-",t[e[r++]],t[e[r++]],t[e[r++]],t[e[r++]],t[e[r++]],t[e[r++]]].join("")}(e)}var N=function(e,t,n){var r=0;return -1===n?c:function(){if(e()){r&&clearTimeout(r),r=0;return}0===r&&(r=setTimeout(t,n))}},R=function(e,t){var n=[];try{n=t.reduce(function(t,n){try{var r=n(e);"function"==typeof r&&t.push(r)}catch(e){}return t},[])}catch(e){}return function(e){return R(e,n)}},L=function(e){void 0===e&&(e=3e5);var t,n=[],r=[],i=!1,o=N(function(){return!!n.length},function(){i=!0,t&&t[0](),r.forEach(function(e){return e()}),r.length=0,t=void 0},e),a=function(e){n=E(n,e),i||o()};return{next:function(e){return R(e,n)},complete:function(e){r.push(e)},attach:function(e,n){t=[e,n]},subscribe:function(e){if(i)throw Error("Observer is closed");return n.push(e),t&&t[1]&&t[1](e),o(),function(){return a(e)}},unsubscribe:a}},j=function(e,t,n){var r=L(n);try{e(r.next,r.attach),t&&r.complete(t)}catch(e){}return[r.subscribe,r.unsubscribe]},M=function(e,t){var n=o(e,1)[0];return function(e,r){var i=n(function(n){var r;return(r=t,function(e){for(var t=!0,n=0;nt.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}(i,["expires"]);return o>=H()?a:void 0}catch(e){return}},el=function(e,t,n){if(!(n<=0))try{var r;localStorage.setItem(e,(r=JSON.stringify(i(i({},t),{expires:H()+n})),eu()?btoa(encodeURI(r)):r))}catch(e){}},ef=function(e){return!1===e?0:!0!==e&&void 0!==e&&g(e)?e:7776e6},ed=function(e){if("object"==typeof window&&!!window.__perfsee__){var t,n={};return null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,n,e),n.stack}},ep=function(){var e=RegExp("\\/monitor_web\\/collect|\\/monitor_browser\\/collect\\/batch","i");return function(t){return e.test(t)}},eh=function(e){return function(){for(var t,n=[],r=0;r=400)&&(l.request.body=c?""+c:void 0,l.response.body=e.response?""+e.response:void 0)}catch(e){}return l},eF="ajax",eB={autoWrap:!0,setContextAtReq:function(){return l},ignoreUrls:[],collectBodyOnError:!1},eH=function(e,t,n){var r=o(t,2),i=r[0],a=r[1],s=n.setTraceHeader,u=n.ignoreUrls,l=n.setContextAtReq,f=n.extractUrl,d=window.Headers,p=window.Request;p&&d&&e.push(i[0](function(e){var t=o(e,2),r=t[0],i=t[1],h=X(r instanceof p?r.url:r);if(!eZ(h)||_(u,h))return c;s&&s(h,function(e,t){return eW(e,t,r,i,p,d)});var v=l(),g=H(),m=void 0,y=a()[0](function(e){h!==e.name||m||(m=e)});return function(e){var t=ez(r,i,e,p,d,n,g),o=eM(function(e){m&&(e.response.timing=m),eD(e,f),v&&v({ev_type:eO,payload:e}),y()});setTimeout(function(){o(t)},1e3)}}))},eZ=function(e){if(!m(e))return!1;var t=o(e.split(":"),2),n=t[0];return!t[1]||"http"===n||"https"===n},eG=function(e,t){return e instanceof t},eW=function(e,t,n,r,o,a){var s;eG(n,o)?n.headers.set(e,t):r.headers instanceof a?r.headers.set(e,t):r.headers=i(i({},r.headers),((s={})[e]=t,s))},eX=function(e,t,n){var r=t&&t.method||"get";return eG(e,n)&&(r=e.method||r),r.toLowerCase()},eK=function(e){for(var t=[],n=1;n=400&&f()}catch(e){}else f();return s},eV="fetch",eJ={autoWrap:!0,setContextAtReq:function(){return l},ignoreUrls:[],collectBodyOnError:!1},eY=["name","message","stack","filename","lineno","colno"],eQ=function(e){var t,n,r,i;if(!function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return!0;default:return e instanceof Error}}(e)){;if(p(e)||(n=e,"undefined"!=typeof Event&&function(e,t){try{return e instanceof t}catch(e){return!1}}(n,Event))||m(e))t={message:w(e)}}else{;r=e,i=eY,t=r&&f(r)?i.reduce(function(e,t){return e[t]=r[t],e},{}):r}return t},e0=function(e){var t=eQ(e.error);if(!t)return t;var n=e.colno,r=e.lineno,i=e.filename;return n&&!t.colno&&(t.colno=String(n)),r&&!t.lineno&&(t.lineno=String(r)),i&&!t.filename&&(t.filename=i),t},e1=function(e){var t;try{var n=void 0;if("reason"in e?n=e.reason:"detail"in e&&"reason"in e.detail&&(n=e.detail.reason),n){var r=eQ(n);return i(i({},r),{name:null!==(t=r&&r.name)&&void 0!==t?t:"UnhandledRejection"})}}catch(e){}},e2=function(e){var t,n;if(t=e,"[object ErrorEvent]"===Object.prototype.toString.call(t))return e0(e);if(n=e,"[object PromiseRejectionEvent]"===Object.prototype.toString.call(n))return e1(e);else return eQ(e)},e3="jsError",e6=function(e){return"hidden"===e.visibilityState},e4=["hidden_3",function(e,t){var n=G(),r=Z();if(n&&r){var i=function(t){e("pagehide"===t.type||e6(n))},o=en(n,"visibilitychange",i,!0),a=et(r,"pagehide",i,!0);t(function(){o(),a()},function(e){e(e6(n))})}}],e9=["unload_0",function(e,t){var n=Z();if(n){var r=o(er(e),1)[0],i=function(){r()},a=[];["unload","beforeunload","pagehide"].forEach(function(e){a.push(et(n,e,i,!1))}),t(function(){a.forEach(function(e){return e()})})}}],e5=["hash_0",function(e,t){var n=Z();if(n){var r=et(n,"hashchange",function(){return e(location.href)},!0);t(function(){r()})}}],e7=["history_0",function(e,t){var n=Z()&&window.history,r=Z();if(n&&r){var i=[],o=function(){return e(location.href)},a=function(e){return function(){for(var t=[],r=0;rt.frustrating_threshold?2:r>t.satisfying_threshold||0===n?0:1},tc=function(){var e=0,t=void 0;return[function(n){n?!!t&&(e+=H()-t,t=void 0):t=H()},function(){t&&(e+=H()-t);var n=e;return e=0,t=H(),n}]},tl=function(e,t){return function(n,r){var i=n.payload;switch(n.ev_type){case"performance":var o=i.name;i.isSupport&&e(r[ta],o,i.value);break;case eP:e(r[ta],"action",i.duration||0);break;case eT:t(r[ti],0);break;case eO:if(i.response.is_custom_error||i.response.status>=400)t(r[ti],1);else{var a=i.response.timing;a&&e(r[to],0,a.duration)}break;case"resource_error":t(r[ti],2);break;case"blank_screen":t(r[ti],3);break;case"resource":e(r[to],1,i.duration);break;case"performance_longtask":i.longtasks.forEach(function(t){e(r[to],2,t.duration)})}}},tf=function(){var e,t,n=function(){e=[0,0,0],t=ts()};return n(),[function(n,r,i){var o=n&&n[r];if(o&&!(i<=0)){var a=i<(o[0].threshold||0)?0:i>(o[1].threshold||0)?2:1;if(e[a]+=o[a].weight,"string"==typeof r){var s=te(r,a),u=t[ta][s];t[ta][s]=(u||0)+1}else 2===a&&(t.duration_count[r]+=1)}},function(n,r){n&&(e[2]+=n[r],t.error_count[r]+=1)},function(){return[e,t]},n]},td=function(){var e={start:H(),end:0,time_spent:0,is_bounced:!1,entry:"",exit:"",p_count:0,a_count:0};return[function(t,n){var r=o(t,3),i=r[0],a=r[1],s=r[2];e.end=H(),e.time_spent+=n&&n.time_spent||0,e.last_page=n,e.p_count+=1,e.rank=i,e.apdex=a,e.apdex_detail=s;var u=G();u&&(e.is_bounced="complete"!==u.readyState)},function(t,n){e.time_spent+=t.time_spent,e.p_count+=1,e.exit=n},function(){e.a_count+=1},function(t){e.entry=t,e.exit=t},function(){return e}]},tp=function(e,t,n,r){var i,a,s,u,c=r.sendInit,l=r.initPid,f=r.routeMode,d=r.extractPid,p=r.onPidUpdate;var h=tr(f)?function(){return""}:(i=f,function(e){var t;return"hash"===i?(null===(t=K(e).hash)||void 0===t?void 0:t.replace(/^#/,""))||"/":K(e).path}),v=d||function(){};var g=o(tt((a=e,function(e,t){a({ev_type:eC,payload:{pid:t,source:e}})}),l||(null!==(u=v(s=location.href))&&void 0!==u?u:h(s)),h(location.href),p),2),m=g[0],y=g[1];if(!tr(f)){var b=o(tn(function(e,t){return m(e,h(t),v(t))},""),1)[0];n.length&&n.forEach(function(e){return t.push(e[0](function(e){return b(f,e)}))})}return c&&y(),[m.bind(null,"user_set")]},th=function(e,t,n,r){var i=o(n,2),a=i[0],s=i[1],u=2===r.apdex,c=void 0,l=void 0,f=void 0,d=!1,p=o(tf(),4),h=p[0],v=p[1],g=p[2],m=p[3],y=o(tf(),4),b=y[0],E=y[1],x=y[2],_=y[3],w=o(td(),5),C=w[0],S=w[1],T=w[2],O=w[3],k=w[4],P=o(tc(),2),A=P[0],I=P[1];t.push(a[0](A)),u||t.push(s[0](function(){if(d){var t=o(x(),2),n=t[0],r=t[1];C([tu(n,f),n,r],L()),e({ev_type:eS,payload:k()}),_()}}));var N=tl(h,v),R=tl(b,E),L=function(){var e=o(g(),2),t=e[0],n=e[1];return{start:c[0],pid:c[1],view_id:c[2],end:H(),time_spent:I(),apdex:t,rank:tu(t,f),detail:n}};return t.push(function(){d=!1}),[function(e,t){if(!c){c=[H(),e,t],O(e),d=!!(f&&c);return}d&&S(l=L(),e),c=[H(),e,t],m()},function(e){if(!!d)!u&&(R(e,f),e.ev_type===eP&&T()),e.common.pid===c[1]&&N(e,f)},function(t){d&&(t.payload.last=l),e(t)},function(e){if(!e){t.forEach(function(e){return e()}),t.length=0;return}d=!!((f=e)&&c)}]},tv="pageview",tg={sendInit:!0,routeMode:"history",apdex:2},tm=function(e){if(!!e&&!!f(e)&&!!e.name&&!!m(e.name)){var t={name:e.name,type:"event"};if("metrics"in e&&f(e.metrics)){var n=e.metrics,r={};for(var i in n)g(n[i])&&(r[i]=n[i]);t.metrics=r}if("categories"in e&&f(e.categories)){var o=e.categories,a={};for(var i in o)a[i]=w(o[i]);t.categories=a}return"attached_log"in e&&m(e.attached_log)&&(t.attached_log=e.attached_log),t}},ty=function(e){if(!!e&&!!f(e)&&!!e.content&&!!m(e.content)){var t={content:w(e.content),type:"log",level:"info"};if("level"in e&&(t.level=e.level),"extra"in e&&f(e.extra)){var n=e.extra,r={},i={};for(var o in n)g(n[o])?r[o]=n[o]:i[o]=w(n[o]);t.metrics=r,t.categories=i}return"attached_log"in e&&m(e.attached_log)&&(t.attached_log=e.attached_log),t}},tb=function(e){var t=function(n){var r=tm(n);if(r){var i=ed(t);i&&(r.stacks=i),e.report({ev_type:ek,payload:r,extra:{timestamp:H()}})}};e.provide("sendEvent",t),e.provide("sendLog",function(t){var n=ty(t);n&&e.report({ev_type:ek,payload:n,extra:{timestamp:H()}})})};function tE(e){return(null==e?void 0:e.effectiveType)||(null==e?void 0:e.type)||""}var tx=function(e){var t=function(){var e=function(){if(Z()&&"navigator"in window)return window.navigator}();if(e)return e.connection||e.mozConnection||e.webkitConnection}(),n=tE(t);t&&(t.onchange=function(){n=tE(t)}),e.on("report",function(e){return i(i({},e),{extra:i(i({},e.extra||{}),{network_type:n})})})},t_=function(e,t){var n=e.common||{};return n.sample_rate=t,e.common=n,e},tw=function(e,t,n,r,i){var o;return e?(o=i(r,t),function(){return o}):function(){return n(t)}},tC=function(e,t,n){switch(n){case"eq":return b(t,e);case"neq":return!b(t,e);case"gt":return e>t[0];case"gte":return e>=t[0];case"lt":return e=400)u(Error(this.responseText||this.statusText));else if(this.responseText){var e=JSON.parse(this.responseText);a(e)}else a({})}catch(e){u(e)}},p.onerror=function(){u(Error("Network request failed"))},p.onabort=function(){u(Error("Network request aborted"))},p.send(i)},tN=function(){var e=function(){if("function"==typeof XMLHttpRequest&&v(XMLHttpRequest))return XMLHttpRequest}();return e?{useBeacon:!0,get:function(t){tI("GET",t,e)},post:function(t){tI("POST",t,e)}}:{get:c,post:c}},tR="mon.zijieapi.com",tL=tR,tj="https://lf3-short.ibytedapm.com/slardar/fe/sdk-web/plugins",tM="1.14.4",tD="SDK_SLARDAR_WEB",t$="/monitor_web/settings/browser-settings",tU="/monitor_browser/collect/batch/",tF="SLARDAR",tB="MONITOR_WEB_ID",tH="MONITOR_DEVICE_ID",tZ=["/log/sentry/",tU,t$],tG="session",tW=["blankScreen","action"],tX={sample_rate:1,include_users:[],sample_granularity:tG,rules:{}},tK=20;function tq(e,t,n){void 0===n&&(n=tJ),!function(e){var t=Z(),n=G();if(t&&n){if("complete"===n.readyState){e();return}et(t,"load",function(){setTimeout(function(){e()},0)},!1)}}(function(){e.on("init",function(){n(e,t)})})}var tz=function(e,t,n,r){void 0===r&&(r=tY);var i=t.config(),o=i.plugins,a=i.pluginBundle,s=e.filter(function(e){return o[e]&&!t.destroyAgent.has(e)}),u=function(){return s.forEach(function(e){return tQ(t,e,n)})};s.every(function(e){return t1(e,n)})?u():r(t,{name:a.name},u)},tV=function(e,t,n,r){void 0===r&&(r=tY);var i=t.config().plugins;e.filter(function(e){return i[e]&&!t.destroyAgent.has(e)}).forEach(function(e){t1(e,n)?tQ(t,e,n):r(t,{name:e,config:i[e]},function(){return tQ(t,e,n)})})};function tJ(e,t,n){void 0===n&&(n=tY);var r,o=e.config().pluginBundle;tz(o?o.plugins:[],e,t,n),tV(tW,e,t,n),e.provide("reloadPlugin",(r=e,function(e,t){var n,o=r.config().pluginBundle;r.destroyAgent.has(e)&&r.destroyAgent.remove(e),void 0!==t&&r.set({plugins:i(i({},r.config().plugins),((n={})[e]=t,n))}),o&&~o.plugins.indexOf(e)?tz([e],r):tV([e],r)}))}function tY(e,t,n,r){var i=t.name,o=t.config;void 0===r&&(r=ea),r(function(e,t,n){var r;return null!==(r=null==n?void 0:n.path)&&void 0!==r?r:e.config().pluginPathPrefix+"/"+t.replace(/([a-z])([A-Z])/g,function(e,t,n){return t+"-"+n.toLowerCase()})+"."+tM+".js"}(e,i,o),function(){n()})}function tQ(e,t,n){if(void 0===n&&(n=J(Z())),n){var r=t0(n,t);if(!r){O("[loader].applyPlugin not found",t);return}try{if(e.destroyAgent.has(t))return;r.apply(e)}catch(e){Y(e),O("[loader].applyPlugin failed",t,e)}}}function t0(e,t){return e.plugins.filter(function(e){return e.name===t&&e.version===tM})[0]}function t1(e,t){return void 0===t&&(t=J(Z())),!!t&&!!t.plugins&&(!!t0(t,e)||!1)}function t2(e,t,n){if(void 0===n&&(n=J(Z())),n&&n.plugins){if(!t0(n,e))n.plugins.push({name:e,version:tM,apply:t})}}function t3(e){var t,n;try{for(var r=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 TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(["userId","deviceId","sessionId","env"]),i=r.next();!i.done;i=r.next()){var o=i.value;!e[o]&&delete e[o]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e}function t6(e){var t=e.plugins||{};for(var n in t)t[n]&&!f(t[n])&&(t[n]={});return t3(i(i({},e),{plugins:t}))}function t4(e){return f(e)&&"bid"in e}function t9(e){return t3(i({},e))}function t5(e){if(!e)return{};var t,n=e.sample,r=e.plugins,i=e.timestamp,o=e.quota_rate,a=e.apdex;if(!n)return{};var s=n.sample_rate,u=n.sample_granularity,c=n.include_users,l=n.rules;return{sample:{include_users:c,sample_rate:s*(void 0===o?1:o),sample_granularity:void 0===u?tG:u,rules:(void 0===l?[]:l).reduce(function(e,t){var n=t.name,r=t.enable,i=t.sample_rate,o=t.conditional_sample_rules;return e[n]={enable:r,sample_rate:i,conditional_sample_rules:o},e},{})},plugins:{heatmap:null!==(t=null==r?void 0:r.heatmap)&&void 0!==t&&t},apdex:a,serverTimestamp:i}}var t7=function(e,t){return void 0===t&&(t=tU),(e&&e.indexOf("//")>=0?"":"https://")+e+t},t8=function(e,t){return void 0===t&&(t=t$),(e&&e.indexOf("//")>=0?"":"https://")+e+t},ne=function(){return I()},nt=function(e){var t=[];return e.observe=function(e){t.push(e)},e.push=function(){for(var n,r=[],i=0;i([\\d\\D]*?)<\\/script>[\\d\\D]*","i");o=s.replace(u,"$1").trim()}for(;e=Number(o))&&!n){n=!0;var a=new Date().getTime();if(a-t<700&&o){var s=o-(a+t)/2;!isNaN(s)&&(s>0||s<-6e5)&&e.on("beforeBuild",function(e){var t;return i(i({},e),{extra:i(i({},null!==(t=e.extra)&&void 0!==t?t:{}),{sdk_offset:null!=s?s:0})})})}}})})},nT=function(e,t){var n={};return n.bid=t.bid,n.user_id=t.userId,n.device_id=t.deviceId,n.session_id=t.sessionId,n.release=t.release,n.env=t.env,i(i({},e),{extra:i(i({},n),e.extra||{})})},nO=function(e){e.on("beforeBuild",function(t){return nT(t,e.config())})},nk=function(e){e.on("start",function(){var t=e.config().bid,n=e.getSender();n.setEndpoint(n.getEndpoint()+"?biz_id="+t)})},nP=function(e){var t=ef(e.storageExpires),n=na(e.bid,t);return{bid:"",pid:"",viewId:e8("_"),userId:n.userId,deviceId:n.deviceId,storageExpires:t,sessionId:ne(),domain:tR,pluginBundle:{name:"commonMonitors",plugins:["breadcrumb","jsError","performance","resourceError","resource"]},pluginPathPrefix:tj,plugins:{ajax:{ignoreUrls:tZ},fetch:{ignoreUrls:tZ},breadcrumb:{},pageview:{},jsError:{},resource:{},resourceError:{},performance:{},tti:{},fmp:{},blankScreen:!1,heatmap:!1},release:"",env:"production",sample:tX,transport:tN()}},nA=function(e){var t,n,r,i=void 0===e?{}:e,c=i.createSender,l=void 0===c?function(e){var t,n,r;return r=(n=function(e){var t,n=e.transport,r=e.endpoint,i=e.size,o=void 0===i?10:i,a=e.wait,u=void 0===a?1e3:a,c=[],l=0;function f(){if(!!c.length){var e=this.getBatchData();n.post({url:r,data:e,fail:function(n){t&&t(n,e)}}),c=[]}}return{getSize:function(){return o},getWait:function(){return u},setSize:function(e){o=e},setWait:function(e){u=e},getEndpoint:function(){return r},setEndpoint:function(e){r=e},send:function(e){c.push(e),c.length>=o&&f.call(this),clearTimeout(l),l=setTimeout(f.bind(this),u)},flush:function(){clearTimeout(l),f.call(this)},getBatchData:function(){return c.length?s(c):""},clear:function(){clearTimeout(l),c=[]},fail:function(e){t=e}}}(t={size:tK,endpoint:t7(e.domain),transport:e.transport})).send,ei(function(){if(t.transport.useBeacon){var e=tA(),i=n.getBatchData();i&&(e.post(n.getEndpoint(),i),n.clear()),n.send=function(t){e.post(n.getEndpoint(),s([t]))},eo(function(){n.send=r})}else n.flush()}),n}:c,d=i.builder,p=i.createDefaultConfig,h=function(e){var t,n,r,i,s,c,l=e.builder,d=e.createSender,p=e.createDefaultConfig,h=e.createConfigManager,v=e.userConfigNormalizer,g=e.initConfigNormalizer,m=e.validateInitConfig,y={};u.forEach(function(e){return y[e]=[]});var x=!1,_=!1,w=!1,C=[],S=[];var T=(t=!1,n={},r=function(e){e.length&&e.forEach(function(e){try{e()}catch(e){}}),e.length=0},{set:function(e,i,o){n[e]?n[e].push([i,o]):n[e]=[[i,o]],t&&r(o)},has:function(e){return!!n[e]},remove:i=function(e){n[e]&&n[e].forEach(function(e){r(e[1])}),n[e]=void 0},removeByEvType:function(e){Object.keys(n).forEach(function(t){n[t]&&n[t].forEach(function(t){t[0]===e&&r(t[1])})})},clear:function(){t=!0,Object.keys(n).forEach(function(e){i(e)})}}),k={getBuilder:function(){return l},getSender:function(){return s},getPreStartQueue:function(){return C},init:function(e){if(x){O("already inited");return}if(e&&f(e)&&m(e)){var t=p(e);if(!t)throw Error("defaultConfig missing");var n=g(e);if((c=h(t)).setConfig(n),c.onChange(function(){P("config")}),!(s=d(c.getConfig())))throw Error("sender missing");x=!0,P("init",!0)}else throw Error("invalid InitConfig, init failed")},set:function(e){if(!!x)e&&f(e)&&(P("beforeConfig",!1,e),null==c||c.setConfig(e))},config:function(e){if(!!x)return e&&f(e)&&(P("beforeConfig",!1,e),null==c||c.setConfig(v(e))),null==c?void 0:c.getConfig()},provide:function(e,t){if(b(S,e)){O("cannot provide "+e+", reserved");return}k[e]=t,P("provide",!1,e)},start:function(){var e=this;if(!!x&&!_)null==c||c.onReady(function(){_=!0,P("start",!0),C.forEach(function(t){return e.build(t)}),C.length=0})},report:function(e){if(!e)return;var t=A(y.beforeReport)(e);if(!t)return;var n=A(y.report)(t);if(!!n)_?this.build(n):C.push(n)},build:function(e){if(!_)return;var t=A(y.beforeBuild)(e);if(!t)return;var n=l.build(t);if(!n)return;var r=A(y.build)(n);if(!!r)this.send(r)},send:function(e){if(!!_){var t=A(y.beforeSend)(e);t&&(s.send(t),P("send",!1,t))}},destroy:function(){T.clear(),w=!0,C.length=0,P("beforeDestroy",!0)},on:function(e,t){if("init"===e&&x||"start"===e&&_||"beforeDestroy"===e&&w)try{t()}catch(e){}else y[e]&&y[e].push(t)},off:function(e,t){y[e]&&(y[e]=E(y[e],t))},destroyAgent:T};return S=Object.keys(k),k;function P(e,t){void 0===t&&(t=!1);for(var n=[],r=2;r{let n=e.offset-t.offset;return 0===n?e.length-t.length:n}),r=e.length;for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.offset+i.length<=r)e=c.FU(e,i);else throw Error("Overlapping edit");r=i.offset}return e}f.zA,f.Vn,f.zx,(o=u||(u={}))[o.InvalidSymbol=1]="InvalidSymbol",o[o.InvalidNumberFormat=2]="InvalidNumberFormat",o[o.PropertyNameExpected=3]="PropertyNameExpected",o[o.ValueExpected=4]="ValueExpected",o[o.ColonExpected=5]="ColonExpected",o[o.CommaExpected=6]="CommaExpected",o[o.CloseBraceExpected=7]="CloseBraceExpected",o[o.CloseBracketExpected=8]="CloseBracketExpected",o[o.EndOfFileExpected=9]="EndOfFileExpected",o[o.InvalidCommentToken=10]="InvalidCommentToken",o[o.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",o[o.UnexpectedEndOfString=12]="UnexpectedEndOfString",o[o.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",o[o.InvalidUnicode=14]="InvalidUnicode",o[o.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",o[o.InvalidCharacter=16]="InvalidCharacter"},19137:function(e,t,n){"use strict";t.Service=n(22813)},24913:function(e,t,n){"use strict";n.r(t)},644641:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}}),n(414931),n(932651),n(490629);var r=n(101199),i=n(469935),o=n.n(i),a=n(622689),s=n.n(a),u=n(10380),c=n(120177),l=n(426337),f=n(307852);n(233777);let d=`${c.U.PREFIX}-grid`;function p(e){return e<10?`0${e.toString()}`:e.toString()}class h extends l.Z{componentDidMount(){this.foundation.init(),this.foundation.initCurrTime()}componentWillUnmount(){this.foundation.destroy()}get adapter(){return Object.assign(Object.assign({},super.adapter),{updateCurrPos:e=>{this.setState({currPos:e})},updateShowCurrTime:()=>{this.setState({showCurrTime:!0})}})}render(){return this.renderGrid()}constructor(e){super(e),this.renderEvents=()=>{let{events:e,scrollHeight:t,minEventHeight:n}=this.props;return e.map((e,i)=>{let{startPos:o,endPos:a,children:s,key:u,left:l=0}=e,f=o*t,d={top:`${f}px`,height:`${Math.max(n,(a-o)*t)}px`,left:l};return r.createElement("li",{className:`${c.U.PREFIX}-event-item ${c.U.PREFIX}-event-day`,style:d,key:u||`${f}-${i}`},s)})},this.renderCurrTime=()=>{let{currPos:e}=this.state,{scrollHeight:t}=this.props,n={top:e*t},i=r.createElement("div",{className:`${d}-curr-circle`,style:n}),o=r.createElement("div",{className:`${d}-curr-line`,style:n});return r.createElement(r.Fragment,{key:e},i,o)},this.handleClick=(e,t)=>{this.props.handleClick(e,t)},this.renderGrid=()=>{let e=!!this.props.showCurrTime&&this.state.showCurrTime,{displayValue:t,isWeekend:n,dateGridRender:i}=this.props,a=o()(`${d}-skeleton`,{[`${c.U.PREFIX}-weekend`]:n});return r.createElement("div",{className:`${d}`,role:"presentation"},r.createElement("div",{role:"gridcell",className:`${d}-content`},e?this.renderCurrTime():null,r.createElement("ul",{role:"row",className:a},[...Array(25).keys()].map(e=>{let n=o()({[`${d}-skeleton-row-line`]:!0});return r.createElement(r.Fragment,{key:`${e}-daycol`},r.createElement("li",{"data-time":`${p(e)}:00:00`,className:n,onClick:n=>this.handleClick(n,[t,e,0,0])}),r.createElement("li",{"data-time":`${p(e)}:30:00`,onClick:n=>this.handleClick(n,[t,e,30,0])}))})),i&&i(t.toString(),t),r.createElement("ul",{className:`${c.U.PREFIX}-event-items`},this.renderEvents())))},this.state={currPos:0,showCurrTime:!1},this.foundation=new u.Z(this.adapter)}}h.propTypes={events:s().array,displayValue:s().instanceOf(Date),showCurrTime:s().bool,scrollHeight:s().number,currPos:s().number,handleClick:s().func,mode:s().string,minEventHeight:s().number,isWeekend:s().bool,dateGridRender:s().func},h.defaultProps={events:[],showCurrTime:!0,scrollHeight:0,currPos:0,mode:"dayCol",minEventHeight:Number.MIN_SAFE_INTEGER},h.contextType=f.Z},975044:function(e,t,n){"use strict";n(932651),n(414931);var r=n(92122),i=n.n(r),o=n(390063),a=n.n(o),s=n(795233),u=n.n(s),c=n(22186),l=n.n(c),f=n(101199),d=n(469935),p=n.n(d),h=n(622689),v=n.n(h),g=n(831714),m=n(668833),y=n(678503),b=n(426337);n(998737);var E=n(329206),x=n(854074),_=n(844609),w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let C=m.UX.PREFIX,S=m.j2.SIZE,T=m.j2.STATUS,O=m.j2.MODE;class k extends b.Z{get adapter(){return Object.assign(Object.assign({},super.adapter),{setValue:e=>this.setState({value:e}),setEyeClosed:e=>this.setState({eyeClosed:e}),toggleFocusing:e=>{this.setState({isFocus:e})},focusInput:()=>{let{preventScroll:e}=this.props,t=this.inputRef&&this.inputRef.current;t&&t.focus({preventScroll:e})},toggleHovering:e=>this.setState({isHovering:e}),getIfFocusing:()=>this.state.isFocus,notifyChange:(e,t)=>this.props.onChange(e,t),notifyBlur:(e,t)=>this.props.onBlur(t),notifyFocus:(e,t)=>this.props.onFocus(t),notifyInput:e=>this.props.onInput(e),notifyKeyPress:e=>this.props.onKeyPress(e),notifyKeyDown:e=>this.props.onKeyDown(e),notifyKeyUp:e=>this.props.onKeyUp(e),notifyEnterPress:e=>this.props.onEnterPress(e),notifyClear:e=>this.props.onClear(e),setMinLength:e=>this.setState({minLength:e}),isEventTarget:e=>e&&e.target===e.currentTarget})}static getDerivedStateFromProps(e,t){let n={};return e.value!==t.cachedValue&&(n.value=e.value,n.cachedValue=e.value),n}componentDidUpdate(e){let{mode:t}=this.props;e.mode!==t&&this.handleModeChange(t)}componentDidMount(){let{disabled:e,autoFocus:t,preventScroll:n}=this.props;!e&&(t||this.props.autofocus)&&this.inputRef.current.focus({preventScroll:n})}renderPrepend(){let{addonBefore:e}=this.props;if(e){let t=p()({[`${C}-prepend`]:!0,[`${C}-prepend-text`]:e&&l()(e),[`${C}-prepend-icon`]:(0,y.ID)(e)});return f.createElement("div",{className:t,"x-semi-prop":"addonBefore"},e)}return null}renderAppend(){let{addonAfter:e}=this.props;if(e){let t=p()({[`${C}-append`]:!0,[`${C}-append-text`]:e&&l()(e),[`${C}-append-icon`]:(0,y.ID)(e)});return f.createElement("div",{className:t,"x-semi-prop":"addonAfter"},e)}return null}renderClearBtn(){let e=p()(`${C}-clearbtn`),{clearIcon:t}=this.props;return this.foundation.isAllowClear()?f.createElement("div",{className:e,onMouseDown:this.handleClear},t||f.createElement(E.Z,null)):null}renderModeBtn(){let{eyeClosed:e}=this.state,{mode:t,disabled:n}=this.props,r=p()(`${C}-modebtn`),i=e?f.createElement(x.Z,null):f.createElement(_.Z,null);return"password"!==t||n?null:f.createElement("div",{role:"button",tabIndex:0,"aria-label":e?"Show password":"Hidden password",className:r,onClick:this.handleClickEye,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onKeyPress:this.handleModeEnterPress},i)}renderPrefix(){let{prefix:e,insetLabel:t,insetLabelId:n}=this.props,r=e||t;if(!r)return null;let i=p()({[`${C}-prefix`]:!0,[`${C}-inset-label`]:t,[`${C}-prefix-text`]:r&&l()(r),[`${C}-prefix-icon`]:(0,y.ID)(r)});return f.createElement("div",{className:i,onMouseDown:this.handlePreventMouseDown,onClick:this.handleClickPrefixOrSuffix,id:n,"x-semi-prop":"prefix,insetLabel"},r)}renderSuffix(e){let{suffix:t,hideSuffix:n}=this.props;if(!t)return null;let r=p()({[`${C}-suffix`]:!0,[`${C}-suffix-text`]:t&&l()(t),[`${C}-suffix-icon`]:(0,y.ID)(t),[`${C}-suffix-hidden`]:e&&!!n});return f.createElement("div",{className:r,onMouseDown:this.handlePreventMouseDown,onClick:this.handleClickPrefixOrSuffix,"x-semi-prop":"suffix"},t)}getInputRef(){let{forwardRef:e}=this.props;if(!i()(e)){if("function"==typeof e)return t=>{e(t),this.inputRef={current:t}};if("[object Object]"===Object.prototype.toString.call(e))return this.inputRef=e,e}return this.inputRef}render(){let e=this.props,{addonAfter:t,addonBefore:n,autoFocus:r,clearIcon:i,className:o,disabled:s,defaultValue:u,placeholder:c,prefix:l,mode:d,insetLabel:h,insetLabelId:v,validateStatus:g,type:m,readonly:b,size:E,suffix:x,style:_,showClear:S,onEnterPress:T,onClear:O,hideSuffix:k,inputStyle:P,forwardRef:A,maxLength:I,getValueLength:N,preventScroll:R,borderless:L,showClearIgnoreDisabled:j,onlyBorder:M}=e,D=w(e,["addonAfter","addonBefore","autoFocus","clearIcon","className","disabled","defaultValue","placeholder","prefix","mode","insetLabel","insetLabelId","validateStatus","type","readonly","size","suffix","style","showClear","onEnterPress","onClear","hideSuffix","inputStyle","forwardRef","maxLength","getValueLength","preventScroll","borderless","showClearIgnoreDisabled","onlyBorder"]),{value:$,isFocus:U,minLength:F}=this.state,B=this.foundation.isAllowClear(),H=(0,y.ID)(x),Z=this.getInputRef(),G=`${C}-wrapper`,W=p()(G,o,{[`${C}-wrapper__with-prefix`]:l||h,[`${C}-wrapper__with-suffix`]:x,[`${C}-wrapper__with-suffix-hidden`]:B&&!!k,[`${C}-wrapper__with-suffix-icon`]:H,[`${C}-wrapper__with-append`]:n,[`${C}-wrapper__with-prepend`]:t,[`${C}-wrapper__with-append-only`]:n&&!t,[`${C}-wrapper__with-prepend-only`]:!n&&t,[`${G}-readonly`]:b,[`${G}-disabled`]:s,[`${G}-warning`]:"warning"===g,[`${G}-error`]:"error"===g,[`${G}-focus`]:U,[`${G}-clearable`]:S,[`${G}-modebtn`]:"password"===d,[`${G}-hidden`]:"hidden"===m,[`${G}-${E}`]:E,[`${C}-borderless`]:L,[`${C}-only_border`]:null!=M}),X=p()(C,{[`${C}-${E}`]:E,[`${C}-disabled`]:s,[`${C}-sibling-clearbtn`]:this.foundation.isAllowClear(),[`${C}-sibling-modebtn`]:"password"===d}),K=Object.assign(Object.assign({},D),{style:P,className:X,disabled:s,readOnly:b,type:this.foundation.handleInputType(m),placeholder:c,onInput:e=>this.foundation.handleInput(e),onChange:e=>this.foundation.handleChange(e.target.value,e),onFocus:e=>this.foundation.handleFocus(e),onBlur:e=>this.foundation.handleBlur(e),onKeyUp:e=>this.foundation.handleKeyUp(e),onKeyDown:e=>this.foundation.handleKeyDown(e),onKeyPress:e=>this.foundation.handleKeyPress(e),value:null==$?"":$});!a()(N)&&(K.maxLength=I),F&&(K.minLength=F),"error"===g&&(K["aria-invalid"]="true");let q=Object.assign({},_);return void 0!==M&&(q=Object.assign({borderWidth:M},_)),f.createElement("div",{className:W,style:q,onMouseEnter:e=>this.handleMouseOver(e),onMouseLeave:e=>this.handleMouseLeave(e),onClick:e=>this.handleClick(e)},this.renderPrepend(),this.renderPrefix(),f.createElement("input",Object.assign({},K,{ref:Z})),this.renderClearBtn(),this.renderSuffix(B),this.renderModeBtn(),this.renderAppend())}constructor(e){super(e),this.handleClear=e=>{this.foundation.handleClear(e)},this.handleClick=e=>{this.foundation.handleClick(e)},this.handleMouseOver=e=>{this.setState({isHovering:!0})},this.handleMouseLeave=e=>{this.setState({isHovering:!1})},this.handleModeChange=e=>{this.foundation.handleModeChange(e)},this.handleClickEye=e=>{this.foundation.handleClickEye(e)},this.handleMouseDown=e=>{this.foundation.handleMouseDown(e)},this.handleMouseUp=e=>{this.foundation.handleMouseUp(e)},this.handleModeEnterPress=e=>{this.foundation.handleModeEnterPress(e)},this.handleClickPrefixOrSuffix=e=>{this.foundation.handleClickPrefixOrSuffix(e)},this.handlePreventMouseDown=e=>{this.foundation.handlePreventMouseDown(e)};let t="value"in e?e.value:e.defaultValue;this.state={value:t,cachedValue:e.value,disabled:!1,props:{},isFocus:!1,isHovering:!1,eyeClosed:"password"===e.mode,minLength:e.minLength},this.inputRef=f.createRef(),this.prefixRef=f.createRef(),this.suffixRef=f.createRef(),this.foundation=new g.Z(this.adapter)}}k.propTypes={"aria-label":v().string,"aria-labelledby":v().string,"aria-invalid":v().bool,"aria-errormessage":v().string,"aria-describedby":v().string,"aria-required":v().bool,addonBefore:v().node,addonAfter:v().node,clearIcon:v().node,prefix:v().node,suffix:v().node,mode:v().oneOf(O),value:v().any,defaultValue:v().any,disabled:v().bool,readonly:v().bool,autoFocus:v().bool,type:v().string,showClear:v().bool,hideSuffix:v().bool,placeholder:v().any,size:v().oneOf(S),className:v().string,style:v().object,validateStatus:v().oneOf(T),onClear:v().func,onChange:v().func,onBlur:v().func,onFocus:v().func,onInput:v().func,onKeyDown:v().func,onKeyUp:v().func,onKeyPress:v().func,onEnterPress:v().func,insetLabel:v().node,insetLabelId:v().string,inputStyle:v().object,getValueLength:v().func,preventScroll:v().bool,borderless:v().bool},k.defaultProps={addonBefore:"",addonAfter:"",prefix:"",suffix:"",readonly:!1,type:"text",showClear:!1,hideSuffix:!1,placeholder:"",size:"default",className:"",onClear:u(),onChange:u(),onBlur:u(),onFocus:u(),onInput:u(),onKeyDown:u(),onKeyUp:u(),onKeyPress:u(),onEnterPress:u(),validateStatus:"default",borderless:!1};let P=f.forwardRef((e,t)=>f.createElement(k,Object.assign({},e,{forwardRef:t})));t.Z=P},16142:function(e,t,n){"use strict";n(932651),n(706056);var r=n(795233),i=n.n(r),o=n(101199),a=n(469935),s=n.n(a),u=n(622689),c=n.n(u),l=n(230720),f=n(262149),d=n(876794),p=n(158871),h=n(426337),v=n(678503),g=n(709544),m=n(953847),y=n(279426),b=n(724409),E=n(170651),x=n(155553),_=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let w=f.UX.NOTICE,{duration:C}=f.KT,{types:S,themes:T,directions:O}=f.j2;class k extends h.Z{get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyWrapperToRemove:e=>{this.props.close(e)},notifyClose:()=>{this.props.onClose(),this.props.onHookClose&&this.props.onHookClose()}})}componentWillUnmount(){this.foundation.destroy()}renderTypeIcon(){let{type:e,icon:t}=this.props,n={warning:o.createElement(g.Z,{size:"large"}),success:o.createElement(m.Z,{size:"large"}),info:o.createElement(y.Z,{size:"large"}),error:o.createElement(b.Z,{size:"large"})}[e],r=s()({[`${w}-icon`]:!0,[`${w}-${e}`]:!0});return(t&&(n=t),n)?o.createElement("div",{className:r,"x-semi-prop":"icon"},(0,v.ID)(n)?o.cloneElement(n,{size:n.props.size||"large"}):n):null}render(){let e=this.props.direction||this.context.direction,t=this.props,{content:n,title:r,theme:i,position:a="rtl"===e?"topLeft":"topRight",type:u,id:c,onCloseClick:l,className:f,showClose:d,style:h}=t;_(t,["content","title","theme","position","type","id","onCloseClick","className","showClose","style"]);let{visible:v}=this.state,g=s()(w,f,{[`${w}-close`]:!v,[`${w}-icon-show`]:S.includes(u),[`${w}-${u}`]:!0,[`${w}-${i}`]:"light"===i,[`${w}-rtl`]:"rtl"===e}),m=(0,x.Ms)({});return o.createElement("div",{className:g,style:h,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:this.notifyClick,"aria-labelledby":m,role:"alert",onAnimationEnd:this.props.onAnimationEnd,onAnimationStart:this.props.onAnimationStart},o.createElement("div",null,this.renderTypeIcon()),o.createElement("div",{className:`${w}-inner`},o.createElement("div",{className:`${w}-content-wrapper`},r?o.createElement("div",{id:m,className:`${w}-title`,"x-semi-prop":"title"},r):"",n?o.createElement("div",{className:`${w}-content`,"x-semi-prop":"content"},n):""),d&&o.createElement(p.Z,{className:`${w}-icon-close`,type:"tertiary",icon:o.createElement(E.Z,null),theme:"borderless",size:"small",onClick:this.close})))}constructor(e){super(e),this.clearCloseTimer=()=>{this.foundation._clearCloseTimer()},this.startCloseTimer=()=>{this.foundation._startCloseTimer()},this.close=e=>{this.props.onCloseClick(this.props.id),this.foundation.close(e)},this.notifyClick=e=>{this.props.onClick(e)},this.state={visible:!0},this.foundation=new d.Z(this.adapter)}}k.contextType=l.Z,k.propTypes={duration:c().number,id:c().string,title:c().node,content:c().node,type:c().oneOf(S),theme:c().oneOf(T),icon:c().node,onClick:c().func,onClose:c().func,onCloseClick:c().func,showClose:c().bool,close:c().func,direction:c().oneOf(O)},k.__SemiComponentName__="Notification",k.defaultProps=(0,v.GW)(k.__SemiComponentName__,{duration:C,id:"",close:i(),onClose:i(),onClick:i(),onCloseClick:i(),content:"",title:"",showClose:!0,theme:"normal"}),t.Z=k},63245:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}}),n(932651);var r=n(101199),i=n(328273);class o extends r.PureComponent{render(){return null}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(e)}}o.propTypes=Object.assign({},i.Z),o.elementType="Column"},286211:function(e,t,n){"use strict";n(679308),n(932651),n(313036),n(374954);var r=n(101199),i=n(469935),o=n.n(i),a=n(622689),s=n.n(a),u=n(642449),c=n(668825),l=n(426337),f=n(619050),d=n(9444),p=n(555045),h=n(786202);n(52012);var v=n(109841),g=n(155553),m=n(209873),y=n(678503);let b=u.UX.PREFIX;class E extends l.Z{get adapter(){return Object.assign(Object.assign({},super.adapter),{disabledBodyScroll:()=>{let{getPopupContainer:e}=this.props;this.bodyOverflow=document.body.style.overflow||"",!e&&"hidden"!==this.bodyOverflow&&(document.body.style.overflow="hidden",document.body.style.width=`calc(${this.originBodyWidth||"100%"} - ${this.scrollBarWidth}px)`)},enabledBodyScroll:()=>{let{getPopupContainer:e}=this.props;!e&&"hidden"!==this.bodyOverflow&&(document.body.style.overflow=this.bodyOverflow,document.body.style.width=this.originBodyWidth)},notifyChange:e=>{this.props.onChange(e)},notifyFinish:()=>{this.props.onFinish()},notifyNext:e=>{this.props.onNext(e)},notifyPrev:e=>{this.props.onPrev(e)},notifySkip:()=>{this.props.onSkip()},setCurrent:e=>{this.setState({current:e})}})}static getDerivedStateFromProps(e,t){let n={};return!(0,v.Z)(e.current)&&e.current!==t.current&&(n.current=e.current),n}componentDidMount(){this.foundation.init(),this.scrollBarWidth=(0,y.np)(),this.userGuideId=(0,g.Ms)()}componentDidUpdate(e,t){let{steps:n,mode:r,visible:i}=this.props,{current:o}=this.state;i!==e.visible&&(i?(this.foundation.beforeShow(),this.setState({current:0})):this.foundation.afterHide()),("popup"===r&&t.current!==o&&n[o]||e.visible!==i)&&this.updateSpotlightRect()}componentWillUnmount(){this.foundation.destroy()}scrollTargetIntoViewIfNeeded(e){if(!e)return;let t=e.getBoundingClientRect();!(t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth))&&e.scrollIntoView({behavior:"auto",block:"center"})}updateSpotlightRect(){var e,t,n,r;return e=this,t=void 0,n=void 0,r=function*(){let{steps:e,spotlightPadding:t}=this.props,{current:n}=this.state,r=e[n];if(r.target){let e="function"==typeof r.target?r.target():r.target;this.scrollTargetIntoViewIfNeeded(e);let n=null==e?void 0:e.getBoundingClientRect(),i=(null==r?void 0:r.spotlightPadding)||t||u.KT.DEFAULT_SPOTLIGHT_PADDING,o=new DOMRect(n.x-i,n.y-i,n.width+2*i,n.height+2*i);requestAnimationFrame(()=>{this.setState({spotlightRect:o})})}},new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}renderPopupContent(e,t){let{showPrevButton:n,showSkipButton:i,theme:a,steps:s,finishText:u,nextButtonProps:c,prevButtonProps:l}=this.props,{current:f}=this.state,p=0===t,h=t===s.length-1,v=`${b}-popup-content`,g="primary"===a||(null==e?void 0:e.theme)==="primary",{cover:y,title:E,description:x}=e;return r.createElement(m.Z,{componentName:"UserGuide"},(e,t)=>r.createElement("div",{className:o()(`${v}`,{[`${v}-primary`]:g})},y&&r.createElement("div",{className:`${v}-cover`},y),r.createElement("div",{className:`${v}-body`},E&&r.createElement("div",{className:`${v}-title`},E),x&&r.createElement("div",{className:`${v}-description`},x),r.createElement("div",{className:`${v}-footer`},s.length>1&&r.createElement("div",{className:`${v}-indicator`},f+1,"/",s.length),r.createElement("div",{className:`${v}-buttons`},i&&!h&&r.createElement(d.Z,{style:g?{backgroundColor:"var(--semi-color-fill-2)"}:{},theme:g?"solid":"light",type:g?"primary":"tertiary",onClick:this.foundation.handleSkip},e.skip),n&&!p&&r.createElement(d.Z,Object.assign({style:g?{backgroundColor:"var(--semi-color-fill-2)"}:{},theme:g?"solid":"light",type:g?"primary":"tertiary",onClick:this.foundation.handlePrev},l),(null==l?void 0:l.children)||e.prev),r.createElement(d.Z,Object.assign({style:g?{backgroundColor:"#FFF"}:{},theme:g?"borderless":"solid",type:"primary",onClick:this.foundation.handleNext},c),h?u||e.finish:(null==c?void 0:c.children)||e.next))))))}renderSpotlight(){let{steps:e,mask:t,zIndex:n}=this.props,{spotlightRect:i,current:o}=this.state;return e[o].target?(!i&&this.updateSpotlightRect(),r.createElement(r.Fragment,null,i?r.createElement("svg",{className:`${b}-spotlight`,style:{zIndex:n}},r.createElement("defs",null,r.createElement("mask",{id:`spotlight-${this.userGuideId}`},r.createElement("rect",{width:"100%",height:"100%",fill:"white"}),r.createElement("rect",{className:`${b}-spotlight-rect`,x:i.x,y:i.y,width:i.width,height:i.height,rx:4,fill:"black"}))),t&&r.createElement(r.Fragment,null,r.createElement("rect",{width:"100%",height:"100%",fill:"var(--semi-color-overlay-bg)",mask:`url(#spotlight-${this.userGuideId})`}),r.createElement("rect",{x:0,y:0,width:"100%",height:i.y,fill:"transparent",className:`${b}-spotlight-transparent-rect`}),r.createElement("rect",{x:0,y:i.y,width:i.x,height:i.height,fill:"transparent",className:`${b}-spotlight-transparent-rect`}),r.createElement("rect",{x:i.x+i.width,y:i.y,width:`calc(100% - ${i.x+i.width}px)`,height:i.height,fill:"transparent",className:`${b}-spotlight-transparent-rect`}),r.createElement("rect",{y:i.y+i.height,width:"100%",height:`calc(100% - ${i.y+i.height}px)`,fill:"transparent",className:`${b}-spotlight-transparent-rect`}))):null)):null}render(){let{mode:e,steps:t,visible:n}=this.props;return n&&t.length?r.createElement(r.Fragment,null,"popup"===e?r.createElement(r.Fragment,null,null==t?void 0:t.map((e,t)=>this.renderStep(e,t)),this.renderSpotlight()):null,"modal"===e&&this.renderModal()):null}constructor(e){super(e),this.renderStep=(e,t)=>{let{theme:n,position:i,visible:a,className:s,style:c,spotlightPadding:l}=this.props,{current:d}=this.state;if(!e.target)return null;let p=("function"==typeof e.target?e.target():e.target).getBoundingClientRect(),h=(null==e?void 0:e.spotlightPadding)||l||u.KT.DEFAULT_SPOTLIGHT_PADDING,v="primary"===n||(null==e?void 0:e.theme)==="primary";return r.createElement(f.Z,{key:`userGuide-popup-${t}`,className:o()(`${b}-popover`,s),style:Object.assign(Object.assign(Object.assign({},{padding:0}),v?{backgroundColor:"var(--semi-color-primary)"}:{}),c),content:this.renderPopupContent(e,t),position:e.position||i,trigger:"custom",visible:a&&d===t,showArrow:!1!==e.showArrow},r.createElement("div",{style:{position:"fixed",left:p.x-h,top:p.y-h,width:p.width+2*h,height:p.height+2*h,pointerEvents:"none"}}))},this.renderIndicator=()=>{let{steps:e}=this.props,{current:t}=this.state,n=[];for(let i=0;i{let{visible:e,steps:t,showSkipButton:n,showPrevButton:i,finishText:o,nextButtonProps:a,prevButtonProps:s,mask:c}=this.props,{current:l}=this.state,f=t[l],h=0===l,v=l===t.length-1,{cover:g,title:y,description:b}=f;return r.createElement(m.Z,{componentName:"UserGuide"},(t,l)=>r.createElement(p.Z,{className:u.UX.PREFIX_MODAL,bodyStyle:{padding:0},header:null,visible:e,maskClosable:!1,mask:c,centered:!0,footer:null},g&&r.createElement(r.Fragment,null,r.createElement("div",{className:`${u.UX.PREFIX_MODAL}-cover`},g),r.createElement("div",{className:`${u.UX.PREFIX_MODAL}-indicator`},this.renderIndicator())),(y||b)&&r.createElement("div",{className:`${u.UX.PREFIX_MODAL}-body`},y&&r.createElement("div",{className:`${u.UX.PREFIX_MODAL}-body-title`},y),b&&r.createElement("div",{className:`${u.UX.PREFIX_MODAL}-body-description`},b)),r.createElement("div",{className:`${u.UX.PREFIX_MODAL}-footer`},n&&!v&&r.createElement(d.Z,{type:"tertiary",onClick:this.foundation.handleSkip},t.skip),i&&!h&&r.createElement(d.Z,Object.assign({type:"tertiary",onClick:this.foundation.handlePrev},s),(null==s?void 0:s.children)||t.prev),r.createElement(d.Z,Object.assign({theme:"solid",onClick:this.foundation.handleNext},a),v?o||t.finish:(null==a?void 0:a.children)||t.next))))},this.foundation=new c.Z(this.adapter),this.state={current:e.current||u.KT.DEFAULT_CURRENT,spotlightRect:null},this.scrollBarWidth=0,this.userGuideId=""}}E.propTypes={mask:s().bool,mode:s().oneOf(u.j2.MODE),onChange:s().func,onFinish:s().func,onNext:s().func,onPrev:s().func,onSkip:s().func,position:s().oneOf(u.j2.POSITION_SET),showPrevButton:s().bool,showSkipButton:s().bool,theme:s().oneOf(u.j2.THEME),visible:s().bool,getPopupContainer:s().func,zIndex:s().number},E.defaultProps={mask:!0,mode:"popup",nextButtonProps:{},onChange:h.Z,onFinish:h.Z,onNext:h.Z,onPrev:h.Z,onSkip:h.Z,position:"bottom",prevButtonProps:{},showPrevButton:!0,showSkipButton:!0,steps:[],theme:"default",visible:!1,zIndex:u.KT.DEFAULT_Z_INDEX},t.Z=E},514255:function(e,t,n){"use strict";function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(t=>setTimeout(t,e))}n.d(t,{_:function(){return r}}),n(679308)},648517:function(e,t,n){"use strict";n.d(t,{KT:function(){return s},UX:function(){return r},j2:function(){return a}});let r={PREFIX:n(707852).T+"-overflow-list"},i={COLLAPSE:"collapse",SCROLL:"scroll"},o={START:"start",END:"end"},a={BOUNDARY_SET:Object.values(o),POSITION_SET:["vertical","horizontal"],MODE_SET:Object.values(i),MODE_MAP:i,BOUNDARY_MAP:o,OVERFLOW_DIR:{NONE:0,GROW:1,SHRINK:2}},s={MINIMUM_HTML_ELEMENT_WIDTH:4}},706478:function(e,t,n){"use strict";n.d(t,{k:function(){return s}}),n(374954),n(240148),n(759943),n(932651);var r=n(335346),i=n(856445),o=n(64360),a=n(109841);let s=(e,t)=>{let n=`${e}`;e<10&&(n=`0${e}`);let r=!1;return t&&t.indexOf(e)>=0&&(r=!0),{value:n,disabled:r}};function u(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=[];for(let o=0;ot.indexOf(o)||!n)&&i.push(o);return i}class c extends i.Z{isAM(){return this.getProp("isAM")}initData(){let{timeStampValue:e,hourStep:t,disabledMinutes:n,disabledSeconds:r,hideDisabledOptions:i,minuteStep:o,secondStep:a}=this.getProps(),s=this.getValidFormat(),c=this.getDisplayDateFromTimeStamp(e),l=this.disabledHours(),f=n(c?c.getHours():null),d=r(c?c.getHours():null,c?c.getMinutes():null),p=u(24,l,i,t),h=u(60,f,i,o),v=u(60,d,i,a);return{showHour:!!s.match(/HH|hh|H|h/g),showMinute:!!s.match(/mm/g),showSecond:!!s.match(/ss/g),hourOptions:p,minuteOptions:h,secondOptions:v}}getPosition(){let e=this.getProp("position"),t=this.getProp("type")||r.j2.DEFAULT_TYPE;return e||r.j2.DEFAULT_POSITION[t]}getDefaultFormatIfNeed(){return this._isInProps("format")?this.getProp("format"):this.getProp("use12Hours")?r.j2.DEFAULT_FORMAT_A:r.j2.DEFAULT_FORMAT}disabledHours(){let{use12Hours:e,disabledHours:t}=this.getProps(),n=t&&t();return e&&Array.isArray(n)&&(n=this.isAM()?n.filter(e=>e<12).map(e=>0===e?12:e):n.map(e=>12===e?12:e-12)),n}getValidFormat(e){let t=(0,a.Z)(e)?this.getProp("format"):e;return t="string"==typeof(t=this.getDefaultFormatIfNeed())?t:r.j2.DEFAULT_FORMAT}getDisplayDateFromTimeStamp(e){let t;return(e&&(t=new Date(e)),e&&(0,o.Z)(t))?t:this.createDateDefault()}createDateDefault(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}constructor(e){super(Object.assign({},e))}}t.Z=c},254456:function(e,t,n){"use strict";n.d(t,{W_:function(){return l},YS:function(){return c}}),n(240148),n(759943),n(527553),n(932651);var r=n(521311);let i=[[-11,["Pacific/Midway"]],[-10,["Pacific/Honolulu"]],[-9.5,["Pacific/Marquesas"]],[-9,["Pacific/Gambier"]],[-8,["Pacific/Pitcairn"]],[-7,["America/Phoenix"]],[-6,["America/Tegucigalpa"]],[-5,["America/Bogota"]],[-4,["America/Puerto_Rico"]],[-3.5,["America/St_Johns"]],[-3,["America/Montevideo"]],[-2,["Atlantic/South_Georgia"]],[-1,["Atlantic/Cape_Verde"]],[0,["Africa/Accra"]],[1,["Africa/Bangui"]],[2,["Africa/Cairo"]],[3,["Asia/Bahrain","Indian/Antananarivo"]],[3.5,["Asia/Tehran"]],[4,["Asia/Dubai","Asia/Muscat"]],[4.5,["Asia/Kabul"]],[5,["Asia/Samarkand","Asia/Karachi"]],[5.5,["Asia/Kolkata"]],[5.75,["Asia/Kathmandu"]],[6,["Asia/Dhaka"]],[6.5,["Asia/Rangoon","Asia/Rangoon"]],[7,["Asia/Jakarta","Asia/Phnom_Penh","Asia/Bangkok"]],[8,["Asia/Shanghai","Asia/Singapore"]],[8.75,["Australia/Eucla"]],[9,["Asia/Tokyo","Asia/Seoul","Asia/Pyongyang"]],[9.5,["Australia/Darwin"]],[10,["Pacific/Guam"]],[10.5,["Australia/Adelaide"]],[11,["Pacific/Guadalcanal"]],[12,["Pacific/Funafuti"]],[13,["Pacific/Enderbury"]],[13.75,["Pacific/Chatham"]],[14,["Pacific/Kiritimati"]]],o={0:"Etc/GMT",1:"Etc/GMT-1",2:"Etc/GMT-2",3:"Etc/GMT-3",4:"Etc/GMT-4",5:"Etc/GMT-5",6:"Etc/GMT-6",7:"Etc/GMT-7",8:"Etc/GMT-8",9:"Etc/GMT-9",10:"Etc/GMT-10",11:"Etc/GMT-11",12:"Etc/GMT-12",13:"Etc/GMT-13",14:"Etc/GMT-14","-1":"Etc/GMT+1","-2":"Etc/GMT+2","-3":"Etc/GMT+3","-4":"Etc/GMT+4","-5":"Etc/GMT+5","-6":"Etc/GMT+6","-7":"Etc/GMT+7","-8":"Etc/GMT+8","-9":"Etc/GMT+9","-10":"Etc/GMT+10","-11":"Etc/GMT+11","-12":"Etc/GMT+12"},a=/([\-\+]{1})(\d{2})\:(\d{2})/,s=e=>{let t=null;if("string"==typeof e){if(!(t=e.match(a)))return e;let n=parseInt(t[1]+1,10),r=parseInt(t[2],10);e=n*(r+parseInt(t[3],10)/60)}if("number"==typeof e){if(e in o){let t=o[e];if(function(e){if(u[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),u[e]=!0,!0}catch(e){return!1}}(t))return t}let t=i.find(t=>t[0]===e);return t&&t[1][0]}},u={},c=(e,t,n)=>(0,r.utcToZonedTime)(e,s(t),n),l=(e,t,n)=>(0,r.zonedTimeToUtc)(e,s(t),n)},108372:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(522407);class i{postMessage(e,t){switch(e.type){case"init":this._plugin=new r.default,this._plugin._messagePort=this._port,this._port.start(),this._plugin.onInit(e);break;case"resize":this._plugin.onResize(e);break;case"start":this._plugin.onStart();break;case"stop":this._plugin.onStop();break;case"destroy":this._plugin.destroy(),this._plugin=null;break;case"draw-default-img":this._plugin.onDrawDefaultImg(e.url)}}constructor(e){this._port=e}}},519234:function(e,t,n){"use strict";n.d(t,{c:function(){return s}});var r=n(480333),i=n(629686);n(490629),n(374954);var o=n(292948),a=n(805289);class s extends o.Sy{beforePlayerInit(){if(!this._inited)for(let[e,t]of(this._inited=!0,Object.entries(this._properties)))this._player.defineProperty(e,(0,i._)({configurable:!0},t))}beforeDestroy(){for(let e of Object.keys(this._properties))this._player.removeProperty(e)}constructor(...e){var t;super(...e),t=this,(0,r._)(this,"_plugins",{}),(0,r._)(this,"_properties",{playerId:{value:`douyin-player-${Date.now()}`},plugins:{value:new Proxy({},{get:(e,t)=>this._player.getPlugin(t.toLowerCase()),set:(e,t,n)=>(this._plugins[t.toLowerCase()]=n,!0),deleteProperty:(e,t)=>(delete this._plugins[t.toLowerCase()],!0)})},root:{get:()=>this._player.config.baseConfig.el},video:{get:()=>this._player._video},bufferedPoint:{get:()=>{let e={start:0,end:0};if(!this._player)return e;let t=this._player.buffered;if(!t||0===t.length)return e;for(let e=0;et.start(e))&&t.end(e)>=this._player.currentTime)return{start:t.start(e),end:t.end(e)};return e}},topBar:{get:()=>this._root.querySelector("douyin-player-top-bar")},addClass:{value:e=>{this._root.classList.add(e)}},getFullscreen:{value:function(){for(var e=arguments.length,n=Array(e),r=0;r{if((e=e.toLowerCase())in this._plugins)return this._plugins[e];for(let t of this._player._plugins)if(t.constructor.pluginName.toLowerCase()===e)return t}},hasClass:{value:e=>this._root.classList.contains(e)},playNext:{value:e=>{let t;let{baseConfig:n,preset:r}=e,i=this._player.config.baseConfig,o=this._player.coreType;(null==n?void 0:n.protocol)===a.b$.MP3?t="media":"media"===o&&(t="mediastream"),n&&(t&&(n.coreType=t),!n.el&&(null==i?void 0:i.el)&&(n.el=i.el)),this._player.configManager.reset(e),this._player.startPlay({plugins:null==r?void 0:r.plugins,resetCore:!0,isPlayNext:!0}),this._player.emit("playnext")}},registerPlugin:{value:(e,t)=>{let n=[...this._player._plugins.map(e=>e.constructor),e];this._player.updateConfig({preset:{plugins:n,pluginsConfig:{[e.pluginName]:t}}})}},retry:{value:()=>{this._player.refresh()}},removeClass:{value:e=>{this._root.classList.remove(e)}},seek:{value:e=>{this._player.currentTime=e}},unRegisterPlugin:{value:e=>{let t=[];for(let n of this._player._plugins)n.constructor.pluginName!==e&&t.push(n.constructor);this._player.updateConfig({preset:{plugins:t}})}}})}}(0,r._)(s,"pluginName","compatibility")},278997:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(634771),i=n(732905);function o(e,t){if(t&&("object"==(0,r.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},88028:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var r=n(600123),i=n(718046);function o(e){var t=(0,r._)(e,"string");return"symbol"===(0,i._)(t)?t:String(t)}},837163:function(e,t,n){"use strict";n.d(t,{r:function(){return o},v:function(){return i}});let r=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function i(){return{canContainEols:["delete"],enter:{strikethrough:a},exit:{strikethrough:s}}}function o(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:r}],handlers:{delete:u}}}function a(e){this.enter({type:"delete",children:[]},e)}function s(e){this.exit(e)}function u(e,t,n,r){let i=n.createTracker(r),o=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}u.peek=function(){return"~"}},644344:function(e,t,n){"use strict";function r(e,t){let n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i}n.d(t,{T:function(){return r}})},650639:function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function s(e,t,n){void 0===n&&(n="/");let r=f(("string"==typeof t?a(t):t).pathname||"/",n);if(null==r)return null;let i=function e(t,n,r,i){void 0===n&&(n=[]),void 0===r&&(r=[]),void 0===i&&(i="");let a=(t,a,s)=>{let l={relativePath:void 0===s?t.path||"":s,caseSensitive:!0===t.caseSensitive,childrenIndex:a,route:t};l.relativePath.startsWith("/")&&(o(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i)+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),l.relativePath=l.relativePath.slice(i.length));let f=g([i,l.relativePath]),d=r.concat(l);if(t.children&&t.children.length>0&&(o(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+f+'".'),e(t.children,n,d,f)),null!=t.path||!!t.index)n.push({path:f,score:function(e,t){let n=e.split("/"),r=n.length;return n.some(c)&&(r+=-2),t&&(r+=2),n.filter(e=>!c(e)).reduce((e,t)=>e+(u.test(t)?3:""===t?1:10),r)}(f,t.index),routesMeta:d})};return t.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let n of function e(t){let n=t.split("/");if(0===n.length)return[];let[r,...i]=n,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===i.length)return o?[a,""]:[a];let s=e(i.join("/")),u=[];return u.push(...s.map(e=>""===e?a:[a,e].join("/"))),o&&u.push(...s),u.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))a(e,t,n);else a(e,t)}),n}(e);(function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))})(i);let s=null;for(let e=0;null==s&&e"*"===e;function l(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),d("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*"))+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, '+('please change the route path to "'+e.replace(/\*$/,"/*"))+'".');let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>(r.push(t),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,t,n)=>{if("*"===t){let e=s[n]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return d(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e)+'" is a malformed URL segment. This is probably'+(" due to a bad percent encoding ("+n)+")."),e}}(s[n]||"",t),e},{}),pathname:o,pathnameBase:a,pattern:e}}function f(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function d(e,t){if(!e){try{throw Error(t)}catch(e){}}}function p(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r))+"]. Please separate it out to the "+("`to."+n)+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function h(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function v(e,t,n,i){let s,u;void 0===i&&(i=!1),"string"==typeof e?s=a(e):(o(!(s=r({},e)).pathname||!s.pathname.includes("?"),p("?","pathname","search",s)),o(!s.pathname||!s.pathname.includes("#"),p("#","pathname","hash",s)),o(!s.search||!s.search.includes("#"),p("#","search","hash",s)));let c=""===e||""===s.pathname,l=c?"/":s.pathname;if(i||null==l)u=n;else{let e=t.length-1;if(l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;s.pathname=t.join("/")}u=e>=0?t[e]:"/"}let f=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?a(e):e;return{pathname:n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t,search:y(r),hash:b(i)}}(s,u),d=l&&"/"!==l&&l.endsWith("/"),h=(c||"."===l)&&n.endsWith("/");return!f.pathname.endsWith("/")&&(d||h)&&(f.pathname+="/"),f}let g=e=>e.join("/").replace(/\/\/+/g,"/"),m=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),y=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",b=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:""}}]);