zyf-model-engine 0.0.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/index.cjs +293 -0
  2. package/index.d.mts +1 -0
  3. package/index.d.ts +1 -0
  4. package/index.mjs +21653 -0
  5. package/package.json +33 -12
  6. package/style.css +1 -1
  7. package/types/components/CSvgIcon/components/SvgPathIcon.vue.d.ts +9 -0
  8. package/types/components/CSvgIcon/defaultIcons.d.ts +23 -0
  9. package/types/components/CSvgIcon/index.vue.d.ts +30 -0
  10. package/types/components/Empty/index.vue.d.ts +16 -0
  11. package/types/components/Overflow/index.vue.d.ts +11 -0
  12. package/types/components/UtilsMenu/components/BaseInfo/index.vue.d.ts +122 -0
  13. package/types/components/UtilsMenu/components/Card/index.vue.d.ts +42 -0
  14. package/types/components/UtilsMenu/components/ComInfo/index.vue.d.ts +128 -0
  15. package/types/components/UtilsMenu/components/Config/index.vue.d.ts +8 -0
  16. package/types/components/UtilsMenu/components/Cutting/clipping.d.ts +56 -0
  17. package/types/components/UtilsMenu/components/Cutting/index.vue.d.ts +128 -0
  18. package/types/components/UtilsMenu/components/Measure/index.vue.d.ts +122 -0
  19. package/types/components/UtilsMenu/components/Measure/interface/index.d.ts +5 -0
  20. package/types/components/UtilsMenu/components/Measure/measure.d.ts +106 -0
  21. package/types/components/UtilsMenu/components/ModelTree/index.vue.d.ts +875 -0
  22. package/types/components/UtilsMenu/components/ModelTree/interface/index.d.ts +19 -0
  23. package/types/components/UtilsMenu/components/ModelTree/utils/index.d.ts +13 -0
  24. package/types/components/UtilsMenu/components/Roam/index.vue.d.ts +125 -0
  25. package/types/components/UtilsMenu/components/SubMenu/index.vue.d.ts +18 -0
  26. package/types/components/UtilsMenu/index.vue.d.ts +15 -0
  27. package/types/components/UtilsMenu/interface/index.d.ts +129 -0
  28. package/types/index-dxf.vue.d.ts +15 -0
  29. package/types/index.d.ts +209 -0
  30. package/types/index.vue.d.ts +18 -0
  31. package/types/libs/CFace.d.ts +16 -0
  32. package/types/libs/CLabel.d.ts +13 -0
  33. package/types/libs/CLine.d.ts +49 -0
  34. package/types/libs/CText.d.ts +17 -0
  35. package/types/libs/MathUtils.d.ts +26 -0
  36. package/types/libs/ViewCube.d.ts +21 -0
  37. package/types/libs/materials.d.ts +4 -0
  38. package/types/libs/svg.d.ts +26 -0
  39. package/types/libs/types.d.ts +177 -0
  40. package/types/main.d.ts +22 -0
  41. package/types/manager/highLightMeshManager.d.ts +31 -0
  42. package/types/manager/lightManager.d.ts +35 -0
  43. package/types/manager/rayCasterManager.d.ts +18 -0
  44. package/types/tools/Events.d.ts +15 -0
  45. package/types/tools/math.d.ts +13 -0
  46. package/types/vendor/DXFPaser/BatchingKey.d.ts +25 -0
  47. package/types/vendor/DXFPaser/DxfFetcher.d.ts +6 -0
  48. package/types/vendor/DXFPaser/DxfScene.d.ts +95 -0
  49. package/types/vendor/DXFPaser/DxfWorker.d.ts +44 -0
  50. package/types/vendor/DXFPaser/DynamicBuffer.d.ts +30 -0
  51. package/types/vendor/DXFPaser/Entity.d.ts +18 -0
  52. package/types/vendor/DXFPaser/MTextFormatParser.d.ts +15 -0
  53. package/types/vendor/DXFPaser/MaterialKey.d.ts +8 -0
  54. package/types/vendor/DXFPaser/RBTree.d.ts +5 -0
  55. package/types/vendor/DXFPaser/TextRenderer.d.ts +43 -0
  56. package/types/vendor/DXFPaser/index.d.ts +26 -0
  57. package/types/vendor/controls/BaseArrow.d.ts +20 -0
  58. package/types/vendor/controls/FirstPersonControls.d.ts +32 -0
  59. package/types/vendor/controls/FlyControls.d.ts +18 -0
  60. package/types/vendor/controls/OrbitControls.d.ts +75 -0
  61. package/types/vendor/controls/TransformControls.d.ts +41 -0
  62. package/types/vendor/controls/directionControls.d.ts +26 -0
  63. package/types/vendor/loaders/GLTFLoader.d.ts +71 -0
  64. package/types/workbench/DxfViewer.d.ts +16 -0
  65. package/types/workbench/clickInfo.d.ts +24 -0
  66. package/types/workbench/clipping.d.ts +62 -0
  67. package/types/workbench/dxfMeasure.d.ts +92 -0
  68. package/types/workbench/dxfTools.d.ts +88 -0
  69. package/types/workbench/functionalComponent.d.ts +127 -0
  70. package/types/workbench/modelTree.d.ts +89 -0
  71. package/build/getEnv.d.ts +0 -13
  72. package/build/plugins.d.ts +0 -7
  73. package/build/proxy.d.ts +0 -11
  74. package/index.html +0 -7
  75. package/logo.png +0 -0
  76. package/manifest.webmanifest +0 -1
  77. package/registerSW.js +0 -1
  78. package/src/api/config/servicePort.d.ts +0 -2
  79. package/src/api/enums/httpEnum.d.ts +0 -29
  80. package/src/api/helper/axiosCancel.d.ts +0 -21
  81. package/src/api/helper/axiosFileCancel.d.ts +0 -27
  82. package/src/api/helper/checkStatus.d.ts +0 -6
  83. package/src/api/index.d.ts +0 -26
  84. package/src/api/interface/index.d.ts +0 -18
  85. package/src/components/CTree/interface/index.d.ts +0 -6
  86. package/src/components/Grid/interface/index.d.ts +0 -5
  87. package/src/components/ProTable/interface/index.d.ts +0 -66
  88. package/src/config/index.d.ts +0 -5
  89. package/src/config/nprogress.d.ts +0 -3
  90. package/src/config/piniaPersist.d.ts +0 -10
  91. package/src/config/serviceLoading.d.ts +0 -5
  92. package/src/enums/httpEnum.d.ts +0 -19
  93. package/src/hooks/interface/index.d.ts +0 -30
  94. package/src/hooks/useOnline.d.ts +0 -6
  95. package/src/hooks/useTable.d.ts +0 -47
  96. package/src/main.d.ts +0 -1
  97. package/src/stores/commonStore.d.ts +0 -2
  98. package/src/stores/index.d.ts +0 -2
  99. package/src/stores/interface/index.d.ts +0 -1
  100. package/src/utils/color.d.ts +0 -28
  101. package/src/utils/commonUtils.d.ts +0 -63
  102. package/src/utils/errorHandler.d.ts +0 -5
  103. package/src/utils/is.d.ts +0 -82
  104. package/src/utils/layoutUtils.d.ts +0 -44
  105. package/src/utils/localUtils.d.ts +0 -24
  106. package/src/utils/serviceDict.d.ts +0 -7
  107. package/sw.js +0 -1
  108. package/vite.config.d.ts +0 -2
  109. package/workbox-3e911b1d.js +0 -1
  110. package/zyf-model-engine.mjs +0 -45118
  111. package/zyf-model-engine.umd.js +0 -81
