manner.js 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/packages/client/dist/32.index.js +1 -0
- package/packages/client/dist/index.js +2 -0
- package/packages/client/dist/index.js.LICENSE.txt +9 -0
- package/packages/client/postcss.config.js +6 -0
- package/packages/client/src/class/Dimmer.js +19 -0
- package/packages/client/src/class/Emitter.js +36 -0
- package/packages/client/src/component/Router/index.js +88 -0
- package/packages/client/src/component/Router/index.module.css +2 -0
- package/packages/client/src/component/UpdateConfirm/index.js +61 -0
- package/packages/client/src/component/UpdateConfirm/index.module.css +40 -0
- package/packages/client/src/component/WebApp/index.js +42 -0
- package/packages/client/src/index.js +6 -0
- package/packages/client/src/lib/checkUpdate.js +9 -0
- package/packages/client/src/lib/clearCookie.js +16 -0
- package/packages/client/src/lib/filterNamespace.js +9 -0
- package/packages/client/src/lib/formateLocation.js +8 -0
- package/packages/client/src/lib/readCookie.js +32 -0
- package/packages/client/src/lib/setCookie.js +19 -0
- package/packages/client/src/lib/template/locationTemplate/index.js +14 -0
- package/packages/client/src/lib/template/locationTemplate/index.module.css +4 -0
- package/packages/client/src/obj/location.js +3 -0
- package/packages/client/src/page/NotFound/index.js +21 -0
- package/packages/client/src/page/NotFound/index.module.css +28 -0
- package/packages/client/webpack.config.dev.js +62 -0
- package/packages/client/webpack.config.pro.js +47 -0
- package/packages/server/dist/class/CommonHttp.js +70 -0
- package/packages/server/dist/index.js +12 -0
- package/packages/server/dist/lib/cacheOutput.js +41 -0
- package/packages/server/dist/lib/compressOutput.js +44 -0
- package/packages/server/dist/lib/filterNamespace.js +17 -0
- package/packages/server/dist/lib/formateHttpDate.js +11 -0
- package/packages/server/dist/lib/formateHttpKey.js +11 -0
- package/packages/server/dist/lib/parseHttpDate.js +9 -0
- package/packages/server/dist/lib/parseOption.js +70 -0
- package/packages/server/dist/lib/readCookie.js +27 -0
- package/packages/server/src/class/CommonHttp.js +64 -0
- package/packages/server/src/index.js +2 -0
- package/packages/server/src/lib/cacheOutput.js +36 -0
- package/packages/server/src/lib/compressOutput.js +40 -0
- package/packages/server/src/lib/filterNamespace.js +11 -0
- package/packages/server/src/lib/formateHttpDate.js +5 -0
- package/packages/server/src/lib/formateHttpKey.js +5 -0
- package/packages/server/src/lib/parseHttpDate.js +3 -0
- package/packages/server/src/lib/parseOption.js +66 -0
- package/packages/server/src/lib/readCookie.js +21 -0
- package/packages/server/test/CommonHttp.test.js +18 -0
- package/packages/server/test/parseOption.test.js +9 -0
- /package/packages/{mode-client → client}/package.json +0 -0
- /package/packages/{mode-server → server}/package.json +0 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkmode_client=self.webpackChunkmode_client||[]).push([[32],{32:(e,s,t)=>{t.r(s),t.d(s,{default:()=>y});var i=t(784),r=t(62),a=t.n(r),h=t(36),u=t.n(h),n=t(793),c=t.n(n),l=t(892),o=t.n(l),m=t(173),d=t.n(m),p=t(464),k=t.n(p),L=t(738),f={};f.styleTagTransform=k(),f.setAttributes=o(),f.insert=c().bind(null,"head"),f.domAPI=u(),f.insertStyleElement=d(),a()(L.Z,f);const v=L.Z&&L.Z.locals?L.Z.locals:void 0;var b=t(942),x=t(308),R={};R.styleTagTransform=k(),R.setAttributes=o(),R.insert=c().bind(null,"head"),R.domAPI=u(),R.insertStyleElement=d(),a()(x.Z,R);const q=x.Z&&x.Z.locals?x.Z.locals:void 0;class g extends i.Component{render(){return i.createElement("div",{className:v.notfound},i.createElement("span",{className:v.earth}),i.createElement("span",{className:v.question},"?"),"Location",i.createElement("span",{className:v.location},function(e){const s=new b.v9;return s.addLexer(b.KU),s.parse(e).map((e=>function(e){const{type:s,elem:t}=e;switch(s){case"/":return i.createElement("span",{className:q.slash},"/");case"namespace":return i.createElement("span",{className:q.namespace},t)}}(e)))}(location.pathname)),"don't exist.")}}const y=g},308:(e,s,t)=>{t.d(s,{Z:()=>u});var i=t(601),r=t.n(i),a=t(609),h=t.n(a)()(r());h.push([e.id,"._N8HK48O4qTjMvpLSCt8 {\n color: rgb(90, 243, 90)\n}\n.efKSEM7Leg9oX2LwdZ8g {\n color: rgb(45, 45, 173)\n}\n",""]),h.locals={slash:"_N8HK48O4qTjMvpLSCt8",namespace:"efKSEM7Leg9oX2LwdZ8g"};const u=h},738:(e,s,t)=>{t.d(s,{Z:()=>u});var i=t(601),r=t.n(i),a=t(609),h=t.n(a)()(r());h.push([e.id,".dS9Go71wUZT91Vy2mrFl {\n font-size: 28px;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%\n}\n.JNXQJHh3oIT3kAs9R8yt {\n position: relative;\n top: -40px;\n left: -10px;\n font-size: 40px;\n font-weight: 500;\n display: flex;\n width: 40px;\n height: 40px;\n align-items: center;\n justify-content: center;\n margin-left: -10px;\n color: rgb(255, 255, 255);\n background-color: rgb(243, 43, 43)\n}\n.Il5TfKo8Shrkc3LV4QLT:before {\n font-size: 75px;\n content: '\\f57d';\n background-color: rgba(0, 0, 0, 0)\n}\n.eZpPpiaXiBxiGhk7Lalb {\n margin: 0 8px 0 8px;\n background-color: rgb(245, 245, 245);\n padding: 0 6px 0 6px\n}\n",""]),h.locals={notfound:"dS9Go71wUZT91Vy2mrFl",question:"JNXQJHh3oIT3kAs9R8yt",earth:"Il5TfKo8Shrkc3LV4QLT",location:"eZpPpiaXiBxiGhk7Lalb"};const u=h},995:(e,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0,s.default=class{constructor(){this.lexers=[],this.use=0}addLexer(e){this.lexers.push(e)}garbageRecover(){this.use-=1;const{use:e}=this;if(e/this.ins.length<.8){const e=[];for(let s=0;s<this.ins.length;s+=1){const t=this.ins[s];void 0!==t&&(t.i=e.length,e.push(t))}this.ins=e}}parse(e){const{lexers:s}=this,t=[];this.ins=[],this.use+=0;const i=new Array(s.length).fill(0);for(let r=0;r<=e.length;r+=1){let a;if(a=r===e.length?"EOF":e.charAt(r),this.ins.forEach((e=>{void 0!==e&&!1===e.scan(a)&&(this.garbageRecover(),i[e.j]-=1)}))," "!==a&&"\n"!==a){for(let e=0;e<i.length;e+=1)if(i.every((e=>e<=0))){const r=new s[e](this,t,e);void 0===r.scan(a)&&(r.setIndex(this.ins.length),this.ins.push(r),this.use+=1,i[e]+=1)}}else t.push({type:a})}return t}}},937:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e),this.identifer=!1}checkLexerDuplicate(e){const{length:s}=this.ans;return this.ans[s-1].elem===e}readReserveLetter(e,s,t){if(e===s)this.elems.push(e),this.status=t;else{if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}}readReserveLetters(e,s){let t=!1;for(let i=0;i<s.length;i+=1){const[r,a]=s[i];if(e===r){this.elems.push(e),this.status=a,t=!0;break}}if(!1===t){if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}}getReserve(e,s,t){if(e===s)return this.elems.push(e),void this.ans.push(this.makeLexer(t,this.elems.join("")));this.identifer=!0,this.elems.push(e),this.status=1}scan(e){switch(this.status){case 0:{switch(e){case"/":return this.elems=[],this.elems.push(e),void(this.status=121);case"*":if(!this.checkLexerDuplicate("*"))return this.ans.push(this.makeLexer("symbol","*")),this.quit();break;case"<":if(!this.checkLexerDuplicate("<"))return this.ans.push(this.makeLexer("angleBrackets","<")),this.quit();break;case">":if(!this.checkLexerDuplicate(">"))return this.ans.push(this.makeLexer("angleBrackets",">")),this.quit();break;case".":if(!this.checkLexerDuplicate("."))return this.ans.push(this.makeLexer("call",".")),this.quit();break;case"+":if(!this.checkLexerDuplicate("+"))return this.ans.push(this.makeLexer("arithmetic","+")),this.quit();break;case"-":if(!this.checkLexerDuplicate("-"))return this.ans.push(this.makeLexer("arithmetic","-")),this.quit();break;case"^":if(!this.checkLexerDuplicate("^"))return this.ans.push(this.makeLexer("arithmetic","^")),this.quit();break;case"%":if(!this.checkLexerDuplicate("%"))return this.ans.push(this.makeLexer("arithmetic","%")),this.quit();break;case"|":if(!this.checkLexerDuplicate("|"))return this.ans.push(this.makeLexer("logic","|")),this.quit();case"&":if(!this.checkLexerDuplicate("&"))return this.ans.push(this.makeLexer("logic","&")),this.quit();break;case"!":if(!this.checkLexerDuplicate("!"))return this.ans.push(this.makeLexer("logic","!")),this.quit();break;case"~":if(!this.checkLexerDuplicate("~"))return this.ans.push(this.makeLexer("logic","~")),this.quit();break;case"?":if(!this.checkLexerDuplicate("?"))return this.ans.push(this.makeLexer("logic","?")),this.quit();break;case"=":if(!this.checkLexerDuplicate("="))return this.ans.push(this.makeLexer("arithmetic","=")),this.quit();break;case"(":if(!this.checkLexerDuplicate("("))return this.ans.push(this.makeLexer("parenthese","(")),this.quit();break;case")":if(!this.checkLexerDuplicate(")"))return this.ans.push(this.makeLexer("parenthese",")")),this.quit();break;case"{":if(!this.checkLexerDuplicate("{"))return this.ans.push(this.makeLexer("curlyParenthese","{")),this.quit();break;case"}":if(!this.checkLexerDuplicate("}"))return this.ans.push(this.makeLexer("curlyParenthese","}")),this.quit();break;case"[":if(!this.checkLexerDuplicate("["))return this.ans.push(this.makeLexer("squareParenthese","[")),this.quit();break;case"]":if(!this.checkLexerDuplicate("]"))return this.ans.push(this.makeLexer("squareParenthese","]")),this.quit();break;case";":if(!this.checkLexerDuplicate(";"))return this.ans.push(this.makeLexer("function",";")),this.quit();break;case":":if(!this.checkLexerDuplicate(":"))return this.ans.push(this.makeLexer("iteral",":")),this.quit();break;case",":if(!this.checkLexerDuplicate(","))return this.ans.push(this.makeLexer("iteral",",")),this.quit();break;case'"':this.checkLexerDuplicate('"')||(this.elems=[],this.ans.push(this.makeLexer("quotation",'"')),this.status=3);break;case"'":this.checkLexerDuplicate("'")||(this.elems=[],this.ans.push(this.makeLexer("quotation","'")),this.status=4);break;case"`":this.checkLexerDuplicate("`")||(this.elems=[],this.ans.push(this.makeLexer("quotation","`")),this.status=125)}if(!1===this.identifer)switch(e){case"a":return this.elems=[],this.elems.push(e),void(this.status=5);case"b":return this.elems=[],this.elems.push(e),void(this.status=9);case"c":return this.elems=[],this.elems.push(e),void(this.status=13);case"d":return this.elems=[],this.elems.push(e),void(this.status=28);case"e":return this.elems=[],this.elems.push(e),void(this.status=42);case"f":return this.elems=[],this.elems.push(e),void(this.status=53);case"i":return this.elems=[],this.elems.push(e),void(this.status=64);case"l":return this.elems=[],this.elems.push(e),void(this.status=77);case"n":return this.elems=[],this.elems.push(e),void(this.status=79);case"r":return this.elems=[],this.elems.push(e),void(this.status=83);case"s":return this.elems=[],this.elems.push(e),void(this.status=88);case"t":return this.elems=[],this.elems.push(e),void(this.status=100);case"v":case"y":return this.elems=[],this.elems.push(e),void(this.status=111);case"w":return this.elems=[],this.elems.push(e),void(this.status=115);case"z":return this.elems=[],this.elems.push(e),void(this.status=131);default:this.identifer=!0}if("0"===e)return this.elems=[],this.elems.push(e),void(this.status=127);if("o"===e||"O"===e)return this.elems=[],this.elems.push(e),void(this.status=129);const s=e.charCodeAt(0);if(s>=48&&s<=57)return this.elems=[],this.elems.push(e),void(this.status=130);if(s>=97&&s<=122||s>=65&&s<=90||95===s)return this.elems=[],this.elems.push(e),void(this.status=1);break}case 1:{if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();const s=e.charCodeAt(0);if(s>=97&&s<=122||s>=65&&s<=90||s>58&&s<=64||95===s)this.elems.push(e);else{if(!(s>=48&&s<=57))return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.status=2,this.elems.push(e)}break}case 2:{const s=e.charCodeAt(0);if(!(s>=48&&s<=57))return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.elems.push(e);break}case 3:if('"'===e)return this.ans.push(this.makeLexer("string",this.elems.join(""))),this.ans.push(this.makeLexer("quotation",'"')),this.quit();this.elems.push(e);break;case 4:if("'"===e)return this.ans.push(this.makeLexer("string",this.elems.join(""))),this.ans.push(this.makeLexer("quotation","'")),this.quit();this.elems.push(e);break;case 5:return this.readReserveLetter(e,"w",6);case 6:return this.readReserveLetter(e,"a",7);case 7:return this.readReserveLetter(e,"i",8);case 8:return this.getReserve(e,"t","async");case 9:return this.readReserveLetter(e,"r",10);case 10:return this.readReserveLetter(e,"e",11);case 11:return this.readReserveLetter(e,"a",12);case 12:return this.getReserve(e,"k","for");case 13:return this.readReserveLetters(e,[["a",14],["l",18],["o",21]]);case 14:return this.readReserveLetters(e,[["s",15],["t",16]]);case 15:return this.getReserve(e,"e","switch");case 16:return this.readReserveLetter(e,"c",17);case 17:return this.getReserve(e,"h","try");case 18:return this.readReserveLetter(e,"a",19);case 19:return this.readReserveLetter(e,"s",20);case 20:case 52:case 102:return this.getReserve(e,"s","class");case 21:return this.readReserveLetter(e,"n",22);case 22:return this.readReserveLetters(e,[["s",27],["t",23]]);case 23:return this.readReserveLetter(e,"i",24);case 24:return this.readReserveLetter(e,"n",25);case 25:return this.readReserveLetter(e,"u",26);case 26:return this.getReserve(e,"e","for");case 27:case 78:return this.getReserve(e,"t","declare");case 28:"e"===e?(this.elems.push(e),this.status=29):"o"===e?(this.elems.push(e),this.ans.push(this.makeLexer("while",this.elems.join(""))),this.quit()):"EOF"===e?(this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit()):(this.identifer=!0,this.elems.push(e),this.status=1);break;case 29:this.readReserveLetters(e,[["b",30],["f",35],["l",39]]);break;case 30:this.readReserveLetter(e,"u",31);break;case 31:this.readReserveLetter(e,"g",32);break;case 32:this.readReserveLetter(e,"g",33);break;case 33:this.readReserveLetter(e,"e",34);break;case 34:return this.getReserve(e,"r","debugger");case 35:this.readReserveLetter(e,"a",36);break;case 36:this.readReserveLetter(e,"u",37);break;case 37:this.readReserveLetter(e,"l",38);break;case 38:return this.getReserve(e,"t","switch");case 39:this.readReserveLetter(e,"e",40);break;case 40:this.readReserveLetter(e,"t",41);break;case 41:return this.getReserve(e,"e","delete");case 42:this.readReserveLetters(e,[["l",43],["x",45]]);break;case 43:this.readReserveLetter(e,"s",44);break;case 44:case 56:return this.getReserve(e,"e","if");case 45:this.readReserveLetters(e,[["p",46],["t",49]]);break;case 46:this.readReserveLetter(e,"o",47);break;case 47:this.readReserveLetter(e,"r",48);break;case 48:case 68:return this.getReserve(e,"t","module");case 49:this.readReserveLetter(e,"e",50);break;case 50:this.readReserveLetter(e,"n",51);break;case 51:this.readReserveLetter(e,"d",52);break;case 53:return this.readReserveLetters(e,[["a",54],["o",57],["u",58]]);case 54:this.readReserveLetter(e,"l",55);break;case 55:this.readReserveLetter(e,"s",56);break;case 57:return this.getReserve(e,"r","for");case 58:return this.readReserveLetter(e,"n",59);case 59:return this.readReserveLetter(e,"c",60);case 60:return this.readReserveLetter(e,"t",61);case 61:return this.readReserveLetter(e,"i",62);case 62:return this.readReserveLetter(e,"o",63);case 63:return this.getReserve(e,"n","declare");case 64:if("m"===e)this.elems.push(e),this.status=65;else if("n"===e)this.elems.push(e),this.status=69;else{if("f"===e)return this.elems.push(e),this.ans.push(this.makeLexer("if",this.elems.join(""))),this.quit();if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}break;case 65:this.readReserveLetter(e,"p",66);break;case 66:this.readReserveLetter(e,"o",67);break;case 67:this.readReserveLetter(e,"r",68);break;case 69:{const s=e.charCodeAt(0);if(!(s>=99&&s<=122))return this.ans.push(this.makeLexer("in","in")),this.quit();this.readReserveLetter(e,"s",70);break}case 70:this.readReserveLetter(e,"t",71);break;case 71:this.readReserveLetter(e,"a",72);break;case 72:this.readReserveLetter(e,"n",73);break;case 73:this.readReserveLetter(e,"c",74);break;case 74:this.readReserveLetter(e,"e",75);break;case 75:this.readReserveLetter(e,"o",76);break;case 76:return this.getReserve(e,"f","instanceof");case 77:this.readReserveLetter(e,"e",78);break;case 79:this.readReserveLetters(e,[["e",80],["u",81]]);break;case 80:return this.getReserve(e,"w","class");case 81:this.readReserveLetter(e,"l",82);break;case 82:return this.getReserve(e,"l","type");case 83:this.readReserveLetter(e,"e",84);break;case 84:this.readReserveLetter(e,"t",85);break;case 85:this.readReserveLetter(e,"u",86);break;case 86:this.readReserveLetter(e,"r",87);break;case 87:return this.getReserve(e,"n","function");case 88:this.readReserveLetters(e,[["u",89],["w",92],["t",96]]);break;case 89:this.readReserveLetter(e,"p",90);break;case 90:this.readReserveLetter(e,"e",91);break;case 91:return this.getReserve(e,"r","class");case 92:this.readReserveLetter(e,"i",93);break;case 93:this.readReserveLetter(e,"t",94);break;case 94:this.readReserveLetter(e,"c",95);break;case 95:return this.getReserve(e,"h","switch");case 96:this.readReserveLetter(e,"a",97);break;case 97:this.readReserveLetter(e,"t",98);break;case 98:this.readReserveLetter(e,"i",99);break;case 99:return this.getReserve(e,"c","class");case 100:this.readReserveLetters(e,[["h",101],["r",103],["y",107]]);break;case 101:this.readReserveLetters(e,[["i",102],["r",105]]);break;case 103:this.readReserveLetter(e,"o",104);break;case 104:return this.getReserve(e,"w","try");case 105:if("u"===e)this.elems.push(e),this.status=106;else{if("y"===e)return this.elems.push(e),this.ans.push(this.makeLexer("try",this.elems.join(""))),this.quit();if("EOF"===e)return this.ans.push(this.makeLexer("identifer",this.elems.join(""))),this.quit();this.identifer=!0,this.elems.push(e),this.status=1}break;case 106:return this.getReserve(e,"e","bool");case 107:this.readReserveLetter(e,"p",108);break;case 108:this.readReserveLetter(e,"e",109);break;case 109:this.readReserveLetter(e,"o",110);break;case 110:return this.getReserve(e,"f","type");case 111:this.readReserveLetters(e,[["a",112],["o",113]]);break;case 112:return this.getReserve(e,"r","declare");case 113:this.readReserveLetter(e,"i",114);break;case 114:return this.getReserve(e,"d","function");case 115:this.readReserveLetters(e,[["h",116],["i",119]]);break;case 116:this.readReserveLetter(e,"i",117);break;case 117:this.readReserveLetter(e,"l",118);break;case 118:return this.getReserve(e,"e","while");case 119:this.readReserveLetter(e,"t",120);break;case 120:return this.getReserve(e,"h","function");case 121:if(this.elems.push(e),"/"===e)this.status=122;else{if("*"!==e)return this.ans.push(this.makeLexer("arithmetic","/")),this.quit();this.status=123}break;case 122:if(this.elems.push(e),"\n"===e)return this.ans.push(this.makeLexer("lineComment",this.elems.join(""))),this.quit();break;case 123:if(this.elems.push(e),"*"!==e)return this.quit();this.status=124;break;case 124:if("/"!==e)return this.quit();this.elems.push(e),this.ans.push(this.makeLexer("blockComment",this.elems.join("")));break;case 125:if("`"===e)return this.ans.push(this.makeLexer("string",this.elems.join(""))),this.ans.push(this.makeLexer("quotation","'")),this.quit();this.elems.push(e);break;case 126:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(!(s>=48&&s<=57||"_"===e||"."===e||"e"===e||"E"===e))return"n"===e?(this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit()):(this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit());this.elems.push(e);break}case 127:this.elems.push(e),this.status="x"===e||"X"===e?128:130;break;case 128:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(!(s>=48&&s<=57||s>=65&&s<=70||s>=97&&s<=102||"_"===e||"."===e||"-"===e||"e"===e||"E"===e))return"n"===e?(this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit()):(this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit());this.elems.push(e);break}case 129:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(s>=48&&s<=55||"_"===e||"."===e||"e"===e||"E"===e)this.elems.push(e);else{if("n"===e)return this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();this.elems.push(e),this.status=1}break}case 130:{const s=e.charCodeAt(0);if("EOF"===e)return this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit();if(!(s>=48&&s<=57||"_"===e||"."===e||"e"===e||"E"===e))return"n"===e?(this.elems.push(e),this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit()):(this.ans.push(this.makeLexer("decimal",this.elems.join(""))),this.quit());this.elems.push(e);break}default:return this.quit()}}}s.default=a},287:(e,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0,s.default=class{constructor(e,s,t){this.highLight=e,this.ans=s,this.j=t,this.status=0}setIndex(e){this.i=e}makeLexer(e,s){let t;return t=void 0!==s?{type:e,elem:s}:{type:e},t}quit(){return void 0!==this.i&&(this.highLight.ins[this.i]=void 0),!1}}},458:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e)}scan(e){switch(this.status){case 0:{const s=e.charCodeAt(0);if(s>=48&&s<=57||s>=97&&s<=122||s>=65&&s<=90||s>=59&&s<=64||s>=33&&s<=44||s>=125&&s<=153)return this.elems=[],this.elems.push(e),void(this.status=2);switch(e){case"/":return this.ans.push(this.makeLexer("symbol","/")),this.quit();case":":return this.ans.push(this.makeLexer("symbol",":")),this.quit();case".":return this.ans.push(this.makeLexer("symbol",".")),this.quit();default:return this.quit()}break}case 2:{const s=e.charCodeAt(0);return 1===e.length&&(s>=48&&s<=57||s>=97&&s<=122||s>=65&&s<=90||s>=59&&s<=64||s>=33&&s<=44||s>=125&&s<=153)?(void 0===this.elems&&(this.elems=[]),void this.elems.push(e)):(this.ans.push(this.makeLexer("namespace",this.elems.join(""))),this.quit())}default:return this.quit()}}}s.default=a},358:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e)}scan(e){switch(this.status){case 0:switch(e){case"n":return this.elems=[],this.elems.push(e),void(this.status=1);case"c":return this.elems=[],this.elems.push(e),void(this.status=2);case"-":return this.ans.push(this.makeLexer("symbol","-")),this.quit();case"|":return void(this.status=4);case"#":return this.elems=[],this.elems.push(e),void(this.status=5);default:return this.quit()}break;case 1:switch(this.elems.length){case 1:if("o"!==e)return this.quit();this.elems.push(e);break;case 2:if("d"!==e)return this.quit();this.elems.push("d");break;case 3:return"e"===e?(this.elems.push(e),this.ans.push(this.makeLexer("command",this.elems.join(""))),this.quit()):this.quit();default:return this.quit()}break;case 2:switch(this.elems.length){case 1:if("u"!==e)return this.quit();this.elems.push(e);break;case 2:if("r"!==e)return this.quit();this.elems.push("r");break;case 3:return"l"===e?(this.elems.push(e),this.ans.push(this.makeLexer("command",this.elems.join(""))),this.quit()):this.quit();default:return this.quit()}break;case 4:return" "===e?(this.ans.push(this.makeLexer("symbol","|")),this.quit()):this.quit();case 5:if("!"!==e)return this.quit();this.elems.push(e),this.status=6;break;case 6:if("\n"===e||"EOF"===e)return this.ans.push(this.makeLexer("hashbangComment",this.elems.join(""))),this.quit();this.elems.push(e);break;default:return this.quit()}}}s.default=a},864:(e,s,t)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.default=void 0;var i,r=(i=t(287))&&i.__esModule?i:{default:i};class a extends r.default{constructor(...e){super(...e)}scan(e){switch(this.status){case 0:{switch(e){case".":return this.ans.push(this.makeLexer("symbol",".")),this.quit();case"v":return this.ans.push(this.makeLexer("symbol","v")),this.quit()}const s=e.charCodeAt(0);s>=48&&s<=57&&(this.elems=[],this.elems.push(e),this.status=1);break}case 1:{const s=e.charCodeAt(0);if(s>=48&&s<=57)this.elems.push(e);else if("."===e||"EOF"===e)return this.ans.push(this.makeLexer("version",this.elems.join(""))),this.quit()}}}}s.default=a},942:(e,s,t)=>{s.KU=s.v9=void 0,h(t(287));var i=h(t(995));s.v9=i,h(t(937));var r=h(t(458));s.KU=r,h(t(358));h(t(864));function a(e){if("function"!=typeof WeakMap)return null;var s=new WeakMap,t=new WeakMap;return(a=function(e){return e?t:s})(e)}function h(e,s){if(!s&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=a(s);if(t&&t.has(e))return t.get(e);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var h in e)if("default"!==h&&Object.prototype.hasOwnProperty.call(e,h)){var u=r?Object.getOwnPropertyDescriptor(e,h):null;u&&(u.get||u.set)?Object.defineProperty(i,h,u):i[h]=e[h]}return i.default=e,t&&t.set(e,i),i}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var e,t,r={851:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(601),o=r.n(n),a=r(609),u=r.n(a)()(o());u.push([e.id,".ov0HAlsHj07qbcJKZ72N {\n height: 100%\n}\n",""]),u.locals={page:"ov0HAlsHj07qbcJKZ72N"};const i=u},171:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(601),o=r.n(n),a=r(609),u=r.n(a)()(o());u.push([e.id,".wrl0ky_Ev8ozFKBHVfrV {\n position: absolute;\n width: 680px;\n top: calc(50% - 100px);\n left: calc(50% - 340px);\n padding: 15px 0px 10px 0px;\n z-index: 2\n}\n.qISbc1wzFKzJV17J8pKh {\n color: rgb(255, 255, 255);\n font-size: 17px;\n padding: 0 20px 30px 20px;\n border-bottom: 1px solid rgb(255, 255, 255)\n}\n.qISbc1wzFKzJV17J8pKh:before {\n font-size: 43px;\n content: '\\f56d';\n margin-right: 15px\n}\n.snwjZugfwhs6317dh8rA {\n display: flex;\n margin-top: 25px;\n justify-content: center\n}\n.CyXoNrY5R4ijjVeUJGE5 {\n color: rgb(0, 0, 0, 0.6);\n background-color: rgb(255, 255, 255);\n display: inline-flex;\n font-size: 16px;\n padding: 6.5px 10px 6.5px 10px;\n margin: 0 100px 0 100px;\n border: 0px;\n border-radius: 2.5px;\n align-items: center\n}\n.CyXoNrY5R4ijjVeUJGE5:before {\n border-right: 1px solid rgb(0, 0, 0, 0.6);\n margin-right: 8px;\n padding-right: 8px\n}\n.QzdrLkNxKCZhwdkv0XHh:before {\n font-size: 15px;\n content: '\\f252'\n}\n.XsweDQo3DMRAjPtlE0o3:before {\n font-size: 16px;\n content: '\\f5c8'\n}\n",""]),u.locals={confirm:"wrl0ky_Ev8ozFKBHVfrV",title:"qISbc1wzFKzJV17J8pKh",btngrp:"snwjZugfwhs6317dh8rA",btn:"CyXoNrY5R4ijjVeUJGE5",update:"QzdrLkNxKCZhwdkv0XHh",ignore:"XsweDQo3DMRAjPtlE0o3"};const i=u},609:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var u={};if(n)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(u[c]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&u[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},601:e=>{e.exports=function(e){return e[1]}},426:(e,t)=>{var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator,y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,v={};function m(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||y}function b(){}function g(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||y}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=m.prototype;var x=g.prototype=new b;x.constructor=g,h(x,m.prototype),x.isPureReactComponent=!0;var w=Array.isArray,_=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,n){var o,a={},u=null,i=null;if(null!=t)for(o in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(u=""+t.key),t)_.call(t,o)&&!E.hasOwnProperty(o)&&(a[o]=t[o]);var c=arguments.length-2;if(1===c)a.children=n;else if(1<c){for(var s=Array(c),l=0;l<c;l++)s[l]=arguments[l+2];a.children=s}if(e&&e.defaultProps)for(o in c=e.defaultProps)void 0===a[o]&&(a[o]=c[o]);return{$$typeof:r,type:e,key:u,ref:i,props:a,_owner:S.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var C=/\/+/g;function R(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function A(e,t,o,a,u){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c=!1;if(null===e)c=!0;else switch(i){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case r:case n:c=!0}}if(c)return u=u(c=e),e=""===a?"."+R(c,0):a,w(u)?(o="",null!=e&&(o=e.replace(C,"$&/")+"/"),A(u,t,o,"",(function(e){return e}))):null!=u&&(j(u)&&(u=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(u,o+(!u.key||c&&c.key===u.key?"":(""+u.key).replace(C,"$&/")+"/")+e)),t.push(u)),1;if(c=0,a=""===a?".":a+":",w(e))for(var s=0;s<e.length;s++){var l=a+R(i=e[s],s);c+=A(i,t,o,l,u)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(i=e.next()).done;)c+=A(i=i.value,t,o,l=a+R(i,s++),u);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function T(e,t,r){if(null==e)return e;var n=[],o=0;return A(e,n,"","",(function(e){return t.call(r,e,o++)})),n}function $(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},I={transition:null},O={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:I,ReactCurrentOwner:S};t.Children={map:T,forEach:function(e,t,r){T(e,(function(){t.apply(this,arguments)}),r)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=o,t.Profiler=u,t.PureComponent=g,t.StrictMode=a,t.Suspense=l,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=O,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h({},e.props),a=e.key,u=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,i=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in t)_.call(t,s)&&!E.hasOwnProperty(s)&&(o[s]=void 0===t[s]&&void 0!==c?c[s]:t[s])}var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){c=Array(s);for(var l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}return{$$typeof:r,type:e.type,key:a,ref:u,props:o,_owner:i}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:s,render:e}},t.isValidElement=j,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:$}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,r){return P.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,r){return P.current.useReducer(e,t,r)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return P.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return P.current.useTransition()},t.version="18.2.0"},784:(e,t,r)=>{e.exports=r(426)},62:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var a={},u=[],i=0;i<e.length;i++){var c=e[i],s=n.base?c[0]+n.base:c[0],l=a[s]||0,f="".concat(s," ").concat(l);a[s]=l+1;var p=r(f),d={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==p)t[p].references++,t[p].updater(d);else{var y=o(d,n);n.byIndex=i,t.splice(i,0,{identifier:f,updater:y,references:1})}u.push(f)}return u}function o(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var a=n(e=e||[],o=o||{});return function(e){e=e||[];for(var u=0;u<a.length;u++){var i=r(a[u]);t[i].references--}for(var c=n(e,o),s=0;s<a.length;s++){var l=r(a[s]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=c}}},793:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},173:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},892:(e,t,r)=>{e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},36:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},464:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={id:e,exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>e+".index.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="mode-client:",o.l=(r,n,a,u)=>{if(e[r])e[r].push(n);else{var i,c;if(void 0!==a)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==r||f.getAttribute("data-webpack")==t+a){i=f;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,o.nc&&i.setAttribute("nonce",o.nc),i.setAttribute("data-webpack",t+a),i.src=r),e[r]=[n];var p=(t,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),t)return t(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={179:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=a);var u=o.p+o.u(t),i=new Error;o.l(u,(r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+u+")",i.name="ChunkLoadError",i.type=a,i.request=u,n[1](i)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[u,i,c]=r,s=0;if(u.some((t=>0!==e[t]))){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);c&&c(o)}for(t&&t(r);s<u.length;s++)a=u[s],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0},r=self.webpackChunkmode_client=self.webpackChunkmode_client||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),o.nc=void 0,(()=>{var e=o(784),t=o(62),r=o.n(t),n=o(36),a=o.n(n),u=o(793),i=o.n(u),c=o(892),s=o.n(c),l=o(173),f=o.n(l),p=o(464),d=o.n(p),y=o(851),h={};h.styleTagTransform=d(),h.setAttributes=s(),h.insert=i().bind(null,"head"),h.domAPI=a(),h.insertStyleElement=f(),r()(y.Z,h),y.Z&&y.Z.locals&&y.Z.locals,new Location,e.Component,new class{constructor(){this.callbacks={}}async send(e,t){const{callbacks:r}=this,n=r[e];if(Array.isArray(n))for(let e=0;e<n.length;e+=1)await n[e](t)}on(e,t){const{callbacks:r}=this;void 0===r[e]&&(r[e]=[]),r[e].push(t)}remove(e,t){const r=this.callbacks[e];if(Array.isArray(r))for(let e=0;e<r.length;e+=1)t===r[e]&&r.splice(e,1)}};var v=o(171),m={};m.styleTagTransform=d(),m.setAttributes=s(),m.insert=i().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=f(),r()(v.Z,m),v.Z&&v.Z.locals&&v.Z.locals,e.Component})()})();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class Dimmer {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.page = document.getElementById('page');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
show() {
|
|
7
|
+
const { page, } = this;
|
|
8
|
+
page.style.backgroundColor = 'rgb(255, 255, 255)';
|
|
9
|
+
page.style.filter = 'brightness(0.5)';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
hidden() {
|
|
13
|
+
const { page, } = this;
|
|
14
|
+
page.style.backgroundColor = null;
|
|
15
|
+
page.style.filter = null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default Dimmer;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
class Emitter {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.callbacks = {};
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
async send(event, data) {
|
|
7
|
+
const { callbacks, } = this;
|
|
8
|
+
const cbs = callbacks[event];
|
|
9
|
+
if (Array.isArray(cbs)) {
|
|
10
|
+
for (let i = 0; i < cbs.length; i += 1) {
|
|
11
|
+
await cbs[i](data);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
on(event, callback) {
|
|
17
|
+
const { callbacks, } = this;
|
|
18
|
+
if (callbacks[event] === undefined) {
|
|
19
|
+
callbacks[event] = [];
|
|
20
|
+
}
|
|
21
|
+
callbacks[event].push(callback);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
remove(event, callback) {
|
|
25
|
+
const cbs = this.callbacks[event];
|
|
26
|
+
if (Array.isArray(cbs)) {
|
|
27
|
+
for (let i = 0; i < cbs.length; i += 1) {
|
|
28
|
+
if (callback === cbs[i]) {
|
|
29
|
+
cbs.splice(i, 1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default Emitter;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import style from './index.module.css';
|
|
3
|
+
import WebApp from '~/component/WebApp';
|
|
4
|
+
import location from '~/obj/location';
|
|
5
|
+
import Emitter from '~/class/Emitter';
|
|
6
|
+
|
|
7
|
+
const emitter = new Emitter();
|
|
8
|
+
|
|
9
|
+
class Router extends WebApp {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
this.route = {};
|
|
13
|
+
this.component = {};
|
|
14
|
+
this.state = {
|
|
15
|
+
loading: true,
|
|
16
|
+
location: '/',
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async componentDidMount() {
|
|
21
|
+
await this.bindEvent();
|
|
22
|
+
emitter.send('page' + window.location.pathname);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
bindEvent() {
|
|
26
|
+
location.onChange((location) => {
|
|
27
|
+
this.setState({
|
|
28
|
+
location,
|
|
29
|
+
loading: true,
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const { bindOwnRoutes, } = this;
|
|
33
|
+
if (typeof bindOwnRoutes === 'function') {
|
|
34
|
+
this.addRemoteRoutes();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
addRoute(path, component) {
|
|
39
|
+
const { route, } = this;
|
|
40
|
+
if (route[path] === undefined) {
|
|
41
|
+
route[path] = component;
|
|
42
|
+
}
|
|
43
|
+
return route[path];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async getPage(path) {
|
|
47
|
+
const { component, } = this;
|
|
48
|
+
if (component[path] === undefined) {
|
|
49
|
+
const Page = this.route[path];
|
|
50
|
+
if (Page !== undefined) {
|
|
51
|
+
component[path] = <Page />;
|
|
52
|
+
} else {
|
|
53
|
+
this.setState({ loading: true, });
|
|
54
|
+
const { NotFound, } = this.props;
|
|
55
|
+
if (NotFound === undefined) {
|
|
56
|
+
this.props.NotFound = await import('~/page/NotFound');
|
|
57
|
+
}
|
|
58
|
+
this.setState({ loading: false, });
|
|
59
|
+
return <NotFound />;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return component[path];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
render() {
|
|
66
|
+
const { location, minize, update, loading, } = this.state;
|
|
67
|
+
let router;
|
|
68
|
+
if (loading === true) {
|
|
69
|
+
const { Loading, } = this.props;
|
|
70
|
+
if (Loading) {
|
|
71
|
+
router = <Loading />;
|
|
72
|
+
} else {
|
|
73
|
+
router = null;
|
|
74
|
+
}
|
|
75
|
+
} else {
|
|
76
|
+
const { UpdateConfirm, } = this.props;
|
|
77
|
+
const Page = this.getPage(location);
|
|
78
|
+
router =
|
|
79
|
+
<div id="page" className={style.page}>
|
|
80
|
+
<Page />
|
|
81
|
+
{update && <UpdateConfirm />}
|
|
82
|
+
</div>;
|
|
83
|
+
}
|
|
84
|
+
return router;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default Router;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import style from './index.module.css';
|
|
3
|
+
import Dimmer from '~/class/Dimmer';
|
|
4
|
+
import readCookie from '~/lib/readCookie';
|
|
5
|
+
import filterNamespace from '~/lib/filterNamespace';
|
|
6
|
+
|
|
7
|
+
class UpdateConfirm extends React.Component {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.state = {
|
|
11
|
+
display: true,
|
|
12
|
+
};
|
|
13
|
+
this.update = this.update.bind(this);
|
|
14
|
+
this.close = this.close.bind(this);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
update() {
|
|
18
|
+
location.reload();
|
|
19
|
+
this.dimmer.close();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
close() {
|
|
23
|
+
this.setState({
|
|
24
|
+
display: false,
|
|
25
|
+
});
|
|
26
|
+
this.dimmer.hidden();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
componentDidMount() {
|
|
30
|
+
this.dimmer = new Dimmer();
|
|
31
|
+
this.dimmer.show();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
componentWillUnmount() {
|
|
35
|
+
this.close();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
render() {
|
|
39
|
+
const { display, } = this.state;
|
|
40
|
+
let confirm = null;
|
|
41
|
+
if (display) {
|
|
42
|
+
confirm =
|
|
43
|
+
<div className={style.confirm}>
|
|
44
|
+
<div className={style.title}>
|
|
45
|
+
Detect a new version update of this webapp.Whether or not process update?
|
|
46
|
+
</div>
|
|
47
|
+
<div className={style.btngrp}>
|
|
48
|
+
<button onClick={this.update} className={[style.btn, style.update].join(' ')}>
|
|
49
|
+
update
|
|
50
|
+
</button>
|
|
51
|
+
<button onClick={this.close} className={[style.btn, style.ignore].join(' ')}>
|
|
52
|
+
delay util next an minute
|
|
53
|
+
</button>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
}
|
|
57
|
+
return confirm;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default UpdateConfirm;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.confirm
|
|
2
|
+
position: absolute
|
|
3
|
+
width: 680px
|
|
4
|
+
top: calc(50% - 100px)
|
|
5
|
+
left: calc(50% - 340px)
|
|
6
|
+
padding: 15px 0px 10px 0px
|
|
7
|
+
z-index: 2
|
|
8
|
+
.title
|
|
9
|
+
color: rgb(255, 255, 255)
|
|
10
|
+
font-size: 17px
|
|
11
|
+
padding: 0 20px 30px 20px
|
|
12
|
+
border-bottom: 1px solid rgb(255, 255, 255)
|
|
13
|
+
.title:before
|
|
14
|
+
font-size: 43px
|
|
15
|
+
content: '\f56d'
|
|
16
|
+
margin-right: 15px
|
|
17
|
+
.btngrp
|
|
18
|
+
display: flex
|
|
19
|
+
margin-top: 25px
|
|
20
|
+
justify-content: center
|
|
21
|
+
.btn
|
|
22
|
+
color: rgb(0, 0, 0, 0.6)
|
|
23
|
+
background-color: rgb(255, 255, 255)
|
|
24
|
+
display: inline-flex
|
|
25
|
+
font-size: 16px
|
|
26
|
+
padding: 6.5px 10px 6.5px 10px
|
|
27
|
+
margin: 0 100px 0 100px
|
|
28
|
+
border: 0px
|
|
29
|
+
border-radius: 2.5px
|
|
30
|
+
align-items: center
|
|
31
|
+
.btn:before
|
|
32
|
+
border-right: 1px solid rgb(0, 0, 0, 0.6)
|
|
33
|
+
margin-right: 8px
|
|
34
|
+
padding-right: 8px
|
|
35
|
+
.update:before
|
|
36
|
+
font-size: 15px
|
|
37
|
+
content: '\f252'
|
|
38
|
+
.ignore:before
|
|
39
|
+
font-size: 16px
|
|
40
|
+
content: '\f5c8'
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import location from '~/obj/location';
|
|
3
|
+
import checkUpdate from '~/lib/checkUpdate';
|
|
4
|
+
|
|
5
|
+
class WebApp extends React.Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
super(props);
|
|
8
|
+
this.checkUpdate = this.checkUpdate.bind(this);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
dealUpdate() {
|
|
12
|
+
const id = setInterval(this.checkUpdate, 1000 * 60 * 30);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
dealHistory() {
|
|
16
|
+
window.addEventListener('popstate', (event) => {
|
|
17
|
+
location.to(event.currentTarget.location.pathname);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async checkUpdate() {
|
|
22
|
+
const response = fetch('/update/time', {
|
|
23
|
+
method: 'POST',
|
|
24
|
+
});
|
|
25
|
+
const time = await response.text();
|
|
26
|
+
const update = parseInt(time) > new Date().getTime();
|
|
27
|
+
this.setState({
|
|
28
|
+
update,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async componentDidMount() {
|
|
33
|
+
this.dealUpdate();
|
|
34
|
+
this.dealHistory();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async componentWillUnmount() {
|
|
38
|
+
clearInterval(this.id);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default WebApp;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * as Router from '~/component/Router';
|
|
2
|
+
export * as UpdateConfirm from '~/component/UpdateConfirm';
|
|
3
|
+
export * as WebApp from '~/component/WebApp';
|
|
4
|
+
export * as clearCookie from '~/lib/clearCookie';
|
|
5
|
+
export * as readCookie from '~/lib/readCookie';
|
|
6
|
+
export * as setCookie from '~/lib/setCookie';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import readCookie from '~/lib/readCookie';
|
|
2
|
+
|
|
3
|
+
export default function clearCookie(namespaces) {
|
|
4
|
+
Object.keys(namespaces).forEach((n) => {
|
|
5
|
+
if (n.expires !== undefined) {
|
|
6
|
+
Object.keys(n).forEach((k) => {
|
|
7
|
+
if (n === 'user') {
|
|
8
|
+
document.cookie[n + '_' + k] = '';
|
|
9
|
+
}
|
|
10
|
+
window.localStorage.removeItem(n + '_' + k);
|
|
11
|
+
});
|
|
12
|
+
delete namespaces[n];
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return namespaces;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HighLight, LocationLexer, } from 'glow.js';
|
|
2
|
+
import locationTemplate from '~/lib/template/locationTemplate';
|
|
3
|
+
|
|
4
|
+
export default function formateLocation(version) {
|
|
5
|
+
const highLight = new HighLight();
|
|
6
|
+
highLight.addLexer(LocationLexer);
|
|
7
|
+
return highLight.parse(version).map((e) => locationTemplate(e));
|
|
8
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import clearCookie from '~/lib/clearCookie';
|
|
2
|
+
|
|
3
|
+
export default function readCookie() {
|
|
4
|
+
const cookies = {};
|
|
5
|
+
document.cookie.split(';').forEach((i) => {
|
|
6
|
+
const [key, value] = i.split('=');
|
|
7
|
+
cookies[key.trim()] = value;
|
|
8
|
+
});
|
|
9
|
+
const namespaces = {};
|
|
10
|
+
Object.keys(cookies).forEach((k) => {
|
|
11
|
+
const result = k.split('_');
|
|
12
|
+
if (result.length === 2) {
|
|
13
|
+
const [namespace, key] = result;
|
|
14
|
+
if (namespaces[namespace] === undefined) {
|
|
15
|
+
namespaces[namespace] = {};
|
|
16
|
+
}
|
|
17
|
+
namespaces[namespace][key] = cookies[k];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
for (let i = 0; i < window.localStorage.length; i += 1) {
|
|
21
|
+
const k = window.localStorage.key(i);
|
|
22
|
+
const result = k.split('_');
|
|
23
|
+
if (result.length === 2) {
|
|
24
|
+
const [namespace, key] = result;
|
|
25
|
+
if (namespaces[namespace] === undefined) {
|
|
26
|
+
namespaces[namespace] = {};
|
|
27
|
+
}
|
|
28
|
+
namespaces[namespace][key] = window.localStorage.getItem(k);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return clearCookie(namespaces);
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default function setCookie(response) {
|
|
2
|
+
const cookie = response.headers.get('cookie');
|
|
3
|
+
if (cookie !== null) {
|
|
4
|
+
if (cookie === '') {
|
|
5
|
+
document.cookie.split(';').forEach((c) => {
|
|
6
|
+
const [k, v] = c.split('=');
|
|
7
|
+
const [namespace] = k.split('_');
|
|
8
|
+
if (namespace === 'user') {
|
|
9
|
+
document.cookie = k + '=' + v;
|
|
10
|
+
}
|
|
11
|
+
window.localStorage.set(k, v);
|
|
12
|
+
});
|
|
13
|
+
} else {
|
|
14
|
+
cookie.split(';').forEach((c) => {
|
|
15
|
+
document.cookie=c;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import style from './index.module.css';
|
|
3
|
+
|
|
4
|
+
export default function locationTemplate(e) {
|
|
5
|
+
const { type, elem, } = e;
|
|
6
|
+
switch (type) {
|
|
7
|
+
case '/':
|
|
8
|
+
return <span className={style.slash}>/</span>;
|
|
9
|
+
case 'namespace':
|
|
10
|
+
return (
|
|
11
|
+
<span className={style.namespace}>{elem}</span>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import style from './index.module.css';
|
|
3
|
+
import formateLocation from '~/lib/formateLocation';
|
|
4
|
+
|
|
5
|
+
class NotFound extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
return(
|
|
8
|
+
<div className={style.notfound}>
|
|
9
|
+
<span className={style.earth}/>
|
|
10
|
+
<span className={style.question}>?</span>
|
|
11
|
+
Location
|
|
12
|
+
<span className={style.location}>
|
|
13
|
+
{formateLocation(location.pathname)}
|
|
14
|
+
</span>
|
|
15
|
+
don't exist.
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default NotFound;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.notfound
|
|
2
|
+
font-size: 28px
|
|
3
|
+
display: flex
|
|
4
|
+
justify-content: center
|
|
5
|
+
align-items: center
|
|
6
|
+
height: 100%
|
|
7
|
+
.question
|
|
8
|
+
position: relative
|
|
9
|
+
top: -40px
|
|
10
|
+
left: -10px
|
|
11
|
+
font-size: 40px
|
|
12
|
+
font-weight: 500
|
|
13
|
+
display: flex
|
|
14
|
+
width: 40px
|
|
15
|
+
height: 40px
|
|
16
|
+
align-items: center
|
|
17
|
+
justify-content: center
|
|
18
|
+
margin-left: -10px
|
|
19
|
+
color: rgb(255, 255, 255)
|
|
20
|
+
background-color: rgb(243, 43, 43)
|
|
21
|
+
.earth:before
|
|
22
|
+
font-size: 75px
|
|
23
|
+
content: '\f57d'
|
|
24
|
+
background-color: rgba(0, 0, 0, 0)
|
|
25
|
+
.location
|
|
26
|
+
margin: 0 8px 0 8px
|
|
27
|
+
background-color: rgb(245, 245, 245)
|
|
28
|
+
padding: 0 6px 0 6px
|