// ==UserScript==
// @name 샤니마스 한글 패치 임시
// @namespace https://github.com/newbiepr/shinycolors-trans-kr
// @version 1.11.15
// @description 샤니마스 임시 한글 패치 스크립트
// @icon https://shinycolors.enza.fun/icon_192x192.png
// @author Source : biuuu
// @match https://shinycolors.enza.fun/*
// @run-at document-start
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// @grant GM_unregisterMenuCommand
// @connect api.interpreter.caiyunai.com
// @connect translate.google.cn
// @connect fanyi.baidu.com
// ==/UserScript==
!function(){"use strict";const e=(e,t=!1)=>t&&e.startsWith("")?e:""+e;var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var n="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,s=n||o||Function("return this")(),i=s.Symbol,a=Object.prototype,c=a.hasOwnProperty,l=a.toString,u=i?i.toStringTag:void 0;var d=function(e){var t=c.call(e,u),r=e[u];try{e[u]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[u]=r:delete e[u]),o},h=Object.prototype.toString;var p=function(e){return h.call(e)},f=i?i.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":f&&f in Object(e)?d(e):p(e)},v=Array.isArray;var g=function(e){return null!=e&&"object"==typeof e};var y=function(e){return"string"==typeof e||!v(e)&&g(e)&&"[object String]"==m(e)};var w=function(e){return!0===e||!1===e||g(e)&&"[object Boolean]"==m(e)};var E=function(e,t){return function(r){return e(t(r))}},b=E(Object.getPrototypeOf,Object),k=Function.prototype,S=Object.prototype,I=k.toString,_=S.hasOwnProperty,x=I.call(Object);var C=function(e){if(!g(e)||"[object Object]"!=m(e))return!1;var t=b(e);if(null===t)return!0;var r=_.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&I.call(r)==x};const A={origin:"https://newbiepr.gitlab.io/shinymaskr.gitlab.io",hash:"",localHash:"",version:"1.11.15",story:"normal",timeout:30,font1:"yuanti",font2:"heiti",auto:"off",bgm:"off",dev:!1},T=Object.assign({},A),j=["yuanti","heiti","yuanti2"],M={HEITI_JA:"UDKakugo_SmallPr6-B",HEITI_TRANS:"sczh-heiti,UDKakugo_SmallPr6-B",YUAN_JA:"HummingStd-E",YUAN_TRANS:"sczh-yuanti,HummingStd-E"},R=["origin","font1","font2","timeout","story","auto","bgm","dev"],P=R,F=()=>{M.HEITI_TRANS=`${j.includes(A.font2)?"sczh-":""}${A.font2},${M.HEITI_JA}`,M.YUAN_TRANS=`${j.includes(A.font1)?"sczh-":""}${A.font1},${M.YUAN_JA}`},O=()=>{const e={};P.forEach(t=>{A[t]!==T[t]&&(e[t]=A[t])}),F(),localStorage.setItem("sczh:setting",JSON.stringify(e))},D=()=>{let e=location.hash;e=e.slice(1).replace(/\?tdsourcetag=s_pc(tim|qq)_aiomsg/,""),e.split(";").forEach(e=>{let t=e.split("="),r=decodeURIComponent(t[0].trim()),n=t[1]?decodeURIComponent(t[1].trim()):"";r&&P.includes(r)&&(A[r]=n||T[r],O())})},N={origin:{id:0,title:"서버 바꾸기",callback:()=>{"https://newbiepr.gitlab.io/shinymaskr.gitlab.io"===A.origin?(A.origin="https://shinymaskr.work",alert("서버가 "+A.origin+"으로 교체되었습니다\nf5누르고 재접속 부탁드립니다")):(A.origin="https://newbiepr.gitlab.io/shinymaskr.gitlab.io",alert("서버가 "+A.origin+"으로 교체되었습니다\nf5누르고 재접속 부탁드립니다"))}},story:{normal:"커뮤추출 열기",edit:"커뮤추출 닫기",id:0,callback:()=>{if("normal"===A.story)A.story="edit";else{const e=document.getElementById("btn-close-sczh");e?e.click():A.story="normal"}}},bgm:{on:"백그라운드BGM 끄기",off:"백그라운드BGM 켜기",id:0,callback:()=>{A.bgm="off"!==A.bgm?"off":"on"}},dev:{id:0,titles:["개발자모드 켜기","개발자모드 끄기"],callback:()=>{A.dev=!A.dev}},wiki:{id:0,title:"샤니위키",callback:()=>{window.open("https://shinycolors.info/wiki")}},update:{id:0,title:"업데이트",callback:()=>{window.open(A.origin+"/ShinyColors.user.js")}}},z=e=>{const t=A[e],r=N[e];let n="";if(w(t)){let e=t?1:0;n=r.titles[e]}else n=r.title||r[t];const o=r.id;o&&window.GM_unregisterMenuCommand(o),r.id=window.GM_registerMenuCommand(n,()=>{(0,r.callback)(),O(),B()})},B=()=>{if(!window.GM_registerMenuCommand||!window.GM_unregisterMenuCommand)return;["origin","update","bgm","story","dev","wiki"].forEach(e=>{z(e)})};(()=>{const e=localStorage.getItem("sczh:setting");let t=JSON.parse(e);C(t)||(t={});const{origin:r}=t;/^https?:\/\//.test(r)&&(A.origin=r.trim()),P.forEach(e=>{let r=t[e];y(r)&&(r=r.trim()),(w(r)||r)&&(A[e]=r)}),F()})(),D(),B(),window.addEventListener("hashchange",D);const L=e=>{if(!e)return"";return e.replace(/[\u0020]+$/g,"").replace(/^[\u0020]+/g,"")},$=(e,t=!1)=>{let r=L(e).replace(/(\\r)?\\n/g,"\n").replace(/\\r/g,"\n");return t?r:r.replace(/\n{2,}/g,"\n")},U=e=>e.replace(/\u200b/g," "),H=e=>L(e).replace(/\r/g,"\n").replace(/\n{2,}/g,"\n"),J=(...e)=>{A.dev&&console.info(...e)},W=(...e)=>{console.info(...e)},q=e=>y(e)?e.replace(/\r?\n/g,"\\n").replace(/\r/g,"\\n"):e,G=(e="0.0.0",t="0.0.0")=>{let r=!1;const n=e.split(".").map(e=>parseInt(e,10)),o=t.split(".").map(e=>parseInt(e,10));for(let e=0;e<n.length;e++){(n[e]||0)>(o[e]||0)&&(r=!0)}return r},K=()=>{const e=new Map;return t=>{if(t&&!/^0+$/.test(t)&&"select"!==t){if(e.has(t)){const r=e.get(t);return e.set(t,r+1),`${t}-${r}`}e.set(t,0)}return t}},Y=new Map,V=(t,r)=>{const{expMap:n,wordMaps:o,textMap:s}=r,i=H(t);let a=i;return i?(null==s?void 0:s.has(i))?e(s.get(i)):(a=((t,r,n=[])=>{if(Y.has(t))return Y.get(t);let o=t;for(let[t,s]of r)o=o.replace(t,(...t)=>{let r=t[t.length-2],o=t[t.length-1],i=s;r-1>=0&&("/"==o[r-1]||"\n"==o[r-1])&&(i=e(i));for(let e=1;e<t.length-2;e++){let r=t[e],o=!1;n.forEach(t=>{t.has(r)&&(i=i.replace("$"+e,t.get(r)),o=!0)}),o||(i=i.replace("$"+e,t[e]))}return i}),t.lastIndex=0;return t!==o&&Y.set(t,o),o})(i,n,o),i!==a?e(a):t):t},Q=(e,t,r)=>{if(!e||!y(e[t]))return;const n=e[t];e[t]=V(n,r)};var X=function(){this.__data__=[],this.size=0};var Z=function(e,t){return e===t||e!=e&&t!=t};var ee=function(e,t){for(var r=e.length;r--;)if(Z(e[r][0],t))return r;return-1},te=Array.prototype.splice;var re=function(e){var t=this.__data__,r=ee(t,e);return!(r<0)&&(r==t.length-1?t.pop():te.call(t,r,1),--this.size,!0)};var ne=function(e){var t=this.__data__,r=ee(t,e);return r<0?void 0:t[r][1]};var oe=function(e){return ee(this.__data__,e)>-1};var se=function(e,t){var r=this.__data__,n=ee(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function ie(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ie.prototype.clear=X,ie.prototype.delete=re,ie.prototype.get=ne,ie.prototype.has=oe,ie.prototype.set=se;var ae=ie;var ce=function(){this.__data__=new ae,this.size=0};var le=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var ue=function(e){return this.__data__.get(e)};var de=function(e){return this.__data__.has(e)};var he=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var pe,fe=function(e){if(!he(e))return!1;var t=m(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},me=s["__core-js_shared__"],ve=(pe=/[^.]+$/.exec(me&&me.keys&&me.keys.IE_PROTO||""))?"Symbol(src)_1."+pe:"";var ge=function(e){return!!ve&&ve in e},ye=Function.prototype.toString;var we=function(e){if(null!=e){try{return ye.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Ee=/^\[object .+?Constructor\]$/,be=Function.prototype,ke=Object.prototype,Se=be.toString,Ie=ke.hasOwnProperty,_e=RegExp("^"+Se.call(Ie).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xe=function(e){return!(!he(e)||ge(e))&&(fe(e)?_e:Ee).test(we(e))};var Ce=function(e,t){return null==e?void 0:e[t]};var Ae=function(e,t){var r=Ce(e,t);return xe(r)?r:void 0},Te=Ae(s,"Map"),je=Ae(Object,"create");var Me=function(){this.__data__=je?je(null):{},this.size=0};var Re=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Pe=Object.prototype.hasOwnProperty;var Fe=function(e){var t=this.__data__;if(je){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Pe.call(t,e)?t[e]:void 0},Oe=Object.prototype.hasOwnProperty;var De=function(e){var t=this.__data__;return je?void 0!==t[e]:Oe.call(t,e)};var Ne=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=je&&void 0===t?"__lodash_hash_undefined__":t,this};function ze(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze.prototype.clear=Me,ze.prototype.delete=Re,ze.prototype.get=Fe,ze.prototype.has=De,ze.prototype.set=Ne;var Be=ze;var Le=function(){this.size=0,this.__data__={hash:new Be,map:new(Te||ae),string:new Be}};var $e=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ue=function(e,t){var r=e.__data__;return $e(t)?r["string"==typeof t?"string":"hash"]:r.map};var He=function(e){var t=Ue(this,e).delete(e);return this.size-=t?1:0,t};var Je=function(e){return Ue(this,e).get(e)};var We=function(e){return Ue(this,e).has(e)};var qe=function(e,t){var r=Ue(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Ge(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ge.prototype.clear=Le,Ge.prototype.delete=He,Ge.prototype.get=Je,Ge.prototype.has=We,Ge.prototype.set=qe;var Ke=Ge;var Ye=function(e,t){var r=this.__data__;if(r instanceof ae){var n=r.__data__;if(!Te||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ke(n)}return r.set(e,t),this.size=r.size,this};function Ve(e){var t=this.__data__=new ae(e);this.size=t.size}Ve.prototype.clear=ce,Ve.prototype.delete=le,Ve.prototype.get=ue,Ve.prototype.has=de,Ve.prototype.set=Ye;var Qe=Ve;var Xe=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},Ze=function(){try{var e=Ae(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var et=function(e,t,r){"__proto__"==t&&Ze?Ze(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},tt=Object.prototype.hasOwnProperty;var rt=function(e,t,r){var n=e[t];tt.call(e,t)&&Z(n,r)&&(void 0!==r||t in e)||et(e,t,r)};var nt=function(e,t,r,n){var o=!r;r||(r={});for(var s=-1,i=t.length;++s<i;){var a=t[s],c=n?n(r[a],e[a],a,r,e):void 0;void 0===c&&(c=e[a]),o?et(r,a,c):rt(r,a,c)}return r};var ot=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var st=function(e){return g(e)&&"[object Arguments]"==m(e)},it=Object.prototype,at=it.hasOwnProperty,ct=it.propertyIsEnumerable,lt=st(function(){return arguments}())?st:function(e){return g(e)&&at.call(e,"callee")&&!ct.call(e,"callee")};var ut=function(){return!1},dt=r((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r?s.Buffer:void 0,i=(o?o.isBuffer:void 0)||ut;e.exports=i})),ht=/^(?:0|[1-9]\d*)$/;var pt=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ht.test(e))&&e>-1&&e%1==0&&e<t};var ft=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},mt={};mt["[object Float32Array]"]=mt["[object Float64Array]"]=mt["[object Int8Array]"]=mt["[object Int16Array]"]=mt["[object Int32Array]"]=mt["[object Uint8Array]"]=mt["[object Uint8ClampedArray]"]=mt["[object Uint16Array]"]=mt["[object Uint32Array]"]=!0,mt["[object Arguments]"]=mt["[object Array]"]=mt["[object ArrayBuffer]"]=mt["[object Boolean]"]=mt["[object DataView]"]=mt["[object Date]"]=mt["[object Error]"]=mt["[object Function]"]=mt["[object Map]"]=mt["[object Number]"]=mt["[object Object]"]=mt["[object RegExp]"]=mt["[object Set]"]=mt["[object String]"]=mt["[object WeakMap]"]=!1;var vt=function(e){return g(e)&&ft(e.length)&&!!mt[m(e)]};var gt=function(e){return function(t){return e(t)}},yt=r((function(e,t){var r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,s=o&&o.exports===r&&n.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=i})),wt=yt&&yt.isTypedArray,Et=wt?gt(wt):vt,bt=Object.prototype.hasOwnProperty;var kt=function(e,t){var r=v(e),n=!r&<(e),o=!r&&!n&&dt(e),s=!r&&!n&&!o&&Et(e),i=r||n||o||s,a=i?ot(e.length,String):[],c=a.length;for(var l in e)!t&&!bt.call(e,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||pt(l,c))||a.push(l);return a},St=Object.prototype;var It=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||St)},_t=E(Object.keys,Object),xt=Object.prototype.hasOwnProperty;var Ct=function(e){if(!It(e))return _t(e);var t=[];for(var r in Object(e))xt.call(e,r)&&"constructor"!=r&&t.push(r);return t};var At=function(e){return null!=e&&ft(e.length)&&!fe(e)};var Tt=function(e){return At(e)?kt(e):Ct(e)};var jt=function(e,t){return e&&nt(t,Tt(t),e)};var Mt=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},Rt=Object.prototype.hasOwnProperty;var Pt=function(e){if(!he(e))return Mt(e);var t=It(e),r=[];for(var n in e)("constructor"!=n||!t&&Rt.call(e,n))&&r.push(n);return r};var Ft=function(e){return At(e)?kt(e,!0):Pt(e)};var Ot=function(e,t){return e&&nt(t,Ft(t),e)},Dt=r((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r?s.Buffer:void 0,i=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=i?i(r):new e.constructor(r);return e.copy(n),n}}));var Nt=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var zt=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var i=e[r];t(i,r,e)&&(s[o++]=i)}return s};var Bt=function(){return[]},Lt=Object.prototype.propertyIsEnumerable,$t=Object.getOwnPropertySymbols,Ut=$t?function(e){return null==e?[]:(e=Object(e),zt($t(e),(function(t){return Lt.call(e,t)})))}:Bt;var Ht=function(e,t){return nt(e,Ut(e),t)};var Jt=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},Wt=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Jt(t,Ut(e)),e=b(e);return t}:Bt;var qt=function(e,t){return nt(e,Wt(e),t)};var Gt=function(e,t,r){var n=t(e);return v(e)?n:Jt(n,r(e))};var Kt=function(e){return Gt(e,Tt,Ut)};var Yt=function(e){return Gt(e,Ft,Wt)},Vt=Ae(s,"DataView"),Qt=Ae(s,"Promise"),Xt=Ae(s,"Set"),Zt=Ae(s,"WeakMap"),er=we(Vt),tr=we(Te),rr=we(Qt),nr=we(Xt),or=we(Zt),sr=m;(Vt&&"[object DataView]"!=sr(new Vt(new ArrayBuffer(1)))||Te&&"[object Map]"!=sr(new Te)||Qt&&"[object Promise]"!=sr(Qt.resolve())||Xt&&"[object Set]"!=sr(new Xt)||Zt&&"[object WeakMap]"!=sr(new Zt))&&(sr=function(e){var t=m(e),r="[object Object]"==t?e.constructor:void 0,n=r?we(r):"";if(n)switch(n){case er:return"[object DataView]";case tr:return"[object Map]";case rr:return"[object Promise]";case nr:return"[object Set]";case or:return"[object WeakMap]"}return t});var ir=sr,ar=Object.prototype.hasOwnProperty;var cr=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ar.call(e,"index")&&(r.index=e.index,r.input=e.input),r},lr=s.Uint8Array;var ur=function(e){var t=new e.constructor(e.byteLength);return new lr(t).set(new lr(e)),t};var dr=function(e,t){var r=t?ur(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},hr=/\w*$/;var pr=function(e){var t=new e.constructor(e.source,hr.exec(e));return t.lastIndex=e.lastIndex,t},fr=i?i.prototype:void 0,mr=fr?fr.valueOf:void 0;var vr=function(e){return mr?Object(mr.call(e)):{}};var gr=function(e,t){var r=t?ur(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)};var yr=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return ur(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return dr(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return gr(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return pr(e);case"[object Set]":return new n;case"[object Symbol]":return vr(e)}},wr=Object.create,Er=function(){function e(){}return function(t){if(!he(t))return{};if(wr)return wr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var br=function(e){return"function"!=typeof e.constructor||It(e)?{}:Er(b(e))};var kr=function(e){return g(e)&&"[object Map]"==ir(e)},Sr=yt&&yt.isMap,Ir=Sr?gt(Sr):kr;var _r=function(e){return g(e)&&"[object Set]"==ir(e)},xr=yt&&yt.isSet,Cr=xr?gt(xr):_r,Ar={};Ar["[object Arguments]"]=Ar["[object Array]"]=Ar["[object ArrayBuffer]"]=Ar["[object DataView]"]=Ar["[object Boolean]"]=Ar["[object Date]"]=Ar["[object Float32Array]"]=Ar["[object Float64Array]"]=Ar["[object Int8Array]"]=Ar["[object Int16Array]"]=Ar["[object Int32Array]"]=Ar["[object Map]"]=Ar["[object Number]"]=Ar["[object Object]"]=Ar["[object RegExp]"]=Ar["[object Set]"]=Ar["[object String]"]=Ar["[object Symbol]"]=Ar["[object Uint8Array]"]=Ar["[object Uint8ClampedArray]"]=Ar["[object Uint16Array]"]=Ar["[object Uint32Array]"]=!0,Ar["[object Error]"]=Ar["[object Function]"]=Ar["[object WeakMap]"]=!1;var Tr=function e(t,r,n,o,s,i){var a,c=1&r,l=2&r,u=4&r;if(n&&(a=s?n(t,o,s,i):n(t)),void 0!==a)return a;if(!he(t))return t;var d=v(t);if(d){if(a=cr(t),!c)return Nt(t,a)}else{var h=ir(t),p="[object Function]"==h||"[object GeneratorFunction]"==h;if(dt(t))return Dt(t,c);if("[object Object]"==h||"[object Arguments]"==h||p&&!s){if(a=l||p?{}:br(t),!c)return l?qt(t,Ot(a,t)):Ht(t,jt(a,t))}else{if(!Ar[h])return s?t:{};a=yr(t,h,c)}}i||(i=new Qe);var f=i.get(t);if(f)return f;i.set(t,a),Cr(t)?t.forEach((function(o){a.add(e(o,r,n,o,t,i))})):Ir(t)&&t.forEach((function(o,s){a.set(s,e(o,r,n,s,t,i))}));var m=d?void 0:(u?l?Yt:Kt:l?Ft:Tt)(t);return Xe(m||t,(function(o,s){m&&(o=t[s=o]),rt(a,s,e(o,r,n,s,t,i))})),a};var jr=function(e){return Tr(e,5)};const Mr=(e,t,r,n)=>{if(A.dev){let o=n;n&&(o=jr(n));let s,i=r[1];if(i&&(i.headers?s=i:i.params&&(s=i.params),i.query)){let e=[];for(let t in i.query){let r=i.query[t];if("string"!=typeof r&&"function"==typeof r[Symbol.iterator])for(let n in r)e.push(`${t}=${n}`);else e.push(`${t}=${r}`)}r[0]+="?"+e.join("&")}J(`%c${e}%c %c${r[0]}`,...(e=>[`background-color:${e};color:#fff;padding:0 0.3em`,"",`color:${e};text-decoration:underline`])(t),s||"",...n instanceof ArrayBuffer&&0==n.byteLength?[]:["\n=>",o])}},Rr=e=>{const t=e.replace(/{num}/g,"\\d+").replace(/{uuid}/g,"[a-f\\d]{8}-([a-f\\d]{4}-){3}[a-f\\d]{12}");return new RegExp(`^${t}$`)},Pr={get:new Map,post:new Map,patch:new Map,put:new Map,delete:new Map},Fr=(e,t,r)=>{if(!r.has(e)){const t=e.includes("{")||e.includes("("),n={handles:[],key:t?Rr(e):e,type:t?"regexp":"string"};r.set(e,n)}const n=r.get(e);Array.isArray(t)?n.handles=n.handles.concat(t):n.handles.push(t)},Or=(e,t,r)=>{if(Array.isArray(e))for(let n of e)Fr(n,t,r);else Fr(e,t,r)},Dr=e=>(t,r)=>{const n=Pr[e];if(r)Or(t,r,n);else{const e=t;for(let[t,r]of e)Or(t,r,n)}},Nr={get:Dr("get"),post:Dr("post"),patch:Dr("patch"),put:Dr("put"),delete:Dr("delete")},zr={GET:"#009688",PATCH:"#8BC34A",POST:"#3F51B5",PUT:"#9C27B0",DELETE:"#4C27B0"},Br=(e,t,r,n)=>async(...o)=>{var s,i;return Mr(e,zr[e],[t,r],null===(s=o[0])||void 0===s?void 0:s.body),await(async(e,t,r)=>{try{for(let[n,o]of r){let r=!1;if(("string"===o.type&&o.key===t||"regexp"===o.type&&o.key.test(t))&&(r=!0),r){const t=o.handles;for(let r of t)await r(e)}}}catch(e){J(e)}})(null===(i=o[0])||void 0===i?void 0:i.body,t,Pr[e.toLowerCase()]),n(...o)},Lr=Array.prototype.push;Array.prototype.push=function(...e){var t;if("object"==typeof e[0]&&(null===(t=e[0])||void 0===t?void 0:t.method)){const{path:t,method:r,options:n,resolve:o}=e[0];e[0].resolve=Br(r.toUpperCase(),t,n,o)}return Lr.apply(this,e)};const{origin:$r,version:Ur}=A,Hr=async()=>{const e=Math.floor(Date.now()/1e3/60/60/6),t=await fetch(`${$r}/manifest.json?t=${e}`);if(t.ok){const e=await t.json();return e.time=Date.now(),localStorage.setItem("sczh:manifest",JSON.stringify(e)),e}throw new Error(`${t.status} ${t.url}`)},Jr=new Promise((e,t)=>{(async()=>{let e;try{let t=localStorage.getItem("sczh:manifest");t&&(e=JSON.parse(t)),Date.now()-e.time>60*A.cacheTime*1e3&&(e=!1)}catch(e){}return e?G(Ur,e.version)?e=await Hr():setTimeout(Hr,5e3):e=await Hr(),e})().then(t=>{A.newVersion=t.version,A.hashes=t.hashes,e(t)}).catch(t)}),Wr=async(e,t)=>{if(!t){const{hashes:r}=await Jr;t=r[e.replace(/^\/(data\/)?/,"")]}return await(async e=>new Promise((t,r)=>{let n=setTimeout(()=>{r(`불러오기${e}시간초과`)},1e3*A.timeout);fetch(`${$r}${e}`).then(e=>{if(clearTimeout(n),!e.ok)return r(`${e.status} ${e.url}`),"";const t=e.headers.get("content-type");return(null==t?void 0:t.includes("json"))?e.json():e.text()}).then(t).catch(r)}))(`${e}${t?"?v="+t:""}`)};var qr=r((function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=!t.document&&!!t.postMessage,n=r&&/blob:/i.test((t.location||{}).protocol),o={},s=0,i={parse:function(r,n){var a=(n=n||{}).dynamicTyping||!1;if(b(a)&&(n.dynamicTypingFunction=a,a={}),n.dynamicTyping=a,n.transform=!!b(n.transform)&&n.transform,n.worker&&i.WORKERS_SUPPORTED){var c=function(){if(!i.WORKERS_SUPPORTED)return!1;var r,n,a=(r=t.URL||t.webkitURL||null,n=e.toString(),i.BLOB_URL||(i.BLOB_URL=r.createObjectURL(new Blob(["(",n,")();"],{type:"text/javascript"})))),c=new t.Worker(a);return c.onmessage=v,c.id=s++,o[c.id]=c}();return c.userStep=n.step,c.userChunk=n.chunk,c.userComplete=n.complete,c.userError=n.error,n.step=b(n.step),n.chunk=b(n.chunk),n.complete=b(n.complete),n.error=b(n.error),delete n.worker,void c.postMessage({input:r,config:n,workerId:c.id})}var p=null;return"string"==typeof r?p=n.download?new l(n):new d(n):!0===r.readable&&b(r.read)&&b(r.on)?p=new h(n):(t.File&&r instanceof File||r instanceof Object)&&(p=new u(n)),p.stream(r)},unparse:function(e,t){var r=!1,n=!0,o=",",s="\r\n",a='"',c=a+a,l=!1,u=null;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||i.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(l=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");u=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a)}}();var d=new RegExp(f(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,l);if("object"==typeof e[0])return p(u||h(e[0]),e,l)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:h(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],l);throw new Error("Unable to serialize unrecognized input");function h(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function p(e,t,r){var i="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,c=!Array.isArray(t[0]);if(a&&n){for(var l=0;l<e.length;l++)0<l&&(i+=o),i+=m(e[l],l);0<t.length&&(i+=s)}for(var u=0;u<t.length;u++){var d=a?e.length:t[u].length,h=!1,p=a?0===Object.keys(t[u]).length:0===t[u].length;if(r&&!a&&(h="greedy"===r?""===t[u].join("").trim():1===t[u].length&&0===t[u][0].length),"greedy"===r&&a){for(var f=[],v=0;v<d;v++){var g=c?e[v]:v;f.push(t[u][g])}h=""===f.join("").trim()}if(!h){for(var y=0;y<d;y++){0<y&&!p&&(i+=o);var w=a&&c?e[y]:y;i+=m(t[u][w],y)}u<t.length-1&&(!r||0<d&&!p)&&(i+=s)}}return i}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var n=e.toString().replace(d,c);return"boolean"==typeof r&&r||"function"==typeof r&&r(e,t)||Array.isArray(r)&&r[t]||function(e,t){for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1}(n,i.BAD_DELIMITERS)||-1<n.indexOf(o)||" "===n.charAt(0)||" "===n.charAt(n.length-1)?a+n+a:n}}};if(i.RECORD_SEP=String.fromCharCode(30),i.UNIT_SEP=String.fromCharCode(31),i.BYTE_ORDER_MARK="\ufeff",i.BAD_DELIMITERS=["\r","\n",'"',i.BYTE_ORDER_MARK],i.WORKERS_SUPPORTED=!r&&!!t.Worker,i.NODE_STREAM_INPUT=1,i.LocalChunkSize=10485760,i.RemoteChunkSize=5242880,i.DefaultDelimiter=",",i.Parser=m,i.ParserHandle=p,i.NetworkStreamer=l,i.FileStreamer=u,i.StringStreamer=d,i.ReadableStreamStreamer=h,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var r=e.config||{},n=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)n.push({file:this.files[o],inputElem:this,instanceConfig:a.extend({},r)})})),o(),this;function o(){if(0!==n.length){var t,r,o,c=n[0];if(b(e.before)){var l=e.before(c.file,c.inputElem);if("object"==typeof l){if("abort"===l.action)return t=c.file,r=c.inputElem,o=l.reason,void(b(e.error)&&e.error({name:"AbortError"},t,r,o));if("skip"===l.action)return void s();"object"==typeof l.config&&(c.instanceConfig=a.extend(c.instanceConfig,l.config))}else if("skip"===l)return void s()}var u=c.instanceConfig.complete;c.instanceConfig.complete=function(e){b(u)&&u(e,c.file,c.inputElem),s()},i.parse(c.file,c.instanceConfig)}else b(e.complete)&&e.complete()}function s(){n.splice(0,1),o()}}}function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new p(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,r){if(this.isFirstChunk&&b(this._config.beforeFirstChunk)){var o=this._config.beforeFirstChunk(e);void 0!==o&&(e=o)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var a=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=a.meta.cursor;this._finished||(this._partialLine=s.substring(c-this._baseIndex),this._baseIndex=c),a&&a.data&&(this._rowCount+=a.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)t.postMessage({results:a,workerId:i.WORKER_ID,finished:l});else if(b(this._config.chunk)&&!r){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!l||!b(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){b(this._config.error)?this._config.error(e):n&&this._config.error&&t.postMessage({workerId:i.WORKER_ID,error:e,finished:!1})}}function l(e){var t;(e=e||{}).chunkSize||(e.chunkSize=i.RemoteChunkSize),c.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=E(this._chunkLoaded,this),t.onerror=E(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var o=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+o)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var r=t.statusText||e;this._sendError(new Error(r))}}function u(e){var t,r;(e=e||{}).chunkSize||(e.chunkSize=i.LocalChunkSize),c.call(this,e);var n="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=E(this._chunkLoaded,this),t.onerror=E(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var o=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,o)}var s=t.readAsText(e,this._config.encoding);n||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function d(e){var t;c.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,r=this._config.chunkSize;return r?(e=t.substring(0,r),t=t.substring(r)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function h(e){c.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=E((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=E((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=E((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=E((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function p(e){var t,r,n,o=Math.pow(2,53),s=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,c=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,l=this,u=0,d=0,h=!1,p=!1,v=[],g={data:[],errors:[],meta:{}};if(b(e.step)){var y=e.step;e.step=function(t){if(g=t,S())k();else{if(k(),0===g.data.length)return;u+=t.data.length,e.preview&&u>e.preview?r.abort():(g.data=g.data[0],y(g,l))}}}function E(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function k(){if(g&&n&&(_("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+i.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t<g.data.length;t++)E(g.data[t])&&g.data.splice(t--,1);return S()&&function(){if(g)if(Array.isArray(g.data[0])){for(var t=0;S()&&t<g.data.length;t++)g.data[t].forEach(r);g.data.splice(0,1)}else g.data.forEach(r);function r(t){b(e.transformHeader)&&(t=e.transformHeader(t)),v.push(t)}}(),function(){if(!g||!e.header&&!e.dynamicTyping&&!e.transform)return g;function t(t,r){var n,o=e.header?{}:[];for(n=0;n<t.length;n++){var s=n,i=t[n];e.header&&(s=n>=v.length?"__parsed_extra":v[n]),e.transform&&(i=e.transform(i,s)),i=I(s,i),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(i)):o[s]=i}return e.header&&(n>v.length?_("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+n,d+r):n<v.length&&_("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+n,d+r)),o}var r=1;return!g.data.length||Array.isArray(g.data[0])?(g.data=g.data.map(t),r=g.data.length):g.data=t(g.data,0),e.header&&g.meta&&(g.meta.fields=v),d+=r,g}()}function S(){return e.header&&0===v.length}function I(t,r){return n=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[n]&&(e.dynamicTyping[n]=e.dynamicTypingFunction(n)),!0===(e.dynamicTyping[n]||e.dynamicTyping)?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&(function(e){if(a.test(e)){var t=parseFloat(e);if(s<t&&t<o)return!0}return!1}(r)?parseFloat(r):c.test(r)?new Date(r):""===r?null:r):r;var n}function _(e,t,r,n){var o={type:e,code:t,message:r};void 0!==n&&(o.row=n),g.errors.push(o)}this.parse=function(o,s,a){var c=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var r=new RegExp(f(t)+"([^]*?)"+f(t),"gm"),n=(e=e.replace(r,"")).split("\r"),o=e.split("\n"),s=1<o.length&&o[0].length<n[0].length;if(1===n.length||s)return"\n";for(var i=0,a=0;a<n.length;a++)"\n"===n[a][0]&&i++;return i>=n.length/2?"\r\n":"\r"}(o,c)),n=!1,e.delimiter)b(e.delimiter)&&(e.delimiter=e.delimiter(o),g.meta.delimiter=e.delimiter);else{var l=function(t,r,n,o,s){var a,c,l,u;s=s||[",","\t","|",";",i.RECORD_SEP,i.UNIT_SEP];for(var d=0;d<s.length;d++){var h=s[d],p=0,f=0,v=0;l=void 0;for(var g=new m({comments:o,delimiter:h,newline:r,preview:10}).parse(t),y=0;y<g.data.length;y++)if(n&&E(g.data[y]))v++;else{var w=g.data[y].length;f+=w,void 0!==l?0<w&&(p+=Math.abs(w-l),l=w):l=w}0<g.data.length&&(f/=g.data.length-v),(void 0===c||p<=c)&&(void 0===u||u<f)&&1.99<f&&(c=p,a=h,u=f)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);l.successful?e.delimiter=l.bestDelimiter:(n=!0,e.delimiter=i.DefaultDelimiter),g.meta.delimiter=e.delimiter}var u=w(e);return e.preview&&e.header&&u.preview++,t=o,r=new m(u),g=r.parse(t,s,a),k(),h?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,r.abort(),t=b(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){l.streamer._halted?(h=!1,l.streamer.parseChunk(t,!0)):setTimeout(l.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,r.abort(),g.meta.aborted=!0,b(e.complete)&&e.complete(g),t=""}}function f(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,r=(e=e||{}).delimiter,n=e.newline,o=e.comments,s=e.step,a=e.preview,c=e.fastMode,l=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(l=e.escapeChar),("string"!=typeof r||-1<i.BAD_DELIMITERS.indexOf(r))&&(r=","),o===r)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||-1<i.BAD_DELIMITERS.indexOf(o))&&(o=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var u=0,d=!1;this.parse=function(e,i,h){if("string"!=typeof e)throw new Error("Input must be a string");var p=e.length,m=r.length,v=n.length,g=o.length,y=b(s),w=[],E=[],k=[],S=u=0;if(!e)return N();if(c||!1!==c&&-1===e.indexOf(t)){for(var I=e.split(n),_=0;_<I.length;_++){if(k=I[_],u+=k.length,_!==I.length-1)u+=n.length;else if(h)return N();if(!o||k.substring(0,g)!==o){if(y){if(w=[],P(k.split(r)),z(),d)return N()}else P(k.split(r));if(a&&a<=_)return w=w.slice(0,a),N(!0)}}return N()}for(var x=e.indexOf(r,u),C=e.indexOf(n,u),A=new RegExp(f(l)+f(t),"g"),T=e.indexOf(t,u);;)if(e[u]!==t)if(o&&0===k.length&&e.substring(u,u+g)===o){if(-1===C)return N();u=C+v,C=e.indexOf(n,u),x=e.indexOf(r,u)}else{if(-1!==x&&(x<C||-1===C)){if(!(x<T)){k.push(e.substring(u,x)),u=x+m,x=e.indexOf(r,u);continue}var j=B(x,T,C);if(j&&void 0!==j.nextDelim){x=j.nextDelim,T=j.quoteSearch,k.push(e.substring(u,x)),u=x+m,x=e.indexOf(r,u);continue}}if(-1===C)break;if(k.push(e.substring(u,C)),D(C+v),y&&(z(),d))return N();if(a&&w.length>=a)return N(!0)}else for(T=u,u++;;){if(-1===(T=e.indexOf(t,T+1)))return h||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:u}),O();if(T===p-1)return O(e.substring(u,T).replace(A,t));if(t!==l||e[T+1]!==l){if(t===l||0===T||e[T-1]!==l){-1!==x&&x<T+1&&(x=e.indexOf(r,T+1)),-1!==C&&C<T+1&&(C=e.indexOf(n,T+1));var M=F(-1===C?x:Math.min(x,C));if(e[T+1+M]===r){k.push(e.substring(u,T).replace(A,t)),e[u=T+1+M+m]!==t&&(T=e.indexOf(t,u)),x=e.indexOf(r,u),C=e.indexOf(n,u);break}var R=F(C);if(e.substring(T+1+R,T+1+R+v)===n){if(k.push(e.substring(u,T).replace(A,t)),D(T+1+R+v),x=e.indexOf(r,u),T=e.indexOf(t,u),y&&(z(),d))return N();if(a&&w.length>=a)return N(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:u}),T++}}else T++}return O();function P(e){w.push(e),S=u}function F(t){var r=0;if(-1!==t){var n=e.substring(T+1,t);n&&""===n.trim()&&(r=n.length)}return r}function O(t){return h||(void 0===t&&(t=e.substring(u)),k.push(t),u=p,P(k),y&&z()),N()}function D(t){u=t,P(k),k=[],C=e.indexOf(n,u)}function N(e){return{data:w,errors:E,meta:{delimiter:r,linebreak:n,aborted:d,truncated:!!e,cursor:S+(i||0)}}}function z(){s(N()),w=[],E=[]}function B(n,o,s){var i={nextDelim:void 0,quoteSearch:void 0},a=e.indexOf(t,o+1);if(o<n&&n<a&&(a<s||-1===s)){var c=e.indexOf(r,a);if(-1===c)return i;a<c&&(a=e.indexOf(t,a+1)),i=B(c,a,s)}else i={nextDelim:n,quoteSearch:o};return i}},this.abort=function(){d=!0},this.getCharIndex=function(){return u}}function v(e){var t=e.data,r=o[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){n=!0,g(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(b(r.userStep)){for(var i=0;i<t.results.data.length&&(r.userStep({data:t.results.data[i],errors:t.results.errors,meta:t.results.meta},s),!n);i++);delete t.results}else b(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&g(t.workerId,t.results)}function g(e,t){var r=o[e];b(r.userComplete)&&r.userComplete(t),r.terminate(),delete o[e]}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=w(e[r]);return t}function E(e,t){return function(){e.apply(t,arguments)}}function b(e){return"function"==typeof e}return n&&(t.onmessage=function(e){var r=e.data;if(void 0===i.WORKER_ID&&r&&(i.WORKER_ID=r.workerId),"string"==typeof r.input)t.postMessage({workerId:i.WORKER_ID,results:i.parse(r.input,r.config),finished:!0});else if(t.File&&r.input instanceof File||r.input instanceof Object){var n=i.parse(r.input,r.config);n&&t.postMessage({workerId:i.WORKER_ID,results:n,finished:!0})}}),(l.prototype=Object.create(c.prototype)).constructor=l,(u.prototype=Object.create(c.prototype)).constructor=u,(d.prototype=Object.create(d.prototype)).constructor=d,(h.prototype=Object.create(c.prototype)).constructor=h,i}()}));const Gr=e=>{try{return qr.parse(e.replace(/^\ufeff/,""),{header:!0}).data}catch(e){return console.log(e),{}}},Kr=(e,t="EMPTY")=>e.sort((e,r)=>{let n=e,o=r;return"EMPTY"!==t&&(n=e[t],o=r[t]),o||(o=""),n||(n=""),o.length>n.length?1:n.length>o.length?-1:0});let Yr=null;const Vr=async e=>{if(!Yr)try{const e=localStorage.getItem("sczh:data");if(!e)return!1;Yr=JSON.parse(e)}catch(e){return console.error(e),!1}if(G(A.version,Yr.version))return Yr=null,localStorage.removeItem("sczh:data"),!1;let t=e;/(\.csv|\.json)/.test(e)||(t=e+".csv");const{hashes:r}=await Jr,n=r[t],o=Yr.hashes[t];return o&&o===n?Yr[e]:(Yr.hashes[t]=n,!1)},Qr=(e,t)=>{Yr&&Yr.hashes||(Yr={hashes:A.hashes,version:A.version});let r=e;/(\.csv|\.json)/.test(e)||(r=e+".csv");const n=A.hashes[r];n&&(Yr.hashes[r]=n),Yr[e]=t;const o=JSON.stringify(Yr);try{localStorage.setItem("sczh:data",o)}catch(e){console.error(e)}},Xr=new Map,Zr=async(e,t)=>{const r=t||e;if(Xr.has(e))return Xr.get(e);let n=await Vr(e);n||(n=await Wr(`/data/${r}.csv`),Qr(e,n));const o=Gr(n);return Xr.set(e,o),o},en=e=>{const t=new Map;let r=!1;const{name:n,path:o}=e,s=e.keys||{},i=s.text||"text",a=s.trans||"trans";return async()=>{if(!r){const s=await Zr(n,o);e.sort&&Kr(s,e.sort),s.forEach(e=>{const r=$(e[i]),n=U($(e[a],!0));r&&n&&t.set(r,n)}),r=!0}return t}},tn=(e,t=[])=>{let r=e.replace(/\./g,"\\.").replace(/\$num/g,"([+-+-]?[0-90-9]{1,10}\\.?[0-90-9]{0,4}?)").replace(/\$percent/g,"([+-+-]?[0-90-9]{1,10}\\.?[0-90-9]{0,4}?[%%])").replace(/\$unknown/g,"([\\s\\S]+)").replace(/\$uk/g,"([\\s\\S]+)").replace(/\$sep/g,"[\\s\\S]?");return t.forEach(e=>{r=r.replace(e.re,e.exp),e.re.lastIndex=0}),new RegExp(r,"gi")},rn=en({name:"name",keys:{text:"name"}}),nn=en({name:"etc/idol-name",keys:{text:"name"}});let on=null;const sn=async(e=!0)=>{if(on)return on;const t=await nn();on=new Map;for(let[r,n]of t){const t=r.split(" "),o=n.split(" ");e&&on.set(t[1],o[1]),on.set(t.join(""),o.join(" ")),on.set(r,o[1])}return on};let an=null;const cn=(t,r)=>{let n=null;const o=((e,...t)=>{let r=null,n=null;return async()=>(n||(n=e(...t)),r||(r=await n),r)})((e=>{let t=!1,r=new Map,n=[],o=new Map;return async()=>{if(!t){const s=await Zr(e),i=await sn(),a=new Map,c=new Map,l=new Map,u=new Map([["name",[...i.keys()]]]),d=[];Kr(s,"text").forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=U($(e.trans,!0)),n=L(e.type);t&&r&&(void 0===n||"text"===n?c.set(t,r):n&&"exp"!==n?(u.has(n)||u.set(n,[]),u.get(n).push((e=>e.replace(/\?/g,"\\?").replace(/\./g,"\\.").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\(/g,"\\(").replace(/\)/g,"\\)"))(t)),a.set(t,r)):l.set(t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),r))}});for(let[e,t]of u)d.push({re:new RegExp("\\$"+e,"g"),exp:`(${t.join("|")})`});for(let[e,t]of l){const r=tn(e,d);o.set(r,t)}r=new Map([...c,...a,...i]),n=[a,i],t=!0}return{expMap:o,wordMaps:n,textMap:r}}})(t)),s=e=>async t=>(n||(n=await o(),r&&await r()),e&&e(t),n),i=e=>e.map(e=>{const t=e[1];return Array.isArray(t)?e[1]=t.map(e=>s(e)):e[1]=s(t),e}),a=(e,t)=>{const r=e.match(/(.+?)([++]+)$/);return r?V(r[1],t)+r[2]:V(e,t)};return{api:{get(e){Nr.get(i(e))},post(e){Nr.post(i(e))},put(e){Nr.put(i(e))},patch(e){Nr.patch(i(e))},delete(e){Nr.delete(i(e))}},transItem:(t,r,o=n)=>{if(null==t?void 0:t[r]){let n=a(t[r],o);if(n!==t[r])return t[r]=e(n,!0);n=((e,t)=>e.split("/").map(e=>a(e,t)).join("/"))(t[r],o),n!==t[r]&&(t[r]=e(n,!0))}},getTransItem:e=>(t,r)=>{e(t,r,n)},ensureData:s()}},{api:ln,transItem:un}=cn("skill"),dn=e=>{var t,r;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{un(e,"effectName"),un(e,"effectDescription")}),null===(r=e.rivalMemoryAppealEffects)||void 0===r||r.forEach(e=>{un(e,"effectName"),un(e,"effectDescription")}))},hn=(e,t=!1)=>{e&&(un(e,"comment"),un(e,"name"),t&&dn(e),e.linkSkill&&(un(e.linkSkill,"comment"),un(e.linkSkill,"name"),t&&dn(e.linkSkill)),e.plusSkill&&(un(e.plusSkill,"comment"),un(e.plusSkill,"name")))},pn=e=>{e&&e.forEach(e=>{un(e,"releaseConditions"),un(e.passiveSkills,"comment"),un(e.passiveSkills,"name"),hn(e.skill),hn(e.concertActiveSkill),e.activeSkills&&e.activeSkills.forEach(e=>{hn(e)})})},fn=e=>{e.forEach(e=>{hn(e)})},mn=(e,t=!1)=>{var r,n,o;let s=e.userProduceIdol;s&&(null===(r=s.activeSkills)||void 0===r||r.forEach(e=>{hn(e)}),null===(n=s.passiveSkills)||void 0===n||n.forEach(e=>{hn(e)}),null===(o=s.limitBreaks)||void 0===o||o.forEach(e=>{hn(e)}),t&&pn(s.skillPanels))},vn=e=>{e.forEach(e=>{hn(e.skill,!0)})},gn=e=>{e&&e.forEach(e=>{var t,r,n;null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(e=>{e.userFesIdol.activeSkills.forEach(e=>{dn(e)})}),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(e=>{e.userFesIdol.activeSkills.forEach(e=>{hn(e,!0)})}),null===(n=e.rival)||void 0===n||n.rivalSkills.forEach(e=>{dn(e)})})},yn=e=>{pn(e.idol.skillPanels),fn(e.idol.memoryAppeals),(e=>{e.forEach(e=>{hn(e)})})(e.idol.abilities)},wn=e=>{var t,r,n;pn(e.supportIdol.skillPanels),null===(t=e.supportIdol)||void 0===t||null===(r=t.supportIdolActiveSkill)||void 0===r||null===(n=r.activeSkills)||void 0===n||n.forEach(e=>{un(e,"comment"),un(e,"name")})},En=e=>{const t=e.userFesIdol;t.activeSkills.forEach(e=>{hn(e)}),hn(t.memoryAppeal),t.passiveSkills.forEach(e=>{un(e,"comment"),un(e,"name")})},bn=En,kn=e=>{var t,r,n,o;e.userProduceSupportIdols.forEach(e=>{pn(e.skillPanels)}),mn(e,!0),null===(t=e.userProduceLimitedSkills)||void 0===t||t.forEach(e=>{hn(e.passiveSkills),hn(e.skill)}),pn(null===(r=e.userProduceIdol)||void 0===r||null===(n=r.userIdol)||void 0===n||null===(o=n.idol)||void 0===o?void 0:o.skillPanels)},Sn=e=>{var t;e.userFesIdol&&(e.userFesIdol.activeSkills.forEach(e=>{hn(e,!0)}),hn(e.userFesIdol.memoryAppeal,!0),null===(t=e.userFesIdol.passiveSkills)||void 0===t||t.forEach(e=>{un(e,"comment"),un(e,"name"),dn(e)}))},In=e=>{var t,r,n;null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(Sn),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(Sn),null===(n=e.userFesEventDeck)||void 0===n||n.userFesEventDeckMembers.forEach(Sn),vn(e.judges),gn(e.userFesRivals),gn(e.userFesRaidRivals),dn(e.feverActiveSkill)},_n=e=>{var t;null===(t=e.fanActiveSkills)||void 0===t||t.forEach(e=>{hn(e,!0)}),e.userProduceSupportIdols.forEach(e=>{hn(e.activeSkill,!0)});let r=e.userProduceIdol;r.activeSkills.forEach(e=>{hn(e,!0)}),hn(r.memoryAppeal,!0),r.passiveSkills.forEach(e=>{hn(e,!0)});let n=e.produceAudition||e.produceConcert;vn(n.judges),(e=>{e.forEach(e=>{dn(e.rivalMemoryAppeal),e.rivalSkills.forEach(e=>{dn(e)})})})(n.rivals),dn(e.feverActiveSkill)},xn=e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?_n(t):(t.userFesDeck||t.userRaidDeck)&&In(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},Cn=e=>{e.userProduceIdol.activeSkills.forEach(e=>{hn(e)})},An=e=>{var t,r,n;null===(t=e.userProduceReporterEvent)||void 0===t||null===(r=t.produceReporterEventResult)||void 0===r||null===(n=r.produceReporterEventSkills)||void 0===n||n.forEach(e=>{un(e,"name")})},Tn=e=>{var t,r,n,o,s;null==e||null===(t=e.userFesDeck)||void 0===t||null===(r=t.userFesDeckMembers)||void 0===r||r.forEach(Sn),null==e||null===(n=e.userFesRivals)||void 0===n||null===(o=n[0])||void 0===o||null===(s=o.userFesDeckMembers)||void 0===s||s.forEach(Sn)};ln.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[wn]],["userProduce(Teaching)?SupportIdols/{num}",[e=>{var t,r,n,o;pn(e.skillPanels),null===(t=e.userSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r||null===(n=r.supportIdolActiveSkill)||void 0===n||null===(o=n.activeSkills)||void 0===o||o.forEach(e=>{un(e,"comment"),un(e,"name")})}]],["userReserveSupportIdols/userSupportIdol/{num}",[e=>{var t,r,n;pn(e.supportIdol.skillPanels),null===(t=e.supportIdol)||void 0===t||null===(r=t.supportIdolActiveSkill)||void 0===r||null===(n=r.activeSkills)||void 0===n||n.forEach(e=>{un(e,"comment"),un(e,"name")})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[yn]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.activeSkills.forEach(e=>{hn(e)}),fn(e.userIdol.idol.memoryAppeals)}],["userReserveIdols/userIdol/{num}",e=>{pn(e.idol.skillPanels),fn(e.idol.memoryAppeals)}],["userFesIdols/{num}",En],[["userProduces/skillPanels","userProduceTeachings/skillPanels"],kn],["userDecks/skillPanels",e=>{var t,r,n;e.userSupportIdols.forEach(e=>{pn(e.skillPanels)}),pn(null===(t=e.userIdol)||void 0===t?void 0:t.skillPanels),pn(null===(r=e.userIdol)||void 0===r||null===(n=r.idol)||void 0===n?void 0:n.skillPanels)}],["fes(Match)?Concert/actions/resume",[xn]],["earthUsers/{uuid}/userFesIdols/{num}",bn],["userRaidDecks",e=>{e.userRaidDecks.forEach(e=>{e.userRaidDeckMembers.forEach(e=>{var t;null===(t=e.userFesIdol)||void 0===t||t.activeSkills.forEach(e=>{hn(e)})})})}],["userProduceAbilities",Cn],["userProduces",[An]],["userJointFesDecks",e=>{e.userJointFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(Sn)})}],["jointFes/areas/{num}/stages",e=>{var t;null==e||null===(t=e.stages)||void 0===t||t.forEach(e=>{var t,r;return null==e||null===(t=e.rivalFesDeck)||void 0===t||null===(r=t.userFesDeckMembers)||void 0===r?void 0:r.forEach(Sn)})}],["jointFesConcerts/actions/ready",e=>{var t,r,n;null==e||null===(t=e.stage)||void 0===t||null===(r=t.rivalFesDeck)||void 0===r||null===(n=r.userFesDeckMembers)||void 0===n||n.forEach(Sn)}],["jointFesConcerts/actions/resume",Tn]]),ln.post([["userIdols/{num}/produceExSkills/{num}/actions/set",yn],[["userProduce(Teaching)?s/skillPanels/{num}","userProduces/limitedSkills/{num}"],kn],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[wn]],[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],[e=>{e.gameData||mn(e)},xn]],[["produces/actions/resume","produces/actions/next"],[An]],["fes(Match|Raid)?Concert/actions/start",[In]],["fes(Match)?Concert/actions/resume",[xn]],["fesRaidConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userRaidDeck&&In(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],["fesTowerConcert/actions/start",[In]],["fesTowerConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userFesEventDeck&&In(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[_n]],[["produces/actions/next","produces/actions/resume"],e=>{e.userProduceIdol&&fn(e.userProduceIdol.userIdol.idol.memoryAppeals)}],["userProduceAbilities",Cn],["jointFesConcerts/actions/start",Tn]]),ln.patch([["userFesDecks",e=>{e.userFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(Sn)})}],["userSupportIdols/{num}",e=>{wn(e.userSupportIdol)}]]),ln.delete([["userProduces/skillPanels/{num}",kn]]);const{api:jn,transItem:Mn}=cn("etc/ex-skill"),Rn=e=>{Mn(e,"name"),Mn(e,"description")},Pn=e=>{e.userIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})},Fn=e=>{var t;null===(t=e.userSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})},On=e=>{const t=e.userFesIdol;t.userFesIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)}),t.userFesSupportIdols.forEach(e=>{e.userFesSupportIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})})},Dn=On;jn.get([[["userIdols/produceExSkillTop","userSupportIdols/produceExSkillTop","userIdols/{num}/produceExSkillTop","userSupportIdols/{num}/produceExSkillTop"],e=>{var t,r,n,o,s,i;null===(t=e.userIdols)||void 0===t||t.forEach(e=>{var t;null===(t=e.userIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}),null===(r=e.userSupportIdols)||void 0===r||r.forEach(e=>{var t;null===(t=e.userSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}),null===(n=e.userIdol)||void 0===n||null===(o=n.userIdolProduceExSkills)||void 0===o||o.forEach(e=>{Rn(e.produceExSkill)}),null===(s=e.userSupportIdol)||void 0===s||null===(i=s.userSupportIdolProduceExSkills)||void 0===i||i.forEach(e=>{Rn(e.produceExSkill)}),e.userProduceExSkills.forEach(e=>{var t;Rn(e.produceExSkill),Rn(null===(t=e.produceExSkillUpgrade)||void 0===t?void 0:t.produceExSkill)})}],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[Fn]],["userProduce(Teaching)?SupportIdols/{num}",[e=>{var t;null===(t=e.userProduceSupportIdolProduceExSkills)||void 0===t||t.forEach(e=>{Rn(e.produceExSkill)})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[Pn]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.userProduceIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})}],["userFesIdols/{num}",On],["earthUsers/{uuid}/userFesIdols/{num}",Dn],["userProducerSkills/summaries",e=>{e.forEach(e=>{Rn(e)})}]]),jn.post([["userIdols/{num}/produceExSkills/{num}/actions/set",Pn],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[Fn]],["produces/actions/result",[e=>{e.produceExSkillRewards.forEach(e=>{Rn(e.produceExSkill)})}]],["business/actions/finish",e=>{e.slots.forEach(e=>{e.businessProduceExSkillRewards.forEach(e=>{Rn(e.produceExSkill)})})}],["userProduceExSkills/actions/upgrade",e=>{Rn(e.produceExSkill)}]]);const{api:Nn,transItem:zn}=cn("support-skill"),Bn=e=>{null==e||e.forEach(e=>{zn(e,"description"),zn(e,"name")})},Ln=e=>{var t,r,n;const o=null!==(t=e.userSupportIdol)&&void 0!==t?t:e;Bn(o.acquiredSupportSkills),Bn(o.supportSkills),Bn(null===(r=o.supportIdol)||void 0===r?void 0:r.supportSkills),$n(null==o||null===(n=o.supportIdol)||void 0===n?void 0:n.fightSkill)},$n=e=>{var t;e&&(zn(e,"comment"),zn(e,"name"),null==e||null===(t=e.skills)||void 0===t||t.forEach(e=>zn(null==e?void 0:e.skill,"name")))},Un=e=>{var t,r;null==e||null===(t=e.userFesDeck)||void 0===t||null===(r=t.userFesDeckMembers)||void 0===r||r.forEach(e=>{var t,r;return $n(null==e||null===(t=e.userFightSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r?void 0:r.fightSkill)})};Nn.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[Ln]],["userProduce(Teaching)?SupportIdols/{num}",[Ln]],["userReserveSupportIdols/userSupportIdol/{num}",[Ln]],["produces/{num}/decks",e=>{var t;null===(t=e.userSupportIdols)||void 0===t||t.forEach(e=>{var t;Bn(null===(t=e.supportIdol)||void 0===t?void 0:t.supportSkills)})}],["userJointFesDecks",e=>{e.userJointFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(e=>{var t,r;return $n(null==e||null===(t=e.userFightSupportIdol)||void 0===t||null===(r=t.supportIdol)||void 0===r?void 0:r.fightSkill)})})}],["jointFesConcerts/actions/resume",Un],["userSupportIdols",e=>{e.forEach(e=>{var t;return $n(null==e||null===(t=e.supportIdol)||void 0===t?void 0:t.fightSkill)})}]]),Nn.post([["produces/{num}/actions/ready",[e=>{e.userDecks.forEach(e=>{e.userSupportIdols.forEach(e=>{var t;Bn(null===(t=e.supportIdol)||void 0===t?void 0:t.supportSkills)})})}]],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[Ln]],["produces/actions/(resume|next)",[Ln]],[["produceTeachings/resume","produceTeachings/next"],Ln],["jointFesConcerts/actions/start",Un]]),Nn.patch([["userSupportIdols/{num}",Ln],["produces/{num}/produceItem/consume",e=>{Bn(e.supportSkills)}]]);const{api:Hn,transItem:Jn}=cn("etc/idea-note"),Wn=e=>{var t;e&&(Jn(e,"title"),(e=>{Jn(e,"title"),Jn(e,"comment")})(e.produceIdeaNoteCompleteBonus),null===(t=e.produceIdeaNoteExtraBonuses)||void 0===t||t.forEach(e=>{Jn(e,"comment"),Jn(e,"condition")}))},qn=e=>{var t,r;null===(t=e.ideaNoteResult)||void 0===t||null===(r=t.seasonClearBonusIdeaNotes)||void 0===r||r.forEach(e=>{Wn(e)})};Hn.get([["userProduceIdeaNotes",e=>{e.forEach(e=>{Wn(e.produceIdeaNote)})}]]),Hn.post([["produces/actions/(resume|next)",[e=>{var t;null===(t=e.userProduceIdeaNotes)||void 0===t||t.forEach(e=>{Wn(e.produceIdeaNote)})},qn]],["produces/actions/act",[e=>{var t,r,n;null===(t=e.produceEvents)||void 0===t||t.forEach(e=>{var t;null===(t=e.produceIdeaNotes)||void 0===t||t.forEach(e=>{Wn(e)})});let o=null===(r=e.lessonResult)||void 0===r||null===(n=r.userProduceIdeaNote)||void 0===n?void 0:n.produceIdeaNote;Wn(o)}]],["produces/actions/endWeek",qn]]),Hn.patch([["userProduceIdeaNotes/228681479/actions/select",e=>{Wn(e.userProduceIdeaNote.produceIdeaNote)}]]);const{api:Gn,transItem:Kn}=cn("etc/grad-skill"),Yn=e=>{var t;e&&(Kn(e,"comment"),Kn(e,"name"),Kn(e,"acquireComment"),Kn(e,"releaseComment"),null===(t=e.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{Kn(e,"name")}))},Vn=e=>{e.userFesIdol.abilities.forEach(e=>{Yn(e)})},Qn=Vn,Xn=e=>{var t,r;const n=e=>{e.userFesIdol.abilities.forEach(e=>{Yn(e)}),e.userFesIdol.concertAbilities.forEach(e=>{Yn(e)})};null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(n),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(n)},Zn=e=>{var t,r;const n=e.userProduceIdol;n&&(null===(t=n.abilities)||void 0===t||t.forEach(e=>{Yn(e)}),null===(r=n.concertAbilities)||void 0===r||r.forEach(e=>{Yn(e)}))},eo=e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?Zn(t):(t.userFesDeck||t.userRaidDeck)&&Xn(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},to=e=>{e.userProduceIdol.abilities.forEach(e=>{Yn(e)}),e.userProduceAbilities.forEach(e=>{Yn(e.ability)})};Gn.get([["userFesIdols/{num}",Vn],["fes(Match)?Concert/actions/resume",[eo]],["earthUsers/{uuid}/userFesIdols/{num}",Qn],["userProduceAbilities",to],[["userProduceAreas"],e=>{var t;null===(t=e.abilities)||void 0===t||t.forEach(e=>{Yn(e)})}],["jointFesConcerts/actions/resume",Xn]]),Gn.post([[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],[e=>{e.gameData||((e,t=!1)=>{var r;let n=e.userProduceIdol;n&&(null===(r=n.abilities)||void 0===r||r.forEach(e=>{Yn(e)}))})(e)},eo]],["fes(Match|Raid)?Concert/actions/start",[Xn]],["jointFesConcerts/actions/start",Xn],["fes(Match)?Concert/actions/resume",[eo]],["fesRaidConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userRaidDeck&&Xn(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[Zn]],["produces/({num}/audition|concert)/actions/(start|finish)",e=>{var t,r;null===(t=e.concertEvent)||void 0===t||null===(r=t.abilities)||void 0===r||r.forEach(e=>{Kn(e,"name")})}],["userProduceAbilities",to]]);const{api:ro,transItem:no}=cn("etc/landing-point"),oo=e=>{e&&(no(e,"comment"),no(e,"name"),no(e,"acquireComment"),no(e,"releaseComment"))},so=e=>{no(e,"title"),e.produceMusicAssignmentClearBonuses.forEach(e=>{no(e,"title")})},io=e=>{var t,r;no(e.concertBgm,"songTitle"),no(e.concertBgm,"newLineSongTitle"),no(e.feverActiveSkill,"comment"),e.produceMusicProficiencyBonuses.forEach(e=>{var t;no(e,"description"),e.ability&&(oo(e.ability),null===(t=e.ability.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{no(e,"name")}))}),null===(t=e.produceMusicAssignments)||void 0===t||t.forEach(so),null===(r=e.produceMusicProficiencyJudgeStarBonuses)||void 0===r||r.forEach(e=>{no(e,"description")})},ao=e=>{var t,r,n;io(e.produceMusic),null===(t=e.userProduceMusicAssignments)||void 0===t||t.forEach(e=>{so(e.produceMusicAssignment)}),null===(r=e.allUserProduceMusicAssignments)||void 0===r||r.forEach(e=>{so(e.produceMusicAssignment)}),null===(n=e.judgeStarBonuses)||void 0===n||n.forEach(e=>{no(e,"description")})},co=e=>{var t,r;null===(t=e.userProduceMusicProficiencies)||void 0===t||t.forEach(ao),null===(r=e.activatedProduceMusicAssignmentBonuses)||void 0===r||r.forEach(e=>{var t;null===(t=e.produceMusicAssignmentClearBonuses)||void 0===t||t.forEach(e=>{no(e,"title")})})},lo=e=>{var t;oo(e),null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{no(e,"effectDescription"),no(e,"effectName")})},uo=e=>{var t,r,n,o;null===(t=e.produceMusic)||void 0===t||null===(r=t.judgeStarBonuses)||void 0===r||r.forEach(e=>{no(e,"description")}),null===(n=e.userProduceIdol)||void 0===n||null===(o=n.abilities)||void 0===o||o.forEach(lo),no(e.feverActiveSkill,"comment")},ho=e=>{var t,r;null===(t=e.userFesIdol)||void 0===t||null===(r=t.abilities)||void 0===r||r.forEach(lo)},po=ho;ro.get([[["userProduceAreas","produceMusics"],e=>{var t;null===(t=e.produceMusics)||void 0===t||t.forEach(io)}],["userProduces",[co]],["userFesIdols/{num}",ho],["earthUsers/{uuid}/userFesIdols/{num}",po]]),ro.post([[["produces/actions/resume","produces/actions/next"],[co]],["produces/actions/resume",e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?uo(t):t.userFesDeck||t.userRaidDeck,e.gameData=JSON.stringify(t)}catch(e){log(e)}}],["userProduceMusicProficiencies",e=>{ao(e.userProduceMusicProficiency)}],["produces/concert/actions/start",uo]]),ro.patch([["userProduceMusicAssignments/{num}",e=>{so(e.produceMusicAssignment)}]]);const{api:fo,transItem:mo}=cn("etc/match-live"),vo=function(e){var t;e&&(mo(e,"name"),mo(e,"desc"),mo(null==e?void 0:e.produce,"title"),null==e||null===(t=e.achievements)||void 0===t||t.forEach(e=>mo(e,"name")))},go=e=>{var t;vo(null==e?void 0:e.jointFesVenue),null==e||null===(t=e.userStageMissions)||void 0===t||t.forEach(e=>mo(null==e?void 0:e.mission,"comment"))};fo.get([["jointFes/trophies",e=>{var t,r;null==e||null===(t=e.trophies)||void 0===t||t.forEach(e=>mo(e,"comment")),null==e||null===(r=e.trophies)||void 0===r||r.forEach(e=>mo(e,"name"))}],["jointFes/areas/{num}/stages",e=>{var t;null==e||null===(t=e.stages)||void 0===t||t.forEach(vo)}],["jointFesConcerts/actions/ready",e=>{vo(null==e?void 0:e.stage)}],["jointFesConcerts/actions/resume",go],["facilities",e=>{var t,r;null==e||null===(t=e.userFacilities)||void 0===t||t.forEach((function(e){var t,r;mo(null==e?void 0:e.facility,"name"),null==e||null===(t=e.facility)||void 0===t||null===(r=t.facilityEffects)||void 0===r||r.forEach(e=>mo(e,"comment"))})),null==e||null===(r=e.userFacilityItems)||void 0===r||r.forEach(e=>(mo(null==e?void 0:e.facilityItem,"comment"),mo(null==e?void 0:e.facilityItem,"name")))}]]),fo.post([["jointFesConcerts/actions/start",go]]);const{api:yo,transItem:wo}=cn("etc/festour"),Eo=e=>{var t;null===(t=e.suggestFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{So(e)})},bo=e=>{var t;null===(t=e.suggestFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{wo(e.fesTowerBonus,"desc")})},ko=e=>{let t=e.userFesTowerAreaSkipBonus;t&&wo(t.fesTowerBonus,"desc")},So=e=>{var t;e&&(null===(t=e.userFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{_o(e)}))},Io=e=>{var t;e&&(null===(t=e.fesTowerBonusIdolConditions)||void 0===t||t.forEach(e=>{wo(e,"desc")}))},_o=e=>{var t,r;e&&(null===(t=e.fesTowerCompleteBonus)||void 0===t||null===(r=t.fesTowerBonuses)||void 0===r||r.forEach(e=>{wo(e,"desc")}))},xo=e=>{var t;e&&(null===(t=e.evaluationDetails)||void 0===t||t.forEach(e=>{wo(e,"evaluation")}))},Co=e=>{var t;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{wo(e,"effectDescription")}))},Ao=e=>{var t;null===(t=e.userFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{wo(e.fesTowerBonus,"desc")})};yo.get([["userFesTowerResults",xo],["userFesTowerAdvantages",[e=>{var t;e&&(null===(t=e.fesTowerAdvantageFilters)||void 0===t||t.forEach(e=>{wo(e,"title")}))},e=>{var t;e&&(null===(t=e.userFesTowerAdvantages)||void 0===t||t.forEach(e=>{wo(e,"name"),wo(e.fesTowerAdvantageEffect,"desc"),wo(e.nextFesTowerAdvantageEffect,"desc"),Co(Co)}))}]],["userFesTowerItems",e=>{var t;e&&(null===(t=e.userFesTowerItems)||void 0===t||t.forEach(e=>{wo(e,"name"),wo(e.fesTowerItemLevel,"desc"),wo(e.nextFesTowerItemLevel,"desc")}))}],[["fesTowerBonusIdols"],e=>{var t;null===(t=e.fesTowerBonusIdols)||void 0===t||t.forEach(e=>{Io(e)})}]]),yo.post([["userFesTowerResults",xo],["fesTowerEvents/top",[Eo,bo,ko,So,e=>{var t;null===(t=e.userFesTowerAreas)||void 0===t||t.forEach(e=>{Ao(e)})}]]]),yo.patch([["userFesTowerAdvantages/action/acquire",e=>{e&&(wo(e,"name"),wo(e.fesTowerAdvantageEffect,"desc"),wo(e.nextFesTowerAdvantageEffect,"desc"))}],["userFesTowerItems/action/acquire",e=>{e&&(wo(e,"name"),wo(e.fesTowerItemLevel,"desc"),wo(e.nextFesTowerItemLevel,"desc"))}],["userFesTowerAreas/action/complete",Eo],["userFesTowerAreas/action/skip",Eo],[["fesTowerEvents/top","userFesTowers/action/skip"],[Eo,bo,ko]]]);const{api:To,transItem:jo}=cn("etc/knowhowbook"),Mo=e=>{var t;null===(t=e.userKnowHowBooks)||void 0===t||t.forEach(e=>{Ro(e)})},Ro=e=>{var t;null===(t=e.userKnowHowBookIndividualities)||void 0===t||t.forEach(e=>{Po(e.individuality)})},Po=e=>{e&&(jo(e,"name"),jo(e,"description"))},Fo=e=>{e&&(jo(e,"name"),e.ability&&(jo(e.ability,"comment"),jo(e.ability,"name")),e.activeSkill&&jo(e.activeSkill,"comment"))};To.get([[["userProduceAreas","userProduces/growths"],e=>{var t;null===(t=e.userProduceGrowths)||void 0===t||t.forEach(e=>{Fo(e.produceGrowth)})}],[["userKnowHowBooks"],Mo]]),To.post([[["produces/actions/endWeek","produces/actions/resume"],e=>{var t;null===(t=e.availableIndividualities)||void 0===t||t.forEach(e=>{Po(e)})}],["produces/actions/result",Mo]]);const{api:Oo,getTransItem:Do,ensureData:No}=cn("etc/item-re"),zo=Do((t,r,n)=>{if(null==t?void 0:t[r]){let o=t[r].split("\n");o.forEach((e,t)=>{Q(o,t,n)});let s=o.join("\n");s!==t[r]&&(t[r]=e(s,!0))}}),Bo=Do(Q),Lo=Do((e,t,r)=>{if(null==e?void 0:e[t]){let n=e[t];if(Q(e,t,r),e[t]===n){e[t]=e[t].replace("\n","");let o=e[t];Q(e,t,r),o===e[t]&&(e[t]=n)}}}),$o=["produceItem","recoveryItem","exchangeItem","lotteryTicket","evolutionItem","gashaTicket","scoutTicket","enhancementItem","idolEvolutionPiece"],Uo=e=>{var t;const r="skin"==(null==e?void 0:e.category)||"ticket_exchange"==(null==e?void 0:e.category);null==e||null===(t=e.shopMerchandises)||void 0===t||t.forEach(e=>{var t;(zo(e,"comment"),r)||(Bo(e,"title"),Lo(e,"shopTitle"),null===(t=e.shopContents)||void 0===t||t.forEach(e=>{Bo(e.content,"name"),zo(e.content,"comment")}))})},Ho=e=>{let t=e;e.userProduceItems&&(t=e.userProduceItems),Array.isArray(t)&&t.forEach(e=>{const t=e[$o[0]]||e[$o[1]]||e[$o[2]]||e[$o[3]]||e[$o[4]]||e[$o[5]]||e[$o[6]]||e[$o[7]]||e[$o[8]];Bo(t,"name"),zo(t,"comment")})},Jo=e=>{e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{e.gameEventAccumulatedPresent.rewards.forEach(e=>{Bo(e.content,"name")})})},Wo=e=>{var t;null==e||null===(t=e.activeProduceItems)||void 0===t||t.forEach(e=>{Bo(e.produceItem,"name"),zo(e.produceItem,"comment")})};Oo.get([[["userShops","userIdolPieceShops"],e=>{e&&(Array.isArray(e.userShops)&&e.userShops.forEach(e=>{Uo(e)}),Array.isArray(e.userEventShops)&&e.userEventShops.forEach(e=>{Uo(e.userShop)}))}],[["userRecoveryItems","userProduceItems","userExchangeItems","userLotteryTickets","userEvolutionItems","userGashaTickets","userScoutTickets","userEnhancementItems","userIdolEvolutionPieces"],Ho],[["userPresents\\?limit={num}","userPresentHistories\\?limit={num}"],e=>{Array.isArray(e)&&e.forEach(e=>{Bo(e.content,"name"),Bo(e,"note")})}],["userProduces",Wo],["missionEvents/{num}/top",Jo],["gashaGroups",e=>{var t;null===(t=e.gashaGroups)||void 0===t||t.forEach(e=>{var t;const r=null===(t=e.userGashaTicket)||void 0===t?void 0:t.gashaTicket;Bo(r,"name"),zo(r,"comment")})}],["businessTop",e=>{var t;null===(t=e.userRecoveryItems)||void 0===t||t.forEach(e=>{Bo(e.recoveryItem,"name")})}]]),Oo.post([["myPage",e=>{Wo(e.userProduce)}],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",Jo],["userShops/actions/purchase",e=>{Bo(null==e?void 0:e.shopMerchandise,"title"),zo(null==e?void 0:e.shopMerchandise,"comment")}],["produces/{num}/actions/ready",Ho],["userPresents/{num}/actions/receive",e=>{Bo(e.receivedPresent,"Name")}],["userMissions/{num}/actions/receive",e=>{Bo(e.userMission.mission.missionReward.content,"name")}],["userLoginBonuses",e=>{e.userLoginBonuses.forEach(e=>{e.loginBonus.sheets.forEach(e=>{e.rewards.forEach(e=>{Bo(e.content,"name")})})}),e.userTotalBonuses.forEach(e=>{e.rewards.forEach(e=>{Bo(e.content,"name")})})}],["fesTop",e=>{e.lastRankingResult&&Array.isArray(e.lastRankingResult.fesMatchGradeRewards)&&e.lastRankingResult.fesMatchGradeRewards.forEach(e=>{Bo(e.content,"name")})}],["userSelectLoginBonuses/{num}",e=>{e.rewards.forEach(e=>{Bo(e.content,"name")})}],["gashas/{num}/actions/draw",e=>{var t;null===(t=e.acquiredStampRewards)||void 0===t||t.forEach(e=>{Bo(e.content,"name")})}]]),Oo.patch([["produces/{num}/produceItem/consume",e=>{var t;const r=null===(t=e.consumeProduceItem)||void 0===t?void 0:t.produceItem;r&&(Bo(r,"name"),zo(r,"comment"))}]]);en({name:"etc/noun-fix",keys:{trans:"fixed"},sort:"text"}),en({name:"etc/caiyun-prefix",keys:{trans:"fixed"},sort:"text"});const qo=new Map;let Go=new Map,Ko=!1,Yo=null;const Vo=t=>{const r=Gr(t),n=new Map,o=K();return r.forEach(t=>{const r=o(L(t.id)),s=$(t.text),i=$(t.trans,!0),a=L(t.name);s&&i&&(r&&!/^0+$/.test(r)&&"select"!==r?n.set(r,e(i)):"select"===r?n.set(s+"-select",e(i)):n.set(s,e(i))),r&&a&&"info"===r&&n.set("name",a)}),n},Qo=async()=>{if(!Ko){(await Zr("comm-story")).forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=$(e.trans,!0);t&&r&&t!==r&&Go.set(t,r)}}),Ko=!0}return Go};let Xo=null,Zo=!1;const es=en({name:"type-text"}),ts=async()=>(Zo||(Xo=await es(),Zo=!0),Xo);var rs=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]},ns=function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]},os=function(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])},ss=function(e,t){return 0===(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]},is=function(e,t){return[e[0]^t[0],e[1]^t[1]]},as=function(e){return e=is(e,[0,e[0]>>>1]),e=ns(e,[4283543511,3981806797]),e=is(e,[0,e[0]>>>1]),e=ns(e,[3301882366,444984403]),e=is(e,[0,e[0]>>>1])};let cs="";const ls=()=>{let e="0123456789abcdefghijklmnopqrstuvwxyz",t="";for(let r=0;r<33;r++)t+=e[Math.floor(Math.random()*e.length)];cs=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,o=[0,t],s=[0,t],i=[0,0],a=[0,0],c=[2277735313,289559509],l=[1291169091,658871167],u=0;u<n;u+=16)i=[255&e.charCodeAt(u+4)|(255&e.charCodeAt(u+5))<<8|(255&e.charCodeAt(u+6))<<16|(255&e.charCodeAt(u+7))<<24,255&e.charCodeAt(u)|(255&e.charCodeAt(u+1))<<8|(255&e.charCodeAt(u+2))<<16|(255&e.charCodeAt(u+3))<<24],a=[255&e.charCodeAt(u+12)|(255&e.charCodeAt(u+13))<<8|(255&e.charCodeAt(u+14))<<16|(255&e.charCodeAt(u+15))<<24,255&e.charCodeAt(u+8)|(255&e.charCodeAt(u+9))<<8|(255&e.charCodeAt(u+10))<<16|(255&e.charCodeAt(u+11))<<24],i=ns(i,c),i=os(i,31),i=ns(i,l),o=is(o,i),o=os(o,27),o=rs(o,s),o=rs(ns(o,[0,5]),[0,1390208809]),a=ns(a,l),a=os(a,33),a=ns(a,c),s=is(s,a),s=os(s,31),s=rs(s,o),s=rs(ns(s,[0,5]),[0,944331445]);switch(i=[0,0],a=[0,0],r){case 15:a=is(a,ss([0,e.charCodeAt(u+14)],48));case 14:a=is(a,ss([0,e.charCodeAt(u+13)],40));case 13:a=is(a,ss([0,e.charCodeAt(u+12)],32));case 12:a=is(a,ss([0,e.charCodeAt(u+11)],24));case 11:a=is(a,ss([0,e.charCodeAt(u+10)],16));case 10:a=is(a,ss([0,e.charCodeAt(u+9)],8));case 9:a=is(a,[0,e.charCodeAt(u+8)]),a=ns(a,l),a=os(a,33),a=ns(a,c),s=is(s,a);case 8:i=is(i,ss([0,e.charCodeAt(u+7)],56));case 7:i=is(i,ss([0,e.charCodeAt(u+6)],48));case 6:i=is(i,ss([0,e.charCodeAt(u+5)],40));case 5:i=is(i,ss([0,e.charCodeAt(u+4)],32));case 4:i=is(i,ss([0,e.charCodeAt(u+3)],24));case 3:i=is(i,ss([0,e.charCodeAt(u+2)],16));case 2:i=is(i,ss([0,e.charCodeAt(u+1)],8));case 1:i=is(i,[0,e.charCodeAt(u)]),i=ns(i,c),i=os(i,31),i=ns(i,l),o=is(o,i)}return o=is(o,[0,e.length]),s=is(s,[0,e.length]),o=rs(o,s),s=rs(s,o),o=as(o),s=as(s),o=rs(o,s),s=rs(s,o),("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}(t,31),localStorage.setItem("sczh:bid",cs)};try{cs=localStorage.getItem("sczh:bid")}catch(e){}cs||ls();var us=Object.prototype.hasOwnProperty,ds=Array.isArray,hs=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),ps=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},fs={arrayToObject:ps,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],s=o.obj[o.prop],i=Object.keys(s),a=0;a<i.length;++a){var c=i[a],l=s[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:s,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(ds(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r){if(0===e.length)return e;var n=e;if("symbol"==typeof e?n=Symbol.prototype.toString.call(e):"string"!=typeof e&&(n=String(e)),"iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",s=0;s<n.length;++s){var i=n.charCodeAt(s);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?o+=n.charAt(s):i<128?o+=hs[i]:i<2048?o+=hs[192|i>>6]+hs[128|63&i]:i<55296||i>=57344?o+=hs[224|i>>12]+hs[128|i>>6&63]+hs[128|63&i]:(s+=1,i=65536+((1023&i)<<10|1023&n.charCodeAt(s)),o+=hs[240|i>>18]+hs[128|i>>12&63]+hs[128|i>>6&63]+hs[128|63&i])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(ds(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!us.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return ds(t)&&!ds(r)&&(o=ps(t,n)),ds(t)&&ds(r)?(r.forEach((function(r,o){if(us.call(t,o)){var s=t[o];s&&"object"==typeof s&&r&&"object"==typeof r?t[o]=e(s,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var s=r[o];return us.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,t}),o)}},ms=String.prototype.replace,vs=/%20/g,gs={RFC1738:"RFC1738",RFC3986:"RFC3986"},ys=fs.assign({default:gs.RFC3986,formatters:{RFC1738:function(e){return ms.call(e,vs,"+")},RFC3986:function(e){return String(e)}}},gs),ws=(Date.prototype.toISOString,ys.default);ys.formatters[ws];const Es=async e=>{const t={text:e};try{const e="https://hooks.sla"+"ck.com/services/TN6J76CUB/BNJ2"+"YLNR3/baGxj31D5YxNhL2Q9FcbzaTA";await((e,t)=>{const{method:r="GET",headers:n,data:o}=t;return fetch(e,{body:o,headers:n,method:r,mode:"cors",referrer:"no-referrer"}).then(e=>e.json())})(e,{data:JSON.stringify(t),method:"POST",headers:{accept:"*/*",referer:"https://hooks.slack.com",origin:"https://hooks.slack.com"}});return""}catch(e){return""}},bs=["text","select","comment","title","actionComment","actionComment2","reactionComment","resultLoseComment","resultStartComment","resultWinComment","characterComment","producerComment","comment1","comment2"],ks=["mainText","resultText","name"],Ss=(t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{bs.forEach(i=>{let a=H(t[i]);t[i]&&(r.has(a)?t[i]=e(r.get(a)):(n.push({key:i,index:s}),o.push(a)))})}),{textInfo:n,textList:o}};let Is=!1,_s=!1;const xs=async(t,r="default",n)=>{if(!t.length)return;const o=await ts(),s=await Qo();if(n){const{textInfo:e,textList:r}=Ss(t,o);if(!e.length||"……"==r||1==Is||"…………"==r||"………………\n……………………\n…………………………"==r||e.length>9)return;let n=[];r.forEach((e,t)=>{n.push(q(e))});const s=n.join("\n"),i=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,a=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{a.push(q(e))}),i.test(s)||a.includes(n[0])||await Es(s),Is=!0}else if("FesTower"==r){const{textInfo:r,textList:n}=((t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{ks.forEach(i=>{let a=H(t[i]);t[i]&&(r.has(a)?t[i]=e(r.get(a)):(n.push({key:i,index:s}),o.push(a)))})}),{textInfo:n,textList:o}})(t,s);if(!r.length||"……"==n||1==Is||1==_s||"…………"==n||"………………\n……………………\n…………………………"==n||r.length>9)return;let o=[];n.forEach((e,t)=>{o.push("commstory"+q(e))});const i=o.join("\n"),a=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,c=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{c.push(q(e))}),a.test(i)||c.includes(o[0])||await Es(i),1==Is&&(_s=!0),Is=!0}else{const{textInfo:e,textList:r}=Ss(t,s);if(!e.length||"……"==r||1==Is||"…………"==r||"………………\n……………………\n…………………………"==r||e.length>9)return;let n=[];r.forEach((e,t)=>{n.push("commstory"+q(e))});const o=n.join("\n"),i=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,a=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{a.push(q(e))}),i.test(o)||a.includes(n[0])||await Es(o),Is=!0}},{api:Cs,transItem:As}=cn("mission",No),Ts=(e,t)=>{As(e,t)||("name"===t?Bo(e,t):zo(e,t))};let js=!1;const Ms=e=>{null==e||e.forEach(e=>{As(e.mission,"title"),As(e.mission,"comment"),e.mission.missionReward.content&&(Ts(e.mission.missionReward.content,"name"),Ts(e.mission.missionReward.content,"comment"))})},Rs=e=>{e.forEach(e=>{let t=e.fesRaidAccumulatedReward;As(t,"title"),As(t,"comment");let r=t.fesRaidAccumulatedRewardContent;(null==r?void 0:r.content)&&(Ts(r.content,"name"),Ts(r.content,"comment"))})},Ps=(e,t=!0)=>{null==e||e.forEach(e=>{let r=e.mission||e;if(As(r,"title"),As(r,"comment"),As(r,"afterAchievedComment"),As(r,"beforeAchievedComment"),t){let e=r.lectureMissionReward;(null==e?void 0:e.content)&&(Ts(e.content,"name"),Ts(e.content,"comment"))}})},Fs=e=>{var t,r;As(null===(t=e.userRecommendedMission)||void 0===t?void 0:t.mission,"comment"),As(null===(r=e.userRecommendedMission)||void 0===r?void 0:r.mission,"title"),e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{As(e.gameEventAccumulatedPresent,"comment"),As(e.gameEventAccumulatedPresent,"title")})},Os=e=>{var t;null===(t=e.teachingHints)||void 0===t||t.forEach(e=>{var t,r;null===(t=e.userProduceHints)||void 0===t||t.forEach(e=>{As(e.produceTeachingHint,"title")}),null===(r=e.userProduceTeachingHints)||void 0===r||r.forEach(e=>{As(e.produceTeachingHint,"title")})})},Ds=e=>{Ps(e.lectureMissions)},Ns=e=>{var t;null===(t=e.userIdolRoad)||void 0===t||t.idolRoad.idolRoadRewards.forEach(e=>{Ts(e.content,"name"),Ts(e.content,"comment")})},zs=e=>{null==e||e.forEach(e=>{var t,r;As(null===(t=e.userMission)||void 0===t?void 0:t.mission,"title"),As(null===(r=e.userMission)||void 0===r?void 0:r.mission,"comment")})};Cs.get([["userMissions",e=>{var t;Ms(e.dailyUserMissions),Ms(e.weeklyUserMissions),Ms(e.fesMatchRankingUserMissions),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{Ms(null==e?void 0:e.userMissions)}),Ms(e.normalUserMissions),Ms(e.specialUserMissions)}],["userJewelGettableMissions",e=>{var t,r,n,o,s,i;zs(null===(t=e.dailyWeeklyUserMissions)||void 0===t?void 0:t.userMissionsWithCategory),zs(null===(r=e.fesUserMissions)||void 0===r?void 0:r.userMissionsWithCategory),zs(null===(n=e.idolUserMissions)||void 0===n?void 0:n.userMissionsWithCategory),zs(null===(o=e.otherUserMissions)||void 0===o?void 0:o.userMissionsWithCategory),zs(null===(s=e.produceUserMissions)||void 0===s?void 0:s.userMissionsWithCategory),zs(null===(i=e.trueEndUserMissions)||void 0===i?void 0:i.userMissionsWithCategory)}],["fesRaidEvents/{num}/rewards",e=>{Rs(e.fesRaidBestScoreRewards),Rs(e.fesRaidLapRewards),Rs(e.fesRaidPointRewards)}],[["userProduces","userProduceTeachings"],[Os]],["userBeginnerMissions/top",Ds],["idolRoads/top",e=>{var t;Ps(e.userMissions,!1),null===(t=e.userIdols)||void 0===t||t.forEach(Ns)}],["missionEvents/{num}/top",[Fs]],["producerDesk/rewards",e=>{e.producerLevelRewards.forEach(e=>{As(e,"title"),Ts(e.content,"name")})}]]),Cs.post([["myPage",[e=>{Ms(e.reportUserMissions)},e=>{let t=e.beginnerMission;t&&(t.clearedLectureMission&&Ps([t.clearedLectureMission]),t.progressLectureMission&&Ps([t.progressLectureMission]))},e=>{var t;(async e=>{if(!e)return;const t=[];for(let r=0;r<e.length;r++){let n=e[r];As(e,r),n===e[r]&&t.push(n)}if(t.length&&0==js)try{const e=t.join("\nPmessage");/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e)||await Es("Pmessage"+e),js=!0}catch(e){J(e)}})(null===(t=e.producerDesk)||void 0===t?void 0:t.messages)}]],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",[Fs]],[["produceTeachings/resume","produceTeachings/next"],Os],["userLectureMissions/{num}/actions/receive",Ds],["fesMatchConcert/actions/finish",[e=>{e&&e.fesMatchRankingMission&&As(e.fesMatchRankingMission.userMission.mission,"title")}]],["producerDesk/top",e=>{e.progresses.forEach(e=>{As(e,"comment"),As(e,"title")})}]]),Cs.put([["userIdolRoads",e=>{Ns(e.userIdol)}]]);const Bs=new Map;let Ls=!1;const $s=async()=>{if(!Ls){let e=await Vr("cardname");e||(e=await Wr("/data/cardname.csv"),Qr("cardname",e));Gr(e).forEach(e=>{const t=L(e.name),r=L(e.trans);t&&r&&t!==r&&Bs.set(t,r)}),Ls=!0}return Bs},Us=new Map;let Hs=!1;const Js=async()=>{if(!Hs){let e=await Vr("costumename");e||(e=await Wr("/data/costumename.csv"),Qr("costumename",e));Gr(e).forEach(e=>{const t=$(e.name),r=$(e.trans);t&&r&&t!==r&&Us.set(t,r)}),Hs=!0}return Us};let Ws;const qs=async()=>(Ws||(Ws=$s()),await Ws);let Gs=[];const Ks=e=>{if(!e)return;let t=q(e);Gs.includes(t)||Gs.push(t)};let Ys;const Vs=async()=>{if(Ys)return Ys;let e=await qs(),t=await Js();return Ys=new Map([...e,...t])};(window.unsafeWindow||window).printUnknowCardCostumenames=()=>J(Gs.join("\n"));const Qs=(t,r)=>{if(!t||!r||!t.name)return;let n=H(t.name);r.has(t.name)&&(t.name=e(r.get(t.name))),A.dev&&n===t.name&&Ks(n)},Xs=(t,r)=>{if(!t||!r||!t.comment)return;let n=H(t.comment);r.has(t.comment)&&(t.comment=e(r.get(t.comment))),A.dev&&n===t.comment&&Ks(n)},Zs=(t,r,n)=>{const o=null==t?void 0:t[r];if(!o||!n)return;let s=null;if(n.has(o)&&(s=n.get(o),t[r]=e(s)),A.dev){const e=H(o);o===e&&Ks(e)}return s},ei=async e=>{const t=await qs();e.idol&&Qs(e.idol,t),e.supportIdol&&Qs(e.supportIdol,t),e.userSupportIdol&&Qs(e.userSupportIdol.supportIdol,t),e.userProduceSupportIdols&&e.userProduceSupportIdols.forEach((function(e){Qs(e.userSupportIdol.supportIdol,t)})),e.userIdol&&Qs(e.userIdol.idol,t),e.userProduceIdol&&Qs(e.userProduceIdol.userIdol.idol,t),e.userProduce&&e.userProduce.userProduceIdol&&Qs(e.userProduce.userProduceIdol.userIdol.idol,t),e.userFesIdol&&Qs(e.userFesIdol.idol,t)},ti=async e=>{const t=await Vs();e.idolCostumes&&e.idolCostumes.forEach((function(e){Qs(e,t),Xs(e,t)})),e.userFesDecks&&e.userFesDecks.forEach((function(e){e.userFesDeckMembers.forEach((function(e){e.idolCostumes.forEach((function(e){Qs(e,t)}))}))}))},ri=async e=>{const t=await qs();e.userKnowHowBooks&&e.userKnowHowBooks.forEach((function(e){e.idol&&Qs(e.idol,t)}))};Nr.get([[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],ei],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],ei],["userProduce(Teaching)?SupportIdols/{num}",ei],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],ei],["userFesIdols/{num}",ei],["userProduces",ei],["userReserveIdols/userIdol/{num}",ei],["userReserveSupportIdols/userSupportIdol/{num}",ei],["userKnowHowBooks",ri],["producerDesk/costumes",async t=>{const r=await Vs();t&&t.forEach((function(t){Qs(t,r),Xs(t,r),((t,r)=>{if(!t||!r||!t.releasedConditionComment)return;let n=H(t.releasedConditionComment);r.has(t.releasedConditionComment)&&(t.releasedConditionComment=e(r.get(t.releasedConditionComment))),A.dev&&n===t.releasedConditionComment&&Ks(n)})(t,r)}))}],["userShops",[async e=>{var t;const r=await Js();r&&(null==e||null===(t=e.userShops)||void 0===t||t.filter(e=>"skin"==(null==e?void 0:e.category)).forEach((function(e){var t,n;const o=null==e||null===(t=e.title)||void 0===t?void 0:t.startsWith("【復刻】");o&&(e.title=e.title.substring(4));const s=Zs(e,"title",r);o&&s&&(e.title=e.title.replace(s,"【복각】 "+s)),null===(n=e.shopMerchandises)||void 0===n||n.forEach((function(e){var t,n,o,s,i;Zs(null==e||null===(t=e.shopContents)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.content,"comment",r),Zs(null==e||null===(o=e.shopContents)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.content,"name",r),(null==e||null===(i=e.shopTitle)||void 0===i?void 0:i.includes("】\n"))&&(e.shopTitle=e.shopTitle.replace("】\n","】"),Zs(e,"shopTitle",r),e.shopTitle=e.shopTitle.replace(/】 ?/,"】\n"))}))})))},async e=>{var t;const r=await $s();r&&(null==e||null===(t=e.userShops)||void 0===t||t.filter(e=>"ticket_exchange"==(null==e?void 0:e.category)).forEach((function(e){var t;null==e||null===(t=e.shopMerchandises)||void 0===t||t.forEach((function(e){var t,n,o,s;Zs(null==e||null===(t=e.shopContents)||void 0===t||null===(n=t[0])||void 0===n?void 0:n.content,"name",r),(null==e||null===(o=e.shopTitle)||void 0===o?void 0:o.includes("】\n"))?(e.shopTitle=e.shopTitle.replace("】\n","】"),Zs(e,"shopTitle",r),e.shopTitle=e.shopTitle.replace(/】 ?/,"】\n")):(null==e||null===(s=e.shopTitle)||void 0===s?void 0:s.includes("\n"))&&(e.shopTitle=e.shopTitle.replace("\n",""),Zs(e,"shopTitle",r),e.shopTitle=e.shopTitle.replace(/】 ?/,"】\n")),Zs(e,"title",r)}))})))}]]]),Nr.post([[["myPage","produces/actions/(resume|next)"],ei]]),Nr.post([["characterAlbums/characters/{num}",[ti]],["produces/actions/result",ri],["produces/1/actions/ready",async e=>{var t;const r=await Vs();r&&(null==e||null===(t=e.userDecks)||void 0===t||t.forEach(e=>{var t,n,o,s;Zs(null==e||null===(t=e.userIdol)||void 0===t?void 0:t.idolCostume,"name",r),null==e||null===(n=e.userIdol)||void 0===n||null===(o=n.idolCostumes)||void 0===o||o.forEach(e=>Zs(e,"name",r)),null==e||null===(s=e.userSupportIdols)||void 0===s||s.forEach(e=>{var t;Zs(null==e?void 0:e.idolCostume,"name",r),null==e||null===(t=e.idolCostumes)||void 0===t||t.forEach(e=>Zs(e,"name",r))})}))}]]),Nr.patch([["userFesDecks",ti]]),Nr.put([["userHomeDecks",ti]]);const ni=new Map,oi=new Map,si=new Map;let ii=!1;let ai,ci,li,ui;const di=async()=>{li||(li=(async()=>{if(!ii){(await Zr("title")).forEach(e=>{if(null==e?void 0:e.text){const t=$(e.text),r=$(e.trans,!0),n=L(e.type)||"text";t&&r&&t!==r&&("exp"===n?oi.set(t,r):"text"===n&&ni.set(t,r))}});for(let[e,t]of oi){const r=tn(e);si.set(r,t)}ii=!0}return{textMap:ni,expMap:si}})(),ui=nn()),ai&&ci||(ai=await li,ci=await ui,ai.wordMaps=[ci])};let hi;const pi=async()=>{if(hi)return hi;await di();let e,t;return hi=new Map([...ci].map(r=>([e,t]=r,[e.split(" ")[1],t.split(" ")[1]])))};let fi=[];(window.unsafeWindow||window).printUnknowTitles=()=>J(fi.join("\n"));const mi=new Map,vi=(e,t)=>{e&&y(t)&&(mi.has(e)||mi.set(e,t))},gi=(e={},t)=>{let r=e[t];Q(e,t,ai),r===e[t]&&A.dev&&(e=>{if(!e)return;if(!e||/^[\x00-\x7F×『』/☆ⅠⅡⅢⅣⅤⅥⅦO①-⑳!?’ …・()♡&〈〉]+$/.test(e))return;let t=q(e);fi.includes(t)||fi.push(t)})(r)},yi=e=>{e.forEach(e=>{gi(e,"name"),e.communications.forEach(e=>{gi(e,"name"),gi(e,"title"),vi(e.id,`${e.name}-${e.title}`)})})},wi=async e=>{await di(),e.idol.produceAfterEvents.forEach(e=>{gi(e,"title"),vi(e.id,e.title)}),e.idol.produceIdolEvents.forEach(e=>{gi(e,"title"),vi(e.id,e.title)})},Ei=async e=>{await di(),e.supportIdol.produceSupportIdolEvents.forEach(e=>{gi(e,"title"),vi(e.id,e.title)})};Nr.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],Ei],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],wi],[["characterAlbums","album/top"],async e=>{await di(),yi(e.gameEvents),yi(e.specialEvents)}],[["producerDesk/gameEvents/{num}"],[async e=>{await di(),gi(e.gameEvent,"name")},async e=>{await di(),gi(e.gameEventStory,"description")}]],[["userMissions"],[async e=>{var t;await di(),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{gi(null==e?void 0:e.gameEvent,"name")})}]],[["characterPresentSpecialCommunicationEvents/{num}/top"],[async e=>{var t;await di(),null===(t=e.characterPresentSpecialCommunications)||void 0===t||t.forEach(e=>{var t;gi(e,"title"),null===(t=e.specialCommunicationReleaseConditions)||void 0===t||t.forEach(e=>{gi(null==e?void 0:e.content,"name")})})}]],["userProduceSupportIdols/{num}",async e=>{(null==e?void 0:e.userSupportIdol)&&await Ei(e.userSupportIdol)}],["userProduceIdols/{num}",async e=>{(null==e?void 0:e.userIdol)&&await wi(e.userIdol)}]]),Nr.post([["characterAlbums/characters/{num}",async e=>{await di();const t=await pi();e.firstName=t.get(e.firstName),e.albumCommunicationTitles.forEach(e=>{gi(e,"title")}),e.communications.forEach(e=>{gi(e,"title"),vi(e.communicationId,e.title)}),e.voices.forEach(e=>{gi(e,"title"),gi(e,"releasedConditionComment")})}],["produceMarathons/{num}/top",async e=>{await di(),e.releasedCommunications.forEach(e=>{gi(e,"name"),gi(e,"title"),vi(e.id,`${e.name}-${e.title}`)}),gi(e.gameEvent,"name")}]]);const bi=async t=>{const r=await sn();if(t.userProduceIdol){const n=t.userProduceIdol.userIdol.idol.character;r.has(n.name)&&(n.name=e(r.get(n.name))),r.has(n.firstName)&&(n.firstName=e(r.get(n.firstName)))}},ki=async e=>{var t;await di(),null===(t=e.produceEvents)||void 0===t||t.forEach(e=>{gi(e,"title"),vi(e.id,e.title)})};Nr.post([["myPage",async e=>{var t;await di(),gi(null==e||null===(t=e.userProduce)||void 0===t?void 0:t.produce,"title")}],["produces/actions/(resume|next)",[ki,bi]],[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],ki],["produces/actions/act",ki],["produces/({num}/audition|concert)/actions/(start|finish)",bi]]);const Si=async(e,t="comment")=>{if(!e)return;await xs(e,"autoTransText",!0)},Ii=async e=>{try{if(e.produceAudition){let t="produceAudition";await xs(e.produceAudition.judges,t,!0)}if(e.produceConcert){let t="produceAudition";await xs(e.produceConcert.judges,t,!0)}e.produceConcertFanSkillComments&&await Si(e.produceConcertFanSkillComments,"comment1")}catch(e){J(e)}},_i=async e=>{if(e.judges){let t="fesMatchConcert";await xs(e.judges,t,!0)}},xi=async e=>{if(e.topCharacterReaction)try{const t=[...e.topCharacterReaction.moveReactions,...e.topCharacterReaction.skillReleasedReactions,...e.topCharacterReaction.touchExReactions,...e.topCharacterReaction.touchReactions,...e.topCharacterReaction.waitReactions];await Si(t)}catch(e){J(e)}},Ci=async e=>{let t=[...e.produceStaffComments||[],...e.produceStaffConcertComments||[],...e.produceStaffFailComments||[],...e.produceStaffSeasonComments||[]];await Si(t)},Ai=async e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.judges?await _i(t):await Ii(t),e.gameData=JSON.stringify(t)}catch(e){J(e)}},Ti=async e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.judges&&await _i(t),e.gameState.game_data=JSON.stringify(t)}catch(e){J(e)}},ji=async e=>{if(!e.characterComment)return;let t=[];t=t.concat(e.characterComment),await Si(t)},Mi=async e=>{if(e)try{let t=[];e.fesTowerPanelRandom.mainText&&t.push(e.fesTowerPanelRandom),e.fesTowerPanelRandom.fesTowerPanelRandomChoices&&e.fesTowerPanelRandom.fesTowerPanelRandomChoices.forEach(e=>{e.name&&t.push(e)}),await xs(t,"FesTower",!1)}catch(e){J(e)}};Nr.get([["userProduces",xi],["fes(Match)?Concert/actions/resume",Ai]]),Nr.post([["myPage",async e=>{try{let t=[];e.userHomeDeck.userHomeDeckAnimationMember&&(t=[...e.userHomeDeck.userHomeDeckAnimationMember.mypageComments]);let r=e.userHomeDeck.userHomeAnimationDeck.userHomeAnimationDeckMembers;r&&r.forEach(e=>{e.mypageComments.forEach(e=>{t.push(e)}),e.mypageConversations.forEach(e=>{e.mypageConversationComments.forEach(e=>{t.push(e)})})}),e.userHomeDeck.userHomeDeckMembers.length&&e.userHomeDeck.userHomeDeckMembers.forEach(e=>{e.mypageComments.forEach(e=>{t.push(e)})}),await Si(t),await(async(e,t)=>{await di(),e.forEach(e=>{gi(e,t)})})(t,"speakerName")}catch(e){J(e)}}],["fesTop",async e=>{if(e.userFesDeck)try{let t=[],r=e.userFesDeck.userFesDeckMembers;for(let e of r)e.fesTopCharacterReactions.forEach(e=>{t.push(e)});await Si(t)}catch(e){J(e)}}],["produces/actions/(resume|next)",[xi,Ci,Ai,ji,Ii,async e=>{try{var t;await Si(null===(t=e.produceReporterEvent)||void 0===t?void 0:t.produceReporterEventAnswers,"comment2")}catch(e){J(e)}}]],["produces/actions/endWeek",Ci],["produces/actions/act",async e=>{if(!e.lessonResult)return;let t=e.lessonResult;try{let e=[];t.produceActCutinComment&&(e=e.concat(t.produceActCutinComment)),t.produceRestBoostIdolComment&&(e=e.concat(t.produceRestBoostIdolComment)),t.produceRestBoostSupportIdolComment&&(e=e.concat(t.produceRestBoostSupportIdolComment)),t.produceRestComments&&(e=e.concat(t.produceRestComments)),await Si(e)}catch(e){J(e)}}],["fes(Match|Raid)?Concert/actions/start",_i],["fes(Match)?Concert/actions/resume",Ai],["fesRaidConcert/actions/resume",Ti],["fesTowerConcert/actions/start",_i],["fesTowerConcert/actions/resume",Ti],["produces/actions/result",async e=>{try{let t=e.characterTrustLevelUpComments;await Si(t)}catch(e){J(e)}}],["userFesTowerPanels/{num}/random",Mi],["userFesTowerPanels/{num}/random/actions/choice",async e=>{if(e)try{let t=[];e.fesTowerPanelRandomEffect.resultText&&t.push(e.fesTowerPanelRandomEffect),await xs(t,"FesTower",!1)}catch(e){J(e)}}],["userFesTowerAreas/{num}",async e=>{var t;e&&(null===(t=e.userFesTowerStages)||void 0===t||t.forEach(e=>{e.userFesTowerPanelHistory&&e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory&&Mi(e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory)}))}],["produces/({num}/audition|concert)/actions/(start|finish)",[Ii,ji]],["userProduceHelperSupportIdols",async e=>{try{let t="helperSupportIdols";await xs([e],t,!0)}catch(e){J(e)}}],["fesTowerEvents/top",async e=>{if(e.userFesTowerEventTopIdols)try{let t=[];e.userFesTowerEventTopIdols.forEach(e=>{t.push(e.fesTowerEventTopCharacterReaction)}),await Si(t)}catch(e){J(e)}}],["produces/concert/actions/start",async e=>{var t,r,n,o;let s=[];s=s.concat(null==e||null===(t=e.userProduceIdol)||void 0===t||null===(r=t.userIdol)||void 0===r||null===(n=r.idol)||void 0===n||null===(o=n.character)||void 0===o?void 0:o.produceConcertFeverCharacterComment),await Si(s)}]]);const{api:Ri,transItem:Pi}=cn("etc/idol-filter");Ri.get([["searchPopupContents",e=>{var t,r,n,o;null===(t=e.businesses)||void 0===t||t.forEach(e=>{Pi(e,"name")}),null===(r=e.units)||void 0===r||r.forEach(e=>{Pi(e,"name")}),null===(n=e.produces)||void 0===n||n.forEach(e=>{Pi(e,"title")}),null===(o=e.characters)||void 0===o||o.forEach(e=>{Pi(e,"name"),Pi(e,"firstName"),Pi(e.unit,"name")}),(e=>{["activeSkills","ideas","idolArrivalTypes","knowHowBooks","supportSkillAttributes","supportSkillEffects","fightSkills"].forEach(t=>{var r;null===(r=e[t])||void 0===r||r.forEach(e=>{Pi(e,"label")})})})(e)}]]);const{api:Fi,transItem:Oi}=cn("etc/help-title");Fi.get([["help",e=>{e&&e.forEach(e=>{var t;Oi(e,"title"),null===(t=e.helpSubGroups)||void 0===t||t.forEach(e=>{Oi(e,"title")})})}]]);Nr.get("gashas/{num}/redraws",async e=>{const t=[];e.forEach(e=>{e.comment&&t.push(e.comment)}),await Si(t)}),Nr.post([["characterAlbums/characters/{num}",async e=>{const t=[];e.produceIdols.forEach(e=>{e.comment&&t.push(e.comment)}),await Si(t)}],["gashas/{num}/actions/draw",async e=>{var t;const r=[];null===(t=e.gashaDraws)||void 0===t||t.forEach(e=>{e.comment&&r.push(e.comment)}),await Si(r)}]]);Nr.post("characterAlbums/characters/{num}",async e=>{if(e.voices){const t=[];e.voices.forEach(e=>{e.characterTrustLevelComment&&t.push(e.characterTrustLevelComment)}),await Si(t)}});const Di=new Map;let Ni=!1;const zi=["nameKana","unit","age","bloodType","birthday","starSign","height","weight","figure","arm","place","hobby","specialty","cv"],Bi=async()=>{if(!Ni){(await Zr("profile-re")).forEach(t=>{if(null==t?void 0:t.id){const r=$(t.id);if(r)if("label"===r){const n=$(t.nameKana).split("|");Di.set(r,new Map(zi.map((t,r)=>[t,e(L(n[r]))])))}else{for(let r in t)t[r]=e($(t[r]));Di.set(r,t)}}}),Ni=!0}return Di},Li=async e=>{const t=(await Bi()).get(e.id);for(let r in t)"id"!==r&&e[r]&&("unit"===r?e.unit.name=t[r]:e[r]=t[r])},$i=async e=>{e.beginnerMissionUnits&&e.beginnerMissionUnits.forEach(e=>{e.idols.forEach(e=>{Li(e.idol.character)})}),e.units&&e.units.forEach(e=>{e.idols.forEach(e=>{Li(e.character)})})};Nr.post("characterAlbums/characters/{num}",async e=>{await Li(e)}),Nr.get("userIdols/{num}",async e=>{const t=e.idol.character;await Li(t)}),Nr.get("userSupportIdols/{num}",async e=>{const t=e.supportIdol.character;await Li(t)}),Nr.get("userFesIdols/{num}",async e=>{const t=e.userFesIdol.idol.character;await Li(t)}),Nr.get("userBeginnerMissions/top",$i),Nr.get("tutorialIdols",$i);const Ui=new Map;let Hi=!1;let Ji=null;const Wi=new Map([["AOBA",e=>e&&e.loaders&&e.Text&&e.BLEND_MODES],["SCENARIO",e=>e&&e.default&&e.default.load&&e.default._errorEvent&&e.default._handleError],["PHRASE",e=>{var t,r;return null==e||null===(t=e.default)||void 0===t||null===(r=t._polyglot)||void 0===r?void 0:r.phrases}],["ENCRYPT",e=>{var t;return null==e||null===(t=e.default)||void 0===t?void 0:t.decryptResource}]]),qi=new Map([["AOBA",e=>e],["SCENARIO",e=>e.default],["PHRASE",e=>e.default._polyglot.phrases],["ENCRYPT",e=>e.default]]),Gi=Object.freeze;Object.freeze=new Proxy(Gi,{apply:(e,t,[r])=>r});const Ki=/^function\s\w\((\w)\){var\s(\w)=(\w)\[\1\];if\(void\s0!==\2\)return\s\2\.exports;var\s(\w)=\3\[\1\]={id:\1,loaded:!1,exports:{}};return\s\w\[\1\]\.call\(\4\.exports,\4,\4\.exports,\w\),\4\.loaded=!0,\4\.exports}$/,Yi=Function.prototype.call;let Vi={Reflect:window.Reflect};Function.prototype.call=new Proxy(Yi,{apply(e,t,r){var n;return(null==r||null===(n=r[3])||void 0===n?void 0:n.toString)&&Ki.test(r[3].toString())&&(Ji=r[3],Function.prototype.call=Yi),Vi.Reflect.apply(e,t,r)}});const Qi=async e=>{const{moduleId:t}=await Jr;let[r,n]=((e,t)=>{let r,n,o=((e,t)=>{let r=e+t,n=[];for(let o=e-t;o<=r;o++)o>=0&&o!==e&&n.push(o);return n.unshift(e),n})(e,50);for(let e=0;e<o.length;e++){let s;try{s=Ji(o[e])}catch(e){}if(t(s)){r=s,n=o[e];break}}return[r,n]})(t[e],Wi.get(e));return r?qi.get(e)(r):null};let Xi=null;const Zi=["concert.skill.betweenString","concert.skill.appealString"];async function ea(){const t=await Qi("PHRASE");if(t){Xi=await(async(e=!1)=>{if(!Hi){(await Zr("phrase")).forEach(t=>{if(null==t?void 0:t.id){const r=$(t.id),n=$(t.trans,!0);r&&(e?Ui.set(r,t.trans):n&&Ui.set(r,n))}}),Hi=!0}return Ui})();for(let[r,n]of Xi)t[r]=Zi.includes(r)?n:e(n)}}let ta=!1,ra=null;const na=en({name:"common"});let oa=new Map,sa=new Map;const ia=[],aa=e=>{e&&e.fontFamily&&(e.fontFamily===M.HEITI_JA?Reflect.set(e,"fontFamily",M.HEITI_TRANS):e.fontFamily===M.YUAN_JA&&Reflect.set(e,"fontFamily",M.YUAN_TRANS))},ca=(e,t,r)=>{let n=e,o=H(e);return t.has(o)?(n=""+t.get(o),aa(r)):e.startsWith("")||(e=>{e&&e.fontFamily&&(e.fontFamily===M.HEITI_TRANS?Reflect.set(e,"fontFamily",M.HEITI_JA):e.fontFamily===M.YUAN_TRANS&&Reflect.set(e,"fontFamily",M.YUAN_JA))})(r),n},la=(e,t,r=!1)=>{if(!y(e))return e;let n=e;return e.startsWith("")?aa(t):e.trim()&&(r?(n=ca(e,sa,t),n===e&&(e=>{ia.push(e),A.dev,setTimeout(()=>ia.shift(),1e4)})(e)):(e=>{let t=!1;return ia.forEach(r=>{r.startsWith(e)&&(t=!0)}),t})(e)||e.startsWith("")||(n=ca(e,oa,t))),n};async function ua(){const e=await Qi("AOBA");try{oa=await(async()=>{if(!ta){ra=await na();const e=await sn();ra=new Map([...e,...ra]),ta=!0}return ra})(),sa=await ts()}catch(e){}const t=e.Text.prototype.typeText;e.Text.prototype.typeText=function(...e){const r=e[0];return e[0]=la(r,this.style,!0),t.apply(this,e)};const r=e.Text.prototype.updateText;e.Text.prototype.updateText=function(e){if(this.localStyleID!==this._style.styleID&&(this.dirty=!0,this._style.styleID),this.dirty||!e){A.dev,0;const t=la(this._text,this._style);return Reflect.set(this,"_text",t),r.call(this,e)}}}const da=new Map;let ha=!1;const pa=new Map;let fa=!1;let ma=null;let va=null;const ga=()=>va||(va=(async()=>{if(ma)return ma;try{const e=await fetch("https://newbiepr.gitlab.io/shinymaskr.gitlab.io/data/image/comics/4ko.json?t="+Math.floor(Date.now()/36e5)),t=await e.json();ma=new Map(t)}catch(e){ma=new Map}return ma})(),va);Nr.get([[["comics"],async t=>{await ga(),t.comics.forEach(t=>{const r=parseInt(t.id);if(ma.has(r)){const n=ma.get(r).title;n&&(t.title=e(n))}})}]]);let ya=null;const wa=async()=>(ya||(ya=(async()=>{if(!ha){(await Zr("image")).forEach(e=>{if(null==e?void 0:e.name){const t=L(e.name),r=L(e.url),n=L(e.version)||"1";t&&r&&da.set(t,{url:r,version:n})}}),ha=!0}return da})()),await ya);let Ea=null;const ba=async()=>(Ea||(Ea=(async()=>{if(!fa){(await Zr("file-replace")).forEach(e=>{if(null==e?void 0:e.name){const t=L(e.name),r=L(e.url),n=L(e.version)||"1";t&&r&&pa.set(t,{url:r,version:n})}}),fa=!0}return pa})()),await Ea);let ka="";(()=>{try{ka=sessionStorage.getItem("sczh:res-name")}catch(e){}})();(window.unsafeWindow||window).queryImageName=e=>{try{sessionStorage.setItem("sczh:res-name",e)}catch(e){}};let Sa=!1;async function Ia(){const e=await Qi("AOBA"),t=await Qi("ENCRYPT");if(Sa)return;const r=e.loaders.Resource.prototype._loadElement,n=async function(e){A.dev&&"image"===e&&ka&&this.url.includes(ka)&&(W("%c조회한 이미지:","color:#66ccff"),W(this.url,this.name));try{const t=await wa();if("image"===e){if(t.has(this.name)){const e=t.get(this.name);if(this.url.endsWith("v="+e.version)){const t="image/"+e.url;this.url=`${A.origin}/data/${t}?v=${A.hashes[t]}`,this.crossOrigin=!0}else J("%cimage version not match","color:#fc4175"),J(this.name,this.url)}else"image"===e&&this.originUrl.includes("idols/name")&&(J("%cidol name display!!","color:#fc4175"),J(this.name,this.url));await async function(e){if(/^images\/content\/comics\/(web|limited|special)\/page\/[^_]+_\d+\.jpg/.test(e.name)){const t=parseInt(e.name.match(/page\/[^_]+_(\d+)\.jpg/)[1]);await ga(),ma.has(t)&&(e.url="https://newbiepr.gitlab.io/shinymaskr.gitlab.io/data/image/comics/4ko/"+ma.get(t).name,e.crossOrigin=!0)}}(this)}}catch(e){J("Error during image substitution: ",e)}return r.call(this,e)},o=e.loaders.Resource.prototype._loadXhr,s=async function(){if(t)try{const e=await ba();if(e.has(this.name)){const t=e.get(this.name);if(this.url.endsWith("v="+t.version)){const e="file/"+t.url;this.url=`${A.origin}/data/${e}?v=${A.hashes[e]}`}else J("%cfile version not match","color:#fc4175"),J(this.name,this.url)}}catch(e){J("Error during file substitution: ",e)}return o.call(this)},i=new TextDecoder,a=e.loaders.Resource.prototype._xhrOnLoad,c=async function(){if(t)try{this.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6};const e=await ba();if(e.has(this.name)){const t=e.get(this.name);if(this.reqUrl.endsWith("v="+t.version)){if("json"===this.xhrType||"text"===this.xhrType){let e=i.decode(this.xhr.response);this.xhr=new Proxy(this.xhr,{get(t,r,n){return"response"===r?e:t[r]instanceof Function?Reflect.get(...arguments).bind(t):t[r]}}),this.data="json"===this.xhrType?JSON.parse(e):e,this.type="json"===this.xhrType?this.TYPE.JSON:this.TYPE.TEXT}return this.url=this.originUrl,void this.complete()}}}catch(e){J("Exception in xhrOnLoad: ",e)}a.call(this)};if(t){const e=t.decryptResource,r=function(t){return"string"==typeof t?t:e(t)};t.decryptResource=r}const l=new Proxy(e.loaders.Resource,{construct(e,t,r){var o=Reflect.construct(e,t,r);return new Proxy(o,{get:(e,t,r)=>"_loadElement"==t?n:"_loadXhr"==t?s:"_boundXhrOnLoad"==t?c.bind(e):Reflect.get(e,t,r)})},get:(e,t,r)=>Reflect.get(e,t,r)});Object.defineProperty(e.loaders,"Resource",{value:l}),Sa=!0}var _a=function(){return s.Date.now()},xa=/\s/;var Ca=function(e){for(var t=e.length;t--&&xa.test(e.charAt(t)););return t},Aa=/^\s+/;var Ta=function(e){return e?e.slice(0,Ca(e)+1).replace(Aa,""):e};var ja=function(e){return"symbol"==typeof e||g(e)&&"[object Symbol]"==m(e)},Ma=/^[-+]0x[0-9a-f]+$/i,Ra=/^0b[01]+$/i,Pa=/^0o[0-7]+$/i,Fa=parseInt;var Oa=function(e){if("number"==typeof e)return e;if(ja(e))return NaN;if(he(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=he(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ta(e);var r=Ra.test(e);return r||Pa.test(e)?Fa(e.slice(2),r?2:8):Ma.test(e)?NaN:+e},Da=Math.max,Na=Math.min;var za=function(e,t,r){var n,o,s,i,a,c,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=n,s=o;return n=o=void 0,l=t,i=e.apply(s,r)}function f(e){return l=e,a=setTimeout(v,t),u?p(e):i}function m(e){var r=e-c;return void 0===c||r>=t||r<0||d&&e-l>=s}function v(){var e=_a();if(m(e))return g(e);a=setTimeout(v,function(e){var r=t-(e-c);return d?Na(r,s-(e-l)):r}(e))}function g(e){return a=void 0,h&&n?p(e):(n=o=void 0,i)}function y(){var e=_a(),r=m(e);if(n=arguments,o=this,c=e,r){if(void 0===a)return f(c);if(d)return clearTimeout(a),a=setTimeout(v,t),p(c)}return void 0===a&&(a=setTimeout(v,t)),i}return t=Oa(t)||0,he(r)&&(u=!!r.leading,s=(d="maxWait"in r)?Da(Oa(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=o=a=void 0},y.flush=function(){return void 0===a?i:g(_a())},y};const Ba=`\n <style>\n #sczh-story-tool {\n position: absolute;\n display: none;\n background: #ffffff;\n border-radius: 24px;\n box-sizing: border-box;\n font-family: sczh-yuanti;\n align-items: center;\n justify-content: center;\n color: #ff6499;\n text-shadow: 0 0 6px #fff;\n cursor: pointer;\n user-select: none;\n width: 100px;\n height: 100px;\n font-size: 32px;\n border: 7px solid transparent;\n border-image: url(${A.origin}/data/image/border.png);\n border-image-slice: 7;\n transform-origin: top right;\n transition: opacity 0.3s;\n }\n .story-tool-btns {\n width: 100%;\n height: 100%;\n display: none;\n }\n .story-tool-btns .btn-download-sczh,\n .story-tool-btns label {\n flex: 1;\n height: 100%;\n background: #fff;\n display: flex;\n box-sizing: content-box;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: #c0aade;\n text-shadow: 0 0 6px #fff;\n }\n .story-tool-btns .btn-download-sczh:hover {\n color: #9f66ec;\n }\n .story-tool-btns label {\n color: rgb(242, 156, 199);\n border-right: 1px solid #c9c9c9;\n }\n #sczh-story-tool .btn-close-sczh {\n height: 25px;\n width: 50px;\n background: rgba(0, 0, 0, 0.58);\n color: #fff;\n letter-spacing: 2px;\n position: absolute;\n right: -25px;\n top: -20px;\n border-radius: 4px;\n display: none;\n align-items: center;\n justify-content: center;\n z-index: 1;\n font-family: sczh-heiti;\n font-size: 15px;\n }\n #sczh-story-tool:hover {\n width: 200px;\n }\n #sczh-story-tool:hover .story-tool-btns {\n display: flex;\n }\n #sczh-story-tool:hover .btn-close-sczh {\n display: flex;\n }\n #sczh-story-tool:hover > .text-sczh {\n display: none;\n }\n #sczh-story-tool .btn-close-sczh:hover {\n background: rgba(0, 0, 0, 0.9);\n }\n #sczh-story-tool.blur {\n opacity: 0.2;\n }\n .story-tool-btns label:hover {\n color: #f270b1;\n }\n .story-tool-btns .btn-download-sczh:hover,\n .story-tool-btns label:hover {\n background-color: #f7f7f7;\n }\n </style>\n <div id="sczh-story-tool"><span class="text-sczh">커뮤</span>\n <span id="btn-close-sczh" class="btn-close-sczh">닫기</span>\n <input type="file" style="display:none" id="ipt-preview-sczh" multiple accept=".csv">\n <div class="story-tool-btns">\n <label for="ipt-preview-sczh">실험</label>\n <div id="btn-download-sczh" class="btn-download-sczh">다운</div>\n </div>\n </div>\n `;let La=!1;const $a=e=>{if(La)return;La=!0,document.body.insertAdjacentHTML("beforeend",Ba);const t=document.getElementById("sczh-story-tool"),r=za(()=>{const r=[.017,.22],n=window.innerHeight,o=window.innerWidth;let s=n,i=o,a=0,c=0;n/o>9/16?(s=9*o/16,a=(n-s)/2):(i=16*n/9,c=(o-i)/2),t.style.right=Math.floor(c+r[0]*i)+"px",t.style.top=Math.floor(a+r[1]*s)+"px",t.style.transform=`scale(${(s/900).toFixed(3)})`,e.name?t.style.display="flex":t.style.display="none"},300);r(),window.addEventListener("resize",r);document.getElementById("btn-download-sczh").addEventListener("click",(function(){if(e.name){((e,t)=>{const r=document.createElement("a");r.download=t,r.style.display="none";const n=new Blob([e],{type:"text/csv"});r.href=URL.createObjectURL(n),document.body.appendChild(r),r.click(),document.body.removeChild(r)})(qr.unparse(e.list),e.filename)}}));document.getElementById("btn-close-sczh").addEventListener("click",(function(){t.style.display="none",A.story="normal",O()}));let n;document.getElementById("ipt-preview-sczh").addEventListener("change",(function(){const t=[...this.files];t.length&&t.forEach(t=>{const r=new FileReader;r.onload=t=>{const r=t.target.result,n=Vo(r);if(n.has("name")){const t=n.get("name");e.preview.set(t,n),(e=>{const t=[...e].slice(-5).map(e=>(e[1]=[...e[1]],e));sessionStorage.setItem("sczh:preview",JSON.stringify(t))})(e.preview),alert(`도입${t}성공`)}},r.readAsText(t)})})),t.addEventListener("mouseenter",()=>{clearTimeout(n),t.classList.remove("blur")});const o=()=>{clearTimeout(n),n=setTimeout(()=>{t.classList.add("blur")},5e3)};t.addEventListener("mouseleave",o),o()},Ua=new Map;let Ha=!1;let Ja=null,Wa=new Map;const qa=async()=>(Ja||(Ja=(async()=>{if(an)return an;const e=await rn(),t=await sn();return an=new Map([...e,...t]),an})(),Wa=(await(async()=>{if(!Ha){(await Zr("speaker-icon")).forEach(e=>{let{name:t,id:r,type:n}=e;t=L(t),r=L(r),n=L(n),t&&r&&Ua.set(r,t)}),Ha=!0}return{iconMap:Ua}})()).iconMap),await Ja);let Ga=!1,Ka=!1;const Ya=(e,t)=>{var r,n,o,s,i,a,c,l,u,d,h,p;return(!Ga||!Ka)&&("idol"===t&&(null===(r=e[0])||void 0===r||null===(n=r["002"])||void 0===n?void 0:n.includes)&&(null===(o=e[0])||void 0===o||null===(s=o["002"])||void 0===s?void 0:s.includes("灯織"))?(Ga=!0,null===(u=e[0])||void 0===u||null===(d=u["002"])||void 0===d?void 0:d.includes("灯織")):(null===(i=e[0])||void 0===i||null===(a=i[901])||void 0===a?void 0:a.includes)&&(null===(c=e[0])||void 0===c||null===(l=c[901])||void 0===l?void 0:l.includes("はづき"))?(Ka=!0,null===(h=e[0])||void 0===h||null===(p=h[901])||void 0===p?void 0:p.includes("はづき")):void 0)},Va=Object.keys;Object.keys=new Proxy(Va,{apply(t,r,n){if(Ya(n,"idol")||Ya(n,"staff"))for(let[t,r]of Wa){let o=e(r);Array.isArray(n[0][t])&&!n[0][t].includes(o)&&n[0][t].push(o)}return Reflect.apply(t,r,n)}});const Qa=(e,t)=>{let r=e,n="";return/[0-90-9]$/.test(e)&&(n=e.match(/([0-90-9])$/)[1],r=e.slice(0,e.length-1)),t.has(r)?t.get(r)+n:e},Xa=async t=>{if(t.speaker){const r=await qa();let n=L(t.speaker);if(r.has(n))return t.speaker=e(r.get(n));["&","&"].forEach(e=>{n=((e,t,r)=>{const n=e.split(t);for(let e=0;e<n.length;e++)n[e]=Qa(n[e],r);return n.join(t)})(n,e,r)}),n!==t.speaker&&(t.speaker=e(n))}},Za={name:"",filename:"",list:"",preview:new Map};let ec=!1;const tc=async()=>{const t=await Qi("SCENARIO"),r=t.load;t.load=async function(...t){const n=await r.apply(this,t),o=t[0];if(!o)return n;if(A.dev&&o.includes("/assets/json/")&&Mr("STORY","#ad37c2",t,n),o.includes("/produce_events/")||o.includes("/produce_communications/")||o.includes("/produce_communications_promises/")||o.includes("/produce_communication_promise_results/")||o.includes("/support_skills/")||o.includes("/game_event_communications/")||o.includes("/special_communications/")||o.includes("/mypage_communications/")||o.includes("/produce_communication_cheers/")||o.includes("/produce_communication_auditions/")||o.includes("/business_unit_communication/")||o.includes("/produce_communication_televisions/"))try{if(!Array.isArray(n))return n;const t=o.replace(/^\/assets\/json\//,"");let r;if("edit"===A.story&&(((e,t)=>{const r=t.replace(".json",""),n=(e=>{var t;const r=e.match(/\/(\d+)$/);return null!==(t=null==r?void 0:r[1])&&void 0!==t?t:""})(r);let o=mi.get(n)||r.replace(/\//g,"_");o=o.replace("","");const s=[];e.forEach(e=>{let t=L(q(e.text));(null==t?void 0:t.trim())?s.push({id:e.id||"0000000000000",name:e.speaker||"",text:t,trans:""}):e.select&&s.push({id:"select",name:"",text:L(q(e.select)),trans:""})}),s.push({id:"info",name:t,text:"",trans:""}),s.push({id:"번역자",name:"",text:"",trans:""}),Za.name=t,Za.filename=o+".csv",Za.list=s})(n,t),$a(Za)),(()=>{if(ec)return;ec=!0;const e=sessionStorage.getItem("sczh:preview");if(e)try{const t=JSON.parse(e),r=new Map(t);for(let[e,t]of r)r.set(e,new Map(t));Za.preview=r}catch(e){J(e)}})(),r=Za.preview.has(t)?Za.preview.get(t):await(async e=>{if(!Yo){let e=await Vr("story.json");if(e)Yo=new Map(JSON.parse(e));else{const e=await Wr("/story.json");Yo=new Map(e),Qr("story.json",JSON.stringify(Yo))}}if(Yo.has(e)){if(qo.has(e))return qo.get(e);{const t=Yo.get(e),r=await Wr(`/data/story/${t}.csv`),n=Vo(r);return qo.set(e,n),n}}return!1})(t),r){((t,r,n)=>{const o=K();t.forEach(t=>{if(t.text){const s=o(t.id),i=H(t.text);s&&r.has(""+s)?t.text=r.get(""+s):r.has(i)?t.text=r.get(i):n.has(i)&&(t.text=e(n.get(i)))}if(t.select){const o=H(t.select),s=o+"-select";r.has(s)?t.select=r.get(s):n.has(o)&&(t.select=e(n.get(t.select)))}})})(n,r,await Qo())}else await xs(n,t,!1);for(let e of n)await Xa(e)}catch(e){J(e)}return n}},rc=e=>{const t=document.createElement("link");t.setAttribute("rel","preload"),t.setAttribute("href",e),t.setAttribute("as","font"),t.setAttribute("type","font/woff2"),t.setAttribute("crossorigin","anonymous"),document.head.appendChild(t)},nc=(e,t)=>`/data/font/${e}.woff2?v=${t[`font/${e}.woff2`]}`,oc=async()=>{const e=document.createElement("style"),{hashes:t}=await Jr;e.innerHTML=`\n @font-face {\n font-family: "sczh-heiti";\n src: url("${A.origin}${nc("heiti",t)}");\n }\n @font-face {\n font-family: "sczh-yuanti";\n src: url("${A.origin}${nc("heiti",t)}");\n }\n ::-webkit-scrollbar {\n display: none;\n }\n `,"yuanti"===A.font1&&rc(`${A.origin}${nc("heiti",t)}`),"heiti"===A.font2&&rc(`${A.origin}${nc("heiti",t)}`),document.head.appendChild(e)};window.addEventListener("blur",(function(e){"on"===A.bgm&&e.stopImmediatePropagation()}),!1),document.addEventListener("visibilitychange",(function(e){"on"===A.bgm&&e.stopImmediatePropagation()}));let sc=0;const ic=async()=>{var e;Ji||sc>=300?(async()=>{try{await Promise.all([Ia(),oc(),ea(),ua(),tc()])}catch(e){J(e)}})():(await(e=100,new Promise(t=>{setTimeout(t,e)})),sc++,sc%10==0&&J(`Waiting: ${sc/10}s`),await ic())};"loading"!=document.readyState?ic():window.unsafeWindow?window.unsafeWindow.addEventListener("DOMContentLoaded",ic):window.addEventListener("DOMContentLoaded",ic)}();