-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathb0xfile__chunk-214218f0.e57955ea.js.go
22 lines (18 loc) · 178 KB
/
b0xfile__chunk-214218f0.e57955ea.js.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package knife4go
import (
"os"
)
func init() {
f, err := FS.OpenFile(CTX, "/chunk-214218f0.e57955ea.js", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0777)
if err != nil {
panic(err)
}
_, err = f.Write([] byte(base64Decoding("KHdpbmRvdy53ZWJwYWNrSnNvbnA9d2luZG93LndlYnBhY2tKc29ucHx8W10pLnB1c2goW1siY2h1bmstMjE0MjE4ZjAiXSx7IjA2OTYiOmZ1bmN0aW9uKGUsdCxuKXthY2UuZGVmaW5lKCJhY2UvbW9kZS94bWxfaGlnaGxpZ2h0X3J1bGVzIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIiwiYWNlL2xpYi9vb3AiLCJhY2UvbW9kZS90ZXh0X2hpZ2hsaWdodF9ydWxlcyJdLChmdW5jdGlvbihlLHQsbil7InVzZSBzdHJpY3QiO3ZhciByPWUoIi4uL2xpYi9vb3AiKSxvPWUoIi4vdGV4dF9oaWdobGlnaHRfcnVsZXMiKS5UZXh0SGlnaGxpZ2h0UnVsZXMsaT1mdW5jdGlvbihlKXt2YXIgdD0iW186YS16QS1aw4At77+/XVstXzouYS16QS1aMC05w4At77+/XSoiO3RoaXMuJHJ1bGVzPXtzdGFydDpbe3Rva2VuOiJzdHJpbmcuY2RhdGEueG1sIixyZWdleDoiPFxcIVxcW0NEQVRBXFxbIixuZXh0OiJjZGF0YSJ9LHt0b2tlbjpbInB1bmN0dWF0aW9uLmluc3RydWN0aW9uLnhtbCIsImtleXdvcmQuaW5zdHJ1Y3Rpb24ueG1sIl0scmVnZXg6Iig8XFw/KSgiK3QrIikiLG5leHQ6InByb2Nlc3NpbmdfaW5zdHJ1Y3Rpb24ifSx7dG9rZW46ImNvbW1lbn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Xt3cz0iWyIrd3MrIl0iO3ZhciB0cmltQmVnaW5SZWdleHA9UmVnRXhwKCJeIit3cyt3cysiKiIpLHRyaW1FbmRSZWdleHA9UmVnRXhwKHdzK3dzKyIqJCIpO1N0cmluZy5wcm90b3R5cGUudHJpbT1mdW5jdGlvbigpe3JldHVybih0aGlzKyIiKS5yZXBsYWNlKHRyaW1CZWdpblJlZ2V4cCwiIikucmVwbGFjZSh0cmltRW5kUmVnZXhwLCIiKX19dmFyIHRvT2JqZWN0PWZ1bmN0aW9uKG8pe2lmKG51bGw9PW8pdGhyb3cgbmV3IFR5cGVFcnJvcigiY2FuXCd0IGNvbnZlcnQgIitvKyIgdG8gb2JqZWN0Iik7cmV0dXJuIE9iamVjdChvKX19KTsnfX1dKTs=")))
if err != nil {
panic(err)
}
err = f.Close()
if err != nil {
panic(err)
}
}