├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── README_ENG.md
├── analysis_options.yaml
├── build.sh
├── docs
├── favicon.ico
├── github_logo.jpg
├── index.html
├── index_ch.html
├── main.dart.js
└── styles.css
├── lib
├── generator.dart
├── json_generator.dart
├── storage.dart
├── template.dart
└── test.dart
├── pubspec.yaml
└── web
├── favicon.ico
├── github_logo.jpg
├── index.html
├── index_ch.html
├── main.dart
└── styles.css
/.gitignore:
--------------------------------------------------------------------------------
1 | # Files and directories created by pub
2 | .dart_tool/
3 | .packages
4 | # Remove the following pattern if you wish to check in your lock file
5 | pubspec.lock
6 |
7 | # Conventional directory for build outputs
8 | build/
9 |
10 | # Directory created by dartdoc
11 | doc/api/
12 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.0.0
2 |
3 | - Initial version, created by Stagehand
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2018 cjl_spy@163.com
2 |
3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4 |
5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6 |
7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8 |
9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # json2dart_serialization
2 |
3 | [English readme](https://github.com/CaiJingLong/json2dart/blob/master/README_ENG.md)
4 |
5 | 一个网页版本的 json 转 dart 库
6 |
7 | [直接使用 json2dart](https://caijinglong.github.io/json2dart/index.html)
8 |
9 | ## 说明
10 |
11 | 感谢[JSONFormat4Flutter](https://github.com/debuggerx01/JSONFormat4Flutter) 给予的灵感
12 | 不同于这个库的是:这个是为了 json_serializable 创建的
13 |
14 | json_serializable 可以参考 flutter 官网 json 部分 [flutter](https://flutter.io/json)
15 |
16 | 项目使用 dart web 开发
17 |
18 | 主体功能已完结,有需要修改的地方欢迎留言
19 |
20 | ## 开发环境
21 |
22 | 其他环境不保证可以编译这份代码
23 |
24 | ```cli
25 | dart --version
26 | Dart VM version: 2.0.0-dev.69.5 (Tue Jul 31 15:05:14 2018 +0200) on "macos_x64"
27 | ```
28 |
29 | ## license
30 |
31 | Created from templates made available by Stagehand under a BSD-style
32 | [license](https://github.com/dart-lang/stagehand/blob/master/LICENSE).
33 |
34 | the library also under BSD-style.
35 |
--------------------------------------------------------------------------------
/README_ENG.md:
--------------------------------------------------------------------------------
1 | # json2dart_serialization
2 |
3 | a dart web for json2dart
4 |
5 | use for web location: [json2dart](https://caijinglong.github.io/json2dart/index.html)
6 |
7 | ## intro
8 |
9 | Thank you for the inspiration of this [JSONFormat4Flutter](https://github.com/debuggerx01/JSONFormat4Flutter)
10 |
11 | This project was created for the [json_serializable](https://pub.dartlang.org/packages/json_serializable)
12 |
13 | json_serializable also read the flutter's json page [flutter](https://flutter.io/json)
14 |
15 | ## the code compile env
16 |
17 | ```cli
18 | dart --version
19 | Dart VM version: 2.0.0-dev.69.5 (Tue Jul 31 15:05:14 2018 +0200) on "macos_x64"
20 | ```
21 |
22 | ## license
23 |
24 | Created from templates made available by Stagehand under a BSD-style
25 | [license](https://github.com/dart-lang/stagehand/blob/master/LICENSE).
26 |
27 | the library also under BSD-style.
28 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | analyzer:
2 | # exclude:
3 | # - path/to/excluded/files/**
4 |
5 | # Lint rules and documentation, see http://dart-lang.github.io/linter/lints
6 | linter:
7 | rules:
8 | - cancel_subscriptions
9 | - hash_and_equals
10 | - iterable_contains_unrelated_type
11 | - list_remove_unrelated_type
12 | - test_types_in_equals
13 | - unrelated_type_equality_checks
14 | - valid_regexps
15 |
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | dist=docs
2 | webdev build
3 | rm -rf $dist
4 | mkdir $dist
5 | cp build/*.ico $dist
6 | cp build/*.jpg $dist
7 | cp build/*.html $dist
8 | cp build/*.js $dist
9 | cp build/*.css $dist
10 |
11 | echo "copy path to $dist"
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CaiJingLong/json2dart/c263e29146f948d577fc9fbbc6f4a97ea7e84895/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/github_logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CaiJingLong/json2dart/c263e29146f948d577fc9fbbc6f4a97ea7e84895/docs/github_logo.jpg
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | json2dart_for_json_serializable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
32 |
33 | v0.x.x
41 | v1.x.x
48 |
49 |
50 |
66 |
67 |
68 |
69 |
70 |
71 |
76 |
82 |
83 |
84 |
85 |
86 | format
87 |
88 |
89 | edit class name
90 | copy
91 | download
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/docs/index_ch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | json2dart_for_json_serializable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
49 |
50 |
66 |
67 |
68 |
73 |
74 |
75 |
76 |
82 |
83 |
84 |
85 |
86 | 格式化
87 |
88 |
89 | 编辑
90 | 复制
91 | 下载
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/docs/main.dart.js:
--------------------------------------------------------------------------------
1 | {}(function dartProgram(){function copyProperties(a,b){var u=Object.keys(a)
2 | for(var t=0;t=0)return true
8 | if(typeof version=="function"&&version.length==0){var s=version()
9 | if(/^\d+\.\d+\.\d+\.\d+$/.test(s))return true}}catch(r){}return false}()
10 | function setFunctionNamesIfNecessary(a){function t(){};if(typeof t.name=="string")return
11 | for(var u=0;u=u.length)return H.n(u,3)
91 | t=H.m(u[3])
92 | if(t!=null)return parseInt(a,10)
93 | if(u[2]!=null)return parseInt(a,16)
94 | return},
95 | az:function(a){return H.fk(a)+H.dU(H.a8(a),0,null)},
96 | fk:function(a){var u,t,s,r,q,p,o,n=J.q(a),m=n.constructor
97 | if(typeof m=="function"){u=m.name
98 | t=typeof u==="string"?u:null}else t=null
99 | s=t==null
100 | if(s||n===C.v||!!n.$iaB){r=C.k(a)
101 | if(s)t=r
102 | if(r==="Object"){q=a.constructor
103 | if(typeof q=="function"){p=String(q).match(/^\s*function\s*([\w$]*)\s*\(/)
104 | o=p==null?null:p[1]
105 | if(typeof o==="string"&&/^\w+$/.test(o))t=o}}return t}t=t
106 | return H.aL(t.length>1&&C.b.M(t,0)===36?C.b.V(t,1):t)},
107 | F:function(a){var u
108 | if(a<=65535)return String.fromCharCode(a)
109 | if(a<=1114111){u=a-65536
110 | return String.fromCharCode((55296|C.h.ao(u,10))>>>0,56320|u&1023)}throw H.f(P.c_(a,0,1114111,null,null))},
111 | fP:function(a){throw H.f(H.bg(a))},
112 | n:function(a,b){if(a==null)J.bp(a)
113 | throw H.f(H.a7(a,b))},
114 | a7:function(a,b){var u,t,s="index"
115 | if(typeof b!=="number"||Math.floor(b)!==b)return new P.W(!0,b,s,null)
116 | u=H.H(J.bp(a))
117 | if(!(b<0)){if(typeof u!=="number")return H.fP(u)
118 | t=b>=u}else t=!0
119 | if(t)return P.dJ(b,a,s,null,u)
120 | return P.c0(b,s)},
121 | bg:function(a){return new P.W(!0,a,null,null)},
122 | f:function(a){var u
123 | if(a==null)a=new P.ax()
124 | u=new Error()
125 | u.dartException=a
126 | if("defineProperty" in Object){Object.defineProperty(u,"message",{get:H.eU})
127 | u.name=""}else u.toString=H.eU
128 | return u},
129 | eU:function(){return J.aN(this.dartException)},
130 | ak:function(a){throw H.f(a)},
131 | h2:function(a){throw H.f(P.ap(a))},
132 | S:function(a){var u,t,s,r,q,p
133 | a=H.h_(a.replace(String({}),'$receiver$'))
134 | u=a.match(/\\\$[a-zA-Z]+\\\$/g)
135 | if(u==null)u=H.O([],[P.e])
136 | t=u.indexOf("\\$arguments\\$")
137 | s=u.indexOf("\\$argumentsExpr\\$")
138 | r=u.indexOf("\\$expr\\$")
139 | q=u.indexOf("\\$method\\$")
140 | p=u.indexOf("\\$receiver\\$")
141 | return new H.cd(a.replace(new RegExp('\\\\\\$arguments\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$argumentsExpr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$expr\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$method\\\\\\$','g'),'((?:x|[^x])*)').replace(new RegExp('\\\\\\$receiver\\\\\\$','g'),'((?:x|[^x])*)'),t,s,r,q,p)},
142 | ce:function(a){return function($expr$){var $argumentsExpr$='$arguments$'
143 | try{$expr$.$method$($argumentsExpr$)}catch(u){return u.message}}(a)},
144 | et:function(a){return function($expr$){try{$expr$.$method$}catch(u){return u.message}}(a)},
145 | em:function(a,b){return new H.bY(a,b==null?null:b.method)},
146 | dN:function(a,b){var u=b==null,t=u?null:b.method
147 | return new H.bO(a,t,u?null:b.receiver)},
148 | P:function(a){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g=null,f=new H.dB(a)
149 | if(a==null)return
150 | if(a instanceof H.ar)return f.$1(a.a)
151 | if(typeof a!=="object")return a
152 | if("dartException" in a)return f.$1(a.dartException)
153 | else if(!("message" in a))return a
154 | u=a.message
155 | if("number" in a&&typeof a.number=="number"){t=a.number
156 | s=t&65535
157 | if((C.h.ao(t,16)&8191)===10)switch(s){case 438:return f.$1(H.dN(H.i(u)+" (Error "+s+")",g))
158 | case 445:case 5007:return f.$1(H.em(H.i(u)+" (Error "+s+")",g))}}if(a instanceof TypeError){r=$.eW()
159 | q=$.eX()
160 | p=$.eY()
161 | o=$.eZ()
162 | n=$.f1()
163 | m=$.f2()
164 | l=$.f0()
165 | $.f_()
166 | k=$.f4()
167 | j=$.f3()
168 | i=r.u(u)
169 | if(i!=null)return f.$1(H.dN(H.m(u),i))
170 | else{i=q.u(u)
171 | if(i!=null){i.method="call"
172 | return f.$1(H.dN(H.m(u),i))}else{i=p.u(u)
173 | if(i==null){i=o.u(u)
174 | if(i==null){i=n.u(u)
175 | if(i==null){i=m.u(u)
176 | if(i==null){i=l.u(u)
177 | if(i==null){i=o.u(u)
178 | if(i==null){i=k.u(u)
179 | if(i==null){i=j.u(u)
180 | h=i!=null}else h=!0}else h=!0}else h=!0}else h=!0}else h=!0}else h=!0}else h=!0
181 | if(h)return f.$1(H.em(H.m(u),i))}}return f.$1(new H.cg(typeof u==="string"?u:""))}if(a instanceof RangeError){if(typeof u==="string"&&u.indexOf("call stack")!==-1)return new P.b0()
182 | u=function(b){try{return String(b)}catch(e){}return null}(a)
183 | return f.$1(new P.W(!1,g,g,typeof u==="string"?u.replace(/^RangeError:\s*/,""):u))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof u==="string"&&u==="too much recursion")return new P.b0()
184 | return a},
185 | ai:function(a){var u
186 | if(a instanceof H.ar)return a.b
187 | if(a==null)return new H.bc(a)
188 | u=a.$cachedTrace
189 | if(u!=null)return u
190 | return a.$cachedTrace=new H.bc(a)},
191 | fN:function(a,b){var u,t,s,r=a.length
192 | for(u=0;u=27
249 | if(q)return H.fa(t,!r,u,b)
250 | if(t===0){r=$.Q
251 | if(typeof r!=="number")return r.B()
252 | $.Q=r+1
253 | p="self"+r
254 | r="return function(){var "+p+" = this."
255 | q=$.an
256 | return new Function(r+H.i(q==null?$.an=H.bs("self"):q)+";return "+p+"."+H.i(u)+"();}")()}o="abcdefghijklmnopqrstuvwxyz".split("").splice(0,t).join(",")
257 | r=$.Q
258 | if(typeof r!=="number")return r.B()
259 | $.Q=r+1
260 | o+=r
261 | r="return function("+o+"){return this."
262 | q=$.an
263 | return new Function(r+H.i(q==null?$.an=H.bs("self"):q)+"."+H.i(u)+"("+o+");}")()},
264 | fb:function(a,b,c,d){var u=H.dE,t=H.ed
265 | switch(b?-1:a){case 0:throw H.f(new H.c1("Intercepted function with no arguments."))
266 | case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,u,t)
267 | case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,u,t)
268 | case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,u,t)
269 | case 4:return function(e,f,g){return function(h,i,j){return f(this)[e](g(this),h,i,j)}}(c,u,t)
270 | case 5:return function(e,f,g){return function(h,i,j,k){return f(this)[e](g(this),h,i,j,k)}}(c,u,t)
271 | case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(this),h,i,j,k,l)}}(c,u,t)
272 | default:return function(e,f,g,h){return function(){h=[g(this)]
273 | Array.prototype.push.apply(h,arguments)
274 | return e.apply(f(this),h)}}(d,u,t)}},
275 | fc:function(a,b){var u,t,s,r,q,p,o,n=$.an
276 | if(n==null)n=$.an=H.bs("self")
277 | u=$.ec
278 | if(u==null)u=$.ec=H.bs("receiver")
279 | t=b.$stubName
280 | s=b.length
281 | r=a[t]
282 | q=b==null?r==null:b===r
283 | p=!q||s>=28
284 | if(p)return H.fb(s,!q,t,b)
285 | if(s===1){n="return function(){return this."+H.i(n)+"."+H.i(t)+"(this."+H.i(u)+");"
286 | u=$.Q
287 | if(typeof u!=="number")return u.B()
288 | $.Q=u+1
289 | return new Function(n+u+"}")()}o="abcdefghijklmnopqrstuvwxyz".split("").splice(0,s-1).join(",")
290 | n="return function("+o+"){return this."+H.i(n)+"."+H.i(t)+"(this."+H.i(u)+", "+o+");"
291 | u=$.Q
292 | if(typeof u!=="number")return u.B()
293 | $.Q=u+1
294 | return new Function(n+u+"}")()},
295 | dX:function(a,b,c,d,e,f,g){return H.fd(a,b,H.H(c),d,!!e,!!f,g)},
296 | dE:function(a){return a.a},
297 | ed:function(a){return a.c},
298 | bs:function(a){var u,t,s,r=new H.am("self","target","receiver","name"),q=J.eg(Object.getOwnPropertyNames(r))
299 | for(u=q.length,t=0;t"))},
326 | fW:function(a,b){var u
327 | if(a==null)return a
328 | u=J.q(a)
329 | if(!!u.$ir)return a
330 | if(u[b])return a
331 | H.e2(a,b)},
332 | eI:function(a){var u
333 | if("$S" in a){u=a.$S
334 | if(typeof u=="number")return v.types[H.H(u)]
335 | else return a.$S()}return},
336 | bk:function(a,b){var u
337 | if(typeof a=="function")return!0
338 | u=H.eI(J.q(a))
339 | if(u==null)return!1
340 | return H.ex(u,null,b,null)},
341 | d:function(a,b){var u,t
342 | if(a==null)return a
343 | if($.dQ)return a
344 | $.dQ=!0
345 | try{if(H.bk(a,b))return a
346 | u=H.aK(b)
347 | t=H.T(a,u)
348 | throw H.f(t)}finally{$.dQ=!1}},
349 | bl:function(a,b){if(a!=null&&!H.dW(a,b))H.ak(H.T(a,H.aK(b)))
350 | return a},
351 | T:function(a,b){return new H.b2("TypeError: "+P.aQ(a)+": type '"+H.fF(a)+"' is not a subtype of type '"+b+"'")},
352 | fF:function(a){var u,t=J.q(a)
353 | if(!!t.$iao){u=H.eI(t)
354 | if(u!=null)return H.aK(u)
355 | return"Closure"}return H.az(a)},
356 | fI:function(a){throw H.f(new H.cj(a))},
357 | h3:function(a){throw H.f(new P.bv(H.m(a)))},
358 | eN:function(a){return v.getIsolateTag(a)},
359 | O:function(a,b){a.$ti=b
360 | return a},
361 | a8:function(a){if(a==null)return
362 | return a.$ti},
363 | ho:function(a,b,c){return H.aj(a["$a"+H.i(c)],H.a8(b))},
364 | da:function(a,b,c,d){var u
365 | H.m(c)
366 | H.H(d)
367 | u=H.aj(a["$a"+H.i(c)],H.a8(b))
368 | return u==null?null:u[d]},
369 | eO:function(a,b,c){var u
370 | H.m(b)
371 | H.H(c)
372 | u=H.aj(a["$a"+H.i(b)],H.a8(a))
373 | return u==null?null:u[c]},
374 | k:function(a,b){var u
375 | H.H(b)
376 | u=H.a8(a)
377 | return u==null?null:u[b]},
378 | aK:function(a){return H.a4(a,null)},
379 | a4:function(a,b){var u,t
380 | H.a5(b,"$ir",[P.e],"$ar")
381 | if(a==null)return"dynamic"
382 | if(a===-1)return"void"
383 | if(typeof a==="object"&&a!==null&&a.constructor===Array)return H.aL(a[0].name)+H.dU(a,1,b)
384 | if(typeof a=="function")return H.aL(a.name)
385 | if(a===-2)return"dynamic"
386 | if(typeof a==="number"){H.H(a)
387 | if(b==null||a<0||a>=b.length)return"unexpected-generic-index:"+a
388 | u=b.length
389 | t=u-a-1
390 | if(t<0||t>=u)return H.n(b,t)
391 | return H.i(b[t])}if('func' in a)return H.fw(a,b)
392 | if('futureOr' in a)return"FutureOr<"+H.a4("type" in a?a.type:null,b)+">"
393 | return"unknown-reified-type"},
394 | fw:function(a,a0){var u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c=", ",b=[P.e]
395 | H.a5(a0,"$ir",b,"$ar")
396 | if("bounds" in a){u=a.bounds
397 | if(a0==null){a0=H.O([],b)
398 | t=null}else t=a0.length
399 | s=a0.length
400 | for(r=u.length,q=r;q>0;--q)C.a.j(a0,"T"+(s+q))
401 | for(p="<",o="",q=0;q"}else{p=""
408 | t=null}l=!!a.v?"void":H.a4(a.ret,a0)
409 | if("args" in a){k=a.args
410 | for(b=k.length,j="",i="",h=0;h "+l},
420 | dU:function(a,b,c){var u,t,s,r,q,p
421 | H.a5(c,"$ir",[P.e],"$ar")
422 | if(a==null)return""
423 | u=new P.R("")
424 | for(t=b,s="",r=!0,q="";t"},
428 | aj:function(a,b){if(a==null)return b
429 | a=a.apply(null,b)
430 | if(a==null)return
431 | if(typeof a==="object"&&a!==null&&a.constructor===Array)return a
432 | if(typeof a=="function")return a.apply(null,b)
433 | return b},
434 | Z:function(a,b,c,d){var u,t
435 | H.m(b)
436 | H.bn(c)
437 | H.m(d)
438 | if(a==null)return!1
439 | u=H.a8(a)
440 | t=J.q(a)
441 | if(t[b]==null)return!1
442 | return H.eD(H.aj(t[d],u),null,c,null)},
443 | a5:function(a,b,c,d){H.m(b)
444 | H.bn(c)
445 | H.m(d)
446 | if(a==null)return a
447 | if(H.Z(a,b,c,d))return a
448 | throw H.f(H.T(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(H.aL(b.substring(2))+H.dU(c,0,null),v.mangledGlobalNames)))},
449 | fH:function(a,b,c,d,e){H.m(c)
450 | H.m(d)
451 | H.m(e)
452 | if(!H.G(a,null,b,null))H.h4("TypeError: "+H.i(c)+H.aK(a)+H.i(d)+H.aK(b)+H.i(e))},
453 | h4:function(a){throw H.f(new H.b2(H.m(a)))},
454 | eD:function(a,b,c,d){var u,t
455 | if(c==null)return!0
456 | if(a==null){u=c.length
457 | for(t=0;tn)return!1
521 | if(o+m=0},
605 | h_:function(a){if(/[[\]{}()*+?.\\^$|]/.test(a))return a.replace(/[[\]{}()*+?.\\^$|]/g,"\\$&")
606 | return a},
607 | fE:function(a){return a},
608 | h1:function(a,b,c,d){var u,t,s,r,q,p
609 | for(u=b.ap(0,a),u=new H.b3(u.a,u.b,u.c),t=0,s="";u.l();s=r){r=u.d
610 | q=r.b
611 | p=q.index
612 | r=s+H.i(H.ey().$1(C.b.D(a,t,p)))+H.i(c.$1(r))
613 | t=p+q[0].length}u=s+H.i(H.ey().$1(C.b.V(a,t)))
614 | return u.charCodeAt(0)==0?u:u},
615 | cd:function cd(a,b,c,d,e,f){var _=this
616 | _.a=a
617 | _.b=b
618 | _.c=c
619 | _.d=d
620 | _.e=e
621 | _.f=f},
622 | bY:function bY(a,b){this.a=a
623 | this.b=b},
624 | bO:function bO(a,b,c){this.a=a
625 | this.b=b
626 | this.c=c},
627 | cg:function cg(a){this.a=a},
628 | ar:function ar(a,b){this.a=a
629 | this.b=b},
630 | dB:function dB(a){this.a=a},
631 | bc:function bc(a){this.a=a
632 | this.b=null},
633 | ao:function ao(){},
634 | cb:function cb(){},
635 | c4:function c4(){},
636 | am:function am(a,b,c,d){var _=this
637 | _.a=a
638 | _.b=b
639 | _.c=c
640 | _.d=d},
641 | b2:function b2(a){this.a=a},
642 | c1:function c1(a){this.a=a},
643 | cj:function cj(a){this.a=a},
644 | bN:function bN(a){var _=this
645 | _.a=0
646 | _.f=_.e=_.d=_.c=_.b=null
647 | _.r=0
648 | _.$ti=a},
649 | bT:function bT(a,b){this.a=a
650 | this.b=b
651 | this.c=null},
652 | aV:function aV(a,b){this.a=a
653 | this.$ti=b},
654 | bU:function bU(a,b,c){var _=this
655 | _.a=a
656 | _.b=b
657 | _.d=_.c=null
658 | _.$ti=c},
659 | db:function db(a){this.a=a},
660 | dc:function dc(a){this.a=a},
661 | dd:function dd(a){this.a=a},
662 | bM:function bM(a,b){var _=this
663 | _.a=a
664 | _.b=b
665 | _.d=_.c=null},
666 | cL:function cL(a){this.b=a},
667 | ci:function ci(a,b,c){this.a=a
668 | this.b=b
669 | this.c=c},
670 | b3:function b3(a,b,c){var _=this
671 | _.a=a
672 | _.b=b
673 | _.c=c
674 | _.d=null},
675 | fM:function(a){return J.fg(a?Object.keys(a):[],null)}},J={
676 | e1:function(a,b,c,d){return{i:a,p:b,e:c,x:d}},
677 | d9:function(a){var u,t,s,r,q=a[v.dispatchPropertyName]
678 | if(q==null)if($.e_==null){H.fR()
679 | q=a[v.dispatchPropertyName]}if(q!=null){u=q.p
680 | if(!1===u)return q.i
681 | if(!0===u)return a
682 | t=Object.getPrototypeOf(a)
683 | if(u===t)return q.i
684 | if(q.e===t)throw H.f(P.eu("Return interceptor for "+H.i(u(a,q))))}s=a.constructor
685 | r=s==null?null:s[$.e5()]
686 | if(r!=null)return r
687 | r=H.fX(a)
688 | if(r!=null)return r
689 | if(typeof a=="function")return C.x
690 | u=Object.getPrototypeOf(a)
691 | if(u==null)return C.n
692 | if(u===Object.prototype)return C.n
693 | if(typeof s=="function"){Object.defineProperty(s,$.e5(),{value:C.j,enumerable:false,writable:true,configurable:true})
694 | return C.j}return C.j},
695 | fg:function(a,b){return J.eg(H.O(a,[b]))},
696 | eg:function(a){H.bn(a)
697 | a.fixed$length=Array
698 | return a},
699 | eh:function(a){if(a<256)switch(a){case 9:case 10:case 11:case 12:case 13:case 32:case 133:case 160:return!0
700 | default:return!1}switch(a){case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8232:case 8233:case 8239:case 8287:case 12288:case 65279:return!0
701 | default:return!1}},
702 | fh:function(a,b){var u,t
703 | for(u=a.length;b0;b=u){u=b-1
707 | t=C.b.P(a,u)
708 | if(t!==32&&t!==13&&!J.eh(t))break}return b},
709 | q:function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.aR.prototype
710 | return J.bK.prototype}if(typeof a=="string")return J.ad.prototype
711 | if(a==null)return J.bL.prototype
712 | if(typeof a=="boolean")return J.bJ.prototype
713 | if(a.constructor==Array)return J.a1.prototype
714 | if(typeof a!="object"){if(typeof a=="function")return J.a2.prototype
715 | return a}if(a instanceof P.l)return a
716 | return J.d9(a)},
717 | N:function(a){if(typeof a=="string")return J.ad.prototype
718 | if(a==null)return a
719 | if(a.constructor==Array)return J.a1.prototype
720 | if(typeof a!="object"){if(typeof a=="function")return J.a2.prototype
721 | return a}if(a instanceof P.l)return a
722 | return J.d9(a)},
723 | eL:function(a){if(a==null)return a
724 | if(a.constructor==Array)return J.a1.prototype
725 | if(typeof a!="object"){if(typeof a=="function")return J.a2.prototype
726 | return a}if(a instanceof P.l)return a
727 | return J.d9(a)},
728 | d8:function(a){if(typeof a=="string")return J.ad.prototype
729 | if(a==null)return a
730 | if(!(a instanceof P.l))return J.aB.prototype
731 | return a},
732 | eM:function(a){if(a==null)return a
733 | if(typeof a!="object"){if(typeof a=="function")return J.a2.prototype
734 | return a}if(a instanceof P.l)return a
735 | return J.d9(a)},
736 | e7:function(a,b){if(a==null)return b==null
737 | if(typeof a!="object")return b!=null&&a===b
738 | return J.q(a).K(a,b)},
739 | f5:function(a,b){if(typeof b==="number")if(a.constructor==Array||typeof a=="string"||H.fV(a,a[v.dispatchPropertyName]))if(b>>>0===b&&b=4){t=b.a3()
818 | b.a=a.a
819 | b.c=a.c
820 | P.aE(b,t)}else{t=H.h(b.c,"$iV")
821 | b.a=2
822 | b.c=a
823 | a.an(t)}},
824 | aE:function(a,b){var u,t,s,r,q,p,o,n,m,l,k,j,i=null,h={},g=h.a=a
825 | for(;!0;){u={}
826 | t=g.a===8
827 | if(b==null){if(t){s=H.h(g.c,"$iy")
828 | g=g.b
829 | r=s.a
830 | q=s.b
831 | g.toString
832 | P.d0(i,i,g,r,q)}return}for(;p=b.a,p!=null;b=p){b.a=null
833 | P.aE(h.a,b)}g=h.a
834 | o=g.c
835 | u.a=t
836 | u.b=o
837 | r=!t
838 | if(r){q=b.c
839 | q=(q&1)!==0||q===8}else q=!0
840 | if(q){q=b.b
841 | n=q.b
842 | if(t){m=g.b
843 | m.toString
844 | m=m==n
845 | if(!m)n.toString
846 | else m=!0
847 | m=!m}else m=!1
848 | if(m){H.h(o,"$iy")
849 | g=g.b
850 | r=o.a
851 | q=o.b
852 | g.toString
853 | P.d0(i,i,g,r,q)
854 | return}l=$.p
855 | if(l!=n)$.p=n
856 | else l=i
857 | g=b.c
858 | if(g===8)new P.cC(h,u,b,t).$0()
859 | else if(r){if((g&1)!==0)new P.cB(u,b,o).$0()}else if((g&2)!==0)new P.cA(h,u,b).$0()
860 | if(l!=null)$.p=l
861 | g=u.b
862 | if(!!J.q(g).$iz){if(g.a>=4){k=H.h(q.c,"$iV")
863 | q.c=null
864 | b=q.O(k)
865 | q.a=g.a
866 | q.c=g.c
867 | h.a=g
868 | continue}else P.ev(g,q)
869 | return}}j=b.b
870 | k=H.h(j.c,"$iV")
871 | j.c=null
872 | b=j.O(k)
873 | g=u.a
874 | r=u.b
875 | if(!g){H.o(r,H.k(j,0))
876 | j.a=4
877 | j.c=r}else{H.h(r,"$iy")
878 | j.a=8
879 | j.c=r}h.a=j
880 | g=j}},
881 | fA:function(a,b){if(H.bk(a,{func:1,args:[P.l,P.u]}))return b.ay(a,null,P.l,P.u)
882 | if(H.bk(a,{func:1,args:[P.l]}))return H.d(a,{func:1,ret:null,args:[P.l]})
883 | throw H.f(P.eb(a,"onError","Error handler must accept one Object or one Object and a StackTrace as arguments, and return a a valid result"))},
884 | fy:function(){var u,t
885 | for(;u=$.ag,u!=null;){$.aG=null
886 | t=u.b
887 | $.ag=t
888 | if(t==null)$.aF=null
889 | u.a.$0()}},
890 | fD:function(){$.dS=!0
891 | try{P.fy()}finally{$.aG=null
892 | $.dS=!1
893 | if($.ag!=null)$.e6().$1(P.eE())}},
894 | eB:function(a){var u=new P.b5(H.d(a,{func:1,ret:-1}))
895 | if($.ag==null){$.ag=$.aF=u
896 | if(!$.dS)$.e6().$1(P.eE())}else $.aF=$.aF.b=u},
897 | fC:function(a){var u,t,s
898 | H.d(a,{func:1,ret:-1})
899 | u=$.ag
900 | if(u==null){P.eB(a)
901 | $.aG=$.aF
902 | return}t=new P.b5(a)
903 | s=$.aG
904 | if(s==null){t.b=u
905 | $.ag=$.aG=t}else{t.b=s.b
906 | $.aG=s.b=t
907 | if(t.b==null)$.aF=t}},
908 | e3:function(a){var u,t=null,s={func:1,ret:-1}
909 | H.d(a,s)
910 | u=$.p
911 | if(C.c===u){P.d2(t,t,C.c,a)
912 | return}u.toString
913 | P.d2(t,t,u,H.d(u.aq(a),s))},
914 | h7:function(a,b){if(H.a5(a,"$iaA",[b],"$aaA")==null)H.ak(P.f8("stream"))
915 | return new P.cQ([b])},
916 | d0:function(a,b,c,d,e){var u={}
917 | u.a=d
918 | P.fC(new P.d1(u,e))},
919 | ez:function(a,b,c,d,e){var u,t
920 | H.d(d,{func:1,ret:e})
921 | t=$.p
922 | if(t===c)return d.$0()
923 | $.p=c
924 | u=t
925 | try{t=d.$0()
926 | return t}finally{$.p=u}},
927 | eA:function(a,b,c,d,e,f,g){var u,t
928 | H.d(d,{func:1,ret:f,args:[g]})
929 | H.o(e,g)
930 | t=$.p
931 | if(t===c)return d.$1(e)
932 | $.p=c
933 | u=t
934 | try{t=d.$1(e)
935 | return t}finally{$.p=u}},
936 | fB:function(a,b,c,d,e,f,g,h,i){var u,t
937 | H.d(d,{func:1,ret:g,args:[h,i]})
938 | H.o(e,h)
939 | H.o(f,i)
940 | t=$.p
941 | if(t===c)return d.$2(e,f)
942 | $.p=c
943 | u=t
944 | try{t=d.$2(e,f)
945 | return t}finally{$.p=u}},
946 | d2:function(a,b,c,d){var u
947 | H.d(d,{func:1,ret:-1})
948 | u=C.c!==c
949 | if(u)d=!(!u||!1)?c.aq(d):c.aU(d,-1)
950 | P.eB(d)},
951 | cn:function cn(a){this.a=a},
952 | cm:function cm(a,b,c){this.a=a
953 | this.b=b
954 | this.c=c},
955 | co:function co(a){this.a=a},
956 | cp:function cp(a){this.a=a},
957 | cR:function cR(){},
958 | cS:function cS(a,b){this.a=a
959 | this.b=b},
960 | b4:function b4(a,b){this.a=a
961 | this.b=!1
962 | this.$ti=b},
963 | cl:function cl(a,b){this.a=a
964 | this.b=b},
965 | ck:function ck(a,b,c){this.a=a
966 | this.b=b
967 | this.c=c},
968 | cX:function cX(a){this.a=a},
969 | cY:function cY(a){this.a=a},
970 | d4:function d4(a){this.a=a},
971 | z:function z(){},
972 | b6:function b6(){},
973 | be:function be(a,b){this.a=a
974 | this.$ti=b},
975 | V:function V(a,b,c,d,e){var _=this
976 | _.a=null
977 | _.b=a
978 | _.c=b
979 | _.d=c
980 | _.e=d
981 | _.$ti=e},
982 | A:function A(a,b){var _=this
983 | _.a=0
984 | _.b=a
985 | _.c=null
986 | _.$ti=b},
987 | cv:function cv(a,b){this.a=a
988 | this.b=b},
989 | cz:function cz(a,b){this.a=a
990 | this.b=b},
991 | cw:function cw(a){this.a=a},
992 | cx:function cx(a){this.a=a},
993 | cy:function cy(a,b,c){this.a=a
994 | this.b=b
995 | this.c=c},
996 | cC:function cC(a,b,c,d){var _=this
997 | _.a=a
998 | _.b=b
999 | _.c=c
1000 | _.d=d},
1001 | cD:function cD(a){this.a=a},
1002 | cB:function cB(a,b,c){this.a=a
1003 | this.b=b
1004 | this.c=c},
1005 | cA:function cA(a,b,c){this.a=a
1006 | this.b=b
1007 | this.c=c},
1008 | b5:function b5(a){this.a=a
1009 | this.b=null},
1010 | aA:function aA(){},
1011 | c9:function c9(a,b){this.a=a
1012 | this.b=b},
1013 | ca:function ca(a,b){this.a=a
1014 | this.b=b},
1015 | c7:function c7(){},
1016 | c8:function c8(){},
1017 | cQ:function cQ(a){this.$ti=a},
1018 | y:function y(a,b){this.a=a
1019 | this.b=b},
1020 | cT:function cT(){},
1021 | d1:function d1(a,b){this.a=a
1022 | this.b=b},
1023 | cM:function cM(){},
1024 | cO:function cO(a,b,c){this.a=a
1025 | this.b=b
1026 | this.c=c},
1027 | cN:function cN(a,b){this.a=a
1028 | this.b=b},
1029 | cP:function cP(a,b,c){this.a=a
1030 | this.b=b
1031 | this.c=c},
1032 | dO:function(a,b,c){H.bn(a)
1033 | return H.a5(H.fN(a,new H.bN([b,c])),"$iek",[b,c],"$aek")},
1034 | ff:function(a,b,c){var u,t
1035 | if(P.dT(a)){if(b==="("&&c===")")return"(...)"
1036 | return b+"..."+c}u=H.O([],[P.e])
1037 | C.a.j($.D,a)
1038 | try{P.fx(a,u)}finally{if(0>=$.D.length)return H.n($.D,-1)
1039 | $.D.pop()}t=P.es(b,H.fW(u,"$iE"),", ")+c
1040 | return t.charCodeAt(0)==0?t:t},
1041 | ef:function(a,b,c){var u,t
1042 | if(P.dT(a))return b+"..."+c
1043 | u=new P.R(b)
1044 | C.a.j($.D,a)
1045 | try{t=u
1046 | t.a=P.es(t.a,a,", ")}finally{if(0>=$.D.length)return H.n($.D,-1)
1047 | $.D.pop()}u.a+=c
1048 | t=u.a
1049 | return t.charCodeAt(0)==0?t:t},
1050 | dT:function(a){var u,t
1051 | for(u=$.D.length,t=0;t=b.length)return H.n(b,-1)
1064 | q=b.pop()
1065 | if(0>=b.length)return H.n(b,-1)
1066 | p=b.pop()}else{o=u.gm();++s
1067 | if(!u.l()){if(s<=4){C.a.j(b,H.i(o))
1068 | return}q=H.i(o)
1069 | if(0>=b.length)return H.n(b,-1)
1070 | p=b.pop()
1071 | t+=q.length+2}else{n=u.gm();++s
1072 | for(;u.l();o=n,n=m){m=u.gm();++s
1073 | if(s>100){while(!0){if(!(t>75&&s>3))break
1074 | if(0>=b.length)return H.n(b,-1)
1075 | t-=b.pop().length+2;--s}C.a.j(b,"...")
1076 | return}}p=H.i(o)
1077 | q=H.i(n)
1078 | t+=q.length+p.length+4}}if(s>b.length+2){t+=5
1079 | l="..."}else l=null
1080 | while(!0){if(!(t>80&&b.length>3))break
1081 | if(0>=b.length)return H.n(b,-1)
1082 | t-=b.pop().length+2
1083 | if(l==null){t+=5
1084 | l="..."}}if(l!=null)C.a.j(b,l)
1085 | C.a.j(b,p)
1086 | C.a.j(b,q)},
1087 | el:function(a){var u,t={}
1088 | if(P.dT(a))return"{...}"
1089 | u=new P.R("")
1090 | try{C.a.j($.D,a)
1091 | u.a+="{"
1092 | t.a=!0
1093 | J.e8(a,new P.bX(t,u))
1094 | u.a+="}"}finally{if(0>=$.D.length)return H.n($.D,-1)
1095 | $.D.pop()}t=u.a
1096 | return t.charCodeAt(0)==0?t:t},
1097 | bI:function bI(){},
1098 | bV:function bV(){},
1099 | ae:function ae(){},
1100 | bW:function bW(){},
1101 | bX:function bX(a,b){this.a=a
1102 | this.b=b},
1103 | Y:function Y(){},
1104 | b9:function b9(){},
1105 | fz:function(a,b){var u,t,s,r
1106 | if(typeof a!=="string")throw H.f(H.bg(a))
1107 | u=null
1108 | try{u=JSON.parse(a)}catch(s){t=H.P(s)
1109 | r=P.dH(String(t),null)
1110 | throw H.f(r)}r=P.cZ(u)
1111 | return r},
1112 | cZ:function(a){var u
1113 | if(a==null)return
1114 | if(typeof a!="object")return a
1115 | if(Object.getPrototypeOf(a)!==Array.prototype)return new P.cE(a,Object.create(null))
1116 | for(u=0;ua||a>c)throw H.f(P.c_(a,0,c,"start",null))
1178 | if(a>b||b>c)throw H.f(P.c_(b,a,c,"end",null))
1179 | return b},
1180 | fm:function(a,b){if(typeof a!=="number")return a.aI()
1181 | if(a<0)throw H.f(P.c_(a,0,null,b,null))},
1182 | dJ:function(a,b,c,d,e){var u=H.H(e==null?J.bp(b):e)
1183 | return new P.bH(u,!0,a,c,"Index out of range")},
1184 | dP:function(a){return new P.ch(a)},
1185 | eu:function(a){return new P.cf(a)},
1186 | er:function(a){return new P.c3(a)},
1187 | ap:function(a){return new P.bt(a)},
1188 | dH:function(a,b){return new P.bD(a,b)},
1189 | a6:function a6(){},
1190 | bi:function bi(){},
1191 | ab:function ab(){},
1192 | br:function br(){},
1193 | ax:function ax(){},
1194 | W:function W(a,b,c,d){var _=this
1195 | _.a=a
1196 | _.b=b
1197 | _.c=c
1198 | _.d=d},
1199 | aZ:function aZ(a,b,c,d,e,f){var _=this
1200 | _.e=a
1201 | _.f=b
1202 | _.a=c
1203 | _.b=d
1204 | _.c=e
1205 | _.d=f},
1206 | bH:function bH(a,b,c,d,e){var _=this
1207 | _.f=a
1208 | _.a=b
1209 | _.b=c
1210 | _.c=d
1211 | _.d=e},
1212 | ch:function ch(a){this.a=a},
1213 | cf:function cf(a){this.a=a},
1214 | c3:function c3(a){this.a=a},
1215 | bt:function bt(a){this.a=a},
1216 | b0:function b0(){},
1217 | bv:function bv(a){this.a=a},
1218 | ct:function ct(a){this.a=a},
1219 | bD:function bD(a,b){this.a=a
1220 | this.b=b},
1221 | J:function J(){},
1222 | E:function E(){},
1223 | r:function r(){},
1224 | j:function j(){},
1225 | aJ:function aJ(){},
1226 | l:function l(){},
1227 | a3:function a3(){},
1228 | b_:function b_(){},
1229 | u:function u(){},
1230 | e:function e(){},
1231 | R:function R(a){this.a=a},
1232 | b:function b(){}},W={
1233 | f9:function(a){var u=new self.Blob(a)
1234 | return u},
1235 | x:function(a,b,c,d,e){var u=W.fG(new W.cs(c),W.a),t=u!=null
1236 | if(t&&!0){H.d(u,{func:1,args:[W.a]})
1237 | if(t)J.f6(a,b,u,!1)}return new W.cr(a,b,u,!1,[e])},
1238 | fG:function(a,b){var u
1239 | H.d(a,{func:1,ret:-1,args:[b]})
1240 | u=$.p
1241 | if(u===C.c)return a
1242 | return u.aV(a,b)},
1243 | c:function c(){},
1244 | al:function al(){},
1245 | bq:function bq(){},
1246 | a9:function a9(){},
1247 | a_:function a_(){},
1248 | by:function by(){},
1249 | cu:function cu(a,b){this.a=a
1250 | this.$ti=b},
1251 | aa:function aa(){},
1252 | a:function a(){},
1253 | a0:function a0(){},
1254 | bC:function bC(){},
1255 | X:function X(){},
1256 | aw:function aw(){},
1257 | t:function t(){},
1258 | w:function w(){},
1259 | aY:function aY(){},
1260 | c2:function c2(){},
1261 | b1:function b1(){},
1262 | c5:function c5(a){this.a=a},
1263 | c6:function c6(a){this.a=a},
1264 | M:function M(){},
1265 | U:function U(){},
1266 | cq:function cq(){},
1267 | b7:function b7(a,b,c,d){var _=this
1268 | _.a=a
1269 | _.b=b
1270 | _.c=c
1271 | _.$ti=d},
1272 | cr:function cr(a,b,c,d,e){var _=this
1273 | _.b=a
1274 | _.c=b
1275 | _.d=c
1276 | _.e=d
1277 | _.$ti=e},
1278 | cs:function cs(a){this.a=a},
1279 | as:function as(){},
1280 | bB:function bB(a,b,c){var _=this
1281 | _.a=a
1282 | _.b=b
1283 | _.c=-1
1284 | _.d=null
1285 | _.$ti=c},
1286 | ba:function ba(){},
1287 | bb:function bb(){},
1288 | bd:function bd(){}},X={
1289 | dV:function(a){if(0>=a.length)return H.n(a,0)
1290 | return a[0].toLowerCase()+H.h1(J.dD(a,1),P.eq("[A-Z]"),H.d(new X.d5(),{func:1,ret:P.e,args:[P.a3]}),null)},
1291 | eF:function(a){var u,t,s,r,q,p,o,n=P.eq("[0-9]\\.[0-9]+").ap(0,a),m=P.fj(n,!0,H.eO(n,"E",0))
1292 | for(u=0;u=n.length)return H.n(n,0)
1294 | t=n[0]
1295 | s=t.length
1296 | r=s-1
1297 | q=P.ep(r,s,s)
1298 | p=t.substring(0,r)
1299 | o=t.substring(q)
1300 | t=p+"5"+o
1301 | s=n.index
1302 | n=n[0].length
1303 | q=P.ep(s,s+n,a.length)
1304 | p=a.substring(0,s)
1305 | o=a.substring(q)
1306 | a=p+t+o}return a},
1307 | bE:function bE(a,b,c,d){var _=this
1308 | _.a=a
1309 | _.b=b
1310 | _.c=c
1311 | _.d=d},
1312 | bF:function bF(a){this.a=a},
1313 | bG:function bG(a){this.a=a},
1314 | d5:function d5(){},
1315 | bj:function(a){if(a==null||a.length===0)return""
1316 | if(0>=a.length)return H.n(a,0)
1317 | return a[0].toUpperCase()+J.dD(a,1)},
1318 | eJ:function(a){if(a==null||a.length===0)return""
1319 | if(0>=a.length)return H.n(a,0)
1320 | return a[0].toLowerCase()+J.dD(a,1)},
1321 | cc:function cc(){},
1322 | I:function I(a,b){this.a=a
1323 | this.b=b},
1324 | bw:function bw(a,b){this.a=a
1325 | this.b=b},
1326 | bx:function bx(a,b){this.a=a
1327 | this.b=b},
1328 | aW:function aW(a,b,c){this.d=a
1329 | this.a=b
1330 | this.b=c},
1331 | aC:function aC(a,b){this.a=a
1332 | this.b=b},
1333 | ac:function ac(a){this.a=a},
1334 | bA:function bA(a){this.a=a},
1335 | L:function L(){},
1336 | af:function af(a,b){this.a=a
1337 | this.b=b},
1338 | at:function at(a,b){this.a=a
1339 | this.b=b},
1340 | aX:function aX(a,b){this.a=a
1341 | this.b=b}},O={
1342 | dg:function(){var u=0,t=P.d_(null),s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a,a0
1343 | var $async$dg=P.d3(function(a1,a2){if(a1===1)return P.cU(a2,t)
1344 | while(true)switch(u){case 0:a0=$
1345 | u=2
1346 | return P.ft(O.dR(),$async$dg)
1347 | case 2:a0.df=a2
1348 | s=new S.bu()
1349 | r=document
1350 | q=H.h(r.querySelector("#json"),"$iM")
1351 | $.aH=H.h(r.querySelector("#class_name"),"$iM")
1352 | $.d7=H.h(r.querySelector("#result"),"$iM")
1353 | q.value=s.b8()
1354 | p=W.a
1355 | o={func:1,ret:-1,args:[p]}
1356 | W.x(q,"input",H.d(new O.dh(s,q),o),!1,p)
1357 | n=H.h(r.querySelector("#out_entity_name"),"$iX")
1358 | n.value=s.b7()
1359 | $.dZ=n.value
1360 | W.x(n,"input",H.d(new O.di(n,s),o),!1,p)
1361 | m=H.h(r.querySelector("#format"),"$ia9")
1362 | m.toString
1363 | l=W.t
1364 | k={func:1,ret:-1,args:[l]}
1365 | W.x(m,"click",H.d(new O.dj(q),k),!1,l)
1366 | j=H.h(r.querySelector("#use_json_key"),"$iX")
1367 | i=H.h(r.querySelector("#camelCase"),"$iX")
1368 | h=H.h(r.querySelector("#use_static"),"$iX")
1369 | g=H.h(r.querySelector("#result"),"$iM")
1370 | f=H.h(r.querySelector("#v0"),"$ieo")
1371 | e=H.h(r.querySelector("#v1"),"$ieo")
1372 | d=new O.dy(e,s)
1373 | $.bo=s.b9()
1374 | new O.dz(e).$0()
1375 | f.toString
1376 | W.x(f,"input",H.d(new O.dp(d),o),!1,p)
1377 | e.toString
1378 | W.x(e,"input",H.d(new O.dq(d),o),!1,p)
1379 | d=new O.dx(j,i)
1380 | j.checked=$.e4
1381 | j.toString
1382 | W.x(j,"input",H.d(new O.dr(d),o),!1,p)
1383 | c=J.aM(r.querySelector("#check_label"))
1384 | b=H.k(c,0)
1385 | W.x(c.a,c.b,H.d(new O.ds(j,d),{func:1,ret:-1,args:[b]}),!1,b)
1386 | i.checked=$.aI
1387 | i.toString
1388 | W.x(i,"input",H.d(new O.dt(i),o),!1,p)
1389 | b=J.aM(r.querySelector("#camelCaseLabel"))
1390 | d=H.k(b,0)
1391 | W.x(b.a,b.b,H.d(new O.du(i),{func:1,ret:-1,args:[d]}),!1,d)
1392 | h.checked=$.e0
1393 | W.x(h,"input",H.d(new O.dv(h),o),!1,p)
1394 | d=J.aM(r.querySelector("#useStaticLabel"))
1395 | b=H.k(d,0)
1396 | W.x(d.a,d.b,H.d(new O.dw(h),{func:1,ret:-1,args:[b]}),!1,b)
1397 | O.K()
1398 | b=J.aM(r.querySelector("#copy"))
1399 | d=H.k(b,0)
1400 | W.x(b.a,b.b,H.d(new O.dk(g),{func:1,ret:-1,args:[d]}),!1,d)
1401 | a=H.h(r.querySelector("#save"),"$ia9")
1402 | a.toString
1403 | W.x(a,"click",H.d(new O.dl(g),k),!1,l)
1404 | r=r.querySelector("#edit_class")
1405 | $.eH=r
1406 | r=J.aM(r)
1407 | l=H.k(r,0)
1408 | W.x(r.a,r.b,H.d(new O.dm(),{func:1,ret:-1,args:[l]}),!1,l)
1409 | l=$.aH
1410 | l.toString
1411 | W.x(l,"input",H.d(new O.dn(),o),!1,p)
1412 | return P.cV(null,t)}})
1413 | return P.cW($async$dg,t)},
1414 | dR:function(){var u=0,t=P.d_(P.a6),s,r,q,p,o,n
1415 | var $async$dR=P.d3(function(a,b){if(a===1)return P.cU(b,t)
1416 | while(true)switch(u){case 0:o=W.aw
1417 | n=document
1418 | H.fH(o,W.aa,"The type argument '","' is not a subtype of the type variable bound '","' of type variable 'T' in 'querySelectorAll'.")
1419 | r=new W.cu(n.querySelectorAll("meta"),[o])
1420 | o=new H.av(r,r.gi(r),[o])
1421 | while(!0){if(!o.l()){q=null
1422 | break}p=o.d.getAttribute("lang")
1423 | if(p!=null){q=p
1424 | break}}if(q==null)o=null
1425 | else o=H.h0(q,"zh",0)
1426 | if(o===!0){s=!0
1427 | u=1
1428 | break}s=!1
1429 | u=1
1430 | break
1431 | case 1:return P.cV(s,t)}})
1432 | return P.cW($async$dR,t)},
1433 | K:function(){var u=0,t=P.d_(null),s,r=[],q,p,o,n,m,l,k,j,i,h,g,f,e,d,c
1434 | var $async$K=P.d3(function(a,a0){if(a===1)return P.cU(a0,t)
1435 | while(true)switch(u){case 0:e=document
1436 | d=H.h(e.querySelector("#json"),"$iM").value
1437 | c=H.h(e.querySelector("#result"),"$iM")
1438 | try{O.eK(d)}catch(b){if(!!J.q(H.P(b)).$idG){if(H.B($.df))c.value="\u4e0d\u662f\u4e00\u4e2a\u6b63\u786e\u7684json"
1439 | else c.value="Not JSON"
1440 | u=1
1441 | break}else throw b}p=$.dZ
1442 | if(p==null||p===""||C.b.aA(p)==="")p="Entity"
1443 | o=d
1444 | n=$.bo
1445 | m=H.O([],[X.I])
1446 | l=new X.bE(o,p,n,m)
1447 | o=l.a=X.eF(o)
1448 | $.bm=l
1449 | k=p==null?"Entity":p
1450 | j=n===C.e?new X.aC(o,k):new X.I(o,k)
1451 | if(!J.q(C.d.R(0,j.a)).$ir){C.a.j(m,j)
1452 | l.S(j)}else{C.a.j(m,j.aG())
1453 | l.S(j)}i=$.bm.aF()
1454 | $.aH.textContent=i
1455 | o=$.bm
1456 | h=o.aw()
1457 | g=X.dV(o.b)+".dart"
1458 | $.dY=g
1459 | f=(H.B($.df)?"\u5e94\u8be5\u4f7f\u7528\u7684\u6587\u4ef6\u540d\u4e3a:":"your dart file name is:")+" "+g
1460 | e.querySelector("#file_name").textContent=f
1461 | $.d7.value=h
1462 | case 1:return P.cV(s,t)}})
1463 | return P.cW($async$K,t)},
1464 | eK:function(a){return P.ew(C.d.R(0,a),null," ")},
1465 | aD:function aD(a){this.b=a},
1466 | dh:function dh(a,b){this.a=a
1467 | this.b=b},
1468 | di:function di(a,b){this.a=a
1469 | this.b=b},
1470 | dj:function dj(a){this.a=a},
1471 | dy:function dy(a,b){this.a=a
1472 | this.b=b},
1473 | dz:function dz(a){this.a=a},
1474 | dp:function dp(a){this.a=a},
1475 | dq:function dq(a){this.a=a},
1476 | dx:function dx(a,b){this.a=a
1477 | this.b=b},
1478 | dr:function dr(a){this.a=a},
1479 | ds:function ds(a,b){this.a=a
1480 | this.b=b},
1481 | dt:function dt(a){this.a=a},
1482 | du:function du(a){this.a=a},
1483 | dv:function dv(a){this.a=a},
1484 | dw:function dw(a){this.a=a},
1485 | dk:function dk(a){this.a=a},
1486 | dl:function dl(a){this.a=a},
1487 | dm:function dm(){},
1488 | dn:function dn(){}},S={bu:function bu(){}},F={
1489 | eR:function(){O.dg()}}
1490 | var w=[C,H,J,P,W,X,O,S,F]
1491 | hunkHelpers.setFunctionNamesIfNecessary(w)
1492 | var $={}
1493 | H.dL.prototype={}
1494 | J.C.prototype={
1495 | K:function(a,b){return a===b},
1496 | gt:function(a){return H.ay(a)},
1497 | h:function(a){return"Instance of '"+H.az(a)+"'"}}
1498 | J.bJ.prototype={
1499 | h:function(a){return String(a)},
1500 | gt:function(a){return a?519018:218159},
1501 | $ia6:1}
1502 | J.bL.prototype={
1503 | K:function(a,b){return null==b},
1504 | h:function(a){return"null"},
1505 | gt:function(a){return 0},
1506 | $ij:1}
1507 | J.aT.prototype={
1508 | gt:function(a){return 0},
1509 | h:function(a){return String(a)}}
1510 | J.bZ.prototype={}
1511 | J.aB.prototype={}
1512 | J.a2.prototype={
1513 | h:function(a){var u=a[$.eV()]
1514 | if(u==null)return this.aM(a)
1515 | return"JavaScript function for "+H.i(J.aN(u))},
1516 | $S:function(){return{func:1,opt:[,,,,,,,,,,,,,,,,]}},
1517 | $idI:1}
1518 | J.a1.prototype={
1519 | j:function(a,b){H.o(b,H.k(a,0))
1520 | if(!!a.fixed$length)H.ak(P.dP("add"))
1521 | a.push(b)},
1522 | n:function(a,b){var u,t
1523 | H.d(b,{func:1,ret:-1,args:[H.k(a,0)]})
1524 | u=a.length
1525 | for(t=0;t=a.length)return-1
1529 | for(u=0;u=a.length||b<0)throw H.f(H.a7(a,b))
1539 | return a[b]},
1540 | C:function(a,b,c){H.o(c,H.k(a,0))
1541 | if(!!a.immutable$list)H.ak(P.dP("indexed set"))
1542 | if(b>=a.length||!1)throw H.f(H.a7(a,b))
1543 | a[b]=c},
1544 | $iE:1,
1545 | $ir:1}
1546 | J.dK.prototype={}
1547 | J.aO.prototype={
1548 | gm:function(){return this.d},
1549 | l:function(){var u,t=this,s=t.a,r=s.length
1550 | if(t.b!==r)throw H.f(H.h2(s))
1551 | u=t.c
1552 | if(u>=r){t.sai(null)
1553 | return!1}t.sai(s[u]);++t.c
1554 | return!0},
1555 | sai:function(a){this.d=H.o(a,H.k(this,0))}}
1556 | J.aS.prototype={
1557 | h:function(a){if(a===0&&1/a<0)return"-0.0"
1558 | else return""+a},
1559 | gt:function(a){var u,t,s,r,q=a|0
1560 | if(a===q)return 536870911&q
1561 | u=Math.abs(a)
1562 | t=Math.log(u)/0.6931471805599453|0
1563 | s=Math.pow(2,t)
1564 | r=u<1?u/s:s/u
1565 | return 536870911&((r*9007199254740992|0)+(r*3542243181176521|0))*599197+t*1259},
1566 | ao:function(a,b){var u
1567 | if(a>0)u=this.aT(a,b)
1568 | else{u=b>31?31:b
1569 | u=a>>u>>>0}return u},
1570 | aT:function(a,b){return b>31?0:a>>>b},
1571 | $ibi:1,
1572 | $iaJ:1}
1573 | J.aR.prototype={$iJ:1}
1574 | J.bK.prototype={}
1575 | J.ad.prototype={
1576 | P:function(a,b){if(b<0)throw H.f(H.a7(a,b))
1577 | if(b>=a.length)H.ak(H.a7(a,b))
1578 | return a.charCodeAt(b)},
1579 | M:function(a,b){if(b>=a.length)throw H.f(H.a7(a,b))
1580 | return a.charCodeAt(b)},
1581 | B:function(a,b){if(typeof b!=="string")throw H.f(P.eb(b,null,null))
1582 | return a+b},
1583 | D:function(a,b,c){if(c==null)c=a.length
1584 | if(b<0)throw H.f(P.c0(b,null))
1585 | if(b>c)throw H.f(P.c0(b,null))
1586 | if(c>a.length)throw H.f(P.c0(c,null))
1587 | return a.substring(b,c)},
1588 | V:function(a,b){return this.D(a,b,null)},
1589 | aA:function(a){var u,t,s,r=a.trim(),q=r.length
1590 | if(q===0)return r
1591 | if(this.M(r,0)===133){u=J.fh(r,1)
1592 | if(u===q)return""}else u=0
1593 | t=q-1
1594 | s=this.P(r,t)===133?J.fi(r,t):q
1595 | if(u===0&&s===q)return r
1596 | return r.substring(u,s)},
1597 | h:function(a){return a},
1598 | gt:function(a){var u,t,s
1599 | for(u=a.length,t=0,s=0;s>6}t=536870911&t+((67108863&t)<<3)
1602 | t^=t>>11
1603 | return 536870911&t+((16383&t)<<15)},
1604 | gi:function(a){return a.length},
1605 | k:function(a,b){if(b>=a.length||!1)throw H.f(H.a7(a,b))
1606 | return a[b]},
1607 | $ien:1,
1608 | $ie:1}
1609 | H.bz.prototype={}
1610 | H.au.prototype={
1611 | gq:function(a){var u=this
1612 | return new H.av(u,u.gi(u),[H.eO(u,"au",0)])},
1613 | gp:function(a){return this.gi(this)===0}}
1614 | H.av.prototype={
1615 | gm:function(){return this.d},
1616 | l:function(){var u,t=this,s=t.a,r=J.N(s),q=r.gi(s)
1617 | if(t.b!==q)throw H.f(P.ap(s))
1618 | u=t.c
1619 | if(u>=q){t.sae(null)
1620 | return!1}t.sae(r.G(s,u));++t.c
1621 | return!0},
1622 | sae:function(a){this.d=H.o(a,H.k(this,0))}}
1623 | H.cd.prototype={
1624 | u:function(a){var u,t,s=this,r=new RegExp(s.a).exec(a)
1625 | if(r==null)return
1626 | u=Object.create(null)
1627 | t=s.b
1628 | if(t!==-1)u.arguments=r[t+1]
1629 | t=s.c
1630 | if(t!==-1)u.argumentsExpr=r[t+1]
1631 | t=s.d
1632 | if(t!==-1)u.expr=r[t+1]
1633 | t=s.e
1634 | if(t!==-1)u.method=r[t+1]
1635 | t=s.f
1636 | if(t!==-1)u.receiver=r[t+1]
1637 | return u}}
1638 | H.bY.prototype={
1639 | h:function(a){var u=this.b
1640 | if(u==null)return"NoSuchMethodError: "+H.i(this.a)
1641 | return"NoSuchMethodError: method not found: '"+u+"' on null"}}
1642 | H.bO.prototype={
1643 | h:function(a){var u,t=this,s="NoSuchMethodError: method not found: '",r=t.b
1644 | if(r==null)return"NoSuchMethodError: "+H.i(t.a)
1645 | u=t.c
1646 | if(u==null)return s+r+"' ("+H.i(t.a)+")"
1647 | return s+r+"' on '"+u+"' ("+H.i(t.a)+")"}}
1648 | H.cg.prototype={
1649 | h:function(a){var u=this.a
1650 | return u.length===0?"Error":"Error: "+u}}
1651 | H.ar.prototype={}
1652 | H.dB.prototype={
1653 | $1:function(a){if(!!J.q(a).$iab)if(a.$thrownJsError==null)a.$thrownJsError=this.a
1654 | return a},
1655 | $S:4}
1656 | H.bc.prototype={
1657 | h:function(a){var u,t=this.b
1658 | if(t!=null)return t
1659 | t=this.a
1660 | u=t!==null&&typeof t==="object"?t.stack:null
1661 | return this.b=u==null?"":u},
1662 | $iu:1}
1663 | H.ao.prototype={
1664 | h:function(a){return"Closure '"+H.az(this).trim()+"'"},
1665 | $idI:1,
1666 | gbf:function(){return this},
1667 | $C:"$1",
1668 | $R:1,
1669 | $D:null}
1670 | H.cb.prototype={}
1671 | H.c4.prototype={
1672 | h:function(a){var u=this.$static_name
1673 | if(u==null)return"Closure of unknown static method"
1674 | return"Closure '"+H.aL(u)+"'"}}
1675 | H.am.prototype={
1676 | K:function(a,b){var u=this
1677 | if(b==null)return!1
1678 | if(u===b)return!0
1679 | if(!(b instanceof H.am))return!1
1680 | return u.a===b.a&&u.b===b.b&&u.c===b.c},
1681 | gt:function(a){var u,t=this.c
1682 | if(t==null)u=H.ay(this.a)
1683 | else u=typeof t!=="object"?J.dC(t):H.ay(t)
1684 | return(u^H.ay(this.b))>>>0},
1685 | h:function(a){var u=this.c
1686 | if(u==null)u=this.a
1687 | return"Closure '"+H.i(this.d)+"' of "+("Instance of '"+H.az(u)+"'")}}
1688 | H.b2.prototype={
1689 | h:function(a){return this.a}}
1690 | H.c1.prototype={
1691 | h:function(a){return"RuntimeError: "+this.a}}
1692 | H.cj.prototype={
1693 | h:function(a){return"Assertion failed: "+P.aQ(this.a)}}
1694 | H.bN.prototype={
1695 | gi:function(a){return this.a},
1696 | gp:function(a){return this.a===0},
1697 | gv:function(a){return new H.aV(this,[H.k(this,0)])},
1698 | k:function(a,b){var u,t,s,r,q=this
1699 | if(typeof b==="string"){u=q.b
1700 | if(u==null)return
1701 | t=q.a0(u,b)
1702 | s=t==null?null:t.b
1703 | return s}else if(typeof b==="number"&&(b&0x3ffffff)===b){r=q.c
1704 | if(r==null)return
1705 | t=q.a0(r,b)
1706 | s=t==null?null:t.b
1707 | return s}else return q.b6(b)},
1708 | b6:function(a){var u,t,s=this.d
1709 | if(s==null)return
1710 | u=this.ak(s,J.dC(a)&0x3ffffff)
1711 | t=this.au(u,a)
1712 | if(t<0)return
1713 | return u[t].b},
1714 | C:function(a,b,c){var u,t,s,r,q,p,o=this
1715 | H.o(b,H.k(o,0))
1716 | H.o(c,H.k(o,1))
1717 | if(typeof b==="string"){u=o.b
1718 | o.ag(u==null?o.b=o.a1():u,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){t=o.c
1719 | o.ag(t==null?o.c=o.a1():t,b,c)}else{s=o.d
1720 | if(s==null)s=o.d=o.a1()
1721 | r=J.dC(b)&0x3ffffff
1722 | q=o.ak(s,r)
1723 | if(q==null)o.a4(s,r,[o.a2(b,c)])
1724 | else{p=o.au(q,b)
1725 | if(p>=0)q[p].b=c
1726 | else q.push(o.a2(b,c))}}},
1727 | n:function(a,b){var u,t,s=this
1728 | H.d(b,{func:1,ret:-1,args:[H.k(s,0),H.k(s,1)]})
1729 | u=s.e
1730 | t=s.r
1731 | for(;u!=null;){b.$2(u.a,u.b)
1732 | if(t!==s.r)throw H.f(P.ap(s))
1733 | u=u.c}},
1734 | ag:function(a,b,c){var u,t=this
1735 | H.o(b,H.k(t,0))
1736 | H.o(c,H.k(t,1))
1737 | u=t.a0(a,b)
1738 | if(u==null)t.a4(a,b,t.a2(b,c))
1739 | else u.b=c},
1740 | a2:function(a,b){var u=this,t=new H.bT(H.o(a,H.k(u,0)),H.o(b,H.k(u,1)))
1741 | if(u.e==null)u.e=u.f=t
1742 | else u.f=u.f.c=t;++u.a
1743 | u.r=u.r+1&67108863
1744 | return t},
1745 | au:function(a,b){var u,t
1746 | if(a==null)return-1
1747 | u=a.length
1748 | for(t=0;t=u.length)return H.n(u,a)
1806 | return u[a]},
1807 | k:function(a,b){var u=this.b
1808 | if(b>=u.length)return H.n(u,b)
1809 | return u[b]},
1810 | $ia3:1,
1811 | $ib_:1}
1812 | H.ci.prototype={
1813 | gq:function(a){return new H.b3(this.a,this.b,this.c)},
1814 | $aE:function(){return[P.b_]}}
1815 | H.b3.prototype={
1816 | gm:function(){return this.d},
1817 | l:function(){var u,t,s,r,q=this,p=q.b
1818 | if(p==null)return!1
1819 | u=q.c
1820 | if(u<=p.length){t=q.a
1821 | s=t.aQ(p,u)
1822 | if(s!=null){q.d=s
1823 | r=s.gb2()
1824 | if(s.b.index===r){if(t.b.unicode){p=q.c
1825 | u=p+1
1826 | t=q.b
1827 | if(u=55296&&p<=56319){p=C.b.P(t,u)
1829 | p=p>=56320&&p<=57343}else p=!1}else p=!1}else p=!1
1830 | r=(p?r+1:r)+1}q.c=r
1831 | return!0}}q.b=q.d=null
1832 | return!1}}
1833 | P.cn.prototype={
1834 | $1:function(a){var u=this.a,t=u.a
1835 | u.a=null
1836 | t.$0()},
1837 | $S:8}
1838 | P.cm.prototype={
1839 | $1:function(a){var u,t
1840 | this.a.a=H.d(a,{func:1,ret:-1})
1841 | u=this.b
1842 | t=this.c
1843 | u.firstChild?u.removeChild(t):u.appendChild(t)},
1844 | $S:11}
1845 | P.co.prototype={
1846 | $0:function(){this.a.$0()},
1847 | $S:0}
1848 | P.cp.prototype={
1849 | $0:function(){this.a.$0()},
1850 | $S:0}
1851 | P.cR.prototype={
1852 | aN:function(a,b){if(self.setTimeout!=null)self.setTimeout(H.bh(new P.cS(this,b),0),a)
1853 | else throw H.f(P.dP("`setTimeout()` not found."))}}
1854 | P.cS.prototype={
1855 | $0:function(){this.b.$0()},
1856 | $S:1}
1857 | P.b4.prototype={
1858 | E:function(a,b){var u,t=this
1859 | H.bl(b,{futureOr:1,type:H.k(t,0)})
1860 | if(t.b)t.a.E(0,b)
1861 | else if(H.Z(b,"$iz",t.$ti,"$az")){u=t.a
1862 | b.T(u.gaX(u),u.gaZ(),-1)}else P.e3(new P.cl(t,b))},
1863 | F:function(a,b){if(this.b)this.a.F(a,b)
1864 | else P.e3(new P.ck(this,a,b))},
1865 | $idF:1}
1866 | P.cl.prototype={
1867 | $0:function(){this.a.a.E(0,this.b)},
1868 | $S:0}
1869 | P.ck.prototype={
1870 | $0:function(){this.a.a.F(this.b,this.c)},
1871 | $S:0}
1872 | P.cX.prototype={
1873 | $1:function(a){return this.a.$2(0,a)},
1874 | $S:12}
1875 | P.cY.prototype={
1876 | $2:function(a,b){this.a.$2(1,new H.ar(a,H.h(b,"$iu")))},
1877 | $S:13}
1878 | P.d4.prototype={
1879 | $2:function(a,b){this.a(H.H(a),b)},
1880 | $S:14}
1881 | P.z.prototype={}
1882 | P.b6.prototype={
1883 | F:function(a,b){var u
1884 | H.h(b,"$iu")
1885 | if(a==null)a=new P.ax()
1886 | u=this.a
1887 | if(u.a!==0)throw H.f(P.er("Future already completed"))
1888 | $.p.toString
1889 | u.Y(a,b)},
1890 | b_:function(a){return this.F(a,null)},
1891 | $idF:1}
1892 | P.be.prototype={
1893 | E:function(a,b){var u
1894 | H.bl(b,{futureOr:1,type:H.k(this,0)})
1895 | u=this.a
1896 | if(u.a!==0)throw H.f(P.er("Future already completed"))
1897 | u.X(b)},
1898 | aY:function(a){return this.E(a,null)}}
1899 | P.V.prototype={
1900 | ba:function(a){if(this.c!==6)return!0
1901 | return this.b.b.ab(H.d(this.d,{func:1,ret:P.a6,args:[P.l]}),a.a,P.a6,P.l)},
1902 | b3:function(a){var u=this.e,t=P.l,s={futureOr:1,type:H.k(this,1)},r=this.b.b
1903 | if(H.bk(u,{func:1,args:[P.l,P.u]}))return H.bl(r.bb(u,a.a,a.b,null,t,P.u),s)
1904 | else return H.bl(r.ab(H.d(u,{func:1,args:[P.l]}),a.a,null,t),s)}}
1905 | P.A.prototype={
1906 | T:function(a,b,c){var u,t=H.k(this,0)
1907 | H.d(a,{func:1,ret:{futureOr:1,type:c},args:[t]})
1908 | u=$.p
1909 | if(u!==C.c){u.toString
1910 | H.d(a,{func:1,ret:{futureOr:1,type:c},args:[t]})
1911 | if(b!=null)b=P.fA(b,u)}return this.a5(a,b,c)},
1912 | be:function(a,b){return this.T(a,null,b)},
1913 | a5:function(a,b,c){var u,t,s=H.k(this,0)
1914 | H.d(a,{func:1,ret:{futureOr:1,type:c},args:[s]})
1915 | u=new P.A($.p,[c])
1916 | t=b==null?1:3
1917 | this.ah(new P.V(u,t,a,b,[s,c]))
1918 | return u},
1919 | ah:function(a){var u,t=this,s=t.a
1920 | if(s<=1){a.a=H.h(t.c,"$iV")
1921 | t.c=a}else{if(s===2){u=H.h(t.c,"$iA")
1922 | s=u.a
1923 | if(s<4){u.ah(a)
1924 | return}t.a=s
1925 | t.c=u.c}s=t.b
1926 | s.toString
1927 | P.d2(null,null,s,H.d(new P.cv(t,a),{func:1,ret:-1}))}},
1928 | an:function(a){var u,t,s,r,q,p=this,o={}
1929 | o.a=a
1930 | if(a==null)return
1931 | u=p.a
1932 | if(u<=1){t=H.h(p.c,"$iV")
1933 | s=p.c=a
1934 | if(t!=null){for(;r=s.a,r!=null;s=r);s.a=t}}else{if(u===2){q=H.h(p.c,"$iA")
1935 | u=q.a
1936 | if(u<4){q.an(a)
1937 | return}p.a=u
1938 | p.c=q.c}o.a=p.O(a)
1939 | u=p.b
1940 | u.toString
1941 | P.d2(null,null,u,H.d(new P.cz(o,p),{func:1,ret:-1}))}},
1942 | a3:function(){var u=H.h(this.c,"$iV")
1943 | this.c=null
1944 | return this.O(u)},
1945 | O:function(a){var u,t,s
1946 | for(u=a,t=null;u!=null;t=u,u=s){s=u.a
1947 | u.a=t}return t},
1948 | X:function(a){var u,t,s=this,r=H.k(s,0)
1949 | H.bl(a,{futureOr:1,type:r})
1950 | u=s.$ti
1951 | if(H.Z(a,"$iz",u,"$az"))if(H.Z(a,"$iA",u,null))P.ev(a,s)
1952 | else P.fr(a,s)
1953 | else{t=s.a3()
1954 | H.o(a,r)
1955 | s.a=4
1956 | s.c=a
1957 | P.aE(s,t)}},
1958 | Y:function(a,b){var u,t=this
1959 | H.h(b,"$iu")
1960 | u=t.a3()
1961 | t.a=8
1962 | t.c=new P.y(a,b)
1963 | P.aE(t,u)},
1964 | $iz:1}
1965 | P.cv.prototype={
1966 | $0:function(){P.aE(this.a,this.b)},
1967 | $S:0}
1968 | P.cz.prototype={
1969 | $0:function(){P.aE(this.b,this.a.a)},
1970 | $S:0}
1971 | P.cw.prototype={
1972 | $1:function(a){var u=this.a
1973 | u.a=0
1974 | u.X(a)},
1975 | $S:8}
1976 | P.cx.prototype={
1977 | $2:function(a,b){H.h(b,"$iu")
1978 | this.a.Y(a,b)},
1979 | $1:function(a){return this.$2(a,null)},
1980 | $S:17}
1981 | P.cy.prototype={
1982 | $0:function(){this.a.Y(this.b,this.c)},
1983 | $S:0}
1984 | P.cC.prototype={
1985 | $0:function(){var u,t,s,r,q,p,o=this,n=null
1986 | try{s=o.c
1987 | n=s.b.b.az(H.d(s.d,{func:1}),null)}catch(r){u=H.P(r)
1988 | t=H.ai(r)
1989 | if(o.d){s=H.h(o.a.a.c,"$iy").a
1990 | q=u
1991 | q=s==null?q==null:s===q
1992 | s=q}else s=!1
1993 | q=o.b
1994 | if(s)q.b=H.h(o.a.a.c,"$iy")
1995 | else q.b=new P.y(u,t)
1996 | q.a=!0
1997 | return}if(!!J.q(n).$iz){if(n instanceof P.A&&n.a>=4){if(n.a===8){s=o.b
1998 | s.b=H.h(n.c,"$iy")
1999 | s.a=!0}return}p=o.a.a
2000 | s=o.b
2001 | s.b=n.be(new P.cD(p),null)
2002 | s.a=!1}},
2003 | $S:1}
2004 | P.cD.prototype={
2005 | $1:function(a){return this.a},
2006 | $S:18}
2007 | P.cB.prototype={
2008 | $0:function(){var u,t,s,r,q,p,o,n=this
2009 | try{s=n.b
2010 | r=H.k(s,0)
2011 | q=H.o(n.c,r)
2012 | p=H.k(s,1)
2013 | n.a.b=s.b.b.ab(H.d(s.d,{func:1,ret:{futureOr:1,type:p},args:[r]}),q,{futureOr:1,type:p},r)}catch(o){u=H.P(o)
2014 | t=H.ai(o)
2015 | s=n.a
2016 | s.b=new P.y(u,t)
2017 | s.a=!0}},
2018 | $S:1}
2019 | P.cA.prototype={
2020 | $0:function(){var u,t,s,r,q,p,o,n,m=this
2021 | try{u=H.h(m.a.a.c,"$iy")
2022 | r=m.c
2023 | if(H.B(r.ba(u))&&r.e!=null){q=m.b
2024 | q.b=r.b3(u)
2025 | q.a=!1}}catch(p){t=H.P(p)
2026 | s=H.ai(p)
2027 | r=H.h(m.a.a.c,"$iy")
2028 | q=r.a
2029 | o=t
2030 | n=m.b
2031 | if(q==null?o==null:q===o)n.b=r
2032 | else n.b=new P.y(t,s)
2033 | n.a=!0}},
2034 | $S:1}
2035 | P.b5.prototype={}
2036 | P.aA.prototype={
2037 | gi:function(a){var u,t,s=this,r={},q=new P.A($.p,[P.J])
2038 | r.a=0
2039 | u=H.k(s,0)
2040 | t=H.d(new P.c9(r,s),{func:1,ret:-1,args:[u]})
2041 | H.d(new P.ca(r,q),{func:1,ret:-1})
2042 | W.x(s.a,s.b,t,!1,u)
2043 | return q}}
2044 | P.c9.prototype={
2045 | $1:function(a){H.o(a,H.k(this.b,0));++this.a.a},
2046 | $S:function(){return{func:1,ret:P.j,args:[H.k(this.b,0)]}}}
2047 | P.ca.prototype={
2048 | $0:function(){this.b.X(this.a.a)},
2049 | $S:0}
2050 | P.c7.prototype={}
2051 | P.c8.prototype={}
2052 | P.cQ.prototype={}
2053 | P.y.prototype={
2054 | h:function(a){return H.i(this.a)},
2055 | $iab:1}
2056 | P.cT.prototype={$ihj:1}
2057 | P.d1.prototype={
2058 | $0:function(){var u,t=this.a,s=t.a
2059 | t=s==null?t.a=new P.ax():s
2060 | s=this.b
2061 | if(s==null)throw H.f(t)
2062 | u=H.f(t)
2063 | u.stack=s.h(0)
2064 | throw u},
2065 | $S:0}
2066 | P.cM.prototype={
2067 | bc:function(a){var u,t,s,r=null
2068 | H.d(a,{func:1,ret:-1})
2069 | try{if(C.c===$.p){a.$0()
2070 | return}P.ez(r,r,this,a,-1)}catch(s){u=H.P(s)
2071 | t=H.ai(s)
2072 | P.d0(r,r,this,u,H.h(t,"$iu"))}},
2073 | bd:function(a,b,c){var u,t,s,r=null
2074 | H.d(a,{func:1,ret:-1,args:[c]})
2075 | H.o(b,c)
2076 | try{if(C.c===$.p){a.$1(b)
2077 | return}P.eA(r,r,this,a,b,-1,c)}catch(s){u=H.P(s)
2078 | t=H.ai(s)
2079 | P.d0(r,r,this,u,H.h(t,"$iu"))}},
2080 | aU:function(a,b){return new P.cO(this,H.d(a,{func:1,ret:b}),b)},
2081 | aq:function(a){return new P.cN(this,H.d(a,{func:1,ret:-1}))},
2082 | aV:function(a,b){return new P.cP(this,H.d(a,{func:1,ret:-1,args:[b]}),b)},
2083 | k:function(a,b){return},
2084 | az:function(a,b){H.d(a,{func:1,ret:b})
2085 | if($.p===C.c)return a.$0()
2086 | return P.ez(null,null,this,a,b)},
2087 | ab:function(a,b,c,d){H.d(a,{func:1,ret:c,args:[d]})
2088 | H.o(b,d)
2089 | if($.p===C.c)return a.$1(b)
2090 | return P.eA(null,null,this,a,b,c,d)},
2091 | bb:function(a,b,c,d,e,f){H.d(a,{func:1,ret:d,args:[e,f]})
2092 | H.o(b,e)
2093 | H.o(c,f)
2094 | if($.p===C.c)return a.$2(b,c)
2095 | return P.fB(null,null,this,a,b,c,d,e,f)},
2096 | ay:function(a,b,c,d){return H.d(a,{func:1,ret:b,args:[c,d]})}}
2097 | P.cO.prototype={
2098 | $0:function(){return this.a.az(this.b,this.c)},
2099 | $S:function(){return{func:1,ret:this.c}}}
2100 | P.cN.prototype={
2101 | $0:function(){return this.a.bc(this.b)},
2102 | $S:1}
2103 | P.cP.prototype={
2104 | $1:function(a){var u=this.c
2105 | return this.a.bd(this.b,H.o(a,u),u)},
2106 | $S:function(){return{func:1,ret:-1,args:[this.c]}}}
2107 | P.bI.prototype={}
2108 | P.bV.prototype={$iE:1,$ir:1}
2109 | P.ae.prototype={
2110 | gq:function(a){return new H.av(a,this.gi(a),[H.da(this,a,"ae",0)])},
2111 | G:function(a,b){return this.k(a,b)},
2112 | gp:function(a){return this.gi(a)===0},
2113 | gav:function(a){return this.gi(a)!==0},
2114 | h:function(a){return P.ef(a,"[","]")}}
2115 | P.bW.prototype={}
2116 | P.bX.prototype={
2117 | $2:function(a,b){var u,t=this.a
2118 | if(!t.a)this.b.a+=", "
2119 | t.a=!1
2120 | t=this.b
2121 | u=t.a+=H.i(a)
2122 | t.a=u+": "
2123 | t.a+=H.i(b)},
2124 | $S:5}
2125 | P.Y.prototype={
2126 | n:function(a,b){var u,t,s=this
2127 | H.d(b,{func:1,ret:-1,args:[H.da(s,a,"Y",0),H.da(s,a,"Y",1)]})
2128 | for(u=J.e9(s.gv(a));u.l();){t=u.gm()
2129 | b.$2(t,s.k(a,t))}},
2130 | gi:function(a){return J.bp(this.gv(a))},
2131 | gp:function(a){return J.f7(this.gv(a))},
2132 | h:function(a){return P.el(a)},
2133 | $iv:1}
2134 | P.b9.prototype={}
2135 | P.cE.prototype={
2136 | k:function(a,b){var u,t=this.b
2137 | if(t==null)return this.c.k(0,b)
2138 | else if(typeof b!=="string")return
2139 | else{u=t[b]
2140 | return typeof u=="undefined"?this.aS(b):u}},
2141 | gi:function(a){return this.b==null?this.c.a:this.N().length},
2142 | gp:function(a){return this.gi(this)===0},
2143 | gv:function(a){var u
2144 | if(this.b==null){u=this.c
2145 | return new H.aV(u,[H.k(u,0)])}return new P.cF(this)},
2146 | n:function(a,b){var u,t,s,r,q=this
2147 | H.d(b,{func:1,ret:-1,args:[P.e,,]})
2148 | if(q.b==null)return q.c.n(0,b)
2149 | u=q.N()
2150 | for(t=0;t=u.length)return H.n(u,b)
2171 | u=u[b]}return u},
2172 | gq:function(a){var u=this.a
2173 | if(u.b==null){u=u.gv(u)
2174 | u=u.gq(u)}else{u=u.N()
2175 | u=new J.aO(u,u.length,[H.k(u,0)])}return u},
2176 | $aau:function(){return[P.e]},
2177 | $aE:function(){return[P.e]}}
2178 | P.aP.prototype={}
2179 | P.aq.prototype={}
2180 | P.aU.prototype={
2181 | h:function(a){var u=P.aQ(this.a)
2182 | return(this.b!=null?"Converting object to an encodable object failed:":"Converting object did not return an encodable object:")+" "+u}}
2183 | P.bQ.prototype={
2184 | h:function(a){return"Cyclic error in JSON stringify"}}
2185 | P.bP.prototype={
2186 | R:function(a,b){var u=P.fz(b,this.gb0().a)
2187 | return u},
2188 | H:function(a){var u=this.gb1()
2189 | u=P.ew(a,u.b,u.a)
2190 | return u},
2191 | gb1:function(){return C.z},
2192 | gb0:function(){return C.y},
2193 | $aaP:function(){return[P.l,P.e]}}
2194 | P.bS.prototype={
2195 | $aaq:function(){return[P.l,P.e]}}
2196 | P.bR.prototype={
2197 | $aaq:function(){return[P.e,P.l]}}
2198 | P.cJ.prototype={
2199 | ad:function(a){var u,t,s,r,q,p,o,n=a.length
2200 | for(u=J.d8(a),t=this.c,s=0,r=0;r92)continue
2202 | if(q<32){if(r>s)t.a+=C.b.D(a,s,r)
2203 | s=r+1
2204 | p=t.a+=H.F(92)
2205 | switch(q){case 8:t.a=p+H.F(98)
2206 | break
2207 | case 9:t.a=p+H.F(116)
2208 | break
2209 | case 10:t.a=p+H.F(110)
2210 | break
2211 | case 12:t.a=p+H.F(102)
2212 | break
2213 | case 13:t.a=p+H.F(114)
2214 | break
2215 | default:p+=H.F(117)
2216 | t.a=p
2217 | p+=H.F(48)
2218 | t.a=p
2219 | p+=H.F(48)
2220 | t.a=p
2221 | o=q>>>4&15
2222 | p+=H.F(o<10?48+o:87+o)
2223 | t.a=p
2224 | o=q&15
2225 | t.a=p+H.F(o<10?48+o:87+o)
2226 | break}}else if(q===34||q===92){if(r>s)t.a+=C.b.D(a,s,r)
2227 | s=r+1
2228 | p=t.a+=H.F(92)
2229 | t.a=p+H.F(q)}}if(s===0)t.a+=H.i(a)
2230 | else if(s=s.length)return H.n(s,-1)
2241 | s.pop()}catch(r){t=H.P(r)
2242 | s=P.ej(a,t,q.gam())
2243 | throw H.f(s)}},
2244 | aB:function(a){var u,t,s=this
2245 | if(typeof a==="number"){if(!isFinite(a))return!1
2246 | s.c.a+=C.w.h(a)
2247 | return!0}else if(a===!0){s.c.a+="true"
2248 | return!0}else if(a===!1){s.c.a+="false"
2249 | return!0}else if(a==null){s.c.a+="null"
2250 | return!0}else if(typeof a==="string"){u=s.c
2251 | u.a+='"'
2252 | s.ad(a)
2253 | u.a+='"'
2254 | return!0}else{u=J.q(a)
2255 | if(!!u.$ir){s.W(a)
2256 | s.aC(a)
2257 | u=s.a
2258 | if(0>=u.length)return H.n(u,-1)
2259 | u.pop()
2260 | return!0}else if(!!u.$iv){s.W(a)
2261 | t=s.aD(a)
2262 | u=s.a
2263 | if(0>=u.length)return H.n(u,-1)
2264 | u.pop()
2265 | return t}else return!1}},
2266 | aC:function(a){var u,t,s=this.c
2267 | s.a+="["
2268 | u=J.N(a)
2269 | if(u.gav(a)){this.A(u.k(a,0))
2270 | for(t=1;t=u)return H.n(t,q)
2290 | p.A(t[q])}n.a+="}"
2291 | return!0}}
2292 | P.cK.prototype={
2293 | $2:function(a,b){var u,t
2294 | if(typeof a!=="string")this.a.b=!1
2295 | u=this.b
2296 | t=this.a
2297 | C.a.C(u,t.a++,a)
2298 | C.a.C(u,t.a++,b)},
2299 | $S:5}
2300 | P.cG.prototype={
2301 | aC:function(a){var u,t=this,s=J.N(a),r=s.gp(a),q=t.c,p=q.a
2302 | if(r)q.a=p+"[]"
2303 | else{q.a=p+"[\n"
2304 | t.J(++t.a$)
2305 | t.A(s.k(a,0))
2306 | for(u=1;u=u)return H.n(t,q)
2331 | p.A(t[q])}n.a+="\n"
2332 | p.J(--p.a$)
2333 | n.a+="}"
2334 | return!0}}
2335 | P.cH.prototype={
2336 | $2:function(a,b){var u,t
2337 | if(typeof a!=="string")this.a.b=!1
2338 | u=this.b
2339 | t=this.a
2340 | C.a.C(u,t.a++,a)
2341 | C.a.C(u,t.a++,b)},
2342 | $S:5}
2343 | P.b8.prototype={
2344 | gam:function(){var u=this.c.a
2345 | return u.charCodeAt(0)==0?u:u}}
2346 | P.cI.prototype={
2347 | J:function(a){var u,t,s
2348 | for(u=this.f,t=this.c,s=0;ss)u=": Not in range "+H.i(s)+".."+H.i(t)+", inclusive"
2375 | else u=t78?C.b.D(r,0,75)+"...":r
2408 | return s+"\n"+u}else return s},
2409 | $idG:1}
2410 | P.J.prototype={}
2411 | P.E.prototype={
2412 | gi:function(a){var u,t=this.gq(this)
2413 | for(u=0;t.l();)++u
2414 | return u},
2415 | G:function(a,b){var u,t,s
2416 | P.fm(b,"index")
2417 | for(u=this.gq(this),t=0;u.l();){s=u.gm()
2418 | if(b===t)return s;++t}throw H.f(P.dJ(b,this,"index",null,t))},
2419 | h:function(a){return P.ff(this,"(",")")}}
2420 | P.r.prototype={$iE:1}
2421 | P.j.prototype={
2422 | gt:function(a){return P.l.prototype.gt.call(this,this)},
2423 | h:function(a){return"null"}}
2424 | P.aJ.prototype={}
2425 | P.l.prototype={constructor:P.l,$il:1,
2426 | K:function(a,b){return this===b},
2427 | gt:function(a){return H.ay(this)},
2428 | h:function(a){return"Instance of '"+H.az(this)+"'"},
2429 | toString:function(){return this.h(this)}}
2430 | P.a3.prototype={}
2431 | P.b_.prototype={$ia3:1}
2432 | P.u.prototype={}
2433 | P.e.prototype={$ien:1}
2434 | P.R.prototype={
2435 | gi:function(a){return this.a.length},
2436 | h:function(a){var u=this.a
2437 | return u.charCodeAt(0)==0?u:u},
2438 | $ih8:1}
2439 | W.c.prototype={}
2440 | W.al.prototype={
2441 | h:function(a){return String(a)},
2442 | $ial:1}
2443 | W.bq.prototype={
2444 | h:function(a){return String(a)}}
2445 | W.a9.prototype={$ia9:1}
2446 | W.a_.prototype={
2447 | gi:function(a){return a.length}}
2448 | W.by.prototype={
2449 | h:function(a){return String(a)}}
2450 | W.cu.prototype={
2451 | gi:function(a){return this.a.length},
2452 | k:function(a,b){var u=this.a
2453 | if(b<0||b>=u.length)return H.n(u,b)
2454 | return H.o(u[b],H.k(this,0))}}
2455 | W.aa.prototype={
2456 | h:function(a){return a.localName},
2457 | gax:function(a){return new W.b7(a,"click",!1,[W.t])},
2458 | $iaa:1}
2459 | W.a.prototype={$ia:1}
2460 | W.a0.prototype={
2461 | aO:function(a,b,c,d){return a.addEventListener(b,H.bh(H.d(c,{func:1,args:[W.a]}),1),!1)},
2462 | $ia0:1}
2463 | W.bC.prototype={
2464 | gi:function(a){return a.length}}
2465 | W.X.prototype={$iX:1,$ieo:1}
2466 | W.aw.prototype={$iaw:1}
2467 | W.t.prototype={$it:1}
2468 | W.w.prototype={
2469 | h:function(a){var u=a.nodeValue
2470 | return u==null?this.aL(a):u},
2471 | $iw:1}
2472 | W.aY.prototype={
2473 | gi:function(a){return a.length},
2474 | k:function(a,b){if(b>>>0!==b||b>=a.length)throw H.f(P.dJ(b,a,null,null,null))
2475 | return a[b]},
2476 | G:function(a,b){if(b<0||b>=a.length)return H.n(a,b)
2477 | return a[b]},
2478 | $idM:1,
2479 | $adM:function(){return[W.w]},
2480 | $aae:function(){return[W.w]},
2481 | $iE:1,
2482 | $aE:function(){return[W.w]},
2483 | $ir:1,
2484 | $ar:function(){return[W.w]},
2485 | $aas:function(){return[W.w]}}
2486 | W.c2.prototype={
2487 | gi:function(a){return a.length}}
2488 | W.b1.prototype={
2489 | a6:function(a,b){var u=P.e
2490 | H.a5(b,"$iv",[u,u],"$av").n(0,new W.c5(a))},
2491 | k:function(a,b){return a.getItem(H.m(b))},
2492 | n:function(a,b){var u,t
2493 | H.d(b,{func:1,ret:-1,args:[P.e,P.e]})
2494 | for(u=0;!0;++u){t=a.key(u)
2495 | if(t==null)return
2496 | b.$2(t,a.getItem(t))}},
2497 | gv:function(a){var u=H.O([],[P.e])
2498 | this.n(a,new W.c6(u))
2499 | return u},
2500 | gi:function(a){return a.length},
2501 | gp:function(a){return a.key(0)==null},
2502 | $aY:function(){return[P.e,P.e]},
2503 | $iv:1,
2504 | $av:function(){return[P.e,P.e]}}
2505 | W.c5.prototype={
2506 | $2:function(a,b){this.a.setItem(H.m(a),H.m(b))},
2507 | $S:19}
2508 | W.c6.prototype={
2509 | $2:function(a,b){return C.a.j(this.a,a)},
2510 | $S:20}
2511 | W.M.prototype={$iM:1}
2512 | W.U.prototype={}
2513 | W.cq.prototype={}
2514 | W.b7.prototype={}
2515 | W.cr.prototype={}
2516 | W.cs.prototype={
2517 | $1:function(a){return this.a.$1(H.h(a,"$ia"))},
2518 | $S:21}
2519 | W.as.prototype={
2520 | gq:function(a){return new W.bB(a,a.length,[H.da(this,a,"as",0)])}}
2521 | W.bB.prototype={
2522 | l:function(){var u=this,t=u.c+1,s=u.b
2523 | if(t=s.length)return H.n(s,t)
2525 | u.sal(s[t])
2526 | u.c=t
2527 | return!0}u.sal(null)
2528 | u.c=s
2529 | return!1},
2530 | gm:function(){return this.d},
2531 | sal:function(a){this.d=H.o(a,H.k(this,0))}}
2532 | W.ba.prototype={}
2533 | W.bb.prototype={}
2534 | W.bd.prototype={}
2535 | P.b.prototype={
2536 | gax:function(a){return new W.b7(a,"click",!1,[W.t])}}
2537 | X.bE.prototype={
2538 | aw:function(){var u,t=new P.R("")
2539 | this.b4()
2540 | t.a="import 'package:json_annotation/json_annotation.dart'; \n \n part '"+X.dV(this.b)+".g.dart';\n \n \n"
2541 | C.a.n(this.d,new X.bF(t))
2542 | u=t.a
2543 | return u.charCodeAt(0)==0?u:u},
2544 | b4:function(){var u,t,s,r,q=$.aH.value.split("\n")
2545 | for(u=this.d,t=0;t=q.length)return H.n(q,t)
2547 | r=J.ea(q[t]).split(":")
2548 | if(1>=r.length)return H.n(r,1)
2549 | s.b=J.ea(r[1])}},
2550 | S:function(a){C.a.n(a.gas(),new X.bG(this))},
2551 | aF:function(){var u,t,s,r,q
2552 | for(u=this.d,t=u.length,s=0,r="";s srcJson) => _$"+u+t}u=this.b
2732 | return" factory "+u+".fromJson(Map srcJson) => _$"+u+t},
2733 | gas:function(){return new X.ac(this.a).L()},
2734 | aG:function(){var u=this
2735 | if(!!u.$iaW)return u
2736 | return new X.aW(u,u.a,u.b)}}
2737 | X.bw.prototype={
2738 | $1:function(a){H.h(a,"$iL")
2739 | this.b.a+="this."+H.i(H.B($.aI)?this.a.ar(a.gw()):a.gw())+","},
2740 | $S:6}
2741 | X.bx.prototype={
2742 | $1:function(a){var u,t
2743 | H.h(a,"$iL")
2744 | u=this.b
2745 | u.a+="\n"
2746 | if(H.B($.e4))u.a+=" @JsonKey(name: '"+H.i(a.gw())+"')\n"
2747 | t=H.B($.aI)?X.eJ(this.a.ar(a.gw())):a.gw()
2748 | u.a+=" "+a.gac()+" "+H.i(t)+";\n"},
2749 | $S:6}
2750 | X.aW.prototype={
2751 | a8:function(){var u,t=this.b
2752 | t="List<"+t+"> get"+t+"List(List list){\n List<"+t+"> result = [];\n list.forEach((item){\n result.add("+t+".fromJson(item));\n });\n return result;\n }\n"
2753 | u=this.d.a8()
2754 | t+=u
2755 | return t},
2756 | a7:function(){var u=this.d.a7()
2757 | return u},
2758 | aa:function(){var u=this.d.aa()
2759 | return u},
2760 | I:function(a){var u=this.d.I(0)
2761 | return u},
2762 | a9:function(){var u=this.d.a9()
2763 | return u},
2764 | gas:function(){return new X.ac(C.d.H(J.f5(C.d.R(0,this.a),0))).L()}}
2765 | X.aC.prototype={
2766 | at:function(){return""},
2767 | I:function(a){var u=this.aK(0)
2768 | u+"\n"
2769 | u=u+"\n\n"+(" Map toJson() => _$"+this.b+"ToJson(this);")
2770 | return u.charCodeAt(0)==0?u:u}}
2771 | X.ac.prototype={
2772 | aj:function(a){var u
2773 | H.a5(a,"$iv",[P.e,null],"$av")
2774 | u=H.O([],[X.L])
2775 | J.e8(a,new X.bA(u))
2776 | return u},
2777 | L:function(){var u,t,s=C.d.R(0,this.a),r=[P.e,null]
2778 | if(H.Z(s,"$iv",r,"$av"))return this.aj(s)
2779 | else{u=J.q(s)
2780 | if(!!u.$ir){t=u.k(s,0)
2781 | if(H.Z(t,"$iv",r,"$av"))return this.aj(t)}}return H.O([],[X.L])}}
2782 | X.bA.prototype={
2783 | $2:function(a,b){var u=this
2784 | H.m(a)
2785 | if(!!J.q(b).$ir)C.a.j(u.a,new X.at(b,a))
2786 | else if(typeof b==="string")C.a.j(u.a,new X.af("String",a))
2787 | else if(typeof b==="number"&&Math.floor(b)===b)C.a.j(u.a,new X.af("int",a))
2788 | else if(typeof b==="number")C.a.j(u.a,new X.af("double",a))
2789 | else if(typeof b==="boolean")C.a.j(u.a,new X.af("bool",a))
2790 | else if(H.Z(b,"$iv",[P.e,null],"$av"))C.a.j(u.a,new X.aX(b,a))},
2791 | $S:25}
2792 | X.L.prototype={}
2793 | X.af.prototype={
2794 | gac:function(){return this.a},
2795 | gw:function(){return this.b}}
2796 | X.at.prototype={
2797 | gaW:function(){var u=this.a,t=J.N(u),s=t.gp(u)
2798 | if(s)return!1
2799 | u=t.k(u,0)
2800 | if(H.Z(u,"$iv",[P.e,null],"$av"))return!0
2801 | return!1},
2802 | gU:function(){var u,t,s=this.a,r=J.N(s),q=r.gp(s)
2803 | if(q)return"dynamic"
2804 | u=r.k(s,0)
2805 | if(!!J.q(u).$ir)t="List<"+new X.at(u,"").gU()+">"
2806 | else if(H.Z(u,"$iv",[P.e,null],"$av"))t=X.bj(this.b)
2807 | else if(typeof u==="number"&&Math.floor(u)===u)t="int"
2808 | else if(typeof u==="number")t="double"
2809 | else if(typeof u==="string")t="String"
2810 | else t=typeof u==="boolean"?"bool":"dynamic"
2811 | return t},
2812 | gac:function(){return"List<"+this.gU()+">"},
2813 | gw:function(){return this.b}}
2814 | X.aX.prototype={
2815 | gac:function(){return X.bj(this.b)},
2816 | gw:function(){return this.b}};(function aliases(){var u=J.C.prototype
2817 | u.aL=u.h
2818 | u=J.aT.prototype
2819 | u.aM=u.h
2820 | u=X.I.prototype
2821 | u.aK=u.I})();(function installTearOffs(){var u=hunkHelpers._static_1,t=hunkHelpers._static_0,s=hunkHelpers.installInstanceTearOff
2822 | u(H,"ey","fE",26)
2823 | u(P,"fJ","fo",7)
2824 | u(P,"fK","fp",7)
2825 | u(P,"fL","fq",7)
2826 | t(P,"eE","fD",1)
2827 | s(P.b6.prototype,"gaZ",0,1,null,["$2","$1"],["F","b_"],15,0)
2828 | s(P.be.prototype,"gaX",1,0,null,["$1","$0"],["E","aY"],16,0)
2829 | u(P,"eG","fv",4)})();(function inheritance(){var u=hunkHelpers.mixin,t=hunkHelpers.inherit,s=hunkHelpers.inheritMany
2830 | t(P.l,null)
2831 | s(P.l,[H.dL,J.C,J.aO,P.E,H.av,H.cd,P.ab,H.ar,H.ao,H.bc,P.Y,H.bT,H.bU,H.bM,H.cL,H.b3,P.cR,P.b4,P.z,P.b6,P.V,P.A,P.b5,P.aA,P.c7,P.c8,P.cQ,P.y,P.cT,P.b9,P.ae,P.aP,P.cJ,P.cG,P.a6,P.aJ,P.b0,P.ct,P.bD,P.r,P.j,P.a3,P.b_,P.u,P.e,P.R,W.as,W.bB,X.bE,O.aD,S.bu,X.cc,X.ac,X.L])
2832 | s(J.C,[J.bJ,J.bL,J.aT,J.a1,J.aS,J.ad,W.a0,W.by,W.a,W.ba,W.bd])
2833 | s(J.aT,[J.bZ,J.aB,J.a2])
2834 | t(J.dK,J.a1)
2835 | s(J.aS,[J.aR,J.bK])
2836 | s(P.E,[H.bz,P.bI])
2837 | s(H.bz,[H.au,H.aV])
2838 | s(P.ab,[H.bY,H.bO,H.cg,H.b2,H.c1,P.br,P.aU,P.ax,P.W,P.ch,P.cf,P.c3,P.bt,P.bv])
2839 | s(H.ao,[H.dB,H.cb,H.db,H.dc,H.dd,P.cn,P.cm,P.co,P.cp,P.cS,P.cl,P.ck,P.cX,P.cY,P.d4,P.cv,P.cz,P.cw,P.cx,P.cy,P.cC,P.cD,P.cB,P.cA,P.c9,P.ca,P.d1,P.cO,P.cN,P.cP,P.bX,P.cK,P.cH,W.c5,W.c6,W.cs,X.bF,X.bG,X.d5,O.dh,O.di,O.dj,O.dy,O.dz,O.dp,O.dq,O.dx,O.dr,O.ds,O.dt,O.du,O.dv,O.dw,O.dk,O.dl,O.dm,O.dn,X.bw,X.bx,X.bA])
2840 | s(H.cb,[H.c4,H.am])
2841 | t(H.cj,P.br)
2842 | t(P.bW,P.Y)
2843 | s(P.bW,[H.bN,P.cE])
2844 | t(H.ci,P.bI)
2845 | t(P.be,P.b6)
2846 | t(P.cM,P.cT)
2847 | t(P.bV,P.b9)
2848 | t(P.cF,H.au)
2849 | t(P.aq,P.c8)
2850 | t(P.bQ,P.aU)
2851 | t(P.bP,P.aP)
2852 | s(P.aq,[P.bS,P.bR])
2853 | t(P.b8,P.cJ)
2854 | t(P.bf,P.b8)
2855 | t(P.cI,P.bf)
2856 | s(P.aJ,[P.bi,P.J])
2857 | s(P.W,[P.aZ,P.bH])
2858 | t(W.w,W.a0)
2859 | s(W.w,[W.aa,W.a_])
2860 | s(W.aa,[W.c,P.b])
2861 | s(W.c,[W.al,W.bq,W.a9,W.bC,W.X,W.aw,W.c2,W.M])
2862 | t(W.cu,P.bV)
2863 | t(W.U,W.a)
2864 | t(W.t,W.U)
2865 | t(W.bb,W.ba)
2866 | t(W.aY,W.bb)
2867 | t(W.b1,W.bd)
2868 | t(W.cq,P.aA)
2869 | t(W.b7,W.cq)
2870 | t(W.cr,P.c7)
2871 | t(X.I,X.cc)
2872 | s(X.I,[X.aW,X.aC])
2873 | s(X.L,[X.af,X.at,X.aX])
2874 | u(P.b9,P.ae)
2875 | u(P.bf,P.cG)
2876 | u(W.ba,P.ae)
2877 | u(W.bb,W.as)
2878 | u(W.bd,P.Y)})();(function constants(){var u=hunkHelpers.makeConstList
2879 | C.v=J.C.prototype
2880 | C.a=J.a1.prototype
2881 | C.h=J.aR.prototype
2882 | C.w=J.aS.prototype
2883 | C.b=J.ad.prototype
2884 | C.x=J.a2.prototype
2885 | C.n=J.bZ.prototype
2886 | C.i=W.b1.prototype
2887 | C.j=J.aB.prototype
2888 | C.k=function getTagFallback(o) {
2889 | var s = Object.prototype.toString.call(o);
2890 | return s.substring(8, s.length - 1);
2891 | }
2892 | C.o=function() {
2893 | var toStringFunction = Object.prototype.toString;
2894 | function getTag(o) {
2895 | var s = toStringFunction.call(o);
2896 | return s.substring(8, s.length - 1);
2897 | }
2898 | function getUnknownTag(object, tag) {
2899 | if (/^HTML[A-Z].*Element$/.test(tag)) {
2900 | var name = toStringFunction.call(object);
2901 | if (name == "[object Object]") return null;
2902 | return "HTMLElement";
2903 | }
2904 | }
2905 | function getUnknownTagGenericBrowser(object, tag) {
2906 | if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement";
2907 | return getUnknownTag(object, tag);
2908 | }
2909 | function prototypeForTag(tag) {
2910 | if (typeof window == "undefined") return null;
2911 | if (typeof window[tag] == "undefined") return null;
2912 | var constructor = window[tag];
2913 | if (typeof constructor != "function") return null;
2914 | return constructor.prototype;
2915 | }
2916 | function discriminator(tag) { return null; }
2917 | var isBrowser = typeof navigator == "object";
2918 | return {
2919 | getTag: getTag,
2920 | getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,
2921 | prototypeForTag: prototypeForTag,
2922 | discriminator: discriminator };
2923 | }
2924 | C.u=function(getTagFallback) {
2925 | return function(hooks) {
2926 | if (typeof navigator != "object") return hooks;
2927 | var ua = navigator.userAgent;
2928 | if (ua.indexOf("DumpRenderTree") >= 0) return hooks;
2929 | if (ua.indexOf("Chrome") >= 0) {
2930 | function confirm(p) {
2931 | return typeof window == "object" && window[p] && window[p].name == p;
2932 | }
2933 | if (confirm("Window") && confirm("HTMLElement")) return hooks;
2934 | }
2935 | hooks.getTag = getTagFallback;
2936 | };
2937 | }
2938 | C.p=function(hooks) {
2939 | if (typeof dartExperimentalFixupGetTag != "function") return hooks;
2940 | hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);
2941 | }
2942 | C.q=function(hooks) {
2943 | var getTag = hooks.getTag;
2944 | var prototypeForTag = hooks.prototypeForTag;
2945 | function getTagFixed(o) {
2946 | var tag = getTag(o);
2947 | if (tag == "Document") {
2948 | if (!!o.xmlVersion) return "!Document";
2949 | return "!HTMLDocument";
2950 | }
2951 | return tag;
2952 | }
2953 | function prototypeForTagFixed(tag) {
2954 | if (tag == "Document") return null;
2955 | return prototypeForTag(tag);
2956 | }
2957 | hooks.getTag = getTagFixed;
2958 | hooks.prototypeForTag = prototypeForTagFixed;
2959 | }
2960 | C.t=function(hooks) {
2961 | var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
2962 | if (userAgent.indexOf("Firefox") == -1) return hooks;
2963 | var getTag = hooks.getTag;
2964 | var quickMap = {
2965 | "BeforeUnloadEvent": "Event",
2966 | "DataTransfer": "Clipboard",
2967 | "GeoGeolocation": "Geolocation",
2968 | "Location": "!Location",
2969 | "WorkerMessageEvent": "MessageEvent",
2970 | "XMLDocument": "!Document"};
2971 | function getTagFirefox(o) {
2972 | var tag = getTag(o);
2973 | return quickMap[tag] || tag;
2974 | }
2975 | hooks.getTag = getTagFirefox;
2976 | }
2977 | C.r=function(hooks) {
2978 | var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
2979 | if (userAgent.indexOf("Trident/") == -1) return hooks;
2980 | var getTag = hooks.getTag;
2981 | var quickMap = {
2982 | "BeforeUnloadEvent": "Event",
2983 | "DataTransfer": "Clipboard",
2984 | "HTMLDDElement": "HTMLElement",
2985 | "HTMLDTElement": "HTMLElement",
2986 | "HTMLPhraseElement": "HTMLElement",
2987 | "Position": "Geoposition"
2988 | };
2989 | function getTagIE(o) {
2990 | var tag = getTag(o);
2991 | var newTag = quickMap[tag];
2992 | if (newTag) return newTag;
2993 | if (tag == "Object") {
2994 | if (window.DataView && (o instanceof window.DataView)) return "DataView";
2995 | }
2996 | return tag;
2997 | }
2998 | function prototypeForTagIE(tag) {
2999 | var constructor = window[tag];
3000 | if (constructor == null) return null;
3001 | return constructor.prototype;
3002 | }
3003 | hooks.getTag = getTagIE;
3004 | hooks.prototypeForTag = prototypeForTagIE;
3005 | }
3006 | C.l=function(hooks) { return hooks; }
3007 |
3008 | C.d=new P.bP()
3009 | C.c=new P.cM()
3010 | C.y=new P.bR(null)
3011 | C.z=new P.bS(null,null)
3012 | C.f=new O.aD("Version.v0")
3013 | C.e=new O.aD("Version.v1")
3014 | C.m=H.O(u([C.f,C.e]),[O.aD])})()
3015 | var v={mangledGlobalNames:{J:"int",bi:"double",aJ:"num",e:"String",a6:"bool",j:"Null",r:"List"},mangledNames:{},getTypeFromName:getGlobalFromName,metadata:[],types:[{func:1,ret:P.j},{func:1,ret:-1},{func:1,ret:P.j,args:[W.a]},{func:1,ret:P.j,args:[W.t]},{func:1,args:[,]},{func:1,ret:P.j,args:[,,]},{func:1,ret:P.j,args:[X.L]},{func:1,ret:-1,args:[{func:1,ret:-1}]},{func:1,ret:P.j,args:[,]},{func:1,args:[,P.e]},{func:1,args:[P.e]},{func:1,ret:P.j,args:[{func:1,ret:-1}]},{func:1,ret:-1,args:[,]},{func:1,ret:P.j,args:[,P.u]},{func:1,ret:P.j,args:[P.J,,]},{func:1,ret:-1,args:[P.l],opt:[P.u]},{func:1,ret:-1,opt:[P.l]},{func:1,ret:P.j,args:[,],opt:[P.u]},{func:1,ret:[P.A,,],args:[,]},{func:1,ret:P.j,args:[P.e,P.e]},{func:1,ret:-1,args:[P.e,P.e]},{func:1,args:[W.a]},{func:1,ret:P.j,args:[X.I]},{func:1,ret:P.e,args:[P.a3]},{func:1,ret:[P.z,P.j],args:[W.t]},{func:1,ret:P.j,args:[P.e,,]},{func:1,ret:P.e,args:[P.e]}],interceptorsByTag:null,leafTags:null};(function staticFields(){$.Q=0
3016 | $.an=null
3017 | $.ec=null
3018 | $.dQ=!1
3019 | $.eP=null
3020 | $.eC=null
3021 | $.eT=null
3022 | $.d6=null
3023 | $.de=null
3024 | $.e_=null
3025 | $.ag=null
3026 | $.aF=null
3027 | $.aG=null
3028 | $.dS=!1
3029 | $.p=C.c
3030 | $.D=[]
3031 | $.dZ=null
3032 | $.e4=!0
3033 | $.aI=!0
3034 | $.e0=!0
3035 | $.dY=""
3036 | $.bo=C.f
3037 | $.d7=null
3038 | $.aH=null
3039 | $.eH=null
3040 | $.df=!1
3041 | $.bm=null})();(function lazyInitializers(){var u=hunkHelpers.lazy
3042 | u($,"h5","eV",function(){return H.eN("_$dart_dartClosure")})
3043 | u($,"h6","e5",function(){return H.eN("_$dart_js")})
3044 | u($,"h9","eW",function(){return H.S(H.ce({
3045 | toString:function(){return"$receiver$"}}))})
3046 | u($,"ha","eX",function(){return H.S(H.ce({$method$:null,
3047 | toString:function(){return"$receiver$"}}))})
3048 | u($,"hb","eY",function(){return H.S(H.ce(null))})
3049 | u($,"hc","eZ",function(){return H.S(function(){var $argumentsExpr$='$arguments$'
3050 | try{null.$method$($argumentsExpr$)}catch(t){return t.message}}())})
3051 | u($,"hf","f1",function(){return H.S(H.ce(void 0))})
3052 | u($,"hg","f2",function(){return H.S(function(){var $argumentsExpr$='$arguments$'
3053 | try{(void 0).$method$($argumentsExpr$)}catch(t){return t.message}}())})
3054 | u($,"he","f0",function(){return H.S(H.et(null))})
3055 | u($,"hd","f_",function(){return H.S(function(){try{null.$method$}catch(t){return t.message}}())})
3056 | u($,"hi","f4",function(){return H.S(H.et(void 0))})
3057 | u($,"hh","f3",function(){return H.S(function(){try{(void 0).$method$}catch(t){return t.message}}())})
3058 | u($,"hk","e6",function(){return P.fn()})})();(function nativeSupport(){!function(){var u=function(a){var o={}
3059 | o[a]=1
3060 | return Object.keys(hunkHelpers.convertToFastObject(o))[0]}
3061 | v.getIsolateTag=function(a){return u("___dart_"+a+v.isolateTag)}
3062 | var t="___dart_isolate_tags_"
3063 | var s=Object[t]||(Object[t]=Object.create(null))
3064 | var r="_ZxYxX"
3065 | for(var q=0;;q++){var p=u(r+"_"+q+"_")
3066 | if(!(p in s)){s[p]=1
3067 | v.isolateTag=p
3068 | break}}v.dispatchPropertyName=v.getIsolateTag("dispatch_record")}()
3069 | hunkHelpers.setOrUpdateInterceptorsByTag({Blob:J.C,DOMError:J.C,File:J.C,MediaError:J.C,NavigatorUserMediaError:J.C,OverconstrainedError:J.C,PositionError:J.C,SQLError:J.C,HTMLAudioElement:W.c,HTMLBRElement:W.c,HTMLBaseElement:W.c,HTMLBodyElement:W.c,HTMLCanvasElement:W.c,HTMLContentElement:W.c,HTMLDListElement:W.c,HTMLDataElement:W.c,HTMLDataListElement:W.c,HTMLDetailsElement:W.c,HTMLDialogElement:W.c,HTMLDivElement:W.c,HTMLEmbedElement:W.c,HTMLFieldSetElement:W.c,HTMLHRElement:W.c,HTMLHeadElement:W.c,HTMLHeadingElement:W.c,HTMLHtmlElement:W.c,HTMLIFrameElement:W.c,HTMLImageElement:W.c,HTMLLIElement:W.c,HTMLLabelElement:W.c,HTMLLegendElement:W.c,HTMLLinkElement:W.c,HTMLMapElement:W.c,HTMLMediaElement:W.c,HTMLMenuElement:W.c,HTMLMeterElement:W.c,HTMLModElement:W.c,HTMLOListElement:W.c,HTMLObjectElement:W.c,HTMLOptGroupElement:W.c,HTMLOptionElement:W.c,HTMLOutputElement:W.c,HTMLParagraphElement:W.c,HTMLParamElement:W.c,HTMLPictureElement:W.c,HTMLPreElement:W.c,HTMLProgressElement:W.c,HTMLQuoteElement:W.c,HTMLScriptElement:W.c,HTMLShadowElement:W.c,HTMLSlotElement:W.c,HTMLSourceElement:W.c,HTMLSpanElement:W.c,HTMLStyleElement:W.c,HTMLTableCaptionElement:W.c,HTMLTableCellElement:W.c,HTMLTableDataCellElement:W.c,HTMLTableHeaderCellElement:W.c,HTMLTableColElement:W.c,HTMLTableElement:W.c,HTMLTableRowElement:W.c,HTMLTableSectionElement:W.c,HTMLTemplateElement:W.c,HTMLTimeElement:W.c,HTMLTitleElement:W.c,HTMLTrackElement:W.c,HTMLUListElement:W.c,HTMLUnknownElement:W.c,HTMLVideoElement:W.c,HTMLDirectoryElement:W.c,HTMLFontElement:W.c,HTMLFrameElement:W.c,HTMLFrameSetElement:W.c,HTMLMarqueeElement:W.c,HTMLElement:W.c,HTMLAnchorElement:W.al,HTMLAreaElement:W.bq,HTMLButtonElement:W.a9,CDATASection:W.a_,CharacterData:W.a_,Comment:W.a_,ProcessingInstruction:W.a_,Text:W.a_,DOMException:W.by,Element:W.aa,AbortPaymentEvent:W.a,AnimationEvent:W.a,AnimationPlaybackEvent:W.a,ApplicationCacheErrorEvent:W.a,BackgroundFetchClickEvent:W.a,BackgroundFetchEvent:W.a,BackgroundFetchFailEvent:W.a,BackgroundFetchedEvent:W.a,BeforeInstallPromptEvent:W.a,BeforeUnloadEvent:W.a,BlobEvent:W.a,CanMakePaymentEvent:W.a,ClipboardEvent:W.a,CloseEvent:W.a,CustomEvent:W.a,DeviceMotionEvent:W.a,DeviceOrientationEvent:W.a,ErrorEvent:W.a,ExtendableEvent:W.a,ExtendableMessageEvent:W.a,FetchEvent:W.a,FontFaceSetLoadEvent:W.a,ForeignFetchEvent:W.a,GamepadEvent:W.a,HashChangeEvent:W.a,InstallEvent:W.a,MediaEncryptedEvent:W.a,MediaKeyMessageEvent:W.a,MediaQueryListEvent:W.a,MediaStreamEvent:W.a,MediaStreamTrackEvent:W.a,MessageEvent:W.a,MIDIConnectionEvent:W.a,MIDIMessageEvent:W.a,MutationEvent:W.a,NotificationEvent:W.a,PageTransitionEvent:W.a,PaymentRequestEvent:W.a,PaymentRequestUpdateEvent:W.a,PopStateEvent:W.a,PresentationConnectionAvailableEvent:W.a,PresentationConnectionCloseEvent:W.a,ProgressEvent:W.a,PromiseRejectionEvent:W.a,PushEvent:W.a,RTCDataChannelEvent:W.a,RTCDTMFToneChangeEvent:W.a,RTCPeerConnectionIceEvent:W.a,RTCTrackEvent:W.a,SecurityPolicyViolationEvent:W.a,SensorErrorEvent:W.a,SpeechRecognitionError:W.a,SpeechRecognitionEvent:W.a,SpeechSynthesisEvent:W.a,StorageEvent:W.a,SyncEvent:W.a,TrackEvent:W.a,TransitionEvent:W.a,WebKitTransitionEvent:W.a,VRDeviceEvent:W.a,VRDisplayEvent:W.a,VRSessionEvent:W.a,MojoInterfaceRequestEvent:W.a,ResourceProgressEvent:W.a,USBConnectionEvent:W.a,IDBVersionChangeEvent:W.a,AudioProcessingEvent:W.a,OfflineAudioCompletionEvent:W.a,WebGLContextEvent:W.a,Event:W.a,InputEvent:W.a,Window:W.a0,DOMWindow:W.a0,EventTarget:W.a0,HTMLFormElement:W.bC,HTMLInputElement:W.X,HTMLMetaElement:W.aw,MouseEvent:W.t,DragEvent:W.t,PointerEvent:W.t,WheelEvent:W.t,Document:W.w,DocumentFragment:W.w,HTMLDocument:W.w,ShadowRoot:W.w,XMLDocument:W.w,Attr:W.w,DocumentType:W.w,Node:W.w,NodeList:W.aY,RadioNodeList:W.aY,HTMLSelectElement:W.c2,Storage:W.b1,HTMLTextAreaElement:W.M,CompositionEvent:W.U,FocusEvent:W.U,KeyboardEvent:W.U,TextEvent:W.U,TouchEvent:W.U,UIEvent:W.U,SVGAElement:P.b,SVGAnimateElement:P.b,SVGAnimateMotionElement:P.b,SVGAnimateTransformElement:P.b,SVGAnimationElement:P.b,SVGCircleElement:P.b,SVGClipPathElement:P.b,SVGDefsElement:P.b,SVGDescElement:P.b,SVGDiscardElement:P.b,SVGEllipseElement:P.b,SVGFEBlendElement:P.b,SVGFEColorMatrixElement:P.b,SVGFEComponentTransferElement:P.b,SVGFECompositeElement:P.b,SVGFEConvolveMatrixElement:P.b,SVGFEDiffuseLightingElement:P.b,SVGFEDisplacementMapElement:P.b,SVGFEDistantLightElement:P.b,SVGFEFloodElement:P.b,SVGFEFuncAElement:P.b,SVGFEFuncBElement:P.b,SVGFEFuncGElement:P.b,SVGFEFuncRElement:P.b,SVGFEGaussianBlurElement:P.b,SVGFEImageElement:P.b,SVGFEMergeElement:P.b,SVGFEMergeNodeElement:P.b,SVGFEMorphologyElement:P.b,SVGFEOffsetElement:P.b,SVGFEPointLightElement:P.b,SVGFESpecularLightingElement:P.b,SVGFESpotLightElement:P.b,SVGFETileElement:P.b,SVGFETurbulenceElement:P.b,SVGFilterElement:P.b,SVGForeignObjectElement:P.b,SVGGElement:P.b,SVGGeometryElement:P.b,SVGGraphicsElement:P.b,SVGImageElement:P.b,SVGLineElement:P.b,SVGLinearGradientElement:P.b,SVGMarkerElement:P.b,SVGMaskElement:P.b,SVGMetadataElement:P.b,SVGPathElement:P.b,SVGPatternElement:P.b,SVGPolygonElement:P.b,SVGPolylineElement:P.b,SVGRadialGradientElement:P.b,SVGRectElement:P.b,SVGScriptElement:P.b,SVGSetElement:P.b,SVGStopElement:P.b,SVGStyleElement:P.b,SVGElement:P.b,SVGSVGElement:P.b,SVGSwitchElement:P.b,SVGSymbolElement:P.b,SVGTSpanElement:P.b,SVGTextContentElement:P.b,SVGTextElement:P.b,SVGTextPathElement:P.b,SVGTextPositioningElement:P.b,SVGTitleElement:P.b,SVGUseElement:P.b,SVGViewElement:P.b,SVGGradientElement:P.b,SVGComponentTransferFunctionElement:P.b,SVGFEDropShadowElement:P.b,SVGMPathElement:P.b})
3070 | hunkHelpers.setOrUpdateLeafTags({Blob:true,DOMError:true,File:true,MediaError:true,NavigatorUserMediaError:true,OverconstrainedError:true,PositionError:true,SQLError:true,HTMLAudioElement:true,HTMLBRElement:true,HTMLBaseElement:true,HTMLBodyElement:true,HTMLCanvasElement:true,HTMLContentElement:true,HTMLDListElement:true,HTMLDataElement:true,HTMLDataListElement:true,HTMLDetailsElement:true,HTMLDialogElement:true,HTMLDivElement:true,HTMLEmbedElement:true,HTMLFieldSetElement:true,HTMLHRElement:true,HTMLHeadElement:true,HTMLHeadingElement:true,HTMLHtmlElement:true,HTMLIFrameElement:true,HTMLImageElement:true,HTMLLIElement:true,HTMLLabelElement:true,HTMLLegendElement:true,HTMLLinkElement:true,HTMLMapElement:true,HTMLMediaElement:true,HTMLMenuElement:true,HTMLMeterElement:true,HTMLModElement:true,HTMLOListElement:true,HTMLObjectElement:true,HTMLOptGroupElement:true,HTMLOptionElement:true,HTMLOutputElement:true,HTMLParagraphElement:true,HTMLParamElement:true,HTMLPictureElement:true,HTMLPreElement:true,HTMLProgressElement:true,HTMLQuoteElement:true,HTMLScriptElement:true,HTMLShadowElement:true,HTMLSlotElement:true,HTMLSourceElement:true,HTMLSpanElement:true,HTMLStyleElement:true,HTMLTableCaptionElement:true,HTMLTableCellElement:true,HTMLTableDataCellElement:true,HTMLTableHeaderCellElement:true,HTMLTableColElement:true,HTMLTableElement:true,HTMLTableRowElement:true,HTMLTableSectionElement:true,HTMLTemplateElement:true,HTMLTimeElement:true,HTMLTitleElement:true,HTMLTrackElement:true,HTMLUListElement:true,HTMLUnknownElement:true,HTMLVideoElement:true,HTMLDirectoryElement:true,HTMLFontElement:true,HTMLFrameElement:true,HTMLFrameSetElement:true,HTMLMarqueeElement:true,HTMLElement:false,HTMLAnchorElement:true,HTMLAreaElement:true,HTMLButtonElement:true,CDATASection:true,CharacterData:true,Comment:true,ProcessingInstruction:true,Text:true,DOMException:true,Element:false,AbortPaymentEvent:true,AnimationEvent:true,AnimationPlaybackEvent:true,ApplicationCacheErrorEvent:true,BackgroundFetchClickEvent:true,BackgroundFetchEvent:true,BackgroundFetchFailEvent:true,BackgroundFetchedEvent:true,BeforeInstallPromptEvent:true,BeforeUnloadEvent:true,BlobEvent:true,CanMakePaymentEvent:true,ClipboardEvent:true,CloseEvent:true,CustomEvent:true,DeviceMotionEvent:true,DeviceOrientationEvent:true,ErrorEvent:true,ExtendableEvent:true,ExtendableMessageEvent:true,FetchEvent:true,FontFaceSetLoadEvent:true,ForeignFetchEvent:true,GamepadEvent:true,HashChangeEvent:true,InstallEvent:true,MediaEncryptedEvent:true,MediaKeyMessageEvent:true,MediaQueryListEvent:true,MediaStreamEvent:true,MediaStreamTrackEvent:true,MessageEvent:true,MIDIConnectionEvent:true,MIDIMessageEvent:true,MutationEvent:true,NotificationEvent:true,PageTransitionEvent:true,PaymentRequestEvent:true,PaymentRequestUpdateEvent:true,PopStateEvent:true,PresentationConnectionAvailableEvent:true,PresentationConnectionCloseEvent:true,ProgressEvent:true,PromiseRejectionEvent:true,PushEvent:true,RTCDataChannelEvent:true,RTCDTMFToneChangeEvent:true,RTCPeerConnectionIceEvent:true,RTCTrackEvent:true,SecurityPolicyViolationEvent:true,SensorErrorEvent:true,SpeechRecognitionError:true,SpeechRecognitionEvent:true,SpeechSynthesisEvent:true,StorageEvent:true,SyncEvent:true,TrackEvent:true,TransitionEvent:true,WebKitTransitionEvent:true,VRDeviceEvent:true,VRDisplayEvent:true,VRSessionEvent:true,MojoInterfaceRequestEvent:true,ResourceProgressEvent:true,USBConnectionEvent:true,IDBVersionChangeEvent:true,AudioProcessingEvent:true,OfflineAudioCompletionEvent:true,WebGLContextEvent:true,Event:false,InputEvent:false,Window:true,DOMWindow:true,EventTarget:false,HTMLFormElement:true,HTMLInputElement:true,HTMLMetaElement:true,MouseEvent:true,DragEvent:true,PointerEvent:true,WheelEvent:true,Document:true,DocumentFragment:true,HTMLDocument:true,ShadowRoot:true,XMLDocument:true,Attr:true,DocumentType:true,Node:false,NodeList:true,RadioNodeList:true,HTMLSelectElement:true,Storage:true,HTMLTextAreaElement:true,CompositionEvent:true,FocusEvent:true,KeyboardEvent:true,TextEvent:true,TouchEvent:true,UIEvent:false,SVGAElement:true,SVGAnimateElement:true,SVGAnimateMotionElement:true,SVGAnimateTransformElement:true,SVGAnimationElement:true,SVGCircleElement:true,SVGClipPathElement:true,SVGDefsElement:true,SVGDescElement:true,SVGDiscardElement:true,SVGEllipseElement:true,SVGFEBlendElement:true,SVGFEColorMatrixElement:true,SVGFEComponentTransferElement:true,SVGFECompositeElement:true,SVGFEConvolveMatrixElement:true,SVGFEDiffuseLightingElement:true,SVGFEDisplacementMapElement:true,SVGFEDistantLightElement:true,SVGFEFloodElement:true,SVGFEFuncAElement:true,SVGFEFuncBElement:true,SVGFEFuncGElement:true,SVGFEFuncRElement:true,SVGFEGaussianBlurElement:true,SVGFEImageElement:true,SVGFEMergeElement:true,SVGFEMergeNodeElement:true,SVGFEMorphologyElement:true,SVGFEOffsetElement:true,SVGFEPointLightElement:true,SVGFESpecularLightingElement:true,SVGFESpotLightElement:true,SVGFETileElement:true,SVGFETurbulenceElement:true,SVGFilterElement:true,SVGForeignObjectElement:true,SVGGElement:true,SVGGeometryElement:true,SVGGraphicsElement:true,SVGImageElement:true,SVGLineElement:true,SVGLinearGradientElement:true,SVGMarkerElement:true,SVGMaskElement:true,SVGMetadataElement:true,SVGPathElement:true,SVGPatternElement:true,SVGPolygonElement:true,SVGPolylineElement:true,SVGRadialGradientElement:true,SVGRectElement:true,SVGScriptElement:true,SVGSetElement:true,SVGStopElement:true,SVGStyleElement:true,SVGElement:true,SVGSVGElement:true,SVGSwitchElement:true,SVGSymbolElement:true,SVGTSpanElement:true,SVGTextContentElement:true,SVGTextElement:true,SVGTextPathElement:true,SVGTextPositioningElement:true,SVGTitleElement:true,SVGUseElement:true,SVGViewElement:true,SVGGradientElement:true,SVGComponentTransferFunctionElement:true,SVGFEDropShadowElement:true,SVGMPathElement:true})})()
3071 | convertAllToFastObject(w)
3072 | convertToFastObject($);(function(a){if(typeof document==="undefined"){a(null)
3073 | return}if(typeof document.currentScript!='undefined'){a(document.currentScript)
3074 | return}var u=document.scripts
3075 | function onLoad(b){for(var s=0;s templateList = [];
16 |
17 | void refreshAllTemplates() {
18 | var entityName = this.entityName ?? "Entity";
19 | DefaultTemplate template;
20 | if (version == Version.v1) {
21 | template = V1Template(srcJson: jsonString, className: entityName);
22 | } else {
23 | template = DefaultTemplate(srcJson: jsonString, className: entityName);
24 | }
25 |
26 | if (!template.isList) {
27 | templateList.add(template);
28 | refreshTemplate(template);
29 | // return resultSb.toString();
30 | } else {
31 | var listTemplate = template.getListTemplate();
32 | templateList.add(listTemplate);
33 |
34 | refreshTemplate(template);
35 | }
36 | }
37 |
38 | String makeDartCode() {
39 | StringBuffer resultSb = StringBuffer();
40 | handleInputClassName();
41 |
42 | resultSb.writeln(header);
43 | templateList.forEach((template) {
44 | resultSb.writeln(template.toString());
45 | });
46 | return resultSb.toString();
47 | }
48 |
49 | void handleInputClassName() {
50 | final text = eClassName.value;
51 | final lines = text.split("\n");
52 |
53 | for (var i = 0; i < templateList.length; i++) {
54 | final template = templateList[i];
55 | final line = lines[i].trim();
56 | final inputKeyValue = line.split(":");
57 | final inputName = inputKeyValue[1].trim();
58 |
59 | template.className = inputName;
60 | }
61 | }
62 |
63 | void refreshTemplate(DefaultTemplate template) {
64 | var fieldList = template.fieldList;
65 | fieldList.forEach((filed) {
66 | if (filed is MapField) {
67 | DefaultTemplate template = DefaultTemplate(
68 | srcJson: json.encode(filed.map), className: filed.typeString);
69 | if (version == Version.v1) {
70 | template = V1Template(
71 | srcJson: json.encode(filed.map), className: filed.typeString);
72 | }
73 | templateList.add(template);
74 | refreshTemplate(template);
75 | } else if (filed is ListField) {
76 | if (filed.childIsObject) {
77 | DefaultTemplate template = DefaultTemplate(
78 | srcJson: json.encode(filed.list[0]), className: filed.typeName);
79 | if (version == Version.v1) {
80 | template = V1Template(
81 | srcJson: json.encode(filed.list[0]), className: filed.typeName);
82 | }
83 | templateList.add(template);
84 | refreshTemplate(template);
85 | }
86 | }
87 | });
88 | }
89 |
90 | String get fileName => camelCase2UnderScoreCase(entityName);
91 |
92 | static const String importString =
93 | "import 'package:json_annotation/json_annotation.dart';";
94 |
95 | String get header => """$importString
96 |
97 | part '$fileName.g.dart';
98 |
99 | """;
100 |
101 | String getClassNameText() {
102 | final sb = StringBuffer();
103 | for (final template in templateList) {
104 | String text = "${template.className} : ${template.className}";
105 | sb.writeln(text);
106 | }
107 | return sb.toString();
108 | }
109 | }
110 |
111 | String camelCase2UnderScoreCase(String name) {
112 | return name[0].toLowerCase() +
113 | name.substring(1).replaceAllMapped(RegExp("[A-Z]"), (match) {
114 | var str = match.group(0);
115 | return "_" + str.toLowerCase();
116 | });
117 | }
118 |
119 | /// use the string replace's method the resolve the int and double problem.
120 | String convertJsonString(String jsonString) {
121 | var numberReg = RegExp(r"[0-9]\.[0-9]+");
122 |
123 | //匹配小数数字正则
124 | var allMatch = numberReg.allMatches(jsonString).toList();
125 |
126 | for (var i = 0; i < allMatch.length; i++) {
127 | //是一个小数数字
128 | var m = allMatch[i];
129 | var s = m.group(0);
130 |
131 | // 应该是double,但由于js的原因被识别成了整数数,这里对这种数据进行处理,将这里的最后一位从0替换为5,以便于让该被js识别成小数 而非数字
132 | s = s.replaceRange(s.length - 1, s.length, "5");
133 | jsonString = jsonString.replaceRange(m.start, m.end, s);
134 | }
135 | return jsonString;
136 | }
137 |
--------------------------------------------------------------------------------
/lib/json_generator.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'dart:convert';
3 | import 'dart:html';
4 |
5 | import 'package:json2dart_serialization/generator.dart';
6 | import 'package:json2dart_serialization/storage.dart';
7 |
8 | String entityName = null;
9 |
10 | bool useJsonKey = true;
11 |
12 | bool isCamelCase = true;
13 | bool isStaticMethod = true;
14 |
15 | var downloadFileName = "";
16 |
17 | // const defaultValue = """{
18 | // "body": "",
19 | // "data": [1],
20 | // "input_content":["1"],
21 | // "list1":[{"name":"hello"}],
22 | // "number": [1.02],
23 | // "user":{"name":"abc"}
24 | // }""";
25 | const defaultValue = "";
26 |
27 | enum Version { v0, v1 }
28 |
29 | Version v = Version.v0;
30 |
31 | TextAreaElement eResult;
32 | TextAreaElement eClassName;
33 | Element editButton;
34 | void main() async {
35 | isChinese = await _isChinese();
36 | var dataHelper = CookieHelper();
37 | TextAreaElement jsonInput = querySelector("#json");
38 | eClassName = querySelector("#class_name");
39 | eResult = querySelector("#result");
40 | jsonInput.value = dataHelper.loadJsonString();
41 |
42 | jsonInput.onInput.listen((event) {
43 | dataHelper.saveJsonString(jsonInput.value);
44 | refreshData();
45 | });
46 |
47 | InputElement entityNameEle = querySelector("#out_entity_name");
48 | entityNameEle.value = dataHelper.loadEntityName();
49 | entityName = entityNameEle.value;
50 | entityNameEle.onInput.listen((event) {
51 | entityName = entityNameEle.value;
52 | dataHelper.saveEntityName(entityName);
53 | refreshData();
54 | });
55 |
56 | ButtonElement formatButton = querySelector("#format");
57 | formatButton.onClick.listen((click) {
58 | String pretty;
59 | pretty = convertJsonString(jsonInput.value);
60 | try {
61 | pretty = formatJson(pretty);
62 | } on Exception {
63 | return;
64 | }
65 | jsonInput.value = pretty;
66 | });
67 |
68 | InputElement eJsonKey = querySelector("#use_json_key");
69 | InputElement eCamelCase = querySelector("#camelCase");
70 | InputElement eUseStatic = querySelector("#use_static");
71 | TextAreaElement result = querySelector("#result");
72 | RadioButtonInputElement v0 = querySelector("#v0");
73 | RadioButtonInputElement v1 = querySelector("#v1");
74 |
75 | void updateVersioin() {
76 | if (v1.checked) {
77 | v = Version.v1;
78 | } else {
79 | v = Version.v0;
80 | }
81 |
82 | dataHelper.saveVersion(v);
83 | }
84 |
85 | void updateVersionUI() {
86 | if (v == Version.v1) {
87 | v1.checked = true;
88 | } else {
89 | v1.checked = false;
90 | }
91 | }
92 |
93 | v = dataHelper.loadVersion();
94 |
95 | updateVersionUI();
96 |
97 | v0.onInput.listen((event) {
98 | updateVersioin();
99 | refreshData();
100 | });
101 | v1.onInput.listen((event) {
102 | updateVersioin();
103 | refreshData();
104 | });
105 |
106 | void onJsonKeyChange() {
107 | useJsonKey = eJsonKey.checked;
108 | eCamelCase.disabled = !useJsonKey;
109 | isCamelCase = eCamelCase.checked;
110 | if (!useJsonKey) isCamelCase = false;
111 | refreshData();
112 | }
113 |
114 | eJsonKey.checked = useJsonKey;
115 | eJsonKey.onInput.listen((event) {
116 | onJsonKeyChange();
117 | });
118 |
119 | querySelector("#check_label").onClick.listen((event) {
120 | eJsonKey.checked = !eJsonKey.checked;
121 | onJsonKeyChange();
122 | });
123 |
124 | eCamelCase.checked = isCamelCase;
125 | eCamelCase.onInput.listen((event) {
126 | isCamelCase = eCamelCase.checked;
127 | refreshData();
128 | });
129 |
130 | querySelector("#camelCaseLabel").onClick.listen((event) {
131 | eCamelCase.checked = !eCamelCase.checked;
132 | refreshData();
133 | });
134 |
135 | eUseStatic.checked = isStaticMethod;
136 | eUseStatic.onInput.listen((event) {
137 | isStaticMethod = eUseStatic.checked;
138 | refreshData();
139 | });
140 |
141 | querySelector("#useStaticLabel").onClick.listen((event) {
142 | eUseStatic.checked = !eUseStatic.checked;
143 | refreshData();
144 | });
145 |
146 | refreshData();
147 |
148 | querySelector("#copy").onClick.listen((event) {
149 | result.focus();
150 | result.setSelectionRange(0, result.textLength);
151 | document.execCommand("copy", null, "");
152 | result.blur();
153 | });
154 |
155 | ButtonElement saveButton = querySelector("#save");
156 | saveButton.onClick.listen((event) async {
157 | Blob blob = Blob([result.value]);
158 | // FileSystem _filesystem =
159 | // await window.requestFileSystem(1024 * 1024, persistent: false);
160 | // FileEntry fileEntry = await _filesystem.root.createFile('dart_test.csv');
161 | // FileWriter fw = await fileEntry.createWriter();
162 | // fw.write(blob);
163 | // File file = await fileEntry.file();
164 | AnchorElement saveLink =
165 | document.createElementNS("http://www.w3.org/1999/xhtml", "a");
166 | saveLink.href = Url.createObjectUrlFromBlob(blob);
167 | // saveLink.type = "download";
168 | saveLink.download = downloadFileName;
169 | saveLink.click();
170 | });
171 |
172 | editButton = querySelector("#edit_class");
173 | editButton.onClick.listen((event) {
174 | showOrClassName();
175 | });
176 |
177 | eClassName.onInput.listen((event) {
178 | refreshClassNameChange(eClassName.text);
179 | });
180 | }
181 |
182 | Future _isChinese() async {
183 | // var lang = await findSystemLocale();
184 | List elements = querySelectorAll("meta");
185 |
186 | String lang;
187 | for (var e in elements) {
188 | var _lang = e.getAttribute("lang");
189 | if (_lang != null) {
190 | lang = _lang;
191 | break;
192 | }
193 | }
194 | if (lang?.contains("zh") == true) {
195 | return true;
196 | }
197 |
198 | return false;
199 | }
200 |
201 | bool isChinese = false;
202 | Generator generator;
203 | void refreshData() async {
204 | TextAreaElement jsonInput = querySelector("#json");
205 | var string = jsonInput.value;
206 | TextAreaElement result = querySelector("#result");
207 |
208 | try {
209 | formatJson(string);
210 | } on Exception {
211 | if (isChinese) {
212 | result.value = "不是一个正确的json";
213 | } else {
214 | result.value = "Not JSON";
215 | }
216 | return;
217 | }
218 | String entityClassName;
219 | if (entityName == null || entityName == "" || entityName.trim() == "") {
220 | entityClassName = "Entity";
221 | } else {
222 | entityClassName = entityName;
223 | }
224 |
225 | generator = Generator(string, entityClassName, v);
226 | generator.refreshAllTemplates();
227 | writeClassNameText(generator);
228 | makeCode(generator);
229 | }
230 |
231 | void writeClassNameText(Generator generator) {
232 | String names = generator.getClassNameText();
233 | eClassName.text = names;
234 | }
235 |
236 | void makeCode(Generator generator) {
237 | var dartCode = generator.makeDartCode();
238 | var dartFileName = ("${generator.fileName}.dart");
239 | downloadFileName = dartFileName;
240 |
241 | String filePrefix;
242 | if (isChinese) {
243 | filePrefix = "应该使用的文件名为:";
244 | } else {
245 | filePrefix = "your dart file name is:";
246 | }
247 | final resultName = "$filePrefix $dartFileName";
248 | writeToResult(resultName, dartCode);
249 | }
250 |
251 | void writeToResult(String resultName, String resultText) {
252 | // print(filePrefix);
253 | querySelector("#file_name").text = resultName;
254 | eResult.value = resultText;
255 | }
256 |
257 | String formatJson(String jsonString) {
258 | var map = json.decode(jsonString);
259 | var prettyString = JsonEncoder.withIndent(" ").convert(map);
260 | return prettyString;
261 | }
262 |
263 | void showOrClassName() {
264 | final currentState = !eClassName.hidden;
265 |
266 | eClassName.hidden = !eClassName.hidden;
267 | eResult.hidden = !eResult.hidden;
268 |
269 | editButton.text = currentState ? "name" : "result";
270 | }
271 |
272 | void refreshClassNameChange(String text) {
273 | final value = generator.makeDartCode();
274 | String filePrefix;
275 | if (isChinese) {
276 | filePrefix = "应该使用的文件名为:";
277 | } else {
278 | filePrefix = "your dart file name is:";
279 | }
280 | var dartFileName = ("${generator.fileName}.dart");
281 | downloadFileName = dartFileName;
282 | final resultName = "$filePrefix $dartFileName";
283 | writeToResult(resultName, value);
284 | }
285 |
--------------------------------------------------------------------------------
/lib/storage.dart:
--------------------------------------------------------------------------------
1 | import 'dart:html';
2 |
3 | import 'package:json2dart_serialization/json_generator.dart';
4 |
5 | const _entityKey = "entityKey";
6 | const _versionKey = "versionKey";
7 |
8 | class CookieHelper {
9 | String loadJsonString() {
10 | var storage = window.localStorage;
11 | if (!storage.containsKey("json")) {
12 | return "";
13 | }
14 | return window.localStorage["json"];
15 | }
16 |
17 | void saveJsonString(String jsonString) {
18 | window.localStorage.addAll({"json": jsonString});
19 | }
20 |
21 | void saveEntityName(String entityName) {
22 | window.localStorage.addAll({_entityKey: entityName});
23 | }
24 |
25 | String loadEntityName() {
26 | if (!window.localStorage.containsKey(_entityKey)) {
27 | return "";
28 | }
29 | return window.localStorage[_entityKey];
30 | }
31 |
32 | void saveVersion(Version version) {
33 | var index = Version.values.indexOf(version);
34 | window.localStorage.addAll({_versionKey: index.toString()});
35 | }
36 |
37 | Version loadVersion() {
38 | if (!window.localStorage.containsKey(_versionKey)) {
39 | return Version.v0;
40 | }
41 |
42 | return Version.values[int.parse(window.localStorage[_versionKey])];
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/template.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'package:json2dart_serialization/json_generator.dart' as main;
3 |
4 | abstract class Template {
5 | String declare();
6 |
7 | String constructor();
8 |
9 | String field();
10 |
11 | String method();
12 |
13 | String end();
14 |
15 | @override
16 | String toString() {
17 | return createCode(this);
18 | }
19 | }
20 |
21 | class DefaultTemplate extends Template {
22 | String srcJson;
23 | String className;
24 |
25 | String tab = " ";
26 |
27 | DefaultTemplate({this.srcJson, this.className = "Entity"});
28 |
29 | @override
30 | String constructor() {
31 | var fieldList = FieldHelper(srcJson).getFields();
32 | var filedString = StringBuffer();
33 | fieldList.forEach((f) {
34 | String name;
35 | if (main.isCamelCase) {
36 | name = camelCase(f.nameString);
37 | } else {
38 | name = f.nameString;
39 | }
40 | filedString.write("this.$name,");
41 | });
42 | return "${tab}$className($filedString);";
43 | }
44 |
45 | @override
46 | String declare() {
47 | return """@JsonSerializable()
48 | class $className extends Object ${interface()}{""";
49 | }
50 |
51 | String interface() {
52 | return "with _\$${className}SerializerMixin";
53 | }
54 |
55 | @override
56 | String end() {
57 | return "}";
58 | }
59 |
60 | @override
61 | String field() {
62 | // var useJsonKey
63 |
64 | var fieldList = FieldHelper(srcJson).getFields();
65 | var sb = StringBuffer();
66 | fieldList.forEach((f) {
67 | sb.writeln();
68 | if (main.useJsonKey) {
69 | sb.writeln(" @JsonKey(name: '${f.nameString}')");
70 | }
71 | String nameString;
72 | if (main.isCamelCase) {
73 | nameString = firstLetterLower(camelCase(f.nameString));
74 | } else {
75 | nameString = f.nameString;
76 | }
77 | sb.writeln(" ${f.typeString} $nameString;");
78 | });
79 | return sb.toString();
80 | }
81 |
82 | String camelCase(String name) {
83 | StringBuffer sb = StringBuffer();
84 | var list = name.split("_");
85 | for (int i = 0; i < list.length; i++) {
86 | var item = list[i];
87 | String name = "";
88 | if (i == 0) {
89 | name = firstLetterLower(item);
90 | } else {
91 | name = firstLetterUpper(item);
92 | }
93 | sb.write(name);
94 | }
95 | return sb.toString();
96 | }
97 |
98 | @override
99 | String method() {
100 | if (main.isStaticMethod) {
101 | return " static $className fromJson(Map srcJson) => _\$${className}FromJson(srcJson);";
102 | }
103 | return " factory $className.fromJson(Map srcJson) => _\$${className}FromJson(srcJson);";
104 | }
105 |
106 | List get fieldList => FieldHelper(srcJson).getFields();
107 |
108 | bool get isList => json.decode(srcJson) is List;
109 |
110 | ListTemplate getListTemplate() {
111 | if (this is ListTemplate) {
112 | return this;
113 | }
114 | return ListTemplate(
115 | srcJson: srcJson, className: className, delegateTemplate: this);
116 | }
117 | }
118 |
119 | class ListTemplate extends DefaultTemplate {
120 | Template delegateTemplate;
121 |
122 | ListTemplate(
123 | {String srcJson, String className = "Entity", this.delegateTemplate})
124 | : super(className: className, srcJson: srcJson);
125 |
126 | @override
127 | String declare() {
128 | return _declareListMethod() + "\n" + delegateTemplate?.declare() ??
129 | super.declare();
130 | }
131 |
132 | String _declareListMethod() {
133 | var listMethod =
134 | """List<$className> get${className}List(List list){
135 | List<$className> result = [];
136 | list.forEach((item){
137 | result.add($className.fromJson(item));
138 | });
139 | return result;
140 | }""";
141 | return listMethod;
142 | }
143 |
144 | @override
145 | String constructor() {
146 | return delegateTemplate?.constructor() ?? super.constructor();
147 | }
148 |
149 | @override
150 | String field() {
151 | return delegateTemplate?.field() ?? super.field();
152 | }
153 |
154 | @override
155 | String method() {
156 | return delegateTemplate?.method() ?? super.method();
157 | }
158 |
159 | @override
160 | String end() {
161 | return delegateTemplate?.end() ?? super.end();
162 | }
163 |
164 | @override
165 | List get fieldList =>
166 | FieldHelper(json.encode(json.decode(srcJson)[0])).getFields();
167 | }
168 |
169 | class V1Template extends DefaultTemplate {
170 | V1Template({String srcJson, String className = "Entity"})
171 | : super(className: className, srcJson: srcJson);
172 |
173 | @override
174 | String interface() => "";
175 |
176 | @override
177 | String method() {
178 | var result = StringBuffer();
179 | result.writeln(super.method());
180 | result.writeln();
181 | result.write(
182 | " Map toJson() => _\$${className}ToJson(this);");
183 | return result.toString();
184 | }
185 | }
186 |
187 | class FieldHelper {
188 | String srcJson;
189 |
190 | FieldHelper(this.srcJson);
191 |
192 | List _getMapFiled(Map map) {
193 | List list = [];
194 | map.forEach((k, v) {
195 | if (v is List) {
196 | list.add(ListField(v, k));
197 | } else if (v is String) {
198 | list.add(SimpleField("String", k));
199 | } else if (v is int) {
200 | list.add(SimpleField("int", k));
201 | } else if (v is double) {
202 | list.add(SimpleField("double", k));
203 | } else if (v is bool) {
204 | list.add(SimpleField("bool", k));
205 | } else if (v is Map) {
206 | list.add(MapField(v, k));
207 | }
208 | });
209 | return list;
210 | }
211 |
212 | List getFields() {
213 | var j = json.decode(srcJson);
214 | if (j is Map) {
215 | return _getMapFiled(j);
216 | } else if (j is List) {
217 | var item = j[0];
218 | if (item is Map) {
219 | return _getMapFiled(item);
220 | }
221 | }
222 | return [];
223 | }
224 | }
225 |
226 | abstract class Field {
227 | String get typeString;
228 |
229 | String get nameString;
230 | }
231 |
232 | class SimpleField extends Field {
233 | @override
234 | String typeString;
235 |
236 | @override
237 | String nameString;
238 |
239 | SimpleField(this.typeString, this.nameString);
240 | }
241 |
242 | class ListField extends Field {
243 | List list;
244 |
245 | @override
246 | String nameString;
247 |
248 | ListField(this.list, this.nameString);
249 |
250 | bool get childIsObject {
251 | if (list == null || list.isEmpty) {
252 | return false;
253 | }
254 | if (list[0] is Map) {
255 | return true;
256 | }
257 | return false;
258 | }
259 |
260 | String get typeName {
261 | String type = "dynamic";
262 | if (list == null || list.isEmpty) {
263 | return type;
264 | }
265 | var item = list[0];
266 |
267 | if (item is List) {
268 | type = "${ListField(item, "").typeString}";
269 | } else if (item is Map) {
270 | type = "${firstLetterUpper(nameString)}";
271 | } else if (item is int) {
272 | type = "int";
273 | } else if (item is double) {
274 | type = "double";
275 | } else if (item is String) {
276 | type = "String";
277 | } else if (item is bool) {
278 | type = "bool";
279 | }
280 |
281 | return type;
282 | }
283 |
284 | @override
285 | String get typeString {
286 | return "List<$typeName>";
287 | }
288 | }
289 |
290 | class MapField extends Field {
291 | Map map;
292 | String nameString;
293 |
294 | MapField(this.map, this.nameString);
295 |
296 | @override
297 | String get typeString {
298 | return firstLetterUpper(nameString);
299 | }
300 | }
301 |
302 | String createCode(Template template) {
303 | var code = """${template.declare()}
304 | ${template.field()}
305 | ${template.constructor()}
306 |
307 | ${template.method()}
308 |
309 | ${template.end()}
310 |
311 | """;
312 | return code;
313 | }
314 |
315 | String firstLetterUpper(String value) {
316 | if (value == null || value.isEmpty) {
317 | return "";
318 | }
319 | return value[0].toUpperCase() + value.substring(1);
320 | }
321 |
322 | String firstLetterLower(String value) {
323 | if (value == null || value.isEmpty) {
324 | return "";
325 | }
326 | return value[0].toLowerCase() + value.substring(1);
327 | }
328 |
--------------------------------------------------------------------------------
/lib/test.dart:
--------------------------------------------------------------------------------
1 | void main() {}
2 |
3 | String camelCase2UnderScoreCase(String name) {
4 | return name.replaceAllMapped(RegExp("[A-Z]"), (match) {
5 | var str = match.group(0);
6 | return "_" + str.toLowerCase();
7 | });
8 | }
9 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: json2dart_serialization
2 | description: 一个网页版本的json转dart库
3 | # version: 1.0.0
4 | #homepage: https://www.example.com
5 | #author: Caijinglong
6 |
7 | environment:
8 | sdk: '>=2.0.0-dev.68.0 <3.0.0'
9 |
10 | #dependencies:
11 | # path: ^1.4.1
12 | dependencies:
13 | # Your other regular dependencies here
14 | json_annotation: ^3.0.0
15 | intl: ^0.15.8
16 |
17 | dev_dependencies:
18 | build_runner: ^1.6.6
19 | build_web_compilers: ^2.2.3
20 | json_serializable: ^3.2.0
--------------------------------------------------------------------------------
/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CaiJingLong/json2dart/c263e29146f948d577fc9fbbc6f4a97ea7e84895/web/favicon.ico
--------------------------------------------------------------------------------
/web/github_logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CaiJingLong/json2dart/c263e29146f948d577fc9fbbc6f4a97ea7e84895/web/github_logo.jpg
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | json2dart_for_json_serializable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
32 |
33 | v0.x.x
41 | v1.x.x
48 |
49 |
50 |
66 |
67 |
68 |
69 |
70 |
71 |
76 |
82 |
83 |
84 |
85 |
86 | format
87 |
88 |
89 | edit class name
90 | copy
91 | download
92 |
93 |
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/web/index_ch.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | json2dart_for_json_serializable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
49 |
50 |
66 |
67 |
68 |
73 |
74 |
75 |
76 |
82 |
83 |
84 |
85 |
86 | 格式化
87 |
88 |
89 | 编辑
90 | 复制
91 | 下载
92 |
93 |
94 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/web/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:json2dart_serialization/json_generator.dart' as app;
2 |
3 | void main() {
4 | app.main();
5 | }
6 |
--------------------------------------------------------------------------------
/web/styles.css:
--------------------------------------------------------------------------------
1 | @import url(https://fonts.googleapis.com/css?family=Roboto);
2 |
3 | html,
4 | body {
5 | width: 100%;
6 | height: 100%;
7 | margin: 0;
8 | padding: 0;
9 | font-family: 'Roboto', sans-serif;
10 | }
11 |
12 | h1 {
13 | text-align: center;
14 | }
15 |
16 | .half_span {
17 | width: 50%;
18 | float: left;
19 | text-align: center;
20 | }
21 |
22 | textarea {
23 | width: 86%;
24 | }
25 |
26 | .content {
27 | padding-top: 5vh;
28 | }
29 |
30 | .func .half_span {
31 | height: 7rem;
32 | padding-top: 1rem;
33 | }
34 |
35 | button {
36 | width: 9rem;
37 | height: 2rem;
38 | font-size: 1rem;
39 | }
40 |
41 | #file_name {
42 | font-size: 0.5rem;
43 | padding-top: 5px;
44 | color: mediumvioletred;
45 | }
46 |
47 | .lang {
48 | padding-right: 1vw;
49 | padding-top: 1vh;
50 | text-align: right;
51 | }
52 |
53 | a {
54 | color: blue;
55 | text-decoration: none;
56 | }
57 | a:hover {
58 | text-decoration-line: underline;
59 | }
60 |
61 | .version {
62 | font-size: 10px;
63 | text-align: center;
64 | }
65 |
66 | .content_area {
67 | height: 60vh;
68 | }
69 |
70 | #class_name {
71 | width: 86%;
72 | background-color: rgba(255, 255, 0, 0.164);
73 | height: 60vh;
74 | }
75 |
--------------------------------------------------------------------------------