@@ -1,28 +0,0 @@
1
- /**
2
- * @description hex颜色转rgb颜色
3
- * @param {String} str 颜色值字符串
4
- * @returns {String} 返回处理后的颜色值
5
- */
6
- export declare function hexToRgb(str: any): any;
7
- /**
8
- * @description rgb颜色转Hex颜色
9
- * @param {*} r 代表红色
10
- * @param {*} g 代表绿色
11
- * @param {*} b 代表蓝色
12
- * @returns {String} 返回处理后的颜色值
13
- */
14
- export declare function rgbToHex(r: any, g: any, b: any): string | import('element-plus').MessageHandler;
15
- /**
16
- * @description 加深颜色值
17
- * @param {String} color 颜色值字符串
18
- * @param {Number} level 加深的程度,限0-1之间
19
- * @returns {String} 返回处理后的颜色值
20
- */
21
- export declare function getDarkColor(color: string, level: number): string | import('element-plus').MessageHandler;
22
- /**
23
- * @description 变浅颜色值
24
- * @param {String} color 颜色值字符串
25
- * @param {Number} level 加深的程度,限0-1之间
26
- * @returns {String} 返回处理后的颜色值
27
- */
28
- export declare function getLightColor(color: string, level: number): string | import('element-plus').MessageHandler;
@@ -1,63 +0,0 @@
1
- /**
2
- * @description 生成唯一 uuid
3
- * @returns {String}
4
- */
5
- export declare function generateUUID(): string;
6
- /**
7
- * @description 深拷贝
8
- */
9
- export declare const deepClone: (obj: {
10
- [k: string]: any;
11
- }) => {
12
- [k: string]: any;
13
- };
14
- /**
15
- * 防抖
16
- * @param fn {Function}
17
- * @param delay {number}
18
- */
19
- export declare function debounce<T>(fn: T, delay: number): () => void;
20
- /**
21
- * @description 日期转换
22
- * @param {string} value
23
- * @param {string} format
24
- * @returns {string}
25
- */
26
- export declare function formatDate(value: string, format?: string): string;
27
- /**
28
- * @description 生成随机数
29
- * @param {Number} min 最小值
30
- * @param {Number} max 最大值
31
- * @returns {Number}
32
- */
33
- export declare function randomNum(min: number, max: number): number;
34
- /**
35
- * @description 为对象添加level层级
36
- */
37
- export declare const addLevel: (arr: Record<string, any>[], level?: number, attribute?: string) => void;
38
- export declare function deepTraverse(obj: Record<string, any>, callback: (key: string, value: any) => any): void;
39
- /**
40
- * @description 将objB与objA的交集赋值给objA
41
- * @param {Object} objA 要比较的对象一
42
- * @param {Object} objB 要比较的对象二
43
- */
44
- export declare const listAssign: (objA: Record<string, any>, objB: Record<string, any>) => Record<string, any>;
45
- /**
46
- * 判断两个对象是否相同
47
- * @param {Object} a 要比较的对象一
48
- * @param {Object} b 要比较的对象二
49
- * @returns {Boolean} 相同返回 true,反之 false
50
- */
51
- export declare function isObjectValueEqual(a: {
52
- [key: string]: any;
53
- }, b: {
54
- [key: string]: any;
55
- }): boolean;
56
- /**
57
- * @description 传入两个数组返回两个数组的交集 只能判断简单数据类型
58
- */
59
- export declare function arrayIntersection(arr1: any[], arr2: any[]): any[];
60
- /**
61
- * @description 文字size适配
62
- */
63
- export declare function formatFontSize(fontsize: number): string;
@@ -1,5 +0,0 @@
1
- /**
2
- * @description 全局代码错误捕捉
3
- * */
4
- declare const errorHandler: (error: any) => boolean;
5
- export default errorHandler;
package/src/utils/is.d.ts DELETED
@@ -1,82 +0,0 @@
1
- /**
2
- * @description: 判断值是某个类型
3
- */
4
- export declare function is(val: unknown, type: string): boolean;
5
- /**
6
- * @description 判断数据类型
7
- * @param {*} val 需要判断类型的数据
8
- * @returns {String}
9
- */
10
- export declare function isType(val: any): any;
11
- /**
12
- * @description: 是否为空
13
- */
14
- export declare const isEmpty: (val: any) => boolean;
15
- /**
16
- * @description: 是否为函数
17
- */
18
- export declare function isFunction<T = Function>(val: unknown): val is T;
19
- /**
20
- * @description: 是否已定义
21
- */
22
- export declare const isDef: <T = unknown>(val?: T) => val is T;
23
- /**
24
- * @description: 是否未定义
25
- */
26
- export declare const isUnDef: <T = unknown>(val?: T) => val is T;
27
- /**
28
- * @description: 是否为对象
29
- */
30
- export declare const isObject: (val: any) => val is Record<any, any>;
31
- /**
32
- * @description: 是否为时间
33
- */
34
- export declare function isDate(val: unknown): val is Date;
35
- /**
36
- * @description: 是否为数值
37
- */
38
- export declare function isNumber(val: unknown): val is number;
39
- /**
40
- * @description: 是否为AsyncFunction
41
- */
42
- export declare function isAsyncFunction<T = any>(val: unknown): val is Promise<T>;
43
- /**
44
- * @description: 是否为promise
45
- */
46
- export declare function isPromise<T = any>(val: unknown): val is Promise<T>;
47
- /**
48
- * @description: 是否为字符串
49
- */
50
- export declare function isString(val: unknown): val is string;
51
- /**
52
- * @description: 是否为boolean类型
53
- */
54
- export declare function isBoolean(val: unknown): val is boolean;
55
- /**
56
- * @description: 是否为数组
57
- */
58
- export declare function isArray(val: any): val is Array<any>;
59
- /**
60
- * @description: 是否客户端
61
- */
62
- export declare const isClient: () => boolean;
63
- /**
64
- * @description: 是否为浏览器
65
- */
66
- export declare const isWindow: (val: any) => val is Window;
67
- /**
68
- * @description: 是否为 element 元素
69
- */
70
- export declare const isElement: (val: unknown) => val is Element;
71
- /**
72
- * @description: 是否为 null
73
- */
74
- export declare function isNull(val: unknown): val is null;
75
- /**
76
- * @description: 是否为 null || undefined
77
- */
78
- export declare function isNullOrUnDef(val: unknown): val is null | undefined;
79
- /**
80
- * @description: 是否为 16 进制颜色
81
- */
82
- export declare const isHexColor: (str: string) => boolean;
@@ -1,44 +0,0 @@
1
- import { FieldNamesProps } from '../components/ProTable/interface';
2
-
3
- /**
4
- * @description 格式化表格单元格默认值 (el-table-column)
5
- * @param {Number} row 行
6
- * @param {Number} col 列
7
- * @param {*} callValue 当前单元格值
8
- * @returns {String}
9
- * */
10
- export declare function formatTableColumn(row: number, col: number, callValue: any): any;
11
- /**
12
- * @description 处理值无数据情况
13
- * @param {*} callValue 需要处理的值
14
- * @returns {String}
15
- * */
16
- export declare function formatValue(callValue: any): any;
17
- /**
18
- * @description 处理 prop 为多级嵌套的情况,返回的数据 (列如: prop: user.name)
19
- * @param {Object} row 当前行数据
20
- * @param {String} prop 当前 prop
21
- * @returns {*}
22
- * */
23
- export declare function handleRowAccordingToProp(row: {
24
- [key: string]: any;
25
- }, prop: string): any;
26
- /**
27
- * @description 处理 prop,当 prop 为多级嵌套时 ==> 返回最后一级 prop
28
- * @param {String} prop 当前 prop
29
- * @returns {String}
30
- * */
31
- export declare function handleProp(prop: string): string;
32
- /**
33
- * @description 根据枚举列表查询当需要的数据(如果指定了 label 和 value 的 key值,会自动识别格式化)
34
- * @param {String} callValue 当前单元格值
35
- * @param {Array} enumData 字典列表
36
- * @param {Array} fieldNames label && value && children 的 key 值
37
- * @param {String} type 过滤类型(目前只有 tag)
38
- * @returns {String}
39
- * */
40
- export declare function filterEnum(callValue: any, enumData?: any, fieldNames?: FieldNamesProps, type?: "tag"): any;
41
- /**
42
- * @description 递归查找 callValue 对应的 enum 值
43
- * */
44
- export declare function findItemNested(enumData: any, callValue: any, value: string, children: string): any;
@@ -1,24 +0,0 @@
1
- /**
2
- * @description 获取localStorage
3
- * @param {String} key Storage名称
4
- * @returns {String}
5
- */
6
- export declare function localGet(key: string): any;
7
- /**
8
- * @description 存储localStorage
9
- * @param {String} key Storage名称
10
- * @param {*} value Storage值
11
- * @returns {void}
12
- */
13
- export declare function localSet(key: string, value: any): void;
14
- /**
15
- * @description 清除localStorage
16
- * @param {String} key Storage名称
17
- * @returns {void}
18
- */
19
- export declare function localRemove(key: string): void;
20
- /**
21
- * @description 清除所有localStorage
22
- * @returns {void}
23
- */
24
- export declare function localClear(): void;
@@ -1,7 +0,0 @@
1
- /**
2
- * @description:用户状态
3
- */
4
- export declare const userStatus: {
5
- label: string;
6
- value: number;
7
- }[];
package/sw.js DELETED
@@ -1 +0,0 @@
1
- if(!self.define){let e,i={};const n=(n,r)=>(n=new URL(n+".js",r).href,i[n]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()})).then((()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(r,s)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(i[o])return;let t={};const c=e=>n(e,o),d={module:{uri:o},exports:t,require:c};i[o]=Promise.all(r.map((e=>d[e]||c(e)))).then((e=>(s(...e),t)))}}define(["./workbox-3e911b1d"],(function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"index.html",revision:"db427bd4cd63f96b9b2ebd4945673e4f"},{url:"registerSW.js",revision:"402b66900e731ca748771b6fc5e7a068"},{url:"style.css",revision:"088732493300591fe0cc317badb49745"},{url:"zyf-model-engine.umd.js",revision:"bbd3da504a40c8ccabfd3f5c5e84ada5"},{url:"logo.png",revision:"17c32a9c6fbf73bb00518ec798045c20"},{url:"manifest.webmanifest",revision:"e6d06c3c5bff8ba38d03ed928bcb0f84"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}));
package/vite.config.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfigFnObject;
2
- export default _default;
@@ -1 +0,0 @@
1
- define(["exports"],(function(t){"use strict";try{self["workbox:core:7.0.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a=()=>(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c);function h(t,e,n){let o;if("string"==typeof t){const s=new URL(t,location.href);o=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)o=new r(t,e,n);else if("function"==typeof t)o=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});o=t}return a().registerRoute(o),o}const u={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},l=t=>[u.prefix,t,u.suffix].filter((t=>t&&t.length>0)).join("-"),f=t=>t||l(u.precache),w=t=>t||l(u.runtime);function d(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function p(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class y{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class g{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let R;async function m(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===R){const t=new Response("");if("body"in t)try{new Response(t.body),R=!0}catch(t){R=!1}R=!1}return R}()?i.body:await i.blob();return new Response(c,o)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class q{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const U=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function L(t){return"string"==typeof t?new Request(t):t}class b{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new q,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=L(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=L(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=L(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of U)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=L(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class C{constructor(t={}){this.cacheName=w(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new b(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class E extends C{constructor(t={}){t.cacheName=f(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(E.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==E.copyRedirectedCacheableResponsesPlugin&&(n===E.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(E.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}E.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},E.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await m(t):t};class O{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.P=new Map,this.T=new Map,this.l=new E({cacheName:f(t),plugins:[...e,new g({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=p(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.K.set(i,t),this.P.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return d(t,(async()=>{const e=new y;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.T.get(s),i=this.P.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return d(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let x;const N=()=>(x||(x=new O),x);class k extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}t.NavigationRoute=class extends i{constructor(t,{allowlist:e=[/./],denylist:s=[]}={}){super((t=>this.j(t)),t),this.M=e,this.S=s}j({url:t,request:e}){if(e&&"navigate"!==e.mode)return!1;const s=t.pathname+t.search;for(const t of this.S)if(t.test(s))return!1;return!!this.M.some((t=>t.test(s)))}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",(t=>{const e=f();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter((s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t));return await Promise.all(s.map((t=>self.caches.delete(t)))),s})(e).then((t=>{})))}))},t.clientsClaim=function(){self.addEventListener("activate",(()=>self.clients.claim()))},t.createHandlerBoundToURL=function(t){return N().createHandlerBoundToURL(t)},t.precacheAndRoute=function(t,e){!function(t){N().precache(t)}(t),function(t){const e=N();h(new k(e,t))}(e)},t.registerRoute=h}));