commit 5673d107e7b5356fde9c64a9ed4cfaa4f0da4157 Author: 宇天 Date: Thu Dec 31 12:19:49 2020 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f66ccf --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +.DS_Store +.AppleDouble +.LSOverride +.idea +._* +.Spotlight-V100 +.Trashes + + +build +build/** + +node_modules +node_modules/** + +package-lock.json \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..473f63e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Main Process", + "type": "node", + "request": "launch", + "cwd": "${workspaceRoot}", + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", + "windows": { + "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" + }, + "args": ["."] + } + ] +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..ab60297 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f9e69f --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +## E-pub Reader +> E-pub Reader, 它不是功能最强的, 但可能是UI最耐看的, 最适合看技术类电子书的。 + + diff --git a/icons/128x128.png b/icons/128x128.png new file mode 100644 index 0000000..96bbb49 Binary files /dev/null and b/icons/128x128.png differ diff --git a/icons/256x256.png b/icons/256x256.png new file mode 100644 index 0000000..7c7aafe Binary files /dev/null and b/icons/256x256.png differ diff --git a/icons/512x512.png b/icons/512x512.png new file mode 100644 index 0000000..a9917a9 Binary files /dev/null and b/icons/512x512.png differ diff --git a/icons/app.icns b/icons/app.icns new file mode 100644 index 0000000..b6b48e9 Binary files /dev/null and b/icons/app.icns differ diff --git a/icons/epub.psd b/icons/epub.psd new file mode 100644 index 0000000..f67d1f7 Binary files /dev/null and b/icons/epub.psd differ diff --git a/package.json b/package.json new file mode 100644 index 0000000..d5bc8f2 --- /dev/null +++ b/package.json @@ -0,0 +1,44 @@ +{ + "name": "org.bytedo.epub", + "version": "2.1.2", + "description": "E-pub Reader", + "main": "src/main.js", + "scripts": { + "start": "electron .", + "pack": "electron-builder", + "pack:mac": "electron-builder --mac" + }, + "author": { + "name": "yutent", + "email": "yutent.io@gmail.com" + }, + "homepage": "https://yutent.top", + "license": "MIT", + "build": { + "appId": "org.bytedo.epub", + "productName": "E-pub Reader", + "copyright": "Copyright © 2019 ${author}", + "directories": { + "buildResources": "icons", + "output": "build" + }, + "electronDownload": { + "version": "11.0.4", + "mirror": "https://npm.taobao.org/mirrors/electron/" + }, + "files": ["src/**/*", "node_modules/iofs/*"], + "mac": { + "category": "public.app-category.developer-tools", + "target": "dmg", + "icon": "icons/app.icns", + "darkModeSupport": false + } + }, + "devDependencies": { + "electron": "11.0.4", + "electron-builder": "^22.1.0" + }, + "dependencies": { + "iofs": "^1.3.2" + } +} diff --git a/src/css/app.css b/src/css/app.css new file mode 100644 index 0000000..4811d2a --- /dev/null +++ b/src/css/app.css @@ -0,0 +1 @@ +html{font-size:12.8px;width:100%;height:100vh}body{overflow:hidden;display:flex;flex-direction:column;width:100%;height:100%;line-height:1.25;font-size:14px;color:var(--color-dark-1);background:rgba(255,255,255,0.3)}.app-drag{-webkit-app-region:drag;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.app-nodrag{-webkit-app-region:no-drag}.app{position:relative;display:flex;height:100%}.app .sidebar{display:flex;flex-direction:column;justify-content:space-between;width:76px;height:100%;padding:48px 22px 24px;background:var(--color-dark-1);color:var(--color-plain-1)}.app .sidebar .item{cursor:pointer}.app .sidebar .item:hover,.app .sidebar .item.active{color:var(--color-orange-1)}.app .sidebar .item:active{color:var(--color-orange-2)}.app .select-box{display:flex;flex-direction:column;width:200px;height:100%;background:rgba(255,255,255,0.5)}.app .select-box .form{display:flex;align-items:center;width:100%;height:35px;padding:0 6px;background:#fff;border-bottom:1px solid var(--color-plain-2)}.app .select-box .form wc-input{flex:1}.app .select-box .list{flex:1}.app .select-box .list .item{display:flex;flex-direction:column;justify-content:center;height:48px;padding:6px;border-bottom:1px solid rgba(200,200,200,0.3);transition:color 0.15s ease-in-out, background 0.15s ease-in-out;cursor:pointer}.app .select-box .list .item section{display:flex;justify-content:space-between;align-items:center}.app .select-box .list .item cite{color:var(--color-grey-2)}.app .select-box .list .item .percent{padding:0 4px;border-radius:2px;font-size:12px;font-weight:bold;color:var(--color-grey-1)}.app .select-box .list .item .percent.red{color:var(--color-red-1)}.app .select-box .list .item .percent.green{color:var(--color-green-3)}.app .select-box .list .item:last-child{border-bottom:0}.app .select-box .list .item:hover{color:var(--color-blue-1);background:rgba(255,255,255,0.7)}.app .select-box .list .item.active{color:var(--color-plain-1);background:var(--color-blue-1)}.app .select-box .list .item.active cite{color:inherit}.app .select-box .list .item.active .percent{color:#fff}.app .detail{position:relative;flex:1;height:100%;border-left:1px solid var(--color-plain-2);background:#fff}.app .detail .title{display:flex;justify-content:space-between;align-items:center;width:100%;height:35px;padding:0 16px;font-size:16px;font-weight:bold}.app .detail .title span{display:inline-flex}.app .detail .title wc-button{margin:0 6px}.app .detail .card{width:96%;padding:12px 12px 16px;margin:12px 2% 24px;border:0;background:#fff;box-shadow:0 0 8px rgba(0,0,0,0.075)}.app .detail .card legend{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#64b5f6}.app .detail.blur::after{display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;z-index:999;width:100%;height:100%;content:'搞基数据';background:#fff;color:#f7f8fb;font-size:100px}.app .preferences{width:640px;height:360px;border-radius:10px}.app .preferences .titlebar{width:100%;height:72px;border-bottom:1px solid var(--color-plain-3);background:var(--color-plain-1)}.app .preferences .titlebar .title{width:100%;height:24px;line-height:24px;text-align:center}.app .preferences .titlebar nav{display:flex;width:100%;height:40px;padding:0 16px;--size: 18px}.app .preferences .titlebar nav span{display:flex;flex-direction:column;align-items:center;justify-content:center;width:52px;height:40px;margin:0 6px;border-radius:6px;font-size:12px}.app .preferences .titlebar nav span.active{background:var(--color-plain-2);color:var(--color-blue-1)}.app .preferences .titlebar nav span:hover{background:var(--color-plain-2)}.app .preferences .tab-panel{padding:64px}.app .preferences .tab-panel p{margin-bottom:16px}.app .preferences .tab-panel .field{display:flex;align-items:center;height:64px}.app .preferences .tab-panel .field .label{width:200px;color:var(--color-grey-1)}.app.loading::after{display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0;z-index:999;width:100%;height:100%;content:'🌑';background:rgba(255,255,255,0.01);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);color:var(--color-orange-1);font-size:50px;-webkit-animation:loading 1s infinite;animation:loading 1s infinite}@-webkit-keyframes loading{1%,100%{content:'🌑'}12.5%{content:'🌒'}25%{content:'🌓'}37.5%{content:'🌔'}50%{content:'🌕'}62.5%{content:'🌖'}75%{content:'🌗'}87.5%{content:'🌘'}}@keyframes loading{1%,100%{content:'🌑'}12.5%{content:'🌒'}25%{content:'🌓'}37.5%{content:'🌔'}50%{content:'🌕'}62.5%{content:'🌖'}75%{content:'🌗'}87.5%{content:'🌘'}} diff --git a/src/css/app.scss b/src/css/app.scss new file mode 100644 index 0000000..4b3039e --- /dev/null +++ b/src/css/app.scss @@ -0,0 +1,319 @@ +@charset "UTF-8"; +/** + * 主窗口样式 + * @authors yutent + * @date 2018/12/16 17:15:07 + */ + +html { + font-size: 12.8px; + width: 100%; + height: 100vh; +} + +body { + overflow: hidden; + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + line-height: 1.25; + font-size: 14px; + color: var(--color-dark-1); + background: rgba(255, 255, 255, 0.3); +} + +.app-drag { + -webkit-app-region: drag; + user-select: none; +} +.app-nodrag { + -webkit-app-region: no-drag; +} + +.app { + position: relative; + display: flex; + height: 100%; + + .sidebar { + display: flex; + flex-direction: column; + justify-content: space-between; + width: 76px; + height: 100%; + padding: 48px 22px 24px; + background: var(--color-dark-1); + color: var(--color-plain-1); + + .item { + cursor: pointer; + + &:hover, + &.active { + color: var(--color-orange-1); + } + &:active { + color: var(--color-orange-2); + } + } + } + + .select-box { + display: flex; + flex-direction: column; + width: 200px; + height: 100%; + background: rgba(255, 255, 255, 0.5); + + .form { + display: flex; + align-items: center; + width: 100%; + height: 35px; + padding: 0 6px; + background: #fff; + border-bottom: 1px solid var(--color-plain-2); + + wc-input { + flex: 1; + } + } + + .list { + flex: 1; + + .item { + display: flex; + flex-direction: column; + justify-content: center; + height: 48px; + padding: 6px; + border-bottom: 1px solid rgba(200, 200, 200, 0.3); + transition: color 0.15s ease-in-out, background 0.15s ease-in-out; + cursor: pointer; + + section { + display: flex; + justify-content: space-between; + align-items: center; + } + + cite { + color: var(--color-grey-2); + } + + .percent { + padding: 0 4px; + border-radius: 2px; + font-size: 12px; + font-weight: bold; + color: var(--color-grey-1); + + &.red { + color: var(--color-red-1); + } + &.green { + color: var(--color-green-3); + } + } + + &:last-child { + border-bottom: 0; + } + + &:hover { + color: var(--color-blue-1); + background: rgba(255, 255, 255, 0.7); + } + + &.active { + color: var(--color-plain-1); + background: var(--color-blue-1); + + cite { + color: inherit; + } + + .percent { + color: #fff; + } + } + } + } + } + + .detail { + position: relative; + flex: 1; + height: 100%; + border-left: 1px solid var(--color-plain-2); + background: #fff; + + .title { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + height: 35px; + padding: 0 16px; + font-size: 16px; + font-weight: bold; + + span { + display: inline-flex; + } + wc-button { + margin: 0 6px; + } + } + + .card { + width: 96%; + padding: 12px 12px 16px; + margin: 12px 2% 24px; + border: 0; + background: #fff; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.075); + + legend { + -webkit-touch-callout: none; + user-select: none; + color: #64b5f6; + } + } + + &.blur { + &::after { + display: flex; + justify-content: center; + align-items: center; + position: absolute; + left: 0; + top: 0; + z-index: 999; + width: 100%; + height: 100%; + content: '搞基数据'; + background: #fff; + color: #f7f8fb; + font-size: 100px; + } + } + } + + .preferences { + width: 640px; + height: 360px; + border-radius: 10px; + + .titlebar { + width: 100%; + height: 72px; + border-bottom: 1px solid var(--color-plain-3); + background: var(--color-plain-1); + + .title { + width: 100%; + height: 24px; + line-height: 24px; + text-align: center; + } + + nav { + display: flex; + width: 100%; + height: 40px; + padding: 0 16px; + + span { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 52px; + height: 40px; + margin: 0 6px; + border-radius: 6px; + font-size: 12px; + + &.active { + background: var(--color-plain-2); + color: var(--color-blue-1); + } + &:hover { + background: var(--color-plain-2); + } + } + --size: 18px; + } + } + + .tab-panel { + padding: 64px; + + p { + margin-bottom: 16px; + } + + .field { + display: flex; + align-items: center; + height: 64px; + + .label { + width: 200px; + color: var(--color-grey-1); + } + } + } + } + + &.loading { + &::after { + display: flex; + justify-content: center; + align-items: center; + position: absolute; + left: 0; + top: 0; + z-index: 999; + width: 100%; + height: 100%; + content: '🌑'; + background: rgba(255, 255, 255, 0.01); + backdrop-filter: blur(2px); + color: var(--color-orange-1); + font-size: 50px; + animation: loading 1s infinite; + } + } +} + +@keyframes loading { + 1%, + 100% { + content: '🌑'; + } + 12.5% { + content: '🌒'; + } + 25% { + content: '🌓'; + } + 37.5% { + content: '🌔'; + } + 50% { + content: '🌕'; + } + 62.5% { + content: '🌖'; + } + 75% { + content: '🌗'; + } + 87.5% { + content: '🌘'; + } +} diff --git a/src/css/float.css b/src/css/float.css new file mode 100644 index 0000000..49cecd4 --- /dev/null +++ b/src/css/float.css @@ -0,0 +1 @@ +html{font-size:12.8px;width:100%;height:100vh}body{display:flex;flex-direction:column;width:100%;height:100%;line-height:1.25;font-size:14px;color:var(--color-dark-1);background:rgba(255,255,255,0.3)}.app-drag{-webkit-app-region:drag;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.app-nodrag{-webkit-app-region:no-drag}.app{position:relative;display:flex;flex-direction:column;height:100%;padding:6px 0}.app .list{flex:1}.app .list .item{display:flex;align-items:center;height:54px;padding:10px 12px;line-height:15px;border-bottom:1px solid rgba(155,155,155,0.3)}.app .list .item:last-child{border-bottom:0}.app .list .item .info{overflow:hidden;flex:1}.app .list .item .info h3{font-size:14px}.app .list .item .info cite{color:var(--color-grey-2)}.app .list .item .last-days{display:flex;width:64px;height:30px;margin:0 6px}.app .list .item .today{width:52px;font-size:12px;text-align:right}.app .list .item .today span{display:block;padding:0 4px}.app .list .item .today .percent{border-radius:2px;color:#fff}.app .list .item .today .percent.red{background:var(--color-red-1)}.app .list .item .today .percent.green{background:var(--color-green-3)} diff --git a/src/css/float.scss b/src/css/float.scss new file mode 100644 index 0000000..fee5379 --- /dev/null +++ b/src/css/float.scss @@ -0,0 +1,97 @@ +@charset "UTF-8"; +/** + * 浮窗样式 + * @authors yutent + * @date 2018/12/16 17:15:07 + */ + +html { + font-size: 12.8px; + width: 100%; + height: 100vh; +} + +body { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + line-height: 1.25; + font-size: 14px; + color: var(--color-dark-1); + background: rgba(255, 255, 255, 0.3); +} + +.app-drag { + -webkit-app-region: drag; + user-select: none; +} +.app-nodrag { + -webkit-app-region: no-drag; +} + +.app { + position: relative; + display: flex; + flex-direction: column; + height: 100%; + padding: 6px 0; + + .list { + flex: 1; + + .item { + display: flex; + align-items: center; + height: 54px; + padding: 10px 12px; + line-height: 15px; + border-bottom: 1px solid rgba(155, 155, 155, 0.3); + + &:last-child { + border-bottom: 0; + } + + .info { + overflow: hidden; + flex: 1; + + h3 { + font-size: 14px; + } + cite { + color: var(--color-grey-2); + } + } + + .last-days { + display: flex; + width: 64px; + height: 30px; + margin: 0 6px; + } + + .today { + width: 52px; + font-size: 12px; + text-align: right; + + span { + display: block; + padding: 0 4px; + } + .percent { + border-radius: 2px; + color: #fff; + + &.red { + background: var(--color-red-1); + } + &.green { + background: var(--color-green-3); + } + } + } + } + } +} diff --git a/src/images/app.png b/src/images/app.png new file mode 100644 index 0000000..7c7aafe Binary files /dev/null and b/src/images/app.png differ diff --git a/src/images/tray@1x.png b/src/images/tray@1x.png new file mode 100644 index 0000000..eb2a316 Binary files /dev/null and b/src/images/tray@1x.png differ diff --git a/src/images/tray@2x.png b/src/images/tray@2x.png new file mode 100644 index 0000000..af553c1 Binary files /dev/null and b/src/images/tray@2x.png differ diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..e387237 --- /dev/null +++ b/src/index.html @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +
+ + + +
+
+ + +
+ + + +
+ + + +
+
+
+
+ + +
+
+ [{{curr.code}}] {{curr.name}} + + + + + + +
+ +
+ 实时数据 + +
+ +
+ 单位净值走势 + +
+ +
+ + +
+
+
hello
+ +
+ +
+
+ 神奇的2点半提醒 + +
+
+ +
+

“搞基爱啪啪” 是一款开源的, 非专业的搞基软件, 上面的数据全来自网络, 不对准确性作任何保证.

+

搞基有风险, 入行需谨慎. 你亏了别找我, 赚了可以给我发红包.

+ +
+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 0000000..9eff464 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1,311 @@ +/** + * {sonist app} + * + * @format + * @author yutent + * @date 2018/12/16 17:15:57 + */ + +import '/lib/anot.js' +import '/lib/form/button.js' +import '/lib/form/switch.js' +import '/lib/scroll/index.js' +import '/lib/chart/rank.js' +import '/lib/chart/line.js' + +import layer from '/lib/layer/index.js' +import Utils from '/lib/utils.js' + +import app from '/lib/socket.js' + +const log = console.log + +function getJsonp(str) { + if (~str.indexOf('jsonpgz')) { + return new Function(`function jsonpgz(d){return d}; return ${str}`)() + } + return false +} + +function getLineStat(str) { + return new Function(`${str}; return {line: Data_netWorthTrend.map(it => ({ + x: ~~(it.x/1000), + y: +(it.y * 10000).toFixed(0), + p: it.equityReturn + })), e1: +syl_1y, e3: +syl_3y, e6: +syl_6y, e12: +syl_1n}`)() +} + +function sleep(ms) { + return new Promise(_ => setTimeout(_, ms)) +} + +window.app = app + +Anot({ + $id: 'app', + state: { + input: '', + curr: { + code: '', + name: '', + stat: '', + line: '' + }, + list: [], + $dict: {}, + loading: false, + preferences: { + tab: 1, + notify: Anot.ls('notify') === '1' + } + }, + + watch: { + 'preferences.notify'(v) { + Anot.ls('notify', v ^ 0) + if (v) { + app.dispatch('notify') + } + } + }, + + mounted() { + var old = this.syncOldStat() + + if (old === false) { + this.reloadGays() + } + + if (this.preferences.notify) { + app.dispatch('notify') + } + + app.on('data-reload', data => { + this.reloadGays() + }) + }, + methods: { + reloadGays() { + var gays = Anot.ls('gays') || '{}' + var list = [] + gays = JSON.parse(gays) + + for (let code in gays) { + let { name, cm, cp, t } = gays[code] + list.push({ code, name, cm, cp, t: t || 0 }) + this.$dict[code] = 1 + } + list.sort((a, b) => b.cp - a.cp) + + this.list = list + }, + + syncOldStat() { + var old = Anot.ls('watch_list') + var list = [] + var dict = {} + + if (old) { + old = JSON.parse(old) + for (let it of old) { + dict[it.code] = { + name: it.name, + cm: +it.curr, + cp: it.percent, + t: Date.now() + } + list.push({ code: it.code, ...dict[it.code] }) + } + + list.sort((a, b) => b.cp - a.cp) + this.list = list + + Anot.ls('gays', dict) + Anot.ls('watch_list', null) + return true + } + return false + }, + + showPreferencesPanel() { + this.$refs.pre.show() + }, + + switchTab(n) { + this.preferences.tab = n + }, + + getGayStat(id) { + var res = app.dispatch( + 'fetch', + `https://fundgz.1234567.com.cn/js/${id}.js` + ) + return getJsonp(res) + }, + + addGay() { + var code = this.input + var gay + + if (this.$dict[code]) { + layer.toast('这个鸡精在列表呢~~~', 'warn') + this.input = '' + return + } + + if (code === 'debug') { + this.input = '' + return app.dispatch('devtools') + } + + if (code.length < 6) { + return + } + + if (/[^\d]/.test(code)) { + layer.toast('只能通过鸡精编号添加', 'error') + this.input = '' + return + } + + gay = this.getGayStat(code) + + if (gay) { + let tmp = { + code: gay.fundcode, + name: gay.name, + cm: +gay.gsz, + cp: +gay.gszzl, + t: Date.now() + } + this.input = '' + this.list.push(tmp) + this.$dict[tmp.code] = 1 + this.list.sort((a, b) => b.cp - a.cp) + this.saveCache() + } else { + layer.toast('鸡精不存在', 'error') + } + }, + + async updateGays() { + var { code, stat } = this.curr + + this.loading = true + for (let it of this.list) { + // + let info = this.getGayStat(it.code) + let time, needUpdate + + it.cm = +info.gsz + it.cp = +info.gszzl + + time = new Date(info.gztime.slice(0, 10) + ' 00:00:00') + time = ~~(time.getTime() / 1000) - 24 * 3600 + + // 如果走势最后的日期比当前最新的小, 则全量更新 + if (it.t < time) { + it.t = time + needUpdate = this.updateLine(it.code) + } + + if (it.code === code) { + stat = JSON.parse(stat) + stat.cm = it.cm + stat.cp = it.cp + if (needUpdate) { + stat.rank = needUpdate.line.slice(-60).map(_ => _.p) + stat.e1 = needUpdate.e1 + stat.e3 = needUpdate.e3 + stat.e6 = needUpdate.e6 + stat.e12 = needUpdate.e12 + this.curr.line = JSON.stringify(needUpdate.line) + } + this.curr.stat = JSON.stringify(stat) + } + await sleep(500) + } + // + this.loading = false + Anot.ss('last_update', Date.now()) + layer.toast('数据更新成功', 'success') + this.list.sort((a, b) => b.cp - a.cp) + this.saveCache() + }, + + removeGay() { + var { code, name } = this.curr + layer + .confirm(`是否移除「${name}」?`) + .then(_ => { + for (let it of this.list) { + if (it.code === code) { + this.list.remove(it) + delete this.$dict[code] + Anot.ls(code, null) + this.saveCache() + break + } + } + this.viewGay(this.list[0]) + }) + .catch(Anot.noop) + }, + + saveCache() { + var dict = {} + for (let it of this.list) { + var { code, name, cm, cp, t } = it + dict[code] = { name, cm, cp, t } + } + Anot.ls('gays', dict) + }, + + updateLine(code) { + var gay = app.dispatch( + 'fetch', + `http://fund.eastmoney.com/pingzhongdata/${code}.js?v=${Date.now()}` + ) + gay = getLineStat(gay) + Anot.ls(code, JSON.stringify(gay)) + return gay + }, + + viewGay(item) { + var gay = Anot.ls(item.code) + var rank, line + var { cm, cp, t } = item + + this.curr.code = item.code + this.curr.name = item.name + + if (gay) { + gay = JSON.parse(gay) + var last = gay.line[gay.line.length - 1].x + if (last < t) { + gay = null + } + } + + if (!gay) { + gay = this.updateLine(item.code) + item.t = gay.line[gay.line.length - 1].x + this.saveCache() + } + + rank = gay.line.slice(-60).map(_ => _.p) + line = JSON.stringify(gay.line) + + this.curr.stat = JSON.stringify({ + rank, + e1: gay.e1, + e3: gay.e3, + e6: gay.e6, + e12: gay.e12, + cm, + cp + }) + this.curr.line = line + } + } +}) diff --git a/src/js/float.js b/src/js/float.js new file mode 100644 index 0000000..0b70692 --- /dev/null +++ b/src/js/float.js @@ -0,0 +1,94 @@ +/** + * + * @author yutent + * @date 2020/12/10 19:53:05 + */ + +import '/lib/anot.js' + +import '/lib/scroll/index.js' +import layer from '/lib/layer/index.js' +import app from '/lib/socket.js' + +function getJsonp(str) { + if (~str.indexOf('jsonpgz')) { + return new Function(`function jsonpgz(d){return d}; return ${str}`)() + } + return false +} + +Anot({ + $id: 'app', + state: { + list: [] + }, + mounted() { + this.reloadGays() + + app.on('float-visible', data => { + var time = +Anot.ss('last_update') || 0 + var now = Date.now() + + // 有触发小窗口显示时, 更新通知提醒 + if (Anot.ls('notify') === '1') { + app.dispatch('notify') + } + + this.reloadGays() + setTimeout(() => { + // 如果离上次更新超过15分钟, 则自动更新 + if (now - time > 15 * 60 * 1000) { + this.updateGays() + Anot.ss('last_update', now) + } + }, 500) + }) + }, + methods: { + reloadGays() { + var gays = Anot.ls('gays') || '{}' + var list = [] + + gays = JSON.parse(gays) + + for (let code in gays) { + let { name, cm, cp, t } = gays[code] + list.push({ code, name, cm, cp, t }) + } + list.sort((a, b) => b.cp - a.cp) + + this.list = list + }, + + getGayStat(id) { + var res = app.dispatch( + 'fetch', + `https://fundgz.1234567.com.cn/js/${id}.js` + ) + return getJsonp(res) + }, + + updateGay(item) { + var info = this.getGayStat(item.code) + item.cm = +info.gsz + item.cp = +info.gszzl + }, + + updateGays() { + for (let it of this.list) { + this.updateGay(it) + } + this.list.sort((a, b) => b.cp - a.cp) + this.saveCache() + app.dispatch('data-reload') + }, + saveCache() { + var dict = {} + for (let it of this.list) { + var { code, name, cm, cp, t } = it + dict[code] = { name, cm, cp, t } + } + Anot.ls('gays', dict) + } + } +}) diff --git a/src/lib/anot.js b/src/lib/anot.js new file mode 100644 index 0000000..2f010fd --- /dev/null +++ b/src/lib/anot.js @@ -0,0 +1,8 @@ +/*================================================== + * Anot normal version for future browsers + * @authors yutent (yutent@doui.cc) + * @date 2017-03-21 21:05:57 + * V2.0.0 + * + ==================================================*/ + const _Anot=function(){var e=1024,t=A(),n=window.document,r=n.head;r.insertAdjacentHTML("afterbegin",'');var i=r.firstChild;function a(){console.log.apply(console,arguments)}function o(){return Object.create(null)}var s=encodeURIComponent,c=decodeURIComponent,l="$"+t,u={},f=/[^, ]+/g,p=/\w+/g,d=/^\[object SVG\w*Element\]$/,h=Object.prototype,v=h.hasOwnProperty,m=h.toString,y=Array.prototype,g=y.slice,b=n.documentElement,$=n.createDocumentFragment(),x=(n.createElement("div"),{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object","[object Error]":"error","[object AsyncFunction]":"asyncfunction","[object Promise]":"promise","[object Generator]":"generator","[object GeneratorFunction]":"generatorfunction"});function w(){}function k(e){return Function.apply(w,e)}function C(e,t){"string"==typeof e&&(e=e.match(f)||[]);for(var n={},r=void 0!==t?t:1,i=0,a=e.length;i{e.resolve=t,e.reject=n}),e}),String.prototype.splice||Object.defineProperty(String.prototype,"splice",{value:function(e,t,n){let r=this.length,i=arguments.length;if(n=void 0===n?"":n,i<1)return this;if(e<0&&(e=Math.abs(e)>=r?0:r+e),1===i)return this.slice(0,e);return t-=0,this.slice(0,e)+n+this.slice(e+t)},enumerable:!1}),Date.prototype.getFullWeek||(Object.defineProperty(Date.prototype,"getFullWeek",{value:function(){let e=this.getFullYear(),t=new Date(e,0,1),n=t.getDay()||1,r=(this-t)/864e5;return Math.ceil((r+n)/7)},enumerable:!1}),Object.defineProperty(Date.prototype,"getWeek",{value:function(){let e=this.getDate(),t=this.getMonth(),n=this.getFullYear(),r=new Date(n,t,1).getDay();return Math.ceil((e+r)/7)},enumerable:!1})),Date.isDate||Object.defineProperty(Date,"isDate",{value:function(e){return!("object"!=typeof e||!e.getTime)},enumerable:!1}),Date.prototype.format||Object.defineProperty(Date.prototype,"format",{value:function(e){e=e||"Y-m-d H:i:s";let t,n={fullyear:this.getFullYear(),year:this.getYear(),fullweek:this.getFullWeek(),week:this.getWeek(),month:this.getMonth()+1,date:this.getDate(),day:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"][this.getDay()],hours:this.getHours(),minutes:this.getMinutes(),seconds:this.getSeconds()};n.g=n.hours>12?n.hours-12:n.hours,t={Y:n.fullyear,y:n.year,m:n.month<10?"0"+n.month:n.month,n:n.month,d:n.date<10?"0"+n.date:n.date,j:n.date,H:n.hours<10?"0"+n.hours:n.hours,h:n.g<10?"0"+n.g:n.g,G:n.hours,g:n.g,i:n.minutes<10?"0"+n.minutes:n.minutes,s:n.seconds<10?"0"+n.seconds:n.seconds,W:n.fullweek,w:n.week,D:n.day};for(let n in t)e=e.replace(new RegExp(n,"g"),t[n]);return e},enumerable:!1});let N=function(e){return new N.init(e)};N.nextTick=new function(){let e=window.setImmediate,t=window.MutationObserver;if(e)return e.bind(window);let n=[];if(t){let e=document.createTextNode("anot");new t(function(){let e=n.length;for(let t=0;t>>0)return!0}return!1}(e))for(let n=0,r=e.length;n1){if(!e)return;if(n=n||{},n=Object.assign({expires:"",path:"/",domain:document.domain,secure:""},n),"string"==this.type(t)&&""===t.trim()||null===t)return document.cookie=s(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; domain="+n.domain+"; path="+n.path,!0;if(n.expires)switch(n.expires.constructor){case Number:n.expires=n.expires===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n.expires;break;case String:n.expires="; expires="+n.expires;break;case Date:n.expires="; expires="+n.expires.toUTCString()}return document.cookie=s(e)+"="+s(t)+n.expires+"; domain="+n.domain+"; path="+n.path+"; "+n.secure,!0}return e?c(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+s(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null:document.cookie},search:function(e){e+="";let t=location.search;if(!e||!t)return null;t=(t=(t=c(t)).slice(1)).split("&");let n={};for(let e,r=0;e=t[r++];){let t=e.split("=");t[1]=t.length<2?null:t[1],t[1]=t[1],n.hasOwnProperty(t[0])?"object"==typeof n[t[0]]?n[t[0]].push(t[1]):(n[t[0]]=[n[t[0]]],n[t[0]].push(t[1])):n[t[0]]=t[1]}return n.hasOwnProperty(e)?n[e]:null},copy:function(e){try{navigator.clipboard.writeText(e)}catch(e){a("复制到粘贴板失败",e)}}});let O=N.bindingHandlers={},E=N.bindingExecutors={},S=N.directives={};N.directive=function(e,t){return O[e]=t.init=t.init||w,E[e]=t.update=t.update||w,S[e]=t};let D=new function(){function e(e){this.size=0,this.limit=e,this.head=this.tail=void 0,this._keymap={}}let t=e.prototype;return t.put=function(e,t){let n={key:e,value:t};return this._keymap[e]=n,this.tail?(this.tail.newer=n,n.older=this.tail):this.head=n,this.tail=n,this.size===this.limit?this.shift():this.size++,t},t.shift=function(){let e=this.head;e&&(this.head=this.head.newer,this.head.older=e.newer=e.older=this._keymap[e.key]=void 0,delete this._keymap[e.key])},t.get=function(e){let t=this._keymap[e];if(void 0!==t)return t===this.tail?t.value:(t.newer&&(t===this.head&&(this.head=t.newer),t.newer.older=t.older),t.older&&(t.older.newer=t.newer),t.newer=void 0,t.older=this.tail,this.tail&&(this.tail.newer=t),this.tail=t,t.value)},e};n.contains||(Node.prototype.contains=function(e){return!!(16&this.compareDocumentPosition(e))}),N.contains=function(e,t){try{for(;t=t.parentNode;)if(t===e)return!0;return!1}catch(e){return!1}};let _=N.eventHooks;function P(e){for(var t in e)if(v.call(e,t)){var n=e[t];"function"==typeof P.plugins[t]?P.plugins[t](n):"object"==typeof P[t]?N.mix(P[t],n):P[t]=n}return this}void 0===n.onmousewheel&&(_.mousewheel={type:"wheel",fix:function(e,t){return function(n){n.wheelDeltaY=n.wheelDelta=n.deltaY>0?-120:120,n.wheelDeltaX=0,Object.defineProperty(n,"type",{value:"mousewheel"}),t.call(e,n)}}}),N.config=P;var L,M,H,F,B=/[-.*+?^${}()|[\]\/\\]/g;function I(e){return(e+"").replace(B,"\\$&")}var R={interpolate:function(e){if(L=e[0],M=e[1],L===M)throw new SyntaxError("openTag!==closeTag");P.openTag=L,P.closeTag=M;var t=I(L),n=I(M);H=new RegExp(t+"([\\s\\S]*)"+n),F=new RegExp(t+"([\\s\\S]*)"+n,"g"),new RegExp(t+"[\\s\\S]*"+n+"|\\s:")}};function q(t,r){var i=this.$events||(this.$events={}),a=i[t]||(i[t]=[]);if("function"==typeof r){var o=r;o.uuid="_"+ ++e,(r={element:b,type:"user-watcher",handler:w,vmodels:[this],expr:t,uuid:o.uuid}).wildcard=/\*/.test(t)}if(r.update)r.oneTime||N.Array.ensure(a,r);else{if(/\w\.*\B/.test(t)||"*"===t){r.getter=w;var s=this;r.update=function(){var e=this.fireArgs||[];e[2]&&r.handler.apply(s,e),delete this.fireArgs},a.sync=!0,N.Array.ensure(a,r)}else N.injectBinding(r);o&&(r.handler=o)}return function(){r.update=r.getter=r.handler=w,r.element=n.createElement("a")}}function V(t,n){var r=this.$events,i=null;if(r&&r[t]){n&&(n[2]=t);var a=r[t];if(function(t,n){if(!t)return;new Date-se>444&&"object"==typeof t[0]&&le();for(var r,i=[],a=[],o=0;r=t[o++];)"user-watcher"===r.type?i.push(r):a.push(r);if(P.async){for(dt.render(),o=0;r=a[o++];)if(r.update){r.uuid=r.uuid||"_"+ ++e;var s=r.uuid;dt.queue[s]||(dt.queue[s]="__",dt.queue.push(r))}}else for(o=0;r=a[o++];)r.update&&r.update();for(o=0;r=i[o++];)(n&&n[2]===r.expr||r.wildcard)&&(r.fireArgs=n),r.update()}(a,n),n&&r["*"]&&!/\./.test(t))for(var o,s=0;o=r["*"][s++];)try{o.handler.apply(this,n)}catch(e){}(i=this.$up)&&(this.$pathname&&V.call(i,this.$pathname+"."+t,n),V.call(i,"*."+t,n))}else{if(i=this.$up,this.$ups){for(var c in this.$ups)V.call(this.$ups[c],c+"."+t,n);return}if(i){var l=this.$pathname;""===l&&(l="*");var u=l+"."+t;a=u.split("."),n=n&&n.concat([u,t])||[u,t],-1===a.indexOf("*")?(V.call(i,u,n),a[1]="*",V.call(i,a.join("."),n)):V.call(i,u,n)}}}P.plugins=R,P.plugins.interpolate(["{{","}}"]),P.async=!0,P.paths={},P.shim={},P.maxRepeatSize=100;var W=C("$id,$watch,$fire,$events,$model,$active,$pathname,$up,$ups,$track,$accessors");function z(e,t){return(t=t||{}).watch=!0,U(e,t)}function U(e,t){if(!e||e.$id&&e.$accessors||e.nodeName&&e.nodeType>0)return e;var n,r=(t=t||u).force||u,i=t.old,o=i&&i.$accessors||u,s=new function(){},c={},l={},f=[],p=[],d={},h=e.state,v=e.computed,m=e.methods,y=e.props,g=e.watch,b=e.mounted;if(delete e.state,delete e.computed,delete e.methods,delete e.props,delete e.watch,e.skip&&(d=C(e.skip),delete e.skip),h)for(x in e.$id&&delete h.props,h){var $=h[x];W[x]||(l[x]=!0),"function"==typeof $||$&&$.nodeName&&$.nodeType>0||!r[x]&&("$"===(n=x).charAt(0)||"__"===n.slice(0,2)||W[n]||d[x])?f.push(x):Y($)?(a("warning:计算属性建议放在[computed]对象中统一定义"),v[x]=$):(p.push(x),o[x]?c[x]=o[x]:c[x]=G(x,$))}if(v)for(var x in delete v.props,v)l[x]=!0,function(e,t){var n;"function"==typeof t&&(t={get:t,set:w}),"function"!=typeof t.set&&(t.set=w),c[e]={get:function(){return n=t.get.call(this)},set:function(r){var i,a=n;t.set.call(this,r),i=this[e],this.$fire&&i!==a&&this.$fire(e,i,a)},enumerable:!0,configurable:!0}}(x,v[x]);if(m)for(var x in delete m.props,m)l[x]=!0,f.push(x);if(y)for(var x in X(s,"props",{}),l.props=!!e.$id,y)s.props[x]=y[x];if(Object.assign(e,h,m),c.$model=Z,s=Object.defineProperties(s,c,e),f.forEach(function(t){s[t]=e[t]}),X(s,"$id","anonymous"),X(s,"$up",i?i.$up:null),X(s,"$track",Object.keys(l)),X(s,"$active",!1),X(s,"$pathname",i?i.$pathname:""),X(s,"$accessors",c),X(s,"$events",{}),X(s,"$refs",{}),X(s,"$children",[]),X(s,"hasOwnProperty",function(e){return!0===l[e]}),X(s,"$mounted",b),t.watch&&(X(s,"$watch",function(){return q.apply(s,arguments)}),X(s,"$fire",function(e,t){if(0===e.indexOf("all!")){var n=e.slice(4);for(var r in N.vmodels){(i=N.vmodels[r]).$fire&&i.$fire.apply(i,[n,t])}}else if(0===e.indexOf("child!")){n="props."+e.slice(6);for(var r in s.$children){var i;(i=s.$children[r]).$fire&&i.$fire.apply(i,[n,t])}}else V.call(s,e,[t])})),p.forEach(function(e){var t=i&&i[e],n=s[e]=h[e];n&&"object"==typeof n&&!Date.isDate(n)&&(n.$up=s,n.$pathname=e),V.call(s,e,[n,t])}),g)for(var k in delete g.props,g)if(Array.isArray(g[k]))for(var A;A=g[k].pop();)q.call(s,k,A);else q.call(s,k,g[k]);return s.$active=!0,"anonymous"!==s.$id&&i&&i.$up&&i.$up.$children&&i.$up.$children.push(s),s}function Y(e){if(e&&"object"==typeof e){for(var t in e)if("get"!==t&&"set"!==t)return!1;return"function"==typeof e.get}}function G(e,t){var n;t=NaN;return{get:function(){return this.$active&&function(e,t){for(;;){if(e.$watch){var n=e.$events||(e.$events={}),r=n[t]||(n[t]=[]);return void ae.collectDependency(r)}if(!(e=e.$up))break;t=e.$pathname+"."+t}}(this,e),t},set:function(r){if(t!==r){var i=t;(n=J(r,t))?t=n:(n=void 0,t=r),Object(n)===n&&(n.$pathname=e,n.$up=this),this.$active&&V.call(this,e,[t,i])}},enumerable:!0,configurable:!0}}function J(e,t,n,r){if(Array.isArray(e))return function(e,t,n){if(t&&t.splice){var r=[0,t.length].concat(e);return t.splice.apply(t,r),t}for(var i in ee)e[i]=ee[i];X(e,"$up",null),X(e,"$pathname",""),X(e,"$track",ne(e.length)),e._=U({state:{length:NaN}},{watch:!0}),e._.length=e.length,e._.$watch("length",function(t,n){V.call(e.$up,e.$pathname+".length",[t,n])}),n&&X(e,"$watch",function(){return q.apply(e,arguments)}),Object.defineProperty(e,"$model",Z);for(var a=0,o=e.length;a>>=0)>this.length)throw Error(e+"set方法的第一个参数不能大于原数组长度");if(this[e]!==t){var n=this[e];this.splice(e,1,t),V.call(this.$up,this.$pathname+".*",[t,n,null,e])}},contains:function(e){return this.indexOf(e)>-1},ensure:function(e){return this.contains(e)||this.push(e),this},pushArray:function(e){return this.push.apply(this,K(e))},remove:function(e){return this.removeAt(this.indexOf(e))},removeAt:function(e){return e>>>=0,this.splice(e,1)},size:function(){return this._.length},removeAll:function(e){if(Array.isArray(e))for(var t=this.length-1;t>=0;t--)-1!==e.indexOf(this[t])&&(te.call(this.$track,t,1),te.call(this,t,1));else if("function"==typeof e)for(t=this.length-1;t>=0;t--){e(this[t],t)&&(te.call(this.$track,t,1),te.call(this,t,1))}else te.call(this.$track,0,this.length),te.call(this,0,this.length);this.notify(),this._.length=this.length},clear:function(){this.removeAll()}},te=Q.splice;function ne(e){for(var t=[],n=0;n2){n[1],n.length;n=[n[0],n[1]].concat(ne(n.length-2))}}Array.prototype[t].apply(e,n)}(this.$track,e,n),this.notify(),this._.length=this.length,a}}),"sort,reverse".replace(f,function(e){ee[e]=function(){var t=this.concat(),n=Math.random(),r=[],i=!1;Q[e].apply(this,arguments);for(var a=0,o=t.length;a444&&le())}(n,t)}}),t.getter=He(t.expr,t.vmodels,t),t.observers.forEach(function(e){e.v.$watch(e.p,t)}),delete t.observers);try{var r,i,o=t.fireArgs;if(delete t.fireArgs,o)r=o[0],i=o[1];else if("on"===t.type)r=t.getter+"";else try{r=t.getter.apply(0,t.args)}catch(e){r=null}if(i=void 0===i?t.oldValue:i,t._filters&&(r=cn.$filter.apply(0,[r].concat(t._filters))),t.signature){var s=N.type(r);if("array"!==s&&"object"!==s)throw Error("warning:"+t.expr+"只能是对象或数组");t.xtype=s;var c=function(e,t){for(var n,r=[],i=0;n=e[i++];)r.push(t?n.$id:n.$key);return r.join(";")}(t.proxies||[],s),l=r.$track||("array"===s?ne(r.length):Object.keys(r));t.track=l,c!==l.join(";")&&(t.handler(r,i),t.oldValue=1)}else Array.isArray(r)&&r.length!==(i&&i.length)?(t.handler(r,i),t.oldValue=r.concat()):"oldValue"in t&&r===i||(t.handler(r,i),t.oldValue=Array.isArray(r)?r.concat():r)}catch(e){delete t.getter,a("warning:exception throwed in [Anot.injectBinding] ",e);var u=t.element;u&&3===u.nodeType&&(u.nodeValue=L+(t.oneTime?"::":"")+t.expr+M)}finally{n&&ae.end()}},t.update()};var oe=N.$$subscribers=[],se=new Date;var ce=0;function le(e){for(var t=ce||oe.length,n=0;e=oe[--t];)if(e.i<7){if(null===e.element){oe.splice(t,1),e.list&&(N.Array.remove(e.list,e),delete oe[e.uuid]);continue}if(fe(e.element)){if(oe.splice(t,1),N.Array.remove(e.list,e),ue(e),n++>500){ce=t;break}continue}e.i++,7===e.i&&(e.i=14)}else e.i--;se=new Date}function ue(e){for(var t in delete oe[e.uuid],e.element=null,e.rollback&&e.rollback(),e)e[t]=null}function fe(e){try{e.parentNode.nodeType}catch(e){return!0}return e.ifRemove&&!b.contains(e.ifRemove)&&i===e.parentNode?(e.parentNode&&e.parentNode.removeChild(e),!0):e.msRetain?0:1===e.nodeType?!b.contains(e):!N.contains(b,e)}var pe=new function(){N.mix(this,{option:n.createElement("select"),thead:n.createElement("table"),td:n.createElement("tr"),area:n.createElement("map"),tr:n.createElement("tbody"),col:n.createElement("colgroup"),legend:n.createElement("fieldset"),_default:n.createElement("div"),g:n.createElementNS("http://www.w3.org/2000/svg","svg")}),this.optgroup=this.option,this.tbody=this.tfoot=this.colgroup=this.caption=this.thead,this.th=this.td};String("circle,defs,ellipse,image,line,path,polygon,polyline,rect,symbol,text,use").replace(f,function(e){pe[e]=pe.g});var de=/<([\w:]+)/,he=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ve=C(["","text/javascript","text/ecmascript","application/ecmascript","application/javascript"]),me=n.createElement("script"),ye=/<|&#?\w+;/;function ge(e){return e.replace(/([a-z\d])([A-Z]+)/g,"$1-$2").toLowerCase()}function be(e){return e.indexOf("-")<0&&e.indexOf("_")<0?e:e.replace(/[-_][^-_]/g,function(e){return e.charAt(1).toUpperCase()})}N.parseHTML=function(e){var t=$.cloneNode(!1);if("string"!=typeof e)return t;if(!ye.test(e))return t.appendChild(n.createTextNode(e)),t;e=e.replace(he,"<$1>").trim();var r,i=(de.exec(e)||["",""])[1].toLowerCase(),a=pe[i]||pe._default;a.innerHTML=e;var o=a.getElementsByTagName("script");if(o.length)for(var s,c=0;s=o[c++];)if(ve[s.type]){var l=me.cloneNode(!1);y.forEach.call(s.attributes,function(e){l.setAttribute(e.name,e.value)}),l.text=s.text,s.parentNode.replaceChild(l,s)}for(;r=a.firstChild;)t.appendChild(r);return t},N.innerHTML=function(e,t){var n=this.parseHTML(t);this.clearHTML(e).appendChild(n)},N.clearHTML=function(e){for(e.textContent="";e.firstChild;)e.removeChild(e.firstChild);return e},"add,remove".replace(f,function(e){N.fn[e+"Class"]=function(t){var n=this[0];return t&&"string"==typeof t&&n&&1===n.nodeType&&t.replace(/\S+/g,function(t){n.classList[e](t)}),this}}),N.fn.mix({attr:function(e,t){return 2===arguments.length?(this[0].setAttribute(e,t),this):this[0].getAttribute(e)},data:function(e,t){var n=arguments.length,r=this[0].dataset;switch((e=ge(e||""))||(n=0),n){case 2:return r[e]=t,this;case 1:return xe(r[e]);case 0:var i=o();for(var a in r)i[a]=xe(r[a]);return i}},removeData:function(e){return e="data-"+ge(e),this[0].removeAttribute(e),this},css:function(e,t){if(N.isPlainObject(e))for(var n in e)N.css(this,n,e[n]);else var r=N.css(this,e,t);return void 0!==r?r:this},position:function(){var e,t,n=this[0],r={top:0,left:0};if(n)return"fixed"===this.css("position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),"HTML"!==e[0].tagName&&(r=e.offset()),r.top+=N.css(e[0],"borderTopWidth",!0),r.left+=N.css(e[0],"borderLeftWidth",!0),r.top-=e.scrollTop(),r.left-=e.scrollLeft()),{top:t.top-r.top-N.css(n,"marginTop",!0),left:t.left-r.left-N.css(n,"marginLeft",!0)}},offsetParent:function(){for(var e=this[0].offsetParent;e&&"static"===N.css(e,"position");)e=e.offsetParent;return N(e||b)},bind:function(e,t,n){if(this[0])return N.bind(this[0],e,t,n)},unbind:function(e,t,n){return this[0]&&N.unbind(this[0],e,t,n),this},val:function(e){var t,n,r=this[0];if(r&&1===r.nodeType){var i=0===arguments.length,a=i?":get":":set",o=je[(t=r,n=t.tagName.toLowerCase(),("input"===n&&/checkbox|radio/.test(t.type)?"checked":n)+a)];if(o)var s=o(r,e);else{if(i)return(r.value||"").replace(/\r/g,"");r.value=e}}return i?s:this}}),N.parseJSON=JSON.parse;var $e=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/;function xe(e){try{if("object"==typeof e)return e;e="true"===e||"false"!==e&&("null"===e?null:+e+""===e?+e:$e.test(e)?JSON.parse(e):e)}catch(e){}return e}N.fireDom=function(e,t,r){var i=n.createEvent("Events");i.initEvent(t,!0,!0),N.mix(i,r),e.dispatchEvent(i)},N.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){N.fn[e]=function(n){var r=this[0]||{},i=function(e){return e.window&&e.document?e:9===e.nodeType&&e.defaultView}(r),a="scrollTop"===e;if(!arguments.length)return i?i[t]:r[e];i?i.scrollTo(a?i[t]:n,a?n:i[t]):r[e]=n}});var we=N.cssHooks=o(),ke=["","-webkit-","-moz-","-ms-"],Ce={float:"cssFloat"};N.cssNumber=C("animationIterationCount,animationIterationCount,columnCount,order,flex,flexGrow,flexShrink,fillOpacity,fontWeight,lineHeight,opacity,orphans,widows,zIndex,zoom"),N.cssName=function(e,t,n){if(Ce[e])return Ce[e];t=t||b.style;for(var r=0,i=ke.length;r-1)&&(n=!0);n||(e.selectedIndex=-1)}},Te={};["break,case,catch,continue,debugger,default,delete,do,else,false","finally,for,function,if,in,instanceof,new,null,return,switch,this","throw,true,try,typeof,var,void,while,with","abstract,boolean,byte,char,class,const,double,enum,export,extends","final,float,goto,implements,import,int,interface,long,native","package,private,protected,public,short,static,super,synchronized","throws,transient,volatile","arguments,let,yield,async,await,undefined"].join(",").replace(/\w+/g,function(e){Te[e]=!0});var Oe=/[a-z_$]/i,Ee=/[\s\uFEFF\xA0]/;function Se(e,t){if(t&&!Te[t])return e.push(t),!0}function De(e,t,n,r){for(var i,a=[],o=" = "+n+".",s=e.length;i=e[--s];){var c=i.split(".")[0];t.hasOwnProperty(c)&&(a.push(c+o+c),r.observers.push({v:t,p:i,type:N.type(t[c])}),e.splice(s,1))}return a}var _e=/(proxy\-[a-z]+)\-[\-0-9a-f]+$/,Pe=new D(218),Le=new D(128);function Me(e){e=e.trim();var t=Pe.get(e);if(t)return t.concat();for(var n,r=function e(t,n){var r=[],i=!!n;n=n||0;for(var a="unknown",o="",s=0;s0){var t=e.replace(st,function(e){return Array(e.length+1).join("1")}).replace(ot,"ᄢ㍄").indexOf("|");if(t>-1)return{type:"text",filters:e.slice(t).trim(),expr:e.slice(0,t)}}return{type:"text",expr:e,filters:""}}function ut(e){for(var t,n,r=[],i=0;;){if(-1===(n=e.indexOf(L,i)))break;if((t=e.slice(i,n))&&r.push({expr:t}),i=n+L.length,-1===(n=e.indexOf(M,i)))break;(t=e.slice(i,n))&&r.push(lt(t.replace(ct,""))),i=n+M.length}return(t=e.slice(i))&&r.push({expr:t}),r}function ft(e,t,r){var i=[],a=ut(e.data);if(a.length){for(var o,s=0;o=a[s++];){var c=n.createTextNode(o.expr);o.type&&(o.expr=o.expr.replace(Ge,function(){return o.oneTime=!0,""}),o.element=c,o.filters=o.filters.replace(at,function(){return o.type="html",""}),o.pos=1e3*r+s,i.push(o)),$.appendChild(c)}e.parentNode.replaceChild($,e),i.length&&Ye(i,t)}}var pt=function(){this.queue=[]};pt.prototype={render:function(e){if(!this.locked){this.locked=e?b.offsetHeight+10:1;var t=this;N.nextTick(function(){t.flush()})}},flush:function(){for(var e,t=0;e=this.queue[t++];)e.update&&e.update();this.locked=0,this.queue=[]}};var dt=new pt,ht={};["autofocus,autoplay,async,allowTransparency,checked,controls","declare,disabled,defer,defaultChecked,defaultSelected","contentEditable,isMap,loop,multiple,noHref,noResize,noShade","open,readOnly,selected"].join(",").replace(f,function(e){ht[e.toLowerCase()]=e});N.directive("attr",{init:function(e){if(e.expr=Fe(e.expr.trim()),"include"===e.type){var t=e.element;St(t,e),e.includeRendered=Ue(t,"data-rendered",e.vmodels),e.includeLoaded=Ue(t,"data-loaded",e.vmodels);var r=e.includeReplace=t.hasAttribute("replace");t.hasAttribute("cache")&&(e.templateCache={}),e.start=n.createComment(":include"),e.end=n.createComment(":include-end"),r?(e.element=e.end,e._element=t,t.parentNode.insertBefore(e.start,t),t.parentNode.insertBefore(e.end,t.nextSibling)):(t.insertBefore(e.start,t.firstChild),t.appendChild(e.end))}},update:function(e){var t=this.element,n=Object.create(null),r=d.test(t);if(e=K(e),this.param)e&&"object"==typeof e?Array.isArray(e)?n[this.param]=e:Date.isDate(e)?n[this.param]=e.toISOString():n[this.param]=e:n[this.param]=e;else{if(!e||"object"!=typeof e||Array.isArray(e)||Date.isDate(e))return;n=e}for(var i in n)if("style"!==i){if("xlink:"===i.slice(0,6)){var a=i;n[i=i.slice(6)]=n[a],delete n[a]}if(!1!==n[i]&&null!==n[i]&&void 0!==n[i]||(n[i]=""),"boolean"==typeof t[i]||"boolean"==typeof t[ht[i]]){a=i;if(ht[i]&&a!==ht[i]&&(a=ht[i]),n[i]=!!n[i],t[a]=n[i],!n[i]){t.removeAttribute(a);continue}}!r&&i in t.cloneNode(!1)?t[i]=n[i]:("object"==typeof n[i]&&(n[i]=Date.isDate(n[i])?n[i].toISOString():JSON.stringify(n[i])),t.setAttribute(i,n[i]))}else t.style.cssText=n[i]}});N.directive("class",{init:function(e){if(e.expr=e.expr.replace(/\n/g," ").replace(/\s+/g," "),"hover"===e.type||"active"===e.type){var t=new Function("return "+e.expr)();if(!e.hasBindEvent){var n=e.element,r=N(n),i="mouseenter",a="mouseleave";if("active"===e.type){n.tabIndex=n.tabIndex||-1,i="mousedown",a="mouseup";var o=r.bind("mouseleave",function(){r.removeClass(t)})}}var s=r.bind(i,function(){r.addClass(t)}),c=r.bind(a,function(){r.removeClass(t)});e.rollback=function(){r.unbind("mouseleave",o),r.unbind(i,s),r.unbind(a,c)},e.hasBindEvent=!0}},update:function(e){if("class"===this.type){var t=e;if(!t||this.param)return a('class指令语法错误 %c %s="%s"',"color:#f00",this.name,this.expr);for(var n in"string"==typeof t&&((t={})[e]=!0),N.isPlainObject(t)||(t=t.$model),t)this.element.classList.toggle(n,!!t[n])}}}),"hover,active".replace(f,function(e){S[e]=S.class}),N.directive("css",{init:S.attr.init,update:function(e){var t=N(this.element);if(this.param)t.css(this.param,e);else{if("object"!=typeof e)return a(':css指令格式错误 %c %s="%s"',"color:#f00",this.name,this.expr);var n=e;N.isPlainObject(n)||(n=e.$model),t.css(n)}}}),N.directive("data",{priority:100,init:S.attr.init,update:function(e){var t=N(this.element);if(this.param)t.data(this.param,e);else{if("object"!=typeof e)return a(':data指令格式错误 %c %s="%s"',"color:#f00",this.name,this.expr);var n=e;for(var r in N.isPlainObject(n)||(n=e.$model),n)t.data(r,n[r])}}});var vt=/^(?:checkbox|radio)$/,mt=/^(?:radio|checked)$/,yt=/^(file|button|reset|submit|checkbox|radio|range)$/;N.directive("duplex",{priority:2e3,init:function(e,t){var n=e.element,r=e.vmodels;e.changed=Ue(n,"data-changed",r)||w;var i=[],o=C("string,number,boolean,checked");"radio"===n.type&&""===e.param&&(e.param="checked"),e.param.replace(p,function(r){vt.test(n.type)&&mt.test(r)&&(r="checked",e.isChecked=!0,e.xtype="radio"),o[r]&&(t=!0),N.Array.ensure(i,r)}),t||i.push("string"),e.param=i.join("-"),e.xtype||(e.xtype="SELECT"===n.tagName?"select":"checkbox"===n.type?"checkbox":"radio"===n.type?"radio":/^change/.test(n.getAttribute("data-event"))?"change":"input"),n.expr=e.expr;var s=e.bound=function(t,r){n.addEventListener(t,r,!1);var i=e.rollback;e.rollback=function(){n.anotSetter=null,N.unbind(n,t,r),i&&i()}};function c(t){e.changed.call(this,t)}var l=!1;var u=function(t){var r=n.value;if(!l&&r!==e.oldValue&&null!==e.pipe){var i=e.pipe(r,e,"get");e.oldValue=r,e.setter(i),c.call(n,i),N.fireDom(n,"change")}};switch(e.xtype){case"radio":s("click",function(){var t=e.pipe(n.value,e,"get");e.setter(t),c.call(n,t)});break;case"checkbox":s("change",function(){var t=n.checked?"ensure":"remove",r=e.getter.apply(0,e.vmodels);Array.isArray(r)||(a(":duplex应用于checkbox上要对应一个数组"),r=[r]);var i=e.pipe(n.value,e,"get");N.Array[t](r,i),c.call(n,r)});break;case"change":s("change",u);break;case"input":s("input",u),s("keyup",u),s("compositionstart",function(){l=!0}),s("compositionend",function(){l=!1,setTimeout(u)}),s("DOMAutoComplete",u);break;case"select":s("change",function(){var t=N(n).val();if((t=Array.isArray(t)?t.map(function(t){return e.pipe(t,e,"get")}):e.pipe(t,e,"get"))+""!==e.oldValue)try{e.setter(t)}catch(e){a(e)}}),s("datasetchanged",function(t){if("selectDuplex"===t.bubble){var r=e._value,i=Array.isArray(r)?r.map(String):r+"";N(n).val(i),n.oldValue=i+"",c.call(n,i)}})}"input"!==e.xtype||yt.test(n.type)||("hidden"!==n.type&&(s("focus",function(){n.msFocus=!0}),s("blur",function(){n.msFocus=!1})),n.anotSetter=u,kt(function(){if(b.contains(n))n.msFocus||u();else if(!n.msRetain)return!1}))},update:function(e){var t,n=this.element;this.init||((this.pipe||(this.pipe=bt))(null,this,"init"),this.init=1);switch(this.xtype){case"input":n.value=e;break;case"change":if((t=this.pipe(e,this,"set"))!==this.oldValue){var r=!1;if(n.msFocus)try{var i=n.selectionStart;if(i===n.selectionEnd){var a=i;r=!0}}catch(e){}n.value=this.oldValue=t,r&&!n.readOnly&&(n.selectionStart=n.selectionEnd=a)}break;case"radio":t=this.isChecked?!!e:e+""===n.value,n.checked=t;break;case"checkbox":var o=[].concat(e);t=this.pipe(n.value,this,"get"),n.checked=o.indexOf(t)>-1;break;case"select":this._value=e,n.msHasEvent?N.fireDom(n,"datasetchanged",{bubble:n.msHasEvent}):n.msHasEvent="selectDuplex"}}});function gt(e){return null==e?"":e}function bt(e,t,n,r){return t.param.replace(p,function(r){var i=N.duplexHooks[r];i&&"function"==typeof i[n]&&(e=i[n](e,t))}),e}N.duplexHooks={checked:{get:function(e,t){return!t.oldValue}},string:{get:function(e){return e},set:gt},boolean:{get:function(e){return"true"===e},set:gt},number:{get:function(e,t){var n=+e;return+e===n?n:0},set:gt}};var $t,xt=[];function wt(){for(var e=xt.length-1;e>=0;e--){!1===(0,xt[e])()&&xt.splice(e,1)}xt.length||clearInterval($t)}N.tick=function(e){1===xt.push(e)&&($t=setInterval(wt,60))};var kt=w;new function(){try{var e={},t=HTMLInputElement.prototype,n=HTMLTextAreaElement.prototype;function r(t){e[this.tagName].call(this,t),!this.msFocus&&this.anotSetter&&this.anotSetter()}var i=HTMLInputElement.prototype;Object.getOwnPropertyNames(i),e.INPUT=Object.getOwnPropertyDescriptor(t,"value").set,Object.defineProperty(t,"value",{set:r}),e.TEXTAREA=Object.getOwnPropertyDescriptor(n,"value").set,Object.defineProperty(n,"value",{set:r})}catch(e){kt=N.tick}},N.directive("effect",{priority:5,init:function(e){var t,n,r=e.expr,i=r.replace(F,function(e){return e.replace(/./g,"0")}).indexOf(":");-1===i?(t=r,n=!0):(t=r.slice(0,i),n=r.slice(i+1)),t=H.test(r)?Fe(t):We(t),e.expr="["+t+","+n+"]"},update:function(e){var t=e[0],n=this.element;if(n.getAttribute("data-effect-name")!==t){n.removeAttribute("data-effect-driver");var r=n.style,i=window.getComputedStyle?window.getComputedStyle(n):null,a=!1;if(i&&(Nt||jt)){var o=r[Tt]||i[Tt];o&&"0s"!==o&&(n.setAttribute("data-effect-driver","t"),a=!0),a||(o=r[Ot]||i[Ot])&&"0s"!==o&&(n.setAttribute("data-effect-driver","a"),a=!0)}a||N.effects[t]&&(n.setAttribute("data-effect-driver","j"),a=!0),a&&n.setAttribute("data-effect-name",t)}}}),N.effects={},N.effect=function(e,t){N.effects[e]=t};var Ct,At,Nt=!1,jt=!1,Tt=N.cssName("transition-duration"),Ot=N.cssName("animation-duration");new function(){var e,t,n={TransitionEvent:"transitionend",WebKitTransitionEvent:"webkitTransitionEnd",OTransitionEvent:"oTransitionEnd",otransitionEvent:"otransitionEnd"};for(var r in n){if(window[r]){e=n[r];break}try{document.createEvent(r);e=n[r];break}catch(e){}}for(r in"string"==typeof e&&(Nt=!0,Ct=e),n={AnimationEvent:"animationend",WebKitAnimationEvent:"webkitAnimationEnd"})if(window[r]){t=n[r];break}"string"==typeof t&&(Nt=!0,At=t)};var Et=[];function St(e,t){var n=e.getAttribute("data-effect-name");if(n){t.effectName=n,t.effectDriver=e.getAttribute("data-effect-driver");var r=+e.getAttribute("data-effect-stagger");t.effectLeaveStagger=+e.getAttribute("data-effect-leave-stagger")||r,t.effectEnterStagger=+e.getAttribute("data-effect-enter-stagger")||r,t.effectClass=e.className||NaN}}function Dt(e){return e.replace(/^[\S]/g,function(e){return e.toUpperCase()})}var _t=new pt;function Pt(){}function Lt(e,t){var n=e.callbacks[t+"Class"];return"string"==typeof n?n:"function"==typeof n?n():e.name+"-"+t}function Mt(e,t,n){var r=e.callbacks[t];r&&r.call(e,e.el,n)}Pt.prototype={contrustor:Pt,enterClass:function(){return Lt(this,"enter")},leaveClass:function(){return Lt(this,"leave")},actionFun:function(e,t,n){if(!document.hidden){var r=this,i=r.el,a="leave"===e;e=a?"leave":"enter",Mt(r,"abort"+Dt(a?"enter":"leave")),Mt(r,"before"+Dt(e)),a||t(i);var o=function(o){i.removeEventListener(r.cssEvent,r.cssCallback),a?(t(i),N(i).removeClass(r.cssClass)):"a"===r.driver&&N(i).removeClass(r.cssClass),!0!==o&&(Mt(r,"after"+Dt(e)),n&&n(i)),r.dispose()};r.useCss?(r.cssCallback&&r.cssCallback(!0),r.cssClass=Lt(r,e),r.cssCallback=o,r.update=function(){i.addEventListener(r.cssEvent,r.cssCallback),a||"t"!==r.driver||N(i).removeClass(r.cssClass)},N(i).addClass(r.cssClass),_t.render(!0),_t.queue.push(r)):Mt(r,e,o)}},enter:function(e,t){this.actionFun.apply(this,["enter"].concat(N.slice(arguments)))},leave:function(e,t){this.actionFun.apply(this,["leave"].concat(N.slice(arguments)))},dispose:function(){this.update=this.cssCallback=null,Et.unshift(this)>100&&Et.pop()}};var Ht=function(e,t){var n=g.call(arguments,0);"function"!=typeof n[2]&&n.splice(2,0,w),"function"!=typeof n[3]&&n.splice(3,0,w);var r=n[2],i=n[3],a=function(e,t){if(!e||1!==e.nodeType)return null;if(t)var n=t.effectName,r=t.effectDriver;else n=e.getAttribute("data-effect-name"),r=e.getAttribute("data-effect-driver");if(!n||!r)return null;var i=Et.pop()||new Pt;return i.el=e,i.driver=r,i.useCss="j"!==r,i.useCss&&(t&&N(e).addClass(t.effectClass),i.cssEvent="t"===r?Ct:At),i.name=n,i.callbacks=N.effects[n]||{},i}(e,n[4]);if(!a)return r(),i(),!1;a[t?"enter":"leave"](r,i)};N.mix(N.effect,{apply:Ht,append:function(e,t,n,r){return Ht(e,1,function(){t.appendChild(e)},n,r)},before:function(e,t,n,r){return Ht(e,1,function(){t.parentNode.insertBefore(e,t)},n,r)},remove:function(e,t,n,r){return Ht(e,0,function(){e.parentNode===t&&t.removeChild(e)},n,r)}}),N.directive("html",{update:function(e){var t=this.element,r=1!==t.nodeType,i=r?t.parentNode:t;if(i){if(e=null==e?"":e,3===t.nodeType){var a=A("html");i.insertBefore(n.createComment(a),t),this.element=n.createComment(a+":end"),i.replaceChild(this.element,t),t=this.element}if("object"!=typeof e)var o=N.parseHTML(String(e));else if(11===e.nodeType)o=e;else if(1===e.nodeType||e.item){var s=1===e.nodeType?e.childNodes:e.item;for(o=$.cloneNode(!0);s[0];)o.appendChild(s[0])}if(s=N.slice(o.childNodes),r){for(var c=t.nodeValue.slice(0,-4);;){var l=t.previousSibling;if(!l||8===l.nodeType&&l.nodeValue===c)break;i.removeChild(l)}i.insertBefore(o,t)}else N.clearHTML(t).appendChild(o);rt(s,this.vmodels)}}}),N.directive("text",{update:function(e){var t=this.element;if(e=null==e?"":e,3===t.nodeType)try{t.data=e}catch(e){}else t.textContent=e}}),N.directive("if",{priority:10,update:function(e){var t,r=this,a=this.element,o=r.stamp=Date.now(),s=function(){o===r.stamp&&(r.recoverNode=null)};r.recoverNode&&r.recoverNode();try{if(!a.parentNode)return;t=a.parentNode}catch(e){return}if(e){function c(){a.getAttribute(r.name)&&(a.removeAttribute(r.name),et(a,r.vmodels)),r.rollback=null}if(8===a.nodeType){var l=r.keep,u=N.effect.apply(l,1,function(){o===r.stamp&&(a.parentNode.replaceChild(l,a),a=r.element=l,l.getAttribute("_required")&&(a.required=!0,a.removeAttribute("_required")),a.querySelectorAll&&N.each(a.querySelectorAll("[_required=true]"),function(e){e.required=!0,e.removeAttribute("_required")}),c())},s);u=!1===u}u||c()}else if(1===a.nodeType){!0===a.required&&(a.required=!1,a.setAttribute("_required","true"));try{N.each(a.querySelectorAll(":required"),function(e){a.required=!1,e.setAttribute("_required","true")})}catch(e){}var f=r.element=n.createComment(":if"),p=a.nextSibling;r.recoverNode=function(){r.recoverNode=null,f.parentNode!==t&&(t.insertBefore(f,p),r.keep=a)},N.effect.apply(a,0,function(){r.recoverNode=null,o===r.stamp&&(a.parentNode.replaceChild(f,a),r.keep=a,i.appendChild(a),r.rollback=function(){a.parentNode===i&&i.removeChild(a)})},s)}}});var Ft=N.templateCache={};function Bt(e){for(var t=n.createDocumentFragment(),r=0,i=e.length;r=200&&this.status<400?m.resolve(this.response):m.reject(this))},v.send(null),m.promise).then(t=>{Ft[e]=t,y(t)}).catch(t=>{a(":include load ["+e+"] error\n%c%s","color:#f30",`获取网络资源出错, ${t.status} (${t.statusText})`)})}}});var It=/\(([^)]*)\)/,Rt=N.directive("on",{priority:3e3,init:function(e){var t=e.expr;e.type="on";var n=e.param.replace(/-\d+$/,"");if("function"==typeof Rt[n+"Hook"]&&Rt[n+"Hook"](e),t.indexOf("(")>0&&t.indexOf(")")>-1){var r=(t.match(It)||["",""])[1].trim();""!==r&&"$event"!==r||(t=t.replace(It,""))}e.expr=t},update:function(e){var t=this,n=this.element;e=function(e){return(t.getter||w).apply(t.args[0],t.args.concat(e))};var r=t.param.replace(/-\d+$/,"");if("scan"===r)e.call(n,{type:r});else if("function"==typeof t.specialBind)t.specialBind(n,e);else var i=N.bind(n,r,e);t.rollback=function(){"function"==typeof t.specialUnbind?t.specialUnbind():N.unbind(n,r,i)}}});function qt(e,t,n){for(var r,i=0;r=e[i++];)r.className===n.effectClass&&N.effect.apply(r,t,w,w,n)}function Vt(e,t,n){return e?setTimeout(t,++n*e):t(),n}function Wt(e,t,n){for(var r=$.cloneNode(!1),i=e,a=i.nodeValue,o=t&&Math.max(+t.staggerIndex,0),s=N.slice(i.parentNode.childNodes),c=s.indexOf(i);;){var l=s[--c];if(!l||0===String(l.nodeValue).indexOf(a))break;!n&&t&&l.className===t.effectClass?(e=l,function(e){t.staggerIndex=Vt(t.effectLeaveStagger,function(){N.effect.apply(e,0,w,function(){r.appendChild(e)},t)},o)}(l)):r.insertBefore(l,r.firstChild)}return r.appendChild(i),r}function zt(e,t,n,r,i){var a=e.template.cloneNode(!0),o=N.slice(a.childNodes);a.appendChild(n.$anchor),i&&t.appendChild(a);n[e.param||"el"];var s={nodes:o,vmodels:[n].concat(e.vmodels),content:a};r.push(s)}function Ut(e){var t=("object"===e.xtype?Kt:Jt)(e);return(t.$anchor||(t.$anchor=e.element.cloneNode(!1))).nodeValue=e.signature,t.$outer=e.$outer,t}function Yt(e,t,n){if("array"===n){e.$remove=function(){t.$repeat.removeAt(e.$index)};var r=t.param;e.$watch(r,function(n){var r=e.$index;t.$repeat[r]=n})}else{var i=t.vars[0],a=t.vars[1];e.$up.$watch(t.expr+"."+e[i],function(n){e[t.param][a]=n,e[a]=n})}}N.directive("for",{priority:90,init:function(e){var t=e.type;e.cache={},e.enterCount=0;var r=e.element;if(1===r.nodeType){var i=e.expr.split(" in ");e.expr=i.pop(),i.length&&(i=i.pop().split(/\s+/)),e.vars=i,r.removeAttribute(e.name),St(r,e);var a=Ue(r,"data-rendered",e.vmodels),o=A(t),s=n.createComment(o+":start"),c=e.element=n.createComment(o+":end");e.signature=o,e.start=s,e.template=$.cloneNode(!1);var l=r.parentNode;if(l.replaceChild(c,r),l.insertBefore(s,c),e.template.appendChild(r),e.element=c,a)var u=N.bind(l,"datasetchanged",function(){a.apply(l,l.args),N.unbind(l,"datasetchanged",u),l.msRendered=a})}},update:function(e,t){var n=this,r=this.xtype;"array"===r?(this.vars.length?1===this.vars.length&&this.vars.unshift("$index"):this.vars.push("$index","el"),this.param=this.vars[1]):(this.param="__el__",this.vars.length?1===this.vars.length&&this.vars.push("$val"):this.vars.push("$key","$val")),this.enterCount+=1;var i=!t;if(i){n.$outer={};var a=this.vars[0],o=this.vars[1];"array"===r&&(a="$first",o="$last");for(var s,c=0;s=n.vmodels[c++];)if(s.hasOwnProperty(a)&&s.hasOwnProperty(o)){n.$outer=s;break}}var l=this.track,u="move";n.$repeat=e;var f=[],p=i&&$.cloneNode(!1),d=[],h=this.param,v=N.mix({},this.cache),m=this.element,y=l.length,g=m.parentNode,b=0;for(c=0;c10,A=m.previousSibling,j=n.start;if(C)for(;A!==j;)g.removeChild(A),A=m.previousSibling;for(c=0;cP.maxRepeatSize&&i.pop(),delete e[t]}}function Qt(e,t){var r="_"+e;if(!Qt[r]){var i=n.createElement(e);b.appendChild(i),t=getComputedStyle(i,null).display,b.removeChild(i),Qt[r]=t}return Qt[r]}N.parseDisplay=Qt,N.directive("visible",{init:function(e){St(e.element,e)},update:function(e){var t,n=this,r=this.element,i=!this.effectName;if(!this.stamp)return t=this.stamp=Date.now(),void(e?(r.style.display=n.display||"","none"===N(r).css("display")&&(r.style.display=n.display=Qt(r.nodeName))):r.style.display="none");t=this.stamp=+new Date,e?N.effect.apply(r,1,function(){if(t===n.stamp){var e=r.getAttribute("data-effect-driver")||"a";i&&(r.style.display=n.display||""),"a"!==e&&"t"!==e||"none"===N(r).css("display")&&(r.style.display=n.display||Qt(r.nodeName))}}):N.effect.apply(r,0,function(){t===n.stamp&&(r.style.display="none")})}});var en=/]*>([\S\s]*?)<\/script\s*>/gim,tn=/\s+(on[^=\s]+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,nn=/<\w+\b(?:(["'])[^"]*?(\1)|[^>])*>/gi,rn={a:/\b(href)\=("javascript[^"]*"|'javascript[^']*')/gi,img:/\b(src)\=("javascript[^"]*"|'javascript[^']*')/gi,form:/\b(action)\=("javascript[^"]*"|'javascript[^']*')/gi},an=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,on=/([^\#-~| |!])/g;function sn(e,t,n,r){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+e)?+e:0,a=isFinite(+t)?Math.abs(t):3,o=r||",",s=n||".",c="";return(c=(a?function(e,t){var n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(i,a):""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(c[1]||"").length>=0)%60,n=Math.floor(e/60),r=Math.floor(n/60);return n=(n%=60)<10?"0"+n:n,t=t<10?"0"+t:t,r>0?(r=r<10?"0"+r:r)+":"+n+":"+t:n+":"+t},$filter:function(e){for(var t=1,n=arguments.length;t/g,">")},currency:function(e,t,n){return(t||"¥")+sn(e,isFinite(n)?n:2)},number:sn,date:function(e,t){var n=e;if(!Date.isDate(n)){var r=+n;if(r==r&&(n=r),"Invalid Date"===(n=new Date(n)).toString())return"Invalid Date"}return n.format(t)}};let ln,un=[],fn=function(e){for(ln=!0;e=un.shift();)e(N)};return"complete"===n.readyState?setTimeout(fn):n.addEventListener("DOMContentLoaded",fn),window.addEventListener("load",fn),N.ready=function(e){ln?e(N):un.push(e)},window.Anot=N,N}();export default _Anot; \ No newline at end of file diff --git a/src/lib/chart/line.js b/src/lib/chart/line.js new file mode 100644 index 0000000..83d738b --- /dev/null +++ b/src/lib/chart/line.js @@ -0,0 +1,253 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + +import $ from '../utils.js' +import '../form/button.js' + +const DARK = '#62778d' +const BLUE = '#64b5f6' +const PLAIN = '#f2f5fc' + +export default class Line extends HTMLElement { + static get observedAttributes() { + return ['list'] + } + + props = { + list: [] + } + + state = { + key: 1, + list: [] + } + + constructor() { + super() + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` +
+ +
+ 1月 + 3月 + 半年 + 1年 + 3年 + 所有 +
+
+` + + var elem = this.root.children[1] + this.__SCENE__ = elem.firstElementChild + this.__FILTER__ = elem.lastElementChild + this.__CTX__ = this.__SCENE__.getContext('2d') + this.__SCENE__.width = 680 + this.__SCENE__.height = 230 + } + + _getTime(n) { + var now = new Date() + var time = { getTime: _ => 0 } + var Y = now.getFullYear() + var m = now.getMonth() + var d = now.getDate() + + switch (n) { + case 1: + time = new Date(Y, m - 1, d, 0, 0, 0) + break + case 3: + time = new Date(Y, m - 3, d, 0, 0, 0) + break + case 6: + time = new Date(Y, m - 6, d, 0, 0, 0) + break + case 12: + time = new Date(Y - 1, m, d, 0, 0, 0) + break + case 36: + time = new Date(Y - 3, m, d, 0, 0, 0) + break + } + return time.getTime() + } + + _filter(n) { + if (n < 999) { + var time = this._getTime(n) + this.state.list = this.props.list.filter(it => it.x >= time) + } else { + this.state.list = this.props.list.concat() + } + } + + draw() { + var { list, key } = this.state + var ctx = this.__CTX__ + var x = 36 + var max = 0 + var min = Number.MAX_SAFE_INTEGER + var step = 0 // 纵坐标间隔 + var dis = +(640 / list.length).toFixed(2) || 1 // 横坐标间隔 + var point + var p1, p2, p3, p4 + var format = key > 12 ? 'Y/m' : 'm/d' + + for (let it of list) { + if (max < it.y) { + max = it.y + } + if (min > it.y) { + min = it.y + } + } + + min = ~~(min / 100) + max = Math.ceil(max / 100) + step = ~~((max - min) / 3) + + p1 = Math.floor(list.length / 4) + p2 = Math.floor(list.length / 2) + p3 = Math.floor((list.length * 3) / 4) + p4 = list.length - 1 + + ctx.clearRect(0, 0, 680, 230) + + // 纵坐标数值 + ctx.font = '12px Arial' + ctx.textAlign = 'right' + ctx.fillStyle = DARK + ctx.fillText(min / 100, 32, 205) + ctx.fillText((min + step) / 100, 32, 155) + ctx.fillText((min + step + step) / 100, 32, 105) + ctx.fillText((min + step + step + step) / 100, 32, 55) + + ctx.font = '10px Arial' + ctx.textAlign = 'left' + ctx.fillText(new Date(list[0].x).format(format), x - 12, 225) + ctx.fillText(new Date(list[p1].x).format(format), x + dis * p1 - 12, 225) + ctx.fillText(new Date(list[p2].x).format(format), x + dis * p2 - 12, 225) + ctx.fillText(new Date(list[p3].x).format(format), x + dis * p3 - 12, 225) + ctx.fillText( + new Date(list[p4].x).format(format), + x + dis * p4 - 12 - (key > 12 ? 24 : 4), + 225 + ) + + // x轴参考线 + ctx.fillStyle = PLAIN + ctx.fillRect(x, 50, 648, 1) + ctx.fillRect(x, 100, 648, 1) + ctx.fillRect(x, 150, 648, 1) + ctx.fillRect(x, 200, 648, 1) + + // y轴参考 线 + ctx.fillRect(x, 0, 1, 210) + ctx.fillRect(x + dis * p1, 0, 1, 210) + ctx.fillRect(x + dis * p2, 0, 1, 210) + ctx.fillRect(x + dis * p3, 0, 1, 210) + ctx.fillRect(x + dis * p4, 0, 1, 210) + + point = list.shift() + + // 曲线 + ctx.beginPath() + ctx.strokeStyle = BLUE + ctx.lineWidth = 1 + ctx.moveTo(x, 200 - (((point.y / 100 - min) / step) * 50).toFixed(0)) + + while (list.length) { + let y + + point = list.shift() + + y = 200 - (((point.y / 100 - min) / step) * 50).toFixed(0) + x += dis + + ctx.lineTo(x, y) + } + ctx.stroke() + } + + connectedCallback() { + $.bind(this.__FILTER__, 'click', ev => { + var el = ev.target + if (this.props.list.length < 1) { + return + } + if (el.tagName === 'WC-BUTTON') { + var k = +el.dataset.key + + $.each(this.__FILTER__.children, function(it) { + it.removeAttribute('color') + }) + el.setAttribute('color', 'blue') + + this.state.key = k + this._filter(k) + this.draw() + } + }) + } + + attributeChangedCallback(name, old, val) { + if (val === null || old === val) { + return + } + switch (name) { + case 'list': + try { + var list = JSON.parse(val) + list.forEach(it => (it.x = it.x * 1000)) + this.props.list = list + this._filter(this.state.key) + this.removeAttribute('list') + this.draw() + } catch (e) {} + break + } + } +} + +if (!customElements.get('wc-line')) { + customElements.define('wc-line', Line) +} diff --git a/src/lib/chart/rank.js b/src/lib/chart/rank.js new file mode 100644 index 0000000..d34a0b6 --- /dev/null +++ b/src/lib/chart/rank.js @@ -0,0 +1,141 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + +const RED = '#ff5061' +const GREEN = '#4caf50' +const BLUE = '#64b5f6' +const GREY = '#bdbdbd' +const PLAIN = '#f2f5fc' +const DARK = '#62778d' + +export default class Rank extends HTMLElement { + static get observedAttributes() { + return ['stat'] + } + + props = { + stat: {} + } + + constructor() { + super() + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + this.__SCENE__ = this.root.children[1] + this.__CTX__ = this.__SCENE__.getContext('2d') + this.__SCENE__.width = 680 + this.__SCENE__.height = 100 + } + + draw() { + var { rank, e1, e3, e6, e12, cm, cp } = this.props.stat + var ctx = this.__CTX__ + var x = 32 + + while (rank.length < 60) { + rank.unshift(0) + } + + ctx.clearRect(0, 0, 680, 101) + + ctx.font = '10px Arial' + ctx.textAlign = 'right' + ctx.fillStyle = RED + ctx.fillText('10%', 28, 10) + ctx.fillText('5%', 28, 30) + ctx.fillStyle = GREEN + ctx.fillText('-5%', 28, 80) + ctx.fillText('-10%', 28, 100) + + ctx.font = '10px menlo,Hiragino Sans GB' + ctx.textAlign = 'left' + ctx.fillStyle = DARK + ctx.fillText('60天红绿榜', 160, 10) + + ctx.font = '12px menlo,Hiragino Sans GB' + ctx.fillText(`最近1个月收益: ${e1}%`, 360, 25) + ctx.fillText(`最近3个月收益: ${e3}%`, 360, 45) + ctx.fillText(`最近半年收益: ${e6}%`, 528, 25) + ctx.fillText(`最近一年收益: ${e12}%`, 528, 45) + + ctx.fillStyle = cp > 0 ? RED : cp === 0 ? GREY : GREEN + ctx.fillRect(360, 65, 140, 20) + ctx.fillRect(526, 65, 140, 20) + ctx.fillStyle = '#fff' + ctx.font = 'bold 14px menlo,Hiragino Sans GB' + ctx.fillText(`实时净值: ¥${cm}`, 364, 80) + ctx.fillText(`实时涨跌: ${cp}%`, 532, 80) + + ctx.fillStyle = PLAIN + ctx.fillRect(28, 25, 320, 1) + ctx.fillRect(28, 75, 320, 1) + ctx.fillStyle = GREY + ctx.fillRect(28, 0, 1, 140) + ctx.fillRect(0, 50, 348, 1) + + while (rank.length) { + var n = rank.shift() + var y = Math.ceil(50 - (n / 10) * 50) + + ctx.fillStyle = n > 0 ? RED : GREEN + + if (y > 50) { + ctx.fillRect(x, 50, 3, y - 50) + } else { + ctx.fillRect(x, y, 3, 50 - y) + } + + x += 5 + } + } + + attributeChangedCallback(name, old, val) { + if (val === null || old === val) { + return + } + switch (name) { + case 'stat': + try { + var stat = JSON.parse(val) + this.props.stat = stat + this.removeAttribute('stat') + this.draw() + } catch (e) {} + break + } + } +} + +if (!customElements.get('wc-rank')) { + customElements.define('wc-rank', Rank) +} diff --git a/src/lib/css/reset-basic.css b/src/lib/css/reset-basic.css new file mode 100644 index 0000000..651aa7f --- /dev/null +++ b/src/lib/css/reset-basic.css @@ -0,0 +1,78 @@ +@charset "UTF-8"; +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2014-10-10 00:45:09 + * + * doui的CSS规范 + * + * 不能出现大写,以连字符风格命名 + * 表示状态的应该用do-st-*命名 + * 表示功能的应该用do-fn-*命名 + * 表示页面模块的应该用do-mod-modname 命名 + * 表示UI组件的应该用do-uiname命名, 它的子元素应该全部包在 .do-uiname这个根类下 + * 如 .do-layer .body { ... } + * + * 样式规则的出现顺序 + * 1 display float position overflow z-index 表示定位/布局的属性 + * 2 width height margin padding border 表示盒子模型的属性 + * 3 line-height font-size vertical-align text-align user-select outline ....排版相关的属性 + * 4 color background opacity cursor ...表示装饰相关的属性 + * 5 content list-style quotes ... 内容生成相关的属性 + * + */ + + +* {margin: 0;padding: 0;vertical-align: baseline;box-sizing:border-box;} +::before,::after {box-sizing:border-box;} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section,content {display: block;} +img {border:0;display:inline-block;} +ol, ul {list-style: none;} +blockquote, q {quotes: none;} +blockquote::before, blockquote::after, +q::before, q::after {content: '';content: none;} +table {border-collapse: collapse;border-spacing: 0;} +a:focus,input,textarea,button:focus,input:focus,textarea:focus {outline:none;} +::-moz-focus-inner { + border:none;outline:none; +} +body {font-family:"Helvetica Neue", Arial,"WenQuanYi Micro Hei","PingFang SC","Hiragino Sans GB","Segoe UI", "Microsoft Yahei", sans-serif;-webkit-font-smoothing: antialiased;text-size-adjust: 100%;-webkit-tap-highlight-color: transparent;} +code,pre,samp {font-family:Menlo,Monaco,Consolas,"Courier New",monospace;} +[anot],[\:repeat],[\:if] {visibility:hidden;} + + +.noselect {-webkit-touch-callout: none;-webkit-user-select: none;-moz-user-select: none;user-select: none;} +.noselect img, .noselect a {-webkit-user-drag:none;} +.text-ell {overflow:hidden; white-space:nowrap; text-overflow:ellipsis } +.osx-thin {-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;} + +:root { + --color-teal-1: #4db6ac; + --color-teal-2: #26a69a; + --color-teal-3: #009688; + --color-green-1: #81c784; + --color-green-2: #66bb6a; + --color-green-3: #4caf50; + --color-purple-1: #9575cd; + --color-purple-2: #9575cd; + --color-purple-3: #673ab7; + --color-blue-1: #64b5f6; + --color-blue-2: #42a5f5; + --color-blue-3: #2196f3; + --color-red-1: #ff5061; + --color-red-2: #eb3b48; + --color-red-3: #ce3742; + --color-orange-1: #ffb618; + --color-orange-2: #f39c12; + --color-orange-3: #e67e22; + --color-plain-1: #f2f5fc; + --color-plain-2: #e8ebf4; + --color-plain-3: #dae1e9; + --color-grey-1: #bdbdbd; + --color-grey-2: #9e9e9e; + --color-grey-3: #757575; + --color-dark-1: #62778d; + --color-dark-2: #526273; + --color-dark-3: #425064; +} \ No newline at end of file diff --git a/src/lib/drag/core.js b/src/lib/drag/core.js new file mode 100644 index 0000000..2470449 --- /dev/null +++ b/src/lib/drag/core.js @@ -0,0 +1 @@ +"use strict";import $ from"../utils.js";const DEF_OPT={axis:"",limit:!1,overflow:!0};export default class Drag{constructor(t){this.$elem=t,this._init()}_init(){this.$elem.style.transform="";var{x:t,y:s}=this.$elem.getBoundingClientRect();this.pos={x:t,y:s,_x:0,_y:0}}by(t,s={}){return this.$drag=t,this.opt=Object.assign(Object.create(null),DEF_OPT,s),!1!==this.opt.limit&&(this.opt.overflow=!1),t.style.cursor="move",this._handleResize=$.bind(window,"resize",this._init.bind(this)),this._handleMousedown=$.bind(t,"mousedown",t=>{if(this.disabled)return;var s=this.$elem.getBoundingClientRect();s.x-this.pos._x!==this.pos.x&&(this.pos.x=s.x-this.pos._x),s.y-this.pos._y!==this.pos.y&&(this.pos.y=s.y-this.pos._y);let e=t.pageX,i=t.pageY,o=document.documentElement.clientWidth,n=document.documentElement.clientHeight,h=s.width,p=s.height,d=[0,o-h,n-p,0];if("parent"===this.opt.limit){let t=this.$elem.parentNode.getBoundingClientRect();d=[t.top,t.right-h,t.bottom-p,t.left]}let l=$.bind(document,"mousemove",t=>{t.preventDefault();let o=t.pageX-e+(s.x-this.pos.x),n=t.pageY-i+(s.y-this.pos.y);"x"===this.opt.axis&&(n=0),"y"===this.opt.axis&&(o=0),!1===this.opt.overflow&&(od[1]-this.pos.x&&(o=d[1]-this.pos.x),nd[2]-this.pos.y&&(n=d[2]-this.pos.y)),this.pos._x=o,this.pos._y=n,this.$elem.dispatchEvent(new CustomEvent("dragging",{detail:{offset:{x:this.pos.x+o,y:this.pos.y+n},move:{x:o,y:n}}})),this.$elem.style.transform=`translate(${o}px, ${n}px)`}),m=$.bind(document,"mouseup",t=>{this.$elem.dispatchEvent(new CustomEvent("dragged",{detail:{offset:{x:this.pos.x+this.pos._x,y:this.pos.y+this.pos._y},move:{x:this.pos._x,y:this.pos._y}}})),$.unbind(document,"mousemove",l),$.unbind(document,"mouseup",m)})}),this}on(t,s){if(t&&"function"==typeof s)return $.bind(this,t,s)}off(t,s){$.unbind(this,t,s)}destroy(){$.unbind(window,"resize",this._handleResize),$.unbind(this.$drag,"mousedown",this._handleMousedown),delete this.$elem,delete this.$drag}}; \ No newline at end of file diff --git a/src/lib/drag/index.js b/src/lib/drag/index.js new file mode 100644 index 0000000..ed1d3ef --- /dev/null +++ b/src/lib/drag/index.js @@ -0,0 +1 @@ +"use strict";import Drag from"./core.js";Anot.directive("drag",{priority:1500,init:function(e){e.expr='"'+e.expr+'"',e.overflow=!0,e.axis="xy",e.element.dataset.axis&&(e.axis=e.element.dataset.axis,delete e.element.dataset.axis),e.limit=!1,e.element.dataset.limit&&(e.limit=e.element.dataset.limit,e.overflow=!1,delete e.element.dataset.limit)},update:function(e){var t=this.element;if(e)for(t=this.element.parentNode;t;){if(t.classList||Anot.error(`${this.name}=${this.expr}, 解析异常[元素不存在]`),"WC-LAYER"===t.tagName&&"layer"===e){t=t.root.children[1];break}if(t.classList.contains(e)||t.id===e)break;t=t.parentNode}new Drag(t).by(this.element,{limit:this.limit,axis:this.axis,overflow:this.overflow})}}); \ No newline at end of file diff --git a/src/lib/form/button.js b/src/lib/form/button.js new file mode 100644 index 0000000..98aabd2 --- /dev/null +++ b/src/lib/form/button.js @@ -0,0 +1,484 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import "../icon/index.js" +import $ from "../utils.js" + +const IS_FIREFOX = !!window.sidebar + +export default class Button extends HTMLElement { + + + static get observedAttributes() { + return ["icon","autofocus","loading","disabled","lazy"] + } + + props = { + icon: '', + autofocus: '', + loading: false, + disabled: false, + lazy: 0 // 并发拦截时间, 单位毫秒 + } + + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + + // 圆形按钮不允许文字 + if (this.hasAttribute('circle')) { + this.textContent = '' + } + + this.__BTN__ = this.root.children[1] + this.__ICO__ = this.__BTN__.children[0] + } + + get loading() { + return this.props.loading + } + + set loading(val) { + var type = typeof val + + if (val === this.props.loading) { + return + } + + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.loading = true + this.__ICO__.setAttribute('is', 'loading') + this.setAttribute('loading', '') + } else { + this.props.loading = false + this.__ICO__.setAttribute('is', this.props.icon) + this.removeAttribute('loading') + } + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + } + } + + connectedCallback() { + this.stamp = 0 + + // 阻止事件冒泡, 避免用户自己绑定click事件不受这2个值的限制 + this._handleClick = $.bind(this.__BTN__, 'click', ev => { + var { loading, disabled, lazy } = this.props + var now = Date.now() + + if (loading || disabled) { + return ev.stopPropagation() + } + // 并发拦截 + if (lazy && now - this.stamp < lazy) { + return ev.stopPropagation() + } + this.stamp = now + }) + } + + disconnectedCallback() { + $.unbind(this.__BTN__, 'click', this._handleClick) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'icon': + this.props.icon = val + if (val) { + if (!this.props.loading) { + this.__ICO__.setAttribute('is', val) + } + } else { + this.removeAttribute('icon') + this.__ICO__.removeAttribute('is') + } + break + + case 'autofocus': + this.__BTN__.setAttribute('autofocus', '') + // 辣鸡火狐, 要触发一下focus, 才能聚焦 + if (IS_FIREFOX) { + setTimeout(_ => { + this.__BTN__.focus() + }, 10) + } + break + case 'lazy': + this.props.lazy = val >> 0 + break + + case 'loading': + case 'disabled': + this[name] = true + break + } + } +} + + +if(!customElements.get('wc-button')){ + customElements.define('wc-button', Button) +} diff --git a/src/lib/form/checkbox-item.js b/src/lib/form/checkbox-item.js new file mode 100644 index 0000000..2154488 --- /dev/null +++ b/src/lib/form/checkbox-item.js @@ -0,0 +1,311 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import "../icon/index.js" +import $ from "../utils.js" + +export default class CheckboxItem extends HTMLElement { + + + static get observedAttributes() { + return ["color","value","checked","readonly","disabled"] + } + + props = { + color: '', + value: '', + checked: false, + readonly: false, + disabled: false + } + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + + this.__SWITCH__ = this.root.lastElementChild + this.__ICO__ = this.__SWITCH__.children[0] + + this._isInGroup = false + } + + _checkGroup() { + this._isInGroup = this.parentNode.tagName === 'WC-CHECKBOX' + if (this._isInGroup && this.parentNode.root) { + if (this.parentNode.value.includes(this.value)) { + this.checked = true + } + } + } + + get value() { + return this.props.value + } + + set value(val) { + this.props.value = val + } + + get checked() { + return this.props.checked + } + + set checked(val) { + this.props.checked = !!val + var { checked, color } = this.props + this.__SWITCH__.classList.toggle('checked', checked) + this.__ICO__.setAttribute('is', 'checkbox-' + (checked ? 'on' : 'off')) + + if (checked) { + this.__ICO__.setAttribute('color', color) + } else { + this.__ICO__.removeAttribute('color') + } + } + + get readOnly() { + return this.props.readonly + } + + set readOnly(val) { + var type = typeof val + + if (val === this.props.readonly) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.readonly = true + this.setAttribute('readonly', '') + } else { + this.props.readonly = false + this.removeAttribute('readonly') + } + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + } + } + + connectedCallback() { + this._checkGroup() + + this._handlClick = $.bind(this, 'click', ev => { + ev.preventDefault() + + if (this.disabled || this.readOnly) { + return + } + + this.checked = !this.checked + + if (this._isInGroup) { + this.parentNode.dispatchEvent( + new CustomEvent('child-picked', { + detail: { value: this.value, checked: this.checked } + }) + ) + } else { + this.dispatchEvent(new CustomEvent('input')) + } + }) + } + + disconnectedCallback() { + $.unbind(this, 'click', this._handlClick) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'value': + case 'color': + this.props[name] = val + break + + case 'checked': + case 'readonly': + case 'disabled': + var k = name + if (k === 'readonly') { + k = 'readOnly' + } + this[k] = true + break + } + } +} + + +if(!customElements.get('wc-checkbox-item')){ + customElements.define('wc-checkbox-item', CheckboxItem) +} diff --git a/src/lib/form/checkbox.js b/src/lib/form/checkbox.js new file mode 100644 index 0000000..7e199e7 --- /dev/null +++ b/src/lib/form/checkbox.js @@ -0,0 +1,142 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import $ from "../utils.js" +import "./checkbox-item.js" + +export default class Checkbox extends HTMLElement { + + + static get observedAttributes() { + return ["value"] + } + + props = { + value: [] + } + + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + } + + _updateChildrenStat() { + Array.from(this.children).forEach(it => { + if (it.tagName === 'WC-CHECKBOX-ITEM' && it.root) { + if (this.value.includes(it.value)) { + it.checked = true + } else { + it.checked = false + } + } + }) + } + + get value() { + return this.props.value + } + + set value(val) { + if (val === this.props.value) { + return + } + this.props.value = val + this._updateChildrenStat() + } + + connectedCallback() { + this._pickedFn = $.bind(this, 'child-picked', ev => { + var tmp = [...this.props.value] + var idx = tmp.indexOf(ev.detail.value) + if (ev.detail.checked) { + if (idx < 0) { + tmp.push(ev.detail.value) + } + } else { + if (~idx) { + tmp.splice(idx, 1) + } + } + this.props.value = tmp + this.dispatchEvent(new CustomEvent('input')) + }) + } + + disconnectedCallback() { + $.unbind(this, 'child-picked', this._pickedFn) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'value': + if (val) { + this.value = val.split(/,\s*?/) + } + break + } + } +} + + +if(!customElements.get('wc-checkbox')){ + customElements.define('wc-checkbox', Checkbox) +} diff --git a/src/lib/form/input.js b/src/lib/form/input.js new file mode 100644 index 0000000..1d232c3 --- /dev/null +++ b/src/lib/form/input.js @@ -0,0 +1,617 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import "../scroll/index.js" +import "../icon/index.js" +import $ from "../utils.js" + +const TYPES = ['text', 'textarea', 'password'] +const INPUTS = { + text: '', + textarea: '' +} + +export default class Input extends HTMLElement { + + + static get observedAttributes() { + return ["value","icon","type","placeholder","maxlength","minlength","autofocus","readonly","disabled"] + } + + props = { + value: '', + icon: '', + type: 'text', + placeholder: '', + maxlength: null, + minlength: null, + autofocus: false, + readonly: false, + disabled: false + } + + + state = { + mvidx: null //下拉列表光标的索引ID + } + + constructor() { + super(); + var type = this.getAttribute('type') + var input = '' + + if (type !== 'textarea') { + type = 'text' + } + + input = INPUTS[type] + + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` +
+ + ${input} + + + +
+ +
    +
    +
    +
    +` + + + this.props.type = type + + this.__OUTER__ = this.root.children[1] + this.__PREPEND__ = this.__OUTER__.children[0] + this.__INPUT__ = this.__OUTER__.children[1] + this.__ICO__ = this.__OUTER__.children[2] + this.__APPEND__ = this.__OUTER__.children[3] + this.__LIST__ = this.__OUTER__.children[4] + } + + get readOnly() { + return this.props.readonly + } + + set readOnly(val) { + var type = typeof val + + if (val === this.props.readonly) { + return + } + + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.readonly = true + this.setAttribute('readonly', '') + this.__INPUT__.setAttribute('readonly', '') + } else { + this.props.readonly = false + this.removeAttribute('readonly') + this.__INPUT__.removeAttribute('readonly') + } + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + this.__INPUT__.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + this.__INPUT__.removeAttribute('disabled') + } + } + + get value() { + return this.__INPUT__.value + } + + set value(val) { + this.__INPUT__.value = val + } + + get type() { + return this.__INPUT__.type + } + + set type(val) { + if (val !== 'textarea') { + this.__INPUT__.type = val + } + } + + // 移动光标选择下拉选项 + _moveSelect(ev) { + var { list } = this.props + if (list && list.length) { + ev.preventDefault() + var step = ev.keyCode === 38 ? -1 : 1 + var items = Array.from( + this.__LIST__.firstElementChild.firstElementChild.children + ) + if (this.state.mvidx === null) { + this.state.mvidx = 0 + } else { + this.state.mvidx += step + } + if (this.state.mvidx < 0) { + this.state.mvidx = 0 + } else if (this.state.mvidx > items.length - 1) { + this.state.mvidx = items.length - 1 + } + items.forEach((it, i) => { + if (i === this.state.mvidx) { + this.__LIST__.firstElementChild.scrollTop = it.offsetTop - 150 + it.setAttribute('focus', '') + } else { + it.removeAttribute('focus') + } + }) + } + } + + // 触发列表选择 + _fetchSelect(idx, ev) { + var item = this.props.list[idx] + this.value = item.value + this.dispatchEvent( + new CustomEvent('select', { + detail: item + }) + ) + this._handleChange(ev) + this.__LIST__.classList.remove('show') + this.state.mvidx = null + } + + _updateAttr() { + var { maxlength, minlength } = this.props + + if (maxlength && maxlength > 0) { + this.__INPUT__.setAttribute('maxlength', maxlength) + } else { + this.__INPUT__.removeAttribute('maxlength') + } + if (minlength && minlength > 0) { + this.__INPUT__.setAttribute('minlength', minlength) + } else { + this.__INPUT__.removeAttribute('minlength') + } + } + + connectedCallback() { + var prepend = this.__PREPEND__.assignedNodes() + var append = this.__APPEND__.assignedNodes() + var { type } = this.props + + // 相同插槽, 只允许1个 + while (prepend.length > 1) { + this.removeChild(prepend.pop()) + } + while (append.length > 1) { + this.removeChild(append.pop()) + } + + if (prepend.length && type !== 'textarea') { + this.__OUTER__.setAttribute('prepend', '') + } + if (append.length && type !== 'textarea') { + this.__OUTER__.setAttribute('append', '') + } + + this._updateAttr() + + // 键盘事件 + this._handleSubmit = $.catch(this.__INPUT__, 'keydown', ev => { + if (this.disabled || this.readOnly) { + return + } + // up: 38, down: 40 + if (ev.keyCode === 38 || ev.keyCode === 40) { + // 仅普通文本表单, 密码和多行文本框不做响应 + if (type === 'text') { + return this._moveSelect(ev) + } + } + // 回车触发submit事件 + // textarea 要按Ctrl Or Cmd键, 才会触发 + if (ev.keyCode === 13) { + // 如果是输入建议存在,则第1次回车的时候, 不触发提交 + if (type === 'text' && this.state.mvidx !== null) { + return this._fetchSelect(this.state.mvidx, ev) + } + + if ( + type === 'text' || + (type === 'textarea' && (ev.ctrlKey || ev.metaKey)) + ) { + this.dispatchEvent( + new CustomEvent('submit', { + detail: this.value + }) + ) + } + } + }) + + // 非textarea, 可做输入建议功能 + if (type === 'text') { + // 输入状态事件 + this._handleChange = $.bind(this.__INPUT__, 'input', ev => { + ev.preventDefault() + this.dispatchEvent( + new CustomEvent('fetch-suggest', { + detail: { + value: this.value, + send: list => { + this.props.list = list + this._parseSuggestion() + } + } + }) + ) + }) + + // 渲染建议列表 + this._parseSuggestion = $.bind(this.__INPUT__, 'click', ev => { + var { list } = this.props + let { x, y, width } = this.getBoundingClientRect() + if (list && list.length) { + var html = list + .map((it, i) => `
  • ${it.value}
  • `) + .join('') + this.__LIST__.firstElementChild.firstElementChild.innerHTML = html + this.__LIST__.classList.toggle('show', true) + this.__LIST__.style.cssText = `left:${x}px;top:${y + + 50}px;width:${width}px;` + } else { + this.__LIST__.classList.toggle('show', false) + } + }) + + this._inactiveFn = $.outside(this, ev => { + this.__LIST__.classList.remove('show') + }) + + // 选择建议 + this._handleSelect = $.bind(this.__LIST__, 'click', ev => { + if (ev.target.tagName === 'LI') { + this._fetchSelect(ev.target.dataset.idx, ev) + this.dispatchEvent(new CustomEvent('input')) + } + }) + } else { + this._handleWheel = $.catch(this.__INPUT__, 'wheel') + } + } + + disconnectedCallback() { + $.unbind(this.__INPUT__, 'wheel', this._handleWheel) + $.unbind(this.__INPUT__, 'keydown', this._handleSubmit) + $.unbind(this.__INPUT__, 'input', this._handleChange) + $.unbind(this.__LIST__, 'click', this._handleSelect) + $.clearOutside(this._inactiveFn) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'icon': + this.props.icon = val + if (val) { + this.__ICO__.setAttribute('is', val) + } else { + this.removeAttribute('icon') + this.__ICO__.removeAttribute('is') + } + break + + case 'autofocus': + this.__INPUT__.setAttribute('autofocus', '') + // 辣鸡火狐, 要触发一下focus, 才能聚焦 + setTimeout(_ => { + this.__INPUT__.focus() + }, 10) + + break + + case 'placeholder': + this.__INPUT__.setAttribute('placeholder', val) + break + + case 'type': + if (~TYPES.indexOf(val)) { + this.type = val + } else { + this.type = 'text' + } + break + + case 'value': + this.value = val + break + + case 'maxlength': + case 'minlength': + this.props[name] = val + this._updateAttr() + break + + case 'readonly': + case 'disabled': + var k = name + if (k === 'readonly') { + k = 'readOnly' + } + this[k] = true + break + } + } +} + + +if(!customElements.get('wc-input')){ + customElements.define('wc-input', Input) +} diff --git a/src/lib/form/number.js b/src/lib/form/number.js new file mode 100644 index 0000000..e6cc97a --- /dev/null +++ b/src/lib/form/number.js @@ -0,0 +1,413 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import "../scroll/index.js" +import "../icon/index.js" +import $ from "../utils.js" + +export default class Number extends HTMLElement { + + + static get observedAttributes() { + return ["value","max","min","step","autofocus","readonly","disabled"] + } + + props = { + value: 0, + max: null, + min: null, + step: 1, + autofocus: false, + readonly: false, + disabled: false + } + + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` +
    + - + + + + + +
    +` + + + this.__OUTER__ = this.root.children[1] + this.__INPUT__ = this.__OUTER__.children[1] + } + + get readOnly() { + return this.props.readonly + } + + set readOnly(val) { + var type = typeof val + + if (val === this.props.readonly) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.readonly = true + this.setAttribute('readonly', '') + this.__INPUT__.setAttribute('readonly', '') + } else { + this.props.readonly = false + this.removeAttribute('readonly') + this.__INPUT__.removeAttribute('readonly') + } + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + this.__INPUT__.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + this.__INPUT__.removeAttribute('disabled') + } + } + + get value() { + return this.props.value + } + + set value(val) { + var n = +val + if (n === n) { + val = n + } else { + val = 0 + } + this.props.value = val + this.__INPUT__.value = val + + this._checkActionEnable() + } + + _checkActionEnable() { + var { max, min, value } = this.props + var n = value + + if (min !== null) { + if (min > n) { + n = min + } + this.__OUTER__.children[0].classList.toggle('disabled', value <= min) + } + if (max !== null) { + if (max < n) { + n = max + } + this.__OUTER__.children[2].classList.toggle('disabled', value >= max) + } + if (n !== value) { + this.props.value = n + this.__INPUT__.value = n + this.dispatchEvent(new CustomEvent('input')) + } + } + + _updateValue(act) { + var { max, min, value, step } = this.props + if (act === '+') { + if (max !== null && max < value + step) { + return + } + value += step + } else { + if (min !== null && min > value - step) { + return + } + value -= step + } + this.props.value = +value.toFixed(2) + this.__INPUT__.value = this.props.value + this._checkActionEnable() + this.dispatchEvent(new CustomEvent('input')) + } + + connectedCallback() { + // 键盘事件 + this._handleSubmit = $.catch(this.__INPUT__, 'keydown', ev => { + if (this.disabled || this.readOnly) { + return + } + + // up: 38, down: 40 + if (ev.keyCode === 38 || ev.keyCode === 40) { + ev.preventDefault() + return this._updateValue(ev.keyCode === 38 ? '+' : '-') + } + // 回车触发submit事件 + if (ev.keyCode === 13) { + ev.preventDefault() + this.dispatchEvent( + new CustomEvent('submit', { + detail: this.value + }) + ) + } + }) + + this._handleChange = $.catch(this.__INPUT__, 'change', ev => { + if (isFinite(this.__INPUT__.value)) { + this.props.value = +this.__INPUT__.value + if (!this.__INPUT__.value.endsWith('.')) { + this.__INPUT__.value = this.props.value + } + } else { + this.__INPUT__.value = this.props.value = 0 + } + this.dispatchEvent(new CustomEvent('input')) + }) + + this._handleAction = $.bind(this.__OUTER__, 'click', ev => { + if (this.disabled || this.readOnly) { + return + } + var target = ev.target + + if (target.tagName === 'SPAN' || target.parentNode === 'SPAN') { + var act = target.dataset.act || target.parentNode.dataset.act + + this._updateValue(act) + } + }) + } + + disconnectedCallback() { + $.unbind(this.__INPUT__, 'keydown', this._handleSubmit) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'autofocus': + this.__INPUT__.setAttribute('autofocus', '') + // 辣鸡火狐, 要触发一下focus, 才能聚焦 + setTimeout(_ => { + this.__INPUT__.focus() + }, 10) + break + + case 'value': + this.value = val >> 0 + break + + case 'step': + case 'max': + case 'min': + var n = +val + if (n === n) { + this.props[name] = n + } + this._checkActionEnable() + break + + case 'readonly': + case 'disabled': + var k = name + if (k === 'readonly') { + k = 'readOnly' + } + this[k] = true + break + } + } +} + + +if(!customElements.get('wc-number')){ + customElements.define('wc-number', Number) +} diff --git a/src/lib/form/progress.js b/src/lib/form/progress.js new file mode 100644 index 0000000..7e8128a --- /dev/null +++ b/src/lib/form/progress.js @@ -0,0 +1,163 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +export default class Progress extends HTMLElement { + + + static get observedAttributes() { + return ["value","max"] + } + + props = { + value: 0, + max: 1 + } + + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + this.__THUMB__ = this.root.children[1].lastElementChild + } + + get value() { + return this.props.value + } + + set value(val) { + this.props.value = +val + this.calculate() + } + + calculate() { + var { max, value } = this.props + this.__THUMB__.style.width = `${(100 * value) / max}%` + } + + connectedCallback() { + this.calculate() + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'max': + var max = +val + if (max !== max || max < 1) { + max = 1 + } + this.props.max = max + this.calculate() + break + + case 'value': + var v = +val + if (v === v) { + this.props.value = v + this.calculate() + } + break + } + } +} + + +if(!customElements.get('wc-progress')){ + customElements.define('wc-progress', Progress) +} diff --git a/src/lib/form/radio-item.js b/src/lib/form/radio-item.js new file mode 100644 index 0000000..af33309 --- /dev/null +++ b/src/lib/form/radio-item.js @@ -0,0 +1,308 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import $ from "../utils.js" + +export default class RadioItem extends HTMLElement { + + + static get observedAttributes() { + return ["value","checked","readonly","disabled"] + } + + props = { + value: '', + checked: false, + readonly: false, + disabled: false + } + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + + this.__SWITCH__ = this.root.lastElementChild + } + + get value() { + return this.props.value + } + + set value(val) { + this.props.value = val + } + + get checked() { + return this.props.checked + } + + set checked(val) { + this.props.checked = !!val + this.__SWITCH__.classList.toggle('checked', this.props.checked) + } + + get readOnly() { + return this.props.readonly + } + + set readOnly(val) { + var type = typeof val + + if (val === this.props.readonly) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.readonly = true + this.setAttribute('readonly', '') + } else { + this.props.readonly = false + this.removeAttribute('readonly') + } + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + } + } + + connectedCallback() { + if (this.value === this.parentNode.value) { + this.checked = true + } + + this._handleClick = $.catch(this, 'click', ev => { + if (this.disabled || this.readOnly || this.checked) { + return + } + + this.parentNode.dispatchEvent( + new CustomEvent('child-picked', { detail: this.value }) + ) + }) + } + + disconnectedCallback() { + $.unbind(this, 'click', this._handleClick) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'value': + this.value = val + break + + case 'checked': + case 'readonly': + case 'disabled': + var k = name + if (k === 'readonly') { + k = 'readOnly' + } + this[k] = true + break + } + } +} + + +if(!customElements.get('wc-radio-item')){ + customElements.define('wc-radio-item', RadioItem) +} diff --git a/src/lib/form/radio.js b/src/lib/form/radio.js new file mode 100644 index 0000000..b541f48 --- /dev/null +++ b/src/lib/form/radio.js @@ -0,0 +1,130 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import $ from "../utils.js" +import "./radio-item.js" + +export default class Radio extends HTMLElement { + + + static get observedAttributes() { + return ["value"] + } + + props = { + value: null + } + + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + } + + _updateChildrenStat() { + Array.from(this.children).forEach(it => { + if (it.tagName === 'WC-RADIO-ITEM' && it.root) { + if (it.value === this.props.value) { + it.checked = true + } else { + it.checked = false + } + } + }) + } + + get value() { + return this.props.value + } + + set value(val) { + if (val === this.props.value) { + return + } + this.props.value = val + this._updateChildrenStat() + } + + connectedCallback() { + this._pickedFn = $.bind(this, 'child-picked', ev => { + log('radio picked: ', ev.detail) + this.value = ev.detail + this.dispatchEvent(new CustomEvent('input')) + }) + } + + disconnectedCallback() { + $.unbind(this, 'child-picked', this._pickedFn) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'value': + this.value = val + break + } + } +} + + +if(!customElements.get('wc-radio')){ + customElements.define('wc-radio', Radio) +} diff --git a/src/lib/form/select.js b/src/lib/form/select.js new file mode 100644 index 0000000..c411c33 --- /dev/null +++ b/src/lib/form/select.js @@ -0,0 +1,559 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import "../scroll/index.js" +import "../icon/index.js" +import $ from "../utils.js" + +function parseOptions(arr, props) { + let html = '' + for (let it of arr) { + if (it.list) { + html += `
    ${it.name}
    ` + for (let _ of it.list) { + props.DICT[_.value] = _ + if (!_.disabled) { + props.LIST.push(_) + } + html += `
    ${_.label}
    ` + } + } else { + if (!it.disabled) { + props.LIST.push(it) + } + props.DICT[it.value] = it + html += `
    ${it.label}
    ` + } + } + return html +} + +export default class Select extends HTMLElement { + + + static get observedAttributes() { + return ["label","placeholder","multi","value","options","mvidx","readonly","disabled"] + } + + props = { + label: '', + placeholder: '', + multi: '', + value: '', + options: '', + mvidx: null, //下拉列表光标的索引ID + readonly: false, + disabled: false + } + + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` +
    + + + + +
    + +
    +
    +
    +
    +` + + + this.__OUTER__ = this.root.children[1] + this.__PREPEND__ = this.__OUTER__.children[0] + this.__INPUT__ = this.__OUTER__.children[1] + this.__APPEND__ = this.__OUTER__.children[3] + this.__OPTG__ = this.__OUTER__.children[4] + } + + get readOnly() { + return this.props.readonly + } + + set readOnly(val) { + var type = typeof val + + if (val === this.props.readonly) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.readonly = true + this.setAttribute('readonly', '') + } else { + this.props.readonly = false + this.removeAttribute('readonly') + } + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + this.__INPUT__.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + this.__INPUT__.removeAttribute('disabled') + } + } + + get value() { + return this.props.value + } + + set value(val) { + var { DICT, active } = this.props + this.props.value = val + this.__INPUT__.value = (DICT && DICT[val] && DICT[val].label) || val + if (!active) { + this._updateStyle() + } + } + + _renderOptions(options) { + this.props.DICT = {} + this.props.LIST = [] + var elem = this.__OPTG__.firstElementChild.firstElementChild + + elem.innerHTML = parseOptions(options, this.props) + this.props.ITEMS = Array.from(elem.children).filter(it => { + return it.tagName === 'DD' && !it.hasAttribute('disabled') + }) + this.value = this.props.value + } + + // 移动光标选择下拉选项 + _moveSelect(ev) { + var { LIST, DICT, ITEMS } = this.props + if (LIST && LIST.length) { + ev.preventDefault() + var step = ev.keyCode === 38 ? -1 : 1 + + if (this.props.mvidx === null) { + this.props.mvidx = 0 + } else { + this.props.mvidx += step + } + if (this.props.mvidx < 0) { + this.props.mvidx = 0 + } else if (this.props.mvidx > ITEMS.length - 1) { + this.props.mvidx = ITEMS.length - 1 + } + + ITEMS.forEach((it, i) => { + if (i === this.props.mvidx) { + this.__OPTG__.firstElementChild.scrollTop = it.offsetTop - 150 + it.setAttribute('focus', '') + } else { + it.removeAttribute('focus') + } + }) + } + } + + _updateStyle(idx) { + var { LIST, ITEMS, value } = this.props + if (LIST && LIST.length) { + if (idx === undefined) { + for (let i = -1, it; (it = LIST[++i]); ) { + if (value === it.value) { + idx = i + break + } + } + } + this.props.mvidx = idx + ITEMS.forEach((it, i) => { + if (i === idx) { + it.setAttribute('focus', '') + } else { + it.removeAttribute('focus') + } + }) + } + } + + // 触发列表选择 + _fetchSelect(idx, needUpdateStyle) { + var item = this.props.LIST[idx] + this.value = item.value + this.dispatchEvent( + new CustomEvent('select', { + detail: item + }) + ) + if (needUpdateStyle) { + this._updateStyle(idx) + } + this.props.active = false + this.__OPTG__.classList.remove('show') + } + + connectedCallback() { + var prepend = this.__PREPEND__.assignedNodes() + var append = this.__APPEND__.assignedNodes() + + // 相同插槽, 只允许1个 + while (prepend.length > 1) { + this.removeChild(prepend.pop()) + } + while (append.length > 1) { + this.removeChild(append.pop()) + } + + if (prepend.length && this.props.type !== 'textarea') { + this.__OUTER__.setAttribute('prepend', '') + } + if (append.length && this.props.type !== 'textarea') { + this.__OUTER__.setAttribute('append', '') + } + + function initPos() { + var { x, y, width } = this.getBoundingClientRect() + var size = this.getAttribute('size') + this.props.active = true + if (size && size === 'mini') { + y += 32 + } else { + y += 50 + } + this.__OPTG__.style.cssText = `left:${x}px;top:${y}px;width:${width}px;` + } + + /* ---------------------------------------------------- */ + /* ----------------- 各种事件 ------------------ */ + /* ---------------------------------------------------- */ + + // 键盘事件 + this._handleKeydown = $.catch(this.__INPUT__, 'keydown', ev => { + if (this.disabled || this.readOnly) { + return + } + // up: 38, down: 40 + if (ev.keyCode === 38 || ev.keyCode === 40) { + if (!this.props.active) { + initPos.call(this) + this.__OPTG__.classList.toggle('show', true) + return + } + return this._moveSelect(ev) + } + // 回车触发select事件 + if (ev.keyCode === 13) { + if (this.props.mvidx !== null && this.props.active) { + return this._fetchSelect(this.props.mvidx) + } + } + }) + + // 渲染列表 + this._activeFn = $.bind(this.__INPUT__, 'click', ev => { + var { options } = this.props + + if (this.disabled || this.readOnly) { + return + } + + initPos.call(this) + this.__OPTG__.classList.toggle('show') + }) + + // 选择选项 + this._handleSelect = $.bind(this.__OPTG__, 'click', ev => { + if (ev.target.tagName === 'DD' && !ev.target.hasAttribute('disabled')) { + this._fetchSelect(+ev.target.dataset.idx, true) + this.dispatchEvent(new CustomEvent('input')) + } + }) + + this._inactiveFn = $.outside(this, ev => { + this.__OPTG__.classList.toggle('show', false) + this.props.active = false + }) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + // label和placeholder 功能相同 + case 'label': + case 'placeholder': + this.__INPUT__.setAttribute('placeholder', val) + break + + case 'options': + if (val) { + try { + this._renderOptions(JSON.parse(val)) + } catch (err) {} + this.removeAttribute('options') + } + break + + case 'value': + this.value = val + break + + case 'readonly': + case 'disabled': + var k = name + if (k === 'readonly') { + k = 'readOnly' + } + this[k] = true + break + } + } + + disconnectedCallback() { + $.unbind(this.__INPUT__, 'keydown', this._handleKeydown) + $.unbind(this.__INPUT__, 'click', this._activeFn) + $.unbind(this.__OPTG__, 'click', this._handleSelect) + $.clearOutside(this._inactiveFn) + } +} + + +if(!customElements.get('wc-select')){ + customElements.define('wc-select', Select) +} diff --git a/src/lib/form/star.js b/src/lib/form/star.js new file mode 100644 index 0000000..c9a93ac --- /dev/null +++ b/src/lib/form/star.js @@ -0,0 +1,301 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import $ from "../utils.js" + +export default class Star extends HTMLElement { + + + static get observedAttributes() { + return ["value","text","size","color","'allow-half'","'show-value'","starSize","disabled"] + } + + props = { + value: 0, + text: [], + size: '', + color: '', + 'allow-half': false, + 'show-value': false, + starSize: 32, // 星星的宽度, 用于实现半星 + disabled: false + } + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` + +` + + + this.__BOX__ = this.root.children[1] + this.__STARS__ = Array.from(this.__BOX__.children) + this.__TEXT__ = this.__STARS__.pop() + } + + get value() { + return this.props.value + } + + set value(val) { + var v = +val + var tmp = val >> 0 + if (v === v && v > 0) { + val = v + } else { + val = 0 + } + + if (val > 5) { + val = 5 + } + + this.props.value = val + this._updateDraw(-1) + } + + /** + * 更新图标渲染 + * i: int + * f: float + */ + _updateDraw(i, f = 0) { + var _last = 'star-half' + var { value, tmp = { i: 0, f: 0 } } = this.props + + if (i === -1) { + i = Math.floor(value) + f = +(value % 1).toFixed(1) + if (i > 0 && i === value) { + i-- + f = 1 + } + } + + if (!this.props['allow-half']) { + f = f > 0 ? 1 : 0 + } + // 减少DOM操作 + if (i === tmp.i && f === tmp.f) { + return + } + + if (f > 0.5) { + _last = 'star-full' + } + + this.__STARS__.forEach((it, k) => { + it.setAttribute('is', k < i ? 'star-full' : 'star') + it.setAttribute('color', k < i ? this.props.color : 'grey') + }) + + if (f > 0) { + this.__STARS__[i].setAttribute('is', _last) + this.__STARS__[i].setAttribute('color', this.props.color) + } + + // 缓存结果 + this.props.tmp = { i, f } + + if (i === 0 && f === 0) { + this.__TEXT__.textContent = '' + } else { + if (this.props.text.length === 5) { + this.__TEXT__.textContent = this.props.text[i] + } else { + if (this.props['show-value']) { + this.__TEXT__.textContent = i + f + } + } + } + } + + connectedCallback() { + $.catch(this.__BOX__, 'mousemove', ev => { + if (this.props.disabled) { + return + } + if (ev.target.tagName === 'WC-ICON') { + let idx = +ev.target.dataset.idx + this._updateDraw(idx, +(ev.offsetX / this.props.starSize).toFixed(1)) + } + }) + + $.catch(this.__BOX__, 'click', ev => { + var { tmp, disabled } = this.props + if (disabled) { + return + } + if (ev.target.tagName === 'WC-ICON') { + this.props.value = tmp.i + tmp.f + this.dispatchEvent(new CustomEvent('input')) + } + }) + + $.catch(this.__BOX__, 'mouseleave', ev => { + if (this.props.disabled) { + return + } + this._updateDraw(-1) + }) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'size': + this.props.starSize = this.__STARS__[0].clientWidth + break + + case 'allow-half': + case 'show-value': + case 'disabled': + this.props[name] = true + break + + case 'color': + if (val) { + this.props.color = val + } + break + + case 'text': + if (val) { + val = val.split('|') + if (val.length === 5) { + this.props.text = val.map(it => it.trim()) + } + } + break + + case 'value': + this.value = val + break + } + } +} + + +if(!customElements.get('wc-star')){ + customElements.define('wc-star', Star) +} diff --git a/src/lib/form/switch.js b/src/lib/form/switch.js new file mode 100644 index 0000000..9288822 --- /dev/null +++ b/src/lib/form/switch.js @@ -0,0 +1,241 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-12-08 11:30:52 + * @version v1.0.0 + * + */ + + +import $ from "../utils.js" +export default class Switch extends HTMLElement { + + + static get observedAttributes() { + return ["'active-text'","'inactive-text'","checked","disabled"] + } + + props = { + 'active-text': null, + 'inactive-text': null, + checked: false, + disabled: false + } + + constructor() { + super(); + + Object.defineProperty(this, 'root', { + value: this.attachShadow({ mode: 'open' }), + writable: true, + enumerable: false, + configurable: true + }) + + this.root.innerHTML = ` +
    + + +
    +` + + + this.__SWITCH__ = this.root.lastElementChild.firstElementChild + } + + get value() { + return this.props.checked + } + + set value(val) { + this.checked = val + } + + get checked() { + return this.props.checked + } + + set checked(val) { + this.props.checked = !!val + this.__SWITCH__.classList.toggle('checked', this.props.checked) + } + + get disabled() { + return this.props.disabled + } + + set disabled(val) { + var type = typeof val + + if (val === this.props.disabled) { + return + } + if ((type === 'boolean' && val) || type !== 'boolean') { + this.props.disabled = true + this.setAttribute('disabled', '') + } else { + this.props.disabled = false + this.removeAttribute('disabled') + } + } + + connectedCallback() { + this._handleClick = $.bind(this, 'click', ev => { + if (this.disabled) { + return + } + this.checked = !this.checked + if (this.checked) { + if (this.props['active-text'] !== null) { + this.textContent = this.props['active-text'] + } + } else { + if (this.props['inactive-text'] !== null) { + this.textContent = this.props['inactive-text'] + } + } + this.dispatchEvent(new CustomEvent('input')) + }) + } + + disconnectedCallback() { + $.unbind(this, 'click', this._handleClick) + } + + attributeChangedCallback(name, old, val) { +if (val === null || old === val) {return} + switch (name) { + case 'checked': + case 'disabled': + this[name] = true + break + case 'active-text': + case 'inactive-text': + this.props[name] = val + '' + break + } + } +} + + +if(!customElements.get('wc-switch')){ + customElements.define('wc-switch', Switch) +} diff --git a/src/lib/icon/index.js b/src/lib/icon/index.js new file mode 100644 index 0000000..7f1e547 --- /dev/null +++ b/src/lib/icon/index.js @@ -0,0 +1,15 @@ +/** + * + * @authors yutent (yutent@doui.cc) + * @date 2020-07-07 16:27:17 + * @version v2.0.1 + * + */ + +'use strict' + +import SVG_DICT from"./svg.js";let dict=SVG_DICT;window.EXT_SVG_DICT&&Object.assign(dict,EXT_SVG_DICT);export default class Icon extends HTMLElement{static get observedAttributes(){return["is"]}constructor(){super(),Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(this,"props",{value:{is:""},writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML=" ",this.__ICO__=this.root.lastElementChild,this.drawPath()}get is(){return this.props.is}set is(o){o&&this.setAttribute("is",o)}drawPath(){var{is:o}=this.props,t=dict[o];this.__ICO__&&o&&t&&(this.__ICO__.innerHTML="loading"===o?t:``,this.__ICO__.classList.toggle("load","loading"===o))}attributeChangedCallback(o,t,e){if(null!==e&&t!==e)switch(o){case"is":this.props.is=e,e?this.drawPath():this.removeAttribute("is")}}}; + +if(!customElements.get('wc-icon')){ + customElements.define('wc-icon', Icon) +} diff --git a/src/lib/icon/svg.js b/src/lib/icon/svg.js new file mode 100644 index 0000000..9da6381 --- /dev/null +++ b/src/lib/icon/svg.js @@ -0,0 +1 @@ +"use strict";const SVG_PATH={android:"M733.9 338.6C723.1 214.3 628.3 117 512.9 117s-210.2 97.3-221 221.6h442zM393 232.6c0-12.4 8.9-22.4 20-22.4 11 0 19.9 10.1 19.9 22.4 0 12.4-8.9 22.4-19.9 22.4-11.1 0-20-10-20-22.4m199.4 0c0-12.4 8.9-22.4 19.9-22.4 11 0 20 10.1 20 22.4 0 12.4-9 22.4-20 22.4s-19.9-10-19.9-22.4m-173.6-92c-4.7 2.4-9.6 5.2-13 7.2l-36-71.6c-2-3.9-0.8-8.9 2.7-11.1 3.5-2.3 7.9-0.9 9.9 3.1l36.4 72.4m187.7 0L643 68.2c2-3.9 6.4-5.3 9.9-3.1 3.5 2.2 4.7 7.2 2.8 11.1l-36.1 71.6c-3.4-1.9-8.4-4.7-13.1-7.2m-332 495.1c0 31.8-22.3 57.8-49.5 57.8-27.3 0-49.6-26-49.6-57.8V411.4c0-31.8 22.3-57.8 49.6-57.8 27.2 0 49.5 26 49.5 57.8v224.3z m574.1 0c0 31.8-22.3 57.8-49.5 57.8s-49.6-26-49.6-57.8V411.4c0-31.8 22.3-57.8 49.6-57.8 27.2 0 49.5 26 49.5 57.8v224.3zM293.8 363.1V722c0 31.8 23.2 57.8 51.4 57.8h35.6v122.3c0 31.8 22.3 57.8 49.6 57.8 27.2 0 49.5-26 49.5-57.8V779.9h64.6v122.3c0 31.8 22.3 57.8 49.5 57.8 27.3 0 49.6-26 49.6-57.8V779.9h36.2c28.3 0 51.4-26 51.4-57.8v-359H293.8z",app:"M834.6 960H564.3c-30.4 0-55.1-24.7-55.1-55V635c0-30.3 24.7-55 55.1-55h270.3c30.4 0 55.1 24.7 55.1 55v270c-0.1 30.3-24.8 55-55.1 55z m-445.3 0H119.1C88.7 960 64 935.3 64 905V635c0-30.3 24.7-55 55.1-55h270.3c30.4 0 55.1 24.7 55.1 55v270c-0.1 30.3-24.8 55-55.2 55z m177.9-61h258.4V640.8H567.2V899zM125 899h258.4V640.8H125V899z m595.6-356.7c-12.9 0-25.8-4.9-35.7-14.7L496.1 338.8c-9.5-9.5-14.8-22.2-14.8-35.6 0-13.5 5.2-26.1 14.8-35.6L685 78.8c19.7-19.7 51.7-19.7 71.3 0l188.9 188.8c9.5 9.5 14.8 22.2 14.8 35.6 0 13.5-5.3 26.1-14.8 35.6L756.3 527.6c-9.8 9.8-22.7 14.7-35.7 14.7zM543 303.5l178 177.9 178-177.9-178-177.9-178 177.9zM389.3 515.1H119.1c-30.4 0-55.1-24.7-55.1-55V190c0-30.3 24.7-55 55.1-55h270.3c30.4 0 55.1 24.7 55.1 55v270c-0.1 30.4-24.8 55.1-55.2 55.1z m-264.3-58h258.4V198.9H125v258.2z",apple:"M512.1 269c-1.3-2-1.6-19.8-0.5-30.5 2.3-22.4 7.5-40.1 17.6-60.2 9.4-18.5 24-38.6 39.7-54.8 22.7-23.3 61.8-45.2 97.4-54.7 12.1-3.2 30.1-5.9 31.4-4.6 1.2 1.2 1.4 24.1 0.3 34.8-4.9 45.1-27.1 88.3-63.2 123.1-28.1 27.1-57.6 42-91.7 46.5-12.1 1.7-30.1 1.9-31 0.4zM356.3 959c-33.9-7.5-66.3-32.7-104.1-81.2-37.7-48.3-59.2-84.4-79.3-133-20.5-49.4-33.3-97.8-39.2-147-1.4-11.5-1.7-21.6-1.7-47.4 0-36 0.9-46.1 6.2-71.6 10.5-50.4 34.1-95.6 67.5-128.9 20.3-20.3 39.3-33.6 66-46.2 29.9-14.1 60.4-21.1 92.2-21.1 25.8 0 44 4.5 104 25.7 22.1 7.8 38.6 12.5 46.8 13.3 4.5 0.4 7.9 0.1 13.8-1.4 8.3-2 38.3-11.9 63-20.6 53.4-18.9 88.9-23.4 130.9-16.4 50.9 8.4 89.7 26.7 121.4 57.4 9.6 9.3 24.2 26.1 24.2 28 0 0.3-3.7 3-8.3 5.9-18.4 12-41.3 32.1-52.6 46.4-36.5 46-48.6 108-33.1 169 13.7 53.7 53.1 100.6 107.4 127.7 8.9 4.4 10.9 5.8 10.7 7.3-0.3 2.5-11.5 31.3-17 43.6-11.1 25.1-28.8 56.1-45.8 80.4-29.8 42.7-57.9 73.8-80.6 89.3-10.9 7.4-26.8 14.8-38.9 18.1-8.6 2.3-11 2.5-25.2 2.5-12.9 0-17.6-0.4-26.1-2.1-11.8-2.4-32.8-9.1-54.8-17.3-26-9.8-50.3-14.7-72.7-14.7-26.6 0-48.5 4.6-83 17.5-20.3 7.6-31.8 11.3-45.1 14.5-9.7 2.3-13.6 2.8-26.1 3.1-10.4 0.4-16.5 0.1-20.5-0.8z",at:"M532.7 417.9c-22.6 0-39.8 9.5-51.7 28.4-11.8 19-19.6 47.4-23.3 85.3-1.9 25.2 0 44.2 5.8 57.1 5.8 12.9 15.3 19.4 28.2 19.4 11.8 0 22.2-3.2 31.4-9.5s17.4-17.9 24.3-34.9l13.1-142.2c-4.7-1.1-9.5-1.9-14-2.6-4.8-0.8-9.3-1-13.8-1zM512 64C264.5 64 64 264.5 64 512s200.5 448 448 448 448-200.5 448-448S759.5 64 512 64z m275.3 434.9c-1.9 46.1-16.4 85.9-43.1 119.8-26.7 33.6-66.8 50.4-119.8 50.4-17.7 0-33-4.7-45.7-14.2-12.9-9.5-22-23-27.1-40.5-8.8 17.9-20.2 31.2-33.8 40.1-13.6 8.8-29.5 13.4-47.8 13.4-32.5 0-57.3-12.5-74.5-37.3s-23.5-57.7-19-98.9c5.6-52.6 21.5-94.8 47.8-126.4s58.2-47.4 95.6-47.4c26.3 0 47.6 2.8 63.5 8.2 15.9 5.4 33.6 12.3 52.8 23.7l-1.1-0.2h1.7l-16.6 179.6c-1.1 18.3 0.2 31.4 3.7 38.3 3.7 6.9 8.4 10.6 14.4 10.6 24.3 0 43.9-11 58.6-33.6 14.6-22.6 22.8-50.8 24.6-85.3 3.4-71.1-11-126.4-43.5-166.1-32.5-39.6-82.5-59.7-150.1-59.7-65.7 0-118 21.3-156.8 64.2s-59.7 101-63.1 174.9c-3.7 71.9 12.1 128.8 47.2 170.4 35.1 41.8 85.5 62.7 151.4 62.7 18.3 0 37.3-1.9 57.1-5.8 19.6-3.9 36.8-8.8 51-14.6l12.5 52.1c-14.6 8.8-33.2 15.7-55.8 20.7-22.6 5-44.6 7.3-66.1 7.3-87.9 0-155.7-26.1-203.1-78.4-47.4-52.1-69.4-123.6-65.7-214.5 3.9-90 32.1-161.3 84.2-214.1 52.3-52.8 121.7-79 208.3-79 85.1 0 150.3 25 195.4 74.7 45.6 49.8 66.3 118.1 62.9 204.9z",attach:"M872.7 458.8L499.9 831.6c-74.6 74.6-196.6 74.6-271.1 0-74.6-74.6-74.6-196.6 0-271.1l389.7-389.7c47.4-47.4 122-47.4 169.5 0 47.4 47.4 47.4 122 0 169.5L398.2 730c-18.6 18.6-49.1 18.6-67.8 0-18.6-18.6-18.6-49.1 0-67.8l322-322-50.8-50.8-322 322c-47.4 47.4-47.4 122 0 169.5 47.4 47.4 122 47.4 169.5 0l389.7-389.7c74.6-74.6 74.6-196.6 0-271.1s-196.6-74.6-271.1 0L178 509.7C74.6 613 74.6 779.1 178 882.5s269.4 103.4 372.8 0l372.8-372.8-50.9-50.9z",backward:"M952.7 732c-19.3-108-78-244.6-175.4-336.6-48.6-46-102-75.5-156.7-91.3-6.8-2-13.7-3.8-20.6-5.4-6.9-1.6-13.8-3-20.7-4.2-13.8-2.4-27.6-4.1-41.4-5-9.7-0.7-19.4-1-29-1.1V124.7c0-0.1 0.2-1.6-0.9-2.5-0.9-0.7-2.2-0.8-3.2-0.2L68 420.6c-0.2 0.1-4.2 2.8-4 7.7 0.2 4.7 4.1 7 4.3 7.2l436.8 338.3c1.8 1.1 2.5 1.1 2.8 0.8 0.7-0.5 0.9-2.5 0.9-2.5V552.4c51.6 2.8 127.6 10.1 184.3 29.1C815.1 622.3 894 733 927.3 836.8c8.2 25.6 12.3 47.7 14.5 63.5 0.4 1.4 1.8 2.2 3 2 1-0.2 1.8-1 2-2 0.7-2.6 1.6-6.4 2.9-11.2 1.6-6.3 2.8-10.9 2.9-11.1 4.9-21.3 7.4-44 7.4-68.4 0-24.3-2.4-50.3-7.3-77.6z",bell:"M512 911.1c-37.2 0-69.8-25.6-79.1-60.5H384c9.3 62.8 62.8 109.4 128 109.4s118.7-48.9 128-109.4h-48.9c-9.3 34.9-41.9 60.5-79.1 60.5z m336-238.2c0-9-4.5-18-13.5-20.3-2.3 0-121.8-65.4-121.8-241.3 2.3-51.9-20.3-162.4-124-196.2-2.3 0-2.3 0-4.5-2.3 11.3-15.8 20.3-36.1 20.3-56.4 0-49.6-40.6-92.5-92.5-92.5s-92.5 40.6-92.5 92.5c0 20.3 6.8 40.6 20.3 56.4-2.3 0-4.5 0-4.5 2.3C331.6 248.9 309 357.2 311.3 409c0 175.9-115 239-121.8 243.5-6.8 4.5-13.5 11.3-13.5 20.3v121.8c0 6.8 2.3 13.5 6.8 18s11.3 6.8 15.8 6.8h626.9c6.8 0 13.5-2.3 15.8-6.8 4.5-4.5 6.8-11.3 6.8-18V672.9zM512 111c24.6 0 44.8 20.2 44.8 44.8 0 24.6-20.2 44.8-44.8 44.8-24.6 0-44.8-20.2-44.8-44.8 0-24.6 20.2-44.8 44.8-44.8zM242 761v-80.1c33.8-23.8 124.5-101.8 124.5-266.3 0-4.3-2.1-112.6 86.5-142.9 6.3-2.2 27.4-8.7 59.1-8.7 31.6 0 52.7 6.5 59.1 8.7 88.6 30.3 86.5 138.6 86.5 142.9 0 164.6 90.7 242.5 124.5 266.3V761H242z",calendar:"M315.3 323.8c-18 0-32.7-14.1-32.7-31.3V128.2c0-17.3 14.7-31.3 32.7-31.3 18 0 32.7 14.1 32.7 31.3v164.3c-0.1 17.2-14.7 31.3-32.7 31.3z m528.5 603.4H180.2C116.1 927.2 64 876 64 813.2V300.8c0-62.9 52.1-114 116.2-114h38.9c18 0 32.7 14.1 32.7 31.3 0 17.3-14.7 31.3-32.7 31.3h-38.9c-28.1 0-50.9 23-50.9 51.3v512.4c0 28.3 22.8 51.3 50.9 51.3h663.5c28.1 0 50.9-23 50.9-51.3V300.8c0-28.3-22.8-51.3-50.9-51.3H810c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h33.7c64.1 0 116.2 51.1 116.2 114v512.4c0.1 62.7-52 113.9-116.1 113.9zM708.7 323.8c-18 0-32.7-14.1-32.7-31.3V128.2c0-17.3 14.7-31.3 32.7-31.3 18 0 32.7 14.1 32.7 31.3v164.3c0 17.2-14.7 31.3-32.7 31.3z m43.8 393.1h-481c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h480.9c18 0 32.7 14.1 32.7 31.3 0 17.3-14.6 31.3-32.6 31.3z m0-205.3h-481c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h480.9c18 0 32.7 14.1 32.7 31.3 0 17.2-14.6 31.3-32.6 31.3z m-131.2-267H399.9c-18 0-32.7-14.1-32.7-31.3 0-17.3 14.7-31.3 32.7-31.3h221.4c18 0 32.7 14.1 32.7 31.3 0 17.2-14.7 31.3-32.7 31.3z",camera:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m271.5 719.5C711 856.1 614.6 896 512 896s-199-39.9-271.5-112.5C167.9 711 128 614.6 128 512s39.9-199 112.5-271.5C313 167.9 409.4 128 512 128s199 39.9 271.5 112.5C856.1 313 896 409.4 896 512s-39.9 199-112.5 271.5zM400.1 212.1c-81.3 30.3-146.9 92.8-181.4 171.9H512L400.1 212.1zM825.6 576c4.3-21.1 6.4-42.5 6.4-64 0-73.2-24.6-140.7-66-194.7L622 576h203.6zM719.9 268.8C664 220.9 591.4 192 512 192c-15.9 0-31.6 1.2-46.9 3.4L621.7 448l98.2-179.2zM198.4 448c-4.3 21.1-6.4 42.5-6.4 64 0 73.3 24.6 140.8 66.1 194.7L402 448H198.4z m425.5 363.9c81.3-30.3 146.9-92.8 181.4-171.9H512l111.9 171.9z m-319.8-56.7C360 803.1 432.6 832 512 832c15.9 0 31.6-1.2 46.9-3.4L402.3 576l-98.2 179.2z",chart:"M321.4 812.4h-108V548h108v264.4z m165.2 0h-108V283.6h108v528.8z m165.2 0h-108V415.8h108v396.6z m158.9 0h-108V213.6h108v598.8zM960 876.8c0-10.6-8.4-19.2-18.7-19.2H82.7c-10.3 0-18.7 8.6-18.7 19.2S72.4 896 82.7 896h858.7c10.2 0 18.6-8.6 18.6-19.2zM85.3 128H80c-8.8 0-16 7.2-16 16v736c0 8.8 7.2 16 16 16h5.3c8.8 0 16-7.2 16-16V144c0-8.8-7.2-16-16-16z","checkbox-on":"M860.4 64H163.6C108.8 64 64 108.8 64 163.6v696.9c0 54.8 44.8 99.6 99.6 99.6h696.9c54.8 0 99.6-44.8 99.6-99.6V163.6C960 108.8 915.2 64 860.4 64z m-448 696.9L163.6 512l69.7-69.7 179.2 179.2 378.3-378.3 69.7 69.7-448.1 448z","checkbox-off":"M860.2 163.6v696.8H163.6V163.6h696.6m0-99.6H163.6C108.8 64 64 108.8 64 163.6v696.8c0 54.8 44.8 99.6 99.6 99.6h696.8c54.8 0 99.6-44.8 99.6-99.6V163.6c-0.2-54.8-45-99.6-99.8-99.6z",client:"M578 886.6H137.9c-40.7 0-73.9-35.1-73.9-78.3v-46.9c0-17.3 13.4-31.3 29.9-31.3H578c16.5 0 29.9 14.1 29.9 31.3 0 17.3-13.4 31.3-29.9 31.3H123.7v15.6c0 8.6 6.3 15.6 14.1 15.6H578c16.5 0 29.9 14.1 29.9 31.3 0 17.4-13.4 31.4-29.9 31.4z m308.1 0h-176c-40.7 0-73.9-35.1-73.9-78.3V432.8c0-43.2 33.1-78.3 73.9-78.3h176.1c40.7 0 73.9 35.1 73.9 78.3v375.6c-0.1 43.1-33.2 78.2-74 78.2z m-176-469.4c-7.8 0-14.2 7-14.2 15.6v375.6c0 8.6 6.3 15.6 14.2 15.6h176.1c7.8 0 14.1-7 14.1-15.6V432.8c0-8.6-6.3-15.6-14.1-15.6H710.1z m88 374.1c-7.9 0-15.6-3.2-21.1-8.8-5.6-5.6-8.7-13.3-8.7-21.1 0-7.9 3.2-15.7 8.8-21.1 5.5-5.5 13.2-8.7 21-8.7 8 0 15.7 3.2 21.2 8.8 5.5 5.5 8.7 13.2 8.7 21 0 8-3.2 15.7-8.8 21.2-5.6 5.5-13.3 8.7-21.1 8.7zM578 669.5H225.9c-40.7 0-73.9-35.1-73.9-78.3V215.6c0-43.2 33.1-78.3 73.9-78.3h572.2c40.7 0 73.9 35.1 73.9 78.3v46.9c0 17.3-13.4 31.3-29.9 31.3s-29.9-14.1-29.9-31.3v-46.9c0-8.6-6.3-15.6-14.2-15.6H225.9c-7.8 0-14.1 7-14.1 15.6v375.6c0 8.6 6.3 15.6 14.1 15.6H578c16.5 0 29.9 14.1 29.9 31.3 0 17.3-13.4 31.4-29.9 31.4z",close:"M925.9 960c-9.1 0-17.7-3.5-24.1-10L512 560.2 122.2 950c-6.4 6.4-15 10-24.1 10-9.1 0-17.7-3.5-24.1-10-13.3-13.3-13.3-34.9 0-48.2L463.8 512 74 122.2C60.7 108.9 60.7 87.3 74 74c13.3-13.3 34.9-13.3 48.2 0L512 463.8 901.8 74c13.3-13.3 34.9-13.3 48.2 0 13.3 13.3 13.3 34.9 0 48.2L560.2 512 950 901.8c13.3 13.3 13.3 34.9 0 48.2-6.4 6.5-15 10-24.1 10z",color:"M512 64C283.2 64 96 265.6 96 512s187.2 448 416 448c39.3 0 69.3-32.3 69.3-74.7 0-19.9-6.9-37.3-18.5-49.8-11.6-12.4-18.5-29.9-18.5-49.8 0-42.3 30-74.7 69.3-74.7h83.2c127.1 0 231.1-112 231.1-248.9C928 243.2 740.8 64 512 64zM256 512c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z m128-192c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z m256 0c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z m128 192c-36.3 0-64-27.7-64-64s27.7-64 64-64 64 27.7 64 64-27.7 64-64 64z","dbl-left":"M536.2 948.6L76.3 539.7l-0.3-0.3c-7.7-7.4-12-17.2-12-27.6 0-12.4 6.1-23.9 16.8-31.6L536.3 75.3c8.1-7.3 19-11.3 30.5-11.3 24.2 0 43.9 18.1 43.9 40.3 0 11.1-4.8 21.4-13.4 29L171.2 512l426.1 378.7c8.5 7.6 13.4 18.1 13.4 29 0 22.2-19.7 40.3-43.9 40.3-11.3 0-22.2-4-30.6-11.4z m349.4 0l-460-408.9-0.3-0.3c-7.7-7.4-12-17.2-12-27.6 0-12.4 6.1-23.9 16.8-31.6L885.6 75.3c8.2-7.3 19-11.3 30.5-11.3 24.2 0 43.9 18.1 43.9 40.3 0 11.1-4.8 21.4-13.4 29L520.5 512l426.1 378.7c8.5 7.6 13.4 18.1 13.4 29 0 22.2-19.7 40.3-43.9 40.3-11.3 0-22.2-4-30.5-11.4z","dbl-right":"M457.2 960c-24.2 0-43.9-18.1-43.9-40.3 0-10.9 4.9-21.4 13.4-29L852.8 512 426.7 133.2c-8.6-7.5-13.4-17.8-13.4-29 0-22.2 19.7-40.3 43.9-40.3 11.5 0 22.4 4 30.6 11.3l455.5 404.9c10.7 7.7 16.8 19.2 16.8 31.6 0 10.4-4.3 20.2-12 27.6l-0.3 0.3-460 409c-8.4 7.4-19.3 11.4-30.6 11.4z m-349.3 0C83.7 960 64 941.9 64 919.7c0-10.9 4.9-21.4 13.4-29L503.5 512 77.4 133.2c-8.6-7.5-13.4-17.8-13.4-29C64 82.1 83.7 64 107.9 64c11.5 0 22.4 4 30.6 11.3L594 480.2c10.7 7.7 16.8 19.2 16.8 31.6 0 10.4-4.3 20.2-12 27.6l-0.3 0.3-460.1 408.9c-8.3 7.4-19.2 11.4-30.5 11.4z",deny:"M321.8 540.6c-22.2 0.1-33.4-8.7-33.5-26.5-0.1-18.2 11-27.4 33.2-27.5l380.2-2.1c12.8-0.1 21.8 2.4 27.1 7.6 5.3 5.1 8 11.6 8 19.6 0 7.9-2.4 14.4-7.4 19.3s-14.1 7.4-27.5 7.5l-380.1 2.1zM512 120c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392z",doc:"M646.4 960H243.2C182.9 960 128 903.8 128 842.1V291.9c0-29.4 11.8-59 32.5-81.3 21.4-23.1 49.2-35.8 78.4-35.8l23.9-0.6c0.3-29 12.6-56.6 34.7-77.7C319.2 75.9 348.4 64 377.6 64c3.2 0 319.3 0.9 322.6 0.9h3.4L896 289.6v442.5c0 61.7-54.9 117.9-115.1 117.9l-19.3-0.2c-0.2 29.2-12.5 56.8-34.9 78-21.8 20.4-51 32.2-80.3 32.2zM240.6 232.3c-23.3 0-56.6 35.1-56.6 59.6v550.2c0 10.9 8.1 26.2 20.6 39.1 12.8 13.2 27.6 21.4 38.6 21.4h403.3c19.1 0 44.5-25.7 46.3-52.9l-315.2 0.3c-60.3 0-115.2-56.2-115.2-117.9V231.7l-21.8 0.6z m124-110.9c-22.9 0-46.2 35.2-46.2 60.5v550.2c0 25.3 23.3 60.5 46.2 60.5h416.3c11 0 25.8-8.2 38.6-21.4 12.5-12.9 20.6-28.3 20.6-39.1V341.5h-86c-61.1 0-102.2-41.7-102.2-103.9 0-0.5-0.4-56.4 0-116.2H364.6z m335.6 536.3h-242c-19 0-34.5-15.9-34.5-35.3 0-19.5 15.5-35.3 34.5-35.3h242c19 0 34.5 15.9 34.5 35.3s-15.5 35.3-34.5 35.3z m0-137.4h-242c-19 0-34.5-15.9-34.5-35.3 0-19.5 15.5-35.3 34.5-35.3h242c19 0 34.5 15.9 34.5 35.3s-15.5 35.3-34.5 35.3z m7.6-310.2c0 26.1 23.7 74.6 46.2 74.6h64.3L707.8 149.2v60.9z",download:"M639.8 187.8H384.2v60.8h255.7v-60.8z m0-59.4H384.2v31.8h255.7v-31.8z m224.6 237.3H639.8v-87.3H384.2v87.3H161.8l349 340.1 353.6-340.1z m19.4 289.6l-30.7 151.2H170.8l-30.6-151.2H64v240.3h896V655.3h-76.2z",edit:"M835 298.7L685.5 154.2l74.8-72.3c24.8-23.9 64.9-23.9 89.6 0l59.8 57.8c24.8 24 24.8 62.8 0 86.8L835 298.7zM400.8 718.5L251.4 574l406.3-389.8 149.4 144.5-406.3 389.8zM131.3 837l90.9-234.9 148.2 143.3L131.3 837z m791.4 123H101.3C80.8 960 64 943.2 64 922.7c0-20.5 16.8-37.3 37.3-37.3h821.3c20.5 0 37.3 16.8 37.3 37.3 0.1 20.5-16.7 37.3-37.2 37.3z",eye:"M512 210c-203.6 0-376.8 124.8-448 302 71.2 177.2 244.4 302 448 302s376.8-124.8 448-302c-71.2-177.2-244.4-302-448-302z m0 503.4c-112 0-203.6-90.6-203.6-201.4S400 310.6 512 310.6 715.6 401.2 715.6 512 624 713.4 512 713.4z m0-322.2c-67.2 0-122.2 54.4-122.2 120.8s55 120.8 122.2 120.8S634.2 578.4 634.2 512s-55-120.8-122.2-120.8z","eye-off":"M512.1 289.6c112.4 0 203.8 90.6 203.8 202.2 0 26.2-5.2 51-14.6 74l119 118c61.6-51 110-116.8 139.8-192-70.6-177.4-244.5-303.1-448.3-303.1-57 0-111.6 10.2-162.2 28.2l88 87.4c23.1-9.3 48.1-14.7 74.5-14.7zM104.8 179.5l93 92.2 18.8 18.6C148.8 342.2 95.8 411.8 64 491.8c70.4 177.4 244.3 303.1 448.1 303.1 63.2 0 123.4-12.2 178.4-34l17.2 17 119.4 118 51.8-51.4-722.5-716.4-51.6 51.4z m225.1 223.3l63.2 62.6c-2 8.4-3.2 17.4-3.2 26.2 0 67 54.6 121.2 122.2 121.2 9 0 18-1.2 26.4-3.2l63.2 62.6c-27.2 13.4-57.4 21.4-89.6 21.4-112.4 0-203.8-90.6-203.8-202.2 0-31.6 8.2-61.4 21.6-88.6z m175.6-31.4l128.4 127.4 0.8-6.4c0-67-54.6-121.2-122.2-121.2l-7 0.2z",face:"M327.9 690.6c-6.5-3.9-12.4-11.6-12.4-19.7 0-12.3 9.9-22.2 22.2-22.2 2 0 3.7 0.6 5.5 1.1h0.5c51.5 23.7 108.7 36.1 169.1 36.1 59.5 0 115.8-12.7 166.7-35.7h0.2c2.4-0.8 4.9-1.5 7.6-1.5 12.3 0 22.4 10 22.4 22.4 0 8.5-4.7 15.8-11.6 19.6-56.4 25.7-118.8 40.6-184.8 40.6-65.7 0-129.2-15.3-185.4-40.7-0.3-0.1-0.2-0.1 0 0zM512 120c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392zM394.6 391.6c0-25-20.3-45.3-45.3-45.3-25 0-45.3 20.3-45.3 45.3 0 25 20.3 45.3 45.3 45.3 25 0 45.3-20.3 45.3-45.3z m281.3-45.2c-25 0-45.3 20.3-45.3 45.3 0 25 20.3 45.3 45.3 45.3 25 0 45.3-20.3 45.3-45.3 0-25.1-20.3-45.3-45.3-45.3z","finger-print":"M156.2 411.2c-4.8 0-9.8-1.2-14.2-3.8-13.4-7.8-18-24.8-10.2-38.2C167.4 309.2 275.6 169 512 169c102.4 0 192.2 27.2 266.8 80.8 61.4 44 95.8 93.8 112.2 117.8 8.8 12.8 5.4 30-7.4 38.8-12.8 8.6-30.4 5.4-39.2-7.4-29.8-43.2-120.2-174.4-332.4-174.4-207.2 0-300.8 120.8-331.4 172.6-5.2 9.2-14.6 14-24.4 14zM631 960c12.6 0 24-8.4 27.4-21 3.8-14.8-5.2-30-20.4-33.8C501 870.8 443.8 729 439.4 717.8c-1.4-4.6-7.4-27.4-9.4-55.6-2-27-0.6-64.2 17.4-88 13.2-17.4 34.4-25.8 64.6-25.8 55 0 64.2 27.2 78.6 83.6 14 55 33.2 130.4 140 135.8 41 2 78-16.4 104-51.6 39-52.8 46.4-133.6 18.8-205.6-21.6-56.4-63.2-112.8-114-154.8-65.6-54-144.2-82.6-227.4-82.6-180 0-299.6 123.2-338.4 245.4C138 631.4 181.2 795 183 802c4 14.8 19.6 23.8 34.6 19.8 15-3.8 24-19.2 20-34-0.4-1.4-40.8-154.8-10-252.4 16.6-52.4 51.2-103.4 94.8-139.6C375 352.2 440.6 329 512 329c167.2 0 262 131.8 288.8 201.8 20.8 54 16 115.4-11.6 153-10.2 13.8-28.2 30-55.6 28.6-62.4-3.2-73.2-34.4-88.2-93.8-7.2-28.6-14.6-58.2-33-82.2-22.4-29.4-55-43.6-100.2-43.6-48.6 0-85.4 16.2-109.6 48-52.8 69.6-18.4 188.4-17 193.4l0.4 1.6c2.6 7.2 66.6 180.4 238 223.4 2.4 0.6 4.6 0.8 7 0.8z m-220-12.8c6.8 0 13.8-2.6 19-7.4 11.4-10.4 12-28.2 1.4-39.4-60.4-64-94.6-135.6-107.4-225.6-6.4-52.8 2.6-132.6 49-184.4 32.2-36 79-54.2 138.8-54.2 69.2 0 121.6 31.2 156 92.6 27.4 48.8 33 98.8 33 99.4 1.6 15.2 15.6 26.4 31 24.8s26.8-15.2 25.2-30.6c-0.2-2.4-6.6-60.6-38.8-119-44.4-80.4-115.6-123-206.2-123-76.6 0-137.6 24.6-181 73-58.8 65.6-70.8 161-62.6 228.4v0.6c14.6 101.8 53.4 183.2 122 256 5.6 5.8 13 8.8 20.6 8.8zM727 867c12.8 0 26.2-0.8 39.8-2.4 15.4-1.6 26.6-15.4 24.8-30.8-1.8-15.4-15.8-26.4-31.2-24.6-61.6 7-111.6-5-149-35.2-63.2-51.2-71.4-140.2-71.6-141.8-1.2-15.4-14.6-26.8-30.2-25.6s-27.2 14.6-26 30c0.4 4.6 9.6 113.4 91.6 180.2C616 850.2 667 867 727 867z m64.6-716c0 15.4-12.6 27.8-28.2 27.8-6.4 0-12.2-2-17-5.6l-0.4 0.4 0.2 0.2c-0.8-0.4-72.6-54-234.2-54s-233.4 53.4-234.2 54l0.2-0.2c-4.6 3.2-10.2 5.2-16.4 5.2-15.6 0-28.2-12.4-28.2-27.8 0-8.2 3.6-15.6 9.4-20.8 0 0 0.2 0 0.4-0.2 1-1 2.2-1.8 3.4-2.6C265 114.6 348.2 64 512 64c156 0 239 45.8 262.4 61.2 10.2 4.2 17.2 14.2 17.2 25.8z",fire:"M622.5 959.8c-29.2-27.3-63-64.1-77.5-99.5-35.2-86 0-170.6 0-170.6s-113.8 12-167.3 155c-15.6 41.7 4.2 84.7 27 115.4C245.3 918.4 129 787.8 129 632.8c0-85.6 69.4-139.2 128-199.1 33.8-34.5 64-170.6 64-170.6s49.6 59.6 64 142.2c19.3 111.3 0 142.2 0 142.2s94.4-64.9 96-199C482.7 197.2 385 64 385 64s223.5 111.6 279.9 255.2c67.1 171 40.1 342 40.1 342s65.6-38 96-85.3c33.5-52.1 32-113.7 32-113.7s62.5 92 64 170.6c2.9 154.7-115 285.2-274.5 327z",first:"M733.2 611.4c-4.8-10.3-18.1-15.2-29.8-10.8-11.6 4.3-17.2 16.3-12.4 26.6L771.9 801l-148.4-26.7c-9.1-1.6-18.5 1.9-23.7 8.9l-83.3 113.3-4.2 6.5-4.9-6.4L424.2 784c-5.1-6.9-14.5-10.4-23.7-8.6l-148.4 28.1 81.1-174.6c4.8-10.4-0.7-22.2-12.3-26.5-11.6-4.2-25 0.7-29.8 11.1l-97.6 210.2c-3.2 7-1.9 14.9 3.5 20.7 5.4 5.8 13.9 8.4 22.2 6.8L394.6 818l98.2 133c2.6 3.5 6.2 6.1 10.3 7.6 1.9 0.7 4 1.1 6.1 1.3 0.2 0 3.7 0.1 4.6 0.1h0.3c6.8-0.6 13-3.9 16.8-9.1L629.4 817l175.4 31.5c4.6 0.8 9.2 0.4 13.3-1.2 3.4-1.3 6.4-3.3 8.8-5.9 5.4-5.8 6.7-13.8 3.5-20.7l-97.2-209.3zM512 64c-156.9 0-284.5 127.6-284.5 284.5S355.1 632.9 512 632.9s284.5-127.6 284.5-284.5S668.9 64 512 64z m20.9 127.4v320.2h-42.8V284.3h-74.7v-31.9c27.6 0 46.9-3.5 57.8-10.5 12.4-8.2 21.9-25.1 28.2-50.6h31.5z",floppy:"M841.4 960H182.6c-30.1 0-54.6-28.4-54.6-63.4V127.4c0-34.9 24.5-63.4 54.6-63.4H728c6.3 0 12.5 3 16.9 8.1l144.2 168.5c4.4 5.1 6.8 11.9 6.8 19.1v637c0.1 34.9-24.4 63.3-54.5 63.3z m-69.9-54.4h69.8c4 0 7.3-4 7.3-9h4.6-4.6V270.8L718.1 118.4h-22.5v192.4c0 28.1-19.7 50.9-43.9 50.9H371.3c-24.2 0-43.9-22.8-43.9-50.9V118.4H182.6c-4 0-7.3 4-7.3 9v769.3c0 4.9 3.3 9 7.3 9h83.9v-271c0-79.1 55.3-143.5 123.3-143.5h258.4c68 0 123.3 64.4 123.3 143.5v270.9z m-457.6 0h410.3V634.7c0-49.1-34.1-89.1-75.9-89.1H389.8c-41.9 0-75.9 40-75.9 89.1v270.9z m284-128.7H426.1c-10.2 0-18.5-10.4-18.5-23.2 0-12.8 8.3-23.2 18.5-23.2h171.8c10.2 0 18.5 10.4 18.5 23.2 0 12.8-8.3 23.2-18.5 23.2z m0-80.6H426.1c-10.2 0-18.5-10.4-18.5-23.2 0-12.8 8.3-23.2 18.5-23.2h171.8c10.2 0 18.5 10.4 18.5 23.2 0 12.8-8.3 23.2-18.5 23.2z m5.3-389h45V118.4h-45v188.9z m-228.4 0h181.1V118.4H374.8v188.9z",fly:"M471.7 926.5h-57.9V728.6c0-16.6 3.4-39.9 29.6-72.3 13.7-16.9 285-330.6 383.7-444.7l-675 362.6 217.9 77-16.7 54.4-9.5-3.3c-9.6-3.3-236.2-81.6-258.3-91.9-12.9-6-21-17.9-21.5-31.8-0.6-16.6 9.2-32.2 26.3-41.7 26.9-15 765.6-403.4 809.7-426.6 4.6-3.8 22.3-17.2 41.3-11.4l1.2 0.4 1.1 0.7c18.5 11.5 16.9 28.5 16 38.7-0.2 2-0.4 3.9-0.4 5.3v2.5l-0.9 1.6c-5.1 16.6-50.8 251.5-84.3 423.4-27 138.8-43.9 225.1-46.5 235.5-3.8 20.4-14.1 36.9-28.5 45.2-11.7 6.7-25 7.7-38.6 2.8-25.3-6.2-242.8-78.3-252.2-81.4l-10-3.3 23.8-59 8.7 2.9c91.7 31 230.8 77.5 244.2 80.8h0.9c2.3-13.5 12.7-68.5 58.8-307.2 20.7-106.9 41.5-214.6 52.1-269.3C771 355.9 503.6 673 481 698.6c-5 9.3-9.3 17.6-9.3 29.9v198z","folder-open":"M107.6 845.9l10.9 1.2c1.3 0.1 2.6 0.2 3.9 0.2H783c14.3 0 27-9 30.7-21.9l120.9-417.9c2.6-9 0.6-18.3-5.5-25.7-6.1-7.3-15.2-11.5-25.2-11.5h-94.5v-43.2c0-17.3-15.2-31.4-33.9-31.4H375.3c-4.6 0-9-1.7-12.3-4.7l-54-50c-6.4-5.9-14.9-9.2-23.9-9.2H117.3c-18.7 0-33.8 14.1-33.8 31.4v552.6c0 14.2 10.2 26.2 24.1 30.1z m679.3 20.9H117.6C88 866.8 64 842.7 64 813.1V210.9c0-29.6 24-53.7 53.6-53.7h168.7c14.3 0 27.8 5.6 37.9 15.8l53.7 53.9h401.4c29.6 0 53.6 24.1 53.6 53.7v27.6h75.5c16.2 0 31.1 7.4 40.9 20.2 9.8 12.8 13 29.1 8.9 44.7L836.7 828.5c-6.1 22.5-26.5 38.3-49.8 38.3z m20-18.8H92.1c-5.2 0-9.9-2.4-13.1-6.5-3.1-4.1-4.1-9.3-2.8-14.3L207 334.6c1.9-7.2 8.5-12.3 15.9-12.3h714.8c5.2 0 10 2.4 13.1 6.5 3.1 4.1 4.1 9.3 2.8 14.3L822.8 835.8c-1.9 7.2-8.5 12.2-15.9 12.2zM83 804.5V203.6c0-10.2 8.3-18.5 18.4-18.5H280c4.9 0 9.6 1.9 13 5.4l57.5 58.1c6.8 6.9 15.8 10.6 25.5 10.6h426c10.2 0 18.4 8.3 18.4 18.5v50.1H235.5c-15.3 0-28.7 10.4-32.7 25.4L83 804.5zM119.5 213v413.2l74.3-279.8c6-22.5 26.3-38.3 49.5-38.3h530.1v-25.5h-398c-14.3 0-27.6-5.6-37.7-15.8L284.2 213H119.5z","folder-close":"M902.7 923.3h-776c-34.3 0-62.1-27.9-62.1-62.3V162.9c0-34.3 27.9-62.3 62.1-62.3h195.6c16.6 0 32.2 6.5 44 18.3l62.2 62.5h465.4c4.2 0.1 31.1 1 50.4 23.6 17.6 20.5 16.3 44.3 16 49v624.9c-6.9 26.2-30.6 44.4-57.6 44.4z m-607.9-452h332.4c7.1 0 12.8-5.2 12.8-11.7 0-6.5-5.7-11.7-12.8-11.7H294.8c-7.1 0-12.8 5.2-12.8 11.7 0 6.5 5.7 11.7 12.8 11.7z m0 128.3h434.4c7.1 0 12.8-5.2 12.8-11.7 0-6.5-5.7-11.7-12.8-11.7H294.8c-7.1 0-12.8 5.2-12.8 11.7 0 6.4 5.7 11.7 12.8 11.7z m0 128.1h434.4c7.1 0 12.8-5.2 12.8-11.7 0-6.5-5.7-11.7-12.8-11.7H294.8c-7.1 0-12.8 5.2-12.8 11.7 0 6.5 5.7 11.7 12.8 11.7z",get:"M958.3 414.3c-43.9-110.1-5.6-200.2 1.7-303.4-0.2-1.3-1-2.2-2.1-2.4-0.7-0.1-1.2 0.1-1.5 0.2-54.6 30.4-109.6 72.7-162.7 120.7l-62.9 60.4c-181 183.4-325.3 409.4-325.3 409.4L300.8 482.7c-0.1-0.2-0.8-1.1-2.1-1.2-0.7-0.1-1.2 0.1-1.5 0.3l-232 120.5c-1 1-1.4 2.3-1.1 3.5 0.3 1.1 1 1.7 1.3 1.9 101 41.4 251 175.1 351.6 306.7 0.6 0.9 1.6 1.3 2.6 1.1 1.2-0.2 1.7-1.3 1.7-1.4C483.6 795.9 691.6 588.4 840.5 482l59.1-38.5c22-12.7 41.3-21.6 57.1-25.8 0.3 0 0.9-0.2 1.3-0.7 0.6-0.7 0.7-1.8 0.3-2.7z",happy:"M699.7 960c-6.7 0-13.4-3-18-8.6-7.9-9.9-6.3-24.4 3.6-32.3 123.7-99 194.6-246.5 194.6-404.8 0-161-73-310.2-200.2-409.2-10-7.8-11.8-22.2-4-32.3 7.8-10 22.2-11.8 32.3-4C846.5 176.6 925.9 339 925.9 514.3c0 172.3-77.2 332.9-211.8 440.7-4.1 3.2-9.2 5-14.4 5zM207.9 347c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8S98.1 176.6 98.1 237.3c0 60.6 49.1 109.7 109.8 109.7z m0 547.6c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8-60.6 0-109.8 49.2-109.8 109.8 0 60.7 49.1 109.8 109.8 109.8z",headset:"M876.3 478.9v-4.8c0-195.2-148.2-354.1-330.4-354.1h-67.8c-182.2 0-330.4 158.8-330.4 354.1v4.8C99.8 490.7 64 536.7 64 591.6v196.7C64 852.2 112.3 904 171.9 904c59.6 0 107.9-51.8 107.9-115.7V591.6c0-55-35.8-101-83.7-112.7v-4.8c0-166.6 126.5-302.2 282-302.2h67.8c155.5 0 282 135.6 282 302.2v4.8c-47.9 11.8-83.7 57.8-83.7 112.7v196.7c0 63.9 48.3 115.7 107.9 115.7 59.6 0 107.9-51.8 107.9-115.7V591.6c0-54.9-35.8-100.9-83.7-112.7z",home:"M837.2 960H620.4c-18.2 0-33.1-15.1-33.1-33.6V693H436.7v233.3c0 18.5-14.8 33.6-33.1 33.6H186.8c-18.2 0-33.1-15.1-33.1-33.6v-356c0-18.5 14.8-33.6 33.1-33.6 18.2 0 33.1 15.1 33.1 33.6v322.3h150.7V659.4c0-18.5 14.8-33.6 33.1-33.6h216.8c18.2 0 33.1 15.1 33.1 33.6v233.3h150.7V570.4c0-18.5 14.8-33.6 33.1-33.6 18.2 0 33.1 15.1 33.1 33.6v356c-0.3 18.5-15.1 33.6-33.3 33.6zM97 557.1c-8.9 0-17.2-3.5-23.5-10-12.7-13-12.7-34.3 0-47.3L488.5 74c6.3-6.4 14.6-10 23.5-10s17.2 3.5 23.5 10l415 425.9c12.7 13.1 12.7 34.3 0 47.3-6.3 6.4-14.6 10-23.5 10s-17.2-3.5-23.5-10L512 145.4 120.5 547.2c-6.3 6.4-14.6 9.9-23.5 9.9z m710.5-258.3c-18.2 0-33.1-15.1-33.1-33.6v-55.4h-53.7c-18.2 0-33.1-15.1-33.1-33.6s14.8-33.6 33.1-33.6h86.7c18.2 0 33.1 15.1 33.1 33.6v89c0 18.5-14.8 33.6-33 33.6z",image:"M915.1 280.3l-165-8-9.6-107.6c-2-22.6-22.2-38.4-45.8-36.6l-591.8 48.6c-23.6 2-40.6 21-38.8 43.4l42.4 471.6c2 22.6 22.4 38.4 45.8 36.6l30-2.4-4.8 91.6c-1.2 25.2 18.4 45.6 44.8 47l660.2 31.4c26.4 1.2 48.2-17.2 49.6-42.4l27.8-526.6c1.2-25-18.6-45.4-44.8-46.6z m-709.8 10.6l-14.2 269.6-35 49.4-32.2-356v-2c2-10 8.8-18 19.2-18.8l522-42.8c10.4-0.8 19.4 6 21 15.8 0 0.4 0.6 0.4 0.6 0.8 0 0.2 0.6 0.4 0.6 0.8l5.4 61.6-438-21c-26.4-0.8-48.2 17.6-49.4 42.6z m668 473.8l-169.6-199-74.8 68.6-138.4-161.6-245.4 261.4 20.8-398.2v-0.8c2-10.8 12.4-18.6 23.8-18l582.4 28c11.6 0.6 20.6 9.4 20.8 20.4 0 0.4 0.6 0.6 0.6 1l-20.2 398.2z",info:"M475.2 251.1c0-10.3 3.6-19.1 10.7-26.4 7.1-7.3 16.2-11 27-11 10.4 0 19.1 3.7 26.3 11 7.1 7.3 10.7 16.1 10.7 26.4 0 10.3-3.6 19.1-10.7 26.4-7.2 7.3-15.9 11-26.3 11-10.9 0-19.9-3.7-27-11-7.1-7.4-10.7-16.2-10.7-26.4z m66.7 526.4c0 22.2-9.2 33.4-27.7 33.4-18.9 0-28.4-11.1-28.4-33.4V397.2c0-12.8 2.7-21.8 8-27.1 5.3-5.3 12.1-7.9 20.4-7.9 8.2 0 14.9 2.5 20 7.5s7.6 14.2 7.6 27.5v380.3zM512 120c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392z",key:"M497.4 443.1C466.8 356.5 378.7 288 281.5 288 158.3 288 64 388.8 64 512s98.6 224 221.8 224c97.1 0 181.1-68.5 211.5-155.1h221.4v137.8h148.8V580.9H960V443.1H497.4zM287.9 608.9c-52.9 0-96.1-43.2-96.1-96.1s43.2-96.1 96.1-96.1 96.1 43.2 96.1 96.1-43.2 96.1-96.1 96.1z",left:"M710.9 948.6L251 539.7l-0.3-0.3c-7.7-7.4-12-17.2-12-27.6 0-12.4 6.1-23.9 16.8-31.6L710.9 75.3C719.1 68 730 64 741.5 64c24.2 0 43.9 18.1 43.9 40.3 0 11.1-4.8 21.4-13.4 29L345.8 512 772 890.8c8.5 7.6 13.4 18.1 13.4 29 0 22.2-19.7 40.3-43.9 40.3-11.4-0.1-22.2-4.1-30.6-11.5z",linux:"M460.4 269.5c-3.6 0.3-6.1 2.1-7.6 5.2-1.5 3.2-2.9 4.7-4.2 4.7-1.6 0.3-2.4-0.5-2.4-2.5 0-4 3.1-6.5 9.3-7.5h4.9z m42.7 7c-1.3 0.3-3.2-0.7-5.7-3.3-2.4-2.5-5.3-3.3-8.6-2.2 7.8-3.7 13.1-3.3 15.7 1 1 2 0.5 3.5-1.4 4.5zM330.8 489.9c-1.3-0.3-2.3 0.2-3 1.5-0.6 1.3-1.4 3.4-2.2 6.2-0.8 2.8-1.7 5.1-2.7 6.8-1 1.7-2.6 3.8-4.9 6.5-2.3 3.3-2.4 5.3-0.5 6 1.3 0.3 3.4-0.8 6.1-3.5 2.8-2.7 4.8-5.7 6.1-9 0.3-1 0.7-2.2 1-3.5 0.3-1.3 0.6-2.3 1-3 0.3-0.7 0.6-1.4 0.7-2.2 0.1-0.8 0.2-1.5 0.3-2v-1.5l-0.5-1.2c-0.3-0.9-0.8-1.2-1.4-1.1z m419.5 179.5c0-6-9-13-27-21 1.3-5 2.5-9.6 3.7-13.8 1.1-4.2 1.9-8.5 2.4-13s1-8.1 1.5-10.8c0.5-2.7 0.6-6.4 0.3-11.3-0.3-4.8-0.5-8.1-0.5-9.8 0-1.7-0.6-5.4-1.7-11-1.1-5.7-1.8-9.1-2-10.2-0.2-1.2-1-5.3-2.4-12.5s-2.3-11.6-2.7-13.2c-3.3-16-10.9-33.2-23-51.5-12.1-18.3-23.9-30.8-35.3-37.5 7.8 6.7 17.2 20.5 28 41.5 28.4 54 37.3 100.3 26.5 139-3.6 13.3-11.8 20.3-24.5 21-10.1 1.3-16.4-1.7-18.9-9.2-2.5-7.5-3.8-21.4-3.9-41.8-0.1-20.3-2-38.2-5.7-53.5-3-13-6.1-24.5-9.6-34.5-3.4-10-6.6-17.6-9.6-22.7-3-5.2-5.5-9.2-7.6-12.3-2.1-3-4.2-5.5-6.4-7.5-2.1-2-3.4-3.1-3.7-3.5-4.6-20.7-9.7-37.8-15.2-51.5-5.6-13.7-10.4-23-14.5-28s-7.9-10.5-11.5-16.5c-3.6-6-6-12.7-7.3-20-1.3-7-0.3-15.9 3-26.7 3.3-10.8 4-19.1 2.2-24.7-1.8-5.7-9.1-9.8-21.8-12.5-4.9-1-12.2-4-21.8-9-9.7-5-15.5-7.7-17.4-8-2.6-0.3-4.4-4.7-5.4-13s0.3-16.8 3.9-25.5 9.5-13.2 17.6-13.5c12.1-1 20.4 4 25 15 4.6 11 5.2 20.7 2 29-3.6 6.3-3.9 10.8-1 13.2 3 2.5 7.9 2.6 14.7 0.3 4.2-1.3 6.4-7.3 6.4-18v-18.5c-1.6-10-3.8-18.3-6.6-25-2.8-6.7-6.2-11.7-10.3-15.3-4.1-3.5-7.9-6-11.5-7.5-3.6-1.5-8-2.7-13.3-3.7-35 2.7-49.6 25-43.7 67 0 5-0.2 7.5-0.5 7.5-3-3-7.8-4.8-14.5-5.2-6.7-0.5-12.1-0.4-16.2 0.3s-6.6-0.2-7.6-2.5c0.3-19-2.3-34-7.8-45-5.6-11-12.9-16.7-22.1-17-8.8-0.3-15.6 4.2-20.3 13.8-4.7 9.5-7.4 19.4-8.1 29.8-0.3 5 0.2 11.2 1.7 18.5 1.5 7.3 3.6 13.6 6.4 18.8 2.8 5.2 5.3 7.4 7.6 6.8 3.3-1 5.9-3.3 7.8-7 1.3-3 0.2-4.3-3.4-4-2.3 0-4.8-2.4-7.6-7.3-2.8-4.8-4.3-10.4-4.6-16.7-0.3-7.3 1.1-13.5 4.4-18.5 3.3-5 8.8-7.3 16.7-7 5.6 0 10 3.5 13.3 10.5 3.3 7 4.8 13.5 4.6 19.5-0.2 6-0.4 9.7-0.7 11-7.2 5-12.3 9.8-15.2 14.5-2.6 4-7.1 7.9-13.5 11.7-6.4 3.8-9.7 5.9-10.1 6.2-4.2 4.7-6.8 9.2-7.6 13.5-0.8 4.3 0.4 7.3 3.7 9 4.6 2.7 8.7 5.9 12.3 9.8 3.6 3.8 6.2 7 7.8 9.5 1.6 2.5 4.7 4.7 9.1 6.5 4.4 1.8 10.2 2.9 17.4 3.3 15.4 0.7 32.1-1.8 50.1-7.5 0.7-0.3 4.4-1.5 11.3-3.5s12.5-3.7 16.9-5.2c4.4-1.5 9.2-3.7 14.5-6.5 5.2-2.8 8.7-5.7 10.3-8.7 3-4.7 6.2-6 9.8-4 1.6 1 2.7 2.4 3.2 4.3 0.5 1.8 0 3.8-1.5 6s-4.2 3.7-8.1 4.7c-6.6 2-15.8 5.6-27.7 10.8-11.9 5.2-19.4 8.4-22.3 9.8-14.4 6.3-25.9 10.2-34.4 11.5-8.2 1.7-21.1 1.3-38.7-1-3.3-0.7-4.7-0.3-4.4 1 0.3 1.3 3.1 4.5 8.4 9.5 8.2 7.7 19.1 11.3 32.9 11 5.6-0.3 11.4-1.5 17.6-3.5 6.2-2 12.1-4.3 17.6-7 5.6-2.7 11-5.6 16.4-8.7 5.4-3.1 10.3-6 14.7-8.5 4.4-2.5 8.4-4.5 12-6 3.6-1.5 6.4-1.9 8.6-1.3 2.1 0.6 3.5 2.5 4.2 5.5 0 0.7-0.2 1.4-0.5 2.2-0.3 0.8-1 1.7-2 2.5s-2 1.6-3 2.2c-1 0.7-2.4 1.5-4.2 2.5-1.8 1-3.3 1.7-4.4 2.2-1.2 0.5-2.8 1.3-4.9 2.5-2.1 1.2-3.7 1.9-4.6 2.2-9.2 4.7-20.2 12-33.1 22-12.9 10-23.8 17.2-32.6 21.5-8.8 4.3-16.8 4.5-24.1 0.5-6.9-3.7-17.2-15.8-30.9-36.5-7.2-10.3-11.3-14-12.3-11-0.3 1-0.5 2.7-0.5 5 0 8.3-2.4 17.8-7.3 28.3s-9.7 19.7-14.5 27.7c-4.7 8-8.2 17.7-10.3 29-2.1 11.3-0.2 21.8 5.7 31.5-7.5 2-17.7 17-30.7 45-12.9 28-20.7 51.5-23.3 70.5-0.7 6-0.9 17.5-0.7 34.5 0.2 17-0.7 26.8-2.7 29.5-2.6 8-7.4 8.5-14.2 1.5-10.5-10.3-16.4-26-17.6-47-0.7-9.3 0-18.7 2-28 1.3-6.3 1.2-9.3-0.5-9l-2 2.5c-11.8 21.7-10.1 49.3 4.9 83 1.6 4 5.7 8.7 12.3 14 6.5 5.4 10.5 8.7 11.8 10 6.6 7.7 23.6 22.7 51 45.2 27.5 22.5 42.7 35.3 45.6 38.2 5.2 5 8.1 11.3 8.6 19 0.5 7.7-1.8 14.8-6.9 21.5-5.1 6.7-12.5 10.5-22.3 11.5 2.6 5 7.4 12.4 14.2 22.2 6.9 9.8 11.4 18.8 13.8 27 2.3 8.2 3.4 19.9 3.4 35.3 15.1-8 16.2-23.3 3.4-46-1.3-2.7-3-5.3-5.1-8-2.1-2.7-3.7-4.7-4.6-6-1-1.3-1.3-2.3-1-3 1-1.7 3.1-3.2 6.4-4.7 3.3-1.5 6.5-1.1 9.8 1.3 15.1 17.3 42.2 23.3 81.5 18 43.5-5 72.5-19.5 86.9-43.5 7.5-12.7 13.1-17.7 16.7-15 3.9 2 5.5 10.7 4.9 26-0.3 8.3-4.1 23.7-11.3 46-3 7.7-3.9 13.9-3 18.8 1 4.8 4.9 7.4 11.8 7.7 1-6.3 3.4-19.2 7.1-38.5 3.8-19.3 6-34.3 6.6-45 0.6-7-0.4-19.2-3.2-36.7-2.8-17.5-4-33.7-3.7-48.5 0.3-14.8 4.1-26.6 11.3-35.3 4.9-6 13.2-9 25-9 0.3-12.3 6-21.2 16.9-26.5 10.9-5.3 22.8-7.1 35.6-5.2 12.4 1.6 22.2 5.4 29 10.9zM442.2 256c1-5.7 0.6-10.7-1.2-15-1.8-4.3-3.7-6.8-5.7-7.5-3-0.7-4.4 0.5-4.4 3.5 0.6 1.7 1.5 2.7 2.4 3 3.3 0 4.4 2.5 3.4 7.5-1 6.7 0.3 10 3.9 10 1.1 0 1.6-0.5 1.6-1.5z m205.6 98.4c-0.6-2.7-1.7-4.6-3.2-5.8-1.5-1.2-3.6-2-6.4-2.5-2.8-0.5-5.1-1.4-7.1-2.8-1.6-1-3.2-2.3-4.7-4-1.5-1.7-2.6-3-3.4-4-0.8-1-1.7-2.1-2.7-3.3-1-1.2-1.6-1.8-2-2-0.3-0.2-1 0.1-2 0.7-4.6 5.3-3.4 12.6 3.4 21.8 6.9 9.2 13.2 14.4 19.1 15.7 3 0.3 5.3-1 7.1-4 1.9-2.8 2.5-6.2 1.9-9.8zM560.5 248c0-3.7-0.8-6.9-2.4-9.8-1.6-2.8-3.4-4.9-5.4-6.2-2-1.3-3.4-1.8-4.4-1.5-4.6 0.3-5.7 1.5-3.4 3.5l2 1c4.6 1.3 7.5 6.5 8.8 15.5 0 1 1.3 0.7 3.9-1l0.9-1.5zM587 131.5c0-0.7-0.4-1.5-1.2-2.5-0.8-1-2.3-2.2-4.4-3.5-2.1-1.3-3.7-2.3-4.6-3-4.9-5-8.8-7.5-11.8-7.5-3 0.3-4.8 1.6-5.7 3.7-0.8 2.2-1 4.3-0.5 6.5s0.4 4.3-0.3 6.2c-0.3 1.3-1.3 3.1-3 5.2-1.6 2.2-2.6 3.7-3 4.5-0.3 0.9 0.2 2.3 1.5 4.3 1.3 1 2.6 1 3.9 0 1.3-1 3.1-2.5 5.4-4.5 2.3-2 4.8-3.5 7.4-4.5 0.3-0.3 1.8-0.5 4.4-0.5 2.6 0 5.1-0.3 7.3-1 2.4-0.6 3.9-1.8 4.6-3.4z m277.2 670.4c6.5 4 11.6 8.1 15.2 12.3 3.6 4.2 5.5 8.2 5.9 12 0.3 3.8-0.1 7.6-1.2 11.3-1.2 3.7-3.7 7.4-7.6 11-3.9 3.6-7.8 6.9-11.5 9.8-3.8 2.9-8.7 5.9-14.7 9.2-6 3.3-11.2 6.1-15.4 8.3-4.3 2.2-9.5 4.8-15.7 7.7-6.2 3-10.6 5.1-13.3 6.5-12.4 6.3-26.4 15.7-42 28-15.5 12.3-27.9 23-37.1 32-5.6 5.3-16.7 8.6-33.3 9.8-16.7 1.2-31.2-1.2-43.7-7.3-5.9-3-10.7-6.9-14.5-11.7-3.8-4.8-6.5-9.1-8.1-12.7-1.6-3.7-5.2-6.9-10.8-9.8-5.6-2.8-13.3-4.4-23-4.7-14.4-0.3-35.7-0.5-63.8-0.5-6.2 0-15.5 0.2-28 0.7-12.4 0.5-21.9 0.9-28.4 1.3-14.4 0.3-27.4 2.8-39 7.5-11.6 4.6-20.3 9.7-26.2 15-5.9 5.4-13 10.1-21.4 14.2-8.3 4.1-17.1 6.1-26.2 5.8-9.5-0.3-27.6-5.5-54.4-15.5-26.8-10-50.7-17.2-71.6-21.5-6.2-1.3-14.6-2.9-25-4.7-10.5-1.8-18.6-3.3-24.5-4.5-5.9-1.2-12.3-2.8-19.4-4.7-7-2-12.5-4.4-16.4-7.3-3.9-2.9-6.7-6.1-8.4-9.8-3.3-7.7-2.1-18.7 3.4-33.2 5.5-14.5 8.5-23.6 8.8-27.3 0.3-5.3-0.3-12-2-20s-3.3-15.1-4.9-21.2c-1.6-6.2-2.3-12.2-2.2-18.2 0.1-6 1.9-10.5 5.1-13.5 4.6-4 13.9-6.3 28-7 14.1-0.7 23.9-2.7 29.5-6 9.8-6 16.7-11.8 20.6-17.5 3.9-5.7 5.9-14.2 5.9-25.5 6.9 24.3 1.6 42-15.7 53-10.5 6.7-24 9.2-40.7 7.5-11.1-1-18.1 0.7-21.1 5-4.2 5-3.4 14.5 2.4 28.5 0.7 2 2 5 3.9 9 2 4 3.4 7 4.2 9 0.8 2 1.6 4.8 2.2 8.5 0.7 3.7 0.8 7.3 0.5 11 0 5-2.8 13.2-8.4 24.5-5.6 11.3-7.9 19.3-6.9 24 1 5.7 7 10 18.1 13 6.5 2 20.4 5.1 41.4 9.2 21.1 4.2 37.4 7.6 48.8 10.2 7.8 2 20 5.7 36.3 11 16.4 5.3 29.8 9.2 40.5 11.5 10.6 2.3 19.7 3 27.2 2 14.1-2 24.6-6.7 31.7-14 7-7.3 10.8-15.3 11.3-24s-0.7-18.4-3.7-29.2c-2.9-10.8-6-19.5-9.3-26s-6.6-12.6-9.8-18.2c-39.6-63.3-67.2-103.7-82.9-121-22.2-24.7-40.7-31.3-55.5-20-3.6 3-6 0.5-7.3-7.5-1-5.3-1.3-11.7-1-19 0.3-9.7 2-18.3 4.9-26 2.9-7.7 6.9-15.5 11.8-23.5s8.5-15 10.8-21c2.6-7 7-19 13-36s10.9-30 14.5-39c3.6-9 8.5-19.2 14.7-30.5 6.2-11.3 12.6-20.3 19.1-27 36-47.7 56.3-80.2 60.8-97.5-3.9-37.3-6.5-89-7.8-155-0.6-30 3.3-55.2 11.8-75.7s25.8-37.9 52-52.2c12.7-7 29.8-10.5 51-10.5 17.3-0.3 34.7 1.9 52 6.7 17.3 4.8 31.9 11.8 43.7 20.7 18.7 14 33.6 34.2 44.9 60.7 11.3 26.5 16.1 51.1 14.5 73.8-1.6 31.7 3.3 67.3 14.7 107 11.1 37.7 32.9 74 65.2 109 18 19.7 34.3 46.8 48.8 81.5 14.6 34.7 24.3 66.5 29.2 95.5 2.6 16.3 3.4 30.4 2.4 42.2-1 11.8-2.9 21.1-5.9 27.7-2.9 6.7-6.2 10.3-9.8 11-3.3 0.7-7.1 3.8-11.5 9.5s-8.8 11.6-13.3 17.8c-4.4 6.2-11 11.7-19.9 16.7-8.8 5-18.8 7.3-29.9 7-5.9-0.3-11-1.2-15.4-2.5s-8.1-3.6-11.1-6.7c-3-3.2-5.2-5.8-6.6-7.7-1.5-2-3.3-5.4-5.7-10.2-2.3-4.8-3.8-8.1-4.4-9.8-7.2-12.3-13.9-17.3-20.1-15-6.2 2.3-10.8 10.5-13.8 24.5s-1.8 30.2 3.4 48.5c6.6 23.3 6.7 55.8 0.5 97.5-3.3 21.7-0.3 38.4 8.8 50.2 9.1 11.8 21.1 17.3 35.8 16.5 14.7-0.8 28.6-6.7 41.7-17.8 19.3-16.3 33.9-27.4 43.9-33.2 10-5.8 26.9-12.9 50.8-21.2 17.3-6 29.9-12.1 37.8-18.2s10.9-11.9 9.1-17.2c-1.8-5.3-5.9-10.1-12.3-14.2-6.4-4.2-14.8-8.1-25.3-11.7-10.8-3.7-18.9-11.7-24.3-24-5.4-12.3-7.8-24.4-7.3-36.3 0.5-11.8 3-19.8 7.6-23.7 0.3 10.3 1.6 19.7 3.9 28.3 2.3 8.5 4.7 15.3 7.1 20.3 2.5 5 5.8 9.7 10 14.2s7.7 7.7 10.3 9.5c2.6 1.8 6.2 4 10.5 6.5 4.4 2.5 7.1 4.1 8.1 4.7l0.4-0.5z",live:"M869.8 898.8c0 15.6-10.6 28.2-23.6 28.2H177.8c-13 0-23.6-12.7-23.6-28.2 0-15.6 10.6-28.2 23.6-28.2h668.4c13-0.1 23.6 12.6 23.6 28.2zM960 146.4v575.2c0 27.2-26.7 49.4-59.5 49.4h-777C90.7 771 64 748.8 64 721.6V146.4C64 119.2 90.7 97 123.5 97h777.1c32.7 0 59.4 22.2 59.4 49.4z m-52.6 13.3c0-5.7-6.5-10.5-14.1-10.5H132.6c-7.7 0-14.1 4.8-14.1 10.5v549c0 5.7 6.5 10.5 14.1 10.5h760.7c7.7 0 14.1-4.8 14.1-10.5v-549zM486.7 613.8c0.2 0.2 1.4 1.3 3.3 1.2 1.6-0.1 2.7-1 2.9-1.3l243.7-299.1c0.1-0.1 1.6-1.5 1.3-3.6-0.2-1.6-1.4-2.4-1.6-2.6l-43.6-38.1c-0.2-0.2-1.7-1.6-3.8-1.2-1.9 0.3-2.9 1.7-3 1.9L484 522 348 380.6c-0.4-0.2-1.1-0.5-2-0.6-1.4-0.1-2.5 0.3-3 0.6l-38.9 38.9c-0.3 0.4-0.9 1.2-1.1 2.5-0.2 1.8 0.6 3.1 0.9 3.4l182.8 188.4z",load:"M587.6 587.9c25.3-25.3 202.5 88.6 234.2 120.2 31.7 31.6 38 88.5 6.4 120.1-31.6 31.6-82.2 31.6-113.9-0.1-31.7-31.6-152-215-126.7-240.2zM436 434.8c-25.3 25.3-202.5-88.6-234.2-120.2-31.7-31.6-38-88.5-6.4-120.1 31.6-31.6 82.2-31.6 113.9 0.1 31.7 31.6 152 214.9 126.7 240.2z m-31.8 77.7c0 35.7-205.9 80.4-250.7 80.4-44.8 0-89.5-35.7-89.5-80.4s35.8-80.4 80.6-80.4c44.7 0 259.6 44.7 259.6 80.4z m31.9 76.8c25.3 25.3-88.7 202.3-120.3 233.9-31.7 31.6-88.6 38-120.2 6.4-31.6-31.6-31.6-82.2 0-113.8 31.7-31.6 215.2-151.8 240.5-126.5z m75.9 30.9c35.8 0 80.5 205.7 80.5 250.4 0 44.7-35.8 89.4-80.5 89.4s-80.5-35.8-80.5-80.5 44.7-259.3 80.5-259.3z m107.8-107.7c0-35.7 205.9-80.4 250.7-80.4 44.8 0 89.5 35.7 89.5 80.4s-35.8 80.4-80.6 80.4c-44.7 0-259.6-44.7-259.6-80.4z m-33.6-75.9c-25.3-25.3 88.7-202.3 120.3-233.9 31.7-31.6 88.6-38 120.2-6.4 31.6 31.6 31.6 82.1-0.1 113.8-31.6 31.6-215.1 151.8-240.4 126.5zM512 403.8c-35.8 0-80.5-205.7-80.5-250.4 0-44.7 35.8-89.4 80.5-89.4s80.5 35.8 80.5 80.5-44.7 259.3-80.5 259.3z",loading:'',location:"M511.9 960h-0.1c-16.2-0.1-31.7-8.2-42.3-22.3-7.7-10-78-101.2-147.4-212.6C230 577.4 183.3 465.5 183.3 392.7 183.3 211.5 330.8 64 512 64s328.7 147.5 328.7 328.7c0 72.9-46.8 185-139.1 333.1-69.2 111-139.1 201.8-147.1 212.1-10.6 14.1-26 22.2-42.3 22.2l-0.3-0.1z m0.1-845.4c-153.3 0-278.1 124.8-278.1 278.1 0 63.9 47.2 172.4 136.4 313.9C439.9 816.9 508.9 906 509.6 906.8l0.2 0.3c1.1 1.4 1.9 2 2.3 2.2 0.4-0.2 1.1-0.8 2.1-2.1l0.1-0.1c2.8-3.6 275.8-357.8 275.8-514.4 0-153.3-124.8-278.1-278.1-278.1z m0.2 346.2c-55.1 0-99.9-44.8-99.9-99.9 0-55.1 44.8-99.9 99.9-99.9 55.1 0 99.9 44.8 99.9 99.9-0.1 55.1-44.9 99.9-99.9 99.9z m0-149.1c-27.2 0-49.3 22.1-49.3 49.3 0 27.2 22.1 49.3 49.3 49.3 27.2 0 49.3-22.1 49.3-49.3-0.1-27.2-22.2-49.3-49.3-49.3z",lock:"M811.1 960H212.9c-47.3 0-85.7-37.7-85.7-84V473.7c0-46.3 38.5-84 85.7-84h43.9l-0.5-77.1c0-66.2 26.5-128.6 74.6-175.7C379 89.9 442.7 64 510.2 64c67.6 0 131.3 25.9 179.4 72.9 48.1 47.1 74.6 109.4 74.6 175.6l-0.5 77.2h47.4c47.3 0 85.7 37.7 85.7 84V876c0 46.3-38.4 84-85.7 84zM208.9 447.1c-14.8 0-26.8 11.7-26.8 26.1v407.7c0 14.4 12 26.1 26.8 26.1h606.3c14.8 0 26.8-11.7 26.8-26.1V473.2c0-14.4-12-26.1-26.8-26.1H208.9z m301.9 346.3c-17.2 0-31.2-12.8-31.2-28.5V664.3c-22.4-11.4-36.7-34.2-36.7-59.1 0-36.7 30.5-66.5 67.9-66.5s67.9 29.9 67.9 66.5c0 24.9-14.3 47.7-36.7 59.1v100.6c0 15.7-14 28.5-31.2 28.5zM313.4 388.1H706l1.6-78.4c0-51.2-20.6-99.5-58-136-37.4-36.6-86.9-56.7-139.4-56.7s-102 20.1-139.4 56.7c-37.4 36.6-58 84.9-58 136.2l0.6 78.2z",mail:"M960 280.9v472.3c0 37.9-31 68.9-68.9 68.9H132.9c-37.9 0-68.9-31-68.9-68.9V280.9c0-3.9 4.5-5.8 7.3-3l232 236.1c1.5 1.7 1.5 4.3 0 6L141.1 692.7c-11 11-11 28.6 0 39.6 5.4 5.4 12.7 8.2 19.8 8.2s14.4-2.8 19.8-8.2l161.5-172.1c1.7-1.7 4.5-1.7 6.2 0l37.9 38.6c33.4 33.8 78.6 53.8 126.2 53.6 47-0.2 90.7-18.7 123.6-52.1l39.4-40.1c1.7-1.7 4.5-1.7 6.2 0l161.5 172.1c5.4 5.4 12.7 8.2 19.8 8.2s14.4-2.8 19.8-8.2c11-11 11-28.6 0-39.6L720.9 520c-1.7-1.7-1.7-4.3 0-6l231.8-236.1c2.6-2.6 7.3-0.9 7.3 3zM512 596.2c31.9 0 61.8-12.5 84.2-35.3l337.9-344c-11.8-9.5-26.5-15.1-42.6-15.1H132.7c-16.2 0-31 5.6-42.6 15.1l337.9 344c22.2 22.6 52.1 35.3 84 35.3z",menu:"M905 960H635.1c-30.3 0-55-24.7-55-55V635.1c0-30.3 24.7-55 55-55H905c30.3 0 55 24.7 55 55V905c0 30.3-24.7 55-55 55z m-516.1 0H119c-30.3 0-55-24.7-55-55V635.1c0-30.3 24.7-55 55-55h269.9c30.3 0 55 24.7 55 55V905c-0.1 30.3-24.7 55-55 55z m-263.4-61.2h258v-258h-258v258z m514.8-2.8h258V638h-258v258zM905 443.8H635.1c-30.3 0-55-24.7-55-55V119c0-30.3 24.7-55 55-55H905c30.3 0 55 24.7 55 55v269.9c0 30.3-24.7 54.9-55 54.9z m-516.1 0H119c-30.3 0-55-24.7-55-55V119c0-30.3 24.7-55 55-55h269.9c30.3 0 55 24.7 55 55v269.9c-0.1 30.3-24.7 54.9-55 54.9z m-263.4-61.1h258v-258h-258v258z","menu-dot":"M157.6 605.5c-51.6 0-93.5-41.9-93.5-93.5s41.9-93.5 93.5-93.5 93.5 41.9 93.5 93.5-41.9 93.5-93.5 93.5z m708.8 0c-51.6 0-93.5-41.9-93.5-93.5s41.9-93.5 93.5-93.5 93.5 41.9 93.5 93.5-42 93.5-93.5 93.5z m-354.3 0c-51.6 0-93.5-41.9-93.5-93.5s41.9-93.5 93.5-93.5 93.5 41.9 93.5 93.5-41.9 93.5-93.5 93.5z",mute:"M505.7 913.5c-18.9 0-39.5-9.5-59-27.7L257.2 705H141.4C92.2 705 64 676.8 64 627.7V396c0-49.9 27.5-77.4 77.4-77.4h115.9L446.7 138c26.5-24.8 56.4-33.5 80.1-23.2 25.1 10.9 39.4 40.7 39.4 82v630.1c0 41.4-14.4 71.4-39.5 82.3-6.7 2.8-13.7 4.3-21 4.3zM164.5 380.7c-29.8 0-38.5 8.6-38.5 38.5v185.3c0 30.6 7.9 38.5 38.5 38.5h126.7l2.3 2.5c80.5 85.6 141.6 149.1 176.7 183.7 14.3 14.1 23.2 17.4 26.6 16 1.2-0.5 7.3-4.4 7.3-30.8v-603c0-26.6-5.7-29.8-6.3-30-1-0.4-7.3-1.7-27.4 18-35.8 35-96 93.6-184.2 179.1l-2.3 2.2H164.5zM929 659c-8.3 0-16-3.2-21.9-9.1L800.9 543.7 695.1 649.5c-5.9 5.9-13.7 9.1-22 9.1s-16.1-3.2-21.9-9.1c-12.1-12.1-12.1-31.8 0-43.9L757 499.8 651.9 394.7c-12.1-12.1-12.1-31.7 0-43.8 5.9-5.9 13.6-9.1 21.9-9.1 8.3 0 16 3.2 21.9 9.1L800.8 456 907 349.8c5.9-5.9 13.7-9.1 21.9-9.1s16.1 3.2 21.9 9.1c5.9 5.9 9.1 13.7 9.1 21.9 0 8.3-3.2 16.1-9.1 21.9L844.7 499.9l106.2 106.2c12.1 12.1 12.1 31.7 0 43.8-5.8 5.9-13.6 9.1-21.9 9.1z",option:"M64 768h544v64H64v-64z m736 0h160v64H800v-64z m-32 127c0 35.9-28.7 65-64 65s-64-29.1-64-65V705c0-35.9 28.7-65 64-65s64 29.1 64 65v190zM64 480h160v64H64v-64z m352 0h544v64H416v-64z m-32 127c0 35.9-28.7 65-64 65s-64-29.1-64-65V417c0-35.9 28.7-65 64-65s64 29.1 64 65v190zM64 192h544v64H64v-64z m736 0h160v64H800v-64z m-32 127c0 35.9-28.7 65-64 65s-64-29.1-64-65V129c0-35.9 28.7-65 64-65s64 29.1 64 65v190z",phone:"M717.7 64H306.3C261 64 224 100.7 224 145.5v733.1c0 44.8 37 81.5 82.3 81.5h411.4c45.3 0 82.3-36.7 82.3-81.5V145.5c0-44.8-37-81.5-82.3-81.5zM728 832H296V163h432v669z m-168 64c0 26.5-21.5 48-48 48s-48-21.5-48-48 21.5-48 48-48 48 21.5 48 48z",pie:"M64 480C64 250.2 250.2 64 480 64c10.8 0 22 0.4 32 1.2V512H65.2c-0.8-10-1.2-21.2-1.2-32z m155.6 324.4C295.8 899.2 412.8 960 544 960c229.8 0 416-186.2 416-416 0-131.2-60.8-248.2-155.6-324.4-63.4-51-142.4-83.8-228.4-90.4V576H129.2c6.6 86 39.4 165 90.4 228.4z",pin:"M115.8 960c-13.7 0-26.6-5.4-36.4-15.2l-0.5 0.4 0.4-0.5c-18.3-18.4-20.4-46.7-5-67.2l179-242.4-138.8-138.8c-16.5-16.5-19.8-42.3-8-62.8l0.2-0.3c4.5-7.1 21.7-31.7 54.6-51.1 19.1-11.3 40.3-18.7 62.8-22.1 27.3-4.2 56.9-2.4 87.8 5.2 1.8 0.2 3.8 0.4 5.8 0.6h0.5c6 0.5 11.9 1.1 18.5 2.1 25.2 4.1 72.8-18 113.2-52.4 38.6-32.9 64.5-72 64.5-97.5 0-6.4-0.2-13.3-0.3-20-1.1-26.3-2.9-70.2 29.8-102.8 38.6-38.7 99.8-41.8 142.2-7.3 1 0.8 1.9 1.7 2.9 2.7l0.4 0.4c23.8 23.3 238 237.5 239.5 239 20.1 20.1 31.2 46.8 31.2 75.3 0 28.4-11 55.2-31.1 75.3-32.5 32.6-76.8 30.7-103.4 29.6h-1.4c-6-0.1-12.2-0.3-18.1-0.3-24.3 0-53.9 17.6-83.3 49.7-19.7 21.4-37.5 47.6-50 73.8-11.1 23.1-17.1 44.2-16.1 56.5 0.9 8.6 2.6 22.9 3 25.8 32.8 133.7-57.3 195.1-67.6 201.7l-0.1 0.1c-20.7 12.5-46.9 9.4-63.7-7.4L374.7 756.6c-11.6-11.6-11.6-30.6 0-42.2 5.6-5.6 13.1-8.8 21.1-8.8 8 0 15.5 3.1 21.1 8.8L565.4 863c6.5-5.2 17.3-15.3 26.2-31.2 16.2-29 19.3-64 9.5-104.2v-0.2c-0.6-2.8-3-23.4-3.9-31.8v-0.2c-1.9-22.6 5.5-53 20.7-85.6 15-32.1 36.6-64.3 60.9-90.7 28.9-31.5 74.5-69 127.2-69 7.1 0 15 0.2 21.4 0.3h0.2c26.5 1.1 46.2 0.9 59.2-12.1 8.8-8.8 13.6-20.5 13.6-33s-4.9-24.3-13.8-33.2C884.4 370 658 143.7 647.3 133.3c-17.8-14.2-44.6-12.5-61.2 4.1-13.1 13.2-13.4 32.6-12.3 58.7v0.1c0.2 7.2 0.3 14.7 0.3 21.8 0 43.9-31.9 97.3-85.5 142.9-23.9 20.4-51.2 38.1-76.8 49.8-31.9 14.6-60.3 20-84.6 16.1-5.1-0.8-9.9-1.2-14.1-1.6-2.7-0.2-5.4-0.5-8-0.8-2.6-0.1-5.1-0.6-7.7-1.4-83-20.4-123.9 20.5-136.1 36.1L313.6 611c10.5 10.5 11.8 26.9 2.9 38.9L152.7 871.6 316.2 752c6.4-4.7 14.3-6.6 22.2-5.4 7.9 1.2 14.8 5.5 19.5 11.9 9.7 13.3 6.7 32-6.5 41.7L146.2 949.9c-8.9 6.6-19.4 10.1-30.4 10.1z",plus:"M512 960c-21.2 0-38.4-17.2-38.4-38.4V550.3H102.3C81.2 550.4 64 533.2 64 512c0-21.2 17.2-38.4 38.4-38.4h371.3V102.3c0-21.1 17.2-38.4 38.4-38.4s38.4 17.2 38.4 38.4v371.3h371.3c21.1 0 38.4 17.2 38.4 38.4 0 10.3-4 19.9-11.2 27.1-7.2 7.2-16.9 11.2-27.1 11.2H550.6v371.3c0 10.3-4 19.9-11.2 27.1-7.5 7.3-17.1 11.3-27.4 11.3z",post:"M813.7 960H154.8c-0.7 0-17.2-0.1-33.7-8-16.1-7.7-35.3-24-35.3-58.3V130.3c0-34.1 19.2-50.4 35.3-58.2 16.5-7.9 33-8.1 33.6-8.1h658.9c0.7 0 17.2 0.2 33.7 8.1 16.1 7.7 35.3 24.1 35.3 58.2v32.5l-52.2 46.7v-79.9c-0.1-6.3-2.4-10.1-7.6-12.6-4.5-2.1-9.3-2.3-9.3-2.3H154.7s-5 0.1-9.6 2.4c-5.1 2.6-7.3 6.5-7.3 13.1v763.4c0 0.4 0.3 4.7 2.4 8.6 1.7 3 5 7 14.5 7h658.8c5.8 0 10.1-1.4 12.8-4.1 4.1-4.2 4.1-11 4.1-11.1V561.5l52.2-49.6v381.9c0 0.7-0.1 16.7-8.5 32.7-8 15.3-25 33.5-60.4 33.5zM424.4 655.6l-25.8 125.2 129.5-25.1L927.6 368l0.1-0.1c0.3-0.3 10.5-10 10.6-22.4 0.1-7.5-3.5-14.8-10.8-21.8L914.4 311c-15.2-14.8-23.4-22.7-44.2-42.9-7.3-7.1-15.1-10.7-23-10.5-13.1 0.2-23.2 10.3-23.3 10.4l-0.2 0.2-399.3 387.4z m18.7 37.3l-15.2 59.4 61-14.8-45.8-44.6z m81 29.2c-20-23-40-46.1-60.1-69.1l331-319c21.3 21.7 42.7 43.3 64 65-111.6 107.7-223.3 215.4-334.9 323.1z m52-312.8H257.5c-10.7 0-19.4-1.7-26-5.1-7.3-3.8-11.6-9.7-11.6-16.3 0-10.9 11.6-22 37.5-22h366l-47.3 43.4zM874 384c-21.7-21.3-43.3-42.7-65-64l38-38c21.7 21.3 43.3 42.7 65 64l-38 38zM607.2 270.3H257.7c-10.7 0-19.5-1.7-26.1-5.1-7.4-3.8-11.6-9.7-11.6-16.3 0-10.9 11.6-22 37.7-22h349.6c10.4 0 19.2 1.8 25.7 5.3 7.3 3.9 11.5 9.9 11.5 16.4-0.1 10.8-11.6 21.7-37.3 21.7z",qr:"M395 64H64v329.2h331V64z m-48.5 282.2h-235V111h235v235.2z m258.8 495.4h353.3v-46.9H605.3v46.9zM300.1 158.2H158.9V301h141.2V158.2zM629 64v330.7h331V64H629z m282.5 282.9h-235V111h235v235.9z m47.8 353.6h-165v46.8h164.9v-46.8zM723.9 464.4H512.1v94.7h211.8v-94.7z m-329.6-22.8H64.7v46.8h329.5v-46.8zM582.4 64.9h-46.9v211.8h46.9V64.9z m376.9 541.4H511.8v46.1h447.5v-46.1zM441.4 417.1h46.8V64.9h-46.8v352.2z m94 329.8h-46.8v165.3h-0.2v47.6h0.2v0.2h46.8v-0.2H700v-47.6H535.4V746.9z m331.1-589.4H723.9v142.8h142.6V157.5z m92.8 259.1H817.9v48.3H911V558h48.3V416.6z m-95 541.9h95v-94.3h-95v94.3z m-705.4-93.3h141.2V723.8H158.9v141.4z m117.9-283.1h164v-46.9h-164v46.9zM64 959.6h330.3V628.9H64v330.7z m47.5-283.7h235v235.9h-235V675.9z m93.9-93.8v-46.9H65v46.9h140.4z",quote:"M297.6 530.1h140.2V960H64V634.7C64 279.4 188.6 89.1 437.8 64v161.2c-93.4 30.1-140.2 116.1-140.2 258.5v46.4z m522.2 0H960V960H586.2V634.7c0-355.3 124.5-545.6 373.7-570.7v161.2c-93.4 30.1-140.2 116.1-140.2 258.5V530h0.1z","radio-on":"M512 288c-123.2 0-224 100.8-224 224s100.8 224 224 224 224-100.8 224-224-100.8-224-224-224z m0-224C265.6 64 64 265.6 64 512s201.6 448 448 448 448-201.6 448-448S758.4 64 512 64z m0 806.4c-197.1 0-358.4-161.3-358.4-358.4S314.9 153.6 512 153.6 870.4 314.9 870.4 512 709.1 870.4 512 870.4z","radio-off":"M512 64C265.6 64 64 265.6 64 512s201.6 448 448 448 448-201.6 448-448S758.4 64 512 64z m0 806.4c-197.1 0-358.4-161.3-358.4-358.4S314.9 153.6 512 153.6 870.4 314.9 870.4 512 709.1 870.4 512 870.4z",right:"M282.5 960c-24.2 0-43.9-18.1-43.9-40.3 0-10.9 4.9-21.4 13.4-29L678.2 512 252 133.2c-8.6-7.5-13.4-17.8-13.4-29 0-22.2 19.7-40.3 43.9-40.3 11.5 0 22.4 4 30.6 11.3l455.5 404.9c10.7 7.7 16.8 19.2 16.8 31.6 0 10.4-4.3 20.2-12 27.6l-0.3 0.3-460 409c-8.4 7.4-19.2 11.4-30.6 11.4z",sad:"M897.6 64c6.7 0 13.4 3 18 8.6 7.9 9.9 6.3 24.4-3.6 32.3-123.7 99-194.6 246.5-194.6 404.8 0 161 73 310.2 200.2 409.2 10 7.8 11.8 22.2 4 32.3-7.8 10-22.2 11.8-32.3 4C750.8 847.4 671.4 685 671.4 509.7c0-172.3 77.2-332.9 211.8-440.7 4.1-3.2 9.1-5 14.4-5zM207.4 348c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8S97.6 177.6 97.6 238.3c0 60.6 49.1 109.7 109.8 109.7z m0 546.6c60.6 0 109.8-49.2 109.8-109.8 0-60.6-49.1-109.8-109.8-109.8-60.6 0-109.8 49.2-109.8 109.8 0 60.7 49.1 109.8 109.8 109.8z",search:"M914.4 957.9c12.4 4.6 26.5 1.5 35.8-7.9 9.2-9.3 12.2-23.1 7.7-35.4l-43.3-43.8-44.6-44.7L747.2 702c57-68.3 91.8-155.1 91.8-250.7C839 237.8 665.4 64 452.1 64 237.6 64 64 237.8 64 451.3 64 666 237.6 839.7 452.1 839.7c92.3 0.1 181.6-32.9 251.7-93.1l122.8 124.1 44.6 43.4 43.2 43.8zM452.1 777.7C272.3 777.7 126 632.5 126 451.3c0-180 146.3-325.2 326.1-325.2s326.1 145.2 326.1 325.2c0 179.9-146.3 326.4-326.1 326.4zM358 273c0.7 5.5-2.7 10.5-13.1 21.7-10.9 11.9-16.4 17.9-22.7 23-28.6 23.2-83.4 133.7-66.8 209.9 1.7 7.9 7.4 30.1-4.6 39.5-5.7 4.5-14.7 5.6-20.4 3.8-27.1-8.5-27.4-99.1 1.4-175.7 28.3-75.4 87.3-143.8 112-137 5.3 1.4 13.3 7.5 14.2 14.8z",second:"M512 64c-156.8 0-284.3 127.5-284.3 284.3S355.2 632.6 512 632.6s284.3-127.5 284.3-284.3S668.8 64 512 64z m-61.2 242.5h-40.1c0-45.5 14.1-77.7 42.3-96.5 18.2-12.1 41-18.2 68.3-18.2 28.5 0 52.3 8.7 71.5 25.9 19.1 17.3 28.7 40.5 28.7 69.6 0 26.4-8.2 48.3-24.6 65.5-11.2 11.8-31.6 25.6-61 41.4l-33.2 18.2c-19.4 10.6-33.8 22.3-43.2 35.1-6.7 8.8-10.6 17.6-11.8 26.4h173.9v37.8H402.5c0-30.9 7.1-57.2 21.4-78.7 12.1-18.2 30-34.3 53.7-48.2l42.3-24.6c21.8-12.8 36-22.3 42.3-28.7 10.9-11.5 16.4-26.9 16.4-46 0-15.2-4.5-27.9-13.7-38.2-11.5-13-28.1-19.6-49.6-19.6-20.3 0-36 6.2-46.9 18.7-11.7 13.7-17.6 33.7-17.6 60.1z m282.3 305.1c-4.8-10.3-18.1-15.2-29.7-10.8-11.6 4.3-17.2 16.2-12.4 26.6l80.8 173.8-148.3-26.7c-9.1-1.6-18.5 1.9-23.7 8.9l-83.3 113.3-4.2 6.5-4.9-6.4-83.1-112.5c-5.1-6.9-14.5-10.4-23.7-8.6l-148.3 28.1 81.1-174.5c4.8-10.4-0.7-22.2-12.3-26.5-11.6-4.2-24.9 0.7-29.8 11.1l-97.6 210c-3.2 7-1.9 14.9 3.5 20.7 5.4 5.8 13.9 8.4 22.2 6.8l175.3-33.2L492.9 951c2.6 3.5 6.2 6.1 10.3 7.6 1.9 0.7 4 1.1 6.1 1.3 0.2 0 3.7 0.1 4.6 0.1h0.3c6.8-0.6 13-3.9 16.8-9.1L629.3 817l175.3 31.5c4.6 0.8 9.2 0.4 13.3-1.2 3.4-1.3 6.4-3.3 8.8-5.9 5.4-5.8 6.7-13.8 3.5-20.7l-97.1-209.1z",setting:"M373.4 942.1c-2.9 0-5.7-0.5-8.6-1.5-53.7-19-102.6-47.6-145.6-85.2-7.8-6.8-10.8-17.6-7.9-27.5 13.4-44.6 8.3-91.3-14.6-131.5-22.9-40.1-60.2-68-105.1-78.5-10-2.3-17.8-10.5-19.7-20.7-5.2-28.7-7.9-57.3-7.9-85.2 0-27.9 2.7-56.5 8.1-85.1 1.9-10.3 9.6-18.4 19.7-20.8 44.9-10.4 82.2-38.3 105.1-78.5 22.8-40.1 28-86.8 14.6-131.4-3-9.9 0.1-20.8 7.9-27.6 42.9-37.6 91.9-66.3 145.6-85.2 9.8-3.5 20.6-0.8 27.7 6.9 31.4 34.1 73.8 52.9 119.4 52.9 45.7 0 88.1-18.8 119.5-52.9 7-7.6 17.9-10.4 27.6-6.9 53.6 18.9 102.6 47.6 145.6 85.2 7.8 6.8 10.8 17.6 7.9 27.5-13.5 44.7-8.3 91.4 14.6 131.5 22.9 40.1 60.2 68 105.1 78.5 10 2.4 17.8 10.5 19.7 20.8 5.4 28.6 8.1 57.3 8.1 85.1 0 27.8-2.7 56.4-8.1 85.1-1.9 10.3-9.7 18.4-19.7 20.7-44.9 10.5-82.2 38.4-105.1 78.5-22.9 40.2-28.1 86.9-14.6 131.5 3 9.9-0.1 20.8-7.9 27.6-43 37.7-92 66.3-145.6 85.2-9.8 3.4-20.6 0.6-27.6-7-31.3-34.1-73.7-52.9-119.4-52.9-45.6 0-88.1 18.8-119.5 52.9-5.1 5.4-12 8.5-19.3 8.5zM263.1 829.5c31 25 65.4 45.2 102.3 59.9 19.5-18 41.9-32.2 66.5-42.1 25.7-10.4 52.7-15.6 80.1-15.6 54.6 0 106.6 20.5 146.6 57.7 36.9-14.7 71.3-34.9 102.4-59.9-5.6-26.2-6.5-52.9-2.7-79.5 4-27.7 13-54 26.7-78.1 27.2-47.7 70.8-83.1 122.8-99.9 3-20.4 4.6-40.5 4.6-59.9s-1.5-39.6-4.6-60c-52.1-16.8-95.6-52.2-122.8-99.9-13.7-24.1-22.7-50.3-26.7-78.1-3.8-26.6-2.9-53.3 2.7-79.5-31-25.1-65.4-45.2-102.4-59.9-40.2 37.2-92.2 57.7-146.7 57.7-27.4 0-54.4-5.3-80.1-15.6-24.7-9.9-47-24.1-66.6-42.1-37 14.8-71.4 35-102.4 60 5.6 26.2 6.5 52.9 2.7 79.5-4 27.7-13 54-26.7 78.1-13.7 24.1-31.7 45.1-53.4 62.5-20.8 16.7-44.1 29.2-69.3 37.4-3 20.3-4.6 40.5-4.6 60 0 19.4 1.5 39.6 4.6 59.9 52.1 16.8 95.6 52.1 122.9 99.9 27.4 47.8 35.8 103.6 24.1 157.5zM512 668.2c-85 0-154.1-70.1-154.1-156.2S427 355.8 512 355.8c41.1 0 79.8 16.3 108.9 45.8C650 431.1 666.1 470.3 666 512c0 8.6-0.9 17.4-2.7 27.9-1.2 7-5.2 13.1-11 17.2-5.8 4-12.7 5.5-19.6 4.2-14.3-2.7-23.8-16.6-21.1-31 1.3-7.1 1.9-13 1.9-18.4C613.5 455.1 568 409 512 409c-55.9 0-101.5 46.2-101.5 102.9 0 56.8 45.5 102.9 101.5 102.9 5.4 0 11.1-0.6 18.1-1.9 6.8-1.3 13.7 0.2 19.4 4.1 5.9 4.1 9.9 10.2 11.2 17.4 2.6 14.4-6.9 28.3-21.2 30.9-10.2 2.1-19 2.9-27.5 2.9z",share:"M809.6 960c-82.9 0-150.4-67.5-150.4-150.4 0-6.2 0.4-12.2 1.1-18.2L337.1 615.2c-27.3 38.5-72.1 63.6-122.8 63.6-82.8 0-150.3-67.4-150.3-150.3s67.5-150.4 150.4-150.4c49.7 0 93.9 24.3 121.3 61.5l246.8-167.5c-7.4-17.8-11.5-37.3-11.5-57.7C571 131.5 638.5 64 721.4 64s150.4 67.5 150.4 150.4-67.5 150.4-150.4 150.4c-46 0-87.2-20.8-114.8-53.4L357 480.7c5 15 7.8 31.1 7.8 47.8 0 15.2-2.3 30-6.5 43.9l315.8 172.2c24.3-50.4 75.9-85.3 135.5-85.3 82.9 0 150.4 67.5 150.4 150.4S892.5 960 809.6 960z m-0.5-245.2c-52.8 0-95.8 42.9-95.8 95.7 0 52.8 43 95.7 95.8 95.7s95.7-42.9 95.7-95.7c0.1-52.8-42.9-95.7-95.7-95.7z m-88.7-598c-53.4 0-96.8 43.4-96.8 96.8s43.4 96.8 96.8 96.8 96.8-43.4 96.8-96.8-43.4-96.8-96.8-96.8zM214.3 433.6c-53 0-96.2 43.1-96.2 96.2 0 53 43.1 96.2 96.2 96.2 53 0 96.2-43.1 96.2-96.2 0-53-43.2-96.2-96.2-96.2z",star:"M891.9 355.6l-218.6-15.8c-4.6-0.4-8.6-3.1-10.2-7.5l-83.3-203.8C568.4 100.4 542.5 83 512.1 83c-30.3 0-56 17.4-67.7 45.7l-83.4 204c-1.8 4.2-5.7 7.2-10.2 7.5L132.5 356c-29.6 1.7-54.8 21.1-64.4 49.8-9.9 29-1.6 59.5 21.7 79.5l168.9 140.3c3.5 2.9 5.1 7.7 4 12.1l-51.5 211.9c-6 22-1.8 44.8 11.5 62.6 13.7 18 35.1 28.8 57.5 28.8 13.9 0 27.4-4.2 38.5-11.8l184.6-115.5c3.9-2.4 8.7-2.4 12.6 0l186.4 115.1c11.7 7.9 25.2 12.1 38.9 12.1 21 0 41.8-10.1 55.3-27.2 14.1-17.6 19.2-40.6 14.1-63.5L759 637.9c-1.1-4.5 0.5-9.3 4-12.3l171.4-140.7c23-19.8 31.2-50.3 21.5-79.3-9.4-28.7-34.8-48.3-64-50z m-4.8 97.5l-163 133.8a54.911 54.911 0 0 0-18.3 55.1L755 844c2.6 11.9-2.1 20.1-5.2 24-4.9 6.1-12.2 10-19.5 10-4.5 0-9-1.4-13.9-4.7L538.2 763c-8.5-5.3-18.3-8.1-28.3-8-10.1 0-20 2.8-28.5 8.2L304.8 873.5c-11.3 7.5-26.4 4.2-34.4-6.3-3.3-4.4-6.8-11.9-3.7-22.9L316 641.8c4.9-20.1-2.3-41.6-18.1-54.7L137.3 453.6c-12.7-11-9.2-25.2-7.8-29.2 1.4-4 7.1-17.5 23.8-18.4l208.2-15c20.5-1.5 38.4-14.5 46.1-33.6l79.5-194.3c6.4-15.7 20.9-17 25-17 4.2 0 18.6 1.2 25 17l79.5 194.3c7.7 19.1 25.6 32.1 46.1 33.6l208.5 15.2c16.3 0.9 22.1 14.3 23.5 18.4 1.1 3.6 4.6 17.8-7.6 28.5z","star-half":"M891.9 355.6l-218.6-15.8c-4.6-0.4-8.6-3.1-10.2-7.5l-83.3-203.8C568.4 100.4 542.5 83 512.1 83c-30.3 0-56 17.4-67.7 45.7l-83.4 204c-1.8 4.2-5.7 7.2-10.2 7.5L132.5 356c-29.6 1.7-54.8 21.1-64.4 49.8-9.9 29-1.6 59.5 21.7 79.5l168.9 140.3c3.5 2.9 5.1 7.7 4 12.1l-51.5 211.9c-6 22-1.8 44.8 11.5 62.6 13.7 18 35.1 28.8 57.5 28.8 13.9 0 27.4-4.2 38.5-11.8l184.6-115.5c3.9-2.4 8.7-2.4 12.6 0l186.4 115.1c11.7 7.9 25.2 12.1 38.9 12.1 21 0 41.8-10.1 55.3-27.2 14.1-17.6 19.2-40.6 14.1-63.5L759 637.9c-1.1-4.5 0.5-9.3 4-12.3l171.4-140.7c23-19.8 31.2-50.3 21.5-79.3-9.4-28.7-34.8-48.3-64-50z m-4.8 97.5l-163 133.8a54.911 54.911 0 0 0-18.3 55.1L755 844c2.6 11.9-2.1 20.1-5.2 24-4.9 6.1-12.2 10-19.5 10-4.5 0-9-1.4-13.9-4.7C648.3 831.1 580.2 789.1 512 747V147c-0.1-0.3-0.2-0.7 0-1 1.1-1.8 10.8 0.7 17.4 6.2 2 1.7 5.4 5 7.8 10.9l79.5 194.3c7.7 19.1 25.6 32.1 46.1 33.6l208.5 15.2c16.3 0.9 22.1 14.3 23.5 18.4 0.7 2.1 3.2 10.8-1.1 20-2.1 4.1-4.8 6.9-6.6 8.5z","star-full":"M891.9 355.6l-218.6-15.8c-4.6-0.4-8.6-3.1-10.2-7.5l-83.3-203.8C568.4 100.4 542.5 83 512.1 83c-30.3 0-56 17.4-67.7 45.7l-83.4 204c-1.8 4.2-5.7 7.2-10.2 7.5L132.5 356c-29.6 1.7-54.8 21.1-64.4 49.8-9.9 29-1.6 59.5 21.7 79.5l168.9 140.3c3.5 2.9 5.1 7.7 4 12.1l-51.5 211.9c-6 22-1.8 44.8 11.5 62.6 13.7 18 35.1 28.8 57.5 28.8 13.9 0 27.4-4.2 38.5-11.8l184.6-115.5c3.9-2.4 8.7-2.4 12.6 0l186.4 115.1c11.7 7.9 25.2 12.1 38.9 12.1 21 0 41.8-10.1 55.3-27.2 14.1-17.6 19.2-40.6 14.1-63.5L759 637.9c-1.1-4.5 0.5-9.3 4-12.3l171.4-140.7c23-19.8 31.2-50.3 21.5-79.3-9.4-28.7-34.8-48.3-64-50z",switch:"M512 960c-58 0-114.3-11.4-167.3-33.8-51.2-21.6-97.2-52.6-136.6-92.1-39.5-39.5-70.5-85.4-92.1-136.6-22.4-53-33.8-109.3-33.8-167.3 0-58.3 11.5-114.9 34.3-168.3l0.5-1.1c23.1-53.7 56.4-101.6 99.1-142.1 12.7-12 32.8-11.5 44.8 1.1 5.9 6.1 9 14.2 8.7 22.7-0.2 8.5-3.7 16.3-9.8 22.2-36.3 34.4-64.7 75.2-84.5 121.3l-1.8 4.1c-18.4 44.4-27.7 91.5-27.7 140.2 0 49.4 9.7 97.4 28.8 142.5 18.5 43.6 44.9 82.8 78.5 116.4 33.6 33.6 72.7 60 116.4 78.5 45.1 19.1 93.1 28.8 142.6 28.8 49.4 0 97.4-9.7 142.5-28.8 43.6-18.4 82.8-44.8 116.4-78.5 33.6-33.6 60.1-72.8 78.5-116.4 19.1-45.2 28.8-93.1 28.8-142.5 0-49.8-9.7-97.9-29-143.2l-0.5-1c-10.6-24.5-23.7-47.8-39-69.1-13.4-18.7-28.8-36.3-45.5-52.2l-0.2-0.2c-2.7-3-4.9-6.4-6.5-10.1-1.1-2.5-2.8-6.4-3.1-11.8-0.1-2.4 0-7.2 2.2-12.7 1.5-3.7 3.7-7.1 6.5-10.1 12.1-12.6 32.2-13.1 44.8-1.1 42.7 40.6 76 88.4 99.1 142.2l0.6 1.5c22.7 53.1 34.1 109.6 34.1 167.9 0 58-11.4 114.3-33.8 167.3-21.6 51.2-52.6 97.2-92.1 136.6-39.4 39.4-85.4 70.4-136.6 92.1C626.3 948.6 570 960 512 960z m0-452.1c-17.5 0-31.8-14.3-31.8-31.8V95.8c0-17.5 14.3-31.8 31.8-31.8s31.7 14.3 31.7 31.8V476c0.1 17.6-14.2 31.9-31.7 31.9z",tag:"M64 599.7c0-28.1 10.9-54.5 30.8-74.4L525.3 94.8c25.8-25.8 62.5-36.3 98-28.1l207.3 47.8c39 8.9 69.9 39.9 78.9 78.9l47.8 207.2c8.1 35.2-2.6 72.6-28.1 98.1L498.7 929.2c-19.9 19.9-46.3 30.8-74.4 30.8-28.1 0-54.5-10.9-74.4-30.8L94.8 674.1C74.9 654.2 64 627.8 64 599.7zM649.7 288c0 22.4 8.7 43.5 24.6 59.4 15.9 15.9 37 24.6 59.4 24.6s43.5-8.7 59.4-24.6c15.9-15.9 24.6-37 24.6-59.4 0-22.5-8.7-43.6-24.6-59.4-32.8-32.8-86-32.8-118.8 0-15.9 15.8-24.6 36.9-24.6 59.4z",talk:"M902.8 110H407.2c-31.5 0-57.2 25.1-57.2 55.9v391c0 30.8 25.6 55.9 57.2 55.9h344.7l60.2 92.1c11.5 13.2 33.5 5.2 33.5-12.1v-80h57.2c31.5 0 57.2-25.1 57.2-55.9v-391c0-30.9-25.6-55.9-57.2-55.9zM483.5 411.3c-21.1 0-38.1-16.7-38.1-37.2 0-20.6 17.1-37.2 38.1-37.2 21.1 0 38.1 16.7 38.1 37.2 0 20.5-17.1 37.2-38.1 37.2z m171.5 0c-21.1 0-38.1-16.7-38.1-37.2 0-20.6 17.1-37.2 38.1-37.2 21.1 0 38.1 16.7 38.1 37.2 0 20.5-17 37.2-38.1 37.2z m171.6 0c-21.1 0-38.1-16.7-38.1-37.2 0-20.6 17.1-37.2 38.1-37.2 21.1 0 38.1 16.7 38.1 37.2 0 20.5-17.1 37.2-38.1 37.2zM292.7 616.1V312.6H121.2c-31.5 0-57.2 25.1-57.2 55.9v391c0 30.8 25.7 55.9 57.2 55.9h57.2v80c0 17.3 22.1 25.2 33.5 12.1l60.2-92.1h344.7c31.5 0 57.2-25.1 57.2-55.9V672H349.9c-31.5-0.1-57.2-25.1-57.2-55.9z",third:"M512 64c-156.8 0-284.3 127.5-284.3 284.3S355.2 632.6 512 632.6s284.3-127.5 284.3-284.3S668.8 64 512 64z m-23.9 295.3v-33.2l20.4 0.9c17.1 0 30.7-3.5 40.8-10.6 12.4-8.9 18.6-22.3 18.6-40.3 0-12.4-3.7-22.9-11.1-31.5-10-11.8-25.6-17.7-46.5-17.7-23.9 0-40.9 8.4-51 25.3-6.5 10.9-9.8 24.8-9.8 41.7h-38.1c0-28.1 6.5-50.8 19.5-68.3 16.8-22.4 43.9-33.7 81.1-33.7 29.5 0 53 7.6 70.3 22.8 17.3 15.2 25.9 34.9 25.9 59.2 0 18.3-4.4 33.4-13.3 45.2-7.1 9.5-16 15.8-26.6 19.1 16.5 5.9 29 14.2 37.2 24.8 9.8 12.4 14.6 28.7 14.6 48.8 0 28.1-8.7 51.1-26.1 69.1-20.1 20.7-48.8 31-86 31-9.8 0-17.9-0.6-24.4-1.8-10.6-2.1-21.7-6.1-33.2-12-16.6-8.6-28.4-20.7-35.7-36.3-7.2-15.7-10.9-33.5-10.9-53.6h40.3c0 19.5 3.7 34.6 11.1 45.2 10.6 15.7 29.1 23.5 55.4 23.5 20.1 0 36.4-5.5 49-16.6 12.6-11.1 18.8-25.6 18.8-43.7 0-23-8.7-39.1-26.1-48.3-11.2-5.9-26.7-8.9-46.5-8.9h-17.7z m245 252.3c-4.8-10.3-18.1-15.2-29.7-10.8-11.6 4.3-17.2 16.2-12.4 26.6l80.8 173.8-148.3-26.7c-9.1-1.6-18.5 1.9-23.7 8.9l-83.3 113.3-4.2 6.5-4.9-6.4-83.1-112.5c-5.1-6.9-14.5-10.4-23.7-8.6l-148.3 28.1 81.1-174.5c4.8-10.4-0.7-22.2-12.3-26.5-11.6-4.2-24.9 0.7-29.8 11.1l-97.6 210c-3.2 7-1.9 14.9 3.5 20.7 5.4 5.8 13.9 8.4 22.2 6.8l175.3-33.2L492.9 951c2.6 3.5 6.2 6.1 10.3 7.6 1.9 0.7 4 1.1 6.1 1.3 0.2 0 3.7 0.1 4.6 0.1h0.3c6.8-0.6 13-3.9 16.8-9.1L629.3 817l175.3 31.5c4.6 0.8 9.2 0.4 13.3-1.2 3.4-1.3 6.4-3.3 8.8-5.9 5.4-5.8 6.7-13.8 3.5-20.7l-97.1-209.1z",time:"M512.3 544c-8.4 0-15.7-2.4-21.3-6.9-6.1-5-9.3-13.5-9.4-25.2L480 247.4c-0.1-19.8 11-31.3 30.6-31.4 10-0.1 17.8 2.6 23.3 8s8.3 13.1 8.4 23l1.6 233.9c65.9-0.9 168.5-2.1 179-0.8 3 0.4 5.9 1.1 6.2 1.2 4.3 1.2 13.2 3.7 19.3 12 2.7 3.7 5.8 9.9 5.5 19-0.3 10.5-4.8 16.9-8.4 20.5-5.6 5.5-12.1 7-16.8 8.1-2.2 0.5-5.7 1.1-9.6 1.2-45.2 0.8-91.2 1.1-135.6 1.4-23.2 0.2-47.2 0.3-70.8 0.6-0.1-0.1-0.2-0.1-0.4-0.1z m-0.3-424c216.5 0 392 175.5 392 392 0 78.5-23.1 151.5-62.8 212.8-0.6 12.9 6.4 24.8 17.8 30.2 10 4.7 22 3.6 31.3-2.9C934.4 682.7 960 600.3 960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c83.3 0 161.3-22.7 228.1-62.4 9.5-9.6 11.4-24.3 4.9-35.6-6-10.5-18.1-16.2-30.3-14.4C655.5 883.4 586.2 904 512 904c-216.5 0-392-175.5-392-392s175.5-392 392-392z",track:"M738.3 425.3c1.2 1.1 2.5 2.2 3.9 3.2 24.5 18 63.2 8.4 92.1-22.8 30.4-32.7 35.7-75.4 12.3-97.2-24.1-21.9-65.5-13.3-96 19.6-13.2 14.2-22.3 31.1-25.6 47.5-4.1 19.9 0.7 38.1 13.3 49.7z m44.5-67.3c15.6-16.8 31.2-18.9 33.7-17.3 1.9 2.5 1 18.2-14.6 35-15.5 16.8-31.1 18.9-33.8 17.3-1.7-2.6-0.7-18.3 14.7-35z m34.4 158.2c2.1 2.4 4.4 4.6 7 6.5 19.7 14.4 49.6 10.6 72.8-9.2 26.5-22.7 33.1-57.2 15-78.4-17.8-20.8-53.5-19.7-79.7 2.7-26.7 22.7-33.3 57.2-15.1 78.4z m42.6-46c9.1-7.8 18-8.3 19.5-7.6 0.8 2-1.1 10.8-10.1 18.5-8.7 7.4-17.2 8.2-19.6 7.3-0.5-2.5 1.6-10.8 10.2-18.2z m79 110.6c-5.4-24-35.6-38.8-65.5-32-31.1 7-51.1 32.1-45.5 57 2.1 9.3 7.6 17.5 15.8 23.5 12.9 9.5 31.5 12.7 49.8 8.5 13.5-3.1 25.7-9.8 34.1-19.1 10.1-11 14.3-24.8 11.3-37.9z m-54.3 17.8c-7.7 1.7-14.3 0.3-17.1-1.7 1-2.3 5.7-6.9 14.7-9 7.8-1.7 14.3-0.3 17.5 1.1-0.4 1.9-5.2 7.4-15.1 9.6zM731.3 464.8l-139.6-151-3-2.8c-38.7-31-87.9-42.5-133.7-32.3-40.1 8.9-73.1 33.7-90.6 68-18.8 36.8-18.3 84.2-17.8 130.1 0.5 50.2 1.1 102.1-24.7 130.4-26 28.6-54 35.8-86.3 44.1-34.7 8.9-74 19-111.5 56.6-28.7 28.8-43.1 67.4-39.3 105.9 3 30.7 19.2 76.5 79.3 119.8l0.7 0.5c73 52.2 175.5 14.7 221.1-19.4 0.7-0.4 1.2-1 1.8-1.4 1.5-1.2 3.2-2.4 4.6-3.5l-0.2-0.3c0.6-0.7 1.4-1 2-1.7 8.6-11.3 5.8-27.5-6.1-36-9.9-7.1-22.8-6.3-31.8 0.5l-0.3-0.3c-59 34.1-114.1 55.2-161.1 21.6-35.2-25.4-55.2-54.2-58.1-83.4-2.3-24.1 6.9-48.5 25.4-67 27.8-27.8 55.7-35 88.1-43.3 35.2-9.1 75.2-19.3 111.3-59.1 38.5-42.4 37.9-103.9 37.2-163.4-0.5-41.9-0.9-81.4 12.5-107.7 10.8-21.1 31.4-36.5 56.6-42.1 28.2-6.3 58.7 0.3 83.6 18.2 1.1 0.8 2.3 1.6 3.4 2.5L692.3 497c49.3 57.6 48.2 110.2-3.4 165.6-61.9 65.9-124.7 96.7-180.2 123l0.1 0.2c-3.4 1.7-6.5 4-9 7.2-8.6 11.3-5.8 27.5 6.1 36 8.4 6 19.1 6.4 27.8 2.2l0.1 0.2c55.7-26.5 128.7-65.1 194-134.6 68.9-74 70.4-154 3.5-232zM524.1 242.4c4.1 3 8.6 5.4 13.3 7.2 37.4 13.9 81.5-15.2 100.5-66.3 16.2-43.6 8.2-88.3-19.6-108.7-4.1-3-8.6-5.4-13.3-7.2-18.8-7-40.8-3-60.1 11-17.5 12.6-31.8 32.2-40.4 55.3-16.2 43.6-8.2 88.3 19.6 108.7z m16.7-93.1c5.5-14.8 14.7-27.7 25.2-35.3 5-3.6 14.8-9.2 23.9-5.8 1.4 0.5 2.8 1.3 4 2.2 11.2 8.2 16.6 33.3 6.3 61-11.4 30.7-35.1 46.3-49.1 41.1-1.4-0.5-2.8-1.3-4-2.2-11.1-8.2-16.6-33.3-6.3-61z m104.8 181.2c27.5 20.4 71.3 5.7 99.7-33.5 28.4-39.2 29.1-85.8 1.6-106.2-27.5-20.4-71.3-5.7-99.7 33.5-28.4 39.1-29.1 85.8-1.6 106.2z m74.8-103.1c3.4 2.5 4.9 21.2-10.9 43s-33.9 26-37.3 23.5c-3.4-2.5-4.9-21.2 11-43.1 15.7-21.8 33.8-26 37.2-23.4z",trash:"M750.5 938.9H278.6c-53.3 0-96.6-39.8-96.6-88.7V255h-66.5C85.7 255 64 244.3 64 229.6s21.7-25.4 51.5-25.4h793c29.8 0 51.5 10.7 51.5 25.4S938.3 255 908.5 255h-61.4v595.2c0 48.9-43.3 88.7-96.6 88.7zM230.1 255v595.2c0 22.4 21.8 40.6 48.6 40.6h471.8c26.8 0 48.6-18.2 48.6-40.6V255h-569z m408.8 628.6c-15.8 0-27.3-21.7-27.3-51.6V513.2c0-29.9 11.5-51.6 27.3-51.6s27.3 21.7 27.3 51.6V832c0 29.9-11.5 51.6-27.3 51.6z m-127.4 0c-15.8 0-27.3-21.7-27.3-51.6V513.2c0-29.9 11.5-51.6 27.3-51.6s27.3 21.7 27.3 51.6V832c0 29.9-11.4 51.6-27.3 51.6z m-127.4-1c-15.8 0-27.3-21.7-27.3-51.6V512.2c0-29.9 11.5-51.6 27.3-51.6s27.3 21.7 27.3 51.6V831c0.1 29.9-11.4 51.6-27.3 51.6z m389.8-746.8H250.1c-29.8 0-51.5-10.7-51.5-25.4S220.3 85 250.1 85h523.8c29.8 0 51.5 10.7 51.5 25.4 0 14.8-21.7 25.4-51.5 25.4z",unmute:"M517.3 924.1c-19.4 0-40.5-9.8-60.4-28.4L262.3 710h-119C92.9 710 64 681.1 64 630.8V392.9c0-51.1 28.1-79.2 79.2-79.2h119L457 128c27.1-25.4 57.7-34.3 82-23.7 25.7 11.1 40.4 41.7 40.4 84v647.1c0 42.4-14.8 73.1-40.5 84.3-6.9 2.9-14.1 4.4-21.6 4.4zM167 377c-30.8 0-39.7 8.9-39.7 39.7V607c0 31.6 8.2 39.7 39.7 39.7h130.1l2.3 2.5c84.6 89.9 145.7 153.4 181.5 188.7 19 18.7 26.3 17 27.6 16.5 1.3-0.5 7.6-4.6 7.6-31.8V203.3c0-27.5-6-30.7-6.6-31-1.5-0.7-8.2-1.2-28.3 18.5-58.4 57.2-159.6 155.3-189.2 184l-2.3 2.2H167z m644.8 454.6c-14.8 9.1-33.4 5.6-42.8-6.6-7.6-9.9-8.1-24.4-1-36 1.3-1.4 3.2-3.3 5.4-5.8 27.2-29.1 47-49.6 64-76.1 10.2-15.9 19.3-32.6 27.1-49.9 22.4-49.6 33.7-102.5 33.7-157.3 0-99.6-38.1-194.4-107.4-266.7-1.6-1.7-3.3-3.5-4.9-5.2-6.9-12.4-4.9-28 5-38 10.2-10.3 26.3-12.5 39-5 3 3.2 6 6.4 9 9.5 78 83.5 121 191.8 121 305.4 0 63-13 124-38.6 181.1-24.6 55-59.7 103.9-104.2 145.5l-5.3 5.1z m-97.5-119.8c-11.9 7.3-27 6.5-37.3-1.8-11.9-9.6-15.2-27.3-7.2-41.5 1.6-1.9 3.2-3.7 4.9-5.6 36.5-42.1 56.7-95.7 56.7-151 0-56.6-20.9-111.1-58.8-153.6l-5.4-6c-6.4-13-3.2-28.8 7.8-38.2 11-9.5 27.1-10.3 39-2 3.1 3.4 6.3 6.8 9.4 10.2 45.2 53.1 70 120.3 70 189.6 0 71.3-26.2 140.1-73.7 193.8l-5.4 6.1z",upload:"M392 325.7s-54.2-68.6-127.7-12.6c-65.8 53.5-54.2 151.3-54.2 151.3S64 501.9 64 697.9c3.3 195.8 158.7 197.8 158.7 197.8l233.3 0.3V686.4H344.2L512 476.9l167.9 209.6H568V896l226.6-0.3s144.7 0.2 165-186.1c9.7-203.7-139.8-243.8-139.8-243.8s17-301.5-192.9-335.9C446.8 105.7 392 325.7 392 325.7z",user:"M929.2 960c-13.7 0-25.5-8.9-29.5-22-12.6-41.6-31.5-80.7-56.4-116.4-24.5-35.2-54.2-66.2-88.2-92-70.6-53.7-154.7-82.1-243.2-82.1-88.4 0-172.5 28.4-243 82-34 25.8-63.6 56.7-88.2 91.9-24.9 35.6-43.8 74.7-56.4 116.2-2.4 8-7.8 14.5-15.1 18.4-7.3 3.9-15.6 4.6-23.5 2.2-16.2-5-25.3-22.4-20.4-38.8 14.5-47.8 36.4-92.8 65-133.8 28.2-40.4 62.4-76 101.5-105.7 39.6-30.1 83.3-53.5 129.9-69.5 48.3-16.6 98.8-25 150.2-25 51.5 0 102 8.4 150.3 25.1 46.7 16.1 90.4 39.5 130 69.6 39.1 29.8 73.2 65.4 101.5 105.9 28.6 41 50.4 86.1 64.9 134 4.9 16.3-4.2 33.7-20.4 38.7-2.9 0.8-6 1.3-9 1.3zM512 569c-67.4 0-130.9-26.3-178.6-74-47.7-47.7-74-111.1-74-178.6s26.3-130.9 74-178.6C381.1 90.3 444.5 64 512 64c67.4 0 130.9 26.3 178.6 74 47.7 47.7 74 111.1 74 178.5s-26.3 130.9-74 178.6C642.9 542.8 579.4 569 512 569z m0-443.4c-51 0-98.9 19.9-135 55.9-36.1 36.1-55.9 84-55.9 135s19.9 98.9 55.9 135c36.1 36.1 84 55.9 135 55.9s99-19.9 135-55.9c36.1-36.1 55.9-84 55.9-135s-19.9-98.9-55.9-135c-36.1-36.1-84-55.9-135-55.9z",vip:"M511.9 946.7c-8.5 0-16.6-4-21.8-10.8L165 511.8c-6.1-7.7-7.6-18.2-3.9-27.3 3.7-9.2 12.1-15.6 22-16.9 8.2-1 16.3 1.7 22.2 7.2h0.5l306.1 399.3 222.7-290.6c4.5-5.8 10.9-9.5 18.2-10.5 7.3-1 14.5 1 20.3 5.4 12 9.2 14.3 26.5 5.1 38.5l-244.5 319c-5.1 6.7-13.3 10.8-21.8 10.8z m75.6-332h-1.7a16 16 0 0 1-3.9-0.5l-2.7-0.5-3.9-1.4-0.6-0.3c-7.5-4-11.7-11.4-11.7-20.7V432c0-19.9 12-31.3 32.8-31.3h57.5c21.6 0 38.3 5.4 49.6 16 11.5 10.8 17.3 26.7 17.3 47.3 0 21.6-7.5 38.4-22.3 49.9-12.1 9.2-27.2 13.9-45.1 13.9h-42.6v63.5c0 9.3-4.1 16.7-11.7 20.7l-0.6 0.3-3.9 1.4-2.7 0.5c-1.1 0.4-2.4 0.5-3.8 0.5z m22.8-118.2h33.8c5.9 0 10.7-1.2 14.4-3.5l0.1-0.1c3.2-1.9 5.6-4.5 7.4-8l0.1-0.2c1.8-3.2 3.1-6.9 3.9-11 0.6-3.4 0.8-6.9 0.8-10.4 0-1.5-0.1-3-0.2-4.6v-0.8c0-1.6-0.1-3.1-0.4-4.6-0.7-4.3-1.8-7.8-3.2-10.7-1.8-3.3-4-5.9-6.9-7.6-3.7-2.2-8.6-3.3-14.3-3.3h-35.5v64.8zM488 600c-0.6-137.8-0.9-183.2 0-187 2-8.1 10.6-19.4 24-19 11.6 0.3 21.5 9.3 23 21 0.1 61.8 0.1 123.6 0.2 185.3-1.6 11.7-11.6 20.5-23.2 20.7-12 0.2-22.5-8.9-24-21z m-100.9 14.7c-14 0-24.4-7.3-29.3-20.6l-60.2-169-0.1-0.7c-0.3-1.4-0.4-2.8-0.4-4.2 0-14.6 9.3-23.3 25-23.3 8.5 0 13.6 3.6 16.4 6.6l0.3 0.4c1.3 1.5 2.4 3.2 3.3 5.2l0.4 0.8 0.4 0.6 50.6 145.8L444.4 408c2.7-7 8.4-11 15.6-11 10.1 0 16.7 6.6 16.7 16.7v2.7l-61 177.5c-1.6 4.7-4.2 9-7.8 12.6l-0.1 0.1c-5.7 5.4-12.6 8.1-20.7 8.1z m422.5-56.2c-5.8 0-11.7-1.9-16.7-5.7-11.7-9-14.2-25.5-5.7-37.6l0.2-0.3L910.7 354c9.2-12 26.4-14.3 38.4-5.1 12 9.2 14.3 26.4 5.1 38.5l-123.4 161-0.1 0.1c-5.5 6.6-13.3 10-21.1 10z m-669-96.1c-7.9 0-15.7-3.4-21.1-9.9l-0.2-0.3-49.7-64.8c-4.5-5.8-6.4-13-5.4-20.3 1-7.3 4.7-13.7 10.5-18.2 12-9.2 29.3-6.9 38.5 5.1l49.8 65c8.5 12.1 6 28.6-5.7 37.6-5 3.9-10.8 5.8-16.7 5.8z m643.6-88.6h-545c-13.4 0-24.4-10.9-24.4-24.4 0-13.4 10.9-24.4 24.4-24.4h545c13.4 0 24.4 10.9 24.4 24.4-0.1 13.5-11 24.4-24.4 24.4z m148.4-48.6c-8.8 0-17.2-4.3-22.4-11.6l-45.6-62.8c-4.3-5.9-6.1-13.2-4.9-20.4 1.1-7.2 5-13.6 11-17.9 12.2-8.9 29.4-6.2 38.3 6.1l45.7 62.9c5.8 7.8 7 18.3 3 27.4-4 9-12.5 15.2-22.4 16.2-0.9 0.1-1.8 0.1-2.7 0.1zM91.4 315c-5.6 0-11.2-1.7-16.1-5.2-12.2-8.9-15-26.1-6.1-38.3L202 88.6c5.1-7.1 13.4-11.3 22.2-11.3h575.4c8.7 0 17 4.2 22.2 11.3l51.6 71c4.3 5.9 6 13.2 4.9 20.4-1.1 7.2-5.1 13.6-11 17.9-5.9 4.3-13.2 6-20.4 4.9-7.2-1.1-13.6-5.1-17.9-11l-43.4-59.7H238.2L113.6 303.7c-5.3 7.4-13.7 11.3-22.2 11.3z",warn:"M907.3 931H116.7c-20.2 0-36.9-8.4-46-23.2-9-14.7-8.9-33.5 0.3-51.5l363.3-711.7c13.5-26.4 45.6-48 76.2-51.3l2.7-0.3 2.7 0.3c30.7 3.3 62.7 24.9 76.2 51.4l361.2 711.5c9.1 18 9.2 36.8 0.2 51.6-9.3 14.7-26 23.2-46.2 23.2z m-791.8-50.7h793.1c-0.2-0.4-0.3-0.8-0.6-1.2l-0.9-1.7-360.3-709.8c-5.4-10.7-20.4-21.1-33.7-23.6-13.4 2.5-28.4 12.9-33.8 23.6L116 879.3c-0.2 0.3-0.3 0.7-0.5 1zM512 812c-24.3 0-44-19.7-44-44s19.7-44 44-44 44 19.7 44 44-19.7 44-44 44z m0-108c-16.5 0-30-13.5-30-30V330c0-16.5 13.5-30 30-30s30 13.5 30 30v344c0 16.5-13.5 30-30 30z",wallet:"M384.5 682.6V341.4c0-47 39.4-85.4 88.5-85.4h408.1v-42.6c0-47-39.2-85.4-87.6-85.4H155.2c-49.1 0-91.2 37-91.2 84v600c0 47 42.1 84 91.2 84h638.1c48.7 0 87.6-38.4 87.6-85.4V768H472.7c-48.9 0-88.2-38.4-88.2-85.4zM448 355.7v312.6c0 19.6 16.8 35.7 37.4 35.7h437.2c20.6 0 37.4-16.1 37.4-35.7V355.7c0-19.6-16.8-35.7-37.4-35.7H485.4c-20.6 0-37.4 16.1-37.4 35.7z m195.9 227.4c-43 2.7-78.4-32.8-75.8-75.8 2.2-35.4 31-64.2 66.6-66.7 43-2.7 78.4 32.8 75.8 75.8-2.5 35.7-31.2 64.5-66.6 66.7z",windows:"M431.2 491.5H64V187.3l367.2-50.6v354.8z m0 395.8L64 836.7V536.8h367.2v350.5zM960 491.5H471.6V131.3L960 64v427.5z m0 468.5l-488.4-67.3V536.8H960V960z"};export default SVG_PATH; \ No newline at end of file diff --git a/src/lib/layer/index.js b/src/lib/layer/index.js new file mode 100644 index 0000000..fe89d75 --- /dev/null +++ b/src/lib/layer/index.js @@ -0,0 +1,15 @@ +/** + * + * @authors yutent (yutent.io@gmail.com) + * @date 2020-07-24 13:55:26 + * @version v2.0.1 + * + */ + +'use strict' + +import"../form/input.js";import Drag from"../drag/core.js";import $ from"../utils.js";const LANGUAGES={en:{TITLE:"Dialog",BTNS:["Cancel","OK"]},zh:{TITLE:"提示",BTNS:["取消","确定"]}};LANGUAGES["zh-CN"]=LANGUAGES.zh;const lang=LANGUAGES[window.__ENV_LANG__||navigator.language]||LANGUAGES.en;let uniqueInstance=null,toastInstance=null;const UNIQUE_TYPES=["alert","confirm","prompt"];function renderBtns(t){var e="";return t.forEach((t,s)=>{e+=``}),e}class Layer extends HTMLElement{static get observedAttributes(){return["left","right","top","bottom","from","to","btns","type","title","blur","background","mask","radius","mask-close","mask-color","fixed"]}constructor(){super(),Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(this,"props",{value:{left:"auto",right:"auto",top:"auto",bottom:"auto",from:Object.create(null),to:Object.create(null),btns:[],type:"",title:"",blur:!1,background:null,mask:!1,radius:null,"mask-close":!1,"mask-color":null,fixed:!0},writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__TITLE__=this.root.children[1].firstElementChild,this.__BODY__=this.root.children[1].children[1],this.__CTRL__=this.root.children[1].lastElementChild,this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}set title(t){this.props.title=t,t?(this.__TITLE__.firstElementChild?this.__TITLE__.insertBefore(document.createTextNode(t),this.__TITLE__.firstElementChild):this.__TITLE__.textContent=t,this.__TITLE__.style.display="flex"):this.__TITLE__.style.display=""}set type(t){var{btns:e}=this.props;if(t&&!this._handleBtnClick){switch(t){case"alert":for(;e.length>1;)e.splice(0,1);break;case"confirm":case"prompt":for(;e.length>2;)e.splice(0,1);break;case"toast":case"notify":case"frame":if("notify"===t){var s=document.createElement("wc-icon");s.setAttribute("is","close"),this.__TITLE__.appendChild(s)}e=[];break;default:t="common"}this.props.type=t,e.length?(this.__CTRL__.innerHTML=renderBtns(e),this.__CTRL__.style.display="flex"):this.__CTRL__.style.display="",this.setAttribute(t,"")}}set fixed(t){this.props.fixed=!!t,this._updateFixedStat()}_updateFixedStat(){UNIQUE_TYPES.includes(this.props.type)||(this.props.fixed?this._dragIns&&(this._dragIns.destroy(),this._dragIns=null):(this._dragIns=new Drag(this.root.children[1]).by(this.__TITLE__,{overflow:!!this.props.hasOwnProperty("overflow")&&this.props.overflow}),this.removeAttribute("fixed")))}_intercept(t){this.props.intercept?this.props.intercept(t,e=>{delete this.props.intercept,this.resolve(t),this.close()}):(this.resolve(t),this.close())}close(t){if(!1===this.wrapped)if(this._dragIns&&this._dragIns.destroy(),UNIQUE_TYPES.includes(this.props.type)&&(uniqueInstance=null),delete this.promise,$.unbind(this.__CTRL__,"click",this._handleBtnClick),this.props.from&&!t){let t="opacity:0;";for(let e in this.props.from)t+=`${e}:${this.props.from[e]};`;this.root.children[1].style.cssText+=t,this.timer=setTimeout(()=>{this.parentNode.removeChild(this),this.dispatchEvent(new CustomEvent("close"))},200)}else clearTimeout(this.timer),this.parentNode.removeChild(this),this.dispatchEvent(new CustomEvent("close"));else this.removeAttribute("common"),this.dispatchEvent(new CustomEvent("close"))}show(){!1!==this.wrapped&&this.setAttribute("common","")}moveTo(t={}){var e="";for(var s in t)e+=`${s}:${t[s]};`;this.root.children[1].style.cssText+=e}connectedCallback(){this.type=this.props.type,this.title=this.props.title,this._handleBtnClick=$.bind(this.__CTRL__,"click",t=>{if("BUTTON"===t.target.tagName){var e=+t.target.dataset.idx,{type:s}=this.props;switch(s){case"alert":this.resolve(),this.close();break;case"confirm":case"prompt":if(0===e)this.reject(),this.close();else{let t="prompt"===s?this.__INPUT__.value:null;this._intercept(t)}break;default:this._intercept(e)}}}),"prompt"===this.props.type&&(this.__INPUT__=this.__BODY__.firstElementChild.assignedNodes().pop(),this._handleSubmit=$.bind(this.__INPUT__,"submit",t=>{this._intercept(t.detail)})),this.props.mask&&this.setAttribute("mask",""),this._updateFixedStat(),this.props.mask&&(this._handlMask=$.outside(this.root.children[1],t=>{t.target===this&&(this.props["mask-close"]?(!1===this.wrapped&&this.reject(null),this.close()):UNIQUE_TYPES.includes(this.props.type)&&(this.root.children[1].classList.toggle("scale",!0),setTimeout(t=>{this.root.children[1].classList.remove("scale")},100)))}),this.props["mask-color"]&&(this.style.backgroundColor=this.props["mask-color"])),this.props.blur&&this.root.children[1].classList.toggle("blur",!0);let t=this.props.from?"":"opacity:1;";if(this.props.background&&(t+=`background: ${this.props.background};`),(this.props.radius||0===this.props.radius)&&(t+=`border-radius: ${this.props.radius};`),this.props.size)for(let e in this.props.size)t+=`${e}:${this.props.size[e]};`;if(this.props.from){for(let e in this.props.from)t+=`${e}:${this.props.from[e]};`;setTimeout(t=>{let e="opacity:1;";for(let t in this.props.to)e+=`${t}:${this.props.to[t]};`;this.root.children[1].style.cssText+=e},50)}t&&(this.root.children[1].style.cssText+=t),"toast"===this.props.type&&(this.timer=setTimeout(()=>{toastInstance=null,this.close()},3e3)),"notify"===this.props.type&&(this._handleClose=$.bind(this.__TITLE__,"click",t=>{"WC-ICON"===t.target.tagName&&this.close()}))}disconnectedCallback(){$.clearOutside(this._handlMask),$.unbind(this.__TITLE__,"click",this._handleClose)}attributeChangedCallback(t,e,s){if(null!==s&&e!==s)switch(t){case"title":case"type":this[t]=s,this.removeAttribute(t);break;case"mask-color":case"background":this.props[t]=s;break;case"mask":case"mask-close":case"blur":this.props[t]=!0;break;case"radius":this.props.radius=s;break;case"left":case"right":case"top":case"bottom":this.props.from[t]=s,this.props.to=this.props.from,this.removeAttribute(t);break;case"fixed":this.fixed=!0}}}function _layer(t){var e=document.createElement("wc-layer");if(t.type||(t.type="common"),"toast"===t.type){var{type:s,content:o}=t;t={type:s,content:o,from:{top:0},to:{top:"30px"}},toastInstance&&toastInstance.close(!0),toastInstance=e}else e.props.mask=t.mask,!1===t.btns?e.props.btns=[]:t.btns&&t.btns.length?e.props.btns=t.btns:e.props.btns=lang.BTNS.concat(),t.intercept&&"function"==typeof t.intercept&&(e.props.intercept=t.intercept),e.props.mask=t.mask,e.props["mask-close"]=t["mask-close"],t.hasOwnProperty("overflow")&&(e.props.overflow=t.overflow),e.props["mask-color"]=t["mask-color"],e.props.blur=t.blur,e.props.radius=t.radius,e.props.background=t.background,t.size&&"object"==typeof t.size&&(e.props.size=t.size),UNIQUE_TYPES.includes(t.type)&&(uniqueInstance&&uniqueInstance.close(!0),uniqueInstance=e);return t.to&&"object"==typeof t.to&&(e.props.to=t.to,t.from&&"object"==typeof t.from?e.props.from=t.from:e.props.from=t.to),e.props.type=t.type,e.props.title=t.title,t.hasOwnProperty("fixed")&&(e.props.fixed=t.fixed),e.innerHTML=t.content,e.wrapped=!1,document.body.appendChild(e),e.promise}Object.assign(_layer,{alert(t,e=lang.TITLE){return this({type:"alert",title:e,content:t,mask:!0})},confirm(t,e=lang.TITLE,s){return"function"==typeof e&&(s=e,e=lang.TITLE),this({type:"confirm",title:e,content:t,mask:!0,intercept:s})},prompt(t=lang.TITLE,e){return this({type:"prompt",title:t,content:'',mask:!0,intercept:e})},frame(t,e={}){return this({...e,type:"frame",content:``,mask:!0,"mask-close":!0})},notify(t){return this({type:"notify",title:"通知",content:t,blur:!0,from:{right:"-300px",top:0},to:{right:0}})},toast(t,e="info"){var s=e;switch(e){case"info":case"warn":break;case"error":s="deny";break;case"success":s="get";break;default:s="info"}return this({content:`\n
    \n \n ${t}\n
    `,type:"toast"})}}),window.layer=_layer;export default _layer; + +if(!customElements.get('wc-layer')){ + customElements.define('wc-layer', Layer) +} diff --git a/src/lib/scroll/index.js b/src/lib/scroll/index.js new file mode 100644 index 0000000..d73c9d8 --- /dev/null +++ b/src/lib/scroll/index.js @@ -0,0 +1,15 @@ +/** + * + * @authors yutent (yutent@doui.cc) + * @date 2020-07-07 10:57:15 + * @version v2.0.1 + * + */ + +'use strict' + +import $ from"../utils.js";const IS_FF=!!window.sidebar;export default class Scroll extends HTMLElement{static get observedAttributes(){return["thumbX","thumbY","disabled","axis"]}constructor(){super(),Object.defineProperty(this,"root",{value:this.attachShadow({mode:"open"}),writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(this,"props",{value:{thumbX:0,thumbY:0,disabled:!1,axis:"xy"},writable:!0,enumerable:!1,configurable:!0}),this.root.innerHTML='
    ',this.__BOX__=this.root.children[1],this.__X__=this.root.children[2].children[0],this.__Y__=this.root.children[3].children[0]}get scrollTop(){return this.__BOX__.scrollTop}set scrollTop(t){if((t=+t)==t){var{sh:s,oh:i,yh:e}=this.props;this.__BOX__.scrollTop=t;var o=this.__BOX__.scrollTop/(s-i)*(i-e);this.props.thumbY=o,this.__Y__.style.transform=`translateY(${o}px)`}}get scrollLeft(){return this.__BOX__.scrollLeft}set scrollLeft(t){if((t=+t)==t){var{sw:s,ow:i,xw:e}=this.props;this.__BOX__.scrollLeft=t;var o=this.__BOX__.scrollLeft/(s-i)*(i-e);this.props.thumbX=o,this.__X__.style.transform=`translateX(${o}px)`}}get scrollHeight(){return this.__BOX__.scrollHeight}get disabled(){return this.props.disabled}set disabled(t){var s=typeof t;t!==this.props.disabled&&("boolean"===s&&t||"boolean"!==s?(this.props.disabled=!0,this.setAttribute("disabled","")):(this.props.disabled=!1,this.removeAttribute("disabled")))}_fetchScrollX(t){var{sw:s,ow:i,xw:e}=this.props;return t<0?t=0:t>i-e&&(t=i-e),this.__BOX__.scrollLeft=t/(i-e)*(s-i),this.__X__.style.transform=`translateX(${t}px)`,t}_fetchScrollY(t){var{sh:s,oh:i,yh:e}=this.props;return t<0?t=0:t>i-e&&(t=i-e),this.__BOX__.scrollTop=t/(i-e)*(s-i),this.__Y__.style.transform=`translateY(${t}px)`,t}connectedCallback(){this._initFn=$.bind(this.__BOX__,"mouseenter",t=>{if(!this.disabled){var s=this.__BOX__.offsetWidth,i=this.__BOX__.scrollWidth,e=this.__BOX__.offsetHeight,o=this.__BOX__.scrollHeight,h=e*e/o>>0,r=s*s/i>>0;h<50&&(h=50),r<50&&(r=50),r===s&&(r=0),h===e&&(h=0),this.props.oh=e,this.props.sh=o,this.props.ow=s,this.props.sw=i,this.props.yh=h,this.props.xw=r,this.__X__.style.width=r+"px",this.__Y__.style.height=h+"px"}}),this._wheelFn=$.bind(this.__BOX__,"wheel",t=>{if(!this.disabled){var{sh:s,oh:i,yh:e,sw:o,ow:h,xw:r}=this.props;if(r||e){var l,a,_=Date.now();if((!this.stamp||_-this.stamp>800)&&(this.stamp=_,this.times=1),IS_FF)l=t.deltaMode?10*t.deltaX:t.deltaX,a=t.deltaMode?10*t.deltaY:t.deltaY;else{var n=Math.abs(t.wheelDelta);n<120?(l=t.deltaX,a=t.deltaY):(l=t.deltaX/(n/120),a=t.deltaY/(n/120))}if(_-this.stamp<20&&(this.times+=.05,this.times>3&&(this.times=3)),l*=this.times,a*=this.times,"x"!==this.props.axis&&(this.__BOX__.scrollTop+=a,e)){var p=this.__BOX__.scrollTop/(s-i)*(i-e);if((0===(p>>=0)||i-e===p)&&p===this.props.thumbY)return;t.preventDefault(),t.stopPropagation(),this.props.thumbY=p,this.__Y__.style.transform=`translateY(${p}px)`}if("y"!==this.props.axis&&(this.__BOX__.scrollLeft+=l,r)){var d=this.__BOX__.scrollLeft/(o-h)*(h-r);if((0===(d>>=0)||h-r===d)&&d===this.props.thumbX)return;t.preventDefault(),t.stopPropagation(),this.props.thumbX=d,this.__X__.style.transform=`translateX(${d}px)`}this.stamp=_,this.dispatchEvent(new CustomEvent("scroll",{detail:{x:this.props.thumbX,y:this.props.thumbY}}))}}});var t,s,i,e,o=o=>{var{thumbY:h,thumbX:r}=this.props;null!==t&&(i=this._fetchScrollX(r+o.pageX-t)),null!==s&&(e=this._fetchScrollY(h+o.pageY-s))},h=r=>{t=null,s=null,this.props.thumbX=i,this.props.thumbY=e,$.unbind(document,"mousemove",o),$.unbind(document,"mouseup",h)};$.bind(this.__Y__,"mousedown",t=>{s=t.pageY,this.props.thumbY||(this.props.thumbY=0),this.disabled||($.bind(document,"mousemove",o),$.bind(document,"mouseup",h))}),$.bind(this.__X__,"mousedown",s=>{t=s.pageX,this.props.thumbX||(this.props.thumbX=0),this.disabled||($.bind(document,"mousemove",o),$.bind(document,"mouseup",h))}),this.__observer=new MutationObserver(this._initFn),this.__observer.observe(this,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.__observer.disconnect(),$.unbind(this.__BOX__,"mouseenter",this._initFn),$.unbind(this.__BOX__,"wheel",this._wheelFn)}attributeChangedCallback(t,s,i){if(null!==i&&s!==i)switch(t){case"axis":this.props.axis=i;break;case"disabled":this[t]=!0}}}; + +if(!customElements.get('wc-scroll')){ + customElements.define('wc-scroll', Scroll) +} diff --git a/src/lib/socket.js b/src/lib/socket.js new file mode 100644 index 0000000..94d7918 --- /dev/null +++ b/src/lib/socket.js @@ -0,0 +1,25 @@ +/** + * 与主进程的通讯 + * @author yutent + * @date 2020/07/14 11:42:02 + */ + +const { ipcRenderer } = require('electron') +const EventEmitter = require('events') +const util = require('util') + +class Socket { + constructor() { + ipcRenderer.on('app', (ev, conn) => { + this.emit(conn.type, conn.data) + }) + } + + dispatch(type = '', data = {}) { + return ipcRenderer.sendSync('app', { data, type }) + } +} + +util.inherits(Socket, EventEmitter) + +export default new Socket() diff --git a/src/lib/utils.js b/src/lib/utils.js new file mode 100644 index 0000000..752ccd5 --- /dev/null +++ b/src/lib/utils.js @@ -0,0 +1 @@ +function noop(){}export default{nextTick:function(){let t=[];let e=document.createTextNode("\x3c!-- --\x3e");new MutationObserver(function(){let e=t.length;for(let n=0;n{if(n)if(n.path){for(var i=n.path.concat();i.length>3;)if(i.shift()===t)return}else{var o=n.explicitOriginalTarget||n.target;if(t===o||t.contains(o)||t.root&&t.root.contains(o))return}e(n)})},clearOutside(t=noop){this.unbind(document,"mousedown",t)}}; \ No newline at end of file diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..40fd494 --- /dev/null +++ b/src/main.js @@ -0,0 +1,153 @@ +/** + * + * @author yutent + * @date 2019/09/16 20:51:19 + */ + +const { + app, + BrowserWindow, + protocol, + ipcMain, + net, + Notification +} = require('electron') +const path = require('path') +const fs = require('iofs') + +const { createMainWindow, createFloatWindow } = require('./tools/window') +const createMenu = require('./tools/menu') +const createTay = require('./tools/tray') + +const MIME_TYPES = { + '.js': 'text/javascript', + '.html': 'text/html', + '.htm': 'text/plain', + '.css': 'text/css', + '.jpg': 'image/jpg', + '.png': 'image/png', + '.gif': 'image/gif', + '.svg': 'image/svg+xml', + '.ico': 'image/ico' +} + +const ROOT = __dirname + +var timer + +function fetch(url) { + return new Promise((y, n) => { + var conn = net.request(url) + var r = [] + + conn.on('response', res => { + res.on('data', c => { + r.push(c) + }) + + res.on('end', _ => { + y(Buffer.concat(r).toString()) + }) + }) + + conn.on('error', e => { + n(e) + }) + + conn.end() + }) +} + +function ring() { + var n = 5 + var t = setInterval(() => { + var notify = new Notification({ + title: '搞基⏰', + subtitle: '神奇的2点半到啦', + body: '神奇的2点半到啦, 该加仓的加仓, 该卖的卖啦' + }) + notify.show() + n-- + if (n === 0) { + clearInterval(t) + } + }, 1000) +} + +/* ----------------------------------------------------- */ +app.commandLine.appendSwitch('--lang', 'zh-CN') +app.commandLine.appendSwitch('--autoplay-policy', 'no-user-gesture-required') + +protocol.registerSchemesAsPrivileged([ + { scheme: 'app', privileges: { secure: true, standard: true } } +]) + +/* ----------------------------------------------------- */ + +app.dock.hide() + +// 初始化应用 +app.once('ready', () => { + // 注册协议 + protocol.registerBufferProtocol('app', (req, cb) => { + let file = req.url.replace(/^app:\/\/local\//, '') + let ext = path.extname(req.url) + let buff = fs.cat(path.resolve(ROOT, file)) + cb({ data: buff, mimeType: MIME_TYPES[ext] }) + }) + + // 创建浏览器窗口 + app.__main__ = createMainWindow(path.resolve(ROOT, './images/app.png')) + app.__float__ = createFloatWindow() + + createMenu(app.__main__) + createTay(app.__float__, app.__main__) + + app.__main__.on('closed', () => { + app.__main__ = null + app.__float__ = null + app.exit() + }) + + // mac专属事件,点击dock栏图标,可激活窗口 + // app.on('activate', _ => { + // if (app.__main__) { + // app.__main__.restore() + // } + // }) +}) + +ipcMain.on('app', (ev, conn) => { + switch (conn.type) { + case 'fetch': + fetch(conn.data).then(r => { + ev.returnValue = r + }) + break + + case 'notify': + clearTimeout(timer) + var t1 = Date.now() + var t2 = new Date() + t2.setHours(14) + t2.setMinutes(30) + t2.setSeconds(0) + + if (t2.getTime() - t1 > 0) { + timer = setTimeout(ring, t2.getTime() - t1) + } + + ev.returnValue = true + break + + case 'data-reload': + app.__main__.webContents.send('app', { type: 'data-reload', data: null }) + ev.returnValue = true + break + + case 'devtools': + app.__main__.openDevTools() + ev.returnValue = true + break + } +}) diff --git a/src/tools/menu.js b/src/tools/menu.js new file mode 100644 index 0000000..5f63419 --- /dev/null +++ b/src/tools/menu.js @@ -0,0 +1,36 @@ +/** + * 菜单项 + * @author yutent + * @date 2020/12/10 19:30:02 + */ + +const { Menu } = require('electron') + +module.exports = function(win) { + var menuList = Menu.buildFromTemplate([ + { + label: '搞基数据', + submenu: [ + { role: 'about', label: '关于搞基数据' }, + { type: 'separator' }, + { + label: '退出', + accelerator: 'Command+Q', + click(a, b, ev) { + win.destroy() + } + } + ] + }, + { + label: '编辑', + submenu: [ + { role: 'cut', label: '剪切' }, + { role: 'copy', label: '复制' }, + { role: 'paste', label: '粘贴' }, + { role: 'selectall', label: '全选' } + ] + } + ]) + Menu.setApplicationMenu(menuList) +} diff --git a/src/tools/tray.js b/src/tools/tray.js new file mode 100644 index 0000000..2cf498a --- /dev/null +++ b/src/tools/tray.js @@ -0,0 +1,42 @@ +/** + * 托盘 + * @author yutent + * @date 2020/12/10 19:30:20 + */ + +const { Tray, Menu } = require('electron') +const path = require('path') +const ROOT = __dirname + +module.exports = function(mini, main) { + var menuList = Menu.buildFromTemplate([ + { + label: '显示主窗口', + click(a, b, ev) { + main.restore() + } + }, + { + label: '不搞基了', + accelerator: 'Command+Q', + click(a, b, ev) { + main.destroy() + } + } + ]) + var tray = new Tray(path.join(ROOT, '../images/tray.png')) + + tray.on('click', _ => { + var b = tray.getBounds() + mini.setBounds({ x: b.x - 120, y: b.y + b.height }) + mini.show() + mini.focus() + mini.webContents.send('app', { type: 'float-visible', data: null }) + }) + + tray.on('right-click', _ => { + tray.popUpContextMenu(menuList) + }) + + main.__tray__ = tray +} diff --git a/src/tools/window.js b/src/tools/window.js new file mode 100644 index 0000000..db16d3c --- /dev/null +++ b/src/tools/window.js @@ -0,0 +1,76 @@ +/** + * + * @author yutent + * @date 2020/12/10 14:57:49 + */ + +const { BrowserWindow } = require('electron') + +/** + * 应用主窗口 + */ +exports.createMainWindow = function(icon) { + var win = new BrowserWindow({ + title: '搞基数据', + width: 1024, + height: 540, + frame: false, + titleBarStyle: 'hiddenInset', + resizable: false, + maximizable: false, + icon, + transparent: true, + vibrancy: 'hud', + visualEffectState: 'active', + webPreferences: { + // webSecurity: false, + experimentalFeatures: true, + nodeIntegration: true, + spellcheck: false + }, + show: false + }) + + win.loadURL('app://local/index.html') + + // win.on('ready-to-show', _ => { + // win.show() + // win.openDevTools() + // }) + + win.on('close', ev => { + ev.preventDefault() + win.hide() + }) + + return win +} + +// 创建悬浮窗口 +exports.createFloatWindow = function() { + var win = new BrowserWindow({ + width: 280, + height: 360, + resizable: false, + maximizable: false, + frame: false, + show: false, + vibrancy: 'hud', + visualEffectState: 'active', + webPreferences: { + experimentalFeatures: true, + nodeIntegration: true, + spellcheck: false + } + }) + + // win.openDevTools() + + win.on('blur', ev => { + win.hide() + }) + + win.loadURL('app://local/float.html') + + return win +} diff --git a/src/view.html b/src/view.html new file mode 100644 index 0000000..13184a1 --- /dev/null +++ b/src/view.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + + +
    + +
    +
    +

    + +
    + +
    + + + +
    +
    +
    啥基都没有...
    +
    +
    + + + + \ No newline at end of file