Greasy Fork is available in English.

샤니마스 한글 패치 임시

샤니마스 임시 한글 패치 스크립트

As of 2023-01-18. See the latest version.

// ==UserScript==
// @name         샤니마스 한글 패치 임시
// @namespace    https://github.com/newbiepr/shinycolors-trans-kr
// @version      1.11.5
// @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")(),a=s.Symbol,i=Object.prototype,c=i.hasOwnProperty,u=i.toString,l=a?a.toStringTag:void 0;var d=function(e){var t=c.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=u.call(e);return n&&(t?e[l]=r:delete e[l]),o},f=Object.prototype.toString;var p=function(e){return f.call(e)},h=a?a.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h 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 b=function(e,t){return function(r){return e(t(r))}},E=b(Object.getPrototypeOf,Object),k=Function.prototype,S=Object.prototype,_=k.toString,I=S.hasOwnProperty,x=_.call(Object);var A=function(e){if(!g(e)||"[object Object]"!=m(e))return!1;var t=E(e);if(null===t)return!0;var r=I.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==x};const C={origin:"https://newbiepr.gitlab.io/shinymaskr.gitlab.io",hash:"",localHash:"",version:"1.11.5",story:"normal",timeout:30,font1:"yuanti",font2:"heiti",auto:"off",bgm:"off",dev:!1},T=Object.assign({},C),j=["yuanti","heiti","yuanti2"],R={HEITI_JA:"UDKakugo_SmallPr6-B",HEITI_TRANS:"sczh-heiti,UDKakugo_SmallPr6-B",YUAN_JA:"HummingStd-E",YUAN_TRANS:"sczh-yuanti,HummingStd-E"},M=["origin","font1","font2","timeout","story","auto","bgm","dev"],P=M,O=()=>{R.HEITI_TRANS=`${j.includes(C.font2)?"sczh-":""}${C.font2},${R.HEITI_JA}`,R.YUAN_TRANS=`${j.includes(C.font1)?"sczh-":""}${C.font1},${R.YUAN_JA}`},F=()=>{const e={};P.forEach(t=>{C[t]!==T[t]&&(e[t]=C[t])}),O(),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)&&(C[r]=n||T[r],F())})},z={origin:{id:0,title:"서버 바꾸기",callback:()=>{"https://newbiepr.gitlab.io/shinymaskr.gitlab.io"===C.origin?(C.origin="https://shinymaskr.work",alert("서버가 "+C.origin+"으로 교체되었습니다\nf5누르고 재접속 부탁드립니다")):(C.origin="https://newbiepr.gitlab.io/shinymaskr.gitlab.io",alert("서버가 "+C.origin+"으로 교체되었습니다\nf5누르고 재접속 부탁드립니다"))}},story:{normal:"커뮤추출 열기",edit:"커뮤추출 닫기",id:0,callback:()=>{if("normal"===C.story)C.story="edit";else{const e=document.getElementById("btn-close-sczh");e?e.click():C.story="normal"}}},bgm:{on:"백그라운드BGM 끄기",off:"백그라운드BGM 켜기",id:0,callback:()=>{C.bgm="off"!==C.bgm?"off":"on"}},dev:{id:0,titles:["개발자모드 켜기","개발자모드 끄기"],callback:()=>{C.dev=!C.dev}},wiki:{id:0,title:"샤니위키",callback:()=>{window.open("https://shinycolors.info/wiki")}},update:{id:0,title:"업데이트",callback:()=>{window.open(C.origin+"/ShinyColors.user.js")}}},B=e=>{const t=C[e],r=z[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)(),F(),N()})},N=()=>{if(!window.GM_registerMenuCommand||!window.GM_unregisterMenuCommand)return;["origin","update","bgm","story","dev","wiki"].forEach(e=>{B(e)})};(()=>{const e=localStorage.getItem("sczh:setting");let t=JSON.parse(e);A(t)||(t={});const{origin:r}=t;/^https?:\/\//.test(r)&&(C.origin=r.trim()),P.forEach(e=>{let r=t[e];y(r)&&(r=r.trim()),(w(r)||r)&&(C[e]=r)}),O()})(),D(),N(),window.addEventListener("hashchange",D);const L=e=>{if(!e)return"";return e.replace(/[\u0020]+$/g,"").replace(/^[\u0020]+/g,"")},U=(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")},$=e=>e.replace(/\u200b/g," "),H=e=>L(e).replace(/\r/g,"\n").replace(/\n{2,}/g,"\n"),J=(...e)=>{C.dev&&console.info(...e)},W=(...e)=>{console.info(...e)},q=e=>y(e)?e.replace(/\r?\n/g,"\\n").replace(/\r/g,"\\n"):e,K=(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},G=()=>{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,Q=(t,r)=>{const{expMap:n,wordMaps:o,textMap:s}=r,a=H(t);let i=a;return a?(null==s?void 0:s.has(a))?e(s.get(a)):(i=((e,t,r=[])=>{if(Y.has(e))return Y.get(e);let n=e;for(let[e,o]of t)n=n.replace(e,(...e)=>{let t=o;for(let n=1;n<e.length-2;n++){let o=e[n],s=!1;r.forEach(e=>{e.has(o)&&(t=t.replace("$"+n,e.get(o)),s=!0)}),s||(t=t.replace("$"+n,e[n]))}return t}),e.lastIndex=0;return e!==n&&Y.set(e,n),n})(a,n,o),a!==i?e(i):t):t},V=(e,t,r)=>{if(!e||!y(e[t]))return;const n=e[t];e[t]=Q(n,r)};var Z=function(){this.__data__=[],this.size=0};var X=function(e,t){return e===t||e!=e&&t!=t};var ee=function(e,t){for(var r=e.length;r--;)if(X(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 ae(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])}}ae.prototype.clear=Z,ae.prototype.delete=re,ae.prototype.get=ne,ae.prototype.has=oe,ae.prototype.set=se;var ie=ae;var ce=function(){this.__data__=new ie,this.size=0};var ue=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var le=function(e){return this.__data__.get(e)};var de=function(e){return this.__data__.has(e)};var fe=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var pe,he=function(e){if(!fe(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""},be=/^\[object .+?Constructor\]$/,Ee=Function.prototype,ke=Object.prototype,Se=Ee.toString,_e=ke.hasOwnProperty,Ie=RegExp("^"+Se.call(_e).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var xe=function(e){return!(!fe(e)||ge(e))&&(he(e)?Ie:be).test(we(e))};var Ae=function(e,t){return null==e?void 0:e[t]};var Ce=function(e,t){var r=Ae(e,t);return xe(r)?r:void 0},Te=Ce(s,"Map"),je=Ce(Object,"create");var Re=function(){this.__data__=je?je(null):{},this.size=0};var Me=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Pe=Object.prototype.hasOwnProperty;var Oe=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},Fe=Object.prototype.hasOwnProperty;var De=function(e){var t=this.__data__;return je?void 0!==t[e]:Fe.call(t,e)};var ze=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 Be(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])}}Be.prototype.clear=Re,Be.prototype.delete=Me,Be.prototype.get=Oe,Be.prototype.has=De,Be.prototype.set=ze;var Ne=Be;var Le=function(){this.size=0,this.__data__={hash:new Ne,map:new(Te||ie),string:new Ne}};var Ue=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var $e=function(e,t){var r=e.__data__;return Ue(t)?r["string"==typeof t?"string":"hash"]:r.map};var He=function(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t};var Je=function(e){return $e(this,e).get(e)};var We=function(e){return $e(this,e).has(e)};var qe=function(e,t){var r=$e(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Ke(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])}}Ke.prototype.clear=Le,Ke.prototype.delete=He,Ke.prototype.get=Je,Ke.prototype.has=We,Ke.prototype.set=qe;var Ge=Ke;var Ye=function(e,t){var r=this.__data__;if(r instanceof ie){var n=r.__data__;if(!Te||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Ge(n)}return r.set(e,t),this.size=r.size,this};function Qe(e){var t=this.__data__=new ie(e);this.size=t.size}Qe.prototype.clear=ce,Qe.prototype.delete=ue,Qe.prototype.get=le,Qe.prototype.has=de,Qe.prototype.set=Ye;var Ve=Qe;var Ze=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},Xe=function(){try{var e=Ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var et=function(e,t,r){"__proto__"==t&&Xe?Xe(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)&&X(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,a=t.length;++s<a;){var i=t[s],c=n?n(r[i],e[i],i,r,e):void 0;void 0===c&&(c=e[i]),o?et(r,i,c):rt(r,i,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)},at=Object.prototype,it=at.hasOwnProperty,ct=at.propertyIsEnumerable,ut=st(function(){return arguments}())?st:function(e){return g(e)&&it.call(e,"callee")&&!ct.call(e,"callee")};var lt=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,a=(o?o.isBuffer:void 0)||lt;e.exports=a})),ft=/^(?:0|[1-9]\d*)$/;var pt=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ft.test(e))&&e>-1&&e%1==0&&e<t};var ht=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)&&ht(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,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a})),wt=yt&&yt.isTypedArray,bt=wt?gt(wt):vt,Et=Object.prototype.hasOwnProperty;var kt=function(e,t){var r=v(e),n=!r&&ut(e),o=!r&&!n&&dt(e),s=!r&&!n&&!o&&bt(e),a=r||n||o||s,i=a?ot(e.length,String):[],c=i.length;for(var u in e)!t&&!Et.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||pt(u,c))||i.push(u);return i},St=Object.prototype;var _t=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||St)},It=b(Object.keys,Object),xt=Object.prototype.hasOwnProperty;var At=function(e){if(!_t(e))return It(e);var t=[];for(var r in Object(e))xt.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Ct=function(e){return null!=e&&ht(e.length)&&!he(e)};var Tt=function(e){return Ct(e)?kt(e):At(e)};var jt=function(e,t){return e&&nt(t,Tt(t),e)};var Rt=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},Mt=Object.prototype.hasOwnProperty;var Pt=function(e){if(!fe(e))return Rt(e);var t=_t(e),r=[];for(var n in e)("constructor"!=n||!t&&Mt.call(e,n))&&r.push(n);return r};var Ot=function(e){return Ct(e)?kt(e,!0):Pt(e)};var Ft=function(e,t){return e&&nt(t,Ot(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,a=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}}));var zt=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t};var Bt=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s};var Nt=function(){return[]},Lt=Object.prototype.propertyIsEnumerable,Ut=Object.getOwnPropertySymbols,$t=Ut?function(e){return null==e?[]:(e=Object(e),Bt(Ut(e),(function(t){return Lt.call(e,t)})))}:Nt;var Ht=function(e,t){return nt(e,$t(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,$t(e)),e=E(e);return t}:Nt;var qt=function(e,t){return nt(e,Wt(e),t)};var Kt=function(e,t,r){var n=t(e);return v(e)?n:Jt(n,r(e))};var Gt=function(e){return Kt(e,Tt,$t)};var Yt=function(e){return Kt(e,Ot,Wt)},Qt=Ce(s,"DataView"),Vt=Ce(s,"Promise"),Zt=Ce(s,"Set"),Xt=Ce(s,"WeakMap"),er=we(Qt),tr=we(Te),rr=we(Vt),nr=we(Zt),or=we(Xt),sr=m;(Qt&&"[object DataView]"!=sr(new Qt(new ArrayBuffer(1)))||Te&&"[object Map]"!=sr(new Te)||Vt&&"[object Promise]"!=sr(Vt.resolve())||Zt&&"[object Set]"!=sr(new Zt)||Xt&&"[object WeakMap]"!=sr(new Xt))&&(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 ar=sr,ir=Object.prototype.hasOwnProperty;var cr=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&ir.call(e,"index")&&(r.index=e.index,r.input=e.input),r},ur=s.Uint8Array;var lr=function(e){var t=new e.constructor(e.byteLength);return new ur(t).set(new ur(e)),t};var dr=function(e,t){var r=t?lr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},fr=/\w*$/;var pr=function(e){var t=new e.constructor(e.source,fr.exec(e));return t.lastIndex=e.lastIndex,t},hr=a?a.prototype:void 0,mr=hr?hr.valueOf:void 0;var vr=function(e){return mr?Object(mr.call(e)):{}};var gr=function(e,t){var r=t?lr(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 lr(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,br=function(){function e(){}return function(t){if(!fe(t))return{};if(wr)return wr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var Er=function(e){return"function"!=typeof e.constructor||_t(e)?{}:br(E(e))};var kr=function(e){return g(e)&&"[object Map]"==ar(e)},Sr=yt&&yt.isMap,_r=Sr?gt(Sr):kr;var Ir=function(e){return g(e)&&"[object Set]"==ar(e)},xr=yt&&yt.isSet,Ar=xr?gt(xr):Ir,Cr={};Cr["[object Arguments]"]=Cr["[object Array]"]=Cr["[object ArrayBuffer]"]=Cr["[object DataView]"]=Cr["[object Boolean]"]=Cr["[object Date]"]=Cr["[object Float32Array]"]=Cr["[object Float64Array]"]=Cr["[object Int8Array]"]=Cr["[object Int16Array]"]=Cr["[object Int32Array]"]=Cr["[object Map]"]=Cr["[object Number]"]=Cr["[object Object]"]=Cr["[object RegExp]"]=Cr["[object Set]"]=Cr["[object String]"]=Cr["[object Symbol]"]=Cr["[object Uint8Array]"]=Cr["[object Uint8ClampedArray]"]=Cr["[object Uint16Array]"]=Cr["[object Uint32Array]"]=!0,Cr["[object Error]"]=Cr["[object Function]"]=Cr["[object WeakMap]"]=!1;var Tr=function e(t,r,n,o,s,a){var i,c=1&r,u=2&r,l=4&r;if(n&&(i=s?n(t,o,s,a):n(t)),void 0!==i)return i;if(!fe(t))return t;var d=v(t);if(d){if(i=cr(t),!c)return zt(t,i)}else{var f=ar(t),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(dt(t))return Dt(t,c);if("[object Object]"==f||"[object Arguments]"==f||p&&!s){if(i=u||p?{}:Er(t),!c)return u?qt(t,Ft(i,t)):Ht(t,jt(i,t))}else{if(!Cr[f])return s?t:{};i=yr(t,f,c)}}a||(a=new Ve);var h=a.get(t);if(h)return h;a.set(t,i),Ar(t)?t.forEach((function(o){i.add(e(o,r,n,o,t,a))})):_r(t)&&t.forEach((function(o,s){i.set(s,e(o,r,n,s,t,a))}));var m=d?void 0:(l?u?Yt:Gt:u?Ot:Tt)(t);return Ze(m||t,(function(o,s){m&&(o=t[s=o]),rt(i,s,e(o,r,n,s,t,a))})),i};var jr=function(e){return Tr(e,5)};const Rr=(e,t,r,n)=>{if(C.dev){let o=n;n&&(o=jr(n)),J(`%c${e}%c %c${r[0]}`,...(e=>[`background-color:${e};color:#fff;padding:0 0.3em`,"",`color:${e};text-decoration:underline`])(t),r[1]||"","\n=>",o)}},Mr=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},Or=(e,t,r)=>{if(!r.has(e)){const t=e.includes("{")||e.includes("("),n={handles:[],key:t?Mr(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)},Fr=(e,t,r)=>{if(Array.isArray(e))for(let n of e)Or(n,t,r);else Or(e,t,r)},Dr=e=>(t,r)=>{const n=Pr[e];if(r)Fr(t,r,n);else{const e=t;for(let[t,r]of e)Fr(t,r,n)}},zr={get:Dr("get"),post:Dr("post"),patch:Dr("patch"),put:Dr("put")},Br={GET:"#009688",PATCH:"#8BC34A",POST:"#3F51B5",PUT:"#9C27B0"},Nr=(e,t,r,n)=>async(...r)=>{var o,s;return Rr(e,Br[e],[t],null===(o=r[0])||void 0===o?void 0:o.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===(s=r[0])||void 0===s?void 0:s.body,t,Pr[e.toLowerCase()]),n(...r)},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=Nr(r.toUpperCase(),t,0,o)}return Lr.apply(this,e)};const{origin:Ur,version:$r}=C,Hr=async()=>{const e=Math.floor(Date.now()/1e3/60/60/6),t=await fetch(`${Ur}/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*C.cacheTime*1e3&&(e=!1)}catch(e){}return e?K($r,e.version)?e=await Hr():setTimeout(Hr,5e3):e=await Hr(),e})().then(t=>{C.newVersion=t.version,C.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*C.timeout);fetch(`${Ur}${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,a={parse:function(r,n){var i=(n=n||{}).dynamicTyping||!1;if(E(i)&&(n.dynamicTypingFunction=i,i={}),n.dynamicTyping=i,n.transform=!!E(n.transform)&&n.transform,n.worker&&a.WORKERS_SUPPORTED){var c=function(){if(!a.WORKERS_SUPPORTED)return!1;var r,n,i=(r=t.URL||t.webkitURL||null,n=e.toString(),a.BLOB_URL||(a.BLOB_URL=r.createObjectURL(new Blob(["(",n,")();"],{type:"text/javascript"})))),c=new t.Worker(i);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=E(n.step),n.chunk=E(n.chunk),n.complete=E(n.complete),n.error=E(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 u(n):new d(n):!0===r.readable&&E(r.read)&&E(r.on)?p=new f(n):(t.File&&r instanceof File||r instanceof Object)&&(p=new l(n)),p.stream(r)},unparse:function(e,t){var r=!1,n=!0,o=",",s="\r\n",i='"',c=i+i,u=!1,l=null;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.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||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(i=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");l=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+i)}}();var d=new RegExp(h(i),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,u);if("object"==typeof e[0])return p(l||f(e[0]),e,u)}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:f(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function f(e){if("object"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function p(e,t,r){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var i=Array.isArray(e)&&0<e.length,c=!Array.isArray(t[0]);if(i&&n){for(var u=0;u<e.length;u++)0<u&&(a+=o),a+=m(e[u],u);0<t.length&&(a+=s)}for(var l=0;l<t.length;l++){var d=i?e.length:t[l].length,f=!1,p=i?0===Object.keys(t[l]).length:0===t[l].length;if(r&&!i&&(f="greedy"===r?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===r&&i){for(var h=[],v=0;v<d;v++){var g=c?e[v]:v;h.push(t[l][g])}f=""===h.join("").trim()}if(!f){for(var y=0;y<d;y++){0<y&&!p&&(a+=o);var w=i&&c?e[y]:y;a+=m(t[l][w],y)}l<t.length-1&&(!r||0<d&&!p)&&(a+=s)}}return a}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,a.BAD_DELIMITERS)||-1<n.indexOf(o)||" "===n.charAt(0)||" "===n.charAt(n.length-1)?i+n+i:n}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!r&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=m,a.ParserHandle=p,a.NetworkStreamer=u,a.FileStreamer=l,a.StringStreamer=d,a.ReadableStreamStreamer=f,t.jQuery){var i=t.jQuery;i.fn.parse=function(e){var r=e.config||{},n=[];return this.each((function(e){if("INPUT"!==i(this).prop("tagName").toUpperCase()||"file"!==i(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:i.extend({},r)})})),o(),this;function o(){if(0!==n.length){var t,r,o,c=n[0];if(E(e.before)){var u=e.before(c.file,c.inputElem);if("object"==typeof u){if("abort"===u.action)return t=c.file,r=c.inputElem,o=u.reason,void(E(e.error)&&e.error({name:"AbortError"},t,r,o));if("skip"===u.action)return void s();"object"==typeof u.config&&(c.instanceConfig=i.extend(c.instanceConfig,u.config))}else if("skip"===u)return void s()}var l=c.instanceConfig.complete;c.instanceConfig.complete=function(e){E(l)&&l(e,c.file,c.inputElem),s()},a.parse(c.file,c.instanceConfig)}else E(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&&E(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 i=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=i.meta.cursor;this._finished||(this._partialLine=s.substring(c-this._baseIndex),this._baseIndex=c),i&&i.data&&(this._rowCount+=i.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)t.postMessage({results:i,workerId:a.WORKER_ID,finished:u});else if(E(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);i=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!u||!E(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){E(this._config.error)?this._config.error(e):n&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.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=b(this._chunkLoaded,this),t.onerror=b(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 l(e){var t,r;(e=e||{}).chunkSize||(e.chunkSize=a.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=b(this._chunkLoaded,this),t.onerror=b(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 f(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=b((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=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=b((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,i=/^\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))/,u=this,l=0,d=0,f=!1,p=!1,v=[],g={data:[],errors:[],meta:{}};if(E(e.step)){var y=e.step;e.step=function(t){if(g=t,S())k();else{if(k(),0===g.data.length)return;l+=t.data.length,e.preview&&l>e.preview?r.abort():(g.data=g.data[0],y(g,u))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function k(){if(g&&n&&(I("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t<g.data.length;t++)b(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){E(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,a=t[n];e.header&&(s=n>=v.length?"__parsed_extra":v[n]),e.transform&&(a=e.transform(a,s)),a=_(s,a),"__parsed_extra"===s?(o[s]=o[s]||[],o[s].push(a)):o[s]=a}return e.header&&(n>v.length?I("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+n,d+r):n<v.length&&I("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 _(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(i.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 I(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,i){var c=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var r=new RegExp(h(t)+"([^]*?)"+h(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 a=0,i=0;i<n.length;i++)"\n"===n[i][0]&&a++;return a>=n.length/2?"\r\n":"\r"}(o,c)),n=!1,e.delimiter)E(e.delimiter)&&(e.delimiter=e.delimiter(o),g.meta.delimiter=e.delimiter);else{var u=function(t,r,n,o,s){var i,c,u,l;s=s||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var d=0;d<s.length;d++){var f=s[d],p=0,h=0,v=0;u=void 0;for(var g=new m({comments:o,delimiter:f,newline:r,preview:10}).parse(t),y=0;y<g.data.length;y++)if(n&&b(g.data[y]))v++;else{var w=g.data[y].length;h+=w,void 0!==u?0<w&&(p+=Math.abs(w-u),u=w):u=w}0<g.data.length&&(h/=g.data.length-v),(void 0===c||p<=c)&&(void 0===l||l<h)&&1.99<h&&(c=p,i=f,l=h)}return{successful:!!(e.delimiter=i),bestDelimiter:i}}(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(n=!0,e.delimiter=a.DefaultDelimiter),g.meta.delimiter=e.delimiter}var l=w(e);return e.preview&&e.header&&l.preview++,t=o,r=new m(l),g=r.parse(t,s,i),k(),f?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,r.abort(),t=E(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,r.abort(),g.meta.aborted=!0,E(e.complete)&&e.complete(g),t=""}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){var t,r=(e=e||{}).delimiter,n=e.newline,o=e.comments,s=e.step,i=e.preview,c=e.fastMode,u=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof r||-1<a.BAD_DELIMITERS.indexOf(r))&&(r=","),o===r)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||-1<a.BAD_DELIMITERS.indexOf(o))&&(o=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var l=0,d=!1;this.parse=function(e,a,f){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=E(s),w=[],b=[],k=[],S=l=0;if(!e)return z();if(c||!1!==c&&-1===e.indexOf(t)){for(var _=e.split(n),I=0;I<_.length;I++){if(k=_[I],l+=k.length,I!==_.length-1)l+=n.length;else if(f)return z();if(!o||k.substring(0,g)!==o){if(y){if(w=[],P(k.split(r)),B(),d)return z()}else P(k.split(r));if(i&&i<=I)return w=w.slice(0,i),z(!0)}}return z()}for(var x=e.indexOf(r,l),A=e.indexOf(n,l),C=new RegExp(h(u)+h(t),"g"),T=e.indexOf(t,l);;)if(e[l]!==t)if(o&&0===k.length&&e.substring(l,l+g)===o){if(-1===A)return z();l=A+v,A=e.indexOf(n,l),x=e.indexOf(r,l)}else{if(-1!==x&&(x<A||-1===A)){if(!(x<T)){k.push(e.substring(l,x)),l=x+m,x=e.indexOf(r,l);continue}var j=N(x,T,A);if(j&&void 0!==j.nextDelim){x=j.nextDelim,T=j.quoteSearch,k.push(e.substring(l,x)),l=x+m,x=e.indexOf(r,l);continue}}if(-1===A)break;if(k.push(e.substring(l,A)),D(A+v),y&&(B(),d))return z();if(i&&w.length>=i)return z(!0)}else for(T=l,l++;;){if(-1===(T=e.indexOf(t,T+1)))return f||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:w.length,index:l}),F();if(T===p-1)return F(e.substring(l,T).replace(C,t));if(t!==u||e[T+1]!==u){if(t===u||0===T||e[T-1]!==u){-1!==x&&x<T+1&&(x=e.indexOf(r,T+1)),-1!==A&&A<T+1&&(A=e.indexOf(n,T+1));var R=O(-1===A?x:Math.min(x,A));if(e[T+1+R]===r){k.push(e.substring(l,T).replace(C,t)),e[l=T+1+R+m]!==t&&(T=e.indexOf(t,l)),x=e.indexOf(r,l),A=e.indexOf(n,l);break}var M=O(A);if(e.substring(T+1+M,T+1+M+v)===n){if(k.push(e.substring(l,T).replace(C,t)),D(T+1+M+v),x=e.indexOf(r,l),T=e.indexOf(t,l),y&&(B(),d))return z();if(i&&w.length>=i)return z(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:w.length,index:l}),T++}}else T++}return F();function P(e){w.push(e),S=l}function O(t){var r=0;if(-1!==t){var n=e.substring(T+1,t);n&&""===n.trim()&&(r=n.length)}return r}function F(t){return f||(void 0===t&&(t=e.substring(l)),k.push(t),l=p,P(k),y&&B()),z()}function D(t){l=t,P(k),k=[],A=e.indexOf(n,l)}function z(e){return{data:w,errors:b,meta:{delimiter:r,linebreak:n,aborted:d,truncated:!!e,cursor:S+(a||0)}}}function B(){s(z()),w=[],b=[]}function N(n,o,s){var a={nextDelim:void 0,quoteSearch:void 0},i=e.indexOf(t,o+1);if(o<n&&n<i&&(i<s||-1===s)){var c=e.indexOf(r,i);if(-1===c)return a;i<c&&(i=e.indexOf(t,i+1)),a=N(c,i,s)}else a={nextDelim:n,quoteSearch:o};return a}},this.abort=function(){d=!0},this.getCharIndex=function(){return l}}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(E(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else E(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];E(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 b(e,t){return function(){e.apply(t,arguments)}}function E(e){return"function"==typeof e}return n&&(t.onmessage=function(e){var r=e.data;if(void 0===a.WORKER_ID&&r&&(a.WORKER_ID=r.workerId),"string"==typeof r.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(r.input,r.config),finished:!0});else if(t.File&&r.input instanceof File||r.input instanceof Object){var n=a.parse(r.input,r.config);n&&t.postMessage({workerId:a.WORKER_ID,results:n,finished:!0})}}),(u.prototype=Object.create(c.prototype)).constructor=u,(l.prototype=Object.create(c.prototype)).constructor=l,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,a}()}));const Kr=e=>{try{return qr.parse(e.replace(/^\ufeff/,""),{header:!0}).data}catch(e){return console.log(e),{}}},Gr=(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 Qr=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(K(C.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)},Vr=(e,t)=>{Yr&&Yr.hashes||(Yr={hashes:C.hashes,version:C.version});let r=e;/(\.csv|\.json)/.test(e)||(r=e+".csv");const n=C.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)}},Zr=new Map,Xr=async(e,t)=>{const r=t||e;if(Zr.has(e))return Zr.get(e);let n=await Qr(e);n||(n=await Wr(`/data/${r}.csv`),Vr(e,n));const o=Kr(n);return Zr.set(e,o),o},en=e=>{const t=new Map;let r=!1;const{name:n,path:o}=e,s=e.keys||{},a=s.text||"text",i=s.trans||"trans";return async()=>{if(!r){const s=await Xr(n,o);e.sort&&Gr(s,e.sort),s.forEach(e=>{const r=U(e[a]),n=$(U(e[i],!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 Xr(e),a=await sn(),i=new Map,c=new Map,u=new Map,l=new Map([["name",[...a.keys()]]]),d=[];Gr(s,"text").forEach(e=>{if(null==e?void 0:e.text){const t=U(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?(l.has(n)||l.set(n,[]),l.get(n).push((e=>e.replace(/\?/g,"\\?").replace(/\./g,"\\.").replace(/\*/g,"\\*").replace(/\+/g,"\\+").replace(/\(/g,"\\(").replace(/\)/g,"\\)"))(t)),i.set(t,r)):u.set(t.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),r))}});for(let[e,t]of l)d.push({re:new RegExp("\\$"+e,"g"),exp:`(${t.join("|")})`});for(let[e,t]of u){const r=tn(e,d);o.set(r,t)}r=new Map([...c,...i,...a]),n=[i,a],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),a=e=>e.map(e=>{const t=e[1];return Array.isArray(t)?e[1]=t.map(e=>s(e)):e[1]=s(t),e}),i=(e,t)=>{const r=e.match(/(.+?)([++]+)$/);return r?Q(r[1],t)+r[2]:Q(e,t)};return{api:{get(e){zr.get(a(e))},post(e){zr.post(a(e))},put(e){zr.put(a(e))},patch(e){zr.patch(a(e))}},transItem:(t,r,o=n)=>{if(null==t?void 0:t[r]){let n=i(t[r],o);if(n!==t[r])return t[r]=e(n,!0);n=((e,t)=>e.split("/").map(e=>i(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:un,transItem:ln}=cn("skill"),dn=e=>{var t,r;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{ln(e,"effectName"),ln(e,"effectDescription")}),null===(r=e.rivalMemoryAppealEffects)||void 0===r||r.forEach(e=>{ln(e,"effectName"),ln(e,"effectDescription")}))},fn=(e,t=!1)=>{e&&(ln(e,"comment"),ln(e,"name"),t&&dn(e),e.linkSkill&&(ln(e.linkSkill,"comment"),ln(e.linkSkill,"name"),t&&dn(e.linkSkill)),e.plusSkill&&(ln(e.plusSkill,"comment"),ln(e.plusSkill,"name")))},pn=e=>{e&&e.forEach(e=>{ln(e,"releaseConditions"),ln(e.passiveSkills,"comment"),ln(e.passiveSkills,"name"),fn(e.skill),fn(e.concertActiveSkill),e.activeSkills&&e.activeSkills.forEach(e=>{fn(e)})})},hn=e=>{e.forEach(e=>{fn(e)})},mn=(e,t=!1)=>{var r,n,o;let s=e.userProduceIdol;s&&(null===(r=s.activeSkills)||void 0===r||r.forEach(e=>{fn(e)}),null===(n=s.passiveSkills)||void 0===n||n.forEach(e=>{fn(e)}),null===(o=s.limitBreaks)||void 0===o||o.forEach(e=>{fn(e)}),t&&pn(s.skillPanels))},vn=e=>{e.forEach(e=>{fn(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=>{fn(e,!0)})}),null===(n=e.rival)||void 0===n||n.rivalSkills.forEach(e=>{dn(e)})})},yn=e=>{pn(e.idol.skillPanels),hn(e.idol.memoryAppeals),(e=>{e.forEach(e=>{fn(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=>{ln(e,"comment"),ln(e,"name")})},bn=e=>{const t=e.userFesIdol;t.activeSkills.forEach(e=>{fn(e)}),fn(t.memoryAppeal),t.passiveSkills.forEach(e=>{ln(e,"comment"),ln(e,"name")})},En=bn,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=>{fn(e.passiveSkills),fn(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=>{fn(e,!0)}),fn(e.userFesIdol.memoryAppeal,!0),null===(t=e.userFesIdol.passiveSkills)||void 0===t||t.forEach(e=>{ln(e,"comment"),ln(e,"name"),dn(e)}))},_n=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)},In=e=>{var t;null===(t=e.fanActiveSkills)||void 0===t||t.forEach(e=>{fn(e,!0)}),e.userProduceSupportIdols.forEach(e=>{fn(e.activeSkill,!0)});let r=e.userProduceIdol;r.activeSkills.forEach(e=>{fn(e,!0)}),fn(r.memoryAppeal,!0),r.passiveSkills.forEach(e=>{fn(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?In(t):(t.userFesDeck||t.userRaidDeck)&&_n(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},An=e=>{e.userProduceIdol.activeSkills.forEach(e=>{fn(e)})},Cn=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=>{ln(e,"name")})};un.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=>{ln(e,"comment"),ln(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=>{ln(e,"comment"),ln(e,"name")})}]],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],[yn]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.activeSkills.forEach(e=>{fn(e)}),hn(e.userIdol.idol.memoryAppeals)}],["userReserveIdols/userIdol/{num}",e=>{pn(e.idol.skillPanels),hn(e.idol.memoryAppeals)}],["userFesIdols/{num}",bn],[["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}",En],["userRaidDecks",e=>{e.userRaidDecks.forEach(e=>{e.userRaidDeckMembers.forEach(e=>{var t;null===(t=e.userFesIdol)||void 0===t||t.activeSkills.forEach(e=>{fn(e)})})})}],["userProduceAbilities",An],["userProduces",[Cn]]]),un.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"],[Cn]],["fes(Match|Raid)?Concert/actions/start",[_n]],["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&&_n(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],["fesTowerConcert/actions/start",[_n]],["fesTowerConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userFesEventDeck&&_n(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[In]],[["produces/actions/next","produces/actions/resume"],e=>{e.userProduceIdol&&hn(e.userProduceIdol.userIdol.idol.memoryAppeals)}],["userProduceAbilities",An]]),un.patch([["userFesDecks",e=>{e.userFesDecks.forEach(e=>{e.userFesDeckMembers.forEach(Sn)})}],["userSupportIdols/{num}",e=>{wn(e.userSupportIdol)}]]);const{api:Tn,transItem:jn}=cn("etc/ex-skill"),Rn=e=>{jn(e,"name"),jn(e,"description")},Mn=e=>{e.userIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})},Pn=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)})})},Fn=On;Tn.get([[["userIdols/produceExSkillTop","userSupportIdols/produceExSkillTop","userIdols/{num}/produceExSkillTop","userSupportIdols/{num}/produceExSkillTop"],e=>{var t,r,n,o,s,a;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===(a=s.userSupportIdolProduceExSkills)||void 0===a||a.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}"],[Pn]],["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}"],[Mn]],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],e=>{e.userProduceIdolProduceExSkills.forEach(e=>{Rn(e.produceExSkill)})}],["userFesIdols/{num}",On],["earthUsers/{uuid}/userFesIdols/{num}",Fn],["userProducerSkills/summaries",e=>{e.forEach(e=>{Rn(e)})}]]),Tn.post([["userIdols/{num}/produceExSkills/{num}/actions/set",Mn],["userSupportIdols/{num}/produceExSkills/{num}/actions/set",[Pn]],["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:Dn,transItem:zn}=cn("support-skill"),Bn=e=>{null==e||e.forEach(e=>{zn(e,"description"),zn(e,"name")})},Nn=e=>{var t,r;const n=null!==(t=e.userSupportIdol)&&void 0!==t?t:e;Bn(n.acquiredSupportSkills),Bn(n.supportSkills),Bn(null===(r=n.supportIdol)||void 0===r?void 0:r.supportSkills)};Dn.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],[Nn]],["userProduce(Teaching)?SupportIdols/{num}",[Nn]],["userReserveSupportIdols/userSupportIdol/{num}",[Nn]],["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)})}]]),Dn.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",[Nn]],["produces/actions/(resume|next)",[Nn]],[["produceTeachings/resume","produceTeachings/next"],Nn]]),Dn.patch([["userSupportIdols/{num}",Nn],["produces/{num}/produceItem/consume",e=>{Bn(e.supportSkills)}]]);const{api:Ln,transItem:Un}=cn("etc/idea-note"),$n=e=>{var t;e&&(Un(e,"title"),(e=>{Un(e,"title"),Un(e,"comment")})(e.produceIdeaNoteCompleteBonus),null===(t=e.produceIdeaNoteExtraBonuses)||void 0===t||t.forEach(e=>{Un(e,"comment"),Un(e,"condition")}))},Hn=e=>{var t,r;null===(t=e.ideaNoteResult)||void 0===t||null===(r=t.seasonClearBonusIdeaNotes)||void 0===r||r.forEach(e=>{$n(e)})};Ln.get([["userProduceIdeaNotes",e=>{e.forEach(e=>{$n(e.produceIdeaNote)})}]]),Ln.post([["produces/actions/(resume|next)",[e=>{var t;null===(t=e.userProduceIdeaNotes)||void 0===t||t.forEach(e=>{$n(e.produceIdeaNote)})},Hn]],["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=>{$n(e)})});let o=null===(r=e.lessonResult)||void 0===r||null===(n=r.userProduceIdeaNote)||void 0===n?void 0:n.produceIdeaNote;$n(o)}]],["produces/actions/endWeek",Hn]]),Ln.patch([["userProduceIdeaNotes/228681479/actions/select",e=>{$n(e.userProduceIdeaNote.produceIdeaNote)}]]);const{api:Jn,transItem:Wn}=cn("etc/grad-skill"),qn=e=>{var t;e&&(Wn(e,"comment"),Wn(e,"name"),Wn(e,"acquireComment"),Wn(e,"releaseComment"),null===(t=e.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{Wn(e,"name")}))},Kn=e=>{e.userFesIdol.abilities.forEach(e=>{qn(e)})},Gn=Kn,Yn=e=>{var t,r;const n=e=>{e.userFesIdol.abilities.forEach(e=>{qn(e)}),e.userFesIdol.concertAbilities.forEach(e=>{qn(e)})};null===(t=e.userFesDeck)||void 0===t||t.userFesDeckMembers.forEach(n),null===(r=e.userRaidDeck)||void 0===r||r.userRaidDeckMembers.forEach(n)},Qn=e=>{var t,r;const n=e.userProduceIdol;n&&(null===(t=n.abilities)||void 0===t||t.forEach(e=>{qn(e)}),null===(r=n.concertAbilities)||void 0===r||r.forEach(e=>{qn(e)}))},Vn=e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?Qn(t):(t.userFesDeck||t.userRaidDeck)&&Yn(t),e.gameData=JSON.stringify(t)}catch(e){log(e)}},Zn=e=>{e.userProduceIdol.abilities.forEach(e=>{qn(e)}),e.userProduceAbilities.forEach(e=>{qn(e.ability)})};Jn.get([["userFesIdols/{num}",Kn],["fes(Match)?Concert/actions/resume",[Vn]],["earthUsers/{uuid}/userFesIdols/{num}",Gn],["userProduceAbilities",Zn],[["userProduceAreas"],e=>{var t;null===(t=e.abilities)||void 0===t||t.forEach(e=>{qn(e)})}]]),Jn.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=>{qn(e)}))})(e)},Vn]],["fes(Match|Raid)?Concert/actions/start",[Yn]],["fes(Match)?Concert/actions/resume",[Vn]],["fesRaidConcert/actions/resume",[e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.userRaidDeck&&Yn(t),e.gameState.game_data=JSON.stringify(t)}catch(e){log(e)}}]],[["produce(Teaching)?s/({num}/audition|concert)/actions/start","produceTeachings/(auditions|concerts)/start"],[Qn]],["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=>{Wn(e,"name")})}],["userProduceAbilities",Zn]]);const{api:Xn,transItem:eo}=cn("etc/landing-point"),to=e=>{e&&(eo(e,"comment"),eo(e,"name"),eo(e,"acquireComment"),eo(e,"releaseComment"))},ro=e=>{eo(e,"title"),e.produceMusicAssignmentClearBonuses.forEach(e=>{eo(e,"title")})},no=e=>{var t,r;eo(e.concertBgm,"songTitle"),eo(e.concertBgm,"newLineSongTitle"),eo(e.feverActiveSkill,"comment"),e.produceMusicProficiencyBonuses.forEach(e=>{var t;eo(e,"description"),e.ability&&(to(e.ability),null===(t=e.ability.produceAbilityAcquireConditionComments)||void 0===t||t.forEach(e=>{eo(e,"name")}))}),null===(t=e.produceMusicAssignments)||void 0===t||t.forEach(ro),null===(r=e.produceMusicProficiencyJudgeStarBonuses)||void 0===r||r.forEach(e=>{eo(e,"description")})},oo=e=>{var t,r,n;no(e.produceMusic),null===(t=e.userProduceMusicAssignments)||void 0===t||t.forEach(e=>{ro(e.produceMusicAssignment)}),null===(r=e.allUserProduceMusicAssignments)||void 0===r||r.forEach(e=>{ro(e.produceMusicAssignment)}),null===(n=e.judgeStarBonuses)||void 0===n||n.forEach(e=>{eo(e,"description")})},so=e=>{var t,r;null===(t=e.userProduceMusicProficiencies)||void 0===t||t.forEach(oo),null===(r=e.activatedProduceMusicAssignmentBonuses)||void 0===r||r.forEach(e=>{var t;null===(t=e.produceMusicAssignmentClearBonuses)||void 0===t||t.forEach(e=>{eo(e,"title")})})},ao=e=>{var t;to(e),null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{eo(e,"effectDescription"),eo(e,"effectName")})},io=e=>{var t,r,n,o;null===(t=e.produceMusic)||void 0===t||null===(r=t.judgeStarBonuses)||void 0===r||r.forEach(e=>{eo(e,"description")}),null===(n=e.userProduceIdol)||void 0===n||null===(o=n.abilities)||void 0===o||o.forEach(ao),eo(e.feverActiveSkill,"comment")},co=e=>{var t,r;null===(t=e.userFesIdol)||void 0===t||null===(r=t.abilities)||void 0===r||r.forEach(ao)},uo=co;Xn.get([[["userProduceAreas","produceMusics"],e=>{var t;null===(t=e.produceMusics)||void 0===t||t.forEach(no)}],["userProduces",[so]],["userFesIdols/{num}",co],["earthUsers/{uuid}/userFesIdols/{num}",uo]]),Xn.post([[["produces/actions/resume","produces/actions/next"],[so]],["produces/actions/resume",e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.produceAudition||t.produceConcert?io(t):t.userFesDeck||t.userRaidDeck,e.gameData=JSON.stringify(t)}catch(e){log(e)}}],["userProduceMusicProficiencies",e=>{oo(e.userProduceMusicProficiency)}],["produces/concert/actions/start",io]]),Xn.patch([["userProduceMusicAssignments/{num}",e=>{ro(e.produceMusicAssignment)}]]);const{api:lo,transItem:fo}=cn("etc/festour"),po=e=>{var t;null===(t=e.suggestFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{vo(e)})},ho=e=>{var t;null===(t=e.suggestFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{fo(e.fesTowerBonus,"desc")})},mo=e=>{let t=e.userFesTowerAreaSkipBonus;t&&fo(t.fesTowerBonus,"desc")},vo=e=>{var t;e&&(null===(t=e.userFesTowerCompleteBonuses)||void 0===t||t.forEach(e=>{yo(e)}))},go=e=>{var t;e&&(null===(t=e.fesTowerBonusIdolConditions)||void 0===t||t.forEach(e=>{fo(e,"desc")}))},yo=e=>{var t,r;e&&(null===(t=e.fesTowerCompleteBonus)||void 0===t||null===(r=t.fesTowerBonuses)||void 0===r||r.forEach(e=>{fo(e,"desc")}))},wo=e=>{var t;e&&(null===(t=e.evaluationDetails)||void 0===t||t.forEach(e=>{fo(e,"evaluation")}))},bo=e=>{var t;e&&(null===(t=e.skillEffects)||void 0===t||t.forEach(e=>{fo(e,"effectDescription")}))},Eo=e=>{var t;null===(t=e.userFesTowerAreaClearBonuses)||void 0===t||t.forEach(e=>{fo(e.fesTowerBonus,"desc")})};lo.get([["userFesTowerResults",wo],["userFesTowerAdvantages",[e=>{var t;e&&(null===(t=e.fesTowerAdvantageFilters)||void 0===t||t.forEach(e=>{fo(e,"title")}))},e=>{var t;e&&(null===(t=e.userFesTowerAdvantages)||void 0===t||t.forEach(e=>{fo(e,"name"),fo(e.fesTowerAdvantageEffect,"desc"),fo(e.nextFesTowerAdvantageEffect,"desc"),bo(bo)}))}]],["userFesTowerItems",e=>{var t;e&&(null===(t=e.userFesTowerItems)||void 0===t||t.forEach(e=>{fo(e,"name"),fo(e.fesTowerItemLevel,"desc"),fo(e.nextFesTowerItemLevel,"desc")}))}],[["fesTowerBonusIdols"],e=>{var t;null===(t=e.fesTowerBonusIdols)||void 0===t||t.forEach(e=>{go(e)})}]]),lo.post([["userFesTowerResults",wo],["fesTowerEvents/top",[po,ho,mo,vo,e=>{var t;null===(t=e.userFesTowerAreas)||void 0===t||t.forEach(e=>{Eo(e)})}]]]),lo.patch([["userFesTowerAdvantages/action/acquire",e=>{e&&(fo(e,"name"),fo(e.fesTowerAdvantageEffect,"desc"),fo(e.nextFesTowerAdvantageEffect,"desc"))}],["userFesTowerItems/action/acquire",e=>{e&&(fo(e,"name"),fo(e.fesTowerItemLevel,"desc"),fo(e.nextFesTowerItemLevel,"desc"))}],["userFesTowerAreas/action/complete",po],["userFesTowerAreas/action/skip",po],[["fesTowerEvents/top","userFesTowers/action/skip"],[po,ho,mo]]]);const{api:ko,transItem:So}=cn("etc/knowhowbook"),_o=e=>{var t;null===(t=e.userKnowHowBookIndividualities)||void 0===t||t.forEach(e=>{Io(e.individuality)})},Io=e=>{e&&(So(e,"name"),So(e,"description"))},xo=e=>{e&&(So(e,"name"),e.ability&&(So(e.ability,"comment"),So(e.ability,"name")),e.activeSkill&&So(e.activeSkill,"comment"))};ko.get([[["userProduceAreas","userProduces/growths"],e=>{var t;null===(t=e.userProduceGrowths)||void 0===t||t.forEach(e=>{xo(e.produceGrowth)})}],[["userKnowHowBooks"],e=>{var t;null===(t=e.userKnowHowBooks)||void 0===t||t.forEach(e=>{_o(e)})}]]),ko.post([[["produces/actions/endWeek","produces/actions/resume"],e=>{var t;null===(t=e.availableIndividualities)||void 0===t||t.forEach(e=>{Io(e)})}],["produces/actions/result",e=>{var t,r;null===(t=e.userKnowHowBook)||void 0===t||null===(r=t.userKnowHowBookIndividualities)||void 0===r||r.forEach(e=>{Io(e.individuality)})}]]);const{api:Ao,getTransItem:Co,ensureData:To}=cn("etc/item-re"),jo=Co((t,r,n)=>{if(null==t?void 0:t[r]){let o=t[r].split("\n");o.forEach((e,t)=>{V(o,t,n)});let s=o.join("\n");s!==t[r]&&(t[r]=e(s,!0))}}),Ro=Co(V),Mo=Co((e,t,r)=>{if(null==e?void 0:e[t]){let n=e[t];if(V(e,t,r),e[t]===n){e[t]=e[t].replace("\n","");let o=e[t];V(e,t,r),o===e[t]&&(e[t]=n)}}}),Po=["produceItem","recoveryItem","exchangeItem","lotteryTicket","evolutionItem","gashaTicket","scoutTicket","enhancementItem","idolEvolutionPiece"],Oo=e=>{var t;null==e||null===(t=e.shopMerchandises)||void 0===t||t.forEach(e=>{var t;Ro(e,"title"),Mo(e,"shopTitle"),jo(e,"comment"),null===(t=e.shopContents)||void 0===t||t.forEach(e=>{Ro(e.content,"name"),jo(e.content,"comment")})})},Fo=e=>{let t=e;e.userProduceItems&&(t=e.userProduceItems),Array.isArray(t)&&t.forEach(e=>{const t=e[Po[0]]||e[Po[1]]||e[Po[2]]||e[Po[3]]||e[Po[4]]||e[Po[5]]||e[Po[6]]||e[Po[7]]||e[Po[8]];Ro(t,"name"),jo(t,"comment")})},Do=e=>{e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{e.gameEventAccumulatedPresent.rewards.forEach(e=>{Ro(e.content,"name")})})},zo=e=>{var t;null==e||null===(t=e.activeProduceItems)||void 0===t||t.forEach(e=>{Ro(e.produceItem,"name"),jo(e.produceItem,"comment")})};Ao.get([[["userShops","userIdolPieceShops"],e=>{e&&(Array.isArray(e.userShops)&&e.userShops.forEach(e=>{Oo(e)}),Array.isArray(e.userEventShops)&&e.userEventShops.forEach(e=>{Oo(e.userShop)}))}],[["userRecoveryItems","userProduceItems","userExchangeItems","userLotteryTickets","userEvolutionItems","userGashaTickets","userScoutTickets","userEnhancementItems","userIdolEvolutionPieces"],Fo],[["userPresents\\?limit={num}","userPresentHistories\\?limit={num}"],e=>{Array.isArray(e)&&e.forEach(e=>{Ro(e.content,"name"),Ro(e,"note")})}],["userProduces",zo],["missionEvents/{num}/top",Do],["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;Ro(r,"name"),jo(r,"comment")})}],["businessTop",e=>{var t;null===(t=e.userRecoveryItems)||void 0===t||t.forEach(e=>{Ro(e.recoveryItem,"name")})}]]),Ao.post([["myPage",e=>{zo(e.userProduce)}],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",Do],["userShops/actions/purchase",e=>{Ro(null==e?void 0:e.shopMerchandise,"title"),jo(null==e?void 0:e.shopMerchandise,"comment")}],["produces/{num}/actions/ready",Fo],["userPresents/{num}/actions/receive",e=>{Ro(e.receivedPresent,"Name")}],["userMissions/{num}/actions/receive",e=>{Ro(e.userMission.mission.missionReward.content,"name")}],["userLoginBonuses",e=>{e.userLoginBonuses.forEach(e=>{e.loginBonus.sheets.forEach(e=>{e.rewards.forEach(e=>{Ro(e.content,"name")})})}),e.userTotalBonuses.forEach(e=>{e.rewards.forEach(e=>{Ro(e.content,"name")})})}],["fesTop",e=>{e.lastRankingResult&&Array.isArray(e.lastRankingResult.fesMatchGradeRewards)&&e.lastRankingResult.fesMatchGradeRewards.forEach(e=>{Ro(e.content,"name")})}],["userSelectLoginBonuses/{num}",e=>{e.rewards.forEach(e=>{Ro(e.content,"name")})}],["gashas/{num}/actions/draw",e=>{var t;null===(t=e.acquiredStampRewards)||void 0===t||t.forEach(e=>{Ro(e.content,"name")})}]]),Ao.patch([["produces/{num}/produceItem/consume",e=>{var t;const r=null===(t=e.consumeProduceItem)||void 0===t?void 0:t.produceItem;r&&(Ro(r,"name"),jo(r,"comment"))}]]);en({name:"etc/noun-fix",keys:{trans:"fixed"},sort:"text"}),en({name:"etc/caiyun-prefix",keys:{trans:"fixed"},sort:"text"});const Bo=new Map;let No=new Map,Lo=!1,Uo=null;const $o=t=>{const r=Kr(t),n=new Map,o=G();return r.forEach(t=>{const r=o(L(t.id)),s=U(t.text),a=U(t.trans,!0),i=L(t.name);s&&a&&(r&&!/^0+$/.test(r)&&"select"!==r?n.set(r,e(a)):"select"===r?n.set(s+"-select",e(a)):n.set(s,e(a))),r&&i&&"info"===r&&n.set("name",i)}),n},Ho=async()=>{if(!Lo){(await Xr("comm-story")).forEach(e=>{if(null==e?void 0:e.text){const t=U(e.text),r=U(e.trans,!0);t&&r&&t!==r&&No.set(t,r)}}),Lo=!0}return No};let Jo=null,Wo=!1;const qo=en({name:"type-text"}),Ko=async()=>(Wo||(Jo=await qo(),Wo=!0),Jo);var Go=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]]},Yo=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]]},Qo=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])},Vo=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]},Zo=function(e,t){return[e[0]^t[0],e[1]^t[1]]},Xo=function(e){return e=Zo(e,[0,e[0]>>>1]),e=Yo(e,[4283543511,3981806797]),e=Zo(e,[0,e[0]>>>1]),e=Yo(e,[3301882366,444984403]),e=Zo(e,[0,e[0]>>>1])};let es="";const ts=()=>{let e="0123456789abcdefghijklmnopqrstuvwxyz",t="";for(let r=0;r<33;r++)t+=e[Math.floor(Math.random()*e.length)];es=function(e,t){t=t||0;for(var r=(e=e||"").length%16,n=e.length-r,o=[0,t],s=[0,t],a=[0,0],i=[0,0],c=[2277735313,289559509],u=[1291169091,658871167],l=0;l<n;l+=16)a=[255&e.charCodeAt(l+4)|(255&e.charCodeAt(l+5))<<8|(255&e.charCodeAt(l+6))<<16|(255&e.charCodeAt(l+7))<<24,255&e.charCodeAt(l)|(255&e.charCodeAt(l+1))<<8|(255&e.charCodeAt(l+2))<<16|(255&e.charCodeAt(l+3))<<24],i=[255&e.charCodeAt(l+12)|(255&e.charCodeAt(l+13))<<8|(255&e.charCodeAt(l+14))<<16|(255&e.charCodeAt(l+15))<<24,255&e.charCodeAt(l+8)|(255&e.charCodeAt(l+9))<<8|(255&e.charCodeAt(l+10))<<16|(255&e.charCodeAt(l+11))<<24],a=Yo(a,c),a=Qo(a,31),a=Yo(a,u),o=Zo(o,a),o=Qo(o,27),o=Go(o,s),o=Go(Yo(o,[0,5]),[0,1390208809]),i=Yo(i,u),i=Qo(i,33),i=Yo(i,c),s=Zo(s,i),s=Qo(s,31),s=Go(s,o),s=Go(Yo(s,[0,5]),[0,944331445]);switch(a=[0,0],i=[0,0],r){case 15:i=Zo(i,Vo([0,e.charCodeAt(l+14)],48));case 14:i=Zo(i,Vo([0,e.charCodeAt(l+13)],40));case 13:i=Zo(i,Vo([0,e.charCodeAt(l+12)],32));case 12:i=Zo(i,Vo([0,e.charCodeAt(l+11)],24));case 11:i=Zo(i,Vo([0,e.charCodeAt(l+10)],16));case 10:i=Zo(i,Vo([0,e.charCodeAt(l+9)],8));case 9:i=Zo(i,[0,e.charCodeAt(l+8)]),i=Yo(i,u),i=Qo(i,33),i=Yo(i,c),s=Zo(s,i);case 8:a=Zo(a,Vo([0,e.charCodeAt(l+7)],56));case 7:a=Zo(a,Vo([0,e.charCodeAt(l+6)],48));case 6:a=Zo(a,Vo([0,e.charCodeAt(l+5)],40));case 5:a=Zo(a,Vo([0,e.charCodeAt(l+4)],32));case 4:a=Zo(a,Vo([0,e.charCodeAt(l+3)],24));case 3:a=Zo(a,Vo([0,e.charCodeAt(l+2)],16));case 2:a=Zo(a,Vo([0,e.charCodeAt(l+1)],8));case 1:a=Zo(a,[0,e.charCodeAt(l)]),a=Yo(a,c),a=Qo(a,31),a=Yo(a,u),o=Zo(o,a)}return o=Zo(o,[0,e.length]),s=Zo(s,[0,e.length]),o=Go(o,s),s=Go(s,o),o=Xo(o),s=Xo(s),o=Go(o,s),s=Go(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",es)};try{es=localStorage.getItem("sczh:bid")}catch(e){}es||ts();var rs=Object.prototype.hasOwnProperty,ns=Array.isArray,os=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),ss=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},as={arrayToObject:ss,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],a=Object.keys(s),i=0;i<a.length;++i){var c=a[i],u=s[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:s,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(ns(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 a=n.charCodeAt(s);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?o+=n.charAt(s):a<128?o+=os[a]:a<2048?o+=os[192|a>>6]+os[128|63&a]:a<55296||a>=57344?o+=os[224|a>>12]+os[128|a>>6&63]+os[128|63&a]:(s+=1,a=65536+((1023&a)<<10|1023&n.charCodeAt(s)),o+=os[240|a>>18]+os[128|a>>12&63]+os[128|a>>6&63]+os[128|63&a])}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(ns(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!rs.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return ns(t)&&!ns(r)&&(o=ss(t,n)),ns(t)&&ns(r)?(r.forEach((function(r,o){if(rs.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 rs.call(t,o)?t[o]=e(t[o],s,n):t[o]=s,t}),o)}},is=String.prototype.replace,cs=/%20/g,us={RFC1738:"RFC1738",RFC3986:"RFC3986"},ls=as.assign({default:us.RFC3986,formatters:{RFC1738:function(e){return is.call(e,cs,"+")},RFC3986:function(e){return String(e)}}},us),ds=(Date.prototype.toISOString,ls.default);ls.formatters[ds];const fs=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""}},ps=["text","select","comment","title","actionComment","actionComment2","reactionComment","resultLoseComment","resultStartComment","resultWinComment","characterComment","producerComment","comment1","comment2"],hs=["mainText","resultText","name"],ms=(t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{ps.forEach(a=>{let i=H(t[a]);t[a]&&(r.has(i)?t[a]=e(r.get(i)):(n.push({key:a,index:s}),o.push(i)))})}),{textInfo:n,textList:o}};let vs=!1,gs=!1;const ys=async(t,r="default",n)=>{if(!t.length)return;const o=await Ko(),s=await Ho();if(n){const{textInfo:e,textList:r}=ms(t,o);if(!e.length||"……"==r||1==vs||"…………"==r||"………………\n……………………\n…………………………"==r||e.length>9)return;let n=[];r.forEach((e,t)=>{n.push(q(e))});const s=n.join("\n"),a=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,i=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{i.push(q(e))}),a.test(s)||i.includes(n[0])||await fs(s),vs=!0}else if("FesTower"==r){const{textInfo:r,textList:n}=((t,r)=>{const n=[],o=[];return t.forEach((t,s)=>{hs.forEach(a=>{let i=H(t[a]);t[a]&&(r.has(i)?t[a]=e(r.get(i)):(n.push({key:a,index:s}),o.push(i)))})}),{textInfo:n,textList:o}})(t,s);if(!r.length||"……"==n||1==vs||1==gs||"…………"==n||"………………\n……………………\n…………………………"==n||r.length>9)return;let o=[];n.forEach((e,t)=>{o.push("commstory"+q(e))});const a=o.join("\n"),i=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,c=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{c.push(q(e))}),i.test(a)||c.includes(o[0])||await fs(a),1==vs&&(gs=!0),vs=!0}else{const{textInfo:e,textList:r}=ms(t,s);if(!e.length||"……"==r||1==vs||"…………"==r||"………………\n……………………\n…………………………"==r||e.length>9)return;let n=[];r.forEach((e,t)=>{n.push("commstory"+q(e))});const o=n.join("\n"),a=/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/,i=[];["…………","……","………………\n……………………\n…………………………"].forEach(e=>{i.push(q(e))}),a.test(o)||i.includes(n[0])||await fs(o),vs=!0}},{api:ws,transItem:bs}=cn("mission",To),Es=(e,t)=>{bs(e,t)||("name"===t?Ro(e,t):jo(e,t))};let ks=!1;const Ss=e=>{null==e||e.forEach(e=>{bs(e.mission,"title"),bs(e.mission,"comment"),e.mission.missionReward.content&&(Es(e.mission.missionReward.content,"name"),Es(e.mission.missionReward.content,"comment"))})},_s=e=>{e.forEach(e=>{let t=e.fesRaidAccumulatedReward;bs(t,"title"),bs(t,"comment");let r=t.fesRaidAccumulatedRewardContent;(null==r?void 0:r.content)&&(Es(r.content,"name"),Es(r.content,"comment"))})},Is=(e,t=!0)=>{null==e||e.forEach(e=>{let r=e.mission||e;if(bs(r,"title"),bs(r,"comment"),bs(r,"afterAchievedComment"),bs(r,"beforeAchievedComment"),t){let e=r.lectureMissionReward;(null==e?void 0:e.content)&&(Es(e.content,"name"),Es(e.content,"comment"))}})},xs=e=>{var t,r;bs(null===(t=e.userRecommendedMission)||void 0===t?void 0:t.mission,"comment"),bs(null===(r=e.userRecommendedMission)||void 0===r?void 0:r.mission,"title"),e.accumulatedPresent.userGameEventAccumulatedPresents.forEach(e=>{bs(e.gameEventAccumulatedPresent,"comment"),bs(e.gameEventAccumulatedPresent,"title")})},As=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=>{bs(e.produceTeachingHint,"title")}),null===(r=e.userProduceTeachingHints)||void 0===r||r.forEach(e=>{bs(e.produceTeachingHint,"title")})})},Cs=e=>{Is(e.lectureMissions)},Ts=e=>{var t;null===(t=e.userIdolRoad)||void 0===t||t.idolRoad.idolRoadRewards.forEach(e=>{Es(e.content,"name"),Es(e.content,"comment")})},js=e=>{null==e||e.forEach(e=>{var t,r;bs(null===(t=e.userMission)||void 0===t?void 0:t.mission,"title"),bs(null===(r=e.userMission)||void 0===r?void 0:r.mission,"comment")})};ws.get([["userMissions",e=>{var t;Ss(e.dailyUserMissions),Ss(e.weeklyUserMissions),Ss(e.fesMatchRankingUserMissions),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{Ss(null==e?void 0:e.userMissions)}),Ss(e.normalUserMissions),Ss(e.specialUserMissions)}],["userJewelGettableMissions",e=>{var t,r,n,o,s,a;js(null===(t=e.dailyWeeklyUserMissions)||void 0===t?void 0:t.userMissionsWithCategory),js(null===(r=e.fesUserMissions)||void 0===r?void 0:r.userMissionsWithCategory),js(null===(n=e.idolUserMissions)||void 0===n?void 0:n.userMissionsWithCategory),js(null===(o=e.otherUserMissions)||void 0===o?void 0:o.userMissionsWithCategory),js(null===(s=e.produceUserMissions)||void 0===s?void 0:s.userMissionsWithCategory),js(null===(a=e.trueEndUserMissions)||void 0===a?void 0:a.userMissionsWithCategory)}],["fesRaidEvents/{num}/rewards",e=>{_s(e.fesRaidBestScoreRewards),_s(e.fesRaidLapRewards),_s(e.fesRaidPointRewards)}],[["userProduces","userProduceTeachings"],[As]],["userBeginnerMissions/top",Cs],["idolRoads/top",e=>{var t;Is(e.userMissions,!1),null===(t=e.userIdols)||void 0===t||t.forEach(Ts)}],["missionEvents/{num}/top",[xs]],["producerDesk/rewards",e=>{e.producerLevelRewards.forEach(e=>{bs(e,"title"),Es(e.content,"name")})}]]),ws.post([["myPage",[e=>{Ss(e.reportUserMissions)},e=>{let t=e.beginnerMission;t&&(t.clearedLectureMission&&Is([t.clearedLectureMission]),t.progressLectureMission&&Is([t.progressLectureMission]))},e=>{var t;(async e=>{if(!e)return;const t=[];for(let r=0;r<e.length;r++){let n=e[r];bs(e,r),n===e[r]&&t.push(n)}if(t.length&&0==ks)try{const e=t.join("\nPmessage");/[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(e)||await fs("Pmessage"+e),ks=!0}catch(e){J(e)}})(null===(t=e.producerDesk)||void 0===t?void 0:t.messages)}]],["(produceMarathons|fesMarathons|trainingEvents)/{num}/top",[xs]],[["produceTeachings/resume","produceTeachings/next"],As],["userLectureMissions/{num}/actions/receive",Cs],["fesMatchConcert/actions/finish",[e=>{e&&e.fesMatchRankingMission&&bs(e.fesMatchRankingMission.userMission.mission,"title")}]],["producerDesk/top",e=>{e.progresses.forEach(e=>{bs(e,"comment"),bs(e,"title")})}]]),ws.put([["userIdolRoads",e=>{Ts(e.userIdol)}]]);const Rs=new Map;let Ms=!1;const Ps=new Map;let Os=!1;const Fs=async()=>{if(!Os){let e=await Qr("costumename");e||(e=await Wr("/data/costumename.csv"),Vr("costumename",e));Kr(e).forEach(e=>{const t=U(e.name),r=U(e.trans);t&&r&&t!==r&&Ps.set(t,r)}),Os=!0}return Ps};let Ds;const zs=async()=>(Ds||(Ds=(async()=>{if(!Ms){let e=await Qr("cardname");e||(e=await Wr("/data/cardname.csv"),Vr("cardname",e));Kr(e).forEach(e=>{const t=L(e.name),r=L(e.trans);t&&r&&t!==r&&Rs.set(t,r)}),Ms=!0}return Rs})()),await Ds);let Bs=[];const Ns=e=>{if(!e)return;let t=q(e);Bs.includes(t)||Bs.push(t)};(window.unsafeWindow||window).printUnknowCardCostumenames=()=>J(Bs.join("\n"));const Ls=(t,r)=>{if(!t||!r||!t.name)return;let n=H(t.name);r.has(t.name)&&(t.name=e(r.get(t.name))),C.dev&&n===t.name&&Ns(n)},Us=(t,r)=>{if(!t||!r||!t.comment)return;let n=H(t.comment);r.has(t.comment)&&(t.comment=e(r.get(t.comment))),C.dev&&n===t.comment&&Ns(n)},$s=async e=>{const t=await zs();e.idol&&Ls(e.idol,t),e.supportIdol&&Ls(e.supportIdol,t),e.userSupportIdol&&Ls(e.userSupportIdol.supportIdol,t),e.userProduceSupportIdols&&e.userProduceSupportIdols.forEach((function(e){Ls(e.userSupportIdol.supportIdol,t)})),e.userIdol&&Ls(e.userIdol.idol,t),e.userProduceIdol&&Ls(e.userProduceIdol.userIdol.idol,t),e.userProduce&&e.userProduce.userProduceIdol&&Ls(e.userProduce.userProduceIdol.userIdol.idol,t),e.userFesIdol&&Ls(e.userFesIdol.idol,t)},Hs=async e=>{const t=await zs(),r=await Fs(),n=new Map([...t,...r]);e.idolCostumes&&e.idolCostumes.forEach((function(e){Ls(e,n),Us(e,n)})),e.userFesDecks&&e.userFesDecks.forEach((function(e){e.userFesDeckMembers.forEach((function(e){e.idolCostumes.forEach((function(e){Ls(e,n)}))}))}))};zr.get([[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],$s],[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],$s],["userProduce(Teaching)?SupportIdols/{num}",$s],[["userProduce(Teaching)?Idols/{num}","userProduceTeachingIdol"],$s],["userFesIdols/{num}",$s],["userProduces",$s],["userReserveIdols/userIdol/{num}",$s],["userReserveSupportIdols/userSupportIdol/{num}",$s],["userKnowHowBooks",async e=>{const t=await zs();e.userKnowHowBooks&&e.userKnowHowBooks.forEach((function(e){e.idol&&Ls(e.idol,t)}))}],["producerDesk/costumes",async t=>{const r=await zs(),n=await Fs(),o=new Map([...r,...n]);t&&t.forEach((function(t){Ls(t,o),Us(t,o),((t,r)=>{if(!t||!r||!t.releasedConditionComment)return;let n=H(t.releasedConditionComment);r.has(t.releasedConditionComment)&&(t.releasedConditionComment=e(r.get(t.releasedConditionComment))),C.dev&&n===t.releasedConditionComment&&Ns(n)})(t,o)}))}]]),zr.post([[["myPage","produces/actions/(resume|next)"],$s]]),zr.post([["characterAlbums/characters/{num}",[Hs]],["produces/actions/result",async e=>{const t=await zs();e.userKnowHowBook&&e.userKnowHowBook.idol&&Ls(e.userKnowHowBook.idol,t)}]]),zr.patch([["userFesDecks",Hs]]),zr.put([["userHomeDecks",Hs]]);const Js=new Map,Ws=new Map,qs=new Map;let Ks=!1;let Gs,Ys,Qs,Vs;const Zs=async()=>{Qs||(Qs=(async()=>{if(!Ks){(await Xr("title")).forEach(e=>{if(null==e?void 0:e.text){const t=U(e.text),r=U(e.trans,!0),n=L(e.type)||"text";t&&r&&t!==r&&("exp"===n?Ws.set(t,r):"text"===n&&Js.set(t,r))}});for(let[e,t]of Ws){const r=tn(e);qs.set(r,t)}Ks=!0}return{textMap:Js,expMap:qs}})(),Vs=nn()),Gs&&Ys||(Gs=await Qs,Ys=await Vs,Gs.wordMaps=[Ys])};let Xs=[];(window.unsafeWindow||window).printUnknowTitles=()=>J(Xs.join("\n"));const ea=new Map,ta=(e,t)=>{e&&y(t)&&(ea.has(e)||ea.set(e,t))},ra=(e={},t)=>{let r=e[t];V(e,t,Gs),r===e[t]&&C.dev&&(e=>{if(!e)return;let t=q(e);Xs.includes(t)||Xs.push(t)})(r)},na=e=>{e.forEach(e=>{ra(e,"name"),e.communications.forEach(e=>{ra(e,"name"),ra(e,"title"),ta(e.id,`${e.name}-${e.title}`)})})};zr.get([[["userSupportIdols/{num}","userSupportIdols/statusMax","produceTeachingSupportIdols/{num}"],async e=>{await Zs(),e.supportIdol.produceSupportIdolEvents.forEach(e=>{ra(e,"title"),ta(e.id,e.title)})}],[["userIdols/{num}","userIdols/statusMax","produceTeachingIdols/{num}"],async e=>{await Zs(),e.idol.produceAfterEvents.forEach(e=>{ra(e,"title"),ta(e.id,e.title)}),e.idol.produceIdolEvents.forEach(e=>{ra(e,"title"),ta(e.id,e.title)})}],[["characterAlbums","album/top"],async e=>{await Zs(),na(e.gameEvents),na(e.specialEvents)}],[["producerDesk/gameEvents/{num}"],[async e=>{await Zs(),ra(e.gameEvent,"name")},async e=>{await Zs(),ra(e.gameEventStory,"description")}]],[["userMissions"],[async e=>{var t;await Zs(),null===(t=e.eventUserMissions)||void 0===t||t.forEach(e=>{ra(null==e?void 0:e.gameEvent,"name")})}]],[["characterPresentSpecialCommunicationEvents/{num}/top"],[async e=>{var t;await Zs(),null===(t=e.characterPresentSpecialCommunications)||void 0===t||t.forEach(e=>{var t;ra(e,"title"),null===(t=e.specialCommunicationReleaseConditions)||void 0===t||t.forEach(e=>{ra(null==e?void 0:e.content,"name")})})}]]]),zr.post([["characterAlbums/characters/{num}",async e=>{await Zs(),e.albumCommunicationTitles.forEach(e=>{ra(e,"title")}),e.communications.forEach(e=>{ra(e,"title"),ta(e.communicationId,e.title)}),e.voices.forEach(e=>{ra(e,"title"),ra(e,"releasedConditionComment")})}],["produceMarathons/{num}/top",async e=>{await Zs(),e.releasedCommunications.forEach(e=>{ra(e,"name"),ra(e,"title"),ta(e.id,`${e.name}-${e.title}`)}),ra(e.gameEvent,"name")}]]);const oa=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)))}},sa=async e=>{var t;await Zs(),null===(t=e.produceEvents)||void 0===t||t.forEach(e=>{ra(e,"title"),ta(e.id,e.title)})};zr.post([["myPage",async e=>{var t;await Zs(),ra(null==e||null===(t=e.userProduce)||void 0===t?void 0:t.produce,"title")}],["produces/actions/(resume|next)",[sa,oa]],[["produces/actions/resume","produces/actions/finish","produceTeachings/resume"],sa],["produces/actions/act",sa],["produces/({num}/audition|concert)/actions/(start|finish)",oa]]);const aa=async(e,t="comment")=>{if(!e)return;await ys(e,"autoTransText",!0)},ia=async e=>{try{if(e.produceAudition){let t="produceAudition";await ys(e.produceAudition.judges,t,!0)}if(e.produceConcert){let t="produceAudition";await ys(e.produceConcert.judges,t,!0)}e.produceConcertFanSkillComments&&await aa(e.produceConcertFanSkillComments,"comment1")}catch(e){J(e)}},ca=async e=>{if(e.judges){let t="fesMatchConcert";await ys(e.judges,t,!0)}},ua=async e=>{if(e.topCharacterReaction)try{const t=[...e.topCharacterReaction.moveReactions,...e.topCharacterReaction.skillReleasedReactions,...e.topCharacterReaction.touchExReactions,...e.topCharacterReaction.touchReactions,...e.topCharacterReaction.waitReactions];await aa(t)}catch(e){J(e)}},la=async e=>{let t=[...e.produceStaffComments||[],...e.produceStaffConcertComments||[],...e.produceStaffFailComments||[],...e.produceStaffSeasonComments||[]];await aa(t)},da=async e=>{if(e.gameData)try{let t=JSON.parse(e.gameData);t.judges?await ca(t):await ia(t),e.gameData=JSON.stringify(t)}catch(e){J(e)}},fa=async e=>{if(e.gameState&&e.gameState.game_data)try{let t=JSON.parse(e.gameState.game_data);t.judges&&await ca(t),e.gameState.game_data=JSON.stringify(t)}catch(e){J(e)}},pa=async e=>{if(!e.characterComment)return;let t=[];t=t.concat(e.characterComment),await aa(t)},ha=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 ys(t,"FesTower",!1)}catch(e){J(e)}};zr.get([["userProduces",ua],["fes(Match)?Concert/actions/resume",da]]),zr.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 aa(t),await(async(e,t)=>{await Zs(),e.forEach(e=>{ra(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 aa(t)}catch(e){J(e)}}],["produces/actions/(resume|next)",[ua,la,da,pa,ia,async e=>{try{var t;await aa(null===(t=e.produceReporterEvent)||void 0===t?void 0:t.produceReporterEventAnswers,"comment2")}catch(e){J(e)}}]],["produces/actions/endWeek",la],["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 aa(e)}catch(e){J(e)}}],["fes(Match|Raid)?Concert/actions/start",ca],["fes(Match)?Concert/actions/resume",da],["fesRaidConcert/actions/resume",fa],["fesTowerConcert/actions/start",ca],["fesTowerConcert/actions/resume",fa],["produces/actions/result",async e=>{try{let t=e.characterTrustLevelUpComments;await aa(t)}catch(e){J(e)}}],["userFesTowerPanels/{num}/random",ha],["userFesTowerPanels/{num}/random/actions/choice",async e=>{if(e)try{let t=[];e.fesTowerPanelRandomEffect.resultText&&t.push(e.fesTowerPanelRandomEffect),await ys(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&&ha(e.userFesTowerPanelHistory.userFesTowerRandomPanelHistory)}))}],["produces/({num}/audition|concert)/actions/(start|finish)",[ia,pa]],["userProduceHelperSupportIdols",async e=>{try{let t="helperSupportIdols";await ys([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 aa(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 aa(s)}]]);const{api:ma,transItem:va}=cn("etc/idol-filter");ma.get([["searchPopupContents",e=>{var t,r,n,o;null===(t=e.businesses)||void 0===t||t.forEach(e=>{va(e,"name")}),null===(r=e.units)||void 0===r||r.forEach(e=>{va(e,"name")}),null===(n=e.produces)||void 0===n||n.forEach(e=>{va(e,"title")}),null===(o=e.characters)||void 0===o||o.forEach(e=>{va(e,"name"),va(e,"firstName"),va(e.unit,"name")}),(e=>{["activeSkills","ideas","idolArrivalTypes","knowHowBooks","supportSkillAttributes","supportSkillEffects"].forEach(t=>{var r;null===(r=e[t])||void 0===r||r.forEach(e=>{va(e,"label")})})})(e)}]]);const{api:ga,transItem:ya}=cn("etc/help-title");ga.get([["help",e=>{e&&e.forEach(e=>{var t;ya(e,"title"),null===(t=e.helpSubGroups)||void 0===t||t.forEach(e=>{ya(e,"title")})})}]]);zr.get("gashas/{num}/redraws",async e=>{const t=[];e.forEach(e=>{e.comment&&t.push(e.comment)}),await aa(t)}),zr.post([["characterAlbums/characters/{num}",async e=>{const t=[];e.produceIdols.forEach(e=>{e.comment&&t.push(e.comment)}),await aa(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 aa(r)}]]);zr.post("characterAlbums/characters/{num}",async e=>{if(e.voices){const t=[];e.voices.forEach(e=>{e.characterTrustLevelComment&&t.push(e.characterTrustLevelComment)}),await aa(t)}});const wa=new Map;let ba=!1;const Ea=["nameKana","unit","age","bloodType","birthday","starSign","height","weight","figure","arm","place","hobby","specialty","cv"],ka=async()=>{if(!ba){(await Xr("profile-re")).forEach(t=>{if(null==t?void 0:t.id){const r=U(t.id);if(r)if("label"===r){const n=U(t.nameKana).split("|");wa.set(r,new Map(Ea.map((t,r)=>[t,e(L(n[r]))])))}else{for(let r in t)t[r]=e(U(t[r]));wa.set(r,t)}}}),ba=!0}return wa},Sa=async e=>{const t=(await ka()).get(e.id);for(let r in t)"id"!==r&&e[r]&&("unit"===r?e.unit.name=t[r]:e[r]=t[r])},_a=async e=>{e.beginnerMissionUnits&&e.beginnerMissionUnits.forEach(e=>{e.idols.forEach(e=>{Sa(e.idol.character)})}),e.units&&e.units.forEach(e=>{e.idols.forEach(e=>{Sa(e.character)})})};zr.post("characterAlbums/characters/{num}",async e=>{await Sa(e)}),zr.get("userIdols/{num}",async e=>{const t=e.idol.character;await Sa(t)}),zr.get("userSupportIdols/{num}",async e=>{const t=e.supportIdol.character;await Sa(t)}),zr.get("userFesIdols/{num}",async e=>{const t=e.userFesIdol.idol.character;await Sa(t)}),zr.get("userBeginnerMissions/top",_a),zr.get("tutorialIdols",_a);const Ia=new Map;let xa=!1;let Aa=null;const Ca=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}]]),Ta=new Map([["AOBA",e=>e],["SCENARIO",e=>e.default],["PHRASE",e=>e.default._polyglot.phrases]]),ja=Object.freeze;Object.freeze=new Proxy(ja,{apply:(e,t,[r])=>r});const Ra=/^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}$/,Ma=Function.prototype.call;let Pa={Reflect:window.Reflect};Function.prototype.call=new Proxy(Ma,{apply(e,t,r){var n;return(null==r||null===(n=r[3])||void 0===n?void 0:n.toString)&&Ra.test(r[3].toString())&&(Aa=r[3],Function.prototype.call=Ma),Pa.Reflect.apply(e,t,r)}});const Oa=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=Aa(o[e])}catch(e){}if(t(s)){r=s,n=o[e];break}}return[r,n]})(t[e],Ca.get(e));return r?Ta.get(e)(r):null};let Fa=null;const Da=["concert.skill.betweenString","concert.skill.appealString"];async function za(){const t=await Oa("PHRASE");if(t){Fa=await(async(e=!1)=>{if(!xa){(await Xr("phrase")).forEach(t=>{if(null==t?void 0:t.id){const r=U(t.id),n=U(t.trans,!0);r&&(e?Ia.set(r,t.trans):n&&Ia.set(r,n))}}),xa=!0}return Ia})();for(let[r,n]of Fa)t[r]=Da.includes(r)?n:e(n)}}let Ba=!1,Na=null;const La=en({name:"common"});let Ua=new Map,$a=new Map;const Ha=[],Ja=e=>{e&&e.fontFamily&&(e.fontFamily===R.HEITI_JA?Reflect.set(e,"fontFamily",R.HEITI_TRANS):e.fontFamily===R.YUAN_JA&&Reflect.set(e,"fontFamily",R.YUAN_TRANS))},Wa=(e,t,r)=>{let n=e,o=H(e);return t.has(o)?(n="​"+t.get(o),Ja(r)):e.startsWith("​")||(e=>{e&&e.fontFamily&&(e.fontFamily===R.HEITI_TRANS?Reflect.set(e,"fontFamily",R.HEITI_JA):e.fontFamily===R.YUAN_TRANS&&Reflect.set(e,"fontFamily",R.YUAN_JA))})(r),n},qa=(e,t,r=!1)=>{if(!y(e))return e;let n=e;return e.startsWith("​")?Ja(t):e.trim()&&(r?(n=Wa(e,$a,t),n===e&&(e=>{Ha.push(e),C.dev,setTimeout(()=>Ha.shift(),1e4)})(e)):(e=>{let t=!1;return Ha.forEach(r=>{r.startsWith(e)&&(t=!0)}),t})(e)||e.startsWith("‌")||(n=Wa(e,Ua,t))),n};async function Ka(){const e=await Oa("AOBA");try{Ua=await(async()=>{if(!Ba){Na=await La();const e=await sn();Na=new Map([...e,...Na]),Ba=!0}return Na})(),$a=await Ko()}catch(e){}const t=e.Text.prototype.typeText;e.Text.prototype.typeText=function(...e){const r=e[0];return e[0]=qa(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){C.dev,0;const t=qa(this._text,this._style);return Reflect.set(this,"_text",t),r.call(this,e)}}}const Ga=new Map;let Ya=!1;let Qa=null;let Va=null;const Za=()=>Va||(Va=(async()=>{if(Qa)return Qa;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();Qa=new Map(t)}catch(e){Qa=new Map}return Qa})(),Va);zr.get([[["comics"],async t=>{await Za(),t.comics.forEach(t=>{const r=parseInt(t.id);if(Qa.has(r)){const n=Qa.get(r).title;n&&(t.title=e(n))}})}]]);let Xa=null;const ei=async()=>(Xa||(Xa=(async()=>{if(!Ya){(await Xr("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&&Ga.set(t,{url:r,version:n})}}),Ya=!0}return Ga})()),await Xa);let ti="";(()=>{try{ti=sessionStorage.getItem("sczh:res-name")}catch(e){}})();(window.unsafeWindow||window).queryImageName=e=>{try{sessionStorage.setItem("sczh:res-name",e)}catch(e){}};let ri=!1;async function ni(){const e=await Oa("AOBA");if(ri)return;const t=e.loaders.Resource.prototype._loadElement,r=async function(e){C.dev&&"image"===e&&ti&&this.url.includes(ti)&&(W("%c조회한 이미지:","color:#66ccff"),W(this.url,this.name));try{const t=await ei();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=`${C.origin}/data/${t}?v=${C.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 Za(),Qa.has(t)&&(e.url="https://newbiepr.gitlab.io/shinymaskr.gitlab.io/data/image/comics/4ko/"+Qa.get(t).name,e.crossOrigin=!0)}}(this)}}catch(e){}return t.call(this,e)},n=new Proxy(e.loaders.Resource,{construct(e,t,n){var o=Reflect.construct(e,t,n);return new Proxy(o,{get:(e,t,n)=>"_loadElement"==t?r:Reflect.get(e,t,n)})},get:(e,t,r)=>Reflect.get(e,t,r)});Object.defineProperty(e.loaders,"Resource",{value:n}),ri=!0}var oi=function(){return s.Date.now()},si=/\s/;var ai=function(e){for(var t=e.length;t--&&si.test(e.charAt(t)););return t},ii=/^\s+/;var ci=function(e){return e?e.slice(0,ai(e)+1).replace(ii,""):e};var ui=function(e){return"symbol"==typeof e||g(e)&&"[object Symbol]"==m(e)},li=/^[-+]0x[0-9a-f]+$/i,di=/^0b[01]+$/i,fi=/^0o[0-7]+$/i,pi=parseInt;var hi=function(e){if("number"==typeof e)return e;if(ui(e))return NaN;if(fe(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=fe(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ci(e);var r=di.test(e);return r||fi.test(e)?pi(e.slice(2),r?2:8):li.test(e)?NaN:+e},mi=Math.max,vi=Math.min;var gi=function(e,t,r){var n,o,s,a,i,c,u=0,l=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=n,s=o;return n=o=void 0,u=t,a=e.apply(s,r)}function h(e){return u=e,i=setTimeout(v,t),l?p(e):a}function m(e){var r=e-c;return void 0===c||r>=t||r<0||d&&e-u>=s}function v(){var e=oi();if(m(e))return g(e);i=setTimeout(v,function(e){var r=t-(e-c);return d?vi(r,s-(e-u)):r}(e))}function g(e){return i=void 0,f&&n?p(e):(n=o=void 0,a)}function y(){var e=oi(),r=m(e);if(n=arguments,o=this,c=e,r){if(void 0===i)return h(c);if(d)return clearTimeout(i),i=setTimeout(v,t),p(c)}return void 0===i&&(i=setTimeout(v,t)),a}return t=hi(t)||0,fe(r)&&(l=!!r.leading,s=(d="maxWait"in r)?mi(hi(r.maxWait)||0,t):s,f="trailing"in r?!!r.trailing:f),y.cancel=function(){void 0!==i&&clearTimeout(i),u=0,n=c=o=i=void 0},y.flush=function(){return void 0===i?a:g(oi())},y};const yi=`\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(${C.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 wi=!1;const bi=e=>{if(wi)return;wi=!0,document.body.insertAdjacentHTML("beforeend",yi);const t=document.getElementById("sczh-story-tool"),r=gi(()=>{const r=[.017,.22],n=window.innerHeight,o=window.innerWidth;let s=n,a=o,i=0,c=0;n/o>9/16?(s=9*o/16,i=(n-s)/2):(a=16*n/9,c=(o-a)/2),t.style.right=Math.floor(c+r[0]*a)+"px",t.style.top=Math.floor(i+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",C.story="normal",F()}));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=$o(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()},Ei=new Map;let ki=!1;let Si=null,_i=new Map;const Ii=async()=>(Si||(Si=(async()=>{if(an)return an;const e=await rn(),t=await sn();return an=new Map([...e,...t]),an})(),_i=(await(async()=>{if(!ki){(await Xr("speaker-icon")).forEach(e=>{let{name:t,id:r,type:n}=e;t=L(t),r=L(r),n=L(n),t&&r&&Ei.set(r,t)}),ki=!0}return{iconMap:Ei}})()).iconMap),await Si);let xi=!1,Ai=!1;const Ci=(e,t)=>{var r,n,o,s,a,i,c,u,l,d,f,p;return(!xi||!Ai)&&("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("灯織"))?(xi=!0,null===(l=e[0])||void 0===l||null===(d=l["002"])||void 0===d?void 0:d.includes("灯織")):(null===(a=e[0])||void 0===a||null===(i=a[901])||void 0===i?void 0:i.includes)&&(null===(c=e[0])||void 0===c||null===(u=c[901])||void 0===u?void 0:u.includes("はづき"))?(Ai=!0,null===(f=e[0])||void 0===f||null===(p=f[901])||void 0===p?void 0:p.includes("はづき")):void 0)},Ti=Object.keys;Object.keys=new Proxy(Ti,{apply(t,r,n){if(Ci(n,"idol")||Ci(n,"staff"))for(let[t,r]of _i){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 ji=(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},Ri=async t=>{if(t.speaker){const r=await Ii();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]=ji(n[e],r);return n.join(t)})(n,e,r)}),n!==t.speaker&&(t.speaker=e(n))}},Mi={name:"",filename:"",list:"",preview:new Map};let Pi=!1;const Oi=async()=>{const t=await Oa("SCENARIO"),r=t.load;t.load=async function(...t){const n=await r.apply(this,t),o=t[0];if(!o)return n;if(C.dev&&o.includes("/assets/json/")&&Rr("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"===C.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=ea.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:""}),Mi.name=t,Mi.filename=o+".csv",Mi.list=s})(n,t),bi(Mi)),(()=>{if(Pi)return;Pi=!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));Mi.preview=r}catch(e){J(e)}})(),r=Mi.preview.has(t)?Mi.preview.get(t):await(async e=>{if(!Uo){let e=await Qr("story.json");if(e)Uo=new Map(JSON.parse(e));else{const e=await Wr("/story.json");Uo=new Map(e),Vr("story.json",JSON.stringify(Uo))}}if(Uo.has(e)){if(Bo.has(e))return Bo.get(e);{const t=Uo.get(e),r=await Wr(`/data/story/${t}.csv`),n=$o(r);return Bo.set(e,n),n}}return!1})(t),r){((t,r,n)=>{const o=G();t.forEach(t=>{if(t.text){const s=o(t.id),a=H(t.text);s&&r.has(""+s)?t.text=r.get(""+s):r.has(a)?t.text=r.get(a):n.has(a)&&(t.text=e(n.get(a)))}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 Ho())}else await ys(n,t,!1);for(let e of n)await Ri(e)}catch(e){J(e)}return n}},Fi=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)},Di=(e,t)=>`/data/font/${e}.woff2?v=${t[`font/${e}.woff2`]}`,zi=async()=>{const e=document.createElement("style"),{hashes:t}=await Jr;e.innerHTML=`\n  @font-face {\n    font-family: "sczh-heiti";\n    src: url("${C.origin}${Di("heiti",t)}");\n  }\n  @font-face {\n    font-family: "sczh-yuanti";\n    src: url("${C.origin}${Di("heiti",t)}");\n  }\n  ::-webkit-scrollbar {\n    display: none;\n  }\n  `,"yuanti"===C.font1&&Fi(`${C.origin}${Di("heiti",t)}`),"heiti"===C.font2&&Fi(`${C.origin}${Di("heiti",t)}`),document.head.appendChild(e)};window.addEventListener("blur",(function(e){"on"===C.bgm&&e.stopImmediatePropagation()}),!1),document.addEventListener("visibilitychange",(function(e){"on"===C.bgm&&e.stopImmediatePropagation()}));let Bi=0;const Ni=async()=>{var e;Aa||Bi>=300?(async()=>{try{await Promise.all([ni(),zi(),za(),Ka(),Oi()])}catch(e){J(e)}})():(await(e=100,new Promise(t=>{setTimeout(t,e)})),Bi++,Bi%10==0&&J(`Waiting: ${Bi/10}s`),await Ni())};"loading"!=document.readyState?Ni():window.unsafeWindow?window.unsafeWindow.addEventListener("DOMContentLoaded",Ni):window.addEventListener("DOMContentLoaded",Ni)}();