@next-bricks/visual-builder 1.7.1 → 1.7.3
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.
- package/dist/bricks.json +1 -1
- package/dist/chunks/1045.ce2da47a.js +2 -0
- package/dist/chunks/1045.ce2da47a.js.map +1 -0
- package/dist/chunks/1122.9dff69fc.js +2 -0
- package/dist/chunks/{1832.42ad8ef2.js.map → 1122.9dff69fc.js.map} +1 -1
- package/dist/chunks/114.3a6120a3.js +2 -0
- package/dist/chunks/114.3a6120a3.js.map +1 -0
- package/dist/chunks/1369.e7a76cb0.js +2 -0
- package/dist/chunks/1369.e7a76cb0.js.map +1 -0
- package/dist/chunks/1370.485fc795.js +2 -0
- package/dist/chunks/1370.485fc795.js.map +1 -0
- package/dist/chunks/1889.7e3787d5.js +2 -0
- package/dist/chunks/1889.7e3787d5.js.map +1 -0
- package/dist/chunks/1940.d765c481.js +2 -0
- package/dist/chunks/{8644.ae7de474.js.map → 1940.d765c481.js.map} +1 -1
- package/dist/chunks/1972.20f16f21.js +2 -0
- package/dist/chunks/1972.20f16f21.js.map +1 -0
- package/dist/chunks/{856.1c1142e0.js → 2052.5926f210.js} +2 -2
- package/dist/chunks/2052.5926f210.js.map +1 -0
- package/dist/chunks/{3680.9a7ba9c2.js → 2277.07982a9b.js} +2 -2
- package/dist/chunks/{3680.9a7ba9c2.js.map → 2277.07982a9b.js.map} +1 -1
- package/dist/chunks/{2356.a88fa0df.js → 3144.c6a8a081.js} +3 -3
- package/dist/chunks/{2356.a88fa0df.js.map → 3144.c6a8a081.js.map} +1 -1
- package/dist/chunks/3171.1241a7c9.js +2 -0
- package/dist/chunks/{6056.caf9bf62.js.map → 3171.1241a7c9.js.map} +1 -1
- package/dist/chunks/3208.99775359.js +2 -0
- package/dist/chunks/3208.99775359.js.map +1 -0
- package/dist/chunks/3426.7237505a.js +2 -0
- package/dist/chunks/3426.7237505a.js.map +1 -0
- package/dist/chunks/3620.c914fb59.js +2 -0
- package/dist/chunks/{2496.39b9bcc4.js.map → 3620.c914fb59.js.map} +1 -1
- package/dist/chunks/3933.3d3e3539.js +2 -0
- package/dist/chunks/{2976.bbda7778.js.map → 3933.3d3e3539.js.map} +1 -1
- package/dist/chunks/{5668.3ecc335f.js → 4041.b50c80d7.js} +3 -3
- package/dist/chunks/{5668.3ecc335f.js.map → 4041.b50c80d7.js.map} +1 -1
- package/dist/chunks/{6064.66ad2605.js → 4658.dab790af.js} +2 -2
- package/dist/chunks/{6064.66ad2605.js.map → 4658.dab790af.js.map} +1 -1
- package/dist/chunks/4741.cf0d2915.js +2 -0
- package/dist/chunks/{8648.9ab71a02.js.map → 4741.cf0d2915.js.map} +1 -1
- package/dist/chunks/478.7e1cd06e.js +2 -0
- package/dist/chunks/{872.611a361d.js.map → 478.7e1cd06e.js.map} +1 -1
- package/dist/chunks/{7928.f4682432.js → 5250.dc33943a.js} +3 -3
- package/dist/chunks/{7928.f4682432.js.map → 5250.dc33943a.js.map} +1 -1
- package/dist/chunks/{1776.5dbe102a.js → 5384.db165893.js} +2 -2
- package/dist/chunks/{1776.5dbe102a.js.map → 5384.db165893.js.map} +1 -1
- package/dist/chunks/5399.96679376.js +2 -0
- package/dist/chunks/{1372.21fd3964.js.map → 5399.96679376.js.map} +1 -1
- package/dist/chunks/5552.b400883c.js +2 -0
- package/dist/chunks/{8440.3af34c89.js.map → 5552.b400883c.js.map} +1 -1
- package/dist/chunks/6314.647629e1.js +2 -0
- package/dist/chunks/{5356.d19e5c82.js.map → 6314.647629e1.js.map} +1 -1
- package/dist/chunks/6519.538410d7.js +2 -0
- package/dist/chunks/{4524.c7fa150a.js.map → 6519.538410d7.js.map} +1 -1
- package/dist/chunks/6773.c1867a35.js +2 -0
- package/dist/chunks/6773.c1867a35.js.map +1 -0
- package/dist/chunks/7222.23911e6a.js +3 -0
- package/dist/chunks/7222.23911e6a.js.map +1 -0
- package/dist/chunks/726.6245fb60.js +2 -0
- package/dist/chunks/726.6245fb60.js.map +1 -0
- package/dist/chunks/{6408.70d506ef.js → 7452.4d9d3581.js} +2 -2
- package/dist/chunks/{6408.70d506ef.js.map → 7452.4d9d3581.js.map} +1 -1
- package/dist/chunks/7721.ac7a50ec.js +3 -0
- package/dist/chunks/{6736.8d515a66.js.map → 7721.ac7a50ec.js.map} +1 -1
- package/dist/chunks/7733.91bc54b9.js +2 -0
- package/dist/chunks/7733.91bc54b9.js.map +1 -0
- package/dist/chunks/{3752.78b2e565.js → 7780.1ca43b02.js} +2 -2
- package/dist/chunks/{3752.78b2e565.js.map → 7780.1ca43b02.js.map} +1 -1
- package/dist/chunks/790.ab211a8a.js +2 -0
- package/dist/chunks/{820.dc240cb3.js.map → 790.ab211a8a.js.map} +1 -1
- package/dist/chunks/8097.2a833d82.js +2 -0
- package/dist/chunks/{8492.d1633a41.js.map → 8097.2a833d82.js.map} +1 -1
- package/dist/chunks/8989.b5c0084e.js +2 -0
- package/dist/chunks/8989.b5c0084e.js.map +1 -0
- package/dist/chunks/{4724.977bdfa3.js → 9027.bdf6692f.js} +2 -2
- package/dist/chunks/{4724.977bdfa3.js.map → 9027.bdf6692f.js.map} +1 -1
- package/dist/chunks/9515.07ef90ca.js +2 -0
- package/dist/chunks/9515.07ef90ca.js.map +1 -0
- package/dist/chunks/9542.08c9e959.js +2 -0
- package/dist/chunks/{7484.a1b2e509.js.map → 9542.08c9e959.js.map} +1 -1
- package/dist/chunks/9559.31bf8623.js +2 -0
- package/dist/chunks/{1024.23bff312.js.map → 9559.31bf8623.js.map} +1 -1
- package/dist/chunks/9591.a0e2892a.js +2 -0
- package/dist/chunks/9591.a0e2892a.js.map +1 -0
- package/dist/chunks/9636.0a88cf0a.js +3 -0
- package/dist/chunks/9636.0a88cf0a.js.map +1 -0
- package/dist/chunks/9844.bc9b1bf6.js +2 -0
- package/dist/chunks/9844.bc9b1bf6.js.map +1 -0
- package/dist/chunks/9933.b27f4803.js +3 -0
- package/dist/chunks/9933.b27f4803.js.map +1 -0
- package/dist/chunks/contract-select.0e1ce8cf.js +3 -0
- package/dist/chunks/contract-select.0e1ce8cf.js.map +1 -0
- package/dist/chunks/inject-preview-agent.20f69b9f.js +2 -0
- package/dist/chunks/{inject-preview-agent.9ef1eb06.js.map → inject-preview-agent.20f69b9f.js.map} +1 -1
- package/dist/chunks/main.d3d199e8.js +2 -0
- package/dist/chunks/main.d3d199e8.js.map +1 -0
- package/dist/chunks/page-arch-node.df92dd44.js +3 -0
- package/dist/chunks/page-arch-node.df92dd44.js.map +1 -0
- package/dist/chunks/workbench-action-list.68d0a5d2.js +2 -0
- package/dist/chunks/workbench-action-list.68d0a5d2.js.map +1 -0
- package/dist/chunks/workbench-action.843cf56a.js +3 -0
- package/dist/chunks/workbench-action.843cf56a.js.map +1 -0
- package/dist/chunks/workbench-history-action.a0c4e551.js +3 -0
- package/dist/chunks/workbench-history-action.a0c4e551.js.map +1 -0
- package/dist/chunks/workbench-pane.a4e71fb1.js +3 -0
- package/dist/chunks/workbench-pane.a4e71fb1.js.map +1 -0
- package/dist/chunks/workbench-sidebar.cc37406d.js +2 -0
- package/dist/chunks/workbench-sidebar.cc37406d.js.map +1 -0
- package/dist/chunks/workbench-tree.5762e4e3.js +2 -0
- package/dist/chunks/workbench-tree.5762e4e3.js.map +1 -0
- package/dist/index.1a5a2652.js +2 -0
- package/dist/index.1a5a2652.js.map +1 -0
- package/package.json +4 -4
- package/dist/chunks/1024.23bff312.js +0 -2
- package/dist/chunks/1372.21fd3964.js +0 -2
- package/dist/chunks/1564.81ebf0da.js +0 -2
- package/dist/chunks/1564.81ebf0da.js.map +0 -1
- package/dist/chunks/1772.492795f0.js +0 -2
- package/dist/chunks/1772.492795f0.js.map +0 -1
- package/dist/chunks/1832.42ad8ef2.js +0 -2
- package/dist/chunks/242.62121293.js +0 -2
- package/dist/chunks/242.62121293.js.map +0 -1
- package/dist/chunks/2496.39b9bcc4.js +0 -2
- package/dist/chunks/2976.bbda7778.js +0 -2
- package/dist/chunks/3322.4f01d379.js +0 -2
- package/dist/chunks/3322.4f01d379.js.map +0 -1
- package/dist/chunks/3811.d187faeb.js +0 -2
- package/dist/chunks/3811.d187faeb.js.map +0 -1
- package/dist/chunks/4524.c7fa150a.js +0 -2
- package/dist/chunks/4816.4333ef99.js +0 -3
- package/dist/chunks/4816.4333ef99.js.map +0 -1
- package/dist/chunks/4847.65ac2b6e.js +0 -2
- package/dist/chunks/4847.65ac2b6e.js.map +0 -1
- package/dist/chunks/5356.d19e5c82.js +0 -2
- package/dist/chunks/592.f7f43e02.js +0 -3
- package/dist/chunks/592.f7f43e02.js.map +0 -1
- package/dist/chunks/6056.caf9bf62.js +0 -2
- package/dist/chunks/6192.0119258a.js +0 -2
- package/dist/chunks/6192.0119258a.js.map +0 -1
- package/dist/chunks/6228.b81758e7.js +0 -2
- package/dist/chunks/6228.b81758e7.js.map +0 -1
- package/dist/chunks/6352.8625d4b2.js +0 -2
- package/dist/chunks/6352.8625d4b2.js.map +0 -1
- package/dist/chunks/6736.8d515a66.js +0 -3
- package/dist/chunks/7228.c1a6b842.js +0 -2
- package/dist/chunks/7228.c1a6b842.js.map +0 -1
- package/dist/chunks/7476.b7d932e0.js +0 -2
- package/dist/chunks/7476.b7d932e0.js.map +0 -1
- package/dist/chunks/7484.a1b2e509.js +0 -2
- package/dist/chunks/7861.61599346.js +0 -2
- package/dist/chunks/7861.61599346.js.map +0 -1
- package/dist/chunks/8060.c4e33d84.js +0 -2
- package/dist/chunks/8060.c4e33d84.js.map +0 -1
- package/dist/chunks/820.dc240cb3.js +0 -2
- package/dist/chunks/8440.3af34c89.js +0 -2
- package/dist/chunks/8492.d1633a41.js +0 -2
- package/dist/chunks/856.1c1142e0.js.map +0 -1
- package/dist/chunks/8644.ae7de474.js +0 -2
- package/dist/chunks/8648.9ab71a02.js +0 -2
- package/dist/chunks/872.611a361d.js +0 -2
- package/dist/chunks/8732.85eb2120.js +0 -2
- package/dist/chunks/8732.85eb2120.js.map +0 -1
- package/dist/chunks/9784.e85af725.js +0 -3
- package/dist/chunks/9784.e85af725.js.map +0 -1
- package/dist/chunks/contract-select.015053bb.js +0 -3
- package/dist/chunks/contract-select.015053bb.js.map +0 -1
- package/dist/chunks/inject-preview-agent.9ef1eb06.js +0 -2
- package/dist/chunks/main.a24116a4.js +0 -2
- package/dist/chunks/main.a24116a4.js.map +0 -1
- package/dist/chunks/page-arch-node.303cced4.js +0 -3
- package/dist/chunks/page-arch-node.303cced4.js.map +0 -1
- package/dist/chunks/workbench-action-list.0c365a7e.js +0 -2
- package/dist/chunks/workbench-action-list.0c365a7e.js.map +0 -1
- package/dist/chunks/workbench-action.51a37e53.js +0 -3
- package/dist/chunks/workbench-action.51a37e53.js.map +0 -1
- package/dist/chunks/workbench-history-action.645e0f41.js +0 -3
- package/dist/chunks/workbench-history-action.645e0f41.js.map +0 -1
- package/dist/chunks/workbench-pane.12c26a59.js +0 -3
- package/dist/chunks/workbench-pane.12c26a59.js.map +0 -1
- package/dist/chunks/workbench-sidebar.398257d7.js +0 -2
- package/dist/chunks/workbench-sidebar.398257d7.js.map +0 -1
- package/dist/chunks/workbench-tree.6cfc1988.js +0 -2
- package/dist/chunks/workbench-tree.6cfc1988.js.map +0 -1
- package/dist/index.b2fd5547.js +0 -2
- package/dist/index.b2fd5547.js.map +0 -1
- /package/dist/chunks/{2356.a88fa0df.js.LICENSE.txt → 3144.c6a8a081.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5668.3ecc335f.js.LICENSE.txt → 4041.b50c80d7.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{7928.f4682432.js.LICENSE.txt → 5250.dc33943a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9784.e85af725.js.LICENSE.txt → 7222.23911e6a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{6736.8d515a66.js.LICENSE.txt → 7721.ac7a50ec.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{4816.4333ef99.js.LICENSE.txt → 9636.0a88cf0a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{592.f7f43e02.js.LICENSE.txt → 9933.b27f4803.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{contract-select.015053bb.js.LICENSE.txt → contract-select.0e1ce8cf.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{page-arch-node.303cced4.js.LICENSE.txt → page-arch-node.df92dd44.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-action.51a37e53.js.LICENSE.txt → workbench-action.843cf56a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-history-action.645e0f41.js.LICENSE.txt → workbench-history-action.a0c4e551.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{workbench-pane.12c26a59.js.LICENSE.txt → workbench-pane.a4e71fb1.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/4724.977bdfa3.js","mappings":"6LAgCO,SAASA,EAAqBC,GACnC,IAAMC,EArBR,SAAiBC,GACf,IAAMD,EAAa,IAAIE,IAgBvB,OAdAC,EAAAA,EAAAA,GAASF,GAAcG,IACrB,OAAQA,EAAKC,MACX,IAAK,aACL,IAAK,eAAgB,IAAAC,EACbC,EACI,QADOD,EACfF,EAAKI,WAAG,IAAAF,OAAA,EADUA,EAEjBC,YACCA,GACFP,EAAWS,IAAIF,GAGrB,IAGKP,CACT,CAGqBU,EAAQC,EAAAA,EAAAA,IAAgBZ,IAErCa,EAAY,GAElB,IAAK,IAAMC,KAAQb,EACba,EAAKC,SAAS,MAChBF,EAAUG,KAAKF,GAInB,OAAOD,CACT,CAEAI,eAAeC,OACb,yCACAC,EAAAA,EAAAA,qBAAoBpB,G,sCCvCXqB,E,2DCsBV,SAAAC,IAAA,OAAAA,GAAAC,EAAAA,EAAAA,IAfM,UACLC,EACAC,GAEA,IAhBqBC,EAgBfC,QAAqBC,IAAYC,SAASC,KAAM,CACpDC,SAAS,EACTC,MAAO,EACPC,MAAOC,OAAOC,WACdC,OAAQF,OAAOG,YACfC,wBAAwB,IAEpBC,E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,IAAM+K,EAAS/K,EAAItE,SAAS,KACtBsP,EAUR,SACEhL,EACA+K,GAEA,IAAMC,EAA0B,GAuBhC,OArBA,SAASC,EAAKC,GACZ,IAAMC,EAAaD,EAAKE,iBACtBL,EAAS/K,EAAM,cAAHqL,OAAiBrL,EAAG,OAKlC,GAHAgL,EAASrP,QAAQwP,KAGbD,IAAS3O,UAAY4O,EAAWzM,OAAS,GAK7C,IAAK,IAAMjD,KAAQyP,EAAKE,iBAAiB,KACnC3P,EAAK4O,YACPY,EAAKxP,EAAK4O,WAGhB,CAEAY,CAAK1O,UAEEyO,CACT,CAtCmBM,CAAgCtL,EAAK+K,GAChDrH,EAuCR,SAAqBsH,EAAyBvH,GAC5C,OAAOuH,EAAShJ,KAAKkD,IAAY,IAAAqG,EACzBC,EAAoC,QAApBD,EAAG/I,SAAiB,IAAA+I,OAAA,EAAjBA,EAAmBE,SAASvG,IAC/C,MAAEvI,EAAK,OAAEG,EAAM,KAAE4O,EAAI,IAAEC,GAAQzG,EAAQ0G,wBAC7C,MAAO,CACLjP,QACAG,SACA4O,KACEA,EACA9O,OAAOqL,SACNuD,EAAmBjJ,EAAqBiI,WAAa,GACxDmB,IACEA,EACA/O,OAAOsL,SACNsD,EAAmBjJ,EAAqBkI,UAAY,GACvDhH,QACA+H,mBACD,GAEL,CA1DmBK,CAAYb,EAAUvH,GACvC,OAAOsH,EACHrH,EAAS1B,KAAKvG,IAAI4F,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACb5F,GAAI,IACPqB,OAAQF,OAAOG,YAActB,EAAKkQ,QAEpCjI,CACN,CAqDA,SAASyD,IAA6C,IAAA2E,EAC9CnC,EAAiBpN,SAASqN,cAAc,qBAE9C,OAAQD,SAA0B,QAAZmC,EAAdnC,EAAgBI,kBAAU,IAAA+B,OAAA,EAA3BA,EAA6C/L,QAClDa,EAAO,eAAiB,kBAE5B,C","sources":["webpack:///./src/data-providers/collect-used-contracts.ts","webpack:///./src/data-providers/preview/inspector.ts","webpack:///./src/data-providers/preview/capture.ts","webpack:///./src/data-providers/preview/resizeScreenshot.ts","webpack:///./src/data-providers/preview/realTimeDataInspect.ts","webpack:///./src/data-providers/preview/connect.ts"],"sourcesContent":["import { createProviderClass } from \"@next-core/utils/general\";\nimport {\n type StoryboardNode,\n parseStoryboard,\n traverse,\n} from \"@next-core/storyboard\";\nimport {\n Storyboard,\n UseProviderResolveConf,\n UseProviderEventHandler,\n} from \"@next-core/types\";\n\nfunction collect(nodeOrNodes: StoryboardNode | StoryboardNode[]): Set<string> {\n const collection = new Set<string>();\n\n traverse(nodeOrNodes, (node) => {\n switch (node.type) {\n case \"Resolvable\":\n case \"EventHandler\": {\n const useProvider = (\n node.raw as UseProviderResolveConf | UseProviderEventHandler\n )?.useProvider;\n if (useProvider) {\n collection.add(useProvider);\n }\n }\n }\n });\n\n return collection;\n}\n\nexport function collectUsedContracts(storyboard: Storyboard): string[] {\n const collection = collect(parseStoryboard(storyboard as any));\n\n const contracts = [];\n\n for (const item of collection) {\n if (item.includes(\"@\")) {\n contracts.push(item);\n }\n }\n\n return contracts;\n}\n\ncustomElements.define(\n \"visual-builder.collect-used-contracts\",\n createProviderClass(collectUsedContracts)\n);\n","// istanbul ignore file: working in progress\n// https://github.com/facebook/react/blob/cae635054e17a6f107a39d328649137b83f25972/packages/react-devtools-shared/src/backend/views/Highlighter/index.js\nimport { throttle } from \"lodash\";\nimport type {\n PreviewMessagePreviewerHoverOnBrick,\n PreviewMessagePreviewerSelectBrick,\n PreviewMessagePreviewerContextMenuOnBrick,\n} from \"./interfaces.js\";\n\nexport let previewProxyOrigin: string;\n\nexport function setPreviewFromOrigin(origin: string): void {\n previewProxyOrigin = origin;\n}\n\nexport function startInspecting(): void {\n registerListeners();\n}\n\nexport function stopInspecting(): void {\n unregisterListeners();\n}\n\nfunction registerListeners(): void {\n window.addEventListener(\"click\", onClick, true);\n window.addEventListener(\"mousedown\", onMouseEvent, true);\n window.addEventListener(\"mouseover\", onMouseEvent, true);\n window.addEventListener(\"mouseup\", onMouseEvent, true);\n window.addEventListener(\"pointerdown\", onPointerDown, true);\n window.addEventListener(\"pointermove\", onPointerMove, true);\n window.addEventListener(\"pointerup\", onMouseEvent, true);\n window.addEventListener(\"pointerleave\", onPointerLeave, true);\n window.addEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction unregisterListeners(): void {\n window.removeEventListener(\"click\", onClick, true);\n window.removeEventListener(\"mousedown\", onMouseEvent, true);\n window.removeEventListener(\"mouseover\", onMouseEvent, true);\n window.removeEventListener(\"mouseup\", onMouseEvent, true);\n window.removeEventListener(\"pointerdown\", onPointerDown, true);\n window.removeEventListener(\"pointermove\", onPointerMove, true);\n window.removeEventListener(\"pointerup\", onMouseEvent, true);\n window.removeEventListener(\"pointerleave\", onPointerLeave, true);\n window.removeEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n selectBrick(event.composedPath());\n}\n\nfunction onMouseEvent(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst hoverOnBrick = throttle(\n (eventTargets: EventTarget[]) => {\n const iidList = getPossibleBrickTargets(eventTargets);\n\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n }\n },\n 100,\n { leading: false }\n);\n\nfunction onPointerDown(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerMove(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerLeave(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList: [],\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n}\n\nfunction onContextMenu(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n contextMenuOnBrick(event.composedPath(), {\n x: event.clientX,\n y: event.clientY,\n });\n}\n\nfunction contextMenuOnBrick(\n eventTargets: EventTarget[],\n position: {\n x: number;\n y: number;\n }\n): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"context-menu-on-brick\",\n iidList,\n position,\n } as PreviewMessagePreviewerContextMenuOnBrick,\n previewProxyOrigin\n );\n }\n}\n\nfunction selectBrick(eventTargets: EventTarget[]): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"select-brick\",\n iidList,\n } as PreviewMessagePreviewerSelectBrick,\n previewProxyOrigin\n );\n }\n}\n\nexport function getPossibleBrickIidList(brick: HTMLElement): string[] {\n const iidList: string[] = [];\n // Traverse from bottom to up, to find bricks current hover on.\n let cursor: HTMLElement | null = brick;\n while (cursor) {\n if (typeof cursor.dataset.iid === \"string\") {\n iidList.push(cursor.dataset.iid);\n }\n cursor = cursor.parentElement;\n }\n return iidList;\n}\n\nexport function getPossibleBrickTargets(eventTargets: EventTarget[]) {\n const targets: string[] = [];\n for (const target of eventTargets) {\n if (\n target instanceof HTMLElement &&\n typeof target.dataset.iid === \"string\"\n ) {\n targets.push(target.dataset.iid);\n }\n }\n return targets;\n}\n","// istanbul ignore file: nothing logical except calling html2canvas.\nimport html2canvas from \"html2canvas\";\nimport { resizeScreenshot } from \"./resizeScreenshot.js\";\n\nfunction getCanvasBlob(canvas: HTMLCanvasElement): Promise<Blob> {\n return new Promise(function (resolve, reject) {\n canvas.toBlob(function (blob: Blob | null) {\n if (blob) {\n resolve(blob);\n } else {\n reject();\n }\n });\n });\n}\n\nexport async function capture(\n maxWidth: number,\n maxHeight: number\n): Promise<Blob> {\n const sourceCanvas = await html2canvas(document.body, {\n logging: false,\n scale: 1,\n width: window.innerWidth,\n height: window.innerHeight,\n foreignObjectRendering: true,\n });\n const targetCanvas = document.createElement(\"canvas\");\n resizeScreenshot(sourceCanvas, targetCanvas, maxWidth, maxHeight);\n const blob = await getCanvasBlob(targetCanvas);\n return blob;\n}\n","export function resizeScreenshot(\n canvas: HTMLCanvasElement,\n targetCanvas: HTMLCanvasElement,\n maxWidth: number,\n maxHeight: number\n): string {\n const targetRatio = maxWidth / maxHeight;\n const { width, height } = canvas;\n const ratio = width / height;\n const wider = ratio >= targetRatio;\n const finalWidth = wider ? maxWidth : maxHeight * ratio;\n const finalHeight = wider ? maxWidth / ratio : maxHeight;\n targetCanvas.width = finalWidth;\n targetCanvas.height = finalHeight;\n\n const ctx = targetCanvas.getContext(\"2d\")!;\n ctx.drawImage(canvas, 0, 0, width, height, 0, 0, finalWidth, finalHeight);\n return targetCanvas.toDataURL();\n}\n","export function getRealTimeDataAnnotation(value: unknown) {\n const type = typeof value;\n switch (type) {\n case \"string\":\n case \"boolean\":\n case \"number\":\n return {\n type,\n value,\n };\n case \"undefined\":\n return { type };\n }\n if (value === null) {\n return { type: \"null\" };\n }\n if (Array.isArray(value)) {\n return { type: \"array\", length: value.length };\n }\n return { type: \"object\" };\n}\n","import {\n getHistory as _getHistory,\n getBasePath,\n matchPath as _matchPath,\n __secret_internals as _internals,\n type NextLocation,\n} from \"@next-core/runtime\";\nimport type { BrickConf, CustomTemplate, RouteConf } from \"@next-core/types\";\nimport { isEmpty, throttle } from \"lodash\";\nimport type {\n BrickOutline,\n HighLightNode,\n Position,\n PreviewDataOption,\n PreviewMessageFromPreviewer,\n PreviewMessagePreviewContractUpdate,\n PreviewMessagePreviewDataValueError,\n PreviewMessagePreviewDataValueSuccess,\n PreviewMessagePreviewerCaptureFailed,\n PreviewMessagePreviewerCaptureOk,\n PreviewMessagePreviewerContentScroll,\n PreviewMessagePreviewerHighlightBrick,\n PreviewMessagePreviewerHighlightContext,\n PreviewMessagePreviewerHoverOnMain,\n PreviewMessagePreviewerRealTimeDataInspectChange,\n PreviewMessagePreviewerRouteMatchChange,\n PreviewMessagePreviewerScroll,\n PreviewMessagePreviewerUrlChange,\n PreviewMessageToPreviewer,\n PreviewSettings,\n PreviewStartOptions,\n} from \"./interfaces.js\";\nimport { capture } from \"./capture.js\";\nimport {\n previewProxyOrigin,\n getPossibleBrickIidList,\n setPreviewFromOrigin,\n startInspecting,\n stopInspecting,\n} from \"./inspector.js\";\nimport { collectUsedContracts } from \"../collect-used-contracts.js\";\nimport { getRealTimeDataAnnotation } from \"./realTimeDataInspect.js\";\n\nlet connected = false;\n\ninterface DLL {\n (moduleId: \"tYg3\"): {\n getHistory: typeof _getHistory;\n developHelper: typeof _internals;\n };\n (moduleId: \"A+yw\"): {\n matchPath: typeof _matchPath;\n };\n}\n\nlet getHistory = _getHistory;\nlet matchPath = _matchPath;\nlet __secret_internals = _internals;\nlet isV2 = false;\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\ntry {\n const dll = (window as unknown as { dll?: DLL }).dll;\n if (\n dll &&\n window.BRICK_NEXT_VERSIONS?.[\"brick-container\"]?.startsWith(\"2.\")\n ) {\n const { getHistory: getHistoryV2, developHelper: developHelperV2 } =\n dll(\"tYg3\");\n const { matchPath: matchPathV2 } = dll(\"A+yw\");\n getHistory = getHistoryV2;\n matchPath = matchPathV2;\n // The `__secret_internals` of v3 has pretty the same API as\n // `developHelper` of v2, especially those for preview usage.\n __secret_internals = {\n ...developHelperV2,\n getContextValue(name, { tplStateStoreId }) {\n return developHelperV2.getContextValue(name, {\n tplContextId: tplStateStoreId,\n } as any);\n },\n getAllContextValues({ tplStateStoreId }) {\n // V3 returns an object of key-value.\n // While v2 returns a map of ContextItem.\n const v2Map = developHelperV2.getAllContextValues({\n tplContextId: tplStateStoreId,\n } as any) as unknown as Map<string, { value: unknown }>;\n return Object.fromEntries(\n [...v2Map].map(([k, v]) => [k, (v as any).value])\n );\n },\n };\n isV2 = true;\n }\n} catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Try to use v2 runtime APIs failed:\", e);\n}\n\nlet contentScrollElement: Element | null = null;\nlet contentScrollHost: Element | null = null;\n\nexport default async function connect(\n previewFromOrigin: string,\n options: PreviewStartOptions\n) {\n if (connected) {\n return;\n }\n connected = true;\n\n const sendMessage = <T extends PreviewMessageFromPreviewer>(\n message: Omit<T, \"sender\">\n ): void => {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n ...message,\n },\n previewFromOrigin\n );\n };\n\n sendMessage({ type: \"preview-started\" });\n setPreviewFromOrigin(previewFromOrigin);\n\n let hoverIid: string;\n let hoverAlias: string;\n let activeIid: string;\n let activeAlias: string;\n\n const handleHoverOnIframe = (pos: Position): void => {\n const element = document.elementFromPoint(pos.x, pos.y);\n if (element?.tagName === \"BODY\") {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-main\",\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n } as PreviewMessagePreviewerHoverOnMain,\n previewProxyOrigin\n );\n } else {\n const iidList = getPossibleBrickIidList(element as HTMLElement);\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n },\n previewProxyOrigin\n );\n }\n };\n\n const sendHighlightBrickOutlines = (\n type: \"hover\" | \"active\",\n iid: string,\n alias: string\n ): void => {\n const outlines = getBrickOutlines(iid);\n sendMessage<PreviewMessagePreviewerHighlightBrick>({\n type: \"highlight-brick\",\n highlightType: type,\n outlines,\n iid: iid,\n alias: alias,\n });\n };\n\n const sendHighlightBricksOutlines = (nodes: HighLightNode[]): void => {\n const outlines = nodes\n .map((node) => getBrickOutlines(node.iid, node.alias))\n .flat();\n sendMessage<PreviewMessagePreviewerHighlightContext>({\n type: \"highlight-context\",\n outlines,\n });\n };\n\n let lastTemplatePreviewSettings: PreviewSettings | undefined;\n if (options.templateId) {\n lastTemplatePreviewSettings = options.settings;\n }\n\n const updateTemplatePreviewSettings = (): void => {\n __secret_internals.updateTemplatePreviewSettings(\n options.appId,\n options.templateId!,\n lastTemplatePreviewSettings\n );\n getHistory().reload();\n };\n\n const updateSnippetPreviewSettings = (): void => {\n __secret_internals.updateSnippetPreviewSettings(\n options.appId,\n JSON.parse(options.snippetData)\n );\n getHistory().reload();\n };\n\n /* const updateFormPreviewSettings = (): void => {\n __secret_internals.updateFormPreviewSettings(\n options.appId,\n options.formId,\n options.formData\n );\n getHistory().reload();\n }; */\n\n const handlePreviewData = (name: string, option: PreviewDataOption): void => {\n try {\n const { dataType } = option;\n let tplStateStoreId;\n\n if (dataType === \"state\") {\n tplStateStoreId = getRootTplStateStoreId();\n\n if (!tplStateStoreId) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n error: {\n message:\n \"tplStateStoreId not found, unable to preview STATE value\",\n },\n },\n });\n\n return;\n }\n }\n\n let value, type: PreviewMessagePreviewDataValueSuccess[\"type\"];\n if (name) {\n type = \"inspect-single-data-value-success\";\n value = __secret_internals.getContextValue(name, {\n tplStateStoreId,\n });\n } else {\n type = \"inspect-all-data-values-success\";\n const data = __secret_internals.getAllContextValues({\n tplStateStoreId,\n });\n value = Object.entries(data).map(([name, value]) => ({ name, value }));\n }\n\n sendMessage<PreviewMessagePreviewDataValueSuccess>({\n type,\n data: {\n name,\n value,\n },\n });\n\n // istanbul ignore next\n } catch (error) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n message: (error as Error).message,\n },\n });\n }\n };\n\n const history = getHistory();\n\n window.addEventListener(\n \"message\",\n async ({ data, origin }: MessageEvent<PreviewMessageToPreviewer>) => {\n if (\n origin !== previewFromOrigin ||\n !data ||\n data.sender !== \"preview-container\"\n ) {\n return;\n }\n if (data.forwardedFor === \"builder\") {\n switch (data.type) {\n case \"hover-on-brick\":\n hoverIid = data.iid;\n hoverAlias = data.alias;\n sendHighlightBrickOutlines(\"hover\", data.iid, data.alias);\n break;\n case \"hover-on-main\":\n sendHighlightBrickOutlines(\"hover\", \"#main-mount-point\", \"root\");\n break;\n case \"hover-on-context\":\n sendHighlightBricksOutlines(data.highlightNodes);\n break;\n case \"select-brick\":\n activeIid = data.iid;\n activeAlias = data.alias;\n sendHighlightBrickOutlines(\"active\", data.iid, data.alias);\n break;\n case \"hover-on-iframe\":\n handleHoverOnIframe(data.position);\n break;\n }\n } else\n switch (data.type) {\n case \"toggle-inspecting\":\n data.enabled ? startInspecting() : stopInspecting();\n break;\n case \"refresh\":\n if (data.options?.updateStoryboardType) {\n if (data.options.updateStoryboardType === \"route\") {\n __secret_internals.updateStoryboardByRoute(\n options.appId,\n data.storyboardPatch as RouteConf\n );\n } else if (data.options.updateStoryboardType === \"template\") {\n __secret_internals.updateStoryboardByTemplate(\n options.appId,\n data.storyboardPatch as CustomTemplate,\n data.options.settings\n );\n } else if (data.options.updateStoryboardType === \"snippet\") {\n __secret_internals.updateStoryboardBySnippet(\n options.appId,\n data.storyboardPatch as {\n snippetId: string;\n bricks: BrickConf[];\n }\n );\n } /* else if (data.options.updateStoryboardType === \"form\") {\n __secret_internals.updateFormPreviewSettings(\n options.appId,\n options.formId,\n data.storyboardPatch as FormDataProperties\n );\n } */\n\n const newContracts = await (\n __secret_internals as any\n ).getAddedContracts?.(data.storyboardPatch, {\n appId: options.appId,\n updateStoryboardType: data.options.updateStoryboardType,\n formId: options.formId,\n collectUsedContracts,\n });\n\n if (!isEmpty(newContracts)) {\n sendMessage<PreviewMessagePreviewContractUpdate>({\n type: \"contract-update\",\n data: {\n add: newContracts,\n },\n });\n } else {\n getHistory().reload();\n }\n\n break;\n }\n __secret_internals.updateStoryboard(\n options.appId,\n data.storyboardPatch\n );\n if (options.templateId) {\n lastTemplatePreviewSettings = data.settings;\n updateTemplatePreviewSettings();\n } /* else if (options.formId || options.formData) {\n updateFormPreviewSettings();\n } */ else if (data.options?.snippetData) {\n options.snippetData = data.options.snippetData;\n updateSnippetPreviewSettings();\n } else {\n getHistory().reload();\n }\n break;\n case \"reload\":\n location.reload();\n break;\n case \"back\":\n history.goBack();\n break;\n case \"forward\":\n history.goForward();\n break;\n case \"capture\":\n capture(data.maxWidth, data.maxHeight).then(\n (screenshot) => {\n sendMessage<PreviewMessagePreviewerCaptureOk>({\n type: \"capture-ok\",\n screenshot,\n });\n },\n () => {\n sendMessage<PreviewMessagePreviewerCaptureFailed>({\n type: \"capture-failed\",\n });\n }\n );\n break;\n case \"inspect-data-value\":\n handlePreviewData(data.name, data.option);\n break;\n case \"update-preview-url\": {\n // Remove origin first.\n const url = data.previewUrl.startsWith(window.origin)\n ? data.previewUrl.substring(window.origin.length)\n : data.previewUrl;\n // Then remove base path.\n const basePath = getBasePath();\n const to = url.startsWith(basePath)\n ? url.substring(basePath.length - 1)\n : url;\n getHistory().push(to);\n break;\n }\n case \"update-preview-route\": {\n options.routePath = data.routePath;\n options.routeExact = data.routeExact;\n syncRouteMatch();\n break;\n }\n /* case \"excute-proxy-method\": {\n const [ref, method, args = []] = data.proxyMethodArgs;\n try {\n const result = document.body.querySelector(ref)[method](...args);\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-success\",\n data: { method: method, res: result },\n });\n } catch (err) {\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-error\",\n data: { method: method, res: err.message },\n });\n }\n break;\n } */\n }\n }\n );\n\n window.addEventListener(\"scroll\", () => {\n sendMessage<PreviewMessagePreviewerScroll>({\n type: \"scroll\",\n scroll: {\n x: window.scrollX,\n y: window.scrollY,\n },\n });\n });\n\n let previewPageMatch = true;\n let currentLocation: NextLocation;\n const sendLocationChange = (loc: NextLocation): void => {\n sendMessage<PreviewMessagePreviewerUrlChange>({\n type: \"url-change\",\n url: location.origin + history.createHref(loc),\n });\n currentLocation = loc;\n syncRouteMatch();\n };\n\n function syncRouteMatch() {\n if (options.routePath) {\n const match = !!matchPath(currentLocation.pathname, {\n path: options.routePath,\n exact: options.routeExact,\n });\n sendMessage<PreviewMessagePreviewerRouteMatchChange>({\n type: \"route-match-change\",\n match,\n });\n\n // Re-update template preview settings once match route again (typically after login).\n if (options.templateId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateTemplatePreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n /* if (options.formId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\");\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild.childNodes.length === 0\n ) {\n updateFormPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n } */\n if (options.snippetData && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateSnippetPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n previewPageMatch = match;\n }\n }\n\n sendLocationChange(history.location);\n\n history.listen(sendLocationChange);\n\n if (options.templateId) {\n updateTemplatePreviewSettings();\n }\n\n /* if (options.formId || options.formData) {\n updateFormPreviewSettings();\n } */\n\n if (options.snippetData) {\n updateSnippetPreviewSettings();\n }\n\n function setupContentScroll() {\n const host = document.querySelector(\"eo-page-view\");\n const element = host?.shadowRoot?.querySelector(\".content\") ?? null;\n if (element !== contentScrollElement) {\n contentScrollElement?.removeEventListener(\"scroll\", onContentScroll);\n element?.addEventListener(\"scroll\", onContentScroll);\n contentScrollElement = element;\n contentScrollHost = host;\n }\n }\n\n function onContentScroll(this: Element) {\n sendMessage<PreviewMessagePreviewerContentScroll>({\n type: \"content-scroll\",\n scroll: {\n x: this.scrollLeft,\n y: this.scrollTop,\n },\n });\n }\n\n __secret_internals.addRealTimeDataInspectHook?.(\n ({ changeType, tplStateStoreId, detail }) => {\n sendMessage<PreviewMessagePreviewerRealTimeDataInspectChange>({\n type: \"real-time-data-inspect-change\",\n changeType,\n tplStateStoreId,\n detail:\n changeType === \"update\"\n ? {\n name: detail.name,\n annotation: getRealTimeDataAnnotation(detail.value),\n }\n : {\n data: Object.fromEntries(\n Object.entries(detail.data).map(([k, v]) => [\n k,\n getRealTimeDataAnnotation(v),\n ])\n ),\n },\n });\n }\n );\n\n let memoizedRootTplStateStoreId: string | undefined;\n\n function setupRealTimeDataInspect(force?: boolean) {\n const tplStateStoreId = options.templateId\n ? getRootTplStateStoreId()\n : undefined;\n if (memoizedRootTplStateStoreId !== tplStateStoreId || force) {\n memoizedRootTplStateStoreId = tplStateStoreId;\n __secret_internals.setRealTimeDataInspectRoot?.({\n tplStateStoreId,\n });\n }\n }\n\n window.addEventListener(\"route.render\", () => {\n setupRealTimeDataInspect(true);\n });\n\n setupContentScroll();\n setupRealTimeDataInspect(true);\n\n const mutationCallback = (): void => {\n setupContentScroll();\n setupRealTimeDataInspect();\n if (hoverIid) {\n sendHighlightBrickOutlines(\"hover\", hoverIid, hoverAlias);\n }\n if (activeIid) {\n sendHighlightBrickOutlines(\"active\", activeIid, activeAlias);\n }\n };\n const mutationObserver = new MutationObserver(\n throttle(mutationCallback, 100, { leading: false })\n );\n mutationObserver.observe(document.body, { subtree: true, childList: true });\n}\n\nfunction getBrickOutlines(iid: string, alias?: string): BrickOutline[] {\n if (!iid) {\n return [];\n }\n const isRoot = iid.includes(\"#\");\n const elements = getElementsIncludingInShadowDOM(iid, isRoot);\n const outlines = getOutlines(elements, alias);\n return isRoot\n ? outlines.map((item) => ({\n ...item,\n height: window.innerHeight - item.top,\n }))\n : outlines;\n}\n\nfunction getElementsIncludingInShadowDOM(\n iid: string,\n isRoot: boolean\n): HTMLElement[] {\n const elements: HTMLElement[] = [];\n\n function walk(root: Document | ShadowRoot) {\n const candidates = root.querySelectorAll<HTMLElement>(\n isRoot ? iid : `[data-iid=\"${iid}\"]`\n );\n elements.push(...candidates);\n\n // If elements are found in the document, we should stop searching in shadow DOM.\n if (root === document && candidates.length > 0) {\n return;\n }\n\n // These useBrick in v3 bricks will be inside shadow DOM.\n for (const item of root.querySelectorAll(\"*\")) {\n if (item.shadowRoot) {\n walk(item.shadowRoot);\n }\n }\n }\n\n walk(document);\n\n return elements;\n}\n\nfunction getOutlines(elements: HTMLElement[], alias?: string): BrickOutline[] {\n return elements.map((element) => {\n const hasContentScroll = contentScrollHost?.contains(element);\n const { width, height, left, top } = element.getBoundingClientRect();\n return {\n width,\n height,\n left:\n left +\n window.scrollX +\n (hasContentScroll ? contentScrollElement.scrollLeft : 0),\n top:\n top +\n window.scrollY +\n (hasContentScroll ? contentScrollElement.scrollTop : 0),\n alias,\n hasContentScroll,\n };\n });\n}\n\nfunction getRootTplStateStoreId(): string | undefined {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n\n return (mainMountPoint?.firstChild as HTMLElement)?.dataset[\n isV2 ? \"tplContextId\" : \"tplStateStoreId\"\n ];\n}\n"],"names":["collectUsedContracts","storyboard","collection","nodeOrNodes","Set","traverse","node","type","_node$raw","useProvider","raw","add","collect","parseStoryboard","contracts","item","includes","push","customElements","define","createProviderClass","previewProxyOrigin","_capture","_asyncToGenerator","maxWidth","maxHeight","canvas","sourceCanvas","html2canvas","document","body","logging","scale","width","window","innerWidth","height","innerHeight","foreignObjectRendering","targetCanvas","createElement","targetRatio","ratio","wider","finalWidth","finalHeight","getContext","drawImage","toDataURL","resizeScreenshot","Promise","resolve","reject","toBlob","blob","apply","arguments","onClick","event","iidList","preventDefault","stopPropagation","getPossibleBrickTargets","composedPath","length","parent","postMessage","sender","onMouseEvent","hoverOnBrick","throttle","eventTargets","leading","onPointerDown","onPointerMove","onPointerLeave","onContextMenu","position","x","clientX","y","clientY","targets","target","HTMLElement","dataset","iid","getRealTimeDataAnnotation","value","Array","isArray","connected","getHistory","_getHistory","matchPath","_matchPath","__secret_internals","_internals","isV2","_window$BRICK_NEXT_VE","dll","BRICK_NEXT_VERSIONS","startsWith","getHistoryV2","developHelper","developHelperV2","matchPathV2","_objectSpread","getContextValue","name","_ref","tplStateStoreId","tplContextId","getAllContextValues","_ref2","v2Map","Object","fromEntries","map","_ref3","k","v","e","console","error","contentScrollElement","contentScrollHost","connect","_x","_x2","_connect","previewFromOrigin","options","_secret_internals$ad","_secret_internals","hoverIid","hoverAlias","activeIid","activeAlias","sendMessage","message","lastTemplatePreviewSettings","sendHighlightBrickOutlines","alias","outlines","getBrickOutlines","highlightType","templateId","settings","updateTemplatePreviewSettings","appId","reload","updateSnippetPreviewSettings","JSON","parse","snippetData","history","addEventListener","_ref6","_ref5","_data$options","_data$options2","data","origin","forwardedFor","highlightNodes","flat","pos","element","elementFromPoint","tagName","isDirection","brick","cursor","parentElement","getPossibleBrickIidList","handleHoverOnIframe","enabled","removeEventListener","updateStoryboardType","_getAddedContracts","_ref7","updateStoryboardByRoute","storyboardPatch","updateStoryboardByTemplate","updateStoryboardBySnippet","newContracts","getAddedContracts","call","formId","isEmpty","updateStoryboard","location","goBack","goForward","capture","then","screenshot","handlePreviewData","option","dataType","getRootTplStateStoreId","entries","_ref4","url","previewUrl","substring","basePath","getBasePath","to","routePath","routeExact","syncRouteMatch","_x3","scroll","scrollX","scrollY","currentLocation","memoizedRootTplStateStoreId","previewPageMatch","sendLocationChange","loc","createHref","listen","addRealTimeDataInspectHook","_ref8","changeType","detail","annotation","_ref9","setupRealTimeDataInspect","setupContentScroll","MutationObserver","mutationCallback","observe","subtree","childList","match","pathname","path","exact","mainMountPoint","querySelector","placeholderLoadObserver","childNodes","firstChild","disconnect","_host$shadowRoot$quer","_host$shadowRoot","_contentScrollElement","host","shadowRoot","onContentScroll","this","scrollLeft","scrollTop","force","_secret_internals$se","_secret_internals2","undefined","setRealTimeDataInspectRoot","isRoot","elements","walk","root","candidates","querySelectorAll","concat","getElementsIncludingInShadowDOM","_contentScrollHost","hasContentScroll","contains","left","top","getBoundingClientRect","getOutlines","_mainMountPoint$first"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/9027.bdf6692f.js","mappings":"6LAgCO,SAASA,EAAqBC,GACnC,IAAMC,EArBR,SAAiBC,GACf,IAAMD,EAAa,IAAIE,IAgBvB,OAdAC,EAAAA,EAAAA,GAASF,GAAcG,IACrB,OAAQA,EAAKC,MACX,IAAK,aACL,IAAK,eAAgB,IAAAC,EACbC,EACI,QADOD,EACfF,EAAKI,WAAG,IAAAF,OAAA,EADUA,EAEjBC,YACCA,GACFP,EAAWS,IAAIF,GAGrB,IAGKP,CACT,CAGqBU,EAAQC,EAAAA,EAAAA,IAAgBZ,IAErCa,EAAY,GAElB,IAAK,IAAMC,KAAQb,EACba,EAAKC,SAAS,MAChBF,EAAUG,KAAKF,GAInB,OAAOD,CACT,CAEAI,eAAeC,OACb,yCACAC,EAAAA,EAAAA,qBAAoBpB,G,sCCvCXqB,E,2DCsBV,SAAAC,IAAA,OAAAA,GAAAC,EAAAA,EAAAA,IAfM,UACLC,EACAC,GAEA,IAhBqBC,EAgBfC,QAAqBC,IAAYC,SAASC,KAAM,CACpDC,SAAS,EACTC,MAAO,EACPC,MAAOC,OAAOC,WACdC,OAAQF,OAAOG,YACfC,wBAAwB,IAEpBC,EAAeV,SAASW,cAAc,UAG5C,OC9BK,SACLd,EACAa,EACAf,EACAC,GAEA,IAAMgB,EAAcjB,EAAWC,GACzB,MA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SAASC,EAAKC,GACZ,IAAMC,EAAaD,EAAKE,iBACtBL,EAAS/K,EAAM,cAAHqL,OAAiBrL,EAAG,OAKlC,GAHAgL,EAASrP,QAAQwP,KAGbD,IAAS3O,UAAY4O,EAAWzM,OAAS,GAK7C,IAAK,IAAMjD,KAAQyP,EAAKE,iBAAiB,KACnC3P,EAAK4O,YACPY,EAAKxP,EAAK4O,WAGhB,CAEAY,CAAK1O,UAEEyO,CACT,CAtCmBM,CAAgCtL,EAAK+K,GAChDrH,EAuCR,SAAqBsH,EAAyBvH,GAC5C,OAAOuH,EAAShJ,KAAKkD,IAAY,IAAAqG,EACzBC,EAAoC,QAApBD,EAAG/I,SAAiB,IAAA+I,OAAA,EAAjBA,EAAmBE,SAASvG,IAC/C,MAAEvI,EAAK,OAAEG,EAAM,KAAE4O,EAAI,IAAEC,GAAQzG,EAAQ0G,wBAC7C,MAAO,CACLjP,QACAG,SACA4O,KACEA,EACA9O,OAAOqL,SACNuD,EAAmBjJ,EAAqBiI,WAAa,GACxDmB,IACEA,EACA/O,OAAOsL,SACNsD,EAAmBjJ,EAAqBkI,UAAY,GACvDhH,QACA+H,mBACD,GAEL,CA1DmBK,CAAYb,EAAUvH,GACvC,OAAOsH,EACHrH,EAAS1B,KAAKvG,IAAI4F,EAAAA,EAAAA,IAAAA,EAAAA,EAAAA,GAAA,GACb5F,GAAI,IACPqB,OAAQF,OAAOG,YAActB,EAAKkQ,QAEpCjI,CACN,CAqDA,SAASyD,IAA6C,IAAA2E,EAC9CnC,EAAiBpN,SAASqN,cAAc,qBAE9C,OAAQD,SAA0B,QAAZmC,EAAdnC,EAAgBI,kBAAU,IAAA+B,OAAA,EAA3BA,EAA6C/L,QAClDa,EAAO,eAAiB,kBAE5B,C","sources":["webpack:///./src/data-providers/collect-used-contracts.ts","webpack:///./src/data-providers/preview/inspector.ts","webpack:///./src/data-providers/preview/capture.ts","webpack:///./src/data-providers/preview/resizeScreenshot.ts","webpack:///./src/data-providers/preview/realTimeDataInspect.ts","webpack:///./src/data-providers/preview/connect.ts"],"sourcesContent":["import { createProviderClass } from \"@next-core/utils/general\";\nimport {\n type StoryboardNode,\n parseStoryboard,\n traverse,\n} from \"@next-core/storyboard\";\nimport {\n Storyboard,\n UseProviderResolveConf,\n UseProviderEventHandler,\n} from \"@next-core/types\";\n\nfunction collect(nodeOrNodes: StoryboardNode | StoryboardNode[]): Set<string> {\n const collection = new Set<string>();\n\n traverse(nodeOrNodes, (node) => {\n switch (node.type) {\n case \"Resolvable\":\n case \"EventHandler\": {\n const useProvider = (\n node.raw as UseProviderResolveConf | UseProviderEventHandler\n )?.useProvider;\n if (useProvider) {\n collection.add(useProvider);\n }\n }\n }\n });\n\n return collection;\n}\n\nexport function collectUsedContracts(storyboard: Storyboard): string[] {\n const collection = collect(parseStoryboard(storyboard as any));\n\n const contracts = [];\n\n for (const item of collection) {\n if (item.includes(\"@\")) {\n contracts.push(item);\n }\n }\n\n return contracts;\n}\n\ncustomElements.define(\n \"visual-builder.collect-used-contracts\",\n createProviderClass(collectUsedContracts)\n);\n","// istanbul ignore file: working in progress\n// https://github.com/facebook/react/blob/cae635054e17a6f107a39d328649137b83f25972/packages/react-devtools-shared/src/backend/views/Highlighter/index.js\nimport { throttle } from \"lodash\";\nimport type {\n PreviewMessagePreviewerHoverOnBrick,\n PreviewMessagePreviewerSelectBrick,\n PreviewMessagePreviewerContextMenuOnBrick,\n} from \"./interfaces.js\";\n\nexport let previewProxyOrigin: string;\n\nexport function setPreviewFromOrigin(origin: string): void {\n previewProxyOrigin = origin;\n}\n\nexport function startInspecting(): void {\n registerListeners();\n}\n\nexport function stopInspecting(): void {\n unregisterListeners();\n}\n\nfunction registerListeners(): void {\n window.addEventListener(\"click\", onClick, true);\n window.addEventListener(\"mousedown\", onMouseEvent, true);\n window.addEventListener(\"mouseover\", onMouseEvent, true);\n window.addEventListener(\"mouseup\", onMouseEvent, true);\n window.addEventListener(\"pointerdown\", onPointerDown, true);\n window.addEventListener(\"pointermove\", onPointerMove, true);\n window.addEventListener(\"pointerup\", onMouseEvent, true);\n window.addEventListener(\"pointerleave\", onPointerLeave, true);\n window.addEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction unregisterListeners(): void {\n window.removeEventListener(\"click\", onClick, true);\n window.removeEventListener(\"mousedown\", onMouseEvent, true);\n window.removeEventListener(\"mouseover\", onMouseEvent, true);\n window.removeEventListener(\"mouseup\", onMouseEvent, true);\n window.removeEventListener(\"pointerdown\", onPointerDown, true);\n window.removeEventListener(\"pointermove\", onPointerMove, true);\n window.removeEventListener(\"pointerup\", onMouseEvent, true);\n window.removeEventListener(\"pointerleave\", onPointerLeave, true);\n window.removeEventListener(\"contextmenu\", onContextMenu, true);\n}\n\nfunction onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n selectBrick(event.composedPath());\n}\n\nfunction onMouseEvent(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst hoverOnBrick = throttle(\n (eventTargets: EventTarget[]) => {\n const iidList = getPossibleBrickTargets(eventTargets);\n\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n }\n },\n 100,\n { leading: false }\n);\n\nfunction onPointerDown(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerMove(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n hoverOnBrick(event.composedPath());\n}\n\nfunction onPointerLeave(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList: [],\n } as PreviewMessagePreviewerHoverOnBrick,\n previewProxyOrigin\n );\n}\n\nfunction onContextMenu(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n contextMenuOnBrick(event.composedPath(), {\n x: event.clientX,\n y: event.clientY,\n });\n}\n\nfunction contextMenuOnBrick(\n eventTargets: EventTarget[],\n position: {\n x: number;\n y: number;\n }\n): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"context-menu-on-brick\",\n iidList,\n position,\n } as PreviewMessagePreviewerContextMenuOnBrick,\n previewProxyOrigin\n );\n }\n}\n\nfunction selectBrick(eventTargets: EventTarget[]): void {\n const iidList = getPossibleBrickTargets(eventTargets);\n if (iidList.length > 0) {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"select-brick\",\n iidList,\n } as PreviewMessagePreviewerSelectBrick,\n previewProxyOrigin\n );\n }\n}\n\nexport function getPossibleBrickIidList(brick: HTMLElement): string[] {\n const iidList: string[] = [];\n // Traverse from bottom to up, to find bricks current hover on.\n let cursor: HTMLElement | null = brick;\n while (cursor) {\n if (typeof cursor.dataset.iid === \"string\") {\n iidList.push(cursor.dataset.iid);\n }\n cursor = cursor.parentElement;\n }\n return iidList;\n}\n\nexport function getPossibleBrickTargets(eventTargets: EventTarget[]) {\n const targets: string[] = [];\n for (const target of eventTargets) {\n if (\n target instanceof HTMLElement &&\n typeof target.dataset.iid === \"string\"\n ) {\n targets.push(target.dataset.iid);\n }\n }\n return targets;\n}\n","// istanbul ignore file: nothing logical except calling html2canvas.\nimport html2canvas from \"html2canvas\";\nimport { resizeScreenshot } from \"./resizeScreenshot.js\";\n\nfunction getCanvasBlob(canvas: HTMLCanvasElement): Promise<Blob> {\n return new Promise(function (resolve, reject) {\n canvas.toBlob(function (blob: Blob | null) {\n if (blob) {\n resolve(blob);\n } else {\n reject();\n }\n });\n });\n}\n\nexport async function capture(\n maxWidth: number,\n maxHeight: number\n): Promise<Blob> {\n const sourceCanvas = await html2canvas(document.body, {\n logging: false,\n scale: 1,\n width: window.innerWidth,\n height: window.innerHeight,\n foreignObjectRendering: true,\n });\n const targetCanvas = document.createElement(\"canvas\");\n resizeScreenshot(sourceCanvas, targetCanvas, maxWidth, maxHeight);\n const blob = await getCanvasBlob(targetCanvas);\n return blob;\n}\n","export function resizeScreenshot(\n canvas: HTMLCanvasElement,\n targetCanvas: HTMLCanvasElement,\n maxWidth: number,\n maxHeight: number\n): string {\n const targetRatio = maxWidth / maxHeight;\n const { width, height } = canvas;\n const ratio = width / height;\n const wider = ratio >= targetRatio;\n const finalWidth = wider ? maxWidth : maxHeight * ratio;\n const finalHeight = wider ? maxWidth / ratio : maxHeight;\n targetCanvas.width = finalWidth;\n targetCanvas.height = finalHeight;\n\n const ctx = targetCanvas.getContext(\"2d\")!;\n ctx.drawImage(canvas, 0, 0, width, height, 0, 0, finalWidth, finalHeight);\n return targetCanvas.toDataURL();\n}\n","export function getRealTimeDataAnnotation(value: unknown) {\n const type = typeof value;\n switch (type) {\n case \"string\":\n case \"boolean\":\n case \"number\":\n return {\n type,\n value,\n };\n case \"undefined\":\n return { type };\n }\n if (value === null) {\n return { type: \"null\" };\n }\n if (Array.isArray(value)) {\n return { type: \"array\", length: value.length };\n }\n return { type: \"object\" };\n}\n","import {\n getHistory as _getHistory,\n getBasePath,\n matchPath as _matchPath,\n __secret_internals as _internals,\n type NextLocation,\n} from \"@next-core/runtime\";\nimport type { BrickConf, CustomTemplate, RouteConf } from \"@next-core/types\";\nimport { isEmpty, throttle } from \"lodash\";\nimport type {\n BrickOutline,\n HighLightNode,\n Position,\n PreviewDataOption,\n PreviewMessageFromPreviewer,\n PreviewMessagePreviewContractUpdate,\n PreviewMessagePreviewDataValueError,\n PreviewMessagePreviewDataValueSuccess,\n PreviewMessagePreviewerCaptureFailed,\n PreviewMessagePreviewerCaptureOk,\n PreviewMessagePreviewerContentScroll,\n PreviewMessagePreviewerHighlightBrick,\n PreviewMessagePreviewerHighlightContext,\n PreviewMessagePreviewerHoverOnMain,\n PreviewMessagePreviewerRealTimeDataInspectChange,\n PreviewMessagePreviewerRouteMatchChange,\n PreviewMessagePreviewerScroll,\n PreviewMessagePreviewerUrlChange,\n PreviewMessageToPreviewer,\n PreviewSettings,\n PreviewStartOptions,\n} from \"./interfaces.js\";\nimport { capture } from \"./capture.js\";\nimport {\n previewProxyOrigin,\n getPossibleBrickIidList,\n setPreviewFromOrigin,\n startInspecting,\n stopInspecting,\n} from \"./inspector.js\";\nimport { collectUsedContracts } from \"../collect-used-contracts.js\";\nimport { getRealTimeDataAnnotation } from \"./realTimeDataInspect.js\";\n\nlet connected = false;\n\ninterface DLL {\n (moduleId: \"tYg3\"): {\n getHistory: typeof _getHistory;\n developHelper: typeof _internals;\n };\n (moduleId: \"A+yw\"): {\n matchPath: typeof _matchPath;\n };\n}\n\nlet getHistory = _getHistory;\nlet matchPath = _matchPath;\nlet __secret_internals = _internals;\nlet isV2 = false;\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\ntry {\n const dll = (window as unknown as { dll?: DLL }).dll;\n if (\n dll &&\n window.BRICK_NEXT_VERSIONS?.[\"brick-container\"]?.startsWith(\"2.\")\n ) {\n const { getHistory: getHistoryV2, developHelper: developHelperV2 } =\n dll(\"tYg3\");\n const { matchPath: matchPathV2 } = dll(\"A+yw\");\n getHistory = getHistoryV2;\n matchPath = matchPathV2;\n // The `__secret_internals` of v3 has pretty the same API as\n // `developHelper` of v2, especially those for preview usage.\n __secret_internals = {\n ...developHelperV2,\n getContextValue(name, { tplStateStoreId }) {\n return developHelperV2.getContextValue(name, {\n tplContextId: tplStateStoreId,\n } as any);\n },\n getAllContextValues({ tplStateStoreId }) {\n // V3 returns an object of key-value.\n // While v2 returns a map of ContextItem.\n const v2Map = developHelperV2.getAllContextValues({\n tplContextId: tplStateStoreId,\n } as any) as unknown as Map<string, { value: unknown }>;\n return Object.fromEntries(\n [...v2Map].map(([k, v]) => [k, (v as any).value])\n );\n },\n };\n isV2 = true;\n }\n} catch (e) {\n // eslint-disable-next-line no-console\n console.error(\"Try to use v2 runtime APIs failed:\", e);\n}\n\nlet contentScrollElement: Element | null = null;\nlet contentScrollHost: Element | null = null;\n\nexport default async function connect(\n previewFromOrigin: string,\n options: PreviewStartOptions\n) {\n if (connected) {\n return;\n }\n connected = true;\n\n const sendMessage = <T extends PreviewMessageFromPreviewer>(\n message: Omit<T, \"sender\">\n ): void => {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n ...message,\n },\n previewFromOrigin\n );\n };\n\n sendMessage({ type: \"preview-started\" });\n setPreviewFromOrigin(previewFromOrigin);\n\n let hoverIid: string;\n let hoverAlias: string;\n let activeIid: string;\n let activeAlias: string;\n\n const handleHoverOnIframe = (pos: Position): void => {\n const element = document.elementFromPoint(pos.x, pos.y);\n if (element?.tagName === \"BODY\") {\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-main\",\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n } as PreviewMessagePreviewerHoverOnMain,\n previewProxyOrigin\n );\n } else {\n const iidList = getPossibleBrickIidList(element as HTMLElement);\n window.parent.postMessage(\n {\n sender: \"previewer\",\n type: \"hover-on-brick\",\n iidList,\n isDirection: true,\n position: {\n x: pos.x,\n y: pos.y,\n },\n },\n previewProxyOrigin\n );\n }\n };\n\n const sendHighlightBrickOutlines = (\n type: \"hover\" | \"active\",\n iid: string,\n alias: string\n ): void => {\n const outlines = getBrickOutlines(iid);\n sendMessage<PreviewMessagePreviewerHighlightBrick>({\n type: \"highlight-brick\",\n highlightType: type,\n outlines,\n iid: iid,\n alias: alias,\n });\n };\n\n const sendHighlightBricksOutlines = (nodes: HighLightNode[]): void => {\n const outlines = nodes\n .map((node) => getBrickOutlines(node.iid, node.alias))\n .flat();\n sendMessage<PreviewMessagePreviewerHighlightContext>({\n type: \"highlight-context\",\n outlines,\n });\n };\n\n let lastTemplatePreviewSettings: PreviewSettings | undefined;\n if (options.templateId) {\n lastTemplatePreviewSettings = options.settings;\n }\n\n const updateTemplatePreviewSettings = (): void => {\n __secret_internals.updateTemplatePreviewSettings(\n options.appId,\n options.templateId!,\n lastTemplatePreviewSettings\n );\n getHistory().reload();\n };\n\n const updateSnippetPreviewSettings = (): void => {\n __secret_internals.updateSnippetPreviewSettings(\n options.appId,\n JSON.parse(options.snippetData)\n );\n getHistory().reload();\n };\n\n /* const updateFormPreviewSettings = (): void => {\n __secret_internals.updateFormPreviewSettings(\n options.appId,\n options.formId,\n options.formData\n );\n getHistory().reload();\n }; */\n\n const handlePreviewData = (name: string, option: PreviewDataOption): void => {\n try {\n const { dataType } = option;\n let tplStateStoreId;\n\n if (dataType === \"state\") {\n tplStateStoreId = getRootTplStateStoreId();\n\n if (!tplStateStoreId) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n error: {\n message:\n \"tplStateStoreId not found, unable to preview STATE value\",\n },\n },\n });\n\n return;\n }\n }\n\n let value, type: PreviewMessagePreviewDataValueSuccess[\"type\"];\n if (name) {\n type = \"inspect-single-data-value-success\";\n value = __secret_internals.getContextValue(name, {\n tplStateStoreId,\n });\n } else {\n type = \"inspect-all-data-values-success\";\n const data = __secret_internals.getAllContextValues({\n tplStateStoreId,\n });\n value = Object.entries(data).map(([name, value]) => ({ name, value }));\n }\n\n sendMessage<PreviewMessagePreviewDataValueSuccess>({\n type,\n data: {\n name,\n value,\n },\n });\n\n // istanbul ignore next\n } catch (error) {\n sendMessage<PreviewMessagePreviewDataValueError>({\n type: \"inspect-data-value-error\",\n data: {\n message: (error as Error).message,\n },\n });\n }\n };\n\n const history = getHistory();\n\n window.addEventListener(\n \"message\",\n async ({ data, origin }: MessageEvent<PreviewMessageToPreviewer>) => {\n if (\n origin !== previewFromOrigin ||\n !data ||\n data.sender !== \"preview-container\"\n ) {\n return;\n }\n if (data.forwardedFor === \"builder\") {\n switch (data.type) {\n case \"hover-on-brick\":\n hoverIid = data.iid;\n hoverAlias = data.alias;\n sendHighlightBrickOutlines(\"hover\", data.iid, data.alias);\n break;\n case \"hover-on-main\":\n sendHighlightBrickOutlines(\"hover\", \"#main-mount-point\", \"root\");\n break;\n case \"hover-on-context\":\n sendHighlightBricksOutlines(data.highlightNodes);\n break;\n case \"select-brick\":\n activeIid = data.iid;\n activeAlias = data.alias;\n sendHighlightBrickOutlines(\"active\", data.iid, data.alias);\n break;\n case \"hover-on-iframe\":\n handleHoverOnIframe(data.position);\n break;\n }\n } else\n switch (data.type) {\n case \"toggle-inspecting\":\n data.enabled ? startInspecting() : stopInspecting();\n break;\n case \"refresh\":\n if (data.options?.updateStoryboardType) {\n if (data.options.updateStoryboardType === \"route\") {\n __secret_internals.updateStoryboardByRoute(\n options.appId,\n data.storyboardPatch as RouteConf\n );\n } else if (data.options.updateStoryboardType === \"template\") {\n __secret_internals.updateStoryboardByTemplate(\n options.appId,\n data.storyboardPatch as CustomTemplate,\n data.options.settings\n );\n } else if (data.options.updateStoryboardType === \"snippet\") {\n __secret_internals.updateStoryboardBySnippet(\n options.appId,\n data.storyboardPatch as {\n snippetId: string;\n bricks: BrickConf[];\n }\n );\n } /* else if (data.options.updateStoryboardType === \"form\") {\n __secret_internals.updateFormPreviewSettings(\n options.appId,\n options.formId,\n data.storyboardPatch as FormDataProperties\n );\n } */\n\n const newContracts = await (\n __secret_internals as any\n ).getAddedContracts?.(data.storyboardPatch, {\n appId: options.appId,\n updateStoryboardType: data.options.updateStoryboardType,\n formId: options.formId,\n collectUsedContracts,\n });\n\n if (!isEmpty(newContracts)) {\n sendMessage<PreviewMessagePreviewContractUpdate>({\n type: \"contract-update\",\n data: {\n add: newContracts,\n },\n });\n } else {\n getHistory().reload();\n }\n\n break;\n }\n __secret_internals.updateStoryboard(\n options.appId,\n data.storyboardPatch\n );\n if (options.templateId) {\n lastTemplatePreviewSettings = data.settings;\n updateTemplatePreviewSettings();\n } /* else if (options.formId || options.formData) {\n updateFormPreviewSettings();\n } */ else if (data.options?.snippetData) {\n options.snippetData = data.options.snippetData;\n updateSnippetPreviewSettings();\n } else {\n getHistory().reload();\n }\n break;\n case \"reload\":\n location.reload();\n break;\n case \"back\":\n history.goBack();\n break;\n case \"forward\":\n history.goForward();\n break;\n case \"capture\":\n capture(data.maxWidth, data.maxHeight).then(\n (screenshot) => {\n sendMessage<PreviewMessagePreviewerCaptureOk>({\n type: \"capture-ok\",\n screenshot,\n });\n },\n () => {\n sendMessage<PreviewMessagePreviewerCaptureFailed>({\n type: \"capture-failed\",\n });\n }\n );\n break;\n case \"inspect-data-value\":\n handlePreviewData(data.name, data.option);\n break;\n case \"update-preview-url\": {\n // Remove origin first.\n const url = data.previewUrl.startsWith(window.origin)\n ? data.previewUrl.substring(window.origin.length)\n : data.previewUrl;\n // Then remove base path.\n const basePath = getBasePath();\n const to = url.startsWith(basePath)\n ? url.substring(basePath.length - 1)\n : url;\n getHistory().push(to);\n break;\n }\n case \"update-preview-route\": {\n options.routePath = data.routePath;\n options.routeExact = data.routeExact;\n syncRouteMatch();\n break;\n }\n /* case \"excute-proxy-method\": {\n const [ref, method, args = []] = data.proxyMethodArgs;\n try {\n const result = document.body.querySelector(ref)[method](...args);\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-success\",\n data: { method: method, res: result },\n });\n } catch (err) {\n window.parent.postMessage({\n sender: \"previewer\",\n type: \"excute-proxy-method-error\",\n data: { method: method, res: err.message },\n });\n }\n break;\n } */\n }\n }\n );\n\n window.addEventListener(\"scroll\", () => {\n sendMessage<PreviewMessagePreviewerScroll>({\n type: \"scroll\",\n scroll: {\n x: window.scrollX,\n y: window.scrollY,\n },\n });\n });\n\n let previewPageMatch = true;\n let currentLocation: NextLocation;\n const sendLocationChange = (loc: NextLocation): void => {\n sendMessage<PreviewMessagePreviewerUrlChange>({\n type: \"url-change\",\n url: location.origin + history.createHref(loc),\n });\n currentLocation = loc;\n syncRouteMatch();\n };\n\n function syncRouteMatch() {\n if (options.routePath) {\n const match = !!matchPath(currentLocation.pathname, {\n path: options.routePath,\n exact: options.routeExact,\n });\n sendMessage<PreviewMessagePreviewerRouteMatchChange>({\n type: \"route-match-change\",\n match,\n });\n\n // Re-update template preview settings once match route again (typically after login).\n if (options.templateId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateTemplatePreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n /* if (options.formId && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\");\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild.childNodes.length === 0\n ) {\n updateFormPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n } */\n if (options.snippetData && !previewPageMatch && match) {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n const placeholderLoadObserver = new MutationObserver(() => {\n // We observe when the placeholder is appeared.\n if (\n mainMountPoint.childNodes.length === 1 &&\n (mainMountPoint.firstChild as HTMLElement).tagName === \"SPAN\" &&\n mainMountPoint.firstChild!.childNodes.length === 0\n ) {\n updateSnippetPreviewSettings();\n placeholderLoadObserver.disconnect();\n }\n });\n placeholderLoadObserver.observe(mainMountPoint, { childList: true });\n }\n previewPageMatch = match;\n }\n }\n\n sendLocationChange(history.location);\n\n history.listen(sendLocationChange);\n\n if (options.templateId) {\n updateTemplatePreviewSettings();\n }\n\n /* if (options.formId || options.formData) {\n updateFormPreviewSettings();\n } */\n\n if (options.snippetData) {\n updateSnippetPreviewSettings();\n }\n\n function setupContentScroll() {\n const host = document.querySelector(\"eo-page-view\");\n const element = host?.shadowRoot?.querySelector(\".content\") ?? null;\n if (element !== contentScrollElement) {\n contentScrollElement?.removeEventListener(\"scroll\", onContentScroll);\n element?.addEventListener(\"scroll\", onContentScroll);\n contentScrollElement = element;\n contentScrollHost = host;\n }\n }\n\n function onContentScroll(this: Element) {\n sendMessage<PreviewMessagePreviewerContentScroll>({\n type: \"content-scroll\",\n scroll: {\n x: this.scrollLeft,\n y: this.scrollTop,\n },\n });\n }\n\n __secret_internals.addRealTimeDataInspectHook?.(\n ({ changeType, tplStateStoreId, detail }) => {\n sendMessage<PreviewMessagePreviewerRealTimeDataInspectChange>({\n type: \"real-time-data-inspect-change\",\n changeType,\n tplStateStoreId,\n detail:\n changeType === \"update\"\n ? {\n name: detail.name,\n annotation: getRealTimeDataAnnotation(detail.value),\n }\n : {\n data: Object.fromEntries(\n Object.entries(detail.data).map(([k, v]) => [\n k,\n getRealTimeDataAnnotation(v),\n ])\n ),\n },\n });\n }\n );\n\n let memoizedRootTplStateStoreId: string | undefined;\n\n function setupRealTimeDataInspect(force?: boolean) {\n const tplStateStoreId = options.templateId\n ? getRootTplStateStoreId()\n : undefined;\n if (memoizedRootTplStateStoreId !== tplStateStoreId || force) {\n memoizedRootTplStateStoreId = tplStateStoreId;\n __secret_internals.setRealTimeDataInspectRoot?.({\n tplStateStoreId,\n });\n }\n }\n\n window.addEventListener(\"route.render\", () => {\n setupRealTimeDataInspect(true);\n });\n\n setupContentScroll();\n setupRealTimeDataInspect(true);\n\n const mutationCallback = (): void => {\n setupContentScroll();\n setupRealTimeDataInspect();\n if (hoverIid) {\n sendHighlightBrickOutlines(\"hover\", hoverIid, hoverAlias);\n }\n if (activeIid) {\n sendHighlightBrickOutlines(\"active\", activeIid, activeAlias);\n }\n };\n const mutationObserver = new MutationObserver(\n throttle(mutationCallback, 100, { leading: false })\n );\n mutationObserver.observe(document.body, { subtree: true, childList: true });\n}\n\nfunction getBrickOutlines(iid: string, alias?: string): BrickOutline[] {\n if (!iid) {\n return [];\n }\n const isRoot = iid.includes(\"#\");\n const elements = getElementsIncludingInShadowDOM(iid, isRoot);\n const outlines = getOutlines(elements, alias);\n return isRoot\n ? outlines.map((item) => ({\n ...item,\n height: window.innerHeight - item.top,\n }))\n : outlines;\n}\n\nfunction getElementsIncludingInShadowDOM(\n iid: string,\n isRoot: boolean\n): HTMLElement[] {\n const elements: HTMLElement[] = [];\n\n function walk(root: Document | ShadowRoot) {\n const candidates = root.querySelectorAll<HTMLElement>(\n isRoot ? iid : `[data-iid=\"${iid}\"]`\n );\n elements.push(...candidates);\n\n // If elements are found in the document, we should stop searching in shadow DOM.\n if (root === document && candidates.length > 0) {\n return;\n }\n\n // These useBrick in v3 bricks will be inside shadow DOM.\n for (const item of root.querySelectorAll(\"*\")) {\n if (item.shadowRoot) {\n walk(item.shadowRoot);\n }\n }\n }\n\n walk(document);\n\n return elements;\n}\n\nfunction getOutlines(elements: HTMLElement[], alias?: string): BrickOutline[] {\n return elements.map((element) => {\n const hasContentScroll = contentScrollHost?.contains(element);\n const { width, height, left, top } = element.getBoundingClientRect();\n return {\n width,\n height,\n left:\n left +\n window.scrollX +\n (hasContentScroll ? contentScrollElement.scrollLeft : 0),\n top:\n top +\n window.scrollY +\n (hasContentScroll ? contentScrollElement.scrollTop : 0),\n alias,\n hasContentScroll,\n };\n });\n}\n\nfunction getRootTplStateStoreId(): string | undefined {\n const mainMountPoint = document.querySelector(\"#main-mount-point\")!;\n\n return (mainMountPoint?.firstChild as HTMLElement)?.dataset[\n isV2 ? \"tplContextId\" : \"tplStateStoreId\"\n ];\n}\n"],"names":["collectUsedContracts","storyboard","collection","nodeOrNodes","Set","traverse","node","type","_node$raw","useProvider","raw","add","collect","parseStoryboard","contracts","item","includes","push","customElements","define","createProviderClass","previewProxyOrigin","_capture","_asyncToGenerator","maxWidth","maxHeight","canvas","sourceCanvas","html2canvas","document","body","logging","scale","width","window","innerWidth","height","innerHeight","foreignObjectRendering","targetCanvas","createElement","targetRatio","ratio","wider","finalWidth","finalHeight","getContext","drawImage","toDataURL","resizeScreenshot","Promise","resolve","reject","toBlob","blob","apply","arguments","onClick","event","iidList","preventDefault","stopPropagation","getPossibleBrickTargets","composedPath","length","parent","postMessage","sender","onMouseEvent","hoverOnBrick","throttle","eventTargets","leading","onPointerDown","onPointerMove","onPointerLeave","onContextMenu","position","x","clientX","y","clientY","targets","target","HTMLElement","dataset","iid","getRealTimeDataAnnotation","value","Array","isArray","connected","getHistory","_getHistory","matchPath","_matchPath","__secret_internals","_internals","isV2","_window$BRICK_NEXT_VE","dll","BRICK_NEXT_VERSIONS","startsWith","getHistoryV2","developHelper","developHelperV2","matchPathV2","_objectSpread","getContextValue","name","_ref","tplStateStoreId","tplContextId","getAllContextValues","_ref2","v2Map","Object","fromEntries","map","_ref3","k","v","e","console","error","contentScrollElement","contentScrollHost","connect","_x","_x2","_connect","previewFromOrigin","options","_secret_internals$ad","_secret_internals","hoverIid","hoverAlias","activeIid","activeAlias","sendMessage","message","lastTemplatePreviewSettings","sendHighlightBrickOutlines","alias","outlines","getBrickOutlines","highlightType","templateId","settings","updateTemplatePreviewSettings","appId","reload","updateSnippetPreviewSettings","JSON","parse","snippetData","history","addEventListener","_ref6","_ref5","_data$options","_data$options2","data","origin","forwardedFor","highlightNodes","flat","pos","element","elementFromPoint","tagName","isDirection","brick","cursor","parentElement","getPossibleBrickIidList","handleHoverOnIframe","enabled","removeEventListener","updateStoryboardType","_getAddedContracts","_ref7","updateStoryboardByRoute","storyboardPatch","updateStoryboardByTemplate","updateStoryboardBySnippet","newContracts","getAddedContracts","call","formId","isEmpty","updateStoryboard","location","goBack","goForward","capture","then","screenshot","handlePreviewData","option","dataType","getRootTplStateStoreId","entries","_ref4","url","previewUrl","substring","basePath","getBasePath","to","routePath","routeExact","syncRouteMatch","_x3","scroll","scrollX","scrollY","currentLocation","memoizedRootTplStateStoreId","previewPageMatch","sendLocationChange","loc","createHref","listen","addRealTimeDataInspectHook","_ref8","changeType","detail","annotation","_ref9","setupRealTimeDataInspect","setupContentScroll","MutationObserver","mutationCallback","observe","subtree","childList","match","pathname","path","exact","mainMountPoint","querySelector","placeholderLoadObserver","childNodes","firstChild","disconnect","_host$shadowRoot$quer","_host$shadowRoot","_contentScrollElement","host","shadowRoot","onContentScroll","this","scrollLeft","scrollTop","force","_secret_internals$se","_secret_internals2","undefined","setRealTimeDataInspectRoot","isRoot","elements","walk","root","candidates","querySelectorAll","concat","getElementsIncludingInShadowDOM","_contentScrollHost","hasContentScroll","contains","left","top","getBoundingClientRect","getOutlines","_mainMountPoint$first"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_next_bricks_visual_builder=self.webpackChunk_next_bricks_visual_builder||[]).push([[9515],{9515:(e,t,n)=>{var i=n(9142);e.exports=i},9142:(e,t,n)=>{var i=n(5506),r=n(6384);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(5417),e.exports.Schema=n(2290),e.exports.FAILSAFE_SCHEMA=n(8028),e.exports.JSON_SCHEMA=n(8739),e.exports.CORE_SCHEMA=n(8774),e.exports.DEFAULT_SAFE_SCHEMA=n(9590),e.exports.DEFAULT_FULL_SCHEMA=n(2846),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=r.dump,e.exports.safeDump=r.safeDump,e.exports.YAMLException=n(1796),e.exports.MINIMAL_SCHEMA=n(8028),e.exports.SAFE_SCHEMA=n(9590),e.exports.DEFAULT_SCHEMA=n(2846),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},3780:e=>{function t(e){return null==e}e.exports.isNothing=t,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:t(e)?[]:[e]},e.exports.repeat=function(e,t){var n,i="";for(n=0;n<t;n+=1)i+=e;return i},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,i,r,o;if(t)for(n=0,i=(o=Object.keys(t)).length;n<i;n+=1)e[r=o[n]]=t[r];return e}},6384:(e,t,n)=>{var i=n(3780),r=n(1796),o=n(2846),a=n(9590),s=Object.prototype.toString,c=Object.prototype.hasOwnProperty,u=9,l=10,p=13,f=32,d=33,h=34,g=35,m=37,y=38,v=39,A=42,x=44,b=45,w=58,k=61,C=62,O=63,S=64,I=91,E=93,j=96,F=123,N=124,M=125,T={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function L(e){var t,n,o;if(t=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else{if(!(e<=4294967295))throw new r("code point within a string may not be greater than 0xFFFFFFFF");n="U",o=8}return"\\"+n+i.repeat("0",o-t.length)+t}function D(e){this.schema=e.schema||o,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=i.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,i,r,o,a,s,u;if(null===t)return{};for(n={},r=0,o=(i=Object.keys(t)).length;r<o;r+=1)a=i[r],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(u=e.compiledTypeMap.fallback[a])&&c.call(u.styleAliases,s)&&(s=u.styleAliases[s]),n[a]=s;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function U(e,t){for(var n,r=i.repeat(" ",t),o=0,a=-1,s="",c=e.length;o<c;)-1===(a=e.indexOf("\n",o))?(n=e.slice(o),o=c):(n=e.slice(o,a+1),o=a+1),n.length&&"\n"!==n&&(s+=r),s+=n;return s}function Y(e,t){return"\n"+i.repeat(" ",e.indent*t)}function q(e){return e===f||e===u}function R(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function W(e,t){return R(e)&&65279!==e&&e!==x&&e!==I&&e!==E&&e!==F&&e!==M&&e!==w&&(e!==g||t&&function(e){return R(e)&&!q(e)&&65279!==e&&e!==p&&e!==l}(t))}function B(e){return/^\n* /.test(e)}var K=1,P=2,$=3,H=4,G=5;function V(e,t,n,i){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==_.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=i||e.flowLevel>-1&&n>=e.flowLevel;switch(function(e,t,n,i,r){var o,a,s,c,u=!1,p=!1,f=-1!==i,T=-1,_=R(c=e.charCodeAt(0))&&65279!==c&&!q(c)&&c!==b&&c!==O&&c!==w&&c!==x&&c!==I&&c!==E&&c!==F&&c!==M&&c!==g&&c!==y&&c!==A&&c!==d&&c!==N&&c!==k&&c!==C&&c!==v&&c!==h&&c!==m&&c!==S&&c!==j&&!q(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(!R(a=e.charCodeAt(o)))return G;s=o>0?e.charCodeAt(o-1):null,_=_&&W(a,s)}else{for(o=0;o<e.length;o++){if((a=e.charCodeAt(o))===l)u=!0,f&&(p=p||o-T-1>i&&" "!==e[T+1],T=o);else if(!R(a))return G;s=o>0?e.charCodeAt(o-1):null,_=_&&W(a,s)}p=p||f&&o-T-1>i&&" "!==e[T+1]}return u||p?n>9&&B(e)?G:p?H:$:_&&!r(e)?K:P}(t,s,e.indent,a,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n<i;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}))){case K:return t;case P:return"'"+t.replace(/'/g,"''")+"'";case $:return"|"+Z(t,e.indent)+z(U(t,o));case H:return">"+Z(t,e.indent)+z(U(function(e,t){for(var n,i,r,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=e.indexOf("\n"))?r:e.length,o.lastIndex=r,J(e.slice(0,r),t)),s="\n"===e[0]||" "===e[0];i=o.exec(e);){var c=i[1],u=i[2];n=" "===u[0],a+=c+(s||n||""===u?"":"\n")+J(u,t),s=n}return a}(t,a),o));case G:return'"'+function(e){for(var t,n,i,r="",o=0;o<e.length;o++)(t=e.charCodeAt(o))>=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(r+=L(1024*(t-55296)+n-56320+65536),o++):r+=!(i=T[t])&&R(t)?e[o]:i||L(t);return r}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function Z(e,t){var n=B(e)?String(t):"",i="\n"===e[e.length-1];return n+(!i||"\n"!==e[e.length-2]&&"\n"!==e?i?"":"-":"+")+"\n"}function z(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function J(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,s=0,c="";n=r.exec(e);)(s=n.index)-o>t&&(i=a>o?a:s,c+="\n"+e.slice(o,i),o=i+1),a=s;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function Q(e,t,n){var i,o,a,u,l,p;for(a=0,u=(o=n?e.explicitTypes:e.implicitTypes).length;a<u;a+=1)if(((l=o[a]).instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof t&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(e.tag=n?l.tag:"?",l.represent){if(p=e.styleMap[l.tag]||l.defaultStyle,"[object Function]"===s.call(l.represent))i=l.represent(t,p);else{if(!c.call(l.represent,p))throw new r("!<"+l.tag+'> tag resolver accepts not "'+p+'" style');i=l.represent[p](t,p)}e.dump=i}return!0}return!1}function X(e,t,n,i,o,a){e.tag=null,e.dump=n,Q(e,n,!1)||Q(e,n,!0);var c=s.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var u,p,f="[object Object]"===c||"[object Array]"===c;if(f&&(p=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||p||2!==e.indent&&t>0)&&(o=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(f&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===c)i&&0!==Object.keys(e.dump).length?(function(e,t,n,i){var o,a,s,c,u,p,f="",d=e.tag,h=Object.keys(n);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");for(o=0,a=h.length;o<a;o+=1)p="",i&&0===o||(p+=Y(e,t)),c=n[s=h[o]],X(e,t+1,s,!0,!0,!0)&&((u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&l===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=Y(e,t)),X(e,t+1,c,!0,u)&&(e.dump&&l===e.dump.charCodeAt(0)?p+=":":p+=": ",f+=p+=e.dump));e.tag=d,e.dump=f||"{}"}(e,t,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,r,o,a,s,c="",u=e.tag,l=Object.keys(n);for(i=0,r=l.length;i<r;i+=1)s="",0!==i&&(s+=", "),e.condenseFlow&&(s+='"'),a=n[o=l[i]],X(e,t,o,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),X(e,t,a,!1,!1)&&(c+=s+=e.dump));e.tag=u,e.dump="{"+c+"}"}(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===c){var d=e.noArrayIndent&&t>0?t-1:t;i&&0!==e.dump.length?(function(e,t,n,i){var r,o,a="",s=e.tag;for(r=0,o=n.length;r<o;r+=1)X(e,t+1,n[r],!0,!0)&&(i&&0===r||(a+=Y(e,t)),e.dump&&l===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}(e,d,e.dump,o),p&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var i,r,o="",a=e.tag;for(i=0,r=n.length;i<r;i+=1)X(e,t,n[i],!1,!1)&&(0!==i&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}(e,d,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump))}else{if("[object String]"!==c){if(e.skipInvalid)return!1;throw new r("unacceptable kind of an object to dump "+c)}"?"!==e.tag&&V(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function ee(e,t){var n,i,r=[],o=[];for(te(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function te(e,t,n){var i,r,o;if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,o=e.length;r<o;r+=1)te(e[r],t,n);else for(r=0,o=(i=Object.keys(e)).length;r<o;r+=1)te(e[i[r]],t,n)}function ne(e,t){var n=new D(t=t||{});return n.noRefs||ee(e,n),X(n,0,e,!0,!0)?n.dump+"\n":""}e.exports.dump=ne,e.exports.safeDump=function(e,t){return ne(e,i.extend({schema:a},t))}},1796:e=>{function t(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=t},5506:(e,t,n)=>{var i=n(3780),r=n(1796),o=n(9348),a=n(9590),s=n(2846),c=Object.prototype.hasOwnProperty,u=1,l=2,p=3,f=4,d=1,h=2,g=3,m=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/[\x85\u2028\u2029]/,v=/[,\[\]\{\}]/,A=/^(?:!|!!|![a-z\-]+!)$/i,x=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function b(e){return Object.prototype.toString.call(e)}function w(e){return 10===e||13===e}function k(e){return 9===e||32===e}function C(e){return 9===e||32===e||10===e||13===e}function O(e){return 44===e||91===e||93===e||123===e||125===e}function S(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function I(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"
":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function E(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var j=new Array(256),F=new Array(256),N=0;N<256;N++)j[N]=I(N)?1:0,F[N]=I(N);function M(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function T(e,t){return new r(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function _(e,t){throw T(e,t)}function L(e,t){e.onWarning&&e.onWarning.call(null,T(e,t))}var D={YAML:function(e,t,n){var i,r,o;null!==e.version&&_(e,"duplication of %YAML directive"),1!==n.length&&_(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&_(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&_(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&L(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&_(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],A.test(i)||_(e,"ill-formed tag handle (first argument) of the TAG directive"),c.call(e.tagMap,i)&&_(e,'there is a previously declared suffix for "'+i+'" tag handle'),x.test(r)||_(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};function U(e,t,n,i){var r,o,a,s;if(t<n){if(s=e.input.slice(t,n),i)for(r=0,o=s.length;r<o;r+=1)9===(a=s.charCodeAt(r))||32<=a&&a<=1114111||_(e,"expected valid JSON character");else m.test(s)&&_(e,"the stream contains non-printable characters");e.result+=s}}function Y(e,t,n,r){var o,a,s,u;for(i.isObject(n)||_(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,u=(o=Object.keys(n)).length;s<u;s+=1)a=o[s],c.call(t,a)||(t[a]=n[a],r[a]=!0)}function q(e,t,n,i,r,o,a,s){var u,l;if(Array.isArray(r))for(u=0,l=(r=Array.prototype.slice.call(r)).length;u<l;u+=1)Array.isArray(r[u])&&_(e,"nested arrays are not supported inside keys"),"object"==typeof r&&"[object Object]"===b(r[u])&&(r[u]="[object Object]");if("object"==typeof r&&"[object Object]"===b(r)&&(r="[object Object]"),r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(o))for(u=0,l=o.length;u<l;u+=1)Y(e,t,o[u],n);else Y(e,t,o,n);else e.json||c.call(n,r)||!c.call(t,r)||(e.line=a||e.line,e.position=s||e.position,_(e,"duplicated mapping key")),t[r]=o,delete n[r];return t}function R(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):_(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function W(e,t,n){for(var i=0,r=e.input.charCodeAt(e.position);0!==r;){for(;k(r);)r=e.input.charCodeAt(++e.position);if(t&&35===r)do{r=e.input.charCodeAt(++e.position)}while(10!==r&&13!==r&&0!==r);if(!w(r))break;for(R(e),r=e.input.charCodeAt(e.position),i++,e.lineIndent=0;32===r;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return-1!==n&&0!==i&&e.lineIndent<n&&L(e,"deficient indentation"),i}function B(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!C(t)))}function K(e,t){1===t?e.result+=" ":t>1&&(e.result+=i.repeat("\n",t-1))}function P(e,t){var n,i,r=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&45===i&&C(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,W(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,G(e,t,p,!1,!0),a.push(e.result),W(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)_(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=r,e.anchor=o,e.kind="sequence",e.result=a,!0)}function $(e){var t,n,i,r,o=!1,a=!1;if(33!==(r=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&_(e,"duplication of a tag property"),60===(r=e.input.charCodeAt(++e.position))?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(a=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&62!==r);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):_(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!C(r);)33===r&&(a?_(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),A.test(n)||_(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),v.test(i)&&_(e,"tag suffix cannot contain flow indicator characters")}return i&&!x.test(i)&&_(e,"tag name cannot contain such characters: "+i),o?e.tag=i:c.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:_(e,'undeclared tag handle "'+n+'"'),!0}function H(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&_(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!C(n)&&!O(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&_(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function G(e,t,n,r,o){var a,s,m,y,v,A,x,b,I=1,N=!1,M=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=m=f===n||p===n,r&&W(e,!0,-1)&&(N=!0,e.lineIndent>t?I=1:e.lineIndent===t?I=0:e.lineIndent<t&&(I=-1)),1===I)for(;$(e)||H(e);)W(e,!0,-1)?(N=!0,m=a,e.lineIndent>t?I=1:e.lineIndent===t?I=0:e.lineIndent<t&&(I=-1)):m=!1;if(m&&(m=N||o),1!==I&&f!==n||(x=u===n||l===n?t:t+1,b=e.position-e.lineStart,1===I?m&&(P(e,b)||function(e,t,n){var i,r,o,a,s,c=e.tag,u=e.anchor,p={},d={},h=null,g=null,m=null,y=!1,v=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),s=e.input.charCodeAt(e.position);0!==s;){if(i=e.input.charCodeAt(e.position+1),o=e.line,a=e.position,63!==s&&58!==s||!C(i)){if(!G(e,n,l,!1,!0))break;if(e.line===o){for(s=e.input.charCodeAt(e.position);k(s);)s=e.input.charCodeAt(++e.position);if(58===s)C(s=e.input.charCodeAt(++e.position))||_(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(q(e,p,d,h,g,null),h=g=m=null),v=!0,y=!1,r=!1,h=e.tag,g=e.result;else{if(!v)return e.tag=c,e.anchor=u,!0;_(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=c,e.anchor=u,!0;_(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(y&&(q(e,p,d,h,g,null),h=g=m=null),v=!0,y=!0,r=!0):y?(y=!1,r=!0):_(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=i;if((e.line===o||e.lineIndent>t)&&(G(e,t,f,!0,r)&&(y?g=e.result:m=e.result),y||(q(e,p,d,h,g,m,o,a),h=g=m=null),W(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)_(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&q(e,p,d,h,g,null),v&&(e.tag=c,e.anchor=u,e.kind="mapping",e.result=p),v}(e,b,x))||function(e,t){var n,i,r,o,a,s,c,l,p,f,d=!0,h=e.tag,g=e.anchor,m={};if(91===(f=e.input.charCodeAt(e.position)))r=93,s=!1,i=[];else{if(123!==f)return!1;r=125,s=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(W(e,!0,t),(f=e.input.charCodeAt(e.position))===r)return e.position++,e.tag=h,e.anchor=g,e.kind=s?"mapping":"sequence",e.result=i,!0;d||_(e,"missed comma between flow collection entries"),p=null,o=a=!1,63===f&&C(e.input.charCodeAt(e.position+1))&&(o=a=!0,e.position++,W(e,!0,t)),n=e.line,G(e,t,u,!1,!0),l=e.tag,c=e.result,W(e,!0,t),f=e.input.charCodeAt(e.position),!a&&e.line!==n||58!==f||(o=!0,f=e.input.charCodeAt(++e.position),W(e,!0,t),G(e,t,u,!1,!0),p=e.result),s?q(e,i,m,l,c,p):o?i.push(q(e,null,m,l,c,p)):i.push(c),W(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(d=!0,f=e.input.charCodeAt(++e.position)):d=!1}_(e,"unexpected end of the stream within a flow collection")}(e,x)?M=!0:(s&&function(e,t){var n,r,o,a,s,c=d,u=!1,l=!1,p=t,f=0,m=!1;if(124===(a=e.input.charCodeAt(e.position)))r=!1;else{if(62!==a)return!1;r=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)d===c?c=43===a?g:h:_(e,"repeat of a chomping mode identifier");else{if(!((o=48<=(s=a)&&s<=57?s-48:-1)>=0))break;0===o?_(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?_(e,"repeat of an indentation width identifier"):(p=t+o-1,l=!0)}if(k(a)){do{a=e.input.charCodeAt(++e.position)}while(k(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!w(a)&&0!==a)}for(;0!==a;){for(R(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndent<p)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>p&&(p=e.lineIndent),w(a))f++;else{if(e.lineIndent<p){c===g?e.result+=i.repeat("\n",u?1+f:f):c===d&&u&&(e.result+="\n");break}for(r?k(a)?(m=!0,e.result+=i.repeat("\n",u?1+f:f)):m?(m=!1,e.result+=i.repeat("\n",f+1)):0===f?u&&(e.result+=" "):e.result+=i.repeat("\n",f):e.result+=i.repeat("\n",u?1+f:f),u=!0,l=!0,f=0,n=e.position;!w(a)&&0!==a;)a=e.input.charCodeAt(++e.position);U(e,n,e.position,!1)}}return!0}(e,x)||function(e,t){var n,i,r;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,i=r=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(U(e,i,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;i=e.position,e.position++,r=e.position}else w(n)?(U(e,i,r,!0),K(e,W(e,!1,t)),i=r=e.position):e.position===e.lineStart&&B(e)?_(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);_(e,"unexpected end of the stream within a single quoted scalar")}(e,x)||function(e,t){var n,i,r,o,a,s,c;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return U(e,n,e.position,!0),e.position++,!0;if(92===s){if(U(e,n,e.position,!0),w(s=e.input.charCodeAt(++e.position)))W(e,!1,t);else if(s<256&&j[s])e.result+=F[s],e.position++;else if((a=120===(c=s)?2:117===c?4:85===c?8:0)>0){for(r=a,o=0;r>0;r--)(a=S(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:_(e,"expected hexadecimal character");e.result+=E(o),e.position++}else _(e,"unknown escape sequence");n=i=e.position}else w(s)?(U(e,n,i,!0),K(e,W(e,!1,t)),n=i=e.position):e.position===e.lineStart&&B(e)?_(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}_(e,"unexpected end of the stream within a double quoted scalar")}(e,x)?M=!0:function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!C(i)&&!O(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&_(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),c.call(e.anchorMap,n)||_(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],W(e,!0,-1),!0}(e)?(M=!0,null===e.tag&&null===e.anchor||_(e,"alias node should not have any properties")):function(e,t,n){var i,r,o,a,s,c,u,l,p=e.kind,f=e.result;if(C(l=e.input.charCodeAt(e.position))||O(l)||35===l||38===l||42===l||33===l||124===l||62===l||39===l||34===l||37===l||64===l||96===l)return!1;if((63===l||45===l)&&(C(i=e.input.charCodeAt(e.position+1))||n&&O(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==l;){if(58===l){if(C(i=e.input.charCodeAt(e.position+1))||n&&O(i))break}else if(35===l){if(C(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&B(e)||n&&O(l))break;if(w(l)){if(s=e.line,c=e.lineStart,u=e.lineIndent,W(e,!1,-1),e.lineIndent>=t){a=!0,l=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=c,e.lineIndent=u;break}}a&&(U(e,r,o,!1),K(e,e.line-s),r=o=e.position,a=!1),k(l)||(o=e.position+1),l=e.input.charCodeAt(++e.position)}return U(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,x,u===n)&&(M=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===I&&(M=m&&P(e,b))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&_(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),y=0,v=e.implicitTypes.length;y<v;y+=1)if((A=e.implicitTypes[y]).resolve(e.result)){e.result=A.construct(e.result),e.tag=A.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else c.call(e.typeMap[e.kind||"fallback"],e.tag)?(A=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&A.kind!==e.kind&&_(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+A.kind+'", not "'+e.kind+'"'),A.resolve(e.result)?(e.result=A.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):_(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):_(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||M}function V(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(W(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!C(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&_(e,"directive name must not be less than one character in length");0!==r;){for(;k(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!w(r));break}if(w(r))break;for(t=e.position;0!==r&&!C(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&R(e),c.call(D,n)?D[n](e,n,i):L(e,'unknown document directive "'+n+'"')}W(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,W(e,!0,-1)):a&&_(e,"directives end mark is expected"),G(e,e.lineIndent-1,f,!1,!0),W(e,!0,-1),e.checkLineBreaks&&y.test(e.input.slice(o,e.position))&&L(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&B(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,W(e,!0,-1)):e.position<e.length-1&&_(e,"end of the stream or a document separator is expected")}function Z(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new M(e,t),i=e.indexOf("\0");for(-1!==i&&(n.position=i,_(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)V(n);return n.documents}function z(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var i=Z(e,n);if("function"!=typeof t)return i;for(var r=0,o=i.length;r<o;r+=1)t(i[r])}function J(e,t){var n=Z(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new r("expected a single document in the stream, but found more")}}e.exports.loadAll=z,e.exports.load=J,e.exports.safeLoadAll=function(e,t,n){return"object"==typeof t&&null!==t&&void 0===n&&(n=t,t=null),z(e,t,i.extend({schema:a},n))},e.exports.safeLoad=function(e,t){return J(e,i.extend({schema:a},t))}},9348:(e,t,n)=>{var i=n(3780);function r(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}r.prototype.getSnippet=function(e,t){var n,r,o,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",r=this.position;r>0&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\0\r\n
\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(r,a),i.repeat(" ",e)+n+s+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=r},2290:(e,t,n)=>{var i=n(3780),r=n(1796),o=n(5417);function a(e,t,n){var i=[];return e.include.forEach((function(e){n=a(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&i.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===i.indexOf(t)}))}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function i(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(i);return n}(this.compiledImplicit,this.compiledExplicit)}s.DEFAULT=null,s.create=function(){var e,t;switch(arguments.length){case 1:e=s.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new r("Wrong number of arguments for Schema.create function")}if(e=i.toArray(e),t=i.toArray(t),!e.every((function(e){return e instanceof s})))throw new r("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every((function(e){return e instanceof o})))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new s({include:e,explicit:t})},e.exports=s},8774:(e,t,n)=>{var i=n(2290);e.exports=new i({include:[n(8739)]})},2846:(e,t,n)=>{var i=n(2290);e.exports=i.DEFAULT=new i({include:[n(9590)],explicit:[n(9280),n(6751),n(5986)]})},9590:(e,t,n)=>{var i=n(2290);e.exports=new i({include:[n(8774)],implicit:[n(4938),n(7042)],explicit:[n(273),n(3901),n(343),n(6562)]})},8028:(e,t,n)=>{var i=n(2290);e.exports=new i({explicit:[n(2621),n(5853),n(1256)]})},8739:(e,t,n)=>{var i=n(2290);e.exports=new i({include:[n(8028)],implicit:[n(5137),n(1548),n(6539),n(6076)]})},5417:(e,t,n)=>{var i=n(1796),r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===r.indexOf(t))throw new i('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new i('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},273:(e,t,n)=>{var i;try{i=Object(function(){var e=new Error("Cannot find module 'buffer'");throw e.code="MODULE_NOT_FOUND",e}())}catch(e){}var r=n(5417),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,a=o;for(n=0;n<r;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),a=r.length,s=o,c=0,u=[];for(t=0;t<a;t++)t%4==0&&t&&(u.push(c>>16&255),u.push(c>>8&255),u.push(255&c)),c=c<<6|s.indexOf(r.charAt(t));return 0==(n=a%4*6)?(u.push(c>>16&255),u.push(c>>8&255),u.push(255&c)):18===n?(u.push(c>>10&255),u.push(c>>2&255)):12===n&&u.push(c>>4&255),i?i.from?i.from(u):new i(u):u},predicate:function(e){return i&&i.isBuffer(e)},represent:function(e){var t,n,i="",r=0,a=e.length,s=o;for(t=0;t<a;t++)t%3==0&&t&&(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]),r=(r<<8)+e[t];return 0==(n=a%3)?(i+=s[r>>18&63],i+=s[r>>12&63],i+=s[r>>6&63],i+=s[63&r]):2===n?(i+=s[r>>10&63],i+=s[r>>4&63],i+=s[r<<2&63],i+=s[64]):1===n&&(i+=s[r>>2&63],i+=s[r<<4&63],i+=s[64],i+=s[64]),i}})},1548:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},6076:(e,t,n)=>{var i=n(3780),r=n(5417),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,i,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){r.unshift(parseFloat(e,10))})),t=0,i=1,r.forEach((function(e){t+=e*i,i*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},6539:(e,t,n)=>{var i=n(3780),r=n(5417);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=e.length,r=0,s=!1;if(!i)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===i)return!0;if("b"===(t=e[++r])){for(r++;r<i;r++)if("_"!==(t=e[r])){if("0"!==t&&"1"!==t)return!1;s=!0}return s&&"_"!==t}if("x"===t){for(r++;r<i;r++)if("_"!==(t=e[r])){if(!(48<=(n=e.charCodeAt(r))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;s=!0}return s&&"_"!==t}for(;r<i;r++)if("_"!==(t=e[r])){if(!o(e.charCodeAt(r)))return!1;s=!0}return s&&"_"!==t}if("_"===t)return!1;for(;r<i;r++)if("_"!==(t=e[r])){if(":"===t)break;if(!a(e.charCodeAt(r)))return!1;s=!0}return!(!s||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(r)))},construct:function(e){var t,n,i=e,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),"-"!==(t=i[0])&&"+"!==t||("-"===t&&(r=-1),t=(i=i.slice(1))[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach((function(e){o.unshift(parseInt(e,10))})),i=0,n=1,o.forEach((function(e){i+=e*n,n*=60})),r*i):r*parseInt(i,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!i.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},5986:(e,t,n)=>{var i;try{i=n(Object(function(){var e=new Error("Cannot find module 'esprima'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){"undefined"!=typeof window&&(i=window.esprima)}var r=n(5417);e.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=i.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",r=i.parse(n,{range:!0}),o=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"ArrowFunctionExpression"!==r.body[0].expression.type&&"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=r.body[0].expression.body.range,"BlockStatement"===r.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},6751:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},9280:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},1256:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},7042:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},5137:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},3901:(e,t,n)=>{var i=n(5417),r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new i("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,a,s,c=[],u=e;for(t=0,n=u.length;t<n;t+=1){if(i=u[t],s=!1,"[object Object]"!==o.call(i))return!1;for(a in i)if(r.call(i,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==c.indexOf(a))return!1;c.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},343:(e,t,n)=>{var i=n(5417),r=Object.prototype.toString;e.exports=new i("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,o,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(i=s[t],"[object Object]"!==r.call(i))return!1;if(1!==(o=Object.keys(i)).length)return!1;a[t]=[o[0],i[o[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,i,r,o,a=e;for(o=new Array(a.length),t=0,n=a.length;t<n;t+=1)i=a[t],r=Object.keys(i),o[t]=[r[0],i[r[0]]];return o}})},5853:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},6562:(e,t,n)=>{var i=n(5417),r=Object.prototype.hasOwnProperty;e.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(r.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},2621:(e,t,n)=>{var i=n(5417);e.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},4938:(e,t,n)=>{var i=n(5417),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new i("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==r.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,i,a,s,c,u,l,p=0,f=null;if(null===(t=r.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,i,a));if(s=+t[4],c=+t[5],u=+t[6],t[7]){for(p=t[7].slice(0,3);p.length<3;)p+="0";p=+p}return t[9]&&(f=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(f=-f)),l=new Date(Date.UTC(n,i,a,s,c,u,p)),f&&l.setTime(l.getTime()-f),l},instanceOf:Date,represent:function(e){return e.toISOString()}})}}]);
|
|
2
|
+
//# sourceMappingURL=9515.07ef90ca.js.map
|