├── src ├── component │ ├── clock │ │ ├── index.scss │ │ └── index.tsx │ ├── space │ │ └── index.tsx │ ├── button │ │ └── index.tsx │ └── link │ │ └── index.tsx ├── logo.png ├── images.d.ts ├── global.d.ts ├── external │ └── index.ts ├── index.tsx ├── index.scss ├── pages │ ├── example │ │ └── index.tsx │ └── home │ │ └── index.tsx ├── App.scss ├── App.tsx └── logo.svg ├── bin ├── macosx │ └── inspector.app │ │ └── Contents │ │ ├── PkgInfo │ │ ├── MacOS │ │ └── inspector │ │ ├── Resources │ │ ├── Assets.car │ │ ├── AppIcon.icns │ │ └── Base.lproj │ │ │ └── MainMenu.nib │ │ ├── Info.plist │ │ └── _CodeSignature │ │ └── CodeResources ├── windows │ ├── SciterJsBrowser.exe │ └── SciterJsDevView.exe └── index.js ├── aardio ├── .build │ ├── default.init.aardio │ ├── default.main.aardio │ └── default.Manifest.xml ├── dist │ └── sciterjs.exe ├── layout │ ├── favicon.ico │ ├── main-06fa9d0a4f5ec84e8cec.css │ ├── 6ce24c58023cc2f8fd88fe9d219db6c6.svg │ ├── index.html │ └── bundle.js ├── main.aardio ├── default.aproj └── dlg │ └── scapp.aardio ├── aardio.png ├── screen.png ├── public ├── favicon.ico ├── index.html ├── sciter.html └── dev.sciter.html ├── postcss.config.js ├── config ├── inspector.js ├── scapp.js ├── aardio.js ├── ipad.js ├── dev.js ├── build.js ├── prod.js ├── dev.scapp.js └── base.js ├── .gitignore ├── tsconfig.json ├── .babelrc ├── loaders ├── sciter-css-loader.js └── reg.js ├── README.md └── package.json /src/component/clock/index.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /aardio/.build/default.init.aardio: -------------------------------------------------------------------------------- 1 | //发布前触发 2 | import ide; -------------------------------------------------------------------------------- /aardio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/aardio.png -------------------------------------------------------------------------------- /screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/screen.png -------------------------------------------------------------------------------- /src/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/src/logo.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /aardio/dist/sciterjs.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/aardio/dist/sciterjs.exe -------------------------------------------------------------------------------- /aardio/layout/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/aardio/layout/favicon.ico -------------------------------------------------------------------------------- /bin/windows/SciterJsBrowser.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/bin/windows/SciterJsBrowser.exe -------------------------------------------------------------------------------- /bin/windows/SciterJsDevView.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/bin/windows/SciterJsDevView.exe -------------------------------------------------------------------------------- /aardio/.build/default.main.aardio: -------------------------------------------------------------------------------- 1 | //此触发器在生成EXE以后执行 2 | import ide; 3 | import fsys; 4 | 5 | //获取生成的EXE文件路径 6 | var publishFile = ide.getPublishPath(); -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/MacOS/inspector: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/bin/macosx/inspector.app/Contents/MacOS/inspector -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/Resources/Assets.car: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/bin/macosx/inspector.app/Contents/Resources/Assets.car -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/Resources/AppIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/bin/macosx/inspector.app/Contents/Resources/AppIcon.icns -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/Resources/Base.lproj/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veluxa/sciterjs-react/HEAD/bin/macosx/inspector.app/Contents/Resources/Base.lproj/MainMenu.nib -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | sourceMap: false, 3 | // parser: 'postcss-scss', 4 | plugins: { 5 | precss: {}, 6 | 'postcss-preset-env': {} 7 | }, 8 | } -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /src/images.d.ts: -------------------------------------------------------------------------------- 1 | declare module "*.svg" 2 | declare module '*.png' 3 | declare module '*.jpg' 4 | declare module '*.jpeg' 5 | declare module '*.gif' 6 | declare module '*.bmp' 7 | declare module '*.tiff' -------------------------------------------------------------------------------- /src/component/space/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "sciterjs-react"; 2 | 3 | const Space = (props) => { 4 | return props.children.map((child) => { 5 | return <>{child} 6 | }) 7 | } 8 | 9 | export default Space; -------------------------------------------------------------------------------- /src/global.d.ts: -------------------------------------------------------------------------------- 1 | export { } 2 | 3 | declare global { 4 | interface Window { 5 | env: any; 6 | sciter: any; 7 | jsFunction: any; 8 | } 9 | 10 | interface NodeModule { 11 | hot: any; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/external/index.ts: -------------------------------------------------------------------------------- 1 | 2 | const external = { 3 | call: function (func, ...args) { 4 | return (Window as any).this.xcall("$javascriptExternal")[func](args); 5 | }, 6 | 7 | post: function (func, ...args) { 8 | return this.xcall(func, args) 9 | } 10 | } 11 | 12 | export default external; -------------------------------------------------------------------------------- /config/inspector.js: -------------------------------------------------------------------------------- 1 | const os = require('os') 2 | const exec = require('child_process').exec; 3 | const platform = os.platform() 4 | 5 | const cmd = { 6 | win32: "%cd%/bin/windows/inspector.exe", 7 | darwin: "open ./bin/macosx/inspector.app", 8 | linux: "" 9 | } 10 | 11 | exec(cmd[platform], (err, stdout) => { 12 | err && console.log(err); 13 | stdout && console.log(stdout); 14 | }) -------------------------------------------------------------------------------- /config/scapp.js: -------------------------------------------------------------------------------- 1 | const os = require('os') 2 | const exec = require('child_process').exec; 3 | const platform = os.platform() 4 | 5 | const cmd = { 6 | win32: "%cd%/bin/windows/scapp.exe ./dist/index.html", 7 | darwin: "./bin/macosx/scapp ./dist/index.html", 8 | linux: "" 9 | } 10 | 11 | exec(cmd[platform], (err, stdout) => { 12 | err && console.log(err); 13 | stdout && console.log(stdout); 14 | }) -------------------------------------------------------------------------------- /public/sciter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "sciterjs-react"; 2 | import App from './App'; 3 | import "./index.scss"; 4 | 5 | // for aardio 6 | window.jsFunction = function () { 7 | return "Functions in sciterjs are called by aardio"; 8 | } 9 | 10 | React.render( 11 | , 12 | document.querySelector("#root") 13 | ); 14 | 15 | if (module.hot) { 16 | module.hot.accept(); 17 | module.hot.dispose(() => console.log("close")); 18 | } -------------------------------------------------------------------------------- /src/index.scss: -------------------------------------------------------------------------------- 1 | html,body{ 2 | // background-color: #0F0F1A; 3 | background-color: white; 4 | padding: 0; 5 | margin: 0; 6 | width: 100%; 7 | height: 100%; 8 | } 9 | 10 | .flex{ 11 | flow: horizontal; 12 | display: flex; 13 | } 14 | 15 | .flex-v{ 16 | flow: vertical; 17 | display: flex; 18 | flex-direction: column; 19 | } 20 | 21 | .c-align{ 22 | justify-content: center; 23 | horizontal-align: center; 24 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # bin 4 | /bin/linux 5 | /bin/macosx 6 | /bin/windows 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # testing 12 | /coverage 13 | 14 | # production 15 | /build 16 | /dist 17 | 18 | # misc 19 | .DS_Store 20 | .env.local 21 | .env.development.local 22 | .env.test.local 23 | .env.production.local 24 | 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | -------------------------------------------------------------------------------- /src/pages/example/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "sciterjs-react"; 2 | import Button from '../../component/button'; 3 | import external from '../../external' 4 | 5 | const Example = () => { 6 | 7 | return ( 8 |
9 |
Example page
10 | 13 |
14 | 15 | ) 16 | } 17 | 18 | export default Example; -------------------------------------------------------------------------------- /src/component/button/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "sciterjs-react"; 2 | 3 | const Button = (props) => { 4 | return
{ 5 | props.onClick.call(this, e); 6 | e.stopPropagation(); 7 | }}>{props.children}
8 | } 9 | 10 | export default Button; -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "outDir": "dist", 4 | "module": "esnext", 5 | "target": "esnext", 6 | "jsx": "preserve", 7 | "esModuleInterop": true, 8 | "moduleResolution": "node", 9 | "experimentalDecorators": true, 10 | "isolatedModules": true, 11 | "sourceMap": true, 12 | "allowJs": true, 13 | }, 14 | "include": [ 15 | "src/*" 16 | ], 17 | "exclude": [ 18 | "node_modules" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/env", 4 | "@babel/preset-react", 5 | "@babel/preset-typescript" 6 | ], 7 | "plugins": [ 8 | [ 9 | "@babel/plugin-proposal-decorators", 10 | { 11 | "legacy": true 12 | } 13 | ], 14 | "@babel/plugin-proposal-class-properties", 15 | "@babel/plugin-syntax-typescript", 16 | "@babel/plugin-syntax-jsx", 17 | "@babel/plugin-transform-runtime" 18 | , 19 | ["import", { "libraryName": "antd", "style": true }] 20 | ] 21 | } -------------------------------------------------------------------------------- /aardio/layout/main-06fa9d0a4f5ec84e8cec.css: -------------------------------------------------------------------------------- 1 | .app{text-align:center;height:100vh;background-color:#282c34;display:flex;flex-direction:column;justify-content:center;align-items:center;flow:vertical;horizontal-align:center}#nav-links a{padding:0 10px}.app-logo{height:120px;pointer-events:none}.app-content{margin-top: *;margin-bottom: *;font-size:10pt;color:white}.app-link{color:#61dafb;margin-right:10px} 2 | 3 | html,body{background-color:white;padding:0;margin:0;width:100%;height:100%}.flex{flow:horizontal;display:flex}.flex-v{flow:vertical;display:flex;flex-direction:column}.c-align{justify-content:center;horizontal-align:center} 4 | 5 | -------------------------------------------------------------------------------- /config/aardio.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const path = require("path"); 3 | const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 4 | const baseWebpackConfig = require('./base'); 5 | 6 | module.exports = env => merge(baseWebpackConfig(env), { 7 | entry: "./src/index.tsx", 8 | mode: "production", 9 | // devtool: 'cheap-module-source-map', // source-map 10 | output: { 11 | path: path.resolve(__dirname, "../aardio/layout"), 12 | filename: "bundle.js", 13 | publicPath: '', 14 | }, 15 | plugins: [ 16 | new CleanWebpackPlugin() 17 | ] 18 | }) -------------------------------------------------------------------------------- /src/component/link/index.tsx: -------------------------------------------------------------------------------- 1 | import React from "sciterjs-react"; 2 | import { route } from 'preact-router'; 3 | 4 | let currentUrl = "/" 5 | 6 | const Link = (props: { href: any; children?: any; }) => { 7 | 8 | const onLinkClick = (e) => { 9 | e.stopPropagation() 10 | const href = e.currentTarget.attributes["href"] 11 | 12 | if (href !== currentUrl) { 13 | currentUrl = href 14 | route(currentUrl) 15 | } 16 | } 17 | 18 | return ( 19 | {props.children} 20 | ) 21 | } 22 | 23 | export default Link; -------------------------------------------------------------------------------- /src/App.scss: -------------------------------------------------------------------------------- 1 | .app { 2 | text-align: center; 3 | height: 100vh; 4 | background-color: #282c34; 5 | 6 | display: flex; 7 | flex-direction: column; 8 | justify-content: center; 9 | align-items: center; 10 | 11 | flow: vertical; 12 | horizontal-align: center; 13 | } 14 | 15 | #nav-links a{ 16 | padding: 0 10px; 17 | } 18 | 19 | .app-logo { 20 | height: 120px; 21 | pointer-events: none; 22 | } 23 | 24 | .app-content { 25 | 26 | margin-top: x; 27 | margin-bottom: x; 28 | 29 | font-size: 10pt; 30 | color: white; 31 | } 32 | 33 | .app-link { 34 | color: #61dafb; 35 | margin-right: 10px; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect } from "sciterjs-react"; 2 | import { Router, route } from 'preact-router'; 3 | import Home from "./pages/home"; 4 | import Example from './pages/example'; 5 | import Space from './component/space'; 6 | import Link from './component/link' 7 | import './App.scss'; 8 | 9 | const App = () => { 10 | 11 | useEffect(() => { 12 | route('/') 13 | }, []) 14 | 15 | return ( 16 |
17 | 23 | 24 | 25 | 26 | 27 |
28 | ); 29 | } 30 | 31 | export default App; 32 | -------------------------------------------------------------------------------- /aardio/main.aardio: -------------------------------------------------------------------------------- 1 | import win.ui; 2 | /*DSG{{*/ 3 | var mainForm = win.form(text="sciterjs-arrdio";right=761;bottom=609) 4 | mainForm.add( 5 | custom={cls="custom";text="自定义控件";left=0;top=55;right=762;bottom=610;ah=1;aw=1;z=1}; 6 | doscript={cls="button";text="调用sciterjs";left=18;top=12;right=90;bottom=39;z=2}; 7 | getTime={cls="button";text="获取时间";left=107;top=12;right=178;bottom=39;z=3} 8 | ) 9 | /*}}*/ 10 | 11 | var frmChild = null; 12 | 13 | function go(){ 14 | frmChild = mainForm.custom.loadForm("\dlg\scapp.aardio"); 15 | frmChild.show(); 16 | } 17 | 18 | mainForm.doscript.oncommand = function(id,event){ 19 | frmChild.callJs() 20 | } 21 | 22 | mainForm.getTime.oncommand = function(id,event){ 23 | frmChild.getTime() 24 | } 25 | 26 | go() 27 | 28 | mainForm.show() 29 | win.loopMessage(); -------------------------------------------------------------------------------- /config/ipad.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const webpack = require('webpack'); 3 | const webpackMiddleware = require('webpack-dev-middleware'); 4 | 5 | // Setup 6 | const app = express(); 7 | const port = process.env['REACT_APP_PORT']; 8 | const config = require('./base.js'); 9 | const compiler = webpack(config); 10 | const middleware = webpackMiddleware(compiler, { 11 | publicPath: config.output.publicPath, 12 | serverSideRender: false, 13 | }); 14 | app.use(middleware); 15 | app.get('/', (req, res) => { 16 | res.sendFile('index.html', { root: __dirname }); 17 | }); 18 | 19 | // Launch app 20 | app.listen(port, () => { 21 | console.log( 22 | 'Launching app... http://localhost:' + port + '\n' 23 | ); 24 | }); 25 | 26 | // Register app and middleware. Required for better 27 | // performance when running from play.js 28 | try { pjs.register(app, middleware); } catch (error) { } -------------------------------------------------------------------------------- /config/dev.js: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const FaviconsWebpackPlugin = require('favicons-webpack-plugin') 3 | const baseWebpackConfig = require('./base'); 4 | const path = require("path"); 5 | 6 | const serverPort = 9000; 7 | 8 | module.exports = merge(baseWebpackConfig(), { 9 | mode: 'development', 10 | entry: { 11 | main: [ 12 | `webpack-dev-server/client?http://localhost:${serverPort}`, 13 | "/src/index.tsx" 14 | ], 15 | }, 16 | devtool: 'cheap-module-source-map', 17 | devServer: { 18 | contentBase: path.join(__dirname, "../dist"), 19 | compress: true, 20 | port: serverPort, 21 | publicPath: "/", 22 | open: true, 23 | hot: true 24 | }, 25 | plugins: [ 26 | new FaviconsWebpackPlugin({ 27 | logo: "./public/favicon.ico" 28 | }) 29 | ] 30 | }) -------------------------------------------------------------------------------- /config/build.js: -------------------------------------------------------------------------------- 1 | const webpack = require('webpack'); 2 | const config = require("./prod") 3 | const { setup } = require("../bin") 4 | 5 | const cmd = { 6 | win32: "%cd%/bin/windows/scapp.exe ./dist/index.html", 7 | darwin: "./bin/macosx/scapp ./dist/index.html", 8 | linux: "./bin/linux ./dist/index.html" 9 | } 10 | 11 | let BUILD = process.argv[2] || "app" 12 | 13 | webpack(config({ BUILD }), 14 | (err, stats) => { 15 | if (err || stats.hasErrors()) { 16 | console.log(err); 17 | 18 | } else if (BUILD !== "web") { 19 | 20 | setup().then(res => { 21 | const os = require('os') 22 | const platform = os.platform() 23 | const exec = require('child_process').exec; 24 | 25 | exec(cmd[platform], (err, stdout) => { 26 | err && console.log(err); 27 | stdout && console.log(stdout); 28 | }) 29 | }).catch(err => console.error(err)) 30 | } 31 | } 32 | ); -------------------------------------------------------------------------------- /loaders/sciter-css-loader.js: -------------------------------------------------------------------------------- 1 | const regRules = require('./reg'); 2 | const _ = require('lodash'); 3 | 4 | module.exports = function (source) { 5 | 6 | if (this.cacheable) { 7 | this.cacheable(); 8 | } 9 | let backUp = source; 10 | 11 | if (regRules.percentRge.test(backUp)) { 12 | backUp = backUp.replace(regRules.percentRge, percent => { 13 | return percent; 14 | }); 15 | } 16 | 17 | _.each(regRules.styleReg, (reg, styleName) => { 18 | if (reg.test(backUp)) { 19 | backUp = backUp.replace(reg, val => { 20 | return val; 21 | }); 22 | } 23 | }); 24 | 25 | _.each(regRules.cssReg, (reg, styleName) => { 26 | if (reg.test(backUp)) { 27 | backUp = backUp.replace(reg, val => { 28 | let svalue = val.replace(styleName, "").replace(":", "").trim(); 29 | let style = svalue.replace(regRules.xReg, "*"); 30 | style = style.replace(regRules.oReg, "%"); 31 | return `${styleName}: ${style}`; 32 | }); 33 | } 34 | }); 35 | 36 | return backUp; 37 | } 38 | -------------------------------------------------------------------------------- /config/prod.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const { merge } = require('webpack-merge'); 3 | const { CleanWebpackPlugin } = require('clean-webpack-plugin'); 4 | const baseWebpackConfig = require('./base'); 5 | const TerserJSPlugin = require('terser-webpack-plugin'); 6 | const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); 7 | 8 | module.exports = env => merge(baseWebpackConfig({ ...env, MODE: "prod" }), { 9 | entry: { 10 | main: "./src/index.tsx", 11 | }, 12 | mode: "production", 13 | optimization: { 14 | minimizer: [new TerserJSPlugin({}), new CssMinimizerPlugin()], 15 | splitChunks: { 16 | cacheGroups: { 17 | styles: { 18 | name: 'styles', 19 | test: /\.css$/, 20 | chunks: 'all', 21 | enforce: true, 22 | }, 23 | } 24 | }, 25 | }, 26 | output: { 27 | path: path.resolve(__dirname, "../dist"), 28 | filename: "[name].js", 29 | publicPath: './', 30 | }, 31 | // devtool: 'cheap-module-source-map', // source-map 32 | plugins: [ 33 | new CleanWebpackPlugin(), 34 | ] 35 | }) -------------------------------------------------------------------------------- /aardio/default.aproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /aardio/dlg/scapp.aardio: -------------------------------------------------------------------------------- 1 | import win.ui; 2 | /*DSG{{*/ 3 | var winform = win.form(text="aardio form";right=759;bottom=469) 4 | winform.add() 5 | /*}}*/ 6 | 7 | import web.sciter; 8 | import web.sciter.debug; 9 | 10 | var wbSciter = web.sciter( winform ); 11 | wbSciter.go("\layout\index.html"); 12 | 13 | wbSciter.external = { 14 | hi = function(str) { 15 | import console 16 | console.log(str); 17 | } 18 | } 19 | 20 | namespace web.sciter.behavior.customEvent { 21 | //自定义behavior 22 | 23 | reload = function(ltOwner){ 24 | } 25 | 26 | testJs = function(ltOwner,...){ 27 | import console 28 | console.log("behavior里的函数 testJs 被调用了"); 29 | console.log("自定义函数接收到的第一个参数总是节点自身") 30 | console.log("然后才是其他参数",...) 31 | 32 | //aardio里调用behavior自定义函数的方法是一样的,提供一模一样的xcall函数 33 | ltOwner.xcall("testJs2",...) 34 | } 35 | 36 | testJs2 = function(ltOwner,...){ 37 | console.log("behavior里的函数 testJs2 被调用了",...) 38 | console.log("自定义函数接收到的第一个参数总是节点自身") 39 | console.log(ltOwner.outerHTML) 40 | } 41 | 42 | } 43 | 44 | if(_STUDIO_INVOKED){ 45 | wbSciter.attachEventHandler( web.sciter.debug ); 46 | } 47 | 48 | 49 | winform.getTime = function(id,event){ 50 | var time = wbSciter.documentElement.querySelector("#clock").innerText 51 | winform.msgbox(time) 52 | } 53 | 54 | winform.callJs = function(id,event){ 55 | var app = wbSciter.call("jsFunction") 56 | winform.msgbox(app) 57 | } 58 | 59 | 60 | winform.show(); 61 | 62 | win.loopMessage(); 63 | return winform; 64 | -------------------------------------------------------------------------------- /loaders/reg.js: -------------------------------------------------------------------------------- 1 | const percentRge = /\b(\d+(\.\d+)?)(?:o+|x+)\b/g; 2 | 3 | const styleReg = { 4 | marginTop: /\bmarginTop(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 5 | marginRight: /\bmarginRight(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 6 | marginBottom: /\bmarginBottom(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 7 | marginLeft: /\bmarginLeft(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 8 | paddingTop: /\bpaddingTop(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 9 | paddingRight: /\bpaddingRight(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 10 | paddingBottom: /\bpaddingBottom(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 11 | paddingLeft: /\bpaddingLeft(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 12 | width: /\bwidth(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 13 | height: /\bheight(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 14 | } 15 | 16 | const cssReg = { 17 | "margin-top": /\bmargin-top(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 18 | "margin-right": /\bmargin-right(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 19 | "margin-bottom": /\bmargin-bottom(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 20 | "margin-left": /\bmargin-left(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 21 | "padding-top": /\bpadding-top(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 22 | "padding-right": /\bpadding-right(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 23 | "padding-bottom": /\bpadding-bottom(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 24 | "padding-left": /\bpadding-left(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 25 | "width": /\bwidth(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 26 | "height": /\bheight(?:\s+)?:(?:\s+)?(\d*(o+|x+))/g, 27 | } 28 | 29 | const xReg = /(x)/g; 30 | const oReg = /(o)/g 31 | 32 | module.exports = { 33 | percentRge, 34 | styleReg, 35 | cssReg, 36 | xReg, 37 | oReg 38 | } -------------------------------------------------------------------------------- /src/component/clock/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from "sciterjs-react"; 2 | 3 | interface IProps { 4 | id: string; 5 | } 6 | 7 | class Clock extends Component { 8 | 9 | timer: NodeJS.Timer; 10 | props: IProps; 11 | 12 | constructor(props: IProps) { 13 | super(props); 14 | this.state = { time: new Date() }; 15 | } 16 | 17 | // Lifecycle: before the component gets mounted to the DOM 18 | componentWillMount() { 19 | 20 | } 21 | 22 | // Lifecycle: after the component gets mounted to the DOM 23 | componentDidMount() { 24 | // update time every second 25 | this.timer = setInterval(() => this.tick(), 1000); 26 | } 27 | 28 | // Lifecycle: before new props get accepted 29 | componentWillReceiveProps(props) { 30 | 31 | } 32 | 33 | shouldComponentUpdate() { 34 | 35 | } 36 | 37 | // Lifecycle: Called just before our component will be update 38 | componentWillUpdate() { 39 | 40 | } 41 | 42 | // Lifecycle: Called just after our component updated 43 | componentDidUpdate() { 44 | 45 | } 46 | 47 | // Lifecycle: prior to removal from the DOM 48 | componentWillUnmount() { 49 | // stop when not renderable 50 | clearInterval(this.timer); 51 | } 52 | 53 | tick() { 54 | this.setState({ 55 | time: new Date() 56 | }); 57 | } 58 | 59 | render() { 60 | 61 | let time = this.state.time.toLocaleTimeString(); 62 | 63 | return ( 64 |
65 |
{time}
66 |
67 | ) 68 | } 69 | } 70 | 71 | export default Clock; -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 19H524 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | inspector 11 | CFBundleIconFile 12 | AppIcon 13 | CFBundleIconName 14 | AppIcon 15 | CFBundleIdentifier 16 | sciter.js.inspector 17 | CFBundleInfoDictionaryVersion 18 | 6.0 19 | CFBundleName 20 | inspector 21 | CFBundlePackageType 22 | APPL 23 | CFBundleShortVersionString 24 | 1.0 25 | CFBundleSupportedPlatforms 26 | 27 | MacOSX 28 | 29 | CFBundleVersion 30 | 1 31 | DTCompiler 32 | com.apple.compilers.llvm.clang.1_0 33 | DTPlatformBuild 34 | 12D4e 35 | DTPlatformName 36 | macosx 37 | DTPlatformVersion 38 | 11.1 39 | DTSDKBuild 40 | 20C63 41 | DTSDKName 42 | macosx11.1 43 | DTXcode 44 | 1240 45 | DTXcodeBuild 46 | 12D4e 47 | LSApplicationCategoryType 48 | public.app-category.developer-tools 49 | LSMinimumSystemVersion 50 | 10.15 51 | NSMainNibFile 52 | MainMenu 53 | NSPrincipalClass 54 | NSApplication 55 | 56 | 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **DEMO**(win7/win8/win10) 2 | 3 | [download demo](https://github.com/veluxa/sciterjs-react/raw/master/aardio/dist/sciterjs.exe) 4 | 5 | --- 6 | use react to write Sciterjs programs that support browser and desktop; 7 | 8 | ![screen](/screen.png) 9 | 10 | --- 11 | **1.Features**: 12 | 13 | | property | support | note | 14 | | :-- | :--: | :-- | 15 | | js、jsx | ✔ | | 16 | | ts、tsx | ✔ | | 17 | | style | ✔ | | 18 | | className | ✔ | The browser supports className, sciter does not support **className** please use **class** | 19 | | class component | ✔ | lifecycle,state | 20 | | function component | ✔ | hook | 21 | | router | ✔ | Please use [preact-router](https://www.npmjs.com/package/preact-router) | 22 | | hot reload | ✔ | Support browser and window desktop ([sciterjs-browser](https://github.com/veluxa/sciterjs-browser))| 23 | 24 | --- 25 | 26 | **2.How to use** 27 | 28 | ***2.1 Install*** 29 | ```shell 30 | cd your_prodjects_directory 31 | git clone https://github.com/veluxa/sciterjs-react.git 32 | cd sciterjs-react 33 | npm install 34 | ``` 35 | 36 | ***2.2 Start:*** 37 | 38 | 1、web 39 | ```sh 40 | npm run dev:www 41 | ``` 42 | 43 | 2、web & scapp 44 | ```sh 45 | npm run dev:scapp 46 | ``` 47 | 48 | ***2.2 Build:*** 49 | 50 | 1、web 51 | ```sh 52 | npm run build:www 53 | ``` 54 | 55 | 2、sciterjs 56 | ```sh 57 | npm run build:scapp 58 | ``` 59 | 60 | 3、aardio 61 | ```sh 62 | npm run build:aardio 63 | ``` 64 | 65 | --- 66 | ***inspector***: 67 | ```sh 68 | npm run inspector 69 | ``` 70 | 71 | --- 72 | 73 | **3.Notice**: 74 | 1. When writing css, use x instead of * and o instead of %. For example: 75 | 76 | | source | webpack | result | 77 | | :-- | :--: | :-- | 78 | | margin-left: x | => | margin-left: * | 79 | | height: 100oo | => | height: 100%% | 80 | 81 | 82 | 2. If the element has a clickable event, append behavior: "**clickable**" to the element. See app.tsx 83 | 84 | 3. ~~buildaardio 编译后请在aardio资源文件上右键选择 "同步本地目录",不然新编译的资源在aardio中运行不会生效~~ 在aardio工程里项目资源管理器中选中 layout 目录,在右侧边属性栏中选择 **本地构建** 85 | 86 | ![screen](/aardio.png) 87 | 88 | 4. Please grant scapp execute permission on macos, otherwise it will not work properly. 89 | 90 | --- -------------------------------------------------------------------------------- /config/dev.scapp.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const webpack = require('webpack'); 3 | const path = require("path") 4 | const exec = require('child_process').execFile; 5 | const { merge } = require('webpack-merge'); 6 | const webpackMiddleware = require('webpack-dev-middleware'); 7 | const webpackSciterjsHotMiddleware = require('sciterjs-hot-middleware') 8 | const os = require('os') 9 | const { setup } = require("../bin") 10 | 11 | const app = express(); 12 | const port = process.env['REACT_APP_PORT'] || 9000; 13 | const config = require('./base.js')({ BUILD: "app" }); 14 | const compiler = webpack(merge(config, { 15 | mode: 'development', 16 | entry: { 17 | main: [ 18 | "sciterjs-hot-middleware/client?timeout=20000&reload=true", 19 | "/src/index.tsx" 20 | ] 21 | }, 22 | })); 23 | const middleware = webpackMiddleware(compiler, { 24 | publicPath: config.output.publicPath, 25 | serverSideRender: false, 26 | }); 27 | app.use(middleware); 28 | 29 | app.use( 30 | webpackSciterjsHotMiddleware(compiler, { 31 | path: 'ws://127.0.0.1:9001/', heartbeat: 10 * 1000 32 | }) 33 | ) 34 | 35 | app.get('/', (req, res) => { 36 | res.header("Access-Control-Allow-Origin", "*"); 37 | res.header("Access-Control-Allow-Headers", "X-Requested-With"); 38 | res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS"); 39 | res.header('Cache-Control', ' no-cache'); 40 | res.sendFile('./public/index.html', { root: __dirname }); 41 | }); 42 | 43 | // Launch app 44 | app.listen(port, () => { 45 | console.log( 46 | 'Launching app... http://localhost:' + port + '\n' 47 | ); 48 | 49 | const platform = os.platform() 50 | if (platform === "win32") { 51 | 52 | setup().then(res => { 53 | // SciterJsBrowser.exe [path] [width] [height] 54 | exec(`${path.resolve(__dirname, "../bin/windows/SciterJsBrowser.exe")}`, ["http://localhost:9000/"], function (err, stdout, stderr) { 55 | if (err) { 56 | console.error(err); 57 | } 58 | }) 59 | }).catch(err => console.error(err)) 60 | 61 | } else { 62 | console.error("!!! The current dev:scapp command only supports win32"); 63 | } 64 | }); -------------------------------------------------------------------------------- /aardio/.build/default.Manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 10 | sciterjs 11 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 52 | 53 | 54 | 55 | 56 | 57 | True/PM 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /aardio/layout/6ce24c58023cc2f8fd88fe9d219db6c6.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sciter-react-template", 3 | "version": "1.0.0", 4 | "description": "sciter-react", 5 | "git repository": "https://github.com/veluxa/sciterjs-react", 6 | "main": "index.js", 7 | "scripts": { 8 | "dev:www": "webpack-dev-server --config ./config/dev.js --hot --inline", 9 | "dev:scapp": "node ./config/dev.scapp.js", 10 | "dev:ipad": "node ./config/ipad.js", 11 | "build:www": "node ./config/build.js web", 12 | "build:scapp": "node ./config/build.js app", 13 | "build:aardio": "webpack --env.BUILD=app --config ./config/aardio.js", 14 | "scapp": "node ./config/scapp.js", 15 | "inspector": "node ./config/inspector.js" 16 | }, 17 | "keywords": [ 18 | "sciterjs" 19 | ], 20 | "author": "veluxa", 21 | "license": "ISC", 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app" 25 | ] 26 | }, 27 | "browserslist": { 28 | "production": [ 29 | ">0.2%", 30 | "not dead", 31 | "not op_mini all" 32 | ], 33 | "development": [ 34 | "last 1 chrome version", 35 | "last 1 firefox version", 36 | "last 1 safari version" 37 | ] 38 | }, 39 | "devDependencies": { 40 | "@babel/core": "^7.13.13", 41 | "@babel/plugin-proposal-class-properties": "^7.13.0", 42 | "@babel/plugin-proposal-decorators": "^7.13.5", 43 | "@babel/plugin-syntax-jsx": "^7.12.13", 44 | "@babel/plugin-transform-runtime": "^7.13.10", 45 | "@babel/preset-env": "^7.13.12", 46 | "@babel/preset-react": "^7.13.13", 47 | "@babel/preset-typescript": "^7.15.0", 48 | "babel-loader": "^8.2.2", 49 | "babel-plugin-import": "^1.13.3", 50 | "clean-webpack-plugin": "^3.0.0", 51 | "css-loader": "^5.2.0", 52 | "css-minimizer-webpack-plugin": "^1.3.0", 53 | "express": "^4.17.1", 54 | "extract-text-webpack-plugin": "^3.0.2", 55 | "favicons": "^6.2.1", 56 | "favicons-webpack-plugin": "^5.0.2", 57 | "file-loader": "^6.2.0", 58 | "html-webpack-plugin": "^5.3.1", 59 | "less": "^4.1.1", 60 | "less-loader": "^8.0.0", 61 | "lodash": "^4.17.21", 62 | "mini-css-extract-plugin": "^1.4.0", 63 | "mkdirp": "^1.0.4", 64 | "node-sass": "^5.0.0", 65 | "postcss-loader": "^5.2.0", 66 | "sass-loader": "^11.0.1", 67 | "sciterjs-hot-middleware": "^1.0.0", 68 | "style-loader": "^2.0.0", 69 | "terser-webpack-plugin": "^5.1.1", 70 | "url-loader": "^4.1.1", 71 | "webpack": "^5.28.0", 72 | "webpack-cli": "^3.3.12", 73 | "webpack-dev-middleware": "^4.1.0", 74 | "webpack-dev-server": "^3.11.2", 75 | "webpack-hot-middleware": "^2.25.0", 76 | "webpack-merge": "^5.7.3", 77 | "ws": "^7.4.4" 78 | }, 79 | "dependencies": { 80 | "preact-router": "^3.2.1", 81 | "sciterjs-react": "^1.0.3" 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /bin/index.js: -------------------------------------------------------------------------------- 1 | const os = require('os') 2 | const fs = require('fs'); 3 | const path = require('path') 4 | const mkdirp = require('mkdirp'); 5 | const request = require('request') 6 | 7 | const platform = os.platform() 8 | 9 | const baseUri = "https://github.com/c-smile/sciter-js-sdk/raw/main/bin/" 10 | 11 | const dir = { 12 | win32: "windows/x32/", 13 | darwin: "macosx/", 14 | linux: "linux/x64/" 15 | } 16 | 17 | const bin = { 18 | win32: ["scapp.exe", "inspector.exe", "sciter.dll"], 19 | darwin: ["scapp", "libsciter.dylib", "sciter-osx-64.dylib", "packfolder", "qjs", "qjsc"], 20 | linux: ["scapp", "libsciter-gtk.so", "inspector"] 21 | } 22 | 23 | 24 | const downDir = path.resolve(__dirname, getOSDir(dir[platform])) 25 | 26 | async function verifyFile(file) { 27 | return new Promise(function (resolve, reject) { 28 | fs.stat(path.join(downDir, file), function (err, stat) { 29 | if (stat && stat.size) { 30 | resolve(file) 31 | } else { 32 | resolve(null); 33 | } 34 | }) 35 | }) 36 | } 37 | 38 | async function getBinFiles() { 39 | const files = fs.readdirSync(downDir) 40 | return Promise.all(files.map(async function (file) { 41 | return await verifyFile(file) 42 | })) 43 | } 44 | 45 | function getOSDir(str) { 46 | return str.substring(0, str.indexOf('/')) 47 | } 48 | 49 | function writer(file) { 50 | file = path.normalize(file); 51 | mkdirp.sync(path.dirname(file)); 52 | return fs.createWriteStream(file); 53 | } 54 | 55 | function download(url, path, file) { 56 | console.log(`downloading ${file}`); 57 | return new Promise((res, rej) => { 58 | const write = writer(path).on('finish', function (_) { 59 | console.log(`${file} finished`) 60 | return res(file) 61 | }).on('error', function (err) { rej(err) }) 62 | 63 | request({ url }).pipe(write) 64 | }) 65 | } 66 | 67 | async function setup() { 68 | 69 | let times = 0 70 | function notice() { 71 | times += 1; 72 | console.info(`Download the sciter bootloader file to the bin directory, if the download is not responding for a long time, please abort and manually move the file to the bin corresponding desktop system directory after downloading. 73 | 74 | url: ${baseUri}${dir[platform]} 75 | `); 76 | } 77 | 78 | const binList = await getBinFiles() 79 | 80 | let task = bin[platform].map(function (b) { 81 | if (!binList.includes(b)) { 82 | !times && notice() 83 | let url = `${baseUri}${dir[platform]}${b}` 84 | let path = `${downDir}\\${b}` 85 | return download(url, path, b) 86 | } 87 | return true 88 | }) 89 | 90 | return Promise.all(task) 91 | } 92 | 93 | module.exports = { 94 | setup 95 | } -------------------------------------------------------------------------------- /src/pages/home/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "sciterjs-react"; 2 | import reactLogo from '../../logo.svg'; 3 | import sciterLogo from "../../logo.png"; 4 | import Clock from "../../component/clock"; 5 | 6 | const Home = () => { 7 | let [count, SetCount] = useState(0) 8 | 9 | return ( 10 |
11 |
12 | 13 | 14 |
15 | 16 |
17 | Hook: 18 | {count} 19 |
20 |
21 | 25 | 29 |
30 |

31 | Edit src/App.jsx and save to reload browser. 32 |

33 | 71 |
72 | ) 73 | } 74 | 75 | export default Home; -------------------------------------------------------------------------------- /bin/macosx/inspector.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/AppIcon.icns 8 | 9 | 96Et7PNh+E+ZZACT1WEXIvb/WRs= 10 | 11 | Resources/Assets.car 12 | 13 | 8OEQWvgTbnDhfc1T9wZmxr18LVs= 14 | 15 | Resources/Base.lproj/MainMenu.nib 16 | 17 | +GoD4msJC10xKnmM/+BKUrzJ1lY= 18 | 19 | 20 | files2 21 | 22 | Resources/AppIcon.icns 23 | 24 | hash2 25 | 26 | PqGhEVUqMKF0wYscUmD1beiEU0MreFtqdl+pJTM+MzA= 27 | 28 | 29 | Resources/Assets.car 30 | 31 | hash2 32 | 33 | WuDXiCIc0BC3/SYEcUfRomJodnWUM6jqzwH7Uq/kH/I= 34 | 35 | 36 | Resources/Base.lproj/MainMenu.nib 37 | 38 | hash2 39 | 40 | jiPM/pxo1AMXooTvAWLMm+L6onwbAvIdZorGDYlXZLQ= 41 | 42 | 43 | 44 | rules 45 | 46 | ^Resources/ 47 | 48 | ^Resources/.*\.lproj/ 49 | 50 | optional 51 | 52 | weight 53 | 1000 54 | 55 | ^Resources/.*\.lproj/locversion.plist$ 56 | 57 | omit 58 | 59 | weight 60 | 1100 61 | 62 | ^Resources/Base\.lproj/ 63 | 64 | weight 65 | 1010 66 | 67 | ^version.plist$ 68 | 69 | 70 | rules2 71 | 72 | .*\.dSYM($|/) 73 | 74 | weight 75 | 11 76 | 77 | ^(.*/)?\.DS_Store$ 78 | 79 | omit 80 | 81 | weight 82 | 2000 83 | 84 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 85 | 86 | nested 87 | 88 | weight 89 | 10 90 | 91 | ^.* 92 | 93 | ^Info\.plist$ 94 | 95 | omit 96 | 97 | weight 98 | 20 99 | 100 | ^PkgInfo$ 101 | 102 | omit 103 | 104 | weight 105 | 20 106 | 107 | ^Resources/ 108 | 109 | weight 110 | 20 111 | 112 | ^Resources/.*\.lproj/ 113 | 114 | optional 115 | 116 | weight 117 | 1000 118 | 119 | ^Resources/.*\.lproj/locversion.plist$ 120 | 121 | omit 122 | 123 | weight 124 | 1100 125 | 126 | ^Resources/Base\.lproj/ 127 | 128 | weight 129 | 1010 130 | 131 | ^[^/]+$ 132 | 133 | nested 134 | 135 | weight 136 | 10 137 | 138 | ^embedded\.provisionprofile$ 139 | 140 | weight 141 | 20 142 | 143 | ^version\.plist$ 144 | 145 | weight 146 | 20 147 | 148 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /config/base.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require("path"); 4 | const webpack = require('webpack'); 5 | const MiniCssExtractPlugin = require('mini-css-extract-plugin'); 6 | const ExtractTextPlugin = require("extract-text-webpack-plugin"); 7 | const HtmlWebpackPlugin = require("html-webpack-plugin"); 8 | 9 | module.exports = env => { 10 | 11 | const OS = env || { BUILD: "web", MODE: "" } 12 | const htmlPath = (html) => path.resolve(__dirname, "../public/", html) 13 | 14 | return { 15 | module: { 16 | rules: [ 17 | { 18 | test: /\.(js|mjs|jsx)$/, 19 | exclude: /node_modules/, 20 | use: [{ 21 | loader: 'babel-loader', 22 | options: { 23 | presets: [ 24 | "@babel/preset-react" 25 | ] 26 | } 27 | }] 28 | }, 29 | { 30 | test: /\.(ts|tsx)$/, 31 | exclude: /node_modules/, 32 | use: [{ 33 | loader: 'babel-loader', 34 | options: { 35 | presets: [ 36 | "@babel/preset-react", 37 | "@babel/preset-typescript" 38 | ] 39 | } 40 | }] 41 | }, 42 | { 43 | test: /\.(png|jpg|jpeg|gif|woff|woff2)$/, 44 | use: "url-loader" 45 | }, 46 | { 47 | test: /(\.css|\.less)$/, 48 | exclude: /node_modules/, 49 | use: ExtractTextPlugin.extract({ 50 | fallback: { 51 | loader: 'style-loader', 52 | options: { 53 | singleton: true 54 | } 55 | }, 56 | use: [ 57 | MiniCssExtractPlugin.loader, 58 | "css-loader", "sciter-css-loader", "postcss-loader" 59 | ] 60 | }) 61 | }, 62 | { 63 | test: /(\.css|\.less)$/, 64 | exclude: /src/, 65 | use: [ 66 | 'style-loader', "css-loader", 67 | { 68 | loader: 'less-loader', 69 | options: { 70 | lessOptions: { 71 | javascriptEnabled: true 72 | } 73 | } 74 | }, 75 | // MiniCssExtractPlugin.loader 76 | ] 77 | }, 78 | { 79 | test: /\.scss$/, 80 | use: [ 81 | MiniCssExtractPlugin.loader, 82 | 'css-loader', 'sciter-css-loader', 'sass-loader'] 83 | }, 84 | { 85 | test: /\.(wav|mp3|eot|ttf|svg)$/, 86 | loader: 'file-loader', 87 | }, 88 | ] 89 | }, 90 | resolve: { 91 | modules: [path.resolve(__dirname, '../src'), 'node_modules'], 92 | extensions: [".jsx", ".tsx", ".ts", ".js"], 93 | alias: { 94 | 'react': "sciterjs-react", 95 | 'react-dom': "sciterjs-react", 96 | 'preact': "sciterjs-react/lib/preact", 97 | } 98 | }, 99 | resolveLoader: { 100 | modules: [path.join(__dirname, '../loaders'), 'node_modules'] 101 | }, 102 | output: { 103 | path: path.resolve(__dirname, "../dist"), 104 | filename: "[name].js", 105 | publicPath: OS.BUILD === "app" ? '/' : '', 106 | }, 107 | plugins: [ 108 | new webpack.HotModuleReplacementPlugin(), 109 | new HtmlWebpackPlugin({ 110 | title: 'sciterjs-react', 111 | filename: "index.html", 112 | template: OS.BUILD === "app" ? htmlPath(OS.MODE === "prod" ? "sciter.html" : "dev.sciter.html") : htmlPath("index.html"), 113 | favicon: "./public/favicon.ico", 114 | showErrors: true, 115 | inject: true, 116 | minify: { 117 | removeComments: true, 118 | collapseWhitespace: true, 119 | removeAttributeQuotes: false 120 | // more options: 121 | // https://github.com/kangax/html-minifier#options-quick-reference 122 | }, 123 | chunks: ["main"] 124 | }), 125 | new MiniCssExtractPlugin({ 126 | filename: '[name]-[contenthash].css' 127 | }), 128 | ] 129 | } 130 | }; -------------------------------------------------------------------------------- /aardio/layout/index.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /public/dev.sciter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 13 | 167 | 168 | 169 | 170 |
171 | 172 | 173 | -------------------------------------------------------------------------------- /aardio/layout/bundle.js: -------------------------------------------------------------------------------- 1 | !function(){"use strict";var e,n,t,r,o,i,c,u={145:function(e,n,t){t.d(n,{Z:function(){return W}});var r=t(991),o=t(109),i={};function c(e,n){for(var t in n)e[t]=n[t];return e}function u(e,n,t){var r,o=/(?:\?([^#]*))?(#.*)?$/,c=e.match(o),u={};if(c&&c[1])for(var l=c[1].split("&"),a=0;an.rank?-1:e.index-n.index}function a(e,n){return e.index=n,e.rank=function(e){return e.props.default?0:f(e.props.path).map(s).join("")}(e),e.props}function f(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function s(e){return":"==e.charAt(0)?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}var p=null,d=[],_=[],h={};function v(){var e;return""+((e=p&&p.location?p.location:p&&p.getCurrentLocation?p.getCurrentLocation():"undefined"!=typeof location?location:h).pathname||"")+(e.search||"")}function m(e,n){return void 0===n&&(n=!1),"string"!=typeof e&&e.url&&(n=e.replace,e=e.url),function(e){for(var n=d.length;n--;)if(d[n].canRoute(e))return!0;return!1}(e)&&function(e,n){void 0===n&&(n="push"),p&&p[n]?p[n](e):"undefined"!=typeof history&&history[n+"State"]&&history[n+"State"](null,null,e)}(e,n?"replace":"push"),y(e)}function y(e){for(var n=!1,t=0;t0},n.prototype.routeTo=function(e){this.setState({url:e});var n=this.canRoute(e);return this.updating||this.forceUpdate(),n},n.prototype.componentWillMount=function(){d.push(this),this.updating=!0},n.prototype.componentDidMount=function(){var e=this;p&&(this.unlisten=p.listen((function(n){e.routeTo(""+(n.pathname||"")+(n.search||""))}))),this.updating=!1},n.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),d.splice(d.indexOf(this),1)},n.prototype.componentWillUpdate=function(){this.updating=!0},n.prototype.componentDidUpdate=function(){this.updating=!1},n.prototype.getMatchingChildren=function(e,n,t){return e.filter(a).sort(l).map((function(e){var r=u(n,e.props.path,e.props);if(r){if(!1!==t){var i={url:n,matches:r};return c(i,r),delete i.ref,delete i.key,(0,o.Tm)(e,i)}return e}})).filter(Boolean)},n.prototype.render=function(e,n){var t=e.children,r=e.onChange,i=n.url,c=this.getMatchingChildren((0,o.bR)(t),i,!0),u=c[0]||null,l=this.previousUrl;return i!==l&&(this.previousUrl=i,"function"==typeof r&&r({router:this,url:i,previous:l,active:c,current:u})),u},n}(o.wA);function P(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?n-1:0),r=1;r-1){e.visited=!0;var t=e.cloneNode();t.isLoaded=!1,t.addEventListener("load",(function(){t.isLoaded||(t.isLoaded=!0,e.parentNode.removeChild(e))})),t.addEventListener("error",(function(){t.isLoaded||(t.isLoaded=!0,e.parentNode.removeChild(e))})),t.href="".concat(n,"?").concat(Date.now()),e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t)}}function a(){var e=document.querySelectorAll("link");c.call(e,(function(e){!0!==e.visited&&l(e)}))}function f(e){return!!/^https?:/i.test(e)}e.exports=function(e,n){if(i)return console.log("no window.document found, will not HMR CSS"),u;var t,s,p=function(e){var n=o[e];if(!n){if(document.currentScript)n=document.currentScript.src;else{var t=document.getElementsByTagName("script"),i=t[t.length-1];i&&(n=i.src)}o[e]=n}return function(e){if(!n)return null;var t=n.split(/([^\\/]+)\.js$/),o=t&&t[1];return o&&e?e.split(",").map((function(e){var t=new RegExp("".concat(o,"\\.js$"),"g");return r(n.replace(t,"".concat(e.replace(/{fileName}/g,o),".css")))})):[n.replace(".js",".css")]}}(e);return t=function(){var e=p(n.filename),t=function(e){if(!e)return!1;var n=document.querySelectorAll("link"),t=!1;return c.call(n,(function(n){if(n.href){var o=function(e,n){var t;return e=r(e,{stripWWW:!1}),n.some((function(r){e.indexOf(n)>-1&&(t=r)})),t}(n.href,e);f(o)&&!0!==n.visited&&o&&(l(n,o),t=!0)}})),t}(e);if(n.locals)return console.log("[HMR] Detected local css modules. Reload all css"),void a();t?console.log("[HMR] css reload %s",e.join(" ")):(console.log("[HMR] Reload all css"),a())},50,s=0,function(){var e=this,n=arguments,r=function(){return t.apply(e,n)};clearTimeout(s),s=setTimeout(r,50)}}},618:function(e){e.exports=function(e){if(e=e.trim(),/^data:/i.test(e))return e;var n=-1!==e.indexOf("//")?e.split("//")[0]+"//":"",t=e.replace(new RegExp(n,"i"),"").split("/"),r=t[0].toLowerCase().replace(/\.$/,"");return t[0]="",n+r+t.reduce((function(e,n){switch(n){case"..":e.pop();break;case".":break;default:e.push(n)}return e}),[]).join("/")}},548:function(e,n,t){var r=t(783)(e.id,{locals:!1});e.hot.dispose(r),e.hot.accept(void 0,r)},742:function(e,n,t){var r=t(783)(e.id,{locals:!1});e.hot.dispose(r),e.hot.accept(void 0,r)},991:function(e,n,t){t.d(n,{wA:function(){return c.wA},ZP:function(){return $},d4:function(){return m},eJ:function(){return h}});var r,o,i,c=t(109),u=0,l=[],a=c.YM.__b,f=c.YM.__r,s=c.YM.diffed,p=c.YM.__c,d=c.YM.unmount;function _(e,n){c.YM.__h&&c.YM.__h(o,e,u||n),u=0;var t=o.__H||(o.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({}),t.__[e]}function h(e){return u=1,v(P,e)}function v(e,n,t){var i=_(r++,2);return i.t=e,i.__c||(i.__=[t?t(n):P(void 0,n),function(e){var n=i.t(i.__[0],e);i.__[0]!==n&&(i.__=[n,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function m(e,n){var t=_(r++,3);!c.YM.__s&&w(t.__H,n)&&(t.__=e,t.__H=n,o.__H.__h.push(t))}function y(e,n){var t=_(r++,4);!c.YM.__s&&w(t.__H,n)&&(t.__=e,t.__H=n,o.__h.push(t))}function b(e,n){var t=_(r++,7);return w(t.__H,n)&&(t.__=e(),t.__H=n,t.__h=e),t.__}function g(){l.forEach((function(e){if(e.__P)try{e.__H.__h.forEach(k),e.__H.__h.forEach(E),e.__H.__h=[]}catch(n){e.__H.__h=[],c.YM.__e(n,e.__v)}})),l=[]}c.YM.__b=function(e){o=null,a&&a(e)},c.YM.__r=function(e){f&&f(e),r=0;var n=(o=e.__c).__H;n&&(n.__h.forEach(k),n.__h.forEach(E),n.__h=[])},c.YM.diffed=function(e){s&&s(e);var n=e.__c;n&&n.__H&&n.__H.__h.length&&(1!==l.push(n)&&i===c.YM.requestAnimationFrame||((i=c.YM.requestAnimationFrame)||function(e){var n,t=function(){clearTimeout(r),A&&cancelAnimationFrame(n),setTimeout(e)},r=setTimeout(t,100);A&&(n=requestAnimationFrame(t))})(g)),o=void 0},c.YM.__c=function(e,n){n.some((function(e){try{e.__h.forEach(k),e.__h=e.__h.filter((function(e){return!e.__||E(e)}))}catch(t){n.some((function(e){e.__h&&(e.__h=[])})),n=[],c.YM.__e(t,e.__v)}})),p&&p(e,n)},c.YM.unmount=function(e){d&&d(e);var n=e.__c;if(n&&n.__H)try{n.__H.__.forEach(k)}catch(e){c.YM.__e(e,n.__v)}};var A="function"==typeof requestAnimationFrame;function k(e){var n=o;"function"==typeof e.__c&&e.__c(),o=n}function E(e){var n=o;e.__c=e.__(),o=n}function w(e,n){return!e||e.length!==n.length||n.some((function(n,t){return n!==e[t]}))}function P(e,n){return"function"==typeof n?n(e):n}function C(e,n){for(var t in n)e[t]=n[t];return e}function M(e,n){for(var t in e)if("__source"!==t&&!(t in n))return!0;for(var r in n)if("__source"!==r&&e[r]!==n[r])return!0;return!1}function D(e){this.props=e}(D.prototype=new c.wA).isPureReactComponent=!0,D.prototype.shouldComponentUpdate=function(e,n){return M(this.props,e)||M(this.state,n)};var O=c.YM.__b;c.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),O&&O(e)};var S="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911,j=function(e,n){return null==e?null:(0,c.bR)((0,c.bR)(e).map(n))},x={map:j,forEach:j,count:function(e){return e?(0,c.bR)(e).length:0},only:function(e){var n=(0,c.bR)(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:c.bR},R=c.YM.__e;function I(){this.__u=0,this.t=null,this.__b=null}function Y(e){var n=e.__.__c;return n&&n.__e&&n.__e(e)}function U(){this.u=null,this.o=null}c.YM.__e=function(e,n,t){if(e.then)for(var r,o=n;o=o.__;)if((r=o.__c)&&r.__c)return null==n.__e&&(n.__e=t.__e,n.__k=t.__k),r.__c(e,n);R(e,n,t)},(I.prototype=new c.wA).__c=function(e,n){var t=n.__c,r=this;null==r.t&&(r.t=[]),r.t.push(t);var o=Y(r.__v),i=!1,c=function(){i||(i=!0,t.componentWillUnmount=t.__c,o?o(u):u())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){c(),t.__c&&t.__c()};var u=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(n,t,r){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)})),n.__c&&n.__c.__P===t&&(n.__e&&r.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=r)),n}(e,e.__c.__P,e.__c.__O)}var n;for(r.setState({__e:r.__b=null});n=r.t.pop();)n.forceUpdate()}},l=!0===n.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(c,c)},I.prototype.componentWillUnmount=function(){this.t=[]},I.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(n,t,r){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),n.__c.__H=null),null!=(n=C({},n)).__c&&(n.__c.__P===r&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map((function(n){return e(n,t,r)}))),n}(this.__b,t,r.__O=r.__P)}this.__b=null}var o=n.__e&&(0,c.az)(c.HY,null,e.fallback);return o&&(o.__h=null),[(0,c.az)(c.HY,null,n.__e?null:e.children),o]};var Z=function(e,n,t){if(++t[1]===t[0]&&e.o.delete(n),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]>>1,1),n.i.removeChild(e)}}),(0,c.sY)((0,c.az)(z,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}(U.prototype=new c.wA).__e=function(e){var n=this,t=Y(n.__v),r=n.o.get(e);return r[0]++,function(o){var i=function(){n.props.revealOrder?(r.push(o),Z(n,e,r)):o()};t?t(i):i()}},U.prototype.render=function(e){this.u=null,this.o=new Map;var n=(0,c.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var t=n.length;t--;)this.o.set(n[t],this.u=[1,0,this.u]);return e.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(n,t){Z(e,t,n)}))};var L="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,X=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,H=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};c.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(c.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(n){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:n})}})}));var N=c.YM.event;function W(){}function F(){return this.cancelBubble}function B(){return this.defaultPrevented}c.YM.event=function(e){return N&&(e=N(e)),e.persist=W,e.isPropagationStopped=F,e.isDefaultPrevented=B,e.nativeEvent=e};var q,V={configurable:!0,get:function(){return this.class}},J=c.YM.vnode;c.YM.vnode=function(e){var n=e.type,t=e.props,r=t;if("string"==typeof n){for(var o in r={},t){var i=t[o];"value"===o&&"defaultValue"in t&&null==i||("defaultValue"===o&&"value"in t&&null==t.value?o="value":"download"===o&&!0===i?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+n)&&!H(t.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():X.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===i&&(i=void 0),r[o]=i)}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,c.bR)(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,c.bR)(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r}n&&t.class!=t.className&&(V.enumerable="className"in t,null!=t.className&&(r.class=t.className),Object.defineProperty(r,"className",V)),e.$$typeof=L,J&&J(e)};var Q=c.YM.__r;c.YM.__r=function(e){Q&&Q(e),q=e.__c};var K={ReactCurrentDispatcher:{current:{readContext:function(e){return q.__n[e.__c].props.value}}}};function G(e){return!!e&&e.$$typeof===L}"object"==typeof performance&&"function"==typeof performance.now&&performance.now.bind(performance),c.HY;var $={useState:h,useReducer:v,useEffect:m,useLayoutEffect:y,useRef:function(e){return u=5,b((function(){return{current:e}}),[])},useImperativeHandle:function(e,n,t){u=6,y((function(){"function"==typeof e?e(n()):e&&(e.current=n())}),null==t?t:t.concat(e))},useMemo:b,useCallback:function(e,n){return u=8,b((function(){return e}),n)},useContext:function(e){var n=o.context[e.__c],t=_(r++,9);return t.__c=e,n?(null==t.__&&(t.__=!0,n.sub(o)),n.props.value):e.__},useDebugValue:function(e,n){c.YM.useDebugValue&&c.YM.useDebugValue(n?n(e):e)},version:"16.8.0",Children:x,render:function(e,n,t){return null==n.__k&&(n.textContent=""),(0,c.sY)(e,n),"function"==typeof t&&t(),e?e.__c:null},hydrate:function(e,n,t){return(0,c.ZB)(e,n),"function"==typeof t&&t(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&((0,c.sY)(null,e),!0)},createPortal:function(e,n){return(0,c.az)(T,{__v:e,i:n})},createElement:c.az,createContext:c.kr,createFactory:function(e){return c.az.bind(null,e)},cloneElement:function(e){return G(e)?c.Tm.apply(null,arguments):e},createRef:c.Vf,Fragment:c.HY,isValidElement:G,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:c.wA,PureComponent:D,memo:function(e,n){function t(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:M(this.props,e)}function r(n){return this.shouldComponentUpdate=t,(0,c.az)(e,n)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function n(n,t){var r=C({},n);return delete r.ref,e(r,(t=n.ref||t)&&("object"!=typeof t||"current"in t)?t:null)}return n.$$typeof=S,n.render=n,n.prototype.isReactComponent=n.__f=!0,n.displayName="ForwardRef("+(e.displayName||e.name)+")",n},unstable_batchedUpdates:function(e,n){return e(n)},StrictMode:c.HY,Suspense:I,SuspenseList:U,lazy:function(e){var n,t,r;function o(o){if(n||(n=e()).then((function(e){t=e.default||e}),(function(e){r=e})),r)throw r;if(!t)throw n;return(0,c.az)(t,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:K}},109:function(e,n,t){t.d(n,{sY:function(){return U},ZB:function(){return Z},az:function(){return d},HY:function(){return v},Vf:function(){return h},wA:function(){return m},Tm:function(){return z},kr:function(){return T},bR:function(){return w},YM:function(){return r}});var r,o,i,c,u,l={},a=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(e,n){for(var t in n)e[t]=n[t];return e}function p(e){var n=e.parentNode;n&&n.removeChild(e)}function d(e,n,t){var r,o,i,c=arguments,u={};for(i in n)"key"==i?r=n[i]:"ref"==i?o=n[i]:u[i]=n[i];if(arguments.length>3)for(t=[t],i=3;i0?_(m.type,m.props,m.key,null,m.__v):m)){if(m.__=t,m.__b=t.__b+1,null===(h=k[p])||h&&m.key==h.key&&m.type===h.type)k[p]=void 0;else for(d=0;d3)for(t=[t],i=3;i0)return f("abort").then((function(){throw o[0]}));var i=f("dispose");n.forEach((function(e){e.dispose&&e.dispose()}));var c,u=f("apply"),l=function(e){c||(c=e)},a=[];return n.forEach((function(e){if(e.apply){var n=e.apply(l);if(n)for(var t=0;t=0&&y._disposeHandlers.splice(n,1)},invalidate:function(){switch(this._selfInvalidated=!0,l){case"idle":t=[],Object.keys(a.hmrI).forEach((function(e){a.hmrI[e](h,t)})),f("ready");break;case"ready":Object.keys(a.hmrI).forEach((function(e){a.hmrI[e](h,t)}));break;case"prepare":case"check":case"dispose":case"apply":(r=r||[]).push(h)}},check:p,apply:d,status:function(e){if(!e)return l;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var n=u.indexOf(e);n>=0&&u.splice(n,1)},data:o[h]},e=void 0,y),b.parents=c,b.children=[],c=[],_.require=g})),a.hmrC={},a.hmrI={}}(),a.p="",t=function(e,n,t,r){var o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(i){if(o.onerror=o.onload=null,"load"===i.type)t();else{var c=i&&("load"===i.type?"missing":i.type),u=i&&i.target&&i.target.href||n,l=new Error("Loading CSS chunk "+e+" failed.\n("+u+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=c,l.request=u,o.parentNode.removeChild(o),r(l)}},o.href=n,document.head.appendChild(o),o},r=function(e,n){for(var t=document.getElementsByTagName("link"),r=0;r0;){var o=r.pop(),i=o.id,c=o.chain,l=a.c[i];if(l&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:c,moduleId:i};if(l.hot._main)return{type:"unaccepted",chain:c,moduleId:i};for(var f=0;f ")),_.type){case"self-declined":i.onDeclined&&i.onDeclined(_),i.ignoreDeclined||(v=new Error("Aborted because of self decline: "+_.moduleId+b));break;case"declined":i.onDeclined&&i.onDeclined(_),i.ignoreDeclined||(v=new Error("Aborted because of declined dependency: "+_.moduleId+" in "+_.parentId+b));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(_),i.ignoreUnaccepted||(v=new Error("Aborted because "+d+" is not accepted"+b));break;case"accepted":i.onAccepted&&i.onAccepted(_),m=!0;break;case"disposed":i.onDisposed&&i.onDisposed(_),y=!0;break;default:throw new Error("Unexception type "+_.type)}if(v)return{error:v};if(m)for(d in s[d]=h,u(f,_.outdatedModules),_.outdatedDependencies)a.o(_.outdatedDependencies,d)&&(l[d]||(l[d]=[]),u(l[d],_.outdatedDependencies[d]));y&&(u(f,[_.moduleId]),s[d]=p)}n=void 0;for(var g,A=[],k=0;k0;){var i=r.pop(),c=a.c[i];if(c){var u={},s=c.hot._disposeHandlers;for(k=0;k=0&&p.parents.splice(e,1)}}}for(var d in l)if(a.o(l,d)&&(c=a.c[d]))for(g=l[d],k=0;k=0&&c.children.splice(e,1)},apply:function(e){for(var n in s)a.o(s,n)&&(a.m[n]=s[n]);for(var t=0;t