1 |
- {"ast":null,"code":"import { RenderingGroup } from \"./renderingGroup.js\";\n/**\n * This class is used by the onRenderingGroupObservable\n */\nexport class RenderingGroupInfo {}\n/**\n * This is the manager responsible of all the rendering for meshes sprites and particles.\n * It is enable to manage the different groups as well as the different necessary sort functions.\n * This should not be used directly aside of the few static configurations\n */\nexport class RenderingManager {\n /**\n * Gets or sets a boolean indicating that the manager will not reset between frames.\n * This means that if a mesh becomes invisible or transparent it will not be visible until this boolean is set to false again.\n * By default, the rendering manager will dispatch all active meshes per frame (moving them to the transparent, opaque or alpha testing lists).\n * By turning this property on, you will accelerate the rendering by keeping all these lists unchanged between frames.\n */\n get maintainStateBetweenFrames() {\n return this._maintainStateBetweenFrames;\n }\n set maintainStateBetweenFrames(value) {\n if (value === this._maintainStateBetweenFrames) {\n return;\n }\n this._maintainStateBetweenFrames = value;\n if (!this._maintainStateBetweenFrames) {\n this.restoreDispachedFlags();\n }\n }\n /**\n * Restore wasDispatched flags on the lists of elements to render.\n */\n restoreDispachedFlags() {\n for (const mesh of this._scene.meshes) {\n if (mesh.subMeshes) {\n for (const subMesh of mesh.subMeshes) {\n subMesh._wasDispatched = false;\n }\n }\n }\n if (this._scene.spriteManagers) {\n for (const spriteManager of this._scene.spriteManagers) {\n spriteManager._wasDispatched = false;\n }\n }\n for (const particleSystem of this._scene.particleSystems) {\n particleSystem._wasDispatched = false;\n }\n }\n /**\n * Instantiates a new rendering group for a particular scene\n * @param scene Defines the scene the groups belongs to\n */\n constructor(scene) {\n /**\n * @internal\n */\n this._useSceneAutoClearSetup = false;\n this._renderingGroups = new Array();\n this._autoClearDepthStencil = {};\n this._customOpaqueSortCompareFn = {};\n this._customAlphaTestSortCompareFn = {};\n this._customTransparentSortCompareFn = {};\n this._renderingGroupInfo = new RenderingGroupInfo();\n this._maintainStateBetweenFrames = false;\n this._scene = scene;\n for (let i = RenderingManager.MIN_RENDERINGGROUPS; i < RenderingManager.MAX_RENDERINGGROUPS; i++) {\n this._autoClearDepthStencil[i] = {\n autoClear: true,\n depth: true,\n stencil: true\n };\n }\n }\n /**\n * @returns the rendering group with the specified id.\n * @param id the id of the rendering group (0 by default)\n */\n getRenderingGroup(id) {\n const renderingGroupId = id || 0;\n this._prepareRenderingGroup(renderingGroupId);\n return this._renderingGroups[renderingGroupId];\n }\n _clearDepthStencilBuffer(depth = true, stencil = true) {\n if (this._depthStencilBufferAlreadyCleaned) {\n return;\n }\n this._scene.getEngine().clear(null, false, depth, stencil);\n this._depthStencilBufferAlreadyCleaned = true;\n }\n /**\n * Renders the entire managed groups. This is used by the scene or the different render targets.\n * @internal\n */\n render(customRenderFunction, activeMeshes, renderParticles, renderSprites) {\n // Update the observable context (not null as it only goes away on dispose)\n const info = this._renderingGroupInfo;\n info.scene = this._scene;\n info.camera = this._scene.activeCamera;\n // Dispatch sprites\n if (this._scene.spriteManagers && renderSprites) {\n for (let index = 0; index < this._scene.spriteManagers.length; index++) {\n const manager = this._scene.spriteManagers[index];\n this.dispatchSprites(manager);\n }\n }\n // Render\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n this._depthStencilBufferAlreadyCleaned = index === RenderingManager.MIN_RENDERINGGROUPS;\n const renderingGroup = this._renderingGroups[index];\n if (!renderingGroup || renderingGroup._empty) {\n continue;\n }\n const renderingGroupMask = 1 << index;\n info.renderingGroupId = index;\n // Before Observable\n this._scene.onBeforeRenderingGroupObservable.notifyObservers(info, renderingGroupMask);\n // Clear depth/stencil if needed\n if (RenderingManager.AUTOCLEAR) {\n const autoClear = this._useSceneAutoClearSetup ? this._scene.getAutoClearDepthStencilSetup(index) : this._autoClearDepthStencil[index];\n if (autoClear && autoClear.autoClear) {\n this._clearDepthStencilBuffer(autoClear.depth, autoClear.stencil);\n }\n }\n // Render\n for (const step of this._scene._beforeRenderingGroupDrawStage) {\n step.action(index);\n }\n renderingGroup.render(customRenderFunction, renderSprites, renderParticles, activeMeshes);\n for (const step of this._scene._afterRenderingGroupDrawStage) {\n step.action(index);\n }\n // After Observable\n this._scene.onAfterRenderingGroupObservable.notifyObservers(info, renderingGroupMask);\n }\n }\n /**\n * Resets the different information of the group to prepare a new frame\n * @internal\n */\n reset() {\n if (this.maintainStateBetweenFrames) {\n return;\n }\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.prepare();\n }\n }\n }\n /**\n * Resets the sprites information of the group to prepare a new frame\n * @internal\n */\n resetSprites() {\n if (this.maintainStateBetweenFrames) {\n return;\n }\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.prepareSprites();\n }\n }\n }\n /**\n * Dispose and release the group and its associated resources.\n * @internal\n */\n dispose() {\n this.freeRenderingGroups();\n this._renderingGroups.length = 0;\n this._renderingGroupInfo = null;\n }\n /**\n * Clear the info related to rendering groups preventing retention points during dispose.\n */\n freeRenderingGroups() {\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.dispose();\n }\n }\n }\n _prepareRenderingGroup(renderingGroupId) {\n if (this._renderingGroups[renderingGroupId] === undefined) {\n this._renderingGroups[renderingGroupId] = new RenderingGroup(renderingGroupId, this._scene, this._customOpaqueSortCompareFn[renderingGroupId], this._customAlphaTestSortCompareFn[renderingGroupId], this._customTransparentSortCompareFn[renderingGroupId]);\n }\n }\n /**\n * Add a sprite manager to the rendering manager in order to render it this frame.\n * @param spriteManager Define the sprite manager to render\n */\n dispatchSprites(spriteManager) {\n if (this.maintainStateBetweenFrames && spriteManager._wasDispatched) {\n return;\n }\n spriteManager._wasDispatched = true;\n this.getRenderingGroup(spriteManager.renderingGroupId).dispatchSprites(spriteManager);\n }\n /**\n * Add a particle system to the rendering manager in order to render it this frame.\n * @param particleSystem Define the particle system to render\n */\n dispatchParticles(particleSystem) {\n if (this.maintainStateBetweenFrames && particleSystem._wasDispatched) {\n return;\n }\n particleSystem._wasDispatched = true;\n this.getRenderingGroup(particleSystem.renderingGroupId).dispatchParticles(particleSystem);\n }\n /**\n * Add a submesh to the manager in order to render it this frame\n * @param subMesh The submesh to dispatch\n * @param mesh Optional reference to the submeshes's mesh. Provide if you have an exiting reference to improve performance.\n * @param material Optional reference to the submeshes's material. Provide if you have an exiting reference to improve performance.\n */\n dispatch(subMesh, mesh, material) {\n if (mesh === undefined) {\n mesh = subMesh.getMesh();\n }\n if (this.maintainStateBetweenFrames && subMesh._wasDispatched) {\n return;\n }\n subMesh._wasDispatched = true;\n this.getRenderingGroup(mesh.renderingGroupId).dispatch(subMesh, mesh, material);\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversely depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._customOpaqueSortCompareFn[renderingGroupId] = opaqueSortCompareFn;\n this._customAlphaTestSortCompareFn[renderingGroupId] = alphaTestSortCompareFn;\n this._customTransparentSortCompareFn[renderingGroupId] = transparentSortCompareFn;\n if (this._renderingGroups[renderingGroupId]) {\n const group = this._renderingGroups[renderingGroupId];\n group.opaqueSortCompareFn = this._customOpaqueSortCompareFn[renderingGroupId];\n group.alphaTestSortCompareFn = this._customAlphaTestSortCompareFn[renderingGroupId];\n group.transparentSortCompareFn = this._customTransparentSortCompareFn[renderingGroupId];\n }\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n * @param depth Automatically clears depth between groups if true and autoClear is true.\n * @param stencil Automatically clears stencil between groups if true and autoClear is true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil, depth = true, stencil = true) {\n this._autoClearDepthStencil[renderingGroupId] = {\n autoClear: autoClearDepthStencil,\n depth: depth,\n stencil: stencil\n };\n }\n /**\n * Gets the current auto clear configuration for one rendering group of the rendering\n * manager.\n * @param index the rendering group index to get the information for\n * @returns The auto clear setup for the requested rendering group\n */\n getAutoClearDepthStencilSetup(index) {\n return this._autoClearDepthStencil[index];\n }\n}\n/**\n * The max id used for rendering groups (not included)\n */\nRenderingManager.MAX_RENDERINGGROUPS = 4;\n/**\n * The min id used for rendering groups (included)\n */\nRenderingManager.MIN_RENDERINGGROUPS = 0;\n/**\n * Used to globally prevent autoclearing scenes.\n */\nRenderingManager.AUTOCLEAR = true;","map":{"version":3,"names":["RenderingGroup","RenderingGroupInfo","RenderingManager","maintainStateBetweenFrames","_maintainStateBetweenFrames","value","restoreDispachedFlags","mesh","_scene","meshes","subMeshes","subMesh","_wasDispatched","spriteManagers","spriteManager","particleSystem","particleSystems","constructor","scene","_useSceneAutoClearSetup","_renderingGroups","Array","_autoClearDepthStencil","_customOpaqueSortCompareFn","_customAlphaTestSortCompareFn","_customTransparentSortCompareFn","_renderingGroupInfo","i","MIN_RENDERINGGROUPS","MAX_RENDERINGGROUPS","autoClear","depth","stencil","getRenderingGroup","id","renderingGroupId","_prepareRenderingGroup","_clearDepthStencilBuffer","_depthStencilBufferAlreadyCleaned","getEngine","clear","render","customRenderFunction","activeMeshes","renderParticles","renderSprites","info","camera","activeCamera","index","length","manager","dispatchSprites","renderingGroup","_empty","renderingGroupMask","onBeforeRenderingGroupObservable","notifyObservers","AUTOCLEAR","getAutoClearDepthStencilSetup","step","_beforeRenderingGroupDrawStage","action","_afterRenderingGroupDrawStage","onAfterRenderingGroupObservable","reset","prepare","resetSprites","prepareSprites","dispose","freeRenderingGroups","undefined","dispatchParticles","dispatch","material","getMesh","setRenderingOrder","opaqueSortCompareFn","alphaTestSortCompareFn","transparentSortCompareFn","group","setRenderingAutoClearDepthStencil","autoClearDepthStencil"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Rendering/renderingManager.js"],"sourcesContent":["import { RenderingGroup } from \"./renderingGroup.js\";\n/**\n * This class is used by the onRenderingGroupObservable\n */\nexport class RenderingGroupInfo {\n}\n/**\n * This is the manager responsible of all the rendering for meshes sprites and particles.\n * It is enable to manage the different groups as well as the different necessary sort functions.\n * This should not be used directly aside of the few static configurations\n */\nexport class RenderingManager {\n /**\n * Gets or sets a boolean indicating that the manager will not reset between frames.\n * This means that if a mesh becomes invisible or transparent it will not be visible until this boolean is set to false again.\n * By default, the rendering manager will dispatch all active meshes per frame (moving them to the transparent, opaque or alpha testing lists).\n * By turning this property on, you will accelerate the rendering by keeping all these lists unchanged between frames.\n */\n get maintainStateBetweenFrames() {\n return this._maintainStateBetweenFrames;\n }\n set maintainStateBetweenFrames(value) {\n if (value === this._maintainStateBetweenFrames) {\n return;\n }\n this._maintainStateBetweenFrames = value;\n if (!this._maintainStateBetweenFrames) {\n this.restoreDispachedFlags();\n }\n }\n /**\n * Restore wasDispatched flags on the lists of elements to render.\n */\n restoreDispachedFlags() {\n for (const mesh of this._scene.meshes) {\n if (mesh.subMeshes) {\n for (const subMesh of mesh.subMeshes) {\n subMesh._wasDispatched = false;\n }\n }\n }\n if (this._scene.spriteManagers) {\n for (const spriteManager of this._scene.spriteManagers) {\n spriteManager._wasDispatched = false;\n }\n }\n for (const particleSystem of this._scene.particleSystems) {\n particleSystem._wasDispatched = false;\n }\n }\n /**\n * Instantiates a new rendering group for a particular scene\n * @param scene Defines the scene the groups belongs to\n */\n constructor(scene) {\n /**\n * @internal\n */\n this._useSceneAutoClearSetup = false;\n this._renderingGroups = new Array();\n this._autoClearDepthStencil = {};\n this._customOpaqueSortCompareFn = {};\n this._customAlphaTestSortCompareFn = {};\n this._customTransparentSortCompareFn = {};\n this._renderingGroupInfo = new RenderingGroupInfo();\n this._maintainStateBetweenFrames = false;\n this._scene = scene;\n for (let i = RenderingManager.MIN_RENDERINGGROUPS; i < RenderingManager.MAX_RENDERINGGROUPS; i++) {\n this._autoClearDepthStencil[i] = { autoClear: true, depth: true, stencil: true };\n }\n }\n /**\n * @returns the rendering group with the specified id.\n * @param id the id of the rendering group (0 by default)\n */\n getRenderingGroup(id) {\n const renderingGroupId = id || 0;\n this._prepareRenderingGroup(renderingGroupId);\n return this._renderingGroups[renderingGroupId];\n }\n _clearDepthStencilBuffer(depth = true, stencil = true) {\n if (this._depthStencilBufferAlreadyCleaned) {\n return;\n }\n this._scene.getEngine().clear(null, false, depth, stencil);\n this._depthStencilBufferAlreadyCleaned = true;\n }\n /**\n * Renders the entire managed groups. This is used by the scene or the different render targets.\n * @internal\n */\n render(customRenderFunction, activeMeshes, renderParticles, renderSprites) {\n // Update the observable context (not null as it only goes away on dispose)\n const info = this._renderingGroupInfo;\n info.scene = this._scene;\n info.camera = this._scene.activeCamera;\n // Dispatch sprites\n if (this._scene.spriteManagers && renderSprites) {\n for (let index = 0; index < this._scene.spriteManagers.length; index++) {\n const manager = this._scene.spriteManagers[index];\n this.dispatchSprites(manager);\n }\n }\n // Render\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n this._depthStencilBufferAlreadyCleaned = index === RenderingManager.MIN_RENDERINGGROUPS;\n const renderingGroup = this._renderingGroups[index];\n if (!renderingGroup || renderingGroup._empty) {\n continue;\n }\n const renderingGroupMask = 1 << index;\n info.renderingGroupId = index;\n // Before Observable\n this._scene.onBeforeRenderingGroupObservable.notifyObservers(info, renderingGroupMask);\n // Clear depth/stencil if needed\n if (RenderingManager.AUTOCLEAR) {\n const autoClear = this._useSceneAutoClearSetup ? this._scene.getAutoClearDepthStencilSetup(index) : this._autoClearDepthStencil[index];\n if (autoClear && autoClear.autoClear) {\n this._clearDepthStencilBuffer(autoClear.depth, autoClear.stencil);\n }\n }\n // Render\n for (const step of this._scene._beforeRenderingGroupDrawStage) {\n step.action(index);\n }\n renderingGroup.render(customRenderFunction, renderSprites, renderParticles, activeMeshes);\n for (const step of this._scene._afterRenderingGroupDrawStage) {\n step.action(index);\n }\n // After Observable\n this._scene.onAfterRenderingGroupObservable.notifyObservers(info, renderingGroupMask);\n }\n }\n /**\n * Resets the different information of the group to prepare a new frame\n * @internal\n */\n reset() {\n if (this.maintainStateBetweenFrames) {\n return;\n }\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.prepare();\n }\n }\n }\n /**\n * Resets the sprites information of the group to prepare a new frame\n * @internal\n */\n resetSprites() {\n if (this.maintainStateBetweenFrames) {\n return;\n }\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.prepareSprites();\n }\n }\n }\n /**\n * Dispose and release the group and its associated resources.\n * @internal\n */\n dispose() {\n this.freeRenderingGroups();\n this._renderingGroups.length = 0;\n this._renderingGroupInfo = null;\n }\n /**\n * Clear the info related to rendering groups preventing retention points during dispose.\n */\n freeRenderingGroups() {\n for (let index = RenderingManager.MIN_RENDERINGGROUPS; index < RenderingManager.MAX_RENDERINGGROUPS; index++) {\n const renderingGroup = this._renderingGroups[index];\n if (renderingGroup) {\n renderingGroup.dispose();\n }\n }\n }\n _prepareRenderingGroup(renderingGroupId) {\n if (this._renderingGroups[renderingGroupId] === undefined) {\n this._renderingGroups[renderingGroupId] = new RenderingGroup(renderingGroupId, this._scene, this._customOpaqueSortCompareFn[renderingGroupId], this._customAlphaTestSortCompareFn[renderingGroupId], this._customTransparentSortCompareFn[renderingGroupId]);\n }\n }\n /**\n * Add a sprite manager to the rendering manager in order to render it this frame.\n * @param spriteManager Define the sprite manager to render\n */\n dispatchSprites(spriteManager) {\n if (this.maintainStateBetweenFrames && spriteManager._wasDispatched) {\n return;\n }\n spriteManager._wasDispatched = true;\n this.getRenderingGroup(spriteManager.renderingGroupId).dispatchSprites(spriteManager);\n }\n /**\n * Add a particle system to the rendering manager in order to render it this frame.\n * @param particleSystem Define the particle system to render\n */\n dispatchParticles(particleSystem) {\n if (this.maintainStateBetweenFrames && particleSystem._wasDispatched) {\n return;\n }\n particleSystem._wasDispatched = true;\n this.getRenderingGroup(particleSystem.renderingGroupId).dispatchParticles(particleSystem);\n }\n /**\n * Add a submesh to the manager in order to render it this frame\n * @param subMesh The submesh to dispatch\n * @param mesh Optional reference to the submeshes's mesh. Provide if you have an exiting reference to improve performance.\n * @param material Optional reference to the submeshes's material. Provide if you have an exiting reference to improve performance.\n */\n dispatch(subMesh, mesh, material) {\n if (mesh === undefined) {\n mesh = subMesh.getMesh();\n }\n if (this.maintainStateBetweenFrames && subMesh._wasDispatched) {\n return;\n }\n subMesh._wasDispatched = true;\n this.getRenderingGroup(mesh.renderingGroupId).dispatch(subMesh, mesh, material);\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversely depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._customOpaqueSortCompareFn[renderingGroupId] = opaqueSortCompareFn;\n this._customAlphaTestSortCompareFn[renderingGroupId] = alphaTestSortCompareFn;\n this._customTransparentSortCompareFn[renderingGroupId] = transparentSortCompareFn;\n if (this._renderingGroups[renderingGroupId]) {\n const group = this._renderingGroups[renderingGroupId];\n group.opaqueSortCompareFn = this._customOpaqueSortCompareFn[renderingGroupId];\n group.alphaTestSortCompareFn = this._customAlphaTestSortCompareFn[renderingGroupId];\n group.transparentSortCompareFn = this._customTransparentSortCompareFn[renderingGroupId];\n }\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n * @param depth Automatically clears depth between groups if true and autoClear is true.\n * @param stencil Automatically clears stencil between groups if true and autoClear is true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil, depth = true, stencil = true) {\n this._autoClearDepthStencil[renderingGroupId] = {\n autoClear: autoClearDepthStencil,\n depth: depth,\n stencil: stencil,\n };\n }\n /**\n * Gets the current auto clear configuration for one rendering group of the rendering\n * manager.\n * @param index the rendering group index to get the information for\n * @returns The auto clear setup for the requested rendering group\n */\n getAutoClearDepthStencilSetup(index) {\n return this._autoClearDepthStencil[index];\n }\n}\n/**\n * The max id used for rendering groups (not included)\n */\nRenderingManager.MAX_RENDERINGGROUPS = 4;\n/**\n * The min id used for rendering groups (included)\n */\nRenderingManager.MIN_RENDERINGGROUPS = 0;\n/**\n * Used to globally prevent autoclearing scenes.\n */\nRenderingManager.AUTOCLEAR = true;\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,qBAAqB;AACpD;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,CAAC;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC1B;AACJ;AACA;AACA;AACA;AACA;EACI,IAAIC,0BAA0BA,CAAA,EAAG;IAC7B,OAAO,IAAI,CAACC,2BAA2B;EAC3C;EACA,IAAID,0BAA0BA,CAACE,KAAK,EAAE;IAClC,IAAIA,KAAK,KAAK,IAAI,CAACD,2BAA2B,EAAE;MAC5C;IACJ;IACA,IAAI,CAACA,2BAA2B,G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,EAAEoD,qBAAqB;MAChCnD,KAAK,EAAEA,KAAK;MACZC,OAAO,EAAEA;IACb,CAAC;EACL;EACA;AACJ;AACA;AACA;AACA;AACA;EACI2B,6BAA6BA,CAACV,KAAK,EAAE;IACjC,OAAO,IAAI,CAAC3B,sBAAsB,CAAC2B,KAAK,CAAC;EAC7C;AACJ;AACA;AACA;AACA;AACA/C,gBAAgB,CAAC2B,mBAAmB,GAAG,CAAC;AACxC;AACA;AACA;AACA3B,gBAAgB,CAAC0B,mBAAmB,GAAG,CAAC;AACxC;AACA;AACA;AACA1B,gBAAgB,CAACwD,SAAS,GAAG,IAAI","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|