{"version":3,"sources":["jsdelivr-header.js","/npm/@axeridev/flux-ui@0.6.8/src/fluxUi/FluxUi.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,UAAW,uBACX,oBAAqB,+BAEnB,aAAc,qBAAwB,oBACxC,aAAc,uBACd,yBAA0B,kCAWjC,MAAM,MAAQ,IAAI,aACT,OAET,MAAM,GAAK,IAAI,gBACN,IAET,MAAM,eAAiB,IAAI,4BAClB,+BAEK,MAAO,OACb,gBACA,OAEP,WAAA,CAAmB,GAClB,KAAK,OAAS,MAAM,YAA2B,CAC9C,OAAQ,CACP,OAAQ,KAEP,GAEH,KAAK,gBAAkB,IAAI,gBAC3B,KAAK,gBAAgB,cAAc,MAAM,MAAK,KAC7C,QAAQ,IAAI,4BAA4B,GAE1C,CAEO,kBAAA,GACN,MAAM,EAAS,aAAa,CAC3B,OAAQ,KAAK,OAAO,QAAQ,OAC5B,QAAS,qBAGV,KAAK,gBAAgB,IAAK,IAAI,EAC/B,CAEO,aAAO,CAAO,EAAyB,IAC7C,OAAO,IAAI,OAAO,EACnB,CAEO,WAAA,GACN,OAAO,KAAK,eACb,CAEO,GAAA,GACN,KAAK,qBACL,KAAK,gBAAgB,KAAK,MAAM,OACjC,SAGQ","file":"/npm/@axeridev/flux-ui@0.6.8/src/fluxUi/FluxUi.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@axeridev/flux-ui@0.6.8/src/fluxUi/FluxUi.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import Utils from \"./utils/Utils\";\r\nimport InstanceHandler from \"./vue/InstanceHandler\";\r\nimport { Component } from \"@vue/runtime-core\";\r\nimport { createRouter, createWebHistory } from \"vue-router\";\r\nimport UiEngine from \"./ui/UiEngine\";\r\nimport ElectronClientHelper from \"./electron/ElectronClientHelper\";\r\n\r\nexport interface FluxUiOptions {\r\n\trouter?: {\r\n\t\troutes: {\r\n\t\t\tpath: string,\r\n\t\t\tcomponent: Component\r\n\t\t}[];\r\n\t}\r\n}\r\n\r\nconst utils = new Utils();\r\nexport { utils };\r\n\r\nconst ui = new UiEngine();\r\nexport { ui };\r\n\r\nconst electronClient = new ElectronClientHelper();\r\nexport { electronClient };\r\n\r\nexport default class FluxUi {\r\n\tpublic instanceHandler: InstanceHandler;\r\n\tpublic config: FluxUiOptions;\r\n\r\n\tpublic constructor(options: FluxUiOptions) {\r\n\t\tthis.config = utils.parseConfig<FluxUiOptions>({\r\n\t\t\trouter: {\r\n\t\t\t\troutes: []\r\n\t\t\t}\r\n\t\t}, options);\r\n\r\n\t\tthis.instanceHandler = new InstanceHandler();\r\n\t\tthis.instanceHandler.setupFluxSide(this).then(() => {\r\n\t\t\tconsole.log(\"Instance is ready for use\");\r\n\t\t});\r\n\t}\r\n\r\n\tpublic attachRouterPlugin() {\r\n\t\tconst router = createRouter({\r\n\t\t\troutes: this.config.router?.routes!,\r\n\t\t\thistory: createWebHistory()\r\n\t\t});\r\n\r\n\t\tthis.instanceHandler.app!.use(router);\r\n\t}\r\n\r\n\tpublic static create(options: FluxUiOptions = {}): FluxUi {\r\n\t\treturn new FluxUi(options);\r\n\t}\r\n\r\n\tpublic getInstance(): InstanceHandler {\r\n\t\treturn this.instanceHandler;\r\n\t}\r\n\r\n\tpublic run() {\r\n\t\tthis.attachRouterPlugin();\r\n\t\tthis.instanceHandler.app?.mount(\"#app\");\r\n\t}\r\n}\r\n\r\nexport { FluxUi as fluxUi };"]}