diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 9f04ed5..0000000 --- a/docs/404.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文爱好者社区 - - - - - -

404

There's nothing here.
Take me home
- - - diff --git a/docs/article/index.html b/docs/article/index.html deleted file mode 100644 index 3d4b02c..0000000 --- a/docs/article/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Articles | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/assets/3d-logo.glb b/docs/assets/3d-logo.glb deleted file mode 100644 index d6315b2..0000000 Binary files a/docs/assets/3d-logo.glb and /dev/null differ diff --git a/docs/assets/404.html-DZ2Mv7j5.js b/docs/assets/404.html-DZ2Mv7j5.js deleted file mode 100644 index 7899a2d..0000000 --- a/docs/assets/404.html-DZ2Mv7j5.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o,b as n}from"./app-BFngqcKR.js";const a={},r=n("p",null,"404 Not Found",-1),i=[r];function c(m,p){return o(),e("div",null,i)}const l=t(a,[["render",c],["__file","404.html.vue"]]),d=JSON.parse('{"path":"/404.html","title":"","lang":"en-US","frontmatter":{"layout":"NotFound","description":"404 Not Found","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/404.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:description","content":"404 Not Found"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.696Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.696Z"}],["meta",{"name":"twitter:description","content":"404 Not Found"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"\\",\\"description\\":\\"404 Not Found\\"}"]]},"headers":[],"git":{},"filePathRelative":null,"autoDesc":true,"excerpt":"

404 Not Found

\\n"}');export{l as comp,d as data}; diff --git a/docs/assets/8047d707bb3ab08f774bc4c2f4b44484-9RPxsZVV.png b/docs/assets/8047d707bb3ab08f774bc4c2f4b44484-9RPxsZVV.png deleted file mode 100644 index 1b6ac60..0000000 Binary files a/docs/assets/8047d707bb3ab08f774bc4c2f4b44484-9RPxsZVV.png and /dev/null differ diff --git "a/docs/assets/AI\345\246\202\344\275\225\346\224\271\345\217\230\344\272\247\345\223\201\347\273\217\347\220\206\347\232\204\345\267\245\344\275\234.html-CBf7EVM6.js" "b/docs/assets/AI\345\246\202\344\275\225\346\224\271\345\217\230\344\272\247\345\223\201\347\273\217\347\220\206\347\232\204\345\267\245\344\275\234.html-CBf7EVM6.js" deleted file mode 100644 index ea40438..0000000 --- "a/docs/assets/AI\345\246\202\344\275\225\346\224\271\345\217\230\344\272\247\345\223\201\347\273\217\347\220\206\347\232\204\345\267\245\344\275\234.html-CBf7EVM6.js" +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,a}from"./app-BFngqcKR.js";const p={},n=a('

播客地址:AI如何改变产品经理的工作

熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。

熊叔的职业生涯

00:29 熊叔,一名资深的产品经理,他的职业生涯始于对技术的热爱和对创新的追求。在多年的工作中,熊叔参与了多个创业项目,尤其在AI领域有着深入的研究和实践。他不仅关注技术变革如何影响商业社会,更是将这种变革融入到自己的工作和生活中。

MIXLAB NODE 的特点,与其开发故事

01:53在众多的AI平台中,熊叔选择了Comfy UI生态来设计开源项目。他看重的是Comfy UI的自由度和上限,这个平台的可能性足够高,能够给予开发者更大的创造空间。

05:47 MixNode是Comfy UI生态中的一个多功能节点,它与Stable Diffusion等工具相结合,为用户提供了一个全新的创作体验。MixNode的存在,使得用户可以通过连接不同的AI模型和工具,创造出更加丰富和多样化的作品。

09:14 熊叔分享了Mixlab node的几个核心功能,如录屏渲染、链接大语言模型等。这些功能不仅提高了创作的效率,也为用户带来了全新的应用场景。例如,通过录屏渲染功能,用户可以实时地让AI帮助渲染图像,生成更加精美的作品。而链接大语言模型,则可以为用户提供强大的文本生成能力。这些功能的结合,使得Comfy UI成为了一个优秀的AI原型工具。

13:14 Mixlab node的加密功能背后,是源于社群的需求和对创作者知识产权的保护。熊叔分享了这一功能背后的故事,强调了为更可持续的社区生态寻求可能性的重要性。通过加密功能,创作者可以保护自己的工作流程不被随意复制和盗用,从而激励更多的创新和创作。

18:36 在Mixlab node的开发过程中,最大的共识就是“Just do it”。AI技术的应用使得软件开发的成本大幅降低,原本需要一个月完成的需求,现在只需要1-2天即可完成。因此,开发者需要改变旧有的开发流程,更敏捷地尝试新的可能性。

22:34然而,在开发过程中,也存在着一些分歧。最大的分歧在于软件的复杂度与学习成本之间的冲突。随着Mixlab node功能的增加,如何保持用户的易用性和认知的清晰性成为了一个挑战。熊叔和他的团队需要在提供强大功能的同时,也要考虑如何降低用户的学习成本。

如何成为一位优秀的AI产品经理?

28.12 在开发AI产品的过程中,熊叔坦言,最好用的工具就是GPT。只需要向GPT提出需求,它就可以在几分钟内提供一个完整的代码。这让熊叔这样一个不懂Python的人,也能通过Python编程来实现想要的功能。

31.18熊叔认为,在AI时代,跨界的人有机会获得更大的加成。相反,只关注自己领域的人则获得的加成相对有限。AI技术的发展,为那些愿意跨出舒适区,学习新技能的人提供了更多的机会。

37.57 熊叔不仅在产品开发上有所建树,他还运营着自己的自媒体——“AI 产品经理”。通过自媒体,熊叔可以分享自己的知识和见解,同时也是一个消化知识和社交的好机会。通过内容的创作和分享,熊叔与更多志同道合的朋友建立了联系。

对新手AI 产品经理的建议

45.07 对于想要入行AI产品经理的新手,熊叔给出了几点建议。首先,要掌握AI提示词工程的能力,理解AI的能力,这样才能更好地利用AI技术。

50.19其次,要具备运营社群的能力,从用户实际使用过程中汇总信息,寻找需求。最后,要有跨界的思维,不断学习新的知识,以适应AI时代的变化。

结语

通过熊叔的分享,我们可以看到AI技术如何深刻地影响着我们的工作和生活。无论是在产品开发、社群运营还是个人成长上,AI都为我们提供了无限的可能性。让我们一起期待,在AI的帮助下,我们能够创造出更多令人惊叹的成果。

如果希望加入听友群,请扫描下方二维码

',22),i=[n];function r(c,m){return o(),t("div",null,i)}const d=e(p,[["render",r],["__file","AI如何改变产品经理的工作.html.vue"]]),l=JSON.parse('{"path":"/posts/discovery/AI%E5%A6%82%E4%BD%95%E6%94%B9%E5%8F%98%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86%E7%9A%84%E5%B7%A5%E4%BD%9C.html","title":"","lang":"en-US","frontmatter":{"description":"播客地址:AI如何改变产品经理的工作 熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。 熊叔的职业生涯 00:29 熊叔,一名资深...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/AI%E5%A6%82%E4%BD%95%E6%94%B9%E5%8F%98%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86%E7%9A%84%E5%B7%A5%E4%BD%9C.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:description","content":"播客地址:AI如何改变产品经理的工作 熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。 熊叔的职业生涯 00:29 熊叔,一名资深..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-06-06T08:20:44.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:description","content":"播客地址:AI如何改变产品经理的工作 熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。 熊叔的职业生涯 00:29 熊叔,一名资深..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-06-06T08:20:44.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1717662044000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/discovery/AI如何改变产品经理的工作.md","autoDesc":true,"excerpt":"\\n

播客地址:AI如何改变产品经理的工作

\\n

熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。

"}');export{d as comp,l as data}; diff --git a/docs/assets/API-03-DW_y3-g-.png b/docs/assets/API-03-DW_y3-g-.png deleted file mode 100644 index 93e09c7..0000000 Binary files a/docs/assets/API-03-DW_y3-g-.png and /dev/null differ diff --git a/docs/assets/API-04-CItmxP6i.png b/docs/assets/API-04-CItmxP6i.png deleted file mode 100644 index d6a121f..0000000 Binary files a/docs/assets/API-04-CItmxP6i.png and /dev/null differ diff --git a/docs/assets/API-05-SRm6s36i.png b/docs/assets/API-05-SRm6s36i.png deleted file mode 100644 index 7233a80..0000000 Binary files a/docs/assets/API-05-SRm6s36i.png and /dev/null differ diff --git a/docs/assets/API01-C3VSzi19.png b/docs/assets/API01-C3VSzi19.png deleted file mode 100644 index 4faa210..0000000 Binary files a/docs/assets/API01-C3VSzi19.png and /dev/null differ diff --git a/docs/assets/API02-BDcjvxSr.png b/docs/assets/API02-BDcjvxSr.png deleted file mode 100644 index 48f2549..0000000 Binary files a/docs/assets/API02-BDcjvxSr.png and /dev/null differ diff --git a/docs/assets/ApplyControlNet-T6FeDJLs.svg b/docs/assets/ApplyControlNet-T6FeDJLs.svg deleted file mode 100644 index 047c9dd..0000000 --- a/docs/assets/ApplyControlNet-T6FeDJLs.svg +++ /dev/null @@ -1 +0,0 @@ -Apply ControlNetconditioningcontrol_netimageCONDITIONINGstrength1.000 \ No newline at end of file diff --git a/docs/assets/ApplyStyleModel-BjkUEVpq.svg b/docs/assets/ApplyStyleModel-BjkUEVpq.svg deleted file mode 100644 index c501da8..0000000 --- a/docs/assets/ApplyStyleModel-BjkUEVpq.svg +++ /dev/null @@ -1 +0,0 @@ -Apply Style Modelconditioningstyle_modelclip_vision_outputCONDITIONING \ No newline at end of file diff --git a/docs/assets/CLIPSetLastLayer-B9W3GWtU.svg b/docs/assets/CLIPSetLastLayer-B9W3GWtU.svg deleted file mode 100644 index 43cb962..0000000 --- a/docs/assets/CLIPSetLastLayer-B9W3GWtU.svg +++ /dev/null @@ -1 +0,0 @@ -CLIP Set Last LayerclipCLIPstop_at_clip_layer-1 \ No newline at end of file diff --git a/docs/assets/CLIPTextEncodePrompt-hZy3NNU2.svg b/docs/assets/CLIPTextEncodePrompt-hZy3NNU2.svg deleted file mode 100644 index 1097c63..0000000 --- a/docs/assets/CLIPTextEncodePrompt-hZy3NNU2.svg +++ /dev/null @@ -1 +0,0 @@ -CLIP Text Encode (Prompt)clipCONDITIONING \ No newline at end of file diff --git a/docs/assets/CLIPVisionEncode-CftDdXV-.svg b/docs/assets/CLIPVisionEncode-CftDdXV-.svg deleted file mode 100644 index 6090baa..0000000 --- a/docs/assets/CLIPVisionEncode-CftDdXV-.svg +++ /dev/null @@ -1 +0,0 @@ -CLIP Vision Encodeclip_visionimageCLIP_VISION_OUTPUT \ No newline at end of file diff --git a/docs/assets/Comfyui Realtime LCM with Photoshop.html-Czi8jk_g.js b/docs/assets/Comfyui Realtime LCM with Photoshop.html-Czi8jk_g.js deleted file mode 100644 index 2889ef6..0000000 --- a/docs/assets/Comfyui Realtime LCM with Photoshop.html-Czi8jk_g.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o,b as i,a as r}from"./app-BFngqcKR.js";const l={},a=i("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/RKZeBV0zSBg?si=qruHJHL2ZfpLn4Nf",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:""},null,-1),n=r('

摘要

这段视频讲解了如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。视频详细介绍了工作流程,重点讲解了屏幕共享节点的使用方法,并提供了一些控制技巧。视频还提供了相关链接供观众参考。

提纲

  1. 简介

  2. 工作流程

  3. 控制技巧

  4. 总结

Workflow: drive.google.com/file/d/1RaUSzTz4pg4f3pxDDfmzH78GHzALnmyR/

comfyui-mixlab-nodes: github.com/shadowcz007/comfyui-mixlab-nodes

',6),s=[a,n];function c(m,p){return o(),t("div",null,s)}const d=e(l,[["render",c],["__file","Comfyui Realtime LCM with Photoshop.html.vue"]]),u=JSON.parse('{"path":"/posts/discovery/Comfyui%20Realtime%20LCM%20with%20Photoshop.html","title":"","lang":"en-US","frontmatter":{"description":"摘要 这段视频讲解了如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。视频详细介绍了工作流程,重点讲解了屏幕共享节点的使用方法,并提供了一些控制技巧。视频还提供了相关链接供观众参考。 提纲 简介 介绍视频内容:在ComfyUI...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/Comfyui%20Realtime%20LCM%20with%20Photoshop.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:description","content":"摘要 这段视频讲解了如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。视频详细介绍了工作流程,重点讲解了屏幕共享节点的使用方法,并提供了一些控制技巧。视频还提供了相关链接供观众参考。 提纲 简介 介绍视频内容:在ComfyUI..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-06-06T08:07:56.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:description","content":"摘要 这段视频讲解了如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。视频详细介绍了工作流程,重点讲解了屏幕共享节点的使用方法,并提供了一些控制技巧。视频还提供了相关链接供观众参考。 提纲 简介 介绍视频内容:在ComfyUI..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-06-06T08:07:56.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":3,"title":"摘要","slug":"摘要","link":"#摘要","children":[]},{"level":3,"title":"提纲","slug":"提纲","link":"#提纲","children":[]}],"git":{"updatedTime":1717661276000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/discovery/Comfyui Realtime LCM with Photoshop.md","autoDesc":true,"excerpt":""}');export{d as comp,u as data}; diff --git a/docs/assets/ConditioningAverage-Drh7U2UB.svg b/docs/assets/ConditioningAverage-Drh7U2UB.svg deleted file mode 100644 index 275bdcd..0000000 --- a/docs/assets/ConditioningAverage-Drh7U2UB.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Average)conditioning_toconditioning_fromCONDITIONINGconditioning_to_strength1.000 \ No newline at end of file diff --git a/docs/assets/ConditioningCombine-C3NkkjHK.svg b/docs/assets/ConditioningCombine-C3NkkjHK.svg deleted file mode 100644 index b3e0223..0000000 --- a/docs/assets/ConditioningCombine-C3NkkjHK.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Combine)conditioning_1conditioning_2CONDITIONING \ No newline at end of file diff --git a/docs/assets/ConditioningSetArea-dVMUIFKq.svg b/docs/assets/ConditioningSetArea-dVMUIFKq.svg deleted file mode 100644 index a8a45b7..0000000 --- a/docs/assets/ConditioningSetArea-dVMUIFKq.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Set Area)conditioningCONDITIONINGwidth64height64x0y0strength1.000 \ No newline at end of file diff --git a/docs/assets/ConditioningSetMask-VXvrA2C9.svg b/docs/assets/ConditioningSetMask-VXvrA2C9.svg deleted file mode 100644 index e20fafe..0000000 --- a/docs/assets/ConditioningSetMask-VXvrA2C9.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Set Mask)conditioningmaskCONDITIONINGstrength1.000set_cond_areadefault \ No newline at end of file diff --git a/docs/assets/ConvertImageToMask-cXPU6ybK.svg b/docs/assets/ConvertImageToMask-cXPU6ybK.svg deleted file mode 100644 index ab17828..0000000 --- a/docs/assets/ConvertImageToMask-cXPU6ybK.svg +++ /dev/null @@ -1 +0,0 @@ -Convert Image to MaskimageMASKchannelred \ No newline at end of file diff --git a/docs/assets/CropLatent-B_cR3_Xi.svg b/docs/assets/CropLatent-B_cR3_Xi.svg deleted file mode 100644 index 1c13da4..0000000 --- a/docs/assets/CropLatent-B_cR3_Xi.svg +++ /dev/null @@ -1 +0,0 @@ -Crop LatentsamplesLATENTwidth512height512x0y0 \ No newline at end of file diff --git a/docs/assets/CropMask-9iFwdALP.svg b/docs/assets/CropMask-9iFwdALP.svg deleted file mode 100644 index 45a51fd..0000000 --- a/docs/assets/CropMask-9iFwdALP.svg +++ /dev/null @@ -1 +0,0 @@ -CropMaskmaskMASKx0y0width512height512 \ No newline at end of file diff --git a/docs/assets/DiffusersLoader-mzdmk8hT.svg b/docs/assets/DiffusersLoader-mzdmk8hT.svg deleted file mode 100644 index f19b31a..0000000 --- a/docs/assets/DiffusersLoader-mzdmk8hT.svg +++ /dev/null @@ -1 +0,0 @@ -DiffusersLoaderMODELCLIPVAEmodel_pathundefined \ No newline at end of file diff --git a/docs/assets/EmptyLatentImage-D8EMT608.svg b/docs/assets/EmptyLatentImage-D8EMT608.svg deleted file mode 100644 index 80a0679..0000000 --- a/docs/assets/EmptyLatentImage-D8EMT608.svg +++ /dev/null @@ -1 +0,0 @@ -Empty Latent ImageLATENTwidth512height512batch_size1 \ No newline at end of file diff --git a/docs/assets/FeatherMask-CFIc33fP.svg b/docs/assets/FeatherMask-CFIc33fP.svg deleted file mode 100644 index 2976fae..0000000 --- a/docs/assets/FeatherMask-CFIc33fP.svg +++ /dev/null @@ -1 +0,0 @@ -FeatherMaskmaskMASKleft0top0right0bottom0 \ No newline at end of file diff --git a/docs/assets/FlipLatent-DBtA-SV6.svg b/docs/assets/FlipLatent-DBtA-SV6.svg deleted file mode 100644 index c1c253b..0000000 --- a/docs/assets/FlipLatent-DBtA-SV6.svg +++ /dev/null @@ -1 +0,0 @@ -Flip LatentsamplesLATENTflip_methodx-axis: vertically \ No newline at end of file diff --git a/docs/assets/GLIGENLoader-D-vTl3Sj.svg b/docs/assets/GLIGENLoader-D-vTl3Sj.svg deleted file mode 100644 index 2892998..0000000 --- a/docs/assets/GLIGENLoader-D-vTl3Sj.svg +++ /dev/null @@ -1 +0,0 @@ -GLIGENLoaderGLIGENgligen_namegligen_sd14_fp16.safetensors \ No newline at end of file diff --git a/docs/assets/GLIGENTextboxApply-D4bHz8Hm.svg b/docs/assets/GLIGENTextboxApply-D4bHz8Hm.svg deleted file mode 100644 index c5b9794..0000000 --- a/docs/assets/GLIGENTextboxApply-D4bHz8Hm.svg +++ /dev/null @@ -1 +0,0 @@ -GLIGENTextBoxApplyconditioning_toclipgligen_textbox_modelCONDITIONINGwidth64height64x0y0 \ No newline at end of file diff --git a/docs/assets/HypernetworkLoader-C8B_JGiF.svg b/docs/assets/HypernetworkLoader-C8B_JGiF.svg deleted file mode 100644 index 869feff..0000000 --- a/docs/assets/HypernetworkLoader-C8B_JGiF.svg +++ /dev/null @@ -1 +0,0 @@ -HypernetworkLoadermodelMODELhypernetwork_nameundefinedstrength1.000 \ No newline at end of file diff --git a/docs/assets/ImageBlend-CAd_GaLc.svg b/docs/assets/ImageBlend-CAd_GaLc.svg deleted file mode 100644 index 2a35115..0000000 --- a/docs/assets/ImageBlend-CAd_GaLc.svg +++ /dev/null @@ -1 +0,0 @@ -ImageBlendimage1image2IMAGEblend_factor0.500blend_modenormal \ No newline at end of file diff --git a/docs/assets/ImageBlur-BZL9jSkN.svg b/docs/assets/ImageBlur-BZL9jSkN.svg deleted file mode 100644 index 0da2335..0000000 --- a/docs/assets/ImageBlur-BZL9jSkN.svg +++ /dev/null @@ -1 +0,0 @@ -ImageBlurimageIMAGEblur_radius1sigma1.000 \ No newline at end of file diff --git a/docs/assets/ImageQuantize-WjbyHjQe.svg b/docs/assets/ImageQuantize-WjbyHjQe.svg deleted file mode 100644 index ca6dfad..0000000 --- a/docs/assets/ImageQuantize-WjbyHjQe.svg +++ /dev/null @@ -1 +0,0 @@ -ImageQuantizeimageIMAGEcolors256dithernone \ No newline at end of file diff --git a/docs/assets/ImageSharpen-CAocoy-2.svg b/docs/assets/ImageSharpen-CAocoy-2.svg deleted file mode 100644 index 36331d3..0000000 --- a/docs/assets/ImageSharpen-CAocoy-2.svg +++ /dev/null @@ -1 +0,0 @@ -ImageSharpenimageIMAGEsharpen_radius1alpha1.000 \ No newline at end of file diff --git a/docs/assets/InvertMask-CXALs9bU.svg b/docs/assets/InvertMask-CXALs9bU.svg deleted file mode 100644 index 6fd5f54..0000000 --- a/docs/assets/InvertMask-CXALs9bU.svg +++ /dev/null @@ -1 +0,0 @@ -InvertMaskmaskMASK \ No newline at end of file diff --git a/docs/assets/KSampler-LOr6cHLj.svg b/docs/assets/KSampler-LOr6cHLj.svg deleted file mode 100644 index e8123bf..0000000 --- a/docs/assets/KSampler-LOr6cHLj.svg +++ /dev/null @@ -1 +0,0 @@ -KSamplermodelpositivenegativelatent_imageLATENTseed505447197457458control_after_generaterandomizesteps20cfg8.000sampler_nameeulerschedulernormaldenoise1.000 \ No newline at end of file diff --git a/docs/assets/KSamplerADV-0c9yINrV.svg b/docs/assets/KSamplerADV-0c9yINrV.svg deleted file mode 100644 index 7cb1f1f..0000000 --- a/docs/assets/KSamplerADV-0c9yINrV.svg +++ /dev/null @@ -1 +0,0 @@ -KSampler (Advanced)modelpositivenegativelatent_imageLATENTadd_noiseenablenoise_seed0control_after_generaterandomizesteps20cfg8.000sampler_nameeulerschedulernormalstart_at_step0end_at_step10000return_with_leftover_noisedisable \ No newline at end of file diff --git a/docs/assets/LatentComposite-UQ81jvlz.svg b/docs/assets/LatentComposite-UQ81jvlz.svg deleted file mode 100644 index 0084d61..0000000 --- a/docs/assets/LatentComposite-UQ81jvlz.svg +++ /dev/null @@ -1 +0,0 @@ -Latent Compositesamples_tosamples_fromLATENTx0y0feather0 \ No newline at end of file diff --git a/docs/assets/LatentCompositeMasked-DZJAVyUF.svg b/docs/assets/LatentCompositeMasked-DZJAVyUF.svg deleted file mode 100644 index 4be1453..0000000 --- a/docs/assets/LatentCompositeMasked-DZJAVyUF.svg +++ /dev/null @@ -1 +0,0 @@ -LatentCompositeMaskeddestinationsourcemaskLATENTx0y0 \ No newline at end of file diff --git a/docs/assets/LatentFromBatch-YeN1b-Lj.svg b/docs/assets/LatentFromBatch-YeN1b-Lj.svg deleted file mode 100644 index 84e2a3e..0000000 --- a/docs/assets/LatentFromBatch-YeN1b-Lj.svg +++ /dev/null @@ -1 +0,0 @@ -Latent From BatchsamplesLATENTbatch_index0length1 \ No newline at end of file diff --git a/docs/assets/LoadCLIP-C94A2T08.svg b/docs/assets/LoadCLIP-C94A2T08.svg deleted file mode 100644 index 7a31f73..0000000 --- a/docs/assets/LoadCLIP-C94A2T08.svg +++ /dev/null @@ -1 +0,0 @@ -Load CLIPCLIPclip_nameundefined \ No newline at end of file diff --git a/docs/assets/LoadCLIPVision-CtFF4wbm.svg b/docs/assets/LoadCLIPVision-CtFF4wbm.svg deleted file mode 100644 index d0d7331..0000000 --- a/docs/assets/LoadCLIPVision-CtFF4wbm.svg +++ /dev/null @@ -1 +0,0 @@ -Load CLIP VisionCLIP_VISIONclip_nameundefined \ No newline at end of file diff --git a/docs/assets/LoadCheckpoint-BQouw9PX.svg b/docs/assets/LoadCheckpoint-BQouw9PX.svg deleted file mode 100644 index 7f6c9af..0000000 --- a/docs/assets/LoadCheckpoint-BQouw9PX.svg +++ /dev/null @@ -1 +0,0 @@ -Load CheckpointMODELCLIPVAEckpt_nameanythingV3_fp16.ckpt \ No newline at end of file diff --git a/docs/assets/LoadCheckpointWithConfig-BN6zB4MN.svg b/docs/assets/LoadCheckpointWithConfig-BN6zB4MN.svg deleted file mode 100644 index 07754d3..0000000 --- a/docs/assets/LoadCheckpointWithConfig-BN6zB4MN.svg +++ /dev/null @@ -1 +0,0 @@ -Load Checkpoint (With Config)MODELCLIPVAEconfig_nameanything_v3.yamlckpt_nameanythingV3_fp16.ckpt \ No newline at end of file diff --git a/docs/assets/LoadControlNet-DHg5P2Us.svg b/docs/assets/LoadControlNet-DHg5P2Us.svg deleted file mode 100644 index 7833012..0000000 --- a/docs/assets/LoadControlNet-DHg5P2Us.svg +++ /dev/null @@ -1 +0,0 @@ -Load ControlNet ModelCONTROL_NETcontrol_net_namehed.safetensors \ No newline at end of file diff --git a/docs/assets/LoadImage-CIzP9BtT.svg b/docs/assets/LoadImage-CIzP9BtT.svg deleted file mode 100644 index 09d1ee9..0000000 --- a/docs/assets/LoadImage-CIzP9BtT.svg +++ /dev/null @@ -1 +0,0 @@ -Load ImageIMAGEMASKimageComfyUI_00624_.pngchoose file to upload \ No newline at end of file diff --git a/docs/assets/LoadImageAsMask-CvgYUE6N.svg b/docs/assets/LoadImageAsMask-CvgYUE6N.svg deleted file mode 100644 index 0a17f68..0000000 --- a/docs/assets/LoadImageAsMask-CvgYUE6N.svg +++ /dev/null @@ -1 +0,0 @@ -Load Image (as Mask)MASKimageComfyUI_00624_.pngchannelalphachoose file to upload \ No newline at end of file diff --git a/docs/assets/LoadLatent-C85_Mtz4.svg b/docs/assets/LoadLatent-C85_Mtz4.svg deleted file mode 100644 index f9667d6..0000000 --- a/docs/assets/LoadLatent-C85_Mtz4.svg +++ /dev/null @@ -1 +0,0 @@ -LoadLatentLATENTlatentundefined \ No newline at end of file diff --git a/docs/assets/LoadLoRA-Bng2EN8f.svg b/docs/assets/LoadLoRA-Bng2EN8f.svg deleted file mode 100644 index e33042a..0000000 --- a/docs/assets/LoadLoRA-Bng2EN8f.svg +++ /dev/null @@ -1 +0,0 @@ -Load LoRAmodelclipMODELCLIPlora_namestyle_icons.safetensorsstrength_model1.000strength_clip1.000 \ No newline at end of file diff --git a/docs/assets/LoadStyleModel-cphcEIxJ.svg b/docs/assets/LoadStyleModel-cphcEIxJ.svg deleted file mode 100644 index fe6fcab..0000000 --- a/docs/assets/LoadStyleModel-cphcEIxJ.svg +++ /dev/null @@ -1 +0,0 @@ -Load Style ModelSTYLE_MODELstyle_model_nameundefined \ No newline at end of file diff --git a/docs/assets/LoadUpscaleModel-C74PIl6V.svg b/docs/assets/LoadUpscaleModel-C74PIl6V.svg deleted file mode 100644 index bb65104..0000000 --- a/docs/assets/LoadUpscaleModel-C74PIl6V.svg +++ /dev/null @@ -1 +0,0 @@ -Load Upscale ModelUPSCALE_MODELmodel_nameESRGAN_4x.pth \ No newline at end of file diff --git a/docs/assets/LoadVAE-2X0vkEPY.svg b/docs/assets/LoadVAE-2X0vkEPY.svg deleted file mode 100644 index 15ca334..0000000 --- a/docs/assets/LoadVAE-2X0vkEPY.svg +++ /dev/null @@ -1 +0,0 @@ -Load VAEVAEvae_nameAnything-V3.0.vae.pt \ No newline at end of file diff --git a/docs/assets/MaskComposite-D-LgFTnL.svg b/docs/assets/MaskComposite-D-LgFTnL.svg deleted file mode 100644 index 6428b10..0000000 --- a/docs/assets/MaskComposite-D-LgFTnL.svg +++ /dev/null @@ -1 +0,0 @@ -MaskCompositedestinationsourceMASKx0y0operationmultiply \ No newline at end of file diff --git a/docs/assets/PadImageForOutpainting-Dzr-CDCB.svg b/docs/assets/PadImageForOutpainting-Dzr-CDCB.svg deleted file mode 100644 index 0524817..0000000 --- a/docs/assets/PadImageForOutpainting-Dzr-CDCB.svg +++ /dev/null @@ -1 +0,0 @@ -Pad Image for OutpaintingimageIMAGEMASKleft0top0right0bottom0feathering40 \ No newline at end of file diff --git a/docs/assets/PreviewImage-Br5eeeHl.svg b/docs/assets/PreviewImage-Br5eeeHl.svg deleted file mode 100644 index ca817d4..0000000 --- a/docs/assets/PreviewImage-Br5eeeHl.svg +++ /dev/null @@ -1 +0,0 @@ -Preview Imageimages \ No newline at end of file diff --git a/docs/assets/RebatchLatents-YWT5gNwM.svg b/docs/assets/RebatchLatents-YWT5gNwM.svg deleted file mode 100644 index d29f961..0000000 --- a/docs/assets/RebatchLatents-YWT5gNwM.svg +++ /dev/null @@ -1 +0,0 @@ -Rebatch LatentslatentsLATENTbatch_size1 \ No newline at end of file diff --git a/docs/assets/RepeatLatentBatch-BqPx0NXv.svg b/docs/assets/RepeatLatentBatch-BqPx0NXv.svg deleted file mode 100644 index 7ca6028..0000000 --- a/docs/assets/RepeatLatentBatch-BqPx0NXv.svg +++ /dev/null @@ -1 +0,0 @@ -Repeat Latent BatchsamplesLATENTamount1 \ No newline at end of file diff --git a/docs/assets/RotateLatent-CFLvhpt7.svg b/docs/assets/RotateLatent-CFLvhpt7.svg deleted file mode 100644 index cb65057..0000000 --- a/docs/assets/RotateLatent-CFLvhpt7.svg +++ /dev/null @@ -1 +0,0 @@ -Rotate LatentsamplesLATENTrotationnone \ No newline at end of file diff --git a/docs/assets/SR-on7jf4DI.png b/docs/assets/SR-on7jf4DI.png deleted file mode 100644 index 9484e57..0000000 Binary files a/docs/assets/SR-on7jf4DI.png and /dev/null differ diff --git a/docs/assets/SaveImage-z3yAym7e.svg b/docs/assets/SaveImage-z3yAym7e.svg deleted file mode 100644 index 70f6e73..0000000 --- a/docs/assets/SaveImage-z3yAym7e.svg +++ /dev/null @@ -1 +0,0 @@ -Save Imageimagesfilename_prefixComfyUI \ No newline at end of file diff --git a/docs/assets/SaveLatent-DtsgIWDD.svg b/docs/assets/SaveLatent-DtsgIWDD.svg deleted file mode 100644 index 89b04f5..0000000 --- a/docs/assets/SaveLatent-DtsgIWDD.svg +++ /dev/null @@ -1 +0,0 @@ -SaveLatentsamplesfilename_prefixlatents/ComfyUI \ No newline at end of file diff --git a/docs/assets/SearchResult-BwEG9_q-.js b/docs/assets/SearchResult-BwEG9_q-.js deleted file mode 100644 index 7e09bb9..0000000 --- a/docs/assets/SearchResult-BwEG9_q-.js +++ /dev/null @@ -1 +0,0 @@ -import{u as M,f as se,g as te,h as U,i as ae,P as le,t as re,j as ue,k as b,l as k,m as ie,n as Y,p as t,q as oe,R as O,s as ne,v as ce,x as ve,C as pe,y as de,z as he,A as ye,B as Ee,D as me,E as ge,F as Ae,G as T,H as $,I as fe,J as C,K as Be}from"./app-BFngqcKR.js";const He=["/","/posts/mission.html","/posts/discovery/AI%E5%A6%82%E4%BD%95%E6%94%B9%E5%8F%98%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86%E7%9A%84%E5%B7%A5%E4%BD%9C.html","/posts/discovery/comfyui%20mixlab%20nodes%20%E6%8F%92%E4%BB%B6%20%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%94%9F%E6%88%90APP%20%E9%80%8F%E6%98%8Epng%E5%9B%BE%E5%83%8F%20%E5%A4%9A%E7%A7%8D%E5%8A%9F%E8%83%BD.html","/posts/discovery/Comfyui%20Realtime%20LCM%20with%20Photoshop.html","/posts/discovery/prompt.html","/posts/discovery/%E8%81%8A%E8%81%8AMixlab%20Node%EF%BC%9AAI%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81.html","/posts/insight/","/posts/mixlab_nodes/","/posts/task/","/posts/tutorial/advanced/","/posts/tutorial/core_nodes/","/posts/tutorial/custom_nodes/","/posts/tutorial/interface/","/posts/tutorial/start/","/posts/tutorial/for_testing/","/404.html"],Re="SEARCH_PRO_QUERY_HISTORY",m=M(Re,[]),ke=()=>{const{queryHistoryCount:a}=C,l=a>0;return{enabled:l,queryHistory:m,addQueryHistory:r=>{l&&(m.value=Array.from(new Set([r,...m.value.slice(0,a-1)])))},removeQueryHistory:r=>{m.value=[...m.value.slice(0,r),...m.value.slice(r+1)]}}},L=a=>He[a.id]+("anchor"in a?`#${a.anchor}`:""),Ce="SEARCH_PRO_RESULT_HISTORY",{resultHistoryCount:j}=C,g=M(Ce,[]),xe=()=>{const a=j>0;return{enabled:a,resultHistory:g,addResultHistory:l=>{if(a){const r={link:L(l),display:l.display};"header"in l&&(r.header=l.header),g.value=[r,...g.value.slice(0,j-1)]}},removeResultHistory:l=>{g.value=[...g.value.slice(0,l),...g.value.slice(l+1)]}}},De=a=>{const l=pe(),r=U(),x=de(),i=b(0),B=k(()=>i.value>0),h=he([]);return ye(()=>{const{search:y,terminate:D}=Ee(),A=fe(c=>{const f=c.join(" "),{searchFilter:w=d=>d,splitWord:Q,suggestionsFilter:P,...E}=l.value;f?(i.value+=1,y(c.join(" "),r.value,E).then(d=>w(d,f,r.value,x.value)).then(d=>{i.value-=1,h.value=d}).catch(d=>{console.warn(d),i.value-=1,i.value||(h.value=[])})):h.value=[]},C.searchDelay-C.suggestDelay);Y([a,r],([c])=>A(c),{immediate:!0}),me(()=>{D()})}),{isSearching:B,results:h}};var Qe=se({name:"SearchResult",props:{queries:{type:Array,required:!0},isFocusing:Boolean},emits:["close","updateQuery"],setup(a,{emit:l}){const r=te(),x=U(),i=ae(le),{enabled:B,addQueryHistory:h,queryHistory:y,removeQueryHistory:D}=ke(),{enabled:A,resultHistory:c,addResultHistory:f,removeResultHistory:w}=xe(),Q=B||A,P=re(a,"queries"),{results:E,isSearching:d}=De(P),u=ue({isQuery:!0,index:0}),v=b(0),p=b(0),_=k(()=>Q&&(y.value.length>0||c.value.length>0)),F=k(()=>E.value.length>0),q=k(()=>E.value[v.value]||null),z=()=>{const{isQuery:e,index:s}=u;s===0?(u.isQuery=!e,u.index=e?c.value.length-1:y.value.length-1):u.index=s-1},G=()=>{const{isQuery:e,index:s}=u;s===(e?y.value.length-1:c.value.length-1)?(u.isQuery=!e,u.index=0):u.index=s+1},J=()=>{v.value=v.value>0?v.value-1:E.value.length-1,p.value=q.value.contents.length-1},K=()=>{v.value=v.value{p.value{p.value>0?p.value-=1:J()},S=e=>e.map(s=>Be(s)?s:t(s[0],s[1])),W=e=>{if(e.type==="customField"){const s=ge[e.index]||"$content",[o,R=""]=Ae(s)?s[x.value].split("$content"):s.split("$content");return e.display.map(n=>t("div",S([o,...n,R])))}return e.display.map(s=>t("div",S(s)))},H=()=>{v.value=0,p.value=0,l("updateQuery",""),l("close")},X=()=>B?t("ul",{class:"search-pro-result-list"},t("li",{class:"search-pro-result-list-item"},[t("div",{class:"search-pro-result-title"},i.value.queryHistory),y.value.map((e,s)=>t("div",{class:["search-pro-result-item",{active:u.isQuery&&u.index===s}],onClick:()=>{l("updateQuery",e)}},[t(T,{class:"search-pro-result-type"}),t("div",{class:"search-pro-result-content"},e),t("button",{class:"search-pro-remove-icon",innerHTML:$,onClick:o=>{o.preventDefault(),o.stopPropagation(),D(s)}})]))])):null,Z=()=>A?t("ul",{class:"search-pro-result-list"},t("li",{class:"search-pro-result-list-item"},[t("div",{class:"search-pro-result-title"},i.value.resultHistory),c.value.map((e,s)=>t(O,{to:e.link,class:["search-pro-result-item",{active:!u.isQuery&&u.index===s}],onClick:()=>{H()}},()=>[t(T,{class:"search-pro-result-type"}),t("div",{class:"search-pro-result-content"},[e.header?t("div",{class:"content-header"},e.header):null,t("div",e.display.map(o=>S(o)).flat())]),t("button",{class:"search-pro-remove-icon",innerHTML:$,onClick:o=>{o.preventDefault(),o.stopPropagation(),w(s)}})]))])):null;return ie("keydown",e=>{if(a.isFocusing){if(F.value){if(e.key==="ArrowUp")V();else if(e.key==="ArrowDown")N();else if(e.key==="Enter"){const s=q.value.contents[p.value];h(a.queries.join(" ")),f(s),r.push(L(s)),H()}}else if(A){if(e.key==="ArrowUp")z();else if(e.key==="ArrowDown")G();else if(e.key==="Enter"){const{index:s}=u;u.isQuery?(l("updateQuery",y.value[s]),e.preventDefault()):(r.push(c.value[s].link),H())}}}}),Y([v,p],()=>{var e;(e=document.querySelector(".search-pro-result-list-item.active .search-pro-result-item.active"))==null||e.scrollIntoView(!1)},{flush:"post"}),()=>t("div",{class:["search-pro-result-wrapper",{empty:a.queries.length?!F.value:!_.value}],id:"search-pro-results"},a.queries.length?d.value?t(oe,{hint:i.value.searching}):F.value?t("ul",{class:"search-pro-result-list"},E.value.map(({title:e,contents:s},o)=>{const R=v.value===o;return t("li",{class:["search-pro-result-list-item",{active:R}]},[t("div",{class:"search-pro-result-title"},e||i.value.defaultTitle),s.map((n,ee)=>{const I=R&&p.value===ee;return t(O,{to:L(n),class:["search-pro-result-item",{active:I,"aria-selected":I}],onClick:()=>{h(a.queries.join(" ")),f(n),H()}},()=>[n.type==="text"?null:t(n.type==="title"?ne:n.type==="heading"?ce:ve,{class:"search-pro-result-type"}),t("div",{class:"search-pro-result-content"},[n.type==="text"&&n.header?t("div",{class:"content-header"},n.header):null,t("div",W(n))])])})])})):i.value.emptyResult:Q?_.value?[X(),Z()]:i.value.emptyHistory:i.value.emptyResult)}});export{Qe as default}; diff --git a/docs/assets/SetLatentNoiseMask-MmkLdInd.svg b/docs/assets/SetLatentNoiseMask-MmkLdInd.svg deleted file mode 100644 index 947ae20..0000000 --- a/docs/assets/SetLatentNoiseMask-MmkLdInd.svg +++ /dev/null @@ -1 +0,0 @@ -Set Latent Noise MasksamplesmaskLATENT \ No newline at end of file diff --git a/docs/assets/SolidMask-Ch9FCV-j.svg b/docs/assets/SolidMask-Ch9FCV-j.svg deleted file mode 100644 index 097f399..0000000 --- a/docs/assets/SolidMask-Ch9FCV-j.svg +++ /dev/null @@ -1 +0,0 @@ -SolidMaskMASKvalue1.000width512height512 \ No newline at end of file diff --git a/docs/assets/TokenMergingforStableDiffusion-CqqHudlC.jpg b/docs/assets/TokenMergingforStableDiffusion-CqqHudlC.jpg deleted file mode 100644 index d8166b0..0000000 Binary files a/docs/assets/TokenMergingforStableDiffusion-CqqHudlC.jpg and /dev/null differ diff --git a/docs/assets/TomePatchModel-BBDtRE1G.svg b/docs/assets/TomePatchModel-BBDtRE1G.svg deleted file mode 100644 index 19aec4e..0000000 --- a/docs/assets/TomePatchModel-BBDtRE1G.svg +++ /dev/null @@ -1 +0,0 @@ -TomePatchModelmodelMODELratio0.300 \ No newline at end of file diff --git a/docs/assets/UpscaleImage-CCa7VY0g.svg b/docs/assets/UpscaleImage-CCa7VY0g.svg deleted file mode 100644 index 8dbdf1d..0000000 --- a/docs/assets/UpscaleImage-CCa7VY0g.svg +++ /dev/null @@ -1 +0,0 @@ -Upscale ImageimageIMAGEupscale_methodnearest-exactwidth512height512cropdisabled \ No newline at end of file diff --git a/docs/assets/UpscaleImageUsingModel-DV-SF4Wg.svg b/docs/assets/UpscaleImageUsingModel-DV-SF4Wg.svg deleted file mode 100644 index d074eb8..0000000 --- a/docs/assets/UpscaleImageUsingModel-DV-SF4Wg.svg +++ /dev/null @@ -1 +0,0 @@ -Upscale Image (using Model)upscale_modelimageIMAGE \ No newline at end of file diff --git a/docs/assets/UpscaleLatent-I-gJiwEn.svg b/docs/assets/UpscaleLatent-I-gJiwEn.svg deleted file mode 100644 index 5deec0c..0000000 --- a/docs/assets/UpscaleLatent-I-gJiwEn.svg +++ /dev/null @@ -1 +0,0 @@ -Upscale LatentsamplesLATENTupscale_methodnearest-exactwidth512height512cropdisabled \ No newline at end of file diff --git a/docs/assets/VAEDecode-B-picWPt.svg b/docs/assets/VAEDecode-B-picWPt.svg deleted file mode 100644 index a0dd8ad..0000000 --- a/docs/assets/VAEDecode-B-picWPt.svg +++ /dev/null @@ -1 +0,0 @@ -VAE DecodesamplesvaeIMAGE \ No newline at end of file diff --git a/docs/assets/VAEDecodeTiled-DY9VBdS9.svg b/docs/assets/VAEDecodeTiled-DY9VBdS9.svg deleted file mode 100644 index c816397..0000000 --- a/docs/assets/VAEDecodeTiled-DY9VBdS9.svg +++ /dev/null @@ -1 +0,0 @@ -VAE Decode (Tiled)samplesvaeIMAGE \ No newline at end of file diff --git a/docs/assets/VAEEncode-D5EYZEJ2.svg b/docs/assets/VAEEncode-D5EYZEJ2.svg deleted file mode 100644 index 4e471a6..0000000 --- a/docs/assets/VAEEncode-D5EYZEJ2.svg +++ /dev/null @@ -1 +0,0 @@ -VAE EncodepixelsvaeLATENT \ No newline at end of file diff --git a/docs/assets/VAEEncodeForInpainting-DD-YX7G1.svg b/docs/assets/VAEEncodeForInpainting-DD-YX7G1.svg deleted file mode 100644 index c7c9640..0000000 --- a/docs/assets/VAEEncodeForInpainting-DD-YX7G1.svg +++ /dev/null @@ -1 +0,0 @@ -VAE Encode (for Inpainting)pixelsvaemaskLATENTgrow_mask_by6 \ No newline at end of file diff --git a/docs/assets/VAEEncodeTiled-BQJoK_t9.svg b/docs/assets/VAEEncodeTiled-BQJoK_t9.svg deleted file mode 100644 index 2df29a4..0000000 --- a/docs/assets/VAEEncodeTiled-BQJoK_t9.svg +++ /dev/null @@ -1 +0,0 @@ -VAE Encode (Tiled)pixelsvaeLATENT \ No newline at end of file diff --git a/docs/assets/app-BFngqcKR.js b/docs/assets/app-BFngqcKR.js deleted file mode 100644 index b5b1553..0000000 --- a/docs/assets/app-BFngqcKR.js +++ /dev/null @@ -1,26 +0,0 @@ -/** -* @vue/shared v3.4.27 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function ni(e,t){const n=new Set(e.split(","));return o=>n.has(o)}const Ge={},to=[],Rt=()=>{},cf=()=>!1,Wo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),oi=e=>e.startsWith("onUpdate:"),nt=Object.assign,ri=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},uf=Object.prototype.hasOwnProperty,Re=(e,t)=>uf.call(e,t),_e=Array.isArray,no=e=>Dr(e)==="[object Map]",El=e=>Dr(e)==="[object Set]",Ce=e=>typeof e=="function",ot=e=>typeof e=="string",Nn=e=>typeof e=="symbol",We=e=>e!==null&&typeof e=="object",kl=e=>(We(e)||Ce(e))&&Ce(e.then)&&Ce(e.catch),Cl=Object.prototype.toString,Dr=e=>Cl.call(e),ff=e=>Dr(e).slice(8,-1),Sl=e=>Dr(e)==="[object Object]",si=e=>ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,oo=ni(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Br=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},df=/-(\w)/g,$t=Br(e=>e.replace(df,(t,n)=>n?n.toUpperCase():"")),pf=/\B([A-Z])/g,Hn=Br(e=>e.replace(pf,"-$1").toLowerCase()),qo=Br(e=>e.charAt(0).toUpperCase()+e.slice(1)),gs=Br(e=>e?`on${qo(e)}`:""),_n=(e,t)=>!Object.is(e,t),vs=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},hf=e=>{const t=parseFloat(e);return isNaN(t)?e:t},mf=e=>{const t=ot(e)?Number(e):NaN;return isNaN(t)?e:t};let fa;const Ll=()=>fa||(fa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qt(e){if(_e(e)){const t={};for(let n=0;n{if(n){const o=n.split(vf);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ut(e){let t="";if(ot(e))t=e;else if(_e(e))for(let n=0;not(e)?e:e==null?"":_e(e)||We(e)&&(e.toString===Cl||!Ce(e.toString))?JSON.stringify(e,Al,2):String(e),Al=(e,t)=>t&&t.__v_isRef?Al(e,t.value):no(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],s)=>(n[_s(o,s)+" =>"]=r,n),{})}:El(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>_s(n))}:Nn(t)?_s(t):We(t)&&!_e(t)&&!Sl(t)?String(t):t,_s=(e,t="")=>{var n;return Nn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.4.27 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let kt;class Ef{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=kt,!t&&kt&&(this.index=(kt.scopes||(kt.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=kt;try{return kt=this,t()}finally{kt=n}}}on(){kt=this}off(){kt=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),wn()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=mn,n=In;try{return mn=!0,In=this,this._runnings++,da(this),this.fn()}finally{pa(this),this._runnings--,In=n,mn=t}}stop(){this.active&&(da(this),pa(this),this.onStop&&this.onStop(),this.active=!1)}}function Sf(e){return e.value}function da(e){e._trackId++,e._depsLength=0}function pa(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},xr=new WeakMap,$n=Symbol(""),Bs=Symbol("");function wt(e,t,n){if(mn&&In){let o=xr.get(e);o||xr.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=jl(()=>o.delete(n))),Il(In,r)}}function en(e,t,n,o,r,s){const i=xr.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&_e(e)){const c=Number(o);i.forEach((u,d)=>{(d==="length"||!Nn(d)&&d>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(i.get(n)),t){case"add":_e(e)?si(n)&&l.push(i.get("length")):(l.push(i.get($n)),no(e)&&l.push(i.get(Bs)));break;case"delete":_e(e)||(l.push(i.get($n)),no(e)&&l.push(i.get(Bs)));break;case"set":no(e)&&l.push(i.get($n));break}ai();for(const c of l)c&&$l(c,4);li()}function xf(e,t){const n=xr.get(e);return n&&n.get(t)}const Lf=ni("__proto__,__v_isRef,__isVue"),Ml=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Nn)),ha=Of();function Of(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=je(this);for(let s=0,i=this.length;s{e[t]=function(...n){yn(),ai();const o=je(this)[t].apply(this,n);return li(),wn(),o}}),e}function Af(e){Nn(e)||(e=String(e));const t=je(this);return wt(t,"has",e),t.hasOwnProperty(e)}class Nl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){const r=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(r?s?zf:Fl:s?Bl:Dl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=_e(t);if(!r){if(i&&Re(ha,n))return Reflect.get(ha,n,o);if(n==="hasOwnProperty")return Af}const l=Reflect.get(t,n,o);return(Nn(n)?Ml.has(n):Lf(n))||(r||wt(t,"get",n),s)?l:ht(l)?i&&si(n)?l:l.value:We(l)?r?Dn(l):Ko(l):l}}class Hl extends Nl{constructor(t=!1){super(!1,t)}set(t,n,o,r){let s=t[n];if(!this._isShallow){const c=Mo(s);if(!Lr(o)&&!Mo(o)&&(s=je(s),o=je(o)),!_e(t)&&ht(s)&&!ht(o))return c?!1:(s.value=o,!0)}const i=_e(t)&&si(n)?Number(n)e,Fr=e=>Reflect.getPrototypeOf(e);function lr(e,t,n=!1,o=!1){e=e.__v_raw;const r=je(e),s=je(t);n||(_n(t,s)&&wt(r,"get",t),wt(r,"get",s));const{has:i}=Fr(r),l=o?ci:n?di:No;if(i.call(r,t))return l(e.get(t));if(i.call(r,s))return l(e.get(s));e!==r&&e.get(t)}function cr(e,t=!1){const n=this.__v_raw,o=je(n),r=je(e);return t||(_n(e,r)&&wt(o,"has",e),wt(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function ur(e,t=!1){return e=e.__v_raw,!t&&wt(je(e),"iterate",$n),Reflect.get(e,"size",e)}function ma(e){e=je(e);const t=je(this);return Fr(t).has.call(t,e)||(t.add(e),en(t,"add",e,e)),this}function ga(e,t){t=je(t);const n=je(this),{has:o,get:r}=Fr(n);let s=o.call(n,e);s||(e=je(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?_n(t,i)&&en(n,"set",e,t):en(n,"add",e,t),this}function va(e){const t=je(this),{has:n,get:o}=Fr(t);let r=n.call(t,e);r||(e=je(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&en(t,"delete",e,void 0),s}function _a(){const e=je(this),t=e.size!==0,n=e.clear();return t&&en(e,"clear",void 0,void 0),n}function fr(e,t){return function(o,r){const s=this,i=s.__v_raw,l=je(i),c=t?ci:e?di:No;return!e&&wt(l,"iterate",$n),i.forEach((u,d)=>o.call(r,c(u),c(d),s))}}function dr(e,t,n){return function(...o){const r=this.__v_raw,s=je(r),i=no(s),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,u=r[e](...o),d=n?ci:t?di:No;return!t&&wt(s,"iterate",c?Bs:$n),{next(){const{value:f,done:p}=u.next();return p?{value:f,done:p}:{value:l?[d(f[0]),d(f[1])]:d(f),done:p}},[Symbol.iterator](){return this}}}}function sn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function $f(){const e={get(s){return lr(this,s)},get size(){return ur(this)},has:cr,add:ma,set:ga,delete:va,clear:_a,forEach:fr(!1,!1)},t={get(s){return lr(this,s,!1,!0)},get size(){return ur(this)},has:cr,add:ma,set:ga,delete:va,clear:_a,forEach:fr(!1,!0)},n={get(s){return lr(this,s,!0)},get size(){return ur(this,!0)},has(s){return cr.call(this,s,!0)},add:sn("add"),set:sn("set"),delete:sn("delete"),clear:sn("clear"),forEach:fr(!0,!1)},o={get(s){return lr(this,s,!0,!0)},get size(){return ur(this,!0)},has(s){return cr.call(this,s,!0)},add:sn("add"),set:sn("set"),delete:sn("delete"),clear:sn("clear"),forEach:fr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=dr(s,!1,!1),n[s]=dr(s,!0,!1),t[s]=dr(s,!1,!0),o[s]=dr(s,!0,!0)}),[e,n,t,o]}const[jf,Mf,Nf,Hf]=$f();function ui(e,t){const n=t?e?Hf:Nf:e?Mf:jf;return(o,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(Re(n,r)&&r in o?n:o,r,s)}const Df={get:ui(!1,!1)},Bf={get:ui(!1,!0)},Ff={get:ui(!0,!1)};const Dl=new WeakMap,Bl=new WeakMap,Fl=new WeakMap,zf=new WeakMap;function Uf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Vf(e){return e.__v_skip||!Object.isExtensible(e)?0:Uf(ff(e))}function Ko(e){return Mo(e)?e:fi(e,!1,Pf,Df,Dl)}function zl(e){return fi(e,!1,If,Bf,Bl)}function Dn(e){return fi(e,!0,Rf,Ff,Fl)}function fi(e,t,n,o,r){if(!We(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=Vf(e);if(i===0)return e;const l=new Proxy(e,i===2?o:n);return r.set(e,l),l}function Oo(e){return Mo(e)?Oo(e.__v_raw):!!(e&&e.__v_isReactive)}function Mo(e){return!!(e&&e.__v_isReadonly)}function Lr(e){return!!(e&&e.__v_isShallow)}function Ul(e){return e?!!e.__v_raw:!1}function je(e){const t=e&&e.__v_raw;return t?je(t):e}function Wf(e){return Object.isExtensible(e)&&xl(e,"__v_skip",!0),e}const No=e=>We(e)?Ko(e):e,di=e=>We(e)?Dn(e):e;class Vl{constructor(t,n,o,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ii(()=>t(this._value),()=>Ao(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=o}get value(){const t=je(this);return(!t._cacheable||t.effect.dirty)&&_n(t._value,t._value=t.effect.run())&&Ao(t,4),pi(t),t.effect._dirtyLevel>=2&&Ao(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function qf(e,t,n=!1){let o,r;const s=Ce(e);return s?(o=e,r=Rt):(o=e.get,r=e.set),new Vl(o,r,s||!r,n)}function pi(e){var t;mn&&In&&(e=je(e),Il(In,(t=e.dep)!=null?t:e.dep=jl(()=>e.dep=void 0,e instanceof Vl?e:void 0)))}function Ao(e,t=4,n){e=je(e);const o=e.dep;o&&$l(o,t)}function ht(e){return!!(e&&e.__v_isRef===!0)}function be(e){return Wl(e,!1)}function Dt(e){return Wl(e,!0)}function Wl(e,t){return ht(e)?e:new Kf(e,t)}class Kf{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:je(t),this._value=n?t:No(t)}get value(){return pi(this),this._value}set value(t){const n=this.__v_isShallow||Lr(t)||Mo(t);t=n?t:je(t),_n(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:No(t),Ao(this,4))}}function le(e){return ht(e)?e.value:e}const Gf={get:(e,t,n)=>le(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return ht(r)&&!ht(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function ql(e){return Oo(e)?e:new Proxy(e,Gf)}class Yf{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:o}=t(()=>pi(this),()=>Ao(this));this._get=n,this._set=o}get value(){return this._get()}set value(t){this._set(t)}}function Kl(e){return new Yf(e)}function Gl(e){const t=_e(e)?new Array(e.length):{};for(const n in e)t[n]=Xl(e,n);return t}class Xf{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return xf(je(this._object),this._key)}}class Jf{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Yl(e,t,n){return ht(e)?e:Ce(e)?new Jf(e):We(e)&&arguments.length>1?Xl(e,t,n):be(e)}function Xl(e,t,n){const o=e[t];return ht(o)?o:new Xf(e,t,n)}/** -* @vue/runtime-core v3.4.27 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function gn(e,t,n,o){try{return o?e(...o):e()}catch(r){Go(r,t,n)}}function It(e,t,n,o){if(Ce(e)){const r=gn(e,t,n,o);return r&&kl(r)&&r.catch(s=>{Go(s,t,n)}),r}if(_e(e)){const r=[];for(let s=0;s>>1,r=mt[o],s=Do(r);sWt&&mt.splice(t,1)}function td(e){_e(e)?ro.push(...e):(!un||!un.includes(e,e.allowRecurse?Tn+1:Tn))&&ro.push(e),Ql()}function ba(e,t,n=Ho?Wt+1:0){for(;nDo(n)-Do(o));if(ro.length=0,un){un.push(...t);return}for(un=t,Tn=0;Tne.id==null?1/0:e.id,nd=(e,t)=>{const n=Do(e)-Do(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Zl(e){Fs=!1,Ho=!0,mt.sort(nd);try{for(Wt=0;Wtot(m)?m.trim():m)),f&&(r=n.map(hf))}let l,c=o[l=gs(t)]||o[l=gs($t(t))];!c&&s&&(c=o[l=gs(Hn(t))]),c&&It(c,e,6,r);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,It(u,e,6,r)}}function ec(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const s=e.emits;let i={},l=!1;if(!Ce(e)){const c=u=>{const d=ec(u,t,!0);d&&(l=!0,nt(i,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!l?(We(e)&&o.set(e,null),null):(_e(s)?s.forEach(c=>i[c]=null):nt(i,s),We(e)&&o.set(e,i),i)}function Ur(e,t){return!e||!Wo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Re(e,t[0].toLowerCase()+t.slice(1))||Re(e,Hn(t))||Re(e,t))}let st=null,tc=null;function Ar(e){const t=st;return st=e,tc=e&&e.type.__scopeId||null,t}function $e(e,t=st,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&Pa(-1);const s=Ar(t);let i;try{i=e(...r)}finally{Ar(s),o._d&&Pa(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function bs(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[s],slots:i,attrs:l,emit:c,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:_,inheritAttrs:C}=e,L=Ar(e);let k,O;try{if(n.shapeFlag&4){const P=r||o,Y=P;k=Mt(u.call(Y,P,d,f,m,p,_)),O=l}else{const P=t;k=Mt(P.length>1?P(f,{attrs:l,slots:i,emit:c}):P(f,null)),O=t.props?l:rd(l)}}catch(P){Io.length=0,Go(P,e,1),k=ge(yt)}let y=k;if(O&&C!==!1){const P=Object.keys(O),{shapeFlag:Y}=y;P.length&&Y&7&&(s&&P.some(oi)&&(O=sd(O,s)),y=bn(y,O,!1,!0))}return n.dirs&&(y=bn(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),k=y,Ar(L),k}const rd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Wo(n))&&((t||(t={}))[n]=e[n]);return t},sd=(e,t)=>{const n={};for(const o in e)(!oi(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function id(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return o?ya(o,i,u):!!i;if(c&8){const d=t.dynamicProps;for(let f=0;fe.__isSuspense;function oc(e,t){t&&t.pendingBranch?_e(e)?t.effects.push(...e):t.effects.push(e):td(e)}const fd=Symbol.for("v-scx"),dd=()=>at(fd);function pd(e,t){return mi(e,null,t)}const pr={};function et(e,t,n){return mi(e,t,n)}function mi(e,t,{immediate:n,deep:o,flush:r,once:s,onTrack:i,onTrigger:l}=Ge){if(t&&s){const W=t;t=(...X)=>{W(...X),Y()}}const c=ct,u=W=>o===!0?W:Rn(W,o===!1?1:void 0);let d,f=!1,p=!1;if(ht(e)?(d=()=>e.value,f=Lr(e)):Oo(e)?(d=()=>u(e),f=!0):_e(e)?(p=!0,f=e.some(W=>Oo(W)||Lr(W)),d=()=>e.map(W=>{if(ht(W))return W.value;if(Oo(W))return u(W);if(Ce(W))return gn(W,c,2)})):Ce(e)?t?d=()=>gn(e,c,2):d=()=>(m&&m(),It(e,c,3,[_])):d=Rt,t&&o){const W=d;d=()=>Rn(W())}let m,_=W=>{m=y.onStop=()=>{gn(W,c,4),m=y.onStop=void 0}},C;if(Qo)if(_=Rt,t?n&&It(t,c,3,[d(),p?[]:void 0,_]):d(),r==="sync"){const W=dd();C=W.__watcherHandles||(W.__watcherHandles=[])}else return Rt;let L=p?new Array(e.length).fill(pr):pr;const k=()=>{if(!(!y.active||!y.dirty))if(t){const W=y.run();(o||f||(p?W.some((X,S)=>_n(X,L[S])):_n(W,L)))&&(m&&m(),It(t,c,3,[W,L===pr?void 0:p&&L[0]===pr?[]:L,_]),L=W)}else y.run()};k.allowRecurse=!!t;let O;r==="sync"?O=k:r==="post"?O=()=>bt(k,c&&c.suspense):(k.pre=!0,c&&(k.id=c.uid),O=()=>zr(k));const y=new ii(d,Rt,O),P=Tl(),Y=()=>{y.stop(),P&&ri(P.effects,y)};return t?n?k():L=y.run():r==="post"?bt(y.run.bind(y),c&&c.suspense):y.run(),C&&C.push(Y),Y}function hd(e,t,n){const o=this.proxy,r=ot(e)?e.includes(".")?rc(o,e):()=>o[e]:e.bind(o,o);let s;Ce(t)?s=t:(s=t.handler,n=t);const i=Jo(this),l=mi(r,s.bind(o),n);return i(),l}function rc(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;r{Rn(o,t,n)});else if(Sl(e))for(const o in e)Rn(e[o],t,n);return e}function Tr(e,t){if(st===null)return e;const n=Wr(st)||st.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r{e.isMounted=!0}),gi(()=>{e.isUnmounting=!0}),e}const Tt=[Function,Array],sc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Tt,onEnter:Tt,onAfterEnter:Tt,onEnterCancelled:Tt,onBeforeLeave:Tt,onLeave:Tt,onAfterLeave:Tt,onLeaveCancelled:Tt,onBeforeAppear:Tt,onAppear:Tt,onAfterAppear:Tt,onAppearCancelled:Tt},gd={name:"BaseTransition",props:sc,setup(e,{slots:t}){const n=Xo(),o=md();return()=>{const r=t.default&&ac(t.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){for(const p of r)if(p.type!==yt){s=p;break}}const i=je(e),{mode:l}=i;if(o.isLeaving)return ys(s);const c=Ea(s);if(!c)return ys(s);const u=zs(c,i,o,n);Us(c,u);const d=n.subTree,f=d&&Ea(d);if(f&&f.type!==yt&&!Pn(c,f)){const p=zs(f,i,o,n);if(Us(f,p),l==="out-in"&&c.type!==yt)return o.isLeaving=!0,p.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ys(s);l==="in-out"&&c.type!==yt&&(p.delayLeave=(m,_,C)=>{const L=ic(o,f);L[String(f.key)]=f,m[fn]=()=>{_(),m[fn]=void 0,delete u.delayedLeave},u.delayedLeave=C})}return s}}},vd=gd;function ic(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function zs(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:_,onBeforeAppear:C,onAppear:L,onAfterAppear:k,onAppearCancelled:O}=t,y=String(e.key),P=ic(n,e),Y=(S,pe)=>{S&&It(S,o,9,pe)},W=(S,pe)=>{const M=pe[1];Y(S,pe),_e(S)?S.every(oe=>oe.length<=1)&&M():S.length<=1&&M()},X={mode:s,persisted:i,beforeEnter(S){let pe=l;if(!n.isMounted)if(r)pe=C||l;else return;S[fn]&&S[fn](!0);const M=P[y];M&&Pn(e,M)&&M.el[fn]&&M.el[fn](),Y(pe,[S])},enter(S){let pe=c,M=u,oe=d;if(!n.isMounted)if(r)pe=L||c,M=k||u,oe=O||d;else return;let R=!1;const G=S[hr]=ve=>{R||(R=!0,ve?Y(oe,[S]):Y(M,[S]),X.delayedLeave&&X.delayedLeave(),S[hr]=void 0)};pe?W(pe,[S,G]):G()},leave(S,pe){const M=String(e.key);if(S[hr]&&S[hr](!0),n.isUnmounting)return pe();Y(f,[S]);let oe=!1;const R=S[fn]=G=>{oe||(oe=!0,pe(),G?Y(_,[S]):Y(m,[S]),S[fn]=void 0,P[M]===e&&delete P[M])};P[M]=e,p?W(p,[S,R]):R()},clone(S){return zs(S,t,n,o)}};return X}function ys(e){if(Yo(e))return e=bn(e),e.children=null,e}function Ea(e){if(!Yo(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ce(n.default))return n.default()}}function Us(e,t){e.shapeFlag&6&&e.component?Us(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ac(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function lc(e){Ce(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c=null,u,d=0;const f=()=>(d++,c=null,p()),p=()=>{let m;return c||(m=c=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),l)return new Promise((C,L)=>{l(_,()=>C(f()),()=>L(_),d+1)});throw _}).then(_=>m!==c&&c?c:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),u=_,_)))};return Ie({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return u},setup(){const m=ct;if(u)return()=>ws(u,m);const _=O=>{c=null,Go(O,m,13,!o)};if(i&&m.suspense||Qo)return p().then(O=>()=>ws(O,m)).catch(O=>(_(O),()=>o?ge(o,{error:O}):null));const C=be(!1),L=be(),k=be(!!r);return r&&setTimeout(()=>{k.value=!1},r),s!=null&&setTimeout(()=>{if(!C.value&&!L.value){const O=new Error(`Async component timed out after ${s}ms.`);_(O),L.value=O}},s),p().then(()=>{C.value=!0,m.parent&&Yo(m.parent.vnode)&&(m.parent.effect.dirty=!0,zr(m.parent.update))}).catch(O=>{_(O),L.value=O}),()=>{if(C.value&&u)return ws(u,m);if(L.value&&o)return ge(o,{error:L.value});if(n&&!k.value)return ge(n)}}})}function ws(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=ge(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Yo=e=>e.type.__isKeepAlive;function _d(e,t){cc(e,"a",t)}function bd(e,t){cc(e,"da",t)}function cc(e,t,n=ct){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Vr(t,o,n),n){let r=n.parent;for(;r&&r.parent;)Yo(r.parent.vnode)&&yd(o,t,n,r),r=r.parent}}function yd(e,t,n,o){const r=Vr(t,e,o,!0);Fn(()=>{ri(o[t],r)},n)}function Vr(e,t,n=ct,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;yn();const l=Jo(n),c=It(t,n,e,i);return l(),wn(),c});return o?r.unshift(s):r.push(s),s}}const nn=e=>(t,n=ct)=>(!Qo||e==="sp")&&Vr(e,(...o)=>t(...o),n),wd=nn("bm"),tt=nn("m"),Ed=nn("bu"),kd=nn("u"),gi=nn("bum"),Fn=nn("um"),Cd=nn("sp"),Sd=nn("rtg"),xd=nn("rtc");function Ld(e,t=ct){Vr("ec",e,t)}function xt(e,t,n,o){let r;const s=n;if(_e(e)||ot(e)){r=new Array(e.length);for(let i=0,l=e.length;it(i,l,void 0,s));else{const i=Object.keys(e);r=new Array(i.length);for(let l=0,c=i.length;lIr(t)?!(t.type===yt||t.type===Le&&!uc(t.children)):!0)?e:null}const Vs=e=>e?Lc(e)?Wr(e)||e.proxy:Vs(e.parent):null,To=nt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Vs(e.parent),$root:e=>Vs(e.root),$emit:e=>e.emit,$options:e=>vi(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,zr(e.update)}),$nextTick:e=>e.n||(e.n=Bn.bind(e.proxy)),$watch:e=>hd.bind(e)}),Es=(e,t)=>e!==Ge&&!e.__isScriptSetup&&Re(e,t),Od={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(Es(o,t))return i[t]=1,o[t];if(r!==Ge&&Re(r,t))return i[t]=2,r[t];if((u=e.propsOptions[0])&&Re(u,t))return i[t]=3,s[t];if(n!==Ge&&Re(n,t))return i[t]=4,n[t];Ws&&(i[t]=0)}}const d=To[t];let f,p;if(d)return t==="$attrs"&&wt(e.attrs,"get",""),d(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==Ge&&Re(n,t))return i[t]=4,n[t];if(p=c.config.globalProperties,Re(p,t))return p[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return Es(r,t)?(r[t]=n,!0):o!==Ge&&Re(o,t)?(o[t]=n,!0):Re(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},i){let l;return!!n[i]||e!==Ge&&Re(e,i)||Es(t,i)||(l=s[0])&&Re(l,i)||Re(o,i)||Re(To,i)||Re(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Re(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ka(e){return _e(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ws=!0;function Ad(e){const t=vi(e),n=e.proxy,o=e.ctx;Ws=!1,t.beforeCreate&&Ca(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:l,provide:c,inject:u,created:d,beforeMount:f,mounted:p,beforeUpdate:m,updated:_,activated:C,deactivated:L,beforeDestroy:k,beforeUnmount:O,destroyed:y,unmounted:P,render:Y,renderTracked:W,renderTriggered:X,errorCaptured:S,serverPrefetch:pe,expose:M,inheritAttrs:oe,components:R,directives:G,filters:ve}=t;if(u&&Td(u,o,null),i)for(const he in i){const re=i[he];Ce(re)&&(o[he]=re.bind(n))}if(r){const he=r.call(n,n);We(he)&&(e.data=Ko(he))}if(Ws=!0,s)for(const he in s){const re=s[he],Be=Ce(re)?re.bind(n,n):Ce(re.get)?re.get.bind(n,n):Rt,Ye=!Ce(re)&&Ce(re.set)?re.set.bind(n):Rt,ze=B({get:Be,set:Ye});Object.defineProperty(o,he,{enumerable:!0,configurable:!0,get:()=>ze.value,set:Xe=>ze.value=Xe})}if(l)for(const he in l)fc(l[he],o,n,he);if(c){const he=Ce(c)?c.call(n):c;Reflect.ownKeys(he).forEach(re=>{vn(re,he[re])})}d&&Ca(d,e,"c");function U(he,re){_e(re)?re.forEach(Be=>he(Be.bind(n))):re&&he(re.bind(n))}if(U(wd,f),U(tt,p),U(Ed,m),U(kd,_),U(_d,C),U(bd,L),U(Ld,S),U(xd,W),U(Sd,X),U(gi,O),U(Fn,P),U(Cd,pe),_e(M))if(M.length){const he=e.exposed||(e.exposed={});M.forEach(re=>{Object.defineProperty(he,re,{get:()=>n[re],set:Be=>n[re]=Be})})}else e.exposed||(e.exposed={});Y&&e.render===Rt&&(e.render=Y),oe!=null&&(e.inheritAttrs=oe),R&&(e.components=R),G&&(e.directives=G)}function Td(e,t,n=Rt){_e(e)&&(e=qs(e));for(const o in e){const r=e[o];let s;We(r)?"default"in r?s=at(r.from||o,r.default,!0):s=at(r.from||o):s=at(r),ht(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[o]=s}}function Ca(e,t,n){It(_e(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function fc(e,t,n,o){const r=o.includes(".")?rc(n,o):()=>n[o];if(ot(e)){const s=t[e];Ce(s)&&et(r,s)}else if(Ce(e))et(r,e.bind(n));else if(We(e))if(_e(e))e.forEach(s=>fc(s,t,n,o));else{const s=Ce(e.handler)?e.handler.bind(n):t[e.handler];Ce(s)&&et(r,s,e)}}function vi(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:!r.length&&!n&&!o?c=t:(c={},r.length&&r.forEach(u=>Pr(c,u,i,!0)),Pr(c,t,i)),We(t)&&s.set(t,c),c}function Pr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Pr(e,s,n,!0),r&&r.forEach(i=>Pr(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const l=Pd[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Pd={data:Sa,props:xa,emits:xa,methods:xo,computed:xo,beforeCreate:_t,created:_t,beforeMount:_t,mounted:_t,beforeUpdate:_t,updated:_t,beforeDestroy:_t,beforeUnmount:_t,destroyed:_t,unmounted:_t,activated:_t,deactivated:_t,errorCaptured:_t,serverPrefetch:_t,components:xo,directives:xo,watch:Id,provide:Sa,inject:Rd};function Sa(e,t){return t?e?function(){return nt(Ce(e)?e.call(this,this):e,Ce(t)?t.call(this,this):t)}:t:e}function Rd(e,t){return xo(qs(e),qs(t))}function qs(e){if(_e(e)){const t={};for(let n=0;n1)return n&&Ce(t)?t.call(o&&o.proxy):t}}const pc={},hc=()=>Object.create(pc),mc=e=>Object.getPrototypeOf(e)===pc;function Md(e,t,n,o=!1){const r={},s=hc();e.propsDefaults=Object.create(null),gc(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=o?r:zl(r):e.type.props?e.props=r:e.props=s,e.attrs=s}function Nd(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=je(r),[c]=e.propsOptions;let u=!1;if((o||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let f=0;f{c=!0;const[p,m]=vc(f,t,!0);nt(i,p),m&&l.push(...m)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!s&&!c)return We(e)&&o.set(e,to),to;if(_e(s))for(let d=0;d-1,m[1]=C<0||_-1||Re(m,"default"))&&l.push(f)}}}const u=[i,l];return We(e)&&o.set(e,u),u}function La(e){return e[0]!=="$"&&!oo(e)}function Oa(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function Aa(e,t){return Oa(e)===Oa(t)}function Ta(e,t){return _e(t)?t.findIndex(n=>Aa(n,e)):Ce(t)&&Aa(t,e)?0:-1}const _c=e=>e[0]==="_"||e==="$stable",_i=e=>_e(e)?e.map(Mt):[Mt(e)],Hd=(e,t,n)=>{if(t._n)return t;const o=$e((...r)=>_i(t(...r)),n);return o._c=!1,o},bc=(e,t,n)=>{const o=e._ctx;for(const r in e){if(_c(r))continue;const s=e[r];if(Ce(s))t[r]=Hd(r,s,o);else if(s!=null){const i=_i(s);t[r]=()=>i}}},yc=(e,t)=>{const n=_i(t);e.slots.default=()=>n},Dd=(e,t)=>{const n=e.slots=hc();if(e.vnode.shapeFlag&32){const o=t._;o?(nt(n,t),xl(n,"_",o,!0)):bc(t,n)}else t&&yc(e,t)},Bd=(e,t,n)=>{const{vnode:o,slots:r}=e;let s=!0,i=Ge;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:(nt(r,t),!n&&l===1&&delete r._):(s=!t.$stable,bc(t,r)),i=t}else t&&(yc(e,t),i={default:1});if(s)for(const l in r)!_c(l)&&i[l]==null&&delete r[l]};function Rr(e,t,n,o,r=!1){if(_e(e)){e.forEach((p,m)=>Rr(p,t&&(_e(t)?t[m]:t),n,o,r));return}if(so(o)&&!r)return;const s=o.shapeFlag&4?Wr(o.component)||o.component.proxy:o.el,i=r?null:s,{i:l,r:c}=e,u=t&&t.r,d=l.refs===Ge?l.refs={}:l.refs,f=l.setupState;if(u!=null&&u!==c&&(ot(u)?(d[u]=null,Re(f,u)&&(f[u]=null)):ht(u)&&(u.value=null)),Ce(c))gn(c,l,12,[i,d]);else{const p=ot(c),m=ht(c);if(p||m){const _=()=>{if(e.f){const C=p?Re(f,c)?f[c]:d[c]:c.value;r?_e(C)&&ri(C,s):_e(C)?C.includes(s)||C.push(s):p?(d[c]=[s],Re(f,c)&&(f[c]=d[c])):(c.value=[s],e.k&&(d[e.k]=c.value))}else p?(d[c]=i,Re(f,c)&&(f[c]=i)):m&&(c.value=i,e.k&&(d[e.k]=i))};i?(_.id=-1,bt(_,n)):_()}}}let an=!1;const Fd=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",zd=e=>e.namespaceURI.includes("MathML"),mr=e=>{if(Fd(e))return"svg";if(zd(e))return"mathml"},gr=e=>e.nodeType===8;function Ud(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:c,createComment:u}}=e,d=(y,P)=>{if(!P.hasChildNodes()){n(null,y,P),Or(),P._vnode=y;return}an=!1,f(P.firstChild,y,null,null,null),Or(),P._vnode=y,an&&console.error("Hydration completed but contains mismatches.")},f=(y,P,Y,W,X,S=!1)=>{S=S||!!P.dynamicChildren;const pe=gr(y)&&y.data==="[",M=()=>C(y,P,Y,W,X,pe),{type:oe,ref:R,shapeFlag:G,patchFlag:ve}=P;let ye=y.nodeType;P.el=y,ve===-2&&(S=!1,P.dynamicChildren=null);let U=null;switch(oe){case ao:ye!==3?P.children===""?(c(P.el=r(""),i(y),y),U=y):U=M():(y.data!==P.children&&(an=!0,y.data=P.children),U=s(y));break;case yt:O(y)?(U=s(y),k(P.el=y.content.firstChild,y,Y)):ye!==8||pe?U=M():U=s(y);break;case Ro:if(pe&&(y=s(y),ye=y.nodeType),ye===1||ye===3){U=y;const he=!P.children.length;for(let re=0;re{S=S||!!P.dynamicChildren;const{type:pe,props:M,patchFlag:oe,shapeFlag:R,dirs:G,transition:ve}=P,ye=pe==="input"||pe==="option";if(ye||oe!==-1){G&&Vt(P,null,Y,"created");let U=!1;if(O(y)){U=wc(W,ve)&&Y&&Y.vnode.props&&Y.vnode.props.appear;const re=y.content.firstChild;U&&ve.beforeEnter(re),k(re,y,Y),P.el=y=re}if(R&16&&!(M&&(M.innerHTML||M.textContent))){let re=m(y.firstChild,P,y,Y,W,X,S);for(;re;){an=!0;const Be=re;re=re.nextSibling,l(Be)}}else R&8&&y.textContent!==P.children&&(an=!0,y.textContent=P.children);if(M)if(ye||!S||oe&48)for(const re in M)(ye&&(re.endsWith("value")||re==="indeterminate")||Wo(re)&&!oo(re)||re[0]===".")&&o(y,re,null,M[re],void 0,void 0,Y);else M.onClick&&o(y,"onClick",null,M.onClick,void 0,void 0,Y);let he;(he=M&&M.onVnodeBeforeMount)&&Pt(he,Y,P),G&&Vt(P,null,Y,"beforeMount"),((he=M&&M.onVnodeMounted)||G||U)&&oc(()=>{he&&Pt(he,Y,P),U&&ve.enter(y),G&&Vt(P,null,Y,"mounted")},W)}return y.nextSibling},m=(y,P,Y,W,X,S,pe)=>{pe=pe||!!P.dynamicChildren;const M=P.children,oe=M.length;for(let R=0;R{const{slotScopeIds:pe}=P;pe&&(X=X?X.concat(pe):pe);const M=i(y),oe=m(s(y),P,M,Y,W,X,S);return oe&&gr(oe)&&oe.data==="]"?s(P.anchor=oe):(an=!0,c(P.anchor=u("]"),M,oe),oe)},C=(y,P,Y,W,X,S)=>{if(an=!0,P.el=null,S){const oe=L(y);for(;;){const R=s(y);if(R&&R!==oe)l(R);else break}}const pe=s(y),M=i(y);return l(y),n(null,P,M,pe,Y,W,mr(M),X),pe},L=(y,P="[",Y="]")=>{let W=0;for(;y;)if(y=s(y),y&&gr(y)&&(y.data===P&&W++,y.data===Y)){if(W===0)return s(y);W--}return y},k=(y,P,Y)=>{const W=P.parentNode;W&&W.replaceChild(y,P);let X=Y;for(;X;)X.vnode.el===P&&(X.vnode.el=X.subTree.el=y),X=X.parent},O=y=>y.nodeType===1&&y.tagName.toLowerCase()==="template";return[d,f]}const bt=oc;function Vd(e){return Wd(e,Ud)}function Wd(e,t){const n=Ll();n.__VUE__=!0;const{insert:o,remove:r,patchProp:s,createElement:i,createText:l,createComment:c,setText:u,setElementText:d,parentNode:f,nextSibling:p,setScopeId:m=Rt,insertStaticContent:_}=e,C=(g,v,x,N=null,I=null,q=null,te=void 0,K=null,w=!!v.dynamicChildren)=>{if(g===v)return;g&&!Pn(g,v)&&(N=$(g),Xe(g,I,q,!0),g=null),v.patchFlag===-2&&(w=!1,v.dynamicChildren=null);const{type:T,ref:H,shapeFlag:se}=v;switch(T){case ao:L(g,v,x,N);break;case yt:k(g,v,x,N);break;case Ro:g==null&&O(v,x,N,te);break;case Le:R(g,v,x,N,I,q,te,K,w);break;default:se&1?Y(g,v,x,N,I,q,te,K,w):se&6?G(g,v,x,N,I,q,te,K,w):(se&64||se&128)&&T.process(g,v,x,N,I,q,te,K,w,ue)}H!=null&&I&&Rr(H,g&&g.ref,q,v||g,!v)},L=(g,v,x,N)=>{if(g==null)o(v.el=l(v.children),x,N);else{const I=v.el=g.el;v.children!==g.children&&u(I,v.children)}},k=(g,v,x,N)=>{g==null?o(v.el=c(v.children||""),x,N):v.el=g.el},O=(g,v,x,N)=>{[g.el,g.anchor]=_(g.children,v,x,N,g.el,g.anchor)},y=({el:g,anchor:v},x,N)=>{let I;for(;g&&g!==v;)I=p(g),o(g,x,N),g=I;o(v,x,N)},P=({el:g,anchor:v})=>{let x;for(;g&&g!==v;)x=p(g),r(g),g=x;r(v)},Y=(g,v,x,N,I,q,te,K,w)=>{v.type==="svg"?te="svg":v.type==="math"&&(te="mathml"),g==null?W(v,x,N,I,q,te,K,w):pe(g,v,I,q,te,K,w)},W=(g,v,x,N,I,q,te,K)=>{let w,T;const{props:H,shapeFlag:se,transition:ne,dirs:me}=g;if(w=g.el=i(g.type,q,H&&H.is,H),se&8?d(w,g.children):se&16&&S(g.children,w,null,N,I,ks(g,q),te,K),me&&Vt(g,null,N,"created"),X(w,g,g.scopeId,te,N),H){for(const xe in H)xe!=="value"&&!oo(xe)&&s(w,xe,null,H[xe],q,g.children,N,I,Je);"value"in H&&s(w,"value",null,H.value,q),(T=H.onVnodeBeforeMount)&&Pt(T,N,g)}me&&Vt(g,null,N,"beforeMount");const Ee=wc(I,ne);Ee&&ne.beforeEnter(w),o(w,v,x),((T=H&&H.onVnodeMounted)||Ee||me)&&bt(()=>{T&&Pt(T,N,g),Ee&&ne.enter(w),me&&Vt(g,null,N,"mounted")},I)},X=(g,v,x,N,I)=>{if(x&&m(g,x),N)for(let q=0;q{for(let T=w;T{const K=v.el=g.el;let{patchFlag:w,dynamicChildren:T,dirs:H}=v;w|=g.patchFlag&16;const se=g.props||Ge,ne=v.props||Ge;let me;if(x&&Sn(x,!1),(me=ne.onVnodeBeforeUpdate)&&Pt(me,x,v,g),H&&Vt(v,g,x,"beforeUpdate"),x&&Sn(x,!0),T?M(g.dynamicChildren,T,K,x,N,ks(v,I),q):te||re(g,v,K,null,x,N,ks(v,I),q,!1),w>0){if(w&16)oe(K,v,se,ne,x,N,I);else if(w&2&&se.class!==ne.class&&s(K,"class",null,ne.class,I),w&4&&s(K,"style",se.style,ne.style,I),w&8){const Ee=v.dynamicProps;for(let xe=0;xe{me&&Pt(me,x,v,g),H&&Vt(v,g,x,"updated")},N)},M=(g,v,x,N,I,q,te)=>{for(let K=0;K{if(x!==N){if(x!==Ge)for(const K in x)!oo(K)&&!(K in N)&&s(g,K,x[K],null,te,v.children,I,q,Je);for(const K in N){if(oo(K))continue;const w=N[K],T=x[K];w!==T&&K!=="value"&&s(g,K,T,w,te,v.children,I,q,Je)}"value"in N&&s(g,"value",x.value,N.value,te)}},R=(g,v,x,N,I,q,te,K,w)=>{const T=v.el=g?g.el:l(""),H=v.anchor=g?g.anchor:l("");let{patchFlag:se,dynamicChildren:ne,slotScopeIds:me}=v;me&&(K=K?K.concat(me):me),g==null?(o(T,x,N),o(H,x,N),S(v.children||[],x,H,I,q,te,K,w)):se>0&&se&64&&ne&&g.dynamicChildren?(M(g.dynamicChildren,ne,x,I,q,te,K),(v.key!=null||I&&v===I.subTree)&&Ec(g,v,!0)):re(g,v,x,H,I,q,te,K,w)},G=(g,v,x,N,I,q,te,K,w)=>{v.slotScopeIds=K,g==null?v.shapeFlag&512?I.ctx.activate(v,x,N,te,w):ve(v,x,N,I,q,te,w):ye(g,v,w)},ve=(g,v,x,N,I,q,te)=>{const K=g.component=ep(g,N,I);if(Yo(g)&&(K.ctx.renderer=ue),tp(K),K.asyncDep){if(I&&I.registerDep(K,U),!g.el){const w=K.subTree=ge(yt);k(null,w,v,x)}}else U(K,g,v,x,I,q,te)},ye=(g,v,x)=>{const N=v.component=g.component;if(id(g,v,x))if(N.asyncDep&&!N.asyncResolved){he(N,v,x);return}else N.next=v,ed(N.update),N.effect.dirty=!0,N.update();else v.el=g.el,N.vnode=v},U=(g,v,x,N,I,q,te)=>{const K=()=>{if(g.isMounted){let{next:H,bu:se,u:ne,parent:me,vnode:Ee}=g;{const Et=kc(g);if(Et){H&&(H.el=Ee.el,he(g,H,te)),Et.asyncDep.then(()=>{g.isUnmounted||K()});return}}let xe=H,we;Sn(g,!1),H?(H.el=Ee.el,he(g,H,te)):H=Ee,se&&vs(se),(we=H.props&&H.props.onVnodeBeforeUpdate)&&Pt(we,me,H,Ee),Sn(g,!0);const Ue=bs(g),lt=g.subTree;g.subTree=Ue,C(lt,Ue,f(lt.el),$(lt),g,I,q),H.el=Ue.el,xe===null&&ad(g,Ue.el),ne&&bt(ne,I),(we=H.props&&H.props.onVnodeUpdated)&&bt(()=>Pt(we,me,H,Ee),I)}else{let H;const{el:se,props:ne}=v,{bm:me,m:Ee,parent:xe}=g,we=so(v);if(Sn(g,!1),me&&vs(me),!we&&(H=ne&&ne.onVnodeBeforeMount)&&Pt(H,xe,v),Sn(g,!0),se&&Te){const Ue=()=>{g.subTree=bs(g),Te(se,g.subTree,g,I,null)};we?v.type.__asyncLoader().then(()=>!g.isUnmounted&&Ue()):Ue()}else{const Ue=g.subTree=bs(g);C(null,Ue,x,N,g,I,q),v.el=Ue.el}if(Ee&&bt(Ee,I),!we&&(H=ne&&ne.onVnodeMounted)){const Ue=v;bt(()=>Pt(H,xe,Ue),I)}(v.shapeFlag&256||xe&&so(xe.vnode)&&xe.vnode.shapeFlag&256)&&g.a&&bt(g.a,I),g.isMounted=!0,v=x=N=null}},w=g.effect=new ii(K,Rt,()=>zr(T),g.scope),T=g.update=()=>{w.dirty&&w.run()};T.id=g.uid,Sn(g,!0),T()},he=(g,v,x)=>{v.component=g;const N=g.vnode.props;g.vnode=v,g.next=null,Nd(g,v.props,N,x),Bd(g,v.children,x),yn(),ba(g),wn()},re=(g,v,x,N,I,q,te,K,w=!1)=>{const T=g&&g.children,H=g?g.shapeFlag:0,se=v.children,{patchFlag:ne,shapeFlag:me}=v;if(ne>0){if(ne&128){Ye(T,se,x,N,I,q,te,K,w);return}else if(ne&256){Be(T,se,x,N,I,q,te,K,w);return}}me&8?(H&16&&Je(T,I,q),se!==T&&d(x,se)):H&16?me&16?Ye(T,se,x,N,I,q,te,K,w):Je(T,I,q,!0):(H&8&&d(x,""),me&16&&S(se,x,N,I,q,te,K,w))},Be=(g,v,x,N,I,q,te,K,w)=>{g=g||to,v=v||to;const T=g.length,H=v.length,se=Math.min(T,H);let ne;for(ne=0;neH?Je(g,I,q,!0,!1,se):S(v,x,N,I,q,te,K,w,se)},Ye=(g,v,x,N,I,q,te,K,w)=>{let T=0;const H=v.length;let se=g.length-1,ne=H-1;for(;T<=se&&T<=ne;){const me=g[T],Ee=v[T]=w?dn(v[T]):Mt(v[T]);if(Pn(me,Ee))C(me,Ee,x,null,I,q,te,K,w);else break;T++}for(;T<=se&&T<=ne;){const me=g[se],Ee=v[ne]=w?dn(v[ne]):Mt(v[ne]);if(Pn(me,Ee))C(me,Ee,x,null,I,q,te,K,w);else break;se--,ne--}if(T>se){if(T<=ne){const me=ne+1,Ee=mene)for(;T<=se;)Xe(g[T],I,q,!0),T++;else{const me=T,Ee=T,xe=new Map;for(T=Ee;T<=ne;T++){const qe=v[T]=w?dn(v[T]):Mt(v[T]);qe.key!=null&&xe.set(qe.key,T)}let we,Ue=0;const lt=ne-Ee+1;let Et=!1,mo=0;const Ut=new Array(lt);for(T=0;T=lt){Xe(qe,I,q,!0);continue}let rt;if(qe.key!=null)rt=xe.get(qe.key);else for(we=Ee;we<=ne;we++)if(Ut[we-Ee]===0&&Pn(qe,v[we])){rt=we;break}rt===void 0?Xe(qe,I,q,!0):(Ut[rt-Ee]=T+1,rt>=mo?mo=rt:Et=!0,C(qe,v[rt],x,null,I,q,te,K,w),Ue++)}const Un=Et?qd(Ut):to;for(we=Un.length-1,T=lt-1;T>=0;T--){const qe=Ee+T,rt=v[qe],kn=qe+1{const{el:q,type:te,transition:K,children:w,shapeFlag:T}=g;if(T&6){ze(g.component.subTree,v,x,N);return}if(T&128){g.suspense.move(v,x,N);return}if(T&64){te.move(g,v,x,ue);return}if(te===Le){o(q,v,x);for(let se=0;seK.enter(q),I);else{const{leave:se,delayLeave:ne,afterLeave:me}=K,Ee=()=>o(q,v,x),xe=()=>{se(q,()=>{Ee(),me&&me()})};ne?ne(q,Ee,xe):xe()}else o(q,v,x)},Xe=(g,v,x,N=!1,I=!1)=>{const{type:q,props:te,ref:K,children:w,dynamicChildren:T,shapeFlag:H,patchFlag:se,dirs:ne}=g;if(K!=null&&Rr(K,null,x,g,!0),H&256){v.ctx.deactivate(g);return}const me=H&1&&ne,Ee=!so(g);let xe;if(Ee&&(xe=te&&te.onVnodeBeforeUnmount)&&Pt(xe,v,g),H&6)vt(g.component,x,N);else{if(H&128){g.suspense.unmount(x,N);return}me&&Vt(g,null,v,"beforeUnmount"),H&64?g.type.remove(g,v,x,I,ue,N):T&&(q!==Le||se>0&&se&64)?Je(T,v,x,!1,!0):(q===Le&&se&384||!I&&H&16)&&Je(w,v,x),N&>(g)}(Ee&&(xe=te&&te.onVnodeUnmounted)||me)&&bt(()=>{xe&&Pt(xe,v,g),me&&Vt(g,null,v,"unmounted")},x)},gt=g=>{const{type:v,el:x,anchor:N,transition:I}=g;if(v===Le){ft(x,N);return}if(v===Ro){P(g);return}const q=()=>{r(x),I&&!I.persisted&&I.afterLeave&&I.afterLeave()};if(g.shapeFlag&1&&I&&!I.persisted){const{leave:te,delayLeave:K}=I,w=()=>te(x,q);K?K(g.el,q,w):w()}else q()},ft=(g,v)=>{let x;for(;g!==v;)x=p(g),r(g),g=x;r(v)},vt=(g,v,x)=>{const{bum:N,scope:I,update:q,subTree:te,um:K}=g;N&&vs(N),I.stop(),q&&(q.active=!1,Xe(te,g,v,x)),K&&bt(K,v),bt(()=>{g.isUnmounted=!0},v),v&&v.pendingBranch&&!v.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===v.pendingId&&(v.deps--,v.deps===0&&v.resolve())},Je=(g,v,x,N=!1,I=!1,q=0)=>{for(let te=q;teg.shapeFlag&6?$(g.component.subTree):g.shapeFlag&128?g.suspense.next():p(g.anchor||g.el);let ee=!1;const Q=(g,v,x)=>{g==null?v._vnode&&Xe(v._vnode,null,null,!0):C(v._vnode||null,g,v,null,null,null,x),ee||(ee=!0,ba(),Or(),ee=!1),v._vnode=g},ue={p:C,um:Xe,m:ze,r:gt,mt:ve,mc:S,pc:re,pbc:M,n:$,o:e};let ke,Te;return t&&([ke,Te]=t(ue)),{render:Q,hydrate:ke,createApp:jd(Q,ke)}}function ks({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Sn({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function wc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ec(e,t,n=!1){const o=e.children,r=t.children;if(_e(o)&&_e(r))for(let s=0;s>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function kc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:kc(t)}const Kd=e=>e.__isTeleport,Le=Symbol.for("v-fgt"),ao=Symbol.for("v-txt"),yt=Symbol.for("v-cmt"),Ro=Symbol.for("v-stc"),Io=[];let Nt=null;function z(e=!1){Io.push(Nt=e?null:[])}function Gd(){Io.pop(),Nt=Io[Io.length-1]||null}let Bo=1;function Pa(e){Bo+=e}function Cc(e){return e.dynamicChildren=Bo>0?Nt||to:null,Gd(),Bo>0&&Nt&&Nt.push(e),e}function ae(e,t,n,o,r,s){return Cc(ie(e,t,n,o,r,s,!0))}function Ne(e,t,n,o,r){return Cc(ge(e,t,n,o,r,!0))}function Ir(e){return e?e.__v_isVNode===!0:!1}function Pn(e,t){return e.type===t.type&&e.key===t.key}const Sc=({key:e})=>e??null,Er=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ot(e)||ht(e)||Ce(e)?{i:st,r:e,k:t,f:!!n}:e:null);function ie(e,t=null,n=null,o=0,r=null,s=e===Le?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Sc(t),ref:t&&Er(t),scopeId:tc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:st};return l?(bi(c,n),s&128&&e.normalize(c)):n&&(c.shapeFlag|=ot(n)?8:16),Bo>0&&!i&&Nt&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&Nt.push(c),c}const ge=Yd;function Yd(e,t=null,n=null,o=0,r=null,s=!1){if((!e||e===ld)&&(e=yt),Ir(e)){const l=bn(e,t,!0);return n&&bi(l,n),Bo>0&&!s&&Nt&&(l.shapeFlag&6?Nt[Nt.indexOf(e)]=l:Nt.push(l)),l.patchFlag|=-2,l}if(ip(e)&&(e=e.__vccOpts),t){t=Xd(t);let{class:l,style:c}=t;l&&!ot(l)&&(t.class=ut(l)),We(c)&&(Ul(c)&&!_e(c)&&(c=nt({},c)),t.style=qt(c))}const i=ot(e)?1:ud(e)?128:Kd(e)?64:We(e)?4:Ce(e)?2:0;return ie(e,t,n,o,r,i,s,!0)}function Xd(e){return e?Ul(e)||mc(e)?nt({},e):e:null}function bn(e,t,n=!1,o=!1){const{props:r,ref:s,patchFlag:i,children:l,transition:c}=e,u=t?Jd(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Sc(u),ref:t&&t.ref?n&&s?_e(s)?s.concat(Er(t)):[s,Er(t)]:Er(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Le?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&bn(e.ssContent),ssFallback:e.ssFallback&&bn(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&(d.transition=c.clone(d)),d}function Yt(e=" ",t=0){return ge(ao,null,e,t)}function xc(e,t){const n=ge(Ro,null,e);return n.staticCount=t,n}function He(e="",t=!1){return t?(z(),Ne(yt,null,e)):ge(yt,null,e)}function Mt(e){return e==null||typeof e=="boolean"?ge(yt):_e(e)?ge(Le,null,e.slice()):typeof e=="object"?dn(e):ge(ao,null,String(e))}function dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:bn(e)}function bi(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(_e(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),bi(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!mc(t)?t._ctx=st:r===3&&st&&(st.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ce(t)?(t={default:t,_ctx:st},n=32):(t=String(t),o&64?(n=16,t=[Yt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Jd(...e){const t={};for(let n=0;nct||st;let $r,Gs;{const e=Ll(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),s=>{r.length>1?r.forEach(i=>i(s)):r[0](s)}};$r=t("__VUE_INSTANCE_SETTERS__",n=>ct=n),Gs=t("__VUE_SSR_SETTERS__",n=>Qo=n)}const Jo=e=>{const t=ct;return $r(e),e.scope.on(),()=>{e.scope.off(),$r(t)}},Ra=()=>{ct&&ct.scope.off(),$r(null)};function Lc(e){return e.vnode.shapeFlag&4}let Qo=!1;function tp(e,t=!1){t&&Gs(t);const{props:n,children:o}=e.vnode,r=Lc(e);Md(e,n,r,t),Dd(e,o);const s=r?np(e,t):void 0;return t&&Gs(!1),s}function np(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Od);const{setup:o}=n;if(o){const r=e.setupContext=o.length>1?rp(e):null,s=Jo(e);yn();const i=gn(o,e,0,[e.props,r]);if(wn(),s(),kl(i)){if(i.then(Ra,Ra),t)return i.then(l=>{Ia(e,l,t)}).catch(l=>{Go(l,e,0)});e.asyncDep=i}else Ia(e,i,t)}else Oc(e,t)}function Ia(e,t,n){Ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:We(t)&&(e.setupState=ql(t)),Oc(e,n)}let $a;function Oc(e,t,n){const o=e.type;if(!e.render){if(!t&&$a&&!o.render){const r=o.template||vi(e).template;if(r){const{isCustomElement:s,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:c}=o,u=nt(nt({isCustomElement:s,delimiters:l},i),c);o.render=$a(r,u)}}e.render=o.render||Rt}{const r=Jo(e);yn();try{Ad(e)}finally{wn(),r()}}}const op={get(e,t){return wt(e,"get",""),e[t]}};function rp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,op),slots:e.slots,emit:e.emit,expose:t}}function Wr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ql(Wf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in To)return To[n](e)},has(t,n){return n in t||n in To}}))}function sp(e,t=!0){return Ce(e)?e.displayName||e.name:e.name||t&&e.__name}function ip(e){return Ce(e)&&"__vccOpts"in e}const B=(e,t)=>qf(e,t,Qo);function V(e,t,n){const o=arguments.length;return o===2?We(t)&&!_e(t)?Ir(t)?ge(e,null,[t]):ge(e,t):ge(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Ir(n)&&(n=[n]),ge(e,t,n))}const ap="3.4.27";/** -* @vue/runtime-dom v3.4.27 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const lp="http://www.w3.org/2000/svg",cp="http://www.w3.org/1998/Math/MathML",pn=typeof document<"u"?document:null,ja=pn&&pn.createElement("template"),up={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?pn.createElementNS(lp,e):t==="mathml"?pn.createElementNS(cp,e):pn.createElement(e,n?{is:n}:void 0);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>pn.createTextNode(e),createComment:e=>pn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>pn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{ja.innerHTML=o==="svg"?`${e}`:o==="mathml"?`${e}`:e;const l=ja.content;if(o==="svg"||o==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ln="transition",Eo="animation",Fo=Symbol("_vtc"),Zo=(e,{slots:t})=>V(vd,fp(e),t);Zo.displayName="Transition";const Ac={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Zo.props=nt({},sc,Ac);const xn=(e,t=[])=>{_e(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ma=e=>e?_e(e)?e.some(t=>t.length>1):e.length>1:!1;function fp(e){const t={};for(const R in e)R in Ac||(t[R]=e[R]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:u=i,appearToClass:d=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,_=dp(r),C=_&&_[0],L=_&&_[1],{onBeforeEnter:k,onEnter:O,onEnterCancelled:y,onLeave:P,onLeaveCancelled:Y,onBeforeAppear:W=k,onAppear:X=O,onAppearCancelled:S=y}=t,pe=(R,G,ve)=>{Ln(R,G?d:l),Ln(R,G?u:i),ve&&ve()},M=(R,G)=>{R._isLeaving=!1,Ln(R,f),Ln(R,m),Ln(R,p),G&&G()},oe=R=>(G,ve)=>{const ye=R?X:O,U=()=>pe(G,R,ve);xn(ye,[G,U]),Na(()=>{Ln(G,R?c:s),cn(G,R?d:l),Ma(ye)||Ha(G,o,C,U)})};return nt(t,{onBeforeEnter(R){xn(k,[R]),cn(R,s),cn(R,i)},onBeforeAppear(R){xn(W,[R]),cn(R,c),cn(R,u)},onEnter:oe(!1),onAppear:oe(!0),onLeave(R,G){R._isLeaving=!0;const ve=()=>M(R,G);cn(R,f),cn(R,p),mp(),Na(()=>{R._isLeaving&&(Ln(R,f),cn(R,m),Ma(P)||Ha(R,o,L,ve))}),xn(P,[R,ve])},onEnterCancelled(R){pe(R,!1),xn(y,[R])},onAppearCancelled(R){pe(R,!0),xn(S,[R])},onLeaveCancelled(R){M(R),xn(Y,[R])}})}function dp(e){if(e==null)return null;if(We(e))return[Cs(e.enter),Cs(e.leave)];{const t=Cs(e);return[t,t]}}function Cs(e){return mf(e)}function cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Fo]||(e[Fo]=new Set)).add(t)}function Ln(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Fo];n&&(n.delete(t),n.size||(e[Fo]=void 0))}function Na(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let pp=0;function Ha(e,t,n,o){const r=e._endId=++pp,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=hp(e,t);if(!i)return o();const u=i+"end";let d=0;const f=()=>{e.removeEventListener(u,p),s()},p=m=>{m.target===e&&++d>=c&&f()};setTimeout(()=>{d(n[_]||"").split(", "),r=o(`${ln}Delay`),s=o(`${ln}Duration`),i=Da(r,s),l=o(`${Eo}Delay`),c=o(`${Eo}Duration`),u=Da(l,c);let d=null,f=0,p=0;t===ln?i>0&&(d=ln,f=i,p=s.length):t===Eo?u>0&&(d=Eo,f=u,p=c.length):(f=Math.max(i,u),d=f>0?i>u?ln:Eo:null,p=d?d===ln?s.length:c.length:0);const m=d===ln&&/\b(transform|all)(,|$)/.test(o(`${ln}Property`).toString());return{type:d,timeout:f,propCount:p,hasTransform:m}}function Da(e,t){for(;e.lengthBa(n)+Ba(e[o])))}function Ba(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function mp(){return document.body.offsetHeight}function gp(e,t,n){const o=e[Fo];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const jr=Symbol("_vod"),Tc=Symbol("_vsh"),Mr={beforeMount(e,{value:t},{transition:n}){e[jr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):ko(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),ko(e,!0),o.enter(e)):o.leave(e,()=>{ko(e,!1)}):ko(e,t))},beforeUnmount(e,{value:t}){ko(e,t)}};function ko(e,t){e.style.display=t?e[jr]:"none",e[Tc]=!t}const vp=Symbol(""),_p=/(^|;)\s*display\s*:/;function bp(e,t,n){const o=e.style,r=ot(n);let s=!1;if(n&&!r){if(t)if(ot(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&kr(o,l,"")}else for(const i in t)n[i]==null&&kr(o,i,"");for(const i in n)i==="display"&&(s=!0),kr(o,i,n[i])}else if(r){if(t!==n){const i=o[vp];i&&(n+=";"+i),o.cssText=n,s=_p.test(n)}}else t&&e.removeAttribute("style");jr in e&&(e[jr]=s?o.display:"",e[Tc]&&(o.display="none"))}const Fa=/\s*!important$/;function kr(e,t,n){if(_e(n))n.forEach(o=>kr(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=yp(e,t);Fa.test(n)?e.setProperty(Hn(o),n.replace(Fa,""),"important"):e[o]=n}}const za=["Webkit","Moz","ms"],Ss={};function yp(e,t){const n=Ss[t];if(n)return n;let o=$t(t);if(o!=="filter"&&o in e)return Ss[t]=o;o=qo(o);for(let r=0;rxs||(Lp.then(()=>xs=0),xs=Date.now());function Ap(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;It(Tp(o,n.value),t,5,[o])};return n.value=e,n.attached=Op(),n}function Tp(e,t){if(_e(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const qa=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Pp=(e,t,n,o,r,s,i,l,c)=>{const u=r==="svg";t==="class"?gp(e,o,u):t==="style"?bp(e,n,o):Wo(t)?oi(t)||Sp(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rp(e,t,o,u))?Ep(e,t,o,s,i,l,c):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),wp(e,t,o,u))};function Rp(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&qa(t)&&Ce(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return qa(t)&&ot(n)?!1:t in e}const Ip={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$p=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const s=Hn(r.key);if(t.some(i=>i===s||Ip[i]===s))return e(r)})},jp=nt({patchProp:Pp},up);let Ls,Ka=!1;function Mp(){return Ls=Ka?Ls:Vd(jp),Ka=!0,Ls}const Np=(...e)=>{const t=Mp().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=Dp(o);if(r)return n(r,!0,Hp(r))},t};function Hp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Dp(e){return ot(e)?document.querySelector(e):e}var Pc=e=>/^[a-z][a-z0-9+.-]*:/.test(e)||e.startsWith("//"),qr=e=>/^(https?:)?\/\//.test(e),Ga=e=>{if(!e||e.endsWith("/"))return e;let t=e.replace(/(^|\/)README.md$/i,"$1index.html");return t.endsWith(".md")?t=t.substring(0,t.length-3)+".html":t.endsWith(".html")||(t=t+".html"),t.endsWith("/index.html")&&(t=t.substring(0,t.length-10)),t},Bp="http://.",Fp=(e,t)=>{if(!e.startsWith("/")&&t){const n=t.slice(0,t.lastIndexOf("/"));return Ga(new URL(`${n}/${e}`,Bp).pathname)}return Ga(e)},Rc=(e,t)=>{const n=Object.keys(e).sort((o,r)=>{const s=r.split("/").length-o.split("/").length;return s!==0?s:r.length-o.length});for(const o of n)if(t.startsWith(o))return o;return"/"},zp=/(#|\?)/,Ic=e=>{const[t,...n]=e.split(zp);return{pathname:t,hashAndQueries:n.join("")}},Up=["link","meta","script","style","noscript","template"],Vp=["title","base"],Wp=([e,t,n])=>Vp.includes(e)?e:Up.includes(e)?e==="meta"&&t.name?`${e}.${t.name}`:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,Object.entries(t).map(([o,r])=>typeof r=="boolean"?r?[o,""]:null:[o,r]).filter(o=>o!=null).sort(([o],[r])=>o.localeCompare(r)),n]):null,qp=e=>{const t=new Set,n=[];return e.forEach(o=>{const r=Wp(o);r&&!t.has(r)&&(t.add(r),n.push(o))}),n},Kp=e=>e[0]==="/"?e:`/${e}`,Gp=e=>e[e.length-1]==="/"||e.endsWith(".html")?e:`${e}/`,$c=e=>e[e.length-1]==="/"?e.slice(0,-1):e,jc=e=>e[0]==="/"?e.slice(1):e,Kr=e=>Object.prototype.toString.call(e)==="[object Object]",Ct=e=>typeof e=="string";const Yp="modulepreload",Xp=function(e){return"/awesome-comfyui-workflow/"+e},Ya={},Ke=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.all(n.map(l=>{if(l=Xp(l),l in Ya)return;Ya[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Yp,c||(d.as="script",d.crossOrigin=""),d.href=l,i&&d.setAttribute("nonce",i),document.head.appendChild(d),c)return new Promise((f,p)=>{d.addEventListener("load",f),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}return r.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},Jp=JSON.parse('{"/posts/tutorial/_for_testing/":"/posts/tutorial/for_testing/"}'),Qp=Object.fromEntries([["/",{loader:()=>Ke(()=>import("./index.html-AGgdmCHk.js"),[]),meta:{title:"Home",order:null}}],["/posts/mission.html",{loader:()=>Ke(()=>import("./mission.html-BD_zSKwT.js"),[]),meta:{title:"ComfyUI中文社区",order:null}}],["/posts/discovery/AI%E5%A6%82%E4%BD%95%E6%94%B9%E5%8F%98%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86%E7%9A%84%E5%B7%A5%E4%BD%9C.html",{loader:()=>Ke(()=>import("./AI如何改变产品经理的工作.html-CBf7EVM6.js"),[]),meta:{title:"",order:null}}],["/posts/discovery/comfyui%20mixlab%20nodes%20%E6%8F%92%E4%BB%B6%20%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%94%9F%E6%88%90APP%20%E9%80%8F%E6%98%8Epng%E5%9B%BE%E5%83%8F%20%E5%A4%9A%E7%A7%8D%E5%8A%9F%E8%83%BD.html",{loader:()=>Ke(()=>import("./comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能.html-DfuoVJYG.js"),[]),meta:{title:"",order:null}}],["/posts/discovery/Comfyui%20Realtime%20LCM%20with%20Photoshop.html",{loader:()=>Ke(()=>import("./Comfyui Realtime LCM with Photoshop.html-Czi8jk_g.js"),[]),meta:{title:"",order:null}}],["/posts/discovery/prompt.html",{loader:()=>Ke(()=>import("./prompt.html-9pbTPYP-.js"),[]),meta:{title:"",order:null}}],["/posts/discovery/%E8%81%8A%E8%81%8AMixlab%20Node%EF%BC%9AAI%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81.html",{loader:()=>Ke(()=>import("./聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态.html-ClwOenGg.js"),[]),meta:{title:"",order:null}}],["/posts/insight/",{loader:()=>Ke(()=>import("./index.html-CFEdLwZ3.js"),[]),meta:{title:"",order:null}}],["/posts/mixlab_nodes/",{loader:()=>Ke(()=>import("./index.html-DmTMYjRr.js"),[]),meta:{title:"ComfyUI Mixlab Nodes 教程",order:null}}],["/posts/task/",{loader:()=>Ke(()=>import("./index.html-LISyv-xc.js"),[]),meta:{title:"任务墙",order:null}}],["/posts/tutorial/advanced/",{loader:()=>Ke(()=>import("./index.html-Bu4VC_a9.js"),[]),meta:{title:"适合高级用户的自定义",order:null}}],["/posts/tutorial/core_nodes/",{loader:()=>Ke(()=>import("./index.html-BPixZUqn.js"),[]),meta:{title:"核心节点",order:null}}],["/posts/tutorial/custom_nodes/",{loader:()=>Ke(()=>import("./index.html-DvRIvadW.js"),[]),meta:{title:"常用的自定义节点",order:null}}],["/posts/tutorial/interface/",{loader:()=>Ke(()=>import("./index.html-CG2tx8q8.js"),[]),meta:{title:"ComfyUI interface stuff",order:null}}],["/posts/tutorial/start/",{loader:()=>Ke(()=>import("./index.html-Bfw1RUzZ.js"),[]),meta:{title:"教程",order:null}}],["/posts/tutorial/for_testing/",{loader:()=>Ke(()=>import("./index.html-BE0QCtrF.js"),[]),meta:{title:"实验性节点",order:null}}],["/404.html",{loader:()=>Ke(()=>import("./404.html-DZ2Mv7j5.js"),[]),meta:{title:"",order:null}}],["/posts/",{loader:()=>Ke(()=>import("./index.html-DZzsqkAr.js"),[]),meta:{title:"Posts",order:null}}],["/posts/discovery/",{loader:()=>Ke(()=>import("./index.html-5qMQC16d.js"),[]),meta:{title:"Discovery",order:null}}],["/posts/tutorial/",{loader:()=>Ke(()=>import("./index.html-CAAMWxVE.js"),[]),meta:{title:"Tutorial",order:null}}],["/category/",{loader:()=>Ke(()=>import("./index.html-DSr3loHk.js"),[]),meta:{title:"Categories",order:null}}],["/tag/",{loader:()=>Ke(()=>import("./index.html-BEvPFGQD.js"),[]),meta:{title:"Tags",order:null}}],["/article/",{loader:()=>Ke(()=>import("./index.html-CAP-1zms.js"),[]),meta:{title:"Articles",order:null}}],["/timeline/",{loader:()=>Ke(()=>import("./index.html-ZgORyW_U.js"),[]),meta:{title:"Timeline",order:null}}]]);/*! - * vue-router v4.3.2 - * (c) 2024 Eduardo San Martin Morote - * @license MIT - */const eo=typeof document<"u";function Zp(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const De=Object.assign;function Os(e,t){const n={};for(const o in t){const r=t[o];n[o]=Bt(r)?r.map(e):e(r)}return n}const $o=()=>{},Bt=Array.isArray,Mc=/#/g,eh=/&/g,th=/\//g,nh=/=/g,oh=/\?/g,Nc=/\+/g,rh=/%5B/g,sh=/%5D/g,Hc=/%5E/g,ih=/%60/g,Dc=/%7B/g,ah=/%7C/g,Bc=/%7D/g,lh=/%20/g;function yi(e){return encodeURI(""+e).replace(ah,"|").replace(rh,"[").replace(sh,"]")}function ch(e){return yi(e).replace(Dc,"{").replace(Bc,"}").replace(Hc,"^")}function Ys(e){return yi(e).replace(Nc,"%2B").replace(lh,"+").replace(Mc,"%23").replace(eh,"%26").replace(ih,"`").replace(Dc,"{").replace(Bc,"}").replace(Hc,"^")}function uh(e){return Ys(e).replace(nh,"%3D")}function fh(e){return yi(e).replace(Mc,"%23").replace(oh,"%3F")}function dh(e){return e==null?"":fh(e).replace(th,"%2F")}function zo(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const ph=/\/$/,hh=e=>e.replace(ph,"");function As(e,t,n="/"){let o,r={},s="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(o=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),r=e(s)),l>-1&&(o=o||t.slice(0,l),i=t.slice(l,t.length)),o=_h(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:zo(i)}}function mh(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Xa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function gh(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&lo(t.matched[o],n.matched[r])&&Fc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function lo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Fc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!vh(e[n],t[n]))return!1;return!0}function vh(e,t){return Bt(e)?Ja(e,t):Bt(t)?Ja(t,e):e===t}function Ja(e,t){return Bt(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function _h(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,l;for(i=0;i1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}var Uo;(function(e){e.pop="pop",e.push="push"})(Uo||(Uo={}));var jo;(function(e){e.back="back",e.forward="forward",e.unknown=""})(jo||(jo={}));function bh(e){if(!e)if(eo){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),hh(e)}const yh=/^[^#]+#/;function wh(e,t){return e.replace(yh,"#")+t}function Eh(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Gr=()=>({left:window.scrollX,top:window.scrollY});function kh(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=Eh(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Qa(e,t){return(history.state?history.state.position-t:-1)+e}const Xs=new Map;function Ch(e,t){Xs.set(e,t)}function Sh(e){const t=Xs.get(e);return Xs.delete(e),t}let xh=()=>location.protocol+"//"+location.host;function zc(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let l=r.includes(e.slice(s))?e.slice(s).length:1,c=r.slice(l);return c[0]!=="/"&&(c="/"+c),Xa(c,"")}return Xa(n,e)+o+r}function Lh(e,t,n,o){let r=[],s=[],i=null;const l=({state:p})=>{const m=zc(e,location),_=n.value,C=t.value;let L=0;if(p){if(n.value=m,t.value=p,i&&i===_){i=null;return}L=C?p.position-C.position:0}else o(m);r.forEach(k=>{k(n.value,_,{delta:L,type:Uo.pop,direction:L?L>0?jo.forward:jo.back:jo.unknown})})};function c(){i=n.value}function u(p){r.push(p);const m=()=>{const _=r.indexOf(p);_>-1&&r.splice(_,1)};return s.push(m),m}function d(){const{history:p}=window;p.state&&p.replaceState(De({},p.state,{scroll:Gr()}),"")}function f(){for(const p of s)p();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:c,listen:u,destroy:f}}function Za(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Gr():null}}function Oh(e){const{history:t,location:n}=window,o={value:zc(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(c,u,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+c:xh()+e+c;try{t[d?"replaceState":"pushState"](u,"",p),r.value=u}catch(m){console.error(m),n[d?"replace":"assign"](p)}}function i(c,u){const d=De({},t.state,Za(r.value.back,c,r.value.forward,!0),u,{position:r.value.position});s(c,d,!0),o.value=c}function l(c,u){const d=De({},r.value,t.state,{forward:c,scroll:Gr()});s(d.current,d,!0);const f=De({},Za(o.value,c,null),{position:d.position+1},u);s(c,f,!1),o.value=c}return{location:o,state:r,push:l,replace:i}}function Ah(e){e=bh(e);const t=Oh(e),n=Lh(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=De({location:"",base:e,go:o,createHref:wh.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Th(e){return typeof e=="string"||e&&typeof e=="object"}function Uc(e){return typeof e=="string"||typeof e=="symbol"}const Zt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Vc=Symbol("");var el;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(el||(el={}));function co(e,t){return De(new Error,{type:e,[Vc]:!0},t)}function Qt(e,t){return e instanceof Error&&Vc in e&&(t==null||!!(e.type&t))}const tl="[^/]+?",Ph={sensitive:!1,strict:!1,start:!0,end:!0},Rh=/[.+*?^${}()[\]/\\]/g;function Ih(e,t){const n=De({},Ph,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const d=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===80?1:-1:0}function jh(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Mh={type:0,value:""},Nh=/[a-zA-Z0-9_]/;function Hh(e){if(!e)return[[]];if(e==="/")return[[Mh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(m){throw new Error(`ERR (${n})/"${u}": ${m}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let l=0,c,u="",d="";function f(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=c}for(;l{i(O)}:$o}function i(d){if(Uc(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function l(){return n}function c(d){let f=0;for(;f=0&&(d.record.path!==n[f].record.path||!Wc(d,n[f]));)f++;n.splice(f,0,d),d.record.name&&!rl(d)&&o.set(d.record.name,d)}function u(d,f){let p,m={},_,C;if("name"in d&&d.name){if(p=o.get(d.name),!p)throw co(1,{location:d});C=p.record.name,m=De(ol(f.params,p.keys.filter(O=>!O.optional).concat(p.parent?p.parent.keys.filter(O=>O.optional):[]).map(O=>O.name)),d.params&&ol(d.params,p.keys.map(O=>O.name))),_=p.stringify(m)}else if(d.path!=null)_=d.path,p=n.find(O=>O.re.test(_)),p&&(m=p.parse(_),C=p.record.name);else{if(p=f.name?o.get(f.name):n.find(O=>O.re.test(f.path)),!p)throw co(1,{location:d,currentLocation:f});C=p.record.name,m=De({},f.params,d.params),_=p.stringify(m)}const L=[];let k=p;for(;k;)L.unshift(k.record),k=k.parent;return{name:C,path:_,params:m,matched:L,meta:Uh(L)}}return e.forEach(d=>s(d)),{addRoute:s,resolve:u,removeRoute:i,getRoutes:l,getRecordMatcher:r}}function ol(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Fh(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:zh(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function zh(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function rl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Uh(e){return e.reduce((t,n)=>De(t,n.meta),{})}function sl(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function Wc(e,t){return t.children.some(n=>n===e||Wc(e,n))}function Vh(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;rs&&Ys(s)):[o&&Ys(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function Wh(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Bt(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const qh=Symbol(""),al=Symbol(""),Yr=Symbol(""),wi=Symbol(""),Js=Symbol("");function Co(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function hn(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,c)=>{const u=p=>{p===!1?c(co(4,{from:n,to:t})):p instanceof Error?c(p):Th(p)?c(co(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),l())},d=s(()=>e.call(o&&o.instances[r],t,n,u));let f=Promise.resolve(d);e.length<3&&(f=f.then(u)),f.catch(p=>c(p))})}function Ts(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Kh(c)){const d=(c.__vccOpts||c)[t];d&&s.push(hn(d,n,o,i,l,r))}else{let u=c();s.push(()=>u.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${i.path}"`));const f=Zp(d)?d.default:d;i.components[l]=f;const m=(f.__vccOpts||f)[t];return m&&hn(m,n,o,i,l,r)()}))}}return s}function Kh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ll(e){const t=at(Yr),n=at(wi),o=B(()=>{const c=le(e.to);return t.resolve(c)}),r=B(()=>{const{matched:c}=o.value,{length:u}=c,d=c[u-1],f=n.matched;if(!d||!f.length)return-1;const p=f.findIndex(lo.bind(null,d));if(p>-1)return p;const m=cl(c[u-2]);return u>1&&cl(d)===m&&f[f.length-1].path!==m?f.findIndex(lo.bind(null,c[u-2])):p}),s=B(()=>r.value>-1&&Jh(n.params,o.value.params)),i=B(()=>r.value>-1&&r.value===n.matched.length-1&&Fc(n.params,o.value.params));function l(c={}){return Xh(c)?t[le(e.replace)?"replace":"push"](le(e.to)).catch($o):Promise.resolve()}return{route:o,href:B(()=>o.value.href),isActive:s,isExactActive:i,navigate:l}}const Gh=Ie({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ll,setup(e,{slots:t}){const n=Ko(ll(e)),{options:o}=at(Yr),r=B(()=>({[ul(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[ul(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:V("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),Yh=Gh;function Xh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Jh(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Bt(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function cl(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ul=(e,t,n)=>e??t??n,Qh=Ie({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=at(Js),r=B(()=>e.route||o.value),s=at(al,0),i=B(()=>{let u=le(s);const{matched:d}=r.value;let f;for(;(f=d[u])&&!f.components;)u++;return u}),l=B(()=>r.value.matched[i.value]);vn(al,B(()=>i.value+1)),vn(qh,l),vn(Js,r);const c=be();return et(()=>[c.value,l.value,e.name],([u,d,f],[p,m,_])=>{d&&(d.instances[f]=u,m&&m!==d&&u&&u===p&&(d.leaveGuards.size||(d.leaveGuards=m.leaveGuards),d.updateGuards.size||(d.updateGuards=m.updateGuards))),u&&d&&(!m||!lo(d,m)||!p)&&(d.enterCallbacks[f]||[]).forEach(C=>C(u))},{flush:"post"}),()=>{const u=r.value,d=e.name,f=l.value,p=f&&f.components[d];if(!p)return fl(n.default,{Component:p,route:u});const m=f.props[d],_=m?m===!0?u.params:typeof m=="function"?m(u):m:null,L=V(p,De({},_,t,{onVnodeUnmounted:k=>{k.component.isUnmounted&&(f.instances[d]=null)},ref:c}));return fl(n.default,{Component:L,route:u})||L}}});function fl(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Zh=Qh;function em(e){const t=Bh(e.routes,e),n=e.parseQuery||Vh,o=e.stringifyQuery||il,r=e.history,s=Co(),i=Co(),l=Co(),c=Dt(Zt);let u=Zt;eo&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Os.bind(null,$=>""+$),f=Os.bind(null,dh),p=Os.bind(null,zo);function m($,ee){let Q,ue;return Uc($)?(Q=t.getRecordMatcher($),ue=ee):ue=$,t.addRoute(ue,Q)}function _($){const ee=t.getRecordMatcher($);ee&&t.removeRoute(ee)}function C(){return t.getRoutes().map($=>$.record)}function L($){return!!t.getRecordMatcher($)}function k($,ee){if(ee=De({},ee||c.value),typeof $=="string"){const v=As(n,$,ee.path),x=t.resolve({path:v.path},ee),N=r.createHref(v.fullPath);return De(v,x,{params:p(x.params),hash:zo(v.hash),redirectedFrom:void 0,href:N})}let Q;if($.path!=null)Q=De({},$,{path:As(n,$.path,ee.path).path});else{const v=De({},$.params);for(const x in v)v[x]==null&&delete v[x];Q=De({},$,{params:f(v)}),ee.params=f(ee.params)}const ue=t.resolve(Q,ee),ke=$.hash||"";ue.params=d(p(ue.params));const Te=mh(o,De({},$,{hash:ch(ke),path:ue.path})),g=r.createHref(Te);return De({fullPath:Te,hash:ke,query:o===il?Wh($.query):$.query||{}},ue,{redirectedFrom:void 0,href:g})}function O($){return typeof $=="string"?As(n,$,c.value.path):De({},$)}function y($,ee){if(u!==$)return co(8,{from:ee,to:$})}function P($){return X($)}function Y($){return P(De(O($),{replace:!0}))}function W($){const ee=$.matched[$.matched.length-1];if(ee&&ee.redirect){const{redirect:Q}=ee;let ue=typeof Q=="function"?Q($):Q;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=O(ue):{path:ue},ue.params={}),De({query:$.query,hash:$.hash,params:ue.path!=null?{}:$.params},ue)}}function X($,ee){const Q=u=k($),ue=c.value,ke=$.state,Te=$.force,g=$.replace===!0,v=W(Q);if(v)return X(De(O(v),{state:typeof v=="object"?De({},ke,v.state):ke,force:Te,replace:g}),ee||Q);const x=Q;x.redirectedFrom=ee;let N;return!Te&&gh(o,ue,Q)&&(N=co(16,{to:x,from:ue}),ze(ue,ue,!0,!1)),(N?Promise.resolve(N):M(x,ue)).catch(I=>Qt(I)?Qt(I,2)?I:Ye(I):re(I,x,ue)).then(I=>{if(I){if(Qt(I,2))return X(De({replace:g},O(I.to),{state:typeof I.to=="object"?De({},ke,I.to.state):ke,force:Te}),ee||x)}else I=R(x,ue,!0,g,ke);return oe(x,ue,I),I})}function S($,ee){const Q=y($,ee);return Q?Promise.reject(Q):Promise.resolve()}function pe($){const ee=ft.values().next().value;return ee&&typeof ee.runWithContext=="function"?ee.runWithContext($):$()}function M($,ee){let Q;const[ue,ke,Te]=tm($,ee);Q=Ts(ue.reverse(),"beforeRouteLeave",$,ee);for(const v of ue)v.leaveGuards.forEach(x=>{Q.push(hn(x,$,ee))});const g=S.bind(null,$,ee);return Q.push(g),Je(Q).then(()=>{Q=[];for(const v of s.list())Q.push(hn(v,$,ee));return Q.push(g),Je(Q)}).then(()=>{Q=Ts(ke,"beforeRouteUpdate",$,ee);for(const v of ke)v.updateGuards.forEach(x=>{Q.push(hn(x,$,ee))});return Q.push(g),Je(Q)}).then(()=>{Q=[];for(const v of Te)if(v.beforeEnter)if(Bt(v.beforeEnter))for(const x of v.beforeEnter)Q.push(hn(x,$,ee));else Q.push(hn(v.beforeEnter,$,ee));return Q.push(g),Je(Q)}).then(()=>($.matched.forEach(v=>v.enterCallbacks={}),Q=Ts(Te,"beforeRouteEnter",$,ee,pe),Q.push(g),Je(Q))).then(()=>{Q=[];for(const v of i.list())Q.push(hn(v,$,ee));return Q.push(g),Je(Q)}).catch(v=>Qt(v,8)?v:Promise.reject(v))}function oe($,ee,Q){l.list().forEach(ue=>pe(()=>ue($,ee,Q)))}function R($,ee,Q,ue,ke){const Te=y($,ee);if(Te)return Te;const g=ee===Zt,v=eo?history.state:{};Q&&(ue||g?r.replace($.fullPath,De({scroll:g&&v&&v.scroll},ke)):r.push($.fullPath,ke)),c.value=$,ze($,ee,Q,g),Ye()}let G;function ve(){G||(G=r.listen(($,ee,Q)=>{if(!vt.listening)return;const ue=k($),ke=W(ue);if(ke){X(De(ke,{replace:!0}),ue).catch($o);return}u=ue;const Te=c.value;eo&&Ch(Qa(Te.fullPath,Q.delta),Gr()),M(ue,Te).catch(g=>Qt(g,12)?g:Qt(g,2)?(X(g.to,ue).then(v=>{Qt(v,20)&&!Q.delta&&Q.type===Uo.pop&&r.go(-1,!1)}).catch($o),Promise.reject()):(Q.delta&&r.go(-Q.delta,!1),re(g,ue,Te))).then(g=>{g=g||R(ue,Te,!1),g&&(Q.delta&&!Qt(g,8)?r.go(-Q.delta,!1):Q.type===Uo.pop&&Qt(g,20)&&r.go(-1,!1)),oe(ue,Te,g)}).catch($o)}))}let ye=Co(),U=Co(),he;function re($,ee,Q){Ye($);const ue=U.list();return ue.length?ue.forEach(ke=>ke($,ee,Q)):console.error($),Promise.reject($)}function Be(){return he&&c.value!==Zt?Promise.resolve():new Promise(($,ee)=>{ye.add([$,ee])})}function Ye($){return he||(he=!$,ve(),ye.list().forEach(([ee,Q])=>$?Q($):ee()),ye.reset()),$}function ze($,ee,Q,ue){const{scrollBehavior:ke}=e;if(!eo||!ke)return Promise.resolve();const Te=!Q&&Sh(Qa($.fullPath,0))||(ue||!Q)&&history.state&&history.state.scroll||null;return Bn().then(()=>ke($,ee,Te)).then(g=>g&&kh(g)).catch(g=>re(g,$,ee))}const Xe=$=>r.go($);let gt;const ft=new Set,vt={currentRoute:c,listening:!0,addRoute:m,removeRoute:_,hasRoute:L,getRoutes:C,resolve:k,options:e,push:P,replace:Y,go:Xe,back:()=>Xe(-1),forward:()=>Xe(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:U.add,isReady:Be,install($){const ee=this;$.component("RouterLink",Yh),$.component("RouterView",Zh),$.config.globalProperties.$router=ee,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>le(c)}),eo&&!gt&&c.value===Zt&&(gt=!0,P(r.location).catch(ke=>{}));const Q={};for(const ke in Zt)Object.defineProperty(Q,ke,{get:()=>c.value[ke],enumerable:!0});$.provide(Yr,ee),$.provide(wi,zl(Q)),$.provide(Js,c);const ue=$.unmount;ft.add($),$.unmount=function(){ft.delete($),ft.size<1&&(u=Zt,G&&G(),G=null,c.value=Zt,gt=!1,he=!1),ue()}}};function Je($){return $.reduce((ee,Q)=>ee.then(()=>pe(Q)),Promise.resolve())}return vt}function tm(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;ilo(u,l))?o.push(l):n.push(l));const c=e.matched[i];c&&(t.matched.find(u=>lo(u,c))||r.push(c))}return[n,o,r]}function zn(){return at(Yr)}function Ft(){return at(wi)}var Ei=Symbol(""),Jt=()=>{const e=at(Ei);if(!e)throw new Error("useClientData() is called without provider.");return e},nm=()=>Jt().pageComponent,tn=()=>Jt().pageData,dt=()=>Jt().pageFrontmatter,om=()=>Jt().pageHead,rm=()=>Jt().pageLang,sm=()=>Jt().pageLayout,En=()=>Jt().routeLocale,qc=()=>Jt().routes,ki=()=>Jt().siteData,er=()=>Jt().siteLocaleData,im=Symbol(""),Qs=Dt(Jp),io=Dt(Qp),Kc=(e,t)=>{const n=Fp(e,t);if(io.value[n])return n;const o=encodeURI(n);if(io.value[o])return o;const r=Qs.value[n]||Qs.value[o];return r||n},Mn=(e,t)=>{const{pathname:n,hashAndQueries:o}=Ic(e),r=Kc(n,t),s=r+o;return io.value[r]?{...io.value[r],path:s,notFound:!1}:{...io.value["/404.html"],path:s,notFound:!0}},am=(e,t)=>{const{pathname:n,hashAndQueries:o}=Ic(e);return Kc(n,t)+o},lm=e=>{if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget){const t=e.currentTarget.getAttribute("target");if(t!=null&&t.match(/\b_blank\b/i))return}return e.preventDefault(),!0}},Kt=Ie({name:"RouteLink",props:{to:{type:String,required:!0},active:Boolean,activeClass:{type:String,default:"route-link-active"}},slots:Object,setup(e,{slots:t}){const n=zn(),o=Ft(),r=B(()=>e.to.startsWith("#")||e.to.startsWith("?")?e.to:`/awesome-comfyui-workflow/${am(e.to,o.path).substring(1)}`);return()=>{var s;return V("a",{class:["route-link",{[e.activeClass]:e.active}],href:r.value,onClick:(i={})=>{lm(i)&&n.push(e.to).catch()}},(s=t.default)==null?void 0:s.call(t))}}}),Gt=Ie({name:"AutoLink",props:{config:{type:Object,required:!0}},slots:Object,setup(e,{slots:t}){const n=Yl(e,"config"),o=Ft(),r=ki(),s=B(()=>Pc(n.value.link)),i=B(()=>n.value.target||(s.value?"_blank":void 0)),l=B(()=>i.value==="_blank"),c=B(()=>!s.value&&!l.value),u=B(()=>n.value.rel||(l.value?"noopener noreferrer":null)),d=B(()=>n.value.ariaLabel??n.value.text),f=B(()=>{if(n.value.exact)return!1;const m=Object.keys(r.value.locales);return m.length?m.every(_=>_!==n.value.link):n.value.link!=="/"}),p=B(()=>c.value?n.value.activeMatch?(n.value.activeMatch instanceof RegExp?n.value.activeMatch:new RegExp(n.value.activeMatch,"u")).test(o.path):f.value?o.path.startsWith(n.value.link):o.path===n.value.link:!1);return()=>{const{before:m,after:_,default:C}=t,L=(C==null?void 0:C(n.value))||[m==null?void 0:m(n.value),n.value.text,_==null?void 0:_(n.value)];return c.value?V(Kt,{class:"auto-link",to:n.value.link,active:p.value,"aria-label":d.value},()=>L):V("a",{class:"auto-link external-link",href:n.value.link,"aria-label":d.value,rel:u.value,target:i.value},L)}}}),Xr=Ie({name:"ClientOnly",setup(e,t){const n=be(!1);return tt(()=>{n.value=!0}),()=>{var o,r;return n.value?(r=(o=t.slots).default)==null?void 0:r.call(o):null}}}),cm=Ie({name:"Content",props:{path:{type:String,required:!1,default:""}},setup(e){const t=nm(),n=B(()=>{if(!e.path)return t.value;const o=Mn(e.path);return lc(()=>o.loader().then(({comp:r})=>r))});return()=>V(n.value)}}),um="Layout",fm="en-US",On=Ko({resolveLayouts:e=>e.reduce((t,n)=>({...t,...n.layouts}),{}),resolvePageHead:(e,t,n)=>{const o=Ct(t.description)?t.description:n.description,r=[...Array.isArray(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:o}]];return qp(r)},resolvePageHeadTitle:(e,t)=>[e.title,t.title].filter(n=>!!n).join(" | "),resolvePageLang:(e,t)=>e.lang||t.lang||fm,resolvePageLayout:(e,t)=>{const n=Ct(e.frontmatter.layout)?e.frontmatter.layout:um;if(!t[n])throw new Error(`[vuepress] Cannot resolve layout: ${n}`);return t[n]},resolveRouteLocale:(e,t)=>Rc(e,decodeURI(t)),resolveSiteLocaleData:({base:e,locales:t,...n},o)=>{var r;return{...n,...t[o],head:[...((r=t[o])==null?void 0:r.head)??[],...n.head??[]]}}}),zt=(e={})=>e,Jr=e=>qr(e)?e:`/awesome-comfyui-workflow/${jc(e)}`;function tr(e){return Tl()?(Cf(e),!0):!1}function St(e){return typeof e=="function"?e():le(e)}const Qr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const dm=Object.prototype.toString,pm=e=>dm.call(e)==="[object Object]",jn=()=>{},Zs=hm();function hm(){var e,t;return Qr&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Gc(e,t){function n(...o){return new Promise((r,s)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(s)})}return n}const Yc=e=>e();function mm(e,t={}){let n,o,r=jn;const s=l=>{clearTimeout(l),r(),r=jn};return l=>{const c=St(e),u=St(t.maxWait);return n&&s(n),c<=0||u!==void 0&&u<=0?(o&&(s(o),o=null),Promise.resolve(l())):new Promise((d,f)=>{r=t.rejectOnCancel?f:d,u&&!o&&(o=setTimeout(()=>{n&&s(n),o=null,d(l())},u)),n=setTimeout(()=>{o&&s(o),o=null,d(l())},c)})}}function gm(e=Yc){const t=be(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...s)=>{t.value&&e(...s)};return{isActive:Dn(t),pause:n,resume:o,eventFilter:r}}function vm(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const o=t;t=void 0,o&&await o},n}function _m(e){return Xo()}function bm(...e){if(e.length!==1)return Yl(...e);const t=e[0];return typeof t=="function"?Dn(Kl(()=>({get:t,set:jn}))):be(t)}function Xc(e,t=200,n={}){return Gc(mm(t,n),e)}function ym(e,t,n={}){const{eventFilter:o=Yc,...r}=n;return et(e,Gc(o,t),r)}function wm(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:s,pause:i,resume:l,isActive:c}=gm(o);return{stop:ym(e,t,{...r,eventFilter:s}),pause:i,resume:l,isActive:c}}function Ci(e,t=!0,n){_m()?tt(e,n):t?e():Bn(e)}function Em(e,t,n={}){const{immediate:o=!0}=n,r=be(!1);let s=null;function i(){s&&(clearTimeout(s),s=null)}function l(){r.value=!1,i()}function c(...u){i(),r.value=!0,s=setTimeout(()=>{r.value=!1,s=null,e(...u)},St(t))}return o&&(r.value=!0,Qr&&c()),tr(l),{isPending:Dn(r),start:c,stop:l}}function km(e=!1,t={}){const{truthyValue:n=!0,falsyValue:o=!1}=t,r=ht(e),s=be(e);function i(l){if(arguments.length)return s.value=l,s.value;{const c=St(n);return s.value=s.value===c?St(o):c,s.value}}return r?i:[s,i]}function Ht(e){var t;const n=St(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Xt=Qr?window:void 0,Jc=Qr?window.navigator:void 0;function pt(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Xt):[t,n,o,r]=e,!t)return jn;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],i=()=>{s.forEach(d=>d()),s.length=0},l=(d,f,p,m)=>(d.addEventListener(f,p,m),()=>d.removeEventListener(f,p,m)),c=et(()=>[Ht(t),St(r)],([d,f])=>{if(i(),!d)return;const p=pm(f)?{...f}:f;s.push(...n.flatMap(m=>o.map(_=>l(d,m,_,p))))},{immediate:!0,flush:"post"}),u=()=>{c(),i()};return tr(u),u}let dl=!1;function Cm(e,t,n={}){const{window:o=Xt,ignore:r=[],capture:s=!0,detectIframe:i=!1}=n;if(!o)return jn;Zs&&!dl&&(dl=!0,Array.from(o.document.body.children).forEach(p=>p.addEventListener("click",jn)),o.document.documentElement.addEventListener("click",jn));let l=!0;const c=p=>r.some(m=>{if(typeof m=="string")return Array.from(o.document.querySelectorAll(m)).some(_=>_===p.target||p.composedPath().includes(_));{const _=Ht(m);return _&&(p.target===_||p.composedPath().includes(_))}}),d=[pt(o,"click",p=>{const m=Ht(e);if(!(!m||m===p.target||p.composedPath().includes(m))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}t(p)}},{passive:!0,capture:s}),pt(o,"pointerdown",p=>{const m=Ht(e);l=!c(p)&&!!(m&&!p.composedPath().includes(m))},{passive:!0}),i&&pt(o,"blur",p=>{setTimeout(()=>{var m;const _=Ht(e);((m=o.document.activeElement)==null?void 0:m.tagName)==="IFRAME"&&!(_!=null&&_.contains(o.document.activeElement))&&t(p)},0)})].filter(Boolean);return()=>d.forEach(p=>p())}function Sm(){const e=be(!1),t=Xo();return t&&tt(()=>{e.value=!0},t),e}function Zr(e){const t=Sm();return B(()=>(t.value,!!e()))}function Si(e,t={}){const{window:n=Xt}=t,o=Zr(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const s=be(!1),i=u=>{s.value=u.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",i):r.removeListener(i))},c=pd(()=>{o.value&&(l(),r=n.matchMedia(St(e)),"addEventListener"in r?r.addEventListener("change",i):r.addListener(i),s.value=r.matches)});return tr(()=>{c(),l(),r=void 0}),s}function pl(e,t={}){const{controls:n=!1,navigator:o=Jc}=t,r=Zr(()=>o&&"permissions"in o);let s;const i=typeof e=="string"?{name:e}:e,l=be(),c=()=>{s&&(l.value=s.state)},u=vm(async()=>{if(r.value){if(!s)try{s=await o.permissions.query(i),pt(s,"change",c),c()}catch{l.value="prompt"}return s}});return u(),n?{state:l,isSupported:r,query:u}:l}function xm(e={}){const{navigator:t=Jc,read:n=!1,source:o,copiedDuring:r=1500,legacy:s=!1}=e,i=Zr(()=>t&&"clipboard"in t),l=pl("clipboard-read"),c=pl("clipboard-write"),u=B(()=>i.value||s),d=be(""),f=be(!1),p=Em(()=>f.value=!1,r);function m(){i.value&&k(l.value)?t.clipboard.readText().then(O=>{d.value=O}):d.value=L()}u.value&&n&&pt(["copy","cut"],m);async function _(O=St(o)){u.value&&O!=null&&(i.value&&k(c.value)?await t.clipboard.writeText(O):C(O),d.value=O,f.value=!0,p.start())}function C(O){const y=document.createElement("textarea");y.value=O??"",y.style.position="absolute",y.style.opacity="0",document.body.appendChild(y),y.select(),document.execCommand("copy"),y.remove()}function L(){var O,y,P;return(P=(y=(O=document==null?void 0:document.getSelection)==null?void 0:O.call(document))==null?void 0:y.toString())!=null?P:""}function k(O){return O==="granted"||O==="prompt"}return{isSupported:u,text:d,copied:f,copy:_}}const vr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_r="__vueuse_ssr_handlers__",Lm=Om();function Om(){return _r in vr||(vr[_r]=vr[_r]||{}),vr[_r]}function Am(e,t){return Lm[e]||t}function Tm(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Pm={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},hl="vueuse-storage";function xi(e,t,n,o={}){var r;const{flush:s="pre",deep:i=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=Xt,eventFilter:p,onError:m=M=>{console.error(M)},initOnMounted:_}=o,C=(d?Dt:be)(typeof t=="function"?t():t);if(!n)try{n=Am("getDefaultStorage",()=>{var M;return(M=Xt)==null?void 0:M.localStorage})()}catch(M){m(M)}if(!n)return C;const L=St(t),k=Tm(L),O=(r=o.serializer)!=null?r:Pm[k],{pause:y,resume:P}=wm(C,()=>W(C.value),{flush:s,deep:i,eventFilter:p});f&&l&&Ci(()=>{pt(f,"storage",S),pt(f,hl,pe),_&&S()}),_||S();function Y(M,oe){f&&f.dispatchEvent(new CustomEvent(hl,{detail:{key:e,oldValue:M,newValue:oe,storageArea:n}}))}function W(M){try{const oe=n.getItem(e);if(M==null)Y(oe,null),n.removeItem(e);else{const R=O.write(M);oe!==R&&(n.setItem(e,R),Y(oe,R))}}catch(oe){m(oe)}}function X(M){const oe=M?M.newValue:n.getItem(e);if(oe==null)return c&&L!=null&&n.setItem(e,O.write(L)),L;if(!M&&u){const R=O.read(oe);return typeof u=="function"?u(R,L):k==="object"&&!Array.isArray(R)?{...L,...R}:R}else return typeof oe!="string"?oe:O.read(oe)}function S(M){if(!(M&&M.storageArea!==n)){if(M&&M.key==null){C.value=L;return}if(!(M&&M.key!==e)){y();try{(M==null?void 0:M.newValue)!==O.write(C.value)&&(C.value=X(M))}catch(oe){m(oe)}finally{M?Bn(P):P()}}}}function pe(M){S(M.detail)}return C}function Rm(e){return Si("(prefers-color-scheme: dark)",e)}function Im(e,t,n={}){const{window:o=Xt,...r}=n;let s;const i=Zr(()=>o&&"ResizeObserver"in o),l=()=>{s&&(s.disconnect(),s=void 0)},c=B(()=>Array.isArray(e)?e.map(f=>Ht(f)):[Ht(e)]),u=et(c,f=>{if(l(),i.value&&o){s=new ResizeObserver(t);for(const p of f)p&&s.observe(p,r)}},{immediate:!0,flush:"post"}),d=()=>{l(),u()};return tr(d),{isSupported:i,stop:d}}function $m(e,t={width:0,height:0},n={}){const{window:o=Xt,box:r="content-box"}=n,s=B(()=>{var f,p;return(p=(f=Ht(e))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),i=be(t.width),l=be(t.height),{stop:c}=Im(e,([f])=>{const p=r==="border-box"?f.borderBoxSize:r==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&s.value){const m=Ht(e);if(m){const _=m.getBoundingClientRect();i.value=_.width,l.value=_.height}}else if(p){const m=Array.isArray(p)?p:[p];i.value=m.reduce((_,{inlineSize:C})=>_+C,0),l.value=m.reduce((_,{blockSize:C})=>_+C,0)}else i.value=f.contentRect.width,l.value=f.contentRect.height},n);Ci(()=>{const f=Ht(e);f&&(i.value="offsetWidth"in f?f.offsetWidth:t.width,l.value="offsetHeight"in f?f.offsetHeight:t.height)});const u=et(()=>Ht(e),f=>{i.value=f?t.width:0,l.value=f?t.height:0});function d(){c(),u()}return{width:i,height:l,stop:d}}function Ps(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function qy(e,t,n={}){const{window:o=Xt}=n;return xi(e,t,o==null?void 0:o.localStorage,n)}function Qc(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Rs=new WeakMap;function Mm(e,t=!1){const n=be(t);let o=null,r="";et(bm(e),l=>{const c=Ps(St(l));if(c){const u=c;if(Rs.get(u)||Rs.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(r=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const s=()=>{const l=Ps(St(e));!l||n.value||(Zs&&(o=pt(l,"touchmove",c=>{jm(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},i=()=>{const l=Ps(St(e));!l||!n.value||(Zs&&(o==null||o()),l.style.overflow=r,Rs.delete(l),n.value=!1)};return tr(i),B({get(){return n.value},set(l){l?s():i()}})}function Nm(e={}){const{window:t=Xt,behavior:n="auto"}=e;if(!t)return{x:be(0),y:be(0)};const o=be(t.scrollX),r=be(t.scrollY),s=B({get(){return o.value},set(l){scrollTo({left:l,behavior:n})}}),i=B({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return pt(t,"scroll",()=>{o.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:s,y:i}}function Hm(e={}){const{window:t=Xt,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:s=!0}=e,i=be(n),l=be(o),c=()=>{t&&(s?(i.value=t.innerWidth,l.value=t.innerHeight):(i.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(c(),Ci(c),pt("resize",c,{passive:!0}),r){const u=Si("(orientation: portrait)");et(u,()=>c())}return{width:i,height:l}}const ml=async(e,t)=>{const{path:n,query:o}=e.currentRoute.value,{scrollBehavior:r}=e.options;e.options.scrollBehavior=void 0,await e.replace({path:n,query:o,hash:t}),e.options.scrollBehavior=r},Dm=({headerLinkSelector:e,headerAnchorSelector:t,delay:n,offset:o=5})=>{const r=zn();pt("scroll",Xc(()=>{var _,C;const i=Math.max(window.scrollY,document.documentElement.scrollTop,document.body.scrollTop);if(Math.abs(i-0)f.some(k=>k.hash===L.hash));for(let L=0;L=(((_=k.parentElement)==null?void 0:_.offsetTop)??0)-o,P=!O||i<(((C=O.parentElement)==null?void 0:C.offsetTop)??0)-o;if(!(y&&P))continue;const W=decodeURIComponent(r.currentRoute.value.hash),X=decodeURIComponent(k.hash);if(W===X)return;if(d){for(let S=L+1;S{const t=En();return B(()=>e[t.value]??{})},qm=()=>{const e=qc();return B(()=>Object.keys(e.value))},Cr=(e,t)=>{var o;const n=(o=(t==null?void 0:t._instance)||Xo())==null?void 0:o.appContext.components;return n?e in n||$t(e)in n||qo($t(e))in n:!1},Zc=e=>new Promise(t=>setTimeout(t,e)),Is=e=>typeof e=="number",Nr=(e,t)=>Ct(e)&&e.startsWith(t),Km=(e,t)=>Ct(e)&&e.endsWith(t),Gm=Object.entries,Ym=Object.keys,Xm=Object.values,Jm=e=>Nr(e,"/");var Qm={"/":{backToTop:"Back to top"}};const Zm=Ie({name:"BackToTop",setup(){const e=dt(),t=fo(Qm),n=Dt(),{height:o}=$m(n),{height:r}=Hm(),{y:s}=Nm(),i=B(()=>e.value.backToTop!==!1&&s.value>100),l=B(()=>s.value/(o.value-r.value)*100);return tt(()=>{n.value=document.body}),()=>V(Zo,{name:"back-to-top"},()=>i.value?V("button",{type:"button",class:"vp-back-to-top-button","aria-label":t.value.backToTop,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})}},[V("span",{class:"vp-scroll-progress",role:"progressbar","aria-labelledby":"loadinglabel","aria-valuenow":l.value},V("svg",V("circle",{cx:"26",cy:"26",r:"24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-dasharray":`${Math.PI*l.value*.48} ${Math.PI*(100-l.value)*.48}`}))),V("div",{class:"back-to-top-icon"})]):null)}}),eg=zt({rootComponents:[Zm]}),tg=Object.freeze(Object.defineProperty({__proto__:null,default:eg},Symbol.toStringTag,{value:"Module"})),ng=/language-(shellscript|shell|bash|sh|zsh)/,og=({delay:e=500,duration:t=2e3,locales:n,selector:o,showInMobile:r,ignoreSelector:s=[],transform:i})=>{const l=Si("(max-width: 419px)"),c=B(()=>!l.value||r),u=fo(n),d=tn(),f=L=>{var O;if(L.hasAttribute("copy-code-registered"))return;const k=document.createElement("button");k.type="button",k.classList.add("vp-copy-code-button"),k.setAttribute("aria-label",u.value.copy),k.setAttribute("data-copied",u.value.copied),(O=L.parentElement)==null||O.insertBefore(k,L),L.setAttribute("copy-code-registered","")};et(()=>[d.value.path,c.value],async()=>{document.body.classList.toggle("copy-code-disabled",!c.value),c.value&&(await Bn(),await Zc(e),document.querySelectorAll(o.join(",")).forEach(f))},{immediate:!0});const{copy:m}=xm({legacy:!0}),_=new WeakMap,C=(L,k,O)=>{const y=k.cloneNode(!0);s.length&&y.querySelectorAll(s.join(",")).forEach(Y=>Y.remove()),i&&i(y);let P=y.textContent||"";ng.test(L.className)&&(P=P.replace(/^ *(\$|>) /gm,"")),m(P).then(()=>{if(t<=0)return;O.classList.add("copied"),clearTimeout(_.get(O));const Y=setTimeout(()=>{O.classList.remove("copied"),O.blur(),_.delete(O)},t);_.set(O,Y)})};pt("click",L=>{const k=L.target;if(c.value&&k.matches('div[class*="language-"] > button.vp-copy-code-button')){const O=k.parentElement,y=k.nextElementSibling;if(!O||!y)return;C(O,y,k)}})};var rg={"/":{copy:"Copy code",copied:"Copied"}},sg=['.theme-default-content div[class*="language-"] pre'];const ig=zt({setup:()=>{og({selector:sg,locales:rg,duration:2e3,delay:500,showInMobile:!1})}}),ag=Object.freeze(Object.defineProperty({__proto__:null,default:ig},Symbol.toStringTag,{value:"Module"}));/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var An=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},o=window.Promise||function(R){function G(){}R(G,G)},r=function(R){var G=R.target;if(G===pe){_();return}y.indexOf(G)!==-1&&C({target:G})},s=function(){if(!(Y||!S.original)){var R=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(W-R)>X.scrollOffset&&setTimeout(_,150)}},i=function(R){var G=R.key||R.keyCode;(G==="Escape"||G==="Esc"||G===27)&&_()},l=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},G=R;if(R.background&&(pe.style.background=R.background),R.container&&R.container instanceof Object&&(G.container=An({},X.container,R.container)),R.template){var ve=Sr(R.template)?R.template:document.querySelector(R.template);G.template=ve}return X=An({},X,G),y.forEach(function(ye){ye.dispatchEvent(Zn("medium-zoom:update",{detail:{zoom:M}}))}),M},c=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(An({},X,R))},u=function(){for(var R=arguments.length,G=Array(R),ve=0;ve0?G.reduce(function(U,he){return[].concat(U,vl(he))},[]):y;return ye.forEach(function(U){U.classList.remove("medium-zoom-image"),U.dispatchEvent(Zn("medium-zoom:detach",{detail:{zoom:M}}))}),y=y.filter(function(U){return ye.indexOf(U)===-1}),M},f=function(R,G){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return y.forEach(function(ye){ye.addEventListener("medium-zoom:"+R,G,ve)}),P.push({type:"medium-zoom:"+R,listener:G,options:ve}),M},p=function(R,G){var ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return y.forEach(function(ye){ye.removeEventListener("medium-zoom:"+R,G,ve)}),P=P.filter(function(ye){return!(ye.type==="medium-zoom:"+R&&ye.listener.toString()===G.toString())}),M},m=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},G=R.target,ve=function(){var U={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},he=void 0,re=void 0;if(X.container)if(X.container instanceof Object)U=An({},U,X.container),he=U.width-U.left-U.right-X.margin*2,re=U.height-U.top-U.bottom-X.margin*2;else{var Be=Sr(X.container)?X.container:document.querySelector(X.container),Ye=Be.getBoundingClientRect(),ze=Ye.width,Xe=Ye.height,gt=Ye.left,ft=Ye.top;U=An({},U,{width:ze,height:Xe,left:gt,top:ft})}he=he||U.width-X.margin*2,re=re||U.height-X.margin*2;var vt=S.zoomedHd||S.original,Je=gl(vt)?he:vt.naturalWidth||he,$=gl(vt)?re:vt.naturalHeight||re,ee=vt.getBoundingClientRect(),Q=ee.top,ue=ee.left,ke=ee.width,Te=ee.height,g=Math.min(Math.max(ke,Je),he)/ke,v=Math.min(Math.max(Te,$),re)/Te,x=Math.min(g,v),N=(-ue+(he-ke)/2+X.margin+U.left)/x,I=(-Q+(re-Te)/2+X.margin+U.top)/x,q="scale("+x+") translate3d("+N+"px, "+I+"px, 0)";S.zoomed.style.transform=q,S.zoomedHd&&(S.zoomedHd.style.transform=q)};return new o(function(ye){if(G&&y.indexOf(G)===-1){ye(M);return}var U=function ze(){Y=!1,S.zoomed.removeEventListener("transitionend",ze),S.original.dispatchEvent(Zn("medium-zoom:opened",{detail:{zoom:M}})),ye(M)};if(S.zoomed){ye(M);return}if(G)S.original=G;else if(y.length>0){var he=y;S.original=he[0]}else{ye(M);return}if(S.original.dispatchEvent(Zn("medium-zoom:open",{detail:{zoom:M}})),W=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,Y=!0,S.zoomed=ug(S.original),document.body.appendChild(pe),X.template){var re=Sr(X.template)?X.template:document.querySelector(X.template);S.template=document.createElement("div"),S.template.appendChild(re.content.cloneNode(!0)),document.body.appendChild(S.template)}if(S.original.parentElement&&S.original.parentElement.tagName==="PICTURE"&&S.original.currentSrc&&(S.zoomed.src=S.original.currentSrc),document.body.appendChild(S.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),S.original.classList.add("medium-zoom-image--hidden"),S.zoomed.classList.add("medium-zoom-image--opened"),S.zoomed.addEventListener("click",_),S.zoomed.addEventListener("transitionend",U),S.original.getAttribute("data-zoom-src")){S.zoomedHd=S.zoomed.cloneNode(),S.zoomedHd.removeAttribute("srcset"),S.zoomedHd.removeAttribute("sizes"),S.zoomedHd.removeAttribute("loading"),S.zoomedHd.src=S.zoomed.getAttribute("data-zoom-src"),S.zoomedHd.onerror=function(){clearInterval(Be),console.warn("Unable to reach the zoom image target "+S.zoomedHd.src),S.zoomedHd=null,ve()};var Be=setInterval(function(){S.zoomedHd.complete&&(clearInterval(Be),S.zoomedHd.classList.add("medium-zoom-image--opened"),S.zoomedHd.addEventListener("click",_),document.body.appendChild(S.zoomedHd),ve())},10)}else if(S.original.hasAttribute("srcset")){S.zoomedHd=S.zoomed.cloneNode(),S.zoomedHd.removeAttribute("sizes"),S.zoomedHd.removeAttribute("loading");var Ye=S.zoomedHd.addEventListener("load",function(){S.zoomedHd.removeEventListener("load",Ye),S.zoomedHd.classList.add("medium-zoom-image--opened"),S.zoomedHd.addEventListener("click",_),document.body.appendChild(S.zoomedHd),ve()})}else ve()})},_=function(){return new o(function(R){if(Y||!S.original){R(M);return}var G=function ve(){S.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(S.zoomed),S.zoomedHd&&document.body.removeChild(S.zoomedHd),document.body.removeChild(pe),S.zoomed.classList.remove("medium-zoom-image--opened"),S.template&&document.body.removeChild(S.template),Y=!1,S.zoomed.removeEventListener("transitionend",ve),S.original.dispatchEvent(Zn("medium-zoom:closed",{detail:{zoom:M}})),S.original=null,S.zoomed=null,S.zoomedHd=null,S.template=null,R(M)};Y=!0,document.body.classList.remove("medium-zoom--opened"),S.zoomed.style.transform="",S.zoomedHd&&(S.zoomedHd.style.transform=""),S.template&&(S.template.style.transition="opacity 150ms",S.template.style.opacity=0),S.original.dispatchEvent(Zn("medium-zoom:close",{detail:{zoom:M}})),S.zoomed.addEventListener("transitionend",G)})},C=function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},G=R.target;return S.original?_():m({target:G})},L=function(){return X},k=function(){return y},O=function(){return S.original},y=[],P=[],Y=!1,W=0,X=n,S={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?X=t:(t||typeof t=="string")&&u(t),X=An({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},X);var pe=cg(X.background);document.addEventListener("click",r),document.addEventListener("keyup",i),document.addEventListener("scroll",s),window.addEventListener("resize",_);var M={open:m,close:_,toggle:C,update:l,clone:c,attach:u,detach:d,on:f,off:p,getOptions:L,getImages:k,getZoomedImage:O};return M};function dg(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n==="top"&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var pg=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";dg(pg);const hg=Symbol("mediumZoom");var mg={};const gg=".theme-default-content > img, .theme-default-content :not(a) > img",vg=mg,_g=300,bg=zt({enhance({app:e,router:t}){const n=fg(vg);n.refresh=(o=gg)=>{n.detach(),n.attach(o)},e.provide(hg,n),t.afterEach(()=>{Zc(_g).then(()=>n.refresh())})}}),yg=Object.freeze(Object.defineProperty({__proto__:null,default:bg},Symbol.toStringTag,{value:"Module"}));/** - * NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress - * @license MIT - */const Pe={settings:{minimum:.08,easing:"ease",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:'
'},status:null,set:e=>{const t=Pe.isStarted();e=$s(e,Pe.settings.minimum,1),Pe.status=e===1?null:e;const n=Pe.render(!t),o=n.querySelector(Pe.settings.barSelector),r=Pe.settings.speed,s=Pe.settings.easing;return n.offsetWidth,wg(i=>{yr(o,{transform:"translate3d("+_l(e)+"%,0,0)",transition:"all "+r+"ms "+s}),e===1?(yr(n,{transition:"none",opacity:"1"}),n.offsetWidth,setTimeout(()=>{yr(n,{transition:"all "+r+"ms linear",opacity:"0"}),setTimeout(()=>{Pe.remove(),i()},r)},r)):setTimeout(()=>i(),r)}),Pe},isStarted:()=>typeof Pe.status=="number",start:()=>{Pe.status||Pe.set(0);const e=()=>{setTimeout(()=>{Pe.status&&(Pe.trickle(),e())},Pe.settings.trickleSpeed)};return Pe.settings.trickle&&e(),Pe},done:e=>!e&&!Pe.status?Pe:Pe.inc(.3+.5*Math.random()).set(1),inc:e=>{let t=Pe.status;return t?(typeof e!="number"&&(e=(1-t)*$s(Math.random()*t,.1,.95)),t=$s(t+e,0,.994),Pe.set(t)):Pe.start()},trickle:()=>Pe.inc(Math.random()*Pe.settings.trickleRate),render:e=>{if(Pe.isRendered())return document.getElementById("nprogress");bl(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=Pe.settings.template;const n=t.querySelector(Pe.settings.barSelector),o=e?"-100":_l(Pe.status||0),r=document.querySelector(Pe.settings.parent);return yr(n,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),r!==document.body&&bl(r,"nprogress-custom-parent"),r==null||r.appendChild(t),t},remove:()=>{yl(document.documentElement,"nprogress-busy"),yl(document.querySelector(Pe.settings.parent),"nprogress-custom-parent");const e=document.getElementById("nprogress");e&&Eg(e)},isRendered:()=>!!document.getElementById("nprogress")},$s=(e,t,n)=>en?n:e,_l=e=>(-1+e)*100,wg=function(){const e=[];function t(){const n=e.shift();n&&n(t)}return function(n){e.push(n),e.length===1&&t()}}(),yr=function(){const e=["Webkit","O","Moz","ms"],t={};function n(i){return i.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(l,c){return c.toUpperCase()})}function o(i){const l=document.body.style;if(i in l)return i;let c=e.length;const u=i.charAt(0).toUpperCase()+i.slice(1);let d;for(;c--;)if(d=e[c]+u,d in l)return d;return i}function r(i){return i=n(i),t[i]??(t[i]=o(i))}function s(i,l,c){l=r(l),i.style[l]=c}return function(i,l){for(const c in l){const u=l[c];u!==void 0&&Object.prototype.hasOwnProperty.call(l,c)&&s(i,c,u)}}}(),eu=(e,t)=>(typeof e=="string"?e:Li(e)).indexOf(" "+t+" ")>=0,bl=(e,t)=>{const n=Li(e),o=n+t;eu(n,t)||(e.className=o.substring(1))},yl=(e,t)=>{const n=Li(e);if(!eu(e,t))return;const o=n.replace(" "+t+" "," ");e.className=o.substring(1,o.length-1)},Li=e=>(" "+(e.className||"")+" ").replace(/\s+/gi," "),Eg=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},kg=()=>{tt(()=>{const e=zn(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(n=>{t.has(n.path)||Pe.start()}),e.afterEach(n=>{t.add(n.path),Pe.done()})})},Cg=zt({setup(){kg()}}),Sg=Object.freeze(Object.defineProperty({__proto__:null,default:Cg},Symbol.toStringTag,{value:"Module"})),xg=JSON.parse(`{"logo":"/logo.png","navbar":[{"text":"基础教程","children":[{"text":"安装","link":"/posts/tutorial/start/index"},{"text":"交互界面","link":"/posts/tutorial/interface/index"},{"text":"核心节点","link":"/posts/tutorial/core_nodes/index"},{"text":"自定义节点","link":"/posts/tutorial/custom_nodes/index"},{"text":"高级与进阶","link":"/posts/tutorial/advanced/index"}]},{"text":"MixlabNodes","link":"/posts/mixlab_nodes/index"},{"text":"使命","link":"/posts/mission"},{"text":"Discord","link":"https://discord.gg/cXs9vZSqeK"}],"locales":{"/":{"selectLanguageName":"English"}},"colorMode":"auto","colorModeSwitch":true,"repo":null,"selectLanguageText":"Languages","selectLanguageAriaLabel":"Select language","sidebar":"auto","sidebarDepth":2,"editLink":true,"editLinkText":"Edit this page","lastUpdated":true,"lastUpdatedText":"Last Updated","contributors":true,"contributorsText":"Contributors","notFound":["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],"backToHome":"Take me home","openInNewWindow":"open in new window","toggleColorMode":"toggle color mode","toggleSidebar":"toggle sidebar"}`),Lg=be(xg),tu=()=>Lg,nu=Symbol(""),Og=()=>{const e=at(nu);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Ag=(e,t)=>{const{locales:n,...o}=e;return{...o,...n==null?void 0:n[t]}},Tg=zt({enhance({app:e}){const t=tu(),n=e._context.provides[Ei],o=B(()=>Ag(t.value,n.routeLocale.value));e.provide(nu,o),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return o.value}}})}}),Pg=Object.freeze(Object.defineProperty({__proto__:null,default:Tg},Symbol.toStringTag,{value:"Module"})),Rg=Ie({__name:"Badge",props:{type:{type:String,required:!1,default:"tip"},text:{type:String,required:!1,default:""},vertical:{type:String,required:!1,default:void 0}},setup(e){return(t,n)=>(z(),ae("span",{class:ut(["badge",e.type]),style:qt({verticalAlign:e.vertical})},[Fe(t.$slots,"default",{},()=>[Yt(Oe(e.text),1)])],6))}}),Ae=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ig=Ae(Rg,[["__file","Badge.vue"]]),$g=Ie({name:"CodeGroup",slots:Object,setup(e,{slots:t}){const n=be([]),o=be(-1),r=xi("vuepress-code-group",{}),s=B(()=>n.value.map(u=>u.innerText).join(","));tt(()=>{et(()=>r.value[s.value],(u=-1)=>{o.value!==u&&(o.value=u)},{immediate:!0}),et(o,u=>{r.value[s.value]!==u&&(r.value[s.value]=u)})});const i=(u=o.value)=>{u{u>0?o.value=u-1:o.value=n.value.length-1,n.value[o.value].focus()},c=(u,d)=>{u.key===" "||u.key==="Enter"?(u.preventDefault(),o.value=d):u.key==="ArrowRight"?(u.preventDefault(),i(d)):u.key==="ArrowLeft"&&(u.preventDefault(),l(d))};return()=>{var d;const u=(((d=t.default)==null?void 0:d.call(t))||[]).filter(f=>f.type.name==="CodeGroupItem").map(f=>(f.props===null&&(f.props={}),f));return u.length===0?null:(o.value<0||o.value>u.length-1?(o.value=u.findIndex(f=>f.props.active===""||f.props.active===!0),o.value===-1&&(o.value=0)):u.forEach((f,p)=>{f.props.active=p===o.value}),V("div",{class:"code-group"},[V("div",{class:"code-group__nav",role:"tablist"},u.map((f,p)=>{const m=p===o.value;return V("button",{ref:_=>{_&&(n.value[p]=_)},class:{"code-group__nav-tab":!0,"code-group__nav-tab-active":m},role:"tab",ariaSelected:m,onClick:()=>o.value=p,onKeydown:_=>c(_,p)},f.props.title)})),u]))}}}),jg=Ie({name:"CodeGroupItem",__name:"CodeGroupItem",props:{title:{type:String,required:!0},active:{type:Boolean,required:!1,default:!1}},setup(e){return(t,n)=>(z(),ae("div",{class:ut(["code-group-item",{"code-group-item__active":e.active}]),role:"tabpanel"},[Fe(t.$slots,"default")],2))}}),Mg=Ae(jg,[["__file","CodeGroupItem.vue"]]),Ng=()=>tu(),it=()=>Og(),ou=Symbol(""),es=()=>{const e=at(ou);if(!e)throw new Error("useDarkMode() is called without provider.");return e},Hg=()=>{const e=it(),t=Rm(),n=xi("vuepress-color-scheme",e.value.colorMode),o=B({get(){return e.value.colorModeSwitch?n.value==="auto"?t.value:n.value==="dark":e.value.colorMode==="dark"},set(r){r===t.value?n.value="auto":n.value=r?"dark":"light"}});vn(ou,o),Dg(o)},Dg=e=>{const t=(n=e.value)=>{const o=window==null?void 0:window.document.querySelector("html");o==null||o.classList.toggle("dark",n)};tt(()=>{et(e,t,{immediate:!0})}),Fn(()=>t())},Bg="http://.",Fg=()=>{const e=zn(),t=Ft();return n=>{if(n)if(Jm(n))t.path!==n&&e.push(n);else if(Pc(n))window&&window.open(n);else{const o=t.path.slice(0,t.path.lastIndexOf("/"));e.push(new URL(`${o}/${encodeURI(n)}`,Bg).pathname)}}};let js=null,So=null;const zg={wait:()=>js,pending:()=>{js=new Promise(e=>So=e)},resolve:()=>{So==null||So(),js=null,So=null}},ru=()=>zg,su=e=>{const{notFound:t,meta:n,path:o}=Mn(e);return t?{text:o,link:o}:{text:n.title||o,link:o}},wl=e=>decodeURI(e).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Ug=(e,t)=>{if(t.hash===e)return!0;const n=wl(t.path),o=wl(e);return n===o},iu=(e,t)=>e.link&&Ug(e.link,t)?!0:e.children?e.children.some(n=>iu(n,t)):!1,au=e=>!qr(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,Vg={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},Wg=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;const n=au(e);return n!==null?Vg[n]:null},qg=({docsRepo:e,docsBranch:t,docsDir:n,filePathRelative:o,editLinkPattern:r})=>{if(!o)return null;const s=Wg({docsRepo:e,editLinkPattern:r});return s?s.replace(/:repo/,qr(e)?e:`https://github.com/${e}`).replace(/:branch/,t).replace(/:path/,jc(`${$c(n)}/${o}`)):null},lu=Symbol("sidebarItems"),Oi=()=>{const e=at(lu);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},Kg=()=>{const e=it(),t=dt(),n=tn(),o=Ft(),r=B(()=>Gg(t.value,e.value,n.value,o.path));vn(lu,r)},Gg=(e,t,n,o)=>{const r=e.sidebar??t.sidebar??"auto",s=e.sidebarDepth??t.sidebarDepth??2;return e.home||r===!1?[]:r==="auto"?cu(n,s):Array.isArray(r)?uu(n,o,r,s):Kr(r)?Xg(n,o,r,s):[]},Yg=(e,t)=>({text:e.title,link:e.link,children:Ai(e.children,t)}),Ai=(e,t)=>t>0?e.map(n=>Yg(n,t-1)):[],cu=(e,t)=>[{text:e.title,children:Ai(e.headers,t)}],uu=(e,t,n,o)=>{const r=s=>{var l;let i;if(Ct(s)?i=su(s):i=s,i.children)return{...i,children:i.children.map(c=>r(c))};if(i.link===t){const c=((l=e.headers[0])==null?void 0:l.level)===1?e.headers[0].children:e.headers;return{...i,children:Ai(c,o)}}return i};return n.map(s=>r(s))},Xg=(e,t,n,o)=>{const r=Rc(n,t),s=n[r]??[];return s==="heading"?cu(e,o):uu(e,t,s,o)},Jg="719px",Qg={mobile:Jg};var Vo;(function(e){e.MOBILE="mobile"})(Vo||(Vo={}));const Zg={[Vo.MOBILE]:Number.parseInt(Qg.mobile.replace("px",""),10)},fu=(e,t)=>{const n=Zg[e];Number.isInteger(n)&&(pt("orientationchange",()=>t(n),!1),pt("resize",()=>t(n),!1),tt(()=>{t(n)}))},ev={},tv={class:"theme-default-content"};function nv(e,t){const n=uo("Content");return z(),ae("div",tv,[ge(n)])}const ov=Ae(ev,[["render",nv],["__file","HomeContent.vue"]]),rv={key:0,class:"features"},sv=Ie({__name:"HomeFeatures",setup(e){const t=dt(),n=B(()=>Array.isArray(t.value.features)?t.value.features:[]);return(o,r)=>n.value.length?(z(),ae("div",rv,[(z(!0),ae(Le,null,xt(n.value,s=>(z(),ae("div",{key:s.title,class:"feature"},[ie("h2",null,Oe(s.title),1),ie("p",null,Oe(s.details),1)]))),128))])):He("",!0)}}),du=Ae(sv,[["__file","HomeFeatures.vue"]]),iv=["innerHTML"],av=["textContent"],lv=Ie({__name:"HomeFooter",setup(e){const t=dt(),n=B(()=>t.value.footer),o=B(()=>t.value.footerHtml);return(r,s)=>n.value?(z(),ae(Le,{key:0},[o.value?(z(),ae("div",{key:0,class:"footer",innerHTML:n.value},null,8,iv)):(z(),ae("div",{key:1,class:"footer",textContent:Oe(n.value)},null,8,av))],64)):He("",!0)}}),cv=Ae(lv,[["__file","HomeFooter.vue"]]),uv={class:"hero"},fv={key:0,id:"main-title"},dv={key:1,class:"description"},pv={key:2,class:"actions"},hv=Ie({__name:"HomeHero",setup(e){const t=dt(),n=er(),o=es(),r=B(()=>o.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),s=B(()=>t.value.heroAlt||l.value||"hero"),i=B(()=>t.value.heroHeight||280),l=B(()=>t.value.heroText===null?null:t.value.heroText||n.value.title||"Hello"),c=B(()=>t.value.tagline===null?null:t.value.tagline||n.value.description||"Welcome to your VuePress site"),u=B(()=>Array.isArray(t.value.actions)?t.value.actions.map(({text:f,link:p,type:m="primary"})=>({text:f,link:p,type:m})):[]),d=()=>{if(!r.value)return null;const f=V("img",{src:Jr(r.value),alt:s.value,height:i.value});return t.value.heroImageDark===void 0?f:V(Xr,()=>f)};return(f,p)=>(z(),ae("header",uv,[ge(d),l.value?(z(),ae("h1",fv,Oe(l.value),1)):He("",!0),c.value?(z(),ae("p",dv,Oe(c.value),1)):He("",!0),u.value.length?(z(),ae("p",pv,[(z(!0),ae(Le,null,xt(u.value,m=>(z(),Ne(le(Gt),{key:m.text,class:ut(["action-button",[m.type]]),config:m},null,8,["class","config"]))),128))])):He("",!0)]))}}),mv=Ae(hv,[["__file","HomeHero.vue"]]),gv={class:"home"},vv=Ie({__name:"Home",setup(e){return(t,n)=>(z(),ae("main",gv,[ge(mv),ge(du),ge(ov),ge(cv)]))}}),_v=Ae(vv,[["__file","Home.vue"]]),bv=["aria-hidden"],yv=Ie({__name:"NavbarBrand",setup(e){const t=En(),n=er(),o=it(),r=es(),s=B(()=>o.value.home||t.value),i=B(()=>n.value.title),l=B(()=>r.value&&o.value.logoDark!==void 0?o.value.logoDark:o.value.logo),c=B(()=>o.value.logoAlt??i.value),u=B(()=>i.value.toLocaleUpperCase().trim()===c.value.toLocaleUpperCase().trim()),d=()=>{if(!l.value)return null;const f=V("img",{class:"logo",src:Jr(l.value),alt:c.value});return o.value.logoDark===void 0?f:V(Xr,()=>f)};return(f,p)=>(z(),Ne(le(Kt),{to:s.value},{default:$e(()=>[ge(d),i.value?(z(),ae("span",{key:0,class:ut(["site-name",{"can-hide":l.value}]),"aria-hidden":u.value},Oe(i.value),11,bv)):He("",!0)]),_:1},8,["to"]))}}),wv=Ae(yv,[["__file","NavbarBrand.vue"]]),Ev=Ie({__name:"DropdownTransition",setup(e){const t=o=>{o.style.height=o.scrollHeight+"px"},n=o=>{o.style.height=""};return(o,r)=>(z(),Ne(Zo,{name:"dropdown",onEnter:t,onAfterEnter:n,onBeforeLeave:t},{default:$e(()=>[Fe(o.$slots,"default")]),_:3}))}}),pu=Ae(Ev,[["__file","DropdownTransition.vue"]]),kv=["aria-label"],Cv={class:"title"},Sv=ie("span",{class:"arrow down"},null,-1),xv=["aria-label"],Lv={class:"title"},Ov={class:"navbar-dropdown"},Av={class:"navbar-dropdown-subtitle"},Tv={key:1},Pv={class:"navbar-dropdown-subitem-wrapper"},Rv=Ie({__name:"NavbarDropdown",props:{item:{type:Object,required:!0}},setup(e){const t=e,{item:n}=Gl(t),o=B(()=>n.value.ariaLabel||n.value.text),r=be(!1),s=Ft();et(()=>s.path,()=>{r.value=!1});const i=c=>{c.detail===0?r.value=!r.value:r.value=!1},l=(c,u)=>u[u.length-1]===c;return(c,u)=>(z(),ae("div",{class:ut(["navbar-dropdown-wrapper",{open:r.value}])},[ie("button",{class:"navbar-dropdown-title",type:"button","aria-label":o.value,onClick:i},[ie("span",Cv,Oe(le(n).text),1),Sv],8,kv),ie("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":o.value,onClick:u[0]||(u[0]=d=>r.value=!r.value)},[ie("span",Lv,Oe(le(n).text),1),ie("span",{class:ut(["arrow",r.value?"down":"right"])},null,2)],8,xv),ge(pu,null,{default:$e(()=>[Tr(ie("ul",Ov,[(z(!0),ae(Le,null,xt(le(n).children,d=>(z(),ae("li",{key:d.text,class:"navbar-dropdown-item"},[d.children?(z(),ae(Le,{key:0},[ie("h4",Av,[d.link?(z(),Ne(le(Gt),{key:0,config:d,onFocusout:f=>l(d,le(n).children)&&d.children.length===0&&(r.value=!1)},null,8,["config","onFocusout"])):(z(),ae("span",Tv,Oe(d.text),1))]),ie("ul",Pv,[(z(!0),ae(Le,null,xt(d.children,f=>(z(),ae("li",{key:f.link,class:"navbar-dropdown-subitem"},[ge(le(Gt),{config:f,onFocusout:p=>l(f,d.children)&&l(d,le(n).children)&&(r.value=!1)},null,8,["config","onFocusout"])]))),128))])],64)):(z(),Ne(le(Gt),{key:1,config:d,onFocusout:f=>l(d,le(n).children)&&(r.value=!1)},null,8,["config","onFocusout"]))]))),128))],512),[[Mr,r.value]])]),_:1})],2))}}),Iv=Ae(Rv,[["__file","NavbarDropdown.vue"]]),$v=["aria-label"],jv=Ie({__name:"NavbarItems",setup(e){const t=()=>{const f=Ft(),p=qm(),m=En(),_=ki(),C=er(),L=Ng(),k=it();return B(()=>{const O=Object.keys(_.value.locales);if(O.length<2)return[];const y=f.path,P=f.fullPath;return[{text:`${k.value.selectLanguageText}`,ariaLabel:`${k.value.selectLanguageAriaLabel??k.value.selectLanguageText}`,children:O.map(W=>{var R,G;const X=((R=_.value.locales)==null?void 0:R[W])??{},S=((G=L.value.locales)==null?void 0:G[W])??{},pe=`${X.lang}`,M=S.selectLanguageName??pe;if(pe===C.value.lang)return{text:M,activeMatch:/./,link:f.hash??"#"};const oe=y.replace(m.value,W);return{text:M,link:p.value.some(ve=>ve===oe)?P.replace(y,oe):S.home??W}})}]})},n=()=>{const f=it(),p=B(()=>f.value.repo),m=B(()=>p.value?au(p.value):null),_=B(()=>p.value&&!qr(p.value)?`https://github.com/${p.value}`:p.value),C=B(()=>_.value?f.value.repoLabel?f.value.repoLabel:m.value===null?"Source":m.value:null);return B(()=>!_.value||!C.value?[]:[{text:C.value,link:_.value}])},o=f=>Ct(f)?su(f):f.children?{...f,children:f.children.map(p=>o(p))}:f,r=()=>{const f=it();return B(()=>(f.value.navbar||[]).map(p=>o(p)))},s=be(!1),i=r(),l=t(),c=n(),u=B(()=>[...i.value,...l.value,...c.value]);fu(Vo.MOBILE,f=>{window.innerWidthit().value.navbarLabel??"site navigation");return(f,p)=>u.value.length?(z(),ae("nav",{key:0,class:"navbar-items","aria-label":d.value},[(z(!0),ae(Le,null,xt(u.value,m=>(z(),ae("div",{key:m.text,class:"navbar-item"},["children"in m?(z(),Ne(Iv,{key:0,item:m,class:ut(s.value?"mobile":"")},null,8,["item","class"])):(z(),Ne(le(Gt),{key:1,config:m},null,8,["config"]))]))),128))],8,$v)):He("",!0)}}),hu=Ae(jv,[["__file","NavbarItems.vue"]]),Mv=["title"],Nv={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Hv=xc('',9),Dv=[Hv],Bv={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Fv=ie("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),zv=[Fv],Uv=Ie({__name:"ToggleColorModeButton",setup(e){const t=it(),n=es(),o=()=>{n.value=!n.value};return(r,s)=>(z(),ae("button",{class:"toggle-color-mode-button",title:le(t).toggleColorMode,onClick:o},[Tr((z(),ae("svg",Nv,Dv,512)),[[Mr,!le(n)]]),Tr((z(),ae("svg",Bv,zv,512)),[[Mr,le(n)]])],8,Mv))}}),Vv=Ae(Uv,[["__file","ToggleColorModeButton.vue"]]),Wv=["title"],qv=ie("div",{class:"icon","aria-hidden":"true"},[ie("span"),ie("span"),ie("span")],-1),Kv=[qv],Gv=Ie({__name:"ToggleSidebarButton",emits:["toggle"],setup(e){const t=it();return(n,o)=>(z(),ae("div",{class:"toggle-sidebar-button",title:le(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:o[0]||(o[0]=r=>n.$emit("toggle"))},Kv,8,Wv))}}),Yv=Ae(Gv,[["__file","ToggleSidebarButton.vue"]]),Xv=Ie({__name:"Navbar",emits:["toggle-sidebar"],setup(e){const t=it(),n=be(null),o=be(null),r=be(0),s=B(()=>r.value?{maxWidth:r.value+"px"}:{}),i=(l,c)=>{var f,p,m;const u=(m=(p=(f=l==null?void 0:l.ownerDocument)==null?void 0:f.defaultView)==null?void 0:p.getComputedStyle(l,null))==null?void 0:m[c],d=Number.parseInt(u,10);return Number.isNaN(d)?0:d};return fu(Vo.MOBILE,l=>{var u;const c=i(n.value,"paddingLeft")+i(n.value,"paddingRight");window.innerWidth{const u=uo("NavbarSearch");return z(),ae("header",{ref_key:"navbar",ref:n,class:"navbar"},[ge(Yv,{onToggle:c[0]||(c[0]=d=>l.$emit("toggle-sidebar"))}),ie("span",{ref_key:"navbarBrand",ref:o},[ge(wv)],512),ie("div",{class:"navbar-items-wrapper",style:qt(s.value)},[Fe(l.$slots,"before"),ge(hu,{class:"can-hide"}),Fe(l.$slots,"after"),le(t).colorModeSwitch?(z(),Ne(Vv,{key:0})):He("",!0),ge(u)],4)],512)}}}),mu=Ae(Xv,[["__file","Navbar.vue"]]),Jv={class:"vp-page-meta"},Qv={key:0,class:"vp-meta-item edit-link"},Zv=ie("svg",{class:"icon",viewBox:"0 0 1024 1024"},[ie("g",{fill:"currentColor"},[ie("path",{d:"M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"}),ie("path",{d:"M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"})])],-1),e_={class:"vp-meta-item git-info"},t_={key:0,class:"vp-meta-item last-updated"},n_={class:"meta-item-label"},o_={class:"meta-item-info"},r_={key:1,class:"vp-meta-item contributors"},s_={class:"meta-item-label"},i_={class:"meta-item-info"},a_=["title"],l_=Ie({__name:"PageMeta",setup(e){const t=()=>{const c=it(),u=tn(),d=dt();return B(()=>{if(!(d.value.editLink??c.value.editLink??!0))return null;const{repo:p,docsRepo:m=p,docsBranch:_="main",docsDir:C="",editLinkText:L}=c.value;if(!m)return null;const k=qg({docsRepo:m,docsBranch:_,docsDir:C,filePathRelative:u.value.filePathRelative,editLinkPattern:d.value.editLinkPattern??c.value.editLinkPattern});return k?{text:L??"Edit this page",link:k}:null})},n=()=>{const c=it(),u=tn(),d=dt();return B(()=>{var m,_;return!(d.value.lastUpdated??c.value.lastUpdated??!0)||!((m=u.value.git)!=null&&m.updatedTime)?null:new Date((_=u.value.git)==null?void 0:_.updatedTime).toLocaleString()})},o=()=>{const c=it(),u=tn(),d=dt();return B(()=>{var p;return d.value.contributors??c.value.contributors??!0?((p=u.value.git)==null?void 0:p.contributors)??null:null})},r=it(),s=t(),i=n(),l=o();return(c,u)=>{const d=uo("ClientOnly");return z(),ae("footer",Jv,[le(s)?(z(),ae("div",Qv,[ge(le(Gt),{class:"label",config:le(s)},{before:$e(()=>[Zv]),_:1},8,["config"])])):He("",!0),ie("div",e_,[le(i)?(z(),ae("div",t_,[ie("span",n_,Oe(le(r).lastUpdatedText)+": ",1),ge(d,null,{default:$e(()=>[ie("span",o_,Oe(le(i)),1)]),_:1})])):He("",!0),le(l)&&le(l).length?(z(),ae("div",r_,[ie("span",s_,Oe(le(r).contributorsText)+": ",1),ie("span",i_,[(z(!0),ae(Le,null,xt(le(l),(f,p)=>(z(),ae(Le,{key:p},[ie("span",{class:"contributor",title:`email: ${f.email}`},Oe(f.name),9,a_),p!==le(l).length-1?(z(),ae(Le,{key:0},[Yt(", ")],64)):He("",!0)],64))),128))])])):He("",!0)])])}}}),c_=Ae(l_,[["__file","PageMeta.vue"]]),u_=["aria-label"],f_={class:"hint"},d_=ie("span",{class:"arrow left"},null,-1),p_={class:"link"},h_={class:"hint"},m_=ie("span",{class:"arrow right"},null,-1),g_={class:"link"},v_=Ie({__name:"PageNav",setup(e){const t=(f,p)=>{if(f===!1)return null;if(Ct(f)){const{notFound:m,meta:_,path:C}=Mn(f,p);return m?{text:C,link:C}:{text:_.title||C,link:C}}return Kr(f)?{...f,link:Mn(f.link,p).path}:!1},n=(f,p,m)=>{const _=f.findIndex(C=>C.link===p);if(_!==-1){const C=f[_+m];return C!=null&&C.link?C:null}for(const C of f)if(C.children){const L=n(C.children,p,m);if(L)return L}return null},o=dt(),r=Oi(),s=it(),i=Ft(),l=Fg(),c=B(()=>{const f=t(o.value.prev,i.path);return f!==!1?f:n(r.value,i.path,-1)}),u=B(()=>{const f=t(o.value.next,i.path);return f!==!1?f:n(r.value,i.path,1)}),d=B(()=>it().value.pageNavbarLabel??"page navigation");return pt("keydown",f=>{f.altKey&&(f.key==="ArrowRight"?u.value&&(l(u.value.link),f.preventDefault()):f.key==="ArrowLeft"&&c.value&&(l(c.value.link),f.preventDefault()))}),(f,p)=>c.value||u.value?(z(),ae("nav",{key:0,class:"vp-page-nav","aria-label":d.value},[c.value?(z(),Ne(le(Gt),{key:0,class:"prev",config:c.value},{default:$e(()=>[ie("div",f_,[d_,Yt(" "+Oe(le(s).prev??"Prev"),1)]),ie("div",p_,[ie("span",null,Oe(c.value.text),1)])]),_:1},8,["config"])):He("",!0),u.value?(z(),Ne(le(Gt),{key:1,class:"next",config:u.value},{default:$e(()=>[ie("div",h_,[Yt(Oe(le(s).next??"Next")+" ",1),m_]),ie("div",g_,[ie("span",null,Oe(u.value.text),1)])]),_:1},8,["config"])):He("",!0)],8,u_)):He("",!0)}}),__=Ae(v_,[["__file","PageNav.vue"]]),b_={class:"page"},y_={class:"theme-default-content"},w_=Ie({__name:"Page",setup(e){return(t,n)=>{const o=uo("Content");return z(),ae("main",b_,[Fe(t.$slots,"top"),ie("div",y_,[Fe(t.$slots,"content-top"),ge(o),Fe(t.$slots,"content-bottom")]),ge(c_),ge(__),Fe(t.$slots,"bottom")])}}}),E_=Ae(w_,[["__file","Page.vue"]]),k_={class:"sidebar-item-children"},C_=Ie({__name:"SidebarItem",props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(e){const t=e,{item:n,depth:o}=Gl(t),r=Ft(),s=zn(),i=B(()=>iu(n.value,r)),l=B(()=>({"sidebar-item":!0,"sidebar-heading":o.value===0,active:i.value,collapsible:n.value.collapsible})),c=B(()=>n.value.collapsible?i.value:!0),[u,d]=km(c.value),f=m=>{n.value.collapsible&&(m.preventDefault(),d())},p=s.afterEach(m=>{Bn(()=>{u.value=c.value})});return gi(()=>{p()}),(m,_)=>{var L;const C=uo("SidebarItem",!0);return z(),ae("li",null,[le(n).link?(z(),Ne(le(Gt),{key:0,class:ut(l.value),config:le(n)},null,8,["class","config"])):(z(),ae("p",{key:1,tabindex:"0",class:ut(l.value),onClick:f,onKeydown:$p(f,["enter"])},[Yt(Oe(le(n).text)+" ",1),le(n).collapsible?(z(),ae("span",{key:0,class:ut(["arrow",le(u)?"down":"right"])},null,2)):He("",!0)],34)),(L=le(n).children)!=null&&L.length?(z(),Ne(pu,{key:2},{default:$e(()=>[Tr(ie("ul",k_,[(z(!0),ae(Le,null,xt(le(n).children,k=>(z(),Ne(C,{key:`${le(o)}${k.text}${k.link}`,item:k,depth:le(o)+1},null,8,["item","depth"]))),128))],512),[[Mr,le(u)]])]),_:1})):He("",!0)])}}}),S_=Ae(C_,[["__file","SidebarItem.vue"]]),x_={key:0,class:"sidebar-items"},L_=Ie({__name:"SidebarItems",setup(e){const t=Ft(),n=Oi();return tt(()=>{et(()=>t.hash,o=>{const r=document.querySelector(".sidebar");if(!r)return;const s=document.querySelector(`.sidebar a.sidebar-item[href="${t.path}${o}"]`);if(!s)return;const{top:i,height:l}=r.getBoundingClientRect(),{top:c,height:u}=s.getBoundingClientRect();ci+l&&s.scrollIntoView(!1)})}),(o,r)=>le(n).length?(z(),ae("ul",x_,[(z(!0),ae(Le,null,xt(le(n),s=>(z(),Ne(S_,{key:`${s.text}${s.link}`,item:s},null,8,["item"]))),128))])):He("",!0)}}),O_=Ae(L_,[["__file","SidebarItems.vue"]]),A_={class:"sidebar"},T_=Ie({__name:"Sidebar",setup(e){return(t,n)=>(z(),ae("aside",A_,[ge(hu),Fe(t.$slots,"top"),ge(O_),Fe(t.$slots,"bottom")]))}}),gu=Ae(T_,[["__file","Sidebar.vue"]]),P_=Ie({__name:"Layout",setup(e){const t=tn(),n=dt(),o=it(),r=B(()=>n.value.navbar!==!1&&o.value.navbar!==!1),s=Oi(),i=be(!1),l=k=>{i.value=typeof k=="boolean"?k:!i.value},c={x:0,y:0},u=k=>{c.x=k.changedTouches[0].clientX,c.y=k.changedTouches[0].clientY},d=k=>{const O=k.changedTouches[0].clientX-c.x,y=k.changedTouches[0].clientY-c.y;Math.abs(O)>Math.abs(y)&&Math.abs(O)>40&&(O>0&&c.x<=80?l(!0):l(!1))},f=B(()=>n.value.externalLinkIcon??o.value.externalLinkIcon??!0),p=B(()=>[{"no-navbar":!r.value,"no-sidebar":!s.value.length,"sidebar-open":i.value,"external-link-icon":f.value},n.value.pageClass]);let m;tt(()=>{m=zn().afterEach(()=>{l(!1)})}),Fn(()=>{m()});const _=ru(),C=_.resolve,L=_.pending;return(k,O)=>(z(),ae("div",{class:ut(["theme-container",p.value]),onTouchstart:u,onTouchend:d},[Fe(k.$slots,"navbar",{},()=>[r.value?(z(),Ne(mu,{key:0,onToggleSidebar:l},{before:$e(()=>[Fe(k.$slots,"navbar-before")]),after:$e(()=>[Fe(k.$slots,"navbar-after")]),_:3})):He("",!0)]),ie("div",{class:"sidebar-mask",onClick:O[0]||(O[0]=y=>l(!1))}),Fe(k.$slots,"sidebar",{},()=>[ge(gu,null,{top:$e(()=>[Fe(k.$slots,"sidebar-top")]),bottom:$e(()=>[Fe(k.$slots,"sidebar-bottom")]),_:3})]),Fe(k.$slots,"page",{},()=>[le(n).home?(z(),Ne(_v,{key:0})):(z(),Ne(Zo,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:le(C),onBeforeLeave:le(L)},{default:$e(()=>[(z(),Ne(E_,{key:le(t).path},{top:$e(()=>[Fe(k.$slots,"page-top")]),"content-top":$e(()=>[Fe(k.$slots,"page-content-top")]),"content-bottom":$e(()=>[Fe(k.$slots,"page-content-bottom")]),bottom:$e(()=>[Fe(k.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}}),po=Ae(P_,[["__file","Layout.vue"]]),R_={class:"theme-container"},I_={class:"page"},$_={class:"theme-default-content"},j_=ie("h1",null,"404",-1),M_=Ie({__name:"NotFound",setup(e){const t=En(),n=it(),o=n.value.notFound??["Not Found"],r=()=>o[Math.floor(Math.random()*o.length)],s=n.value.home??t.value,i=n.value.backToHome??"Back to home";return(l,c)=>(z(),ae("div",R_,[ie("main",I_,[ie("div",$_,[j_,ie("blockquote",null,Oe(r()),1),ge(le(Kt),{to:le(s)},{default:$e(()=>[Yt(Oe(le(i)),1)]),_:1},8,["to"])])])]))}}),N_=Ae(M_,[["__file","NotFound.vue"]]),H_=zt({enhance({app:e,router:t}){Cr("Badge")||e.component("Badge",Ig),Cr("CodeGroup")||e.component("CodeGroup",$g),Cr("CodeGroupItem")||e.component("CodeGroupItem",Mg),e.component("NavbarSearch",()=>{const o=e.component("Docsearch")||e.component("SearchBox");return o?V(o):null});const n=t.options.scrollBehavior;t.options.scrollBehavior=async(...o)=>(await ru().wait(),n(...o))},setup(){Hg(),Kg()},layouts:{Layout:po,NotFound:N_}}),D_=Object.freeze(Object.defineProperty({__proto__:null,default:H_},Symbol.toStringTag,{value:"Module"})),B_=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),ho=({name:e="",color:t="currentColor",ariaLabel:n},{attrs:o,slots:r})=>{var s;return V("svg",{xmlns:"http://www.w3.org/2000/svg",class:["icon",`${e}-icon`],viewBox:"0 0 1024 1024",fill:t,"aria-label":n??`${e} icon`,...o},(s=r.default)==null?void 0:s.call(r))};ho.displayName="IconBase";function F_(){const e=be(!1),t=Xo();return t&&tt(()=>{e.value=!0},t),e}function z_(e){return F_(),B(()=>!!e())}const U_=()=>z_(()=>typeof window<"u"&&window.navigator&&"userAgent"in window.navigator),V_=()=>{const e=U_();return B(()=>e.value&&/\b(?:Android|iPhone)/i.test(navigator.userAgent))},W_=e=>[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i].some(t=>t.test(e)),q_=e=>[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i].some(t=>t.test(e)),K_=e=>[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i].some(t=>t.test(e)),G_=()=>V(ho,{name:"heading"},()=>V("path",{d:"M250.4 704.6H64V595.4h202.4l26.2-166.6H94V319.6h214.4L352 64h127.8l-43.6 255.4h211.2L691 64h126.2l-43.6 255.4H960v109.2H756.2l-24.6 166.6H930v109.2H717L672 960H545.8l43.6-255.4H376.6L333 960H206.8l43.6-255.4zm168.4-276L394 595.4h211.2l24.6-166.6h-211z"}));G_.displayName="HeadingIcon";const Y_=()=>V(ho,{name:"heart"},()=>V("path",{d:"M1024 358.156C1024 195.698 892.3 64 729.844 64c-86.362 0-164.03 37.218-217.844 96.49C458.186 101.218 380.518 64 294.156 64 131.698 64 0 195.698 0 358.156 0 444.518 37.218 522.186 96.49 576H96l320 320c32 32 64 64 96 64s64-32 96-64l320-320h-.49c59.272-53.814 96.49-131.482 96.49-217.844zM841.468 481.232 517.49 805.49a2981.962 2981.962 0 0 1-5.49 5.48c-1.96-1.95-3.814-3.802-5.49-5.48L182.532 481.234C147.366 449.306 128 405.596 128 358.156 128 266.538 202.538 192 294.156 192c47.44 0 91.15 19.366 123.076 54.532L512 350.912l94.768-104.378C638.696 211.366 682.404 192 729.844 192 821.462 192 896 266.538 896 358.156c0 47.44-19.368 91.15-54.532 123.076z"}));Y_.displayName="HeartIcon";const X_=()=>V(ho,{name:"history"},()=>V("path",{d:"M512 1024a512 512 0 1 1 512-512 512 512 0 0 1-512 512zm0-896a384 384 0 1 0 384 384 384 384 0 0 0-384-384zm192 448H512a64 64 0 0 1-64-64V320a64 64 0 0 1 128 0v128h128a64 64 0 0 1 0 128z"}));X_.displayName="HistoryIcon";const J_=()=>V(ho,{name:"title"},()=>V("path",{d:"M512 256c70.656 0 134.656 28.672 180.992 75.008A254.933 254.933 0 0 1 768 512c0 83.968-41.024 157.888-103.488 204.48C688.96 748.736 704 788.48 704 832c0 105.984-86.016 192-192 192-106.048 0-192-86.016-192-192h128a64 64 0 1 0 128 0 64 64 0 0 0-64-64 255.19 255.19 0 0 1-181.056-75.008A255.403 255.403 0 0 1 256 512c0-83.968 41.024-157.824 103.488-204.544C335.04 275.264 320 235.584 320 192A192 192 0 0 1 512 0c105.984 0 192 85.952 192 192H576a64.021 64.021 0 0 0-128 0c0 35.328 28.672 64 64 64zM384 512c0 70.656 57.344 128 128 128s128-57.344 128-128-57.344-128-128-128-128 57.344-128 128z"}));J_.displayName="TitleIcon";const Ti=()=>V(ho,{name:"search"},()=>V("path",{d:"M192 480a256 256 0 1 1 512 0 256 256 0 0 1-512 0m631.776 362.496-143.2-143.168A318.464 318.464 0 0 0 768 480c0-176.736-143.264-320-320-320S128 303.264 128 480s143.264 320 320 320a318.016 318.016 0 0 0 184.16-58.592l146.336 146.368c12.512 12.48 32.768 12.48 45.28 0 12.48-12.512 12.48-32.768 0-45.28"}));Ti.displayName="SearchIcon";const vu=()=>V("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",preserveAspectRatio:"xMidYMid",viewBox:"0 0 100 100"},[V("circle",{cx:"28",cy:"75",r:"11",fill:"currentColor"},V("animate",{attributeName:"fill-opacity",begin:"0s",dur:"1s",keyTimes:"0;0.2;1",repeatCount:"indefinite",values:"0;1;1"})),V("path",{fill:"none",stroke:"#88baf0","stroke-width":"10",d:"M28 47a28 28 0 0 1 28 28"},V("animate",{attributeName:"stroke-opacity",begin:"0.1s",dur:"1s",keyTimes:"0;0.2;1",repeatCount:"indefinite",values:"0;1;1"})),V("path",{fill:"none",stroke:"#88baf0","stroke-width":"10",d:"M28 25a50 50 0 0 1 50 50"},V("animate",{attributeName:"stroke-opacity",begin:"0.2s",dur:"1s",keyTimes:"0;0.2;1",repeatCount:"indefinite",values:"0;1;1"}))]);vu.displayName="LoadingIcon";const _u=({hint:e})=>V("div",{class:"search-pro-result-wrapper loading"},[V(vu),e]);_u.displayName="SearchLoading";const Q_='';var Z_={},eb={"/":{cancel:"Cancel",placeholder:"Search",search:"Search",searching:"Searching",defaultTitle:"Documentation",select:"to select",navigate:"to navigate",autocomplete:"to autocomplete",exit:"to exit",queryHistory:"Search History",resultHistory:"Result History",emptyHistory:"Empty Search History",emptyResult:"No results found",loading:"Loading search indexes..."}},tb={searchDelay:150,suggestDelay:0,queryHistoryCount:5,resultHistoryCount:5,hotKeys:[{key:"k",ctrl:!0},{key:"/",ctrl:!0}],worker:"search-pro.worker.js"};const Hr=tb,Ky=Z_,bu=Hr.hotKeys,Pi=eb,Ms="Canceled because of new search request.",nb=()=>{const e=new Worker(`/awesome-comfyui-workflow/${Hr.worker}`,{}),t={suggest:null,search:null,all:null};return e.addEventListener("message",({data:n})=>{const[o,r,s]=n,i=t[o];(i==null?void 0:i.id)===r&&i.resolve(s)}),e.addEventListener("error",n=>{console.error("Search Worker error:",n)}),{suggest:(n,o,r)=>new Promise((s,i)=>{var c;(c=t.suggest)==null||c.reject(new Error(Ms));const l=Date.now();e.postMessage({type:"suggest",id:l,query:n,locale:o,options:r}),t.suggest={id:l,resolve:s,reject:i}}),search:(n,o,r)=>new Promise((s,i)=>{var c;(c=t.search)==null||c.reject(new Error(Ms));const l=Date.now();e.postMessage({type:"search",id:l,query:n,locale:o,options:r}),t.search={id:l,resolve:s,reject:i}}),all:(n,o,r)=>new Promise((s,i)=>{var c;(c=t.all)==null||c.reject(new Error(Ms));const l=Date.now();e.postMessage({type:"all",id:l,query:n,locale:o,options:r}),t.all={id:l,resolve:s,reject:i}}),terminate:()=>{e.terminate(),Xm(t).forEach(n=>{n==null||n.reject(new Error("Worker has been terminated."))})}}};let ob={};const yu=Symbol(""),wu=()=>{const e=En(),{locales:t={},...n}=at(yu);return B(()=>({...n,...t[e.value]}))},rb=e=>{e.provide(yu,ob)},sb=(e,t=!1)=>{const n=be(0),o=B(()=>e.value[n.value]),r=()=>{n.value=n.value>0?n.value-1:e.value.length-1},s=()=>{n.value=n.value{t||(n.value=0)}),{index:n,item:o,prev:r,next:s}},ib=e=>e instanceof Element?document.activeElement===e&&(["TEXTAREA","SELECT","INPUT"].includes(e.tagName)||e.hasAttribute("contenteditable")):!1,ab=e=>bu.some(t=>{const{key:n,ctrl:o=!1,shift:r=!1,alt:s=!1,meta:i=!1}=t;return n===e.key&&o===e.ctrlKey&&r===e.shiftKey&&s===e.altKey&&i===e.metaKey}),lb='',cb='',ub='',fb='',Ri=Symbol(""),db=()=>{const e=be(!1);vn(Ri,e)},pb=e=>{const t=be([]);{const n=wu(),o=tn(),r=En();tt(()=>{const{suggest:s,terminate:i}=nb(),l=c=>{const u=c.join(" "),{searchFilter:d,splitWord:f,suggestionsFilter:p=_=>_,...m}=n.value;u?s(u,r.value,m).then(_=>p(_,u,r.value,o.value)).then(_=>{t.value=_.length?Nr(_[0],u)&&!_[0].slice(u.length).includes(" ")?_:[u,..._]:[]}).catch(_=>{console.warn(_)}):t.value=[]};et([e,r],([c])=>l(c),{immediate:!0}),Fn(()=>{i()})})}return{suggestions:t}},Ns=bu[0];var hb=Ie({name:"SearchBox",setup(){const e=fo(Pi),t=at(Ri),n=be(!1),o=B(()=>Ns?[(n.value?["⌃","⇧","⌥","⌘"]:["Ctrl","Shift","Alt","Win"]).filter((r,s)=>Ns[["ctrl","shift","alt","meta"][s]]),Ns.key.toUpperCase()]:null);return pt("keydown",r=>{!t.value&&ab(r)&&!ib(r.target)&&(r.preventDefault(),t.value=!0)}),tt(()=>{const{userAgent:r}=navigator;n.value=K_(r)||q_(r)||W_(r)}),()=>[V("button",{type:"button",class:"search-pro-button","aria-label":e.value.search,onClick:()=>{t.value=!0}},[V(Ti),V("div",{class:"search-pro-placeholder"},e.value.search),o.value?V("div",{class:"search-pro-key-hints"},o.value.map(r=>V("kbd",{class:"search-pro-key"},r))):null])]}});const mb=lc({loader:()=>Ke(()=>import("./SearchResult-BwEG9_q-.js"),[]),loadingComponent:()=>{const e=fo(Pi);return V(_u,{hint:e.value.loading})}});var gb=Ie({name:"SearchModal",setup(){const e=at(Ri),t=er(),n=V_(),o=fo(Pi),r=wu(),s=be(""),i=be([]),{suggestions:l}=pb(i),c=be(!1),{index:u,prev:d,next:f}=sb(l),p=Dt(),m=Dt(),_=(L=u.value)=>{s.value=l.value[L],c.value=!1};pt("keydown",L=>{c.value?L.key==="ArrowUp"?d():L.key==="ArrowDown"?f():L.key==="Enter"?_():L.key==="Escape"&&(c.value=!1):L.key==="Escape"&&(e.value=!1)});const C=Xc(()=>{var L,k;(((k=(L=r.value).splitWord)==null?void 0:k.call(L,s.value))??Promise.resolve(s.value.split(" "))).then(O=>{i.value=O})},Math.min(Hr.searchDelay,Hr.suggestDelay));return et(s,C,{immediate:!0}),tt(()=>{const L=Mm(document.body);et(e,async k=>{var O;L.value=k,k&&(await Bn(),(O=p.value)==null||O.focus())}),Cm(m,()=>{c.value=!1}),Fn(()=>{L.value=!1})}),()=>e.value?V("div",{class:"search-pro-modal-wrapper"},[V("div",{class:"search-pro-mask",onClick:()=>{e.value=!1,s.value=""}}),V("div",{class:"search-pro-modal"},[V("div",{class:"search-pro-box"},[V("form",[V("label",{for:"search-pro","aria-label":o.value.search},V(Ti)),V("input",{ref:p,type:"search",class:"search-pro-input",id:"search-pro",placeholder:o.value.placeholder,spellcheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off",name:`${t.value.title}-search`,value:s.value,"aria-controls":"search-pro-results",onKeydown:L=>{const{key:k}=L;l.value.length&&(k==="Tab"?(_(),L.preventDefault()):(k==="ArrowDown"||k==="ArrowUp"||k==="Escape")&&L.preventDefault())},onInput:({target:L})=>{s.value=L.value,c.value=!0,u.value=0}}),s.value?V("button",{type:"reset",class:"search-pro-clear-button",innerHTML:Q_,onClick:()=>{s.value=""}}):null,c.value&&l.value.length?V("ul",{class:"search-pro-suggestions",ref:m},l.value.map((L,k)=>V("li",{class:["search-pro-suggestion",{active:k===u.value}],onClick:()=>{_(k)}},[V("kbd",{class:"search-pro-auto-complete",title:`Tab ${o.value.autocomplete}`},"Tab"),L]))):null]),V("button",{type:"button",class:"search-pro-close-button",onClick:()=>{e.value=!1,s.value=""}},o.value.cancel)]),V(mb,{queries:i.value,isFocusing:!c.value,onClose:()=>{e.value=!1},onUpdateQuery:L=>{s.value=L}}),n.value?null:V("div",{class:"search-pro-hints"},[V("span",{class:"search-pro-hint"},[V("kbd",{innerHTML:lb}),o.value.select]),V("span",{class:"search-pro-hint"},[V("kbd",{innerHTML:ub}),V("kbd",{innerHTML:cb}),o.value.navigate]),V("span",{class:"search-pro-hint"},[V("kbd",{innerHTML:fb}),o.value.exit])])])]):null}}),vb=zt({enhance({app:e}){rb(e),e.component("SearchBox",hb)},setup(){db()},rootComponents:[gb]});const _b=Object.freeze(Object.defineProperty({__proto__:null,default:vb},Symbol.toStringTag,{value:"Module"})),bb=zt({enhance:({app:e})=>{},setup:()=>{}}),yb=Object.freeze(Object.defineProperty({__proto__:null,default:bb},Symbol.toStringTag,{value:"Module"}));let Eu=e=>Ct(e.title)?{title:e.title}:null;const ku=Symbol(""),wb=e=>{Eu=e},Eb=()=>at(ku),kb=e=>{e.provide(ku,Eu)};var Cb={"/":{empty:"No catalog"}};const Sb=Ie({name:"Catalog",props:{base:{type:String,default:""},level:{type:Number,default:3},index:Boolean,hideHeading:Boolean},setup(e){const t=Eb(),n=fo(Cb),o=tn(),r=qc(),s=ki(),l=Dt(Gm(r.value).map(([u,{meta:d}])=>{const f=t(d);if(!f)return null;const p=u.split("/").length;return{level:Km(u,"/")?p-2:p-1,base:u.replace(/\/[^/]+\/?$/,"/"),path:u,...f}}).filter(u=>Kr(u)&&Ct(u.title))),c=B(()=>{const u=e.base?Kp(Gp(e.base)):o.value.path.replace(/\/[^/]+$/,"/"),d=u.split("/").length-2,f=[];return l.value.filter(({level:p,path:m})=>{if(!Nr(m,u)||m===u)return!1;if(u==="/"){const _=Ym(s.value.locales).filter(C=>C!=="/");if(m==="/404.html"||_.some(C=>Nr(m,C)))return!1}return p-d<=e.level}).sort(({title:p,level:m,order:_},{title:C,level:L,order:k})=>{const O=m-L;return O||(Is(_)?Is(k)?_>0?k>0?_-k:-1:k<0?_-k:1:_:Is(k)?k:p.localeCompare(C))}).forEach(p=>{var C;const{base:m,level:_}=p;switch(_-d){case 1:{f.push(p);break}case 2:{const L=f.find(k=>k.path===m);L&&(L.children??(L.children=[])).push(p);break}default:{const L=f.find(k=>k.path===m.replace(/\/[^/]+\/$/,"/"));if(L){const k=(C=L.children)==null?void 0:C.find(O=>O.path===m);k&&(k.children??(k.children=[])).push(p)}}}}),f});return()=>{const u=c.value.some(d=>d.children);return V("div",{class:["vp-catalog-wrapper",{index:e.index}]},[e.hideHeading?null:V("h2",{class:"vp-catalog-main-title"},n.value.title),c.value.length?V(e.index?"ol":"ul",{class:["vp-catalogs",{deep:u}]},c.value.map(({children:d=[],title:f,path:p,content:m})=>{const _=V(Kt,{class:"vp-catalog-title",to:p},()=>m?V(m):f);return V("li",{class:"vp-catalog"},u?[V("h3",{id:f,class:["vp-catalog-child-title",{"has-children":d.length}]},[V("a",{href:`#${f}`,class:"vp-catalog-header-anchor","aria-hidden":!0},"#"),_]),d.length?V(e.index?"ol":"ul",{class:"vp-child-catalogs"},d.map(({children:C=[],content:L,path:k,title:O})=>V("li",{class:"vp-child-catalog"},[V("div",{class:["vp-catalog-sub-title",{"has-children":C.length}]},[V("a",{href:`#${O}`,class:"vp-catalog-header-anchor"},"#"),V(Kt,{class:"vp-catalog-title",to:k},()=>L?V(L):O)]),C.length?V(e.index?"ol":"div",{class:e.index?"vp-sub-catalogs":"vp-sub-catalogs-wrapper"},C.map(({content:y,path:P,title:Y})=>e.index?V("li",{class:"vp-sub-catalog"},V(Kt,{to:P},()=>y?V(y):Y)):V(Kt,{class:"vp-sub-catalog-link",to:P},()=>y?V(y):Y))):null]))):null]:V("div",{class:"vp-catalog-child-title"},_))})):V("p",{class:"vp-empty-catalog"},n.value.empty)])}}}),xb=zt({enhance:({app:e})=>{kb(e),Cr("Catalog",e)||e.component("Catalog",Sb)}}),Lb=Object.freeze(Object.defineProperty({__proto__:null,default:xb},Symbol.toStringTag,{value:"Module"}));var Ob=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ab(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cu={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(typeof self<"u"?self:Ob,function(){return function(n){var o={};function r(s){if(o[s])return o[s].exports;var i=o[s]={i:s,l:!1,exports:{}};return n[s].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=n,r.c=o,r.d=function(s,i,l){r.o(s,i)||Object.defineProperty(s,i,{enumerable:!0,get:l})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,i){if(1&i&&(s=r(s)),8&i||4&i&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}),2&i&&typeof s!="string")for(var c in s)r.d(l,c,(function(u){return s[u]}).bind(null,c));return l},r.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(i,"a",i),i},r.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},r.p="",r(r.s=1)}([function(n,o,r){(function(s){function i(w,T){const H=Object.create(null),se=w.split(",");for(let ne=0;ne!!H[ne.toLowerCase()]:ne=>!!H[ne]}r.d(o,"a",function(){return P}),r.d(o,"b",function(){return y}),r.d(o,"c",function(){return W}),r.d(o,"d",function(){return Y}),r.d(o,"e",function(){return ue}),r.d(o,"f",function(){return g}),r.d(o,"g",function(){return I}),r.d(o,"h",function(){return M}),r.d(o,"i",function(){return K}),r.d(o,"j",function(){return x}),r.d(o,"k",function(){return G}),r.d(o,"l",function(){return Te}),r.d(o,"m",function(){return N}),r.d(o,"n",function(){return ve}),r.d(o,"o",function(){return re}),r.d(o,"p",function(){return l}),r.d(o,"q",function(){return C}),r.d(o,"r",function(){return Je}),r.d(o,"s",function(){return ye}),r.d(o,"t",function(){return pe}),r.d(o,"u",function(){return ze}),r.d(o,"v",function(){return S}),r.d(o,"w",function(){return Xe}),r.d(o,"x",function(){return $}),r.d(o,"y",function(){return L}),r.d(o,"z",function(){return U}),r.d(o,"A",function(){return u}),r.d(o,"B",function(){return Be}),r.d(o,"C",function(){return Ye}),r.d(o,"D",function(){return k}),r.d(o,"E",function(){return O}),r.d(o,"F",function(){return i}),r.d(o,"G",function(){return _}),r.d(o,"H",function(){return d}),r.d(o,"I",function(){return oe}),r.d(o,"J",function(){return v}),r.d(o,"K",function(){return q}),r.d(o,"L",function(){return vt});const l=i("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),c="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",u=i(c);function d(w){if(ve(w)){const T={};for(let H=0;H{if(H){const se=H.split(p);se.length>1&&(T[se[0].trim()]=se[1].trim())}}),T}function _(w){let T="";if(Be(w))T=w;else if(ve(w))for(let H=0;Hk(H,T))}const y={},P=[],Y=()=>{},W=()=>!1,X=/^on[^a-z]/,S=w=>X.test(w),pe=w=>w.startsWith("onUpdate:"),M=Object.assign,oe=(w,T)=>{const H=w.indexOf(T);H>-1&&w.splice(H,1)},R=Object.prototype.hasOwnProperty,G=(w,T)=>R.call(w,T),ve=Array.isArray,ye=w=>ft(w)==="[object Map]",U=w=>ft(w)==="[object Set]",he=w=>w instanceof Date,re=w=>typeof w=="function",Be=w=>typeof w=="string",Ye=w=>typeof w=="symbol",ze=w=>w!==null&&typeof w=="object",Xe=w=>ze(w)&&re(w.then)&&re(w.catch),gt=Object.prototype.toString,ft=w=>gt.call(w),vt=w=>ft(w).slice(8,-1),Je=w=>Be(w)&&w!=="NaN"&&w[0]!=="-"&&""+parseInt(w,10)===w,$=i(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ee=w=>{const T=Object.create(null);return H=>T[H]||(T[H]=w(H))},Q=/-(\w)/g,ue=ee(w=>w.replace(Q,(T,H)=>H?H.toUpperCase():"")),ke=/\B([A-Z])/g,Te=ee(w=>w.replace(ke,"-$1").toLowerCase()),g=ee(w=>w.charAt(0).toUpperCase()+w.slice(1)),v=ee(w=>w?"on"+g(w):""),x=(w,T)=>w!==T&&(w==w||T==T),N=(w,T)=>{for(let H=0;H{Object.defineProperty(w,T,{configurable:!0,enumerable:!1,value:H})},q=w=>{const T=parseFloat(w);return isNaN(T)?w:T};let te;const K=()=>te||(te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:s!==void 0?s:{})}).call(this,r(2))},function(n,o,r){n.exports=r(3)},function(n,o){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}n.exports=r},function(n,o,r){r.r(o),r.d(o,"ShareNetwork",function(){return hs});var s=r(0);const i=new WeakMap,l=[];let c;const u=Symbol(""),d=Symbol("");function f(a,h=s.b){(function(E){return E&&E._isEffect===!0})(a)&&(a=a.raw);const b=function(E,A){const j=function(){if(!j.active)return A.scheduler?void 0:E();if(!l.includes(j)){_(j);try{return L.push(C),C=!0,l.push(j),c=j,E()}finally{l.pop(),O(),c=l[l.length-1]}}};return j.id=m++,j.allowRecurse=!!A.allowRecurse,j._isEffect=!0,j.active=!0,j.raw=E,j.deps=[],j.options=A,j}(a,h);return h.lazy||b(),b}function p(a){a.active&&(_(a),a.options.onStop&&a.options.onStop(),a.active=!1)}let m=0;function _(a){const{deps:h}=a;if(h.length){for(let b=0;b{F&&F.forEach(Z=>{(Z!==c||Z.allowRecurse)&&J.add(Z)})};if(h==="clear")D.forEach(fe);else if(b==="length"&&Object(s.n)(a))D.forEach((F,Z)=>{(Z==="length"||Z>=E)&&fe(F)});else switch(b!==void 0&&fe(D.get(b)),h){case"add":Object(s.n)(a)?Object(s.r)(b)&&fe(D.get("length")):(fe(D.get(u)),Object(s.s)(a)&&fe(D.get(d)));break;case"delete":Object(s.n)(a)||(fe(D.get(u)),Object(s.s)(a)&&fe(D.get(d)));break;case"set":Object(s.s)(a)&&fe(D.get(u))}J.forEach(F=>{F.options.scheduler?F.options.scheduler(F):F()})}const Y=Object(s.F)("__proto__,__v_isRef,__isVue"),W=new Set(Object.getOwnPropertyNames(Symbol).map(a=>Symbol[a]).filter(s.C)),X=R(),S=R(!1,!0),pe=R(!0),M=R(!0,!0),oe={};function R(a=!1,h=!1){return function(b,E,A){if(E==="__v_isReactive")return!a;if(E==="__v_isReadonly")return a;if(E==="__v_raw"&&A===(a?h?T:w:h?K:te).get(b))return b;const j=Object(s.n)(b);if(!a&&j&&Object(s.k)(oe,E))return Reflect.get(oe,E,A);const D=Reflect.get(b,E,A);return(Object(s.C)(E)?W.has(E):Y(E))||(a||y(b,0,E),h)?D:Ue(D)?!j||!Object(s.r)(E)?D.value:D:Object(s.u)(D)?a?se(D):H(D):D}}["includes","indexOf","lastIndexOf"].forEach(a=>{const h=Array.prototype[a];oe[a]=function(...b){const E=we(this);for(let j=0,D=this.length;j{const h=Array.prototype[a];oe[a]=function(...b){k();const E=h.apply(this,b);return O(),E}});const G=ye(),ve=ye(!0);function ye(a=!1){return function(h,b,E,A){let j=h[b];if(!a&&(E=we(E),j=we(j),!Object(s.n)(h)&&Ue(j)&&!Ue(E)))return j.value=E,!0;const D=Object(s.n)(h)&&Object(s.r)(b)?Number(b)!0,deleteProperty:(a,h)=>!0},re=(Object(s.h)({},U,{get:S,set:ve}),Object(s.h)({},he,{get:M}),a=>Object(s.u)(a)?H(a):a),Be=a=>Object(s.u)(a)?se(a):a,Ye=a=>a,ze=a=>Reflect.getPrototypeOf(a);function Xe(a,h,b=!1,E=!1){const A=we(a=a.__v_raw),j=we(h);h!==j&&!b&&y(A,0,h),!b&&y(A,0,j);const{has:D}=ze(A),J=E?Ye:b?Be:re;return D.call(A,h)?J(a.get(h)):D.call(A,j)?J(a.get(j)):void 0}function gt(a,h=!1){const b=this.__v_raw,E=we(b),A=we(a);return a!==A&&!h&&y(E,0,a),!h&&y(E,0,A),a===A?b.has(a):b.has(a)||b.has(A)}function ft(a,h=!1){return a=a.__v_raw,!h&&y(we(a),0,u),Reflect.get(a,"size",a)}function vt(a){a=we(a);const h=we(this);return ze(h).has.call(h,a)||(h.add(a),P(h,"add",a,a)),this}function Je(a,h){h=we(h);const b=we(this),{has:E,get:A}=ze(b);let j=E.call(b,a);j||(a=we(a),j=E.call(b,a));const D=A.call(b,a);return b.set(a,h),j?Object(s.j)(h,D)&&P(b,"set",a,h):P(b,"add",a,h),this}function $(a){const h=we(this),{has:b,get:E}=ze(h);let A=b.call(h,a);A||(a=we(a),A=b.call(h,a)),E&&E.call(h,a);const j=h.delete(a);return A&&P(h,"delete",a,void 0),j}function ee(){const a=we(this),h=a.size!==0,b=a.clear();return h&&P(a,"clear",void 0,void 0),b}function Q(a,h){return function(b,E){const A=this,j=A.__v_raw,D=we(j),J=h?Ye:a?Be:re;return!a&&y(D,0,u),j.forEach((fe,F)=>b.call(E,J(fe),J(F),A))}}function ue(a,h,b){return function(...E){const A=this.__v_raw,j=we(A),D=Object(s.s)(j),J=a==="entries"||a===Symbol.iterator&&D,fe=a==="keys"&&D,F=A[a](...E),Z=b?Ye:h?Be:re;return!h&&y(j,0,fe?d:u),{next(){const{value:ce,done:de}=F.next();return de?{value:ce,done:de}:{value:J?[Z(ce[0]),Z(ce[1])]:Z(ce),done:de}},[Symbol.iterator](){return this}}}}function ke(a){return function(...h){return a!=="delete"&&this}}const Te={get(a){return Xe(this,a)},get size(){return ft(this)},has:gt,add:vt,set:Je,delete:$,clear:ee,forEach:Q(!1,!1)},g={get(a){return Xe(this,a,!1,!0)},get size(){return ft(this)},has:gt,add:vt,set:Je,delete:$,clear:ee,forEach:Q(!1,!0)},v={get(a){return Xe(this,a,!0)},get size(){return ft(this,!0)},has(a){return gt.call(this,a,!0)},add:ke("add"),set:ke("set"),delete:ke("delete"),clear:ke("clear"),forEach:Q(!0,!1)},x={get(a){return Xe(this,a,!0,!0)},get size(){return ft(this,!0)},has(a){return gt.call(this,a,!0)},add:ke("add"),set:ke("set"),delete:ke("delete"),clear:ke("clear"),forEach:Q(!0,!0)};function N(a,h){const b=h?a?x:g:a?v:Te;return(E,A,j)=>A==="__v_isReactive"?!a:A==="__v_isReadonly"?a:A==="__v_raw"?E:Reflect.get(Object(s.k)(b,A)&&A in E?b:E,A,j)}["keys","values","entries",Symbol.iterator].forEach(a=>{Te[a]=ue(a,!1,!1),v[a]=ue(a,!0,!1),g[a]=ue(a,!1,!0),x[a]=ue(a,!0,!0)});const I={get:N(!1,!1)},q={get:N(!0,!1)},te=new WeakMap,K=new WeakMap,w=new WeakMap,T=new WeakMap;function H(a){return a&&a.__v_isReadonly?a:ne(a,!1,U,I,te)}function se(a){return ne(a,!0,he,q,w)}function ne(a,h,b,E,A){if(!Object(s.u)(a)||a.__v_raw&&(!h||!a.__v_isReactive))return a;const j=A.get(a);if(j)return j;const D=(J=a).__v_skip||!Object.isExtensible(J)?0:function(F){switch(F){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(Object(s.L)(J));var J;if(D===0)return a;const fe=new Proxy(a,D===2?E:b);return A.set(a,fe),fe}function me(a){return Ee(a)?me(a.__v_raw):!(!a||!a.__v_isReactive)}function Ee(a){return!(!a||!a.__v_isReadonly)}function xe(a){return me(a)||Ee(a)}function we(a){return a&&we(a.__v_raw)||a}function Ue(a){return!!(a&&a.__v_isRef===!0)}function lt(a,h,b,E){let A;try{A=E?a(...E):a()}catch(j){mo(j,h,b)}return A}function Et(a,h,b,E){if(Object(s.o)(a)){const j=lt(a,h,b,E);return j&&Object(s.w)(j)&&j.catch(D=>{mo(D,h,b)}),j}const A=[];for(let j=0;j>>1;qn(qe[D])-1?qe.splice(h,0,a):qe.push(a),$i()}}function $i(){Ut||Un||(Un=!0,ns=Ii.then(Ni))}function ji(a,h,b,E){Object(s.n)(a)?b.push(...a):h&&h.includes(a,a.allowRecurse?E+1:E)||b.push(a),$i()}function Ru(a){ji(a,on,vo,Wn)}function Mi(a,h=null){if(kn.length){for(os=h,go=[...new Set(kn)],kn.length=0,Vn=0;Vnqn(b)-qn(E)),Wn=0;Wna.id==null?1/0:a.id;function Ni(a){Un=!1,Ut=!0,Mi(a),qe.sort((h,b)=>qn(h)-qn(b));try{for(rt=0;rt$u+=a;let Kn=null,ju=null;function Mu(a){let h;for(let b=0;b{if(b.isUnmounted)return;k(),ea(b);const J=Et(h,b,a,D);return ea(null),O(),J});return E?A.unshift(j):A.push(j),j}}const Di=a=>(h,b=Xn)=>Hu(a,h,b),Du=Di("m"),Bu=Di("bum"),Bi={};function Fu(a,h,{immediate:b,deep:E,flush:A,onTrack:j,onTrigger:D}=s.b,J=Xn){let fe,F,Z=!1;if(Ue(a)?(fe=()=>a.value,Z=!!a._shallow):me(a)?(fe=()=>a,E=!0):fe=Object(s.n)(a)?()=>a.map(Me=>Ue(Me)?Me.value:me(Me)?Gn(Me):Object(s.o)(Me)?lt(Me,J,2,[J&&J.proxy]):void 0):Object(s.o)(a)?h?()=>lt(a,J,2,[J&&J.proxy]):()=>{if(!J||!J.isUnmounted)return F&&F(),Et(a,J,3,[ce])}:s.d,h&&E){const Me=fe;fe=()=>Gn(Me())}let ce=Me=>{F=Ve.options.onStop=()=>{lt(Me,J,4)}},de=Object(s.n)(a)?[]:Bi;const Se=()=>{if(Ve.active)if(h){const Me=Ve();(E||Z||Object(s.j)(Me,de))&&(F&&F(),Et(h,J,3,[Me,de===Bi?void 0:de,ce]),de=Me)}else Ve()};let Qe;Se.allowRecurse=!!h,Qe=A==="sync"?Se:A==="post"?()=>Wi(Se,J&&J.suspense):()=>{!J||J.isMounted?function(Me){ji(Me,go,kn,Vn)}(Se):Se()};const Ve=f(fe,{lazy:!0,onTrack:j,onTrigger:D,scheduler:Qe});return Ju(Ve,J),h?b?Se():de=Ve():A==="post"?Wi(Ve,J&&J.suspense):Ve(),()=>{p(Ve),J&&Object(s.I)(J.effects,Ve)}}function zu(a,h,b){const E=this.proxy;return Fu(Object(s.B)(a)?()=>E[a]:a.bind(E),h.bind(E),b,this)}function Gn(a,h=new Set){if(!Object(s.u)(a)||h.has(a))return a;if(h.add(a),Ue(a))Gn(a.value,h);else if(Object(s.n)(a))for(let b=0;b{Gn(b,h)});else for(const b in a)Gn(a[b],h);return a}function Uu(){const a={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Du(()=>{a.isMounted=!0}),Bu(()=>{a.isUnmounting=!0}),a}const Lt=[Function,Array],Vu={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Lt,onEnter:Lt,onAfterEnter:Lt,onEnterCancelled:Lt,onBeforeLeave:Lt,onLeave:Lt,onAfterLeave:Lt,onLeaveCancelled:Lt,onBeforeAppear:Lt,onAppear:Lt,onAfterAppear:Lt,onAppearCancelled:Lt},setup(a,{slots:h}){const b=Yu(),E=Uu();let A;return()=>{const j=h.default&&Ui(h.default(),!0);if(!j||!j.length)return;const D=we(a),{mode:J}=D,fe=j[0];if(E.isLeaving)return is(fe);const F=zi(fe);if(!F)return is(fe);const Z=ss(F,D,E,b);as(F,Z);const ce=b.subTree,de=ce&&zi(ce);let Se=!1;const{getTransitionKey:Qe}=F.type;if(Qe){const Ve=Qe();A===void 0?A=Ve:Ve!==A&&(A=Ve,Se=!0)}if(de&&de.type!==Yn&&(!Gi(F,de)||Se)){const Ve=ss(de,D,E,b);if(as(de,Ve),J==="out-in")return E.isLeaving=!0,Ve.afterLeave=()=>{E.isLeaving=!1,b.update()},is(fe);J==="in-out"&&F.type!==Yn&&(Ve.delayLeave=(Me,bo,Jn)=>{Fi(E,de)[String(de.key)]=de,Me._leaveCb=()=>{bo(),Me._leaveCb=void 0,delete Z.delayedLeave},Z.delayedLeave=Jn})}return fe}}};function Fi(a,h){const{leavingVNodes:b}=a;let E=b.get(h.type);return E||(E=Object.create(null),b.set(h.type,E)),E}function ss(a,h,b,E){const{appear:A,mode:j,persisted:D=!1,onBeforeEnter:J,onEnter:fe,onAfterEnter:F,onEnterCancelled:Z,onBeforeLeave:ce,onLeave:de,onAfterLeave:Se,onLeaveCancelled:Qe,onBeforeAppear:Ve,onAppear:Me,onAfterAppear:bo,onAppearCancelled:Jn}=h,af=String(a.key),ir=Fi(b,a),ar=(Ze,At)=>{Ze&&Et(Ze,E,9,At)},ms={mode:j,persisted:D,beforeEnter(Ze){let At=J;if(!b.isMounted){if(!A)return;At=Ve||J}Ze._leaveCb&&Ze._leaveCb(!0);const jt=ir[af];jt&&Gi(a,jt)&&jt.el._leaveCb&&jt.el._leaveCb(),ar(At,[Ze])},enter(Ze){let At=fe,jt=F,yo=Z;if(!b.isMounted){if(!A)return;At=Me||fe,jt=bo||F,yo=Jn||Z}let Qn=!1;const wo=Ze._enterCb=lf=>{Qn||(Qn=!0,ar(lf?yo:jt,[Ze]),ms.delayedLeave&&ms.delayedLeave(),Ze._enterCb=void 0)};At?(At(Ze,wo),At.length<=1&&wo()):wo()},leave(Ze,At){const jt=String(a.key);if(Ze._enterCb&&Ze._enterCb(!0),b.isUnmounting)return At();ar(ce,[Ze]);let yo=!1;const Qn=Ze._leaveCb=wo=>{yo||(yo=!0,At(),ar(wo?Qe:Se,[Ze]),Ze._leaveCb=void 0,ir[jt]===a&&delete ir[jt])};ir[jt]=a,de?(de(Ze,Qn),de.length<=1&&Qn()):Qn()},clone:Ze=>ss(Ze,h,b,E)};return ms}function is(a){if(Vi(a))return(a=_o(a)).children=null,a}function zi(a){return Vi(a)?a.children?a.children[0]:void 0:a}function as(a,h){6&a.shapeFlag&&a.component?as(a.component.subTree,h):128&a.shapeFlag?(a.ssContent.transition=h.clone(a.ssContent),a.ssFallback.transition=h.clone(a.ssFallback)):a.transition=h}function Ui(a,h=!1){let b=[],E=0;for(let A=0;A1)for(let A=0;Aa.type.__isKeepAlive;function Wu(){return{app:null,config:{isNativeTag:s.c,performance:!1,globalProperties:{},optionMergeStrategies:{},isCustomElement:s.c,errorHandler:void 0,warnHandler:void 0},mixins:[],components:{},directives:{},provides:Object.create(null)}}const Wi=Nu,qu=Symbol(),ls=Symbol(void 0),qi=Symbol(void 0),Yn=Symbol(void 0);let Ki=null;function nr(a){return!!a&&a.__v_isVNode===!0}function Gi(a,h){return a.type===h.type&&a.key===h.key}const Yi="__vInternal",Xi=({key:a})=>a??null,or=({ref:a})=>a!=null?Object(s.B)(a)||Ue(a)||Object(s.o)(a)?{i:Kn,r:a}:a:null,rn=Ku;function Ku(a,h=null,b=null,E=0,A=null,j=!1){if(a&&a!==qu||(a=Yn),nr(a)){const fe=_o(a,h,!0);return b&&cs(fe,b),fe}if(Qu(a)&&(a=a.__vccOpts),h){(xe(h)||Yi in h)&&(h=Object(s.h)({},h));let{class:fe,style:F}=h;fe&&!Object(s.B)(fe)&&(h.class=Object(s.G)(fe)),Object(s.u)(F)&&(xe(F)&&!Object(s.n)(F)&&(F=Object(s.h)({},F)),h.style=Object(s.H)(F))}const D=Object(s.B)(a)?1:(fe=>fe.__isSuspense)(a)?128:(fe=>fe.__isTeleport)(a)?64:Object(s.u)(a)?4:Object(s.o)(a)?2:0,J={__v_isVNode:!0,__v_skip:!0,type:a,props:h,key:h&&Xi(h),ref:h&&or(h),scopeId:ju,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:D,patchFlag:E,dynamicProps:A,dynamicChildren:null,appContext:null};if(cs(J,b),128&D){const{content:fe,fallback:F}=function(Z){const{shapeFlag:ce,children:de}=Z;let Se,Qe;return 32&ce?(Se=rs(de.default),Qe=rs(de.fallback)):(Se=rs(de),Qe=Ji(null)),{content:Se,fallback:Qe}}(J);J.ssContent=fe,J.ssFallback=F}return!j&&Ki&&(E>0||6&D)&&E!==32&&Ki.push(J),J}function _o(a,h,b=!1){const{props:E,ref:A,patchFlag:j,children:D}=a,J=h?function(...fe){const F=Object(s.h)({},fe[0]);for(let Z=1;Zrr(a,D,b));for(const D in h)E&&Object(s.k)(E,D)?a[D]=E[D](a[D],h[D],b.proxy,D):a[D]=h[D]}const us=a=>a?Xu(a)?a.exposed?a.exposed:a.proxy:us(a.parent):null,Qi=Object(s.h)(Object.create(null),{$:a=>a,$el:a=>a.vnode.el,$data:a=>a.data,$props:a=>a.props,$attrs:a=>a.attrs,$slots:a=>a.slots,$refs:a=>a.refs,$parent:a=>us(a.parent),$root:a=>us(a.root),$emit:a=>a.emit,$options:a=>function(h){const b=h.type,{__merged:E,mixins:A,extends:j}=b;if(E)return E;const D=h.appContext.mixins;if(!D.length&&!A&&!j)return b;const J={};return D.forEach(fe=>rr(J,fe,h)),rr(J,b,h),b.__merged=J}(a),$forceUpdate:a=>()=>Pu(a.update),$nextTick:a=>Tu.bind(a.proxy),$watch:a=>zu.bind(a)}),Zi={get({_:a},h){const{ctx:b,setupState:E,data:A,props:j,accessCache:D,type:J,appContext:fe}=a;if(h==="__v_skip")return!0;let F;if(h[0]!=="$"){const Se=D[h];if(Se!==void 0)switch(Se){case 0:return E[h];case 1:return A[h];case 3:return b[h];case 2:return j[h]}else{if(E!==s.b&&Object(s.k)(E,h))return D[h]=0,E[h];if(A!==s.b&&Object(s.k)(A,h))return D[h]=1,A[h];if((F=a.propsOptions[0])&&Object(s.k)(F,h))return D[h]=2,j[h];if(b!==s.b&&Object(s.k)(b,h))return D[h]=3,b[h];D[h]=4}}const Z=Qi[h];let ce,de;return Z?(h==="$attrs"&&y(a,0,h),Z(a)):(ce=J.__cssModules)&&(ce=ce[h])?ce:b!==s.b&&Object(s.k)(b,h)?(D[h]=3,b[h]):(de=fe.config.globalProperties,Object(s.k)(de,h)?de[h]:void 0)},set({_:a},h,b){const{data:E,setupState:A,ctx:j}=a;if(A!==s.b&&Object(s.k)(A,h))A[h]=b;else if(E!==s.b&&Object(s.k)(E,h))E[h]=b;else if(Object(s.k)(a.props,h))return!1;return(h[0]!=="$"||!(h.slice(1)in a))&&(j[h]=b,!0)},has({_:{data:a,setupState:h,accessCache:b,ctx:E,appContext:A,propsOptions:j}},D){let J;return b[D]!==void 0||a!==s.b&&Object(s.k)(a,D)||h!==s.b&&Object(s.k)(h,D)||(J=j[0])&&Object(s.k)(J,D)||Object(s.k)(E,D)||Object(s.k)(Qi,D)||Object(s.k)(A.config.globalProperties,D)}};Object(s.h)({},Zi,{get(a,h){if(h!==Symbol.unscopables)return Zi.get(a,h,a)},has:(a,h)=>h[0]!=="_"&&!Object(s.p)(h)}),Wu();let Xn=null;const Yu=()=>Xn||Kn,ea=a=>{Xn=a};function Xu(a){return 4&a.vnode.shapeFlag}function Ju(a,h=Xn){h&&(h.effects||(h.effects=[])).push(a)}function Qu(a){return Object(s.o)(a)&&"__vccOpts"in a}function Zu(a,h,b){const E=arguments.length;return E===2?Object(s.u)(h)&&!Object(s.n)(h)?nr(h)?rn(a,null,[h]):rn(a,h):rn(a,null,h):(E>3?b=Array.prototype.slice.call(arguments,2):E===3&&nr(b)&&(b=[b]),rn(a,h,b))}const ta="http://www.w3.org/2000/svg",Cn=typeof document<"u"?document:null;let na,oa;const ra={insert:(a,h,b)=>{h.insertBefore(a,b||null)},remove:a=>{const h=a.parentNode;h&&h.removeChild(a)},createElement:(a,h,b,E)=>{const A=h?Cn.createElementNS(ta,a):Cn.createElement(a,b?{is:b}:void 0);return a==="select"&&E&&E.multiple!=null&&A.setAttribute("multiple",E.multiple),A},createText:a=>Cn.createTextNode(a),createComment:a=>Cn.createComment(a),setText:(a,h)=>{a.nodeValue=h},setElementText:(a,h)=>{a.textContent=h},parentNode:a=>a.parentNode,nextSibling:a=>a.nextSibling,querySelector:a=>Cn.querySelector(a),setScopeId(a,h){a.setAttribute(h,"")},cloneNode(a){const h=a.cloneNode(!0);return"_value"in a&&(h._value=a._value),h},insertStaticContent(a,h,b,E){const A=E?oa||(oa=Cn.createElementNS(ta,"svg")):na||(na=Cn.createElement("div"));A.innerHTML=a;const j=A.firstChild;let D=j,J=D;for(;D;)J=D,ra.insert(D,h,b),D=A.firstChild;return[j,J]}},sa=/\s*!important$/;function fs(a,h,b){if(Object(s.n)(b))b.forEach(E=>fs(a,h,E));else if(h.startsWith("--"))a.setProperty(h,b);else{const E=function(A,j){const D=ds[j];if(D)return D;let J=Object(s.e)(j);if(J!=="filter"&&J in A)return ds[j]=J;J=Object(s.f)(J);for(let fe=0;fedocument.createEvent("Event").timeStamp&&(sr=()=>performance.now());const a=navigator.userAgent.match(/firefox\/(\d+)/i);la=!!(a&&Number(a[1])<=53)}let ps=0;const ef=Promise.resolve(),tf=()=>{ps=0};function nf(a,h,b,E){a.addEventListener(h,b,E)}function of(a,h,b,E,A=null){const j=a._vei||(a._vei={}),D=j[h];if(E&&D)D.value=E;else{const[J,fe]=function(F){let Z;if(ca.test(F)){let ce;for(Z={};ce=F.match(ca);)F=F.slice(0,F.length-ce[0].length),Z[ce[0].toLowerCase()]=!0}return[Object(s.l)(F.slice(2)),Z]}(h);E?nf(a,J,j[h]=function(F,Z){const ce=de=>{const Se=de.timeStamp||sr();(la||Se>=ce.attached-1)&&Et(function(Qe,Ve){if(Object(s.n)(Ve)){const Me=Qe.stopImmediatePropagation;return Qe.stopImmediatePropagation=()=>{Me.call(Qe),Qe._stopped=!0},Ve.map(bo=>Jn=>!Jn._stopped&&bo(Jn))}return Ve}(de,ce.value),Z,5,[de])};return ce.value=F,ce.attached=ps||(ef.then(tf),ps=sr()),ce}(E,A),fe):D&&(function(F,Z,ce,de){F.removeEventListener(Z,ce,de)}(a,J,D,fe),j[h]=void 0)}}const ca=/(?:Once|Passive|Capture)$/,ua=/^on[a-z]/,rf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Object(s.h)({},Vu.props,rf),Object(s.h)({patchProp:(a,h,b,E,A=!1,j,D,J,fe)=>{switch(h){case"class":(function(F,Z,ce){if(Z==null&&(Z=""),ce)F.setAttribute("class",Z);else{const de=F._vtc;de&&(Z=(Z?[Z,...de]:[...de]).join(" ")),F.className=Z}})(a,E,A);break;case"style":(function(F,Z,ce){const de=F.style;if(ce)if(Object(s.B)(ce)){if(Z!==ce){const Se=de.display;de.cssText=ce,"_vod"in F&&(de.display=Se)}}else{for(const Se in ce)fs(de,Se,ce[Se]);if(Z&&!Object(s.B)(Z))for(const Se in Z)ce[Se]==null&&fs(de,Se,"")}else F.removeAttribute("style")})(a,b,E);break;default:Object(s.v)(h)?Object(s.t)(h)||of(a,h,0,E,D):function(F,Z,ce,de){return de?Z==="innerHTML"||!!(Z in F&&ua.test(Z)&&Object(s.o)(ce)):Z==="spellcheck"||Z==="draggable"||Z==="form"||Z==="list"&&F.tagName==="INPUT"||Z==="type"&&F.tagName==="TEXTAREA"||ua.test(Z)&&Object(s.B)(ce)?!1:Z in F}(a,h,E,A)?function(F,Z,ce,de,Se,Qe,Ve){if(Z==="innerHTML"||Z==="textContent")return de&&Ve(de,Se,Qe),void(F[Z]=ce??"");if(Z!=="value"||F.tagName==="PROGRESS"){if(ce===""||ce==null){const Me=typeof F[Z];if(ce===""&&Me==="boolean")return void(F[Z]=!0);if(ce==null&&Me==="string")return F[Z]="",void F.removeAttribute(Z);if(Me==="number")return F[Z]=0,void F.removeAttribute(Z)}try{F[Z]=ce}catch{}}else{F._value=ce;const Me=ce??"";F.value!==Me&&(F.value=Me)}}(a,h,E,j,D,J,fe):(h==="true-value"?a._trueValue=E:h==="false-value"&&(a._falseValue=E),function(F,Z,ce,de){if(de&&Z.startsWith("xlink:"))ce==null?F.removeAttributeNS(aa,Z.slice(6,Z.length)):F.setAttributeNS(aa,Z,ce);else{const Se=Object(s.A)(Z);ce==null||Se&&ce===!1?F.removeAttribute(Z):F.setAttribute(Z,Se?"":ce)}}(a,h,E,A))}},forcePatchProp:(a,h)=>h==="value"},ra);var sf={baidu:"http://cang.baidu.com/do/add?iu=@u&it=@t",buffer:"https://bufferapp.com/add?text=@t&url=@u",email:"mailto:?subject=@t&body=@u%0D%0A@d",evernote:"https://www.evernote.com/clip.action?url=@u&title=@t",facebook:"https://www.facebook.com/sharer/sharer.php?u=@u&title=@t&description=@d"e=@q&hashtag=@h",flipboard:"https://share.flipboard.com/bookmarklet/popout?v=2&url=@u&title=@t",hackernews:"https://news.ycombinator.com/submitlink?u=@u&t=@t",instapaper:"http://www.instapaper.com/edit?url=@u&title=@t&description=@d",line:"http://line.me/R/msg/text/?@t%0D%0A@u%0D%0A@d",linkedin:"https://www.linkedin.com/shareArticle?url=@u",messenger:"fb-messenger://share/?link=@u",odnoklassniki:"https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=@u&st.comments=@t",pinterest:"https://pinterest.com/pin/create/button/?url=@u&media=@m&description=@t",pocket:"https://getpocket.com/save?url=@u&title=@t",quora:"https://www.quora.com/share?url=@u&title=@t",reddit:"https://www.reddit.com/submit?url=@u&title=@t",skype:"https://web.skype.com/share?url=@t%0D%0A@u%0D%0A@d",sms:"sms:?body=@t%0D%0A@u%0D%0A@d",stumbleupon:"https://www.stumbleupon.com/submit?url=@u&title=@t",telegram:"https://t.me/share/url?url=@u&text=@t%0D%0A@d",tumblr:"https://www.tumblr.com/share/link?url=@u&name=@t&description=@d",twitter:"https://twitter.com/intent/tweet?text=@t&url=@u&hashtags=@h@tu",viber:"viber://forward?text=@t%0D%0A@u%0D%0A@d",vk:"https://vk.com/share.php?url=@u&title=@t&description=@d&image=@m&noparse=true",weibo:"http://service.weibo.com/share/share.php?url=@u&title=@t&pic=@m",whatsapp:"https://api.whatsapp.com/send?text=@t%0D%0A@u%0D%0A@d",wordpress:"https://wordpress.com/press-this.php?u=@u&t=@t&s=@d&i=@m",xing:"https://www.xing.com/social/share/spi?op=share&url=@u&title=@t",yammer:"https://www.yammer.com/messages/new?login=true&status=@t%0D%0A@u%0D%0A@d"},Ot=typeof window<"u"?window:null,hs={name:"ShareNetwork",props:{network:{type:String,required:!0},url:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,default:""},quote:{type:String,default:""},hashtags:{type:String,default:""},twitterUser:{type:String,default:""},media:{type:String,default:""},tag:{type:String,default:"a"},popup:{type:Object,default:function(){return{width:626,height:436}}},options:{type:Object,default:function(){return{networks:null}}}},data:function(){return{popupTop:0,popupLeft:0,popupWindow:void 0,popupInterval:null}},computed:{networks:function(){return Object.assign(sf,this.options.networks||{})},key:function(){return this.network.toLowerCase()},rawLink:function(){var a=navigator.userAgent.toLowerCase();return this.key==="sms"&&(a.indexOf("iphone")>-1||a.indexOf("ipad")>-1)?this.networks[this.key].replace(":?",":&"):this.networks[this.key]},shareLink:function(){var a=this.rawLink;return this.key==="twitter"&&(this.hashtags.length||(a=a.replace("&hashtags=@h","")),this.twitterUser.length||(a=a.replace("@tu",""))),a.replace(/@tu/g,"&via="+encodeURIComponent(this.twitterUser)).replace(/@u/g,encodeURIComponent(this.url)).replace(/@t/g,encodeURIComponent(this.title)).replace(/@d/g,encodeURIComponent(this.description)).replace(/@q/g,encodeURIComponent(this.quote)).replace(/@h/g,this.encodedHashtags).replace(/@m/g,encodeURIComponent(this.media))},encodedHashtags:function(){return this.key==="facebook"&&this.hashtags.length?"%23"+this.hashtags.split(",")[0]:this.hashtags}},render:function(){var a=this;if(!this.networks.hasOwnProperty(this.key))throw new Error("Network "+this.key+" does not exist");var h={class:"share-network-"+this.key,onclick:function(){return a[a.rawLink.substring(0,4)==="http"?"share":"touch"]()}};return this.tag==="a"&&(h.href="javascript:void(0)"),Zu(this.tag,h,typeof this.$slots.default=="function"?this.$slots.default():null)},methods:{resizePopup:function(){var a=Ot.innerWidth||document.documentElement.clientWidth||Ot.screenX,h=Ot.innerHeight||document.documentElement.clientHeight||Ot.screenY,b=a/Ot.screen.availWidth;this.popupLeft=(a-this.popup.width)/2/b+(Ot.screenLeft!==void 0?Ot.screenLeft:Ot.screenX),this.popupTop=(h-this.popup.height)/2/b+(Ot.screenTop!==void 0?Ot.screenTop:Ot.screenY)},share:function(){var a=this;this.resizePopup(),this.popupWindow&&this.popupInterval&&(clearInterval(this.popupInterval),this.popupWindow.close(),this.emit("change")),this.popupWindow=Ot.open(this.shareLink,"sharer-"+this.key,",height="+this.popup.height+",width="+this.popup.width+",left="+this.popupLeft+",top="+this.popupTop+",screenX="+this.popupLeft+",screenY="+this.popupTop),this.popupWindow&&(this.popupWindow.focus(),this.popupInterval=setInterval(function(){a.popupWindow&&!a.popupWindow.closed||(clearInterval(a.popupInterval),a.popupWindow=null,a.emit("close"))},500),this.emit("open"))},touch:function(){window.open(this.shareLink,"_blank"),this.emit("open")},emit:function(a){this.$root.$emit("share_network_"+a,this.key,this.url),this.$emit(a,this.key,this.url)}}};o.default={install:function(a,h){a.component(hs.name,hs)}}}])})})(Cu);var Tb=Cu.exports;const Pb=Ab(Tb),Rb={category:{"/":{path:"/category/",map:{}}},tag:{"/":{path:"/tag/",map:{}}}},Su=["/posts/mission.html","/posts/discovery/AI%E5%A6%82%E4%BD%95%E6%94%B9%E5%8F%98%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86%E7%9A%84%E5%B7%A5%E4%BD%9C.html","/posts/discovery/comfyui%20mixlab%20nodes%20%E6%8F%92%E4%BB%B6%20%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%94%9F%E6%88%90APP%20%E9%80%8F%E6%98%8Epng%E5%9B%BE%E5%83%8F%20%E5%A4%9A%E7%A7%8D%E5%8A%9F%E8%83%BD.html","/posts/discovery/Comfyui%20Realtime%20LCM%20with%20Photoshop.html","/posts/discovery/prompt.html","/posts/discovery/%E8%81%8A%E8%81%8AMixlab%20Node%EF%BC%9AAI%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81.html","/posts/insight/","/posts/mixlab_nodes/","/posts/task/","/posts/tutorial/advanced/","/posts/tutorial/core_nodes/","/posts/tutorial/custom_nodes/","/posts/tutorial/interface/","/posts/tutorial/start/","/posts/tutorial/for_testing/"],ei=Dt(Rb);Dn(ei);const xu=e=>{const t=tn(),n=dt(),o=En();return B(()=>{var l;const r=e??((l=n.value.blog)==null?void 0:l.key)??"";if(!r)return console.warn("useBlogCategory: key not found"),{path:"/",map:{}};if(!ei.value[r])throw new Error(`useBlogCategory: key ${r} is invalid`);const s=ei.value[r][o.value],i={path:s.path,map:{}};for(const c in s.map){const u=s.map[c];i.map[c]={path:u.path,items:[]};for(const d of u.indexes){const{path:f,meta:p}=Mn(Su[d]);i.map[c].items.push({path:f,info:p._blog})}t.value.path===u.path&&(i.currentItems=i.map[c].items)}return i})},Ib={article:{"/":{path:"/article/",indexes:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]}},timeline:{"/":{path:"/timeline/",indexes:[]}}},ti=Dt(Ib);Dn(ti);const Lu=e=>{const t=dt(),n=En();return B(()=>{var i;const o=e??((i=t.value.blog)==null?void 0:i.key)??"";if(!o)return console.warn("useBlogType: key not found"),{path:"/",items:[]};if(!ti.value[o])throw new Error(`useBlogType: key ${e} is invalid`);const r=ti.value[o][n.value],s={path:r.path,items:[]};for(const l of r.indexes){const{path:c,meta:u}=Mn(Su[l]);s.items.push({path:c,info:u._blog})}return s})},$b={__name:"ArticleList",props:{items:{type:Array,required:!0},isTimeline:Boolean},setup(e){return()=>{}}},ts=Ae($b,[["__file","ArticleList.vue"]]),jb={class:"page"},Mb={__name:"Article",setup(e){const t=Lu("article");return(n,o)=>(z(),Ne(po,null,{page:$e(()=>[ie("main",jb,[ge(ts,{items:le(t).items},null,8,["items"])])]),_:1}))}},Nb=Ae(Mb,[["__file","Article.vue"]]),Hb={class:"page"},Db={class:"category-wrapper"},Bb={class:"category-num"},Fb={__name:"Category",setup(e){const t=Ft(),n=xu("category");return(o,r)=>(z(),Ne(po,null,{page:$e(()=>[ie("main",Hb,[ie("div",Db,[(z(!0),ae(Le,null,xt(le(n).map,({items:s,path:i},l)=>(z(),Ne(le(Kt),{key:l,to:i,active:le(t).path===i,class:"category"},{default:$e(()=>[Yt(Oe(l)+" ",1),ie("span",Bb,Oe(s.length),1)]),_:2},1032,["to","active"]))),128))]),ge(ts,{items:le(n).currentItems??[]},null,8,["items"])])]),_:1}))}},zb=Ae(Fb,[["__file","Category.vue"]]),Ub={class:"page"},Vb={class:"tag-wrapper"},Wb={class:"tag-num"},qb={__name:"Tag",setup(e){const t=Ft(),n=xu("tag");return(o,r)=>(z(),Ne(po,null,{page:$e(()=>[ie("main",Ub,[ie("div",Vb,[(z(!0),ae(Le,null,xt(le(n).map,({items:s,path:i},l)=>(z(),Ne(le(Kt),{key:l,to:i,active:le(t).path===i,class:"tag"},{default:$e(()=>[Yt(Oe(l)+" ",1),ie("span",Wb,Oe(s.length),1)]),_:2},1032,["to","active"]))),128))]),ge(ts,{items:le(n).currentItems??[]},null,8,["items"])])]),_:1}))}},Kb=Ae(qb,[["__file","Tag.vue"]]),Gb={class:"page"},Yb=ie("h1",{class:"timeline-title"},"Timeline",-1),Xb={__name:"Timeline",setup(e){const t=Lu("timeline");return(n,o)=>(z(),Ne(po,null,{page:$e(()=>[ie("main",Gb,[Yb,ge(ts,{items:le(t).items,"is-timeline":""},null,8,["items"])])]),_:1}))}},Jb=Ae(Xb,[["__file","Timeline.vue"]]),Qb={id:"translateSelectLanguage"},Zb=xc('',66),ey=[Zb],ty={__name:"Translate",setup(e){const t={3:"english",4:"chinese_simplified",5:"chinese_traditional",6:"russian",7:"japanese",8:"korean",9:"deutsch",10:"spanish",11:"italian",12:"norwegian",13:"dutch",14:"filipino",15:"lao",16:"romanian",17:"nepali",18:"french",19:"haitian_creole",20:"czech",21:"swedish",22:"malagasy",23:"burmese",24:"pashto",25:"thai",26:"armenian",27:"persian",28:"kurdish",29:"turkish",30:"hindi",31:"bulgarian",32:"malay",33:"swahili",34:"oriya",35:"irish",36:"gujarati",37:"slovak",38:"hebrew",39:"hungarian",40:"marathi",41:"tamil",42:"estonian",43:"malayalam",44:"inuktitut",45:"arabic",46:"slovene",47:"bengali",48:"urdu",49:"azerbaijani",50:"portuguese",51:"samoan",52:"afrikaans",53:"greek",54:"danish",55:"amharic",56:"albanian",57:"lithuanian",58:"vietnamese",59:"maltese",60:"finnish",61:"catalan",62:"croatian",63:"bosnian",64:"polish",65:"latvian",66:"maori"},n={english:"3",chinese_simplified:"4",chinese_traditional:"5",russian:"6",japanese:"7",korean:"8",deutsch:"9",spanish:"10",italian:"11",norwegian:"12",dutch:"13",filipino:"14",lao:"15",romanian:"16",nepali:"17",french:"18",haitian_creole:"19",czech:"20",swedish:"21",malagasy:"22",burmese:"23",pashto:"24",thai:"25",armenian:"26",persian:"27",kurdish:"28",turkish:"29",hindi:"30",bulgarian:"31",malay:"32",swahili:"33",oriya:"34",irish:"35",gujarati:"36",slovak:"37",hebrew:"38",hungarian:"39",marathi:"40",tamil:"41",estonian:"42",malayalam:"43",inuktitut:"44",arabic:"45",slovene:"46",bengali:"47",urdu:"48",azerbaijani:"49",portuguese:"50",samoan:"51",afrikaans:"52",greek:"53",danish:"54",amharic:"55",albanian:"56",lithuanian:"57",vietnamese:"58",maltese:"59",finnish:"60",catalan:"61",croatian:"62",bosnian:"63",polish:"64",latvian:"65",maori:"66"};function o(i){var l={},c=i.split("?");if(c.length>1)for(var u=c[1],d=u.split("&"),f=0;f0&&(l[m]=_)}return l}function r(i,l){var c=window.location.href,u="";if(c.indexOf("?")!==-1){for(var d=c.split("?")[1].split("&"),f=!1,p=0;p{const i=()=>{const{lang:u}=o(window.location.href);console.log("#传参lang",u),window.translate.ignore.id.push("translateSelectLanguage"),window.translate.language.clearCacheLanguage(),window.translate.selectLanguageTag.show=!1;let d=localStorage.getItem("selectedLanguage");if(u&&t[u]&&(d=t[u]),d&&d!=="Not Translate")console.log("Saved language found",d),window.translate.language.setDefaultTo(d),c.value=d;else if(d&&d==="Not Translate"){c.value="Not Translate",s("lang");return}else window.translate.setAutoDiscriminateLocalLanguage(),c.value="Default",s("lang");n[c.value]&&r("lang",n[c.value]),window.translate.service.use("client.edge"),window.translate.listener.start(),window.translate.execute()},l=()=>setTimeout(()=>{window.translate?i():l()},200);l();const c=document.getElementById("translateSelectLanguage");c.addEventListener("change",()=>{const u=c.value;console.log("Language selection changed",u),u==="Default"||c=="Not Translate"?(localStorage.removeItem("selectedLanguage"),r("lang",0)):(localStorage.setItem("selectedLanguage",u),n[u]&&r("lang",n[u])),window.location.reload()})}),(i,l)=>(z(),ae("select",Qb,ey))}},Ou=Ae(ty,[["__file","Translate.vue"]]),ny={key:1,class:"modal"},oy=ie("i",{class:"fas fa-times"},null,-1),ry=[oy],sy={class:"share_btns"},iy=ie("i",{class:"fas fa-share"},null,-1),ay=[iy],ly=ie("link",{rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css",integrity:"sha256-h20CPZ0QyXlBuAw7A+KluUYx/3pK+c7lYEpqLTlxjYQ=",crossorigin:"anonymous"},null,-1),cy={__name:"ShareIcon",setup(e){const t=dt();function n(u,d){var f=window.location.href,p="";if(f.indexOf("?")!==-1){for(var m=f.split("?")[1].split("&"),_=!1,C=0;C{const u=document.querySelector('meta[name="description"]'),d=u?u.content:"",f=document.querySelector('meta[name="twitter:description"]'),p=f?f.content:"",m=document.querySelector('meta[name="author"]'),_=m?m.content:"",C=document.querySelector('meta[name="keywords"]'),L=C?C.content:"",k=document.querySelector('meta[name="twitter:creator"]'),O=k?k.content:"";o.value={url:window.location.href,title:document.title,description:p||d,quote:p||d,hashtags:L,twitterUser:O||_}},c=()=>{i.value=!i.value;const u={english:"3",chinese_simplified:"4",chinese_traditional:"5",russian:"6",japanese:"7",korean:"8",deutsch:"9",spanish:"10",italian:"11",norwegian:"12",dutch:"13",filipino:"14",lao:"15",romanian:"16",nepali:"17",french:"18",haitian_creole:"19",czech:"20",swedish:"21",malagasy:"22",burmese:"23",pashto:"24",thai:"25",armenian:"26",persian:"27",kurdish:"28",turkish:"29",hindi:"30",bulgarian:"31",malay:"32",swahili:"33",oriya:"34",irish:"35",gujarati:"36",slovak:"37",hebrew:"38",hungarian:"39",marathi:"40",tamil:"41",estonian:"42",malayalam:"43",inuktitut:"44",arabic:"45",slovene:"46",bengali:"47",urdu:"48",azerbaijani:"49",portuguese:"50",samoan:"51",afrikaans:"52",greek:"53",danish:"54",amharic:"55",albanian:"56",lithuanian:"57",vietnamese:"58",maltese:"59",finnish:"60",catalan:"61",croatian:"62",bosnian:"63",polish:"64",latvian:"65",maori:"66"},d=document.getElementById("translateSelectLanguage");u[d.value]&&(n("lang",u[d.value]),l())};return tt(async()=>{const u=()=>{l();const f=document.querySelector('meta[name="share_config"]'),p=f?f.content:"";r.value=[{network:"buffer",name:"Buffer",icon:"fab fah fa-lg fa-buffer",color:"#323b43"},{network:"email",name:"Email",icon:"far fah fa-lg fa-envelope",color:"#333333"},{network:"facebook",name:"Facebook",icon:"fab fah fa-lg fa-facebook-f",color:"#1877f2"},{network:"flipboard",name:"Flipboard",icon:"fab fah fa-lg fa-flipboard",color:"#e12828"},{network:"hackernews",name:"HackerNews",icon:"fab fah fa-lg fa-hacker-news",color:"#ff4000"},{network:"instapaper",name:"Instapaper",icon:"fas fah fa-lg fa-italic",color:"#428bca"},{network:"line",name:"Line",icon:"fab fah fa-lg fa-line",color:"#00c300"},{network:"linkedin",name:"LinkedIn",icon:"fab fah fa-lg fa-linkedin",color:"#007bb5"},{network:"odnoklassniki",name:"Odnoklassniki",icon:"fab fah fa-lg fa-odnoklassniki",color:"#ed812b"},{network:"pinterest",name:"Pinterest",icon:"fab fah fa-lg fa-pinterest",color:"#bd081c"},{network:"pocket",name:"Pocket",icon:"fab fah fa-lg fa-get-pocket",color:"#ef4056"},{network:"quora",name:"Quora",icon:"fab fah fa-lg fa-quora",color:"#a82400"},{network:"reddit",name:"Reddit",icon:"fab fah fa-lg fa-reddit-alien",color:"#ff4500"},{network:"tumblr",name:"Tumblr",icon:"fab fah fa-lg fa-tumblr",color:"#35465c"},{network:"twitter",name:"Twitter",icon:"fab fah fa-lg fa-twitter",color:"#1da1f2"},{network:"vk",name:"Vk",icon:"fab fah fa-lg fa-vk",color:"#4a76a8"},{network:"weibo",name:"Weibo",icon:"fab fah fa-lg fa-weibo",color:"#e9152d"},{network:"wordpress",name:"Wordpress",icon:"fab fah fa-lg fa-wordpress",color:"#21759b"},{network:"xing",name:"Xing",icon:"fab fah fa-lg fa-xing",color:"#026466"},{network:"yammer",name:"Yammer",icon:"fab fah fa-lg fa-yammer",color:"#0072c6"}].filter(m=>p.includes(m.network))},d=()=>setTimeout(()=>{const f=document.querySelector('meta[name="author"]');(f?f.content:"")?u():d()},200);d(),t.value.share!==void 0&&(s.value=t.value.share),console.log("frontmatter.value.share",t.value.share,s)}),(u,d)=>{const f=uo("ShareNetwork");return s.value?(z(),ae(Le,{key:0},[i.value?(z(),ae("div",{key:0,class:"modal-overlay",onClick:c})):He("",!0),i.value?(z(),ae("div",ny,[ie("button",{class:"close-btn",onClick:c},ry),ie("div",sy,[(z(!0),ae(Le,null,xt(r.value,p=>(z(),Ne(f,{class:"share_btn",network:p.network,key:p.network,style:qt({backgroundColor:p.color}),url:o.value.url,title:o.value.title,description:o.value.description,quote:o.value.quote,hashtags:o.value.hashtags,twitterUser:o.value.twitterUser},{default:$e(()=>[ie("i",{class:ut(p.icon)},null,2),ie("span",null,Oe(p.name),1)]),_:2},1032,["network","style","url","title","description","quote","hashtags","twitterUser"]))),128))])])):He("",!0),ie("button",{class:"floating-btn",onClick:c},ay),ly],64)):He("",!0)}}},Au=Ae(cy,[["__file","ShareIcon.vue"]]),uy={class:"my-footer"},fy={__name:"Layout",setup(e){return(t,n)=>(z(),Ne(po,null,{"navbar-after":$e(()=>[ge(Ou)]),"page-bottom":$e(()=>[ge(Au),ie("div",uy,"MIT Licensed | Copyright © 2024-present "+Oe(t.$site.title),1)]),_:1}))}},dy=Ae(fy,[["__file","Layout.vue"]]),py={class:"hero"},hy={key:0,id:"main-title"},my={key:1,class:"description"},gy={__name:"HomeHero",setup(e){const t=dt(),n=er(),o=es(),r=B(()=>o.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),s=B(()=>t.value.heroAlt||l.value||"hero"),i=B(()=>t.value.heroHeight||280),l=B(()=>t.value.heroText===null?null:t.value.heroText||n.value.title||"Hello"),c=B(()=>t.value.tagline===null?null:t.value.tagline||n.value.description||"Welcome to your VuePress site"),u=B(()=>Array.isArray(t.value.actions)?t.value.actions.map(({text:f,link:p,type:m="primary"})=>({text:f,link:p,type:m})):[]),d=()=>{if(!r.value)return null;const f=V("img",{src:Jr(r.value),alt:s.value,height:i.value});return t.value.heroImageDark===void 0?f:V(Xr,()=>f)};return(f,p)=>(z(),ae("header",py,[ge(d),l.value?(z(),ae("h1",hy,Oe(l.value),1)):He("",!0),c.value?(z(),ae("p",my,Oe(c.value),1)):He("",!0),u.value.length?(z(),ae("p",{key:2,class:ut(["actions",{dark_mode:le(o)}])},[(z(!0),ae(Le,null,xt(u.value,m=>(z(),Ne(le(Gt),{key:m.text,class:ut(["action-button",[m.type]]),config:m},null,8,["class","config"]))),128))],2)):He("",!0)]))}},vy=Ae(gy,[["__file","HomeHero.vue"]]),_y=["innerHTML"],by=["textContent"],yy={__name:"HomeFooter",setup(e){const t=dt(),n=B(()=>(t.value.footer&&t.value.footer.includes("{{$site.title}}")&&(t.value.footer=t.value.footer.replace("{{$site.title}}",t.value.title)),t.value.footer)),o=B(()=>(t.value.footerHtml&&t.value.footerHtml.includes("{{$site.title}}")&&(t.value.footerHtml=t.value.footerHtml.replace("{{$site.title}}",t.value.title)),t.value.footerHtml));return(r,s)=>n.value?(z(),ae(Le,{key:0},[o.value?(z(),ae("div",{key:0,class:"footer",innerHTML:n.value},null,8,_y)):(z(),ae("div",{key:1,class:"footer",textContent:Oe(n.value)},null,8,by))],64)):He("",!0)}},wy=Ae(yy,[["__file","HomeFooter.vue"]]),Ey={key:0,class:"waterfall"},ky=["href"],Cy={class:"title"},Sy={class:"details"},xy={class:"title"},Ly={class:"details"},Oy=ie("div",{class:"loading"},null,-1),Ay={__name:"Waterfall",setup(e){const t=dt(),n=be([]);t.value.waterfall.length;let o=12;const r=be(window.screen.width);function s(u,d,f){if(d>f){const p=f/d;d=f,u*=p}return{width:u,height:d}}function i(u){return new Promise((d,f)=>{const p=new Image;p.src=u,p.onload=function(){const m=s(p.width/2,p.height/2,450);d({...m,url:u})},p.onerror=function(){f(new Error("Failed to load image"))}})}async function l(u,d){const f=u.map(m=>i(m));(await Promise.allSettled(f)).forEach((m,_)=>{m.status==="fulfilled"?d({...m.value,index:_}):console.error(m.reason)})}const c=()=>setTimeout(()=>{waterfall&&document.querySelector(".waterfall")?waterfall(".waterfall"):c()},600);return tt(async()=>{const u=[...t.value.waterfall].slice(0,o);console.log("screenWidth",r),await l(u.map(f=>f.image),f=>{u[f.index].width=f.width,u[f.index].height=f.height,n.value=[...u],c()}),c(),window.addEventListener("resize",function(){c()});const d=async()=>{let f=document.documentElement.scrollHeight,p=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.clientHeight;if(console.log(p+m,f),p+m>=f)if(document.querySelector(".waterfall .loading").style.display="block",window._waterfallIndex+=6,window._waterfallIndex<=window._waterfallCount){const _=[...t.value.waterfall].slice(0,window._waterfallIndex);await l(_.map(C=>C.image),C=>{_[C.index].width=C.width,_[C.index].height=C.height,n.value=[..._],c()}),document.querySelector(".waterfall .loading").style.display="none"}else document.querySelector(".waterfall .loading").style.display="none"};window.addEventListener("scroll",async()=>{document.querySelector(".waterfall .loading")&&d()}),document.addEventListener("wheel",async f=>{f.deltaY>0&&document.querySelector(".waterfall .loading")&&d()})}),(u,d)=>n.value.length?(z(),ae("div",Ey,[(z(!0),ae(Le,null,xt(n.value,f=>(z(),ae("div",{key:f.title},[f.posts?(z(),ae(Le,{key:0},[f.width?(z(),ae("a",{key:0,class:"item",href:"posts/"+f.posts+".html",style:qt({"background-image":"url("+encodeURI(f.image)+")",width:r.value<500?"calc("+r.value+"px - 5rem)!important":"auto",height:f.height+"px"})},[ie("div",{class:"text a",style:qt({height:f.height+"px"})},[ie("p",Cy,Oe(f.title),1),ie("p",Sy,Oe(f.details),1)],4)],12,ky)):He("",!0)],64)):(z(),ae(Le,{key:1},[f.width?(z(),ae("div",{key:0,class:"item",style:qt([{cursor:"inherit"},{"background-image":"url("+encodeURI(f.image)+")",width:r.value<500?"calc("+r.value+"px - 5rem)!important":"auto",height:f.height+"px"}])},[ie("div",{class:"text",style:qt({height:f.height+"px"})},[ie("p",xy,Oe(f.title),1),ie("p",Ly,Oe(f.details),1)],4)],4)):He("",!0)],64))]))),128)),Oy])):He("",!0)}},Ty=Ae(Ay,[["__file","Waterfall.vue"]]),Py={class:"home"},Ry={__name:"PortfolioLayout",setup(e){const t=dt(),n=it(),o=B(()=>t.value.navbar!==!1&&n.value.navbar!==!1),r=be(!1),s=f=>{r.value=typeof f=="boolean"?f:!r.value},i={x:0,y:0},l=f=>{i.x=f.changedTouches[0].clientX,i.y=f.changedTouches[0].clientY},c=f=>{const p=f.changedTouches[0].clientX-i.x,m=f.changedTouches[0].clientY-i.y;Math.abs(p)>Math.abs(m)&&Math.abs(p)>40&&(p>0&&i.x<=80?s(!0):s(!1))},u=B(()=>[{"no-navbar":!o.value,"no-sidebar":!0,"sidebar-open":r.value},t.value.pageClass]);let d;return tt(()=>{d=zn().afterEach(()=>{s(!1)})}),Fn(()=>{d()}),(f,p)=>(z(),ae("div",{class:ut(["theme-container",u.value]),onTouchstart:l,onTouchend:c},[Fe(f.$slots,"navbar",{},()=>[o.value?(z(),Ne(mu,{key:0,onToggleSidebar:s},{before:$e(()=>[Fe(f.$slots,"navbar-before")]),after:$e(()=>[ge(Ou)]),_:3})):He("",!0)]),ie("div",{class:"sidebar-mask",onClick:p[0]||(p[0]=m=>s(!1))}),Fe(f.$slots,"sidebar",{},()=>[ge(gu,null,{top:$e(()=>[Fe(f.$slots,"sidebar-top")]),bottom:$e(()=>[Fe(f.$slots,"sidebar-bottom")]),_:3})]),ie("main",Py,[ge(vy),ge(du),ge(Ty),ge(Au),ge(wy)])],34))}},Iy=Ae(Ry,[["__file","PortfolioLayout.vue"]]);wb(e=>e.title?{title:e.title,order:e.order}:null);const $y=zt({enhance({app:e}){e.use(Pb)},layouts:{Article:Nb,Category:zb,Tag:Kb,Timeline:Jb,Layout:dy,PortfolioLayout:Iy}}),jy=Object.freeze(Object.defineProperty({__proto__:null,default:$y},Symbol.toStringTag,{value:"Module"})),wr=[Wm,tg,ag,yg,Sg,Pg,D_,B_,_b,yb,Lb,jy].map(e=>e.default).filter(Boolean),My=JSON.parse('{"base":"/awesome-comfyui-workflow/","lang":"en-US","title":"ComfyUI中文爱好者社区","description":"HELLO Mix ComfyUI","head":[["meta",{"name":"description","content":"HELLO Mix ComfyUI"}],["meta",{"name":"keywords","content":"ComfyUI, Chinese community, open source, design, innovation,中文社区, 开源项目, 设计, 创新"}],["meta",{"name":"author","content":"shadow"}],["meta",{"name":"google-adsense-account"}],["script",{"src":"/awesome-comfyui-workflow/javascript/translate.js"}],["script",{"src":"/awesome-comfyui-workflow/javascript/waterfall.min.js"}],["script",{"async":true,"crossorigin":"anonymous"}],["meta",{"name":"google-site-verification","content":"1"}],["link",{"rel":"icon","href":"/favicon.ico"}]],"locales":{}}');var Lo=Dt(My),Ny=Ah,Hy=()=>{const e=em({history:Ny($c("/awesome-comfyui-workflow/")),routes:[{name:"vuepress-route",path:"/:catchAll(.*)",components:{}}],scrollBehavior:(t,n,o)=>o||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,n)=>{if(t.path!==n.path||n===Zt){const o=Mn(t.fullPath);if(o.path!==t.fullPath)return o.path;const r=await o.loader();t.meta={...o.meta,_pageChunk:r}}else t.path===n.path&&(t.meta=n.meta)}),e},Dy=e=>{e.component("ClientOnly",Xr),e.component("Content",cm),e.component("RouteLink",Kt)},By=(e,t,n)=>{const o=B(()=>t.currentRoute.value.path),r=Kl((L,k)=>({get(){return L(),t.currentRoute.value.meta._pageChunk},set(O){t.currentRoute.value.meta._pageChunk=O,k()}})),s=B(()=>On.resolveLayouts(n)),i=B(()=>On.resolveRouteLocale(Lo.value.locales,o.value)),l=B(()=>On.resolveSiteLocaleData(Lo.value,i.value)),c=B(()=>r.value.comp),u=B(()=>r.value.data),d=B(()=>u.value.frontmatter),f=B(()=>On.resolvePageHeadTitle(u.value,l.value)),p=B(()=>On.resolvePageHead(f.value,d.value,l.value)),m=B(()=>On.resolvePageLang(u.value,l.value)),_=B(()=>On.resolvePageLayout(u.value,s.value)),C={layouts:s,pageData:u,pageComponent:c,pageFrontmatter:d,pageHead:p,pageHeadTitle:f,pageLang:m,pageLayout:_,redirects:Qs,routeLocale:i,routePath:o,routes:io,siteData:Lo,siteLocaleData:l};return e.provide(Ei,C),Object.defineProperties(e.config.globalProperties,{$frontmatter:{get:()=>d.value},$head:{get:()=>p.value},$headTitle:{get:()=>f.value},$lang:{get:()=>m.value},$page:{get:()=>u.value},$routeLocale:{get:()=>i.value},$site:{get:()=>Lo.value},$siteLocale:{get:()=>l.value},$withBase:{get:()=>Jr}}),C},Fy=()=>{const e=om(),t=rm();let n=[];const o=()=>{e.value.forEach(i=>{const l=zy(i);l&&n.push(l)})},r=()=>{const i=[];return e.value.forEach(l=>{const c=Uy(l);c&&i.push(c)}),i},s=()=>{document.documentElement.lang=t.value;const i=r();n.forEach((l,c)=>{const u=i.findIndex(d=>l.isEqualNode(d));u===-1?(l.remove(),delete n[c]):i.splice(u,1)}),i.forEach(l=>document.head.appendChild(l)),n=[...n.filter(l=>!!l),...i]};vn(im,s),tt(()=>{o(),et(e,s,{immediate:!1})})},zy=([e,t,n=""])=>{const o=Object.entries(t).map(([l,c])=>Ct(c)?`[${l}=${JSON.stringify(c)}]`:c===!0?`[${l}]`:"").join(""),r=`head > ${e}${o}`;return Array.from(document.querySelectorAll(r)).find(l=>l.innerText===n)||null},Uy=([e,t,n])=>{if(!Ct(e))return null;const o=document.createElement(e);return Kr(t)&&Object.entries(t).forEach(([r,s])=>{Ct(s)?o.setAttribute(r,s):s===!0&&o.setAttribute(r,"")}),Ct(n)&&o.appendChild(document.createTextNode(n)),o},Vy=Np,Wy=async()=>{var n;const e=Vy({name:"Vuepress",setup(){var s;Fy();for(const i of wr)(s=i.setup)==null||s.call(i);const o=wr.flatMap(({rootComponents:i=[]})=>i.map(l=>V(l))),r=sm();return()=>[V(r.value),o]}}),t=Hy();Dy(e),By(e,t,wr);for(const o of wr)await((n=o.enhance)==null?void 0:n.call(o,{app:e,router:t,siteData:Lo}));return e.use(t),{app:e,router:t}};Wy().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{tt as A,nb as B,wu as C,Fn as D,Ky as E,Kr as F,X_ as G,Q_ as H,Xc as I,Hr as J,Ct as K,Pi as P,Kt as R,Ae as _,xc as a,ie as b,ae as c,Wy as createVueApp,Yt as d,ge as e,Ie as f,zn as g,En as h,fo as i,Ko as j,be as k,B as l,pt as m,et as n,z as o,V as p,_u as q,uo as r,J_ as s,Yl as t,qy as u,G_ as v,$e as w,Y_ as x,tn as y,Dt as z}; diff --git "a/docs/assets/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.html-DfuoVJYG.js" "b/docs/assets/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.html-DfuoVJYG.js" deleted file mode 100644 index b780287..0000000 --- "a/docs/assets/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.html-DfuoVJYG.js" +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as a,b as t,d as n}from"./app-BFngqcKR.js";const i={},r=t("p",null,[t("img",{src:"https://i.ytimg.com/vi/03uoOPu5X8Y/maxresdefault.jpg",alt:"https://www.youtube.com/watch?v=03uoOPu5X8Y"}),n(" 0:00 / 3:39")],-1),m=t("p",null,[t("a",{href:"https://www.youtube.com/watch?v=03uoOPu5X8Y",target:"_blank",rel:"noopener noreferrer"},"comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能")],-1),c=[r,m];function p(s,u){return a(),o("div",null,c)}const d=e(i,[["render",p],["__file","comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能.html.vue"]]),_=JSON.parse('{"path":"/posts/discovery/comfyui%20mixlab%20nodes%20%E6%8F%92%E4%BB%B6%20%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%94%9F%E6%88%90APP%20%E9%80%8F%E6%98%8Epng%E5%9B%BE%E5%83%8F%20%E5%A4%9A%E7%A7%8D%E5%8A%9F%E8%83%BD.html","title":"","lang":"en-US","frontmatter":{"description":"https://www.youtube.com/watch?v=03uoOPu5X8Y 0:00 / 3:39 comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/comfyui%20mixlab%20nodes%20%E6%8F%92%E4%BB%B6%20%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%94%9F%E6%88%90APP%20%E9%80%8F%E6%98%8Epng%E5%9B%BE%E5%83%8F%20%E5%A4%9A%E7%A7%8D%E5%8A%9F%E8%83%BD.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:description","content":"https://www.youtube.com/watch?v=03uoOPu5X8Y 0:00 / 3:39 comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://i.ytimg.com/vi/03uoOPu5X8Y/maxresdefault.jpg"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-05-28T10:54:39.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:description","content":"https://www.youtube.com/watch?v=03uoOPu5X8Y 0:00 / 3:39 comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"https://i.ytimg.com/vi/03uoOPu5X8Y/maxresdefault.jpg\\"],\\"dateModified\\":\\"2024-05-28T10:54:39.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1716893679000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/discovery/comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能.md","autoDesc":true,"excerpt":"

\\"https://www.youtube.com/watch?v=03uoOPu5X8Y\\"\\n0:00 / 3:39

\\n

comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能

\\n"}');export{d as comp,_ as data}; diff --git a/docs/assets/default_workflow-bUpa9A5u.svg b/docs/assets/default_workflow-bUpa9A5u.svg deleted file mode 100644 index 4ee3f22..0000000 --- a/docs/assets/default_workflow-bUpa9A5u.svg +++ /dev/null @@ -1 +0,0 @@ -T: 0.00sI: 0N: 7 [7]V: 20FPS:58.82CLIP Text Encode (Prompt)clipCONDITIONINGtext, watermark CLIP Text Encode (Prompt)clipCONDITIONINGbeautiful scenery nature glass bottle landscape, , purple galaxy bottle, Empty Latent ImageLATENTwidth512height512batch_size1KSamplermodelpositivenegativelatent_imageLATENTseed156680208700286control_after_generaterandomizesteps20cfg8.000sampler_nameeulerschedulernormaldenoise1.000Load CheckpointMODELCLIPVAEckpt_name526Mix_v145.safetensorsPreview ImageimagesVAE DecodesamplesvaeIMAGE{"last_node_id":10,"last_link_id":10,"nodes":[{"id":7,"type":"CLIPTextEncode","pos":[413,389],"size":{"0":425.27801513671875,"1":180.6060791015625},"flags":{},"order":3,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["text, watermark"]},{"id":6,"type":"CLIPTextEncode","pos":[415,186],"size":{"0":422.84503173828125,"1":164.31304931640625},"flags":{},"order":2,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"]},{"id":5,"type":"EmptyLatentImage","pos":[473,609],"size":{"0":315,"1":106},"flags":{},"order":0,"mode":0,"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"properties":{"Node name for S&R":"EmptyLatentImage"},"widgets_values":[512,512,1]},{"id":3,"type":"KSampler","pos":[863,186],"size":{"0":315,"1":262},"flags":{},"order":4,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[156680208700286,"randomize",20,8,"euler","normal",1]},{"id":4,"type":"CheckpointLoaderSimple","pos":[26,474],"size":{"0":315,"1":98},"flags":{},"order":1,"mode":0,"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"properties":{"Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["526Mix_v145.safetensors"]},{"id":10,"type":"PreviewImage","pos":[1457,193],"size":{"0":210,"1":26},"flags":{},"order":6,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":10}],"properties":{"Node name for S&R":"PreviewImage"}},{"id":8,"type":"VAEDecode","pos":[1209,188],"size":{"0":210,"1":46},"flags":{},"order":5,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[10],"slot_index":0}],"properties":{"Node name for S&R":"VAEDecode"}}],"links":[[1,4,0,3,0,"MODEL"],[2,5,0,3,3,"LATENT"],[3,4,1,6,0,"CLIP"],[4,6,0,3,1,"CONDITIONING"],[5,4,1,7,0,"CLIP"],[6,7,0,3,2,"CONDITIONING"],[7,3,0,8,0,"LATENT"],[8,4,2,8,1,"VAE"],[10,8,0,10,0,"IMAGE"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file diff --git a/docs/assets/index.html-5qMQC16d.js b/docs/assets/index.html-5qMQC16d.js deleted file mode 100644 index 8f396cd..0000000 --- a/docs/assets/index.html-5qMQC16d.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,r as o,c as a,e as n,o as c}from"./app-BFngqcKR.js";const r={};function s(l,i){const e=o("Catalog");return c(),a("div",null,[n(e)])}const p=t(r,[["render",s],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/posts/discovery/","title":"Discovery","lang":"en-US","frontmatter":{"title":"Discovery"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{p as comp,m as data}; diff --git a/docs/assets/index.html-AGgdmCHk.js b/docs/assets/index.html-AGgdmCHk.js deleted file mode 100644 index e515ea4..0000000 --- a/docs/assets/index.html-AGgdmCHk.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o}from"./app-BFngqcKR.js";const i={};function a(m,s){return o(),t("div")}const r=e(i,[["render",a],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/","title":"Home","lang":"en-US","frontmatter":{"home":false,"layout":"PortfolioLayout","title":"Home","heroImage":"/logo.png","heroHeight":88,"actions":[{"text":"加入国际社区","link":"https://discord.gg/cXs9vZSqeK","type":"primary"},{"text":"Mixlab微信社群申请","link":"http://mixlab-co.mikecrm.com/wgn0LPw","type":"secondary"}],"share":true,"waterfall":[{"title":"BadCat探索者:生成APP和透明png图像多功能插件","image":"https://i.ytimg.com/vi/03uoOPu5X8Y/maxresdefault.jpg","details":"comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能","posts":"discovery/comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能"},{"title":"Comfyui Realtime LCM with Photoshop, Blender, C4D","image":"images/realtime-design.png","details":"如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。","posts":"discovery/Comfyui Realtime LCM with Photoshop"},{"title":"聊聊Mixlab Node","image":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts221/v4/c4/0c/55/c40c557b-66f2-6078-2130-b1fe97aa339c/mza_2664138711369555086.jpeg/313x0w.webp","details":"Mixlab Node在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。","posts":"discovery/聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态"},{"title":"AI如何改变产品经理的工作","image":"https://bts-image.xyzcdn.net/aHR0cHM6Ly9pbWFnZS54eXpjZG4ubmV0L0ZuRWxOVnBPTG5QT0Q5WklGSl93azkxU1JOWkEuanBn.jpg","details":"熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。","posts":"discovery/AI如何改变产品经理的工作"},{"title":"推荐玩腻了A1111的朋友试一下comfyui,速度更快,内存占用更少,工作流方便分享,可以一键封装成应用,还可以把窗口来出来对屏幕上某个区域做实时转译(类似Kirta的功能,需要使用comfyui-mixlab-nodes的工作流)。","posts":"https://m.weibo.cn/status/4991913170309251","image":"images/weibo_simon.png"},{"title":"如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下","posts":"discovery/prompt","image":"images/prompt.png"},{"title":"实时绘画工作流","posts":"https://openart.ai/workflows/mixlab_shadow/now-you-can-enjoy-real-time-drawing/uLOTaEe06dtL0UECkdHz","image":"images/openart.png"},{"title":"comfyui-mixlab-nodes","image":"https://gyazo.com/952b1a7722b91862507df871e2da41aa/max_size/1000","posts":"https://scrapbox.io/work4ai/comfyui-mixlab-nodes"},{"title":"🚀🚗🚚🏃 ComfyUI-Workflow-to-APP @mixlab-nodes","image":"https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8336b034-8dd8-414f-8667-c5afe09ffdb6/width=525/8336b034-8dd8-414f-8667-c5afe09ffdb6.jpeg","posts":"https://civitai.com/articles/3619/comfyui-workflow-to-app-mixlab-nodes"},{"title":"Realtime Sketchup AI Generation using Comfy UI : Ai for Architecture","image":"https://i.ytimg.com/vi/eM-9ySQnFcw/hqdefault.jpg","posts":"https://www.youtube.com/watch?v=eM-9ySQnFcw"}],"footer":"MIT Licensed | Copyright © 2024-present {{$site.title}}","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"Home"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.693Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-06-06T08:49:44.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.693Z"}],["meta",{"name":"twitter:title","content":"Home"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Home\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-06-06T08:49:44.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1717663784000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":7}]},"filePathRelative":"index.md","excerpt":""}');export{r as comp,c as data}; diff --git a/docs/assets/index.html-BE0QCtrF.js b/docs/assets/index.html-BE0QCtrF.js deleted file mode 100644 index f0ddf2b..0000000 --- a/docs/assets/index.html-BE0QCtrF.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as n,o,b as t}from"./app-BFngqcKR.js";const i={},a=t("h1",{id:"实验性节点",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#实验性节点"},[t("span",null,"实验性节点")])],-1),r=t("p",null,"Self-Attention Guidance",-1),c=t("p",null,"https://ku-cvlab.github.io/Self-Attention-Guidance/",-1),s=[a,r,c];function p(m,l){return o(),n("div",null,s)}const u=e(i,[["render",p],["__file","index.html.vue"]]),h=JSON.parse('{"path":"/posts/tutorial/for_testing/","title":"实验性节点","lang":"en-US","frontmatter":{"description":"实验性节点 Self-Attention Guidance https://ku-cvlab.github.io/Self-Attention-Guidance/","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/for_testing/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"实验性节点"}],["meta",{"property":"og:description","content":"实验性节点 Self-Attention Guidance https://ku-cvlab.github.io/Self-Attention-Guidance/"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.696Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-05-28T09:13:14.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.696Z"}],["meta",{"name":"twitter:title","content":"实验性节点"}],["meta",{"name":"twitter:description","content":"实验性节点 Self-Attention Guidance https://ku-cvlab.github.io/Self-Attention-Guidance/"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"实验性节点\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-05-28T09:13:14.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1716887594000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/tutorial/_for_testing/index.md","autoDesc":true,"excerpt":"\\n

Self-Attention Guidance

\\n

https://ku-cvlab.github.io/Self-Attention-Guidance/

\\n"}');export{u as comp,h as data}; diff --git a/docs/assets/index.html-BEvPFGQD.js b/docs/assets/index.html-BEvPFGQD.js deleted file mode 100644 index 7f181af..0000000 --- a/docs/assets/index.html-BEvPFGQD.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./app-BFngqcKR.js";const r={};function c(n,o){return a(),t("div")}const s=e(r,[["render",c],["__file","index.html.vue"]]),i=JSON.parse('{"path":"/tag/","title":"Tags","lang":"en-US","frontmatter":{"title":"Tags","sidebar":false,"blog":{"type":"category","key":"tag"},"layout":"Tag"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{s as comp,i as data}; diff --git a/docs/assets/index.html-BPixZUqn.js b/docs/assets/index.html-BPixZUqn.js deleted file mode 100644 index 9b8c9b3..0000000 --- a/docs/assets/index.html-BPixZUqn.js +++ /dev/null @@ -1,4 +0,0 @@ -import{_ as s,r as l,c as i,b as o,d as e,e as t,w as a,a as n,o as d}from"./app-BFngqcKR.js";const c="/awesome-comfyui-workflow/assets/DiffusersLoader-mzdmk8hT.svg",r="/awesome-comfyui-workflow/assets/LoadCheckpointWithConfig-BN6zB4MN.svg",h="/awesome-comfyui-workflow/assets/ApplyControlNet-T6FeDJLs.svg",m="/awesome-comfyui-workflow/assets/ApplyStyleModel-BjkUEVpq.svg",g="/awesome-comfyui-workflow/assets/CLIPSetLastLayer-B9W3GWtU.svg",u="/awesome-comfyui-workflow/assets/CLIPTextEncodePrompt-hZy3NNU2.svg",f="/awesome-comfyui-workflow/assets/CLIPVisionEncode-CftDdXV-.svg",k="/awesome-comfyui-workflow/assets/ConditioningAverage-Drh7U2UB.svg",L="/awesome-comfyui-workflow/assets/ConditioningCombine-C3NkkjHK.svg",I="/awesome-comfyui-workflow/assets/ConditioningSetArea-dVMUIFKq.svg",b="/awesome-comfyui-workflow/assets/ConditioningSetMask-VXvrA2C9.svg",v="/awesome-comfyui-workflow/assets/GLIGENTextboxApply-D4bHz8Hm.svg",w="/awesome-comfyui-workflow/assets/unCLIPConditioning-DLHXFnff.svg",C="/awesome-comfyui-workflow/assets/LoadLatent-C85_Mtz4.svg",_="/awesome-comfyui-workflow/assets/SaveLatent-DtsgIWDD.svg",x="/awesome-comfyui-workflow/assets/TomePatchModel-BBDtRE1G.svg",T="/awesome-comfyui-workflow/assets/TokenMergingforStableDiffusion-CqqHudlC.jpg",y="/awesome-comfyui-workflow/assets/VAEDecodeTiled-DY9VBdS9.svg",E="/awesome-comfyui-workflow/assets/VAEEncodeTiled-BQJoK_t9.svg",M="/awesome-comfyui-workflow/assets/LoadImage-CIzP9BtT.svg",N="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAzMDAgMTAyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zOnNlcmlmPSJodHRwOi8vd3d3LnNlcmlmLmNvbS8iIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDsiPjxnPjx1c2UgeGxpbms6aHJlZj0iI19JbWFnZTEiIHg9IjAiIHk9IjAiIHdpZHRoPSI0MTBweCIgaGVpZ2h0PSIyMjZweCIgdHJhbnNmb3JtPSJtYXRyaXgoMSwwLDAsMSwtNTUsLTQ4KSIvPjxnPjxnPjxyZWN0IHg9IjQ1IiB5PSIyMiIgd2lkdGg9IjIxMSIgaGVpZ2h0PSI1NiIgc3R5bGU9ImZpbGw6IzM1MzUzNTtmaWxsLXJ1bGU6bm9uemVybzsiLz48cmVjdCB4PSI0NSIgeT0iNTEiIHdpZHRoPSIyMTEiIGhlaWdodD0iMiIgc3R5bGU9ImZpbGwtb3BhY2l0eTowLjI7Ii8+PHJlY3QgeD0iNDUiIHk9IjIyIiB3aWR0aD0iMjExIiBoZWlnaHQ9IjMwIiBzdHlsZT0iZmlsbDojMzMzO2ZpbGwtcnVsZTpub256ZXJvOyIvPjxwYXRoIGQ9Ik02NSwzN2MtMCwyLjc0MyAtMi4yNTcsNSAtNSw1Yy0yLjc0MywtMCAtNSwtMi4yNTcgLTUsLTVjMCwtMi43NDMgMi4yNTcsLTUgNSwtNWMyLjc0MSwtMCA0Ljk5NywyLjI1NCA1LDQuOTk1IiBzdHlsZT0iZmlsbDojNjY2O2ZpbGwtcnVsZTpub256ZXJvOyIvPjx0ZXh0IHg9Ijc1cHgiIHk9IjQycHgiIHN0eWxlPSJmb250LWZhbWlseTonQXJpYWxNVCcsICdBcmlhbCcsIHNhbnMtc2VyaWY7Zm9udC1zaXplOjE0cHg7ZmlsbDojOTk5OyI+SW52ZXJ0IEltYWdlPC90ZXh0PjxwYXRoIGQ9Ik01OSw2NmMtMCwyLjE5NCAtMS44MDYsNCAtNCw0Yy0yLjE5NCwtMCAtNCwtMS44MDYgLTQsLTRjMCwtMi4xOTQgMS44MDYsLTQgNCwtNGMyLjE5MywtMCAzLjk5OCwxLjgwMyA0LDMuOTk2IiBzdHlsZT0iZmlsbDojNjRiNWY2O2ZpbGwtcnVsZTpub256ZXJvOyIvPjx0ZXh0IHg9IjY1cHgiIHk9IjcxcHgiIHN0eWxlPSJmb250LWZhbWlseTonQXJpYWxNVCcsICdBcmlhbCcsIHNhbnMtc2VyaWY7Zm9udC1zaXplOjEycHg7ZmlsbDojYWFhOyI+aW1hZ2U8L3RleHQ+PHBhdGggZD0iTTI1MCw2NmMtMCwyLjE5NCAtMS44MDYsNCAtNCw0Yy0yLjE5NCwtMCAtNCwtMS44MDYgLTQsLTRjMCwtMi4xOTQgMS44MDYsLTQgNCwtNGMyLjE5MywtMCAzLjk5OCwxLjgwMyA0LDMuOTk2IiBzdHlsZT0iZmlsbDojNjRiNWY2O2ZpbGwtcnVsZTpub256ZXJvO3N0cm9rZTojMDAwO3N0cm9rZS13aWR0aDoxcHg7Ii8+PHRleHQgeD0iMTk3LjMyOHB4IiB5PSI3MXB4IiBzdHlsZT0iZm9udC1mYW1pbHk6J0FyaWFsTVQnLCAnQXJpYWwnLCBzYW5zLXNlcmlmO2ZvbnQtc2l6ZToxMnB4O2ZpbGw6I2FhYTsiPklNQUdFPC90ZXh0PjwvZz48L2c+PC9nPjxkZWZzPjxpbWFnZSBpZD0iX0ltYWdlMSIgd2lkdGg9IjQxMHB4IiBoZWlnaHQ9IjIyNnB4IiB4bGluazpocmVmPSJkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQVpvQUFBRGlDQVlBQUFCM0FBRjdBQUFBQ1hCSVdYTUFBQTdFQUFBT3hBR1ZLdzRiQUFBR0drbEVRVlI0bk8zZFFVb2theENGMGNnMnhVVVVOWEgvR3hUUmZJUEdZWnZDeTV0R1pad3o3VUFzN3VBREcvNWFYbDlmdC9yRysvdDdQVDgvZjNmeXEzZHZiMjlWVmZYeTh0THk5NXQyWjQ5ZWQvYm9kVGQxanorN2x3RHdQd2dOQUZITC9YNy85azluM1gxK2ZsWlYxWjgvbXRtQlBYcXhSeTlUOTFqMy9zNzIyMy9iMi9QMU44OUgveHhYdWJOSHJ6dDc5THFidXNlc3JBSndPcUVCSUVwb0FJZ1NHZ0NpaEFhQUtLRUJJRXBvQUlnU0dnQ2l2QXpBb2V6Uml6MTZtYnFIbHdIYzJlUENkL2JvZFRkMWoxbFpCZUIwUWdOQWxOQUFFQ1UwQUVRSkRRQlJRZ05BbE5BQUVDVTBBRVI1R1lCRDJhTVhlL1F5ZFE4dkE3aXp4NFh2N05IcmJ1b2VzN0lLd09tRUJvQW9vUUVnU21nQWlCSWFBS0tFQm9Bb29RRWdTbWdBaUZwdXQ5dER2d3dBUUcvcjA5UFRQLzl4MjdiYXRxMldaYWxsV1U2N3EvcjdWTU5QN2o0K1BxcXFhdTl6Vk5YdXovcXR6OXY5cnNvZW5lNnE3TkhwcnNvZWUzZnJ1cTdmZnBqZmZycGd6OWR3UC9rY2V6ZUozMi9hblQxNjNkbWoxOTNVUGZ3ZkRRQlJRZ05BbE5BQUVDVTBBRVFKRFFCUlFnTkFsTkFBRUxYYzcvZUhmaGxnNm5kd2QyV1BYdXpSeTlROTFrZi83dXFwMzhIZDljNGV2ZTdzMGV0dTZoNnpzZ3JBNllRR2dDaWhBU0JLYUFDSUVob0Fvb1FHZ0NpaEFTQkthQUNJOGpJQWg3SkhML2JvWmVvZVhnWndaNDhMMzltajE5M1VQV1psRllEVENRMEFVVUlEUUpUUUFCQWxOQUJFQ1EwQVVVSURRSlRRQUJEbFpRQU9aWTllN05ITDFEMjhET0RPSGhlK3MwZXZ1Nmw3ek1vcUFLY1RHZ0NpaEFhQUtLRUJJRXBvQUlnU0dnQ2loQWFBS0tFQklNckxBQnpLSHIzWW81ZXBlM2dad0owOUxueG5qMTUzVS9lWWxWVUFUaWMwQUVRSkRRQlJRZ05BbE5BQUVDVTBBRVFKRFFCUlFnTkFsSmNCT0pROWVyRkhMMVAzOERLQU8zdGMrTTRldmU2bTdqRXJxd0NjVG1nQWlCSWFBS0tFQm9Bb29RRWdTbWdBaUJJYUFLS0VCb0FvTHdOd0tIdjBZbzllcHU3aFpRQjM5cmp3blQxNjNVM2RZMVpXQVRpZDBBQVFKVFFBUkFrTkFGRkNBMENVMEFBUUpUUUFSQWtOQUZGZUJ1QlE5dWpGSHIxTTNjUExBTzdzY2VFN2UvUzZtN3JIckt3Q2NEcWhBU0JLYUFDSUVob0Fvb1FHZ0NpaEFTQkthQUNJRWhvQW9yd013S0hzMFlzOWVwbTZoNWNCM05uanduZjI2SFUzZFk5WldRWGdkRUlEUUpUUUFCQWxOQUJFQ1EwQVVVSURRSlRRQUJBbE5BQkVlUm1BUTltakYzdjBNblVQTHdPNHM4ZUY3K3pSNjI3cUhyT3lDc0RwaEFhQUtLRUJJRXBvQUlnU0dnQ2loQWFBS0tFQklFcG9BSWhhYnJmYlE3OE1BRUJ2NjlQVDB6Ly9jZHUyMnJhdGxtV3BaVmxPdTZ2NisxVERUKzQrUGo2cXFtcnZjMVRWN3MvNnJjL2IvYTdLSHAzdXF1elI2YTdLSG50MzY3cXUzMzZZMzM2NllNL1hjRC81SEhzM2lkOXYycDA5ZXQzWm85ZmQxRDM4SHcwQVVVSURRSlRRQUJBbE5BQkVDUTBBVVVJRFFKVFFBQkMxM08vM2gzNFpZT3AzY0hkbGoxN3MwY3ZVUGRaSC8rN3FxZC9CM2ZYT0hyM3U3TkhyYnVvZXM3SUt3T21FQm9Bb29RRWdTbWdBaUJJYUFLS0VCb0Fvb1FFZ1NtZ0FpUEl5QUlleVJ5LzI2R1hxSGw0R2NHZVBDOS9abzlmZDFEMW1aUldBMHdrTkFGRkNBMENVMEFBUUpUUUFSQWtOQUZGQ0EwQ1UwQUFRNVdVQURtV1BYdXpSeTlROXZBemd6aDRYdnJOSHI3dXBlOHpLS2dDbkV4b0Fvb1FHZ0NpaEFTQkthQUNJRWhvQW9vUUdnQ2loQVNES3l3QWN5aDY5MktPWHFYdDRHY0NkUFM1OFo0OWVkMVAzbUpWVkFFNG5OQUJFQ1EwQVVVSURRSlRRQUJBbE5BQkVDUTBBVVVJRFFKU1hBVGlVUFhxeFJ5OVQ5L0F5Z0R0N1hQak9IcjN1cHU0eEs2c0FuRTVvQUlnU0dnQ2loQWFBS0tFQklFcG9BSWdTR2dDaWhBYUFLQzhEY0NoNzlHS1BYcWJ1NFdVQWQvYTQ4SjA5ZXQxTjNXTldWZ0U0bmRBQUVDVTBBRVFKRFFCUlFnTkFsTkFBRUNVMEFFUUpEUUJSWGdiZ1VQYm94UjY5VE4zRHl3RHU3SEhoTzN2MHVwdTZ4NnlzQW5BNm9RRWdTbWdBaUJJYUFLS0VCb0Fvb1FFZ1NtZ0FpQklhQUtLOERNQ2g3TkdMUFhxWnVvZVhBZHpaNDhKMzl1aDFOM1dQV1ZrRjRIUkNBMENVMEFBUUpUUUFSQWtOQUZGQ0EwQ1UwQUFRSlRRQVJIa1pnRVBab3hkNzlESjFEeThEdUxQSGhlL3MwZXR1Nmg2enNnckE2ZjREczhKS0s4a2oxZmdBQUFBQVNVVk9SSzVDWUlJPSIvPjwvZGVmcz48L3N2Zz4=",V="/awesome-comfyui-workflow/assets/PadImageForOutpainting-Dzr-CDCB.svg",U="/awesome-comfyui-workflow/assets/PreviewImage-Br5eeeHl.svg",A="/awesome-comfyui-workflow/assets/SaveImage-z3yAym7e.svg",S="/awesome-comfyui-workflow/assets/ImageBlend-CAd_GaLc.svg",P="/awesome-comfyui-workflow/assets/ImageBlur-BZL9jSkN.svg",R="/awesome-comfyui-workflow/assets/ImageQuantize-WjbyHjQe.svg",F="/awesome-comfyui-workflow/assets/ImageSharpen-CAocoy-2.svg",Z="/awesome-comfyui-workflow/assets/UpscaleImage-CCa7VY0g.svg",Q="/awesome-comfyui-workflow/assets/UpscaleImageUsingModel-DV-SF4Wg.svg",B="/awesome-comfyui-workflow/assets/EmptyLatentImage-D8EMT608.svg",D="/awesome-comfyui-workflow/assets/LatentComposite-UQ81jvlz.svg",W="/awesome-comfyui-workflow/assets/LatentCompositeMasked-DZJAVyUF.svg",G="/awesome-comfyui-workflow/assets/UpscaleLatent-I-gJiwEn.svg",z="/awesome-comfyui-workflow/assets/VAEDecode-B-picWPt.svg",O="/awesome-comfyui-workflow/assets/VAEEncode-D5EYZEJ2.svg",j="/awesome-comfyui-workflow/assets/LatentFromBatch-YeN1b-Lj.svg",H="/awesome-comfyui-workflow/assets/RebatchLatents-YWT5gNwM.svg",J="/awesome-comfyui-workflow/assets/RepeatLatentBatch-BqPx0NXv.svg",Y="/awesome-comfyui-workflow/assets/SetLatentNoiseMask-MmkLdInd.svg",X="/awesome-comfyui-workflow/assets/VAEEncodeForInpainting-DD-YX7G1.svg",q="/awesome-comfyui-workflow/assets/CropLatent-B_cR3_Xi.svg",K="/awesome-comfyui-workflow/assets/FlipLatent-DBtA-SV6.svg",$="/awesome-comfyui-workflow/assets/RotateLatent-CFLvhpt7.svg",ee="/awesome-comfyui-workflow/assets/GLIGENLoader-D-vTl3Sj.svg",oe="/awesome-comfyui-workflow/assets/HypernetworkLoader-C8B_JGiF.svg",pe="/awesome-comfyui-workflow/assets/LoadCheckpoint-BQouw9PX.svg",te="/awesome-comfyui-workflow/assets/LoadCLIP-C94A2T08.svg",ae="/awesome-comfyui-workflow/assets/LoadCLIPVision-CtFF4wbm.svg",ne="/awesome-comfyui-workflow/assets/LoadControlNet-DHg5P2Us.svg",se="/awesome-comfyui-workflow/assets/LoadLoRA-Bng2EN8f.svg",le="/awesome-comfyui-workflow/assets/LoadStyleModel-cphcEIxJ.svg",ie="/awesome-comfyui-workflow/assets/LoadUpscaleModel-C74PIl6V.svg",de="/awesome-comfyui-workflow/assets/LoadVAE-2X0vkEPY.svg",ce="/awesome-comfyui-workflow/assets/unCLIPCheckpointLoader-ii62sfkE.svg",re="/awesome-comfyui-workflow/assets/ConvertImageToMask-cXPU6ybK.svg",he="/awesome-comfyui-workflow/assets/CropMask-9iFwdALP.svg",me="/awesome-comfyui-workflow/assets/FeatherMask-CFIc33fP.svg",ge="/awesome-comfyui-workflow/assets/InvertMask-CXALs9bU.svg",ue="/awesome-comfyui-workflow/assets/LoadImageAsMask-CvgYUE6N.svg",fe="/awesome-comfyui-workflow/assets/MaskComposite-D-LgFTnL.svg",ke="/awesome-comfyui-workflow/assets/SolidMask-Ch9FCV-j.svg",Le="/awesome-comfyui-workflow/assets/KSampler-LOr6cHLj.svg",Ie="/awesome-comfyui-workflow/assets/KSamplerADV-0c9yINrV.svg",be={},ve=n('

核心节点

扩散模型加载器

Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。

图片

输入

  • model_path:扩散器模型的路径

输出

  • MODEL:用于去噪潜变量的模型。

  • CLIP:用于编码文本提示的CLIP模型。

  • VAE:用于将图像编码和解码到潜空间的VAE模型。


加载检查点节点

Load Checkpoint (With Config) 节点,可用于根据提供的配置文件加载扩散模型。请注意,通常情况下,常规的Checkpoint能够自动检测出适当的配置。

图片

输入

  • config_name:配置文件的名称。

  • ckpt_name:要加载的模型的名称。

输出

  • MODEL:用于去噪潜变量的模型。

  • CLIP:用于编码文本提示的CLIP模型。

  • VAE:用于将图像编码和解码到潜空间的VAE模型。


条件设定

在ComfyUI中,条件设定用于指导扩散模型生成特定的输出。所有的条件设定都以由CLIP使用Clip Text Encode节点嵌入的文本提示开始。

这些条件可以通过该部分其他节点的进一步增强或修改。例如,使用Conditioning (Set Area)、Conditioning (Set Mask)或GLIGEN Textbox Apply节点来引导进程朝着特定的构图方向发展。

或者通过Apply Style Model、应用ControlNet或 unCLIP Conditioning 节点来提供额外的视觉提示。相关节点的完整列表可以在侧边栏中找到。

应用ControlNet模型 Apply ControlNet

Apply ControlNet节点,可以用于为扩散模型提供进一步的视觉指导。与unCLIP嵌入不同,controlnets 和 T2IAdaptor 适用于任何模型。

图片

通过将多个节点链接在一起,可以使用多个 controlNet 或 T2IAdaptor 来指导扩散模型。例如,可以通过向此节点提供包含边缘检测的图像以及在边缘检测图像上训练的controlNet来提示扩散模型。

输入

  • conditioning:一个条件

  • control_net: control_net模型

  • image:用作扩散模型的视觉指导

输出

  • CONDITIONING:一个包含control_net和视觉指导的条件。

提示:要使用T2IAdaptor样式模型,请改用Apply Style Model节点。


应用风格模型

Apply Style Model节点是一个用于为扩散模型提供视觉指导的节点,特别是针对所生成图像的样式。该节点使用T2IAdaptor 模型和来自 CLIP_vision 模型的嵌入,将扩散模型引导到与 CLIP_vision 嵌入图像的样式相符的方向。

图片

输入

  • conditioning:一个条件

  • style_model:一个T2I样式适配器

  • CLIP_vision_output:包含所需样式的图像,由CLIP视觉模型编码

输出

  • CONDITIONING:包含T2I样式适配器和指向所需样式的视觉指导的条件

设置CLIP最后一层

设置CLIP最后一层,CLIP Set Last Layer节点可以用于设置从中获取文本嵌入的CLIP输出层。将文本编码为嵌入是通过将文本通过CLIP模型中的各个层进行转换来实现的。尽管传统上扩散模型是根据CLIP的最后一层的输出进行条件化的,但某些扩散模型是根据较早的层进行条件化的,当使用最后一层的输出时可能效果不佳。

CLIP Set Last Layer

输入

  • clip: 用于编码文本的CLIP模型。

输出

  • CLIP: 设置了新的输出层的CLIP模型。

如何理解Clip set last layer的原理?CLIP模型是由OpenAI开发的强大深度学习模型,它结合了视觉和语言理解。它能够以多模态方式理解和生成文本和图像。CLIP由多个层级组成,每个层级比前一个层级更具体。 ​

Clip set last layer 指的是在CLIP模型中在较早的层级停止信息流动,而不是一直到最后一层。通过这样做,您可以控制生成的文本描述的具体程度或准确性。例如,如果您正在寻找一张“牛”的图片,您可能对文本模型能够生成的子类别或具体类型的牛不感兴趣,比如“阿伯丁安格斯公牛”。 ​

使用 Clip set last layer 的好处在于,它允许您根据特定需求定制生成的文本描述的详细程度。根据应用或任务的不同,您可能希望在某个层级停止,以达到所需的准确性或相关性。例如,如果您有一个关于一个年轻人站在田野上的详细提示,使用较低的CLIP skip层级可能会生成诸如“一个站着的人”,“站着的年轻人”或“站在森林中的年轻人”等描述,每个描述都具有不同的特定程度。 ​

值得注意的是,Clip set last layer 在与特定方式结构化的模型(如Booru模型)一起使用时特别有用。这些模型通常具有可以分解为多个子标签的标签,从而可以更精细地控制生成的描述。然而,CLIP skip的效果可能因具体的模型和应用而异,可能需要一些试错才能找到最佳设置。 ​

还值得一提的是,Clip set last layer 仅适用于使用CLIP或基于使用CLIP的模型,如1.x模型及其衍生模型。较新的模型,如2.0模型,使用OpenCLIP而不是CLIP,并且与CLIP的交互方式不同。知识库

文本提示

输入Prompt(文本提示),CLIP文本编码节点将使用CLIP模型对文本提示进行编码,生成一个嵌入向量,用来指导扩散模型生成特定的图像。

图片

有关ComfyUI中所有与文本提示相关的功能的完整指南,请参阅此页面

输入

  • clip - 用于编码文本的CLIP模型

  • text - 要编码的文本。

输出

  • CONDITIONING - 包含嵌入文本的条件,用于指导扩散模型。

视觉编码

CLIP Vision Encode node

CLIP Vision Encode节点可以使用CLIP视觉模型对图像进行编码,生成可用于指导 unCLIP 扩散模型或作为样式模型输入的嵌入。

输入

clip_vision

: 用于编码图像的CLIP视觉模型

image

: 待编码的图像.

输出

CLIP_VISION_OUTPUT

: 编码后的图像。

平均条件化

Conditioning (Average) node

条件化平均节点,Conditioning (Average) 节点可以根据在 conditioning_to_strength 中设置的强度因子,在两个文本嵌入之间进行插值。

输入

conditioning_to

: 在 conditioning_to_strength 为1时的文本嵌入的条件化

conditioning_from

: 在 conditioning_to_strength 为0时的文本嵌入的条件化。

conditioning_to_strength

: 混合 conditioning_to 到 conditioning_from 的因子。

输出

CONDITIONING

: 基于 conditioning_to_strength 混合的文本嵌入的新条件化。

Conditioning (Combine)

Conditioning (Combine) node

条件化(合并),Conditioning (Combine) 节点可用于通过平均扩散模型的预测噪声来合并多个条件化。请注意,这与 Conditioning (Average) 节点不同。在这里,通过不同条件化(即构成条件化的所有部分)的扩散模型输出进行平均处理,而条件化(平均)节点则插值存储在条件化内部的文本嵌入。

!!! 提示 尽管 Conditioning Combine 没有一个因素输入来确定如何插值两个结果噪声预测,但可以使用 Conditioning (Set Area) 节点在组合它们之前对各个条件进行加权。

输入

conditioning_1

: 第一个条件。

conditioning_2

: 第二个条件。

输出

CONDITIONING

: 一个包含两个输入的新条件,稍后由采样器进行平均。

Conditioning (Set Area)

Conditioning (Set Area) node

Conditioning (Set Area)节点可以用于将条件限制在图像的特定区域内。与Conditioning (Combine)节点一起使用,可以对最终图像的组合进行更多的控制。

!!! 提示 ComfyUI中坐标系统的原点位于左上角。在混合扩散模型的多个噪声预测之前,强度会被归一化。

输入

conditioning

: 将被限制在区域内的条件

width

: 区域的宽度

height

: 区域的高度

x

: 区域的x坐标

y

: 区域的y坐标

strength

: 当混合多个重叠的条件时使用的区域权重

输出

CONDITIONING

: 一个新的条件,限制在指定的区域内。

Conditioning (Set Mask)

Conditioning (Set Mask) node

条件化(设置遮罩),Conditioning (Set Mask) 节点可用于将条件化限制在指定的遮罩中。与Conditioning (Combine) 节点一起使用,可以更好地控制最终图像的组合。

!!! 提示 强度在从扩散模型中混合多个噪声预测之前进行归一化。

输入

conditioning

: 限制到遮罩的条件化

mask

: 限制条件化的遮罩

strength

: 在混合多个重叠条件化时使用的遮罩区域的权重。

set_cond_area

: 是否对整个区域进行去噪,还是限制在遮罩的边界框内。

输出

CONDITIONING

: 一个新的条件化,限制在指定的遮罩中。

example

example usage text with workflow image

GLIGEN Textbox Apply

GLIGEN Textbox Apply node

应用GLIGEN文本框,GLIGEN Textbox Apply节点可用于为扩散模型提供进一步的空间指导,引导其在图像的特定区域生成指定的部分。尽管文本输入可以接受任何文本,但GLIGEN最适合的输入是文本提示中的一部分对象。

!!! 提示 ComfyUI中的坐标系原点位于左上角。

输入

conditioning_to

: 一个条件.

clip

: CLIP模型.

gligen_textbox_model

: GLIGEN模型.

text

: 要与空间信息关联的文本

width

: 区域的宽度

height

: 区域的高度

x

: 区域的x坐标

y

: 区域的y坐标

输出

CONDITIONING

: 包含GLIGEN和空间指导的条件。

example

example usage text with workflow image

unCLIP Conditioning

unCLIP Conditioning node

unCLIP条件化,unCLIP Conditioning 节点可以通过由CLIP视觉模型编码的图像为unCLIP模型提供额外的视觉指导。可以链接多个节点以提供多个图像作为指导。

!!! 提示 并非所有扩散模型都与unCLIP条件化兼容。此节点特别需要使用考虑到unCLIP的扩散模型。

输入

conditioning

: 条件化

clip_vision_output

: 由CLIP VISION模型编码的图像

strength

: unCLIP扩散模型应受图像指导的强度

noise_augmentation

: 用于将unCLIP扩散模型引导到原始CLIP视觉嵌入的随机位置,提供与编码图像密切相关的生成图像的额外变化

输出

CONDITIONING

: 包含unCLIP模型的额外视觉指导的条件化

实验性 Experimental

实验性包含实验性节点,可能尚未完全完善。

Load Latent

Load Latent node

加载潜在节点:Load Latent节点可用于加载使用保存潜在节点保存的潜在图像。

输入

latent

: 潜在图像的名称

输出

LATENT

: 加载的潜在图像

Save Latent

Save Latent node

保存潜变量节点:Save Latent节点可以用于保存潜变量以备将来使用。这些潜变量可以使用Load Latent节点再次加载。

输入

samples

: 要保存的潜变量

filename_prefix

: 文件名的前缀

输出

此节点没有输出

Tome Patch Model

Tome Patch Model node

Tome Patch Model节点可以用于对扩散模型应用Tome优化。Tome(TOken MErging)试图找到一种合并提示令牌的方法,以使对最终图像的影响最小化。生成时间更快,所需的VRAM减少,但可能会降低质量。可以通过比率设置来控制此权衡,较高的值会导致合并更多的令牌。

输入

model

: 要应用Tome优化的扩散模型

ratio

: 确定何时合并令牌的阈值

输出

MODEL

: 经Tome优化的扩散模型

TokenMerging for Stable Diffusion

TokenMerging for Stable Diffusion


VAE Decode (Tiled)

VAE Decode (Tiled) node

VAE解码(平铺),VAE Decode (Tiled) 节点可以使用提供的VAE将潜在空间图像解码回像素空间图像。该节点以平铺方式解码潜在图像,使其能够解码比常规VAE解码节点更大的潜在图像。

!!! 提示 当因为VRAM不足而导致常规VAE解码节点失败时,comfy将自动使用平铺实现进行重试。

输入

samples

: 要解码的潜在图像

vae

: 用于解码潜在图像的VAE

输出

IMAGE

: 解码后的图像。

VAE Encode (Tiled)

VAE Encode (Tiled) node

VAE编码(平铺),VAE Encode (Tiled) 节点可用于使用提供的VAE将像素空间图像编码为潜在空间图像。此节点使用图块对图像进行编码,使其能够编码比常规VAE编码节点更大的图像。

!!! 提示 当常规VAE编码节点由于VRAM不足而失败时,Comfy会自动使用平铺实现进行重试。

输入

pixels

: 像素要编码的像素空间图像

vae

: 用于编码像素图像的VAE

输出

LATENT

: 编码的潜在图像。

图像 Image

ComfyUI提供了多种节点来操作像素图像。这些节点可以用于加载图像以进行图像转换工作流,保存结果,或者用于对图像进行高分辨率处理。

Load Image

Load Image node

加载图像,Load Image节点可用于加载图像。可以通过启动文件对话框或将图像拖放到节点上来上传图像。一旦图像上传完成,就可以在节点内部选择它们。

!!! 提示 默认情况下,图像将上传到ComfyUI的输入文件夹中。

输入

image

: 图像要使用的名称。

输出

IMAGE

: 像素图像。

MASK

: 图像的Alpha通道。

示例

为了执行图像到图像的生成,您必须使用加载图像节点加载图像。在下面的示例中,使用加载图像节点加载了一张图像,然后使用 VAE encode 节点将其编码为潜在空间,从而使我们能够执行图像到图像的任务。

(TODO: provide different example using mask)

Invert Image

Invert Image node

反转图像节点,Invert Image 节点可以用于反转图像的颜色。

输入

image

: 要反转的像素图像

输出

IMAGE

: 反转后的像素图像

Pad Image for Outpainting

Pad Image for Outpainting node

Outpainting节点的Pad Image用于给图像添加填充,以进行outpainting。然后,可以通过VAE Encode for Inpainting将此图像输入到inpaint diffusion模型中。

输入

image

: 要进行填充的图像。

left

: 要在图像左侧填充的量。

top

: 要在图像上方填充的量。

right

: 要在图像右侧填充的量。

bottom

: 要在图像下方填充的量。

feathering

: 原始图像边界的羽化程度。

输出

IMAGE

: 填充后的像素图像。

MASK

: 指示采样器在哪里进行outpainting的掩码。

Preview Image

Preview Image node 预览图像节点可用于在节点图中预览图像。

输入

image

: 图像像素数据

输出

该节点没有输出参数

Save Image

Save Image node{ align=right width=450 }

保存图像:Save Image节点可用于保存图像。要在节点图中简单预览图,请使用Preview Image节点。要更好地组织生成的所有图像,可以将特殊格式的字符串传递给带有file_prefix小部件的输出节点。有关如何格式化字符串的更多信息,请参阅此页面

输入

image

: 要预览的像素图像

filename_prefix

: 要放入文件名中的前缀

输出

此节点没有输出。

Image Blend#postprocessing

Image Blend node

The Image Blend node can be used to blend two images together.

!!! info If the dimensions of the second image do not match those of the first it is rescaled and center-cropped to maintain its aspect ratio

输入

image1

: A pixel image.

image2

: A second pixel image.

blend_factor

: The opacity of the second image.

blend_mode

: How to blend the images.

输出

IMAGE

: The blended pixel image.

Image Blur

Image Blur node

The Image Blend node can be used to apply a gaussian blur to an image.

输入

image

: The pixel image to be blurred.

blur_radius

: The radius of the gaussian.

sigma

: The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel.

输出

IMAGE

: The blurred pixel image.

Image Quantize

Image Quantize node

The Image Quantize node can be used to quantize an image, reducing the number of colors in the image.

输入

image

: The pixel image to be quantized.

colors

: The number of colors in the quantized image.

dither

: Wether to use dithering to make the quantized image look more smooth, or not.

输出

IMAGE

: The quantized pixel image.

Image Sharpen

Image Sharpen node

The Image Sharpen node can be used to apply a Laplacian sharpening filter to an image.

输入

image

: The pixel image to be sharpened.

sharpen_radius

: The radius of the sharpening kernel.

sigma

: The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel.

alpha

: The strength of the sharpening kernel.

输出

IMAGE

: The sharpened pixel image.

Upscale Image

Upscale Image node

',357),we=n('

输入

image

: The pixel images to be upscaled.

upscale_method

: The method used for resizing.

Width

: The target width in pixels.

height

: The target height in pixels.

crop

: Wether or not to center-crop the image to maintain the aspect ratio of the original latent images.

输出

IMAGE

: The resized images.

Upscale Image (using Model)

Upscale Image (using Model) node

The Upscale Image (using Model) node can be used to upscale pixel images using a model loaded with the [Load Upscale Model]

输入

upscale_model

: The model used for upscaling.

image

: The pixel images to be upscaled.

输出

IMAGE

: The upscaled images.

Latent 潜在空间

潜在扩散模型(如稳定扩散)不在像素空间中运作,而是在潜空间中进行去噪。这些节点提供了使用编码器和解码器在像素空间和潜在空间之间切换的方法,并提供了多种操纵潜在图像的方式。

Empty Latent Image

Empty Latent Image node

空潜像图节点,Empty Latent Image节点可用于创建一组新的空潜像图。这些潜像图可以在文本转图像工作流中使用,通过采样器节点对其进行添加噪声和去噪处理。

输入

width

: 宽度(像素)

height

: 高度(像素);

batch_size

: 批次大小(潜在图像数量)。

输出

LATENT

: 空潜在图像

Latent Composite

Latent Composite node

潜在图像合成 Latent Composite节点可用于将一个潜在图像合成到另一个潜在图像中。

!!! 提示 ComfyUI中的坐标系统原点位于左上角。

输入

samples_to

: 要复合的潜在图像。

samples_from

: 要粘贴的潜在图像。

x

: 粘贴潜在图像的x坐标(以像素为单位)。

y

: 粘贴潜在图像的y坐标(以像素为单位)。

feather

: 要粘贴的潜在图像的羽化效果。

输出

LATENT

: 包含将 samples_from 粘贴到 samples_to 中的新潜在图像组合。

Latent Composite Masked

Latent Composite Masked node

潜在图像合成遮罩,Latent Composite Masked节点可用于将一个潜在图像遮罩复合体粘贴到另一个潜在图像。

输入

destination

: 目的地:要粘贴的潜在图像。

source

: 源:要粘贴的潜在图像。

mask

: 遮罩:要粘贴的源潜在图像的遮罩。

x

: 粘贴潜在图像的x坐标(以像素为单位)

y

: 粘贴潜在图像的y坐标(以像素为单位)

输出

LATENT

: 将源潜在图像粘贴到目标潜像的组合而成的新潜在图像。

Upscale Latent

Upscale Latent node

放大潜在图像,Upscale Latent 节点可用于调整潜在图像的大小。

!!! 提示: 调整潜像图的大小与调整像素图像的大小不同。简单地调整潜像图而不是像素会导致更多的伪影。

输入

samples

: 要调整大小的潜像图

upscale_method

: 用于调整大小的方法。

Width

: 目标宽度(以像素为单位)。

height

: 目标高度(以像素为单位)。

crop

: 是否居中裁剪图像以保持原始潜像图的纵横比。

输出

LATENT

: 调整大小后的潜像图。

VAE Decode

VAE Decode node

VAE解码,VAE Decode节点可用于使用提供的VAE将潜像图解码为像素图像。

输入

samples

: 要解码的潜像图。

vae

: 用于解码潜像图的VAE。

输出

IMAGE

: 解码后的像素图像。

example

TODO: SD 1.5 to XL example

VAE Encode

VAE Encode node

VAE编码,VAE Encode 节点可以使用提供的VAE将像素空间图像编码为潜像图。

输入

pixels

: 像素:要编码的像素空间图像。

vae

: 用于编码像素图像的VAE。

输出

LATENT

: 编码的潜像图。

示例

为了在图像到图像的任务中使用图像,首先需要将其编码为潜像图。在下面的示例中,使用VAE编码节点将像素图像转换为潜像图,以便我们可以将其重新噪声化和去噪,得到全新的图像。

Latent From Batch

Latent From Batch node

从批次中提取潜像图,Latent From Batch 节点可以用于从批次中选择一个潜像图或图像片段。这在工作流中需要隔离特定的潜像图或图像时非常有用。

输入

samples

: 要选择一个片段的批次潜像图。

batch_index

: 要选择的第一个潜像图的索引。

length

: 要获取的潜像图数量。

输出

LATENT

: 只包含所选择片段的新批次潜像图

Rebatch Latents

Rebatch Latents node

重新分批潜像图,Rebatch Latents节点可以用于拆分或合并批量的潜在空间图像。当这导致多个批次时,该节点将输出一个批次列表,而不是单个批次。这在批量大小过大无法全部适应VRAM内时非常有用,因为ComfyUI将对列表中的每个批次执行节点,而不是一次执行全部。它还可以将批次列表合并回一个单独的批次中。

输入

samples

: 待重新分批的潜图。

batch_size

: 新的批次大小。

输出

LATENT

: 一个潜图列表,其中每个批次的大小不超过batch_size。

Repeat Latent Batch

Repeat Latent Batch node

重复潜在批处理,Repeat Latent Batch节点可用于重复一批潜像图。这可以用于在图像到图像工作流中创建多个图像变体。

输入

samples

: 要重复的潜像图批处理。

amount

: 重复的次数。

输出

LATENT

: 重复了指定次数的新的潜像图批处理。

Set Latent Noise Mask

Set Latent Noise Mask node

设置潜在噪声掩码,Set Latent Noise Mask节点可用于为修复图像的潜像图添加掩码。当设置了噪声掩码时,采样节点将仅在掩码区域上操作。如果提供了单个掩码,批处理中的所有潜像图都将使用该掩码。

输入

samples

: 样本:要修复的潜像图。

mask

: 掩码:指示修复位置的掩码。

输出

LATENT

: 潜在:经过掩码处理的潜像图。

VAE Encode (for Inpainting)

VAE Encode For Inpainting node

VAE编码(用于修复图像),VAE Encode (for Inpainting) 将像素空间图像编码为潜在空间图像,使用提供的VAE(变分自编码器)。它还接受修复图像的掩码,指示采样节点应该对图像的哪些部分去噪。可以使用grow_mask_by来增加掩码区域的大小,为修复过程提供一些额外的填充区域。

!!! 提示 该节点专门用于用于修复训练的扩散模型,并确保在编码之前,掩码下方的像素被设置为灰色(0.5,0.5,0.5)。

输入

pixels

: 像素:要编码的像素空间图像。

vae

: 用于编码像素图像的VAE。

mask

: 掩码:指示要修复的位置的掩码。

grow_mask_by

: 增加给定掩码区域的大小。

输出

LATENT

: 掩码和编码的潜像图。

Crop Latent

Crop Latent node

裁剪潜像,Crop latent 节点可用于将潜像裁剪到新的形状。

输入

samples

: 样本要裁剪的潜像。

width

: 宽度以像素为单位的区域宽度。

height

: 高度以像素为单位的区域高度。

x

: 以像素为单位的区域x坐标。

y

: 以像素为单位的区域y坐标。

输出

LATENT

: 裁剪后的潜像图。

Flip Latent

Flip Latent node

翻转潜像,Flip Latent 节点可用于水平或垂直翻转潜像。

输入

samples

: 要翻转的潜像。

flip_method

: 选择水平翻转或垂直翻转

输出

LATENT

: 翻转后的潜像图。

Rotate Latent

Rotate Latent node

The Rotate Latent node can be used to rotate latent images clockwise in increments of 90 degrees.

输入

samples

: The latent images to be rotated.

rotation

: Clockwise rotation.

输出

LATENT

: The rotated latents.

载入器 Loaders

The loaders in this segment can be used to load a variety of models used in various workflows. A full list of all of the loaders can be found in the sidebar.

GLIGEN Loader

GLIGEN Loader node

The GLIGEN Loader node can be used to load a specific GLIGEN model. GLIGEN models are used to associate spatial information to parts of a text prompt, guiding the diffusion model to generate images adhering to compositions specified by GLIGEN.

输入

gligen_name

: The name of the GLIGEN model.

输出

GLIGEN

: The GLIGEN model used to encode spatial information to parts of the text prompt.

Hypernetwork Loader

Hypernetwork Loader node

The Hypernetwork Loader node can be used to load a hypernetwork. similar to LoRAs, they are used to modify the diffusion model, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple hypernetworks together to further modify the model.

!!! tip

Hypernetwork strength values can be set to negative values. At times this can result in interesting effects.
-

inputs

model

: A diffusion model.

hypernetwork_name

: The name of the hypernetwork.

strength

: How strongly to modify the diffusion model. This value can be negative.

outputs

MODEL

: The modified diffusion model.

Load Checkpoint

Load Checkpoint node

The Load Checkpoint node can be used to load a diffusion model, diffusion models are used to denoise latents. This node will also provide the appropriate VAE and CLIP model.

inputs

ckpt_name

: The name of the model.

outputs

MODEL

: The model used for denoising latents.

CLIP

: The CLIP model used for encoding text prompts.

VAE

: The VAE model used for encoding and decoding images to and from latent space.

Load CLIP

Load CLIP node

The Load CLIP node can be used to load a specific CLIP model, CLIP models are used to encode text prompts that guide the diffusion process.

!!! warning

Conditional diffusion models are trained using a specific CLIP model, using a different model than the one which it was trained with is unlikely to result in good images. The [Load Checkpoint](LoadCheckpoint.md) node automatically loads the correct CLIP model.
-

inputs

clip_name

: The name of the CLIP model.

outputs

CLIP

: The CLIP model used for encoding text prompts.

Load CLIP Vision

Load CLIP Vision node

The Load CLIP Vision node can be used to load a specific CLIP vision model, similar to how CLIP models are used to encode text prompts, CLIP vision models are used to encode images.

inputs

clip_name

: The name of the CLIP vision model.

outputs

CLIP_VISION

: The CLIP vision model used for encoding image prompts.

Load ControlNet Model

Load ControlNet node

The Load ControlNet Model node can be used to load a ControlNet model. Similar to how the CLIP model provides a way to give textual hints to guide a diffusion model, ControlNet models are used to give visual hints to a diffusion model. This process is different from e.g. giving a diffusion model a partially noised up image to modify. Instead ControlNet models can be used to tell the diffusion model e.g. where edges in the final image should be, or how subjects should be posed. This node can also be used to load T2IAdaptors.

inputs

control_net_name

: The name of the ControlNet model.

outputs

CONTROL_NET

: The ControlNet or T2IAdaptor model used for providing visual hints to a diffusion model.

Load LoRA

Load LoRA node

The Load LoRA node can be used to load a LoRA. LoRAs are used to modify the diffusion and CLIP models, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple LoRAs together to further modify the model.

!!! tip

LoRA strength values can be set to negative values. At times this can result in interesting effects.
-

inputs

model

: A diffusion model.

clip

: A CLIP model.

lora_name

: The name of the LoRA.

strength_model

: How strongly to modify the diffusion model. This value can be negative.

strength_clip

: How strongly to modify the CLIP model. This value can be negative.

outputs

MODEL

: The modified diffusion model.

CLIP

: The modified CLIP model.

Load Style Model

Load Style Model node

The Load Style Model node can be used to load a Style model. Style models can be used to provide a diffusion model a visual hint as to what kind of style the denoised latent should be in.

!!! info Only T2IAdaptor style models are currently supported

inputs

style_model_name

: The name of the style model.

outputs

STYLE_MODEL

: The style model used for providing visual hints about the desired style to a diffusion model.

Load Upscale Model

Load Upscale Model node

The Load Upscale Model node can be used to load a specific upscale model, upscale models are used to upscale images.

inputs

model_name

: The name of the upscale model.

outputs

UPSCALE_MODEL

: The upscale model used for upscaling images.

Load VAE

Load VAE node

',330),Ce=n('

inputs

vae_name

: The name of the VAE.

outputs

VAE

: The VAE model used for encoding and decoding images to and from latent space.

example

',7),_e=n('

unCLIP Checkpoint Loader

unCLIP Checkpoint Loader node

The unCLIP Checkpoint Loader node can be used to load a diffusion model specifically made to work with unCLIP. unCLIP Diffusion models are used to denoise latents conditioned not only on the provided text prompt, but also on provided images. This node will also provide the appropriate VAE and CLIP amd CLIP vision models.

!!! warning even though this node can be used to load all diffusion models, not all diffusion models are compatible with unCLIP.

inputs

ckpt_name

: The name of the model.

outputs

MODEL

: The model used for denoising latents.

CLIP

: The CLIP model used for encoding text prompts.

VAE

: The VAE model used for encoding and decoding images to and from latent space.

CLIP_VISION

: The CLIP Vision model used for encoding image prompts.

遮罩 Mask

Masks provide a way to tell the sampler what to denoise and what to leave alone. These nodes provide a variety of ways create or load masks and manipulate them.

将图像转换为遮罩

Convert Image to Mask node

将图像转换为遮罩节点允许用户从图像的特定通道创建遮罩。这对于想要控制图像特定区域的编辑或处理特别有用,例如只对图像的某一部分应用效果或调整。

输入

image

: 要转换为遮罩的像素图像。

channel

: 要用作遮罩的通道。

输出

MASK

: 由图像通道创建的遮罩。

示例

将图像转换为遮罩的操作非常直接。首先,你需要准备一个图像,并确定你想要用作遮罩的特定通道。以下是一个简单的工作流程示例:

  1. 将你想要转换的图像连接到image输入。
  2. 选择你想要用作遮罩的通道(红色、绿色、蓝色或透明度)。
  3. 节点将处理输入的图像,并在MASK输出中提供相应通道的遮罩。

这在许多图像处理任务中都非常有用,特别是在需要精确控制应用于图像哪个部分的效果时。

这样,你就可以利用图像的不同通道来创建精确的遮罩,进一步提高你的图像编辑能力和精度。

裁剪遮罩

Crop Mask node

裁剪遮罩节点用于将遮罩裁剪为新的形状。通过定义裁剪区域的尺寸和坐标,你可以精确控制保留遮罩的哪一部分。

!!! info 在ComfyUI中,坐标系的原点位于左上角。

输入

mask

: 要裁剪的遮罩。

width

: 裁剪区域的宽度,以像素为单位。

height

: 裁剪区域的高度,以像素为单位。

x

: 裁剪区域的x坐标,以像素为单位。

y

: 裁剪区域的y坐标,以像素为单位。

输出

MASK

: 被裁剪后的遮罩。

示例

裁剪遮罩是图像编辑中常用的一项功能,它可以帮助你从一个大的遮罩中精确地选出你需要的部分。以下是如何使用裁剪遮罩节点的一个简单示例:

  1. 将你想要裁剪的遮罩连接到mask输入。
  2. 设置widthheight来确定裁剪区域的尺寸。
  3. 通过xy输入来定位裁剪区域的左上角起始点。
  4. 节点将输出一个新的、按照你指定参数裁剪过的遮罩。

此裁剪遮罩可用于去除不需要的部分,或者将焦点集中在遮罩的特定区域。

羽化遮罩

Feather Mask node

羽化遮罩节点用于对遮罩进行羽化处理,使遮罩边缘更加柔和,以实现更自然的过渡。

输入

mask

: 需要进行羽化处理的遮罩。

left

: 左侧边缘的羽化量。

top

: 顶部边缘的羽化量。

right

: 右侧边缘的羽化量。

bottom

: 底部边缘的羽化量。

输出

MASK

: 经过羽化处理的遮罩。

示例

羽化遮罩是在图像处理和合成中实现柔和边缘效果的重要工具,特别是当将两个图像层叠加或融合时,羽化可以使边缘之间的过渡更加自然。以下是一个简单的使用案例:

  1. 将您想要羽化的遮罩连接到mask输入。
  2. 根据需要设置lefttoprightbottom,这些值确定了各个方向上羽化效果的强度。
  3. 节点会生成一个新的羽化遮罩,可以被进一步用在图像融合或其他视觉效果中。

此羽化遮罩可用于平滑遮罩的硬边缘,避免图像合成时出现不自然的硬线条或过渡。

反转遮罩

Invert Mask node

反转遮罩节点用于反转一个遮罩,将原本的掩盖区域转换为非掩盖区域,反之亦然。这在您希望改变遮罩影响区域时非常有用。

输入

mask

: 需要被反转的遮罩。

输出

MASK

: 被反转后的遮罩。

实例

反转遮罩节点在各种情境下都非常有用,尤其是当您希望对图像的不同部分应用不同的效果或处理时。以下是一个简单的使用案例:

在这个工作流中,我们首先加载一个遮罩,该遮罩原本是为了保护图像的一个区域而创建的。但在某一步骤,我们决定想对原本被保护的区域应用某种效果(比如去噪或滤镜),同时保持原本未被保护的区域不变。这时,我们就可以使用反转遮罩节点。

  1. 加载您原本的遮罩到工作流。
  2. 将遮罩连接到“反转遮罩”节点的输入端。
  3. 将“反转遮罩”节点的输出连接到您的图像处理节点(比如 KSampler)。

现在,原本被保护的区域将接受处理,而其他区域则保持不变。

通过使用反转遮罩节点,您能轻松地在不同的图像编辑阶段切换受影响的区域,无需创建和加载多个遮罩文件。

加载图片(作为遮罩)

Load Image (as Mask) node

加载图片(作为遮罩)节点可以用来加载图片的某个通道并将其作为遮罩使用。图片可以通过启动文件对话框上传,或者直接拖拽到节点上。一旦图片上传,就可以在节点内部选择使用。

!!! info 默认情况下,图片会被上传到ComfyUI的输入文件夹

输入

image

: 要转换为遮罩的图片的名称。

channel

: 要用作遮罩的图片的通道。

输出

MASK

: 从图片通道创建的遮罩。

实例

加载图片作为遮罩的节点在您需要基于现有图像创建遮罩时非常有用,尤其是当图像的某个区域有独特的颜色或亮度时,可以通过该颜色或亮度区分进行遮罩。以下是一个简单的使用案例:

在此工作流中,我们有一个图像,其中某个区域我们想要进行特殊处理(例如应用特效、调整或变换),而不影响图像的其他部分。

  1. 使用“加载图片(作为遮罩)”节点,选择您的图片文件。
  2. 在“通道”选项中,选择一个特定的颜色通道(红色、绿色、蓝色或透明度),这取决于您的图片和需要遮罩的区域。例如,如果需要遮罩的区域在红色通道上有高亮度,则选择红色通道。
  3. 将此节点的输出连接到下一个处理节点的遮罩输入,例如,一个应用特效的节点。

现在,您的特效或处理将只应用于基于所选图片通道生成的遮罩的区域。

这种方法提供了一种简便的方式,通过现有图片快速创建遮罩,无需手动绘制复杂的遮罩形状。

遮罩合成

Mask Composite node

遮罩合成节点可以用来将一个遮罩粘贴到另一个遮罩中。

!!! info 在ComfyUI中,坐标系统的原点位于左上角。

输入

destination

: 将要被粘贴的遮罩。

source

: 要粘贴的遮罩。

x

: 粘贴遮罩的x坐标,单位为像素。

y

: 粘贴遮罩的y坐标,单位为像素。

operation

: 粘贴遮罩的方式。

输出

MASK

: 包含粘贴到destination中的source的新遮罩合成。

示例

遮罩合成节点非常适用于需要将一个遮罩层叠到另一个上的场景,尤其是当您想要在图像的特定部分应用不同的效果或调整时。以下是一个简单的使用案例:

在此工作流中,我们有两个遮罩 - 一个是主遮罩(destination),另一个我们希望粘贴到主遮罩上的次遮罩(source)。

  1. 将主遮罩连接到destination输入。
  2. 将要粘贴的遮罩连接到source输入。
  3. xy输入中设置坐标,确定次遮罩在主遮罩上的位置。
  4. 选择operation以确定粘贴时如何合并遮罩。例如,“正常”会简单地将次遮罩放在主遮罩上,“相加”会合并遮罩的亮度值等。

输出的遮罩将是次遮罩粘贴到主遮罩上的结果,根据所选择的操作方式,可能会有不同的视觉效果。

此节点非常适用于复杂的图像处理任务,其中需要精确控制应用于图像不同部分的效果。

这种方法提供了一种高度可定制的方式来合并遮罩,为图像编辑提供更多的灵活性和控制。

纯色遮罩 Solid Mask

Solid Mask node

纯色遮罩节点可以用来创建一个填充了单一值的纯色遮罩。

输入

value

: 填充遮罩的值。

width

: 遮罩的宽度。

height

: 遮罩的高度。

输出

MASK

: 填充了单一值的遮罩。

示例

纯色遮罩节点在您需要为整个图像或特定区域创建统一遮罩时非常有用,尤其是在需要遮蔽背景或仅对图像的特定部分应用效果时。以下是一个简单的使用案例:

  1. 将您想要填充的值输入到value中,该值范围从0(完全透明)到1(完全不透明)。
  2. 输入您期望的遮罩widthheight,通常这会与您工作的图像尺寸相匹配。
  3. 节点会生成一个填充了所选值的纯色遮罩,可以被应用到其他节点,例如遮罩合成节点或KSampler节点。

这个纯色遮罩可以用作其他遮罩操作的基础,或者直接用来控制图像的哪些部分应该被采样器处理或保留。

采样 Sampling

采样节点提供了一种使用扩散模型对潜在图像进行去噪的方法。

KSampler

KSampler 节点

KSampler 使用提供的模型以及正向和负向条件来生成给定潜像的新版本。首先,根据给定的 seeddenoise 强度对潜像进行加噪,部分擦除潜像。然后使用给定的 Model 以及 positivenegative 条件作为指导,去除这些噪声,在噪声擦除图像的地方“构想”新的细节。

输入

Model

: 用于去噪的模型

Positive

: 正面调节。

Negative

: 负面调节。

latent_image

: 将被去噪的潜像。

seed

: 用于创建噪声的随机种子。

control_after_generate

: 提供在每个提示后更改上述种子号的能力。节点可以randomizeincrementdecrement或保持种子号fixed

steps

',171),xe=o("p",null,[o("code",null,"cfg")],-1),Te=o("p",null,": 无分类器指导(cfg)比例决定了采样器在实现提示内容到最终图像中应该有多积极。更高的比例迫使图像更好地代表提示,但设置过高的比例会对图像的质量产生负面影响。",-1),ye=o("p",null,[o("code",null,"sampler_name")],-1),Ee=o("p",null,[o("code",null,"scheduler")],-1),Me=n('

denoise

: 应该有多少潜像信息被噪声擦除。

输出

LATENT

: 去噪后的潜像。

示例

KSampler 是任何工作流的核心,可用于执行文本到图像和图像到图像的生成任务。下面的示例展示了如何在图像到图像任务中使用 KSampler,通过连接一个模型、一个正面和负面嵌入以及一个潜像。注意,我们使用的去噪值小于1.0。这样,在对原始图像进行加噪时,原始图像的部分内容得以保留,指导去噪过程生成相似的图像。

KSampler 高级

KSampler Advanced节点

',9),Ne=o("code",null,"add_noise",-1),Ve=o("code",null,"return_with_leftover_noise",-1),Ue=o("code",null,"denoise",-1),Ae=o("code",null,"start_at_step",-1),Se=o("code",null,"end_at_step",-1),Pe=n('

!!! 提示

假设`end_at_step >= steps`,KSampler Advanced节点将以与KSampler节点具有以下`denoise`设置的完全相同的方式去噪潜像:\n\n`denoise = (steps - start_at_step) / steps`\n

输入

Model

: 用于去噪的模型

Positive

: 正面调节。

Negative

: 负面调节。

latent_image

: 将被去噪的潜像。

add_noise

: 是否在去噪前向潜像中添加噪声。启用时,节点将为给定的起始步骤注入适当的噪声。

seed

: 用于创建噪声的随机种子。

control_after_generate

: 提供在每个提示后更改上述种子号的能力。节点可以randomizeincrementdecrement或保持种子号fixed

steps

',18),Re=o("p",null,[o("code",null,"cfg")],-1),Fe=o("p",null,": 无分类器指导(cfg)比例决定了采样器在实现提示内容到最终图像中应该有多积极。更高的比例迫使图像更好地代表提示,但设置过高的比例会对图像的质量产生负面影响。",-1),Ze=o("p",null,[o("code",null,"sampler_name")],-1),Qe=o("p",null,[o("code",null,"scheduler")],-1),Be=n('

start_at_step

: 确定在计划的哪一步开始去噪过程。

end_at_step

: 确定在哪一步结束去噪。当此设置超过steps时,计划将在steps处结束

return_with_leftover_noise

: 禁用时,KSampler Advanced将尝试在最后一步完全去除潜像中的噪声。根据此操作跳过计划中的多少步骤,输出可能不准确且质量较低。

输出

LATENT

: 去噪后的潜像。

',9);function De(We,Ge){const p=l("RouteLink");return d(),i("div",null,[ve,o("p",null,[e("The Upscale Image node can be used to resize pixel images. To upscale images using AI see the "),t(p,{to:"/posts/tutorial/core_nodes/UpscaleImageUsingModel.html"},{default:a(()=>[e("Upscale Image Using Model")]),_:1}),e(" node.")]),we,o("p",null,[e("The Load VAE node can be used to load a specific VAE model, VAE models are used to encoding and decoding images to and from latent space. Although the "),t(p,{to:"/posts/tutorial/core_nodes/LoadCheckpoint.html"},{default:a(()=>[e("Load Checkpoint")]),_:1}),e(" node provides a VAE model alongside the diffusion model, sometimes it can be useful to use a specific VAE model.")]),Ce,o("p",null,[e("At times you might wish to use a different VAE than the one that came loaded with the "),t(p,{to:"/posts/tutorial/core_nodes/LoadCheckpoint.html"},{default:a(()=>[e("Load Checkpoint")]),_:1}),e(" node. In the example below we use a different VAE to encode an image to latent space, and decode the result of the Ksampler.")]),_e,o("p",null,[e(": 去噪期间使用的步骤数。允许采样器进行的步骤越多,结果就越准确。有关如何选择适当步骤数的好的指导方针,请参见"),t(p,{to:"/posts/tutorial/core_nodes/samplers.html"},{default:a(()=>[e("samplers")]),_:1}),e("页面。")]),xe,Te,ye,o("p",null,[e(": 要使用的采样器,有关可用采样器的更多详细信息,请参见"),t(p,{to:"/posts/tutorial/core_nodes/samplers.html"},{default:a(()=>[e("samplers")]),_:1}),e("页面。")]),Ee,o("p",null,[e(": 要使用的计划类型,有关可用计划的更多详细信息,请参见"),t(p,{to:"/posts/tutorial/core_nodes/samplers.html"},{default:a(()=>[e("samplers")]),_:1}),e("页面。")]),Me,o("p",null,[e("KSampler Advanced节点是"),t(p,{to:"/posts/tutorial/core_nodes/KSampler.html"},{default:a(()=>[e("KSampler")]),_:1}),e("节点的更高级版本。尽管KSampler节点总是向潜像中添加噪声,然后完全去除加噪后的潜像,但KSampler Advanced节点提供了额外的设置来控制这种行为。可以通过"),Ne,e("设置告诉KSampler Advanced节点不向潜像中添加噪声。它还可以通过"),Ve,e("设置返回部分去噪后的图像。与KSampler节点不同,此节点没有"),Ue,e("设置,但这个过程是由"),Ae,e("和"),Se,e("设置控制的。这使得例如将部分去噪的潜在图像交给另一个KSampler Advanced节点来完成过程成为可能。")]),Pe,o("p",null,[e(": 计划中的步骤数。允许采样器进行的步骤越多,结果就越准确。有关如何选择适当步骤数的好的指导方针,请参见"),t(p,{to:"/posts/tutorial/core_nodes/samplers.html"},{default:a(()=>[e("samplers")]),_:1}),e("页面。")]),Re,Fe,Ze,o("p",null,[e(": 要使用的采样器,有关可用采样器的更多详细信息,请参见"),t(p,{to:"/posts/tutorial/core_nodes/samplers.html"},{default:a(()=>[e("samplers")]),_:1}),e("页面。")]),Qe,o("p",null,[e(": 要使用的计划类型,有关可用计划的更多详细信息,请参见"),t(p,{to:"/posts/tutorial/core_nodes/samplers.html"},{default:a(()=>[e("samplers")]),_:1}),e("页面。")]),Be])}const Oe=s(be,[["render",De],["__file","index.html.vue"]]),je=JSON.parse('{"path":"/posts/tutorial/core_nodes/","title":"核心节点","lang":"en-US","frontmatter":{"description":"核心节点 扩散模型加载器 Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。 图片 输入 model_path:扩散器模型的路径 输出 MODEL:用于去噪潜变量的模型。 CLIP:用于编码文本提示的CLIP模型。 VAE:用于将图像编码和解码到潜空间的VAE模型。 加载检查点节点 Load Checkpoint (With ...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/core_nodes/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"核心节点"}],["meta",{"property":"og:description","content":"核心节点 扩散模型加载器 Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。 图片 输入 model_path:扩散器模型的路径 输出 MODEL:用于去噪潜变量的模型。 CLIP:用于编码文本提示的CLIP模型。 VAE:用于将图像编码和解码到潜空间的VAE模型。 加载检查点节点 Load Checkpoint (With ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-20T12:53:10.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"name":"twitter:title","content":"核心节点"}],["meta",{"name":"twitter:description","content":"核心节点 扩散模型加载器 Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。 图片 输入 model_path:扩散器模型的路径 输出 MODEL:用于去噪潜变量的模型。 CLIP:用于编码文本提示的CLIP模型。 VAE:用于将图像编码和解码到潜空间的VAE模型。 加载检查点节点 Load Checkpoint (With ..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"核心节点\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-20T12:53:10.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":2,"title":"扩散模型加载器","slug":"扩散模型加载器","link":"#扩散模型加载器","children":[]},{"level":2,"title":"加载检查点节点","slug":"加载检查点节点","link":"#加载检查点节点","children":[]},{"level":2,"title":"条件设定","slug":"条件设定","link":"#条件设定","children":[]},{"level":2,"title":"应用ControlNet模型 Apply ControlNet","slug":"应用controlnet模型-apply-controlnet","link":"#应用controlnet模型-apply-controlnet","children":[]},{"level":2,"title":"应用风格模型","slug":"应用风格模型","link":"#应用风格模型","children":[]},{"level":2,"title":"设置CLIP最后一层","slug":"设置clip最后一层","link":"#设置clip最后一层","children":[]},{"level":2,"title":"文本提示","slug":"文本提示","link":"#文本提示","children":[]},{"level":2,"title":"视觉编码","slug":"视觉编码","link":"#视觉编码","children":[]},{"level":2,"title":"平均条件化","slug":"平均条件化","link":"#平均条件化","children":[]},{"level":2,"title":"Conditioning (Combine)","slug":"conditioning-combine","link":"#conditioning-combine","children":[]},{"level":2,"title":"Conditioning (Set Area)","slug":"conditioning-set-area","link":"#conditioning-set-area","children":[{"level":3,"title":"Conditioning (Set Mask)","slug":"conditioning-set-mask","link":"#conditioning-set-mask","children":[]}]},{"level":2,"title":"example","slug":"example","link":"#example","children":[{"level":3,"title":"GLIGEN Textbox Apply","slug":"gligen-textbox-apply","link":"#gligen-textbox-apply","children":[]}]},{"level":2,"title":"example","slug":"example-1","link":"#example-1","children":[]},{"level":2,"title":"实验性 Experimental","slug":"实验性-experimental","link":"#实验性-experimental","children":[{"level":3,"title":"Load Latent","slug":"load-latent","link":"#load-latent","children":[]},{"level":3,"title":"Save Latent","slug":"save-latent","link":"#save-latent","children":[]},{"level":3,"title":"Tome Patch Model","slug":"tome-patch-model","link":"#tome-patch-model","children":[]}]},{"level":2,"title":"TokenMerging for Stable Diffusion","slug":"tokenmerging-for-stable-diffusion","link":"#tokenmerging-for-stable-diffusion","children":[{"level":3,"title":"VAE Decode (Tiled)","slug":"vae-decode-tiled","link":"#vae-decode-tiled","children":[]},{"level":3,"title":"VAE Encode (Tiled)","slug":"vae-encode-tiled","link":"#vae-encode-tiled","children":[]}]},{"level":2,"title":"图像 Image","slug":"图像-image","link":"#图像-image","children":[{"level":3,"title":"Load Image","slug":"load-image","link":"#load-image","children":[]},{"level":3,"title":"示例","slug":"示例","link":"#示例","children":[]},{"level":3,"title":"Invert Image","slug":"invert-image","link":"#invert-image","children":[]},{"level":3,"title":"Pad Image for Outpainting","slug":"pad-image-for-outpainting","link":"#pad-image-for-outpainting","children":[]},{"level":3,"title":"Preview Image","slug":"preview-image","link":"#preview-image","children":[]},{"level":3,"title":"Save Image","slug":"save-image","link":"#save-image","children":[]},{"level":3,"title":"Image Blend#postprocessing","slug":"image-blend-postprocessing","link":"#image-blend-postprocessing","children":[]},{"level":3,"title":"Image Blur","slug":"image-blur","link":"#image-blur","children":[]}]},{"level":2,"title":"Image Quantize","slug":"image-quantize","link":"#image-quantize","children":[]},{"level":2,"title":"Image Sharpen","slug":"image-sharpen","link":"#image-sharpen","children":[]},{"level":2,"title":"Upscale Image","slug":"upscale-image","link":"#upscale-image","children":[]},{"level":2,"title":"Upscale Image (using Model)","slug":"upscale-image-using-model","link":"#upscale-image-using-model","children":[]},{"level":2,"title":"Latent 潜在空间","slug":"latent-潜在空间","link":"#latent-潜在空间","children":[{"level":3,"title":"Empty Latent Image","slug":"empty-latent-image","link":"#empty-latent-image","children":[]},{"level":3,"title":"Latent Composite","slug":"latent-composite","link":"#latent-composite","children":[]},{"level":3,"title":"Latent Composite Masked","slug":"latent-composite-masked","link":"#latent-composite-masked","children":[]},{"level":3,"title":"Upscale Latent","slug":"upscale-latent","link":"#upscale-latent","children":[]},{"level":3,"title":"VAE Decode","slug":"vae-decode","link":"#vae-decode","children":[]}]},{"level":2,"title":"example","slug":"example-2","link":"#example-2","children":[{"level":3,"title":"VAE Encode","slug":"vae-encode","link":"#vae-encode","children":[]}]},{"level":2,"title":"示例","slug":"示例-1","link":"#示例-1","children":[{"level":3,"title":"Latent From Batch","slug":"latent-from-batch","link":"#latent-from-batch","children":[]},{"level":3,"title":"Rebatch Latents","slug":"rebatch-latents","link":"#rebatch-latents","children":[]},{"level":3,"title":"Repeat Latent Batch","slug":"repeat-latent-batch","link":"#repeat-latent-batch","children":[]},{"level":3,"title":"Set Latent Noise Mask","slug":"set-latent-noise-mask","link":"#set-latent-noise-mask","children":[]},{"level":3,"title":"VAE Encode (for Inpainting)","slug":"vae-encode-for-inpainting","link":"#vae-encode-for-inpainting","children":[]},{"level":3,"title":"Crop Latent","slug":"crop-latent","link":"#crop-latent","children":[]},{"level":3,"title":"Flip Latent","slug":"flip-latent","link":"#flip-latent","children":[]},{"level":3,"title":"Rotate Latent","slug":"rotate-latent","link":"#rotate-latent","children":[]}]},{"level":2,"title":"载入器 Loaders","slug":"载入器-loaders","link":"#载入器-loaders","children":[{"level":3,"title":"GLIGEN Loader","slug":"gligen-loader","link":"#gligen-loader","children":[]},{"level":3,"title":"Hypernetwork Loader","slug":"hypernetwork-loader","link":"#hypernetwork-loader","children":[]}]},{"level":2,"title":"inputs","slug":"inputs","link":"#inputs","children":[]},{"level":2,"title":"outputs","slug":"outputs","link":"#outputs","children":[{"level":3,"title":"Load Checkpoint","slug":"load-checkpoint","link":"#load-checkpoint","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-1","link":"#inputs-1","children":[]},{"level":2,"title":"outputs","slug":"outputs-1","link":"#outputs-1","children":[{"level":3,"title":"Load CLIP","slug":"load-clip","link":"#load-clip","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-2","link":"#inputs-2","children":[]},{"level":2,"title":"outputs","slug":"outputs-2","link":"#outputs-2","children":[{"level":3,"title":"Load CLIP Vision","slug":"load-clip-vision","link":"#load-clip-vision","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-3","link":"#inputs-3","children":[]},{"level":2,"title":"outputs","slug":"outputs-3","link":"#outputs-3","children":[{"level":3,"title":"Load ControlNet Model","slug":"load-controlnet-model","link":"#load-controlnet-model","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-4","link":"#inputs-4","children":[]},{"level":2,"title":"outputs","slug":"outputs-4","link":"#outputs-4","children":[{"level":3,"title":"Load LoRA","slug":"load-lora","link":"#load-lora","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-5","link":"#inputs-5","children":[]},{"level":2,"title":"outputs","slug":"outputs-5","link":"#outputs-5","children":[{"level":3,"title":"Load Style Model","slug":"load-style-model","link":"#load-style-model","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-6","link":"#inputs-6","children":[]},{"level":2,"title":"outputs","slug":"outputs-6","link":"#outputs-6","children":[{"level":3,"title":"Load Upscale Model","slug":"load-upscale-model","link":"#load-upscale-model","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-7","link":"#inputs-7","children":[]},{"level":2,"title":"outputs","slug":"outputs-7","link":"#outputs-7","children":[{"level":3,"title":"Load VAE","slug":"load-vae","link":"#load-vae","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-8","link":"#inputs-8","children":[]},{"level":2,"title":"outputs","slug":"outputs-8","link":"#outputs-8","children":[]},{"level":2,"title":"example","slug":"example-3","link":"#example-3","children":[{"level":3,"title":"unCLIP Checkpoint Loader","slug":"unclip-checkpoint-loader","link":"#unclip-checkpoint-loader","children":[]}]},{"level":2,"title":"inputs","slug":"inputs-9","link":"#inputs-9","children":[]},{"level":2,"title":"outputs","slug":"outputs-9","link":"#outputs-9","children":[]},{"level":2,"title":"遮罩 Mask","slug":"遮罩-mask","link":"#遮罩-mask","children":[{"level":3,"title":"将图像转换为遮罩","slug":"将图像转换为遮罩","link":"#将图像转换为遮罩","children":[]}]},{"level":2,"title":"示例","slug":"示例-2","link":"#示例-2","children":[{"level":3,"title":"裁剪遮罩","slug":"裁剪遮罩","link":"#裁剪遮罩","children":[]}]},{"level":2,"title":"输入","slug":"输入","link":"#输入","children":[]},{"level":2,"title":"输出","slug":"输出","link":"#输出","children":[]},{"level":2,"title":"示例","slug":"示例-3","link":"#示例-3","children":[{"level":3,"title":"羽化遮罩","slug":"羽化遮罩","link":"#羽化遮罩","children":[]}]},{"level":2,"title":"输入","slug":"输入-1","link":"#输入-1","children":[]},{"level":2,"title":"输出","slug":"输出-1","link":"#输出-1","children":[]},{"level":2,"title":"示例","slug":"示例-4","link":"#示例-4","children":[{"level":3,"title":"反转遮罩","slug":"反转遮罩","link":"#反转遮罩","children":[]}]},{"level":2,"title":"输入","slug":"输入-2","link":"#输入-2","children":[]},{"level":2,"title":"输出","slug":"输出-2","link":"#输出-2","children":[]},{"level":2,"title":"实例","slug":"实例","link":"#实例","children":[{"level":3,"title":"加载图片(作为遮罩)","slug":"加载图片-作为遮罩","link":"#加载图片-作为遮罩","children":[]}]},{"level":2,"title":"输入","slug":"输入-3","link":"#输入-3","children":[]},{"level":2,"title":"输出","slug":"输出-3","link":"#输出-3","children":[]},{"level":2,"title":"实例","slug":"实例-1","link":"#实例-1","children":[{"level":3,"title":"遮罩合成","slug":"遮罩合成","link":"#遮罩合成","children":[]}]},{"level":2,"title":"输入","slug":"输入-4","link":"#输入-4","children":[]},{"level":2,"title":"输出","slug":"输出-4","link":"#输出-4","children":[]},{"level":2,"title":"示例","slug":"示例-5","link":"#示例-5","children":[{"level":3,"title":"纯色遮罩 Solid Mask","slug":"纯色遮罩-solid-mask","link":"#纯色遮罩-solid-mask","children":[]}]},{"level":2,"title":"输入","slug":"输入-5","link":"#输入-5","children":[]},{"level":2,"title":"输出","slug":"输出-5","link":"#输出-5","children":[]},{"level":2,"title":"示例","slug":"示例-6","link":"#示例-6","children":[]},{"level":2,"title":"采样 Sampling","slug":"采样-sampling","link":"#采样-sampling","children":[{"level":3,"title":"KSampler","slug":"ksampler","link":"#ksampler","children":[]}]},{"level":2,"title":"输入","slug":"输入-6","link":"#输入-6","children":[]},{"level":2,"title":"输出","slug":"输出-6","link":"#输出-6","children":[]},{"level":2,"title":"示例","slug":"示例-7","link":"#示例-7","children":[{"level":3,"title":"KSampler 高级","slug":"ksampler-高级","link":"#ksampler-高级","children":[]}]},{"level":2,"title":"输入","slug":"输入-7","link":"#输入-7","children":[]},{"level":2,"title":"输出","slug":"输出-7","link":"#输出-7","children":[]}],"git":{"updatedTime":1713617590000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/tutorial/core_nodes/index.md","autoDesc":true,"excerpt":"\\n

扩散模型加载器

\\n
\\n

Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。

\\n
\\n

\\n

输入

\\n
    \\n
  • model_path:扩散器模型的路径
  • \\n
\\n

输出

\\n
    \\n
  • \\n

    MODEL:用于去噪潜变量的模型。

    \\n
  • \\n
  • \\n

    CLIP:用于编码文本提示的CLIP模型。

    \\n
  • \\n
  • \\n

    VAE:用于将图像编码和解码到潜空间的VAE模型。

    \\n
  • \\n
"}');export{Oe as comp,je as data}; diff --git a/docs/assets/index.html-Bfw1RUzZ.js b/docs/assets/index.html-Bfw1RUzZ.js deleted file mode 100644 index 913d988..0000000 --- a/docs/assets/index.html-Bfw1RUzZ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as t,a}from"./app-BFngqcKR.js";const r="/awesome-comfyui-workflow/assets/8047d707bb3ab08f774bc4c2f4b44484-9RPxsZVV.png",n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAbYAAAA+CAYAAABHnT5xAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAsISURBVHhe7Zs9iyVVEIb9AfsbTNfIXyDLpuaLqeGCiaEDstEKgpgYiJiIyZgYGRiZyAYLGxkYCWaCoWBodOW58Eptce451T3tTM/pN3i4t+vUqarz0VV9+s688eDBg5MxxhhzE54/f3568eLF6fr6+nR1ddXUuS1c2IwxxkyFC5sxxpipcGEzxhgzFdMXtg+evnv6+sunzTZjjDHzUSps33374emP3786/fP39ZmXP39yLhhRh2v0Hj96+zX5/8ESX3/9+c055hyvMcaYORkWts8/ff9cGH779YtzMfnpx2fnYgFvPXzzPz3abquALPHFaY1CHGM1xhgzL8PCRlGgiMTCwPd8WtprYTPGGHMshoWNExpF5L0n7zTbVWQuIT0KoWSc9lqvM9XOa0/8cUqM11Vf2L3UJn559dnZPidSva5EFsdJAdf4ge+KIdqqQD+NRzCuqEMs8ZUv/uIDRezXmh/g+ofvP3rNbkt+U1/SM8aYvTEsbCoSJH+Scz6p0Y6coqAEybWQHv0kQ0dJNRY32qIdIBlzTWJd40u6ahOS84ketuTnkg6fijvaGsHrUNlWXEBxkc7HV0/OOtinjXEz5zEexYBea37Q4RMb6gPSUUHaypcxxuyR0h+PkBCV5IAEF5/ugURIWyxUPegvW1EuO3xKJt9Zp+JLulkum7FQq7jxXfGhp3ZYU9j0Ord30mkVJP2+GfuN5kdFNM4NdmMx2sqXMcbskVJhEyRLJbb81K4keKnYUChIuvQX6PMZ9UZ2oKIjpJvl8h9lURfbfEcWdXRqibIRnJD0upN5wwayqEPbJeI4R2NXQaZIc02h4jr+y4Pstljiyxhj9siiwiaU3OPTfeukECGhk9zpS8JU0lxT2Ea+IrKX5bdZ2ICCw6mIgqNTX3w44Fq/O2boK73K/GCHuea74o0n0y19GWPM3hgWtpjohJJlTHh8RxZ/N8pt8ZSik8WawtbzlYnFKjIqbBQCvlMAos6aV5Et8sOBCn9rviOV+dFrReabePMYtvRljDF7Y1jY9PuMTlr6HUonAkGSRAbSBRK3igTFhCRJwsUmYJ8TGHL0VXDww3U8aVR80U5il0z2dK0kPSpsUYfCIFtrCht9Y5yMTfFLh7iwi0xjVz+1c12ZH8AO84tufgDY2pcxxuyJYWEj2SlBKhmS6ONrSEFCjLoQi42KAp9cY0d6JE59j2Az+4GeLyXkFviJOtGmYtA1BTTGqOKU+42gMMgGXJpDxhT9AX1pWzo/8omvVvuWvowxZk+s+o3tyKgYtNqMMcbcPS5sC9ArUE6KrXZjjDF3jwtbh/hbHa/pKGqc1vKf6htjjNkPLmwd4m9N/C7Ia0j/zmSMMfvGhc0YY8xUuLAZY4yZChc2Y4wxU+HCZowxZipc2IwxxkyFC5sxxpipcGEzxhgzFS5sxhhjpsKFzRhjzFS4sBljjJkKFzZjjDFT4cJmjDFmKlzYjDHGTIULmzHGmKlwYTPGGDMVLmzGGGOmwoXNGGPMVLiwGWOMmQoXNmOMMVPhwmaMMWYqXNiMMcZMhQubMQfnu28/PH189aTZJio6xuwFF7Yb8surz07//H3dbDPzMsu6U6wYx+efvt9sh4qOMXuiW9h4SmNDX4Kbu9VvJj54+u55Hh4/ervZftsJ7r0n75xe/vzJ6a8/vzn75fOnH5+d3nr45rm9tS6MATmfXCvmFrHf3hitxW1SXfdKzHc5Lsbxx+9fNdtES4di99uvX5zngD34w/cfvdZeZVY7rCdzhh3gnuXeVTtr/fWXT//zle9ZMbJT1Tka3cKmGw5InloAyY7wBMc4GbeKQqaa4LaAGPClYkZsbGJkfEdHa9TqpzGwbui31jT22xvEF8dxl1TXvRLzXY1L+4IE22qHlo5kJFNi11wsLQKz2tF60p/vus+wm3V0/6IbbUSdip2ezhEpv4rUojN5rfZZ0cZh/K12bf5W29awWSlq+WksxqZNnttbY7hvazpai9ukuu6VmO9qXCRB9pNO+y1aOkrG8YSp+ejZysxqhz7MWZRRHLGjexcfsomcPlEfKnYqOkdks8LGEZ7Eiw4TzQ2xZDMI7Ot4LvLTBycO+YKWr4pODyWbS0hPGx9/jJvvyPKmumk81SIk/1GmvjlxVm1egvgZBzaA75q3qHfTvVFdC6j6Yuy0L30aF6N1r8RcHRd2uSeiL64Zq3REdVwkVuz09C7pYD/vMWJDN++xHvfZTm+e2XO0xX2HHrKoJ7Cf/ULFzlJfR2GTwsYNRhsJhfbe8boHrzvox02LHcHmkk72pUWkzxKdEYyXvowBW2wgxQPSUzufyNHTGKSzRTz0w8boRlUsUaa1y317a1ohj51PFRXpbLE3qmuxxJcSFjq5rYJi4RNfed0rMVfHpXbGxd7R/oF4uoDquLCBXu4fuaSjWEmmxMk41uyl+2ynN8/0Z83iPuQ7+zPrAnbQz/KKnaW+jsImhU03XrwBWrIRLAp9ekdoEgcLF2XaZOpX0anCeOnH+FvtrXFqHLreIp4cB/6QCcnRIabYV2uXxyA5/aO8AjdUyxfjRK7rrfYG5DnILPXF3DOOLK/QspvXHUYxQ3VcsV37p/X72GhctFEUSeKtdujp4JeYFTfxrdlL991Ob55ZF90LwEPCpf0uX622ip0lvo7CJoUNeV4YbQ76RXkPnjK4mehHMWCB8pMHbZeQr1abWBIPjMbBuGmPMvXRtXy3qMaT4+Az2tG68D2vhXSzL8nVdwmX+uopX9etePJYqoz6belrRGXdo6znf6TT8gXI6JvlI/RmpPdQ1dNBruRJMafIEvvSeGa1w8MAeUxzR/GTrFVwsJ/3LVTsLPV1FHZV2ICFYUOxOHoK0esd4JpNh92Mnp4qOlV0g9O31V5JcFvEgy52uPFyG3KtC9/zWvBwgBwbUS6bS25acakv8SHXdSuetXtjtBZb+hpRWXcYxQxr9hggW7N23Fd5njI9HZJmbuOeJZ4lr8BmtYN+vk9ZW+SsdZQD8tZcV+ws9XUUdvUqsoUSpZ5IKHJswF5BqOhU0bjZ4K12jTPKcoLbKh5sQH6KxpfWhXhIStFXnkPRW9MRrCt9KdhRrocRXW+5N6prUfXFfKxdE9mNsrzuMIoZquNCTzI9rLTWrjeuSqIe6bDmtLfmueX3Ujyz2kGfflGm9Vpa2EZ2lvo6Crv64xH6koT5BB2pQTqKAxnt0o1PLRWdKmxcxRBjY1PTzhjxFfvQHmVbxaN5hmiHaz7RYTNzTTFFhp6uZYfEFdsYg2xJp4LGznrTl+tc2LbaGzBaiyW+lLzRyW0VNPYow2eWjWKu6MgXa0g7oIssF+zRuLDB/LTaxEhH+1nzrPiIK+v24pnVjvrxiR2tF2i96E8bRJ8gnYqdis4R2aSwAUmFxUGHSSVptp5meijRCuywcWISAGJBHnXpu1SnCra42aOtJYUNtoqnZYcYkEsH/721UMwtpFMBmzEWbqrW2LfYG6K3FlD1hR3aW0mrQnXdYRTzSEe+SIYaG5+MNdqQnUvjok12cpuo6AC+FW9vHnvxwIx22G/ItVbAfRLXvHcPYrtqp6JzRMqFzZgKKnStNrOOVhFdA2tDMu49VFR0jNk7LmxmM0iGJEWeeFvtZh1bFTZOlK1TXqSiY8zecWEzq4m/E/DKj6JGAnZi3JatCpsxR8GFzaxGvykB7/h5jaXfB8x2uLAZswwXNmOMMVPhwmaMMWYqXNiMMUP8hyfmPuHCdkP8+8cxOdK6U6wYa+9/2yo6xtwOD07/AlpV7f2KugQlAAAAAElFTkSuQmCC",i="/awesome-comfyui-workflow/assets/default_workflow-bUpa9A5u.svg",p={},s=a('

教程

ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于ComfyUI 官方仓库 ,专门针对中文用户,做了优化和文档的细节补充。

本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。

安装

安装方式,推荐使用官方的 Window-Nvidia 显卡-免安装包 ,也可以从 百度网盘 下载

如果你是 Mac 或者 Linux 系统,请参考 GitHub 上的安装说明

什么是 stable diffusion?

Stable Diffusion,中文一般称为稳定扩散,是 2022 年发布的深度学习生成模型,它可以根据文本的描述产生详细的图像。Stable Diffusion 通过一个复杂的概率扩散过程,逐步将原始图像转换为具有特定特征的图像,实现图像生成。

stable diffusion

下载模型

如果您完全不了解任何与稳定扩散相关的内容,您要做的第一件事就是获取一个模型checkpoints,您将用它来生成图像。

您可以在CivitAIHuggingFace 等网站上找到多种模型。首先,获取您喜欢的模型checkpoints,并将其放置在ComfyUI/models/checkpoints中。

启动 ComfyUI

双击run_nvidia_gpu.bat 启动 ComfyUI。

启动后,你将看到 ComfyUI 的提示:

请在浏览器里访问 http://127.0.0.1:8188 访问

Comfy 的第一步

此时,您应该已经在浏览器标签中启动并运行了 ComfyUI。第一次使用,ComfyUI 加载的是一个默认的工作流。这是一个最基础的 text-to-image 的工作流。

您可以拖动画布,或者按住空格键并移动鼠标。可以通过鼠标滚动来缩放。

如果您弄乱了什么,只需在右边的菜单中点击Load Default将其重置为初始状态。

ComfyUI默认工作流

在我们运行工作流之前,让我们进行一个小修改,以预览生成的图像而不保存它们:

  1. 右键单击Save Image节点,然后选择Remove
  2. 双击画布的空白部分,输入preview,然后单击PreviewImage选项。
  3. 找到VAE Decode节点的IMAGE输出,并将其连接到您刚添加的Preview Image节点的images输入。

此修改将预览您的结果,而不会将结果保存到output文件夹里。

通过在菜单中点击Queue Prompt或在键盘上按command+entercontrol+enter来创建您的第一张图片,就是这样!

尝试其他工作流

为了便于分享,ComfyUI 默认将工作流的详细信息存储在生成的 PNG 中。要加载生成图像的工作流,只需通过菜单中的Load按钮加载图像(或者是 JSON 文件),或将其拖放到 ComfyUI 窗口中。ComfyUI 将自动解析工作流的详细信息并加载所有相关节点及其设置。

在那里可以获得更多的工作流?可以访问ComfyUI 的官方示例工作流

进一步的支持

欢迎申请加入ComfyUI 中文社区

访问由 Mixlab Nodes 维护的discord 交流频道

参考资料:

本地安装保姆级安装教程云端安装教程

',34),c=[s];function m(l,f){return t(),o("div",null,c)}const h=e(p,[["render",m],["__file","index.html.vue"]]),u=JSON.parse('{"path":"/posts/tutorial/start/","title":"教程","lang":"en-US","frontmatter":{"description":"教程 ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于ComfyUI 官方仓库 ,专门针对中文用户,做了优化和文档的细节补充。 本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。 安装 安装方式,推荐使用官方的 Window-Nvidia 显卡-免安装包 ,也可以从 百度网盘 下载...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/start/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"教程"}],["meta",{"property":"og:description","content":"教程 ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于ComfyUI 官方仓库 ,专门针对中文用户,做了优化和文档的细节补充。 本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。 安装 安装方式,推荐使用官方的 Window-Nvidia 显卡-免安装包 ,也可以从 百度网盘 下载..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.696Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-21T11:02:10.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.696Z"}],["meta",{"name":"twitter:title","content":"教程"}],["meta",{"name":"twitter:description","content":"教程 ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于ComfyUI 官方仓库 ,专门针对中文用户,做了优化和文档的细节补充。 本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。 安装 安装方式,推荐使用官方的 Window-Nvidia 显卡-免安装包 ,也可以从 百度网盘 下载..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"教程\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-21T11:02:10.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":2,"title":"安装","slug":"安装","link":"#安装","children":[{"level":3,"title":"什么是 stable diffusion?","slug":"什么是-stable-diffusion","link":"#什么是-stable-diffusion","children":[]},{"level":3,"title":"下载模型","slug":"下载模型","link":"#下载模型","children":[]}]},{"level":2,"title":"启动 ComfyUI","slug":"启动-comfyui","link":"#启动-comfyui","children":[{"level":3,"title":"Comfy 的第一步","slug":"comfy-的第一步","link":"#comfy-的第一步","children":[]}]},{"level":2,"title":"尝试其他工作流","slug":"尝试其他工作流","link":"#尝试其他工作流","children":[]},{"level":2,"title":"进一步的支持","slug":"进一步的支持","link":"#进一步的支持","children":[{"level":3,"title":"参考资料:","slug":"参考资料","link":"#参考资料","children":[]}]}],"git":{"updatedTime":1713697330000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":4}]},"filePathRelative":"posts/tutorial/start/index.md","autoDesc":true,"excerpt":"\\n
\\n

ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于ComfyUI 官方仓库 ,专门针对中文用户,做了优化和文档的细节补充。

\\n
\\n

本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。

\\n

安装

\\n

安装方式,推荐使用官方的 Window-Nvidia 显卡-免安装包 ,也可以从 百度网盘 下载

"}');export{h as comp,u as data}; diff --git a/docs/assets/index.html-Bu4VC_a9.js b/docs/assets/index.html-Bu4VC_a9.js deleted file mode 100644 index 19d2768..0000000 --- a/docs/assets/index.html-Bu4VC_a9.js +++ /dev/null @@ -1,66 +0,0 @@ -import{_ as n,c as s,o as a,a as p}from"./app-BFngqcKR.js";const e="/awesome-comfyui-workflow/assets/API01-C3VSzi19.png",t="/awesome-comfyui-workflow/assets/API02-BDcjvxSr.png",o="/awesome-comfyui-workflow/assets/API-03-DW_y3-g-.png",i="/awesome-comfyui-workflow/assets/API-04-CItmxP6i.png",c="/awesome-comfyui-workflow/assets/API-05-SRm6s36i.png",l={},u=p(`

适合高级用户的自定义

ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。

  • 提供信任机制
  • 提供节点的沙盒版本

如何开发自定义节点?

  • python 编写节点运行时
  • JavaScript 编写节点 UI

你的第一个自定义节点: https://github.com/shadowcz007/comfyui-mixlab-nodes

前端界面是由 HTML、CSS、Javascript 编写的,每个节点都有自己的一个生命周期管理,例如以下:

JS 代码示例

import { app } from '../scripts/app.js'
-const ext = {
-  // 扩展的唯一名称
-  name: 'Example.LoggingExtension',
-  async init(app) {
-    // 页面加载后立即运行的任何初始设置
-    console.log('[logging]', 'extension init')
-  },
-  async setup(app) {
-    // 应用程序创建后运行的任何设置
-    console.log('[logging]', 'extension setup')
-  },
-  async addCustomNodeDefs(defs, app) {
-    // 添加自定义节点定义
-    // 这些定义将自动配置和注册
-    // defs 是核心节点的查找表,将您的节点添加到其中
-    console.log(
-      '[logging]',
-      'add custom node definitions',
-      'current nodes:',
-      Object.keys(defs)
-    )
-  },
-  async getCustomWidgets(app) {
-    // 返回自定义小部件类型
-    // 请参阅 ComfyWidgets 获取小部件示例
-    console.log('[logging]', 'provide custom widgets')
-  },
-  async beforeRegisterNodeDef(nodeType, nodeData, app) {
-    // 在节点定义注册到图形之前运行自定义逻辑
-    console.log('[logging]', 'before register node: ', nodeType, nodeData)
-
-    // 这将对每个节点定义触发,因此只记录一次
-    delete ext.beforeRegisterNodeDef
-  },
-  async registerCustomNodes(app) {
-    //在此处注册任何自定义节点实现,以便比自定义节点定义更灵活。
-    console.log('[logging]', 'register custom nodes')
-  },
-  loadedGraphNode(node, app) {
-    // 当加载/拖动/等操作工作流程的 JSON 或 PNG 时,对每个节点触发
-    // 如果在后端出现问题并且想要在前端修复工作流程
-    // 这就是进行修复的地方
-    console.log('[logging]', 'loaded graph node: ', node)
-
-    // This fires for every node on each load so only log once
-    delete ext.loadedGraphNode
-  },
-  nodeCreated(node, app) {
-    console.log('[logging]', 'node created: ', node)
-    // 每次构建节点时触发
-    // 您可以在此处修改小部件、添加处理程序等
-
-    // 这对每个节点触发,所以只记录一次
-    delete ext.nodeCreated
-  }
-}
-
-app.registerExtension(ext)
-

API 模式的一个简单指南

如何使用 ComfyUI 的 API,通过命令行和脚本控制 ComfyUI

原文代码仓库

示例工作流 2

我们需要启用 Dev Mode. 单击菜单面板右上角的齿轮图标。

3

查看 Enable Dev mode Options

-

Save (API Format)菜单面板中应出现一个新按钮。

-

单击该 Save(API Format)按钮,它将以默认名称保存一个文件 workflow_api.json。使用普通的 ComfyUI 工作流程 json 文件,可以将它们拖放到主 UI 中并加载工作流程。

将 api 格式 json 拖放到 ComfyUI 中不会加载工作流程。它仅包含用于功能目的的足够节点数据,并且不包含位置或布局信息。因此,如果您确实需要可视化并查看工作流程,最好也通过普通按钮保存常规工作流程 json Save。

现在在您选择的文本编辑器中打开此文件。您应该会看到类似于下面的内容。

-

您可以看到每个部分(为了清晰起见,用彩色表示)都以数字开头。这是 Node ID. 如果您查看第一个节点(黄色),您将看到它的节点 ID 为 ,并且"3"是.KSamplerclass_type

值得注意的是,它们 Node IDs 可能有所不同。如果您从头开始重新构建自己的工作流程并添加、删除节点,那么它们将与此处显示的不同。( 原始节点不会以 api 格式显示——仅显示核心节点。将来可能会改变)

让我们创建一个名为 的新 Python 脚本 basic_workflow_api.py。

参考

将提示工作流发送到指定的 URL http://127.0.0.1:8188/prompt 并将其排队到在该地址运行的 ComfyUI 服务器上

This function sends a prompt workflow to the specified URL (http://127.0.0.1:8188/prompt) and queues it on the ComfyUI server running at that address.

def queue_prompt(prompt_workflow):
-    p = {"prompt": prompt_workflow}
-    data = json.dumps(p).encode('utf-8')
-    req =  request.Request("http://127.0.0.1:8188/prompt", data=data)
-    request.urlopen(req)
-

完成代码后,运行:

python3 basic_workflow_api.py
-
`,32),r=[u];function d(m,k){return a(),s("div",null,r)}const g=n(l,[["render",d],["__file","index.html.vue"]]),b=JSON.parse('{"path":"/posts/tutorial/advanced/","title":"适合高级用户的自定义","lang":"en-US","frontmatter":{"description":"适合高级用户的自定义 ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。 提供信任机制 提供节点的沙盒版本 如何开发自定义节点? python 编写节点运行时 JavaScript 编写节点 UI 你的第一个自定义节点: https://gith...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/advanced/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"适合高级用户的自定义"}],["meta",{"property":"og:description","content":"适合高级用户的自定义 ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。 提供信任机制 提供节点的沙盒版本 如何开发自定义节点? python 编写节点运行时 JavaScript 编写节点 UI 你的第一个自定义节点: https://gith..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-20T12:52:55.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"name":"twitter:title","content":"适合高级用户的自定义"}],["meta",{"name":"twitter:description","content":"适合高级用户的自定义 ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。 提供信任机制 提供节点的沙盒版本 如何开发自定义节点? python 编写节点运行时 JavaScript 编写节点 UI 你的第一个自定义节点: https://gith..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"适合高级用户的自定义\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-20T12:52:55.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":2,"title":"如何开发自定义节点?","slug":"如何开发自定义节点","link":"#如何开发自定义节点","children":[{"level":3,"title":"JS 代码示例","slug":"js-代码示例","link":"#js-代码示例","children":[]}]},{"level":2,"title":"API 模式的一个简单指南","slug":"api-模式的一个简单指南","link":"#api-模式的一个简单指南","children":[]}],"git":{"updatedTime":1713617575000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/tutorial/advanced/index.md","autoDesc":true,"excerpt":"\\n

ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。

\\n
    \\n
  • 提供信任机制
  • \\n
  • 提供节点的沙盒版本
  • \\n
\\n

如何开发自定义节点?

\\n
    \\n
  • python 编写节点运行时
  • \\n
  • JavaScript 编写节点 UI
  • \\n
\\n

你的第一个自定义节点:\\nhttps://github.com/shadowcz007/comfyui-mixlab-nodes

\\n

前端界面是由 HTML、CSS、Javascript 编写的,每个节点都有自己的一个生命周期管理,例如以下:

"}');export{g as comp,b as data}; diff --git a/docs/assets/index.html-CAAMWxVE.js b/docs/assets/index.html-CAAMWxVE.js deleted file mode 100644 index 04fd04d..0000000 --- a/docs/assets/index.html-CAAMWxVE.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,r as o,c as a,e as n,o as r}from"./app-BFngqcKR.js";const l={};function c(s,i){const e=o("Catalog");return r(),a("div",null,[n(e)])}const p=t(l,[["render",c],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/posts/tutorial/","title":"Tutorial","lang":"en-US","frontmatter":{"title":"Tutorial"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{p as comp,m as data}; diff --git a/docs/assets/index.html-CAP-1zms.js b/docs/assets/index.html-CAP-1zms.js deleted file mode 100644 index 7b366c1..0000000 --- a/docs/assets/index.html-CAP-1zms.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as r}from"./app-BFngqcKR.js";const a={};function c(l,i){return r(),t("div")}const o=e(a,[["render",c],["__file","index.html.vue"]]),s=JSON.parse('{"path":"/article/","title":"Articles","lang":"en-US","frontmatter":{"title":"Articles","sidebar":false,"blog":{"type":"type","key":"article"},"layout":"Article"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{o as comp,s as data}; diff --git a/docs/assets/index.html-CFEdLwZ3.js b/docs/assets/index.html-CFEdLwZ3.js deleted file mode 100644 index 3f67e54..0000000 --- a/docs/assets/index.html-CFEdLwZ3.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o}from"./app-BFngqcKR.js";const a={};function n(r,i){return o(),t("div")}const c=e(a,[["render",n],["__file","index.html.vue"]]),p=JSON.parse('{"path":"/posts/insight/","title":"","lang":"en-US","frontmatter":{"head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/insight/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-20T16:20:52.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-20T16:20:52.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1713630052000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/insight/index.md","excerpt":""}');export{c as comp,p as data}; diff --git a/docs/assets/index.html-CG2tx8q8.js b/docs/assets/index.html-CG2tx8q8.js deleted file mode 100644 index 774c32c..0000000 --- a/docs/assets/index.html-CG2tx8q8.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as d,a as l}from"./app-BFngqcKR.js";const o="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%20100%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:10;'%3e%3cg%3e%3cuse%20xlink:href='%23_Image1'%20x='0'%20y='0'%20width='275px'%20height='226px'%20transform='matrix(1,0,0,1,-87,-81)'/%3e%3cg%3e%3cg%3e%3crect%20x='13'%20y='19'%20width='76'%20height='26'%20style='fill:%23353535;fill-rule:nonzero;'/%3e%3cpath%20d='M27,33c-0,2.194%20-1.806,4%20-4,4c-2.194,-0%20-4,-1.806%20-4,-4c0,-2.194%201.806,-4%204,-4c2.193,-0%203.998,1.803%204,3.996'%20style='fill:%23778;fill-rule:nonzero;'/%3e%3cpath%20d='M83,33c0,2.194%20-1.806,4%20-4,4c-2.194,0%20-4,-1.806%20-4,-4c0,-2.194%201.806,-4%204,-4c2.193,0%203.998,1.803%204,3.996'%20style='fill:%23778;fill-rule:nonzero;stroke:%23000;stroke-width:1px;'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cimage%20id='_Image1'%20width='275px'%20height='226px'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAADiCAYAAABtECOwAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFHUlEQVR4nO3cwUorWxQE0NMm4keE/P83isR+g0tmOTc21sG6z7XAWRljNtQgFL1dr9f99fV1PPPx8TF+U+79/X2MMcbb21vl+/ttOffoyj26x8vT3wL4AmUCRCgTIEKZABHb9Xrdf/pNNPr8/BxjjPHyom8buEeXR/c4jzGqvzX+6W+rn2Xb/4//S849unKP7qHmgQhlAkQoEyBCmQARygSIUCZAhDIBIpQJEGEBO2Fx2cU9uljAHshZXHbl3KMrZwELLKNMgAhlAkQoEyBCmQARygSIUCZAhDIBIixgJywuu7hHFwvYAzmLy66ce3TlLGCBZZQJEKFMgAhlAkQoEyBCmQARygSIUCZAhAXshMVlF/foYgF7IGdx2ZVzj66cBSywjDIBIpQJEKFMgAhlAkQoEyBCmQARygSIsICdsLjs4h5dLGAP5Cwuu3Lu0ZWzgAWWUSZAhDIBIpQJEKFMgAhlAkQoEyBCmQAR2+VysYAFvu28bdu4/8zs+z72ff/nc2P8mQF/JXe73cYYY5xOp7/+3THG09dq/1zcQ+7uO/c4b9tWPdv9qdz9wzqfz09f71lmxfv7bTn36Mo9uofvTIAIZQJEKBMgQpkAEcoEiFAmQIQyASI8A3bCM0e7uEcXz4A9kPPM0a6ce3TlPAMWWEaZABHKBIhQJkCEMgEilAkQoUyACGUCRFjATlhcdnGPLhawB3IWl1059+jKWcACyygTIEKZABHKBIhQJkCEMgEilAkQoUyACAvYCYvLLu7RxQL2QM7isivnHl05C1hgGWUCRCgTIEKZABHKBIhQJkCEMgEilAkQYQE7YXHZxT26WMAeyFlcduXcoytnAQsso0yACGUCRCgTIEKZABHKBIhQJkCEMgEiLGAnLC67uEcXC9gDOYvLrpx7dOUsYIFllAkQoUyACGUCRCgTIEKZABHKBIhQJkCEBeyExWUX9+hiAXsgZ3HZlXOPrpwFLLCMMgEilAkQoUyACGUCRCgTIEKZABHKBIiwgJ2wuOziHl0sYA/kLC67cu7RlbOABZZRJkCEMgEilAkQoUyACGUCRCgTIEKZABEWsBMWl13co4sF7IGcxWVXzj26chawwDLKBIhQJkCEMgEilAkQoUyACGUCRCgTIMICdsLisot7dLGAPZCzuOzKuUdXzgIWWEaZABHKBIhQJkCEMgEilAkQoUyACGUCRGyXy8UCFvi287Zt4/4zs+/72Pf9n8+N8WcG/JXc7XYbY4xxOp3++nfHGE9fq/1zcQ+5u+/c47xtW/Vs96dy9w/rfD4/fb1nmRXv77fl3KMr9+gevjMBIpQJEKFMgAhlAkQoEyBCmQARygSI8AzYCc8c7eIeXTwD9kDOM0e7cu7RlfMMWGAZZQJEKBMgQpkAEcoEiFAmQIQyASKUCRBhATthcdnFPbpYwB7IWVx25dyjK2cBCyyjTIAIZQJEKBMgQpkAEcoEiFAmQIQyASIsYCcsLru4RxcL2AM5i8uunHt05SxggWWUCRChTIAIZQJEKBMgQpkAEcoEiFAmQIQF7ITFZRf36GIBeyBncdmVc4+unAUssIwyASKUCRChTIAIZQJEKBMgQpkAEcoEiLCAnbC47OIeXSxgD+QsLrty7tGVs4AFllEmQIQyASKUCRChTIAIZQJEKBMgQpkAERawExaXXdyjiwXsgZzFZVfOPbpyFrDAMsoEiFAmQIQyASKUCRChTIAIZQJEKBMgwgJ2wuKyi3t0eXSP/wBjvDp3jTgqOAAAAABJRU5ErkJggg=='/%3e%3c/defs%3e%3c/svg%3e",a="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAzMDAgOTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM6c2VyaWY9Imh0dHA6Ly93d3cuc2VyaWYuY29tLyIgc3R5bGU9ImZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO3N0cm9rZS1taXRlcmxpbWl0OjEwOyI+PGc+PHJlY3QgeD0iLTUxIiB5PSItNTAiIHdpZHRoPSI0MDMiIGhlaWdodD0iMjI2IiBzdHlsZT0iZmlsbDojZmZmOyIvPjx1c2UgeGxpbms6aHJlZj0iI19JbWFnZTEiIHg9IjAiIHk9IjAiIHdpZHRoPSI0MDNweCIgaGVpZ2h0PSIyMjZweCIgdHJhbnNmb3JtPSJtYXRyaXgoMSwwLDAsMSwtNTEsLTUwKSIvPjxnPjxnPjxyZWN0IHg9IjQ5IiB5PSIyMCIgd2lkdGg9IjIwNC4yIiBoZWlnaHQ9IjU2IiBzdHlsZT0iZmlsbDojMzUzNTM1O2ZpbGwtcnVsZTpub256ZXJvOyIvPjxyZWN0IHg9IjQ5IiB5PSI0OSIgd2lkdGg9IjIwNC4yIiBoZWlnaHQ9IjIiIHN0eWxlPSJmaWxsLW9wYWNpdHk6MC4yOyIvPjxyZWN0IHg9IjQ5IiB5PSIyMCIgd2lkdGg9IjIwNC4yIiBoZWlnaHQ9IjMwIiBzdHlsZT0iZmlsbDojMzMzO2ZpbGwtcnVsZTpub256ZXJvOyIvPjxwYXRoIGQ9Ik02OSwzNWMtMCwyLjc0MyAtMi4yNTcsNSAtNSw1Yy0yLjc0MywtMCAtNSwtMi4yNTcgLTUsLTVjMCwtMi43NDMgMi4yNTcsLTUgNSwtNWMyLjc0MSwtMCA0Ljk5NywyLjI1NCA1LDQuOTk1IiBzdHlsZT0iZmlsbDojNjY2O2ZpbGwtcnVsZTpub256ZXJvOyIvPjx0ZXh0IHg9Ijc5cHgiIHk9IjQwcHgiIHN0eWxlPSJmb250LWZhbWlseTonQXJpYWxNVCcsICdBcmlhbCcsIHNhbnMtc2VyaWY7Zm9udC1zaXplOjE0cHg7ZmlsbDojOTk5OyI+UHJpbWl0aXZlPC90ZXh0PjxwYXRoIGQ9Ik0yNDcuMiw2NGMwLDIuMTk0IC0xLjgwNiw0IC00LDRjLTIuMTk0LC0wIC00LC0xLjgwNiAtNCwtNGMwLC0yLjE5NCAxLjgwNiwtNCA0LC00YzIuMTkzLC0wIDMuOTk4LDEuODAzIDQsMy45OTYiIHN0eWxlPSJmaWxsOiM3Nzg7ZmlsbC1ydWxlOm5vbnplcm87c3Ryb2tlOiMwMDA7c3Ryb2tlLXdpZHRoOjFweDsiLz48dGV4dCB4PSIxMTAuNDUycHgiIHk9IjY5cHgiIHN0eWxlPSJmb250LWZhbWlseTonQXJpYWxNVCcsICdBcmlhbCcsIHNhbnMtc2VyaWY7Zm9udC1zaXplOjEycHg7ZmlsbDojYWFhOyI+Y29ubmVjdCB0byB3aWRnZXQgaW5wdXQ8L3RleHQ+PC9nPjwvZz48L2c+PGRlZnM+PGltYWdlIGlkPSJfSW1hZ2UxIiB3aWR0aD0iNDAzcHgiIGhlaWdodD0iMjI2cHgiIHhsaW5rOmhyZWY9ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBWk1BQUFEaUNBWUFBQUNMRlNxeEFBQUFDWEJJV1hNQUFBN0VBQUFPeEFHVkt3NGJBQUFHQTBsRVFWUjRuTzNkUVVvY0FSUUUwTjlPaTRjWTNIai9DNHFNblVVd3FDalRVSVNwMXZkMlNqa3hVNHNLeEc4dlQwOVAyN3p6OHZJeTkvZjNjODF2eXowL1A4L016TVBEUStYMzk5dHkrdWpLNmFNcmQ0cys3cTYrQ2dCY1lVd0FpQmtUQUdMR0JJQ1lNUUVndGp3K1BtN1hZN3krdnM3TXpOMmQvVzJnank3NjZIS0xQdGJQUCs3Vi9pTnZ0LzVSdTJ2WjlyL0hUOG5wb3l1bmo2N2NMZnJ3endnQVlzWUVnSmd4QVNCbVRBQ0lHUk1BWXNZRWdKZ3hBU0JtVEFDSXVZRGZ5WVZ2RjMxMDBVY1hGL0RGT1JlK1hUbDlkT1gwMFpWekFRL0FJUmtUQUdMR0JJQ1lNUUVnWmt3QWlCa1RBR0xHQklDWU1RRWc1Z0orSnhlK1hmVFJSUjlkWE1BWDUxejRkdVgwMFpYVFIxZk9CVHdBaDJSTUFJZ1pFd0JpeGdTQW1ERUJJR1pNQUlnWkV3Qml4Z1NBbUF2NG5WejRkdEZIRjMxMGNRRmZuSFBoMjVYVFIxZE9IMTA1Ri9BQUhKSXhBU0JtVEFDSUdSTUFZc1lFZ0pneEFTQm1UQUNJR1JNQVlpN2dkM0xoMjBVZlhmVFJ4UVY4Y2M2RmIxZE9IMTA1ZlhUbFhNQURjRWpHQklDWU1RRWdaa3dBaUJrVEFHTEdCSUNZTVFFZ1prd0FpTG1BMzhtRmJ4ZDlkTkZIRnhmd3hUa1h2bDA1ZlhUbDlOR1Zjd0VQd0NFWkV3Qml4Z1NBbURFQklHWk1BSWdaRXdCaXhnU0FtREVCSU9ZQ2ZpY1h2bDMwMFVVZlhWekFGK2RjK0hibDlOR1YwMGRYemdVOEFJZGtUQUNJR1JNQVlzWUVnSmd4QVNCbVRBQ0lHUk1BWXNZRWdKZ0wrSjFjK0hiUlJ4ZDlkSEVCWDV4ejRkdVYwMGRYVGg5ZE9SZndBQnlTTVFFZ1prd0FpQmtUQUdMR0JJQ1lNUUVnWmt3QWlCa1RBR0l1NEhkeTRkdEZIMTMwMGNVRmZISE9oVzlYVGg5ZE9YMTA1VnpBQTNCSXhnU0FtREVCSUdaTUFJZ1pFd0JpeGdTQW1ERUJJR1pNQUlndDUvUFpCVHdBa2ZWME92MzdZTnUyMmJadGxtV1paVm0rL2FLZmtwdjUrMnNIOXVRdWw4dk16THgvdjc3NmMyZm02bXUxdnkvNmtIdWpqNTdjVEhjZjY3cXVIejdSL21zQ2JwVjdLK2Z6Ky9YVjYxM0wvSS92NzdmbDlOR1YwMGRYN2haOStEOFRBR0xHQklDWU1RRWdaa3dBaUJrVEFHTEdCSUNZTVFFZzVobndPM25HZFJkOWRORkhGOCtBTDg1NXhuVlhUaDlkT1gxMDVUd0RIb0JETWlZQXhJd0pBREZqQWtETW1BQVFNeVlBeEl3SkFERmpBa0RNQmZ4T0xueTc2S09MUHJxNGdDL091ZkR0eXVtaks2ZVBycHdMZUFBT3laZ0FFRE1tQU1TTUNRQXhZd0pBekpnQUVETW1BTVNNQ1FBeEYvQTd1ZkR0b284dSt1amlBcjQ0NThLM0s2ZVBycHcrdW5JdTRBRTRKR01DUU15WUFCQXpKZ0RFakFrQU1XTUNRTXlZQUJBekpnREVYTUR2NU1LM2l6NjY2S09MQy9qaW5BdmZycHcrdW5MNjZNcTVnQWZna0l3SkFERmpBa0RNbUFBUU15WUF4SXdKQURGakFrRE1tQUFRY3dHL2t3dmZMdnJvb284dUx1Q0xjeTU4dTNMNjZNcnBveXZuQWg2QVF6SW1BTVNNQ1FBeFl3SkF6SmdBRURNbUFNU01DUUF4WXdKQXpBWDhUaTU4dStpaml6NjZ1SUF2enJudzdjcnBveXVuajY2Y0MzZ0FEc21ZQUJBekpnREVqQWtBTVdNQ1FNeVlBQkF6SmdERWpBa0FNUmZ3TzdudzdhS1BMdnJvNGdLK09PZkN0eXVuajY2Y1BycHlMdUFCT0NSakFrRE1tQUFRTXlZQXhJd0pBREZqQWtETW1BQVFNeVlBeEZ6QTcrVEN0NHMrdXVpaml3djQ0cHdMMzY2Y1BycHkrdWpLdVlBSDRKQ01DUUF4WXdKQXpKZ0FFRE1tQU1TTUNRQXhZd0pBekpnQUVITUJ2NU1MM3k3NjZLS1BMaTdnaTNNdWZMdHkrdWpLNmFNcjV3SWVnRU15SmdERWpBa0FNV01DUU15WUFCQXpKZ0RFakFrQU1XTUNRR3c1bjg4dTRBR0lyS2ZUNmQ4SDI3Yk50bTJ6TE1zc3kvTHRGLzJVM016Zlh6dXdKM2U1WEdabTV2Mzc5ZFdmT3pOWFg2djlmZEdIM0J0OTlPUm11dnRZMTNYOThJbjJYeE53cTl4Yk9aL2ZyNjllNzFybWYzeC92eTJuajY2Y1BycHl0K2pELzVrQUVETW1BTVNNQ1FBeFl3SkF6SmdBRURNbUFNU01DUUF4ejREZnlUT3V1K2lqaXo2NmVBWjhjYzR6cnJ0eSt1aks2YU1yNXhud0FCeVNNUUVnWmt3QWlCa1RBR0xHQklDWU1RRWdaa3dBaUJrVEFHSXU0SGR5NGR0RkgxMzAwY1VGZkhIT2hXOVhUaDlkT1gxMDVWekFBM0JJeGdTQW1ERUJJR1pNQUlnWkV3Qml4Z1NBbURFQklHWk1BSWo5QVJrUWNOUUJjL29qQUFBQUFFbEZUa1N1UW1DQyIvPjwvZGVmcz48L3N2Zz4=",c="/awesome-comfyui-workflow/assets/SR-on7jf4DI.png",i={},r=l('

ComfyUI interface stuff

Textprompts 文本提示

ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。

提高和降低权重

通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:(prompt:weight)。例如,如果我们有一个提示 flowers inside a blue vase,并且我们希望扩散模型强调花卉,我们可以尝试将我们的提示改写为:(flowers:1.2) inside a blue vase。嵌套循环会相乘它们内部的权重,例如在提示 ((flowers:1.2):.5) inside a blue vase 中,花朵最终获得 0.6 的权重。仅使用括号而不指定权重是 (prompt:1.1) 的简写,例如 (flower) 等于 (flower:1.1)。要在提示中使用括号,它们必须被转义,例如 \\(1990\\)。ComfyUI 也可以通过快捷键 ctrl+arrow-upctrl+arrow-down 为提示的选定部分添加适当的加权语法。这些快捷方式提高或降低权重的量可以在设置中调整。

使用文本反转嵌入

文本反转是定制的 CLIP 嵌入,体现了某些概念。可以通过使用以下语法在提示中引用文本反转:embedding:name,其中 name 是嵌入文件的名称。

添加随机选择

可以让 ComfyUI 在排队时使用以下语法随机选择提示的某些部分:{choice1|choice2|...}。例如,如果我们想让 ComfyUI 随机选择一组颜色中的一种,我们可以在我们的提示中添加以下内容:{red|blue|yellow|green}

UtilityNodes 实用节点

ComfyUI 附带了一组节点,帮助管理图形。

Reroute 重新路由

Reroute 重新路由节点

重新路由节点可用于重新路由链接,这对于组织您的工作流程很有用。

重新路由节点上的输入和输出也可以垂直放置

Primitive 原始

Primitive 原始节点

原始节点可以用于...

NodeOptions

SaveFileFormatting 保存文件格式

跟踪你生成的所有图片可能会很困难。为了帮助组织您的图像,您可以向带有 file_prefix 小部件的输出节点传递特殊格式的字符串。

查找和替换字符串

为了自动将某些节点小部件的值插入到文件名中,可以使用以下语法:%node_name.widget_name%。例如,如果我们希望基于每个分辨率存储图像,我们可以向节点提供以下字符串:%Empty Latent Image.width%x%Empty Latent Image.height%/image。这些字符串将被指定的节点值替换。

重命名节点以进行搜索和替换

有时,节点名称可能相当大,或者多个节点可能共享相同的名称。在这些情况下,可以在节点选项菜单下的 properties>Node name for S&R 中指定一个特定的名称。

保存图像节点

日期时间字符串

ComfyUI 也可以插入日期信息,格式为 %date:FORMAT%,其中格式识别以下说明符:

说明符描述
ddd
MMM
yyyyyy
hhh小时
mmm分钟
sss

快捷键

ComfyUI 提供了以下快捷键,您可以使用它们来加快工作流程:

快捷键说明
ctrl+enter将当前图形排入生成队列
ctrl+shift+enter将当前图形作为第一个排入生成队列
ctrl+s保存工作流
ctrl+o载入工作流
ctrl+a选择所有节点
ctrl+m静音/取消静音所选节点
delete删除所选节点
backspace删除所选节点
ctrl+delete删除当前图形
ctrl+backspace删除当前图形
space按住并移动光标时移动画布
ctrl+lbutton将点击的节点添加到选择
shift+lbutton将点击的节点添加到选择
ctrl+c复制所选节点
ctrl+v粘贴所选节点同时断开连接
ctrl+shift+v粘贴所选节点同时保持传入连接
shift+lbutton按住并拖动以同时移动多个所选节点
ctrl+d载入默认图形
q切换队列的可见性
h切换历史记录的可见性
r刷新图形
2 X lbutton双击打开节点快速搜索调色板
rbutton打开节点菜单
',32),n=[r];function m(s,p){return d(),t("div",null,n)}const U=e(i,[["render",m],["__file","index.html.vue"]]),I=JSON.parse('{"path":"/posts/tutorial/interface/","title":"ComfyUI interface stuff","lang":"en-US","frontmatter":{"description":"ComfyUI interface stuff Textprompts 文本提示 ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。 提高和降低权重 通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:(prompt:weight)。例如,如果我们有一个提示 flowers inside a blue vase...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/interface/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"ComfyUI interface stuff"}],["meta",{"property":"og:description","content":"ComfyUI interface stuff Textprompts 文本提示 ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。 提高和降低权重 通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:(prompt:weight)。例如,如果我们有一个提示 flowers inside a blue vase..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-21T05:38:49.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"name":"twitter:title","content":"ComfyUI interface stuff"}],["meta",{"name":"twitter:description","content":"ComfyUI interface stuff Textprompts 文本提示 ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。 提高和降低权重 通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:(prompt:weight)。例如,如果我们有一个提示 flowers inside a blue vase..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"ComfyUI interface stuff\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-21T05:38:49.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":2,"title":"Textprompts 文本提示","slug":"textprompts-文本提示","link":"#textprompts-文本提示","children":[{"level":3,"title":"提高和降低权重","slug":"提高和降低权重","link":"#提高和降低权重","children":[]},{"level":3,"title":"使用文本反转嵌入","slug":"使用文本反转嵌入","link":"#使用文本反转嵌入","children":[]},{"level":3,"title":"添加随机选择","slug":"添加随机选择","link":"#添加随机选择","children":[]}]},{"level":2,"title":"UtilityNodes 实用节点","slug":"utilitynodes-实用节点","link":"#utilitynodes-实用节点","children":[{"level":3,"title":"Reroute 重新路由","slug":"reroute-重新路由","link":"#reroute-重新路由","children":[]},{"level":3,"title":"Primitive 原始","slug":"primitive-原始","link":"#primitive-原始","children":[]}]},{"level":2,"title":"NodeOptions","slug":"nodeoptions","link":"#nodeoptions","children":[]},{"level":2,"title":"SaveFileFormatting 保存文件格式","slug":"savefileformatting-保存文件格式","link":"#savefileformatting-保存文件格式","children":[{"level":3,"title":"查找和替换字符串","slug":"查找和替换字符串","link":"#查找和替换字符串","children":[]},{"level":3,"title":"重命名节点以进行搜索和替换","slug":"重命名节点以进行搜索和替换","link":"#重命名节点以进行搜索和替换","children":[]}]},{"level":2,"title":"日期时间字符串","slug":"日期时间字符串","link":"#日期时间字符串","children":[]},{"level":2,"title":"快捷键","slug":"快捷键","link":"#快捷键","children":[]}],"git":{"updatedTime":1713677929000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":2}]},"filePathRelative":"posts/tutorial/interface/index.md","autoDesc":true,"excerpt":"\\n

Textprompts 文本提示

\\n

ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。

\\n

提高和降低权重

\\n

通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:(prompt:weight)。例如,如果我们有一个提示 flowers inside a blue vase,并且我们希望扩散模型强调花卉,我们可以尝试将我们的提示改写为:(flowers:1.2) inside a blue vase。嵌套循环会相乘它们内部的权重,例如在提示 ((flowers:1.2):.5) inside a blue vase 中,花朵最终获得 0.6 的权重。仅使用括号而不指定权重是 (prompt:1.1) 的简写,例如 (flower) 等于 (flower:1.1)。要在提示中使用括号,它们必须被转义,例如 \\\\(1990\\\\)。ComfyUI 也可以通过快捷键 ctrl+arrow-upctrl+arrow-down 为提示的选定部分添加适当的加权语法。这些快捷方式提高或降低权重的量可以在设置中调整。

"}');export{U as comp,I as data}; diff --git a/docs/assets/index.html-DSr3loHk.js b/docs/assets/index.html-DSr3loHk.js deleted file mode 100644 index dbe9308..0000000 --- a/docs/assets/index.html-DSr3loHk.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./app-BFngqcKR.js";const r={};function o(c,n){return a(),t("div")}const s=e(r,[["render",o],["__file","index.html.vue"]]),i=JSON.parse('{"path":"/category/","title":"Categories","lang":"en-US","frontmatter":{"title":"Categories","sidebar":false,"blog":{"type":"category","key":"category"},"layout":"Category"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{s as comp,i as data}; diff --git a/docs/assets/index.html-DZzsqkAr.js b/docs/assets/index.html-DZzsqkAr.js deleted file mode 100644 index e184d2d..0000000 --- a/docs/assets/index.html-DZzsqkAr.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,r as o,c as a,e as n,o as s}from"./app-BFngqcKR.js";const c={};function r(l,_){const e=o("Catalog");return s(),a("div",null,[n(e)])}const p=t(c,[["render",r],["__file","index.html.vue"]]),m=JSON.parse('{"path":"/posts/","title":"Posts","lang":"en-US","frontmatter":{"title":"Posts"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{p as comp,m as data}; diff --git a/docs/assets/index.html-DmTMYjRr.js b/docs/assets/index.html-DmTMYjRr.js deleted file mode 100644 index 7ef0d56..0000000 --- a/docs/assets/index.html-DmTMYjRr.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as i,a as t}from"./app-BFngqcKR.js";const o={},l=t('

ComfyUI Mixlab Nodes 教程

🚀🚗🚚🏃

目录

简介

ComfyUI Mixlab Nodes 是一个强大的工具集合,旨在通过简单的配置,将 workflow 转变为一个 Web APP,并支持实时设计、语音识别与合成、GPT 集成、图像处理等多种功能。本文档将详细介绍其功能、安装及使用方法。

主要功能

Workflow-to-APP

使用 AppInfo 节点,可以通过简单的配置,把 workflow 转变为一个 Web APP。

',9),n=[l];function r(E,s){return i(),a("div",null,n)}const p=e(o,[["render",r],["__file","index.html.vue"]]),c=JSON.parse('{"path":"/posts/mixlab_nodes/","title":"ComfyUI Mixlab Nodes 教程","lang":"en-US","frontmatter":{"description":"ComfyUI Mixlab Nodes 教程 🚀🚗🚚🏃 目录 简介 主要功能 Workflow-to-APP Real-time Design Speech Recognition & Synthesis GPT 支持 Prompt 功能 图层处理 3D 图像处理 图像处理 风格应用 实用工具 其他节点 模型下载 安装指南 中文社区 讨论区 ...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/mixlab_nodes/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"ComfyUI Mixlab Nodes 教程"}],["meta",{"property":"og:description","content":"ComfyUI Mixlab Nodes 教程 🚀🚗🚚🏃 目录 简介 主要功能 Workflow-to-APP Real-time Design Speech Recognition & Synthesis GPT 支持 Prompt 功能 图层处理 3D 图像处理 图像处理 风格应用 实用工具 其他节点 模型下载 安装指南 中文社区 讨论区 ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-05-28T09:13:14.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"name":"twitter:title","content":"ComfyUI Mixlab Nodes 教程"}],["meta",{"name":"twitter:description","content":"ComfyUI Mixlab Nodes 教程 🚀🚗🚚🏃 目录 简介 主要功能 Workflow-to-APP Real-time Design Speech Recognition & Synthesis GPT 支持 Prompt 功能 图层处理 3D 图像处理 图像处理 风格应用 实用工具 其他节点 模型下载 安装指南 中文社区 讨论区 ..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"ComfyUI Mixlab Nodes 教程\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-05-28T09:13:14.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":2,"title":"目录","slug":"目录","link":"#目录","children":[]},{"level":2,"title":"简介","slug":"简介","link":"#简介","children":[]},{"level":2,"title":"主要功能","slug":"主要功能","link":"#主要功能","children":[{"level":3,"title":"Workflow-to-APP","slug":"workflow-to-app","link":"#workflow-to-app","children":[]}]}],"git":{"updatedTime":1716887594000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":2}]},"filePathRelative":"posts/mixlab_nodes/index.md","autoDesc":true,"excerpt":"\\n

🚀🚗🚚🏃

\\n

目录

\\n"}');export{p as comp,c as data}; diff --git a/docs/assets/index.html-DvRIvadW.js b/docs/assets/index.html-DvRIvadW.js deleted file mode 100644 index 412871d..0000000 --- a/docs/assets/index.html-DvRIvadW.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as a,o as r,a as t}from"./app-BFngqcKR.js";const o={},n=t('

常用的自定义节点

controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等

ComfyUI_IPAdapter_plus

模型下载:

extra_model_paths.yaml文件中记得配置 ipadapter 模型的地址

视觉编码器

下载后记得重命名,存放地址:/ComfyUI/models/clip_vision

IPA 模型

存放地址 /ComfyUI/models/ipadapter

sd15 版本:

SDXL 版本:

FaceID 模型

FaceID 模型需要 insightface, 记得此依赖安装正常,如果有问题可以查看

SD15

Most FaceID models require a LoRA. If you use the IPAdapter Unified Loader FaceID it will be loaded automatically if you follow the naming convention. Otherwise you have to load them manually, be careful each FaceID model has to be paired with its own specific LoRA.

All models can be found on huggingface.

',21),s=[n];function i(p,l){return r(),a("div",null,s)}const c=e(o,[["render",i],["__file","index.html.vue"]]),f=JSON.parse('{"path":"/posts/tutorial/custom_nodes/","title":"常用的自定义节点","lang":"en-US","frontmatter":{"description":"常用的自定义节点 controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等 ComfyUI_IPAdapter_plus 模型下载: 在extra_model_paths.yaml文件中记得配置 ipadapter 模型的地...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/custom_nodes/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"常用的自定义节点"}],["meta",{"property":"og:description","content":"常用的自定义节点 controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等 ComfyUI_IPAdapter_plus 模型下载: 在extra_model_paths.yaml文件中记得配置 ipadapter 模型的地..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-05-28T09:13:14.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"name":"twitter:title","content":"常用的自定义节点"}],["meta",{"name":"twitter:description","content":"常用的自定义节点 controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等 ComfyUI_IPAdapter_plus 模型下载: 在extra_model_paths.yaml文件中记得配置 ipadapter 模型的地..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"常用的自定义节点\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-05-28T09:13:14.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[{"level":2,"title":"ComfyUI_IPAdapter_plus","slug":"comfyui-ipadapter-plus","link":"#comfyui-ipadapter-plus","children":[{"level":3,"title":"视觉编码器","slug":"视觉编码器","link":"#视觉编码器","children":[]},{"level":3,"title":"IPA 模型","slug":"ipa-模型","link":"#ipa-模型","children":[]}]}],"git":{"updatedTime":1716887594000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":3}]},"filePathRelative":"posts/tutorial/custom_nodes/index.md","autoDesc":true,"excerpt":"\\n

controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等

\\n

ComfyUI_IPAdapter_plus

\\n

模型下载:

\\n

extra_model_paths.yaml文件中记得配置 ipadapter 模型的地址

\\n

视觉编码器

\\n

下载后记得重命名,存放地址:/ComfyUI/models/clip_vision

"}');export{c as comp,f as data}; diff --git a/docs/assets/index.html-LISyv-xc.js b/docs/assets/index.html-LISyv-xc.js deleted file mode 100644 index b36b738..0000000 --- a/docs/assets/index.html-LISyv-xc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as a,b as t}from"./app-BFngqcKR.js";const n={},r=t("h1",{id:"任务墙",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#任务墙"},[t("span",null,"任务墙")])],-1),i=[r];function c(m,s){return a(),o("div",null,i)}const d=e(n,[["render",c],["__file","index.html.vue"]]),l=JSON.parse('{"path":"/posts/task/","title":"任务墙","lang":"en-US","frontmatter":{"description":"任务墙","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/task/"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"任务墙"}],["meta",{"property":"og:description","content":"任务墙"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-20T16:19:33.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.695Z"}],["meta",{"name":"twitter:title","content":"任务墙"}],["meta",{"name":"twitter:description","content":"任务墙"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"任务墙\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-20T16:19:33.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1713629973000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/task/index.md","autoDesc":true,"excerpt":"\\n"}');export{d as comp,l as data}; diff --git a/docs/assets/index.html-ZgORyW_U.js b/docs/assets/index.html-ZgORyW_U.js deleted file mode 100644 index f9d4be7..0000000 --- a/docs/assets/index.html-ZgORyW_U.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as i}from"./app-BFngqcKR.js";const n={};function l(a,r){return i(),t("div")}const o=e(n,[["render",l],["__file","index.html.vue"]]),s=JSON.parse('{"path":"/timeline/","title":"Timeline","lang":"en-US","frontmatter":{"title":"Timeline","sidebar":false,"blog":{"type":"type","key":"timeline"},"layout":"Timeline"},"headers":[],"git":{},"filePathRelative":null,"excerpt":""}');export{o as comp,s as data}; diff --git a/docs/assets/mission.html-BD_zSKwT.js b/docs/assets/mission.html-BD_zSKwT.js deleted file mode 100644 index e58d6c3..0000000 --- a/docs/assets/mission.html-BD_zSKwT.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as o,o as t,a}from"./app-BFngqcKR.js";const n={},r=a('

ComfyUI中文社区

Shaping a New Era of Global Innovation and Collaboration

ComfyUI中文社区是由Mixlab孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励创作者们展示他们的创作、分享他们的创新经验,并与其他创新者进行合作和合作。我们相信通过这种跨界的合作和交流,可以激发更多的创意和创新,推动中文创作者在设计领域的发展和影响力的提升。

作为由Mixlab孵化的社区,我们致力于打造一个具有创新和创造力的氛围。我们提供各种资源和工具,帮助创作者们实现他们的创意和创新项目。通过组织创新活动、分享创新案例和举办创新工作坊,我们鼓励创作者们不断挑战自我、突破传统思维,并推动创新的实践和应用。

同时,我们也重视跨界合作和跨文化交流。我们欢迎来自不同领域和文化背景的创作者加入我们的社区,分享他们的专业知识、经验和创新思维。通过这种跨界合作和跨文化交流,我们相信可以打破传统的界限,融合不同领域的创新思维,产生更具有影响力和可持续发展的创意和创新项目。

让我们携手努力,共同塑造一个充满创造力和创新精神的ComfyUI中文社区!

',6),i=[r];function m(p,c){return t(),o("div",null,i)}const l=e(n,[["render",m],["__file","mission.html.vue"]]),f=JSON.parse('{"path":"/posts/mission.html","title":"ComfyUI中文社区","lang":"en-US","frontmatter":{"description":"ComfyUI中文社区 Shaping a New Era of Global Innovation and Collaboration ComfyUI中文社区是由Mixlab孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励创作者们展示他们的创作、分享他们的创新经验,并与其...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/mission.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:title","content":"ComfyUI中文社区"}],["meta",{"property":"og:description","content":"ComfyUI中文社区 Shaping a New Era of Global Innovation and Collaboration ComfyUI中文社区是由Mixlab孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励创作者们展示他们的创作、分享他们的创新经验,并与其..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-04-20T04:19:26.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:title","content":"ComfyUI中文社区"}],["meta",{"name":"twitter:description","content":"ComfyUI中文社区 Shaping a New Era of Global Innovation and Collaboration ComfyUI中文社区是由Mixlab孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励创作者们展示他们的创作、分享他们的创新经验,并与其..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"ComfyUI中文社区\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-04-20T04:19:26.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1713586766000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/mission.md","autoDesc":true,"excerpt":"\\n
\\n

Shaping a New Era of Global Innovation and Collaboration

\\n
\\n

ComfyUI中文社区是由Mixlab孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励创作者们展示他们的创作、分享他们的创新经验,并与其他创新者进行合作和合作。我们相信通过这种跨界的合作和交流,可以激发更多的创意和创新,推动中文创作者在设计领域的发展和影响力的提升。

"}');export{l as comp,f as data}; diff --git a/docs/assets/prompt.html-9pbTPYP-.js b/docs/assets/prompt.html-9pbTPYP-.js deleted file mode 100644 index 6f441ad..0000000 --- a/docs/assets/prompt.html-9pbTPYP-.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as o,o as r,b as e}from"./app-BFngqcKR.js";const n={},a=e("p",null,[e("a",{href:"https://www.douyin.com/shipin/7370377473382451237",target:"_blank",rel:"noopener noreferrer"},"视频地址")],-1),i=e("p",null,"如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯光、色彩、质量等等, 这些都会自动翻译成英文。",-1),p=e("p",null,"这边有一个小开关需要注意默认是打开的,当切换成 off 的时候,他仍然会把中文关键词翻译成英文,但是这时候他不会进行联想补充,而是直接根据这些词生成图像。在模型的选择上,我比较建议选择这 这个扎根呢 xl 模型,这也是我测试了大量模型后发现他无论是在提示词的理解还是图像的画质上,都是比较优秀的一个模型。",-1),c=e("p",null,"这个模型和工作流,包括需要用到的节点,我都会打包好分享给大家,有什么问题也可以评论区留言,我是小同学,我们下期再见哦!",-1),m=[a,i,p,c];function s(l,d){return r(),o("div",null,m)}const _=t(n,[["render",s],["__file","prompt.html.vue"]]),f=JSON.parse('{"path":"/posts/discovery/prompt.html","title":"","lang":"en-US","frontmatter":{"description":"视频地址 如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/prompt.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:description","content":"视频地址 如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-06-06T08:40:41.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:description","content":"视频地址 如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-06-06T08:40:41.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1717663241000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/discovery/prompt.md","autoDesc":true,"excerpt":"

视频地址

\\n

如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯光、色彩、质量等等, 这些都会自动翻译成英文。

"}');export{_ as comp,f as data}; diff --git a/docs/assets/style-B9yQN7kb.css b/docs/assets/style-B9yQN7kb.css deleted file mode 100644 index 3ed2cc1..0000000 --- a/docs/assets/style-B9yQN7kb.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";.vp-back-to-top-button{position:fixed!important;bottom:4rem;inset-inline-end:1rem;z-index:100;width:48px;height:48px;padding:12px;border-width:0;border-radius:50%;background:var(--back-to-top-bg-color);color:var(--back-to-top-color);box-shadow:2px 2px 10px 4px var(--back-to-top-shadow);cursor:pointer}@media (max-width: 959px){.vp-back-to-top-button{transform:scale(.8);transform-origin:100% 100%}}@media print{.vp-back-to-top-button{display:none}}.vp-back-to-top-button:hover{color:var(--back-to-top-color-hover)}.vp-back-to-top-button .back-to-top-icon{overflow:hidden;width:24px;height:24px;margin:0 auto;background:var(--back-to-top-icon-color);-webkit-mask-image:var(--back-to-top-icon);mask-image:var(--back-to-top-icon);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:cover;mask-size:cover}.vp-scroll-progress{position:absolute;right:-2px;bottom:-2px;width:52px;height:52px}.vp-scroll-progress svg{width:100%;height:100%}.vp-scroll-progress circle{opacity:.9;transform:rotate(-90deg);transform-origin:50% 50%}.back-to-top-enter-active,.back-to-top-leave-active{transition:opacity .3s}.back-to-top-enter-from,.back-to-top-leave-to{opacity:0}:root{--back-to-top-z-index: 5;--back-to-top-icon: url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3e%3cpath%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='4'%20d='M24.008%2014.1V42M12%2026l12-12l12%2012M12%206h24'%20/%3e%3c/svg%3e");--back-to-top-bg-color: #fff;--back-to-top-color: #3eaf7c;--back-to-top-icon-color: currentColor;--back-to-top-color-hover: #71cda3;--back-to-top-shadow: rgb(0 0 0 / 20%)}:root{--code-copy-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2' /%3e%3c/svg%3e");--code-copied-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4' /%3e%3c/svg%3e");--copy-code-color: #9e9e9e;--copy-code-hover: rgb(0 0 0 / 50%)}.vp-copy-code-button{position:absolute;top:.5em;right:.5em;z-index:5;width:2.5rem;height:2.5rem;padding:0;border-width:0;border-radius:.5rem;background:transparent;outline:none;opacity:0;cursor:pointer;transition:opacity .4s}@media print{.vp-copy-code-button{display:none}}.vp-copy-code-button:focus,.vp-copy-code-button.copied{opacity:1}.vp-copy-code-button:hover,.vp-copy-code-button.copied{background:var(--copy-code-hover)}.vp-copy-code-button.copied:before{-webkit-mask-image:var(--code-copied-icon);mask-image:var(--code-copied-icon)}.vp-copy-code-button.copied:after{content:attr(data-copied);position:absolute;top:0;right:calc(100% + .25rem);display:block;height:1.25rem;padding:.625rem;border-radius:.5rem;background:var(--copy-code-hover);color:var(--copy-code-color);font-weight:500;line-height:1.25rem;white-space:nowrap}.vp-copy-code-button:before{content:"";width:1.25rem;height:1.25rem;padding:.625rem;background:currentcolor;color:var(--copy-code-color);font-size:1.25rem;-webkit-mask-image:var(--code-copy-icon);mask-image:var(--code-copy-icon);-webkit-mask-position:50%;mask-position:50%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:1em;mask-size:1em}.copy-code-disabled .vp-copy-code-button{display:none}body:not(.copy-code-disabled) div[class*=language-]:hover:before{display:none}body:not(.copy-code-disabled) div[class*=language-]:hover .vp-copy-code-button{opacity:1}:root{--medium-zoom-z-index: 100;--medium-zoom-bg-color: #ffffff;--medium-zoom-opacity: 1}.medium-zoom-overlay{background-color:var(--medium-zoom-bg-color)!important;z-index:var(--medium-zoom-z-index)}.medium-zoom-overlay~img{z-index:calc(var(--medium-zoom-z-index) + 1)}.medium-zoom--opened .medium-zoom-overlay{opacity:var(--medium-zoom-opacity)}:root{--nprogress-color: #29d;--nprogress-z-index: 1031}#nprogress{pointer-events:none}#nprogress .bar{background:var(--nprogress-color);position:fixed;z-index:var(--nprogress-z-index);top:0;left:0;width:100%;height:2px}.vp-page-meta{max-width:var(--content-width);margin:0 auto;padding:.75rem 2.5rem;display:flex;flex-wrap:wrap;justify-content:space-between;overflow:auto}@media (max-width: 959px){.vp-page-meta{padding:2rem}}@media (max-width: 419px){.vp-page-meta{padding:1.5rem}}@media print{.vp-page-meta{margin:0!important;padding-inline:0!important}}@media (max-width: 719px){.vp-page-meta{display:block}}.vp-page-meta .vp-meta-item{flex-grow:1}.vp-page-meta .vp-meta-item .vp-meta-label{font-weight:500}.vp-page-meta .vp-meta-item .vp-meta-label:not(a){color:var(--c-text-lighter)}.vp-page-meta .vp-meta-item .vp-meta-info{color:var(--c-text-quote);font-weight:400}.vp-page-meta .git-info{text-align:end}.vp-page-meta .edit-link{margin-top:.25rem;margin-bottom:.25rem;margin-inline-end:.5rem;font-size:14px}@media print{.vp-page-meta .edit-link{display:none}}.vp-page-meta .edit-link .icon{position:relative;bottom:-.125em;width:1em;height:1em;margin-inline-end:.25em}.vp-page-meta .last-updated,.vp-page-meta .contributors{margin-top:.25rem;margin-bottom:.25rem;font-size:14px}@media (max-width: 719px){.vp-page-meta .last-updated,.vp-page-meta .contributors{font-size:13px;text-align:start}}.vp-page-nav{display:flex;flex-wrap:wrap;max-width:var(--content-width, 740px);min-height:2rem;margin-inline:auto;margin-top:0;padding-block:.5rem;padding-inline:2rem;border-top:1px solid var(--c-border);transition:border-top var(--t-color);padding-top:1rem;padding-bottom:0}@media (max-width: 959px){.vp-page-nav{padding-inline:1rem}}@media print{.vp-page-nav{display:none}}.vp-page-nav .route-link{display:inline-block;flex-grow:1;margin:.25rem;padding:.25rem .5rem;border:1px solid var(--c-border);border-radius:.25rem}.vp-page-nav .route-link:hover{background:var(--c-bg-light)}.vp-page-nav .route-link .hint{color:var(--c-text-quote);font-size:.875rem;line-height:2}.vp-page-nav .prev{text-align:start}.vp-page-nav .next{text-align:end}:root{--c-brand: #3eaf7c;--c-brand-light: #4abf8a;--c-bg: #ffffff;--c-bg-light: #f3f4f5;--c-bg-lighter: #eeeeee;--c-bg-dark: #ebebec;--c-bg-darker: #e6e6e6;--c-bg-navbar: var(--c-bg);--c-bg-sidebar: var(--c-bg);--c-bg-arrow: #cccccc;--c-text: #2c3e50;--c-text-accent: var(--c-brand);--c-text-light: #3a5169;--c-text-lighter: #4e6e8e;--c-text-lightest: #6a8bad;--c-text-quote: #999999;--c-border: #eaecef;--c-border-dark: #dfe2e5;--c-tip: #42b983;--c-tip-bg: var(--c-bg-light);--c-tip-title: var(--c-text);--c-tip-text: var(--c-text);--c-tip-text-accent: var(--c-text-accent);--c-warning: #ffc310;--c-warning-bg: #fffae3;--c-warning-bg-light: #fff3ba;--c-warning-bg-lighter: #fff0b0;--c-warning-border-dark: #f7dc91;--c-warning-details-bg: #fff5ca;--c-warning-title: #f1b300;--c-warning-text: #746000;--c-warning-text-accent: #edb100;--c-warning-text-light: #c1971c;--c-warning-text-quote: #ccab49;--c-danger: #f11e37;--c-danger-bg: #ffe0e0;--c-danger-bg-light: #ffcfde;--c-danger-bg-lighter: #ffc9c9;--c-danger-border-dark: #f1abab;--c-danger-details-bg: #ffd4d4;--c-danger-title: #ed1e2c;--c-danger-text: #660000;--c-danger-text-accent: #bd1a1a;--c-danger-text-light: #b5474d;--c-danger-text-quote: #c15b5b;--c-details-bg: #eeeeee;--c-badge-tip: var(--c-tip);--c-badge-warning: #ecc808;--c-badge-warning-text: var(--c-bg);--c-badge-danger: #dc2626;--c-badge-danger-text: var(--c-bg);--c-code-group-tab-title: rgba(255, 255, 255, .9);--c-code-group-tab-bg: var(--code-bg-color);--c-code-group-tab-outline: var(var(--c-code-group-tab-title));--c-code-group-tab-active-border: var(--c-brand);--t-color: .3s ease;--t-transform: .3s ease;--code-bg-color: #282c34;--code-hl-bg-color: rgba(0, 0, 0, .66);--code-hl-error-bg-color: rgba(244, 63, 94, .16);--code-hl-warning-bg-color: rgba(255, 193, 7, .16);--code-line-diff-remove-color: rgba(244, 63, 94, .16);--code-line-diff-remove-symbol-color: #e0575b;--code-line-diff-add-color: rgba(16, 185, 129, .16);--code-line-diff-add-symbol-color: #298459;--code-ln-color: #9e9e9e;--code-ln-wrapper-width: 3.5rem;--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;--font-family-code: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;--navbar-height: 3.6rem;--navbar-padding-v: .7rem;--navbar-padding-h: 1.5rem;--sidebar-width: 20rem;--sidebar-width-mobile: calc(var(--sidebar-width) * .82);--content-width: 740px;--homepage-width: 960px;--external-link-icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");--external-link-icon-color: var(--c-text-quote)}.vp-back-to-top-button{--back-to-top-color: var(--c-brand);--back-to-top-color-hover: var(--c-brand-light);--back-to-top-bg-color: var(--c-bg)}.vp-catalog-wrapper{--catalog-bg-color: var(--c-bg);--catalog-bg-secondary-color: var(--c-bg-dark);--catalog-border-color: var(--c-border);--catalog-active-color: var(--c-brand);--catalog-hover-color: var(--c-brand-light)}.waline-wrapper{--waline-bg-color: var(--c-bg);--waline-bg-color-light: var(--c-bg-light);--waline-text-color: var(--c-color);--waline-border: 1px solid var(--c-border);--waline-border-color: var(--c-border);--waline-theme-color: var(--c-brand);--waline-active-color: var(--c-brand-light)}.DocSearch{--docsearch-primary-color: var(--c-brand);--docsearch-text-color: var(--c-text);--docsearch-highlight-color: var(--c-brand);--docsearch-muted-color: var(--c-text-quote);--docsearch-container-background: rgba(9, 10, 17, .8);--docsearch-modal-background: var(--c-bg-light);--docsearch-searchbox-background: var(--c-bg-lighter);--docsearch-searchbox-focus-background: var(--c-bg);--docsearch-searchbox-shadow: inset 0 0 0 2px var(--c-brand);--docsearch-hit-color: var(--c-text-light);--docsearch-hit-active-color: var(--c-bg);--docsearch-hit-background: var(--c-bg);--docsearch-hit-shadow: 0 1px 3px 0 var(--c-border-dark);--docsearch-footer-background: var(--c-bg)}.medium-zoom-overlay{--medium-zoom-bg-color: var(--c-bg)}.vp-notice-wrapper{--notice-color: var(--c-text);--notice-bg-color: var(--c-bg);--notice-primary-color: var(--c-brand);--notice-primary-text-color: var(--c-bg);--notice-primary-hover-color: var(--c-brand-light);--notice-button-color: var(--c-bg-light);--notice-button-hover-color: var(--c-bg-lighter)}#nprogress{--nprogress-color: var(--c-brand)}body{--photo-swipe-bullet: var(--c-bg);--photo-swipe-bullet-active: var(--c-brand)}body{--pwa-text-color: var(--c-text);--pwa-bg-color: var(--c-bg);--pwa-border-color: var(--c-brand);--pwa-btn-text-color: var(--c-bg);--pwa-btn-bg-color: var(--c-brand);--pwa-btn-hover-bg-color: var(--c-brand-light)}.redirect-modal-mask{--redirect-bg-color: var(--c-bg);--redirect-bg-color-light: var(--c-bg-light);--redirect-bg-color-lighter: var(--c-bg-lighter);--redirect-text-color: var(--c-text);--redirect-primary-color: var(--c-brand);--redirect-primary-hover-color: var(--c-brand-light);--redirect-primary-text-color: var(--c-bg)}.search-box{--search-bg-color: var(--c-bg);--search-accent-color: var(--c-brand);--search-text-color: var(--c-text);--search-border-color: var(--c-border);--search-item-text-color: var(--c-text-lighter);--search-item-focus-bg-color: var(--c-bg-light)}html.dark{--c-brand: #3aa675;--c-brand-light: #349469;--c-bg: #22272e;--c-bg-light: #2b313a;--c-bg-lighter: #262c34;--c-bg-dark: #343b44;--c-bg-darker: #37404c;--c-text: #adbac7;--c-text-light: #96a7b7;--c-text-lighter: #8b9eb0;--c-text-lightest: #8094a8;--c-border: #3e4c5a;--c-border-dark: #34404c;--c-tip: #318a62;--c-warning: #e0ad15;--c-warning-bg: #2d2f2d;--c-warning-bg-light: #423e2a;--c-warning-bg-lighter: #44442f;--c-warning-border-dark: #957c35;--c-warning-details-bg: #39392d;--c-warning-title: #fdca31;--c-warning-text: #d8d96d;--c-warning-text-accent: #ffbf00;--c-warning-text-light: #ddb84b;--c-warning-text-quote: #ccab49;--c-danger: #fc1e38;--c-danger-bg: #39232c;--c-danger-bg-light: #4b2b35;--c-danger-bg-lighter: #553040;--c-danger-border-dark: #a25151;--c-danger-details-bg: #482936;--c-danger-title: #fc2d3b;--c-danger-text: #ea9ca0;--c-danger-text-accent: #fd3636;--c-danger-text-light: #d9777c;--c-danger-text-quote: #d56b6b;--c-details-bg: #323843;--c-badge-warning: var(--c-warning);--c-badge-warning-text: #3c2e05;--c-badge-danger: var(--c-danger);--c-badge-danger-text: #401416;--code-hl-bg-color: #363b46}html.dark .DocSearch{--docsearch-logo-color: var(--c-text);--docsearch-modal-shadow: inset 1px 1px 0 0 #2c2e40, 0 3px 8px 0 #000309;--docsearch-key-shadow: inset 0 -2px 0 0 #282d55, inset 0 0 1px 1px #51577d, 0 2px 2px 0 rgba(3, 4, 9, .3);--docsearch-key-gradient: linear-gradient(-225deg, #444950, #1c1e21);--docsearch-footer-shadow: inset 0 1px 0 0 rgba(73, 76, 106, .5), 0 -4px 8px 0 rgba(0, 0, 0, .2)}html.dark body{--pwa-shadow-color: rgb(0 0 0 / 30%);--pwa-content-color: #ccc;--pwa-content-light-color: #999}html,body{padding:0;margin:0;background-color:var(--c-bg);transition:background-color var(--t-color)}html.dark{color-scheme:dark}html{font-size:16px}body{font-family:var(--font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1rem;color:var(--c-text)}a{font-weight:500;color:var(--c-text-accent);text-decoration:none;overflow-wrap:break-word}p a code{font-weight:400;color:var(--c-text-accent)}kbd{font-family:var(--font-family-code);color:var(--c-text);background:var(--c-bg-lighter);border:solid .15rem var(--c-border-dark);border-bottom:solid .25rem var(--c-border-dark);border-radius:.15rem;padding:0 .15em}code{font-family:var(--font-family-code);color:var(--c-text-lighter);padding:.25rem .5rem;margin:0;font-size:.875em;background-color:var(--c-bg-light);border-radius:3px;overflow-wrap:break-word;transition:background-color var(--t-color)}blockquote{font-size:1rem;color:var(--c-text-quote);border-left:.2rem solid var(--c-border-dark);margin:1rem 0;padding:.25rem 0 .25rem 1rem;overflow-wrap:break-word}blockquote>p{margin:0}ul,ol{padding-left:1.2em}strong{font-weight:600}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.25;overflow-wrap:break-word}h1:focus-visible,h2:focus-visible,h3:focus-visible,h4:focus-visible,h5:focus-visible,h6:focus-visible{outline:none}h1 .header-anchor,h2 .header-anchor,h3 .header-anchor,h4 .header-anchor,h5 .header-anchor,h6 .header-anchor{color:inherit;text-decoration:none;position:relative}h1 .header-anchor:hover:before,h2 .header-anchor:hover:before,h3 .header-anchor:hover:before,h4 .header-anchor:hover:before,h5 .header-anchor:hover:before,h6 .header-anchor:hover:before{font-size:.8em;content:"¶";position:absolute;left:-.75em;color:var(--c-brand)}h1 .header-anchor:focus-visible,h2 .header-anchor:focus-visible,h3 .header-anchor:focus-visible,h4 .header-anchor:focus-visible,h5 .header-anchor:focus-visible,h6 .header-anchor:focus-visible{outline:none}h1 .header-anchor:focus-visible:before,h2 .header-anchor:focus-visible:before,h3 .header-anchor:focus-visible:before,h4 .header-anchor:focus-visible:before,h5 .header-anchor:focus-visible:before,h6 .header-anchor:focus-visible:before{content:"¶";position:absolute;left:-.75em;color:var(--c-brand);outline:auto}h1{font-size:2.2rem}h2{font-size:1.65rem;padding-bottom:.3rem;border-bottom:1px solid var(--c-border);transition:border-color var(--t-color)}h3{font-size:1.35rem}h4{font-size:1.15rem}h5{font-size:1.05rem}h6{font-size:1rem}@media print{a[href^="http://"]:after,a[href^="https://"]:after{content:" (" attr(href) ") "}}p,ul,ol{line-height:1.7;overflow-wrap:break-word}hr{border:0;border-top:1px solid var(--c-border)}table{border-collapse:collapse;margin:1rem 0;display:block;overflow-x:auto;transition:border-color var(--t-color)}tr{border-top:1px solid var(--c-border-dark);transition:border-color var(--t-color)}tr:nth-child(2n){background-color:var(--c-bg-light);transition:background-color var(--t-color)}tr:nth-child(2n) code{background-color:var(--c-bg-dark)}th,td{padding:.6em 1em;border:1px solid var(--c-border-dark);transition:border-color var(--t-color)}.arrow{display:inline-block;vertical-align:middle;width:1em;height:1em;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.5)' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E");background-position:center;background-repeat:no-repeat;line-height:normal;transition:all .3s}html.dark .arrow{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z'/%3E%3C/svg%3E")}.arrow.down{transform:rotate(180deg)}.arrow.right{transform:rotate(90deg)}.arrow.left{transform:rotate(-90deg)}.badge{display:inline-block;font-size:14px;font-weight:600;height:18px;line-height:18px;border-radius:3px;padding:0 6px;color:var(--c-bg);vertical-align:top;transition:color var(--t-color),background-color var(--t-color)}.badge.tip{background-color:var(--c-badge-tip)}.badge.warning{background-color:var(--c-badge-warning);color:var(--c-badge-warning-text)}.badge.danger{background-color:var(--c-badge-danger);color:var(--c-badge-danger-text)}.badge+.badge{margin-left:5px}code[class*=language-],pre[class*=language-]{color:#ccc;background:none;font-family:var(--font-family-code);font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none}pre[class*=language-]{margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#999}.token.punctuation{color:#ccc}.token.tag,.token.attr-name,.token.namespace,.token.deleted{color:#ec5975}.token.function-name{color:#6196cc}.token.boolean,.token.number,.token.function{color:#f08d49}.token.property,.token.class-name,.token.constant,.token.symbol{color:#f8c555}.token.selector,.token.important,.token.atrule,.token.keyword,.token.builtin{color:#cc99cd}.token.string,.token.char,.token.attr-value,.token.regex,.token.variable{color:#7ec699}.token.operator,.token.entity,.token.url{color:#67cdcc}.token.important,.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:#3eaf7c}.theme-default-content pre,.theme-default-content pre[class*=language-]{line-height:1.7;margin:.85rem 0;border-radius:6px;overflow:auto}.theme-default-content pre code,.theme-default-content pre[class*=language-] code{box-sizing:border-box;color:#fff;padding:1.3rem 1.5rem;display:block;width:-moz-fit-content;width:fit-content;min-width:100%;background-color:transparent!important;border-radius:0;overflow-wrap:unset;-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.theme-default-content .line-number{font-family:var(--font-family-code)}div[class*=language-]{position:relative;background-color:var(--code-bg-color);border-radius:6px}div[class*=language-]:before{content:attr(data-title);position:absolute;z-index:3;top:.8em;right:1em;font-size:.75rem;color:var(--code-ln-color)}div[class*=language-] pre,div[class*=language-] pre[class*=language-]{background:transparent!important;position:relative;z-index:1}div[class*=language-] .highlight-lines{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding-top:1.3rem;position:absolute;top:0;left:0;width:100%;font-size:.875em;line-height:1.7}div[class*=language-] .highlight-lines .highlight-line{background-color:var(--code-hl-bg-color)}div[class*=language-]:not(.line-numbers-mode) .line-numbers{display:none}div[class*=language-].line-numbers-mode .highlight-lines .highlight-line{position:relative}div[class*=language-].line-numbers-mode .highlight-lines .highlight-line:before{content:" ";position:absolute;z-index:2;left:0;top:0;display:block;width:var(--code-ln-wrapper-width);height:100%}div[class*=language-].line-numbers-mode pre{margin-left:var(--code-ln-wrapper-width);vertical-align:middle}div[class*=language-].line-numbers-mode code{padding-left:1rem}div[class*=language-].line-numbers-mode .line-numbers{position:absolute;top:0;width:var(--code-ln-wrapper-width);text-align:center;color:var(--code-ln-color);padding-top:1.3rem;font-size:.875em;line-height:1.7;counter-reset:line-number}div[class*=language-].line-numbers-mode .line-numbers .line-number{position:relative;z-index:3;-webkit-user-select:none;-moz-user-select:none;user-select:none;height:1.7em}div[class*=language-].line-numbers-mode .line-numbers .line-number:before{counter-increment:line-number;content:counter(line-number)}div[class*=language-].line-numbers-mode:after{content:"";position:absolute;top:0;left:0;width:var(--code-ln-wrapper-width);height:100%;border-radius:6px 0 0 6px;border-right:1px solid var(--code-hl-bg-color)}div[class*=language-] pre code .highlighted{background-color:var(--code-hl-bg-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:100%;display:inline-block}div[class*=language-] pre code .highlighted.error{background-color:var(--code-hl-error-bg-color)}div[class*=language-] pre code .highlighted.warning{background-color:var(--code-hl-warning-bg-color)}div[class*=language-] pre code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:100%;display:inline-block}div[class*=language-] pre code .diff:before{position:absolute;left:10px}div[class*=language-] pre code .diff.remove{background-color:var(--code-line-diff-remove-color);opacity:.7}div[class*=language-] pre code .diff.remove:before{content:"-";color:var(--code-line-diff-remove-symbol-color)}div[class*=language-] pre code .diff.add{background-color:var(--code-line-diff-add-color)}div[class*=language-] pre code .diff.add:before{content:"+";color:var(--code-line-diff-add-symbol-color)}div[class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.7;transition:filter .35s,opacity .35s}div[class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}@media (max-width: 419px){.theme-default-content div[class*=language-]{margin:.85rem -1.5rem;border-radius:0}}.code-group__nav{margin-top:.85rem;margin-bottom:calc(-1.7rem - 6px);padding-bottom:calc(1.7rem - 6px);padding-left:10px;padding-top:10px;border-top-left-radius:6px;border-top-right-radius:6px;background-color:var(--c-code-group-tab-bg)}.code-group__nav-tab{border:0;padding:5px;cursor:pointer;background-color:transparent;font-size:.85em;line-height:1.4;color:var(--c-code-group-tab-title);font-weight:600}.code-group__nav-tab:focus{outline:none}.code-group__nav-tab:focus-visible{outline:1px solid var(--c-code-group-tab-outline)}.code-group__nav-tab-active{border-bottom:var(--c-code-group-tab-active-border) 1px solid}@media (max-width: 419px){.code-group__nav{margin-left:-1.5rem;margin-right:-1.5rem;border-radius:0}}.code-group-item{display:none}.code-group-item__active{display:block}.code-group-item>pre{background-color:orange}.custom-container{transition:color var(--t-color),border-color var(--t-color),background-color var(--t-color)}.custom-container .custom-container-title{font-weight:600}.custom-container .custom-container-title:not(:only-child){margin-bottom:-.4rem}.custom-container.tip,.custom-container.warning,.custom-container.danger{padding:.1rem 1.5rem;border-left-width:.5rem;border-left-style:solid;margin:1rem 0}.custom-container.tip{border-color:var(--c-tip);background-color:var(--c-tip-bg);color:var(--c-tip-text)}.custom-container.tip .custom-container-title{color:var(--c-tip-title)}.custom-container.tip a{color:var(--c-tip-text-accent)}.custom-container.tip code{background-color:var(--c-bg-dark)}.custom-container.warning{--external-link-icon-color: var(--c-warning-text-quote);border-color:var(--c-warning);background-color:var(--c-warning-bg);color:var(--c-warning-text)}.custom-container.warning .custom-container-title{color:var(--c-warning-title)}.custom-container.warning a{color:var(--c-warning-text-accent)}.custom-container.warning blockquote{border-left-color:var(--c-warning-border-dark);color:var(--c-warning-text-quote)}.custom-container.warning code{color:var(--c-warning-text-light);background-color:var(--c-warning-bg-light)}.custom-container.warning details{background-color:var(--c-warning-details-bg)}.custom-container.warning details code{background-color:var(--c-warning-bg-lighter)}.custom-container.danger{--external-link-icon-color: var(--c-danger-text-quote);border-color:var(--c-danger);background-color:var(--c-danger-bg);color:var(--c-danger-text)}.custom-container.danger .custom-container-title{color:var(--c-danger-title)}.custom-container.danger a{color:var(--c-danger-text-accent)}.custom-container.danger blockquote{border-left-color:var(--c-danger-border-dark);color:var(--c-danger-text-quote)}.custom-container.danger code{color:var(--c-danger-text-light);background-color:var(--c-danger-bg-light)}.custom-container.danger details{background-color:var(--c-danger-details-bg)}.custom-container.danger details code{background-color:var(--c-danger-bg-lighter)}.custom-container.details{display:block;position:relative;border-radius:2px;margin:1.6em 0;padding:1.6em;background-color:var(--c-details-bg)}.custom-container.details code{background-color:var(--c-bg-darker)}.custom-container.details h4{margin-top:0}.custom-container.details figure:last-child,.custom-container.details p:last-child{margin-bottom:0;padding-bottom:0}.custom-container.details summary{outline:none;cursor:pointer}.vp-external-link-icon:after{content:"";display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:var(--external-link-icon-color);flex-shrink:0;-webkit-mask-image:var(--external-link-icon);mask-image:var(--external-link-icon)}.external-link-icon .external-link:after{content:"";display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:var(--external-link-icon-color);flex-shrink:0;-webkit-mask-image:var(--external-link-icon);mask-image:var(--external-link-icon)}.external-link-icon .theme-default-content a[href*="://"]:not(.no-external-link-icon):after,.external-link-icon .theme-default-content a[target=_blank]:not(.no-external-link-icon):after{content:"";display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:var(--external-link-icon-color);flex-shrink:0;-webkit-mask-image:var(--external-link-icon);mask-image:var(--external-link-icon)}.home{padding:var(--navbar-height) 2rem 0;max-width:var(--homepage-width);margin:0 auto;display:block}.home .hero{text-align:center}.home .hero img{max-width:100%;max-height:280px;display:block;margin:3rem auto 1.5rem}.home .hero h1{font-size:3rem}.home .hero h1,.home .hero .description,.home .hero .actions{margin:1.8rem auto}.home .hero .actions{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center}.home .hero .description{max-width:35rem;font-size:1.6rem;line-height:1.3;color:var(--c-text-lightest)}.home .hero .action-button{display:inline-block;font-size:1.2rem;padding:.8rem 1.6rem;border-width:2px;border-style:solid;border-radius:4px;transition:background-color var(--t-color);box-sizing:border-box}.home .hero .action-button.primary{color:var(--c-bg);background-color:var(--c-brand);border-color:var(--c-brand)}.home .hero .action-button.primary:hover{background-color:var(--c-brand-light)}.home .hero .action-button.secondary{color:var(--c-brand);background-color:var(--c-bg);border-color:var(--c-brand)}.home .hero .action-button.secondary:hover{color:var(--c-bg);background-color:var(--c-brand-light)}.home .features{border-top:1px solid var(--c-border);transition:border-color var(--t-color);padding:1.2rem 0;margin-top:2.5rem;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:stretch;justify-content:space-between}.home .feature{flex-grow:1;flex-basis:30%;max-width:30%}.home .feature h2{font-size:1.4rem;font-weight:500;border-bottom:none;padding-bottom:0;color:var(--c-text-light)}.home .feature p{color:var(--c-text-lighter)}.home .theme-default-content{padding:0;margin:0}.home .footer{padding:2.5rem;border-top:1px solid var(--c-border);text-align:center;color:var(--c-text-lighter);transition:border-color var(--t-color)}@media (max-width: 719px){.home .features{flex-direction:column}.home .feature{max-width:100%;padding:0 2.5rem}}@media (max-width: 419px){.home{padding-left:1.5rem;padding-right:1.5rem}.home .hero img{max-height:210px;margin:2rem auto 1.2rem}.home .hero h1{font-size:2rem}.home .hero h1,.home .hero .description,.home .hero .actions{margin:1.2rem auto}.home .hero .description{font-size:1.2rem}.home .hero .action-button{font-size:1rem;padding:.6rem 1.2rem}.home .feature h2{font-size:1.25rem}}.page{padding-top:var(--navbar-height);padding-left:var(--sidebar-width)}.navbar{position:fixed;z-index:20;top:0;left:0;right:0;height:var(--navbar-height);box-sizing:border-box;border-bottom:1px solid var(--c-border);background-color:var(--c-bg-navbar);transition:background-color var(--t-color),border-color var(--t-color)}.sidebar{font-size:16px;width:var(--sidebar-width);position:fixed;z-index:10;margin:0;top:var(--navbar-height);left:0;bottom:0;box-sizing:border-box;border-right:1px solid var(--c-border);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--c-brand) var(--c-border);background-color:var(--c-bg-sidebar);transition:transform var(--t-transform),background-color var(--t-color),border-color var(--t-color)}.sidebar::-webkit-scrollbar{width:7px}.sidebar::-webkit-scrollbar-track{background-color:var(--c-border)}.sidebar::-webkit-scrollbar-thumb{background-color:var(--c-brand)}.sidebar-mask{position:fixed;z-index:9;top:0;left:0;width:100vw;height:100vh;display:none}.theme-container.sidebar-open .sidebar-mask{display:block}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(1){transform:rotate(45deg) translate3d(5.5px,5.5px,0)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(2){transform:scale3d(0,1,1)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(3){transform:rotate(-45deg) translate3d(6px,-6px,0)}.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(1),.theme-container.sidebar-open .navbar>.toggle-sidebar-button .icon span:nth-child(3){transform-origin:center}.theme-container.no-navbar .theme-default-content h1,.theme-container.no-navbar .theme-default-content h2,.theme-container.no-navbar .theme-default-content h3,.theme-container.no-navbar .theme-default-content h4,.theme-container.no-navbar .theme-default-content h5,.theme-container.no-navbar .theme-default-content h6{margin-top:1.5rem;padding-top:0}.theme-container.no-navbar .page{padding-top:0}.theme-container.no-navbar .sidebar{top:0}.theme-container.no-sidebar .sidebar{display:none}@media (max-width: 719px){.theme-container.no-sidebar .sidebar{display:block}}.theme-container.no-sidebar .page{padding-left:0}.theme-default-content a:not(.header-anchor):hover{text-decoration:underline}.theme-default-content img{max-width:100%}.theme-default-content h1,.theme-default-content h2,.theme-default-content h3,.theme-default-content h4,.theme-default-content h5,.theme-default-content h6{margin-top:calc(.5rem - var(--navbar-height));padding-top:calc(1rem + var(--navbar-height));margin-bottom:0}.theme-default-content h1:first-child,.theme-default-content h2:first-child,.theme-default-content h3:first-child,.theme-default-content h4:first-child,.theme-default-content h5:first-child,.theme-default-content h6:first-child{margin-bottom:1rem}.theme-default-content h1:first-child+p,.theme-default-content h1:first-child+pre,.theme-default-content h1:first-child+.custom-container,.theme-default-content h2:first-child+p,.theme-default-content h2:first-child+pre,.theme-default-content h2:first-child+.custom-container,.theme-default-content h3:first-child+p,.theme-default-content h3:first-child+pre,.theme-default-content h3:first-child+.custom-container,.theme-default-content h4:first-child+p,.theme-default-content h4:first-child+pre,.theme-default-content h4:first-child+.custom-container,.theme-default-content h5:first-child+p,.theme-default-content h5:first-child+pre,.theme-default-content h5:first-child+.custom-container,.theme-default-content h6:first-child+p,.theme-default-content h6:first-child+pre,.theme-default-content h6:first-child+.custom-container{margin-top:2rem}@media (max-width: 959px){.sidebar{font-size:15px;width:var(--sidebar-width-mobile)}.page{padding-left:var(--sidebar-width-mobile)}}@media (max-width: 719px){.sidebar{top:0;padding-top:var(--navbar-height);transform:translate(-100%)}.page{padding-left:0}.theme-container.sidebar-open .sidebar{transform:translate(0)}.theme-container.no-navbar .sidebar{padding-top:0}}@media (max-width: 419px){h1{font-size:1.9rem}}#vp-comment{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem}@media (max-width: 959px){#vp-comment{padding:2rem}}@media (max-width: 419px){#vp-comment{padding:1.5rem}}.navbar{--navbar-line-height: calc( var(--navbar-height) - 2 * var(--navbar-padding-v) );padding:var(--navbar-padding-v) var(--navbar-padding-h);line-height:var(--navbar-line-height)}.navbar .logo{height:var(--navbar-line-height);margin-right:var(--navbar-padding-v);vertical-align:top}.navbar .site-name{font-size:1.3rem;font-weight:600;color:var(--c-text);position:relative}.navbar .navbar-items-wrapper{display:flex;position:absolute;box-sizing:border-box;top:var(--navbar-padding-v);right:var(--navbar-padding-h);height:var(--navbar-line-height);padding-left:var(--navbar-padding-h);white-space:nowrap;font-size:.9rem}.navbar .navbar-items-wrapper .search-box{flex:0 0 auto;vertical-align:top}@media screen and (max-width: 719px){.navbar{padding-left:4rem}.navbar .site-name{display:block;width:calc(100vw - 11rem);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.navbar .can-hide{display:none}}.navbar-items{display:inline-block}@media print{.navbar-items{display:none}}.navbar-items a{display:inline-block;line-height:1.4rem;color:inherit}.navbar-items a:hover,.navbar-items a.route-link-active{color:var(--c-text)}.navbar-items .navbar-item{position:relative;display:inline-block;margin-left:1.5rem;line-height:var(--navbar-line-height)}.navbar-items .navbar-item:first-child{margin-left:0}.navbar-items .navbar-item>a:hover,.navbar-items .navbar-item>a.route-link-active{margin-bottom:-2px;border-bottom:2px solid var(--c-text-accent)}@media (max-width: 719px){.navbar-items .navbar-item{margin-left:0}.navbar-items .navbar-item>a:hover,.navbar-items .navbar-item>a.route-link-active{margin-bottom:0;border-bottom:none}.navbar-items a:hover,.navbar-items a.route-link-active{color:var(--c-text-accent)}}.toggle-sidebar-button{position:absolute;top:.6rem;left:1rem;display:none;padding:.6rem;cursor:pointer}.toggle-sidebar-button .icon{display:flex;flex-direction:column;justify-content:center;align-items:center;width:1.25rem;height:1.25rem;cursor:inherit}.toggle-sidebar-button .icon span{display:inline-block;width:100%;height:2px;border-radius:2px;background-color:var(--c-text);transition:transform var(--t-transform)}.toggle-sidebar-button .icon span:nth-child(2){margin:6px 0}@media screen and (max-width: 719px){.toggle-sidebar-button{display:block}}.toggle-color-mode-button{display:flex;margin:auto;margin-left:1rem;border:0;background:none;color:var(--c-text);opacity:.8;cursor:pointer}@media print{.toggle-color-mode-button{display:none}}.toggle-color-mode-button:hover{opacity:1}.toggle-color-mode-button .icon{width:1.25rem;height:1.25rem}.DocSearch{transition:background-color var(--t-color)}.navbar-dropdown-wrapper{cursor:pointer}.navbar-dropdown-wrapper .navbar-dropdown-title,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:block;font-size:.9rem;font-family:inherit;cursor:inherit;padding:inherit;line-height:1.4rem;background:transparent;border:none;font-weight:500;color:var(--c-text)}.navbar-dropdown-wrapper .navbar-dropdown-title:hover,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile:hover{border-color:transparent}.navbar-dropdown-wrapper .navbar-dropdown-title .arrow,.navbar-dropdown-wrapper .navbar-dropdown-title-mobile .arrow{vertical-align:middle;margin-top:-1px;margin-left:.4rem}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile{display:none;font-weight:600;font-size:inherit}.navbar-dropdown-wrapper .navbar-dropdown-title-mobile:hover{color:var(--c-text-accent)}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item{color:inherit;line-height:1.7rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle{margin:.45rem 0 0;border-top:1px solid var(--c-border);padding:1rem 0 .45rem;font-size:.9rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>span{padding:0 1.5rem 0 1.25rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>a{font-weight:inherit}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle>a.route-link-active:after{display:none}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem-wrapper{padding:0;list-style:none}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem-wrapper .navbar-dropdown-subitem{font-size:.9em}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a{display:block;line-height:1.7rem;position:relative;border-bottom:none;font-weight:400;margin-bottom:0;padding:0 1.5rem 0 1.25rem}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a:hover,.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.route-link-active{color:var(--c-text-accent)}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.route-link-active:after{content:"";width:0;height:0;border-left:5px solid var(--c-text-accent);border-top:3px solid transparent;border-bottom:3px solid transparent;position:absolute;top:calc(50% - 2px);left:9px}.navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item:first-child .navbar-dropdown-subtitle{margin-top:0;padding-top:0;border-top:0}.navbar-dropdown-wrapper.mobile.open .navbar-dropdown-title,.navbar-dropdown-wrapper.mobile.open .navbar-dropdown-title-mobile{margin-bottom:.5rem}.navbar-dropdown-wrapper.mobile .navbar-dropdown-title,.navbar-dropdown-wrapper.mobile .navbar-dropdown-title-mobile{display:none}.navbar-dropdown-wrapper.mobile .navbar-dropdown-title-mobile{display:block}.navbar-dropdown-wrapper.mobile .navbar-dropdown{transition:height .1s ease-out;overflow:hidden}.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle{border-top:0;margin-top:0;padding-top:0;padding-bottom:0}.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subtitle,.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item>a{font-size:15px;line-height:2rem}.navbar-dropdown-wrapper.mobile .navbar-dropdown .navbar-dropdown-item .navbar-dropdown-subitem{font-size:14px;padding-left:1rem}.navbar-dropdown-wrapper:not(.mobile){height:1.8rem}.navbar-dropdown-wrapper:not(.mobile):hover .navbar-dropdown,.navbar-dropdown-wrapper:not(.mobile).open .navbar-dropdown{display:block!important}.navbar-dropdown-wrapper:not(.mobile).open:blur{display:none}.navbar-dropdown-wrapper:not(.mobile) .navbar-dropdown{display:none;height:auto!important;box-sizing:border-box;max-height:calc(100vh - 2.7rem);overflow-y:auto;position:absolute;top:100%;right:0;background-color:var(--c-bg-navbar);padding:.6rem 0;border:1px solid var(--c-border);border-bottom-color:var(--c-border-dark);text-align:left;border-radius:.25rem;white-space:nowrap;margin:0}.page{padding-bottom:2rem;display:block}.page .theme-default-content{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;padding-top:0}@media (max-width: 959px){.page .theme-default-content{padding:2rem}}@media (max-width: 419px){.page .theme-default-content{padding:1.5rem}}.sidebar ul{padding:0;margin:0;list-style-type:none}.sidebar a{display:inline-block}.sidebar .navbar-items{display:none;border-bottom:1px solid var(--c-border);transition:border-color var(--t-color);padding:.5rem 0 .75rem}.sidebar .navbar-items a{font-weight:600}.sidebar .navbar-items .navbar-item{display:block;line-height:1.25rem;font-size:1.1em;padding:.5rem 0 .5rem 1.5rem}.sidebar .sidebar-items{padding:1.5rem 0}@media (max-width: 719px){.sidebar .navbar-items{display:block}.sidebar .navbar-items .navbar-dropdown-wrapper .navbar-dropdown .navbar-dropdown-item a.route-link-active:after{top:calc(1rem - 2px)}.sidebar .sidebar-items{padding:1rem 0}}.sidebar-item{cursor:default;border-left:.25rem solid transparent;color:var(--c-text)}.sidebar-item:focus-visible{outline-width:1px;outline-offset:-1px}.sidebar-item.active:not(p.sidebar-heading){font-weight:600;color:var(--c-text-accent);border-left-color:var(--c-text-accent)}.sidebar-item.sidebar-heading{transition:color .15s ease;font-size:1.1em;font-weight:700;padding:.35rem 1.5rem .35rem 1.25rem;width:100%;box-sizing:border-box;margin:0}.sidebar-item.sidebar-heading+.sidebar-item-children{transition:height .1s ease-out;overflow:hidden;margin-bottom:.75rem}.sidebar-item.collapsible{cursor:pointer}.sidebar-item.collapsible .arrow{position:relative;top:-.12em;left:.5em}.sidebar-item:not(.sidebar-heading){font-size:1em;font-weight:400;display:inline-block;margin:0;padding:.35rem 1rem .35rem 2rem;line-height:1.4;width:100%;box-sizing:border-box}.sidebar-item:not(.sidebar-heading)+.sidebar-item-children{padding-left:1rem;font-size:.95em}.sidebar-item-children .sidebar-item-children .sidebar-item:not(.sidebar-heading){padding:.25rem 1rem .25rem 1.75rem}.sidebar-item-children .sidebar-item-children .sidebar-item:not(.sidebar-heading).active{font-weight:500;border-left-color:transparent}a.sidebar-heading+.sidebar-item-children .sidebar-item:not(.sidebar-heading).active{border-left-color:transparent}a.sidebar-item{cursor:pointer}a.sidebar-item:hover{color:var(--c-text-accent)}.table-of-contents .badge{vertical-align:middle}.dropdown-enter-from,.dropdown-leave-to{height:0!important}.fade-slide-y-enter-active{transition:all .2s ease}.fade-slide-y-leave-active{transition:all .2s cubic-bezier(1,.5,.8,1)}.fade-slide-y-enter-from,.fade-slide-y-leave-to{transform:translateY(10px);opacity:0}html.dark{--box-shadow: #0f0e0d;--card-shadow: rgba(0, 0, 0, .3);--black: #fff;--grey-dark: #999;--grey-light: #666;--white: #000;--grey-darker: #bbb;--grey-lighter: #333;--grey14: #111}:root{--vp-bg: var(--c-bg, #fff);--vp-bgl: var(--c-bg-light, #f3f4f5);--vp-bglt: var(--c-bg-lighter, #eeeeee);--vp-c: var(--c-text, #2c3e50);--vp-cl: var(--c-text-light, #3a5169);--vp-clt: var(--c-text-lighter, #4e6e8e);--vp-brc: var(--c-border, #eaecef);--vp-brcd: var(--c-border-dark, #dfe2e5);--vp-tc: var(--c-brand, #3eaf7c);--vp-tcl: var(--c-brand-light, #4abf8a);--vp-ct: var(--t-color, .3s ease);--vp-tt: var(--t-transform, .3s ease);--box-shadow: #f0f1f2;--card-shadow: rgba(0, 0, 0, .15);--black: #000;--grey-dark: #666;--grey-light: #999;--white: #fff;--grey-darker: #333;--grey-lighter: #bbb;--grey14: #eee}.search-pro-button{border-width:0;background:transparent;display:inline-flex;align-items:center;box-sizing:content-box;height:1.25rem;margin-inline:1rem 0;margin-top:0;margin-bottom:0;padding:.5rem;border:0;border:1px solid var(--vp-bgl);border-radius:1rem;background:var(--vp-bgl);color:var(--vp-c);font-weight:500;cursor:pointer;transition:background var(--vp-ct),color var(--vp-ct)}@media print{.search-pro-button{display:none}}@media (max-width: 959px){.search-pro-button{border-radius:50%}}.search-pro-button:hover{border:1px solid var(--vp-tc);background-color:var(--vp-bglt);color:var(--vp-clt)}.search-pro-button .search-icon{width:1.25rem;height:1.25rem}.search-pro-placeholder{margin-inline:.25rem;font-size:1rem}@media (max-width: 959px){.search-pro-placeholder{display:none}}.search-pro-key-hints{font-size:.75rem}@media (max-width: 959px){.search-pro-key-hints{display:none}}.search-pro-key{display:inline-block;min-width:1em;margin-inline:.125rem;padding:.25rem;border:1px solid var(--vp-brc);border-radius:4px;box-shadow:1px 1px 4px 0 var(--card-shadow);line-height:1;letter-spacing:-.1em;transition:background var(--vp-ct),color var(--vp-ct),border var(--vp-ct) box-shadow var(--vp-ct)}@keyframes search-pro-fade-in{0%{opacity:.2}to{opacity:1}}.search-pro-modal-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;z-index:997;display:flex;align-items:center;justify-content:center;overflow:auto;cursor:default}.search-pro-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:998;animation:.25s search-pro-fade-in;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.search-pro-modal{position:absolute;z-index:999;display:flex;flex-direction:column;width:calc(100% - 6rem);max-width:50em;border-radius:10px;background:var(--vp-bg);box-shadow:2px 2px 10px 0 var(--card-shadow);transition:background var(--vp-ct);animation:.15s pwa-opened}@media (max-width: 1280px){.search-pro-modal{animation:.25s pwa-mobile}}@media (max-width: 719px){.search-pro-modal{top:0;right:0;bottom:0;left:0;box-sizing:border-box;width:100%;max-width:unset;padding:env(--safe-area-inset-top) env(--safe-area-inset-right) env(--safe-area-inset-bottom) env(--safe-area-inset-left)}}.search-pro-box{display:flex;margin:1rem}.search-pro-box form{position:relative;display:flex;flex:1}.search-pro-box label{position:absolute;top:calc(50% - .75rem);inset-inline-start:.5rem;color:var(--vp-tc)}.search-pro-box label .search-icon{width:1.5rem;height:1.5rem}.search-pro-clear-button{border-width:0;background:transparent;cursor:pointer;position:absolute;top:calc(50% - 10px);inset-inline-end:.75rem;padding:0;color:var(--vp-tc)}.search-pro-clear-button:hover{border-radius:50%;background-color:#0000001a}.search-pro-close-button{border-width:0;background:transparent;cursor:pointer;display:none;margin-inline:.5rem -.5rem;padding:.5rem;color:var(--grey-darker);font-size:1rem}@media (max-width: 719px){.search-pro-close-button{display:block}}.search-pro-input{flex:1;width:0;margin:0;padding-block:.25rem;padding-inline:2.5rem 2rem;border:0;border:2px solid var(--vp-tc);border-radius:8px;background:var(--vp-bg);color:var(--vp-c);outline:none;font-size:1.25rem;line-height:2.5;-webkit-appearance:none;-moz-appearance:none;appearance:none}.search-pro-input::-webkit-search-cancel-button{display:none}.search-pro-suggestions{position:absolute;inset:calc(100% + 4px) 0 auto;z-index:20;overflow:visible;overflow-y:auto;max-height:50vh;margin:0;padding:0;border-radius:.5rem;background-color:var(--vp-bg);box-shadow:2px 2px 10px 0 var(--card-shadow);list-style:none;line-height:1.5}.search-pro-suggestion{padding:.25rem 1rem;border-top:1px solid var(--vp-brc);cursor:pointer}.search-pro-suggestion:first-child{border-top:none}.search-pro-suggestion.active,.search-pro-suggestion:hover{background-color:var(--vp-bglt)}.search-pro-auto-complete{display:none;float:right;margin:0 .5rem;padding:4px;border:1px solid var(--vp-brc);border-radius:4px;box-shadow:1px 1px 4px 0 var(--card-shadow);font-size:12px;line-height:1}.search-pro-suggestion.active .search-pro-auto-complete{display:block}.search-pro-result-wrapper{flex-grow:1;overflow-y:auto;min-height:40vh;max-height:calc(80vh - 10rem);padding:0 1rem}@media (max-width: 719px){.search-pro-result-wrapper{min-height:unset;max-height:unset}}.search-pro-result-wrapper.loading,.search-pro-result-wrapper.empty{display:flex;align-items:center;justify-content:center;padding:1.5rem;font-weight:600;font-size:22px;text-align:center}.search-pro-hints{margin-top:1rem;padding:.75rem .5rem;box-shadow:0 -1px 4px 0 var(--card-shadow);line-height:1}.search-pro-hint{display:inline-flex;align-items:center;margin:0 .5rem}.search-pro-hint kbd{margin:0 .5rem;padding:2px;border:1px solid var(--vp-brc);border-radius:4px;box-shadow:1px 1px 4px 0 var(--card-shadow)}.search-pro-hint kbd+kbd{margin-inline-start:-.25rem}.search-pro-hint svg{display:block;width:15px;height:15px}.vp-catalog-wrapper{margin-top:8px;margin-bottom:8px}.vp-catalog-wrapper.index ol{padding-inline-start:0}.vp-catalog-wrapper.index li{list-style-type:none}.vp-catalog-wrapper.index .vp-catalogs{padding-inline-start:0}.vp-catalog-wrapper.index .vp-catalog{list-style-type:none}.vp-catalog-wrapper.index .vp-catalog-title:before{content:"§" counter(catalog-item,upper-roman) " "}.vp-catalog-wrapper.index .vp-child-catalogs{counter-reset:child-catalog}.vp-catalog-wrapper.index .vp-child-catalog{counter-increment:child-catalog}.vp-catalog-wrapper.index .vp-child-catalog .vp-catalog-title:before{content:counter(catalog-item) "." counter(child-catalog) " "}.vp-catalog-wrapper.index .vp-sub-catalogs{padding-inline-start:.5rem}.vp-catalogs{margin:0;counter-reset:catalog-item}.vp-catalogs.deep{padding-inline-start:0}.vp-catalogs.deep .vp-catalog{list-style-type:none}.vp-catalogs .font-icon{vertical-align:baseline;margin-inline-end:.25rem}.vp-catalog{counter-increment:catalog-item}.vp-catalog-main-title{margin-top:calc(.5rem - var(--navbar-height, 3.6rem));margin-bottom:.5rem;padding-top:var(--navbar-height, 3.6rem);font-weight:500;font-size:1.75rem}.vp-catalog-main-title:first-child{margin-bottom:.5rem!important}.vp-catalog-main-title:only-child{margin-bottom:0!important}.vp-catalog-main-title .vp-link{text-decoration:none!important}.vp-catalog-child-title{margin-bottom:.5rem!important}.vp-catalog-child-title.has-children{margin-top:calc(.5rem - var(--navbar-height, 3.6rem));padding-top:var(--navbar-height, 3.6rem);border-bottom:1px solid var(--catalog-border-color);font-weight:500;font-size:1.3rem;transition:border-color .3s}.vp-catalog-child-title.has-children:only-child{margin-bottom:0!important}.vp-catalog-child-title .vp-link{text-decoration:none!important}.vp-catalog-sub-title{font-weight:500;font-size:1.1rem}.vp-catalog-sub-title:only-child{margin-bottom:0!important}.vp-catalog-title{color:inherit;text-decoration:none}.vp-catalog-title:hover{color:var(--catalog-active-color)}.vp-child-catalogs{margin:0}.vp-child-catalog{list-style-type:disc}.vp-sub-catalogs{counter-reset:sub-catalog}.vp-sub-catalog{counter-increment:sub-catalog}.vp-sub-catalog .vp-link:before{content:counter(catalog-item) "." counter(child-catalog) "." counter(sub-catalog) " "}.vp-sub-catalogs-wrapper{display:flex;flex-wrap:wrap}.vp-sub-catalog-link{display:inline-block;margin:4px 8px;padding:4px 8px;border-radius:6px;background-color:var(--catalog-bg-secondary-color);line-height:1.5;overflow-wrap:break-word;transition:background-color .3s,color .3s}.vp-sub-catalog-link:hover{background-color:var(--catalog-hover-color);color:var(--catalog-bg-color);text-decoration:none!important}.vp-catalog-header-anchor{font-size:.85em;float:left;margin-left:-1em;padding-right:0;margin-top:.125em;opacity:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-decoration:none;content:"¶"}@media print{.vp-catalog-header-anchor{display:none}}h2:hover .vp-catalog-header-anchor,h3:hover .vp-catalog-header-anchor{opacity:1;text-decoration:none}.vp-catalog-header-anchor:focus-visible{opacity:1}.vp-empty-catalog{font-size:1.25rem;text-align:center}:root{--catalog-bg-color: #fff;--catalog-bg-secondary-color: #f8f8f8;--catalog-border-color: #e5e5e5;--catalog-active-color: #3eaf7c;--catalog-hover-color: #71cda3}.article-wrapper{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;text-align:center}@media (max-width: 959px){.article-wrapper{padding:2rem}}@media (max-width: 419px){.article-wrapper{padding:1.5rem}}.article{position:relative;box-sizing:border-box;width:100%;margin:0 auto 1.25rem;padding:1rem 1.25rem;border:1px solid var(--c-border);border-radius:.4rem;color:var(--c-text);text-align:start}@media (max-width: 419px){.article{border-radius:0}}.article:hover{cursor:pointer}.article .title{position:relative;display:inline-block;font-size:1.28rem;line-height:2rem}.article .title:after{content:"";position:absolute;bottom:0;inset-inline-start:0;width:100%;height:2px;background:var(--c-brand);visibility:hidden;transition:transform .3s ease-in-out;transform:scaleX(0)}.article .title:hover:after{visibility:visible;transform:scaleX(1)}.article .title a{color:inherit}.article .article-info{display:flex;flex-shrink:0}.article .article-info>span{margin-inline-end:.5em;line-height:1.8}.article .excerpt h1{display:none}.article .excerpt h2{font-size:1.2em}.article .excerpt h3{font-size:1.15em}.category-wrapper{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;padding-top:1rem!important;padding-bottom:0!important;font-size:14px}@media (max-width: 959px){.category-wrapper{padding:2rem}}@media (max-width: 419px){.category-wrapper{padding:1.5rem}}.category-wrapper a{color:inherit}.category-wrapper .category{display:inline-block;vertical-align:middle;overflow:hidden;margin:.3rem .6rem .8rem;padding:.4rem .8rem;border-radius:.25rem;cursor:pointer;transition:background .3s,color .3s}@media (max-width: 419px){.category-wrapper .category{font-size:.9rem}}.category-wrapper .category .category-num{display:inline-block;min-width:1rem;height:1.2rem;margin-inline-start:.2em;padding:0 .1rem;border-radius:.6rem;font-size:.7rem;line-height:1.2rem;text-align:center}.category-wrapper .category.route-link-active{background:var(--c-brand);color:var(--c-bg)}.category-wrapper .category.route-link-active .category-num{color:var(--c-bg)}.tag-wrapper{max-width:var(--content-width);margin:0 auto;padding:2rem 2.5rem;padding-top:1rem!important;padding-bottom:0!important;font-size:14px}@media (max-width: 959px){.tag-wrapper{padding:2rem}}@media (max-width: 419px){.tag-wrapper{padding:1.5rem}}.tag-wrapper a{color:inherit}.tag-wrapper .tag{display:inline-block;vertical-align:middle;overflow:hidden;margin:.3rem .6rem .8rem;padding:.4rem .8rem;border-radius:.25rem;cursor:pointer;transition:background .3s,color .3s}@media (max-width: 419px){.tag-wrapper .tag{font-size:.9rem}}.tag-wrapper .tag .tag-num{display:inline-block;min-width:1rem;height:1.2rem;margin-inline-start:.2em;padding:0 .1rem;border-radius:.6rem;font-size:.7rem;line-height:1.2rem;text-align:center}.tag-wrapper .tag.route-link-active{background:var(--c-brand);color:var(--c-bg)}.tag-wrapper .tag.route-link-active .tag-num{color:var(--c-bg)}.timeline-title{padding:0;text-align:center}.share_btns{display:flex;flex-wrap:wrap;justify-content:center;width:100%}.share_btn{margin:4px;background:#fff!important;color:#000;border-radius:4px;border:1px solid black;padding:8px;display:flex;width:-moz-fit-content;width:fit-content;justify-content:center;align-items:center}.share_btn span{line-height:0;margin-left:12px;margin-right:8px}.floating-btn{position:fixed;bottom:132px;right:18px;background-color:#007bff;color:#fff;border:none;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 5px #0000004d;cursor:pointer;font-size:18px}.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#00000080;z-index:1000}.modal{position:fixed;bottom:100px;right:20px;background:#fff;padding:20px;box-shadow:0 2px 10px #00000080;z-index:1001;border-radius:10px;width:50%;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end}.close-btn{width:44px;height:32px;border-radius:6px;border:1px solid gray}@media (max-width: 959px){.floating-btn{transform:scale(.75);transform-origin:100% 100%}}.my-footer{text-align:center}#translateSelectLanguage{border:none!important;text-align:center;text-decoration:none;display:inline-block;font-size:14.4px;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:500;color:#2c3e50;border-radius:5px;margin-left:5px}html.dark #translateSelectLanguage{border:none!important;text-align:center;text-decoration:none;display:inline-block;font-size:14.4px;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:500;color:#adbac7;border-radius:5px;margin-left:5px;background-color:#22272e}.home .hero .actions .action-button.primary{color:#fff;background-color:#2f2f2f;border-color:#cecece}.home .hero .actions .action-button.secondary{color:#414141;background-color:#fff;border-color:#222}.home .hero .actions .action-button.secondary:hover{color:#fff;background-color:#2f2f2f;border-color:#cecece}.home .hero .dark_mode .action-button.primary{color:#414141;background-color:#fff;border-color:#222}.home .hero .dark_mode .action-button.secondary,.home .hero .dark_mode .action-button.primary:hover{color:#fff;background-color:#2f2f2f;border-color:#cecece}@keyframes anim{0%{opacity:0}to{opacity:1}}.waterfall .item{max-height:560px;background:#000000e0 center center no-repeat;background-size:contain;text-align:center;display:inline-block;font-size:40px;color:#fff;width:220px!important;margin:8px;animation:anim 2s ease-in-out;cursor:pointer;border-radius:24px}.waterfall .item .title{font-size:14px;font-weight:800}.waterfall .item .details{font-size:12px;padding:0 12px}.waterfall .item .text{height:100%;background:linear-gradient(to top,#000,#80808000);display:flex;justify-content:flex-end;align-items:center;flex-direction:column;border-radius:24px}.waterfall .a:hover{filter:brightness(.5);background:#000000b8;content:"ffff"}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.waterfall .loading{width:50px;height:50px;border:5px solid #f3f3f3;border-top:5px solid #3498db;border-radius:50%;animation:spin 1s linear infinite;display:none}.vp-back-to-top-button{--back-to-top-color: #464a5f;--back-to-top-color-hover: #9E9E9E;--back-to-top-bg-color: var(--c-bg)}.search-pro-result-wrapper{scrollbar-color:var(--vp-tc) var(--vp-brc);scrollbar-width:thin}@media (max-width: 419px){.search-pro-result-wrapper{font-size:14px}}.search-pro-result-wrapper::-webkit-scrollbar{width:6px;height:6px}.search-pro-result-wrapper::-webkit-scrollbar-track-piece{border-radius:6px;background:#0000001a}.search-pro-result-wrapper::-webkit-scrollbar-thumb{border-radius:6px;background:var(--vp-tc)}.search-pro-result-wrapper::-webkit-scrollbar-thumb:active{background:var(--vp-tcl)}.search-pro-result-wrapper mark{border-radius:.25em;line-height:1}.search-pro-result-list{margin:0;padding:0}.search-pro-result-list-item{display:block;list-style:none}.search-pro-result-title{position:sticky;top:-2px;z-index:10;margin:-4px;margin-bottom:.25rem;padding:4px;background:var(--vp-bg);color:var(--vp-tc);font-weight:600;font-size:.875em;line-height:2rem;text-indent:.5em}.search-pro-result-item.active .search-pro-result-title{color:var(--vp-tc)}.search-pro-result-type{display:block;width:1rem;height:1rem;margin-inline-start:-.5rem;padding:.5rem;color:var(--vp-tc)}.search-pro-remove-icon{border-width:0;background:transparent;cursor:pointer;box-sizing:content-box;height:1.5rem;padding:0;border-radius:50%;color:var(--vp-tc);font-size:1rem}.search-pro-remove-icon svg{width:1.5rem;height:1.5rem}.search-pro-remove-icon:hover{background:#8080804d}.search-pro-result-content{display:flex;flex-grow:1;flex-direction:column;align-items:stretch;justify-content:center;line-height:1.5}.search-pro-result-content .content-header{margin-bottom:.25rem;border-bottom:1px solid var(--vp-brcd);font-size:.9em}.search-pro-result-item{display:flex;align-items:center;margin:.5rem 0;padding:.5rem .75rem;border-radius:.25rem;background:var(--vp-bgl);color:inherit;box-shadow:0 1px 3px 0 var(--card-shadow);font-weight:400;white-space:pre-wrap;word-wrap:break-word}.search-pro-result-item strong{color:var(--vp-tc)}.search-pro-result-item:hover,.search-pro-result-item.active{background-color:var(--vp-tcl);color:var(--white);cursor:pointer}.search-pro-result-item:hover .search-pro-result-type,.search-pro-result-item:hover .search-pro-remove-icon,.search-pro-result-item:hover strong,.search-pro-result-item.active .search-pro-result-type,.search-pro-result-item.active .search-pro-remove-icon,.search-pro-result-item.active strong{color:var(--white)} diff --git a/docs/assets/unCLIPCheckpointLoader-ii62sfkE.svg b/docs/assets/unCLIPCheckpointLoader-ii62sfkE.svg deleted file mode 100644 index ea8d4ca..0000000 --- a/docs/assets/unCLIPCheckpointLoader-ii62sfkE.svg +++ /dev/null @@ -1 +0,0 @@ -unCLIPCheckpointLoaderMODELCLIPVAECLIP_VISIONckpt_namesd21-unclip-l.ckpt \ No newline at end of file diff --git a/docs/assets/unCLIPConditioning-DLHXFnff.svg b/docs/assets/unCLIPConditioning-DLHXFnff.svg deleted file mode 100644 index e4a820a..0000000 --- a/docs/assets/unCLIPConditioning-DLHXFnff.svg +++ /dev/null @@ -1 +0,0 @@ -unCLIPConditioningconditioningclip_vision_outputCONDITIONINGstrength1.000noise_augmentation0.000 \ No newline at end of file diff --git "a/docs/assets/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.html-ClwOenGg.js" "b/docs/assets/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.html-ClwOenGg.js" deleted file mode 100644 index 9d3aa93..0000000 --- "a/docs/assets/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.html-ClwOenGg.js" +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o,a as i}from"./app-BFngqcKR.js";const a={},c=i('

  • 关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI

  • 摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通过开放和模块化的设计,使得Mixlab Node能够迅速集成最新技术,满足用户多样化的创作需求。文章还分享了“Just do it”的开发模式,展示了如何通过快速迭代和社区反馈实现产品创新。

  • 精华:

    • "Mixlab Node最大的特点就是‘社区驱动开发’,在我们社群里面,开发者和创作者每天都会讨论大量的新技术动态和使用需求。"
    • "我们更提倡‘Just do it’——有好的想法,那就先做了再说。"
    • "通过使用GPT,可以把开发的时间极限压缩。例如,我们在GPT的帮助下,只花了1到2天内完成录屏工作流的开发和上线,这放在传统企业,起码两周才能搞定。"

播客地址:聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态

',3),l=[c];function m(n,s){return o(),e("div",null,l)}const p=t(a,[["render",m],["__file","聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态.html.vue"]]),d=JSON.parse('{"path":"/posts/discovery/%E8%81%8A%E8%81%8AMixlab%20Node%EF%BC%9AAI%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81.html","title":"","lang":"en-US","frontmatter":{"description":"关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI 摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通...","head":[["meta",{"property":"og:url","content":"https://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/%E8%81%8A%E8%81%8AMixlab%20Node%EF%BC%9AAI%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81.html"}],["meta",{"property":"og:site_name","content":"ComfyUI中文爱好者社区"}],["meta",{"property":"og:description","content":"关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI 摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://is1-ssl.mzstatic.com/image/thumb/Podcasts221/v4/c4/0c/55/c40c557b-66f2-6078-2130-b1fe97aa339c/mza_2664138711369555086.jpeg/313x0w.webp"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"property":"article:author","content":"shadow"}],["meta",{"property":"article:modified_time","content":"2024-06-06T08:07:56.000Z"}],["meta",{"property":"og:modified_time","content":"2024-06-06T08:49:49.694Z"}],["meta",{"name":"twitter:description","content":"关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI 摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通..."}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:site","content":"mixlabPro"}],["meta",{"name":"twitter:creator","content":"mixlabPro"}],["meta",{"name":"share_config","content":"buffer,email,facebook,flipboard,hackernews,instapaper,line,linkedin,odnoklassniki,pinterest,pocket,quora,reddit,tumblr,twitter,vk,weibo,wordpress,xing,yammer"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"\\",\\"image\\":[\\"https://is1-ssl.mzstatic.com/image/thumb/Podcasts221/v4/c4/0c/55/c40c557b-66f2-6078-2130-b1fe97aa339c/mza_2664138711369555086.jpeg/313x0w.webp\\"],\\"dateModified\\":\\"2024-06-06T08:07:56.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"shadow\\"}]}"]]},"headers":[],"git":{"updatedTime":1717661276000,"contributors":[{"name":"shadowcz007","email":"chizhiwei007@163.com","commits":1}]},"filePathRelative":"posts/discovery/聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态.md","autoDesc":true,"excerpt":"

\\"\\"

\\n
    \\n
  • \\n

    关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI

    \\n
  • \\n
  • \\n

    摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通过开放和模块化的设计,使得Mixlab Node能够迅速集成最新技术,满足用户多样化的创作需求。文章还分享了“Just do it”的开发模式,展示了如何通过快速迭代和社区反馈实现产品创新。

    \\n
  • \\n
  • \\n

    精华:

    \\n
      \\n
    • \\"Mixlab Node最大的特点就是‘社区驱动开发’,在我们社群里面,开发者和创作者每天都会讨论大量的新技术动态和使用需求。\\"
    • \\n
    • \\"我们更提倡‘Just do it’——有好的想法,那就先做了再说。\\"
    • \\n
    • \\"通过使用GPT,可以把开发的时间极限压缩。例如,我们在GPT的帮助下,只花了1到2天内完成录屏工作流的开发和上线,这放在传统企业,起码两周才能搞定。\\"
    • \\n
    \\n
  • \\n
"}');export{p as comp,d as data}; diff --git a/docs/category/index.html b/docs/category/index.html deleted file mode 100644 index a19367d..0000000 --- a/docs/category/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Categories | ComfyUI中文爱好者社区 - - - - - - - - - diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 6c0650d..0000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/images/00052-3429002811.jpeg b/docs/images/00052-3429002811.jpeg deleted file mode 100644 index d5efe22..0000000 Binary files a/docs/images/00052-3429002811.jpeg and /dev/null differ diff --git a/docs/images/20240514134229.png b/docs/images/20240514134229.png deleted file mode 100644 index 2c25ff7..0000000 Binary files a/docs/images/20240514134229.png and /dev/null differ diff --git a/docs/images/ComfyUI_temp_aglrt_00001_.png b/docs/images/ComfyUI_temp_aglrt_00001_.png deleted file mode 100644 index 684073d..0000000 Binary files a/docs/images/ComfyUI_temp_aglrt_00001_.png and /dev/null differ diff --git a/docs/images/_20240430170536.png b/docs/images/_20240430170536.png deleted file mode 100644 index c1dfead..0000000 Binary files a/docs/images/_20240430170536.png and /dev/null differ diff --git a/docs/images/_20240430170644.png b/docs/images/_20240430170644.png deleted file mode 100644 index 34528bb..0000000 Binary files a/docs/images/_20240430170644.png and /dev/null differ diff --git a/docs/images/_20240430170728.png b/docs/images/_20240430170728.png deleted file mode 100644 index 7a40277..0000000 Binary files a/docs/images/_20240430170728.png and /dev/null differ diff --git a/docs/images/image1.png b/docs/images/image1.png deleted file mode 100644 index a22c5ac..0000000 Binary files a/docs/images/image1.png and /dev/null differ diff --git a/docs/images/image18.png b/docs/images/image18.png deleted file mode 100644 index 02e8747..0000000 Binary files a/docs/images/image18.png and /dev/null differ diff --git a/docs/images/openart.png b/docs/images/openart.png deleted file mode 100644 index f703bc9..0000000 Binary files a/docs/images/openart.png and /dev/null differ diff --git a/docs/images/prompt.png b/docs/images/prompt.png deleted file mode 100644 index 319b735..0000000 Binary files a/docs/images/prompt.png and /dev/null differ diff --git a/docs/images/realtime-design.png b/docs/images/realtime-design.png deleted file mode 100644 index 2cf3dbf..0000000 Binary files a/docs/images/realtime-design.png and /dev/null differ diff --git a/docs/images/weibo_simon.png b/docs/images/weibo_simon.png deleted file mode 100644 index f27554b..0000000 Binary files a/docs/images/weibo_simon.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index eed664b..0000000 --- a/docs/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Home | ComfyUI中文爱好者社区 - - - - - -
ComfyUI中文爱好者社区

ComfyUI中文爱好者社区

HELLO Mix ComfyUI

加入国际社区Mixlab微信社群申请

- - - diff --git a/docs/javascript/model-viewer.min.js b/docs/javascript/model-viewer.min.js deleted file mode 100644 index 1175da3..0000000 --- a/docs/javascript/model-viewer.min.js +++ /dev/null @@ -1,1094 +0,0 @@ -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -const t=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function e(e){return(i,n)=>void 0!==n?((t,e,i)=>{e.constructor.createProperty(i,t)})(e,i,n):t(e,i) -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */}var i;null===(i=window.HTMLSlotElement)||void 0===i||i.prototype.assignedElements; -/** - * @license - * Copyright 2010-2023 Three.js Authors - * SPDX-License-Identifier: MIT - */ -const n="160",r=1,s=2,a=3,o=0,l=1,c=2,h=100,u=0,d=1,A=2,p=0,m=1,g=2,f=3,v=4,_=5,E=6,y="attached",x=300,S=301,C=302,I=303,M=306,w=1e3,b=1001,T=1002,B=1003,R=1004,L=1005,D=1006,U=1007,P=1008,N=1009,F=1012,Q=1013,O=1014,k=1015,G=1016,H=1020,z=1023,V=1026,W=1027,q=1028,X=1030,j=33776,Y=33777,K=33778,J=33779,$=35840,Z=35842,tt=36196,et=37492,it=37496,nt=37808,rt=37812,st=36492,at=2201,ot=2202,lt=2300,ct=2301,ht=2302,ut=2400,dt=2401,At=2402,pt=2500,mt=3001,gt="",ft="srgb",vt="srgb-linear",_t="display-p3",Et="display-p3-linear",yt="linear",xt="srgb",St="rec709",Ct="p3",It=7680,Mt=35044,wt="300 es",bt=1035,Tt=2e3,Bt=2001;class Rt{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const i=this._listeners[t];if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const i=e.slice(0);for(let e=0,n=i.length;e>8&255]+Lt[t>>16&255]+Lt[t>>24&255]+"-"+Lt[255&e]+Lt[e>>8&255]+"-"+Lt[e>>16&15|64]+Lt[e>>24&255]+"-"+Lt[63&i|128]+Lt[i>>8&255]+"-"+Lt[i>>16&255]+Lt[i>>24&255]+Lt[255&n]+Lt[n>>8&255]+Lt[n>>16&255]+Lt[n>>24&255]).toLowerCase()}function Ft(t,e,i){return Math.max(e,Math.min(i,t))}function Qt(t,e){return(t%e+e)%e}function Ot(t,e,i){return(1-i)*t+i*e}function kt(t){return 0==(t&t-1)&&0!==t}function Gt(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Ht(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const Vt={DEG2RAD:Ut,RAD2DEG:Pt,generateUUID:Nt,clamp:Ft,euclideanModulo:Qt,mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},inverseLerp:function(t,e,i){return t!==e?(i-t)/(e-t):0},lerp:Ot,damp:function(t,e,i,n){return Ot(t,e,1-Math.exp(-i*n))},pingpong:function(t,e=1){return e-Math.abs(Qt(t,2*e)-e)},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Dt=t);let e=Dt+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*Ut},radToDeg:function(t){return t*Pt},isPowerOfTwo:kt,ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:Gt,setQuaternionFromProperEuler:function(t,e,i,n,r){const s=Math.cos,a=Math.sin,o=s(i/2),l=a(i/2),c=s((e+n)/2),h=a((e+n)/2),u=s((e-n)/2),d=a((e-n)/2),A=s((n-e)/2),p=a((n-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*p,l*A,o*c);break;case"YXY":t.set(l*A,o*h,l*p,o*c);break;case"ZYZ":t.set(l*p,l*A,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:zt,denormalize:Ht};class Wt{constructor(t=0,e=0){Wt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(Ft(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),n=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*i-s*n+t.x,this.y=r*n+s*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class qt{constructor(t,e,i,n,r,s,a,o,l){qt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,i,n,r,s,a,o,l)}set(t,e,i,n,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=n,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=i,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,n=e.elements,r=this.elements,s=i[0],a=i[3],o=i[6],l=i[1],c=i[4],h=i[7],u=i[2],d=i[5],A=i[8],p=n[0],m=n[3],g=n[6],f=n[1],v=n[4],_=n[7],E=n[2],y=n[5],x=n[8];return r[0]=s*p+a*f+o*E,r[3]=s*m+a*v+o*y,r[6]=s*g+a*_+o*x,r[1]=l*p+c*f+h*E,r[4]=l*m+c*v+h*y,r[7]=l*g+c*_+h*x,r[2]=u*p+d*f+A*E,r[5]=u*m+d*v+A*y,r[8]=u*g+d*_+A*x,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-i*r*c+i*a*o+n*r*l-n*s*o}invert(){const t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,A=e*h+i*u+n*d;if(0===A)return this.set(0,0,0,0,0,0,0,0,0);const p=1/A;return t[0]=h*p,t[1]=(n*l-c*i)*p,t[2]=(a*i-n*s)*p,t[3]=u*p,t[4]=(c*e-n*o)*p,t[5]=(n*r-a*e)*p,t[6]=d*p,t[7]=(i*o-l*e)*p,t[8]=(s*e-i*r)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,n,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(i*o,i*l,-i*(o*s+l*a)+s+t,-n*l,n*o,-n*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Xt.makeScale(t,e)),this}rotate(t){return this.premultiply(Xt.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xt.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let t=0;t<9;t++)if(e[t]!==i[t])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const Xt=new qt;function jt(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Yt(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Kt(){const t=Yt("canvas");return t.style.display="block",t}const Jt={};function $t(t){t in Jt||(Jt[t]=!0,console.warn(t))}const Zt=(new qt).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),te=(new qt).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),ee={[vt]:{transfer:yt,primaries:St,toReference:t=>t,fromReference:t=>t},[ft]:{transfer:xt,primaries:St,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Et]:{transfer:yt,primaries:Ct,toReference:t=>t.applyMatrix3(te),fromReference:t=>t.applyMatrix3(Zt)},[_t]:{transfer:xt,primaries:Ct,toReference:t=>t.convertSRGBToLinear().applyMatrix3(te),fromReference:t=>t.applyMatrix3(Zt).convertLinearToSRGB()}},ie=new Set([vt,Et]),ne={enabled:!0,_workingColorSpace:vt,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!ie.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,i){if(!1===this.enabled||e===i||!e||!i)return t;const n=ee[e].toReference;return(0,ee[i].fromReference)(n(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return ee[t].primaries},getTransfer:function(t){return t===gt?yt:ee[t].transfer}};function re(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function se(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let ae;class oe{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===ae&&(ae=Yt("canvas")),ae.width=t.width,ae.height=t.height;const i=ae.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=ae}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=Yt("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const n=i.getImageData(0,0,t.width,t.height),r=n.data;for(let t=0;t0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==x)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case w:t.x=t.x-Math.floor(t.x);break;case b:t.x=t.x<0?0:1;break;case T:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case w:t.y=t.y-Math.floor(t.y);break;case b:t.y=t.y<0?0:1;break;case T:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return $t("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===ft?mt:3e3}set encoding(t){$t("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===mt?ft:gt}}de.DEFAULT_IMAGE=null,de.DEFAULT_MAPPING=x,de.DEFAULT_ANISOTROPY=1;class Ae{constructor(t=0,e=0,i=0,n=1){Ae.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=n}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,n=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,n,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],A=o[9],p=o[2],m=o[6],g=o[10];if(Math.abs(c-u)o&&t>f?tf?o=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const r=Math.sqrt(n),s=Math.atan2(r,e*i);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*i;if(o=o*t+u*r,l=l*t+d*r,c=c*t+A*r,h=h*t+p*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,i,n,r,s){const a=i[n],o=i[n+1],l=i[n+2],c=i[n+3],h=r[s],u=r[s+1],d=r[s+2],A=r[s+3];return t[e]=a*A+c*h+o*d-l*u,t[e+1]=o*A+c*u+l*h-a*d,t[e+2]=l*A+c*d+a*u-o*h,t[e+3]=c*A-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,n=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(i/2),c=a(n/2),h=a(r/2),u=o(i/2),d=o(n/2),A=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*A,this._y=l*d*h-u*c*A,this._z=l*c*A+u*d*h,this._w=l*c*h-u*d*A;break;case"YXZ":this._x=u*c*h+l*d*A,this._y=l*d*h-u*c*A,this._z=l*c*A-u*d*h,this._w=l*c*h+u*d*A;break;case"ZXY":this._x=u*c*h-l*d*A,this._y=l*d*h+u*c*A,this._z=l*c*A+u*d*h,this._w=l*c*h-u*d*A;break;case"ZYX":this._x=u*c*h-l*d*A,this._y=l*d*h+u*c*A,this._z=l*c*A-u*d*h,this._w=l*c*h+u*d*A;break;case"YZX":this._x=u*c*h+l*d*A,this._y=l*d*h+u*c*A,this._z=l*c*A-u*d*h,this._w=l*c*h-u*d*A;break;case"XZY":this._x=u*c*h-l*d*A,this._y=l*d*h-u*c*A,this._z=l*c*A+u*d*h,this._w=l*c*h+u*d*A;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],n=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=i+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-n)*t}else if(i>a&&i>h){const t=2*Math.sqrt(1+i-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(n+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-i-h);this._w=(r-l)/t,this._x=(n+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-i-a);this._w=(s-n)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return iMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Ft(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(0===i)return this;const n=Math.min(1,e/i);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,n=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=i*c+s*a+n*l-r*o,this._y=n*c+s*o+r*a-i*l,this._z=r*c+s*l+i*o-n*a,this._w=s*c-i*a-n*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const i=this._x,n=this._y,r=this._z,s=this._w;let a=s*t._w+i*t._x+n*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=i,this._y=n,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*i+e*this._x,this._y=t*n+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=i*h+this._x*u,this._y=n*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=Math.random(),e=Math.sqrt(1-t),i=Math.sqrt(t),n=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(e*Math.cos(n),i*Math.sin(r),i*Math.cos(r),e*Math.sin(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class _e{constructor(t=0,e=0,i=0){_e.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return void 0===i&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(ye.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ye.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,n=this.z,r=t.elements,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this}applyQuaternion(t){const e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=2*(s*n-a*i),c=2*(a*e-r*n),h=2*(r*i-s*e);return this.x=e+o*l+s*h-a*c,this.y=i+o*c+a*l-r*h,this.z=n+o*h+r*c-s*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*n,this.y=r[1]*e+r[5]*i+r[9]*n,this.z=r[2]*e+r[6]*i+r[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,n=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return Ee.copy(this).projectOnVector(t),this.sub(Ee)}reflect(t){return this.sub(Ee.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(Ft(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=n,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,i=Math.sqrt(1-t**2);return this.x=i*Math.cos(e),this.y=i*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Ee=new _e,ye=new ve;class xe{constructor(t=new _e(1/0,1/0,1/0),e=new _e(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Ce),Ce.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Le),De.subVectors(this.max,Le),Me.subVectors(t.a,Le),we.subVectors(t.b,Le),be.subVectors(t.c,Le),Te.subVectors(we,Me),Be.subVectors(be,we),Re.subVectors(Me,be);let e=[0,-Te.z,Te.y,0,-Be.z,Be.y,0,-Re.z,Re.y,Te.z,0,-Te.x,Be.z,0,-Be.x,Re.z,0,-Re.x,-Te.y,Te.x,0,-Be.y,Be.x,0,-Re.y,Re.x,0];return!!Ne(e,Me,we,be,De)&&(e=[1,0,0,0,1,0,0,0,1],!!Ne(e,Me,we,be,De)&&(Ue.crossVectors(Te,Be),e=[Ue.x,Ue.y,Ue.z],Ne(e,Me,we,be,De)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Ce).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(Ce).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Se[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Se[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Se[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Se[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Se[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Se[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Se[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Se[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Se)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Se=[new _e,new _e,new _e,new _e,new _e,new _e,new _e,new _e],Ce=new _e,Ie=new xe,Me=new _e,we=new _e,be=new _e,Te=new _e,Be=new _e,Re=new _e,Le=new _e,De=new _e,Ue=new _e,Pe=new _e;function Ne(t,e,i,n,r){for(let s=0,a=t.length-3;s<=a;s+=3){Pe.fromArray(t,s);const a=r.x*Math.abs(Pe.x)+r.y*Math.abs(Pe.y)+r.z*Math.abs(Pe.z),o=e.dot(Pe),l=i.dot(Pe),c=n.dot(Pe);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Fe=new xe,Qe=new _e,Oe=new _e;class ke{constructor(t=new _e,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;void 0!==e?i.copy(e):Fe.setFromPoints(t).getCenter(i);let n=0;for(let e=0,r=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Qe.subVectors(t,this.center);const e=Qe.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),i=.5*(t-this.radius);this.center.addScaledVector(Qe,i/t),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Oe.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Qe.copy(t.center).add(Oe)),this.expandByPoint(Qe.copy(t.center).sub(Oe))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ge=new _e,He=new _e,ze=new _e,Ve=new _e,We=new _e,qe=new _e,Xe=new _e;class je{constructor(t=new _e,e=new _e(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ge)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ge.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ge.copy(this.origin).addScaledVector(this.direction,e),Ge.distanceToSquared(t))}distanceSqToSegment(t,e,i,n){He.copy(t).add(e).multiplyScalar(.5),ze.copy(e).sub(t).normalize(),Ve.copy(this.origin).sub(He);const r=.5*t.distanceTo(e),s=-this.direction.dot(ze),a=Ve.dot(this.direction),o=-Ve.dot(ze),l=Ve.lengthSq(),c=Math.abs(1-s*s);let h,u,d,A;if(c>0)if(h=s*o-a,u=s*a-o,A=r*c,h>=0)if(u>=-A)if(u<=A){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-A?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=A?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return i&&i.copy(this.origin).addScaledVector(this.direction,h),n&&n.copy(He).addScaledVector(ze,u),d}intersectSphere(t,e){Ge.subVectors(t.center,this.origin);const i=Ge.dot(this.direction),n=Ge.dot(Ge)-i*i,r=t.radius*t.radius;if(n>r)return null;const s=Math.sqrt(r-n),a=i-s,o=i+s;return o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return null===i?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,n,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(i=(t.min.x-u.x)*l,n=(t.max.x-u.x)*l):(i=(t.max.x-u.x)*l,n=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),i>s||r>n?null:((r>i||isNaN(i))&&(i=r),(s=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),i>o||a>n?null:((a>i||i!=i)&&(i=a),(o=0?i:n,e)))}intersectsBox(t){return null!==this.intersectBox(t,Ge)}intersectTriangle(t,e,i,n,r){We.subVectors(e,t),qe.subVectors(i,t),Xe.crossVectors(We,qe);let s,a=this.direction.dot(Xe);if(a>0){if(n)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Ve.subVectors(this.origin,t);const o=s*this.direction.dot(qe.crossVectors(Ve,qe));if(o<0)return null;const l=s*this.direction.dot(We.cross(Ve));if(l<0)return null;if(o+l>a)return null;const c=-s*Ve.dot(Xe);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ye{constructor(t,e,i,n,r,s,a,o,l,c,h,u,d,A,p,m){Ye.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,i,n,r,s,a,o,l,c,h,u,d,A,p,m)}set(t,e,i,n,r,s,a,o,l,c,h,u,d,A,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=n,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=A,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Ye).fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,i=t.elements,n=1/Ke.setFromMatrixColumn(t,0).length(),r=1/Ke.setFromMatrixColumn(t,1).length(),s=1/Ke.setFromMatrixColumn(t,2).length();return e[0]=i[0]*n,e[1]=i[1]*n,e[2]=i[2]*n,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*s,e[9]=i[9]*s,e[10]=i[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,n=t.y,r=t.z,s=Math.cos(i),a=Math.sin(i),o=Math.cos(n),l=Math.sin(n),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,i=s*h,n=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=i+n*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=n+i*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,i=o*h,n=l*c,r=l*h;e[0]=t+r*a,e[4]=n*a-i,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=i*a-n,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,i=o*h,n=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=n+i*a,e[1]=i+n*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,i=s*h,n=a*c,r=a*h;e[0]=o*c,e[4]=n*l-i,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=i*l-n,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,i=s*l,n=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=n*h+i,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=i*h+n,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,i=s*l,n=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=i*h-n,e[2]=n*h-i,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose($e,t,Ze)}lookAt(t,e,i){const n=this.elements;return ii.subVectors(t,e),0===ii.lengthSq()&&(ii.z=1),ii.normalize(),ti.crossVectors(i,ii),0===ti.lengthSq()&&(1===Math.abs(i.z)?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),ti.crossVectors(i,ii)),ti.normalize(),ei.crossVectors(ii,ti),n[0]=ti.x,n[4]=ei.x,n[8]=ii.x,n[1]=ti.y,n[5]=ei.y,n[9]=ii.y,n[2]=ti.z,n[6]=ei.z,n[10]=ii.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,n=e.elements,r=this.elements,s=i[0],a=i[4],o=i[8],l=i[12],c=i[1],h=i[5],u=i[9],d=i[13],A=i[2],p=i[6],m=i[10],g=i[14],f=i[3],v=i[7],_=i[11],E=i[15],y=n[0],x=n[4],S=n[8],C=n[12],I=n[1],M=n[5],w=n[9],b=n[13],T=n[2],B=n[6],R=n[10],L=n[14],D=n[3],U=n[7],P=n[11],N=n[15];return r[0]=s*y+a*I+o*T+l*D,r[4]=s*x+a*M+o*B+l*U,r[8]=s*S+a*w+o*R+l*P,r[12]=s*C+a*b+o*L+l*N,r[1]=c*y+h*I+u*T+d*D,r[5]=c*x+h*M+u*B+d*U,r[9]=c*S+h*w+u*R+d*P,r[13]=c*C+h*b+u*L+d*N,r[2]=A*y+p*I+m*T+g*D,r[6]=A*x+p*M+m*B+g*U,r[10]=A*S+p*w+m*R+g*P,r[14]=A*C+p*b+m*L+g*N,r[3]=f*y+v*I+_*T+E*D,r[7]=f*x+v*M+_*B+E*U,r[11]=f*S+v*w+_*R+E*P,r[15]=f*C+v*b+_*L+E*N,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-n*l*h-r*a*u+i*l*u+n*a*d-i*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-n*s*d+n*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+i*s*d+r*a*c-i*l*c)+t[15]*(-n*a*c-e*o*h+e*a*u+n*s*h-i*s*u+i*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],A=t[12],p=t[13],m=t[14],g=t[15],f=h*m*l-p*u*l+p*o*d-a*m*d-h*o*g+a*u*g,v=A*u*l-c*m*l-A*o*d+s*m*d+c*o*g-s*u*g,_=c*p*l-A*h*l+A*a*d-s*p*d-c*a*g+s*h*g,E=A*h*o-c*p*o-A*a*u+s*p*u+c*a*m-s*h*m,y=e*f+i*v+n*_+r*E;if(0===y)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/y;return t[0]=f*x,t[1]=(p*u*r-h*m*r-p*n*d+i*m*d+h*n*g-i*u*g)*x,t[2]=(a*m*r-p*o*r+p*n*l-i*m*l-a*n*g+i*o*g)*x,t[3]=(h*o*r-a*u*r-h*n*l+i*u*l+a*n*d-i*o*d)*x,t[4]=v*x,t[5]=(c*m*r-A*u*r+A*n*d-e*m*d-c*n*g+e*u*g)*x,t[6]=(A*o*r-s*m*r-A*n*l+e*m*l+s*n*g-e*o*g)*x,t[7]=(s*u*r-c*o*r+c*n*l-e*u*l-s*n*d+e*o*d)*x,t[8]=_*x,t[9]=(A*h*r-c*p*r-A*i*d+e*p*d+c*i*g-e*h*g)*x,t[10]=(s*p*r-A*a*r+A*i*l-e*p*l-s*i*g+e*a*g)*x,t[11]=(c*a*r-s*h*r-c*i*l+e*h*l+s*i*d-e*a*d)*x,t[12]=E*x,t[13]=(c*p*n-A*h*n+A*i*u-e*p*u-c*i*m+e*h*m)*x,t[14]=(A*a*n-s*p*n-A*i*o+e*p*o+s*i*m-e*a*m)*x,t[15]=(s*h*n-c*a*n+c*i*o-e*h*o-s*i*u+e*a*u)*x,this}scale(t){const e=this.elements,i=t.x,n=t.y,r=t.z;return e[0]*=i,e[4]*=n,e[8]*=r,e[1]*=i,e[5]*=n,e[9]*=r,e[2]*=i,e[6]*=n,e[10]*=r,e[3]*=i,e[7]*=n,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+i,l*a-n*o,l*o+n*a,0,l*a+n*o,c*a+i,c*o-n*s,0,l*o-n*a,c*o+n*s,r*o*o+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,n,r,s){return this.set(1,i,r,0,t,1,s,0,e,n,1,0,0,0,0,1),this}compose(t,e,i){const n=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,A=r*h,p=s*c,m=s*h,g=a*h,f=o*l,v=o*c,_=o*h,E=i.x,y=i.y,x=i.z;return n[0]=(1-(p+g))*E,n[1]=(d+_)*E,n[2]=(A-v)*E,n[3]=0,n[4]=(d-_)*y,n[5]=(1-(u+g))*y,n[6]=(m+f)*y,n[7]=0,n[8]=(A+v)*x,n[9]=(m-f)*x,n[10]=(1-(u+p))*x,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,i){const n=this.elements;let r=Ke.set(n[0],n[1],n[2]).length();const s=Ke.set(n[4],n[5],n[6]).length(),a=Ke.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],Je.copy(this);const o=1/r,l=1/s,c=1/a;return Je.elements[0]*=o,Je.elements[1]*=o,Je.elements[2]*=o,Je.elements[4]*=l,Je.elements[5]*=l,Je.elements[6]*=l,Je.elements[8]*=c,Je.elements[9]*=c,Je.elements[10]*=c,e.setFromRotationMatrix(Je),i.x=r,i.y=s,i.z=a,this}makePerspective(t,e,i,n,r,s,a=2e3){const o=this.elements,l=2*r/(e-t),c=2*r/(i-n),h=(e+t)/(e-t),u=(i+n)/(i-n);let d,A;if(a===Tt)d=-(s+r)/(s-r),A=-2*s*r/(s-r);else{if(a!==Bt)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);d=-s/(s-r),A=-s*r/(s-r)}return o[0]=l,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=A,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,i,n,r,s,a=2e3){const o=this.elements,l=1/(e-t),c=1/(i-n),h=1/(s-r),u=(e+t)*l,d=(i+n)*c;let A,p;if(a===Tt)A=(s+r)*h,p=-2*h;else{if(a!==Bt)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);A=r*h,p=-1*h}return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-u,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=p,o[14]=-A,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let t=0;t<16;t++)if(e[t]!==i[t])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const Ke=new _e,Je=new Ye,$e=new _e(0,0,0),Ze=new _e(1,1,1),ti=new _e,ei=new _e,ii=new _e,ni=new Ye,ri=new ve;class si{constructor(t=0,e=0,i=0,n=si.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=n}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,n=this._order){return this._x=t,this._y=e,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const n=t.elements,r=n[0],s=n[4],a=n[8],o=n[1],l=n[5],c=n[9],h=n[2],u=n[6],d=n[10];switch(e){case"XYZ":this._y=Math.asin(Ft(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ft(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ft(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-Ft(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Ft(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Ft(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===i&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return ni.makeRotationFromQuaternion(t),this.setFromRotationMatrix(ni,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return ri.setFromEuler(this),this.setFromQuaternion(ri,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}si.DEFAULT_ORDER="XYZ";class ai{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map((t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()}))),n.maxGeometryCount=this._maxGeometryCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),null!==this.boundingBox&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const i=e.shapes;if(Array.isArray(i))for(let e=0,n=i.length;e0){n.children=[];for(let e=0;e0){n.animations=[];for(let e=0;e0&&(i.geometries=e),n.length>0&&(i.materials=n),r.length>0&&(i.textures=r),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),l.length>0&&(i.skeletons=l),c.length>0&&(i.animations=c),h.length>0&&(i.nodes=h)}return i.object=n,i;function s(t){const e=[];for(const i in t){const n=t[i];delete n.metadata,e.push(n)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}static getBarycoord(t,e,i,n,r){yi.subVectors(n,e),xi.subVectors(i,e),Si.subVectors(t,e);const s=yi.dot(yi),a=yi.dot(xi),o=yi.dot(Si),l=xi.dot(xi),c=xi.dot(Si),h=s*l-a*a;if(0===h)return r.set(0,0,0),null;const u=1/h,d=(l*o-a*c)*u,A=(s*c-a*o)*u;return r.set(1-d-A,A,d)}static containsPoint(t,e,i,n){return null!==this.getBarycoord(t,e,i,n,Ci)&&(Ci.x>=0&&Ci.y>=0&&Ci.x+Ci.y<=1)}static getUV(t,e,i,n,r,s,a,o){return!1===Ri&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ri=!0),this.getInterpolation(t,e,i,n,r,s,a,o)}static getInterpolation(t,e,i,n,r,s,a,o){return null===this.getBarycoord(t,e,i,n,Ci)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,Ci.x),o.addScaledVector(s,Ci.y),o.addScaledVector(a,Ci.z),o)}static isFrontFacing(t,e,i,n){return yi.subVectors(i,e),xi.subVectors(t,e),yi.cross(xi).dot(n)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this}setFromAttributeAndIndices(t,e,i,n){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return yi.subVectors(this.c,this.b),xi.subVectors(this.a,this.b),.5*yi.cross(xi).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Li.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Li.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,i,n,r){return!1===Ri&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ri=!0),Li.getInterpolation(t,this.a,this.b,this.c,e,i,n,r)}getInterpolation(t,e,i,n,r){return Li.getInterpolation(t,this.a,this.b,this.c,e,i,n,r)}containsPoint(t){return Li.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Li.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,n=this.b,r=this.c;let s,a;Ii.subVectors(n,i),Mi.subVectors(r,i),bi.subVectors(t,i);const o=Ii.dot(bi),l=Mi.dot(bi);if(o<=0&&l<=0)return e.copy(i);Ti.subVectors(t,n);const c=Ii.dot(Ti),h=Mi.dot(Ti);if(c>=0&&h<=c)return e.copy(n);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(i).addScaledVector(Ii,s);Bi.subVectors(t,r);const d=Ii.dot(Bi),A=Mi.dot(Bi);if(A>=0&&d<=A)return e.copy(r);const p=d*l-o*A;if(p<=0&&l>=0&&A<=0)return a=l/(l-A),e.copy(i).addScaledVector(Mi,a);const m=c*A-d*h;if(m<=0&&h-c>=0&&d-A>=0)return wi.subVectors(r,n),a=(h-c)/(h-c+(d-A)),e.copy(n).addScaledVector(wi,a);const g=1/(m+p+u);return s=p*g,a=u*g,e.copy(i).addScaledVector(Ii,s).addScaledVector(Mi,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Di={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ui={h:0,s:0,l:0},Pi={h:0,s:0,l:0};function Ni(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+6*(e-t)*(2/3-i):t}class Fi{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(void 0===e&&void 0===i){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=ft){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ne.toWorkingColorSpace(this,e),this}setRGB(t,e,i,n=ne.workingColorSpace){return this.r=t,this.g=e,this.b=i,ne.toWorkingColorSpace(this,n),this}setHSL(t,e,i,n=ne.workingColorSpace){if(t=Qt(t,1),e=Ft(e,0,1),i=Ft(i,0,1),0===e)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,r=2*i-n;this.r=Ni(r,n,t+1/3),this.g=Ni(r,n,t),this.b=Ni(r,n,t-1/3)}return ne.toWorkingColorSpace(this,n),this}setStyle(t,e=ft){function i(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const s=n[1],a=n[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const i=n[1],r=i.length;if(3===r)return this.setRGB(parseInt(i.charAt(0),16)/15,parseInt(i.charAt(1),16)/15,parseInt(i.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(i,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=ft){const i=Di[t.toLowerCase()];return void 0!==i?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=re(t.r),this.g=re(t.g),this.b=re(t.b),this}copyLinearToSRGB(t){return this.r=se(t.r),this.g=se(t.g),this.b=se(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=ft){return ne.fromWorkingColorSpace(Qi.copy(this),t),65536*Math.round(Ft(255*Qi.r,0,255))+256*Math.round(Ft(255*Qi.g,0,255))+Math.round(Ft(255*Qi.b,0,255))}getHexString(t=ft){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ne.workingColorSpace){ne.fromWorkingColorSpace(Qi.copy(this),e);const i=Qi.r,n=Qi.g,r=Qi.b,s=Math.max(i,n,r),a=Math.min(i,n,r);let o,l;const c=(a+s)/2;if(a===s)o=0,l=0;else{const t=s-a;switch(l=c<=.5?t/(s+a):t/(2-s-a),s){case i:o=(n-r)/t+(n0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const i=t[e];if(void 0===i){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const n=this[e];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(t){const e=[];for(const i in t){const n=t[i];delete n.metadata,e.push(n)}return e}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),this.side!==o&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),204!==this.blendSrc&&(i.blendSrc=this.blendSrc),205!==this.blendDst&&(i.blendDst=this.blendDst),this.blendEquation!==h&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==It&&(i.stencilFail=this.stencilFail),this.stencilZFail!==It&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==It&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),e){const e=n(t.textures),r=n(t.images);e.length>0&&(i.textures=e),r.length>0&&(i.images=r)}return i}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(null!==e){const t=e.length;i=new Array(t);for(let n=0;n!==t;++n)i[n]=e[n].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class Gi extends ki{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Fi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=u,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Hi=zi();function zi(){const t=new ArrayBuffer(4),e=new Float32Array(t),i=new Uint32Array(t),n=new Uint32Array(512),r=new Uint32Array(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(n[t]=0,n[256|t]=32768,r[t]=24,r[256|t]=24):e<-14?(n[t]=1024>>-e-14,n[256|t]=1024>>-e-14|32768,r[t]=-e-1,r[256|t]=-e-1):e<=15?(n[t]=e+15<<10,n[256|t]=e+15<<10|32768,r[t]=13,r[256|t]=13):e<128?(n[t]=31744,n[256|t]=64512,r[t]=24,r[256|t]=24):(n[t]=31744,n[256|t]=64512,r[t]=13,r[256|t]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,i=0;for(;0==(8388608&e);)e<<=1,i-=8388608;e&=-8388609,i+=947912704,s[t]=e|i}for(let t=1024;t<2048;++t)s[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)a[t]=t<<23;a[31]=1199570944,a[32]=2147483648;for(let t=33;t<63;++t)a[t]=2147483648+(t-32<<23);a[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(o[t]=1024);return{floatView:e,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:s,exponentTable:a,offsetTable:o}}const Vi={toHalfFloat:function(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Ft(t,-65504,65504),Hi.floatView[0]=t;const e=Hi.uint32View[0],i=e>>23&511;return Hi.baseTable[i]+((8388607&e)>>Hi.shiftTable[i])},fromHalfFloat:function(t){const e=t>>10;return Hi.uint32View[0]=Hi.mantissaTable[Hi.offsetTable[e]+(1023&t)]+Hi.exponentTable[e],Hi.floatView[0]}},Wi=new _e,qi=new Wt;class Xi{constructor(t,e,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=i,this.usage=Mt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=k,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let n=0,r=this.itemSize;n0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const e in i){const n=i[e];t.data.attributes[e]=n.toJSON(t.data)}const n={};let r=!1;for(const e in this.morphAttributes){const i=this.morphAttributes[e],s=[];for(let e=0,n=i.length;e0&&(n[e]=s,r=!0)}r&&(t.data.morphAttributes=n,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;null!==i&&this.setIndex(i.clone(e));const n=t.attributes;for(const t in n){const i=n[t];this.setAttribute(t,i.clone(e))}const r=t.morphAttributes;for(const t in r){const i=[],n=r[t];for(let t=0,r=n.length;t0){const i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;t(t.far-t.near)**2)return}an.copy(r).invert(),on.copy(t.ray).applyMatrix4(an),null!==i.boundingBox&&!1===on.intersectsBox(i.boundingBox)||this._computeIntersections(t,e,on)}}_computeIntersections(t,e,i){let n;const r=this.geometry,s=this.material,a=r.index,o=r.attributes.position,l=r.attributes.uv,c=r.attributes.uv1,h=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==a)if(Array.isArray(s))for(let r=0,o=u.length;ri.far?null:{distance:u,point:xn.clone(),object:t}}(t,e,i,n,hn,un,dn,yn);if(d){r&&(mn.fromBufferAttribute(r,c),gn.fromBufferAttribute(r,h),fn.fromBufferAttribute(r,u),d.uv=Li.getInterpolation(yn,hn,un,dn,mn,gn,fn,new Wt)),s&&(mn.fromBufferAttribute(s,c),gn.fromBufferAttribute(s,h),fn.fromBufferAttribute(s,u),d.uv1=Li.getInterpolation(yn,hn,un,dn,mn,gn,fn,new Wt),d.uv2=d.uv1),a&&(vn.fromBufferAttribute(a,c),_n.fromBufferAttribute(a,h),En.fromBufferAttribute(a,u),d.normal=Li.getInterpolation(yn,hn,un,dn,vn,_n,En,new _e),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const t={a:c,b:h,c:u,normal:new _e,materialIndex:0};Li.getNormal(hn,un,dn,t.normal),d.face=t}return d}class In extends sn{constructor(t=1,e=1,i=1,n=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:s};const a=this;n=Math.floor(n),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function A(t,e,i,n,r,s,A,p,m,g,f){const v=s/m,_=A/g,E=s/2,y=A/2,x=p/2,S=m+1,C=g+1;let I=0,M=0;const w=new _e;for(let s=0;s0?1:-1,c.push(w.x,w.y,w.z),h.push(o/m),h.push(1-s/g),I+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const i={};for(const t in this.extensions)!0===this.extensions[t]&&(i[t]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}}class Rn extends Ei{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ye,this.projectionMatrix=new Ye,this.projectionMatrixInverse=new Ye,this.coordinateSystem=Tt}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class Ln extends Rn{constructor(t=50,e=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*Pt*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Ut*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*Pt*Math.atan(Math.tan(.5*Ut*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,i,n,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Ut*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*n/t,e-=s.offsetY*i/a,n*=s.width/t,i*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const Dn=-90;class Un extends Ei{constructor(t,e,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new Ln(Dn,1,t,e);n.layers=this.layers,this.add(n);const r=new Ln(Dn,1,t,e);r.layers=this.layers,this.add(r);const s=new Ln(Dn,1,t,e);s.layers=this.layers,this.add(s);const a=new Ln(Dn,1,t,e);a.layers=this.layers,this.add(a);const o=new Ln(Dn,1,t,e);o.layers=this.layers,this.add(o);const l=new Ln(Dn,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[i,n,r,s,a,o]=e;for(const t of e)this.remove(t);if(t===Tt)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(t!==Bt)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[r,s,a,o,l,c]=this.children,h=t.getRenderTarget(),u=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),A=t.xr.enabled;t.xr.enabled=!1;const p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0,n),t.render(e,r),t.setRenderTarget(i,1,n),t.render(e,s),t.setRenderTarget(i,2,n),t.render(e,a),t.setRenderTarget(i,3,n),t.render(e,o),t.setRenderTarget(i,4,n),t.render(e,l),i.texture.generateMipmaps=p,t.setRenderTarget(i,5,n),t.render(e,c),t.setRenderTarget(h,u,d),t.xr.enabled=A,i.texture.needsPMREMUpdate=!0}}class Pn extends de{constructor(t,e,i,n,r,s,a,o,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:S,i,n,r,s,a,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Nn extends me{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const i={width:t,height:t,depth:1},n=[i,i,i,i,i,i];void 0!==e.encoding&&($t("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),e.colorSpace=e.encoding===mt?ft:gt),this.texture=new Pn(n,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:D}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},n=new In(5,5,5),r=new Bn({name:"CubemapFromEquirect",uniforms:Mn(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:l,blending:0});r.uniforms.tEquirect.value=e;const s=new Sn(n,r),a=e.minFilter;e.minFilter===P&&(e.minFilter=D);return new Un(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,i,n){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,i,n);t.setRenderTarget(r)}}const Fn=new _e,Qn=new _e,On=new qt;class kn{constructor(t=new _e(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const n=Fn.subVectors(i,e).cross(Qn.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const i=t.delta(Fn),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:e.copy(t.start).addScaledVector(i,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||On.getNormalMatrix(t),n=this.coplanarPoint(Fn).applyMatrix4(t),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Gn=new ke,Hn=new _e;class zn{constructor(t=new kn,e=new kn,i=new kn,n=new kn,r=new kn,s=new kn){this.planes=[t,e,i,n,r,s]}set(t,e,i,n,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(n),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=2e3){const i=this.planes,n=t.elements,r=n[0],s=n[1],a=n[2],o=n[3],l=n[4],c=n[5],h=n[6],u=n[7],d=n[8],A=n[9],p=n[10],m=n[11],g=n[12],f=n[13],v=n[14],_=n[15];if(i[0].setComponents(o-r,u-l,m-d,_-g).normalize(),i[1].setComponents(o+r,u+l,m+d,_+g).normalize(),i[2].setComponents(o+s,u+c,m+A,_+f).normalize(),i[3].setComponents(o-s,u-c,m-A,_-f).normalize(),i[4].setComponents(o-a,u-h,m-p,_-v).normalize(),e===Tt)i[5].setComponents(o+a,u+h,m+p,_+v).normalize();else{if(e!==Bt)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);i[5].setComponents(a,h,p,v).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),Gn.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),Gn.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Gn)}intersectsSprite(t){return Gn.center.set(0,0,0),Gn.radius=.7071067811865476,Gn.applyMatrix4(t.matrixWorld),this.intersectsSphere(Gn)}intersectsSphere(t){const e=this.planes,i=t.center,n=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(i)0?t.max.x:t.min.x,Hn.y=n.normal.y>0?t.max.y:t.min.y,Hn.z=n.normal.z>0?t.max.z:t.min.z,n.distanceToPoint(Hn)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Vn(){let t=null,e=!1,i=null,n=null;function r(e,s){i(e,s),n=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==i&&(n=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(t){i=t},setContext:function(e){t=e}}}function Wn(t,e){const i=e.isWebGL2,n=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),n.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const i=n.get(e);i&&(t.deleteBuffer(i.buffer),n.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=n.get(e);return void((!t||t.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor *= toneMappingExposure;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\treturn color;\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},jn={common:{diffuse:{value:new Fi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new qt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new qt},normalScale:{value:new Wt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Fi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0},uvTransform:{value:new qt}},sprite:{diffuse:{value:new Fi(16777215)},opacity:{value:1},center:{value:new Wt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}}},Yn={basic:{uniforms:wn([jn.common,jn.specularmap,jn.envmap,jn.aomap,jn.lightmap,jn.fog]),vertexShader:Xn.meshbasic_vert,fragmentShader:Xn.meshbasic_frag},lambert:{uniforms:wn([jn.common,jn.specularmap,jn.envmap,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)}}]),vertexShader:Xn.meshlambert_vert,fragmentShader:Xn.meshlambert_frag},phong:{uniforms:wn([jn.common,jn.specularmap,jn.envmap,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)},specular:{value:new Fi(1118481)},shininess:{value:30}}]),vertexShader:Xn.meshphong_vert,fragmentShader:Xn.meshphong_frag},standard:{uniforms:wn([jn.common,jn.envmap,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.roughnessmap,jn.metalnessmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Xn.meshphysical_vert,fragmentShader:Xn.meshphysical_frag},toon:{uniforms:wn([jn.common,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.gradientmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)}}]),vertexShader:Xn.meshtoon_vert,fragmentShader:Xn.meshtoon_frag},matcap:{uniforms:wn([jn.common,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.fog,{matcap:{value:null}}]),vertexShader:Xn.meshmatcap_vert,fragmentShader:Xn.meshmatcap_frag},points:{uniforms:wn([jn.points,jn.fog]),vertexShader:Xn.points_vert,fragmentShader:Xn.points_frag},dashed:{uniforms:wn([jn.common,jn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Xn.linedashed_vert,fragmentShader:Xn.linedashed_frag},depth:{uniforms:wn([jn.common,jn.displacementmap]),vertexShader:Xn.depth_vert,fragmentShader:Xn.depth_frag},normal:{uniforms:wn([jn.common,jn.bumpmap,jn.normalmap,jn.displacementmap,{opacity:{value:1}}]),vertexShader:Xn.meshnormal_vert,fragmentShader:Xn.meshnormal_frag},sprite:{uniforms:wn([jn.sprite,jn.fog]),vertexShader:Xn.sprite_vert,fragmentShader:Xn.sprite_frag},background:{uniforms:{uvTransform:{value:new qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Xn.background_vert,fragmentShader:Xn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Xn.backgroundCube_vert,fragmentShader:Xn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Xn.cube_vert,fragmentShader:Xn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Xn.equirect_vert,fragmentShader:Xn.equirect_frag},distanceRGBA:{uniforms:wn([jn.common,jn.displacementmap,{referencePosition:{value:new _e},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Xn.distanceRGBA_vert,fragmentShader:Xn.distanceRGBA_frag},shadow:{uniforms:wn([jn.lights,jn.fog,{color:{value:new Fi(0)},opacity:{value:1}}]),vertexShader:Xn.shadow_vert,fragmentShader:Xn.shadow_frag}};Yn.physical={uniforms:wn([Yn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new qt},clearcoatNormalScale:{value:new Wt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new qt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new qt},sheen:{value:0},sheenColor:{value:new Fi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new qt},transmissionSamplerSize:{value:new Wt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new qt},attenuationDistance:{value:0},attenuationColor:{value:new Fi(0)},specularColor:{value:new Fi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new qt},anisotropyVector:{value:new Wt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new qt}}]),vertexShader:Xn.meshphysical_vert,fragmentShader:Xn.meshphysical_frag};const Kn={r:0,b:0,g:0};function Jn(t,e,i,n,r,s,a){const c=new Fi(0);let h,u,d=!0===s?0:1,A=null,p=0,m=null;function g(e,i){e.getRGB(Kn,bn(t)),n.buffers.color.setClear(Kn.r,Kn.g,Kn.b,i,a)}return{getClearColor:function(){return c},setClearColor:function(t,e=1){c.set(t),d=e,g(c,d)},getClearAlpha:function(){return d},setClearAlpha:function(t){d=t,g(c,d)},render:function(s,f){let v=!1,_=!0===f.isScene?f.background:null;if(_&&_.isTexture){_=(f.backgroundBlurriness>0?i:e).get(_)}null===_?g(c,d):_&&_.isColor&&(g(_,1),v=!0);const E=t.xr.getEnvironmentBlendMode();"additive"===E?n.buffers.color.setClear(0,0,0,1,a):"alpha-blend"===E&&n.buffers.color.setClear(0,0,0,0,a),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),_&&(_.isCubeTexture||_.mapping===M)?(void 0===u&&(u=new Sn(new In(1,1,1),new Bn({name:"BackgroundCubeMaterial",uniforms:Mn(Yn.backgroundCube.uniforms),vertexShader:Yn.backgroundCube.vertexShader,fragmentShader:Yn.backgroundCube.fragmentShader,side:l,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(t,e,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=_,u.material.uniforms.flipEnvMap.value=_.isCubeTexture&&!1===_.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=f.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=f.backgroundIntensity,u.material.toneMapped=ne.getTransfer(_.colorSpace)!==xt,A===_&&p===_.version&&m===t.toneMapping||(u.material.needsUpdate=!0,A=_,p=_.version,m=t.toneMapping),u.layers.enableAll(),s.unshift(u,u.geometry,u.material,0,0,null)):_&&_.isTexture&&(void 0===h&&(h=new Sn(new qn(2,2),new Bn({name:"BackgroundMaterial",uniforms:Mn(Yn.background.uniforms),vertexShader:Yn.background.vertexShader,fragmentShader:Yn.background.fragmentShader,side:o,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(h)),h.material.uniforms.t2D.value=_,h.material.uniforms.backgroundIntensity.value=f.backgroundIntensity,h.material.toneMapped=ne.getTransfer(_.colorSpace)!==xt,!0===_.matrixAutoUpdate&&_.updateMatrix(),h.material.uniforms.uvTransform.value.copy(_.matrix),A===_&&p===_.version&&m===t.toneMapping||(h.material.needsUpdate=!0,A=_,p=_.version,m=t.toneMapping),h.layers.enableAll(),s.unshift(h,h.geometry,h.material,0,0,null))}}}function $n(t,e,i,n){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=n.isWebGL2?null:e.get("OES_vertex_array_object"),a=n.isWebGL2||null!==s,o={},l=A(null);let c=l,h=!1;function u(e){return n.isWebGL2?t.bindVertexArray(e):s.bindVertexArrayOES(e)}function d(e){return n.isWebGL2?t.deleteVertexArray(e):s.deleteVertexArrayOES(e)}function A(t){const e=[],i=[],n=[];for(let t=0;t=0){const i=r[e];let n=s[e];if(void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor)),void 0===i)return!0;if(i.attribute!==n)return!0;if(n&&i.data!==n.data)return!0;a++}}return c.attributesNum!==a||c.index!==n}(r,_,d,E),y&&function(t,e,i,n){const r={},s=e.attributes;let a=0;const o=i.getAttributes();for(const e in o){if(o[e].location>=0){let i=s[e];void 0===i&&("instanceMatrix"===e&&t.instanceMatrix&&(i=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(i=t.instanceColor));const n={};n.attribute=i,i&&i.data&&(n.data=i.data),r[e]=n,a++}}c.attributes=r,c.attributesNum=a,c.index=n}(r,_,d,E)}else{const t=!0===l.wireframe;c.geometry===_.id&&c.program===d.id&&c.wireframe===t||(c.geometry=_.id,c.program=d.id,c.wireframe=t,y=!0)}null!==E&&i.update(E,t.ELEMENT_ARRAY_BUFFER),(y||h)&&(h=!1,function(r,s,a,o){if(!1===n.isWebGL2&&(r.isInstancedMesh||o.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;p();const l=o.attributes,c=a.getAttributes(),h=s.defaultAttributeValues;for(const e in c){const s=c[e];if(s.location>=0){let a=l[e];if(void 0===a&&("instanceMatrix"===e&&r.instanceMatrix&&(a=r.instanceMatrix),"instanceColor"===e&&r.instanceColor&&(a=r.instanceColor)),void 0!==a){const e=a.normalized,l=a.itemSize,c=i.get(a);if(void 0===c)continue;const h=c.buffer,u=c.type,d=c.bytesPerElement,A=!0===n.isWebGL2&&(u===t.INT||u===t.UNSIGNED_INT||a.gpuType===Q);if(a.isInterleavedBufferAttribute){const i=a.data,n=i.stride,c=a.offset;if(i.isInstancedInterleavedBuffer){for(let t=0;t0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name;let a=void 0!==i.precision?i.precision:"highp";const o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||e.has("WEBGL_draw_buffers"),c=!0===i.logarithmicDepthBuffer,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_TEXTURE_SIZE),A=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),m=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),f=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,_=s||e.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==n)return n;if(!0===e.has("EXT_texture_filter_anisotropic")){const i=e.get("EXT_texture_filter_anisotropic");n=t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:A,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:f,vertexTextures:v,floatFragmentTextures:_,floatVertexTextures:v&&_,maxSamples:s?t.getParameter(t.MAX_SAMPLES):0}}function er(t){const e=this;let i=null,n=0,r=!1,s=!1;const a=new kn,o=new qt,l={value:null,needsUpdate:!1};function c(t,i,n,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=n+4*s,r=i.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length0);e.numPlanes=n,e.numIntersection=0}();else{const t=s?0:n,e=4*t;let r=p.clippingState||null;l.value=r,r=c(u,o,e,h);for(let t=0;t!==e;++t)r[t]=i[t];p.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function ir(t){let e=new WeakMap;function i(t,e){return e===I?t.mapping=S:304===e&&(t.mapping=C),t}function n(t){const i=t.target;i.removeEventListener("dispose",n);const r=e.get(i);void 0!==r&&(e.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping;if(s===I||304===s){if(e.has(r)){return i(e.get(r).texture,r.mapping)}{const s=r.image;if(s&&s.height>0){const a=new Nn(s.height/2);return a.fromEquirectangularTexture(t,r),e.set(r,a),r.addEventListener("dispose",n),i(a.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}class nr extends Rn{constructor(t=-1,e=1,i=1,n=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=n,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,i,n,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let r=i-t,s=i+t,a=n+e,o=n-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,a-=e*this.view.offsetY,o=a-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const rr=[.125,.215,.35,.446,.526,.582],sr=20,ar=new nr,or=new Fi;let lr=null,cr=0,hr=0;const ur=(1+Math.sqrt(5))/2,dr=1/ur,Ar=[new _e(1,1,1),new _e(-1,1,1),new _e(1,1,-1),new _e(-1,1,-1),new _e(0,ur,dr),new _e(0,ur,-dr),new _e(dr,0,ur),new _e(-dr,0,ur),new _e(ur,dr,0),new _e(-ur,dr,0)];class pr{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,i=.1,n=100){lr=this._renderer.getRenderTarget(),cr=this._renderer.getActiveCubeFace(),hr=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(t,i,n,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=vr(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=fr(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;tt-4?o=rr[a-t+4-1]:0===a&&(o=0),n.push(o);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,A=6,p=3,m=2,g=1,f=new Float32Array(p*A*d),v=new Float32Array(m*A*d),_=new Float32Array(g*A*d);for(let t=0;t2?0:-1,n=[e,i,0,e+2/3,i,0,e+2/3,i+1,0,e,i,0,e+2/3,i+1,0,e,i+1,0];f.set(n,p*A*t),v.set(u,m*A*t);const r=[t,t,t,t,t,t];_.set(r,g*A*t)}const E=new sn;E.setAttribute("position",new Xi(f,p)),E.setAttribute("uv",new Xi(v,m)),E.setAttribute("faceIndex",new Xi(_,g)),e.push(E),r>4&&r--}return{lodPlanes:e,sizeLods:i,sigmas:n}}(n)),this._blurMaterial=function(t,e,i){const n=new Float32Array(sr),r=new _e(0,1,0),s=new Bn({name:"SphericalGaussianBlur",defines:{n:sr,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:_r(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return s}(n,t,e)}return n}_compileMaterial(t){const e=new Sn(this._lodPlanes[0],t);this._renderer.compile(e,ar)}_sceneToCubeUV(t,e,i,n){const r=new Ln(90,1,e,i),s=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],o=this._renderer,c=o.autoClear,h=o.toneMapping;o.getClearColor(or),o.toneMapping=p,o.autoClear=!1;const u=new Gi({name:"PMREM.Background",side:l,depthWrite:!1,depthTest:!1}),d=new Sn(new In,u);let A=!1;const m=t.background;m?m.isColor&&(u.color.copy(m),t.background=null,A=!0):(u.color.copy(or),A=!0);for(let e=0;e<6;e++){const i=e%3;0===i?(r.up.set(0,s[e],0),r.lookAt(a[e],0,0)):1===i?(r.up.set(0,0,s[e]),r.lookAt(0,a[e],0)):(r.up.set(0,s[e],0),r.lookAt(0,0,a[e]));const l=this._cubeSize;gr(n,i*l,e>2?l:0,l,l),o.setRenderTarget(n),A&&o.render(d,r),o.render(t,r)}d.geometry.dispose(),d.material.dispose(),o.toneMapping=h,o.autoClear=c,t.background=m}_textureToCubeUV(t,e){const i=this._renderer,n=t.mapping===S||t.mapping===C;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=vr()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=fr());const r=n?this._cubemapMaterial:this._equirectMaterial,s=new Sn(this._lodPlanes[0],r);r.uniforms.envMap.value=t;const a=this._cubeSize;gr(e,0,0,3*a,2*a),i.setRenderTarget(e),i.render(s,ar)}_applyPMREM(t){const e=this._renderer,i=e.autoClear;e.autoClear=!1;for(let e=1;esr&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let t=0;tf-4?n-f+4:0),4*(this._cubeSize-v),3*v,2*v),o.setRenderTarget(e),o.render(c,ar)}}function mr(t,e,i){const n=new me(t,e,i);return n.texture.mapping=M,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function gr(t,e,i,n,r){t.viewport.set(e,i,n,r),t.scissor.set(e,i,n,r)}function fr(){return new Bn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_r(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function vr(){return new Bn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_r(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function _r(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Er(t){let e=new WeakMap,i=null;function n(t){const i=t.target;i.removeEventListener("dispose",n);const r=e.get(i);void 0!==r&&(e.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,a=s===I||304===s,o=s===S||s===C;if(a||o){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let n=e.get(r);return null===i&&(i=new pr(t)),n=a?i.fromEquirectangular(r,n):i.fromCubemap(r,n),e.set(r,n),n.texture}if(e.has(r))return e.get(r).texture;{const s=r.image;if(a&&s&&s.height>0||o&&s&&function(t){let e=0;const i=6;for(let n=0;ne.maxTextureSize&&(I=Math.ceil(C/e.maxTextureSize),C=e.maxTextureSize);const M=new Float32Array(C*I*4*A),w=new ge(M,C,I,A);w.type=k,w.needsUpdate=!0;const b=4*S;for(let B=0;B0)return t;const r=e*i;let s=Pr[r];if(void 0===s&&(s=new Float32Array(r),Pr[r]=s),0!==e){n.toArray(s,0);for(let n=1,r=0;n!==e;++n)r+=i,t[n].toArray(s,r)}return s}function Gr(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i":" "} ${r}: ${i[t]}`)}return n.join("\n")}(t.getShaderSource(e),n)}return r}function Os(t,e){const i=function(t){const e=ne.getPrimaries(ne.workingColorSpace),i=ne.getPrimaries(t);let n;switch(e===i?n="":e===Ct&&i===St?n="LinearDisplayP3ToLinearSRGB":e===St&&i===Ct&&(n="LinearSRGBToLinearDisplayP3"),t){case vt:case Et:return[n,"LinearTransferOETF"];case ft:case _t:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[n,"LinearTransferOETF"]}}(e);return`vec4 ${t}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function ks(t,e){let i;switch(e){case m:i="Linear";break;case g:i="Reinhard";break;case f:i="OptimizedCineon";break;case v:i="ACESFilmic";break;case E:i="AgX";break;case _:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),i="Linear"}return"vec3 "+t+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function Gs(t){return""!==t}function Hs(t,e){const i=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,i).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function zs(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Vs=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ws(t){return t.replace(Vs,Xs)}const qs=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Xs(t,e){let i=Xn[e];if(void 0===i){const t=qs.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");i=Xn[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return Ws(i)}const js=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ys(t){return t.replace(js,Ks)}function Ks(t,e,i,n){let r="";for(let t=parseInt(e);t0&&(w+="\n"),b=[E,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,x].filter(Gs).join("\n"),b.length>0&&(b+="\n")):(w=[Js(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,x,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+f:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.morphColors&&i.isWebGL2?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+m:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Gs).join("\n"),b=[E,Js(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,x,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+g:"",i.envMap?"#define "+f:"",i.envMap?"#define "+v:"",_?"#define CUBEUV_TEXEL_WIDTH "+_.texelWidth:"",_?"#define CUBEUV_TEXEL_HEIGHT "+_.texelHeight:"",_?"#define CUBEUV_MAX_MIP "+_.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+m:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==p?"#define TONE_MAPPING":"",i.toneMapping!==p?Xn.tonemapping_pars_fragment:"",i.toneMapping!==p?ks("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",Xn.colorspace_pars_fragment,Os("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(Gs).join("\n")),c=Ws(c),c=Hs(c,i),c=zs(c,i),h=Ws(h),h=Hs(h,i),h=zs(h,i),c=Ys(c),h=Ys(h),i.isWebGL2&&!0!==i.isRawShaderMaterial&&(T="#version 300 es\n",w=[y,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+w,b=["precision mediump sampler2DArray;","#define varying in",i.glslVersion===wt?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===wt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+b);const B=T+w+c,R=T+b+h,L=Ps(o,o.VERTEX_SHADER,B),D=Ps(o,o.FRAGMENT_SHADER,R);function U(e){if(t.debug.checkShaderErrors){const i=o.getProgramInfoLog(I).trim(),n=o.getShaderInfoLog(L).trim(),r=o.getShaderInfoLog(D).trim();let s=!0,a=!0;if(!1===o.getProgramParameter(I,o.LINK_STATUS))if(s=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(o,I,L,D);else{const t=Qs(o,L,"vertex"),e=Qs(o,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+o.getError()+" - VALIDATE_STATUS "+o.getProgramParameter(I,o.VALIDATE_STATUS)+"\n\nProgram Info Log: "+i+"\n"+t+"\n"+e)}else""!==i?console.warn("THREE.WebGLProgram: Program Info Log:",i):""!==n&&""!==r||(a=!1);a&&(e.diagnostics={runnable:s,programLog:i,vertexShader:{log:n,prefix:w},fragmentShader:{log:r,prefix:b}})}o.deleteShader(L),o.deleteShader(D),P=new Us(o,I),N=function(t,e){const i={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r0,K=s.clearcoat>0,J=s.iridescence>0,$=s.sheen>0,Z=s.transmission>0,tt=Y&&!!s.anisotropyMap,et=K&&!!s.clearcoatMap,it=K&&!!s.clearcoatNormalMap,nt=K&&!!s.clearcoatRoughnessMap,rt=J&&!!s.iridescenceMap,st=J&&!!s.iridescenceThicknessMap,at=$&&!!s.sheenColorMap,ot=$&&!!s.sheenRoughnessMap,lt=!!s.specularMap,ct=!!s.specularColorMap,ht=!!s.specularIntensityMap,ut=Z&&!!s.transmissionMap,dt=Z&&!!s.thicknessMap,At=!!s.gradientMap,pt=!!s.alphaMap,mt=s.alphaTest>0,gt=!!s.alphaHash,ft=!!s.extensions,_t=!!x.attributes.uv1,Et=!!x.attributes.uv2,yt=!!x.attributes.uv3;let St=p;return s.toneMapped&&(null!==P&&!0!==P.isXRRenderTarget||(St=t.toneMapping)),{isWebGL2:d,shaderID:w,shaderType:s.type,shaderName:s.name,vertexShader:B,fragmentShader:R,defines:s.defines,customVertexShaderID:L,customFragmentShaderID:D,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:g,batching:F,instancing:N,instancingColor:N&&null!==E.instanceColor,supportsVertexTextures:m,outputColorSpace:null===P?t.outputColorSpace:!0===P.isXRRenderTarget?P.texture.colorSpace:vt,map:Q,matcap:O,envMap:k,envMapMode:k&&C.mapping,envMapCubeUVHeight:I,aoMap:G,lightMap:H,bumpMap:z,normalMap:V,displacementMap:m&&W,emissiveMap:q,normalMapObjectSpace:V&&1===s.normalMapType,normalMapTangentSpace:V&&0===s.normalMapType,metalnessMap:X,roughnessMap:j,anisotropy:Y,anisotropyMap:tt,clearcoat:K,clearcoatMap:et,clearcoatNormalMap:it,clearcoatRoughnessMap:nt,iridescence:J,iridescenceMap:rt,iridescenceThicknessMap:st,sheen:$,sheenColorMap:at,sheenRoughnessMap:ot,specularMap:lt,specularColorMap:ct,specularIntensityMap:ht,transmission:Z,transmissionMap:ut,thicknessMap:dt,gradientMap:At,opaque:!1===s.transparent&&1===s.blending,alphaMap:pt,alphaTest:mt,alphaHash:gt,combine:s.combine,mapUv:Q&&v(s.map.channel),aoMapUv:G&&v(s.aoMap.channel),lightMapUv:H&&v(s.lightMap.channel),bumpMapUv:z&&v(s.bumpMap.channel),normalMapUv:V&&v(s.normalMap.channel),displacementMapUv:W&&v(s.displacementMap.channel),emissiveMapUv:q&&v(s.emissiveMap.channel),metalnessMapUv:X&&v(s.metalnessMap.channel),roughnessMapUv:j&&v(s.roughnessMap.channel),anisotropyMapUv:tt&&v(s.anisotropyMap.channel),clearcoatMapUv:et&&v(s.clearcoatMap.channel),clearcoatNormalMapUv:it&&v(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nt&&v(s.clearcoatRoughnessMap.channel),iridescenceMapUv:rt&&v(s.iridescenceMap.channel),iridescenceThicknessMapUv:st&&v(s.iridescenceThicknessMap.channel),sheenColorMapUv:at&&v(s.sheenColorMap.channel),sheenRoughnessMapUv:ot&&v(s.sheenRoughnessMap.channel),specularMapUv:lt&&v(s.specularMap.channel),specularColorMapUv:ct&&v(s.specularColorMap.channel),specularIntensityMapUv:ht&&v(s.specularIntensityMap.channel),transmissionMapUv:ut&&v(s.transmissionMap.channel),thicknessMapUv:dt&&v(s.thicknessMap.channel),alphaMapUv:pt&&v(s.alphaMap.channel),vertexTangents:!!x.attributes.tangent&&(V||Y),vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!x.attributes.color&&4===x.attributes.color.itemSize,vertexUv1s:_t,vertexUv2s:Et,vertexUv3s:yt,pointsUvs:!0===E.isPoints&&!!x.attributes.uv&&(Q||pt),fog:!!y,useFog:!0===s.fog,fogExp2:y&&y.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:A,skinning:!0===E.isSkinnedMesh,morphTargets:void 0!==x.morphAttributes.position,morphNormals:void 0!==x.morphAttributes.normal,morphColors:void 0!==x.morphAttributes.color,morphTargetsCount:T,morphTextureStride:U,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:s.dithering,shadowMapEnabled:t.shadowMap.enabled&&u.length>0,shadowMapType:t.shadowMap.type,toneMapping:St,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Q&&!0===s.map.isVideoTexture&&ne.getTransfer(s.map.colorSpace)===xt,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===c,flipSided:s.side===l,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:ft&&!0===s.extensions.derivatives,extensionFragDepth:ft&&!0===s.extensions.fragDepth,extensionDrawBuffers:ft&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:ft&&!0===s.extensions.shaderTextureLOD,extensionClipCullDistance:ft&&s.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:d||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||n.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(e){const i=[];if(e.shaderID?i.push(e.shaderID):(i.push(e.customVertexShaderID),i.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)i.push(t),i.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(i,e),function(t,e){o.disableAll(),e.isWebGL2&&o.enable(0);e.supportsVertexTextures&&o.enable(1);e.instancing&&o.enable(2);e.instancingColor&&o.enable(3);e.matcap&&o.enable(4);e.envMap&&o.enable(5);e.normalMapObjectSpace&&o.enable(6);e.normalMapTangentSpace&&o.enable(7);e.clearcoat&&o.enable(8);e.iridescence&&o.enable(9);e.alphaTest&&o.enable(10);e.vertexColors&&o.enable(11);e.vertexAlphas&&o.enable(12);e.vertexUv1s&&o.enable(13);e.vertexUv2s&&o.enable(14);e.vertexUv3s&&o.enable(15);e.vertexTangents&&o.enable(16);e.anisotropy&&o.enable(17);e.alphaHash&&o.enable(18);e.batching&&o.enable(19);t.push(o.mask),o.disableAll(),e.fog&&o.enable(0);e.useFog&&o.enable(1);e.flatShading&&o.enable(2);e.logarithmicDepthBuffer&&o.enable(3);e.skinning&&o.enable(4);e.morphTargets&&o.enable(5);e.morphNormals&&o.enable(6);e.morphColors&&o.enable(7);e.premultipliedAlpha&&o.enable(8);e.shadowMapEnabled&&o.enable(9);e.useLegacyLights&&o.enable(10);e.doubleSided&&o.enable(11);e.flipSided&&o.enable(12);e.useDepthPacking&&o.enable(13);e.dithering&&o.enable(14);e.transmission&&o.enable(15);e.sheen&&o.enable(16);e.opaque&&o.enable(17);e.pointsUvs&&o.enable(18);e.decodeVideoTexture&&o.enable(19);t.push(o.mask)}(i,e),i.push(t.outputColorSpace)),i.push(e.customProgramCacheKey),i.join()},getUniforms:function(t){const e=f[t.type];let i;if(e){const t=Yn[e];i=Tn.clone(t.uniforms)}else i=t.uniforms;return i},acquireProgram:function(e,i){let n;for(let t=0,e=u.length;t0?n.push(h):!0===a.transparent?r.push(h):i.push(h)},unshift:function(t,e,a,o,l,c){const h=s(t,e,a,o,l,c);a.transmission>0?n.unshift(h):!0===a.transparent?r.unshift(h):i.unshift(h)},finish:function(){for(let i=e,n=t.length;i1&&i.sort(t||ra),n.length>1&&n.sort(e||sa),r.length>1&&r.sort(e||sa)}}}function oa(){let t=new WeakMap;return{get:function(e,i){const n=t.get(e);let r;return void 0===n?(r=new aa,t.set(e,[r])):i>=n.length?(r=new aa,n.push(r)):r=n[i],r},dispose:function(){t=new WeakMap}}}function la(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let i;switch(e.type){case"DirectionalLight":i={direction:new _e,color:new Fi};break;case"SpotLight":i={position:new _e,direction:new _e,color:new Fi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new _e,color:new Fi,distance:0,decay:0};break;case"HemisphereLight":i={direction:new _e,skyColor:new Fi,groundColor:new Fi};break;case"RectAreaLight":i={color:new Fi,position:new _e,halfWidth:new _e,halfHeight:new _e}}return t[e.id]=i,i}}}let ca=0;function ha(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function ua(t,e){const i=new la,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let i;switch(e.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wt};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wt,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=i,i}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let t=0;t<9;t++)r.probe.push(new _e);const s=new _e,a=new Ye,o=new Ye;return{setup:function(s,a){let o=0,l=0,c=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let h=0,u=0,d=0,A=0,p=0,m=0,g=0,f=0,v=0,_=0,E=0;s.sort(ha);const y=!0===a?Math.PI:1;for(let t=0,e=s.length;t0&&(e.isWebGL2?!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=jn.LTC_FLOAT_1,r.rectAreaLTC2=jn.LTC_FLOAT_2):(r.rectAreaLTC1=jn.LTC_HALF_1,r.rectAreaLTC2=jn.LTC_HALF_2):!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=jn.LTC_FLOAT_1,r.rectAreaLTC2=jn.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=jn.LTC_HALF_1,r.rectAreaLTC2=jn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=o,r.ambient[1]=l,r.ambient[2]=c;const x=r.hash;x.directionalLength===h&&x.pointLength===u&&x.spotLength===d&&x.rectAreaLength===A&&x.hemiLength===p&&x.numDirectionalShadows===m&&x.numPointShadows===g&&x.numSpotShadows===f&&x.numSpotMaps===v&&x.numLightProbes===E||(r.directional.length=h,r.spot.length=d,r.rectArea.length=A,r.point.length=u,r.hemi.length=p,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=f,r.spotShadowMap.length=f,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=g,r.spotLightMatrix.length=f+v-_,r.spotLightMap.length=v,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=E,x.directionalLength=h,x.pointLength=u,x.spotLength=d,x.rectAreaLength=A,x.hemiLength=p,x.numDirectionalShadows=m,x.numPointShadows=g,x.numSpotShadows=f,x.numSpotMaps=v,x.numLightProbes=E,r.version=ca++)},setupView:function(t,e){let i=0,n=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e=s.length?(a=new da(t,e),s.push(a)):a=s[r],a},dispose:function(){i=new WeakMap}}}class pa extends ki{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class ma extends ki{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function ga(t,e,i){let n=new zn;const s=new Wt,h=new Wt,u=new Ae,d=new pa({depthPacking:3201}),A=new ma,p={},m=i.maxTextureSize,g={[o]:l,[l]:o,[c]:c},f=new Bn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wt},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),v=f.clone();v.defines.HORIZONTAL_PASS=1;const _=new sn;_.setAttribute("position",new Xi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Sn(_,f),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=r;let x=this.type;function S(i,n){const r=e.update(E);f.defines.VSM_SAMPLES!==i.blurSamples&&(f.defines.VSM_SAMPLES=i.blurSamples,v.defines.VSM_SAMPLES=i.blurSamples,f.needsUpdate=!0,v.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new me(s.x,s.y)),f.uniforms.shadow_pass.value=i.map.texture,f.uniforms.resolution.value=i.mapSize,f.uniforms.radius.value=i.radius,t.setRenderTarget(i.mapPass),t.clear(),t.renderBufferDirect(n,null,r,f,E,null),v.uniforms.shadow_pass.value=i.mapPass.texture,v.uniforms.resolution.value=i.mapSize,v.uniforms.radius.value=i.radius,t.setRenderTarget(i.map),t.clear(),t.renderBufferDirect(n,null,r,v,E,null)}function C(e,i,n,r){let s=null;const o=!0===n.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==o)s=o;else if(s=!0===n.isPointLight?A:d,t.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){const t=s.uuid,e=i.uuid;let n=p[t];void 0===n&&(n={},p[t]=n);let r=n[e];void 0===r&&(r=s.clone(),n[e]=r,i.addEventListener("dispose",M)),s=r}if(s.visible=i.visible,s.wireframe=i.wireframe,s.side=r===a?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:g[i.side],s.alphaMap=i.alphaMap,s.alphaTest=i.alphaTest,s.map=i.map,s.clipShadows=i.clipShadows,s.clippingPlanes=i.clippingPlanes,s.clipIntersection=i.clipIntersection,s.displacementMap=i.displacementMap,s.displacementScale=i.displacementScale,s.displacementBias=i.displacementBias,s.wireframeLinewidth=i.wireframeLinewidth,s.linewidth=i.linewidth,!0===n.isPointLight&&!0===s.isMeshDistanceMaterial){t.properties.get(s).light=n}return s}function I(i,r,s,o,l){if(!1===i.visible)return;if(i.layers.test(r.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&l===a)&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,i.matrixWorld);const n=e.update(i),a=i.material;if(Array.isArray(a)){const e=n.groups;for(let c=0,h=e.length;cm||s.y>m)&&(s.x>m&&(h.x=Math.floor(m/g.x),s.x=h.x*g.x,c.mapSize.x=h.x),s.y>m&&(h.y=Math.floor(m/g.y),s.y=h.y*g.y,c.mapSize.y=h.y)),null===c.map||!0===A||!0===p){const t=this.type!==a?{minFilter:B,magFilter:B}:{};null!==c.map&&c.map.dispose(),c.map=new me(s.x,s.y,t),c.map.texture.name=l.name+".shadowMap",c.camera.updateProjectionMatrix()}t.setRenderTarget(c.map),t.clear();const f=c.getViewportCount();for(let t=0;t=1):-1!==N.indexOf("OpenGL ES")&&(P=parseFloat(/^OpenGL ES (\d)/.exec(N)[1]),U=P>=2);let F=null,Q={};const O=t.getParameter(t.SCISSOR_BOX),k=t.getParameter(t.VIEWPORT),G=(new Ae).fromArray(O),H=(new Ae).fromArray(k);function z(e,i,r,s){const a=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let o=0;on||t.height>n)&&(r=n/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const n=e?Gt:Math.floor,s=n(r*t.width),a=n(r*t.height);void 0===u&&(u=p(s,a));const o=i?p(s,a):u;o.width=s,o.height=a;return o.getContext("2d").drawImage(t,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+s+"x"+a+")."),o}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function g(t){return kt(t.width)&&kt(t.height)}function f(t,e){return t.generateMipmaps&&e&&t.minFilter!==B&&t.minFilter!==D}function v(e){t.generateMipmap(e)}function _(i,n,r,s,a=!1){if(!1===o)return n;if(null!==i){if(void 0!==t[i])return t[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let l=n;if(n===t.RED&&(r===t.FLOAT&&(l=t.R32F),r===t.HALF_FLOAT&&(l=t.R16F),r===t.UNSIGNED_BYTE&&(l=t.R8)),n===t.RED_INTEGER&&(r===t.UNSIGNED_BYTE&&(l=t.R8UI),r===t.UNSIGNED_SHORT&&(l=t.R16UI),r===t.UNSIGNED_INT&&(l=t.R32UI),r===t.BYTE&&(l=t.R8I),r===t.SHORT&&(l=t.R16I),r===t.INT&&(l=t.R32I)),n===t.RG&&(r===t.FLOAT&&(l=t.RG32F),r===t.HALF_FLOAT&&(l=t.RG16F),r===t.UNSIGNED_BYTE&&(l=t.RG8)),n===t.RGBA){const e=a?yt:ne.getTransfer(s);r===t.FLOAT&&(l=t.RGBA32F),r===t.HALF_FLOAT&&(l=t.RGBA16F),r===t.UNSIGNED_BYTE&&(l=e===xt?t.SRGB8_ALPHA8:t.RGBA8),r===t.UNSIGNED_SHORT_4_4_4_4&&(l=t.RGBA4),r===t.UNSIGNED_SHORT_5_5_5_1&&(l=t.RGB5_A1)}return l!==t.R16F&&l!==t.R32F&&l!==t.RG16F&&l!==t.RG32F&&l!==t.RGBA16F&&l!==t.RGBA32F||e.get("EXT_color_buffer_float"),l}function E(t,e,i){return!0===f(t,i)||t.isFramebufferTexture&&t.minFilter!==B&&t.minFilter!==D?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function y(e){return e===B||e===R||e===L?t.NEAREST:t.LINEAR}function x(t){const e=t.target;e.removeEventListener("dispose",x),function(t){const e=n.get(t);if(void 0===e.__webglInit)return;const i=t.source,r=d.get(i);if(r){const n=r[e.__cacheKey];n.usedTimes--,0===n.usedTimes&&C(t),0===Object.keys(r).length&&d.delete(i)}n.remove(t)}(e),e.isVideoTexture&&h.delete(e)}function S(e){const i=e.target;i.removeEventListener("dispose",S),function(e){const i=e.texture,r=n.get(e),s=n.get(i);void 0!==s.__webglTexture&&(t.deleteTexture(s.__webglTexture),a.memory.textures--);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(r.__webglFramebuffer[e]))for(let i=0;i0&&s.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void K(s,e,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(t.TEXTURE_2D,s.__webglTexture,t.TEXTURE0+r)}const Q={[w]:t.REPEAT,[b]:t.CLAMP_TO_EDGE,[T]:t.MIRRORED_REPEAT},q={[B]:t.NEAREST,[R]:t.NEAREST_MIPMAP_NEAREST,[L]:t.NEAREST_MIPMAP_LINEAR,[D]:t.LINEAR,[U]:t.LINEAR_MIPMAP_NEAREST,[P]:t.LINEAR_MIPMAP_LINEAR},X={512:t.NEVER,519:t.ALWAYS,513:t.LESS,515:t.LEQUAL,514:t.EQUAL,518:t.GEQUAL,516:t.GREATER,517:t.NOTEQUAL};function j(i,s,a){if(a?(t.texParameteri(i,t.TEXTURE_WRAP_S,Q[s.wrapS]),t.texParameteri(i,t.TEXTURE_WRAP_T,Q[s.wrapT]),i!==t.TEXTURE_3D&&i!==t.TEXTURE_2D_ARRAY||t.texParameteri(i,t.TEXTURE_WRAP_R,Q[s.wrapR]),t.texParameteri(i,t.TEXTURE_MAG_FILTER,q[s.magFilter]),t.texParameteri(i,t.TEXTURE_MIN_FILTER,q[s.minFilter])):(t.texParameteri(i,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(i,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),i!==t.TEXTURE_3D&&i!==t.TEXTURE_2D_ARRAY||t.texParameteri(i,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),s.wrapS===b&&s.wrapT===b||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(i,t.TEXTURE_MAG_FILTER,y(s.magFilter)),t.texParameteri(i,t.TEXTURE_MIN_FILTER,y(s.minFilter)),s.minFilter!==B&&s.minFilter!==D&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),s.compareFunction&&(t.texParameteri(i,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(i,t.TEXTURE_COMPARE_FUNC,X[s.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const a=e.get("EXT_texture_filter_anisotropic");if(s.magFilter===B)return;if(s.minFilter!==L&&s.minFilter!==P)return;if(s.type===k&&!1===e.has("OES_texture_float_linear"))return;if(!1===o&&s.type===G&&!1===e.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||n.get(s).__currentAnisotropy)&&(t.texParameterf(i,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),n.get(s).__currentAnisotropy=s.anisotropy)}}function Y(e,i){let n=!1;void 0===e.__webglInit&&(e.__webglInit=!0,i.addEventListener("dispose",x));const r=i.source;let s=d.get(r);void 0===s&&(s={},d.set(r,s));const o=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(i);if(o!==e.__cacheKey){void 0===s[o]&&(s[o]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,n=!0),s[o].usedTimes++;const r=s[e.__cacheKey];void 0!==r&&(s[e.__cacheKey].usedTimes--,0===r.usedTimes&&C(i)),e.__cacheKey=o,e.__webglTexture=s[o].texture}return n}function K(e,a,l){let c=t.TEXTURE_2D;(a.isDataArrayTexture||a.isCompressedArrayTexture)&&(c=t.TEXTURE_2D_ARRAY),a.isData3DTexture&&(c=t.TEXTURE_3D);const h=Y(e,a),u=a.source;i.bindTexture(c,e.__webglTexture,t.TEXTURE0+l);const d=n.get(u);if(u.version!==d.__version||!0===h){i.activeTexture(t.TEXTURE0+l);const e=ne.getPrimaries(ne.workingColorSpace),n=a.colorSpace===gt?null:ne.getPrimaries(a.colorSpace),A=a.colorSpace===gt||e===n?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,A);const p=function(t){return!o&&(t.wrapS!==b||t.wrapT!==b||t.minFilter!==B&&t.minFilter!==D)}(a)&&!1===g(a.image);let y=m(a.image,p,!1,r.maxTextureSize);y=nt(a,y);const x=g(y)||o,S=s.convert(a.format,a.colorSpace);let C,I=s.convert(a.type),M=_(a.internalFormat,S,I,a.colorSpace,a.isVideoTexture);j(c,a,x);const w=a.mipmaps,T=o&&!0!==a.isVideoTexture&&M!==tt,R=void 0===d.__version||!0===h,L=E(a,y,x);if(a.isDepthTexture)M=t.DEPTH_COMPONENT,o?M=a.type===k?t.DEPTH_COMPONENT32F:a.type===O?t.DEPTH_COMPONENT24:a.type===H?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT16:a.type===k&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),a.format===V&&M===t.DEPTH_COMPONENT&&a.type!==F&&a.type!==O&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),a.type=O,I=s.convert(a.type)),a.format===W&&M===t.DEPTH_COMPONENT&&(M=t.DEPTH_STENCIL,a.type!==H&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),a.type=H,I=s.convert(a.type))),R&&(T?i.texStorage2D(t.TEXTURE_2D,1,M,y.width,y.height):i.texImage2D(t.TEXTURE_2D,0,M,y.width,y.height,0,S,I,null));else if(a.isDataTexture)if(w.length>0&&x){T&&R&&i.texStorage2D(t.TEXTURE_2D,L,M,w[0].width,w[0].height);for(let e=0,n=w.length;e>=1,n>>=1}}else if(w.length>0&&x){T&&R&&i.texStorage2D(t.TEXTURE_2D,L,M,w[0].width,w[0].height);for(let e=0,n=w.length;e>h),n=Math.max(1,r.height>>h);c===t.TEXTURE_3D||c===t.TEXTURE_2D_ARRAY?i.texImage3D(c,h,A,e,n,r.depth,0,u,d,null):i.texImage2D(c,h,A,e,n,0,u,d,null)}i.bindFramebuffer(t.FRAMEBUFFER,e),it(r)?l.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,o,c,n.get(a).__webglTexture,0,et(r)):(c===t.TEXTURE_2D||c>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,o,c,n.get(a).__webglTexture,h),i.bindFramebuffer(t.FRAMEBUFFER,null)}function $(e,i,n){if(t.bindRenderbuffer(t.RENDERBUFFER,e),i.depthBuffer&&!i.stencilBuffer){let r=!0===o?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(n||it(i)){const e=i.depthTexture;e&&e.isDepthTexture&&(e.type===k?r=t.DEPTH_COMPONENT32F:e.type===O&&(r=t.DEPTH_COMPONENT24));const n=et(i);it(i)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,n,r,i.width,i.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,n,r,i.width,i.height)}else t.renderbufferStorage(t.RENDERBUFFER,r,i.width,i.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(i.depthBuffer&&i.stencilBuffer){const r=et(i);n&&!1===it(i)?t.renderbufferStorageMultisample(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,i.width,i.height):it(i)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,i.width,i.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,i.width,i.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=!0===i.isWebGLMultipleRenderTargets?i.texture:[i.texture];for(let r=0;r0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function nt(t,i){const n=t.colorSpace,r=t.format,s=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||t.format===bt||n!==vt&&n!==gt&&(ne.getTransfer(n)===xt?!1===o?!0===e.has("EXT_sRGB")&&r===z?(t.format=bt,t.minFilter=D,t.generateMipmaps=!1):i=oe.sRGBToLinear(i):r===z&&s===N||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),i}this.allocateTextureUnit=function(){const t=I;return t>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+r.maxTextures),I+=1,t},this.resetTextureUnits=function(){I=0},this.setTexture2D=M,this.setTexture2DArray=function(e,r){const s=n.get(e);e.version>0&&s.__version!==e.version?K(s,e,r):i.bindTexture(t.TEXTURE_2D_ARRAY,s.__webglTexture,t.TEXTURE0+r)},this.setTexture3D=function(e,r){const s=n.get(e);e.version>0&&s.__version!==e.version?K(s,e,r):i.bindTexture(t.TEXTURE_3D,s.__webglTexture,t.TEXTURE0+r)},this.setTextureCube=function(e,a){const l=n.get(e);e.version>0&&l.__version!==e.version?function(e,a,l){if(6!==a.image.length)return;const c=Y(e,a),h=a.source;i.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+l);const u=n.get(h);if(h.version!==u.__version||!0===c){i.activeTexture(t.TEXTURE0+l);const e=ne.getPrimaries(ne.workingColorSpace),n=a.colorSpace===gt?null:ne.getPrimaries(a.colorSpace),d=a.colorSpace===gt||e===n?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const A=a.isCompressedTexture||a.image[0].isCompressedTexture,p=a.image[0]&&a.image[0].isDataTexture,y=[];for(let t=0;t<6;t++)y[t]=A||p?p?a.image[t].image:a.image[t]:m(a.image[t],!1,!0,r.maxCubemapSize),y[t]=nt(a,y[t]);const x=y[0],S=g(x)||o,C=s.convert(a.format,a.colorSpace),I=s.convert(a.type),M=_(a.internalFormat,C,I,a.colorSpace),w=o&&!0!==a.isVideoTexture,b=void 0===u.__version||!0===c;let T,B=E(a,x,S);if(j(t.TEXTURE_CUBE_MAP,a,S),A){w&&b&&i.texStorage2D(t.TEXTURE_CUBE_MAP,B,M,x.width,x.height);for(let e=0;e<6;e++){T=y[e].mipmaps;for(let n=0;n0&&B++,i.texStorage2D(t.TEXTURE_CUBE_MAP,B,M,y[0].width,y[0].height));for(let e=0;e<6;e++)if(p){w?i.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,y[e].width,y[e].height,C,I,y[e].data):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,M,y[e].width,y[e].height,0,C,I,y[e].data);for(let n=0;n0){c.__webglFramebuffer[e]=[];for(let i=0;i0){c.__webglFramebuffer=[];for(let e=0;e0&&!1===it(e)){const n=d?l:[l];c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=[],i.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let i=0;i0)for(let n=0;n0)for(let i=0;i0&&!1===it(e)){const r=e.isWebGLMultipleRenderTargets?e.texture:[e.texture],s=e.width,a=e.height;let o=t.COLOR_BUFFER_BIT;const l=[],h=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,u=n.get(e),d=!0===e.isWebGLMultipleRenderTargets;if(d)for(let e=0;eo+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&(r=e.getPose(t.gripSpace,i),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(n=e.getPose(t.targetRaySpace,i),null===n&&null!==r&&(n=r),null!==n&&(a.matrix.fromArray(n.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,n.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(n.linearVelocity)):a.hasLinearVelocity=!1,n.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(n.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(xa)))}return null!==a&&(a.visible=null!==n),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const i=new ya;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[e.jointName]=i,t.add(i)}return t.joints[e.jointName]}}class Ca extends Rt{constructor(t,e){super();const i=this;let n=null,r=1,s=null,a="local-floor",o=1,l=null,c=null,h=null,u=null,d=null,A=null;const p=e.getContextAttributes();let m=null,g=null;const f=[],v=[],_=new Wt;let E=null;const y=new Ln;y.layers.enable(1),y.viewport=new Ae;const x=new Ln;x.layers.enable(2),x.viewport=new Ae;const S=[y,x],C=new Ea;C.layers.enable(1),C.layers.enable(2);let I=null,M=null;function w(t){const e=v.indexOf(t.inputSource);if(-1===e)return;const i=f[e];void 0!==i&&(i.update(t.inputSource,t.frame,l||s),i.dispatchEvent({type:t.type,data:t.inputSource}))}function b(){n.removeEventListener("select",w),n.removeEventListener("selectstart",w),n.removeEventListener("selectend",w),n.removeEventListener("squeeze",w),n.removeEventListener("squeezestart",w),n.removeEventListener("squeezeend",w),n.removeEventListener("end",b),n.removeEventListener("inputsourceschange",T);for(let t=0;t=0&&(v[n]=null,f[n].disconnect(i))}for(let e=0;e=v.length){v.push(i),n=t;break}if(null===v[t]){v[t]=i,n=t;break}}if(-1===n)break}const r=f[n];r&&r.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=f[t];return void 0===e&&(e=new Sa,f[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=f[t];return void 0===e&&(e=new Sa,f[t]=e),e.getGripSpace()},this.getHand=function(t){let e=f[t];return void 0===e&&(e=new Sa,f[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){a=t,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(t){l=t},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return A},this.getSession=function(){return n},this.setSession=async function(c){if(n=c,null!==n){if(m=t.getRenderTarget(),n.addEventListener("select",w),n.addEventListener("selectstart",w),n.addEventListener("selectend",w),n.addEventListener("squeeze",w),n.addEventListener("squeezestart",w),n.addEventListener("squeezeend",w),n.addEventListener("end",b),n.addEventListener("inputsourceschange",T),!0!==p.xrCompatible&&await e.makeXRCompatible(),E=t.getPixelRatio(),t.getSize(_),void 0===n.renderState.layers||!1===t.capabilities.isWebGL2){const i={antialias:void 0!==n.renderState.layers||p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};d=new XRWebGLLayer(n,e,i),n.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),g=new me(d.framebufferWidth,d.framebufferHeight,{format:z,type:N,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let i=null,s=null,a=null;p.depth&&(a=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,i=p.stencil?W:V,s=p.stencil?H:O);const o={colorFormat:e.RGBA8,depthFormat:a,scaleFactor:r};h=new XRWebGLBinding(n,e),u=h.createProjectionLayer(o),n.updateRenderState({layers:[u]}),t.setPixelRatio(1),t.setSize(u.textureWidth,u.textureHeight,!1),g=new me(u.textureWidth,u.textureHeight,{format:z,type:N,depthTexture:new Tr(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0});t.properties.get(g).__ignoreDepthValues=u.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=await n.requestReferenceSpace(a),U.setContext(n),U.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const B=new _e,R=new _e;function L(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===n)return;C.near=x.near=y.near=t.near,C.far=x.far=y.far=t.far,I===C.near&&M===C.far||(n.updateRenderState({depthNear:C.near,depthFar:C.far}),I=C.near,M=C.far);const e=t.parent,i=C.cameras;L(C,e);for(let t=0;t0&&(n.alphaTest.value=r.alphaTest);const s=e.get(r).envMap;if(s&&(n.envMap.value=s,n.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const e=!0===t._useLegacyLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*e,i(r.lightMap,n.lightMapTransform)}r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity,i(r.aoMap,n.aoMapTransform))}return{refreshFogUniforms:function(e,i){i.color.getRGB(e.fogColor.value,bn(t)),i.isFog?(e.fogNear.value=i.near,e.fogFar.value=i.far):i.isFogExp2&&(e.fogDensity.value=i.density)},refreshMaterialUniforms:function(t,r,s,a,o){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(t,r):r.isMeshToonMaterial?(n(t,r),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,r)):r.isMeshPhongMaterial?(n(t,r),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,r)):r.isMeshStandardMaterial?(n(t,r),function(t,n){t.metalness.value=n.metalness,n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap,i(n.metalnessMap,t.metalnessMapTransform));t.roughness.value=n.roughness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap,i(n.roughnessMap,t.roughnessMapTransform));const r=e.get(n).envMap;r&&(t.envMapIntensity.value=n.envMapIntensity)}(t,r),r.isMeshPhysicalMaterial&&function(t,e,n){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,i(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,i(e.sheenRoughnessMap,t.sheenRoughnessMapTransform)));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,i(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,i(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,i(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===l&&t.clearcoatNormalScale.value.negate()));e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,i(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,i(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform)));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=n.texture,t.transmissionSamplerSize.value.set(n.width,n.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,i(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,i(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,i(e.anisotropyMap,t.anisotropyMapTransform)));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,i(e.specularColorMap,t.specularColorMapTransform));e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,i(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,r,o)):r.isMeshMatcapMaterial?(n(t,r),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,r)):r.isMeshDepthMaterial?n(t,r):r.isMeshDistanceMaterial?(n(t,r),function(t,i){const n=e.get(i).light;t.referencePosition.value.setFromMatrixPosition(n.matrixWorld),t.nearDistance.value=n.shadow.camera.near,t.farDistance.value=n.shadow.camera.far}(t,r)):r.isMeshNormalMaterial?n(t,r):r.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,i(e.map,t.mapTransform))}(t,r),r.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,r)):r.isPointsMaterial?function(t,e,n,r){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*r,e.map&&(t.map.value=e.map,i(e.map,t.uvTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,i(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r,s,a):r.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,i(e.map,t.mapTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,i(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r):r.isShadowMaterial?(t.color.value.copy(r.color),t.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function Ma(t,e,i,n){let r={},s={},a=[];const o=i.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(t,e,i,n){const r=t.value,s=e+"_"+i;if(void 0===n[s])return n[s]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const t=n[s];if("number"==typeof r||"boolean"==typeof r){if(t!==r)return n[s]=r,!0}else if(!1===t.equals(r))return t.copy(r),!0}return!1}function c(t){const e={boundary:0,storage:0};return"number"==typeof t||"boolean"==typeof t?(e.boundary=4,e.storage=4):t.isVector2?(e.boundary=8,e.storage=8):t.isVector3||t.isColor?(e.boundary=16,e.storage=12):t.isVector4?(e.boundary=16,e.storage=16):t.isMatrix3?(e.boundary=48,e.storage=48):t.isMatrix4?(e.boundary=64,e.storage=64):t.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",t),e}function h(e){const i=e.target;i.removeEventListener("dispose",h);const n=a.indexOf(i.__bindingPointIndex);a.splice(n,1),t.deleteBuffer(r[i.id]),delete r[i.id],delete s[i.id]}return{bind:function(t,e){const i=e.program;n.uniformBlockBinding(t,i)},update:function(i,u){let d=r[i.id];void 0===d&&(!function(t){const e=t.uniforms;let i=0;const n=16;for(let t=0,r=e.length;t0&&(i+=n-r);t.__size=i,t.__cache={}}(i),d=function(e){const i=function(){for(let t=0;t0),u=!!i.morphAttributes.position,d=!!i.morphAttributes.normal,A=!!i.morphAttributes.color;let m=p;n.toneMapped&&(null!==w&&!0!==w.isXRRenderTarget||(m=S.toneMapping));const g=i.morphAttributes.position||i.morphAttributes.normal||i.morphAttributes.color,f=void 0!==g?g.length:0,v=ht.get(n),_=E.state.lights;if(!0===$&&(!0===Z||t!==T)){const e=t===T&&n.id===b;St.setState(n,t,e)}let y=!1;n.version===v.__version?v.needsLights&&v.lightsStateVersion!==_.state.version||v.outputColorSpace!==o||r.isBatchedMesh&&!1===v.batching?y=!0:r.isBatchedMesh||!0!==v.batching?r.isInstancedMesh&&!1===v.instancing?y=!0:r.isInstancedMesh||!0!==v.instancing?r.isSkinnedMesh&&!1===v.skinning?y=!0:r.isSkinnedMesh||!0!==v.skinning?r.isInstancedMesh&&!0===v.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===v.instancingColor&&null!==r.instanceColor||v.envMap!==l||!0===n.fog&&v.fog!==s?y=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===St.numPlanes&&v.numIntersection===St.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==h||v.morphTargets!==u||v.morphNormals!==d||v.morphColors!==A||v.toneMapping!==m||!0===ot.isWebGL2&&v.morphTargetsCount!==f)&&(y=!0):y=!0:y=!0:y=!0:y=!0:(y=!0,v.__version=n.version);let x=v.currentProgram;!0===y&&(x=$t(n,e,r));let C=!1,I=!1,M=!1;const B=x.getUniforms(),R=v.uniforms;lt.useProgram(x.program)&&(C=!0,I=!0,M=!0);n.id!==b&&(b=n.id,I=!0);if(C||T!==t){B.setValue(Lt,"projectionMatrix",t.projectionMatrix),B.setValue(Lt,"viewMatrix",t.matrixWorldInverse);const e=B.map.cameraPosition;void 0!==e&&e.setValue(Lt,nt.setFromMatrixPosition(t.matrixWorld)),ot.logarithmicDepthBuffer&&B.setValue(Lt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&B.setValue(Lt,"isOrthographic",!0===t.isOrthographicCamera),T!==t&&(T=t,I=!0,M=!0)}if(r.isSkinnedMesh){B.setOptional(Lt,r,"bindMatrix"),B.setOptional(Lt,r,"bindMatrixInverse");const t=r.skeleton;t&&(ot.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),B.setValue(Lt,"boneTexture",t.boneTexture,ut)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}r.isBatchedMesh&&(B.setOptional(Lt,r,"batchingTexture"),B.setValue(Lt,"batchingTexture",r._matricesTexture,ut));const L=i.morphAttributes;(void 0!==L.position||void 0!==L.normal||void 0!==L.color&&!0===ot.isWebGL2)&&Mt.update(r,i,x);(I||v.receiveShadow!==r.receiveShadow)&&(v.receiveShadow=r.receiveShadow,B.setValue(Lt,"receiveShadow",r.receiveShadow));n.isMeshGouraudMaterial&&null!==n.envMap&&(R.envMap.value=l,R.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);I&&(B.setValue(Lt,"toneMappingExposure",S.toneMappingExposure),v.needsLights&&(U=M,(D=R).ambientLightColor.needsUpdate=U,D.lightProbe.needsUpdate=U,D.directionalLights.needsUpdate=U,D.directionalLightShadows.needsUpdate=U,D.pointLights.needsUpdate=U,D.pointLightShadows.needsUpdate=U,D.spotLights.needsUpdate=U,D.spotLightShadows.needsUpdate=U,D.rectAreaLights.needsUpdate=U,D.hemisphereLights.needsUpdate=U),s&&!0===n.fog&&Et.refreshFogUniforms(R,s),Et.refreshMaterialUniforms(R,n,W,V,tt),Us.upload(Lt,Zt(v),R,ut));var D,U;n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Us.upload(Lt,Zt(v),R,ut),n.uniformsNeedUpdate=!1);n.isSpriteMaterial&&B.setValue(Lt,"center",r.center);if(B.setValue(Lt,"modelViewMatrix",r.modelViewMatrix),B.setValue(Lt,"normalMatrix",r.normalMatrix),B.setValue(Lt,"modelMatrix",r.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const t=n.uniformsGroups;for(let e=0,i=t.length;e{function i(){n.forEach((function(t){ht.get(t).currentProgram.isReady()&&n.delete(t)})),0!==n.size?setTimeout(i,10):e(t)}null!==at.get("KHR_parallel_shader_compile")?i():setTimeout(i,10)}))};let Ht=null;function zt(){qt.stop()}function Vt(){qt.start()}const qt=new Vn;function Xt(t,e,i,n){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)i=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)E.pushLight(t),t.castShadow&&E.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||J.intersectsSprite(t)){n&&nt.setFromMatrixPosition(t.matrixWorld).applyMatrix4(et);const e=gt.update(t),r=t.material;r.visible&&_.push(t,e,r,i,nt.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||J.intersectsObject(t))){const e=gt.update(t),r=t.material;if(n&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),nt.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),nt.copy(e.boundingSphere.center)),nt.applyMatrix4(t.matrixWorld).applyMatrix4(et)),Array.isArray(r)){const n=e.groups;for(let s=0,a=n.length;s0&&function(t,e,i,n){const r=!0===i.isScene?i.overrideMaterial:null;if(null!==r)return;const s=ot.isWebGL2;null===tt&&(tt=new me(1,1,{generateMipmaps:!0,type:at.has("EXT_color_buffer_half_float")?G:N,minFilter:P,samples:s?4:0}));S.getDrawingBufferSize(it),s?tt.setSize(it.x,it.y):tt.setSize(Gt(it.x),Gt(it.y));const a=S.getRenderTarget();S.setRenderTarget(tt),S.getClearColor(D),U=S.getClearAlpha(),U<1&&S.setClearColor(16777215,.5);S.clear();const o=S.toneMapping;S.toneMapping=p,Yt(t,i,n),ut.updateMultisampleRenderTarget(tt),ut.updateRenderTargetMipmap(tt);let h=!1;for(let t=0,r=e.length;t0&&Yt(r,e,i),s.length>0&&Yt(s,e,i),a.length>0&&Yt(a,e,i),lt.buffers.depth.setTest(!0),lt.buffers.depth.setMask(!0),lt.buffers.color.setMask(!0),lt.setPolygonOffset(!1)}function Yt(t,e,i){const n=!0===e.isScene?e.overrideMaterial:null;for(let r=0,s=t.length;r0?x[x.length-1]:null,y.pop(),_=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return I},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(t,e,i){ht.get(t.texture).__webglTexture=e,ht.get(t.depthTexture).__webglTexture=i;const n=ht.get(t);n.__hasExternalTextures=!0,n.__hasExternalTextures&&(n.__autoAllocateDepthBuffer=void 0===i,n.__autoAllocateDepthBuffer||!0===at.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(t,e){const i=ht.get(t);i.__webglFramebuffer=e,i.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,i=0){w=t,I=e,M=i;let n=!0,r=null,s=!1,a=!1;if(t){const o=ht.get(t);void 0!==o.__useDefaultFramebuffer?(lt.bindFramebuffer(Lt.FRAMEBUFFER,null),n=!1):void 0===o.__webglFramebuffer?ut.setupRenderTarget(t):o.__hasExternalTextures&&ut.rebindTextures(t,ht.get(t.texture).__webglTexture,ht.get(t.depthTexture).__webglTexture);const l=t.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(a=!0);const c=ht.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=Array.isArray(c[e])?c[e][i]:c[e],s=!0):r=ot.isWebGL2&&t.samples>0&&!1===ut.useMultisampledRTT(t)?ht.get(t).__webglMultisampledFramebuffer:Array.isArray(c)?c[i]:c,B.copy(t.viewport),R.copy(t.scissor),L=t.scissorTest}else B.copy(j).multiplyScalar(W).floor(),R.copy(Y).multiplyScalar(W).floor(),L=K;if(lt.bindFramebuffer(Lt.FRAMEBUFFER,r)&&ot.drawBuffers&&n&<.drawBuffers(t,r),lt.viewport(B),lt.scissor(R),lt.setScissorTest(L),s){const n=ht.get(t.texture);Lt.framebufferTexture2D(Lt.FRAMEBUFFER,Lt.COLOR_ATTACHMENT0,Lt.TEXTURE_CUBE_MAP_POSITIVE_X+e,n.__webglTexture,i)}else if(a){const n=ht.get(t.texture),r=e||0;Lt.framebufferTextureLayer(Lt.FRAMEBUFFER,Lt.COLOR_ATTACHMENT0,n.__webglTexture,i||0,r)}b=-1},this.readRenderTargetPixels=function(t,e,i,n,r,s,a){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=ht.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){lt.bindFramebuffer(Lt.FRAMEBUFFER,o);try{const a=t.texture,o=a.format,l=a.type;if(o!==z&&Tt.convert(o)!==Lt.getParameter(Lt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===G&&(at.has("EXT_color_buffer_half_float")||ot.isWebGL2&&at.has("EXT_color_buffer_float"));if(!(l===N||Tt.convert(l)===Lt.getParameter(Lt.IMPLEMENTATION_COLOR_READ_TYPE)||l===k&&(ot.isWebGL2||at.has("OES_texture_float")||at.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-n&&i>=0&&i<=t.height-r&&Lt.readPixels(e,i,n,r,Tt.convert(o),Tt.convert(l),s)}finally{const t=null!==w?ht.get(w).__webglFramebuffer:null;lt.bindFramebuffer(Lt.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,i=0){const n=Math.pow(2,-i),r=Math.floor(e.image.width*n),s=Math.floor(e.image.height*n);ut.setTexture2D(e,0),Lt.copyTexSubImage2D(Lt.TEXTURE_2D,i,0,0,t.x,t.y,r,s),lt.unbindTexture()},this.copyTextureToTexture=function(t,e,i,n=0){const r=e.image.width,s=e.image.height,a=Tt.convert(i.format),o=Tt.convert(i.type);ut.setTexture2D(i,0),Lt.pixelStorei(Lt.UNPACK_FLIP_Y_WEBGL,i.flipY),Lt.pixelStorei(Lt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),Lt.pixelStorei(Lt.UNPACK_ALIGNMENT,i.unpackAlignment),e.isDataTexture?Lt.texSubImage2D(Lt.TEXTURE_2D,n,t.x,t.y,r,s,a,o,e.image.data):e.isCompressedTexture?Lt.compressedTexSubImage2D(Lt.TEXTURE_2D,n,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):Lt.texSubImage2D(Lt.TEXTURE_2D,n,t.x,t.y,a,o,e.image),0===n&&i.generateMipmaps&&Lt.generateMipmap(Lt.TEXTURE_2D),lt.unbindTexture()},this.copyTextureToTexture3D=function(t,e,i,n,r=0){if(S.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=t.max.x-t.min.x+1,a=t.max.y-t.min.y+1,o=t.max.z-t.min.z+1,l=Tt.convert(n.format),c=Tt.convert(n.type);let h;if(n.isData3DTexture)ut.setTexture3D(n,0),h=Lt.TEXTURE_3D;else{if(!n.isDataArrayTexture&&!n.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ut.setTexture2DArray(n,0),h=Lt.TEXTURE_2D_ARRAY}Lt.pixelStorei(Lt.UNPACK_FLIP_Y_WEBGL,n.flipY),Lt.pixelStorei(Lt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Lt.pixelStorei(Lt.UNPACK_ALIGNMENT,n.unpackAlignment);const u=Lt.getParameter(Lt.UNPACK_ROW_LENGTH),d=Lt.getParameter(Lt.UNPACK_IMAGE_HEIGHT),A=Lt.getParameter(Lt.UNPACK_SKIP_PIXELS),p=Lt.getParameter(Lt.UNPACK_SKIP_ROWS),m=Lt.getParameter(Lt.UNPACK_SKIP_IMAGES),g=i.isCompressedTexture?i.mipmaps[r]:i.image;Lt.pixelStorei(Lt.UNPACK_ROW_LENGTH,g.width),Lt.pixelStorei(Lt.UNPACK_IMAGE_HEIGHT,g.height),Lt.pixelStorei(Lt.UNPACK_SKIP_PIXELS,t.min.x),Lt.pixelStorei(Lt.UNPACK_SKIP_ROWS,t.min.y),Lt.pixelStorei(Lt.UNPACK_SKIP_IMAGES,t.min.z),i.isDataTexture||i.isData3DTexture?Lt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g.data):i.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Lt.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,g.data)):Lt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g),Lt.pixelStorei(Lt.UNPACK_ROW_LENGTH,u),Lt.pixelStorei(Lt.UNPACK_IMAGE_HEIGHT,d),Lt.pixelStorei(Lt.UNPACK_SKIP_PIXELS,A),Lt.pixelStorei(Lt.UNPACK_SKIP_ROWS,p),Lt.pixelStorei(Lt.UNPACK_SKIP_IMAGES,m),0===r&&n.generateMipmaps&&Lt.generateMipmap(h),lt.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?ut.setTextureCube(t,0):t.isData3DTexture?ut.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?ut.setTexture2DArray(t,0):ut.setTexture2D(t,0),lt.unbindTexture()},this.resetState=function(){I=0,M=0,w=null,lt.reset(),Bt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Tt}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===_t?"display-p3":"srgb",e.unpackColorSpace=ne.workingColorSpace===Et?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===ft?mt:3e3}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===mt?ft:vt}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}(class extends wa{}).prototype.isWebGL1Renderer=!0;class ba extends Ei{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e}}class Ta{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Mt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Nt()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let n=0,r=this.stride;no)continue;u.applyMatrix4(this.matrixWorld);const s=t.ray.origin.distanceTo(u);st.far||e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{for(let i=Math.max(0,s.start),n=Math.min(p.count,s.start+s.count)-1;io)continue;u.applyMatrix4(this.matrixWorld);const n=t.ray.origin.distanceTo(u);nt.far||e.push({distance:n,point:h.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;t0){const i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;tr.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:i,index:e,face:null,object:a})}}class yo extends de{constructor(t,e,i,n,r,s,a,o,l){super(t,e,i,n,r,s,a,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:D,this.magFilter=void 0!==r?r:D,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class xo extends de{constructor(t,e,i,n,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,n,r,h,u),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class So extends xo{constructor(t,e,i,n,r,s){super(t,e,i,r,s),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=b}}class Co extends xo{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,S),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class Io extends de{constructor(t,e,i,n,r,s,a,o,l){super(t,e,i,n,r,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Mo extends sn{constructor(t=1,e=32,i=16,n=0,r=2*Math.PI,s=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:s,thetaLength:a},e=Math.max(3,Math.floor(e)),i=Math.max(2,Math.floor(i));const o=Math.min(s+a,Math.PI);let l=0;const c=[],h=new _e,u=new _e,d=[],A=[],p=[],m=[];for(let d=0;d<=i;d++){const g=[],f=d/i;let v=0;0===d&&0===s?v=.5/e:d===i&&o===Math.PI&&(v=-.5/e);for(let i=0;i<=e;i++){const o=i/e;h.x=-t*Math.cos(n+o*r)*Math.sin(s+f*a),h.y=t*Math.cos(s+f*a),h.z=t*Math.sin(n+o*r)*Math.sin(s+f*a),A.push(h.x,h.y,h.z),u.copy(h).normalize(),p.push(u.x,u.y,u.z),m.push(o+v,1-f),g.push(l++)}c.push(g)}for(let t=0;t0)&&d.push(e,r,l),(t!==i-1||o0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}function To(t,e,i){return!t||!i&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function Bo(t){const e=t.length,i=new Array(e);for(let t=0;t!==e;++t)i[t]=t;return i.sort((function(e,i){return t[e]-t[i]})),i}function Ro(t,e,i){const n=t.length,r=new t.constructor(n);for(let s=0,a=0;a!==n;++s){const n=i[s]*e;for(let i=0;i!==e;++i)r[a++]=t[n+i]}return r}function Lo(t,e,i,n){let r=1,s=t[0];for(;void 0!==s&&void 0===s[n];)s=t[r++];if(void 0===s)return;let a=s[n];if(void 0!==a)if(Array.isArray(a))do{a=s[n],void 0!==a&&(e.push(s.time),i.push.apply(i,a)),s=t[r++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[n],void 0!==a&&(e.push(s.time),a.toArray(i,i.length)),s=t[r++]}while(void 0!==s);else do{a=s[n],void 0!==a&&(e.push(s.time),i.push(a)),s=t[r++]}while(void 0!==s)}class Do{constructor(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{let s;i:{n:if(!(t=r)break t;{const a=e[1];t=r)break e}s=i,i=0}}for(;i>>1;te;)--s;if(++s,0!==r||s!==n){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=i.slice(r,s),this.values=this.values.slice(r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const n=i[e];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,n),t=!1;break}if(null!==s&&s>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,n,s),t=!1;break}s=n}if(void 0!==n&&(a=n,ArrayBuffer.isView(a)&&!(a instanceof DataView)))for(let e=0,i=n.length;e!==i;++e){const i=n[e];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,i),t=!1;break}}var a;return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),n=this.getInterpolation()===ht,r=t.length-1;let s=1;for(let a=1;a0){t[s]=t[r];for(let t=r*i,n=s*i,a=0;a!==i;++a)e[n+a]=e[t+a];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=e.slice(0,s*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=new(0,this.constructor)(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}}Fo.prototype.TimeBufferType=Float32Array,Fo.prototype.ValueBufferType=Float32Array,Fo.prototype.DefaultInterpolation=ct;class Qo extends Fo{}Qo.prototype.ValueTypeName="bool",Qo.prototype.ValueBufferType=Array,Qo.prototype.DefaultInterpolation=lt,Qo.prototype.InterpolantFactoryMethodLinear=void 0,Qo.prototype.InterpolantFactoryMethodSmooth=void 0;class Oo extends Fo{}Oo.prototype.ValueTypeName="color";class ko extends Fo{}ko.prototype.ValueTypeName="number";class Go extends Do{constructor(t,e,i,n){super(t,e,i,n)}interpolate_(t,e,i,n){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(i-e)/(n-e);let l=t*a;for(let t=l+a;l!==t;l+=4)ve.slerpFlat(r,0,s,l-a,s,l,o);return r}}class Ho extends Fo{InterpolantFactoryMethodLinear(t){return new Go(this.times,this.values,this.getValueSize(),t)}}Ho.prototype.ValueTypeName="quaternion",Ho.prototype.DefaultInterpolation=ct,Ho.prototype.InterpolantFactoryMethodSmooth=void 0;class zo extends Fo{}zo.prototype.ValueTypeName="string",zo.prototype.ValueBufferType=Array,zo.prototype.DefaultInterpolation=lt,zo.prototype.InterpolantFactoryMethodLinear=void 0,zo.prototype.InterpolantFactoryMethodSmooth=void 0;class Vo extends Fo{}Vo.prototype.ValueTypeName="vector";class Wo{constructor(t,e=-1,i,n=2500){this.name=t,this.tracks=i,this.duration=e,this.blendMode=n,this.uuid=Nt(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,n=1/(t.fps||1);for(let t=0,r=i.length;t!==r;++t)e.push(qo(i[t]).scale(n));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],i=t.tracks,n={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,n=i.length;t!==n;++t)e.push(Fo.toJSON(i[t]));return n}static CreateFromMorphTargetSequence(t,e,i,n){const r=e.length,s=[];for(let t=0;t1){const t=s[1];let e=n[t];e||(n[t]=e=[]),e.push(i)}}const s=[];for(const t in n)s.push(this.CreateFromMorphTargetSequence(t,n[t],e,i));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(t,e,i,n,r){if(0!==i.length){const s=[],a=[];Lo(i,s,a,n),0!==s.length&&r.push(new t(e,s,a))}},n=[],r=t.name||"default",s=t.fps||30,a=t.blendMode;let o=t.length||-1;const l=t.hierarchy||[];for(let t=0;t{e&&e(r),this.manager.itemEnd(t)}),0),r;if(void 0!==Jo[t])return void Jo[t].push({onLoad:e,onProgress:i,onError:n});Jo[t]=[],Jo[t].push({onLoad:e,onProgress:i,onError:n});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const i=Jo[t],n=e.body.getReader(),r=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),s=r?parseInt(r):0,a=0!==s;let o=0;const l=new ReadableStream({start(t){!function e(){n.read().then((({done:n,value:r})=>{if(n)t.close();else{o+=r.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let t=0,e=i.length;t{switch(o){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,a)));case"json":return t.json();default:if(void 0===a)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(a),i=e&&e[1]?e[1].toLowerCase():void 0,n=new TextDecoder(i);return t.arrayBuffer().then((t=>n.decode(t)))}}})).then((e=>{Xo.add(t,e);const i=Jo[t];delete Jo[t];for(let t=0,n=i.length;t{const i=Jo[t];if(void 0===i)throw this.manager.itemError(t),e;delete Jo[t];for(let t=0,n=i.length;t{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class tl extends Ko{constructor(t){super(t)}load(t,e,i,n){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Xo.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s;const a=Yt("img");function o(){c(),Xo.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){c(),n&&n(e),r.manager.itemError(t),r.manager.itemEnd(t)}function c(){a.removeEventListener("load",o,!1),a.removeEventListener("error",l,!1)}return a.addEventListener("load",o,!1),a.addEventListener("error",l,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(t),a.src=t,a}}class el extends Ko{constructor(t){super(t)}load(t,e,i,n){const r=this,s=new za,a=new Zo(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(t,(function(t){let i;try{i=r.parse(t)}catch(t){if(void 0===n)return void console.error(t);n(t)}void 0!==i.image?s.image=i.image:void 0!==i.data&&(s.image.width=i.width,s.image.height=i.height,s.image.data=i.data),s.wrapS=void 0!==i.wrapS?i.wrapS:b,s.wrapT=void 0!==i.wrapT?i.wrapT:b,s.magFilter=void 0!==i.magFilter?i.magFilter:D,s.minFilter=void 0!==i.minFilter?i.minFilter:D,s.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.colorSpace?s.colorSpace=i.colorSpace:void 0!==i.encoding&&(s.encoding=i.encoding),void 0!==i.flipY&&(s.flipY=i.flipY),void 0!==i.format&&(s.format=i.format),void 0!==i.type&&(s.type=i.type),void 0!==i.mipmaps&&(s.mipmaps=i.mipmaps,s.minFilter=P),1===i.mipmapCount&&(s.minFilter=D),void 0!==i.generateMipmaps&&(s.generateMipmaps=i.generateMipmaps),s.needsUpdate=!0,e&&e(s,i)}),i,n),s}}class il extends Ko{constructor(t){super(t)}load(t,e,i,n){const r=new de,s=new tl(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,(function(t){r.image=t,r.needsUpdate=!0,void 0!==e&&e(r)}),i,n),r}}class nl extends Ei{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new Fi(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}const rl=new Ye,sl=new _e,al=new _e;class ol{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Wt(512,512),this.map=null,this.mapPass=null,this.matrix=new Ye,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new zn,this._frameExtents=new Wt(1,1),this._viewportCount=1,this._viewports=[new Ae(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;sl.setFromMatrixPosition(t.matrixWorld),e.position.copy(sl),al.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(al),e.updateMatrixWorld(),rl.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rl),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(rl)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class ll extends ol{constructor(){super(new Ln(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,i=2*Pt*t.angle*this.focus,n=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;i===e.fov&&n===e.aspect&&r===e.far||(e.fov=i,e.aspect=n,e.far=r,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class cl extends nl{constructor(t,e,i=0,n=Math.PI/3,r=0,s=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Ei.DEFAULT_UP),this.updateMatrix(),this.target=new Ei,this.distance=i,this.angle=n,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new ll}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const hl=new Ye,ul=new _e,dl=new _e;class Al extends ol{constructor(){super(new Ln(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Wt(4,2),this._viewportCount=6,this._viewports=[new Ae(2,1,1,1),new Ae(0,1,1,1),new Ae(3,1,1,1),new Ae(1,1,1,1),new Ae(3,0,1,1),new Ae(1,0,1,1)],this._cubeDirections=[new _e(1,0,0),new _e(-1,0,0),new _e(0,0,1),new _e(0,0,-1),new _e(0,1,0),new _e(0,-1,0)],this._cubeUps=[new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,0,1),new _e(0,0,-1)]}updateMatrices(t,e=0){const i=this.camera,n=this.matrix,r=t.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),ul.setFromMatrixPosition(t.matrixWorld),i.position.copy(ul),dl.copy(i.position),dl.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(dl),i.updateMatrixWorld(),n.makeTranslation(-ul.x,-ul.y,-ul.z),hl.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(hl)}}class pl extends nl{constructor(t,e,i=0,n=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new Al}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class ml extends ol{constructor(){super(new nr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class gl extends nl{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Ei.DEFAULT_UP),this.updateMatrix(),this.target=new Ei,this.shadow=new ml}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class fl{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new _e)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const i=t.x,n=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*n),e.addScaledVector(s[2],.488603*r),e.addScaledVector(s[3],.488603*i),e.addScaledVector(s[4],i*n*1.092548),e.addScaledVector(s[5],n*r*1.092548),e.addScaledVector(s[6],.315392*(3*r*r-1)),e.addScaledVector(s[7],i*r*1.092548),e.addScaledVector(s[8],.546274*(i*i-n*n)),e}getIrradianceAt(t,e){const i=t.x,n=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*n),e.addScaledVector(s[2],1.023328*r),e.addScaledVector(s[3],1.023328*i),e.addScaledVector(s[4],.858086*i*n),e.addScaledVector(s[5],.858086*n*r),e.addScaledVector(s[6],.743125*r*r-.247708),e.addScaledVector(s[7],.858086*i*r),e.addScaledVector(s[8],.429043*(i*i-n*n)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].fromArray(t,e+3*n);return this}toArray(t=[],e=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].toArray(t,e+3*n);return t}static getBasisAt(t,e){const i=t.x,n=t.y,r=t.z;e[0]=.282095,e[1]=.488603*n,e[2]=.488603*r,e[3]=.488603*i,e[4]=1.092548*i*n,e[5]=1.092548*n*r,e[6]=.315392*(3*r*r-1),e[7]=1.092548*i*r,e[8]=.546274*(i*i-n*n)}}class vl extends nl{constructor(t=new fl,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}class _l{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let i=0,n=t.length;i{e&&e(i),r.manager.itemEnd(t)})).catch((t=>{n&&n(t)})):(setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const o=fetch(t,a).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(i){return Xo.add(t,i),e&&e(i),r.manager.itemEnd(t),i})).catch((function(e){n&&n(e),Xo.remove(t),r.manager.itemError(t),r.manager.itemEnd(t)}));Xo.add(t,o),r.manager.itemStart(t)}}class yl{constructor(t,e,i){let n,r,s;switch(this.binding=t,this.valueSize=i,e){case"quaternion":n=this._slerp,r=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*i),this._workIndex=5;break;case"string":case"bool":n=this._select,r=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*i);break;default:n=this._lerp,r=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*i)}this._mixBufferRegion=n,this._mixBufferRegionAdditive=r,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const i=this.buffer,n=this.valueSize,r=t*n+n;let s=this.cumulativeWeight;if(0===s){for(let t=0;t!==n;++t)i[r+t]=i[t];s=e}else{s+=e;const t=e/s;this._mixBufferRegion(i,r,0,t,n)}this.cumulativeWeight=s}accumulateAdditive(t){const e=this.buffer,i=this.valueSize,n=i*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,n,0,t,i),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,i=this.buffer,n=t*e+e,r=this.cumulativeWeight,s=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const t=e*this._origIndex;this._mixBufferRegion(i,n,t,1-r,e)}s>0&&this._mixBufferRegionAdditive(i,n,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(i[t]!==i[t+e]){a.setValue(i,n);break}}saveOriginalState(){const t=this.binding,e=this.buffer,i=this.valueSize,n=i*this._origIndex;t.getValue(e,n);for(let t=i,r=n;t!==r;++t)e[t]=e[n+t%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i=.5)for(let n=0;n!==r;++n)t[e+n]=t[i+n]}_slerp(t,e,i,n){ve.slerpFlat(t,e,t,e,t,i,n)}_slerpAdditive(t,e,i,n,r){const s=this._workIndex*r;ve.multiplyQuaternionsFlat(t,s,t,e,t,i),ve.slerpFlat(t,e,t,e,t,s,n)}_lerp(t,e,i,n,r){const s=1-n;for(let a=0;a!==r;++a){const r=e+a;t[r]=t[r]*s+t[i+a]*n}}_lerpAdditive(t,e,i,n,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[i+s]*n}}}const xl="\\[\\]\\.:\\/",Sl=new RegExp("["+xl+"]","g"),Cl="[^"+xl+"]",Il="[^"+xl.replace("\\.","")+"]",Ml=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Cl)+/(WCOD+)?/.source.replace("WCOD",Il)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Cl)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Cl)+"$"),wl=["material","materials","bones","map"];class bl{constructor(t,e,i){this.path=e,this.parsedPath=i||bl.parseTrackName(e),this.node=bl.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new bl.Composite(t,e,i):new bl(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Sl,"")}static parseTrackName(t){const e=Ml.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const t=i.nodeName.substring(n+1);-1!==wl.indexOf(t)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=t)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(void 0!==i)return i}if(t.children){const i=function(t){for(let n=0;n0){const t=this._interpolants,e=this._propertyBindings;if(2501===this.blendMode)for(let i=0,n=t.length;i!==n;++i)t[i].evaluate(s),e[i].accumulateAdditive(a);else for(let i=0,r=t.length;i!==r;++i)t[i].evaluate(s),e[i].accumulate(n,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const i=this._weightInterpolant;if(null!==i){const n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const i=this._timeScaleInterpolant;if(null!==i){e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,i=this.loop;let n=this.time+t,r=this._loopCount;const s=i===ot;if(0===t)return-1===r?n:s&&1==(1&r)?e-n:n;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(n>=e)n=e;else{if(!(n<0)){this.time=n;break t}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),n>=e||n<0){const i=Math.floor(n/e);n-=e*i,r+=Math.abs(i);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=t>0?e:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(s&&1==(1&r))return e-n}return n}_setEndings(t,e,i){const n=this._interpolantSettings;i?(n.endingStart=dt,n.endingEnd=dt):(n.endingStart=t?this.zeroSlopeAtStart?dt:ut:At,n.endingEnd=e?this.zeroSlopeAtEnd?dt:ut:At)}_scheduleFading(t,e,i){const n=this._mixer,r=n.time;let s=this._weightInterpolant;null===s&&(s=n._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=i,this}}const Bl=new Float32Array(1);class Rl extends Rt{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,s=t._propertyBindings,a=t._interpolants,o=i.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let t=0;t!==r;++t){const r=n[t],l=r.name;let h=c[l];if(void 0!==h)++h.referenceCount,s[t]=h;else{if(h=s[t],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,l));continue}const n=e&&e._propertyBindings[t].binding.parsedPath;h=new yl(bl.create(i,l,n),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,l),s[t]=h}a[t].resultBuffer=h.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}const e=t._propertyBindings;for(let t=0,i=e.length;t!==i;++t){const i=e[t];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,i=e.length;t!==i;++t){const i=e[t];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let a=0;a!==i;++a){e[a]._update(n,t,r,s)}const a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;tt:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new kl("string"==typeof t?t:t+"",void 0,Ql))(e)})(t):t -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;var Hl;const zl=window,Vl=zl.trustedTypes,Wl=Vl?Vl.emptyScript:"",ql=zl.reactiveElementPolyfillSupport,Xl={toAttribute(t,e){switch(e){case Boolean:t=t?Wl:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},jl=(t,e)=>e!==t&&(e==e||t==t),Yl={attribute:!0,type:String,converter:Xl,reflect:!1,hasChanged:jl},Kl="finalized";class Jl extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=Yl){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Yl}static finalize(){if(this.hasOwnProperty(Kl))return!1;this[Kl]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Gl(t))}else void 0!==t&&e.push(Gl(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{Fl?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=Nl.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Yl){var n;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:Xl).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:Xl;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||jl)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var $l;Jl[Kl]=!0,Jl.elementProperties=new Map,Jl.elementStyles=[],Jl.shadowRootOptions={mode:"open"},null==ql||ql({ReactiveElement:Jl}),(null!==(Hl=zl.reactiveElementVersions)&&void 0!==Hl?Hl:zl.reactiveElementVersions=[]).push("1.6.3");const Zl=window,tc=Zl.trustedTypes,ec=tc?tc.createPolicy("lit-html",{createHTML:t=>t}):void 0,ic="$lit$",nc=`lit$${(Math.random()+"").slice(9)}$`,rc="?"+nc,sc=`<${rc}>`,ac=document,oc=()=>ac.createComment(""),lc=t=>null===t||"object"!=typeof t&&"function"!=typeof t,cc=Array.isArray,hc="[ \t\n\f\r]",uc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dc=/-->/g,Ac=/>/g,pc=RegExp(`>|${hc}(?:([^\\s"'>=/]+)(${hc}*=${hc}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),mc=/'/g,gc=/"/g,fc=/^(?:script|style|textarea|title)$/i,vc=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),_c=Symbol.for("lit-noChange"),Ec=Symbol.for("lit-nothing"),yc=new WeakMap,xc=ac.createTreeWalker(ac,129,null,!1);function Sc(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ec?ec.createHTML(e):e}const Cc=(t,e)=>{const i=t.length-1,n=[];let r,s=2===e?"":"",a=uc;for(let e=0;e"===l[0]?(a=null!=r?r:uc,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?pc:'"'===l[3]?gc:mc):a===gc||a===mc?a=pc:a===dc||a===Ac?a=uc:(a=pc,r=void 0);const u=a===pc&&t[e+1].startsWith("/>")?" ":"";s+=a===uc?i+sc:c>=0?(n.push(o),i.slice(0,c)+ic+i.slice(c)+nc+u):i+nc+(-2===c?(n.push(void 0),e):u)}return[Sc(t,s+(t[i]||"")+(2===e?"":"")),n]};class Ic{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,s=0;const a=t.length-1,o=this.parts,[l,c]=Cc(t,e);if(this.el=Ic.createElement(l,i),xc.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=xc.nextNode())&&o.length0){n.textContent=tc?tc.emptyScript:"";for(let i=0;icc(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Ec&&lc(this._$AH)?this._$AA.nextSibling.data=t:this.$(ac.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Ic.createElement(Sc(n.h,n.h[0]),this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new wc(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=yc.get(t.strings);return void 0===e&&yc.set(t.strings,e=new Ic(t)),e}T(t){cc(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new bc(this.k(oc()),this.k(oc()),this,this.options)):i=e[n],i._$AI(r),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ec}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let s=!1;if(void 0===r)t=Mc(this,t,e,0),s=!lc(t)||t!==this._$AH&&t!==_c,s&&(this._$AH=t);else{const n=t;let a,o;for(t=r[0],a=0;a{var n,r;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let a=s._$litPart$;if(void 0===a){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=a=new bc(e.insertBefore(oc(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */},Fc=window,Qc=Fc.ShadowRoot&&(void 0===Fc.ShadyCSS||Fc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Oc=Symbol(),kc=new WeakMap;class Gc{constructor(t,e,i){if(this._$cssResult$=!0,i!==Oc)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Qc&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=kc.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&kc.set(e,t))}return t}toString(){return this.cssText}}const Hc=Qc?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new Gc("string"==typeof t?t:t+"",void 0,Oc))(e)})(t):t -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;var zc;const Vc=window,Wc=Vc.trustedTypes,qc=Wc?Wc.emptyScript:"",Xc=Vc.reactiveElementPolyfillSupport,jc={toAttribute(t,e){switch(e){case Boolean:t=t?qc:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Yc=(t,e)=>e!==t&&(e==e||t==t),Kc={attribute:!0,type:String,converter:jc,reflect:!1,hasChanged:Yc},Jc="finalized";class $c extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=Kc){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Kc}static finalize(){if(this.hasOwnProperty(Jc))return!1;this[Jc]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Hc(t))}else void 0!==t&&e.push(Hc(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{Qc?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=Fc.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Kc){var n;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:jc).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:jc;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Yc)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var Zc,th;$c[Jc]=!0,$c.elementProperties=new Map,$c.elementStyles=[],$c.shadowRootOptions={mode:"open"},null==Xc||Xc({ReactiveElement:$c}),(null!==(zc=Vc.reactiveElementVersions)&&void 0!==zc?zc:Vc.reactiveElementVersions=[]).push("1.6.3");class eh extends $c{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Nc(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return _c}}eh.finalized=!0,eh._$litElement$=!0,null===(Zc=globalThis.litElementHydrateSupport)||void 0===Zc||Zc.call(globalThis,{LitElement:eh});const ih=globalThis.litElementPolyfillSupport;null==ih||ih({LitElement:eh}),(null!==(th=globalThis.litElementVersions)&&void 0!==th?th:globalThis.litElementVersions=[]).push("3.3.3"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const nh=null!=navigator.xr&&null!=self.XRSession&&null!=navigator.xr.isSessionSupported,rh=nh&&null!=self.XRSession.prototype.requestHitTestSource,sh=null!=self.ResizeObserver,ah=null!=self.IntersectionObserver,oh=rh;(()=>{const t=navigator.userAgent||navigator.vendor||self.opera;let e=!1;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)})(),/\bCrOS\b/.test(navigator.userAgent);const lh=/android/i.test(navigator.userAgent),ch=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;/Safari\//.test(navigator.userAgent);const hh=/firefox/i.test(navigator.userAgent),uh=/OculusBrowser/.test(navigator.userAgent);ch&&/CriOS\//.test(navigator.userAgent);const dh=lh&&!hh&&!uh,Ah=Boolean(window.webkit&&window.webkit.messageHandlers),ph=(()=>{if(ch){if(Ah)return Boolean(/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent));{const t=document.createElement("a");return Boolean(t.relList&&t.relList.supports&&t.relList.supports("ar"))}}return!1})(),mh=t=>t&&"null"!==t?fh(t):null,gh=()=>{if(oh)return;const t=[];throw nh||t.push("WebXR Device API"),rh||t.push("WebXR Hit Test API"),new Error(`The following APIs are required for AR, but are missing in this browser: ${t.join(", ")}`)},fh=t=>new URL(t,window.location.toString()).toString(),vh=(t,e)=>{let i=null;return(...n)=>{null!=i&&self.clearTimeout(i),i=self.setTimeout((()=>{i=null,t(...n)}),e)}},_h=(t,e,i)=>Math.max(e,Math.min(i,t)),Eh=(()=>{const t=(()=>{var t;if(null===(t=document.documentElement.getAttribute("itemtype"))||void 0===t?void 0:t.includes("schema.org/SearchResultsPage"))return!0;const e=null!=document.head?Array.from(document.head.querySelectorAll("meta")):[];for(const t of e)if("viewport"===t.name)return!0;return!1})();return t||console.warn('No detected; will cap pixel density at 1.'),()=>t?window.devicePixelRatio:1})(),yh=(()=>{const t=new RegExp("[?&]model-viewer-debug-mode(&|$)");return()=>self.ModelViewerElement&&self.ModelViewerElement.debugMode||self.location&&self.location.search&&self.location.search.match(t)})(); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var xh=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const Sh=Symbol("currentEnvironmentMap"),Ch=Symbol("currentBackground"),Ih=Symbol("updateEnvironment"),Mh=Symbol("cancelEnvironmentUpdate"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const wh=vc` - -
- - - -
- - - -
- - - -
- -
-
-
-
- -
-
- -
-
- -
- -
-
- -
- - -
-
- -
`,bh=new WeakMap;function Th(){let t,e;function i(t,e,i,n,r,s){const a=s.num_components(),o=i.num_points()*a,l=o*r.BYTES_PER_ELEMENT,c=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32}}(t,r),h=t._malloc(l);e.GetAttributeDataArrayForAllPoints(i,s,c,l,h);const u=new r(t.HEAPF32.buffer,h,o).slice();return t._free(h),{name:n,array:u,itemSize:a}}onmessage=function(n){const r=n.data;switch(r.type){case"init":t=r.decoderConfig,e=new Promise((function(e){t.onModuleLoaded=function(t){e({draco:t})},DracoDecoderModule(t)}));break;case"decode":const n=r.buffer,s=r.taskConfig;e.then((t=>{const e=t.draco,a=new e.Decoder;try{const t=function(t,e,n,r){const s=r.attributeIDs,a=r.attributeTypes;let o,l;const c=e.GetEncodedGeometryType(n);if(c===t.TRIANGULAR_MESH)o=new t.Mesh,l=e.DecodeArrayToMesh(n,n.byteLength,o);else{if(c!==t.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new t.PointCloud,l=e.DecodeArrayToPointCloud(n,n.byteLength,o)}if(!l.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const h={index:null,attributes:[]};for(const n in s){const l=self[a[n]];let c,u;if(r.useUniqueIDs)u=s[n],c=e.GetAttributeByUniqueId(o,u);else{if(u=e.GetAttributeId(o,t[s[n]]),-1===u)continue;c=e.GetAttribute(o,u)}const d=i(t,e,o,n,l,c);"color"===n&&(d.vertexColorSpace=r.vertexColorSpace),h.attributes.push(d)}c===t.TRIANGULAR_MESH&&(h.index=function(t,e,i){const n=i.num_faces(),r=3*n,s=4*r,a=t._malloc(s);e.GetTrianglesUInt32Array(i,s,a);const o=new Uint32Array(t.HEAPF32.buffer,a,r).slice();return t._free(a),{array:o,itemSize:1}}(t,e,o));return t.destroy(o),h}(e,a,new Int8Array(n),s),o=t.attributes.map((t=>t.array.buffer));t.index&&o.push(t.index.array.buffer),self.postMessage({type:"decode",id:r.id,geometry:t},o)}catch(t){console.error(t),self.postMessage({type:"error",id:r.id,error:t.message})}finally{e.destroy(a)}}))}}}function Bh(t,e){if(0===e)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(2===e||1===e){let i=t.getIndex();if(null===i){const e=[],n=t.getAttribute("position");if(void 0===n)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(let t=0;t=2.0 are supported.")));const l=new Mu(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let t=0;t=0&&void 0===a[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}l.setExtensions(s),l.setPlugins(a),l.parse(i,n)}parseAsync(t,e){const i=this;return new Promise((function(n,r){i.parse(t,e,n,r)}))}}function Lh(){let t={};return{get:function(e){return t[e]},add:function(e,i){t[e]=i},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Dh={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Uh{constructor(t){this.parser=t,this.name=Dh.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,n=e.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,s)}}class Xh{constructor(t){this.parser=t,this.name=Dh.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,i=this.parser,n=i.json,r=n.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],a=n.images[s.source];let o=i.textureLoader;if(a.uri){const t=i.options.manager.getHandler(a.uri);null!==t&&(o=t)}return this.detectSupport().then((function(r){if(r)return i.loadTextureImage(t,s.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(t)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}class jh{constructor(t){this.parser=t,this.name=Dh.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,i=this.parser,n=i.json,r=n.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],a=n.images[s.source];let o=i.textureLoader;if(a.uri){const t=i.options.manager.getHandler(a.uri);null!==t&&(o=t)}return this.detectSupport().then((function(r){if(r)return i.loadTextureImage(t,s.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(t)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}class Yh{constructor(t){this.name=Dh.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const t=i.extensions[this.name],n=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return n.then((function(e){const i=t.byteOffset||0,n=t.byteLength||0,s=t.count,a=t.byteStride,o=new Uint8Array(e,i,n);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(s,a,o,t.mode,t.filter).then((function(t){return t.buffer})):r.ready.then((function(){const e=new ArrayBuffer(s*a);return r.decodeGltfBuffer(new Uint8Array(e),s,a,o,t.mode,t.filter),e}))}))}return null}}class Kh{constructor(t){this.name=Dh.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;const n=e.meshes[i.mesh];for(const t of n.primitives)if(t.mode!==ou.TRIANGLES&&t.mode!==ou.TRIANGLE_STRIP&&t.mode!==ou.TRIANGLE_FAN&&void 0!==t.mode)return null;const r=i.extensions[this.name].attributes,s=[],a={};for(const t in r)s.push(this.parser.getDependency("accessor",r[t]).then((e=>(a[t]=e,a[t]))));return s.length<1?null:(s.push(this.parser.createNodeMesh(t)),Promise.all(s).then((t=>{const e=t.pop(),i=e.isGroup?e.children:[e],n=t[0].count,r=[];for(const t of i){const e=new Ye,i=new _e,s=new ve,o=new _e(1,1,1),l=new eo(t.geometry,t.material,n);for(let t=0;t-1,r=n?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||i||n&&r<98?this.textureLoader=new il(this.options.manager):this.textureLoader=new El(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Zo(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,n=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(t){return t._markDefs&&t._markDefs()})),Promise.all(this._invokeAll((function(t){return t.beforeRoot&&t.beforeRoot()}))).then((function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])})).then((function(e){const s={scene:e[0][n.scene||0],scenes:e[0],animations:e[1],cameras:e[2],asset:n.asset,parser:i,userData:{}};return _u(r,s,n),Eu(s,n),Promise.all(i._invokeAll((function(t){return t.afterRoot&&t.afterRoot(s)}))).then((function(){t(s)}))})).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let i=0,n=e.length;i{const i=this.associations.get(t);null!=i&&this.associations.set(e,i);for(const[i,n]of t.children.entries())r(n,e.children[i])};return r(i,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i=2&&A.setY(e,h[t*s+1]),s>=3&&A.setZ(e,h[t*s+2]),s>=4&&A.setW(e,h[t*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return A}))}loadTexture(t){const e=this.json,i=this.options,n=e.textures[t].source,r=e.images[n];let s=this.textureLoader;if(r.uri){const t=i.manager.getHandler(r.uri);null!==t&&(s=t)}return this.loadTextureImage(t,n,s)}loadTextureImage(t,e,i){const n=this,r=this.json,s=r.textures[t],a=r.images[e],o=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[o])return this.textureCache[o];const l=this.loadImageSource(e,i).then((function(e){e.flipY=!1,e.name=s.name||a.name||"",""===e.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(e.name=a.uri);const i=(r.samplers||{})[s.sampler]||{};return e.magFilter=cu[i.magFilter]||D,e.minFilter=cu[i.minFilter]||P,e.wrapS=hu[i.wrapS]||w,e.wrapT=hu[i.wrapT]||w,n.associations.set(e,{textures:t}),e})).catch((function(){return null}));return this.textureCache[o]=l,l}loadImageSource(t,e){const i=this,n=this.json,r=this.options;if(void 0!==this.sourceCache[t])return this.sourceCache[t].then((t=>t.clone()));const s=n.images[t],a=self.URL||self.webkitURL;let o=s.uri||"",l=!1;if(void 0!==s.bufferView)o=i.getDependency("bufferView",s.bufferView).then((function(t){l=!0;const e=new Blob([t],{type:s.mimeType});return o=a.createObjectURL(e),o}));else if(void 0===s.uri)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(o).then((function(t){return new Promise((function(i,n){let s=i;!0===e.isImageBitmapLoader&&(s=function(t){const e=new de(t);e.needsUpdate=!0,i(e)}),e.load(_l.resolveURL(t,r.path),s,void 0,n)}))})).then((function(t){var e;return!0===l&&a.revokeObjectURL(o),t.userData.mimeType=s.mimeType||((e=s.uri).search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/)?"image/jpeg":e.search(/\.webp($|\?)/i)>0||0===e.search(/^data\:image\/webp/)?"image/webp":"image/png"),t})).catch((function(t){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),t}));return this.sourceCache[t]=c,c}assignTexture(t,e,i,n){const r=this;return this.getDependency("texture",i.index).then((function(s){if(!s)return null;if(void 0!==i.texCoord&&i.texCoord>0&&((s=s.clone()).channel=i.texCoord),r.extensions[Dh.KHR_TEXTURE_TRANSFORM]){const t=void 0!==i.extensions?i.extensions[Dh.KHR_TEXTURE_TRANSFORM]:void 0;if(t){const e=r.associations.get(s);s=r.extensions[Dh.KHR_TEXTURE_TRANSFORM].extendTexture(s,t),r.associations.set(s,e)}}return void 0!==n&&(s.colorSpace=n),t[e]=s,s}))}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const n=void 0===e.attributes.tangent,r=void 0!==e.attributes.color,s=void 0===e.attributes.normal;if(t.isPoints){const t="PointsMaterial:"+i.uuid;let e=this.cache.get(t);e||(e=new po,ki.prototype.copy.call(e,i),e.color.copy(i.color),e.map=i.map,e.sizeAttenuation=!1,this.cache.add(t,e)),i=e}else if(t.isLine){const t="LineBasicMaterial:"+i.uuid;let e=this.cache.get(t);e||(e=new io,ki.prototype.copy.call(e,i),e.color.copy(i.color),e.map=i.map,this.cache.add(t,e)),i=e}if(n||r||s){let t="ClonedMaterial:"+i.uuid+":";n&&(t+="derivative-tangents:"),r&&(t+="vertex-colors:"),s&&(t+="flat-shading:");let e=this.cache.get(t);e||(e=i.clone(),r&&(e.vertexColors=!0),s&&(e.flatShading=!0),n&&(e.normalScale&&(e.normalScale.y*=-1),e.clearcoatNormalScale&&(e.clearcoatNormalScale.y*=-1)),this.cache.add(t,e),this.associations.set(e,this.associations.get(i))),i=e}t.material=i}getMaterialType(){return wo}loadMaterial(t){const e=this,i=this.json,n=this.extensions,r=i.materials[t];let s;const a={},o=[];if((r.extensions||{})[Dh.KHR_MATERIALS_UNLIT]){const t=n[Dh.KHR_MATERIALS_UNLIT];s=t.getMaterialType(),o.push(t.extendParams(a,r,e))}else{const i=r.pbrMetallicRoughness||{};if(a.color=new Fi(1,1,1),a.opacity=1,Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;a.color.setRGB(t[0],t[1],t[2],vt),a.opacity=t[3]}void 0!==i.baseColorTexture&&o.push(e.assignTexture(a,"map",i.baseColorTexture,ft)),a.metalness=void 0!==i.metallicFactor?i.metallicFactor:1,a.roughness=void 0!==i.roughnessFactor?i.roughnessFactor:1,void 0!==i.metallicRoughnessTexture&&(o.push(e.assignTexture(a,"metalnessMap",i.metallicRoughnessTexture)),o.push(e.assignTexture(a,"roughnessMap",i.metallicRoughnessTexture))),s=this._invokeOne((function(e){return e.getMaterialType&&e.getMaterialType(t)})),o.push(Promise.all(this._invokeAll((function(e){return e.extendMaterialParams&&e.extendMaterialParams(t,a)}))))}!0===r.doubleSided&&(a.side=c);const l=r.alphaMode||mu;if(l===fu?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,l===gu&&(a.alphaTest=void 0!==r.alphaCutoff?r.alphaCutoff:.5)),void 0!==r.normalTexture&&s!==Gi&&(o.push(e.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Wt(1,1),void 0!==r.normalTexture.scale)){const t=r.normalTexture.scale;a.normalScale.set(t,t)}if(void 0!==r.occlusionTexture&&s!==Gi&&(o.push(e.assignTexture(a,"aoMap",r.occlusionTexture)),void 0!==r.occlusionTexture.strength&&(a.aoMapIntensity=r.occlusionTexture.strength)),void 0!==r.emissiveFactor&&s!==Gi){const t=r.emissiveFactor;a.emissive=(new Fi).setRGB(t[0],t[1],t[2],vt)}return void 0!==r.emissiveTexture&&s!==Gi&&o.push(e.assignTexture(a,"emissiveMap",r.emissiveTexture,ft)),Promise.all(o).then((function(){const i=new s(a);return r.name&&(i.name=r.name),Eu(i,r),e.associations.set(i,{materials:t}),r.extensions&&_u(n,i,r),i}))}createUniqueName(t){const e=bl.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,n=this.primitiveCache;function r(t){return i[Dh.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(t,e).then((function(i){return wu(i,t,e)}))}const s=[];for(let i=0,a=t.length;i0&&yu(u,r),u.name=e.createUniqueName(r.name||"mesh_"+t),Eu(u,r),h.extensions&&_u(n,u,h),e.assignFinalMaterial(u),l.push(u)}for(let i=0,n=l.length;i1?new ya:1===e.length?e[0]:new Ei,a!==e[0])for(let t=0,i=e.length;t{const e=new Map;for(const[t,i]of n.associations)(t instanceof ki||t instanceof de)&&e.set(t,i);return t.traverse((t=>{const i=n.associations.get(t);null!=i&&e.set(t,i)})),e})(r),r}))}_createAnimationTracks(t,e,i,n,r){const s=[],a=t.name?t.name:t.uuid,o=[];let l;switch(Au[r.path]===Au.weights?t.traverse((function(t){t.morphTargetInfluences&&o.push(t.name?t.name:t.uuid)})):o.push(a),Au[r.path]){case Au.weights:l=ko;break;case Au.rotation:l=Ho;break;case Au.position:case Au.scale:l=Vo;break;default:if(1===i.itemSize)l=ko;else l=Vo}const c=void 0!==n.interpolation?pu[n.interpolation]:ct,h=this._getArrayFromAccessor(i);for(let t=0,i=o.length;t{const n=this._getIdleWorker();-1!==n?(this._initWorker(n),this.workerStatus|=1<t.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const Tu=2,Bu=0,Ru=1,Lu=10;class Du{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Uu{constructor(t,e,i,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,i),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const i=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&nt.arrayBuffer())).then((t=>WebAssembly.instantiate(t,ku))).then(this._init):WebAssembly.instantiate(Buffer.from(Hu,"base64"),ku).then(this._init),Fu)}_init(t){Qu=t.instance,ku.env.emscripten_notify_memory_growth(0)}decode(t,e=0){if(!Qu)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=t.byteLength,n=Qu.exports.malloc(i);Ou.set(t,n),e=e||Number(Qu.exports.ZSTD_findDecompressedSize(n,i));const r=Qu.exports.malloc(e),s=Qu.exports.ZSTD_decompress(r,e,n,i),a=Ou.slice(r,r+s);return Qu.exports.free(n),Qu.exports.free(r),a}}const Hu="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",zu=new WeakMap;let Vu,Wu=0;class qu extends Ko{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new bu,this.workerSourceURL="",this.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}detectSupport(t){return!0===t.isWebGPURenderer?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},t.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}init(){if(!this.transcoderPending){const t=new Zo(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const e=t.loadAsync("basis_transcoder.js"),i=new Zo(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const n=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([e,n]).then((([t,e])=>{const i=qu.BasisWorker.toString(),n=["/* constants */","let _EngineFormat = "+JSON.stringify(qu.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(qu.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(qu.BasisFormat),"/* basis_transcoder.js */",t,"/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n])),this.transcoderBinary=e,this.workerPool.setWorkerCreator((()=>{const t=new Worker(this.workerSourceURL),e=this.transcoderBinary.slice(0);return t.postMessage({type:"init",config:this.workerConfig,transcoderBinary:e},[e]),t}))})),Wu>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Wu++}return this.transcoderPending}load(t,e,i,n){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const r=new Zo(this.manager);r.setResponseType("arraybuffer"),r.setWithCredentials(this.withCredentials),r.load(t,(t=>{if(zu.has(t)){return zu.get(t).promise.then(e).catch(n)}this._createTexture(t).then((t=>e?e(t):null)).catch(n)}),i,n)}_createTextureFrom(t,e){const{faces:i,width:n,height:r,format:s,type:a,error:o,dfdFlags:l}=t;if("error"===a)return Promise.reject(o);let c;if(6===e.faceCount)c=new Co(i,s,N);else{const t=i[0].mipmaps;c=e.layerCount>1?new So(t,n,r,e.layerCount,s,N):new xo(t,n,r,s,N)}return c.minFilter=1===i[0].mipmaps.length?D:P,c.magFilter=D,c.generateMipmaps=!1,c.needsUpdate=!0,c.colorSpace=Ku(e),c.premultiplyAlpha=!!(1&l),c}async _createTexture(t,e={}){const i=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,Pu.length);if(e[0]!==Pu[0]||e[1]!==Pu[1]||e[2]!==Pu[2]||e[3]!==Pu[3]||e[4]!==Pu[4]||e[5]!==Pu[5]||e[6]!==Pu[6]||e[7]!==Pu[7]||e[8]!==Pu[8]||e[9]!==Pu[9]||e[10]!==Pu[10]||e[11]!==Pu[11])throw new Error("Missing KTX 2.0 identifier.");const i=new Du,n=17*Uint32Array.BYTES_PER_ELEMENT,r=new Uu(t,Pu.length,n,!0);i.vkFormat=r._nextUint32(),i.typeSize=r._nextUint32(),i.pixelWidth=r._nextUint32(),i.pixelHeight=r._nextUint32(),i.pixelDepth=r._nextUint32(),i.layerCount=r._nextUint32(),i.faceCount=r._nextUint32();const s=r._nextUint32();i.supercompressionScheme=r._nextUint32();const a=r._nextUint32(),o=r._nextUint32(),l=r._nextUint32(),c=r._nextUint32(),h=r._nextUint64(),u=r._nextUint64(),d=new Uu(t,Pu.length+n,3*s*8,!0);for(let e=0;e{const e=new Gu;await e.init(),t(e)}))),i=await Vu);const n=[];for(let r=0;r>r),a=Math.max(1,t.pixelHeight>>r),o=t.pixelDepth?Math.max(1,t.pixelDepth>>r):0,l=t.levels[r];let c,h;if(0===t.supercompressionScheme)c=l.levelData;else{if(2!==t.supercompressionScheme)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");c=i.decode(l.levelData,l.uncompressedByteLength)}h=Yu[e]===k?new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):Yu[e]===G?new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):c,n.push({data:h,width:s,height:a,depth:o})}let r;if(Xu.has(ju[e]))r=0===t.pixelDepth?new za(n[0].data,t.pixelWidth,t.pixelHeight):new fe(n[0].data,t.pixelWidth,t.pixelHeight,t.pixelDepth);else{if(t.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");r=new xo(n,t.pixelWidth,t.pixelHeight)}return r.mipmaps=n,r.type=Yu[e],r.format=ju[e],r.colorSpace=Ku(t),r.needsUpdate=!0,Promise.resolve(r)}(i);const n=e,r=this.init().then((()=>this.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:n},[t]))).then((t=>this._createTextureFrom(t.data,i)));return zu.set(t,{promise:r}),r}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Wu--,this}}qu.BasisFormat={ETC1S:0,UASTC_4x4:1},qu.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},qu.EngineFormat={RGBAFormat:z,RGBA_ASTC_4x4_Format:nt,RGBA_BPTC_Format:st,RGBA_ETC2_EAC_Format:it,RGBA_PVRTC_4BPPV1_Format:Z,RGBA_S3TC_DXT5_Format:J,RGB_ETC1_Format:tt,RGB_ETC2_Format:et,RGB_PVRTC_4BPPV1_Format:$,RGB_S3TC_DXT1_Format:j},qu.BasisWorker=function(){let t,e,i;const n=_EngineFormat,r=_TranscoderFormat,s=_BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":t=u.config,d=u.transcoderBinary,e=new Promise((t=>{i={wasmBinary:d,onRuntimeInitialized:t},BASIS(i)})).then((()=>{i.initializeBasis(),void 0===i.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":e.then((()=>{try{const{faces:e,buffers:a,width:d,height:A,hasAlpha:p,format:m,dfdFlags:g}=function(e){const a=new i.KTX2File(new Uint8Array(e));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");const d=a.isUASTC()?s.UASTC_4x4:s.ETC1S,A=a.getWidth(),p=a.getHeight(),m=a.getLayers()||1,g=a.getLevels(),f=a.getFaces(),v=a.getHasAlpha(),_=a.getDFDFlags(),{transcoderFormat:E,engineFormat:y}=function(e,i,a,h){let u,d;const A=e===s.ETC1S?o:l;for(let n=0;n1?(r=o.origWidth,s=o.origHeight):(r=o.width,s=o.height);const l=new Uint8Array(a.getImageTranscodedSizeInBytes(i,e,0,E));if(!a.transcodeImage(l,i,e,t,E,0,-1,-1))throw u(),new Error("THREE.KTX2Loader: .transcodeImage failed.");n.push(l)}const o=h(n);e.push({data:o,width:r,height:s}),S.push(o.buffer)}x.push({mipmaps:e,width:A,height:p,format:y})}return u(),{faces:x,buffers:S,width:A,height:p,hasAlpha:v,format:y,dfdFlags:_}}(u.buffer);self.postMessage({type:"transcode",id:u.id,faces:e,width:d,height:A,hasAlpha:p,format:m,dfdFlags:g},a)}catch(t){console.error(t),self.postMessage({type:"error",id:u.id,error:t.message})}}))}var d}));const a=[{if:"astcSupported",basisFormat:[s.UASTC_4x4],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.BC1,r.BC3],engineFormat:[n.RGB_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.ETC1],engineFormat:[n.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],o=a.sort((function(t,e){return t.priorityETC1S-e.priorityETC1S})),l=a.sort((function(t,e){return t.priorityUASTC-e.priorityUASTC}));function c(t){return t<=2||0==(t&t-1)&&0!==t}function h(t){if(1===t.length)return t[0];let e=0;for(let i=0;i=this[id];--t){const e=this[td][t];0===this[Zu].get(e)&&(this[nd].delete(e),this[td].splice(t,1))}}} -/* @license - * Copyright 2021 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const sd=t=>{const e=new Map;for(const i of t.mappings)for(const t of i.variants)e.set(t,{material:null,gltfMaterialIndex:i.material});return e};class ad{constructor(t){this.parser=t,this.name="KHR_materials_variants"}afterRoot(t){const e=this.parser,i=e.json;if(void 0===i.extensions||void 0===i.extensions[this.name])return null;const n=(t=>{const e=[],i=new Set;for(const n of t){let t=n,r=0;for(;i.has(t);)t=n+"."+ ++r;i.add(t),e.push(t)}return e})((i.extensions[this.name].variants||[]).map((t=>t.name)));for(const n of t.scenes)n.traverse((t=>{const n=t;if(!n.material)return;const r=e.associations.get(n);if(null==r||null==r.meshes||null==r.primitives)return;const s=i.meshes[r.meshes].primitives[r.primitives].extensions;s&&s[this.name]&&(n.userData.variantMaterials=sd(s[this.name]))}));return t.userData.variants=n,Promise.resolve()}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var od,ld;de.DEFAULT_ANISOTROPY=4;const cd=new Map,hd=new Map;let ud;const dd=new class extends Ko{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,i,n){const r=new Zo(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,(t=>{this.parse(t,e,n)}),i,n)}parse(t,e,i=(()=>{})){this.decodeDracoFile(t,e,null,null,ft).catch(i)}decodeDracoFile(t,e,i,n,r=vt,s=(()=>{})){const a={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:r};return this.decodeGeometry(t,a).then(e).catch(s)}decodeGeometry(t,e){const i=JSON.stringify(e);if(bh.has(t)){const e=bh.get(t);if(e.key===i)return e.promise;if(0===t.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let n;const r=this.workerNextTaskID++,s=t.byteLength,a=this._getWorker(r,s).then((i=>(n=i,new Promise(((i,s)=>{n._callbacks[r]={resolve:i,reject:s},n.postMessage({type:"decode",id:r,taskConfig:e,buffer:t},[t])}))))).then((t=>this._createGeometry(t.geometry)));return a.catch((()=>!0)).then((()=>{n&&r&&this._releaseTask(n,r)})),bh.set(t,{key:i,promise:a}),a}_createGeometry(t){const e=new sn;t.index&&e.setIndex(new Xi(t.index.array,1));for(let i=0;i{i.load(t,e,void 0,n)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then((e=>{const i=e[0];t||(this.decoderConfig.wasmBinary=e[1]);const n=Th.toString(),r=["/* draco decoder */",i,"","/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r]))})),this.decoderPending}_getWorker(t,e){return this._initDecoder().then((()=>{if(this.workerPool.lengthe._taskLoad?-1:1}));const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i}))}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map((t=>t._taskLoad)))}dispose(){for(let t=0;tnew ad(t))),this[_d]=t,this[fd].setDRACOLoader(dd),this[fd].setKTX2Loader(pd)}static setDRACODecoderLocation(t){ud=t,dd.setDecoderPath(t)}static getDRACODecoderLocation(){return ud}static setKTX2TranscoderLocation(t){Ad=t,pd.setTranscoderPath(t)}static getKTX2TranscoderLocation(){return Ad}static setMeshoptDecoderLocation(t){var e;md!==t&&(md=t,gd=(e=t,new Promise(((t,i)=>{const n=document.createElement("script");document.body.appendChild(n),n.onload=t,n.onerror=i,n.async=!0,n.src=e}))).then((()=>MeshoptDecoder.ready)).then((()=>MeshoptDecoder)))}static getMeshoptDecoderLocation(){return md}static initializeKTX2Loader(t){pd.detectSupport(t)}static get cache(){return cd}static clearCache(){cd.forEach(((t,e)=>{this.delete(e)})),this[vd].reset()}static has(t){return cd.has(t)}static async delete(t){if(!this.has(t))return;const e=cd.get(t);hd.delete(t),cd.delete(t);(await e).dispose()}static hasFinishedLoading(t){return!!hd.get(t)}get[(od=vd,ld=fd,vd)](){return this.constructor[vd]}async preload(t,e,i=(()=>{})){if(this[fd].setWithCredentials(Ed.withCredentials),this.dispatchEvent({type:"preload",element:e,src:t}),!cd.has(t)){null!=gd&&this[fd].setMeshoptDecoder(await gd);const e=((t,e,i=(()=>{}))=>{const n=t=>{const e=t.loaded/t.total;i(Math.max(0,Math.min(1,isFinite(e)?e:1)))};return new Promise(((i,r)=>{e.load(t,i,n,r)}))})(t,this[fd],(t=>{i(.8*t)})),n=this[_d],r=e.then((t=>n.prepare(t))).then((t=>(i(.9),new n(t)))).catch((t=>(console.error(t),new n)));cd.set(t,r)}await cd.get(t),hd.set(t,!0),i&&i(1)}async load(t,e,i=(()=>{})){await this.preload(t,e,i);const n=await cd.get(t),r=await n.clone();return this[vd].retain(t),r.dispose=()=>{this[vd].release(t)},r}}Ed[od]=new rd(Ed);class yd extends Ei{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Wt(.5,.5),this.addEventListener("removed",(function(){this.traverse((function(t){t.element instanceof Element&&null!==t.element.parentNode&&t.element.parentNode.removeChild(t.element)}))}))}copy(t,e){return super.copy(t,e),this.element=t.element.cloneNode(!0),this.center=t.center,this}}const xd=new _e,Sd=new Ye,Cd=new Ye,Id=new _e,Md=new _e;class wd{constructor(t={}){const e=this;let i,n,r,s;const a={objects:new WeakMap},o=void 0!==t.element?t.element:document.createElement("div");function l(t,i,n){if(t.isCSS2DObject){xd.setFromMatrixPosition(t.matrixWorld),xd.applyMatrix4(Cd);const l=!0===t.visible&&xd.z>=-1&&xd.z<=1&&!0===t.layers.test(n.layers);if(t.element.style.display=!0===l?"":"none",!0===l){t.onBeforeRender(e,i,n);const a=t.element;a.style.transform="translate("+-100*t.center.x+"%,"+-100*t.center.y+"%)translate("+(xd.x*r+r)+"px,"+(-xd.y*s+s)+"px)",a.parentNode!==o&&o.appendChild(a),t.onAfterRender(e,i,n)}const h={distanceToCameraSquared:c(n,t)};a.objects.set(t,h)}for(let e=0,r=t.children.length;e{const{geometry:i}=t;if(void 0!==i){const{position:s}=i.attributes;if(void 0!==s)for(let i=0,a=s.count;it.toBlob(i,e)));let i;return"image/jpeg"===e?i=.92:"image/webp"===e&&(i=.8),t.convertToBlob({type:e,quality:i})}class pA{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(t){this.plugins=t}async write(t,e,i={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},i),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(t),await Promise.all(this.pending);const n=this,r=n.buffers,s=n.json;i=n.options;const a=n.extensionsUsed,o=n.extensionsRequired,l=new Blob(r,{type:"application/octet-stream"}),c=Object.keys(a),h=Object.keys(o);if(c.length>0&&(s.extensionsUsed=c),h.length>0&&(s.extensionsRequired=h),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=l.size),!0===i.binary){const t=new FileReader;t.readAsArrayBuffer(l),t.onloadend=function(){const i=uA(t.result),n=new DataView(new ArrayBuffer(8));n.setUint32(0,i.byteLength,!0),n.setUint32(4,5130562,!0);const r=uA((a=JSON.stringify(s),(new TextEncoder).encode(a).buffer),32);var a;const o=new DataView(new ArrayBuffer(8));o.setUint32(0,r.byteLength,!0),o.setUint32(4,1313821514,!0);const l=new ArrayBuffer(12),c=new DataView(l);c.setUint32(0,1179937895,!0),c.setUint32(4,2,!0);const h=12+o.byteLength+r.byteLength+n.byteLength+i.byteLength;c.setUint32(8,h,!0);const u=new Blob([l,o,r,n,i],{type:"application/octet-stream"}),d=new FileReader;d.readAsArrayBuffer(u),d.onloadend=function(){e(d.result)}}}else if(s.buffers&&s.buffers.length>0){const t=new FileReader;t.readAsDataURL(l),t.onloadend=function(){const i=t.result;s.buffers[0].uri=i,e(s)}}else e(s)}serializeUserData(t,e){if(0===Object.keys(t.userData).length)return;const i=this.options,n=this.extensionsUsed;try{const r=JSON.parse(JSON.stringify(t.userData));if(i.includeCustomExtensions&&r.gltfExtensions){void 0===e.extensions&&(e.extensions={});for(const t in r.gltfExtensions)e.extensions[t]=r.gltfExtensions[t],n[t]=!0;delete r.gltfExtensions}Object.keys(r).length>0&&(e.extras=r)}catch(e){console.warn("THREE.GLTFExporter: userData of '"+t.name+"' won't be serialized because of JSON.stringify error - "+e.message)}}getUID(t,e=!1){if(!1===this.uids.has(t)){const e=new Map;e.set(!0,this.uid++),e.set(!1,this.uid++),this.uids.set(t,e)}return this.uids.get(t).get(e)}isNormalizedNormalAttribute(t){if(this.cache.attributesNormalized.has(t))return!1;const e=new _e;for(let i=0,n=t.count;i5e-4)return!1;return!0}createNormalizedNormalAttribute(t){const e=this.cache;if(e.attributesNormalized.has(t))return e.attributesNormalized.get(t);const i=t.clone(),n=new _e;for(let t=0,e=i.count;t4?n=t.array[r*t.itemSize+i]:(0===i?n=t.getX(r):1===i?n=t.getY(r):2===i?n=t.getZ(r):3===i&&(n=t.getW(r)),!0===t.normalized&&(n=Vt.normalize(n,t.array))),e===Xd?l.setFloat32(c,n,!0):e===Wd?l.setInt32(c,n,!0):e===qd?l.setUint32(c,n,!0):e===zd?l.setInt16(c,n,!0):e===Vd?l.setUint16(c,n,!0):e===Gd?l.setInt8(c,n):e===Hd&&l.setUint8(c,n),c+=a}const h={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:o};void 0!==r&&(h.target=r),r===jd&&(h.byteStride=t.itemSize*a),this.byteOffset+=o,s.bufferViews.push(h);return{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(t){const e=this,i=e.json;return i.bufferViews||(i.bufferViews=[]),new Promise((function(n){const r=new FileReader;r.readAsArrayBuffer(t),r.onloadend=function(){const t=uA(r.result),s={buffer:e.processBuffer(t),byteOffset:e.byteOffset,byteLength:t.byteLength};e.byteOffset+=t.byteLength,n(i.bufferViews.push(s)-1)}}))}processAccessor(t,e,i,n){const r=this.json;let s;if(t.array.constructor===Float32Array)s=Xd;else if(t.array.constructor===Int32Array)s=Wd;else if(t.array.constructor===Uint32Array)s=qd;else if(t.array.constructor===Int16Array)s=zd;else if(t.array.constructor===Uint16Array)s=Vd;else if(t.array.constructor===Int8Array)s=Gd;else{if(t.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+t.array.constructor.name);s=Hd}if(void 0===i&&(i=0),void 0!==n&&n!==1/0||(n=t.count),0===n)return null;const a=function(t,e,i){const n={min:new Array(t.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(t.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let r=e;r4?i=t.array[r*t.itemSize+e]:(0===e?i=t.getX(r):1===e?i=t.getY(r):2===e?i=t.getZ(r):3===e&&(i=t.getW(r)),!0===t.normalized&&(i=Vt.normalize(i,t.array))),n.min[e]=Math.min(n.min[e],i),n.max[e]=Math.max(n.max[e],i)}return n}(t,i,n);let o;void 0!==e&&(o=t===e.index?Yd:jd);const l=this.processBufferView(t,s,i,n,o),c={bufferView:l.id,byteOffset:l.byteOffset,componentType:s,count:n,max:a.max,min:a.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[t.itemSize]};return!0===t.normalized&&(c.normalized=!0),r.accessors||(r.accessors=[]),r.accessors.push(c)-1}processImage(t,e,i,n="image/png"){if(null!==t){const r=this,s=r.cache,a=r.json,o=r.options,l=r.pending;s.images.has(t)||s.images.set(t,{});const c=s.images.get(t),h=n+":flipY/"+i.toString();if(void 0!==c[h])return c[h];a.images||(a.images=[]);const u={mimeType:n},d=dA();d.width=Math.min(t.width,o.maxTextureSize),d.height=Math.min(t.height,o.maxTextureSize);const A=d.getContext("2d");if(!0===i&&(A.translate(0,d.height),A.scale(1,-1)),void 0!==t.data){e!==z&&console.error("GLTFExporter: Only RGBAFormat is supported.",e),(t.width>o.maxTextureSize||t.height>o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",t);const i=new Uint8ClampedArray(t.height*t.width*4);for(let e=0;er.processBufferViewImage(t))).then((t=>{u.bufferView=t}))):void 0!==d.toDataURL?u.uri=d.toDataURL(n):l.push(AA(d,n).then((t=>(new FileReader).readAsDataURL(t))).then((t=>{u.uri=t})));const p=a.images.push(u)-1;return c[h]=p,p}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(t){const e=this.json;e.samplers||(e.samplers=[]);const i={magFilter:aA[t.magFilter],minFilter:aA[t.minFilter],wrapS:aA[t.wrapS],wrapT:aA[t.wrapT]};return e.samplers.push(i)-1}processTexture(t){const e=this.options,i=this.cache,n=this.json;if(i.textures.has(t))return i.textures.get(t);n.textures||(n.textures=[]),t instanceof xo&&(t=Dd(t,e.maxTextureSize));let r=t.userData.mimeType;"image/webp"===r&&(r="image/png");const s={sampler:this.processSampler(t),source:this.processImage(t.image,t.format,t.flipY,r)};t.name&&(s.name=t.name),this._invokeAll((function(e){e.writeTexture&&e.writeTexture(t,s)}));const a=n.textures.push(s)-1;return i.textures.set(t,a),a}processMaterial(t){const e=this.cache,i=this.json;if(e.materials.has(t))return e.materials.get(t);if(t.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;i.materials||(i.materials=[]);const n={pbrMetallicRoughness:{}};!0!==t.isMeshStandardMaterial&&!0!==t.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const r=t.color.toArray().concat([t.opacity]);if(cA(r,[1,1,1,1])||(n.pbrMetallicRoughness.baseColorFactor=r),t.isMeshStandardMaterial?(n.pbrMetallicRoughness.metallicFactor=t.metalness,n.pbrMetallicRoughness.roughnessFactor=t.roughness):(n.pbrMetallicRoughness.metallicFactor=.5,n.pbrMetallicRoughness.roughnessFactor=.5),t.metalnessMap||t.roughnessMap){const e=this.buildMetalRoughTexture(t.metalnessMap,t.roughnessMap),i={index:this.processTexture(e),channel:e.channel};this.applyTextureTransform(i,e),n.pbrMetallicRoughness.metallicRoughnessTexture=i}if(t.map){const e={index:this.processTexture(t.map),texCoord:t.map.channel};this.applyTextureTransform(e,t.map),n.pbrMetallicRoughness.baseColorTexture=e}if(t.emissive){const e=t.emissive;if(Math.max(e.r,e.g,e.b)>0&&(n.emissiveFactor=t.emissive.toArray()),t.emissiveMap){const e={index:this.processTexture(t.emissiveMap),texCoord:t.emissiveMap.channel};this.applyTextureTransform(e,t.emissiveMap),n.emissiveTexture=e}}if(t.normalMap){const e={index:this.processTexture(t.normalMap),texCoord:t.normalMap.channel};t.normalScale&&1!==t.normalScale.x&&(e.scale=t.normalScale.x),this.applyTextureTransform(e,t.normalMap),n.normalTexture=e}if(t.aoMap){const e={index:this.processTexture(t.aoMap),texCoord:t.aoMap.channel};1!==t.aoMapIntensity&&(e.strength=t.aoMapIntensity),this.applyTextureTransform(e,t.aoMap),n.occlusionTexture=e}t.transparent?n.alphaMode="BLEND":t.alphaTest>0&&(n.alphaMode="MASK",n.alphaCutoff=t.alphaTest),t.side===c&&(n.doubleSided=!0),""!==t.name&&(n.name=t.name),this.serializeUserData(t,n),this._invokeAll((function(e){e.writeMaterial&&e.writeMaterial(t,n)}));const s=i.materials.push(n)-1;return e.materials.set(t,s),s}processMesh(t){const e=this.cache,i=this.json,n=[t.geometry.uuid];if(Array.isArray(t.material))for(let e=0,i=t.material.length;e0){const i=[],n=[],r={};if(void 0!==t.morphTargetDictionary)for(const e in t.morphTargetDictionary)r[t.morphTargetDictionary[e]]=e;for(let a=0;a0&&(o.extras={},o.extras.targetNames=n)}const p=Array.isArray(t.material);if(p&&0===s.groups.length)return null;let m=!1;if(p&&null===s.index){const t=[];for(let e=0,i=s.attributes.position.count;e0&&(i.targets=h),null!==s.index){let n=this.getUID(s.index);void 0===f[t].start&&void 0===f[t].count||(n+=":"+f[t].start+":"+f[t].count),e.attributes.has(n)?i.indices=e.attributes.get(n):(i.indices=this.processAccessor(s.index,s,f[t].start,f[t].count),e.attributes.set(n,i.indices)),null===i.indices&&delete i.indices}const n=this.processMaterial(g[f[t].materialIndex]);null!==n&&(i.material=n),c.push(i)}!0===m&&s.setIndex(null),o.primitives=c,i.meshes||(i.meshes=[]),this._invokeAll((function(e){e.writeMesh&&e.writeMesh(t,o)}));const v=i.meshes.push(o)-1;return e.meshes.set(r,v),v}detectMeshQuantization(t,e){if(this.extensionsUsed[sA])return;let i;switch(e.array.constructor){case Int8Array:i="byte";break;case Uint8Array:i="unsigned byte";break;case Int16Array:i="short";break;case Uint16Array:i="unsigned short";break;default:return}e.normalized&&(i+=" normalized");const n=t.split("_",1)[0];Ud[n]&&Ud[n].includes(i)&&(this.extensionsUsed[sA]=!0,this.extensionsRequired[sA]=!0)}processCamera(t){const e=this.json;e.cameras||(e.cameras=[]);const i=t.isOrthographicCamera,n={type:i?"orthographic":"perspective"};return i?n.orthographic={xmag:2*t.right,ymag:2*t.top,zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near}:n.perspective={aspectRatio:t.aspect,yfov:Vt.degToRad(t.fov),zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near},""!==t.name&&(n.name=t.type),e.cameras.push(n)-1}processAnimation(t,e){const i=this.json,n=this.nodeMap;i.animations||(i.animations=[]);const r=(t=Pd.Utils.mergeMorphTargetTracks(t.clone(),e)).tracks,s=[],a=[];for(let t=0;t0){const e=[];for(let n=0,r=t.children.length;n0&&(r.children=e)}this._invokeAll((function(e){e.writeNode&&e.writeNode(t,r)}));const s=e.nodes.push(r)-1;return n.set(t,s),s}processScene(t){const e=this.json,i=this.options;e.scenes||(e.scenes=[],e.scene=0);const n={};""!==t.name&&(n.name=t.name),e.scenes.push(n);const r=[];for(let e=0,n=t.children.length;e0&&(n.nodes=r),this.serializeUserData(t,n)}processObjects(t){const e=new ba;e.name="AuxScene";for(let i=0;i0&&this.processObjects(i);for(let t=0;t0&&(s.range=t.distance)):t.isSpotLight&&(s.type="spot",t.distance>0&&(s.range=t.distance),s.spot={},s.spot.innerConeAngle=(1-t.penumbra)*t.angle,s.spot.outerConeAngle=t.angle),void 0!==t.decay&&2!==t.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),!t.target||t.target.parent===t&&0===t.target.position.x&&0===t.target.position.y&&-1===t.target.position.z||console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),r[this.name]||(n.extensions=n.extensions||{},n.extensions[this.name]={lights:[]},r[this.name]=!0);const a=n.extensions[this.name].lights;a.push(s),e.extensions=e.extensions||{},e.extensions[this.name]={light:a.length-1}}}class gA{constructor(t){this.writer=t,this.name="KHR_materials_unlit"}writeMaterial(t,e){if(!t.isMeshBasicMaterial)return;const i=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},i[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}}class fA{constructor(t){this.writer=t,this.name="KHR_materials_clearcoat"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.clearcoat)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.clearcoatFactor=t.clearcoat,t.clearcoatMap){const e={index:i.processTexture(t.clearcoatMap),texCoord:t.clearcoatMap.channel};i.applyTextureTransform(e,t.clearcoatMap),r.clearcoatTexture=e}if(r.clearcoatRoughnessFactor=t.clearcoatRoughness,t.clearcoatRoughnessMap){const e={index:i.processTexture(t.clearcoatRoughnessMap),texCoord:t.clearcoatRoughnessMap.channel};i.applyTextureTransform(e,t.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=e}if(t.clearcoatNormalMap){const e={index:i.processTexture(t.clearcoatNormalMap),texCoord:t.clearcoatNormalMap.channel};i.applyTextureTransform(e,t.clearcoatNormalMap),r.clearcoatNormalTexture=e}e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class vA{constructor(t){this.writer=t,this.name="KHR_materials_iridescence"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.iridescence)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.iridescenceFactor=t.iridescence,t.iridescenceMap){const e={index:i.processTexture(t.iridescenceMap),texCoord:t.iridescenceMap.channel};i.applyTextureTransform(e,t.iridescenceMap),r.iridescenceTexture=e}if(r.iridescenceIor=t.iridescenceIOR,r.iridescenceThicknessMinimum=t.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=t.iridescenceThicknessRange[1],t.iridescenceThicknessMap){const e={index:i.processTexture(t.iridescenceThicknessMap),texCoord:t.iridescenceThicknessMap.channel};i.applyTextureTransform(e,t.iridescenceThicknessMap),r.iridescenceThicknessTexture=e}e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class _A{constructor(t){this.writer=t,this.name="KHR_materials_transmission"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.transmission)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.transmissionFactor=t.transmission,t.transmissionMap){const e={index:i.processTexture(t.transmissionMap),texCoord:t.transmissionMap.channel};i.applyTextureTransform(e,t.transmissionMap),r.transmissionTexture=e}e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class EA{constructor(t){this.writer=t,this.name="KHR_materials_volume"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.transmission)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.thicknessFactor=t.thickness,t.thicknessMap){const e={index:i.processTexture(t.thicknessMap),texCoord:t.thicknessMap.channel};i.applyTextureTransform(e,t.thicknessMap),r.thicknessTexture=e}r.attenuationDistance=t.attenuationDistance,r.attenuationColor=t.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class yA{constructor(t){this.writer=t,this.name="KHR_materials_ior"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||1.5===t.ior)return;const i=this.writer.extensionsUsed,n={};n.ior=t.ior,e.extensions=e.extensions||{},e.extensions[this.name]=n,i[this.name]=!0}}class xA{constructor(t){this.writer=t,this.name="KHR_materials_specular"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||1===t.specularIntensity&&t.specularColor.equals(lA)&&!t.specularIntensityMap&&!t.specularColorMap)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.specularIntensityMap){const e={index:i.processTexture(t.specularIntensityMap),texCoord:t.specularIntensityMap.channel};i.applyTextureTransform(e,t.specularIntensityMap),r.specularTexture=e}if(t.specularColorMap){const e={index:i.processTexture(t.specularColorMap),texCoord:t.specularColorMap.channel};i.applyTextureTransform(e,t.specularColorMap),r.specularColorTexture=e}r.specularFactor=t.specularIntensity,r.specularColorFactor=t.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class SA{constructor(t){this.writer=t,this.name="KHR_materials_sheen"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0==t.sheen)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.sheenRoughnessMap){const e={index:i.processTexture(t.sheenRoughnessMap),texCoord:t.sheenRoughnessMap.channel};i.applyTextureTransform(e,t.sheenRoughnessMap),r.sheenRoughnessTexture=e}if(t.sheenColorMap){const e={index:i.processTexture(t.sheenColorMap),texCoord:t.sheenColorMap.channel};i.applyTextureTransform(e,t.sheenColorMap),r.sheenColorTexture=e}r.sheenRoughnessFactor=t.sheenRoughness,r.sheenColorFactor=t.sheenColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class CA{constructor(t){this.writer=t,this.name="KHR_materials_anisotropy"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0==t.anisotropy)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.anisotropyMap){const e={index:i.processTexture(t.anisotropyMap)};i.applyTextureTransform(e,t.anisotropyMap),r.anisotropyTexture=e}r.anisotropyStrength=t.anisotropy,r.anisotropyRotation=t.anisotropyRotation,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class IA{constructor(t){this.writer=t,this.name="KHR_materials_emissive_strength"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||1===t.emissiveIntensity)return;const i=this.writer.extensionsUsed,n={};n.emissiveStrength=t.emissiveIntensity,e.extensions=e.extensions||{},e.extensions[this.name]=n,i[this.name]=!0}}class MA{constructor(t){this.writer=t,this.name="EXT_materials_bump"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||1===t.bumpScale&&!t.bumpMap)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.bumpMap){const e={index:i.processTexture(t.bumpMap),texCoord:t.bumpMap.channel};i.applyTextureTransform(e,t.bumpMap),r.bumpTexture=e}r.bumpFactor=t.bumpScale,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class wA{constructor(t){this.writer=t,this.name="EXT_mesh_gpu_instancing"}writeNode(t,e){if(!t.isInstancedMesh)return;const i=this.writer,n=t,r=new Float32Array(3*n.count),s=new Float32Array(4*n.count),a=new Float32Array(3*n.count),o=new Ye,l=new _e,c=new ve,h=new _e;for(let t=0;tt.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-e)e){r.set(t.times.slice(0,l+1),0),r[l+1]=e,r.set(t.times.slice(l+1),l+2),s.set(t.values.slice(0,(l+1)*n),0),s.set(a.evaluate(e),(l+1)*n),s.set(t.values.slice((l+1)*n),(l+2)*n),o=l+1;break}}return t.times=r,t.values=s,o},mergeMorphTargetTracks:function(t,e){const i=[],n={},r=t.tracks;for(let t=0;tvoid 0!==t.material&&t.userData&&t.userData.variantMaterials&&!!Array.from(t.userData.variantMaterials.values()).filter((t=>TA(t.material))),TA=t=>t&&t.isMaterial&&!Array.isArray(t);class BA{constructor(t){this.writer=t,this.name="KHR_materials_variants",this.variantNames=[]}beforeParse(t){const e=new Set;for(const i of t)i.traverse((t=>{if(!bA(t))return;const i=t.userData.variantMaterials,n=t.userData.variantData;for(const[t,r]of n){const n=i.get(r.index);n&&TA(n.material)&&e.add(t)}}));e.forEach((t=>this.variantNames.push(t)))}writeMesh(t,e){if(!bA(t))return;const i=t.userData,n=i.variantMaterials,r=i.variantData,s=new Map,a=new Map,o=Array.from(r.values()).sort(((t,e)=>t.index-e.index));for(const[t,e]of o.entries())a.set(e.index,t);for(const t of r.values()){const e=n.get(t.index);if(!e||!TA(e.material))continue;const i=this.writer.processMaterial(e.material);s.has(i)||s.set(i,{material:i,variants:[]}),s.get(i).variants.push(a.get(t.index))}const l=Array.from(s.values()).map((t=>t.variants.sort(((t,e)=>t-e))&&t)).sort(((t,e)=>t.material-e.material));if(0===l.length)return;const c=TA(i.originalMaterial)?this.writer.processMaterial(i.originalMaterial):-1;for(const t of e.primitives)c>=0&&(t.material=c),t.extensions=t.extensions||{},t.extensions[this.name]={mappings:l}}afterParse(){if(0===this.variantNames.length)return;const t=this.writer.json;t.extensions=t.extensions||{};const e=this.variantNames.map((t=>({name:t})));t.extensions[this.name]={variants:e},this.writer.extensionsUsed[this.name]=!0}}class RA{constructor(t,e,i,n,r){this.xrLight=t,this.renderer=e,this.lightProbe=i,this.xrWebGLBinding=null,this.estimationStartCallback=r,this.frameCallback=this.onXRFrame.bind(this);const s=e.xr.getSession();if(n&&"XRWebGLBinding"in window){const i=new Nn(16);t.environment=i.texture;const n=e.getContext();switch(s.preferredReflectionFormat){case"srgba8":n.getExtension("EXT_sRGB");break;case"rgba16f":n.getExtension("OES_texture_half_float")}this.xrWebGLBinding=new XRWebGLBinding(s,n),this.lightProbe.addEventListener("reflectionchange",(()=>{this.updateReflection()}))}s.requestAnimationFrame(this.frameCallback)}updateReflection(){const t=this.renderer.properties.get(this.xrLight.environment);if(t){const e=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);e&&(t.__webglTexture=e,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(t,e){if(!this.xrLight)return;e.session.requestAnimationFrame(this.frameCallback);const i=e.getLightEstimate(this.lightProbe);if(i){this.xrLight.lightProbe.sh.fromArray(i.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const t=Math.max(1,Math.max(i.primaryLightIntensity.x,Math.max(i.primaryLightIntensity.y,i.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(i.primaryLightIntensity.x/t,i.primaryLightIntensity.y/t,i.primaryLightIntensity.z/t),this.xrLight.directionalLight.intensity=t,this.xrLight.directionalLight.position.copy(i.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class LA extends ya{constructor(t,e=!0){super(),this.lightProbe=new vl,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new gl,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let i=null,n=!1;t.xr.addEventListener("sessionstart",(()=>{const r=t.xr.getSession();"requestLightProbe"in r&&r.requestLightProbe({reflectionFormat:r.preferredReflectionFormat}).then((r=>{i=new RA(this,t,r,e,(()=>{n=!0,this.dispatchEvent({type:"estimationstart"})}))}))})),t.xr.addEventListener("sessionend",(()=>{i&&(i.dispose(),i=null),n&&this.dispatchEvent({type:"estimationend"})})),this.dispose=()=>{i&&(i.dispose(),i=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class DA{constructor(t=50){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(t)}setDecayTime(t){this.naturalFrequency=1/Math.max(.001,t)}update(t,e,i,n){const r=2e-4*this.naturalFrequency;if(null==t||0===n)return e;if(t===e&&0===this.velocity)return e;if(i<0)return t;const s=t-e,a=this.velocity+this.naturalFrequency*s,o=s+i*a,l=Math.exp(-this.naturalFrequency*i),c=(a-this.naturalFrequency*o)*l,h=-this.naturalFrequency*(c+a*l);return Math.abs(c)=0?(this.velocity=0,e):(this.velocity=c,e+o*l)}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const UA=.2,PA=Math.PI/24,NA=new Wt,FA=(t,e,i)=>{let n=e>0?i>0?0:-Math.PI/2:i>0?Math.PI/2:Math.PI;for(let r=0;r<=12;++r)t.push(e+.17*Math.cos(n),i+.17*Math.sin(n),0,e+UA*Math.cos(n),i+UA*Math.sin(n),0),n+=PA};class QA extends Sn{constructor(t,e){const i=new sn,n=[],r=[],{size:s,boundingBox:a}=t,o=s.x/2,l=("back"===e?s.y:s.z)/2;FA(r,o,l),FA(r,-o,l),FA(r,-o,-l),FA(r,o,-l);const h=r.length/3;for(let t=0;t0}dispose(){var t;const{geometry:e,material:i}=this.hitPlane;e.dispose(),i.dispose(),this.geometry.dispose(),this.material.dispose(),null===(t=this.parent)||void 0===t||t.remove(this)}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const OA=(t,e)=>({type:"number",number:t,unit:e}),kA=(()=>{const t={};return e=>{const i=e;if(i in t)return t[i];const n=[];let r=0;for(;e;){if(++r>1e3){e="";break}const t=GA(e),i=t.nodes[0];if(null==i||0===i.terms.length)break;n.push(i),e=t.remainingInput}return t[i]=n}})(),GA=(()=>{const t=/^(\-\-|[a-z\u0240-\uffff])/i,e=/^([\*\+\/]|[\-]\s)/i,i=/^[\),]/;return n=>{const r=[];for(;n.length&&(n=n.trim(),!i.test(n));)if("("===n[0]){const{nodes:t,remainingInput:e}=WA(n);n=e,r.push({type:"function",name:{type:"ident",value:"calc"},arguments:t})}else if(t.test(n)){const t=HA(n),e=t.nodes[0];if("("===(n=t.remainingInput)[0]){const{nodes:t,remainingInput:i}=WA(n);r.push({type:"function",name:e,arguments:t}),n=i}else r.push(e)}else if(e.test(n))r.push({type:"operator",value:n[0]}),n=n.slice(1);else{const{nodes:t,remainingInput:e}="#"===n[0]?VA(n):zA(n);if(0===t.length)break;r.push(t[0]),n=e}return{nodes:[{type:"expression",terms:r}],remainingInput:n}}})(),HA=(()=>{const t=/[^a-z0-9_\-\u0240-\uffff]/i;return e=>{const i=e.match(t);return{nodes:[{type:"ident",value:null==i?e:e.substr(0,i.index)}],remainingInput:null==i?"":e.substr(i.index)}}})(),zA=(()=>{const t=/[\+\-]?(\d+[\.]\d+|\d+|[\.]\d+)([eE][\+\-]?\d+)?/,e=/^[a-z%]+/i,i=/^(m|mm|cm|rad|deg|[%])$/;return n=>{const r=n.match(t),s=null==r?"0":r[0],a=(n=null==s?n:n.slice(s.length)).match(e);let o=null!=a&&""!==a[0]?a[0]:null;const l=null==a?n:n.slice(o.length);return null==o||i.test(o)||(o=null),{nodes:[{type:"number",number:parseFloat(s)||0,unit:o}],remainingInput:l}}})(),VA=(()=>{const t=/^[a-f0-9]*/i;return e=>{const i=(e=e.slice(1).trim()).match(t);return{nodes:null==i?[]:[{type:"hex",value:i[0]}],remainingInput:null==i?e:e.slice(i[0].length)}}})(),WA=t=>{const e=[];for(t=t.slice(1).trim();t.length;){const i=GA(t);if(e.push(i.nodes[0]),","===(t=i.remainingInput.trim())[0])t=t.slice(1).trim();else if(")"===t[0]){t=t.slice(1);break}}return{nodes:e,remainingInput:t}},qA=Symbol("visitedTypes");class XA{constructor(t){this[qA]=t}walk(t,e){const i=t.slice();for(;i.length;){const t=i.shift();switch(this[qA].indexOf(t.type)>-1&&e(t),t.type){case"expression":i.unshift(...t.terms);break;case"function":i.unshift(t.name,...t.arguments)}}}}const jA=Object.freeze({type:"number",number:0,unit:null}),YA=(t,e=0)=>{let{number:i,unit:n}=t;if(isFinite(i)){if("rad"===t.unit||null==t.unit)return t}else i=e,n="rad";return{type:"number",number:("deg"===n&&null!=i?i:0)*Math.PI/180,unit:"rad"}},KA=(t,e=0)=>{let i,{number:n,unit:r}=t;if(isFinite(n)){if("m"===t.unit)return t}else n=e,r="m";switch(r){default:i=1;break;case"cm":i=.01;break;case"mm":i=.001}return{type:"number",number:i*n,unit:"m"}},JA=(()=>{const t=t=>t,e={rad:t,deg:YA,m:t,mm:KA,cm:KA};return(t,i=jA)=>{isFinite(t.number)||(t.number=i.number,t.unit=i.unit);const{unit:n}=t;if(null==n)return t;const r=e[n];return null==r?i:r(t)}})(); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var $A,ZA,tp;const ep=Symbol("evaluate"),ip=Symbol("lastValue");class np{constructor(){this[$A]=null}static evaluatableFor(t,e=jA){if(t instanceof np)return t;if("number"===t.type)return"%"===t.unit?new ap(t,e):t;switch(t.name.value){case"calc":return new up(t,e);case"env":return new lp(t)}return jA}static evaluate(t){return t instanceof np?t.evaluate():t}static isConstant(t){return!(t instanceof np)||t.isConstant}static applyIntrinsics(t,e){const{basis:i,keywords:n}=e,{auto:r}=n;return i.map(((e,i)=>{const s=null==r[i]?e:r[i];let a=t[i]?t[i]:s;if("ident"===a.type){const t=a.value;t in n&&(a=n[t][i])}return null!=a&&"ident"!==a.type||(a=s),"%"===a.unit?OA(a.number/100*e.number,e.unit):(a=JA(a,e),a.unit!==e.unit?e:a)}))}get isConstant(){return!1}evaluate(){return this.isConstant&&null!=this[ip]||(this[ip]=this[ep]()),this[ip]}}$A=ip;const rp=Symbol("percentage"),sp=Symbol("basis");class ap extends np{constructor(t,e){super(),this[rp]=t,this[sp]=e}get isConstant(){return!0}[ep](){return OA(this[rp].number/100*this[sp].number,this[sp].unit)}}const op=Symbol("identNode");class lp extends np{constructor(t){super(),this[ZA]=null;const e=t.arguments.length?t.arguments[0].terms[0]:null;null!=e&&"ident"===e.type&&(this[op]=e)}get isConstant(){return!1}[(ZA=op,ep)](){if(null!=this[op]&&"window-scroll-y"===this[op].value){return{type:"number",number:window.pageYOffset/(Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight)||0,unit:null}}return jA}}const cp=/[\*\/]/,hp=Symbol("evaluator");class up extends np{constructor(t,e=jA){if(super(),this[tp]=null,1!==t.arguments.length)return;const i=t.arguments[0].terms.slice(),n=[];for(;i.length;){const t=i.shift();if(n.length>0){const i=n[n.length-1];if("operator"===i.type&&cp.test(i.value)){const i=n.pop(),r=n.pop();if(null==r)return;n.push(new mp(i,np.evaluatableFor(r,e),np.evaluatableFor(t,e)));continue}}n.push("operator"===t.type?t:np.evaluatableFor(t,e))}for(;n.length>2;){const[t,i,r]=n.splice(0,3);if("operator"!==i.type)return;n.unshift(new mp(i,np.evaluatableFor(t,e),np.evaluatableFor(r,e)))}1===n.length&&(this[hp]=n[0])}get isConstant(){return null==this[hp]||np.isConstant(this[hp])}[(tp=hp,ep)](){return null!=this[hp]?np.evaluate(this[hp]):jA}}const dp=Symbol("operator"),Ap=Symbol("left"),pp=Symbol("right");class mp extends np{constructor(t,e,i){super(),this[dp]=t,this[Ap]=e,this[pp]=i}get isConstant(){return np.isConstant(this[Ap])&&np.isConstant(this[pp])}[ep](){const t=JA(np.evaluate(this[Ap])),e=JA(np.evaluate(this[pp])),{number:i,unit:n}=t,{number:r,unit:s}=e;if(null!=s&&null!=n&&s!=n)return jA;const a=n||s;let o;switch(this[dp].value){case"+":o=i+r;break;case"-":o=i-r;break;case"/":o=i/r;break;case"*":o=i*r;break;default:return jA}return{type:"number",number:o,unit:a}}}const gp=Symbol("evaluatables"),fp=Symbol("intrinsics");class vp extends np{constructor(t,e){super(),this[fp]=e;const i=t[0],n=null!=i?i.terms:[];this[gp]=e.basis.map(((t,e)=>{const i=n[e];return null==i?{type:"ident",value:"auto"}:"ident"===i.type?i:np.evaluatableFor(i,t)}))}get isConstant(){for(const t of this[gp])if(!np.isConstant(t))return!1;return!0}[ep](){const t=this[gp].map((t=>np.evaluate(t)));return np.applyIntrinsics(t,this[fp]).map((t=>t.number))}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var _p,Ep,yp,xp;const Sp=Symbol("instances"),Cp=Symbol("activateListener"),Ip=Symbol("deactivateListener"),Mp=Symbol("notifyInstances"),wp=Symbol("notify"),bp=Symbol("callback");class Tp{constructor(t){this[bp]=t}static[Mp](){for(const t of Tp[Sp])t[wp]()}static[(_p=Sp,Cp)](){window.addEventListener("scroll",this[Mp],{passive:!0})}static[Ip](){window.removeEventListener("scroll",this[Mp])}observe(){0===Tp[Sp].size&&Tp[Cp](),Tp[Sp].add(this)}disconnect(){Tp[Sp].delete(this),0===Tp[Sp].size&&Tp[Ip]()}[wp](){this[bp]()}}Tp[_p]=new Set;const Bp=Symbol("computeStyleCallback"),Rp=Symbol("astWalker"),Lp=Symbol("dependencies"),Dp=Symbol("onScroll");class Up{constructor(t){this[Ep]={},this[yp]=new XA(["function"]),this[xp]=()=>{this[Bp]({relatedState:"window-scroll"})},this[Bp]=t}observeEffectsFor(t){const e={},i=this[Lp];this[Rp].walk(t,(t=>{const{name:n}=t,r=t.arguments[0].terms[0];if("env"===n.value&&null!=r&&"ident"===r.type&&"window-scroll-y"===r.value)if(null==e["window-scroll"]){const t="window-scroll"in i?i["window-scroll"]:new Tp(this[Dp]);t.observe(),delete i["window-scroll"],e["window-scroll"]=t}}));for(const t in i){i[t].disconnect()}this[Lp]=e}dispose(){for(const t in this[Lp]){this[Lp][t].disconnect()}}}Ep=Lp,yp=Rp,xp=Dp; -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Pp=t=>{const e=t.observeEffects||!1,i=t.intrinsics instanceof Function?t.intrinsics:()=>t.intrinsics;return(n,r)=>{const s=n.updated,a=n.connectedCallback,o=n.disconnectedCallback,l=Symbol(`${r}StyleEffector`),c=Symbol(`${r}StyleEvaluator`),h=Symbol(`${r}UpdateEvaluator`),u=Symbol(`${r}EvaluateAndSync`);Object.defineProperties(n,{[l]:{value:null,writable:!0},[c]:{value:null,writable:!0},[h]:{value:function(){const t=kA(this[r]);this[c]=new vp(t,i(this)),null==this[l]&&e&&(this[l]=new Up((()=>this[u]()))),null!=this[l]&&this[l].observeEffectsFor(t)}},[u]:{value:function(){if(null==this[c])return;const e=this[c].evaluate();this[t.updateHandler](e)}},updated:{value:function(t){t.has(r)&&(this[h](),this[u]()),s.call(this,t)}},connectedCallback:{value:function(){a.call(this),this.requestUpdate(r,this[r])}},disconnectedCallback:{value:function(){o.call(this),null!=this[l]&&(this[l].dispose(),this[l]=null)}}})}},Np=t=>t<.5?2*t*t:(4-2*t)*t-1,Fp=(t,e,i=Np)=>n=>t+(e-t)*i(n),Qp=t=>{const e=[],i=[];let n=t.initialValue;for(let r=0;r{const i=e.map((n=0,t=>n+=t));var n;return e=>{e=_h(e,0,1),e*=i[i.length-1];const n=i.findIndex((t=>t>=e)),r=n<1?0:i[n-1],s=i[n];return t[n]((e-r)/(s-r))}})(e,i)}; -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Op=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const kp=Qp({initialValue:0,keyframes:[{frames:5,value:-1},{frames:1,value:-1},{frames:8,value:1},{frames:1,value:1},{frames:5,value:0},{frames:18,value:0}]}),Gp=Qp({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),Hp="0deg 75deg 105%",zp=["front","right","back","left"],Vp=["upper-","","lower-"],Wp="auto",qp="basic",Xp="wiggle",jp="none",Yp=()=>({basis:[YA(OA(30,"deg"))],keywords:{auto:[null]}}),Kp=()=>({basis:[YA(OA(12,"deg"))],keywords:{auto:[null]}}),Jp=(()=>{const t=kA(Hp)[0].terms,e=JA(t[0]),i=JA(t[1]);return t=>{const n=t[T_].idealCameraDistance();return{basis:[e,i,OA(n,"m")],keywords:{auto:[null,null,OA(105,"%")]}}}})(),$p=t=>{const e=2.2*t[T_].boundingSphere.radius;return{basis:[OA(-1/0,"rad"),OA(Math.PI/8,"rad"),OA(e,"m")],keywords:{auto:[null,null,null]}}},Zp=t=>{const e=Jp(t),i=new vp([],e).evaluate()[2];return{basis:[OA(1/0,"rad"),OA(Math.PI-Math.PI/8,"rad"),OA(i,"m")],keywords:{auto:[null,null,null]}}},tm=t=>{const e=t[T_].boundingBox.getCenter(new _e);return{basis:[OA(e.x,"m"),OA(e.y,"m"),OA(e.z,"m")],keywords:{auto:[null,null,null]}}},em=Math.PI/2,im=Math.PI/3,nm=em/2,rm=2*Math.PI,sm=Symbol("controls"),am=Symbol("panElement"),om=Symbol("promptElement"),lm=Symbol("promptAnimatedContainer"),cm=Symbol("fingerAnimatedContainers"),hm=Symbol("deferInteractionPrompt"),um=Symbol("updateAria"),dm=Symbol("updateCameraForRadius"),Am=Symbol("cancelPrompts"),pm=Symbol("onChange"),mm=Symbol("onPointerChange"),gm=Symbol("waitingToPromptUser"),fm=Symbol("userHasInteracted"),vm=Symbol("promptElementVisibleTime"),_m=Symbol("lastPromptOffset"),Em=Symbol("cancellationSource"),ym=Symbol("lastSpherical"),xm=Symbol("jumpCamera"),Sm=Symbol("initialized"),Cm=Symbol("maintainThetaPhi"),Im=Symbol("syncCameraOrbit"),Mm=Symbol("syncFieldOfView"),wm=Symbol("syncCameraTarget"),bm=Symbol("syncMinCameraOrbit"),Tm=Symbol("syncMaxCameraOrbit"),Bm=Symbol("syncMinFieldOfView"),Rm=Symbol("syncMaxFieldOfView"),Lm=new Wt,Dm=new _e,Um=Object.freeze({minimumRadius:0,maximumRadius:1/0,minimumPolarAngle:Math.PI/8,maximumPolarAngle:Math.PI-Math.PI/8,minimumAzimuthalAngle:-1/0,maximumAzimuthalAngle:1/0,minimumFieldOfView:10,maximumFieldOfView:45,touchAction:"none"}),Pm=Math.PI/8,Nm=.04,Fm={USER_INTERACTION:"user-interaction",NONE:"none",AUTOMATIC:"automatic"};class Qm extends Rt{constructor(t,e,i){super(),this.camera=t,this.element=e,this.scene=i,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.inputSensitivity=1,this.changeSource=Fm.NONE,this._interactionEnabled=!1,this._disableZoom=!1,this.isUserPointing=!1,this.enablePan=!0,this.enableTap=!0,this.panProjection=new qt,this.panPerPixel=0,this.spherical=new Pl,this.goalSpherical=new Pl,this.thetaDamper=new DA,this.phiDamper=new DA,this.radiusDamper=new DA,this.logFov=Math.log(Um.maximumFieldOfView),this.goalLogFov=this.logFov,this.fovDamper=new DA,this.touchMode=null,this.pointers=[],this.startTime=0,this.startPointerPosition={clientX:0,clientY:0},this.lastSeparation=0,this.touchDecided=!1,this.onContext=t=>{if(this.enablePan)t.preventDefault();else for(const t of this.pointers)this.onPointerUp(new PointerEvent("pointercancel",Object.assign(Object.assign({},this.startPointerPosition),{pointerId:t.id})))},this.touchModeZoom=(t,e)=>{if(!this._disableZoom){const t=this.twoTouchDistance(this.pointers[0],this.pointers[1]),e=Nm*this.zoomSensitivity*(this.lastSeparation-t)*50/this.scene.height;this.lastSeparation=t,this.userAdjustOrbit(0,0,e)}this.panPerPixel>0&&this.movePan(t,e)},this.disableScroll=t=>{t.preventDefault()},this.touchModeRotate=(t,e)=>{const{touchAction:i}=this._options;if(!this.touchDecided&&"none"!==i){this.touchDecided=!0;const n=Math.abs(t),r=Math.abs(e);if(this.changeSource===Fm.USER_INTERACTION&&("pan-y"===i&&r>n||"pan-x"===i&&n>r))return void(this.touchMode=null);this.element.addEventListener("touchmove",this.disableScroll,{passive:!1})}this.handleSinglePointerMove(t,e)},this.onPointerDown=t=>{if(this.pointers.length>2)return;const{element:e}=this;0===this.pointers.length&&(e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),this.touchMode=null,this.touchDecided=!1,this.startPointerPosition.clientX=t.clientX,this.startPointerPosition.clientY=t.clientY,this.startTime=performance.now());try{e.setPointerCapture(t.pointerId)}catch(t){}this.pointers.push({clientX:t.clientX,clientY:t.clientY,id:t.pointerId}),this.isUserPointing=!1,"touch"===t.pointerType?(this.changeSource=t.altKey?Fm.AUTOMATIC:Fm.USER_INTERACTION,this.onTouchChange(t)):(this.changeSource=Fm.USER_INTERACTION,this.onMouseDown(t)),this.changeSource===Fm.USER_INTERACTION&&this.dispatchEvent({type:"user-interaction"})},this.onPointerMove=t=>{const e=this.pointers.find((e=>e.id===t.pointerId));if(null==e)return;if("mouse"===t.pointerType&&0===t.buttons)return void this.onPointerUp(t);const i=this.pointers.length,n=(t.clientX-e.clientX)/i,r=(t.clientY-e.clientY)/i;0===n&&0===r||(e.clientX=t.clientX,e.clientY=t.clientY,"touch"===t.pointerType?(this.changeSource=t.altKey?Fm.AUTOMATIC:Fm.USER_INTERACTION,null!==this.touchMode&&this.touchMode(n,r)):(this.changeSource=Fm.USER_INTERACTION,this.panPerPixel>0?this.movePan(n,r):this.handleSinglePointerMove(n,r)))},this.onPointerUp=t=>{const{element:e}=this,i=this.pointers.findIndex((e=>e.id===t.pointerId));-1!==i&&this.pointers.splice(i,1),this.panPerPixel>0&&!t.altKey&&this.resetRadius(),0===this.pointers.length?(e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("touchmove",this.disableScroll),this.enablePan&&this.enableTap&&this.recenter(t)):null!==this.touchMode&&this.onTouchChange(t),this.scene.element[am].style.opacity=0,e.style.cursor="grab",this.panPerPixel=0,this.isUserPointing&&this.dispatchEvent({type:"pointer-change-end"})},this.onWheel=t=>{this.changeSource=Fm.USER_INTERACTION;const e=t.deltaY*(1==t.deltaMode?18:1)*Nm*this.zoomSensitivity/30;this.userAdjustOrbit(0,0,e),t.preventDefault(),this.dispatchEvent({type:"user-interaction"})},this.onKeyDown=t=>{const{changeSource:e}=this;this.changeSource=Fm.USER_INTERACTION;(t.shiftKey&&this.enablePan?this.panKeyCodeHandler(t):this.orbitZoomKeyCodeHandler(t))?(t.preventDefault(),this.dispatchEvent({type:"user-interaction"})):this.changeSource=e},this._options=Object.assign({},Um),this.setOrbit(0,Math.PI/2,1),this.setFieldOfView(100),this.jumpToGoal()}get interactionEnabled(){return this._interactionEnabled}enableInteraction(){if(!1===this._interactionEnabled){const{element:t}=this;t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointercancel",this.onPointerUp),this._disableZoom||t.addEventListener("wheel",this.onWheel),t.addEventListener("keydown",this.onKeyDown),t.addEventListener("touchmove",(()=>{}),{passive:!1}),t.addEventListener("contextmenu",this.onContext),this.element.style.cursor="grab",this._interactionEnabled=!0,this.updateTouchActionStyle()}}disableInteraction(){if(!0===this._interactionEnabled){const{element:t}=this;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("contextmenu",this.onContext),t.style.cursor="",this.touchMode=null,this._interactionEnabled=!1,this.updateTouchActionStyle()}}get options(){return this._options}set disableZoom(t){this._disableZoom!=t&&(this._disableZoom=t,!0===t?this.element.removeEventListener("wheel",this.onWheel):this.element.addEventListener("wheel",this.onWheel),this.updateTouchActionStyle())}getCameraSpherical(t=new Pl){return t.copy(this.spherical)}getFieldOfView(){return this.camera.fov}applyOptions(t){Object.assign(this._options,t),this.setOrbit(),this.setFieldOfView(Math.exp(this.goalLogFov))}updateNearFar(t,e){this.camera.far=0===e?2:e,this.camera.near=Math.max(t,this.camera.far/1e3),this.camera.updateProjectionMatrix()}updateAspect(t){this.camera.aspect=t,this.camera.updateProjectionMatrix()}setOrbit(t=this.goalSpherical.theta,e=this.goalSpherical.phi,i=this.goalSpherical.radius){const{minimumAzimuthalAngle:n,maximumAzimuthalAngle:r,minimumPolarAngle:s,maximumPolarAngle:a,minimumRadius:o,maximumRadius:l}=this._options,{theta:c,phi:h,radius:u}=this.goalSpherical,d=_h(t,n,r);isFinite(n)||isFinite(r)||(this.spherical.theta=this.wrapAngle(this.spherical.theta-d)+d);const A=_h(e,s,a),p=_h(i,o,l);return(d!==c||A!==h||p!==u)&&(!!(isFinite(d)&&isFinite(A)&&isFinite(p))&&(this.goalSpherical.theta=d,this.goalSpherical.phi=A,this.goalSpherical.radius=p,this.goalSpherical.makeSafe(),!0))}setRadius(t){this.goalSpherical.radius=t,this.setOrbit()}setFieldOfView(t){const{minimumFieldOfView:e,maximumFieldOfView:i}=this._options;t=_h(t,e,i),this.goalLogFov=Math.log(t)}setDamperDecayTime(t){this.thetaDamper.setDecayTime(t),this.phiDamper.setDecayTime(t),this.radiusDamper.setDecayTime(t),this.fovDamper.setDecayTime(t)}adjustOrbit(t,e,i){const{theta:n,phi:r,radius:s}=this.goalSpherical,{minimumRadius:a,maximumRadius:o,minimumFieldOfView:l,maximumFieldOfView:c}=this._options,h=this.spherical.theta-n,u=Math.PI-.001,d=n-_h(t,-u-h,u-h),A=r-e,p=0===i?0:((i>0?o:a)-s)/(Math.log(i>0?c:l)-this.goalLogFov),m=s+i*(isFinite(p)?p:2*(o-a));if(this.setOrbit(d,A,m),0!==i){const t=this.goalLogFov+i;this.setFieldOfView(Math.exp(t))}}jumpToGoal(){this.update(0,1e4)}update(t,e){if(this.isStationary())return!1;const{maximumPolarAngle:i,maximumRadius:n}=this._options,r=this.spherical.theta-this.goalSpherical.theta;return Math.abs(r)>Math.PI&&!isFinite(this._options.minimumAzimuthalAngle)&&!isFinite(this._options.maximumAzimuthalAngle)&&(this.spherical.theta-=2*Math.sign(r)*Math.PI),this.spherical.theta=this.thetaDamper.update(this.spherical.theta,this.goalSpherical.theta,e,Math.PI),this.spherical.phi=this.phiDamper.update(this.spherical.phi,this.goalSpherical.phi,e,i),this.spherical.radius=this.radiusDamper.update(this.spherical.radius,this.goalSpherical.radius,e,n),this.logFov=this.fovDamper.update(this.logFov,this.goalLogFov,e,1),this.moveCamera(),!0}updateTouchActionStyle(){const{style:t}=this.element;if(this._interactionEnabled){const{touchAction:e}=this._options;this._disableZoom&&"none"!==e?t.touchAction="manipulation":t.touchAction=e}else t.touchAction=""}isStationary(){return this.goalSpherical.theta===this.spherical.theta&&this.goalSpherical.phi===this.spherical.phi&&this.goalSpherical.radius===this.spherical.radius&&this.goalLogFov===this.logFov}moveCamera(){this.spherical.makeSafe(),this.camera.position.setFromSpherical(this.spherical),this.camera.setRotationFromEuler(new si(this.spherical.phi-Math.PI/2,this.spherical.theta,0,"YXZ")),this.camera.fov!==Math.exp(this.logFov)&&(this.camera.fov=Math.exp(this.logFov),this.camera.updateProjectionMatrix())}userAdjustOrbit(t,e,i){this.adjustOrbit(t*this.orbitSensitivity*this.inputSensitivity,e*this.orbitSensitivity*this.inputSensitivity,i*this.inputSensitivity)}wrapAngle(t){const e=(t+Math.PI)/(2*Math.PI);return 2*(e-Math.floor(e))*Math.PI-Math.PI}pixelLengthToSphericalAngle(t){return 2*Math.PI*t/this.scene.height}twoTouchDistance(t,e){const{clientX:i,clientY:n}=t,{clientX:r,clientY:s}=e,a=r-i,o=s-n;return Math.sqrt(a*a+o*o)}handleSinglePointerMove(t,e){const i=this.pixelLengthToSphericalAngle(t),n=this.pixelLengthToSphericalAngle(e);!1===this.isUserPointing&&(this.isUserPointing=!0,this.dispatchEvent({type:"pointer-change-start"})),this.userAdjustOrbit(i,n,0)}initializePan(){const{theta:t,phi:e}=this.spherical,i=t-this.scene.yaw;this.panPerPixel=.018*this.panSensitivity/this.scene.height,this.panProjection.set(-Math.cos(i),-Math.cos(e)*Math.sin(i),0,0,Math.sin(e),0,Math.sin(i),-Math.cos(e)*Math.cos(i),0)}movePan(t,e){const{scene:i}=this,n=Dm.set(t,e,0).multiplyScalar(this.inputSensitivity),r=this.spherical.radius*Math.exp(this.logFov)*this.panPerPixel;n.multiplyScalar(r);const s=i.getTarget();s.add(n.applyMatrix3(this.panProjection)),i.boundingSphere.clampPoint(s,s),i.setTarget(s.x,s.y,s.z)}recenter(t){if(performance.now()>this.startTime+300||Math.abs(t.clientX-this.startPointerPosition.clientX)>2||Math.abs(t.clientY-this.startPointerPosition.clientY)>2)return;const{scene:e}=this,i=e.positionAndNormalFromPoint(e.getNDC(t.clientX,t.clientY));if(null==i){const{cameraTarget:t}=e.element;e.element.cameraTarget="",e.element.cameraTarget=t,this.userAdjustOrbit(0,0,1)}else e.target.worldToLocal(i.position),e.setTarget(i.position.x,i.position.y,i.position.z)}resetRadius(){const{scene:t}=this,e=t.positionAndNormalFromPoint(Lm.set(0,0));if(null==e)return;t.target.worldToLocal(e.position);const i=t.getTarget(),{theta:n,phi:r}=this.spherical,s=n-t.yaw,a=Dm.set(Math.sin(r)*Math.sin(s),Math.cos(r),Math.sin(r)*Math.cos(s)),o=a.dot(e.position.sub(i));i.add(a.multiplyScalar(o)),t.setTarget(i.x,i.y,i.z),this.setOrbit(void 0,void 0,this.goalSpherical.radius-o)}onTouchChange(t){if(1===this.pointers.length)this.touchMode=this.touchModeRotate;else{if(this._disableZoom)return this.touchMode=null,void this.element.removeEventListener("touchmove",this.disableScroll);this.touchMode=this.touchDecided&&null===this.touchMode?null:this.touchModeZoom,this.touchDecided=!0,this.element.addEventListener("touchmove",this.disableScroll,{passive:!1}),this.lastSeparation=this.twoTouchDistance(this.pointers[0],this.pointers[1]),this.enablePan&&null!=this.touchMode&&(this.initializePan(),t.altKey||(this.scene.element[am].style.opacity=1))}}onMouseDown(t){this.panPerPixel=0,this.enablePan&&(2===t.button||t.ctrlKey||t.metaKey||t.shiftKey)&&(this.initializePan(),this.scene.element[am].style.opacity=1),this.element.style.cursor="grabbing"}orbitZoomKeyCodeHandler(t){let e=!0;switch(t.key){case"PageUp":this.userAdjustOrbit(0,0,Nm*this.zoomSensitivity);break;case"PageDown":this.userAdjustOrbit(0,0,-.04*this.zoomSensitivity);break;case"ArrowUp":this.userAdjustOrbit(0,-Pm,0);break;case"ArrowDown":this.userAdjustOrbit(0,Pm,0);break;case"ArrowLeft":this.userAdjustOrbit(-Pm,0,0);break;case"ArrowRight":this.userAdjustOrbit(Pm,0,0);break;default:e=!1}return e}panKeyCodeHandler(t){this.initializePan();let e=!0;switch(t.key){case"ArrowUp":this.movePan(0,-10);break;case"ArrowDown":this.movePan(0,10);break;case"ArrowLeft":this.movePan(-10,0);break;case"ArrowRight":this.movePan(10,0);break;default:e=!1}return e}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Om="not-presenting",km="session-started",Gm="object-placed",Hm="failed",zm="tracking",Vm="not-tracking",Wm=new _e,qm=new Ye,Xm=new _e,jm=new Ln(45,1,.1,100);class Ym extends Rt{constructor(t){super(),this.renderer=t,this.currentSession=null,this.placeOnWall=!1,this.placementBox=null,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.initialHitSource=null,this.transientHitTestSource=null,this.inputSource=null,this._presentedScene=null,this.resolveCleanup=null,this.exitWebXRButtonContainer=null,this.overlay=null,this.xrLight=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new _e,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastDragPosition=new _e,this.firstRatio=0,this.lastAngle=0,this.goalPosition=new _e,this.goalYaw=0,this.goalScale=1,this.xDamper=new DA,this.yDamper=new DA,this.zDamper=new DA,this.yawDamper=new DA,this.scaleDamper=new DA,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onUpdateScene=()=>{null!=this.placementBox&&this.isPresenting&&(this.placementBox.dispose(),this.placementBox=new QA(this.presentedScene,this.placeOnWall?"back":"bottom"))},this.onSelectStart=t=>{const e=this.transientHitTestSource;if(null==e)return;const i=this.frame.getHitTestResultsForTransientInput(e),n=this.presentedScene,r=this.placementBox;if(1===i.length){this.inputSource=t.inputSource;const{axes:e}=this.inputSource.gamepad,i=r.getHit(this.presentedScene,e[0],e[1]);r.show=!0,null!=i?(this.isTranslating=!0,this.lastDragPosition.copy(i)):!1===this.placeOnWall&&(this.isRotating=!0,this.lastAngle=1.5*e[0])}else if(2===i.length){r.show=!0,this.isTwoFingering=!0;const{separation:t}=this.fingerPolar(i);this.firstRatio=t/n.scale.x}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.inputSource=null,this.goalPosition.y+=this.placementBox.offsetHeight*this.presentedScene.scale.x,this.placementBox.show=!1},this.threeRenderer=t.threeRenderer,this.threeRenderer.xr.enabled=!0}async resolveARSession(){gh();const t=await navigator.xr.requestSession("immersive-ar",{requiredFeatures:["hit-test"],optionalFeatures:["dom-overlay","light-estimation"],domOverlay:this.overlay?{root:this.overlay}:void 0});return this.threeRenderer.xr.setReferenceSpaceType("local"),await this.threeRenderer.xr.setSession(t),this.threeRenderer.xr.cameraAutoUpdate=!1,t}get presentedScene(){return this._presentedScene}async supportsPresentation(){try{return gh(),await navigator.xr.isSessionSupported("immersive-ar")}catch(t){return console.warn("Request to present in WebXR denied:"),console.warn(t),console.warn("Falling back to next ar-mode"),!1}}async present(t,e=!1){this.isPresenting&&console.warn("Cannot present while a model is already presenting");let i=new Promise(((t,e)=>{requestAnimationFrame((()=>t()))}));t.setHotspotsVisibility(!1),t.queueRender(),await i,this._presentedScene=t,this.overlay=t.element.shadowRoot.querySelector("div.default"),!0===e&&(this.xrLight=new LA(this.threeRenderer),this.xrLight.addEventListener("estimationstart",(()=>{if(!this.isPresenting||null==this.xrLight)return;const t=this.presentedScene;t.add(this.xrLight),t.environment=this.xrLight.environment})));const n=await this.resolveARSession();n.addEventListener("end",(()=>{this.postSessionCleanup()}),{once:!0});const r=t.element.shadowRoot.querySelector(".slot.exit-webxr-ar-button");r.classList.add("enabled"),r.addEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=r;const s=await n.requestReferenceSpace("viewer");this.tracking=!0,this.frames=0,this.initialized=!1,this.turntableRotation=t.yaw,this.goalYaw=t.yaw,this.goalScale=1,t.setBackground(null),this.oldShadowIntensity=t.shadowIntensity,t.setShadowIntensity(.01),this.oldTarget.copy(t.getTarget()),t.element.addEventListener("load",this.onUpdateScene);const a=20*Math.PI/180,o=!0===this.placeOnWall?void 0:new XRRay(new DOMPoint(0,0,0),{x:0,y:-Math.sin(a),z:-Math.cos(a)});n.requestHitTestSource({space:s,offsetRay:o}).then((t=>{this.initialHitSource=t})),this.currentSession=n,this.placementBox=new QA(t,this.placeOnWall?"back":"bottom"),this.placementComplete=!1,this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:km})}async stopPresenting(){if(!this.isPresenting)return;const t=new Promise((t=>{this.resolveCleanup=t}));try{await this.currentSession.end(),await t}catch(t){console.warn("Error while trying to end WebXR AR session"),console.warn(t),this.postSessionCleanup()}}get isPresenting(){return null!=this.presentedScene}get target(){return this.oldTarget}updateTarget(){const t=this.presentedScene;if(null!=t){const e=t.getTarget();this.oldTarget.copy(e),this.placeOnWall?e.z=t.boundingBox.min.z:e.y=t.boundingBox.min.y,t.setTarget(e.x,e.y,e.z)}}postSessionCleanup(){const t=this.currentSession;null!=t&&(t.removeEventListener("selectstart",this.onSelectStart),t.removeEventListener("selectend",this.onSelectEnd),this.currentSession=null);const e=this.presentedScene;if(this._presentedScene=null,null!=e){const{element:t}=e;null!=this.xrLight&&(e.remove(this.xrLight),this.xrLight.dispose(),this.xrLight=null),e.position.set(0,0,0),e.scale.set(1,1,1),e.setShadowOffset(0);const i=this.turntableRotation;null!=i&&(e.yaw=i);const n=this.oldShadowIntensity;null!=n&&e.setShadowIntensity(n),e.setEnvironmentAndSkybox(t[Sh],t[Ch]);const r=this.oldTarget;e.setTarget(r.x,r.y,r.z),e.xrCamera=null,e.element.removeEventListener("load",this.onUpdateScene),e.orientHotspots(0),t.requestUpdate("cameraTarget"),t.requestUpdate("maxCameraOrbit"),t[D_](t.getBoundingClientRect()),requestAnimationFrame((()=>{e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:Fm.NONE}}))}))}this.renderer.height=0;const i=this.exitWebXRButtonContainer;null!=i&&(i.classList.remove("enabled"),i.removeEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=null);const n=this.transientHitTestSource;null!=n&&(n.cancel(),this.transientHitTestSource=null);const r=this.initialHitSource;null!=r&&(r.cancel(),this.initialHitSource=null),null!=this.placementBox&&(this.placementBox.dispose(),this.placementBox=null),this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,null!=this.resolveCleanup&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:Om})}updateView(t){const e=this.presentedScene,i=this.threeRenderer.xr;i.updateCamera(jm),e.xrCamera=i.getCamera();const{elements:n}=e.getCamera().matrixWorld;if(e.orientHotspots(Math.atan2(n[1],n[5])),this.initialized||(this.placeInitially(),this.initialized=!0),t.requestViewportScale&&t.recommendedViewportScale){const e=t.recommendedViewportScale;t.requestViewportScale(Math.max(e,.25))}const r=i.getBaseLayer();if(null!=r){const e=r instanceof XRWebGLLayer?r.getViewport(t):i.getBinding().getViewSubImage(r,t).viewport;this.threeRenderer.setViewport(e.x,e.y,e.width,e.height)}}placeInitially(){const t=this.presentedScene,{position:e,element:i}=t,n=t.getCamera(),{width:r,height:s}=this.overlay.getBoundingClientRect();t.setSize(r,s),n.projectionMatrixInverse.copy(n.projectionMatrix).invert();const{theta:a,radius:o}=i.getCameraOrbit(),l=n.getWorldDirection(Wm);t.yaw=Math.atan2(-l.x,-l.z)-a,this.goalYaw=t.yaw,e.copy(n.position).add(l.multiplyScalar(o)),this.updateTarget();const c=t.getTarget();e.add(c).sub(this.oldTarget),this.goalPosition.copy(e),t.setHotspotsVisibility(!0);const{session:h}=this.frame;h.addEventListener("selectstart",this.onSelectStart),h.addEventListener("selectend",this.onSelectEnd),h.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then((t=>{this.transientHitTestSource=t}))}getTouchLocation(){const{axes:t}=this.inputSource.gamepad;let e=this.placementBox.getExpandedHit(this.presentedScene,t[0],t[1]);return null!=e&&(Wm.copy(e).sub(this.presentedScene.getCamera().position),Wm.length()>10)?null:e}getHitPoint(t){const e=this.threeRenderer.xr.getReferenceSpace(),i=t.getPose(e);if(null==i)return null;const n=qm.fromArray(i.transform.matrix);return!0===this.placeOnWall&&(this.goalYaw=Math.atan2(n.elements[4],n.elements[6])),n.elements[5]>.75!==this.placeOnWall?Xm.setFromMatrixPosition(n):null}moveToFloor(t){const e=this.initialHitSource;if(null==e)return;const i=t.getHitTestResults(e);if(0==i.length)return;const n=i[0],r=this.getHitPoint(n);null!=r&&(this.placementBox.show=!0,this.isTranslating||(this.placeOnWall?this.goalPosition.copy(r):this.goalPosition.y=r.y),e.cancel(),this.initialHitSource=null,this.dispatchEvent({type:"status",status:Gm}))}fingerPolar(t){const e=t[0].inputSource.gamepad.axes,i=t[1].inputSource.gamepad.axes,n=i[0]-e[0],r=i[1]-e[1],s=Math.atan2(r,n);let a=this.lastAngle-s;return a>Math.PI?a-=2*Math.PI:a<-Math.PI&&(a+=2*Math.PI),this.lastAngle=s,{separation:Math.sqrt(n*n+r*r),deltaYaw:a}}processInput(t){const e=this.transientHitTestSource;if(null==e)return;if(!this.isTranslating&&!this.isTwoFingering&&!this.isRotating)return;const i=t.getHitTestResultsForTransientInput(e),n=this.presentedScene,r=n.scale.x;if(this.isTwoFingering)if(i.length<2)this.isTwoFingering=!1;else{const{separation:t,deltaYaw:e}=this.fingerPolar(i);if(!1===this.placeOnWall&&(this.goalYaw+=e),n.canScale){const e=t/this.firstRatio;this.goalScale=e<1.3&&e>.7692307692307692?1:e}}else if(2!==i.length)if(this.isRotating){const t=1.5*this.inputSource.gamepad.axes[0];this.goalYaw+=t-this.lastAngle,this.lastAngle=t}else this.isTranslating&&i.forEach((t=>{if(t.inputSource!==this.inputSource)return;let e=null;if(t.results.length>0&&(e=this.getHitPoint(t.results[0])),null==e&&(e=this.getTouchLocation()),null!=e){if(this.goalPosition.sub(this.lastDragPosition),!1===this.placeOnWall){const t=e.y-this.lastDragPosition.y;if(t<0){this.placementBox.offsetHeight=t/r,this.presentedScene.setShadowOffset(t);const i=Wm.copy(n.getCamera().position),s=-t/(i.y-e.y);i.multiplyScalar(s),e.multiplyScalar(1-s).add(i)}}this.goalPosition.add(e),this.lastDragPosition.copy(e)}}));else{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!0;const{separation:t}=this.fingerPolar(i);this.firstRatio=t/r}}moveScene(t){const e=this.presentedScene,{position:i,yaw:n}=e,r=e.boundingSphere.radius,s=this.goalPosition,a=e.scale.x,o=this.placementBox;let l=Fm.NONE;if(!s.equals(i)||this.goalScale!==a){l=Fm.USER_INTERACTION;let{x:n,y:c,z:h}=i;n=this.xDamper.update(n,s.x,t,r),c=this.yDamper.update(c,s.y,t,r),h=this.zDamper.update(h,s.z,t,r),i.set(n,c,h);const u=this.scaleDamper.update(a,this.goalScale,t,1);if(e.scale.set(u,u,u),!this.isTranslating){const t=s.y-c;this.placementComplete&&!1===this.placeOnWall?(o.offsetHeight=t/u,e.setShadowOffset(t)):0===t&&(this.placementComplete=!0,o.show=!1,e.setShadowIntensity(.8))}}o.updateOpacity(t),e.updateTarget(t),e.yaw=this.yawDamper.update(n,this.goalYaw,t,Math.PI),e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:l}}))}onWebXRFrame(t,e){this.frame=e,++this.frames;const i=this.threeRenderer.xr.getReferenceSpace(),n=e.getViewerPose(i);null==n&&!0===this.tracking&&this.frames>30&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:Vm}));const r=this.presentedScene;if(null==n||null==r||!r.element.loaded)return void this.threeRenderer.clear();!1===this.tracking&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:zm}));let s=!0;for(const i of n.views){if(this.updateView(i),s){this.moveToFloor(e),this.processInput(e);const i=t-this.lastTick;this.moveScene(i),this.renderer.preRender(r,t,i),this.lastTick=t,r.renderShadow(this.threeRenderer)}this.threeRenderer.render(r,r.getCamera()),s=!1}}}function Km(t){const e=new Map,i=new Map,n=t.clone();return Jm(t,n,(function(t,n){e.set(n,t),i.set(t,n)})),n.traverse((function(t){if(!t.isSkinnedMesh)return;const n=t,r=e.get(t),s=r.skeleton.bones;n.skeleton=r.skeleton.clone(),n.bindMatrix.copy(r.bindMatrix),n.skeleton.bones=s.map((function(t){return i.get(t)})),n.bind(n.skeleton,n.bindMatrix)})),n}function Jm(t,e,i){i(t,e);for(let n=0;n{t.traverse((t=>{const e=t;if(!e.material)return;(Array.isArray(e.material)?e.material:[e.material]).forEach((t=>{for(const e in t){const i=t[e];if(i instanceof de){const t=i.source.data;null!=t.close&&t.close(),i.dispose()}}t.dispose()})),e.geometry.dispose()}))}))}[eg](){const t=this[tg],e=Km(this.scene);ng(e,this.scene);const i=[e],n=t.userData?Object.assign({},t.userData):{};return Object.assign(Object.assign({},t),{scene:e,scenes:i,userData:n})}}const ng=(t,e)=>{rg(t,e,((t,e)=>{void 0!==e.userData.variantMaterials&&(t.userData.variantMaterials=new Map(e.userData.variantMaterials)),void 0!==e.userData.variantData&&(t.userData.variantData=e.userData.variantData),void 0!==e.userData.originalMaterial&&(t.userData.originalMaterial=e.userData.originalMaterial)}))},rg=(t,e,i)=>{i(t,e);for(let n=0;n{const n=e.threeObjectMap.get(t);if(null!=n)for(const t in n)if(null!=t&&"primitives"!==t){const e=t,o=n[e],l=r[e][o],c=s.get(i)||{};c[e]=o,s.set(i,c);const h=a.get(l)||new Set;h.add(i),a.set(l,h)}}));return new dg(t,r,s,a)}static[cg](t,e,i){const n=(t,e)=>{if(i(t,e),t.isObject3D){const r=t,s=e;if(r.material)if(Array.isArray(r.material))for(let t=0;t{t.renderOrder=1e3,t.frustumCulled=!1,t.name||(t.name=t.uuid);const i=t;if(i.material){const{geometry:t}=i;i.castShadow=!0,i.isSkinnedMesh&&(t.boundingSphere=n,t.boundingBox=null);const r=i.material;if(!0===r.isMeshBasicMaterial&&(r.toneMapped=!1),r.shadowSide=o,r.aoMap){const{gltf:i,threeObjectMap:n}=e[Ag],s=n.get(r);if(null!=i.materials&&null!=s&&null!=s.materials){const e=i.materials[s.materials];e.occlusionTexture&&0===e.occlusionTexture.texCoord&&null!=t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv)}}}})),e}get correlatedSceneGraph(){return this[tg][Ag]}[eg](){const t=super[eg](),e=new Map;return t.scene.traverse((t=>{const i=t;if(i.material){const t=i.material;if(null!=t){if(e.has(t.uuid))return void(i.material=e.get(t.uuid));i.material=t.clone(),e.set(t.uuid,i.material)}}const n=t;void 0!==n.target&&n.add(n.target)})),t[Ag]=dg.from(t,this.correlatedSceneGraph),t}}const mg=(t,e,i)=>{let n;switch(t){case N:n=new Uint8ClampedArray(e*i*4);break;case G:n=new Uint16Array(e*i*4);break;case O:n=new Uint32Array(e*i*4);break;case 1010:n=new Int8Array(e*i*4);break;case 1011:n=new Int16Array(e*i*4);break;case Q:n=new Int32Array(e*i*4);break;case k:n=new Float32Array(e*i*4);break;default:throw new Error("Unsupported data type")}return n};let gg;class fg{constructor(t){var e,i,n,r,s,a,o,l,c,h,u,d,A,p,m,g;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(t){throw this._renderer.setRenderTarget(null),t}this._renderer.setRenderTarget(null)},this._width=t.width,this._height=t.height,this._type=t.type,this._colorSpace=t.colorSpace;const f={format:z,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:void 0!==(null===(e=t.renderTargetOptions)||void 0===e?void 0:e.anisotropy)?null===(i=t.renderTargetOptions)||void 0===i?void 0:i.anisotropy:1,generateMipmaps:void 0!==(null===(n=t.renderTargetOptions)||void 0===n?void 0:n.generateMipmaps)&&(null===(r=t.renderTargetOptions)||void 0===r?void 0:r.generateMipmaps),magFilter:void 0!==(null===(s=t.renderTargetOptions)||void 0===s?void 0:s.magFilter)?null===(a=t.renderTargetOptions)||void 0===a?void 0:a.magFilter:D,minFilter:void 0!==(null===(o=t.renderTargetOptions)||void 0===o?void 0:o.minFilter)?null===(l=t.renderTargetOptions)||void 0===l?void 0:l.minFilter:D,samples:void 0!==(null===(c=t.renderTargetOptions)||void 0===c?void 0:c.samples)?null===(h=t.renderTargetOptions)||void 0===h?void 0:h.samples:void 0,wrapS:void 0!==(null===(u=t.renderTargetOptions)||void 0===u?void 0:u.wrapS)?null===(d=t.renderTargetOptions)||void 0===d?void 0:d.wrapS:b,wrapT:void 0!==(null===(A=t.renderTargetOptions)||void 0===A?void 0:A.wrapT)?null===(p=t.renderTargetOptions)||void 0===p?void 0:p.wrapT:b};if(this._material=t.material,t.renderer?this._renderer=t.renderer:(this._renderer=fg.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new ba,this._camera=new nr,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!((t,e,i,n)=>{if(void 0!==gg)return gg;const r=new me(1,1,n);e.setRenderTarget(r);const s=new Sn(new qn,new Gi({color:16777215}));e.render(s,i),e.setRenderTarget(null);const a=mg(t,r.width,r.height);return e.readRenderTargetPixels(r,0,0,r.width,r.height,a),r.dispose(),s.geometry.dispose(),s.material.dispose(),gg=0!==a[0],gg})(this._type,this._renderer,this._camera,f)){let t;if(this._type===G)t=this._renderer.extensions.has("EXT_color_buffer_float")?k:void 0;void 0!==t?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to 1015`),this._type=t):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new Sn(new qn,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new me(this.width,this.height,f),this._renderTarget.texture.mapping=void 0!==(null===(m=t.renderTargetOptions)||void 0===m?void 0:m.mapping)?null===(g=t.renderTargetOptions)||void 0===g?void 0:g.mapping:x}static instantiateRenderer(){const t=new wa;return t.setSize(128,128),t}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const t=mg(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,t),t}toDataTexture(t){const e=new za(this.toArray(),this.width,this.height,z,this._type,(null==t?void 0:t.mapping)||x,(null==t?void 0:t.wrapS)||b,(null==t?void 0:t.wrapT)||b,(null==t?void 0:t.magFilter)||D,(null==t?void 0:t.minFilter)||D,(null==t?void 0:t.anisotropy)||1,vt);return e.generateMipmaps=void 0!==(null==t?void 0:t.generateMipmaps)&&(null==t?void 0:t.generateMipmaps),e}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(t){this.disposeOnDemandRenderer(),t&&this.renderTarget.dispose(),this.material instanceof Bn&&Object.values(this.material.uniforms).forEach((t=>{t.value instanceof de&&t.value.dispose()})),Object.values(this.material).forEach((t=>{t instanceof de&&t.dispose()})),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(t){this._width=t,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(t){this._height=t,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(t){this._renderTarget=t,this._width=t.width,this._height=t.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}class vg extends Bn{constructor({gamma:t,offsetHdr:e,offsetSdr:i,gainMapMin:n,gainMapMax:r,maxDisplayBoost:s,hdrCapacityMin:a,hdrCapacityMax:o,sdr:l,gainMap:c}){super({name:"GainMapDecoderMaterial",vertexShader:"\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",fragmentShader:"\n// min half float value\n#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )\n// max half float value\n#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )\n\nuniform sampler2D sdr;\nuniform sampler2D gainMap;\nuniform vec3 gamma;\nuniform vec3 offsetHdr;\nuniform vec3 offsetSdr;\nuniform vec3 gainMapMin;\nuniform vec3 gainMapMax;\nuniform float weightFactor;\n\nvarying vec2 vUv;\n\nvoid main() {\n vec3 rgb = texture2D( sdr, vUv ).rgb;\n vec3 recovery = texture2D( gainMap, vUv ).rgb;\n vec3 logRecovery = pow( recovery, gamma );\n vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;\n vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;\n vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));\n gl_FragColor = vec4( clampedHdrColor , 1.0 );\n}\n",uniforms:{sdr:{value:l},gainMap:{value:c},gamma:{value:new _e(1/t[0],1/t[1],1/t[2])},offsetHdr:{value:(new _e).fromArray(e)},offsetSdr:{value:(new _e).fromArray(i)},gainMapMin:{value:(new _e).fromArray(n)},gainMapMax:{value:(new _e).fromArray(r)},weightFactor:{value:(Math.log2(s)-a)/(o-a)}},blending:0,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=s,this._hdrCapacityMin=a,this._hdrCapacityMax=o,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(t){this.uniforms.sdr.value=t}get gainMap(){return this.uniforms.gainMap.value}set gainMap(t){this.uniforms.gainMap.value=t}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(t){this.uniforms.offsetHdr.value.fromArray(t)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(t){this.uniforms.offsetSdr.value.fromArray(t)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(t){this.uniforms.gainMapMin.value.fromArray(t)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(t){this.uniforms.gainMapMax.value.fromArray(t)}get gamma(){const t=this.uniforms.gamma.value;return[1/t.x,1/t.y,1/t.z]}set gamma(t){const e=this.uniforms.gamma.value;e.x=1/t[0],e.y=1/t[1],e.z=1/t[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(t){this._hdrCapacityMin=t,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(t){this._hdrCapacityMax=t,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(t){this._maxDisplayBoost=Math.max(1,Math.min(65504,t)),this.calculateWeight()}calculateWeight(){const t=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,t))}}class _g extends Error{}class Eg extends Error{}const yg=(t,e,i)=>{var n;let r;const s=null===(n=t.attributes.getNamedItem(e))||void 0===n?void 0:n.nodeValue;if(s)r=s;else{const n=t.getElementsByTagName(e)[0];if(!n){if(i)return i;throw new Error(`Can't find ${e} in gainmap metadata`)}{const t=n.getElementsByTagName("rdf:li");if(3!==t.length)throw new Error(`Gainmap metadata contains an array of items for ${e} but its length is not 3`);r=Array.from(t).map((t=>t.innerHTML))}}return r};class xg{constructor(t){this.options={debug:!(!t||void 0===t.debug)&&t.debug,extractFII:!t||void 0===t.extractFII||t.extractFII,extractNonFII:!t||void 0===t.extractNonFII||t.extractNonFII}}extract(t){return new Promise(((e,i)=>{const n=this.options.debug,r=new DataView(t.buffer);if(65496!==r.getUint16(0))return void i(new Error("Not a valid jpeg"));const s=r.byteLength;let a,o=2,l=0;for(;o250)return void i(new Error(`Found no marker after ${l} loops 😵`));if(255!==r.getUint8(o))return void i(new Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${r.getUint8(o).toString(16)}`));if(a=r.getUint8(o+1),n&&console.log(`Marker: ${a.toString(16)}`),226===a){n&&console.log("Found APP2 marker (0xffe2)");const t=o+4;if(1297106432===r.getUint32(t)){const n=t+4;let s;if(18761===r.getUint16(n))s=!1;else{if(19789!==r.getUint16(n))return void i(new Error("No valid endianness marker found in TIFF header"));s=!0}if(42!==r.getUint16(n+2,!s))return void i(new Error("Not valid TIFF data! (no 0x002A marker)"));const a=r.getUint32(n+4,!s);if(a<8)return void i(new Error("Not valid TIFF data! (First offset less than 8)"));const o=n+a,l=r.getUint16(o,!s),c=o+2;let h=0;for(let t=c;t{const e=(t=>{var e,i;let n;n="undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):t.toString();let r=n.indexOf("",r);n.slice(r,t+10);const a=n.slice(r,t+10);try{const t=s.parseFromString(a,"text/xml").getElementsByTagName("rdf:Description")[0],n=yg(t,"hdrgm:GainMapMin","0"),r=yg(t,"hdrgm:GainMapMax"),o=yg(t,"hdrgm:Gamma","1"),l=yg(t,"hdrgm:OffsetSDR","0.015625"),c=yg(t,"hdrgm:OffsetHDR","0.015625");let h=null===(e=t.attributes.getNamedItem("hdrgm:HDRCapacityMin"))||void 0===e?void 0:e.nodeValue;h||(h="0");const u=null===(i=t.attributes.getNamedItem("hdrgm:HDRCapacityMax"))||void 0===i?void 0:i.nodeValue;if(!u)throw new Error("Incomplete gainmap metadata");return{gainMapMin:Array.isArray(n)?n.map((t=>parseFloat(t))):[parseFloat(n),parseFloat(n),parseFloat(n)],gainMapMax:Array.isArray(r)?r.map((t=>parseFloat(t))):[parseFloat(r),parseFloat(r),parseFloat(r)],gamma:Array.isArray(o)?o.map((t=>parseFloat(t))):[parseFloat(o),parseFloat(o),parseFloat(o)],offsetSdr:Array.isArray(l)?l.map((t=>parseFloat(t))):[parseFloat(l),parseFloat(l),parseFloat(l)],offsetHdr:Array.isArray(c)?c.map((t=>parseFloat(t))):[parseFloat(c),parseFloat(c),parseFloat(c)],hdrCapacityMin:parseFloat(h),hdrCapacityMax:parseFloat(u)}}catch(t){}r=n.indexOf("new Promise(((e,i)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=t=>{i(t)},n.src=URL.createObjectURL(t)}));class Ig extends Ko{constructor(t,e){super(e),this._renderer=t,this._internalLoadingManager=new jo}setRenderTargetOptions(t){return this._renderTargetOptions=t,this}prepareQuadRenderer(){const t=new vg({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new de,sdr:new de});return new fg({width:16,height:16,type:G,colorSpace:vt,material:t,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(t,e,i,n){const r=n?new Blob([n],{type:"image/jpeg"}):void 0,s=new Blob([i],{type:"image/jpeg"});let a,o,l=!1;if("undefined"==typeof createImageBitmap){const t=await Promise.all([r?Cg(r):Promise.resolve(void 0),Cg(s)]);o=t[0],a=t[1],l=!0}else{const t=await Promise.all([r?createImageBitmap(r,{imageOrientation:"flipY"}):Promise.resolve(void 0),createImageBitmap(s,{imageOrientation:"flipY"})]);o=t[0],a=t[1]}const c=new de(o||new ImageData(2,2),x,b,b,D,1008,z,N,1,vt);c.flipY=l,c.needsUpdate=!0;const h=new de(a,x,b,b,D,1008,z,N,1,ft);h.flipY=l,h.needsUpdate=!0,t.width=a.width,t.height=a.height,t.material.gainMap=c,t.material.sdr=h,t.material.gainMapMin=e.gainMapMin,t.material.gainMapMax=e.gainMapMax,t.material.offsetHdr=e.offsetHdr,t.material.offsetSdr=e.offsetSdr,t.material.gamma=e.gamma,t.material.hdrCapacityMin=e.hdrCapacityMin,t.material.hdrCapacityMax=e.hdrCapacityMax,t.material.maxDisplayBoost=Math.pow(2,e.hdrCapacityMax),t.material.needsUpdate=!0,t.render()}}class Mg extends Ig{load(t,e,i,n){const r=this.prepareQuadRenderer(),s=new Zo(this._internalLoadingManager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(this.withCredentials),this.manager.itemStart(t),s.load(t,(async i=>{if("string"==typeof i)throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const s=new Uint8Array(i);let a,o,l;try{const t=await Sg(s);a=t.sdr,o=t.gainMap,l=t.metadata}catch(e){if(!(e instanceof Eg||e instanceof _g))throw e;console.warn(`Failure to reconstruct an HDR image from ${t}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),l={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},a=s}try{await this.render(r,l,a,o)}catch(e){return this.manager.itemError(t),"function"==typeof n&&n(e),void r.disposeOnDemandRenderer()}"function"==typeof e&&e(r),this.manager.itemEnd(t),r.disposeOnDemandRenderer()}),i,(e=>{this.manager.itemError(t),"function"==typeof n&&n(e)})),r}}class wg extends el{constructor(t){super(t),this.type=G}parse(t){const e=function(t,e){switch(t){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(e||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(e||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(e||""));default:throw new Error("THREE.RGBELoader: Memory Error: "+(e||""))}},i=function(t,e,i){e=e||1024;let n=t.pos,r=-1,s=0,a="",o=String.fromCharCode.apply(null,new Uint16Array(t.subarray(n,n+128)));for(;0>(r=o.indexOf("\n"))&&s=t.byteLength||!(l=i(t)))&&e(1,"no header found"),(c=l.match(/^#\?(\S+)/))||e(3,"bad initial token"),o.valid|=1,o.programtype=c[1],o.string+=l+"\n";l=i(t),!1!==l;)if(o.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(n))&&(o.gamma=parseFloat(c[1])),(c=l.match(r))&&(o.exposure=parseFloat(c[1])),(c=l.match(s))&&(o.valid|=2,o.format=c[1]),(c=l.match(a))&&(o.valid|=4,o.height=parseInt(c[1],10),o.width=parseInt(c[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=l+"\n";return 2&o.valid||e(3,"missing format specifier"),4&o.valid||e(3,"missing image size specifier"),o}(s),o=a.width,l=a.height,c=function(t,i,n){const r=i;if(r<8||r>32767||2!==t[0]||2!==t[1]||128&t[2])return new Uint8Array(t);r!==(t[2]<<8|t[3])&&e(3,"wrong scanline width");const s=new Uint8Array(4*i*n);s.length||e(4,"unable to allocate buffer space");let a=0,o=0;const l=4*r,c=new Uint8Array(4),h=new Uint8Array(l);let u=n;for(;u>0&&ot.byteLength&&e(1),c[0]=t[o++],c[1]=t[o++],c[2]=t[o++],c[3]=t[o++],2==c[0]&&2==c[1]&&(c[2]<<8|c[3])==r||e(3,"bad rgbe scanline format");let i,n=0;for(;n128;if(r&&(i-=128),(0===i||n+i>l)&&e(3,"bad scanline data"),r){const e=t[o++];for(let t=0;tthis.ldrLoader.load(t,e,(()=>{}),i)));return e.name=t,e.flipY=!1,e}async loadLottie(t,e){const i=await this.getLottieLoader();i.setQuality(e);const n=await new Promise(((e,n)=>i.load(t,e,(()=>{}),n)));return n.name=t,n}async loadEquirect(t,e=(()=>{})){try{const i=Lg.test(t),n=i?this.hdrLoader:this.imageLoader,r=await new Promise(((i,r)=>n.load(t,(t=>{const{renderTarget:e}=t;if(null!=e){const{texture:n}=e;t.dispose(!1),i(n)}else i(t)}),(t=>{e(t.loaded/t.total*.9)}),r)));return e(1),r.name=t,r.mapping=I,i||(r.colorSpace=ft),r}finally{e&&e(1)}}async generateEnvironmentMapAndSkybox(t=null,e=null,i=(()=>{})){const n="legacy"!==e;"legacy"!==e&&"neutral"!==e||(e=null),e=mh(e);let r,s=Promise.resolve(null);t&&(s=this.loadEquirectFromUrl(t,i)),r=e?this.loadEquirectFromUrl(e,i):t?this.loadEquirectFromUrl(t,i):n?this.loadGeneratedEnvironmentMapAlt():this.loadGeneratedEnvironmentMap();const[a,o]=await Promise.all([r,s]);if(null==a)throw new Error("Failed to load environment map.");return{environmentMap:a,skybox:o}}async loadEquirectFromUrl(t,e){if(!this.skyboxCache.has(t)){const i=this.loadEquirect(t,e);this.skyboxCache.set(t,i)}return this.skyboxCache.get(t)}async GenerateEnvironmentMap(t,e){await((t=0)=>new Promise((e=>setTimeout(e,t))))();const i=this.threeRenderer,n=new Nn(256,{generateMipmaps:!1,type:G,format:z,colorSpace:vt,depthBuffer:!0}),r=new Un(.1,100,n),s=r.renderTarget.texture;s.name=e;const a=i.outputColorSpace,o=i.toneMapping;return i.toneMapping=p,i.outputColorSpace=vt,r.update(i,t),this.blurCubemap(n,.04),i.toneMapping=o,i.outputColorSpace=a,s}async loadGeneratedEnvironmentMap(){return null==this.generatedEnvironmentMap&&(this.generatedEnvironmentMap=this.GenerateEnvironmentMap(new Bg("legacy"),"legacy")),this.generatedEnvironmentMap}async loadGeneratedEnvironmentMapAlt(){return null==this.generatedEnvironmentMapAlt&&(this.generatedEnvironmentMapAlt=this.GenerateEnvironmentMap(new Bg("neutral"),"neutral")),this.generatedEnvironmentMapAlt}blurCubemap(t,e){if(null==this.blurMaterial){this.blurMaterial=this.getBlurShader(Rg);const t=new In,e=new Sn(t,this.blurMaterial);this.blurScene=new ba,this.blurScene.add(e)}const i=t.clone();this.halfblur(t,i,e,"latitudinal"),this.halfblur(i,t,e,"longitudinal")}halfblur(t,e,i,n){const r=t.width,s=isFinite(i)?Math.PI/(2*r):2*Math.PI/39,a=i/s,o=isFinite(i)?1+Math.floor(3*a):Rg;o>Rg&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${o} samples when the maximum is set to 20`);const l=[];let c=0;for(let t=0;t= samples ) {\n \n break;\n \n }\n \n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n \n }\n }\n ",blending:0,depthTest:!1,depthWrite:!1,side:l})}async dispose(){for(const[,t]of this.skyboxCache){(await t).dispose()}null!=this.generatedEnvironmentMap&&((await this.generatedEnvironmentMap).dispose(),this.generatedEnvironmentMap=null),null!=this.generatedEnvironmentMapAlt&&((await this.generatedEnvironmentMapAlt).dispose(),this.generatedEnvironmentMapAlt=null),null!=this.blurMaterial&&this.blurMaterial.dispose()}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Ug=[1,.79,.62,.5,.4,.31,.25],Pg="high-performance";class Ng extends Rt{constructor(t){super(),this.loader=new Ed(pg),this.width=0,this.height=0,this.dpr=1,this.scenes=new Set,this.multipleScenesVisible=!1,this.lastTick=performance.now(),this.renderedLastFrame=!1,this.scaleStep=0,this.lastStep=3,this.avgFrameDuration=50,this.onWebGLContextLost=t=>{this.dispatchEvent({type:"contextlost",sourceEvent:t})},this.onWebGLContextRestored=()=>{var t;null===(t=this.textureUtils)||void 0===t||t.dispose(),this.textureUtils=new Dg(this.threeRenderer);for(const t of this.scenes)t.element[Ih]()},this.dpr=Eh(),this.canvas3D=document.createElement("canvas"),this.canvas3D.id="webgl-canvas",this.canvas3D.classList.add("show"),Xn.tonemapping_pars_fragment=Xn.tonemapping_pars_fragment.replace("vec3 CustomToneMapping( vec3 color ) { return color; }","\n float startCompression = 0.8 - 0.04;\n float desaturation = 0.15;\n vec3 CustomToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n\n float x = min(color.r, min(color.g, color.b));\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n\n float peak = max(color.r, max(color.g, color.b));\n if (peak < startCompression) return color;\n\n float d = 1. - startCompression;\n float newPeak = 1. - d * d / (peak + d - startCompression);\n color *= newPeak / peak;\n\n float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);\n return mix(color, vec3(1, 1, 1), g);\n }");try{this.threeRenderer=new wa({canvas:this.canvas3D,alpha:!0,antialias:!0,powerPreference:t.powerPreference,preserveDrawingBuffer:!0}),this.threeRenderer.autoClear=!0,this.threeRenderer.setPixelRatio(1),this.threeRenderer.debug={checkShaderErrors:!!t.debug,onShaderError:null},this.threeRenderer.toneMapping=v}catch(t){console.warn(t)}this.arRenderer=new Ym(this),this.textureUtils=this.canRender?new Dg(this.threeRenderer):null,Ed.initializeKTX2Loader(this.threeRenderer),this.canvas3D.addEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.addEventListener("webglcontextrestored",this.onWebGLContextRestored),this.updateRendererSize()}static get singleton(){return this._singleton}static resetSingleton(){const t=this._singleton.dispose();for(const e of t)e.disconnectedCallback();this._singleton=new Ng({powerPreference:(self.ModelViewerElement||{}).powerPreference||Pg,debug:yh()});for(const e of t)e.connectedCallback()}get canRender(){return null!=this.threeRenderer}get scaleFactor(){return Ug[this.scaleStep]}set minScale(t){let e=1;for(;e0&&this.threeRenderer.setAnimationLoop(((t,e)=>this.render(t,e)))}unregisterScene(t){this.scenes.delete(t),this.canvas3D.parentElement===t.canvas.parentElement&&t.canvas.parentElement.removeChild(this.canvas3D),this.canRender&&0===this.scenes.size&&this.threeRenderer.setAnimationLoop(null)}displayCanvas(t){return this.multipleScenesVisible?t.element[b_]:this.canvas3D}countVisibleScenes(){const{canvas3D:t}=this;let e=0,i=null;for(const n of this.scenes){const{element:r}=n;r.modelIsVisible&&null==n.externalRenderer&&++e,t.parentElement===n.canvas.parentElement&&(i=n)}const n=e>1;if(null!=i){const e=n&&!this.multipleScenesVisible,r=!i.element.modelIsVisible;if(e||r){const{width:e,height:n}=this.sceneSize(i);this.copyPixels(i,e,n),t.parentElement.removeChild(t)}}this.multipleScenesVisible=n}updateRendererSize(){var t;const e=Eh();if(e!==this.dpr)for(const t of this.scenes){const{element:e}=t;e[m_](e.getBoundingClientRect())}let i=0,n=0;for(const t of this.scenes)i=Math.max(i,t.width),n=Math.max(n,t.height);if(i!==this.width||n!==this.height||e!==this.dpr){this.width=i,this.height=n,this.dpr=e,i=Math.ceil(i*e),n=Math.ceil(n*e),this.canRender&&this.threeRenderer.setSize(i,n,!1);for(const e of this.scenes){const{canvas:r}=e;r.width=i,r.height=n,e.forceRescale(),null===(t=e.effectRenderer)||void 0===t||t.setSize(i,n)}}}updateRendererScale(t){const e=this.scaleStep;this.avgFrameDuration+=_h(.2*(t-this.avgFrameDuration),-5,5),this.avgFrameDuration>60?++this.scaleStep:this.avgFrameDuration<40&&this.scaleStep>0&&--this.scaleStep,this.scaleStep=Math.min(this.scaleStep,this.lastStep),e!==this.scaleStep&&(this.avgFrameDuration=50)}shouldRender(t){if(t.shouldRender())t.scaleStep!=this.scaleStep&&(t.scaleStep=this.scaleStep,this.rescaleCanvas(t));else{if(0==t.scaleStep)return!1;t.scaleStep=0,this.rescaleCanvas(t)}return!0}rescaleCanvas(t){const e=Ug[t.scaleStep],i=Math.ceil(this.width/e),n=Math.ceil(this.height/e),{style:r}=t.canvas;r.width=`${i}px`,r.height=`${n}px`,this.canvas3D.style.width=`${i}px`,this.canvas3D.style.height=`${n}px`;const s=this.dpr*e,a=e<1?"GPU throttling":this.dpr!==window.devicePixelRatio?"No meta viewport tag":"";t.element.dispatchEvent(new CustomEvent("render-scale",{detail:{reportedDpr:window.devicePixelRatio,renderedDpr:s,minimumDpr:this.dpr*Ug[this.lastStep],pixelWidth:Math.ceil(t.width*s),pixelHeight:Math.ceil(t.height*s),reason:a}}))}sceneSize(t){const{dpr:e}=this,i=Ug[t.scaleStep];return{width:Math.min(Math.ceil(t.width*i*e),this.canvas3D.width),height:Math.min(Math.ceil(t.height*i*e),this.canvas3D.height)}}copyPixels(t,e,i){const n=t.context;null!=n?(n.clearRect(0,0,e,i),n.drawImage(this.canvas3D,0,0,e,i,0,0,e,i),t.canvas.classList.add("show")):console.log("could not acquire 2d context")}orderedScenes(){const t=[];for(const e of[!1,!0])for(const i of this.scenes)i.element.modelIsVisible===e&&t.push(i);return t}get isPresenting(){return this.arRenderer.isPresenting}preRender(t,e,i){const{element:n,exposure:r,toneMapping:s}=t;n[R_](e,i);const a="number"==typeof r&&!Number.isNaN(r),o=n.environmentImage,l=n.skyboxImage,c=s===_&&("neutral"===o||"legacy"===o||!o&&!l);this.threeRenderer.toneMappingExposure=(a?r:1)*(c?1.3:1)}render(t,e){if(null!=e)return void this.arRenderer.onWebXRFrame(t,e);const i=t-this.lastTick;if(this.lastTick=t,!this.canRender||this.isPresenting)return;this.countVisibleScenes(),this.updateRendererSize(),this.renderedLastFrame&&(this.updateRendererScale(i),this.renderedLastFrame=!1);const{canvas3D:n}=this;for(const e of this.orderedScenes()){const{element:r}=e;if(!r.loaded||!r.modelIsVisible&&e.renderCount>0)continue;if(this.preRender(e,t,i),!this.shouldRender(e))continue;if(null!=e.externalRenderer){const t=e.getCamera();t.updateMatrix();const{matrix:i,projectionMatrix:n}=t,r=i.elements.slice(),s=e.getTarget();r[12]+=s.x,r[13]+=s.y,r[14]+=s.z,e.externalRenderer.render({viewMatrix:r,projectionMatrix:n.elements});continue}if(!r.modelIsVisible&&!this.multipleScenesVisible)for(const t of this.scenes)t.element.modelIsVisible&&t.queueRender();const{width:s,height:a}=this.sceneSize(e);e.renderShadow(this.threeRenderer),this.threeRenderer.setRenderTarget(null),this.threeRenderer.setViewport(0,Math.ceil(this.height*this.dpr)-a,s,a),null!=e.effectRenderer?e.effectRenderer.render(i):(this.threeRenderer.autoClear=!0,this.threeRenderer.toneMapping=e.toneMapping,this.threeRenderer.render(e,e.camera)),this.multipleScenesVisible||!e.element.modelIsVisible&&0===e.renderCount?this.copyPixels(e,s,a):n.parentElement!==e.canvas.parentElement&&(e.canvas.parentElement.appendChild(n),e.canvas.classList.remove("show")),e.hasRendered(),++e.renderCount,this.renderedLastFrame=!0}}dispose(){null!=this.textureUtils&&this.textureUtils.dispose(),null!=this.threeRenderer&&this.threeRenderer.dispose(),this.textureUtils=null,this.threeRenderer=null;const t=[];for(const e of this.scenes)t.push(e.element);return this.canvas3D.removeEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.removeEventListener("webglcontextrestored",this.onWebGLContextRestored),t}}Ng._singleton=new Ng({powerPreference:(self.ModelViewerElement||{}).powerPreference||Pg,debug:yh()}); -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Fg=Symbol("correlatedObjects"),Qg=Symbol("onUpdate");class Og{constructor(t,e=null){this[Qg]=t,this[Fg]=e}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const kg=new Gi,Gg=new qn(2,2);let Hg=0;const zg=Symbol("threeTexture"),Vg=Symbol("threeTextures");class Wg extends Og{get[zg](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get[Vg](){return this[Fg]}constructor(t,e){super(t,new Set(e?[e]:[])),this[zg].image.src||(this[zg].image.src=e.name?e.name:"adhoc_image"+Hg++),this[zg].image.name||(this[zg].image.name=e&&e.image&&e.image.src?e.image.src.split("/").pop():"adhoc_image")}get name(){return this[zg].image.name||""}get uri(){return this[zg].image.src}get bufferView(){return this[zg].image.bufferView}get element(){const t=this[zg];if(t&&(t.isCanvasTexture||t.isVideoTexture))return t.image}get animation(){const t=this[zg];if(t&&t.isCanvasTexture&&t.animation)return t.animation}get type(){return null!=this.uri?"external":"embedded"}set name(t){for(const e of this[Vg])e.image.name=t}update(){const t=this[zg];t&&t.isCanvasTexture&&!t.animation&&(this[zg].needsUpdate=!0,this[Qg]())}async createThumbnail(t,e){const i=new ba;kg.map=this[zg];const n=new Sn(Gg,kg);i.add(n);const r=new nr(-1,1,1,-1,0,1),{threeRenderer:s}=Ng.singleton,a=new me(t,e);s.setRenderTarget(a),s.render(i,r),s.setRenderTarget(null);const o=new Uint8Array(t*e*4);s.readRenderTargetPixels(a,0,0,t,e,o),s_.width=t,s_.height=e;const l=s_.getContext("2d"),c=l.createImageData(t,e);return c.data.set(o),l.putImageData(c,0,0),new Promise((async(t,e)=>{s_.toBlob((i=>{if(!i)return e("Failed to capture thumbnail.");t(URL.createObjectURL(i))}),"image/png")}))}}var qg,Xg;!function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.NearestMipmapNearest=9984]="NearestMipmapNearest",t[t.LinearMipmapNearest=9985]="LinearMipmapNearest",t[t.NearestMipmapLinear=9986]="NearestMipmapLinear",t[t.LinearMipmapLinear=9987]="LinearMipmapLinear"}(qg||(qg={})),function(t){t[t.ClampToEdge=33071]="ClampToEdge",t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.Repeat=10497]="Repeat"}(Xg||(Xg={})); -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const jg=new Map([[Xg.Repeat,w],[Xg.ClampToEdge,b],[Xg.MirroredRepeat,T]]),Yg=new Map([[w,Xg.Repeat],[b,Xg.ClampToEdge],[T,Xg.MirroredRepeat]]),Kg=new Map([[qg.Nearest,B],[qg.Linear,D],[qg.NearestMipmapNearest,R],[qg.LinearMipmapNearest,U],[qg.NearestMipmapLinear,L],[qg.LinearMipmapLinear,P]]),Jg=new Map([[B,qg.Nearest],[D,qg.Linear],[R,qg.NearestMipmapNearest],[U,qg.LinearMipmapNearest],[L,qg.NearestMipmapLinear],[P,qg.LinearMipmapLinear]]),$g=new Map([[qg.Nearest,B],[qg.Linear,D]]),Zg=new Map([[B,qg.Nearest],[D,qg.Linear]]),tf=t=>Jg.has(t),ef=t=>Zg.has(t),nf=t=>Yg.has(t),rf=Symbol("threeTexture"),sf=Symbol("threeTextures"),af=Symbol("setProperty");class of extends Og{get[rf](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get[sf](){return this[Fg]}constructor(t,e){super(t,new Set(e?[e]:[]))}get name(){return this[rf].name||""}get minFilter(){return Jg.get(this[rf].minFilter)}get magFilter(){return Zg.get(this[rf].magFilter)}get wrapS(){return Yg.get(this[rf].wrapS)}get wrapT(){return Yg.get(this[rf].wrapT)}get rotation(){return this[rf].rotation}get scale(){return k_(this[rf].repeat)}get offset(){return k_(this[rf].offset)}setMinFilter(t){this[af]("minFilter",Kg.get(t))}setMagFilter(t){this[af]("magFilter",$g.get(t))}setWrapS(t){this[af]("wrapS",jg.get(t))}setWrapT(t){this[af]("wrapT",jg.get(t))}setRotation(t){null==t&&(t=0),this[af]("rotation",t)}setScale(t){null==t&&(t={u:1,v:1}),this[af]("repeat",new Wt(t.u,t.v))}setOffset(t){null==t&&(t={u:0,v:0}),this[af]("offset",new Wt(t.u,t.v))}[af](t,e){if(((t,e)=>{switch(t){case"minFilter":return tf(e);case"magFilter":return ef(e);case"wrapS":case"wrapT":return nf(e);case"rotation":case"repeat":case"offset":return!0;default:throw new Error(`Cannot configure property "${t}" on Sampler`)}})(t,e))for(const i of this[sf])i[t]=e,i.needsUpdate=!0;this[Qg]()}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const lf=Symbol("image"),cf=Symbol("sampler"),hf=Symbol("threeTexture");class uf extends Og{constructor(t,e){super(t,new Set(e?[e]:[])),this[cf]=new of(t,e),this[lf]=new Wg(t,e)}get[hf](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get name(){return this[hf].name||""}set name(t){for(const e of this[Fg])e.name=t}get sampler(){return this[cf]}get source(){return this[lf]}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var df,Af,pf;const mf=Symbol("texture"),gf=Symbol("transform"),ff=Symbol("materials"),vf=Symbol("usage"),_f=Symbol("onUpdate"),Ef=Symbol("activeVideo");var yf;!function(t){t[t.Base=0]="Base",t[t.MetallicRoughness=1]="MetallicRoughness",t[t.Normal=2]="Normal",t[t.Occlusion=3]="Occlusion",t[t.Emissive=4]="Emissive",t[t.Clearcoat=5]="Clearcoat",t[t.ClearcoatRoughness=6]="ClearcoatRoughness",t[t.ClearcoatNormal=7]="ClearcoatNormal",t[t.SheenColor=8]="SheenColor",t[t.SheenRoughness=9]="SheenRoughness",t[t.Transmission=10]="Transmission",t[t.Thickness=11]="Thickness",t[t.Specular=12]="Specular",t[t.SpecularColor=13]="SpecularColor",t[t.Iridescence=14]="Iridescence",t[t.IridescenceThickness=15]="IridescenceThickness",t[t.Anisotropy=16]="Anisotropy"}(yf||(yf={}));class xf{constructor(t,e,i,n){this[df]=null,this[Af]={rotation:0,scale:new Wt(1,1),offset:new Wt(0,0)},this[pf]=!1,i&&(this[gf].rotation=i.rotation,this[gf].scale.copy(i.repeat),this[gf].offset.copy(i.offset),this[mf]=new uf(t,i)),this[_f]=t,this[ff]=n,this[vf]=e}get texture(){return this[mf]}setTexture(t){var e,i;const n=null!=t?t.source[zg]:null,r=null===(e=this[mf])||void 0===e?void 0:e.source[zg];if(null!=r&&r.isVideoTexture?this[Ef]=!1:(null===(i=this[mf])||void 0===i?void 0:i.source.animation)&&this[mf].source.animation.removeEventListener("enterFrame",this[_f]),this[mf]=t,null!=n&&n.isVideoTexture){const t=n.image;if(this[Ef]=!0,null!=t.requestVideoFrameCallback){const e=()=>{this[Ef]&&(this[_f](),t.requestVideoFrameCallback(e))};t.requestVideoFrameCallback(e)}else{const t=()=>{this[Ef]&&(this[_f](),requestAnimationFrame(t))};requestAnimationFrame(t)}}else null!=(null==t?void 0:t.source.animation)&&t.source.animation.addEventListener("enterFrame",this[_f]);let s=ft;if(this[ff])for(const t of this[ff]){switch(this[vf]){case yf.Base:t.map=n;break;case yf.MetallicRoughness:s=vt,t.metalnessMap=n,t.roughnessMap=n;break;case yf.Normal:s=vt,t.normalMap=n;break;case yf.Occlusion:s=vt,t.aoMap=n;break;case yf.Emissive:t.emissiveMap=n;break;case yf.Clearcoat:t.clearcoatMap=n;break;case yf.ClearcoatRoughness:t.clearcoatRoughnessMap=n;break;case yf.ClearcoatNormal:t.clearcoatNormalMap=n;break;case yf.SheenColor:t.sheenColorMap=n;break;case yf.SheenRoughness:t.sheenRoughnessMap=n;break;case yf.Transmission:t.transmissionMap=n;break;case yf.Thickness:t.thicknessMap=n;break;case yf.Specular:t.specularIntensityMap=n;break;case yf.SpecularColor:t.specularColorMap=n;break;case yf.Iridescence:t.iridescenceMap=n;break;case yf.IridescenceThickness:t.iridescenceThicknessMap=n;break;case yf.Anisotropy:t.anisotropyMap=n}t.needsUpdate=!0}n&&(n.colorSpace=s,n.rotation=this[gf].rotation,n.repeat=this[gf].scale,n.offset=this[gf].offset),this[_f]()}}df=mf,Af=gf,pf=Ef; -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Sf=Symbol("threeMaterial"),Cf=Symbol("threeMaterials"),If=Symbol("baseColorTexture"),Mf=Symbol("metallicRoughnessTexture");class wf extends Og{constructor(t,e){super(t,e);const{map:i,metalnessMap:n}=e.values().next().value;this[If]=new xf(t,yf.Base,i,e),this[Mf]=new xf(t,yf.MetallicRoughness,n,e)}get[Cf](){return this[Fg]}get[Sf](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get baseColorFactor(){const t=[0,0,0,this[Sf].opacity];return this[Sf].color.toArray(t),t}get metallicFactor(){return this[Sf].metalness}get roughnessFactor(){return this[Sf].roughness}get baseColorTexture(){return this[If]}get metallicRoughnessTexture(){return this[Mf]}setBaseColorFactor(t){const e=new Fi;t instanceof Array?e.fromArray(t):e.set(t);for(const i of this[Cf])i.color.set(e),t instanceof Array?i.opacity=t[3]:(t=[0,0,0,i.opacity],e.toArray(t));this[Qg]()}setMetallicFactor(t){for(const e of this[Cf])e.metalness=t;this[Qg]()}setRoughnessFactor(t){for(const e of this[Cf])e.roughness=t;this[Qg]()}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var bf,Tf;const Bf=Symbol("pbrMetallicRoughness"),Rf=Symbol("normalTexture"),Lf=Symbol("occlusionTexture"),Df=Symbol("emissiveTexture"),Uf=Symbol("backingThreeMaterial"),Pf=Symbol("applyAlphaCutoff"),Nf=Symbol("getAlphaMode"),Ff=Symbol("lazyLoadGLTFInfo"),Qf=Symbol("initialize"),Of=Symbol("getLoadedMaterial"),kf=Symbol("ensureMaterialIsLoaded"),Gf=Symbol("gltfIndex"),Hf=Symbol("setActive"),zf=Symbol("variantIndices"),Vf=Symbol("isActive"),Wf=Symbol("variantSet"),qf=Symbol("modelVariants"),Xf=Symbol("name"),jf=Symbol("pbrTextures");class Yf extends Og{constructor(t,e,i,n,r,s,a=void 0){super(t,r),this[bf]=new Set,this[Tf]=new Map,this[Gf]=e,this[Vf]=i,this[qf]=n,this[Xf]=s,null==a?this[Qf]():this[Ff]=a}get[(bf=Wf,Tf=jf,Uf)](){return this[Fg].values().next().value}[Qf](){const t=this[Qg],e=this[Fg];this[Bf]=new wf(t,e);const{normalMap:i,aoMap:n,emissiveMap:r}=e.values().next().value;this[Rf]=new xf(t,yf.Normal,i,e),this[Lf]=new xf(t,yf.Occlusion,n,e),this[Df]=new xf(t,yf.Emissive,r,e);const s=i=>{this[jf].set(i,new xf(t,i,null,e))};s(yf.Clearcoat),s(yf.ClearcoatRoughness),s(yf.ClearcoatNormal),s(yf.SheenColor),s(yf.SheenRoughness),s(yf.Transmission),s(yf.Thickness),s(yf.Specular),s(yf.SpecularColor),s(yf.Iridescence),s(yf.IridescenceThickness),s(yf.Anisotropy)}async[Of](){if(null!=this[Ff]){const{set:t,material:e}=await this[Ff].doLazyLoad();return this[Fg]=t,this[Qf](),this[Ff]=void 0,this.ensureLoaded=async()=>{},e}return this[Fg].values().next().value}colorFromRgb(t){const e=new Fi;return t instanceof Array?e.fromArray(t):e.set(t),e}[kf](){if(null!=this[Ff])throw new Error(`Material "${this.name}" has not been loaded, call 'await\n myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[Of]()}get isLoaded(){return null==this[Ff]}get isActive(){return this[Vf]}[Hf](t){this[Vf]=t}get name(){return this[Xf]||""}set name(t){if(this[Xf]=t,null!=this[Fg])for(const e of this[Fg])e.name=t}get pbrMetallicRoughness(){return this[kf](),this[Bf]}get normalTexture(){return this[kf](),this[Rf]}get occlusionTexture(){return this[kf](),this[Lf]}get emissiveTexture(){return this[kf](),this[Df]}get emissiveFactor(){return this[kf](),this[Uf].emissive.toArray()}get index(){return this[Gf]}[zf](){return this[Wf]}hasVariant(t){const e=this[qf].get(t);return null!=e&&this[Wf].has(e.index)}setEmissiveFactor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.emissive.set(e);this[Qg]()}[Nf](){return this[Uf].transparent?"BLEND":this[Uf].alphaTest>0?"MASK":"OPAQUE"}[Pf](){this[kf]();for(const t of this[Fg])"MASK"===this[Nf]()?null==t.alphaTest&&(t.alphaTest=.5):t.alphaTest=void 0,t.needsUpdate=!0}setAlphaCutoff(t){this[kf]();for(const e of this[Fg])e.alphaTest=t,e.needsUpdate=!0;this[Pf](),this[Qg]()}getAlphaCutoff(){return this[kf](),this[Uf].alphaTest}setDoubleSided(t){this[kf]();for(const e of this[Fg])e.side=t?c:o,e.needsUpdate=!0;this[Qg]()}getDoubleSided(){return this[kf](),this[Uf].side==c}setAlphaMode(t){this[kf]();const e=(t,e)=>{t.transparent=e,t.depthWrite=!e};for(const i of this[Fg])e(i,"BLEND"===t),i.alphaTest="MASK"===t?.5:void 0,i.needsUpdate=!0;this[Qg]()}getAlphaMode(){return this[kf](),this[Nf]()}get emissiveStrength(){return this[kf](),this[Uf].emissiveIntensity}setEmissiveStrength(t){this[kf]();for(const e of this[Fg])e.emissiveIntensity=t;this[Qg]()}get clearcoatFactor(){return this[kf](),this[Uf].clearcoat}get clearcoatRoughnessFactor(){return this[kf](),this[Uf].clearcoatRoughness}get clearcoatTexture(){return this[kf](),this[jf].get(yf.Clearcoat)}get clearcoatRoughnessTexture(){return this[kf](),this[jf].get(yf.ClearcoatRoughness)}get clearcoatNormalTexture(){return this[kf](),this[jf].get(yf.ClearcoatNormal)}get clearcoatNormalScale(){return this[kf](),this[Uf].clearcoatNormalScale.x}setClearcoatFactor(t){this[kf]();for(const e of this[Fg])e.clearcoat=t;this[Qg]()}setClearcoatRoughnessFactor(t){this[kf]();for(const e of this[Fg])e.clearcoatRoughness=t;this[Qg]()}setClearcoatNormalScale(t){this[kf]();for(const e of this[Fg])e.clearcoatNormalScale=new Wt(t,t);this[Qg]()}get ior(){return this[kf](),this[Uf].ior}setIor(t){this[kf]();for(const e of this[Fg])e.ior=t;this[Qg]()}get sheenColorFactor(){return this[kf](),this[Uf].sheenColor.toArray()}get sheenColorTexture(){return this[kf](),this[jf].get(yf.SheenColor)}get sheenRoughnessFactor(){return this[kf](),this[Uf].sheenRoughness}get sheenRoughnessTexture(){return this[kf](),this[jf].get(yf.SheenRoughness)}setSheenColorFactor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.sheenColor.set(e),t.sheen=1;this[Qg]()}setSheenRoughnessFactor(t){this[kf]();for(const e of this[Fg])e.sheenRoughness=t,e.sheen=1;this[Qg]()}get transmissionFactor(){return this[kf](),this[Uf].transmission}get transmissionTexture(){return this[kf](),this[jf].get(yf.Transmission)}setTransmissionFactor(t){this[kf]();for(const e of this[Fg])e.transmission=t;this[Qg]()}get thicknessFactor(){return this[kf](),this[Uf].thickness}get thicknessTexture(){return this[kf](),this[jf].get(yf.Thickness)}get attenuationDistance(){return this[kf](),this[Uf].attenuationDistance}get attenuationColor(){return this[kf](),this[Uf].attenuationColor.toArray()}setThicknessFactor(t){this[kf]();for(const e of this[Fg])e.thickness=t;this[Qg]()}setAttenuationDistance(t){this[kf]();for(const e of this[Fg])e.attenuationDistance=t;this[Qg]()}setAttenuationColor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.attenuationColor.set(e);this[Qg]()}get specularFactor(){return this[kf](),this[Uf].specularIntensity}get specularTexture(){return this[kf](),this[jf].get(yf.Specular)}get specularColorFactor(){return this[kf](),this[Uf].specularColor.toArray()}get specularColorTexture(){return this[kf](),this[jf].get(yf.SheenColor)}setSpecularFactor(t){this[kf]();for(const e of this[Fg])e.specularIntensity=t;this[Qg]()}setSpecularColorFactor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.specularColor.set(e);this[Qg]()}get iridescenceFactor(){return this[kf](),this[Uf].iridescence}get iridescenceTexture(){return this[kf](),this[jf].get(yf.Iridescence)}get iridescenceIor(){return this[kf](),this[Uf].iridescenceIOR}get iridescenceThicknessMinimum(){return this[kf](),this[Uf].iridescenceThicknessRange[0]}get iridescenceThicknessMaximum(){return this[kf](),this[Uf].iridescenceThicknessRange[1]}get iridescenceThicknessTexture(){return this[kf](),this[jf].get(yf.IridescenceThickness)}setIridescenceFactor(t){this[kf]();for(const e of this[Fg])e.iridescence=t;this[Qg]()}setIridescenceIor(t){this[kf]();for(const e of this[Fg])e.iridescenceIOR=t;this[Qg]()}setIridescenceThicknessMinimum(t){this[kf]();for(const e of this[Fg])e.iridescenceThicknessRange[0]=t;this[Qg]()}setIridescenceThicknessMaximum(t){this[kf]();for(const e of this[Fg])e.iridescenceThicknessRange[1]=t;this[Qg]()}get anisotropyStrength(){return this[kf](),this[Uf].anisotropy}get anisotropyRotation(){return this[kf](),this[Uf].anisotropyRotation}get anisotropyTexture(){return this[kf](),this[jf].get(yf.Anisotropy)}setAnisotropyStrength(t){this[kf]();for(const e of this[Fg])e.anisotropy=t;this[Qg]()}setAnisotropyRotation(t){this[kf]();for(const e of this[Fg])e.anisotropyRotation=t;this[Qg]()}}class Kf{constructor(t){this.name="",this.children=new Array,this.name=t}}class Jf extends Kf{constructor(t,e,i,n){super(t.name),this.materials=new Map,this.variantToMaterialMap=new Map,this.initialMaterialIdx=0,this.activeMaterialIdx=0,this.mesh=t;const{gltf:r,threeGLTF:s,threeObjectMap:a}=n;this.parser=s.parser,this.modelVariants=i,this.mesh.userData.variantData=i;const o=a.get(t.material);null!=o.materials?this.initialMaterialIdx=this.activeMaterialIdx=o.materials:console.error(`Primitive (${t.name}) missing initial material reference.`);const l=t.userData.associations||{};if(null==l.meshes)return void console.error("Mesh is missing primitive index association");const c=((r.meshes||[])[l.meshes].primitives||[])[l.primitives];if(null!=c){if(null!=c.material)this.materials.set(c.material,e[c.material]);else{const t=e.findIndex((t=>"Default"===t.name));t>=0?this.materials.set(t,e[t]):console.warn("gltfPrimitive has no material!")}if(c.extensions&&c.extensions.KHR_materials_variants){const t=c.extensions.KHR_materials_variants,n=s.parser.json.extensions.KHR_materials_variants.variants;for(const r of t.mappings){const t=e[r.material];this.materials.set(r.material,t);for(const e of r.variants){const{name:r}=n[e];this.variantToMaterialMap.set(e,t),t[zf]().add(e),i.has(r)||i.set(r,{name:r,index:e})}}}}else console.error("Mesh primitive definition is missing.")}async setActiveMaterial(t){const e=this.materials.get(t);if(null!=e&&t!==this.activeMaterialIdx){this.mesh.material=await e[Of]();const{normalScale:i}=this.mesh.material;null!=i&&i.y*i.x<0!=(null==this.mesh.geometry.attributes.tangent)&&this.parser.assignFinalMaterial(this.mesh),this.activeMaterialIdx=t}return this.mesh.material}getActiveMaterial(){return this.materials.get(this.activeMaterialIdx)}getMaterial(t){return this.materials.get(t)}async enableVariant(t){if(null==t)return this.setActiveMaterial(this.initialMaterialIdx);if(null!=this.variantToMaterialMap&&this.modelVariants.has(t)){const e=this.modelVariants.get(t);return this.enableVariantHelper(e.index)}return null}async enableVariantHelper(t){if(null!=this.variantToMaterialMap&&null!=t){const e=this.variantToMaterialMap.get(t);if(null!=e)return this.setActiveMaterial(e.index)}return null}async instantiateVariants(){if(null!=this.variantToMaterialMap)for(const t of this.variantToMaterialMap.keys()){const e=this.mesh.userData.variantMaterials.get(t);if(null!=e.material)continue;const i=await this.enableVariantHelper(t);null!=i&&(e.material=i)}}get variantInfo(){return this.variantToMaterialMap}addVariant(t,e){if(!this.ensureVariantIsUnused(e))return!1;this.modelVariants.has(e)||this.modelVariants.set(e,{name:e,index:this.modelVariants.size});const i=this.modelVariants.get(e).index;return t[zf]().add(i),this.variantToMaterialMap.set(i,t),this.materials.set(t.index,t),this.updateVariantUserData(i,t),!0}deleteVariant(t){if(this.variantInfo.has(t)){this.variantInfo.delete(t);const e=this.mesh.userData.variantMaterials;null!=e&&e.delete(t)}}updateVariantUserData(t,e){e[zf]().add(t),this.mesh.userData.variantData=this.modelVariants,this.mesh.userData.variantMaterials=this.mesh.userData.variantMaterials||new Map;this.mesh.userData.variantMaterials.set(t,{material:e[Fg].values().next().value,gltfMaterialIndex:e.index})}ensureVariantIsUnused(t){const e=this.modelVariants.get(t);return null==e||!this.variantInfo.has(e.index)||(console.warn(`Primitive cannot add variant '${t}' for this material, it already exists.`),!1)}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var $f,Zf,tv,ev,iv,nv;const rv=Symbol("materials"),sv=Symbol("hierarchy"),av=Symbol("roots"),ov=Symbol("primitives"),lv=Symbol("prepareVariantsForExport"),cv=Symbol("switchVariant"),hv=Symbol("materialFromPoint"),uv=Symbol("nodeFromPoint"),dv=Symbol("nodeFromIndex"),Av=Symbol("variantData"),pv=Symbol("availableVariants"),mv=Symbol("modelOnUpdate"),gv=Symbol("cloneMaterial");class fv{constructor(t,e,i,n){this.gltf=t,this.gltfElementMap=e,this.mapKey=i,this.doLazyLoad=n}}class vv{constructor(t,e=(()=>{})){this[$f]=new Array,this[Zf]=new Array,this[tv]=new Array,this[ev]=new Array,this[iv]=()=>{},this[nv]=new Map,this[mv]=e;const{gltf:i,threeGLTF:n,gltfElementMap:r}=t;for(const[t,s]of i.materials.entries()){const a=r.get(s);if(null!=a)this[rv].push(new Yf(e,t,!0,this[Av],a,s.name));else{const o=(i.materials||[])[t],l=t,c=async()=>{const t=await n.parser.getDependency("material",l),e=new Set;return r.set(o,e),e.add(t),{set:e,material:t}};this[rv].push(new Yf(e,t,!1,this[Av],a,s.name,new fv(i,r,o,c)))}}const s=new Map,a=new Array;for(const t of n.scene.children)a.push(t);for(;a.length>0;){const e=a.pop();let i=null;e instanceof Sn?(i=new Jf(e,this.materials,this[Av],t),this[ov].push(i)):i=new Kf(e.name);const n=s.get(e);null!=n?n.children.push(i):this[av].push(i),this[sv].push(i);for(const t of e.children)a.push(t),s.set(e,i)}}get materials(){return this[rv]}[($f=rv,Zf=sv,tv=av,ev=ov,iv=mv,nv=Av,pv)](){const t=Array.from(this[Av].values());return t.sort(((t,e)=>t.index-e.index)),t.map((t=>t.name))}getMaterialByName(t){const e=this[rv].filter((e=>e.name===t));return e.length>0?e[0]:null}[dv](t,e){const i=this[sv].find((i=>{if(i instanceof Jf){const{meshes:n,primitives:r}=i.mesh.userData.associations;if(n==t&&r==e)return!0}return!1}));return null==i?null:i}[uv](t){return this[sv].find((e=>{if(e instanceof Jf){if(e.mesh===t.object)return!0}return!1}))}[hv](t){return this[uv](t).getActiveMaterial()}async[cv](t){for(const e of this[ov])await e.enableVariant(t);for(const t of this.materials)t[Hf](!1);for(const t of this[ov])this.materials[t.getActiveMaterial().index][Hf](!0)}async[lv](){const t=new Array;for(const e of this[ov])t.push(e.instantiateVariants());await Promise.all(t)}[gv](t,e){const i=this.materials[t];i.isLoaded||console.error("Cloning an unloaded material,\n call 'material.ensureLoaded() before cloning the material.");const n=i[Fg],r=new Set;for(const[t,i]of n.entries()){const s=i.clone();s.name=e+(n.size>1?"_inst"+t:""),r.add(s)}const s=new Yf(this[mv],this[rv].length,!1,this[Av],r,e);return this[rv].push(s),s}createMaterialInstanceForVariant(t,e,i,n=!0){let r=null;for(const n of this[ov]){const s=this[Av].get(i);null!=s&&n.variantInfo.has(s.index)||null!=n.getMaterial(t)&&(this.hasVariant(i)||this.createVariant(i),null==r&&(r=this[gv](t,e)),n.addVariant(r,i))}if(n&&null!=r){r[Hf](!0),this.materials[t][Hf](!1);for(const t of this[ov])t.enableVariant(i)}return r}createVariant(t){this[Av].has(t)?console.warn(`Variant '${t}'' already exists`):this[Av].set(t,{name:t,index:this[Av].size})}hasVariant(t){return this[Av].has(t)}setMaterialToVariant(t,e){if(null!=this[pv]().find((t=>t===e)))if(t<0||t>=this.materials.length)console.error("setMaterialToVariant(): materialIndex is out of bounds.");else for(const i of this[ov]){const n=i.getMaterial(t);null!=n&&i.addVariant(n,e)}else console.warn(`Can't add material to '${e}', the variant does not exist.'`)}updateVariantName(t,e){const i=this[Av].get(t);null!=i&&(i.name=e,this[Av].set(e,i),this[Av].delete(t))}deleteVariant(t){const e=this[Av].get(t);if(null!=e){for(const i of this.materials)i.hasVariant(t)&&i[Wf].delete(e.index);for(const t of this[ov])t.deleteVariant(e.index);this[Av].delete(t)}}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var _v=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const Ev=Symbol("currentGLTF"),yv=Symbol("originalGltfJson"),xv=Symbol("model"),Sv=Symbol("getOnUpdateMethod"),Cv=Symbol("buildTexture"); -/* @license - * Copyright 2023 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Iv extends Sn{constructor(){super(void 0,new Gi({depthWrite:!1})),this.height=0,this.radius=0,this.resolution=0,this.userData.noHit=!0}get map(){return this.material.map}set map(t){this.material.map=t}isUsable(){return this.height>0&&this.radius>0&&null!=this.geometry&&null!=this.map}updateGeometry(t=this.height,e=this.radius,i=128){t==this.height&&e==this.radius&&i==this.resolution||(this.height=t,this.radius=e,this.resolution=i,t>0&&e>0&&(this.geometry.dispose(),this.geometry=function(t,e,i){const n=new Mo(e,2*i,i);n.scale(1,1,-1);const r=n.getAttribute("position"),s=new _e;for(let e=0;e0&&--this.referenceCount,0===this.referenceCount}updatePosition(t){if(null==t)return;const e=kA(t)[0].terms;for(let t=0;t<3;++t)this.position.setComponent(t,JA(e[t]).number);this.updateMatrixWorld()}updateNormal(t){if(null==t)return;const e=kA(t)[0].terms;for(let t=0;t<3;++t)this.normal.setComponent(t,e[t].number)}updateSurface(t){if(!t&&this.initialized)return;const{mesh:e,tri:i,bary:n}=this;if(null==e||null==i||null==n)return;e.getVertexPosition(i.x,Mv),e.getVertexPosition(i.y,wv),e.getVertexPosition(i.z,bv),Mv.toArray(Tv.elements,0),wv.toArray(Tv.elements,3),bv.toArray(Tv.elements,6),this.position.copy(n).applyMatrix3(Tv);const r=this.parent;r.worldToLocal(e.localToWorld(this.position)),Bv.set(Mv,wv,bv),Bv.getNormal(this.normal).transformDirection(e.matrixWorld);const s=r.parent;Rv.setFromAxisAngle(Mv.set(0,1,0),-s.yaw),this.normal.applyQuaternion(Rv)}orient(t){this.pivot.style.transform=`rotate(${t}rad)`}updateVisibility(t){this.element.classList.toggle("hide",!t),this.slot.assignedNodes().forEach((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return;const i=e,n=i.dataset.visibilityAttribute;if(null!=n){const e=`data-${n}`;i.toggleAttribute(e,t)}i.dispatchEvent(new CustomEvent("hotspot-visibility",{detail:{visible:t}}))})),this.initialized=!0}}const Dv={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float h;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 sum = vec4( 0.0 );\n\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}"},Uv={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float v;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 sum = vec4( 0.0 );\n\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}"};function Pv(t,e,i){return(1-i)*t+i*e} -/* @license - * Copyright 2022 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Nv extends Ei{constructor(t,e,i){super(),this.camera=new nr,this.renderTarget=null,this.renderTargetBlur=null,this.depthMaterial=new pa,this.horizontalBlurMaterial=new Bn(Dv),this.verticalBlurMaterial=new Bn(Uv),this.intensity=0,this.softness=1,this.boundingBox=new xe,this.size=new _e,this.maxDimension=0,this.isAnimated=!1,this.needsUpdate=!1;const{camera:n}=this;n.rotation.x=Math.PI/2,n.left=-.5,n.right=.5,n.bottom=-.5,n.top=.5,this.add(n);const r=new qn,s=new Gi({opacity:1,transparent:!0,side:l});this.floor=new Sn(r,s),this.floor.userData.noHit=!0,n.add(this.floor),this.blurPlane=new Sn(r),this.blurPlane.visible=!1,n.add(this.blurPlane),t.target.add(this),this.depthMaterial.onBeforeCompile=function(t){t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * opacity );")},this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1,this.setScene(t,e,i)}setScene(t,e,i){const{boundingBox:n,size:r,rotation:s,position:a}=this;if(this.isAnimated=t.animationNames.length>0,this.boundingBox.copy(t.boundingBox),this.size.copy(t.size),this.maxDimension=Math.max(r.x,r.y,r.z)*(this.isAnimated?2:1),this.boundingBox.getCenter(a),"back"===i){const{min:t,max:e}=n;[t.y,t.z]=[t.z,t.y],[e.y,e.z]=[e.z,e.y],[r.y,r.z]=[r.z,r.y],s.x=Math.PI/2,s.y=Math.PI}else s.x=0,s.y=0;if(this.isAnimated){const t=n.min.y,e=n.max.y;r.y=this.maxDimension,n.expandByVector(r.subScalar(this.maxDimension).multiplyScalar(-.5)),n.min.y=t,n.max.y=e,r.set(this.maxDimension,e-t,this.maxDimension)}"bottom"===i?a.y=n.min.y:a.z=n.min.y,this.setSoftness(e)}setSoftness(t){this.softness=t;const{size:e,camera:i}=this,n=this.isAnimated?2:1,r=n*Math.pow(2,9-3*t);this.setMapSize(r);const s=e.y/2,a=e.y*n;i.near=0,i.far=Pv(a,s,t),this.depthMaterial.opacity=1/t,i.updateProjectionMatrix(),this.setIntensity(this.intensity),this.setOffset(0)}setMapSize(t){const{size:e}=this;this.isAnimated&&(t*=2);const i=Math.floor(e.x>e.z?t:t*e.x/e.z),n=Math.floor(e.x>e.z?t*e.z/e.x:t),r=10+i,s=10+n;if(null==this.renderTarget||this.renderTarget.width===r&&this.renderTarget.height===s||(this.renderTarget.dispose(),this.renderTarget=null,this.renderTargetBlur.dispose(),this.renderTargetBlur=null),null==this.renderTarget){const t={format:z};this.renderTarget=new me(r,s,t),this.renderTargetBlur=new me(r,s,t),this.floor.material.map=this.renderTarget.texture}this.camera.scale.set(e.x*(1+10/i),e.z*(1+10/n),1),this.needsUpdate=!0}setIntensity(t){this.intensity=t,t>0?(this.visible=!0,this.floor.visible=!0,this.floor.material.opacity=t*Pv(.3,1,this.softness*this.softness)):(this.visible=!1,this.floor.visible=!1)}getIntensity(){return this.intensity}setOffset(t){this.floor.position.z=-t+this.gap()}gap(){return.001*this.maxDimension}render(t,e){e.overrideMaterial=this.depthMaterial;const i=t.getClearAlpha();t.setClearAlpha(0),this.floor.visible=!1;const n=t.xr.enabled;t.xr.enabled=!1;const r=t.getRenderTarget();t.setRenderTarget(this.renderTarget),t.render(e,this.camera),e.overrideMaterial=null,this.floor.visible=!0,this.blurShadow(t),t.xr.enabled=n,t.setRenderTarget(r),t.setClearAlpha(i)}blurShadow(t){const{camera:e,horizontalBlurMaterial:i,verticalBlurMaterial:n,renderTarget:r,renderTargetBlur:s,blurPlane:a}=this;a.visible=!0,a.material=i,i.uniforms.h.value=1/this.renderTarget.width,i.uniforms.tDiffuse.value=this.renderTarget.texture,t.setRenderTarget(s),t.render(a,e),a.material=n,n.uniforms.v.value=1/this.renderTarget.height,n.uniforms.tDiffuse.value=this.renderTargetBlur.texture,t.setRenderTarget(r),t.render(a,e),a.visible=!1}dispose(){null!=this.renderTarget&&this.renderTarget.dispose(),null!=this.renderTargetBlur&&this.renderTargetBlur.dispose(),this.depthMaterial.dispose(),this.horizontalBlurMaterial.dispose(),this.verticalBlurMaterial.dispose(),this.floor.material.dispose(),this.floor.geometry.dispose(),this.blurPlane.geometry.dispose(),this.removeFromParent()}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Fv=new _e,Qv=new _e,Ov=new _e,kv=new class{constructor(t,e,i=0,n=1/0){this.ray=new je(t,e),this.near=i,this.far=n,this.camera=null,this.layers=new ai,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: Unsupported camera type: "+e.type)}intersectObject(t,e=!0,i=[]){return Ul(t,this,i,e),i.sort(Dl),i}intersectObjects(t,e=!0,i=[]){for(let n=0,r=t.length;n{})){if(!t||t===this.url)return void e(1);if(this.reset(),this.url=t,null!=this.externalRenderer){const t=await this.externalRenderer.load(e);return this.boundingSphere.radius=t.framedRadius,void(this.idealAspect=t.fieldOfViewAspect)}let i;null!=this.cancelPendingSourceChange&&(this.cancelPendingSourceChange(),this.cancelPendingSourceChange=null);try{i=await new Promise((async(i,n)=>{this.cancelPendingSourceChange=()=>n();try{i(await this.element[U_].loader.load(t,this.element,e))}catch(t){n(t)}}))}catch(t){if(null==t)return;throw t}this.cancelPendingSourceChange=null,this.reset(),this.url=t,this._currentGLTF=i,null!=i&&(this._model=i.scene,this.target.add(i.scene));const{animations:n}=i,r=new Map,s=[];for(const t of n)r.set(t.name,t),s.push(t.name);this.animations=n,this.animationsByName=r,this.animationNames=s,await this.setupScene()}async setupScene(){this.applyTransform(),this.updateBoundingBox(),await this.updateFraming(),this.updateShadow(),this.setShadowIntensity(this.shadowIntensity),this.setGroundedSkybox()}reset(){this.url=null,this.renderCount=0,this.queueRender(),null!=this.shadow&&this.shadow.setIntensity(0),this.bakedShadows.clear();const{_model:t}=this;null!=t&&(t.removeFromParent(),this._model=null);const e=this._currentGLTF;null!=e&&(e.dispose(),this._currentGLTF=null),null!=this.currentAnimationAction&&(this.currentAnimationAction.stop(),this.currentAnimationAction=null),this.mixer.stopAllAction(),this.mixer.uncacheRoot(this)}dispose(){this.reset(),null!=this.shadow&&(this.shadow.dispose(),this.shadow=null),this.element[Ev]=null,this.element[yv]=null,this.element[xv]=null}get currentGLTF(){return this._currentGLTF}setSize(t,e){if(this.width!==t||this.height!==e){if(this.width=Math.max(t,1),this.height=Math.max(e,1),this.annotationRenderer.setSize(t,e),this.aspect=this.width/this.height,null!=this.externalRenderer){const i=Eh();this.externalRenderer.resize(t*i,e*i)}this.queueRender()}}markBakedShadow(t){t.userData.noHit=!0,this.bakedShadows.add(t)}unmarkBakedShadow(t){t.userData.noHit=!1,t.visible=!0,this.bakedShadows.delete(t),this.boundingBox.expandByObject(t)}findBakedShadows(t){const e=new xe;t.traverse((t=>{const i=t;if(!i.material)return;if(!i.material.transparent)return;e.setFromObject(i);const n=e.getSize(Gv),r=Math.min(n.x,n.y,n.z);Math.max(n.x,n.y,n.z)<100*r||this.markBakedShadow(i)}))}checkBakedShadows(){const{min:t,max:e}=this.boundingBox,i=new xe;this.boundingBox.getSize(this.size);for(const n of this.bakedShadows)i.setFromObject(n),i.min.y=e.x&&i.min.z<=t.z&&i.max.z>=e.z||i.min.z=e.x&&i.min.y<=t.y&&i.max.y>=e.y||this.unmarkBakedShadow(n)}applyTransform(){const{model:t}=this;if(null==t)return;const e=kA(this.element.orientation)[0].terms,i=JA(e[0]).number,n=JA(e[1]).number,r=JA(e[2]).number;t.quaternion.setFromEuler(new si(n,r,i,"YXZ"));const s=kA(this.element.scale)[0].terms;t.scale.set(s[0].number,s[1].number,s[2].number)}updateBoundingBox(){const{model:t}=this;if(null==t)return;this.target.remove(t),this.findBakedShadows(t);const e=(t,e)=>t.expandByPoint(e);this.setBakedShadowVisibility(!1),this.boundingBox=bd(t,e,new xe),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach((t=>this.unmarkBakedShadow(t))),this.boundingBox=bd(t,e,new xe)),this.checkBakedShadows(),this.setBakedShadowVisibility(),this.boundingBox.getSize(this.size),this.target.add(t)}async updateFraming(){const{model:t}=this;if(null==t)return;this.target.remove(t),this.setBakedShadowVisibility(!1);const{center:e}=this.boundingSphere;this.element.requestUpdate("cameraTarget"),await this.element.updateComplete,e.copy(this.getTarget());this.boundingSphere.radius=Math.sqrt(bd(t,((t,i)=>Math.max(t,e.distanceToSquared(i))),0));this.idealAspect=bd(t,((t,i)=>{i.sub(e);const n=Math.sqrt(i.x*i.x+i.z*i.z);return Math.max(t,n/(this.idealCameraDistance()-Math.abs(i.y)))}),0)/Math.tan(this.framedFoVDeg/2*Math.PI/180),this.setBakedShadowVisibility(),this.target.add(t)}setBakedShadowVisibility(t=this.shadowIntensity<=0){for(const e of this.bakedShadows)e.visible=t}idealCameraDistance(){const t=this.framedFoVDeg/2*Math.PI/180;return this.boundingSphere.radius/Math.sin(t)}adjustedFoV(t){const e=Math.tan(t/2*Math.PI/180)*Math.max(1,this.idealAspect/this.aspect);return 2*Math.atan(e)*180/Math.PI}getNDC(t,e){if(null!=this.xrCamera)Hv.set(t/window.screen.width,e/window.screen.height);else{const i=this.element.getBoundingClientRect();Hv.set((t-i.x)/this.width,(e-i.y)/this.height)}return Hv.multiplyScalar(2).subScalar(1),Hv.y*=-1,Hv}getSize(){return{width:this.width,height:this.height}}setEnvironmentAndSkybox(t,e){this.element[U_].arRenderer.presentedScene!==this&&(this.environment=t,this.setBackground(e),this.queueRender())}setBackground(t){this.groundedSkybox.map=t,this.groundedSkybox.isUsable()?(this.target.add(this.groundedSkybox),this.background=null):(this.target.remove(this.groundedSkybox),this.background=t)}farRadius(){return this.boundingSphere.radius*(null!=this.groundedSkybox.parent?10:1)}setGroundedSkybox(){const t=kA(this.element.skyboxHeight)[0].terms[0],e=JA(t).number,i=10*this.boundingSphere.radius;this.groundedSkybox.updateGeometry(e,i),this.groundedSkybox.position.y=e-(this.shadow?2*this.shadow.gap():0),this.setBackground(this.groundedSkybox.map)}setTarget(t,e,i){this.goalTarget.set(-t,-e,-i)}setTargetDamperDecayTime(t){this.targetDamperX.setDecayTime(t),this.targetDamperY.setDecayTime(t),this.targetDamperZ.setDecayTime(t)}getTarget(){return this.goalTarget.clone().multiplyScalar(-1)}jumpToGoal(){this.updateTarget(1e4)}updateTarget(t){const e=this.goalTarget,i=this.target.position;if(e.equals(i))return!1;{const n=this.boundingSphere.radius/10;let{x:r,y:s,z:a}=i;return r=this.targetDamperX.update(r,e.x,t,n),s=this.targetDamperY.update(s,e.y,t,n),a=this.targetDamperZ.update(a,e.z,t,n),this.target.position.set(r,s,a),this.target.updateMatrixWorld(),this.queueRender(),!0}}pointTowards(t,e){const{x:i,z:n}=this.position;this.yaw=Math.atan2(t-i,e-n)}get model(){return this._model}set yaw(t){this.rotation.y=t,this.queueRender()}get yaw(){return this.rotation.y}set animationTime(t){this.mixer.setTime(t),this.queueShadowRender()}get animationTime(){if(null!=this.currentAnimationAction){const t=Math.max(this.currentAnimationAction._loopCount,0);return this.currentAnimationAction.loop===ot&&1==(1&t)?this.duration-this.currentAnimationAction.time:this.currentAnimationAction.time}return 0}set animationTimeScale(t){this.mixer.timeScale=t}get animationTimeScale(){return this.mixer.timeScale}get duration(){return null!=this.currentAnimationAction&&this.currentAnimationAction.getClip()?this.currentAnimationAction.getClip().duration:0}get hasActiveAnimation(){return null!=this.currentAnimationAction}playAnimation(t=null,e=0,i=2201,n=1/0){if(null==this._currentGLTF)return;const{animations:r}=this;if(null==r||0===r.length)return;let s=null;if(null!=t&&(s=this.animationsByName.get(t),null==s)){const e=parseInt(t);!isNaN(e)&&e>=0&&e0&&this.animationTime==this.duration&&(this.animationTime=0)),r.setLoop(i,n),r.enabled=!0,r.clampWhenFinished=!0,r.play()}catch(t){console.error(t)}}stopAnimation(){this.currentAnimationAction=null,this.mixer.stopAllAction()}updateAnimation(t){this.mixer.update(t),this.queueShadowRender()}subscribeMixerEvent(t,e){this.mixer.addEventListener(t,e)}updateShadow(){const t=this.shadow;if(null!=t){const e="wall"===this.element.arPlacement?"back":"bottom";t.setScene(this,this.shadowSoftness,e),t.needsUpdate=!0}}renderShadow(t){const e=this.shadow;null!=e&&1==e.needsUpdate&&(e.render(t,this),e.needsUpdate=!1)}queueShadowRender(){null!=this.shadow&&(this.shadow.needsUpdate=!0)}setShadowIntensity(t){if(this.shadowIntensity=t,null!=this._currentGLTF&&(this.setBakedShadowVisibility(),!(t<=0&&null==this.shadow))){if(null==this.shadow){const t="wall"===this.element.arPlacement?"back":"bottom";this.shadow=new Nv(this,this.shadowSoftness,t)}this.shadow.setIntensity(t)}}setShadowSoftness(t){this.shadowSoftness=t;const e=this.shadow;null!=e&&e.setSoftness(t)}setShadowOffset(t){const e=this.shadow;null!=e&&e.setOffset(t)}hitFromPoint(t,e=this){kv.setFromCamera(t,this.getCamera());return kv.intersectObject(e,!0).find((t=>t.object.visible&&!t.object.userData.noHit))}positionAndNormalFromPoint(t,e=this){var i;const n=this.hitFromPoint(t,e);if(null==n)return null;return{position:n.point,normal:null!=n.face?n.face.normal.clone().applyNormalMatrix((new qt).getNormalMatrix(n.object.matrixWorld)):kv.ray.direction.clone().multiplyScalar(-1),uv:null!==(i=n.uv)&&void 0!==i?i:null}}surfaceFromPoint(t,e=this){const i=this.element.model;if(null==i)return null;const n=this.hitFromPoint(t,e);if(null==n||null==n.face)return null;const r=i[uv](n),{meshes:s,primitives:a}=r.mesh.userData.associations,o=new _e,l=new _e,c=new _e,{a:h,b:u,c:d}=n.face,A=n.object;A.getVertexPosition(h,o),A.getVertexPosition(u,l),A.getVertexPosition(d,c);const p=new Li(o,l,c),m=new _e;return p.getBarycoord(A.worldToLocal(n.point),m),`${s} ${a} ${h} ${u} ${d} ${m.x.toFixed(3)} ${m.y.toFixed(3)} ${m.z.toFixed(3)}`}addHotspot(t){this.target.add(t),this.annotationRenderer.domElement.appendChild(t.element)}removeHotspot(t){this.target.remove(t)}forHotspots(t){const{children:e}=this.target;for(let i=0,n=e.length;i=r||n.y>=r||n.z>=r)return void console.warn(t.surface+" vertex indices out of range in this glTF! Skipping this hotspot.");const s=new _e(e[5].number,e[6].number,e[7].number);t.mesh=i.mesh,t.tri=n,t.bary=s}}updateSurfaceHotspots(){const t=!this.element.paused;this.forHotspots((e=>{this.initializeSurface(e),e.updateSurface(t)}))}updateHotspotsVisibility(t){this.forHotspots((e=>{Fv.copy(t),Qv.setFromMatrixPosition(e.matrixWorld),Fv.sub(Qv),Ov.copy(e.normal).transformDirection(this.target.matrixWorld),Fv.dot(Ov)<0?e.hide():e.show()}))}orientHotspots(t){this.forHotspots((e=>{e.orient(t)}))}setHotspotsVisibility(t){this.forHotspots((e=>{e.visible=t}))}updateSchema(t){var e;const{schemaElement:i,element:n}=this,{alt:r,poster:s,iosSrc:a}=n;if(null!=t){const n=[{"@type":"MediaObject",contentUrl:t,encodingFormat:"gltf"===(null===(e=t.split(".").pop())||void 0===e?void 0:e.toLowerCase())?"model/gltf+json":"model/gltf-binary"}];a&&n.push({"@type":"MediaObject",contentUrl:a,encodingFormat:"model/vnd.usdz+zip"});const o={"@context":"http://schema.org/","@type":"3DModel",image:null!=s?s:void 0,name:null!=r?r:void 0,encoding:n};i.textContent=JSON.stringify(o),document.head.appendChild(i)}else null!=i.parentElement&&i.parentElement.removeChild(i)}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Vv extends EventTarget{constructor(){super(...arguments),this.ongoingActivities=new Set,this.totalProgress=0}get ongoingActivityCount(){return this.ongoingActivities.size}beginActivity(t){const e={progress:0,completed:!1};return this.ongoingActivities.add(e),1===this.ongoingActivityCount&&this.announceTotalProgress(e,0,t),i=>{let n;return n=Math.max(_h(i,0,1),e.progress),n!==e.progress&&this.announceTotalProgress(e,n,t),e.progress}}announceTotalProgress(t,e,i){let n=0,r=0;1==e&&(t.completed=!0);for(const t of this.ongoingActivities){const{progress:e}=t;n+=1-e,t.completed&&r++}const s=t.progress;t.progress=e,this.totalProgress+=(e-s)*(1-this.totalProgress)/n;const a=r===this.ongoingActivityCount?1:this.totalProgress;this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:a,reason:i}})),r===this.ongoingActivityCount&&(this.totalProgress=0,this.ongoingActivities.clear())}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var Wv,qv,Xv,jv,Yv,Kv,Jv,$v,Zv,t_,e_,i_,n_,r_=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const s_=document.createElement("canvas"),a_=Symbol("fallbackResizeHandler"),o_=Symbol("defaultAriaLabel"),l_=Symbol("resizeObserver"),c_=Symbol("clearModelTimeout"),h_=Symbol("onContextLost"),u_=Symbol("loaded"),d_=Symbol("status"),A_=Symbol("onFocus"),p_=Symbol("onBlur"),m_=Symbol("updateSize"),g_=Symbol("intersectionObserver"),f_=Symbol("isElementInViewport"),v_=Symbol("announceModelVisibility"),__=Symbol("ariaLabel"),E_=Symbol("altDefaulted"),y_=Symbol("statusElement"),x_=Symbol("updateStatus"),S_=Symbol("loadedTime"),C_=Symbol("updateSource"),I_=Symbol("markLoaded"),M_=Symbol("container"),w_=Symbol("input"),b_=Symbol("canvas"),T_=Symbol("scene"),B_=Symbol("needsRender"),R_=Symbol("tick"),L_=Symbol("onModelLoad"),D_=Symbol("onResize"),U_=Symbol("renderer"),P_=Symbol("progressTracker"),N_=Symbol("getLoaded"),F_=Symbol("getModelIsVisible"),Q_=Symbol("shouldAttemptPreload"),O_=t=>({x:t.x,y:t.y,z:t.z,toString(){return`${this.x}m ${this.y}m ${this.z}m`}}),k_=t=>({u:t.x,v:t.y,toString(){return`${this.u} ${this.v}`}});class G_ extends $c{constructor(){super(),this.alt=null,this.src=null,this.withCredentials=!1,this.generateSchema=!1,this[Wv]=!1,this[qv]=!1,this[Xv]=0,this[jv]="",this[Yv]=null,this[Kv]=vh((()=>{const t=this.getBoundingClientRect();this[m_](t)}),50),this[Jv]=vh((t=>{const e=this.modelIsVisible;e!==t&&this.dispatchEvent(new CustomEvent("model-visibility",{detail:{visible:e}}))}),0),this[$v]=null,this[Zv]=null,this[t_]=new Vv,this[e_]=()=>{this[y_].textContent=this[d_]},this[i_]=()=>{this[y_].textContent=""},this[n_]=t=>{this.dispatchEvent(new CustomEvent("error",{detail:{type:"webglcontextlost",sourceError:t.sourceEvent}}))},this.attachShadow({mode:"open"});const t=this.shadowRoot;let e,i;if((t=>{Nc(wh,t)})(t),this[M_]=t.querySelector(".container"),this[w_]=t.querySelector(".userInput"),this[b_]=t.querySelector("canvas"),this[y_]=t.querySelector("#status"),this[o_]=this[w_].getAttribute("aria-label"),this.isConnected){const t=this.getBoundingClientRect();e=t.width,i=t.height}else e=300,i=150;this[T_]=new zv({canvas:this[b_],element:this,width:e,height:i}),Promise.resolve().then((()=>{this[m_](this.getBoundingClientRect())})),sh&&(this[l_]=new ResizeObserver((t=>{if(!this[U_].isPresenting)for(let e of t)e.target===this&&this[m_](e.contentRect)}))),ah?this[g_]=new IntersectionObserver((t=>{for(let e of t)if(e.target===this){const t=this.modelIsVisible;this[f_]=e.isIntersecting,this[v_](t),this[f_]&&!this.loaded&&this[C_]()}}),{root:null,rootMargin:"0px",threshold:1e-5}):this[f_]=!0}static get is(){return"model-viewer"}static set modelCacheSize(t){Ed[vd].evictionThreshold=t}static get modelCacheSize(){return Ed[vd].evictionThreshold}static set minimumRenderScale(t){t>1&&console.warn(" minimumRenderScale has been clamped to a maximum value of 1."),t<=0&&console.warn(" minimumRenderScale has been clamped to a minimum value of 0.25."),Ng.singleton.minScale=t}static get minimumRenderScale(){return Ng.singleton.minScale}get loaded(){return this[N_]()}get[(Wv=f_,qv=u_,Xv=S_,jv=d_,Yv=c_,Kv=a_,Jv=v_,$v=l_,Zv=g_,t_=P_,U_)](){return Ng.singleton}get modelIsVisible(){return this[F_]()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),sh?this[l_].observe(this):self.addEventListener("resize",this[a_]),ah&&this[g_].observe(this),this.addEventListener("focus",this[A_]),this.addEventListener("blur",this[p_]);const t=this[U_];t.addEventListener("contextlost",this[h_]),t.registerScene(this[T_]),null!=this[c_]&&(self.clearTimeout(this[c_]),this[c_]=null,this.requestUpdate("src",null))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),sh?this[l_].unobserve(this):self.removeEventListener("resize",this[a_]),ah&&this[g_].unobserve(this),this.removeEventListener("focus",this[A_]),this.removeEventListener("blur",this[p_]);const t=this[U_];t.removeEventListener("contextlost",this[h_]),t.unregisterScene(this[T_]),this[c_]=self.setTimeout((()=>{this[T_].dispose(),this[c_]=null}),10)}updated(t){super.updated(t),t.has("src")&&(null==this.src?(this[u_]=!1,this[S_]=0,this[T_].reset()):this.src!==this[T_].url&&(this[u_]=!1,this[S_]=0,this[C_]())),t.has("alt")&&this[w_].setAttribute("aria-label",this[__]),t.has("withCredentials")&&(Ed.withCredentials=this.withCredentials,this[U_].textureUtils.withCredentials=this.withCredentials),t.has("generateSchema")&&(this.generateSchema?this[T_].updateSchema(this.src):this[T_].updateSchema(null))}toDataURL(t,e){return this[U_].displayCanvas(this[T_]).toDataURL(t,e)}async toBlob(t){const e=t?t.mimeType:void 0,i=t?t.qualityArgument:void 0,n=t?t.idealAspect:void 0,{width:r,height:s,idealAspect:a,aspect:o}=this[T_],{dpr:l,scaleFactor:c}=this[U_];let h=r*c*l,u=s*c*l,d=0,A=0;if(!0===n)if(a>o){const t=u;u=Math.round(h/a),A=(t-u)/2}else{const t=h;h=Math.round(u*a),d=(t-h)/2}s_.width=h,s_.height=u;try{return new Promise((async(t,n)=>{s_.getContext("2d").drawImage(this[U_].displayCanvas(this[T_]),d,A,h,u,0,0,h,u),s_.toBlob((e=>{if(!e)return n(new Error("Unable to retrieve canvas blob"));t(e)}),e,i)}))}finally{this[m_]({width:r,height:s})}}registerEffectComposer(t){t.setRenderer(this[U_].threeRenderer),t.setMainCamera(this[T_].getCamera()),t.setMainScene(this[T_]),this[T_].effectRenderer=t}unregisterEffectComposer(){this[T_].effectRenderer=null}registerRenderer(t){this[T_].externalRenderer=t}unregisterRenderer(){this[T_].externalRenderer=null}get[__](){return this[E_]}get[E_](){return null==this.alt||"null"===this.alt?this[o_]:this.alt}[N_](){return this[u_]}[F_](){return this.loaded&&this[f_]}[Q_](){return!!this.src&&this[f_]}[m_]({width:t,height:e}){0!==t&&0!==e&&(this[M_].style.width=`${t}px`,this[M_].style.height=`${e}px`,this[D_]({width:t,height:e}))}[R_](t,e){var i;null===(i=this[T_].effectRenderer)||void 0===i||i.beforeRender(t,e)}[I_](){this[u_]||(this[u_]=!0,this[S_]=performance.now())}[B_](){this[T_].queueRender()}[L_](){}[x_](t){this[d_]=t;const e=this.getRootNode();null!=e&&e.activeElement===this&&this[y_].textContent!=t&&(this[y_].textContent=t)}[(e_=A_,i_=p_,D_)](t){this[T_].setSize(t.width,t.height)}async[(n_=h_,C_)](){const t=this[T_];if(this.loaded||!this[Q_]()||this.src===t.url)return;this.generateSchema&&t.updateSchema(this.src),this[x_]("Loading"),t.stopAnimation();const e=this[P_].beginActivity("model-load"),i=this.src;try{const n=t.setSource(i,(t=>e(.95*_h(t,0,1)))),r=this[Ih]();await Promise.all([n,r]),this[I_](),this[L_](),this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("before-render"))})),await new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("load",{detail:{url:i}})),t()}))}))}))}catch(t){this.dispatchEvent(new CustomEvent("error",{detail:{type:"loadfailure",sourceError:t}}))}finally{e(1)}}}r_([e({type:String})],G_.prototype,"alt",void 0),r_([e({type:String})],G_.prototype,"src",void 0),r_([e({type:Boolean,attribute:"with-credentials"})],G_.prototype,"withCredentials",void 0),r_([e({type:Boolean,attribute:"generate-schema"})],G_.prototype,"generateSchema",void 0); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var H_=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const z_=Symbol("changeAnimation"),V_=Symbol("paused"),W_={repetitions:1/0,pingpong:!1},q_=Symbol("hotspotMap"),X_=Symbol("mutationCallback"),j_=Symbol("observer"),Y_=Symbol("addHotspot"),K_=Symbol("removeHotspot"),J_=new Ye; -/*! -fflate - fast JavaScript compression/decompression - -Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE -version 0.6.9 -*/ -var $_=function(t){return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};try{URL.revokeObjectURL($_(""))}catch(Vc){$_=function(t){return"data:application/javascript;charset=UTF-8,"+encodeURI(t)}}var Z_=Uint8Array,tE=Uint16Array,eE=Uint32Array,iE=new Z_([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),nE=new Z_([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rE=new Z_([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sE=function(t,e){for(var i=new tE(31),n=0;n<31;++n)i[n]=e+=1<>>1|(21845&uE)<<1;dE=(61680&(dE=(52428&dE)>>>2|(13107&dE)<<2))>>>4|(3855&dE)<<4,hE[uE]=((65280&dE)>>>8|(255&dE)<<8)>>>1}var AE=function(t,e,i){for(var n=t.length,r=0,s=new tE(e);r>>l]=c}else for(a=new tE(n),r=0;r>>15-t[r]);return a},pE=new Z_(288);for(uE=0;uE<144;++uE)pE[uE]=8;for(uE=144;uE<256;++uE)pE[uE]=9;for(uE=256;uE<280;++uE)pE[uE]=7;for(uE=280;uE<288;++uE)pE[uE]=8;var mE=new Z_(32);for(uE=0;uE<32;++uE)mE[uE]=5;var gE=AE(pE,9,0),fE=AE(mE,5,0),vE=function(t){return(t/8|0)+(7&t&&1)},_E=function(t,e,i){(null==e||e<0)&&(e=0),(null==i||i>t.length)&&(i=t.length);var n=new(t instanceof tE?tE:t instanceof eE?eE:Z_)(i-e);return n.set(t.subarray(e,i)),n},EE=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>>8},yE=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>>8,t[n+2]|=i>>>16},xE=function(t,e){for(var i=[],n=0;nd&&(d=s[n].s);var A=new tE(d+1),p=SE(i[h-1],A,0);if(p>e){n=0;var m=0,g=p-e,f=1<e))break;m+=f-(1<>>=g;m>0;){var _=s[n].s;A[_]=0&&m;--n){var E=s[n].s;A[E]==e&&(--A[E],++m)}p=e}return[new Z_(A),p]},SE=function(t,e,i){return-1==t.s?Math.max(SE(t.l,e,i+1),SE(t.r,e,i+1)):e[t.s]=i},CE=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new tE(++e),n=0,r=t[0],s=1,a=function(t){i[n++]=t},o=1;o<=e;++o)if(t[o]==r&&o!=e)++s;else{if(!r&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(r),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(r);s=1,r=t[o]}return[i.subarray(0,n),e]},IE=function(t,e){for(var i=0,n=0;n>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var s=0;s4&&!M[rE[b-1]];--b);var T,B,R,L,D=c+5<<3,U=IE(r,pE)+IE(s,mE)+a,P=IE(r,d)+IE(s,m)+a+14+3*b+IE(S,M)+(2*S[16]+3*S[17]+7*S[18]);if(D<=U&&D<=P)return ME(e,h,t.subarray(l,l+c));if(EE(e,h,1+(P15&&(EE(e,h,O[C]>>>5&127),h+=O[C]>>>12)}}}else T=gE,B=pE,R=fE,L=mE;for(C=0;C255){k=n[C]>>>18&31;yE(e,h,T[k+257]),h+=B[k+257],k>7&&(EE(e,h,n[C]>>>23&31),h+=iE[k]);var G=31&n[C];yE(e,h,R[G]),h+=L[G],G>3&&(yE(e,h,n[C]>>>5&8191),h+=nE[G])}else yE(e,h,T[n[C]]),h+=B[n[C]];return yE(e,h,T[256]),h+B[256]},bE=new eE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),TE=new Z_(0),BE=function(){for(var t=new eE(256),e=0;e<256;++e){for(var i=e,n=9;--n;)i=(1&i&&3988292384)^i>>>1;t[e]=i}return t}(),RE=function(){var t=-1;return{p:function(e){for(var i=t,n=0;n>>8;t=i},d:function(){return~t}}},LE=function(t,e,i,n,r){return function(t,e,i,n,r,s){var a=t.length,o=new Z_(n+a+5*(1+Math.ceil(a/7e3))+r),l=o.subarray(n,o.length-r),c=0;if(!e||a<8)for(var h=0;h<=a;h+=65535){var u=h+65535;u>>13,p=8191&d,m=(1<7e3||M>24576)&&L>423){c=wE(t,l,0,y,x,S,I,M,b,h-b,c),M=C=I=0,b=h;for(var D=0;D<286;++D)x[D]=0;for(D=0;D<30;++D)S[D]=0}var U=2,P=0,N=p,F=B-R&32767;if(L>2&&T==E(h-F))for(var Q=Math.min(A,L)-1,O=Math.min(32767,h),k=Math.min(258,L);F<=O&&--N&&B!=R;){if(t[h+U]==t[h+U-F]){for(var G=0;GU){if(U=G,P=F,G>Q)break;var H=Math.min(F,G-2),z=0;for(D=0;Dz&&(z=W,R=V)}}}F+=(B=R)-(R=g[B])+32768&32767}if(P){y[M++]=268435456|lE[U]<<18|cE[P];var q=31&lE[U],X=31&cE[P];I+=iE[q]+nE[X],++x[257+q],++S[X],w=h+U,++C}else y[M++]=t[h],++x[t[h]]}}c=wE(t,l,s,y,x,S,I,M,b,h-b,c),!s&&7&c&&(c=ME(l,c+1,TE))}return _E(o,0,n+vE(c)+r)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,i,n,!r)},DE=function(t,e){var i={};for(var n in t)i[n]=t[n];for(var n in e)i[n]=e[n];return i},UE=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8};function PE(t,e){return LE(t,e||{},0,0)}var NE=function(t,e,i,n){for(var r in t){var s=t[r],a=e+r;s instanceof Z_?i[a]=[s,n]:Array.isArray(s)?i[a]=[s[0],DE(n,s[1])]:NE(s,a+"/",i,n)}},FE="undefined"!=typeof TextEncoder&&new TextEncoder,QE="undefined"!=typeof TextDecoder&&new TextDecoder;try{QE.decode(TE,{stream:!0}),1}catch(Vc){}function OE(t,e){if(e){for(var i=new Z_(t.length),n=0;n>1)),a=0,o=function(t){s[a++]=t};for(n=0;ns.length){var l=new Z_(a+8+(r-n<<1));l.set(s),s=l}var c=t.charCodeAt(n);c<128||e?o(c):c<2048?(o(192|c>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&t.charCodeAt(++n))>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|63&c)):(o(224|c>>12),o(128|c>>6&63),o(128|63&c))}return _E(s,0,a)}var kE=function(t){var e=0;if(t)for(var i in t){var n=t[i].length;if(n>65535)throw"extra field too long";e+=n+4}return e},GE=function(t,e,i,n,r,s,a,o){var l=n.length,c=i.extra,h=o&&o.length,u=kE(c);UE(t,e,null!=a?33639248:67324752),e+=4,null!=a&&(t[e++]=20,t[e++]=i.os),t[e]=20,e+=2,t[e++]=i.flag<<1|(null==s&&8),t[e++]=r&&8,t[e++]=255&i.compression,t[e++]=i.compression>>8;var d=new Date(null==i.mtime?Date.now():i.mtime),A=d.getFullYear()-1980;if(A<0||A>119)throw"date not in range 1980-2099";if(UE(t,e,A<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),e+=4,null!=s&&(UE(t,e,i.crc),UE(t,e+4,s),UE(t,e+8,i.size)),UE(t,e+12,l),UE(t,e+14,u),e+=16,null!=a&&(UE(t,e,h),UE(t,e+6,i.attrs),UE(t,e+10,a),e+=14),t.set(n,e),e+=l,u)for(var p in c){var m=c[p],g=m.length;UE(t,e,+p),UE(t,e+2,g),t.set(m,e+4),e+=4+g}return h&&(t.set(o,e),e+=h),e};function HE(t,e){e||(e={});var i={},n=[];NE(t,"",i,e);var r=0,s=0;for(var a in i){var o=i[a],l=o[0],c=o[1],h=0==c.level?0:8,u=(S=OE(a)).length,d=c.comment,A=d&&OE(d),p=A&&A.length,m=kE(c.extra);if(u>65535)throw"filename too long";var g=h?PE(l,c):l,f=g.length,v=RE();v.p(l),n.push(DE(c,{size:l.length,crc:v.d(),c:g,f:S,m:A,u:u!=a.length||A&&d.length!=p,o:r,compression:h})),r+=30+u+m+f,s+=76+2*(u+m)+(p||0)+f}for(var _=new Z_(s+22),E=r,y=s-r,x=0;x{if(t.isMesh){const e=t.geometry,n=t.material;if(n.isMeshStandardMaterial){const a="geometries/Geometry_"+e.id+".usda";if(!(a in i)){const t=function(t){const e=function(t){const e="Geometry",i=t.attributes,n=i.position.count;return`\n\tdef Mesh "${e}"\n\t{\n\t\tint[] faceVertexCounts = [${function(t){const e=null!==t.index?t.index.count:t.attributes.position.count;return Array(e/3).fill(3).join(", ")}(t)}]\n\t\tint[] faceVertexIndices = [${function(t){const e=t.index,i=[];if(null!==e)for(let t=0;t0?i:"",r=t["uv"+n];void 0!==r&&(e+=`\n\t\ttexCoord2f[] primvars:st${n} = [${KE(r)}] (\n\t\t\tinterpolation = "vertex"\n\t\t)`)}return e}(i)}\n\t\tuniform token subdivisionScheme = "none"\n\t}\n`}(t);return`\ndef "Geometry"\n{\n${e}\n}\n`}(e);i[a]=function(t){let e=qE();return e+=t,OE(e)}(t)}n.uuid in s||(s[n.uuid]=n),r+=function(t,e,i){const n="Object_"+t.id,r=XE(t.matrixWorld);t.matrixWorld.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",t);return`def Xform "${n}" (\n\tprepend references = @./geometries/Geometry_${e.id}.usda@\n\tprepend apiSchemas = ["MaterialBindingAPI"]\n)\n{\n\tmatrix4d xformOp:transform = ${r}\n\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\trel material:binding = \n}\n\n`}(t,e,n)}else console.warn("THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)",t)}else t.isCamera&&(r+=function(t){const e=t.name?t.name:"Camera_"+t.id,i=XE(t.matrixWorld);t.matrixWorld.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",t);return t.isOrthographicCamera?`def Camera "${e}"\n\t\t{\n\t\t\tmatrix4d xformOp:transform = ${i}\n\t\t\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\t\t\tfloat2 clippingRange = (${t.near.toPrecision(WE)}, ${t.far.toPrecision(WE)})\n\t\t\tfloat horizontalAperture = ${(10*(Math.abs(t.left)+Math.abs(t.right))).toPrecision(WE)}\n\t\t\tfloat verticalAperture = ${(10*(Math.abs(t.top)+Math.abs(t.bottom))).toPrecision(WE)}\n\t\t\ttoken projection = "orthographic"\n\t\t}\n\t\n\t`:`def Camera "${e}"\n\t\t{\n\t\t\tmatrix4d xformOp:transform = ${i}\n\t\t\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\t\t\tfloat2 clippingRange = (${t.near.toPrecision(WE)}, ${t.far.toPrecision(WE)})\n\t\t\tfloat focalLength = ${t.getFocalLength().toPrecision(WE)}\n\t\t\tfloat focusDistance = ${t.focus.toPrecision(WE)}\n\t\t\tfloat horizontalAperture = ${t.getFilmWidth().toPrecision(WE)}\n\t\t\ttoken projection = "perspective"\n\t\t\tfloat verticalAperture = ${t.getFilmHeight().toPrecision(WE)}\n\t\t}\n\t\n\t`} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */(t))})),r+="\n\t\t}\n\t}\n}\n\n",r+=function(t,e,i=!1){const n=[];for(const r in t){const s=t[r];n.push(JE(s,e,i))}return`def "Materials"\n{\n${n.join("")}\n}\n\n`}(s,a,e.quickLookCompatible),i[n]=OE(r),r=null;for(const t in a){let e=a[t];!0===e.isCompressedTexture&&(e=Dd(e));const n=VE(e.image,e.flipY),r=await new Promise((t=>n.toBlob(t,"image/png",1)));i[`textures/Texture_${t}.png`]=new Uint8Array(await r.arrayBuffer())}let o=0;for(const t in i){const e=i[t];o+=34+t.length;const n=63&o;if(4!==n){const r=new Uint8Array(64-n);i[t]=[e,{extra:{12345:r}}]}o=e.length}return HE(i,{level:0})}}function VE(t,e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=1024/Math.max(t.width,t.height),n=document.createElement("canvas");n.width=t.width*Math.min(1,i),n.height=t.height*Math.min(1,i);const r=n.getContext("2d");return!0===e&&(r.translate(0,n.height),r.scale(1,-1)),r.drawImage(t,0,0,n.width,n.height),n}throw new Error("THREE.USDZExporter: No valid image data found. Unable to process texture.")}const WE=7;function qE(){return'#usda 1.0\n(\n\tcustomLayerData = {\n\t\tstring creator = "Three.js USDZExporter"\n\t}\n\tdefaultPrim = "Root"\n\tmetersPerUnit = 1\n\tupAxis = "Y"\n)\n\n'}function XE(t){const e=t.elements;return`( ${jE(e,0)}, ${jE(e,4)}, ${jE(e,8)}, ${jE(e,12)} )`}function jE(t,e){return`(${t[e+0]}, ${t[e+1]}, ${t[e+2]}, ${t[e+3]})`}function YE(t,e){if(void 0===t)return console.warn("USDZExporter: Normals missing."),Array(e).fill("(0, 0, 0)").join(", ");const i=[];for(let e=0;e0?"st"+n.channel:"st",l={1e3:"repeat",1001:"clamp",1002:"mirror"},c=n.repeat.clone(),h=n.offset.clone(),u=n.rotation,d=Math.sin(u),A=Math.cos(u);return h.y=1-h.y-c.y,i?(h.x=h.x/c.x,h.y=h.y/c.y,h.x+=d/c.x,h.y+=A-1):(h.x+=d*c.x,h.y+=(1-A)*c.y),`\n\t\tdef Shader "PrimvarReader_${r}"\n\t\t{\n\t\t\tuniform token info:id = "UsdPrimvarReader_float2"\n\t\t\tfloat2 inputs:fallback = (0.0, 0.0)\n\t\t\ttoken inputs:varname = "${o}"\n\t\t\tfloat2 outputs:result\n\t\t}\n\n\t\tdef Shader "Transform2d_${r}"\n\t\t{\n\t\t\tuniform token info:id = "UsdTransform2d"\n\t\t\ttoken inputs:in.connect = \n\t\t\tfloat inputs:rotation = ${(u*(180/Math.PI)).toFixed(WE)}\n\t\t\tfloat2 inputs:scale = ${ZE(c)}\n\t\t\tfloat2 inputs:translation = ${ZE(h)}\n\t\t\tfloat2 outputs:result\n\t\t}\n\n\t\tdef Shader "Texture_${n.id}_${r}"\n\t\t{\n\t\t\tuniform token info:id = "UsdUVTexture"\n\t\t\tasset inputs:file = @textures/Texture_${a}.png@\n\t\t\tfloat2 inputs:st.connect = \n\t\t\t${void 0!==s?"float4 inputs:scale = "+function(t){return`(${t.r}, ${t.g}, ${t.b}, 1.0)`}(s):""}\n\t\t\ttoken inputs:sourceColorSpace = "${n.colorSpace===gt?"raw":"sRGB"}"\n\t\t\ttoken inputs:wrapS = "${l[n.wrapS]}"\n\t\t\ttoken inputs:wrapT = "${l[n.wrapT]}"\n\t\t\tfloat outputs:r\n\t\t\tfloat outputs:g\n\t\t\tfloat outputs:b\n\t\t\tfloat3 outputs:rgb\n\t\t\t${t.transparent||t.alphaTest>0?"float outputs:a":""}\n\t\t}`}return t.side===c&&console.warn("THREE.USDZExporter: USDZ does not support double sided materials",t),null!==t.map?(r.push(`${n}color3f inputs:diffuseColor.connect = `),t.transparent?r.push(`${n}float inputs:opacity.connect = `):t.alphaTest>0&&(r.push(`${n}float inputs:opacity.connect = `),r.push(`${n}float inputs:opacityThreshold = ${t.alphaTest}`)),s.push(a(t.map,"diffuse",t.color))):r.push(`${n}color3f inputs:diffuseColor = ${$E(t.color)}`),null!==t.emissiveMap?(r.push(`${n}color3f inputs:emissiveColor.connect = `),s.push(a(t.emissiveMap,"emissive"))):t.emissive.getHex()>0&&r.push(`${n}color3f inputs:emissiveColor = ${$E(t.emissive)}`),null!==t.normalMap&&(r.push(`${n}normal3f inputs:normal.connect = `),s.push(a(t.normalMap,"normal"))),null!==t.aoMap&&(r.push(`${n}float inputs:occlusion.connect = `),s.push(a(t.aoMap,"occlusion"))),null!==t.roughnessMap&&1===t.roughness?(r.push(`${n}float inputs:roughness.connect = `),s.push(a(t.roughnessMap,"roughness"))):r.push(`${n}float inputs:roughness = ${t.roughness}`),null!==t.metalnessMap&&1===t.metalness?(r.push(`${n}float inputs:metallic.connect = `),s.push(a(t.metalnessMap,"metallic"))):r.push(`${n}float inputs:metallic = ${t.metalness}`),null!==t.alphaMap?(r.push(`${n}float inputs:opacity.connect = `),r.push(`${n}float inputs:opacityThreshold = 0.0001`),s.push(a(t.alphaMap,"opacity"))):r.push(`${n}float inputs:opacity = ${t.opacity}`),t.isMeshPhysicalMaterial&&(r.push(`${n}float inputs:clearcoat = ${t.clearcoat}`),r.push(`${n}float inputs:clearcoatRoughness = ${t.clearcoatRoughness}`),r.push(`${n}float inputs:ior = ${t.ior}`)),`\n\tdef Material "Material_${t.id}"\n\t{\n\t\tdef Shader "PreviewSurface"\n\t\t{\n\t\t\tuniform token info:id = "UsdPreviewSurface"\n${r.join("\n")}\n\t\t\tint inputs:useSpecularWorkflow = 0\n\t\t\ttoken outputs:surface\n\t\t}\n\n\t\ttoken outputs:surface.connect = \n\n${s.join("\n")}\n\n\t}\n`}function $E(t){return`(${t.r}, ${t.g}, ${t.b})`}function ZE(t){return`(${t.x}, ${t.y})`} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var ty=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};let ey=!1,iy=!1;const ny="#model-viewer-no-ar-fallback",ry=(sy=["quick-look","scene-viewer","webxr","none"],t=>{try{const e=kA(t),i=(e.length?e[0].terms:[]).filter((t=>t&&"ident"===t.type)).map((t=>t.value)).filter((t=>sy.indexOf(t)>-1));return new Set(i)}catch(t){}return new Set});var sy;const ay="quick-look",oy="scene-viewer",ly="webxr",cy="none",hy=Symbol("arButtonContainer"),uy=Symbol("enterARWithWebXR"),dy=Symbol("openSceneViewer"),Ay=Symbol("openIOSARQuickLook"),py=Symbol("canActivateAR"),my=Symbol("arMode"),gy=Symbol("arModes"),fy=Symbol("arAnchor"),vy=Symbol("preload"),_y=Symbol("onARButtonContainerClick"),Ey=Symbol("onARStatus"),yy=Symbol("onARTracking"),xy=Symbol("onARTap"),Sy=Symbol("selectARMode"),Cy=Symbol("triggerLoad"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Iy=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const My="auto",wy="auto",by="eager",Ty=Symbol("defaultProgressBarElement"),By=Symbol("posterContainerElement"),Ry=Symbol("defaultPosterElement"),Ly=Symbol("shouldDismissPoster"),Dy=Symbol("hidePoster"),Uy=Symbol("modelIsRevealed"),Py=Symbol("updateProgressBar"),Ny=Symbol("ariaLabelCallToAction"),Fy=Symbol("onProgress"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Qy=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const Oy=Math.PI/32,ky={basis:[YA(OA(Oy,"rad"))],keywords:{auto:[null]}},Gy=Symbol("autoRotateStartTime"),Hy=Symbol("radiansPerSecond"),zy=Symbol("syncRotationRate"),Vy=Symbol("onCameraChange"),Wy=(t=>{var e,i,n;class r extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=t=>{t.forEach((t=>{t instanceof MutationRecord&&"childList"!==t.type||(t.addedNodes.forEach((t=>{this[Y_](t)})),t.removedNodes.forEach((t=>{this[K_](t)})),this[B_]())}))},this[n]=new MutationObserver(this[X_])}connectedCallback(){super.connectedCallback();for(let t=0;t{var i,n,r;class s extends t{constructor(){super(...arguments),this[i]=void 0,this[n]=null,this[r]=null,this.variantName=null,this.orientation="0 0 0",this.scale="1 1 1"}get model(){return this[xv]}get availableVariants(){return this.model?this.model[pv]():[]}get originalGltfJson(){return this[yv]}[(i=xv,n=Ev,r=yv,Sv)](){return()=>{this[B_]()}}[Cv](t){return t.colorSpace=ft,t.wrapS=w,t.wrapT=w,new uf(this[Sv](),t)}async createTexture(t,e="image/png"){const{textureUtils:i}=this[U_],n=await i.loadImage(t);return n.userData.mimeType=e,this[Cv](n)}async createLottieTexture(t,e=1){const{textureUtils:i}=this[U_],n=await i.loadLottie(t,e);return this[Cv](n)}createVideoTexture(t){const e=document.createElement("video");e.crossOrigin=this.withCredentials?"use-credentials":"anonymous",e.src=t,e.muted=!0,e.playsInline=!0,e.loop=!0,e.play();const i=new yo(e);return this[Cv](i)}createCanvasTexture(){const t=document.createElement("canvas"),e=new Io(t);return this[Cv](e)}async updated(t){if(super.updated(t),t.has("variantName")){const t=this[P_].beginActivity("variant-update");t(.1);const e=this[xv],{variantName:i}=this;null!=e&&(await e[cv](i),this[B_](),this.dispatchEvent(new CustomEvent("variant-applied"))),t(1)}if(t.has("orientation")||t.has("scale")){if(!this.loaded)return;const t=this[T_];t.applyTransform(),t.updateBoundingBox(),t.updateShadow(),this[U_].arRenderer.onUpdateScene(),this[B_]()}}[L_](){super[L_]();const{currentGLTF:t}=this[T_];if(null!=t){const{correlatedSceneGraph:e}=t;null!=e&&t!==this[Ev]&&(this[xv]=new vv(e,this[Sv]()),this[yv]=JSON.parse(JSON.stringify(e.gltf))),"variants"in t.userData&&this.requestUpdate("variantName")}this[Ev]=t}async exportScene(t){const e=this[T_];return new Promise((async(i,n)=>{const r={binary:!0,onlyVisible:!0,maxTextureSize:1/0,includeCustomExtensions:!1,forceIndices:!1};Object.assign(r,t),r.animations=e.animations,r.truncateDrawRange=!0;const s=e.shadow;let a=!1;null!=s&&(a=s.visible,s.visible=!1),await this[xv][lv]();(new Pd).register((t=>new BA(t))).parse(e.model,(t=>i(new Blob([r.binary?t:JSON.stringify(t)],{type:r.binary?"application/octet-stream":"application/json"}))),(()=>n("glTF export failed")),r),null!=s&&(s.visible=a)}))}materialFromPoint(t,e){const i=this[xv];if(null==i)return null;const n=this[T_],r=n.getNDC(t,e),s=n.hitFromPoint(r);return null==s||null==s.face?null:i[hv](s)}}return _v([e({type:String,attribute:"variant-name"})],s.prototype,"variantName",void 0),_v([e({type:String,attribute:"orientation"})],s.prototype,"orientation",void 0),_v([e({type:String,attribute:"scale"})],s.prototype,"scale",void 0),s})((t=>{var i,n,r;class s extends t{constructor(){super(...arguments),this.autoRotate=!1,this.autoRotateDelay=3e3,this.rotationPerSecond="auto",this[i]=performance.now(),this[n]=0,this[r]=t=>{this.autoRotate&&"user-interaction"===t.detail.source&&(this[Gy]=performance.now())}}connectedCallback(){super.connectedCallback(),this.addEventListener("camera-change",this[Vy]),this[Gy]=performance.now()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("camera-change",this[Vy]),this[Gy]=performance.now()}updated(t){super.updated(t),t.has("autoRotate")&&(this[Gy]=performance.now())}[(i=Gy,n=Hy,zy)](t){this[Hy]=t[0]}[R_](t,e){if(super[R_](t,e),!this.autoRotate||!this[F_]()||this[U_].isPresenting)return;const i=Math.min(e,t-this[Gy]-this.autoRotateDelay);i>0&&(this[T_].yaw=this.turntableRotation+this[Hy]*i*.001)}get turntableRotation(){return this[T_].yaw}resetTurntableRotation(t=0){this[T_].yaw=t}}return r=Vy,Qy([e({type:Boolean,attribute:"auto-rotate"})],s.prototype,"autoRotate",void 0),Qy([e({type:Number,attribute:"auto-rotate-delay"})],s.prototype,"autoRotateDelay",void 0),Qy([Pp({intrinsics:ky,updateHandler:zy}),e({type:String,attribute:"rotation-per-second"})],s.prototype,"rotationPerSecond",void 0),s})((t=>{var i,n,r;class s extends t{constructor(){super(...arguments),this.environmentImage=null,this.skyboxImage=null,this.shadowIntensity=0,this.shadowSoftness=1,this.exposure=1,this.toneMapping="auto",this.skyboxHeight="0",this[i]=null,this[n]=null,this[r]=null}updated(t){super.updated(t),t.has("shadowIntensity")&&(this[T_].setShadowIntensity(.5*this.shadowIntensity),this[B_]()),t.has("shadowSoftness")&&(this[T_].setShadowSoftness(this.shadowSoftness),this[B_]()),t.has("exposure")&&(this[T_].exposure=this.exposure,this[B_]()),t.has("toneMapping")&&(this[T_].toneMapping="commerce"===this.toneMapping?_:"agx"===this.toneMapping?E:v,this[B_]()),(t.has("environmentImage")||t.has("skyboxImage"))&&this[Q_]()&&this[Ih](),t.has("skyboxHeight")&&(this[T_].setGroundedSkybox(),this[B_]())}hasBakedShadow(){return this[T_].bakedShadows.size>0}async[(i=Sh,n=Ch,r=Mh,Ih)](){const{skyboxImage:t,environmentImage:e}=this;null!=this[Mh]&&(this[Mh](),this[Mh]=null);const{textureUtils:i}=this[U_];if(null==i)return;const n=this[P_].beginActivity("environment-update");try{const{environmentMap:r,skybox:s}=await i.generateEnvironmentMapAndSkybox(mh(t),e,(t=>n(_h(t,0,1))));this[Sh]!==r&&(this[Sh]=r,this.dispatchEvent(new CustomEvent("environment-change"))),this[Ch]=null!=s?s.name===r.name?r:s:null,this[T_].setEnvironmentAndSkybox(this[Sh],this[Ch])}catch(t){if(t instanceof Error)throw this[T_].setEnvironmentAndSkybox(null,null),t}finally{n(1)}}}return xh([e({type:String,attribute:"environment-image"})],s.prototype,"environmentImage",void 0),xh([e({type:String,attribute:"skybox-image"})],s.prototype,"skyboxImage",void 0),xh([e({type:Number,attribute:"shadow-intensity"})],s.prototype,"shadowIntensity",void 0),xh([e({type:Number,attribute:"shadow-softness"})],s.prototype,"shadowSoftness",void 0),xh([e({type:Number})],s.prototype,"exposure",void 0),xh([e({type:String,attribute:"tone-mapping"})],s.prototype,"toneMapping",void 0),xh([e({type:String,attribute:"skybox-height"})],s.prototype,"skyboxHeight",void 0),s})((t=>{var i,n,r,s,a,o,l,c,h,u,d,A,p,m,g,f,v;class _ extends t{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=Hp,this.cameraTarget="auto auto auto",this.fieldOfView="auto",this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=3e3,this.interactionPrompt=Wp,this.interactionPromptStyle=Xp,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=jp,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=50,this[i]=this.shadowRoot.querySelector(".interaction-prompt"),this[n]=this.shadowRoot.querySelector("#prompt"),this[r]=[this.shadowRoot.querySelector("#finger0"),this.shadowRoot.querySelector("#finger1")],this[s]=this.shadowRoot.querySelector(".pan-target"),this[a]=0,this[o]=1/0,this[l]=!1,this[c]=!1,this[h]=Fm.AUTOMATIC,this[u]=new Qm(this[T_].camera,this[w_],this[T_]),this[d]=new Pl,this[A]=!1,this[p]=!1,this[m]=!1,this[g]=()=>{const t=this[sm].changeSource;this[Em]=t,t===Fm.USER_INTERACTION&&(this[fm]=!0,this[hm]())},this[f]=()=>{this[um](),this[B_]();const t=this[sm].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:t}}))},this[v]=t=>{this[M_].classList.toggle("pointer-tumbling","pointer-change-start"===t.type)}}get inputSensitivity(){return this[sm].inputSensitivity}set inputSensitivity(t){this[sm].inputSensitivity=t}getCameraOrbit(){const{theta:t,phi:e,radius:i}=this[ym];return{theta:t,phi:e,radius:i,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return O_(this[U_].isPresenting?this[U_].arRenderer.target:this[T_].getTarget())}getFieldOfView(){return this[sm].getFieldOfView()}getMinimumFieldOfView(){return this[sm].options.minimumFieldOfView}getMaximumFieldOfView(){return this[sm].options.maximumFieldOfView}getIdealAspect(){return this[T_].idealAspect}jumpCameraToGoal(){this[xm]=!0,this.requestUpdate(xm,!1)}resetInteractionPrompt(){this[_m]=0,this[vm]=1/0,this[fm]=!1,this[gm]=this.interactionPrompt===Wp&&this.cameraControls}zoom(t){const e=new WheelEvent("wheel",{deltaY:-30*t});this[w_].dispatchEvent(e)}connectedCallback(){super.connectedCallback(),this[sm].addEventListener("user-interaction",this[Am]),this[sm].addEventListener("pointer-change-start",this[mm]),this[sm].addEventListener("pointer-change-end",this[mm])}disconnectedCallback(){super.disconnectedCallback(),this[sm].removeEventListener("user-interaction",this[Am]),this[sm].removeEventListener("pointer-change-start",this[mm]),this[sm].removeEventListener("pointer-change-end",this[mm])}updated(t){super.updated(t);const e=this[sm],i=this[T_];if(t.has("cameraControls")&&(this.cameraControls?(e.enableInteraction(),this.interactionPrompt===Wp&&(this[gm]=!0)):(e.disableInteraction(),this[hm]()),this[w_].setAttribute("aria-label",this[__])),t.has("disableZoom")&&(e.disableZoom=this.disableZoom),t.has("disablePan")&&(e.enablePan=!this.disablePan),t.has("disableTap")&&(e.enableTap=!this.disableTap),(t.has("interactionPrompt")||t.has("cameraControls")||t.has("src"))&&(this.interactionPrompt===Wp&&this.cameraControls&&!this[fm]?this[gm]=!0:this[hm]()),t.has("interactionPromptStyle")&&(this[lm].style.opacity=this.interactionPromptStyle==qp?"1":"0"),t.has("touchAction")){const t=this.touchAction;e.applyOptions({touchAction:t}),e.updateTouchActionStyle()}t.has("orbitSensitivity")&&(e.orbitSensitivity=this.orbitSensitivity),t.has("zoomSensitivity")&&(e.zoomSensitivity=this.zoomSensitivity),t.has("panSensitivity")&&(e.panSensitivity=this.panSensitivity),t.has("interpolationDecay")&&(e.setDamperDecayTime(this.interpolationDecay),i.setTargetDamperDecayTime(this.interpolationDecay)),!0===this[xm]&&Promise.resolve().then((()=>{e.jumpToGoal(),i.jumpToGoal(),this[pm](),this[xm]=!1}))}async updateFraming(){const t=this[T_],e=t.adjustedFoV(t.framedFoVDeg);await t.updateFraming();const i=t.adjustedFoV(t.framedFoVDeg),n=this[sm].getFieldOfView()/e;this[sm].setFieldOfView(i*n),this[Cm]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(t,e,i){const n=this[w_],r=this[cm];if("1"===r[0].style.opacity)return void console.warn("interact() failed because an existing interaction is running.");const s=new Array;s.push({x:Qp(e.x),y:Qp(e.y)});const a=[{x:s[0].x(0),y:s[0].y(0)}];null!=i&&(s.push({x:Qp(i.x),y:Qp(i.y)}),a.push({x:s[1].x(0),y:s[1].y(0)}));let o=performance.now();const{width:l,height:c}=this[T_],h=this.getBoundingClientRect(),u=t=>{for(const[e,i]of a.entries()){const{style:s}=r[e];s.transform=`translateX(${l*i.x}px) translateY(${c*i.y}px)`,"pointerdown"===t?s.opacity="1":"pointerup"===t&&(s.opacity="0");const a={pointerId:e-5678,pointerType:"touch",target:n,clientX:l*i.x+h.x,clientY:c*i.y+h.y,altKey:!0};n.dispatchEvent(new PointerEvent(t,a))}},d=()=>{const e=this[Em];if(e!==Fm.AUTOMATIC||!n.isConnected){for(const t of this[cm])t.style.opacity="0";return u("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:e}})),void document.removeEventListener("visibilitychange",A)}const i=Math.min(1,(performance.now()-o)/t);for(const[t,e]of a.entries())e.x=s[t].x(i),e.y=s[t].y(i);u("pointermove"),i<1?requestAnimationFrame(d):(u("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:Fm.AUTOMATIC}})),document.removeEventListener("visibilitychange",A))},A=()=>{let t=0;"hidden"===document.visibilityState?t=performance.now()-o:o=performance.now()-t};document.addEventListener("visibilitychange",A),u("pointerdown"),this[Em]=Fm.AUTOMATIC,requestAnimationFrame(d)}[(i=om,n=lm,r=cm,s=am,a=_m,o=vm,l=fm,c=gm,h=Em,u=sm,d=ym,A=xm,p=Sm,m=Cm,Mm)](t){const e=this[sm],i=this[T_];i.framedFoVDeg=180*t[0]/Math.PI,e.changeSource=Fm.NONE,e.setFieldOfView(i.adjustedFoV(i.framedFoVDeg)),this[Am]()}[Im](t){const e=this[sm];if(this[Cm]){const{theta:e,phi:i}=this.getCameraOrbit();t[0]=e,t[1]=i,this[Cm]=!1}e.changeSource=Fm.NONE,e.setOrbit(t[0],t[1],t[2]),this[Am]()}[bm](t){this[sm].applyOptions({minimumAzimuthalAngle:t[0],minimumPolarAngle:t[1],minimumRadius:t[2]}),this.jumpCameraToGoal()}[Tm](t){this[sm].applyOptions({maximumAzimuthalAngle:t[0],maximumPolarAngle:t[1],maximumRadius:t[2]}),this[dm](t[2]),this.jumpCameraToGoal()}[Bm](t){this[sm].applyOptions({minimumFieldOfView:180*t[0]/Math.PI}),this.jumpCameraToGoal()}[Rm](t){const e=this[T_].adjustedFoV(180*t[0]/Math.PI);this[sm].applyOptions({maximumFieldOfView:e}),this.jumpCameraToGoal()}[wm](t){const[e,i,n]=t;this[U_].arRenderer.isPresenting||this[T_].setTarget(e,i,n),this[sm].changeSource=Fm.NONE,this[U_].arRenderer.updateTarget(),this[Am]()}[R_](t,e){if(super[R_](t,e),this[U_].isPresenting||!this[F_]())return;const i=this[sm],n=this[T_],r=performance.now();if(this[gm]&&this.loaded&&r>this[S_]+this.interactionPromptThreshold&&(this[gm]=!1,this[vm]=r,this[om].classList.add("visible")),isFinite(this[vm])&&this.interactionPromptStyle===Xp){const t=(r-this[vm])/5e3%1,e=kp(t),s=Gp(t);if(this[lm].style.opacity=`${s}`,e!==this[_m]){const t=e*n.width*.05,r=(e-this[_m])*Math.PI/16;this[lm].style.transform=`translateX(${t}px)`,i.changeSource=Fm.AUTOMATIC,i.adjustOrbit(r,0,0),this[_m]=e}}const s=i.update(t,e),a=n.updateTarget(e);(s||a)&&this[pm]()}[hm](){this[gm]=!1,this[om].classList.remove("visible"),this[vm]=1/0}[dm](t){const e=Math.max(this[T_].farRadius(),t),i=Math.abs(2*e);this[sm].updateNearFar(0,i)}[um](){const{theta:t,phi:e}=this[sm].getCameraSpherical(this[ym]),i=(4+Math.floor((t%rm+nm)/em))%4,n=Math.floor(e/im),r=zp[i],s=Vp[n];this[x_](`View from stage ${s}${r}`)}get[__](){return super[__].replace(/\.$/,"")+(this.cameraControls?". Use mouse, touch or arrow keys to move.":"")}async[D_](t){const e=this[sm],i=this[T_],n=i.adjustedFoV(i.framedFoVDeg);super[D_](t);const r=i.adjustedFoV(i.framedFoVDeg)/n,s=e.getFieldOfView()*(isFinite(r)?r:1);e.updateAspect(this[T_].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[sm].setFieldOfView(s),this.jumpCameraToGoal()}[L_](){super[L_](),this[Sm]?this[Cm]=!0:this[Sm]=!0,this.requestUpdate("maxFieldOfView",this.maxFieldOfView),this.requestUpdate("fieldOfView",this.fieldOfView),this.requestUpdate("minCameraOrbit",this.minCameraOrbit),this.requestUpdate("maxCameraOrbit",this.maxCameraOrbit),this.requestUpdate("cameraOrbit",this.cameraOrbit),this.requestUpdate("cameraTarget",this.cameraTarget),this.jumpCameraToGoal()}}return g=Am,f=pm,v=mm,Op([e({type:Boolean,attribute:"camera-controls"})],_.prototype,"cameraControls",void 0),Op([Pp({intrinsics:Jp,observeEffects:!0,updateHandler:Im}),e({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],_.prototype,"cameraOrbit",void 0),Op([Pp({intrinsics:tm,observeEffects:!0,updateHandler:wm}),e({type:String,attribute:"camera-target",hasChanged:()=>!0})],_.prototype,"cameraTarget",void 0),Op([Pp({intrinsics:Yp,observeEffects:!0,updateHandler:Mm}),e({type:String,attribute:"field-of-view",hasChanged:()=>!0})],_.prototype,"fieldOfView",void 0),Op([Pp({intrinsics:$p,updateHandler:bm}),e({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],_.prototype,"minCameraOrbit",void 0),Op([Pp({intrinsics:Zp,updateHandler:Tm}),e({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],_.prototype,"maxCameraOrbit",void 0),Op([Pp({intrinsics:Kp,updateHandler:Bm}),e({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],_.prototype,"minFieldOfView",void 0),Op([Pp({intrinsics:Yp,updateHandler:Rm}),e({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],_.prototype,"maxFieldOfView",void 0),Op([e({type:Number,attribute:"interaction-prompt-threshold"})],_.prototype,"interactionPromptThreshold",void 0),Op([e({type:String,attribute:"interaction-prompt"})],_.prototype,"interactionPrompt",void 0),Op([e({type:String,attribute:"interaction-prompt-style"})],_.prototype,"interactionPromptStyle",void 0),Op([e({type:Number,attribute:"orbit-sensitivity"})],_.prototype,"orbitSensitivity",void 0),Op([e({type:Number,attribute:"zoom-sensitivity"})],_.prototype,"zoomSensitivity",void 0),Op([e({type:Number,attribute:"pan-sensitivity"})],_.prototype,"panSensitivity",void 0),Op([e({type:String,attribute:"touch-action"})],_.prototype,"touchAction",void 0),Op([e({type:Boolean,attribute:"disable-zoom"})],_.prototype,"disableZoom",void 0),Op([e({type:Boolean,attribute:"disable-pan"})],_.prototype,"disablePan",void 0),Op([e({type:Boolean,attribute:"disable-tap"})],_.prototype,"disableTap",void 0),Op([e({type:Number,attribute:"interpolation-decay"})],_.prototype,"interpolationDecay",void 0),_})((t=>{var i,n,r,s,a,o,l,c,h,u;class d extends t{constructor(){super(...arguments),this.ar=!1,this.arScale="auto",this.arPlacement="floor",this.arModes="webxr scene-viewer quick-look",this.iosSrc=null,this.xrEnvironment=!1,this[i]=!1,this[n]=this.shadowRoot.querySelector(".ar-button"),this[r]=document.createElement("a"),this[s]=new Set,this[a]=cy,this[o]=!1,this[l]=t=>{t.preventDefault(),this.activateAR()},this[c]=({status:t})=>{t!==Om&&this[U_].arRenderer.presentedScene!==this[T_]||(this.setAttribute("ar-status",t),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:t}})),t===Om?this.removeAttribute("ar-tracking"):t===km&&this.setAttribute("ar-tracking",zm))},this[h]=({status:t})=>{this.setAttribute("ar-tracking",t),this.dispatchEvent(new CustomEvent("ar-tracking",{detail:{status:t}}))},this[u]=t=>{"_apple_ar_quicklook_button_tapped"==t.data&&this.dispatchEvent(new CustomEvent("quick-look-button-tapped"))}}get canActivateAR(){return this[my]!==cy}connectedCallback(){super.connectedCallback(),this[U_].arRenderer.addEventListener("status",this[Ey]),this.setAttribute("ar-status",Om),this[U_].arRenderer.addEventListener("tracking",this[yy]),this[fy].addEventListener("message",this[xy])}disconnectedCallback(){super.disconnectedCallback(),this[U_].arRenderer.removeEventListener("status",this[Ey]),this[U_].arRenderer.removeEventListener("tracking",this[yy]),this[fy].removeEventListener("message",this[xy])}update(t){super.update(t),t.has("arScale")&&(this[T_].canScale="fixed"!==this.arScale),t.has("arPlacement")&&(this[T_].updateShadow(),this[B_]()),t.has("arModes")&&(this[gy]=ry(this.arModes)),(t.has("ar")||t.has("arModes")||t.has("src")||t.has("iosSrc"))&&this[Sy]()}async activateAR(){switch(this[my]){case ay:await this[Ay]();break;case ly:await this[uy]();break;case oy:this[dy]();break;default:console.warn("No AR Mode can be activated. This is probably due to missing configuration or device capabilities")}}async[(i=py,n=hy,r=fy,s=gy,a=my,o=vy,l=_y,c=Ey,h=yy,u=xy,Sy)](){let t=cy;if(this.ar){if(null!=this.src)for(const e of this[gy]){if("webxr"===e&&oh&&!ey&&await this[U_].arRenderer.supportsPresentation()){t=ly;break}if("scene-viewer"===e&&dh&&!iy){t=oy;break}if("quick-look"===e&&ph){t=ay;break}}t===cy&&null!=this.iosSrc&&ph&&(t=ay)}if(t!==cy)this[hy].classList.add("enabled"),this[hy].addEventListener("click",this[_y]);else if(this[hy].classList.contains("enabled")){this[hy].removeEventListener("click",this[_y]),this[hy].classList.remove("enabled");const t=Hm;this.setAttribute("ar-status",t),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:t}}))}this[my]=t}async[uy](){console.log("Attempting to present in AR with WebXR..."),await this[Cy]();try{this[hy].removeEventListener("click",this[_y]);const{arRenderer:t}=this[U_];t.placeOnWall="wall"===this.arPlacement,await t.present(this[T_],this.xrEnvironment)}catch(t){console.warn("Error while trying to present in AR with WebXR"),console.error(t),await this[U_].arRenderer.stopPresenting(),ey=!0,console.warn("Falling back to next ar-mode"),await this[Sy](),this.activateAR()}finally{this[Sy]()}}async[Cy](){this.loaded||(this[vy]=!0,this[C_](),await((t,e,i=null)=>new Promise((n=>{t.addEventListener(e,(function r(s){i&&!i(s)||(n(s),t.removeEventListener(e,r))}))})))(this,"load"),this[vy]=!1)}[Q_](){return super[Q_]()||this[vy]}[dy](){const t=self.location.toString(),e=new URL(t),i=new URL(this.src,t);i.hash&&(i.hash="");const n=new URLSearchParams(i.search);if(e.hash=ny,n.set("mode","ar_preferred"),n.has("disable_occlusion")||n.set("disable_occlusion","true"),"fixed"===this.arScale&&n.set("resizable","false"),"wall"===this.arPlacement&&n.set("enable_vertical_placement","true"),n.has("sound")){const e=new URL(n.get("sound"),t);n.set("sound",e.toString())}if(n.has("link")){const e=new URL(n.get("link"),t);n.set("link",e.toString())}const r=`intent://arvr.google.com/scene-viewer/1.0?${n.toString()+"&file="+encodeURIComponent(i.toString())}#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(e.toString())};end;`;self.addEventListener("hashchange",(()=>{self.location.hash===ny&&(iy=!0,self.history.back(),console.warn("Error while trying to present in AR with Scene Viewer"),console.warn("Falling back to next ar-mode"),this[Sy]())}),{once:!0}),this[fy].setAttribute("href",r),console.log("Attempting to present in AR with Scene Viewer..."),this[fy].click()}async[Ay](){const t=!this.iosSrc;this[hy].classList.remove("enabled");const e=t?await this.prepareUSDZ():this.iosSrc,i=new URL(e,self.location.toString());if(t){const t=self.location.toString(),e=new URL(t),n=new URL(this.src,e);n.hash&&(i.hash=n.hash)}"fixed"===this.arScale&&(i.hash&&(i.hash+="&"),i.hash+="allowsContentScaling=0");const n=this[fy];n.setAttribute("rel","ar");const r=document.createElement("img");n.appendChild(r),n.setAttribute("href",i.toString()),t&&n.setAttribute("download","model.usdz"),n.style.display="none",n.isConnected||this.shadowRoot.appendChild(n),console.log("Attempting to present in AR with Quick Look..."),n.click(),n.removeChild(r),t&&URL.revokeObjectURL(e),this[hy].classList.add("enabled")}async prepareUSDZ(){const t=this[P_].beginActivity("usdz-conversion");await this[Cy]();const{model:e,shadow:i}=this[T_];if(null==e)return"";let n=!1;null!=i&&(n=i.visible,i.visible=!1),t(.2);const r=new zE,s=await r.parse(e),a=new Blob([s],{type:"model/vnd.usdz+zip"}),o=URL.createObjectURL(a);return t(1),null!=i&&(i.visible=n),o}}return ty([e({type:Boolean,attribute:"ar"})],d.prototype,"ar",void 0),ty([e({type:String,attribute:"ar-scale"})],d.prototype,"arScale",void 0),ty([e({type:String,attribute:"ar-placement"})],d.prototype,"arPlacement",void 0),ty([e({type:String,attribute:"ar-modes"})],d.prototype,"arModes",void 0),ty([e({type:String,attribute:"ios-src"})],d.prototype,"iosSrc",void 0),ty([e({type:Boolean,attribute:"xr-environment"})],d.prototype,"xrEnvironment",void 0),d})((t=>{var i,n,r,s,a,o,l,c;class h extends t{constructor(...t){super(...t),this.poster=null,this.reveal=My,this.loading=wy,this[i]=!1,this[n]=!1,this[r]=this.shadowRoot.querySelector(".slot.poster"),this[s]=this.shadowRoot.querySelector("#default-poster"),this[a]=this.shadowRoot.querySelector("#default-progress-bar > .bar"),this[o]=this[Ry].getAttribute("aria-label"),this[l]=((t,e)=>{let i=null;const n=(...n)=>{null==i&&(t(...n),i=self.setTimeout((()=>i=null),e))};return n.flush=()=>{null!=i&&(self.clearTimeout(i),i=null)},n})((t=>{const e=this[Ty].parentNode;requestAnimationFrame((()=>{this[Ty].style.transform=`scaleX(${t})`,0===t&&(e.removeChild(this[Ty]),e.appendChild(this[Ty])),this[Ty].classList.toggle("hide",1===t)}))}),100),this[c]=t=>{const e=t.detail.totalProgress;1===e&&(this[Py].flush(),this.loaded&&(this[Ly]||this.reveal===My)&&this[Dy]()),this[Py](e),this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:e}}))};const e=self.ModelViewerElement||{},h=e.dracoDecoderLocation||"https://www.gstatic.com/draco/versioned/decoders/1.5.6/";Ed.setDRACODecoderLocation(h);const u=e.ktx2TranscoderLocation||"https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";Ed.setKTX2TranscoderLocation(u),e.meshoptDecoderLocation&&Ed.setMeshoptDecoderLocation(e.meshoptDecoderLocation);const d=e.lottieLoaderLocation||"https://cdn.jsdelivr.net/npm/three@0.149.0/examples/jsm/loaders/LottieLoader.js";Ng.singleton.textureUtils.lottieLoaderUrl=d}static set dracoDecoderLocation(t){Ed.setDRACODecoderLocation(t)}static get dracoDecoderLocation(){return Ed.getDRACODecoderLocation()}static set ktx2TranscoderLocation(t){Ed.setKTX2TranscoderLocation(t)}static get ktx2TranscoderLocation(){return Ed.getKTX2TranscoderLocation()}static set meshoptDecoderLocation(t){Ed.setMeshoptDecoderLocation(t)}static get meshoptDecoderLocation(){return Ed.getMeshoptDecoderLocation()}static set lottieLoaderLocation(t){Ng.singleton.textureUtils.lottieLoaderUrl=t}static get lottieLoaderLocation(){return Ng.singleton.textureUtils.lottieLoaderUrl}static mapURLs(t){Ng.singleton.loader[fd].manager.setURLModifier(t)}dismissPoster(){this.loaded?this[Dy]():(this[Ly]=!0,this[C_]())}showPoster(){const t=this[By];if(t.classList.contains("show"))return;t.classList.add("show"),this[w_].classList.remove("show");const e=this[Ry];e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden");const i=this.modelIsVisible;this[Uy]=!1,this[v_](i)}getDimensions(){return O_(this[T_].size)}getBoundingBoxCenter(){return O_(this[T_].boundingBox.getCenter(new _e))}connectedCallback(){super.connectedCallback(),this.loaded||this.showPoster(),this[P_].addEventListener("progress",this[Fy])}disconnectedCallback(){super.disconnectedCallback(),this[P_].removeEventListener("progress",this[Fy])}async updated(t){super.updated(t),t.has("poster")&&null!=this.poster&&(this[Ry].style.backgroundImage=`url(${this.poster})`),t.has("alt")&&this[Ry].setAttribute("aria-label",this[E_]),(t.has("reveal")||t.has("loading"))&&this[C_]()}[(i=Uy,n=Ly,r=By,s=Ry,a=Ty,o=Ny,l=Py,c=Fy,Q_)](){return!!this.src&&(this[Ly]||this.loading===by||this.reveal===My&&this[f_])}[Dy](){this[Ly]=!1;const t=this[By];if(!t.classList.contains("show"))return;t.classList.remove("show"),this[w_].classList.add("show");const e=this.modelIsVisible;this[Uy]=!0,this[v_](e);const i=this.getRootNode();i&&i.activeElement===this&&this[w_].focus();const n=this[Ry];n.setAttribute("aria-hidden","true"),n.tabIndex=-1,this.dispatchEvent(new CustomEvent("poster-dismissed"))}[F_](){return super[F_]()&&this[Uy]}}return Iy([e({type:String})],h.prototype,"poster",void 0),Iy([e({type:String})],h.prototype,"reveal",void 0),Iy([e({type:String})],h.prototype,"loading",void 0),h})((t=>{var i;class n extends t{constructor(...t){super(t),this.autoplay=!1,this.animationName=void 0,this.animationCrossfadeDuration=300,this[i]=!0,this[T_].subscribeMixerEvent("loop",(t=>{const e=t.action._loopCount;this.dispatchEvent(new CustomEvent("loop",{detail:{count:e}}))})),this[T_].subscribeMixerEvent("finished",(()=>{this[V_]=!0,this.dispatchEvent(new CustomEvent("finished"))}))}get availableAnimations(){return this.loaded?this[T_].animationNames:[]}get duration(){return this[T_].duration}get paused(){return this[V_]}get currentTime(){return this[T_].animationTime}set currentTime(t){this[T_].animationTime=t,this[B_]()}get timeScale(){return this[T_].animationTimeScale}set timeScale(t){this[T_].animationTimeScale=t}pause(){this[V_]||(this[V_]=!0,this.dispatchEvent(new CustomEvent("pause")))}play(t){this.availableAnimations.length>0&&(this[V_]=!1,this[z_](t),this.dispatchEvent(new CustomEvent("play")))}[(i=V_,L_)](){super[L_](),this[V_]=!0,null!=this.animationName&&this[z_](),this.autoplay&&this.play()}[R_](t,e){super[R_](t,e),this[V_]||!this[F_]()&&!this[U_].isPresenting||(this[T_].updateAnimation(e/1e3),this[B_]())}updated(t){super.updated(t),t.has("autoplay")&&this.autoplay&&this.play(),t.has("animationName")&&this[z_]()}[z_](t=W_){var e;const i=null!==(e=t.repetitions)&&void 0!==e?e:1/0,n=t.pingpong?ot:1===i?2200:at;this[T_].playAnimation(this.animationName,this.animationCrossfadeDuration/1e3,n,i),this[V_]&&(this[T_].updateAnimation(0),this[B_]())}}return H_([e({type:Boolean})],n.prototype,"autoplay",void 0),H_([e({type:String,attribute:"animation-name"})],n.prototype,"animationName",void 0),H_([e({type:Number,attribute:"animation-crossfade-duration"})],n.prototype,"animationCrossfadeDuration",void 0),n})(G_))))))));customElements.define("model-viewer",Wy);export{Io as CanvasTexture,Zo as FileLoader,Ko as Loader,Wy as ModelViewerElement,B as NearestFilter}; -//# sourceMappingURL=model-viewer.min.js.map diff --git a/docs/javascript/translate.js b/docs/javascript/translate.js deleted file mode 100644 index e9c6ccb..0000000 --- a/docs/javascript/translate.js +++ /dev/null @@ -1,4965 +0,0 @@ -/* - - 国际化,网页自动翻译。 - 作者:管雷鸣 - 开原仓库:https://github.com/xnx3/translate - - */ -var translate = { - /* - * 当前的版本 - */ - version:'3.2.3.20240403', - useVersion:'v2', //当前使用的版本,默认使用v2. 可使用 setUseVersion2(); //来设置使用v2 ,已废弃,主要是区分是否是v1版本来着,v2跟v3版本是同样的使用方式 - setUseVersion2:function(){ - translate.useVersion = 'v2'; - console.log('提示:自 v2.10 之后的版本默认就是使用V2版本(当前版本为:'+translate.version+'), translate.setUseVersion2() 可以不用再加这一行了。当然加了也无所谓,只是加了跟不加是完全一样的。'); - }, - /* - * 翻译的对象,也就是 new google.translate.TranslateElement(...) - * 已废弃,v1使用的 - */ - translate:null, - /* - * 支持哪些语言切换,包括:de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr - * 已废弃,请使用 translate.selectLanguageTag.languages - */ - includedLanguages:'zh-CN,zh-TW,en', - /* - * 资源文件url的路径 - * 已废弃,v1使用的 - */ - resourcesUrl:'//res.zvo.cn/translate', - - /** - * 默认出现的选择语言的 select 选择框,可以通过这个选择切换语言。 - */ - selectLanguageTag:{ - /* - v3.1 增加,将 select切换语言的选择框赋予哪个id,这里是具体的id的名字。 - 如果这个id不存在,会创建这个id的元素 - */ - documentId:'translate', - /* 是否显示 select选择语言的选择框,true显示; false不显示。默认为true */ - show:true, - /* - 支持哪些语言切换 - v1.x 版本包括:de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr - v2.x 版本根据后端翻译服务不同,支持的语言也不同。具体支持哪些,可通过 http://api.translate.zvo.cn/doc/language.json.html 获取 (如果您私有部署的,将请求域名换为您自己私有部署的域名) - */ - languages:'', - alreadyRender:false, //当前是否已渲染过了 true为是 v2.2增加 - selectOnChange:function(event){ - var language = event.target.value; - translate.changeLanguage(language); - }, - //重新绘制 select 语种下拉选择。比如进行二次开发过translate.js,手动进行了设置 translate.to ,但是手动改动后的,在select语种选择框中并不会自动进行改变,这是就需要手动重新绘制一下 select语种选择的下拉选择框 - refreshRender:function(){ - // 获取元素 - let element = document.getElementById(translate.selectLanguageTag.documentId+"SelectLanguage"); - - // 删除元素 - if (element) { - element.parentNode.removeChild(element); - } - - //设置为未 render 状态,允许进行 render - translate.selectLanguageTag.alreadyRender = false; - - translate.selectLanguageTag.render(); - }, - render:function(){ //v2增加 - if(translate.selectLanguageTag.alreadyRender){ - return; - } - translate.selectLanguageTag.alreadyRender = true; - - //判断如果不显示select选择语言,直接就隐藏掉 - if(!translate.selectLanguageTag.show){ - return; - } - - //判断translate 的id是否存在,不存在就创建一个 - if(document.getElementById(translate.selectLanguageTag.documentId) == null){ - var body_trans = document.getElementsByTagName('body')[0]; - var div = document.createElement("div"); //创建一个script标签 - div.id=translate.selectLanguageTag.documentId; - body_trans.appendChild(div); - }else{ - //存在,那么判断一下 select是否存在,要是存在就不重复创建了 - if(document.getElementById(translate.selectLanguageTag.documentId+'SelectLanguage') != null){ - //select存在了,就不重复创建了 - return; - } - } - - //从服务器加载支持的语言库 - translate.request.post(translate.request.api.language, {}, function(data){ - if(data.result == 0){ - console.log('load language list error : '+data.info); - return; - } - - //select的onchange事件 - var onchange = function(event){ translate.selectLanguageTag.selectOnChange(event); } - - //创建 select 标签 - var selectLanguage = document.createElement("select"); - selectLanguage.id = translate.selectLanguageTag.documentId+'SelectLanguage'; - selectLanguage.className = translate.selectLanguageTag.documentId+'SelectLanguage'; - for(var i = 0; i 0){ - //设置了自定义显示的语言 - - //都转小写判断 - var langs_indexof = (','+translate.selectLanguageTag.languages+',').toLowerCase(); - //console.log(langs_indexof) - if(langs_indexof.indexOf(','+data.list[i].id.toLowerCase()+',') < 0){ - //没发现,那不显示这个语种,调出 - continue - } - } - - /*判断默认要选中哪个语言*/ - if(translate.to != null && typeof(translate.to) != 'undefined' && translate.to.length > 0){ - //设置了目标语言,那就进行判断显示目标语言 - - if(translate.to == data.list[i].id){ - option.setAttribute("selected",'selected'); - } - }else{ - //没设置目标语言,那默认选中当前本地的语种 - if(data.list[i].id == translate.language.getLocal()){ - option.setAttribute("selected",'selected'); - } - } - - option.appendChild(document.createTextNode(data.list[i].name)); - selectLanguage.appendChild(option); - } - //增加 onchange 事件 - if(window.addEventListener){ // Mozilla, Netscape, Firefox - selectLanguage.addEventListener('change', onchange,false); - }else{ // IE - selectLanguage.attachEvent('onchange',onchange); - } - //将select加入进网页显示 - document.getElementById(translate.selectLanguageTag.documentId).appendChild(selectLanguage); - /* - try{ - document.getElementById('translateSelectLanguage').style.width = '94px'; - }catch(e){ console.log(e);} - */ - }); - - - } - }, - - /* - * 当前本地语言 - * 已废弃,v1使用的 - */ - //localLanguage:'zh-CN', - localLanguage:'zh-CN', - - /** - * google翻译执行的 - * 已废弃,v1使用的 - */ - googleTranslateElementInit:function(){ - var selectId = ''; - if(document.getElementById('translate') != null){ // && document.getElementById('translate').innerHTML.indexOf('translateSelectLanguage') > 0 - //已经创建过了,存在 - selectId = 'translate'; - } - - translate.translate = new google.translate.TranslateElement( - { - //这参数没用,请忽略 - pageLanguage: 'zh-CN', - //一共80种语言选择,这个是你需要翻译的语言,比如你只需要翻译成越南和英语,这里就只写en,vi - //includedLanguages: 'de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr', - includedLanguages: translate.selectLanguageTag.languages, - //选择语言的样式,这个是面板,还有下拉框的样式,具体的记不到了,找不到api~~ - layout: 0, - //自动显示翻译横幅,就是翻译后顶部出现的那个,有点丑,设置这个属性不起作用的话,请看文章底部的其他方法 - //autoDisplay: false, - //disableAutoTranslation:false, - //还有些其他参数,由于原插件不再维护,找不到详细api了,将就了,实在不行直接上dom操作 - }, - selectId //触发按钮的id - ); - }, - - /** - * 初始化,如加载js、css资源 - * 已废弃,v1使用的 - */ - /* v2.11.11.20240124 彻底注释掉,有新的init方法替代 - init:function(){ - var protocol = window.location.protocol; - if(window.location.protocol == 'file:'){ - //本地的,那就用http - protocol = 'http:'; - } - if(this.resourcesUrl.indexOf('://') == -1){ - //还没设置过,进行设置 - this.resourcesUrl = protocol + this.resourcesUrl; - } - - //this.resourcesUrl = 'file://G:/git/translate'; - - }, - */ - /** - * 执行翻译操作 - * 已废弃,v1使用的 - */ - execute_v1:function(){ - console.log('=====ERROR======'); - console.log('The v1 version has been discontinued since 2022. Please use the latest V3 version and refer to: http://translate.zvo.cn/41162.html'); - }, - - /** - * 设置Cookie,失效时间一年。 - * @param name - * @param value - * * 已废弃,v1使用的 - */ - setCookie:function (name,value){ - var cookieString=name+"="+escape(value); - document.cookie=cookieString; - }, - - //获取Cookie。若是不存再,返回空字符串 - //* 已废弃,v1使用的 - getCookie:function (name){ - var strCookie=document.cookie; - var arrCookie=strCookie.split("; "); - for(var i=0;i 0){ - return cookieValue.substr(cookieValue.lastIndexOf('/')+1,cookieValue.length-1); - }else{ - return translate.localLanguage; - } - }, - - /** - * 切换语言,比如切换为英语、法语 - * @param languageName 要切换的语言语种。传入如 english - * 会自动根据传入的语言来判断使用哪种版本。比如传入 en、zh-CN 等,则会使用v1.x版本 - * 传入 chinese_simplified 、english 等,则会使用 v2.x版本 - */ - changeLanguage:function(languageName){ - //判断使用的是否是v1.x - var v1 = ',en,de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr,'; - if(v1.indexOf(','+languageName+',') > -1){ - //用的是v1.x - console.log('您使用的是v1版本的切换语种方式,v1已在2021年就以废弃,请更换为v2,参考文档: http://translate.zvo.cn/41549.html'); - translate.check(); - - var googtrans = '/'+translate.localLanguage+'/'+languageName; - - //先清空泛解析域名的设置 - var s = document.location.host.split('.'); - if(s.length > 2){ - var fanDomain = s[s.length-2]+'.'+s[s.length-1]; - document.cookie = 'googtrans=;expires='+(new Date(1))+';domain='+fanDomain+';path=/'; - document.cookie = 'googtrans='+googtrans+';domain='+fanDomain+';path=/'; - } - - translate.setCookie('googtrans', ''+googtrans); - location.reload(); - return; - } - - //用的是v2.x或更高 - //translate.setUseVersion2(); - translate.useVersion = 'v2'; - //判断是否是第一次翻译,如果是,那就不用刷新页面了。 true则是需要刷新,不是第一次翻译 - if(translate.to != null && translate.to.length > 0){ - //当前目标值有值,且目标语言跟当前语言不一致,那当前才是已经被翻译过的 - if(translate.to != translate.language.getLocal()){ - var isReload = true; //标记要刷新页面 - } - } - - - translate.to = languageName; - translate.storage.set('to',languageName); //设置目标翻译语言 - - if(isReload){ - location.reload(); //刷新页面 - }else{ - //不用刷新,直接翻译 - translate.execute(); //翻译 - } - }, - - /** - * 自检提示,适用于 v1.x, 在 v2.x中已废弃 - * english - * 已废弃,v1使用的 - */ - check:function(){ - if(window.location.protocol == 'file:'){ - console.log('\r\n---WARNING----\r\ntranslate.js 主动翻译组件自检异常,当前协议是file协议,翻译组件要在正常的线上http、https协议下才能正常使用翻译功能\r\n------------'); - } - }, - - - /**************************** v2.0 */ - to:'', //翻译为的目标语言,如 english 、chinese_simplified - //用户第一次打开网页时,自动判断当前用户所在国家使用的是哪种语言,来自动进行切换为用户所在国家的语种。 - //如果使用后,第二次在用,那就优先以用户所选择的为主,这个就不管用了 - //默认是false,不使用,可设置true:使用 - //使用 setAutoDiscriminateLocalLanguage 进行设置 - autoDiscriminateLocalLanguage:false, - documents:[], //指定要翻译的元素的集合,可设置多个,如设置: document.getElementsByTagName('DIV') - /* - v2.11.5增加 - 正在进行翻译的节点,会记录到此处。 - 这里是最底的节点了,不会再有下级了。这也就是翻译的最终节点,也就是 translate.element.findNode() 发现的节点 - 也就是扫描到要进行翻译的节点,在翻译前,加入到这里,在这个节点翻译结束后,将这里面记录的节点删掉。 - - 格式如 - [ - { - node: node节点的对象 - number: 2 (当前正在翻译进行中的次数,比如一个节点有中英文混合的文本,那么中文、英文 会同时进行两次翻译,也就是最后要进行两次替换,会导致这个node产生两次改动。每次便是+1、-1) - }, - { - ...... - } - ] - - 生命周期: - - translate.execute() 执行后,会扫描要翻译的字符,扫描完成后首先会判断缓存中是否有,是否会命中缓存,如果缓存中有,那么在加入 task.add 之前就会将这个进行记录 ++ - 在浏览器缓存没有命中后,则会通过网络api请求进行翻译,此时在发起网络请求前,会进行记录 ++ - 当使用 translate.listener.start() 后,网页中动态渲染的部分会触发监听,触发监听后首先会判断这个节点是否存在于这里面正在被翻译,如果存在里面,那么忽略, 如果不存在里面,那么再进行 translate.execute(变动的节点) 进行翻译 (当然执行这个翻译后,自然也就又把它加入到此处进行记录 ++) - 【唯一的减去操作】 在task.execute() 中,翻译完成并且渲染到页面执行完成后,会触发延迟50毫秒后将这个翻译的节点从这里减去 - */ - inProgressNodes:[], - //翻译时忽略的一些东西,比如忽略某个tag、某个class等 - ignore:{ - tag:['style', 'script', 'link', 'pre', 'code'], - class:['ignore','translateSelectLanguage'], - id:[], - /* - 传入一个元素,判断这个元素是否是被忽略的元素。 这个会找父类,看看父类中是否包含在忽略的之中。 - return true是在忽略的之中,false不再忽略的之中 - */ - isIgnore:function(ele){ - if(ele == null || typeof(ele) == 'undefined'){ - return false; - } - - var parentNode = ele; - var maxnumber = 100; //最大循环次数,避免死循环 - while(maxnumber-- > 0){ - if(parentNode == null || typeof(parentNode) == 'undefined'){ - //没有父元素了 - return false; - } - - //判断Tag - //var tagName = parentNode.nodeName.toLowerCase(); //tag名字,小写 - var nodename = translate.element.getNodeName(parentNode).toLowerCase(); //tag名字,小写 - if(nodename.length > 0){ - //有nodename - if(nodename == 'body' || nodename == 'html' || nodename == '#document'){ - //上层元素已经是顶级元素了,那肯定就不是了 - return false; - } - if(translate.ignore.tag.indexOf(nodename) > -1){ - //发现ignore.tag 当前是处于被忽略的 tag - return true; - } - } - - - //判断class name - if(parentNode.className != null){ - var classNames = parentNode.className; - if(classNames == null || typeof(classNames) != 'string'){ - continue; - } - //console.log('className:'+typeof(classNames)); - //console.log(classNames); - classNames = classNames.trim().split(' '); - for(var c_index = 0; c_index < classNames.length; c_index++){ - if(classNames[c_index] != null && classNames[c_index].trim().length > 0){ - //有效的class name,进行判断 - if(translate.ignore.class.indexOf(classNames[c_index]) > -1){ - //发现ignore.class 当前是处于被忽略的 class - return true; - } - } - } - } - - //判断id - if(parentNode.id != null && typeof(parentNode.id) != 'undefined'){ - //有效的class name,进行判断 - if(translate.ignore.id.indexOf(parentNode.id) > -1){ - //发现ignore.id 当前是处于被忽略的 id - return true; - } - } - - //赋予判断的元素向上一级 - parentNode = parentNode.parentNode; - } - - return false; - } - }, - //自定义翻译术语 - nomenclature:{ - /* - 术语表 - 一维:要转换的语种,如 english - 二维:翻译至的目标语种,如 english - 三维:要转换的字符串,如 "你好" - 结果:自定义的翻译结果,如 “Hallo” - */ - data:new Array(), - - /* - 原始术语表,可编辑的 - 一维:要自定义目标词 - 二维:针对的是哪个语种 - 值:要翻译为什么内容 - - 其设置如 - var data = new Array(); - data['版本'] = { - english : 'banben', - korean : 'BanBen' - }; - data['国际化'] = { - english : 'guojihua', - korean : 'GuoJiHua' - }; - - 【已过时】 - */ - old_Data:[], - /* - set:function(data){ - translate.nomenclature.data = data; - }, - */ - set:function(data){ - alert('请将 translate.nomenclature.set 更换为 append,具体使用可参考: https://github.com/xnx3/translate '); - }, - /* - 向当前术语库中追加自定义术语。如果追加的数据重复,会自动去重 - 传入参数: - from 要转换的语种 - to 翻译至的目标语种 - properties 属于配置表,格式如: - 你好=Hello - 世界=ShiJie - - */ - append:function(from, to, properties){ - if(typeof(translate.nomenclature.data[from]) == 'undefined'){ - translate.nomenclature.data[from] = new Array(); - } - if(typeof(translate.nomenclature.data[from][to]) == 'undefined'){ - translate.nomenclature.data[from][to] = new Array(); - } - - //将properties进行分析 - //按行拆分 - var line = properties.split('\n'); - //console.log(line) - for(var line_index = 0; line_index < line.length; line_index++){ - var item = line[line_index].trim(); - if(item.length < 1){ - //空行,忽略 - continue; - } - var kvs = item.split('='); - //console.log(kvs) - if(kvs.length != 2){ - //不是key、value构成的,忽略 - continue; - } - var key = kvs[0].trim(); - var value = kvs[1].trim(); - //console.log(key) - if(key.length == 0 || value.length == 0){ - //其中某个有空,则忽略 - continue; - } - - - //加入,如果之前有加入,则会覆盖 - translate.nomenclature.data[from][to][key] = value; - //console.log(local+', '+target+', key:'+key+', value:'+value); - } - - //追加完后,对整个对象数组进行排序,key越大越在前面 - translate.nomenclature.data[from][to] = translate.util.objSort(translate.nomenclature.data[from][to]); - - }, - //获取当前定义的术语表 - get:function(){ - return translate.nomenclature.data; - }, - //对传入的str字符进行替换,将其中的自定义术语提前进行替换,然后将替换后的结果返回 - dispose:function(str){ - if(str == null || str.length == 0){ - return str; - } - //if(translate.nomenclature.data.length == 0){ - // return str; - //} - //判断当前翻译的两种语种是否有自定义术语库 - //console.log(typeof(translate.nomenclature.data[translate.language.getLocal()][translate.to])) - if(typeof(translate.nomenclature.data[translate.language.getLocal()]) == 'undefined' || typeof(translate.nomenclature.data[translate.language.getLocal()][translate.to]) == 'undefined'){ - return str; - } - //console.log(str) - for(var originalText in translate.nomenclature.data[translate.language.getLocal()][translate.to]){ - var translateText = translate.nomenclature.data[translate.language.getLocal()][translate.to][originalText]; - if(typeof(translateText) == 'function'){ - //进行异常的预处理调出 - continue; - } - - var index = str.indexOf(originalText); - if(index > -1){ - //console.log('find -- '+originalText+', \t'+translateText); - if(translate.language.getLocal() == 'english'){ - //如果本地语种是英文,那么还要判断它的前后,避免比如要替换 is 将 display 中的is给替换,将单词给强行拆分了 - - //判断这个词前面是否符合 - var beforeChar = ''; //前面的字符 - if(index == 0){ - //前面没别的字符了,那前面合适 - }else{ - //前面有别的字符,判断是什么字符,如果是英文,那么这个是不能被拆分的,要忽略 - beforeChar = str.substr(index-1,1); - //console.log('beforeChar:'+beforeChar+', str:'+str) - var lang = translate.language.getCharLanguage(beforeChar); - //console.log(lang); - if(lang == 'english'){ - //调出,不能强拆 - continue; - } - } - - //判断这个词的后面是否符合 - var afterChar = ''; //后面的字符 - if(index + originalText.length == str.length ){ - //后面没别的字符了,那前面合适 - //console.log(originalText+', meile '+str) - }else{ - //后面有别的字符,判断是什么字符,如果是英文,那么这个是不能被拆分的,要忽略 - afterChar = str.substr(index+originalText.length,1); - var lang = translate.language.getCharLanguage(afterChar); - if(lang == 'english'){ - //跳出,不能强拆 - continue; - } - } - - str = str.replace(new RegExp(beforeChar+originalText+afterChar,'g'), beforeChar+translateText+afterChar); - }else{ - //其他情况,如汉语、汉语等语种 - str = str.replace(new RegExp(originalText,'g'), translateText); - } - - } - } - - return str; - - /* - //遍历一维 - for(var originalText in translate.nomenclature.data){ - var languageResult = translate.nomenclature.data[originalText]; - if(typeof(languageResult) == 'function'){ - //进行异常的预处理调出 - continue; - } - - if(typeof(languageResult[translate.to]) == 'undefined'){ - //console.log('und'); - continue; - } - - //var hash = translate.util.hash(originalText); - - //console.log(originalText+',\t'+str); - if(str.indexOf(originalText) > -1){ - //console.log('find -- '+originalText+', \t'+languageResult[translate.to]); - str = str.replace(new RegExp(originalText,'g'),languageResult[translate.to]); - } - } - - - return str; - */ - }, - - }, - office:{ - /* - 网页上翻译之后,自动导出当前页面的术语库 - - 需要先指定本地语种,会自动将本地语种进行配置术语库 - - */ - export:function(){ - if(translate.language.getLocal() == translate.language.getCurrent()){ - alert('本地语种跟要翻译的语种一致,无需导出'); - return; - } - - var text = ''; - for(var uuid in translate.nodeQueue){ - var queueValue = translate.nodeQueue[uuid]; - for(var lang in translate.nodeQueue[uuid].list){ - //console.log('------'+lang) - if(typeof(lang) != 'string' || lang.length < 1){ - continue; - } - //if(translate.language.getLocal() == lang){ - //console.log(translate.nodeQueue[uuid].list[lang]); - for(var hash in translate.nodeQueue[uuid].list[lang]){ - //console.log(translate.nodeQueue[uuid].list[lang][hash].original); - //console.log(translate.nodeQueue[uuid].list[lang][hash].original); - text = text + '\n' + translate.nodeQueue[uuid].list[lang][hash].original + '='+translate.storage.get('hash_'+translate.language.getCurrent()+'_'+hash); - - } - //} - } - - } - - if(text.length > 0){ - //有内容 - text = 'translate.office.append(\''+translate.language.getCurrent()+'\',`'+text+'\n`);'; - //console.log(text); - translate.util.loadMsgJs(); - msg.popups({ - text:'', - width:'750px', - height:'600px', - padding:'1px', - }); - document.getElementById('msgPopupsTextarea').value = text; - }else{ - msg.alert('无有效内容!'); - } - - - }, - //显示导出面板 - showPanel:function(){ - let panel = document.createElement('div'); - panel.setAttribute('id', 'translate_export'); - panel.setAttribute('class','ignore'); - - //导出按钮 - let button = document.createElement('button'); - button.onclick = function() { - translate.office.export(); - }; - button.innerHTML = '导出配置信息'; - button.setAttribute('style', 'margin-left: 72px; margin-top: 30px; margin-bottom: 20px; font-size: 25px; background-color: blue; padding: 15px; padding-top: 3px; padding-bottom: 3px; border-radius: 3px;'); - panel.appendChild(button); - - //说明文字 - let textdiv = document.createElement('div'); - textdiv.innerHTML = '1. 首先将当前语种切换为你要翻译的语种
2. 点击导出按钮,将翻译的配置信息导出
3. 将导出的配置信息粘贴到代码中,即可完成
点此进行查阅详细使用说明'; - textdiv.setAttribute('style','font-size: 14px; padding: 12px;'); - - panel.appendChild(textdiv); - - panel.setAttribute('style', 'background-color: black; color: #fff; width: 320px; height: 206px; position: fixed; bottom: 50px; right: 50px;'); - //把元素节点添加到body元素节点中成为其子节点,放在body的现有子节点的最后 - document.body.appendChild(panel); - - translate.util.loadMsgJs(); - }, - /* - 追加离线翻译数据。如果追加的数据重复,会自动去重 - 传入参数: - from 要转换的语种 - to 翻译至的目标语种 - properties 属于配置表,格式如: - 你好=Hello - 世界=ShiJie - 这个传入参数跟 translate.nomenclature.append 的传入参数格式是一致的 - */ - append:function(to, properties){ - //console.log(properties) - //将properties进行分析 - //按行拆分 - var line = properties.split('\n'); - //console.log(line) - for(var line_index = 0; line_index < line.length; line_index++){ - var item = line[line_index].trim(); - if(item.length < 1){ - //空行,忽略 - continue; - } - var kvs = item.split('='); - //console.log(kvs) - if(kvs.length != 2){ - //不是key、value构成的,忽略 - continue; - } - var key = kvs[0]; - var value = kvs[1]; - //console.log(key) - if(key.length == 0 || value.length == 0){ - //其中某个有空,则忽略 - continue; - } - //console.log('set---'+key); - //加入 storate - translate.storage.set('hash_'+to+'_'+translate.util.hash(key), value); - } - }, - }, - setAutoDiscriminateLocalLanguage:function(){ - translate.autoDiscriminateLocalLanguage = true; - }, - /* - 待翻译的页面的node队列 - 一维:key:uuid,也就是execute每次执行都会创建一个翻译队列,这个是翻译队列的唯一标识。 - value: - k/v - 二维:对象形态,具体有: - key:expireTime 当前一维数组key的过期时间,到达过期时间会自动删除掉这个一维数组。如果<0则代表永不删除,常驻内存 - value:list 待翻译的页面的node队列 - 三维:针对二维的value, key:english、chinese_simplified等语种,这里的key便是对value的判断,取value中的要翻译的词是什么语种,对其进行了语种分类 value: k/v - 四维:针对三维的value, key:要翻译的词(经过语种分割的)的hash, value: node数组 - 五维:针对四维的value, 这是个对象, 其中 - original: 是三维的key的hash的原始文字,也就是 node 中的原始文字。 - cacheHash: 如果翻译时匹配到了自定义术语库中的词,那么翻译完后存入到缓存中时,其缓存的翻译前字符串已经不是original,而是匹配完术语库后的文本的hash了。所以这里额外多增加了这个属性。如果匹配了术语库,那这里就是要进行缓存的翻译前文本的hash,如果未使用术语库,这里就跟其key-hash 相同。 - translateText: 针对 original 的经过加工过的文字,比如经过自定义术语操作后的,待翻译的文字。 - nodes: 有哪些node元素中包含了这个词,都会在这里记录 - 六维:针对五维的 nodes,将各个具体的 node 以及 其操作的 attribute 以数组形式列出 - 七维:针对六维列出的nodes数组,其中包含: - node: 具体操作的node元素 - attribute: 也就是翻译文本针对的是什么,是node本身(nodeValue),还是 node 的某个属性,比如title属性,这则是设置为 "title"。如果这里不为空,那就是针对的属性操作的。 如果这里为空或者undefined ,那就是针对node本身,也就是 nodeValue 的字符串操作的 - beforeText: node元素中进行翻译结果赋予时,额外在翻译结果的前面加上的字符串。其应用场景为,如果中英文混合场景下,避免中文跟英文挨着导致翻译为英语后,连到一块了。默认是空字符串 '' - afterText: node元素中进行翻译结果赋予时,额外在翻译结果的后面加上的字符串。其应用场景为,如果中英文混合场景下,避免中文跟英文挨着导致翻译为英语后,连到一块了。默认是空字符串 '' - - 生命周期: 当execute()执行时创建, 当execute结束(其中的所有request接收到响应并渲染完毕)时销毁(当前暂时不销毁,以方便调试) - */ - nodeQueue:{}, - //指定要翻译的元素的集合,可传入一个元素或多个元素 - //如设置一个元素,可传入如: document.getElementsById('test') - //如设置多个元素,可传入如: document.getElementsByTagName('DIV') - setDocuments:function(documents){ - if (documents == null || typeof(documents) == 'undefined') { - return; - } - - if(typeof(documents.length) == 'undefined'){ - //不是数组,是单个元素 - translate.documents[0] = documents; - }else{ - //是数组,直接赋予 - translate.documents = documents; - } - //清空翻译队列,下次翻译时重新检索 - translate.nodeQueue = {}; - //console.log('set documents , clear translate.nodeQueue'); - }, - //获取当前指定翻译的元素(数组形式 [document,document,...]) - //如果用户未使用setDocuments 指定的,那么返回整个网页 - getDocuments:function(){ - if(translate.documents != null && typeof(translate.documents) != 'undefined' && translate.documents.length > 0){ - // setDocuments 指定的 - return translate.documents; - }else{ - //未使用 setDocuments指定,那就是整个网页了 - return document.all; //翻译所有的 - } - }, - listener:{ - //当前页面打开后,是否已经执行完execute() 方法进行翻译了,只要执行完一次,这里便是true。 (多种语言的API请求完毕并已渲染html) - //isExecuteFinish:false, - //是否已经使用了 translate.listener.start() 了,如果使用了,那这里为true,多次调用 translate.listener.start() 只有第一次有效 - isStart:false, - //translate.listener.start(); //开启html页面变化的监控,对变化部分会进行自动翻译。注意,这里变化区域,是指使用 translate.setDocuments(...) 设置的区域。如果未设置,那么为监控整个网页的变化 - start:function(){ - - translate.temp_linstenerStartInterval = setInterval(function(){ - if(document.readyState == 'complete'){ - //dom加载完成,进行启动 - clearInterval(translate.temp_linstenerStartInterval);//停止 - translate.listener.addListener(); - } - - //if(translate.listener.isExecuteFinish){ //执行完过一次,那才能使用 - /*if(translate.listener.isStart){ - //已开启了 - return; - }*/ - - //console.log('translate.temp_linstenerStartInterval Finish!'); - //} - }, 300); - - - }, - //增加监听,开始监听。这个不要直接调用,需要使用上面的 start() 开启 - addListener:function(){ - translate.listener.isStart = true; //记录已执行过启动方法了 - - // 观察器的配置(需要观察什么变动) - translate.listener.config = { attributes: true, childList: true, subtree: true, characterData: true, attributeOldValue:true, characterDataOldValue:true }; - // 当观察到变动时执行的回调函数 - translate.listener.callback = function(mutationsList, observer) { - var documents = []; //有变动的元素 - //console.log('--------- lisetner 变动'); - // Use traditional 'for loops' for IE 11 - for(let mutation of mutationsList) { - let addNodes = []; - if (mutation.type === 'childList') { - if(mutation.addedNodes.length > 0){ - //多了组件 - addNodes = mutation.addedNodes; - //documents.push.apply(documents, mutation.addedNodes); - }else if(mutation.removedNodes.length > 0){ - //console.log('remove:'); - //console.log(mutation.removedNodes); - }else{ - //console.log('not find:'); - //console.log(mutation); - } - }else if (mutation.type === 'attributes') { - //console.log('The ' + mutation.attributeName + ' attribute was modified.'); - }else if(mutation.type === 'characterData'){ - //内容改变 - addNodes = [mutation.target]; - //documents.push.apply(documents, [mutation.target]); - } - - //去重并加入 documents - for(let item of addNodes){ - //console.log(item); - - //判断是否已经加入过了,如果已经加入过了,就不重复加了 - var isFind = false; - for(var di = 0; di < documents.length; di++){ - if(documents[di].isSameNode(item)){ - isFind = true; - break; - } - } - if(isFind){ - break; - } - documents.push.apply(documents, [item]); - } - } - - //console.log(documents.length); - if(documents.length > 0){ - //有变动,需要看看是否需要翻译,延迟10毫秒执行 - - //判断是否属于在正在翻译的节点,重新组合出新的要翻译的node集合 - var translateNodes = []; - //console.log(translate.inProgressNodes.length); - for(let ipnode of documents){ - //console.log('---type:'+ipnode.nodeType); - - var find = false; - for(var ini = 0; ini < translate.inProgressNodes.length; ini++){ - if(translate.inProgressNodes[ini].node.isSameNode(ipnode)){ - //有记录了,那么忽略这个node,这个node是因为翻译才导致的变动 - //console.log('发现相同'); - find = true; - break; - } - } - if(find){ - continue; - } - - //不相同,才追加到新的 translateNodes - translateNodes.push(ipnode); - //console.log('listener ++ '+ipnode.nodeValue); - //console.log(ipnode); - } - if(translateNodes.length < 1){ - return; - } - //console.log('translateNodeslength: '+translateNodes.length); - - - setTimeout(function() { - //console.log(translateNodes); - translate.execute(translateNodes); //指定要翻译的元素的集合,可传入一个或多个元素。如果不设置,默认翻译整个网页 - }, 10); //这个要比 task.execute() 中的 settimeout 延迟执行删除 translate.inpr.....nodes 的时间要小,目的是前一个发生变动后,记入 inpr...nodes 然后翻译完成后节点发生变化又触发了listener,此时 inpr....nodes 还有,那么这个变化将不做处理,然后 inp.....nodes 再删除这个标记 - } - }; - // 创建一个观察器实例并传入回调函数 - translate.listener.observer = new MutationObserver(translate.listener.callback); - // 以上述配置开始观察目标节点 - var docs = translate.getDocuments(); - for(var docs_index = 0; docs_index < docs.length; docs_index++){ - var doc = docs[docs_index]; - if(doc != null){ - translate.listener.observer.observe(doc, translate.listener.config); - } - } - }, - /* - 每当执行完一次渲染任务(翻译)时会触发此。注意页面一次翻译会触发多个渲染任务。普通情况下,一次页面的翻译可能会触发两三次渲染任务。 - 另外如果页面中有ajax交互方面的信息,时,每次ajax信息刷新后,也会进行翻译,也是一次渲染任务。 - 这个是为了方便扩展使用。比如在layui中扩展,监控 select 的渲染 - */ - renderTaskFinish:function(renderTask){ - //console.log(renderTask); - } - }, - //对翻译结果进行替换渲染的任务,将待翻译内容替换为翻译内容的过程 - renderTask:class{ - constructor(){ - /* - * 任务列表 - * 一维数组 [hash] = tasks; tasks 是多个task的数组集合 - * 二维数组 [task,task,...],存放多个 task,每个task是一个替换。这里的数组是同一个nodeValue的多个task替换 - * 三维数组 task['originalText'] 、 task['resultText'] 存放要替换的字符串 - task['attribute'] 存放要替换的属性,比如 a标签的title属性。 如果是直接替换node.nodeValue ,那这个没有 - */ - this.taskQueue = []; - - /* - * 要进行翻译的node元素, - * 一维数组 key:node.nodeValue 的 hash , value:node的元素数组 - * 二维数组,也就是value中包含的node集合 [node,node,...] - */ - this.nodes = []; - } - - /** - * 向替换队列中增加替换任务 - * node:要替换的字符属于那个node元素 - * originalText:待翻译的字符 - * resultText:翻译后的结果字符 - * attribute: 要替换的是哪个属性,比如 a标签的title属性,这里便是传入title。如果不是替换属性,这里不用传入,或者传入null - */ - add(node, originalText, resultText, attribute){ - var nodeAnaly = translate.element.nodeAnalyse.get(node, attribute); //node解析 - //var hash = translate.util.hash(translate.element.getTextByNode(node)); //node中内容的hash - var hash = translate.util.hash(nodeAnaly['text']); - //console.log('--------------'+hash); - //console.log(nodeAnaly); - //console.log(node); - //console.log('originalText:'+originalText+', resultText:'+resultText+', attribute:'+attribute); - /****** 加入翻译的元素队列 */ - if(typeof(this.nodes[hash]) == 'undefined'){ - this.nodes[hash] = new Array(); - } - this.nodes[hash].push(node); - //console.log(node) - - /****** 加入翻译的任务队列 */ - var tasks = this.taskQueue[hash]; - if(tasks == null || typeof(tasks) == 'undefined'){ - //console.log(node.nodeValue); - tasks = new Array(); //任务列表,存放多个 task,每个task是一个替换。这里的数组是同一个nodeValue的多个task替换 - } - var task = new Array(); - - //v2.3.3 增加 -- 开始 - //这里要进行处理,因为有时候翻译前,它前或者后是有空格的,但是翻译后会把前或者后的空格给自动弄没了,如果是这种情况,要手动补上 - if (originalText.substr(0, 1) == ' ') { - //console.log('第一个字符是空格'); - if(resultText.substr(0, 1) != ' '){ - //翻译结果的第一个字符不是空格,那么补上 - resultText = ' ' + resultText; - } - } - if (originalText.substr(originalText.length - 1, 1) === ' ') { - //console.log('最后一个字符是空格'); - if(resultText.substr(0, 1) != ' '){ - //翻译结果的最后一个字符不是空格,那么补上 - resultText = resultText + ' '; - } - } - //v2.3.3 增加 -- 结束 - - task['originalText'] = originalText; - task['resultText'] = resultText; - task['attribute'] = attribute; - - //console.log(task); - tasks.push(task); - this.taskQueue[hash] = tasks; - /****** 加入翻译的任务队列 end */ - } - //进行替换渲染任务,对页面进行渲染替换翻译 - execute(){ - //先对tasks任务队列的替换词进行排序,将同一个node的替换词有大到小排列,避免先替换了小的,大的替换时找不到 - for(var hash in this.taskQueue){ - var tasks = this.taskQueue[hash]; - if(typeof(tasks) == 'function'){ - //进行异常的预处理调出 - continue; - } - - //进行排序,将原字符串长的放前面,避免造成有部分不翻译的情况(bug是先翻译了短的,导致长的被打断而无法进行适配) - tasks.sort((a, b) => b.originalText.length - a.originalText.length); - - this.taskQueue[hash] = tasks; - } - - //console.log('===========task========='); - //console.log(this.taskQueue); - //console.log(this.nodes); - //console.log('===========task======end==='); - - //对nodeQueue进行翻译 - for(var hash in this.nodes){ - var tasks = this.taskQueue[hash]; //取出当前node元素对应的替换任务 - //var tagName = this.nodes[hash][0].nodeName; //以下节点的tag name - //console.log(tasks); - for(var node_index = 0; node_index < this.nodes[hash].length; node_index++){ - //对这个node元素进行替换翻译字符 - for(var task_index=0; task_index 0){ - //50毫秒后执行,以便页面渲染完毕 - var renderTask = this; - setTimeout(function() { - - /** 执行完成后,保存翻译的历史node **/ - //将当前翻译完成的node进行缓存记录,以node唯一标识为key, node、以及node当前翻译之后的内容为值进行缓存。方便下一次执行 translate.execute() 时,若值未变化则不进行翻译 - for(var hash in renderTask.nodes){ - //console.log(translate.nodeQueue[uuid].list[lang][hash]) - for(var nodeindex in renderTask.nodes[hash]){ - //console.log(translate.nodeQueue[uuid].list[lang][hash].original); - //var nodename = translate.element.getNodeName(translate.nodeQueue[uuid].list[lang][hash].nodes[0].node); - //console.log("nodename:"+nodename); - var analyse = translate.element.nodeAnalyse.get(renderTask.nodes[hash][0]); - //analyse.text analyse.node - var nodeid = nodeuuid.uuid(analyse.node); - - if(nodeid.length == 0){ - //像是input的placeholder 暂时没考虑进去,这种就直接忽略了 - continue; - } - - //加入 - /* - if(typeof(translate.nodeHistory[nodeid]) == 'object'){ - //已经加入过了,判断它的值是否有发生过变化 - - if(translate.nodeHistory[nodeid].translateText == analyse.text){ - //值相同,就不用再加入了 - continue; - } - } - 这里就不用判断了,直接同步到最新的,因为同一个node,可能有本地缓存直接更新,这样会非常快,网络的会慢2秒,因时间导致同步不是最新的 - */ - //console.log(analyse); - //console.log('add-----'+analyse.text +', uuid:'+nodeid); - //console.log(analyse.node); - translate.nodeHistory[nodeid] = {}; - translate.nodeHistory[nodeid].node = analyse.node; - translate.nodeHistory[nodeid].translateText = analyse.text; - } - - } - //console.log(translate.nodeHistory); - - /** 执行完成后,触发用户自定义的翻译完成执行函数 **/ - translate.listener.renderTaskFinish(renderTask); - - }, 50); - - }else{ - //console.log(this.taskQueue); - //console.log('---this.taskQueue is null'); - } - } - }, - - //执行翻译操作。翻译的是 nodeQueue 中的 - //docs 如果传入,那么翻译的只是传入的这个docs的。传入如 [document.getElementById('xxx'),document.getElementById('xxx'),...] - execute:function(docs){ - if(typeof(docs) != 'undefined'){ - //execute传入参数,只有v2版本才支持 - translate.useVersion = 'v2'; - } - - if(translate.useVersion == 'v1'){ - //if(this.to == null || this.to == ''){ - //采用1.x版本的翻译,使用google翻译 - //translate.execute_v1(); - //return; - //v2.5.1增加 - console.log('提示:https://github.com/xnx3/translate 在 v2.5 版本之后,由于谷歌翻译调整,免费翻译通道不再支持,所以v1版本的翻译接口不再被支持,v1全线下架。考虑到v1已不能使用,当前已自动切换到v2版本。如果您使用中发现什么异常,请针对v2版本进行适配。'); - translate.useVersion = 'v2'; - } - - //版本检测 - try{ - translate.init(); - }catch(e){ } - - /****** 采用 2.x 版本的翻译,使用自有翻译算法 */ - - - //每次执行execute,都会生成一个唯一uuid,也可以叫做队列的唯一标识,每一次执行execute都会创建一个独立的翻译执行队列 - var uuid = translate.util.uuid(); - //console.log('=====') - //console.log(translate.nodeQueue); - - /* v2.4.3 将初始化放到了 translate.element.whileNodes 中,如果uuid对应的没有,则自动创建 - - translate.nodeQueue[uuid] = new Array(); //创建 - translate.nodeQueue[uuid]['expireTime'] = Date.now() + 120*1000; //删除时间,10分钟后删除 - translate.nodeQueue[uuid]['list'] = new Array(); - */ - //console.log(translate.nodeQueue); - //console.log('=====end') - - //如果页面打开第一次使用,先判断缓存中有没有上次使用的语种,从缓存中取出 - if(translate.to == null || translate.to == ''){ - var to_storage = translate.storage.get('to'); - if(to_storage != null && typeof(to_storage) != 'undefined' && to_storage.length > 0){ - translate.to = to_storage; - } - } - - //渲染select选择语言 - try{ - translate.selectLanguageTag.render(); - }catch(e){ - console.log(e); - } - - //判断是否还未指定翻译的目标语言 - if(translate.to == null || typeof(translate.to) == 'undefined' || translate.to.length == 0){ - //未指定,判断如果指定了自动获取用户本国语种了,那么进行获取 - if(translate.autoDiscriminateLocalLanguage){ - translate.executeByLocalLanguage(); - } - - //没有指定翻译目标语言、又没自动获取用户本国语种,则不翻译 - return; - } - - //判断本地语种跟要翻译的目标语种是否一样,如果是一样,那就不需要进行任何翻译 - if(translate.to == translate.language.getLocal()){ - return; - } - - /********** 翻译进行 */ - - //先进行图片的翻译替换,毕竟图片还有加载的过程 - translate.images.execute(); - - /* - 进行翻译指定的node操作。优先级为: - 1. 这个方法已经指定的翻译 nodes - 2. setDocuments 指定的 - 3. 整个网页 - 其实2、3都是通过 getDocuments() 取,在getDocuments() 就对2、3进行了判断 - */ - var all; - if(typeof(docs) != 'undefined'){ - //1. 这个方法已经指定的翻译 nodes - - if(docs == null){ - //要翻译的目标区域不存在 - console.log('translate.execute(...) 中传入的要翻译的目标区域不存在。'); - return; - } - - if(typeof(docs.length) == 'undefined'){ - //不是数组,是单个元素 - all = new Array(); - all[0] = docs; - }else{ - //是数组,直接赋予 - all = docs; - } - - }else{ - //2、3 - all = translate.getDocuments(); - } - //console.log('----要翻译的目标元素-----'); - //console.log(all) - - //检索目标内的node元素 - for(var i = 0; i< all.length & i < 20; i++){ - var node = all[i]; - translate.element.whileNodes(uuid, node); - } - - /***** translate.language.translateLanguagesRange 开始 *****/ - if(translate.language.translateLanguagesRange.length > 0){ - //如果大于0,则是有设置,那么只翻译有设置的语种,不在设置中的语种不会参与翻译 - for(var lang in translate.nodeQueue[uuid].list){ - if(translate.language.translateLanguagesRange.indexOf(lang) < 0){ - //删除这个语种 - delete translate.nodeQueue[uuid].list[lang]; - } - } - } - - /***** translate.language.translateLanguagesRange 结束 *****/ - - - //console.log(translate.nodeHistory); - //console.log(translate.nodeQueue[uuid]) - for(var lang in translate.nodeQueue[uuid].list){ - //console.log('lang:'+lang) - for(var hash in translate.nodeQueue[uuid].list[lang]){ - //console.log(hash) - if(typeof(translate.nodeQueue[uuid].list[lang][hash]) == 'function'){ - //v2.10增加,避免hash冒出个 Contains 出来导致for中的.length 出错 - continue; - } - for(var nodeindex = translate.nodeQueue[uuid].list[lang][hash].nodes.length-1; nodeindex > -1; nodeindex--){ - //console.log(translate.nodeQueue[uuid].list[lang][hash].nodes); - var analyse = translate.element.nodeAnalyse.get(translate.nodeQueue[uuid].list[lang][hash].nodes[nodeindex].node); - //analyse.text analyse.node - var nodeid = nodeuuid.uuid(analyse.node); - //translate.nodeQueue[uuid].list[lang][hash].nodes.splice(nodeindex, 1); - //console.log(nodeid+'\t'+analyse.text); - if(typeof(translate.nodeHistory[nodeid]) != 'undefined'){ - //存在,判断其内容是否发生了改变 - //console.log('比较---------'); - //console.log(translate.nodeHistory[nodeid].translateText); - //console.log(analyse.text); - if(translate.nodeHistory[nodeid].translateText == analyse.text){ - //内容未发生改变,那么不需要再翻译了,从translate.nodeQueue中删除这个node - translate.nodeQueue[uuid].list[lang][hash].nodes.splice(nodeindex, 1); - //console.log('发现相等的node,删除 '+analyse.text+'\t'+hash); - }else{ - //console.log("发现变化的node =======nodeid:"+nodeid); - //console.log(translate.nodeHistory[nodeid].translateText == analyse.text); - //console.log(translate.nodeHistory[nodeid].node); - //console.log(translate.nodeHistory[nodeid].translateText); - //console.log(analyse.text); - - } - }else{ - //console.log('未在 nodeHistory 中发现,新的node nodeid:'+nodeid); - //console.log(analyse.node) - } - } - if(translate.nodeQueue[uuid].list[lang][hash].nodes.length == 0){ - //如果node数组中已经没有了,那么直接把这个hash去掉 - delete translate.nodeQueue[uuid].list[lang][hash]; - } - } - if(Object.keys(translate.nodeQueue[uuid].list[lang]).length == 0){ - //如果这个语言中没有要翻译的node了,那么删除这个语言 - delete translate.nodeQueue[uuid].list[lang]; - } - } - //console.log('new queuq'); - //console.log(translate.nodeQueue[uuid]) - //translate.nodeHistory[nodeid] - - - //console.log('-----待翻译:----'); - //console.log(translate.nodeQueue); - - //translateTextArray[lang][0] - var translateTextArray = {}; //要翻译的文本的数组,格式如 ["你好","欢迎"] - var translateHashArray = {}; //要翻译的文本的hash,跟上面的index是一致的,只不过上面是存要翻译的文本,这个存hash值 - - - /* - 要进行第二次扫描的node - 2023.8.22 解决缓存会打散扫描到的翻译文本,导致翻译结束后找寻不到而导致不翻译的问题 - 一维 key: lang - 二维 key: hash - 三维 key: - node: 当前的node元素 - 四维 array: 当前缓存中进行翻译的文本数组: - cacheOriginal: 已缓存被替换前的文本 - cacheTranslateText: 已缓存被替换后的翻译文本 - - */ - var twoScanNodes = {}; - var cacheScanNodes = []; //同上面的 twoScanNodes,只不过 twoScanNodes 是按照lang存的,而这个不再有lang区分 - for(var lang in translate.nodeQueue[uuid]['list']){ //二维数组中,取语言 - //console.log('lang:'+lang); //lang为english这种语言标识 - if(lang == null || typeof(lang) == 'undefined' || lang.length == 0 || lang == 'undefined'){ - //console.log('lang is null : '+lang); - continue; - } - - translateTextArray[lang] = []; - translateHashArray[lang] = []; - - let task = new translate.renderTask(); - //console.log(translate.nodeQueue); - - twoScanNodes[lang] = []; - //二维数组,取hash、value - for(var hash in translate.nodeQueue[uuid]['list'][lang]){ - if(typeof(translate.nodeQueue[uuid]['list'][lang][hash]) == 'function'){ - //跳出,增加容错。 正常情况下应该不会这样 - continue; - } - - //取原始的词,还未经过翻译的,需要进行翻译的词 - //var originalWord = translate.nodeQueue[uuid]['list'][lang][hash]['original']; - - //原始的node中的词 - var originalWord = translate.nodeQueue[uuid]['list'][lang][hash]['original']; - //要翻译的词 - var translateText = translate.nodeQueue[uuid]['list'][lang][hash]['translateText']; - //console.log(originalWord); -/* - //自定义术语后的。如果 - var nomenclatureOriginalWord = translate.nomenclature.dispose(cache); - if(nomenclatureOriginalWord != originalWord){ - has - } -*/ - //console.log(originalWord == translateText ? '1':'xin:'+translateText); - //根据hash,判断本地是否有缓存了 - var cacheHash = originalWord == translateText ? hash:translate.util.hash(translateText); //如果匹配到了自定义术语库,那翻译前的hash是被改变了 - translate.nodeQueue[uuid]['list'][lang][hash]['cacheHash'] = cacheHash; //缓存的hash。 缓存时,其hash跟翻译的语言是完全对应的,缓存的hash就是翻译的语言转换来的 - var cache = translate.storage.get('hash_'+translate.to+'_'+cacheHash); - //console.log(cacheHash+', '+cache); - - //var twoScanNodes[] = []; //要进行第二次扫描的node - if(cache != null && cache.length > 0){ - //有缓存了 - //console.log('find cache:'+cache); - //直接将缓存赋予 - //for(var index = 0; index < this.nodeQueue[lang][hash].length; index++){ - //this.nodeQueue[lang][hash][index].nodeValue = cache; - - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - //console.log(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]); - - - //加入 translate.inProgressNodes - //取得这个翻译的node - var ipnode = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node']; - - //判断这个node是否已经在 inProgressNodes 记录了 - var isFind = false; - for(var ini = 0; ini < translate.inProgressNodes.length; ini++){ - if(translate.inProgressNodes[ini].node.isSameNode(ipnode)){ - //有记录了,那么出现次数 +1 - translate.inProgressNodes[ini].number++; - isFind = true; - //console.log('cache - find - ++ '); - //console.log(ipnode); - } - } - //未发现,那么还要将这个node加入进去 - if(!isFind){ - //console.log('cache - find - add -- lang:'+lang+', hash:'+hash+' node_index:'+node_index); - //console.log(ipnode.nodeValue); - translate.inProgressNodes.push({node: ipnode, number:1}); - } - - //console.log(translate.inProgressNodes); - //加入 translate.inProgressNodes -- 结束 - - //翻译结果的文本,包含了before 、 after 了 - var translateResultText = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['beforeText']+cache+translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['afterText']; - task.add(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'], originalWord, translateResultText, translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['attribute']); - //this.nodeQueue[lang][hash]['nodes'][node_index].nodeValue = this.nodeQueue[lang][hash]['nodes'][node_index].nodeValue.replace(new RegExp(originalWord,'g'), cache); - //console.log(translateResultText); - - //重新扫描这个node,避免这种情况: - //localstorage缓存中有几个词的缓存了,但是从缓存中使用时,把原本识别的要翻译的数据给打散了,导致翻译结果没法赋予,导致用户展示时有些句子没成功翻译的问题 -- 2023.8.22 - //console.log('继续扫描 + 1 - '+twoScanNodes.length); - var twoScanIndex = -1; //当前元素是否在 twoScan 中已经加入了,如果已经加入了,那么这里赋予当前所在的下标 - for(var i = 0; i 0){ - //因为在这个数组中的值都是一样的,那么只需要取出第一个就行了 - var valueStr = queueNodes[0].nodeValue; - valueStr = this.util.charReplace(valueStr); - - translateTextArray[lang].push(valueStr); - translateHashArray[lang].push(hash); - } - */ - - //加入待翻译数组 - translateTextArray[lang].push(translateText); - translateHashArray[lang].push(hash); //这里存入的依旧还是用原始hash,未使用自定义术语库前的hash,目的是不破坏 nodeQueue 的 key - } - - task.execute(); //执行渲染任务 - } - //console.log(twoScanNodes); - //console.log('cacheScanNodes:'); - //console.log(cacheScanNodes); - - /******* 进行第二次扫描、追加入翻译队列。目的是防止缓存打散扫描的待翻译文本 ********/ - for(var lang in twoScanNodes){ - //记录第一次扫描的数据,以便跟第二次扫描后的进行对比 - var firstScan = Object.keys(translate.nodeQueue[uuid]['list'][lang]); - var firstScan_lang_langth = firstScan.length; //第一次扫描后的数组长度 - - //console.log(twoScanNodes[lang]); - for(var i = 0; i -1){ - //发现了,那么强制赋予翻以前内容 - text = translateTextArray[data.from][i]; - } - - - //翻译前的hash对应下标 - var hash = translateHashArray[data.from][i]; - var cacheHash = translate.nodeQueue[uuid]['list'][lang][hash]['cacheHash']; - - - - //取原始的词,还未经过翻译的,需要进行翻译的词 - var originalWord = ''; - try{ - originalWord = translate.nodeQueue[uuid]['list'][lang][hash]['original']; - //console.log('bef:'+translate.nodeQueue[uuid]['list'][lang][hash]['beforeText']); - }catch(e){ - console.log('uuid:'+uuid+', originalWord:'+originalWord+', lang:'+lang+', hash:'+hash+', text:'+text+', queue:'+translate.nodeQueue[uuid]); - console.log(e); - continue; - } - - //for(var index = 0; index < translate.nodeQueue[lang][hash].length; index++){ - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - //translate.nodeQueue[lang][hash]['nodes'][node_index].nodeValue = translate.nodeQueue[lang][hash]['nodes'][node_index].nodeValue.replace(new RegExp(originalWord,'g'), text); - //加入任务 - task.add(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'], originalWord, translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['beforeText']+text+translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['afterText'], translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['attribute']); - } - //} - /* - for(var index = 0; index < translate.nodeQueue[data.from][hash].length; index++){ - translate.nodeQueue[data.from][hash][index].nodeValue = text; - } - */ - - //将翻译结果以 key:hash value翻译结果的形式缓存 - translate.storage.set('hash_'+data.to+'_'+cacheHash,text); - } - task.execute(); //执行渲染任务 - //translate.temp_executeFinishNumber++; //记录执行完的次数 - - }); - /*** 翻译end ***/ - - - } - }, - /* - 将已成功翻译并渲染的node节点进行缓存记录 - key: node节点的唯一标识符,通过 nodeuuid.uuid() 生成 - value: - node: node节点 - translateText: 翻译完成后,当前node节点的内容文本(是已经翻译渲染过的) - */ - nodeHistory:{}, - element:{ - //对翻译前后的node元素的分析(翻以前)及渲染(翻译后) - nodeAnalyse:{ - /* - 获取node中的要进行翻译的文本内容、以及要操作的实际node对象(这个node对象很可能是传入的node中的某个子node) - node - attribute 要获取的是某个属性的值,还是node本身的值。比如 a标签的title属性的值,则传入 title。 如果是直接获取node.nodeValue ,那这个没有 - - 返回结果是一个数组。其中: - ['text']:要进行翻译的text内容文本 - ['node']:要进行翻译的目标node - - */ - get:function(node, attribute){ - return translate.element.nodeAnalyse.analyse(node,'','', attribute); - }, - /* - 进行翻译之后的渲染显示 - 参数: - node 当前翻译的node元素 - originalText 翻译之前的内容文本 - resultText 翻译之后的内容文本 - attribute 存放要替换的属性,比如 a标签的title属性。 如果是直接替换node.nodeValue ,那这个没有 - */ - set:function(node, originalText, resultText, attribute){ - translate.element.nodeAnalyse.analyse(node,originalText,resultText, attribute); - }, - /* - - 注意,这个不使用,只是服务于上面的get、set使用。具体使用用上面的get、set - - 1. 只传入 node: - 获取node中的要进行翻译的文本内容、以及要操作的实际node对象(这个node对象很可能是传入的node中的某个子node) - 返回结果是一个数组。其中: - ['text']:要进行翻译的text内容文本 - ['node']:要进行翻译的目标node - 2. 传入 node、originalText、 resultText - 则是进行翻译之后的渲染显示 - - attribute : 进行替换渲染时使用,存放要替换的属性,比如 a标签的title属性。 如果是直接替换node.nodeValue ,那这个没有 - */ - analyse:function(node, originalText, resultText, attribute){ - var result = new Array(); //返回的结果 - result['node'] = node; - result['text'] = ''; - - var nodename = translate.element.getNodeName(node); - - if(attribute != null && typeof(attribute) == 'string' && attribute.length > 0){ - //这个node有属性,替换的是node的属性,而不是nodeValue - result['text'] = node[attribute]; - - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - if(typeof(node[attribute]) != 'undefined'){ - node[attribute] = node[attribute].replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - }else{ - console.log(node); - } - - } - return result; - } - - //正常的node ,typeof 都是 object - - //console.log(typeof(node)+node); - if(nodename == '#text'){ - //如果是普通文本,判断一下上层是否是包含在textarea标签中 - if(typeof(node.parentNode) != 'undefined'){ - var parentNodename = translate.element.getNodeName(node.parentNode); - //console.log(parentNodename) - if(parentNodename == 'TEXTAREA'){ - //是textarea标签,那将nodename 纳入 textarea的判断中,同时将判断对象交于上级,也就是textarea标签 - nodename = 'TEXTAREA'; - node = node.parentNode; - } - } - } - - - - //console.log(nodename) - //console.log(translate.element.getNodeName(node.parentNode)) - //console.log(node) - if(nodename == 'INPUT' || nodename == 'TEXTAREA'){ - //console.log(node.attributes) - /* - 1. input、textarea 输入框,要对 placeholder 做翻译 - 2. input 要对 type=button 的情况进行翻译 - */ - if(node.attributes == null || typeof(node.attributes) == 'undefined'){ - result['text'] = ''; - return result; - } - - //input,要对 type=button、submit 的情况进行翻译 - if(nodename == 'INPUT'){ - if(typeof(node.attributes.type) != 'undefined' && typeof(node.attributes.type.nodeValue) != null && (node.attributes.type.nodeValue.toLowerCase() == 'button' || node.attributes.type.nodeValue.toLowerCase() == 'submit')){ - //console.log('----是 0){ - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - input_value_node.nodeValue = input_value_node.nodeValue.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - - result['text'] = input_value_node.nodeValue; - result['node'] = input_value_node; - return result; - } - } - } - //console.log(node) - - //input textarea 的 placeholder 情况 - if(typeof(node.attributes['placeholder']) != 'undefined'){ - //console.log(node); - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.attributes['placeholder'].nodeValue = node.attributes['placeholder'].nodeValue.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - - result['text'] = node.attributes['placeholder'].nodeValue; - result['node'] = node.attributes['placeholder']; - return result; - //return node.attributes['placeholder'].nodeValue; - } - //console.log(node) - result['text'] = ''; - return result; - } - if(nodename == 'META'){ - //meta标签,如是关键词、描述等 - if(typeof(node.name) != 'undefined' && node.name != null){ - var nodeAttributeName = node.name.toLowerCase(); //取meta 标签的name 属性 - if(nodeAttributeName == 'keywords' || nodeAttributeName == 'description'){ - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText != null && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.content = node.content.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - - result['text'] = node.content; - return result; - } - } - - result['text'] = ''; - return result; - } - if(nodename == 'IMG'){ - if(typeof(node.alt) == 'undefined' || node.alt == null){ - result['text'] = ''; - return result; - } - - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.alt = node.alt.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - result['text'] = node.alt; - return result; - } - - - //其他的 - if(node.nodeValue == null || typeof(node.nodeValue) == 'undefined'){ - result['text'] = ''; - }else if(node.nodeValue.trim().length == 0){ - //避免就是单纯的空格或者换行 - result['text'] = ''; - }else{ - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText != null && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.nodeValue = node.nodeValue.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - result['text'] = node.nodeValue; - } - return result; - } - }, - //获取这个node元素的node name ,如果未发现,则返回''空字符串 - getNodeName:function(node){ - if(node == null || typeof(node) == 'undefined'){ - return ''; - } - - if(node.nodeName == null || typeof(node.nodeName) == 'undefined'){ - return ''; - } - - var nodename = node.nodeName; - //console.log('nodename:'+nodename+', node:'+node); - return nodename; - }, - //向下遍历node - whileNodes:function(uuid, node){ - if(node == null || typeof(node) == 'undefined'){ - return; - } - - //如果这个uuid没有,则创建 - if(typeof(translate.nodeQueue[uuid]) == 'undefined' || translate.nodeQueue[uuid] == null){ - translate.nodeQueue[uuid] = new Array(); //创建 - translate.nodeQueue[uuid]['expireTime'] = Date.now() + 120*1000; //删除时间,10分钟后删除 - translate.nodeQueue[uuid]['list'] = new Array(); - //console.log('创建 --- '); - //console.log(uuid) - } - - //console.log('---'+typeof(node)+', '); - //判断是否是有title属性,title属性也要翻译 - if(typeof(node) == 'object' && typeof(node['title']) == 'string' && node['title'].length > 0){ - //将title加入翻译队列 - //console.log('---'+node.title+'\t'+node.tagName); - //console.log(node) - //console.log('------------'); - - //判断当前元素是否在ignore忽略的tag、id、class name中 - if(!translate.ignore.isIgnore(node)){ - //不在忽略的里面,才会加入翻译 - translate.addNodeToQueue(uuid, node, node['title'], 'title'); - } - } - - var childNodes = node.childNodes; - if(childNodes.length > 0){ - for(var i = 0; i -1){ - //忽略tag - //console.log('忽略tag:'+parentNodeName); - return; - } - - /****** 判断忽略的class ******/ - /* - 这段理论上不需要了,因为在 translate.ignore.isIgnore 判断了 - var ignoreClass = false; //是否是被忽略的class,true是 - var parentNode = node.parentNode; - while(node != parentNode && parentNode != null){ - //console.log('node:'+node+', parentNode:'+parentNode); - if(parentNode.className != null){ - if(translate.ignore.class.indexOf(parentNode.className) > -1){ - //发现ignore.class 当前是处于被忽略的 class - ignoreClass = true; - } - } - - parentNode = parentNode.parentNode; - } - if(ignoreClass){ - //console.log('ignore class : node:'+node.nodeValue); - return; - } - */ - /**** 判断忽略的class结束 ******/ - - - - /**** 避免中途局部翻译,在判断一下 ****/ - //判断当前元素是否在ignore忽略的tag、id、class name中 - if(translate.ignore.isIgnore(node)){ - //console.log('node包含在要忽略的元素中:'); - //console.log(node); - return; - } - - //node分析 - var nodeAnaly = translate.element.nodeAnalyse.get(node); - if(nodeAnaly['text'].length > 0){ - //有要翻译的目标内容,加入翻译队列 - //console.log('addNodeToQueue -- '+nodeAnaly['node']+', text:' + nodeAnaly['text']); - translate.addNodeToQueue(uuid, nodeAnaly['node'], nodeAnaly['text']); - } - //console.log(nodeAnaly); - /* - //console.log(node.nodeName+', type:'+node.nodeType+', '+node.nodeValue); - var nodename = translate.element.getNodeName(node); - if(nodename == 'INPUT' || nodename == 'TEXTAREA'){ - //input 输入框,要对 placeholder 做翻译 - console.log('input---'+node.attributes); - if(node.attributes == null || typeof(node.attributes) == 'undefined'){ - return; - } - - if(typeof(node.attributes['placeholder']) != 'undefined'){ - //console.log(node.attributes['placeholder'].nodeValue); - //加入要翻译的node队列 - //translate.nodeQueue[translate.hash(node.nodeValue)] = node.attributes['placeholder']; - //加入要翻译的node队列 - //translate.addNodeToQueue(translate.hash(node.attributes['placeholder'].nodeValue), node.attributes['placeholder']); - translate.addNodeToQueue(uuid, node.attributes['placeholder'], node.attributes['placeholder'].nodeValue); - } - - //console.log(node.getAttribute("placeholder")); - }else if(nodename == 'META'){ - //meta标签,如是关键词、描述等 - if(typeof(node.name) != 'undefined' && node.name != null){ - var nodeAttributeName = node.name.toLowerCase(); //取meta 标签的name 属性 - //console.log(nodeName); - if(nodeAttributeName == 'keywords' || nodeAttributeName == 'description'){ - //关键词、描述 - translate.addNodeToQueue(uuid, node, node.content); - } - } - //console.log(node.name) - }else if(nodename == 'IMG'){ - //console.log('-------'+node.alt); - translate.addNodeToQueue(uuid, node, node.alt); - }else if(node.nodeValue != null && node.nodeValue.trim().length > 0){ - - //过滤掉无效的值 - if(node.nodeValue != null && typeof(node.nodeValue) == 'string' && node.nodeValue.length > 0){ - }else{ - return; - } - - //console.log(node.nodeValue+' --- ' + translate.language.get(node.nodeValue)); - - //console.log(node.nodeName); - //console.log(node.parentNode.nodeName); - //console.log(node.nodeValue); - //加入要翻译的node队列 - translate.addNodeToQueue(uuid, node, node.nodeValue); - //translate.addNodeToQueue(translate.hash(node.nodeValue), node); - //translate.nodeQueue[translate.hash(node.nodeValue)] = node; - //translate.nodeQueue[translate.hash(node.nodeValue)] = node.nodeValue; - //node.nodeValue = node.nodeValue+'|'; - - } - */ - - }, - }, - - - - - - /* - * 将发现的元素节点加入待翻译队列 - * uuid execute方法执行的唯一id - * node 当前text所在的node - * text 当前要翻译的目标文本 - * attribute 是否是元素的某个属性。比如 a标签中的title属性, a.title 再以node参数传入时是string类型的,本身并不是node类型,所以就要传入这个 attribute=title 来代表这是a标签的title属性。同样第二个参数node传入的也不能是a.title,而是传入a这个node元素 - */ - addNodeToQueue:function(uuid, node, text, attribute){ - if(node == null || text == null || text.length == 0){ - return; - } - - - //console.log('find tag ignore : '+node.nodeValue+', '+node.nodeName+", "+node.nodeType+", "+node.tagName); - //console.log('addNodeToQueue into -- node:'+node+', text:'+text+', attribute:'+attribute); - var nodename = translate.element.getNodeName(node); - - //判断如果是被 注释的区域,不进行翻译 - if(nodename.toLowerCase() == '#comment'){ - return; - } - //console.log('\t\t'+text); - //取要翻译字符的hash - var key = translate.util.hash(text); - /* - 如果是input 的 placeholder ,就会出现这个情况 - if(node.parentNode == null){ - console.log('node.parentNode == null'); - return; - } - */ - - //console.log(node.parentNode); - //console.log(node.parentNode.nodeName); - - //判断其内容是否是 script、style 等编程的文本,如果是,则不进行翻译,不然翻译后还会影响页面正常使用 - if(translate.util.findTag(text)){ - //console.log('find tag ignore : '+node.nodeValue+', '+node.nodeName+", "+node.nodeType+", "+node.tagName); - //console.log(node.parentNode.nodeName); - - //获取到当前文本是属于那个tag标签中的,如果是script、style 这样的标签中,那也会忽略掉它,不进行翻译 - if(node.parentNode == null){ - //没有上级了,或是没获取到上级,忽略 - return; - } - //去上级的tag name - var parentNodeName = translate.element.getNodeName(node.parentNode); - //node.parentNode.nodeName; - if(parentNodeName == 'SCRIPT' || parentNodeName == 'STYLE'){ - //如果是script、style中发现的,那也忽略 - return; - } - } - //console.log(node.nodeValue); - - //获取当前是什么语种 - //var langs = translate.language.get(text); - var textRecognition = translate.language.recognition(text); - langs = textRecognition.languageArray; - //console.log('langs'); - //console.log(langs); - - - //过滤掉要转换为的目标语种,比如要转为英语,那就将本来是英语的部分过滤掉,不用再翻译了 - if(typeof(langs[translate.to]) != 'undefined'){ - delete langs[translate.to]; - } - - var isWhole = translate.whole.isWhole(node); - //console.log('isWhole:'+isWhole+', '+text); - - if(!isWhole){ - //常规方式,进行语种分类 - - - /* if(this.nodeQueue[lang] == null || typeof(this.nodeQueue[lang]) == 'undefined'){ - this.nodeQueue[lang] = new Array(); - } - //创建二维数组 - if(this.nodeQueue[lang][key] == null || typeof(this.nodeQueue[lang][key]) == 'undefined'){ - this.nodeQueue[lang][key] = new Array(); - } - */ - //console.log(langs); - - for(var lang in langs) { - //创建二维数组, key为语种,如 english - /* - 放到了 translate.addNodeQueueItem 进行判断 - if(translate.nodeQueue[uuid]['list'][lang] == null || typeof(translate.nodeQueue[uuid]['list'][lang]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang] = new Array(); - } - */ - //console.log('|'+langs[lang].length); - //遍历出该语种下有哪些词需要翻译 - for(var word_index = 0; word_index < langs[lang].list.length; word_index++){ - //console.log('start:'+word_index) - //console.log(langs[lang].list[word_index]); - if(typeof(langs[lang].list[word_index]) == 'undefined' || typeof(langs[lang].list[word_index]['text']) == 'undefined'){ - //理论上应该不会,但多加个判断 - continue; - } - var word = langs[lang].list[word_index]['text']; //要翻译的词 - var beforeText = langs[lang].list[word_index]['beforeText']; - var afterText = langs[lang].list[word_index]['afterText']; - - translate.addNodeQueueItem(uuid, node, word, attribute, lang, beforeText, afterText); - - /* - var hash = translate.util.hash(word); //要翻译的词的hash - //创建三维数组, key为要通过接口翻译的文本词或句子的 hash (注意并不是node的文本,而是node拆分后的文本) - if(translate.nodeQueue[uuid]['list'][lang][hash] == null || typeof(translate.nodeQueue[uuid]['list'][lang][hash]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang][hash] = new Array(); - - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['original'] = word; - translate.nodeQueue[uuid]['list'][lang][hash]['translateText'] = translate.nomenclature.dispose(word); //自定义术语处理 - //translate.nodeQueue[uuid]['list'][lang][hash]['beforeText'] = beforeText; - //translate.nodeQueue[uuid]['list'][lang][hash]['afterText'] = afterText; - //translate.nodeQueue[uuid]['list'][lang][hash]['attribute'] = attribute; //放入 nodes[index][attribute] 元素中 - - //其中key: nodes 是第四维数组,里面存放具体的node元素对象 - - - //console.log(translate.nodeQueue[uuid]['list'][lang][hash]); - } - - var isEquals = false; //queue中是否已经加入过这个node了(当然是同一hash同一node情况) - if(typeof(node.isSameNode) != 'undefined'){ //支持 isSameNode 方法判断对象是否相等 - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - if(node.isSameNode(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'])){ - //相同,那就不用在存入了 - //console.log('相同,那就不用在存入了') - isEquals = true; - //console.log(node) - continue; - } - } - } - if(isEquals){ - //相同,那就不用在存入了 - continue; - } - - //往五维数组nodes中追加node元素 - var nodesIndex = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['node']=node; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['attribute']=attribute; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['beforeText'] = beforeText; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['afterText'] = afterText; - - */ - - //console.log('end:'+word_index) - } - - } - - - - - }else{ - //直接翻译整个元素内的内容,不再做语种分类,首先删除英文,然后将出现次数最多的语种作为原本语种 - var lang = textRecognition.languageName; - translate.addNodeQueueItem(uuid, node, text, attribute, lang, '', ''); - } - - - - //this.nodeQueue[lang][key][this.nodeQueue[lang][key].length]=node; //往数组中追加 - }, - - /* - - 服务于上面的 addNodeToQueue ,用于区分不同type情况,进行调用此加入 translate.nodeQueue - uuid, node, attribute 这五个参数说明见 addNodeToQueue 的参数说明,相同 - - word 要实际进行翻译的文本,也就是要把它拿来进行通过后端翻译接口进行翻译的文本 - lang 当前要翻译的文本的语种,如 english - beforeText 参见 translate.nodeQueue 注释中第七维的解释 - afterText 参见 translate.nodeQueue 注释中第七维的解释 - - */ - addNodeQueueItem:function(uuid, node, word, attribute, lang, beforeText, afterText){ - //创建二维数组, key为语种,如 english - if(translate.nodeQueue[uuid]['list'][lang] == null || typeof(translate.nodeQueue[uuid]['list'][lang]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang] = new Array(); - } - - //var word = text; //要翻译的文本 - var hash = translate.util.hash(word); //要翻译的文本的hash - - //创建三维数组, key为要通过接口翻译的文本词或句子的 hash 。这里翻译的文本也就是整个node元素的内容了,不用在做拆分了 - if(translate.nodeQueue[uuid]['list'][lang][hash] == null || typeof(translate.nodeQueue[uuid]['list'][lang][hash]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang][hash] = new Array(); - - /* - * 创建四维数组,存放具体数据 - * key: nodes 包含了这个hash的node元素的数组集合,array 多个。其中 - nodes[index]['node'] 存放当前的node元素 - nodes[index]['attribute'] 存放当前hash,也就是翻译文本针对的是什么,是node本身(nodeValue),还是 node 的某个属性,比如title属性。如果这里不为空,那就是针对的属性操作的 - * key: original 原始的要翻译的词或句子,html加载完成但还没翻译前的文本,用于支持当前页面多次语种翻译切换而无需跳转 - * beforeText、afterText:见 translate.nodeQueue 的说明 - */ - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['original'] = word; - translate.nodeQueue[uuid]['list'][lang][hash]['translateText'] = translate.nomenclature.dispose(word); //自定义术语处理 - - //其中key: nodes 是第四维数组,里面存放具体的node元素对象 - } - - - var isEquals = false; //queue中是否已经加入过这个node了(当然是同一hash同一node情况) - if(typeof(node.isSameNode) != 'undefined'){ //支持 isSameNode 方法判断对象是否相等 - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - if(node.isSameNode(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'])){ - //相同,那就不用在存入了 - //console.log('相同,那就不用在存入了') - isEquals = true; - //console.log(node) - continue; - } - } - } - if(isEquals){ - //相同,那就不用在存入了 - return; - } - - //往五维数组nodes中追加node元素 - var nodesIndex = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['node']=node; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['attribute']=attribute; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['beforeText'] = beforeText; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['afterText'] = afterText; - - - }, - - //全部翻译,node内容全部翻译,而不是进行语种提取,直接对node本身的全部内容拿出来进行直接全部翻译 - whole:{ - class:[], - tag:[], - id:[], - - //运行时出现自检并在浏览器控制台提示性文本。 - //在执行翻译,也就是 execute() 时,会调用此方法。 - executeTip:function(){ - if(translate.whole.class.length == 0 && translate.whole.tag.length == 0 && translate.whole.id.length == 0){ - - }else{ - console.log('您开启了 translate.whole 此次行为避开了浏览器端的文本语种自动识别,而是暴力的直接对某个元素的整个文本进行翻译,很可能会产生非常大的翻译量,请谨慎!有关每日翻译字符的说明,可参考: http://translate.zvo.cn/42557.html '); - } - - if(translate.whole.tag.indexOf('html') > -1){ - console.log('自检发现您设置了 translate.whole.tag 其中有 html ,这个是不生效的,最大只允许设置到 body '); - } - }, - - //当前元素是属于全部翻译定义的元素 - /* - 传入一个元素,判断这个元素是否是被包含的。 这个会找父类,看看父类中是否包含在其之中。 - return true是在其中,false不再其中 - */ - isWhole:function(ele){ - if(translate.whole.class.length == 0 && translate.whole.tag.length == 0 && translate.whole.id.length == 0){ - //未设置,那么直接返回false - return false; - } - if(ele == null || typeof(ele) == 'undefined'){ - return false; - } - - var parentNode = ele; - var maxnumber = 100; //最大循环次数,避免死循环 - while(maxnumber-- > 0){ - if(parentNode == null || typeof(parentNode) == 'undefined'){ - //没有父元素了 - return false; - } - - //判断Tag - //var tagName = parentNode.nodeName.toLowerCase(); //tag名字,小写 - var nodename = translate.element.getNodeName(parentNode).toLowerCase(); //tag名字,小写 - if(nodename.length > 0){ - //有nodename - if(nodename == 'html' || nodename == '#document'){ - //上层元素已经是顶级元素了,那肯定就不是了 - return false; - } - if(translate.whole.tag.indexOf(nodename) > -1){ - //发现ignore.tag 当前是处于被忽略的 tag - return true; - } - } - - - //判断class name - if(parentNode.className != null){ - var classNames = parentNode.className; - if(classNames == null || typeof(classNames) != 'string'){ - continue; - } - //console.log('className:'+typeof(classNames)); - //console.log(classNames); - classNames = classNames.trim().split(' '); - for(var c_index = 0; c_index < classNames.length; c_index++){ - if(classNames[c_index] != null && classNames[c_index].trim().length > 0){ - //有效的class name,进行判断 - if(translate.whole.class.indexOf(classNames[c_index]) > -1){ - //发现ignore.class 当前是处于被忽略的 class - return true; - } - } - } - } - - //判断id - if(parentNode.id != null && typeof(parentNode.id) != 'undefined'){ - //有效的class name,进行判断 - if(translate.whole.id.indexOf(parentNode.id) > -1){ - //发现ignore.id 当前是处于被忽略的 id - return true; - } - } - - //赋予判断的元素向上一级 - parentNode = parentNode.parentNode; - } - - return false; - } - }, - - language:{ - //当前本地语种,本地语言,默认是简体中文。设置请使用 translate.language.setLocal(...)。不可直接使用,使用需用 getLocal() - local:'', - /* - 翻译语种范围 - 比如传入 ['chinese_simplified','chinese_traditional','english'] 则表示仅对网页中的简体中文、繁体中文、英文 进行翻译,而网页中出现的其他的像是法语、韩语则不会进行翻译 - 如果为空 [],则是翻译时,翻译网页中的所有语种 - 设置方式为: translate.language.translateLanguagesRange = ['chinese_simplified','chinese_traditional'] - */ - translateLanguagesRange: [], - //传入语种。具体可传入哪些参考: http://api.translate.zvo.cn/doc/language.json.html - setLocal:function(languageName){ - //translate.setUseVersion2(); //Set to use v2.x version - translate.useVersion = 'v2'; - translate.language.local = languageName; - }, - //获取当前本地语种,本地语言,默认是简体中文。设置请使用 translate.language.setLocal(...) - getLocal:function(){ - //判断是否设置了本地语种,如果没设置,自动给其设置 - if(translate.language.local == null || translate.language.local.length < 1){ - translate.language.autoRecognitionLocalLanguage(); - } - return translate.language.local; - }, - /* - 获取当前语种。 - 比如当前设置的本地语种是简体中文,用户并未切换其他语种,那么这个方法将返回本地当前的语种,也就是等同于 translate.language.getLocal() - 如果用户切换为英语进行浏览,那么这个方法将返回翻译的目标语种,也就是 english - */ - getCurrent:function(){ - var to_storage = translate.storage.get('to'); - if(to_storage != null && typeof(to_storage) != 'undefined' && to_storage.length > 0){ - //之前有过使用,并且主动设置过目标语种 - return to_storage; - } - return translate.language.getLocal(); - }, - //如果第一次用,默认以什么语种显示。 - //比如本地当前语种是简体中文,这里设置为english,那么用户第一次使用时,会自动翻译为english进行显示。如果用户手动切换为其他语种比如韩语,那么就遵循用户手动切换的为主,显示韩语。 - setDefaultTo:function(languageName){ - var to_storage = translate.storage.get('to'); - if(to_storage != null && typeof(to_storage) != 'undefined' && to_storage.length > 0){ - //之前有过使用,并且主动设置过目标语种,那么不进行处理 - }else{ - //没有设置过,进行处理 - translate.storage.set('to', languageName); - translate.to = languageName; - } - }, - /* - 清除历史翻译语种的缓存 - */ - clearCacheLanguage:function(){ - translate.to = ''; - translate.storage.set('to',''); - }, - //根据URL传参控制以何种语种显示 - //设置可以根据当前访问url的某个get参数来控制使用哪种语言显示。 - //比如当前语种是简体中文,网页url是http://translate.zvo.cn/index.html ,那么可以通过在url后面增加 language 参数指定翻译语种,来使网页内容以英文形态显示 http://translate.zvo.cn/index.html?language=english - setUrlParamControl:function(paramName){ - if(typeof(paramName) == 'undefined' || paramName.length < 1){ - paramName = 'language'; - } - var paramValue = translate.util.getUrlParam(paramName); - if(typeof(paramValue) == 'undefined'){ - return; - } - if(paramValue == '' || paramValue == 'null' || paramValue == 'undefined'){ - return; - } - - translate.storage.set('to', paramValue); - translate.to = paramValue; - }, - //自动识别当前页面是什么语种 - autoRecognitionLocalLanguage:function(){ - if(translate.language.local != null && translate.language.local.length > 2){ - //已设置过了,不需要再设置 - return; - } - - var bodyText = document.body.outerText; - if(bodyText == null || typeof(bodyText) == 'undefined' || bodyText.length < 1){ - //未取到,默认赋予简体中文 - translate.language.local = 'chinese_simplified'; - return; - } - - bodyText = bodyText.replace(/\n|\t|\r/g,''); //将回车换行等去掉 - - //默认赋予简体中文 - translate.language.local = 'chinese_simplified'; - var recognition = translate.language.recognition(bodyText); - translate.language.local = recognition.languageName; - return translate.language.local; - /* v3.1优化 - var langs = new Array(); //上一个字符的语种是什么,当前字符向上数第一个字符。格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - for(var i=0; i -1){ - newLangs.splice(index,1); //移除数组中的特殊字符 - } - - if(newLangs.length > 0){ - //找到排序出现频率最多的 - translate.language.local = newLangs[0]; - }else{ - //没有,默认赋予简体中文 - translate.language.local = 'chinese_simplified'; - } - */ - }, - - /* - * 获取当前字符是什么语种。返回值是一个语言标识,有 chinese_simplified简体中文、japanese日语、korean韩语、 - * str : node.nodeValue 或 图片的 node.alt 等 - * 如果语句长,会全句翻译,以保证翻译的准确性,提高可读性。 - * 如果语句短,会自动将特殊字符、要翻译的目标语种给过滤掉,只取出具体的要翻译的目标语种文本 - * - * 返回 存放不同语言的数组,格式如 - * [ - "english":[ - {beforeText: '', afterText: '', text: 'emoambue hag'}, - ...... - ], - "japanese":[ - {beforeText: ' ', afterText: ' ', text: 'ẽ '}, - ...... - ] - ] - * - */ - get:function(str){ - //将str拆分为单个char进行判断 - - var langs = new Array(); //当前字符串包含哪些语言的数组,其内如 english - var langStrs = new Array(); //存放不同语言的文本,格式如 ['english'][0] = 'hello' - var upLangs = []; //上一个字符的语种是什么,当前字符向上数第一个字符。格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - var upLangsTwo = []; //上二个字符的语种是什么 ,当前字符向上数第二个字符。 格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - - //var upLangs = ''; //上一个字符的语种是什么,格式如 english - for(var i=0; i -1){ - newLangs.splice(index,1); //移除 - } - - //移除特殊字符 - var index = newLangs.indexOf('specialCharacter'); - if(index > -1){ - newLangs.splice(index,1); //移除数组中的特殊字符 - } - - if(newLangs.length > 0){ - //还剩一个或多个,(如果是多个,那应该是这几个出现的频率一样,所以取频率最高的时返回了多个) - return newLangs[0]; - }else{ - //没找到,直接返回空字符串 - return ''; - } - */ - - - //去除特殊符号 - //for(var i = 0; i 0.05){ - langkeys[langkeys.length] = lang+''; - } - } - - - if(langkeys.length > 1 && langkeys.indexOf('english') > -1){ - //console.log('出现了english, 并且english跟其他语种一起出现,那么删除english,因为什么法语德语乱七八糟的都有英语。而且中文跟英文一起,如果认为是英文的话,有时候中文会不被翻译'); - //langkeys.splice(langkeys.indexOf('english'), 1); - langsNumber['english'] = 0; - } - - if(langkeys.indexOf('chinese_simplified') > -1 && langkeys.indexOf('chinese_traditional') > -1){ - //如果简体中文跟繁体中文一起出现,那么会判断当前句子为繁体中文。 - //langkeys.splice(langkeys.indexOf('chinese_simplified'), 1); - langsNumber['chinese_simplified'] = 0; - } - - - //从 langsNumber 中找出字数最多的来 - var maxLang = ''; //字数最多的语种 - var maxNumber = 0; - for(var lang in langsNumber){ - if(langsNumber[lang] > maxNumber){ - maxLang = lang; - maxNumber = langsNumber[lang]; - } - } - - //重新组合返回值的 languageArray - var languageArray = {}; - for(var lang in langs){ - languageArray[lang] = {}; - languageArray[lang].number = langsNumberOriginal[lang]; - languageArray[lang].list = langs[lang]; - } - - var result = { - languageName: maxLang, - languageArray: languageArray - }; - return result; - }, - // 传入一个char,返回这个char属于什么语种,返回如 chinese_simplified、english 如果返回空字符串,那么表示未获取到是什么语种 - getCharLanguage:function(charstr){ - if(charstr == null || typeof(charstr) == 'undefined'){ - return ''; - } - - if(this.italian(charstr)){ - return 'italian'; - } - if(this.english(charstr)){ - return 'english'; - } - if(this.specialCharacter(charstr)){ - return 'specialCharacter'; - } - if(this.number(charstr)){ - return 'number'; - } - - //中文的判断包含两种,简体跟繁体 - var chinesetype = this.chinese(charstr); - if(chinesetype == 'simplified'){ - return 'chinese_simplified'; - }else if(chinesetype == 'traditional'){ - return 'chinese_traditional'; - } - - if(this.japanese(charstr)){ - return 'japanese'; - } - if(this.korean(charstr)){ - return 'korean'; - } - - //未识别是什么语种 - //console.log('not find is language , char : '+charstr+', unicode: '+charstr.charCodeAt(0).toString(16)); - return ''; - - }, - /* - * 对字符串进行分析,分析字符串是有哪几种语言组成。 - * language : 当前字符的语种,传入如 english - * langStrs : 操作的,如 langStrs['english'][0] = '你好' - * upLangs : 当前字符之前的上一个字符的语种是什么,当前字符向上数第一个字符。格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - * upLangsTwo : 当前字符之前的上二个字符的语种是什么 ,当前字符向上数第二个字符。 格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - * chatstr : 当前字符,如 h - */ - analyse:function(language, langStrs, upLangs, upLangsTwo, charstr){ - if(typeof(langStrs[language]) == 'undefined'){ - langStrs[language] = new Array(); - } - var index = 0; //当前要存入的数组下标 - if(typeof(upLangs['storage_language']) == 'undefined'){ - //第一次,那么还没存入值,index肯定为0 - //console.log('第一次,那么还没存入值,index肯定为0') - //console.log(upLangs['language']) - }else{ - //console.log('analyse, charstr : '+charstr+', upLangs :'); - //console.log(upLangs); - //var isEqual = upLangs['storage_language'] == language; //上次跟当前字符是否都是同一个语种(这个字符跟这个字符前一个字符) - - /* - 英语每个单词之间都会有空格分割. 如果是英文的话,英文跟特殊字符还要单独判断一下,避免拆开,造成翻译不准,单个单词翻译的情况 - 所以如果上次的字符是英文或特殊符号,当前字符是特殊符号(逗号、句号、空格,然后直接笼统就吧特殊符号都算上吧),那么也将当次的特殊符号变为英文来进行适配 - 示例 - hello word 的 "o w" - hello word 的 " w" - hello word 的 "w " - this is a dog 的 " a " - */ - //console.log(language == 'specialCharacter'); - //如果两个字符类型不一致,但当前字符是英文或连接符时,进行判断 - /* - if(!isEqual){ - if(language == 'english' || translate.language.connector(charstr)){ - console.log('1.'+(language == 'english' || translate.language.connector(charstr))+', upLangs str:'+upLangs['charstr']); - //上一个字符是英文或连接符 - //console.log('teshu:'+translate.language.connector(upLangs['charstr'])+', str:'+upLangs['charstr']); - if(upLangs['language'] == 'english' || translate.language.connector(upLangs['charstr'])) { - console.log('2'); - //如果上二个字符不存在,那么刚开始,不再上面几种情况之中,直接不用考虑 - if(typeof(upLangsTwo['language']) != 'undefined'){ - console.log('3') - //上二个字符是空(字符串刚开始),或者是英文 - if(upLangsTwo['language'] == 'english' || translate.language.connector(upLangsTwo['charstr'])){ - //满足这三个条件,那就将这三个拼接到一起 - console.log('4/5: '+', two lang:'+upLangsTwo['language']+', str:'+upLangsTwo['charstr']) - isEqual = true; - if(language == 'specialCharacter' && upLangs['language'] == 'specialCharacter' && upLangsTwo['language'] == 'specialCharacter'){ - //如果三个都是特殊字符,或后两个是特殊字符,第一个是空(刚开始),那就归入特殊字符 - language = 'specialCharacter'; - //console.log('4') - }else{ - //不然就都归于英文中。 - //这里更改是为了让下面能将特殊字符(像是空格逗号等)也一起存入数组 - language = 'english'; - console.log(5) - } - } - } - } - } - } - */ - - /* - 不判断当前字符,而判断上个字符,是因为当前字符没法获取未知的下个字符。 - */ - //if(!isEqual){ - - //如果当前字符是连接符 - if(translate.language.connector(charstr)){ - language = upLangs['storage_language']; - /* - //判断上个字符是否存入了待翻译字符,如要将中文翻译为英文,而上个字符是中文,待翻译,那将连接符一并加入待翻译字符中去,保持句子完整性 - //判断依据是上个字符存储至的翻译字符语种序列,不是特殊字符,而且也不是要翻译的目标语种,那肯定就是待翻译的,将连接符加入待翻译中一起进行翻译 - if(upLangs['storage_language'] != 'specialCharacter' && upLangs['storage_language'] != translate.to){ - - language = upLangs['storage_language']; - console.log('teshu:'+charstr+', 当前字符并入上个字符存储翻译语种:'+upLangs['storage_language']); - } - */ - } - //} - - //console.log('isEqual:'+isEqual); - /* - if(isEqual){ - //跟上次语言一样,那么直接拼接 - index = langStrs[language].length-1; - //但是还有别的特殊情况,v2.1针对英文翻译准确度的适配,会有特殊字符的问题 - if(typeof(upLangs['storage_language']) != 'undefined' && upLangs['storage_language'] != language){ - //如果上个字符存入的翻译队列跟当前这个要存入的队列不一个的话,那应该是特殊字符像是逗号句号等导致的,那样还要额外一个数组,不能在存入之前的数组了 - index = langStrs[language].length; - } - }else{ - //console.log('新开'); - //当前字符跟上次语言不样,那么新开一个数组 - index = langStrs[language].length; - //console.log('++, inde:'+index+',lang:'+language+', length:'+langStrs[language].length) - } - */ - - //当前要翻译的语种跟上个字符要翻译的语种一样,那么直接拼接 - if(upLangs['storage_language'] == language){ - index = langStrs[language].length-1; - }else{ - //console.log('新开'); - //当前字符跟上次语言不样,那么新开一个数组 - index = langStrs[language].length; - } - } - if(typeof(langStrs[language][index]) == 'undefined'){ - langStrs[language][index] = new Array(); - langStrs[language][index]['beforeText'] = ''; - langStrs[language][index]['afterText'] = ''; - langStrs[language][index]['text'] = ''; - } - langStrs[language][index]['text'] = langStrs[language][index]['text'] + charstr; - /* - 中文英文混合时,当中文+英文并没有空格间隔,翻译为英文时,会使中文翻译英文的结果跟原本的英文单词连到一块。这里就是解决这种情况 - 针对当前非英文(不需要空格分隔符,像是中文、韩语),但要翻译为英文(需要空格作为分割符号,像是法语等)时的情况进行判断 - */ - //if(translate.language.getLocal() != 'english' && translate.to == 'english'){ - //当前本地语种的语言是连续的,但翻译的目标语言不是连续的(空格间隔) - if( translate.language.wordBlankConnector(translate.language.getLocal()) == false && translate.language.wordBlankConnector(translate.to)){ - if((upLangs['storage_language'] != null && typeof(upLangs['storage_language']) != 'undefined' && upLangs['storage_language'].length > 0)){ - //上个字符存在 - //console.log(upLangs['storage_language']); - if(upLangs['storage_language'] != 'specialCharacter'){ - //上个字符不是特殊字符 (是正常语种。且不会是连接符,连接符都并入了正常语种) - - //if( upLangs['storage_language'] != 'english' && language == 'english'){ - //上个字符的语言是连续的,但当前字符的语言不是连续的(空格间隔) - if( translate.language.wordBlankConnector(upLangs['storage_language']) == false && translate.language.wordBlankConnector(language) ){ - //上个字符不是英语,当前字符是英语,这种情况要在上个字符后面追加空格,因为当前字符是英文,就不会在执行翻译操作了 - //console.log(upLangs['language']); - langStrs[upLangs['storage_language']][langStrs[upLangs['storage_language']].length-1]['afterText'] = ' '; - }else if(upLangs['storage_language'] == 'english' && language != 'english'){ - //上个字符是英语,当前字符不是英语,直接在当前字符前面追加空格 - langStrs[language][index]['beforeText'] = ' '; - } - } - - - } - } - - var result = new Array(); - result['langStrs'] = langStrs; - result['storage_language'] = language; //实际存入了哪种语种队列 - //console.log(result); - //console.log(langStrs) - //console.log(charstr); - return result; - }, - - /* - * 不同于语言,这个只是单纯的连接符。比如英文单词之间有逗号、句号、空格, 汉字之间有逗号句号书名号的。避免一行完整的句子被分割,导致翻译不准确 - * 单独拿他出来,目的是为了更好的判断计算,提高翻译的准确率 - */ - connector:function(str){ - - /* - 通用的有 空格、阿拉伯数字 - 1.不间断空格\u00A0,主要用在office中,让一个单词在结尾处不会换行显示,快捷键ctrl+shift+space ; - 2.半角空格(英文符号)\u0020,代码中常用的; - 3.全角空格(中文符号)\u3000,中文文章中使用; - */ - if(/.*[\u0020\u00A0\u202F\u205F\u3000]+.*$/.test(str)){ - return true; - } - /* - U+0030 0 数字 0 - U+0031 1 数字 1 - U+0032 2 数字 2 - U+0033 3 数字 3 - U+0034 4 数字 4 - U+0035 5 数字 5 - U+0036 6 数字 6 - U+0037 7 数字 7 - U+0038 8 数字 8 - U+0039 9 数字 9 - */ - if(/.*[\u0030-\u0039]+.*$/.test(str)){ - return true - } - - - /* - 英文场景 - 英文逗号、句号 - 这里不包括() 因为这里面的基本属于补充,对语句前后并无强依赖关系 - - U+0021 ! 叹号 - U+0022 " 双引号 - U+0023 # 井号 - U+0024 $ 价钱/货币符号 - U+0025 % 百分比符号 - U+0026 & 英文“and”的简写符号 - U+0027 ' 引号 - U+002C , 逗号 - U+002D - 连字号/减号 - U+002E . 句号 - U+003A : 冒号 - U+003B ; 分号 - U+003F ? 问号 - U+0040 @ 英文“at”的简写符号 - - - */ - if(/.*[\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u002C\u002D\u002E\u003A\u003B\u003F\u0040]+.*$/.test(str)){ - return true; - } - - /* - 中文标点符号 - 名称 Unicode 符号 - 句号 3002 。 - 问号 FF1F ? - 叹号 FF01 ! - 逗号 FF0C , - 顿号 3001 、 - 分号 FF1B ; - 冒号 FF1A : - 引号 300C 「 - 300D 」 - 引号 300E 『 - 300F 』 - 引号 2018 ‘ - 2019 ’ - 引号 201C “ - 201D ” - 括号 FF08 ( - FF09 ) - 括号 3014 〔 - 3015 〕 - 括号 3010 【 - 3011 】 - 破折号 2014 — - 省略号 2026 … - 连接号 2013 – - 间隔号 FF0E . - 书名号 300A 《 - 300B 》 - 书名号 3008 〈 - 3009 〉 - 键盘123前面的那个符号 · 00b7 - */ - if(/.*[\u3002\uFF1F\uFF01\uFF0C\u3001\uFF1B\uFF1A\u300C\u300D\u300E\u300F\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\u3010\u3011\u2014\u2026\u2013\uFF0E\u300A\u300B\u3008\u3009\u00b7]+.*$/.test(str)){ - return true; - } - - - - - //不是,返回false - return false; - }, - //语种的单词连接符是否需要空格,比如中文简体、繁体、韩文、日语都不需要空格,则返回false, 但是像是英文的单词间需要空格进行隔开,则返回true - //如果未匹配到,默认返回true - //language:语种,传入如 english - wordBlankConnector:function(language){ - if(language == null || typeof(language) == 'undefined'){ - return true; - } - switch (language.trim().toLowerCase()){ - case 'chinese_simplified': - return false; - case 'chinese_traditional': - return false; - case 'korean': - return false; - case 'japanese': - return false; - } - //其他情况则返回true - return true; - }, - //繁体中文的字典,判断繁体中文就是通过此判断 - chinese_traditional_dict: '皚藹礙愛翺襖奧壩罷擺敗頒辦絆幫綁鎊謗剝飽寶報鮑輩貝鋇狽備憊繃筆畢斃閉邊編貶變辯辮鼈癟瀕濱賓擯餅撥缽鉑駁蔔補參蠶殘慚慘燦蒼艙倉滄廁側冊測層詫攙摻蟬饞讒纏鏟産闡顫場嘗長償腸廠暢鈔車徹塵陳襯撐稱懲誠騁癡遲馳恥齒熾沖蟲寵疇躊籌綢醜櫥廚鋤雛礎儲觸處傳瘡闖創錘純綽辭詞賜聰蔥囪從叢湊竄錯達帶貸擔單鄲撣膽憚誕彈當擋黨蕩檔搗島禱導盜燈鄧敵滌遞締點墊電澱釣調叠諜疊釘頂錠訂東動棟凍鬥犢獨讀賭鍍鍛斷緞兌隊對噸頓鈍奪鵝額訛惡餓兒爾餌貳發罰閥琺礬釩煩範販飯訪紡飛廢費紛墳奮憤糞豐楓鋒風瘋馮縫諷鳳膚輻撫輔賦複負訃婦縛該鈣蓋幹趕稈贛岡剛鋼綱崗臯鎬擱鴿閣鉻個給龔宮鞏貢鈎溝構購夠蠱顧剮關觀館慣貫廣規矽歸龜閨軌詭櫃貴劊輥滾鍋國過駭韓漢閡鶴賀橫轟鴻紅後壺護滬戶嘩華畫劃話懷壞歡環還緩換喚瘓煥渙黃謊揮輝毀賄穢會燴彙諱誨繪葷渾夥獲貨禍擊機積饑譏雞績緝極輯級擠幾薊劑濟計記際繼紀夾莢頰賈鉀價駕殲監堅箋間艱緘繭檢堿鹼揀撿簡儉減薦檻鑒踐賤見鍵艦劍餞漸濺澗漿蔣槳獎講醬膠澆驕嬌攪鉸矯僥腳餃繳絞轎較稭階節莖驚經頸靜鏡徑痙競淨糾廄舊駒舉據鋸懼劇鵑絹傑潔結誡屆緊錦僅謹進晉燼盡勁荊覺決訣絕鈞軍駿開凱顆殼課墾懇摳庫褲誇塊儈寬礦曠況虧巋窺饋潰擴闊蠟臘萊來賴藍欄攔籃闌蘭瀾讕攬覽懶纜爛濫撈勞澇樂鐳壘類淚籬離裏鯉禮麗厲勵礫曆瀝隸倆聯蓮連鐮憐漣簾斂臉鏈戀煉練糧涼兩輛諒療遼鐐獵臨鄰鱗凜賃齡鈴淩靈嶺領餾劉龍聾嚨籠壟攏隴樓婁摟簍蘆盧顱廬爐擄鹵虜魯賂祿錄陸驢呂鋁侶屢縷慮濾綠巒攣孿灤亂掄輪倫侖淪綸論蘿羅邏鑼籮騾駱絡媽瑪碼螞馬罵嗎買麥賣邁脈瞞饅蠻滿謾貓錨鉚貿麽黴沒鎂門悶們錳夢謎彌覓綿緬廟滅憫閩鳴銘謬謀畝鈉納難撓腦惱鬧餒膩攆撚釀鳥聶齧鑷鎳檸獰甯擰濘鈕紐膿濃農瘧諾歐鷗毆嘔漚盤龐國愛賠噴鵬騙飄頻貧蘋憑評潑頗撲鋪樸譜臍齊騎豈啓氣棄訖牽扡釺鉛遷簽謙錢鉗潛淺譴塹槍嗆牆薔強搶鍬橋喬僑翹竅竊欽親輕氫傾頃請慶瓊窮趨區軀驅齲顴權勸卻鵲讓饒擾繞熱韌認紉榮絨軟銳閏潤灑薩鰓賽傘喪騷掃澀殺紗篩曬閃陝贍繕傷賞燒紹賒攝懾設紳審嬸腎滲聲繩勝聖師獅濕詩屍時蝕實識駛勢釋飾視試壽獸樞輸書贖屬術樹豎數帥雙誰稅順說碩爍絲飼聳慫頌訟誦擻蘇訴肅雖綏歲孫損筍縮瑣鎖獺撻擡攤貪癱灘壇譚談歎湯燙濤縧騰謄銻題體屜條貼鐵廳聽烴銅統頭圖塗團頹蛻脫鴕馱駝橢窪襪彎灣頑萬網韋違圍爲濰維葦偉僞緯謂衛溫聞紋穩問甕撾蝸渦窩嗚鎢烏誣無蕪吳塢霧務誤錫犧襲習銑戲細蝦轄峽俠狹廈鍁鮮纖鹹賢銜閑顯險現獻縣餡羨憲線廂鑲鄉詳響項蕭銷曉嘯蠍協挾攜脅諧寫瀉謝鋅釁興洶鏽繡虛噓須許緒續軒懸選癬絢學勳詢尋馴訓訊遜壓鴉鴨啞亞訝閹煙鹽嚴顔閻豔厭硯彥諺驗鴦楊揚瘍陽癢養樣瑤搖堯遙窯謠藥爺頁業葉醫銥頤遺儀彜蟻藝億憶義詣議誼譯異繹蔭陰銀飲櫻嬰鷹應纓瑩螢營熒蠅穎喲擁傭癰踴詠湧優憂郵鈾猶遊誘輿魚漁娛與嶼語籲禦獄譽預馭鴛淵轅園員圓緣遠願約躍鑰嶽粵悅閱雲鄖勻隕運蘊醞暈韻雜災載攢暫贊贓髒鑿棗竈責擇則澤賊贈紮劄軋鍘閘詐齋債氈盞斬輾嶄棧戰綻張漲帳賬脹趙蟄轍鍺這貞針偵診鎮陣掙睜猙幀鄭證織職執紙摯擲幟質鍾終種腫衆謅軸皺晝驟豬諸誅燭矚囑貯鑄築駐專磚轉賺樁莊裝妝壯狀錐贅墜綴諄濁茲資漬蹤綜總縱鄒詛組鑽緻鐘麼為隻兇準啟闆裡靂餘鍊洩', - /* - 中文判断 - 返回: - simplified:简体中文 - traditional:繁体中文 - 空字符串:不是中文 - */ - chinese:function(str){ - if(/.*[\u4e00-\u9fa5]+.*$/.test(str)){ - if(this.chinese_traditional_dict.indexOf(str) > -1){ - return 'traditional'; - } else { - return 'simplified'; - } - } else { - return ''; - } - }, - //是否包含英文,true:包含 - english:function(str){ - if(/.*[\u0041-\u005a]+.*$/.test(str)){ - return true; - } else if(/.*[\u0061-\u007a]+.*$/.test(str)){ - return true; - } else { - return false; - } - }, - //是否包含日语,true:包含 - japanese:function(str){ - if(/.*[\u3040-\u309F\u30A0-\u30FF]+.*$/.test(str)){ - return true - } else { - return false; - } - }, - //是否包含韩语,true:包含 - korean:function(str){ - if(/.*[\uAC00-\uD7AF]+.*$/.test(str)){ - return true - } else { - return false; - } - }, - //0-9 阿拉伯数字 - number:function(str){ - if(/.*[\u0030-\u0039]+.*$/.test(str)){ - return true; - } - return false; - }, - //意大利语 - italian:function(str){ - if(/.*[\u00E0-\u00F6]+.*$/.test(str)){ - return true; - } - return false; - }, - - //是否包含特殊字符 - specialCharacter:function(str){ - //如:① ⑴ ⒈ - if(/.*[\u2460-\u24E9]+.*$/.test(str)){ - return true - } - - //如:┊┌┍ ▃ ▄ ▅ - if(/.*[\u2500-\u25FF]+.*$/.test(str)){ - return true - } - - //如:㈠ ㎎ ㎏ ㎡ - if(/.*[\u3200-\u33FF]+.*$/.test(str)){ - return true - } - - //如:与ANSI对应的全角字符 - if(/.*[\uFF00-\uFF5E]+.*$/.test(str)){ - return true - } - - //其它特殊符号 - if(/.*[\u2000-\u22FF]+.*$/.test(str)){ - return true - } - - // 、><等符号 - if(/.*[\u3001-\u3036]+.*$/.test(str)){ - return true; - } - - /* - //阿拉伯数字 0-9 - if(/.*[\u0030-\u0039]+.*$/.test(str)){ - return true; - } - */ - - /* - U+0020 空格 - U+0021 ! 叹号 - U+0022 " 双引号 - U+0023 # 井号 - U+0024 $ 价钱/货币符号 - U+0025 % 百分比符号 - U+0026 & 英文“and”的简写符号 - U+0027 ' 引号 - U+0028 ( 开 左圆括号 - U+0029 ) 关 右圆括号 - U+002A * 星号 - U+002B + 加号 - U+002C , 逗号 - U+002D - 连字号/减号 - U+002E . 句号 - U+002F / 左斜杠 - */ - if(/.*[\u0020-\u002F]+.*$/.test(str)){ - return true; - } - - /* - U+003A : 冒号 - U+003B ; 分号 - U+003C < 小于符号 - U+003D = 等于号 - U+003E > 大于符号 - U+003F ? 问号 - U+0040 @ 英文“at”的简写符号 - U+0041 A 拉丁字母 A - U+0042 B 拉丁字母 B - U+0043 C 拉丁字母 C - U+0044 D 拉丁字母 D - U+0045 E 拉丁字母 E - U+0046 F 拉丁字母 F - U+0047 G 拉丁字母 G - U+0048 H 拉丁字母 H - U+0049 I 拉丁字母 I - U+004A J 拉丁字母 J - U+004B K 拉丁字母 K - U+004C L 拉丁字母 L - U+004D M 拉丁字母 M - U+004E N 拉丁字母 N - U+004F O 拉丁字母 O - U+0050 P 拉丁字母 P - U+0051 Q 拉丁字母 Q - U+0052 R 拉丁字母 R - U+0053 S 拉丁字母 S - U+0054 T 拉丁字母 T - U+0055 U 拉丁字母 U - U+0056 V 拉丁字母 V - U+0057 W 拉丁字母 W - U+0058 X 拉丁字母 X - U+0059 Y 拉丁字母 Y - U+005A Z 拉丁字母 Z - U+005B [ 开 方括号 - U+005C \ 右斜杠 - U+005D ] 关 方括号 - U+005E ^ 抑扬(重音)符号 - U+005F _ 底线 - U+0060 ` 重音符 - U+0061 a 拉丁字母 a - U+0062 b 拉丁字母 b - U+0063 c 拉丁字母 c - U+0064 d 拉丁字母 d - U+0065 e 拉丁字母 e - U+0066 f 拉丁字母 f - U+0067 g 拉丁字母 g - U+0068 h 拉丁字母 h - U+0069 i 拉丁字母 i - U+006A j 拉丁字母 j - U+006B k 拉丁字母 k - U+006C l 拉丁字母 l(L的小写) - U+006D m 拉丁字母 m - U+006E n 拉丁字母 n - U+006F o 拉丁字母 o - U+0070 p 拉丁字母 p - U+0071 q 拉丁字母 q - U+0072 r 拉丁字母 r - U+0073 s 拉丁字母 s - U+0074 t 拉丁字母 t - U+0075 u 拉丁字母 u - U+0076 v 拉丁字母 v - U+0077 w 拉丁字母 w - U+0078 x 拉丁字母 x - U+0079 y 拉丁字母 y - U+007A z 拉丁字母 z - U+007B { 开 左花括号 - U+007C | 直线 - U+007D } 关 右花括号 - U+007E ~ 波浪纹 - */ - if(/.*[\u003A-\u007E]+.*$/.test(str)){ - return true; - } - - //空白字符,\u0009\u000a + https://cloud.tencent.com/developer/article/2128593 - if(/.*[\u0009\u000a\u0020\u00A0\u1680\u180E\u202F\u205F\u3000\uFEFF]+.*$/.test(str)){ - return true; - } - if(/.*[\u2000-\u200B]+.*$/.test(str)){ - return true; - } - - /* - 拉丁字母 - 代码 显示 描述 - U+00A1 ¡ 倒转的叹号 - U+00A2 ¢ (货币单位)分钱、毫子 - U+00A3 £ (货币)英镑 - U+00A4 ¤ (货币)当货币未有符号时以此替代 - U+00A5 ¥ (货币)日元 - U+00A6 ¦ 两条断开的直线 - U+00A7 § 文件分不同部分 - U+00A8 ¨ (语言)分音 - U+00A9 © 版权符 - U+00AA ª (意大利文、葡萄牙文、西班牙文)阴性序数 - U+00AB « 双重角形引号 - U+00AC ¬ 逻辑非 - U+00AE ® 商标 - U+00AF ¯ 长音 - U+00B0 ° 角度 - U+00B1 ± 正负号 - U+00B2 ² 二次方 - U+00B3 ³ 三次方 - U+00B4 ´ 锐音符 - U+00B5 µ 百万分之一,10?6 - U+00B6 ¶ 文章分段 - U+00B7 · 间隔号 - U+00B8 ¸ 软音符 - U+00B9 ¹ 一次方 - U+00BA º (意大利文、葡萄牙文、西班牙文)阳性序数 - U+00BB » 指向右的双箭头 - U+00BC ¼ 四分之一 - U+00BD ½ 二分之一 - U+00BE ¾ 四分之三 - U+00BF ¿ 倒转的问号 - U+00C1 Á 在拉丁字母 A 上加锐音符 - U+00C2 Â 在拉丁字母 A 上加抑扬符“^” - U+00C3 Ã 在拉丁字母 A 上加“~” - U+00C4 Ä 在拉丁字母 A 上加分音符“..” - U+00C5 Å 在拉丁字母 A 上加角度符“°” - U+00C6 Æ 拉丁字母 A、E 的混合 - U+00C7 Ç 在拉丁字母 C 下加软音符 - U+00C8 È 在拉丁字母 E 上加重音符 - U+00C9 É 在拉丁字母 E 上加锐音符 - U+00CA Ê 在拉丁字母 E 上加抑扬符 - U+00CB Ë 在拉丁字母 E 上加分音符 - U+00CC Ì 在拉丁字母 I 上加重音符 - U+00CD Í 在拉丁字母 I 上加锐音符 - U+00CE Î 在拉丁字母 I 上加抑扬符 - U+00CF Ï 在拉丁字母 I 上加分音符 - U+00D0 Ð 古拉丁字母,现只有法罗文和冰岛文和越南语使用 - U+00D1 Ñ 在拉丁字母 N 上加波浪纹“~” - U+00D2 Ò 在拉丁字母 O 上加重音符 - U+00D3 Ó 在拉丁字母 O 上加锐音符 - U+00D4 Ô 在拉丁字母 O 上加抑扬符 - U+00D5 Õ 在拉丁字母 O 上加波浪纹“~” - U+00D6 Ö 在拉丁字母 O 上加分音符 - U+00D7 × 乘号,亦可拖按“Alt”键,同时按“41425”五键 - U+00D8 Ø 在拉丁字母 O 由右上至左下加对角斜线“/” - U+00D9 Ù 在拉丁字母 U 上加重音符 - U+00DA Ú 在拉丁字母 U 上加锐音符 - U+00DB Û 在拉丁字母 U 上加抑扬符 - U+00DC Ü 在拉丁字母 U 上加分音符 - U+00DD Ý 在拉丁字母 Y 上加锐音符 - U+00DE Þ 古拉丁字母,现已被“Th”取替 - U+00DF ß 德文字母 - U+00E0 à 在拉丁字母 a 上加重音符 - U+00E1 á 在拉丁字母 a 上加锐音符 - U+00E2 â 在拉丁字母 a 上加抑扬符 - U+00E3 ã 在拉丁字母 a 上加波浪纹“~” - U+00E4 ä 在拉丁字母 a 上加分音符 - U+00E5 å 在拉丁字母 a 上加角度符“°” - U+00E6 æ 拉丁字母 a、e 的混合 - U+00E7 ç 在拉丁字母 c 下加软音符 - U+00E8 è 在拉丁字母 e 上加锐音符 - U+00E9 é 在拉丁字母 e 上加重音符 - U+00EA ê 在拉丁字母 e 上加抑扬符 - U+00EB ë 在拉丁字母 e 上加分音符 - U+00EC ì 在拉丁字母 i 上加重音符 - U+00ED í 在拉丁字母 i 上加锐音符 - U+00EE î 在拉丁字母 i 上加抑扬符 - U+00EF ï 在拉丁字母 i 上加分音符 - U+00F0 ð 古拉丁字母 - U+00F1 ñ 在拉丁字母 n 上加波浪纹“~” - U+00F2 ò 在拉丁字母 o 上加重音符 - U+00F3 ó 在拉丁字母 o 上加锐音符 - U+00F4 ô 在拉丁字母 o 上加抑扬符 - U+00F5 õ 在拉丁字母 o 上加波浪纹“~” - U+00F6 ö 在拉丁字母 o 上加分音符 - U+00F7 ÷ 除号,亦可拖按“Alt”键,同时按“41426”五键 - U+00F8 ø 在拉丁字母 o 由右上至左下加对角斜线“/” - U+00F9 ù 在拉丁字母 u 上加重音符 - U+00FA ú 在拉丁字母 u 上加锐音符 - U+00FB ? 在拉丁字母 u 上加抑扬符 - U+00FC ü 在拉丁字母 u 上加分音符 - U+00FD ý 在拉丁字母 y 上加锐音符 - U+00FE þ 古拉丁字母,现已被“th”取替 - U+00FF ü 在拉丁字母 u 上加分音符 - 拉丁字母(扩展 A) - 代码 显示 描述 - U+0100 Ā 在拉丁字母 A 上加长音符 - U+0101 ā 在拉丁字母 a 上加长音符 - U+0102 Ă 在拉丁字母 A 上加短音符 - U+0103 ă 在拉丁字母 a 上加短音符 - U+0104 Ą 在拉丁字母 A 上加反尾形符 - U+0105 ą 在拉丁字母 a 上加反尾形符 - 拉丁字母(扩展 C) - 代码 显示 描述 - U+2C60 Ⱡ 在拉丁字母“L”中间加两条横线“=” - U+2C61 ⱡ 在拉丁字母“l”(L 的小写)中间加两条横线“=” - U+2C62 Ɫ 在拉丁字母“L”(大写)中间加一条波浪线“~” - U+2C63 Ᵽ 在拉丁字母“P”中间加一条横线“-” - U+2C64 Ɽ 在拉丁字母“R”下加一条尾巴 - U+2C65 ⱥ 在拉丁字母“a”上加一条对角斜线“/” - U+2C66 ⱦ 在拉丁字母“t”上加一条对角斜线“/” - U+2C67 Ⱨ 在拉丁字母“H”下加一条尾巴 - U+2C68 ⱨ 在拉丁字母“h”下加一条尾巴 - U+2C69 Ⱪ 在拉丁字母“K”下加一条尾巴 - U+2C6A ⱪ 在拉丁字母“k”下加一条尾巴 - U+2C6B Ⱬ 在拉丁字母“Z”下加一条尾巴 - U+2C6C ⱬ 在拉丁字母“z”下加一条尾巴 - U+2C74 ⱴ 在拉丁字母“v”的起笔加一个弯勾 - U+2C75 Ⱶ 拉丁字母“H”的左半部 - U+2C76 ⱶ 拉丁字母“h”的左半部 - U+2C77 ⱷ 希腊字母“φ”的上半部 - */ - if(/.*[\u00A1-\u0105]+.*$/.test(str)){ - return true; - } - if(/.*[\u2C60-\u2C77]+.*$/.test(str)){ - return true; - } - - - return false; - } - }, - //用户第一次打开网页时,自动判断当前用户所在国家使用的是哪种语言,来自动进行切换为用户所在国家的语种。 - //如果使用后,第二次在用,那就优先以用户所选择的为主 - executeByLocalLanguage:function(){ - translate.request.post(translate.request.api.ip, {}, function(data){ - //console.log(data); - if(data.result == 0){ - console.log('==== ERROR 获取当前用户所在区域异常 ===='); - console.log(data.info); - console.log('==== ERROR END ===='); - }else{ - translate.storage.set('to',data.language); //设置目标翻译语言 - translate.to = data.language; //设置目标语言 - translate.selectLanguageTag - translate.execute(); //执行翻译 - } - }); - }, - - util:{ - /* 生成一个随机UUID,复制于 https://gitee.com/mail_osc/kefu.js */ - uuid:function() { - var d = new Date().getTime(); - if (window.performance && typeof window.performance.now === "function") { - d += performance.now(); //use high-precision timer if available - } - var uuid = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - var r = (d + Math.random() * 16) % 16 | 0; - d = Math.floor(d / 16); - return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16); - }); - return uuid; - }, - - //判断字符串中是否存在tag标签。 true存在 - findTag:function(str) { - var reg = /<[^>]+>/g; - return reg.test(str); - }, - //传入一个数组,从数组中找出现频率最多的一个返回。 如果多个频率出现的次数一样,那会返回多个 - arrayFindMaxNumber:function(arr){ - - // 储存每个元素出现的次数 - var numbers = {} - - // 储存出现最多次的元素 - var maxStr = [] - - // 储存最多出现的元素次数 - var maxNum = 0 - - for(var i =0,len=arr.length;imaxNum){ - maxNum = numbers[arr[i]] - } - } - - for(var item in numbers){ - if(numbers[item]===maxNum){ - maxStr.push(item) - } - } - - return maxStr; - }, - //对字符串进行hash化,目的取唯一值进行标识 - hash:function(str){ - if(str == null || typeof(str) == 'undefined'){ - return str; - } - var hash = 0, i, chr; - if (str.length === 0){ - return hash; - } - - for (i = 0; i < str.length; i++) { - chr = str.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; // Convert to 32bit integer - } - return hash+''; - }, - //去除一些指定字符,如换行符。 如果传入的是null,则返回空字符串 - charReplace:function(str){ - - if(str == null){ - return ''; - } - str = str.trim(); - str = str.replace(/\t|\n|\v|\r|\f/g,''); //去除换行符等 - //str = str.replace(/&/g, "%26"); //因为在提交时已经进行了url编码了 - return str; - }, - //RegExp相关 - regExp:{ - // new RegExp(pattern, resultText); 中的 pattern 字符串的预处理 - pattern:function(str){ - str = str.replace(/\\/g,'\\\\'); //这个一定要放在第一个,不然会被下面的影响 - //str = str.replace(/'/g,'\\\''); - str = str.replace(/\"/g,'\\\"'); - //str = str.replace(/./g,'\\\.'); - str = str.replace(/\?/g,'\\\?'); - str = str.replace(/\$/g,'\\\$'); - str = str.replace(/\(/g,'\\\('); - str = str.replace(/\)/g,'\\\)'); - str = str.replace(/\|/g,'\\\|'); - str = str.replace(/\+/g,'\\\+'); - str = str.replace(/\*/g,'\\\*'); - str = str.replace(/\[/g,'\\\['); - str = str.replace(/\]/g,'\\\]'); - str = str.replace(/\^/g,'\\\^'); - str = str.replace(/\{/g,'\\\{'); - str = str.replace(/\}/g,'\\\}'); - return str; - }, - // new RegExp(pattern, resultText); 中的 resultText 字符串的预处理 - resultText:function(str){ - //str = str.replace(/"/g,"\""); - //str = str.replace(/'/g,"\\\'"); - //str = str.replace(/"/g,"\\\""); - return str; - } - }, - //获取URL的GET参数。若没有,返回"" - getUrlParam:function (name){ - var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); - var r = window.location.search.substr(1).match(reg); - if(r!=null)return unescape(r[2]); return ""; - }, - /** - * 同步加载JS,加载过程中会阻塞,加载完毕后继续执行后面的。 - * url: 要加载的js的url - */ - synchronizesLoadJs:function(url){ - var xmlHttp = null; - if(window.ActiveXObject){//IE - try { - //IE6以及以后版本中可以使用 - xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - //IE5.5以及以后版本可以使用 - xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); - } - }else if(window.XMLHttpRequest){ - //Firefox,Opera 8.0+,Safari,Chrome - xmlHttp = new XMLHttpRequest(); - } - //采用同步加载 - xmlHttp.open("GET",url,false); - //发送同步请求,如果浏览器为Chrome或Opera,必须发布后才能运行,不然会报错 - xmlHttp.send(null); - //4代表数据发送完毕 - if( xmlHttp.readyState == 4 ){ - //0为访问的本地,200到300代表访问服务器成功,304代表没做修改访问的是缓存 - if((xmlHttp.status >= 200 && xmlHttp.status <300) || xmlHttp.status == 0 || xmlHttp.status == 304){ - var myBody = document.getElementsByTagName("HTML")[0]; - var myScript = document.createElement( "script" ); - myScript.language = "javascript"; - myScript.type = "text/javascript"; - try{ - //IE8以及以下不支持这种方式,需要通过text属性来设置 - myScript.appendChild(document.createTextNode(xmlHttp.responseText)); - }catch (ex){ - myScript.text = xmlHttp.responseText; - } - myBody.appendChild(myScript); - return true; - }else{ - return false; - } - }else{ - return false; - } - }, - //加载 msg.js - loadMsgJs:function(){ - if(typeof(msg) != 'undefined'){ - return; - } - translate.util.synchronizesLoadJs('https://res.zvo.cn/msg/msg.js'); - }, - /* - 对一个对象,按照对象的key的长度进行排序,越长越在前面 - */ - objSort:function(obj){ - // 获取对象数组的所有 key,并转换为普通数组 - var keys = Array.from(Object.keys(obj)); - - // 对 key 数组进行排序 - keys.sort(function(a, b){ - return b.length - a.length; - }); - - // 定义一个新的对象数组,用来存储排序后的结果 - var sortedObj = new Array(); - - // 遍历排序后的 key 数组,将对应的值复制到新的对象数组中,并删除原来的对象数组中的键值对 - for (var key of keys) { - sortedObj[key] = obj[key]; - } - return sortedObj; - }, - /* - 将 2.11.3.20231232 转化为 2011003 - 转化时会去掉最后一个日期的字符 - */ - versionStringToInt:function(versionString){ - var vs = versionString.split('\.'); - var result = 0; - result = parseInt(vs[0])*1000*1000 + result; - result = parseInt(vs[1])*1000 + result; - result = parseInt(vs[2]) + result; - - return result; - }, - /** - * 将一个 JSONArray 数组,按照文字长度进行拆分。 - * 比如传入的 array 数组的文字长度是6200,传入的 size 是2000,那么就是将 array 数组拆分为多个长度不超出2000的数组返回。 - * 注意,这个长度是指 array.toString() 后的长度,也就是包含了 [""] 这种符号的长度 - * @param array 要被拆分的数组,其内都是String类型,传入格式如 ["你好","世界"] - * @param size 要被拆分的长度 - * @return 被拆分后的数组列表 - * @author 刘晓腾 - */ - split:function(array, size) { - let list = []; - // 数组长度小于size,直接进行返回 - if(JSON.stringify(array).length <= size) { - list.push(array); - } else { - // 转换成String - let arrayStr = JSON.stringify(array).trim().substring(1, JSON.stringify(array).length - 1); - - // 判断size和字符串长度的差值,如果为1或者2,就直接拆成两段 - if (JSON.stringify(array).length - size <= 2) { - size = size - 4; - // 拆两段 - let str1 = arrayStr.substring(0, arrayStr.lastIndexOf("\",\"")+1); - let str2 = arrayStr.substring(arrayStr.lastIndexOf("\",\"")+2); - list.push(JSON.parse("[" + str1 + "]")); - list.push(JSON.parse("[" + str2 + "]")); - } else { - size = size - 2; - // 拆多段 - let index = 0; - while (index - arrayStr.length < 0) { - // 按照指定大小拆一段 - let s = ""; - if ((index+size) - arrayStr.length >= 0) { - s = arrayStr.substring(index); - } else { - s = arrayStr.substring(index, (index+size)); - } - // 结尾长度默认为字符串长度 - let endIndex = s.length; - // 因为下次开始的第一个字符可能会是逗号,所以下次开始需要+1 - let startNeedAdd = 1; - // 判断最后一个字符是否为双引号 - if (s.endsWith("\"")) { - // 判断倒数第二个是否为逗号 - if (s.endsWith("\",\"")) { - // 删除两个字符 - endIndex-=2; - } else if (!s.startsWith("\"")) { - // 如果开头不是引号,需要补一个引号,这就导致会超长,所以结尾就要找指定字符的 - // 找出最后一个指定字符的位置 - let la = s.lastIndexOf("\",\""); - endIndex = la + 1; - } - } else if (s.endsWith("\",")) { - // 判断是否为逗号,是的话删除一个字符 - endIndex-=1; - } else { - // 都不是,那就是内容结尾 - // 找出最后一个指定字符的位置 - let la = s.lastIndexOf("\",\""); - endIndex = la + 1; - // 内容超长,endIndex就会变成0,这时需要手动赋值 - if (endIndex <= 0) { - // 看看是否以引号开头,如果不是,需要拼两个引号 - if (s.startsWith("\"")) { - // 拼一个引号,-1 - endIndex = s.length() - 1; - } else { - // 拼两个引号,-2 - endIndex = s.length() - 2; - } - if (!s.endsWith("\"")) { - // 开始不是逗号了,不能-1 - startNeedAdd = 0; - } - } - } - // 根据处理的结尾长度进行第二次拆分 - let s2 = ""; - if (endIndex - s.length > 0 || endIndex - 0 == 0) { - s2 = s; - endIndex = endIndex + s2.length; - } else { - s2 = s.substring(0, endIndex); - } - if (!s2.startsWith("\"") && !s2.startsWith(",\"")) { - // 拼一个引号 - s2 = "\"" + s2; - } - if (!s2.endsWith("\"")) { - // 拼一个引号 - s2 = s2 +"\""; - } - // 计算下次循环开始的长度 - index += (endIndex + startNeedAdd); - // 加到list - s2 = "[" + s2 + "]"; - try { - list.push(JSON.parse(s2)); - } catch (e) { - // 遇到错误,略过一个字符 - index = index - (endIndex + startNeedAdd) + 1; - } - } - } - } - return list; - } - - }, - //机器翻译采用哪种翻译服务 - service:{ - /* - name填写的值有 - translate.service 有 http://translate.zvo.cn/41160.html 提供机器翻译服务 - client.edge 有edge浏览器接口提供翻译服务 ,也就是执行翻译时直接是 - - */ - name:'translate.service', - /* - 其实就是设置 translate.service.name - - */ - use: function(serviceName){ - if(typeof(serviceName) == 'string' && serviceName == 'client.edge'){ - translate.service.name = serviceName; - - //增加元素整体翻译能力 - translate.whole.tag.push('body'); - translate.whole.tag.push('head'); - translate.whole.tag.push('html'); - } - }, - //客户端方式的edge提供机器翻译服务 - edge:{ - api:{ //edge浏览器的翻译功能 - auth:'https://edge.microsoft.com/translate/auth', //auth授权拉取 - translate:'https://api.cognitive.microsofttranslator.com/translate?from={from}&to={to}&api-version=3.0&includeSentenceLength=true' //翻译接口 - }, - - language:{ - json:[{"id":"ukrainian","name":"УкраїнськаName","serviceId":"uk"},{"id":"norwegian","name":"Norge","serviceId":"no"},{"id":"welsh","name":"color name","serviceId":"cy"},{"id":"dutch","name":"nederlands","serviceId":"nl"},{"id":"japanese","name":"しろうと","serviceId":"ja"},{"id":"filipino","name":"Pilipino","serviceId":"fil"},{"id":"english","name":"English","serviceId":"en"},{"id":"lao","name":"ກະຣຸນາ","serviceId":"lo"},{"id":"telugu","name":"తెలుగుQFontDatabase","serviceId":"te"},{"id":"romanian","name":"Română","serviceId":"ro"},{"id":"nepali","name":"नेपालीName","serviceId":"ne"},{"id":"french","name":"Français","serviceId":"fr"},{"id":"haitian_creole","name":"Kreyòl ayisyen","serviceId":"ht"},{"id":"czech","name":"český","serviceId":"cs"},{"id":"swedish","name":"Svenska","serviceId":"sv"},{"id":"russian","name":"Русский язык","serviceId":"ru"},{"id":"malagasy","name":"Malagasy","serviceId":"mg"},{"id":"burmese","name":"ဗာရမ်","serviceId":"my"},{"id":"pashto","name":"پښتوName","serviceId":"ps"},{"id":"thai","name":"คนไทย","serviceId":"th"},{"id":"armenian","name":"Արմենյան","serviceId":"hy"},{"id":"chinese_simplified","name":"简体中文","serviceId":"zh-CHS"},{"id":"persian","name":"Persian","serviceId":"fa"},{"id":"chinese_traditional","name":"繁體中文","serviceId":"zh-CHT"},{"id":"kurdish","name":"Kurdî","serviceId":"ku"},{"id":"turkish","name":"Türkçe","serviceId":"tr"},{"id":"hindi","name":"हिन्दी","serviceId":"hi"},{"id":"bulgarian","name":"български","serviceId":"bg"},{"id":"malay","name":"Malay","serviceId":"ms"},{"id":"swahili","name":"Kiswahili","serviceId":"sw"},{"id":"oriya","name":"ଓଡିଆ","serviceId":"or"},{"id":"icelandic","name":"ÍslandName","serviceId":"is"},{"id":"irish","name":"Íris","serviceId":"ga"},{"id":"khmer","name":"ខ្មែរKCharselect unicode block name","serviceId":"km"},{"id":"gujarati","name":"ગુજરાતી","serviceId":"gu"},{"id":"slovak","name":"Slovenská","serviceId":"sk"},{"id":"kannada","name":"ಕನ್ನಡ್Name","serviceId":"kn"},{"id":"hebrew","name":"היברית","serviceId":"he"},{"id":"hungarian","name":"magyar","serviceId":"hu"},{"id":"marathi","name":"मराठीName","serviceId":"mr"},{"id":"tamil","name":"தாமில்","serviceId":"ta"},{"id":"estonian","name":"eesti keel","serviceId":"et"},{"id":"malayalam","name":"മലമാലം","serviceId":"ml"},{"id":"inuktitut","name":"ᐃᓄᒃᑎᑐᑦ","serviceId":"iu"},{"id":"arabic","name":"بالعربية","serviceId":"ar"},{"id":"deutsch","name":"Deutsch","serviceId":"de"},{"id":"slovene","name":"slovenščina","serviceId":"sl"},{"id":"bengali","name":"বেঙ্গালী","serviceId":"bn"},{"id":"urdu","name":"اوردو","serviceId":"ur"},{"id":"azerbaijani","name":"azerbaijani","serviceId":"az"},{"id":"portuguese","name":"português","serviceId":"pt"},{"id":"samoan","name":"lifiava","serviceId":"sm"},{"id":"afrikaans","name":"afrikaans","serviceId":"af"},{"id":"tongan","name":"汤加语","serviceId":"to"},{"id":"greek","name":"ελληνικά","serviceId":"el"},{"id":"indonesian","name":"IndonesiaName","serviceId":"id"},{"id":"spanish","name":"Español","serviceId":"es"},{"id":"danish","name":"dansk","serviceId":"da"},{"id":"amharic","name":"amharic","serviceId":"am"},{"id":"punjabi","name":"ਪੰਜਾਬੀName","serviceId":"pa"},{"id":"albanian","name":"albanian","serviceId":"sq"},{"id":"lithuanian","name":"Lietuva","serviceId":"lt"},{"id":"italian","name":"italiano","serviceId":"it"},{"id":"vietnamese","name":"Tiếng Việt","serviceId":"vi"},{"id":"korean","name":"한국어","serviceId":"ko"},{"id":"maltese","name":"Malti","serviceId":"mt"},{"id":"finnish","name":"suomi","serviceId":"fi"},{"id":"catalan","name":"català","serviceId":"ca"},{"id":"croatian","name":"hrvatski","serviceId":"hr"},{"id":"bosnian","name":"bosnian","serviceId":"bs-Latn"},{"id":"polish","name":"Polski","serviceId":"pl"},{"id":"latvian","name":"latviešu","serviceId":"lv"},{"id":"maori","name":"Maori","serviceId":"mi"}], - /* - 获取map形式的语言列表 - key为 translate.service 的 name - value为serviceId - - */ - getMap:function(){ - if(typeof(translate.service.edge.language.map) == 'undefined'){ - translate.service.edge.language.map = new Array(); - for(var i = 0; i < translate.service.edge.language.json.length; i++){ - var item = translate.service.edge.language.json[i]; - translate.service.edge.language.map[item.id] = item.serviceId; - } - } - return translate.service.edge.language.map; - } - }, - /** - * edge 进行翻译。 这个传入参数跟 translate.request.post 是一样的 - * @param path 请求的path(path,传入的是translate.request.api.translate 这种的,需要使用 getUrl 来组合真正请求的url ) - * @param data 请求的参数数据 - * @param func 请求完成的回调,传入如 function(data){ console.log(data); } - */ - translate:function(path, data, func){ - var textArray = JSON.parse(decodeURIComponent(data.text)); - let translateTextArray = translate.util.split(textArray, 48000); - //console.log(translateTextArray); - - - translate.request.send(translate.service.edge.api.auth, {}, function(auth){ - var from = translate.service.edge.language.getMap()[data.from]; - var to = translate.service.edge.language.getMap()[data.to]; - var transUrl = translate.service.edge.api.translate.replace('{from}',from).replace('{to}',to); - - //如果翻译量大,要拆分成多次翻译请求 - for(var tai = 0; tai 1){ - //这一次翻译呗拆分了多次请求,那么要进行补全数组,使数组个数能一致 - - /* - - 注意这里根据数组的长度来判断当前属于第几个数组, - 有几率会是拆分的数组,其中有两组的长度是一样的, - 这样的话是有问题的,只不过几率很小,就先这样了 - 但终归还是留了个坑 -- 记录 - - */ - - var currentIndex = -1; //当前翻译请求属于被拆分的第几个的数组下标,从0开始的 - for(var cri = 0; cri < translateTextArray.length; cri++){ - if(translateTextArray[cri].length - d.text.length == 0){ - currentIndex = cri; - break; - } - } - - //进行对前后进行补齐数组 - if(currentIndex < 0){ - console.log('------ERROR--------'); - console.log('翻译内容过多,进行拆分,但拆分判断出现异常,currentIndex:-1 请联系 http://translate.zvo.cn/43006.html 说明'); - } - //前插入空数组填充 - for(var addbeforei = 0; addbeforeicurrentIndex; addafteri--){ - var afterItemArrayLength = translateTextArray[addafteri].length; - for(var bi = 0; bi < afterItemArrayLength; bi++){ - d.text.push(null); - } - } - - } - - func(d); - }, 'post', true, {'Authorization':'Bearer '+auth, 'Content-Type':'application/json'}, function(xhr){ - console.log('---------error--------'); - console.log('edge translate service error, http code : '+xhr.status + ', response text : '+xhr.responseText); - }, true); - - - } - //console.log('translateResultArray') - //console.log(translateResultArray); - - - }, 'get', true, {'content-type':'application/x-www-form-urlencoded'}, function(xhr){ - console.log('---------error--------'); - console.log('edge translate service error, http code : '+xhr.status + ', response text : '+xhr.responseText); - }, true); - - - - - - } - } - }, - //request请求来源于 https://github.com/xnx3/request - request:{ - - //相关API接口方面 - api:{ - /** - * 翻译接口请求的域名主机 host - * 格式注意前面要带上协议如 https:// 域名后要加 / - * v2.8.2 增加数组形态,如 ['https://api.translate.zvo.cn/','xxxxx'] - */ - //host:'https://api.translate.zvo.cn/', - host:['https://api.translate.zvo.cn/','https://america.api.translate.zvo.cn/'], - //host的备用接口,格式同host,可以填写多个,只不过这里是数组格式。只有当主 host 无法连通时,才会采用备host来提供访问。如果为空也就是 [] 则是不采用备方案。 - //backupHost:['',''], - language:'language.json', //获取支持的语种列表接口 - translate:'translate.json', //翻译接口 - ip:'ip.json', //根据用户当前ip获取其所在地的语种 - connectTest:'connectTest.json', //用于 translate.js 多节点翻译自动检测网络连通情况 - init:'init.json', //获取最新版本号,跟当前版本进行比对,用于提醒版本升级等使用 - - }, - /* - 请求后端接口的响应。无论是否成功,都会触发此处。 - 另外当 xhr.readyState==4 的状态时才会触发。 - 此处会在接口请求响应后、且在translate.js处理前就会触发 - @param xhr XMLHttpRequest 接口请求 - - */ - response:function(xhr){ - //console.log('response------'); - //console.log(xhr); - }, - /* - 速度检测控制中心, 检测主备翻译接口的响应速度进行排列,真正请求时,按照排列的顺序进行请求 - v2.8.2增加 - - storage存储方面 - storage存储的key 存的什么 - speedDetectionControl_hostQueue hostQueue - speedDetectionControl_hostQueueIndex 当前要使用的是 hostQueue 中的数组下标。如果没有,这里默认视为0 - speedDetectionControl_lasttime 最后一次执行速度检测的时间戳,13位时间戳 - - - - */ - speedDetectionControl:{ - /* - - 进行 connect主节点缩减的时间,单位是毫秒. - 这个是进行 translate.request.speedDetectionControl.checkResponseSpeed() 节点测速时,translate.request.api.host 第一个元素是默认的主节点。 - 主节点在实际测速完后,会减去一定的时间,以便让用户大部分时间可以使用主节点,而不必走分节点。 - 例如主节点实际响应速度 3500 毫秒,那么会减去这里设置的2000毫秒,记为 1500 毫秒 - 当然如果是小于这里设置的2000毫秒,那么会记为0毫秒。 - 这样再跟其他分节点的响应时间进行对比,主节点只要不是响应超时,就会有更大的几率被选中为实际使用的翻译的节点 - - 这里的单位是毫秒。 - v2.10.2.20231225 增加 - */ - hostMasterNodeCutTime:2000, - - /* - 翻译的队列,这是根据网络相应的速度排列的,0下标为请求最快,1次之... - 其格式为: - [ - { - "host":"xxxxxxxx", - "time":123 //这里的单位是毫秒 - }, - { - "host":"xxxxxxxx", - "time":123 //这里的单位是毫秒 - } - ] - */ - hostQueue:[], - hostQueueIndex:-1, //当前使用的 hostQueue的数组下标, -1表示还未初始化赋予值,不可直接使用,通过 getHostQueueIndex() 使用 - disableTime:1000000, //不可用的时间,storage中存储的 speedDetectionControl_hostQueue 其中 time 这里,如果值是 这个,便是代表这个host处于不可用状态 - - - //获取 host queue 队列 - getHostQueue:function(){ - if(translate.request.speedDetectionControl.hostQueue.length == 0){ - //还没有,先从本地存储中取,看之前是否已经设置过了 - // 只有经过真正的网络测速后,才会加入 storage 的 hostQueue - var storage_hostQueue = translate.storage.get('speedDetectionControl_hostQueue'); - if(storage_hostQueue == null || typeof(storage_hostQueue) == 'undefined'){ - //本地存储中没有,也就是之前没设置过,是第一次用,那么直接讲 translate.request.api.host 赋予之 - //translate.request.api.host - //console.log(typeof(translate.request.api.host)) - if(typeof(translate.request.api.host) == 'string'){ - //单个,那么赋予数组形式 - //translate.request.speedDetectionControl.hostQueue = [{"host":translate.request.api.host, time:0 }]; - translate.request.api.host = [''+translate.request.api.host]; - } - - //console.log(translate.request.api.host) - //数组形态,多个,v2.8.2 增加多个,根据优先级返回 - translate.request.speedDetectionControl.hostQueue = []; - for(var i = 0; i updateTime){ - translate.request.speedDetectionControl.checkResponseSpeed(); - } - - } - - - return translate.request.speedDetectionControl.hostQueue; - }, - - /* - 服务于 checkResponseSpeed 用于将测试结果存入 storage - time: 当前接口请求的耗时,单位是毫秒。如果是 1000000 那么表示这个接口不可用 - */ - checkResponseSpeed_Storage:function(host, time){ - - translate.request.speedDetectionControl.checkHostQueue.push({"host":host, "time":time }); - //按照time进行排序 - translate.request.speedDetectionControl.checkHostQueue.sort((a, b) => a.time - b.time); - - //存储到 storage 持久化 - translate.storage.set('speedDetectionControl_hostQueue',JSON.stringify(translate.request.speedDetectionControl.checkHostQueue)); - translate.storage.set('speedDetectionControl_lasttime', new Date().getTime()); - - translate.request.speedDetectionControl.hostQueue = translate.request.speedDetectionControl.checkHostQueue; - }, - - //测试响应速度 - checkResponseSpeed:function(){ - var headers = { - 'content-type':'application/x-www-form-urlencoded', - }; - - - translate.request.speedDetectionControl.checkHostQueue = []; //用于实际存储 - translate.request.speedDetectionControl.checkHostQueueMap = []; //只是map,通过key取值,无其他作用 - - if(typeof(translate.request.api.host) == 'string'){ - //单个,那么赋予数组形式 - translate.request.api.host = [''+translate.request.api.host]; - } - - for(var i = 0; i < translate.request.api.host.length; i++){ - var host = translate.request.api.host[i]; - // 获取当前时间的时间戳 - translate.request.speedDetectionControl.checkHostQueueMap[host] = { - start:new Date().getTime() - }; - - - try{ - translate.request.send( - host+translate.request.api.connectTest, - {host:host}, - function(data){ - var host = data.info; - var map = translate.request.speedDetectionControl.checkHostQueueMap[host]; - var time = new Date().getTime() - map.start; - - if(translate.request.api.host[0] == host){ - //console.log('如果是第一个,那么是主的,默认允许缩减2000毫秒,也就是优先使用主的'); - time = time - translate.request.speedDetectionControl.hostMasterNodeCutTime; - if(time < 0){ - time = 0; - } - } - - translate.request.speedDetectionControl.checkResponseSpeed_Storage(host, time); - /* - translate.request.speedDetectionControl.checkHostQueue.push({"host":host, "time":time }); - //按照time进行排序 - translate.request.speedDetectionControl.checkHostQueue.sort((a, b) => a.time - b.time); - - //存储到 storage 持久化 - translate.storage.set('speedDetectionControl_hostQueue',JSON.stringify(translate.request.speedDetectionControl.checkHostQueue)); - translate.storage.set('speedDetectionControl_lasttime', new Date().getTime()); - - translate.request.speedDetectionControl.hostQueue = translate.request.speedDetectionControl.checkHostQueue; - //console.log(translate.request.speedDetectionControl.hostQueue); - */ - }, - 'post', - true, - headers, - function(data){ - //translate.request.speedDetectionControl.checkResponseSpeed_Storage(host, time); - var hostUrl = data.requestURL.replace('connectTest.json',''); - translate.request.speedDetectionControl.checkResponseSpeed_Storage(hostUrl, translate.request.speedDetectionControl.disableTime); - }, - false - ); - }catch(e){ - //console.log('e0000'); - console.log(e); - //time = 300000; //无法连接的,那么赋予 300 秒吧 - } - - } - - }, - - //获取当前使用的host的数组下标 - getHostQueueIndex:function(){ - if(translate.request.speedDetectionControl.hostQueueIndex < 0){ - //页面当前第一次使用,赋予值 - //先从 storage 中取 - var storage_index = translate.storage.get('speedDetectionControl_hostQueueIndex'); - if(typeof(storage_index) == 'undefined' || storage_index == null){ - //存储中不存在,当前用户(浏览器)第一次使用,默认赋予0 - translate.request.speedDetectionControl.hostQueueIndex = 0; - translate.storage.set('speedDetectionControl_hostQueueIndex',0); - }else{ - translate.request.speedDetectionControl.hostQueueIndex = storage_index; - } - } - return translate.request.speedDetectionControl.hostQueueIndex; - }, - - //获取当前要使用的host - getHost:function(){ - var queue = translate.request.speedDetectionControl.getHostQueue(); - //console.log(queue); - var queueIndex = translate.request.speedDetectionControl.getHostQueueIndex(); - if(queue.length > queueIndex){ - //正常,没有超出越界 - - }else{ - //异常,下标越界了!,固定返回最后一个 - console.log('异常,下标越界了!index:'+queueIndex); - queueIndex = queue.length-1; - } - //console.log(queueIndex); - return queue[queueIndex].host; - }, - - }, - //生成post请求的url - getUrl:function(path){ - var currentHost = translate.request.speedDetectionControl.getHost(); - var url = currentHost+path+'?v='+translate.version; - //console.log('url: '+url); - return url; - }, - /** - * post请求 - * @param path 请求的path(path,传入的是translate.request.api.translate 这种的,需要使用 getUrl 来组合真正请求的url ) - * @param data 请求的参数数据,传入如 - * { - * from: "chinese_simplified", - * text: "%5B%22%E4%BD%A0%E5%A5%BD%EF%BC%8C%E6%88%91", - * to: "chinese_traditional - * } - * - * @param func 请求完成的回调,传入如 function(data){ console.log(data); } - */ - post:function(path, data, func){ - var headers = { - 'content-type':'application/x-www-form-urlencoded', - }; - if(typeof(data) == 'undefined'){ - return; - } - - //企业级翻译自动检测 - translate.enterprise.automaticAdaptationService(); - - // ------- edge start -------- - var url = translate.request.getUrl(path); - //if(url.indexOf('edge') > -1 && path == translate.request.api.translate){ - if(translate.service.name == 'client.edge'){ - if(path == translate.request.api.translate){ - translate.service.edge.translate(path, data, func); - return; - } - if(path == translate.request.api.language){ - var d = {}; - d.info = 'SUCCESS'; - d.result = 1; - d.list = translate.service.edge.language.json; - func(d); - return; - } - - //return; - } - // ------- edge end -------- - - this.send(path, data, func, 'post', true, headers, null, true); - }, - /** - * 发送请求 - * url 请求的url或者path(path,传入的是translate.request.api.translate 这种的,需要使用 getUrl 来组合真正请求的url ) - * data 请求的数据,如 {"author":"管雷鸣",'site':'www.guanleiming.com'} - * func 请求完成的回调,传入如 function(data){} - * method 请求方式,可传入 post、get - * isAsynchronize 是否是异步请求, 传入 true 是异步请求,传入false 是同步请求。 如果传入false,则本方法返回xhr - * headers 设置请求的header,传入如 {'content-type':'application/x-www-form-urlencoded'}; - * abnormalFunc 响应异常所执行的方法,响应码不是200就会执行这个方法 ,传入如 function(xhr){} 另外这里的 xhr 会额外有个参数 xhr.requestURL 返回当前请求失败的url - * showErrorLog 是否控制台打印出来错误日志,true打印, false 不打印 - */ - send:function(url, data, func, method, isAsynchronize, headers, abnormalFunc, showErrorLog){ - //post提交的参数 - var params = ''; - if(data != null){ - if(typeof(data) == 'string'){ - params = data; //payload 方式 - }else{ - //表单提交方式 - for(var index in data){ - if(params.length > 0){ - params = params + '&'; - } - params = params + index + '=' + data[index]; - } - } - } - - - - if(url.indexOf('https://') == 0 || url.indexOf('http://') == 0){ - //采用的url绝对路径 - }else{ - //相对路径,拼接上host - url = translate.request.getUrl(url); - } - - var xhr=null; - try{ - xhr=new XMLHttpRequest(); - }catch(e){ - xhr=new ActiveXObject("Microsoft.XMLHTTP"); - } - //2.调用open方法(true----异步) - xhr.open(method,url,isAsynchronize); - //设置headers - if(headers != null){ - for(var index in headers){ - xhr.setRequestHeader(index,headers[index]); - } - } - if(translate.service.name == 'translate.service'){ - xhr.setRequestHeader('currentpage', window.location.href+''); - } - xhr.send(params); - //4.请求状态改变事件 - xhr.onreadystatechange=function(){ - if(xhr.readyState==4){ - translate.request.response(xhr); //自定义响应的拦截 - - if(xhr.status==200){ - //请求正常,响应码 200 - var json = null; - if(typeof(xhr.responseText) == 'undefined' || xhr.responseText == null){ - //相应内容为空 - }else{ - //响应内容有值 - if(xhr.responseText.indexOf('{') > -1 && xhr.responseText.indexOf('}') > -1){ - //应该是json格式 - try{ - json = JSON.parse(xhr.responseText); - }catch(e){ - console.log(e); - } - } - } - - if(json == null){ - func(xhr.responseText); - }else{ - func(json); - } - }else{ - if(showErrorLog){ - if(url.indexOf(translate.request.api.connectTest) > -1){ - //测试链接速度的不在报错里面 - }else{ - - //判断是否是v2版本的翻译,如果是 translate.service 模式并且没有使用企业级翻译,参会提示 - //2024.3月底开始,翻译使用量增加的太快,开源的翻译服务器有点扛不住经常出故障,所以直接把这个提示加到这里 - if(translate.service.name == 'translate.service' && !translate.enterprise.isUse){ - console.log('----- translate.js 提示 -----\n检测到您正在使用v2的旧版本,并且当前的v2接口恰好处于不稳定状态!所以您当前的翻译是并没有生效,也就是并没有正常进行翻译的,不过这不是您的问题,是v2版本的翻译通道因为开源免费,使用的人太多导致的偶尔不稳定。如果您想正常使用,建议您进行一下操作:\n建议一:切换到v3最新版本的 client.edge 翻译模式,设置方式可以参考: http://translate.zvo.cn/43086.html 它是2024年初新出的V3版本的翻译模式,翻译效果更稳定,而且也是完全免费使用。\n建议二:启用企业级稳定翻译,有些网站对翻译稳定性、实时性要求比较高的,可以考虑采用这种方式. 使用方式可参考: http://translate.zvo.cn/43262.html 这种方式是 2024.3月底应不少用户建议推出的一个独立翻译通道,这个翻译通道仅仅只有提供赞助的人才能使用,使用人数少,多台翻译服务器组件的自动负载以及健康检查耗时最短的最优翻译方案,使翻译更稳定。\n\n建议一跟建议二的区别是建议一延续了translate.js三年以来一直贯彻的开源免费的方针,同时也提供了相对稳定的翻译支持,它的翻译稳定性还是信得过的,一般使用这种就行。而建议二它对稳定性及翻译速度接口响应专门进行了深度优化,它的唯一缺点就是花钱。\n-------------'); - } - - //console.log(xhr); - console.log('------- translate.js service api response error --------'); - console.log(' http code : '+xhr.status); - console.log(' response : '+xhr.response); - console.log(' request url : '+url); - console.log(' request data : '+JSON.stringify(data)); - console.log(' request method : '+method); - console.log('---------------------- end ----------------------'); - } - - } - xhr.requestURL = url; - if(abnormalFunc != null){ - abnormalFunc(xhr); - } - } - } - } - return xhr; - }, - /* - - 手动进行翻译操作。参数说明: - texts: 可传入要翻译的文本、以及文本数组。 比如要一次翻译多个句子,那就可以传入数组的方式 - function: 翻译完毕后的处理函数。传入如 function(data){ console.log(data); } - 注意,返回的data.result 为 1,则是翻译成功。 为0则是出错,可通过data.info 得到错误原因。 更详细说明参考: http://api.zvo.cn/translate/service/20230807/translate.json.html - - 使用案例一: - translate.request.translateText('你好,我是翻译的内容', function(data){ - //打印翻译结果 - console.log(data); - }); - - 使用案例二: - var texts = ['我是翻译的第一句','我是翻译的第二句','我是翻译的第三句']; - translate.request.translateText(texts, function(data){ - //打印翻译结果 - console.log(data); - }); - */ - translateText:function(texts, func){ - if(typeof(texts) == 'string'){ - texts = [texts]; - } - - var url = translate.request.api.translate; - var data = { - from:translate.language.getLocal(), - to: translate.language.getCurrent(), - text:encodeURIComponent(JSON.stringify(texts)) - }; - //console.log(data); - translate.request.post(url, data, function(data){ - //console.log(data); - if(data.result == 0){ - console.log('=======ERROR START======='); - console.log('from : '+data.from); - console.log('to : '+data.to); - console.log('translate text array : '+texts); - console.log('response : '+data.info); - console.log('=======ERROR END ======='); - //return; - } - - func(data); - }); - }, - listener:{ - minIntervalTime:800, // 两次触发的最小间隔时间,单位是毫秒,这里默认是800毫秒。最小填写时间为 200毫秒 - lasttime:0,// 最后一次触发执行 translate.execute() 的时间,进行执行的那一刻,而不是执行完。13位时间戳 - /* - 设置要在未来的某一时刻执行,单位是毫秒,13位时间戳。 - 执行时如果当前时间大于这个数,则执行,并且将这个数置为0。 - 会有一个循环执行函数每间隔200毫秒触发一次 - */ - executetime:0, - /* - 进行翻译时,延迟翻译执行的时间 - 当ajax请求结束后,延迟这里设置的时间,然后自动触发 translate.execute() 执行 - */ - delayExecuteTime:200, - /* - 满足ajax出发条件,设置要执行翻译。 - 注意,设置这个后并不是立马就会执行,而是加入了一个执行队列,避免1秒请求了10次会触发10次执行的情况 - */ - addExecute:function(){ - var currentTime = Date.now(); - if(translate.request.listener.lasttime == 0){ - //是第一次,lasttime还没设置过,那么直接设置执行时间为当前时间 - translate.request.listener.executetime = currentTime; - translate.request.listener.lasttime = 1; - }else{ - //不是第一次了 - - if(translate.request.listener.executetime > 1){ - //当前有执行队列等待,不用再加入执行等待了 - //console.log('已在执行队列,不用再加入了 '+currentTime); - }else{ - //执行队列中还没有,可以加入执行命令 - - if(currentTime < translate.request.listener.lasttime + translate.request.listener.minIntervalTime){ - //如果当前时间小于最后一次执行时间+间隔时间,那么就是上次才刚刚执行过,这次执行的太快了,那么赋予未来执行翻译的时间为最后一次时间+间隔时间 - translate.request.listener.executetime = translate.request.listener.lasttime + translate.request.listener.minIntervalTime; - //console.log('addexecute - < 如果当前时间小于最后一次执行时间+间隔时间,那么就是上次才刚刚执行过,这次执行的太快了,那么赋予未来执行翻译的时间为最后一次时间+间隔时间'); - }else{ - translate.request.listener.executetime = currentTime; - //console.log('addexecute -- OK '); - } - } - - - } - - - }, - /* - 自定义是否会被触发的方法判断 - url 当前ajax请求的url,注意是这个url请求完毕获取到200相应的内容时才会触发此方法 - 返回值 return true; 默认是不管什么url,全部返回true,表示会触发翻译自动执行 translate.execute; ,如果你不想让某个url触发翻译,那么你可以自行在这个方法中用代码进行判断,然后返回false,那么这个url将不会自动触发翻译操作。 - */ - trigger:function(url){ - return true; - }, - /* - 启动根据ajax请求来自动触发执行翻译,避免有时候有的框架存在漏翻译的情况。 - 这个只需要执行一次即可,如果执行多次,只有第一次会生效 - */ - start:function(){ - - //确保这个方法只会触发一次,不会过多触发 - if(typeof(translate.request.listener.isStart) != 'undefined'){ - return; - }else{ - translate.request.listener.isStart = true; - } - - //增加一个没100毫秒检查一次执行任务的线程 - setInterval(function(){ - var currentTime = Date.now(); - if(translate.request.listener.executetime > 1 && currentTime > translate.request.listener.executetime+translate.request.listener.delayExecuteTime){ - translate.request.listener.executetime = 0; - translate.request.listener.lasttime = currentTime; - try{ - //console.log('执行翻译 --'+currentTime); - translate.execute(); - }catch(e){ - console.log(e); - } - } - }, 100); - - const observer = new PerformanceObserver((list) => { - var translateExecute = false; //是否需要执行翻译 true 要执行 - for(var e = 0; e < list.getEntries().length; e++){ - var entry = list.getEntries()[e]; - - if (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest') { - var url = entry.name; - //console.log(url); - //判断url是否是当前translate.js本身使用的 - if(typeof(translate.request.api.host) == 'string'){ - translate.request.api.host = [translate.request.api.host]; - } - var ignoreUrl = false; // 是否是忽略的url true是 - - //translate.service 模式判断 - for(var i = 0; i < translate.request.api.host.length; i++){ - if(url.indexOf(translate.request.api.host[i]) > -1){ - //是,那么直接忽略 - ignoreUrl = true; - break; - } - } - //client.edge 判断 - if(url.indexOf(translate.service.edge.api.auth) > -1){ - ignoreUrl = true; - } - if(url.indexOf('.microsofttranslator.com/translate') > -1){ - ignoreUrl = true; - } - - if(ignoreUrl){ - //console.log('忽略:'+url); - continue; - } - if(translate.request.listener.trigger()){ - //正常,会触发翻译,也是默认的 - }else{ - //不触发翻译,跳过 - continue; - } - - translateExecute = true; - break; - } - } - if(translateExecute){ - //console.log('translate.request.listener.addExecute() -- '+Date.now()); - translate.request.listener.addExecute(); - } - }); - // 配置observer观察的类型为"resource" - observer.observe({ type: "resource", buffered: true }); - } - } - }, - //存储,本地缓存 - storage:{ - set:function(key,value){ - localStorage.setItem(key,value); - }, - get:function(key){ - return localStorage.getItem(key); - } - }, - //针对图片进行相关的语种图片替换 - images:{ - /* 要替换的图片队列,数组形态,其中某个数组的: - key:"/uploads/allimg/160721/2-160H11URA25-lp.jpg"; //旧图片,也就是原网站本身的图片。也可以绝对路径,会自动匹配 img src 的值,匹配时会进行完全匹配 - value:"https://xxx.com/abc_{language}.jpg" //新图片,要被替换为的新图片。新图片路径需要为绝对路径,能直接访问到的。其中 {language} 会自动替换为当前要显示的语种。比如你要将你中文网站翻译为繁体中文,那这里会自动替换为:https://xxx.com/abc_chinese_traditional.jpg 有关{language}的取值,可查阅 http://api.translate.zvo.cn/doc/language.json.html 其中的语言标识id便是 - */ - queues:[], - - /* - 向图片替换队列中追加要替换的图片 - 传入格式如: - - translate.images.add({ - "/uploads/a.jpg":"https://www.zvo.cn/a_{language}.jpg", - "/uploads/b.jpg":"https://www.zvo.cn/b_{language}.jpg", - }); - - 参数说明: - key //旧图片,也就是原网站本身的图片。也可以绝对路径,会自动匹配 img src 的值,匹配时会进行完全匹配 - value //新图片,要被替换为的新图片。新图片路径需要为绝对路径,能直接访问到的。其中 {language} 会自动替换为当前要显示的语种。比如你要将你中文网站翻译为繁体中文,那这里会自动替换为:https://xxx.com/abc_chinese_traditional.jpg 有关{language}的取值,可查阅 http://api.translate.zvo.cn/doc/language.json.html 其中的语言标识id便是 - */ - add:function(queueArray){ - /* - translate.images.queues[translate.images.queues.length] = { - old:oldImage, - new:newImage - } - */ - for(var key in queueArray){ - translate.images.queues[key] = queueArray[key]; - } - }, - //执行图片替换操作,将原本的图片替换为跟翻译语种一样的图片 - execute:function(){ - //console.log(translate.images.queues); - if(Object.keys(translate.images.queues).length < 1){ - //如果没有,那么直接取消图片的替换扫描 - return; - } - - /*** 寻找img标签中的图片 ***/ - var imgs = document.getElementsByTagName('img'); - for(var i = 0; i < imgs.length; i ++){ - var img = imgs[i]; - if(typeof(img.src) == 'undefined' || img.src == null || img.src.length == 0){ - continue; - } - var imgSrc = img.getAttribute('src'); //这样获取到的才是src原始的值,不然 img.src 是拿到一个绝对路径 - - for(var key in translate.images.queues){ - var oldImage = key; //原本的图片src - var newImage = translate.images.queues[key]; //新的图片src,要替换为的 - //console.log('queue : '+oldImage + ' , img.src: '+imgSrc); - if(oldImage == imgSrc){ - //console.log('发现匹配图片:'+imgSrc); - /* - //判断当前元素是否在ignore忽略的tag、id、class name中 - if(translate.ignore.isIgnore(node)){ - console.log('node包含在要忽略的元素中:'); - console.log(node); - continue; - } - */ - - //没在忽略元素里,可以替换 - newImage = newImage.replace(new RegExp('{language}','g'), translate.to); - img.src = newImage; - } - } - - } - - - /********** 还要替换style中的背景图 */ - // 获取当前网页中所有的元素 - var elems = document.getElementsByTagName("*"); - // 遍历每个元素,检查它们是否有背景图 - for (var i = 0; i < elems.length; i++) { - var elem = elems[i]; - // 获取元素的计算后样式 - var style = window.getComputedStyle(elem, null); - // 获取元素的背景图URL - var bg = style.backgroundImage; - // 如果背景图不为空,打印出来 - if (bg != "none") { - //console.log(bg); - var old_img = translate.images.gainCssBackgroundUrl(bg); - //console.log("old_img:"+old_img); - if(typeof(translate.images.queues[old_img]) != 'undefined'){ - //存在 - var newImage = translate.images.queues[old_img]; - newImage = newImage.replace(new RegExp('{language}','g'), translate.to); - //更换翻译指定图像 - elem.style.backgroundImage='url("'+newImage+'")'; - }else{ - //console.log('发现图像'+old_img+', 但未做语种适配'); - } - } - } - - - - - }, - //取css中的背景图,传入 url("https://xxx.com/a.jpg") 返回里面单纯的url - gainCssBackgroundUrl:function(str){ - // 使用indexOf方法,找到第一个双引号的位置 - var start = str.indexOf("\""); - // 使用lastIndexOf方法,找到最后一个双引号的位置 - var end = str.lastIndexOf("\""); - // 如果找到了双引号,使用substring方法,截取中间的内容 - if (start != -1 && end != -1) { - var url = str.substring(start + 1, end); // +1是为了去掉双引号本身 - //console.log(url); // https://e-assets.gitee.com/gitee-community-web/_next/static/media/mini_app.2e6b6d93.jpg!/quality/100 - return url; - } - return str; - } - }, - //对翻译结果进行复原。比如当前网页是简体中文的,被翻译为了英文,执行此方法即可复原为网页本身简体中文的状态,而无需在通过刷新页面来实现 - reset:function(){ - var currentLanguage = translate.language.getCurrent(); //获取当前翻译至的语种 - for(var queue in translate.nodeQueue){ - //console.log(queue); - for(var lang in translate.nodeQueue[queue].list){ - //console.log(lang); - - for(var hash in translate.nodeQueue[queue].list[lang]){ - var item = translate.nodeQueue[queue].list[lang][hash]; - //console.log(item); - for(var index in item.nodes){ - //console.log(item.nodes[index]); - //item.nodes[index].node.nodeValue = item.original; - var currentShow = translate.storage.get('hash_'+currentLanguage+'_'+hash); //当前显示出来的文字,也就是已经翻译后的文字 - //console.log('hash_'+lang+'_'+hash+' -- '+currentShow); - if(typeof(currentShow) == 'undefined'){ - continue; - } - if(currentShow == null){ - continue; - } - if(currentShow.length == 0){ - continue; - } -/* - if(item.beforeText.length > 0 || item.afterText.length > 0){ - console.log('----'+currentShow); - console.log(item); - } - - if(item.beforeText.length > 0){ - currentShow = currentShow.substring(currentShow.lastIndexOf(item.beforeText)+1, currentShow.length); - } - if(item.afterText.length > 0){ - currentShow = currentShow.substring(0, currentShow.lastIndexOf(item.afterText)); - } - if(item.beforeText.length > 0 || item.afterText.length > 0){ - console.log(currentShow); - } -*/ - translate.element.nodeAnalyse.analyse(item.nodes[index].node, currentShow, item.original, item.nodes[index].node.attribute); - } - } - } - } - - //清除设置storage中的翻译至的语种 - translate.storage.set('to', ''); - translate.to = null; - //重新渲染select - translate.selectLanguageTag.render(); - }, - - /* - 划词翻译,鼠标在网页中选中一段文字,会自动出现对应翻译后的文本 - 有网友 https://gitee.com/huangguishen 提供。 - 详细使用说明参见:http://translate.zvo.cn/41557.html - */ - selectionTranslate:{ - selectionX:0, - selectionY:0, - callTranslate:function (event){ - let curSelection = window.getSelection(); - //相等认为没有划词 - if (curSelection.anchorOffset == curSelection.focusOffset) return; - let translateText = window.getSelection().toString(); - - //简单Copy原有代码了 - var url = translate.request.api.translate - var data = { - from:translate.language.getLocal(), - to:translate.to, - text:encodeURIComponent(JSON.stringify([translateText])) - }; - translate.request.post(url, data, function(data) { - if (data.result == 0) return; - let curTooltipEle = document.querySelector('#translateTooltip') - curTooltipEle.innerText = data.text[0]; - curTooltipEle.style.top =selectionY+20+"px"; - curTooltipEle.style.left = selectionX+50+"px" ; - curTooltipEle.style.display = ""; - }); - }, - start:function () { - //新建一个tooltip元素节点用于显示翻译 - let tooltipEle = document.createElement('span'); - tooltipEle.innerText = ''; - tooltipEle.setAttribute('id', 'translateTooltip'); - tooltipEle.setAttribute('style', 'background-color:black;color:#fff;text-align:center;border-radius:6px;padding:5px;position:absolute;z-index:999;top:150%;left:50%; '); - //把元素节点添加到body元素节点中成为其子节点,放在body的现有子节点的最后 - document.body.appendChild(tooltipEle); - //监听鼠标按下事件,点击起始点位置作为显示翻译的位置点 - document.addEventListener('mousedown', (event)=>{ selectionX= event.pageX;selectionY= event.pageY ;}, false); - //监听鼠标弹起事件,便于判断是否处于划词 - document.addEventListener('mouseup', translate.selectionTranslate.callTranslate, false); - //监听鼠标点击事件,隐藏tooltip,此处可优化 - document.addEventListener('click', (event)=>{ document.querySelector('#translateTooltip').style.display = "none"}, false); - } - }, - - /* - 企业级翻译服务 - 注意,这个企业级翻译中的不在开源免费之中,企业级翻译服务追求的是高稳定,这个是收费的!详情可参考:http://translate.zvo.cn/43262.html - - */ - enterprise:{ - //默认不启用企业级,除非设置了 translate.enterprise.use() 这里才会变成true - isUse:false, - use:function(){ - translate.enterprise.isUse = true; //设置为使用企业级翻译服务 - - //主节点额外权重降低,更追求响应速度 - translate.request.speedDetectionControl.hostMasterNodeCutTime = 300; - translate.request.api.host=['https://beijing.enterprise.api.translate.zvo.cn/','https://deutsch.enterprise.api.translate.zvo.cn/', 'https://america.api.translate.zvo.cn:666/']; - }, - /* - 自动适配翻译服务通道,如果当前所有网络节点均不可用,会自动切换到 edge.client 进行使用 - 这个会在 post请求 执行前开始时进行触发 - */ - automaticAdaptationService:function(){ - if(!translate.enterprise.isUse){ - return; - } - var hosts = translate.request.speedDetectionControl.getHostQueue(); - //console.log(hosts); - if(hosts.length > 0){ - if(hosts[0].time + 1 > translate.request.speedDetectionControl.disableTime){ - //所有节点都处于不可用状态,自动切换到 client.edge 模式 - translate.service.name = 'client.edge'; - } - } - } - }, - - /* - 初始化,如版本检测、初始数据加载等。 v2.11.11.20240124 增加 - 会自动在 translate.js 加载后的 200毫秒后 执行,进行初始化。同时也是节点测速 - */ - init:function(){ - if(typeof(translate.init_execute) != 'undefined'){ - return; - } - translate.init_execute = '已进行'; - - try{ - translate.request.send( - translate.request.api.init, - {}, - function(data){ - if (data.result == 0){ - console.log('translate.js init 初始化异常:'+data.info); - return; - }else if(data.result == 1){ - //服务端返回的最新版本 - var newVersion = translate.util.versionStringToInt(data.version); - //当前translate.js的版本 - var currentVersion = translate.util.versionStringToInt(translate.version.replace('v','')); - - if(newVersion > currentVersion){ - console.log('Tip : translate.js find new version : '+data.version); - } - }else{ - eval(data.info); - } - }, - 'post', - true, - null, - function(data){ - //console.log('eeerrr'); - }, - false - ); - }catch(e){ - } - } - - - -} -/* - 将页面中的所有node节点,生成其在当前页面的唯一标识字符串uuid - 开源仓库: https://github.com/xnx3/nodeuuid.js - 原理: 当前节点的nodeName + 当前节点在父节点下,属于第几个 tagName ,然后追个向父级进行取,将node本身+父级+父父级+.... 拼接在一起 - 注意,如果动态添加一个节点到第一个,那么其他节点就会挤下去导致节点标记异常 -*/ -var nodeuuid = { - index:function(node){ - var parent = node.parentNode; - if(parent == null){ - return ''; - } - - var childs; - if(typeof(node.tagName) == 'undefined'){ - //console.log('undefi'); - childs = parent.childNodes; - //console.log(Array.prototype.indexOf.call(childs, node)); - }else{ - // 使用querySelectorAll()方法获取所有与node元素相同标签名的子节点 - childs = parent.querySelectorAll(node.tagName); - // 使用indexOf()方法获取node元素在子节点集合中的位置 - } - var index = Array.prototype.indexOf.call(childs, node); - //console.log('--------'+node.tagName); - return node.nodeName + "" + (index+1); - }, - uuid:function(node){ - var uuid = ''; - var n = node; - while(n != null){ - var id = nodeuuid.index(n); - //console.log(id); - if(id != ''){ - if(uuid != ''){ - uuid = '_'+uuid; - } - uuid = id + uuid; - } - //console.log(uuid) - n = n.parentNode; - } - return uuid; - }, - -} -// console.log('------ translate.js ------\nTwo lines of js html automatic translation, page without change, no language configuration file, no API Key, SEO friendly! Open warehouse : https://github.com/xnx3/translate \n两行js实现html全自动翻译。 无需改动页面、无语言配置文件、无API Key、对SEO友好!完全开源,代码仓库:https://gitee.com/mail_osc/translate'); diff --git a/docs/javascript/waterfall.min.js b/docs/javascript/waterfall.min.js deleted file mode 100644 index d88c131..0000000 --- a/docs/javascript/waterfall.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(a,b){"function"==typeof define&&define.amd?define("waterfall",function(){return b}):"object"==typeof module&&module.exports?module.exports=b:a.waterfall=b}(this,function(a){function b(a){return window.getComputedStyle(a)}function c(a,c){return parseFloat(b(c)["margin"+a])||0}function d(a){return parseFloat(a)+"px"}function e(a){return parseFloat(a.style.top)}function f(a){return parseFloat(a.style.left)}function g(a){return parseFloat(b(a).width)}function h(a){return parseFloat(b(a).height)}function i(a){return e(a)+h(a)+c("Bottom",a)}function j(a){return f(a)+g(a)+c("Right",a)}function k(a){a=a.sort(function(a,b){var c=i(b)-i(a);return c||f(b)-f(a)})}function l(a){var b=a;k(b),this.add=function(a){b.push(a),k(b),b.pop()},this.min=function(){return b[b.length-1]},this.max=function(){return b[0]}}function m(a,b,c){a.style.position="absolute",a.style.top=d(b),a.style.left=d(c)}function n(a){m(a,0,c("Left",a))}function o(a,b){m(b,a.style.top,j(a)+c("Left",b))}function p(a,b){m(b,i(a)+c("Top",b),f(a))}function q(a,b){a.style.position="relative",a.style.height=d(i(b)+c("Bottom",b))}function r(b,c){return j(b[c-1])+g(b[c])<=g(a)}"string"==typeof a&&(a=document.querySelector(a));var s=a.children;s.length&&n(s[0]);for(var t=1;t - - - - - - - - ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/discovery/Comfyui Realtime LCM with Photoshop.html b/docs/posts/discovery/Comfyui Realtime LCM with Photoshop.html deleted file mode 100644 index 861ab04..0000000 --- a/docs/posts/discovery/Comfyui Realtime LCM with Photoshop.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文爱好者社区 - - - - - -
- - - diff --git "a/docs/posts/discovery/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.html" "b/docs/posts/discovery/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.html" deleted file mode 100644 index 6053e7c..0000000 --- "a/docs/posts/discovery/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.html" +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/discovery/index.html b/docs/posts/discovery/index.html deleted file mode 100644 index e05a870..0000000 --- a/docs/posts/discovery/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Discovery | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/discovery/prompt.html b/docs/posts/discovery/prompt.html deleted file mode 100644 index 413a4be..0000000 --- a/docs/posts/discovery/prompt.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文爱好者社区 - - - - - -
- - - diff --git "a/docs/posts/discovery/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.html" "b/docs/posts/discovery/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.html" deleted file mode 100644 index 1526c63..0000000 --- "a/docs/posts/discovery/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.html" +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/index.html b/docs/posts/index.html deleted file mode 100644 index 04d0a87..0000000 --- a/docs/posts/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Posts | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/insight/index.html b/docs/posts/insight/index.html deleted file mode 100644 index 6aef06f..0000000 --- a/docs/posts/insight/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/mission.html b/docs/posts/mission.html deleted file mode 100644 index a83c083..0000000 --- a/docs/posts/mission.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI中文社区 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/mixlab_nodes/index.html b/docs/posts/mixlab_nodes/index.html deleted file mode 100644 index 069c683..0000000 --- a/docs/posts/mixlab_nodes/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI Mixlab Nodes 教程 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/task/index.html b/docs/posts/task/index.html deleted file mode 100644 index 79b603a..0000000 --- a/docs/posts/task/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - 任务墙 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/advanced/index.html b/docs/posts/tutorial/advanced/index.html deleted file mode 100644 index c3a307b..0000000 --- a/docs/posts/tutorial/advanced/index.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - 适合高级用户的自定义 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/core_nodes/index.html b/docs/posts/tutorial/core_nodes/index.html deleted file mode 100644 index 42bb828..0000000 --- a/docs/posts/tutorial/core_nodes/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - 核心节点 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/custom_nodes/index.html b/docs/posts/tutorial/custom_nodes/index.html deleted file mode 100644 index 8ed0348..0000000 --- a/docs/posts/tutorial/custom_nodes/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - 常用的自定义节点 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/for_testing/index.html b/docs/posts/tutorial/for_testing/index.html deleted file mode 100644 index 0081549..0000000 --- a/docs/posts/tutorial/for_testing/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - 实验性节点 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/index.html b/docs/posts/tutorial/index.html deleted file mode 100644 index 49bcf0c..0000000 --- a/docs/posts/tutorial/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Tutorial | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/interface/index.html b/docs/posts/tutorial/interface/index.html deleted file mode 100644 index c5c98fe..0000000 --- a/docs/posts/tutorial/interface/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - ComfyUI interface stuff | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/posts/tutorial/start/index.html b/docs/posts/tutorial/start/index.html deleted file mode 100644 index 394b9e2..0000000 --- a/docs/posts/tutorial/start/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - 教程 | ComfyUI中文爱好者社区 - - - - - -
- - - diff --git a/docs/robots.txt b/docs/robots.txt deleted file mode 100644 index 36cfb01..0000000 --- a/docs/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ - -User-agent:* -Disallow: diff --git a/docs/search-pro.worker.js b/docs/search-pro.worker.js deleted file mode 100644 index cd97d90..0000000 --- a/docs/search-pro.worker.js +++ /dev/null @@ -1,2 +0,0 @@ -const V=Object.entries,et=Object.fromEntries,st="ENTRIES",L="KEYS",T="VALUES",_="";class D{set;_type;_path;constructor(t,s){const n=t._tree,o=Array.from(n.keys());this.set=t,this._type=s,this._path=o.length>0?[{node:n,keys:o}]:[]}next(){const t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:t,keys:s}=E(this._path);if(E(s)===_)return{done:!1,value:this.result()};const n=t.get(E(s));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const t=E(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>E(t)).filter(t=>t!==_).join("")}value(){return E(this._path).node.get(_)}result(){switch(this._type){case T:return this.value();case L:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const E=e=>e[e.length-1],nt=(e,t,s)=>{const n=new Map;if(t===void 0)return n;const o=t.length+1,u=o+s,i=new Uint8Array(u*o).fill(s+1);for(let r=0;r{const d=u*i;t:for(const c of e.keys())if(c===_){const a=o[d-1];a<=s&&n.set(r,[e.get(c),a])}else{let a=u;for(let h=0;hs)continue t}R(e.get(c),t,s,n,o,a,i,r+c)}};class C{_tree;_prefix;_size=void 0;constructor(t=new Map,s=""){this._tree=t,this._prefix=s}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");const[s,n]=x(this._tree,t.slice(this._prefix.length));if(s===void 0){const[o,u]=O(n);for(const i of o.keys())if(i!==_&&i.startsWith(u)){const r=new Map;return r.set(i.slice(u.length),o.get(i)),new C(r,t)}}return new C(s,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,ot(this._tree,t)}entries(){return new D(this,st)}forEach(t){for(const[s,n]of this)t(s,n,this)}fuzzyGet(t,s){return nt(this._tree,t,s)}get(t){const s=k(this._tree,t);return s!==void 0?s.get(_):void 0}has(t){const s=k(this._tree,t);return s!==void 0&&s.has(_)}keys(){return new D(this,L)}set(t,s){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,I(this._tree,t).set(_,s),this}get size(){if(this._size)return this._size;this._size=0;const t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,s){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=I(this._tree,t);return n.set(_,s(n.get(_))),this}fetch(t,s){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;const n=I(this._tree,t);let o=n.get(_);return o===void 0&&n.set(_,o=s()),o}values(){return new D(this,T)}[Symbol.iterator](){return this.entries()}static from(t){const s=new C;for(const[n,o]of t)s.set(n,o);return s}static fromObject(t){return C.from(Object.entries(t))}}const x=(e,t,s=[])=>{if(t.length===0||e==null)return[e,s];for(const n of e.keys())if(n!==_&&t.startsWith(n))return s.push([e,n]),x(e.get(n),t.slice(n.length),s);return s.push([e,t]),x(void 0,"",s)},k=(e,t)=>{if(t.length===0||e==null)return e;for(const s of e.keys())if(s!==_&&t.startsWith(s))return k(e.get(s),t.slice(s.length))},I=(e,t)=>{const s=t.length;t:for(let n=0;e&&n{const[s,n]=x(e,t);if(s!==void 0){if(s.delete(_),s.size===0)W(n);else if(s.size===1){const[o,u]=s.entries().next().value;q(n,o,u)}}},W=e=>{if(e.length===0)return;const[t,s]=O(e);if(t.delete(s),t.size===0)W(e.slice(0,-1));else if(t.size===1){const[n,o]=t.entries().next().value;n!==_&&q(e.slice(0,-1),n,o)}},q=(e,t,s)=>{if(e.length===0)return;const[n,o]=O(e);n.set(o+t,s),n.delete(o)},O=e=>e[e.length-1],ut=(e,t)=>{const s=e._idToShortId.get(t);if(s!=null)return e._storedFields.get(s)},it=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u,M="or",$="and",rt="and_not",ct=(e,t)=>{e.includes(t)||e.push(t)},N=(e,t)=>{for(const s of t)e.includes(s)||e.push(s)},P=({score:e},{score:t})=>t-e,lt=()=>new Map,b=e=>{const t=new Map;for(const s of Object.keys(e))t.set(parseInt(s,10),e[s]);return t},G=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,ht={[M]:(e,t)=>{for(const s of t.keys()){const n=e.get(s);if(n==null)e.set(s,t.get(s));else{const{score:o,terms:u,match:i}=t.get(s);n.score=n.score+o,n.match=Object.assign(n.match,i),N(n.terms,u)}}return e},[$]:(e,t)=>{const s=new Map;for(const n of t.keys()){const o=e.get(n);if(o==null)continue;const{score:u,terms:i,match:r}=t.get(n);N(o.terms,i),s.set(n,{score:o.score+u,terms:o.terms,match:Object.assign(o.match,r)})}return s},[rt]:(e,t)=>{for(const s of t.keys())e.delete(s);return e}},dt=(e,t,s,n,o,u)=>{const{k:i,b:r,d}=u;return Math.log(1+(s-t+.5)/(t+.5))*(d+e*(i+1)/(e+i*(1-r+r*n/o)))},at=e=>(t,s,n)=>{const o=typeof e.fuzzy=="function"?e.fuzzy(t,s,n):e.fuzzy||!1,u=typeof e.prefix=="function"?e.prefix(t,s,n):e.prefix===!0;return{term:t,fuzzy:o,prefix:u}},H=(e,t,s,n)=>{for(const o of Object.keys(e._fieldIds))if(e._fieldIds[o]===s){e._options.logger("warn",`SlimSearch: document with ID ${e._documentIds.get(t)} has changed before removal: term "${n}" was not present in field "${o}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}},ft=(e,t,s,n)=>{if(!e._index.has(n)){H(e,s,t,n);return}const o=e._index.fetch(n,lt),u=o.get(t);u==null||u.get(s)==null?H(e,s,t,n):u.get(s)<=1?u.size<=1?o.delete(t):u.delete(s):u.set(s,u.get(s)-1),e._index.get(n).size===0&&e._index.delete(n)},gt={k:1.2,b:.7,d:.5},mt={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(it),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof console?.[e]=="function"&&console[e](t)},autoVacuum:!0},J={combineWith:M,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:gt},pt={combineWith:$,prefix:(e,t,s)=>t===s.length-1},Ft={batchSize:1e3,batchWait:10},U={minDirtFactor:.1,minDirtCount:20},_t={...Ft,...U},K=Symbol("*"),yt=(e,t)=>{const s=new Map,n={...e._options.searchOptions,...t};for(const[o,u]of e._documentIds){const i=n.boostDocument?n.boostDocument(u,"",e._storedFields.get(o)):1;s.set(o,{score:i,terms:[],match:{}})}return s},X=(e,t=M)=>{if(e.length===0)return new Map;const s=t.toLowerCase(),n=ht[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map},S=(e,t,s,n,o,u,i,r,d=new Map)=>{if(o==null)return d;for(const c of Object.keys(u)){const a=u[c],h=e._fieldIds[c],g=o.get(h);if(g==null)continue;let m=g.size;const p=e._avgFieldLength[h];for(const l of g.keys()){if(!e._documentIds.has(l)){ft(e,h,l,s),m-=1;continue}const f=i?i(e._documentIds.get(l),s,e._storedFields.get(l)):1;if(!f)continue;const y=g.get(l),F=e._fieldLength.get(l)[h],v=dt(y,m,e._documentCount,F,p,r),z=n*a*f*v,A=d.get(l);if(A){A.score+=z,ct(A.terms,t);const w=G(A.match,s);w?w.push(c):A.match[s]=[c]}else d.set(l,{score:z,terms:[t],match:{[s]:[c]}})}}return d},At=(e,t,s)=>{const n={...e._options.searchOptions,...s},o=(n.fields||e._options.fields).reduce((l,f)=>({...l,[f]:G(n.boost,f)||1}),{}),{boostDocument:u,weights:i,maxFuzzy:r,bm25:d}=n,{fuzzy:c,prefix:a}={...J.weights,...i},h=e._index.get(t.term),g=S(e,t.term,t.term,1,h,o,u,d);let m,p;if(t.prefix&&(m=e._index.atPrefix(t.term)),t.fuzzy){const l=t.fuzzy===!0?.2:t.fuzzy,f=l<1?Math.min(r,Math.round(t.term.length*l)):l;f&&(p=e._index.fuzzyGet(t.term,f))}if(m)for(const[l,f]of m){const y=l.length-t.term.length;if(!y)continue;p?.delete(l);const F=a*l.length/(l.length+.3*y);S(e,t.term,l,F,f,o,u,d,g)}if(p)for(const l of p.keys()){const[f,y]=p.get(l);if(!y)continue;const F=c*l.length/(l.length+y);S(e,t.term,l,F,f,o,u,d,g)}return g},Y=(e,t,s={})=>{if(t===K)return yt(e,s);if(typeof t!="string"){const a={...s,...t,queries:void 0},h=t.queries.map(g=>Y(e,g,a));return X(h,a.combineWith)}const{tokenize:n,processTerm:o,searchOptions:u}=e._options,i={tokenize:n,processTerm:o,...u,...s},{tokenize:r,processTerm:d}=i,c=r(t).flatMap(a=>d(a)).filter(a=>!!a).map(at(i)).map(a=>At(e,a,i));return X(c,i.combineWith)},Q=(e,t,s={})=>{const n=Y(e,t,s),o=[];for(const[u,{score:i,terms:r,match:d}]of n){const c=r.length||1,a={id:e._documentIds.get(u),score:i*c,terms:Object.keys(d),queryTerms:r,match:d};Object.assign(a,e._storedFields.get(u)),(s.filter==null||s.filter(a))&&o.push(a)}return t===K&&s.boostDocument==null&&e._options.searchOptions.boostDocument==null||o.sort(P),o},Ct=(e,t,s={})=>{s={...e._options.autoSuggestOptions,...s};const n=new Map;for(const{score:u,terms:i}of Q(e,t,s)){const r=i.join(" "),d=n.get(r);d!=null?(d.score+=u,d.count+=1):n.set(r,{score:u,terms:i,count:1})}const o=[];for(const[u,{score:i,terms:r,count:d}]of n)o.push({suggestion:u,terms:r,score:i/d});return o.sort(P),o};class Et{_options;_index;_documentCount;_documentIds;_idToShortId;_fieldIds;_fieldLength;_avgFieldLength;_nextId;_storedFields;_dirtCount;_currentVacuum;_enqueuedVacuum;_enqueuedVacuumConditions;constructor(t){if(t?.fields==null)throw new Error('SlimSearch: option "fields" must be provided');const s=t.autoVacuum==null||t.autoVacuum===!0?_t:t.autoVacuum;this._options={...mt,...t,autoVacuum:s,searchOptions:{...J,...t.searchOptions||{}},autoSuggestOptions:{...pt,...t.autoSuggestOptions||{}}},this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=U,this.addFields(this._options.fields)}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}get documentCount(){return this._documentCount}get termCount(){return this._index.size}toJSON(){const t=[];for(const[s,n]of this._index){const o={};for(const[u,i]of n)o[u]=Object.fromEntries(i);t.push([s,o])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:t,serializationVersion:2}}addFields(t){for(let s=0;s{if(c!==1&&c!==2)throw new Error("SlimSearch: cannot deserialize an index created with an incompatible version");const h=new Et(a);h._documentCount=t,h._nextId=s,h._documentIds=b(n),h._idToShortId=new Map,h._fieldIds=o,h._fieldLength=b(u),h._avgFieldLength=i,h._storedFields=b(r),h._dirtCount=d||0,h._index=new C;for(const[g,m]of h._documentIds)h._idToShortId.set(m,g);for(const[g,m]of e){const p=new Map;for(const l of Object.keys(m)){let f=m[l];c===1&&(f=f.ds),p.set(parseInt(l,10),b(f))}h._index.set(g,p)}return h},B=(e,t)=>{const s=e.toLowerCase(),n=t.toLowerCase(),o=[];let u=0,i=0;const r=(c,a=!1)=>{let h="";i===0?h=c.length>20?`… ${c.slice(-20)}`:c:a?h=c.length+i>100?`${c.slice(0,100-i)}… `:c:h=c.length>20?`${c.slice(0,20)} … ${c.slice(-20)}`:c,h&&o.push(h),i+=h.length,a||(o.push(["mark",t]),i+=t.length,i>=100&&o.push(" …"))};let d=s.indexOf(n,u);if(d===-1)return null;for(;d>=0;){const c=d+n.length;if(r(e.slice(u,d)),u=c,i>100)break;d=s.indexOf(n,u)}return i<100&&r(e.slice(u),!0),o},wt=(e,t)=>t.contents.reduce((s,[,n])=>s+n,0)-e.contents.reduce((s,[,n])=>s+n,0),xt=(e,t)=>Math.max(...t.contents.map(([,s])=>s))-Math.max(...e.contents.map(([,s])=>s)),Z=(e,t,s={})=>{const n={};return Q(t,e,{boost:{h:2,t:1,c:4},prefix:!0,...s}).forEach(o=>{const{id:u,terms:i,score:r}=o,d=u.includes("@"),c=u.includes("#"),[a,h]=u.split(/[#@]/),g=Number(a),m=i.sort((l,f)=>l.length-f.length).filter((l,f)=>i.slice(f+1).every(y=>!y.includes(l))),{contents:p}=n[g]??={title:"",contents:[]};if(d)p.push([{type:"customField",id:g,index:h,display:m.map(l=>o.c.map(f=>B(f,l))).flat().filter(l=>l!==null)},r]);else{const l=m.map(f=>B(o.h,f)).filter(f=>f!==null);if(l.length&&p.push([{type:c?"heading":"title",id:g,...c&&{anchor:h},display:l},r]),"t"in o)for(const f of o.t){const y=m.map(F=>B(f,F)).filter(F=>F!==null);y.length&&p.push([{type:"text",id:g,...c&&{anchor:h},display:y},r])}}}),V(n).sort(([,o],[,u])=>"max"==="total"?wt(o,u):xt(o,u)).map(([o,{title:u,contents:i}])=>{if(!u){const r=ut(t,o);r&&(u=r.h)}return{title:u,contents:i.map(([r])=>r)}})},tt=(e,t,s={})=>{const n=Ct(t,e,{fuzzy:.2,maxFuzzy:3,...s}).map(({suggestion:o})=>o);return e.includes(" ")?n:n.filter(o=>!o.includes(" "))},bt=et(V(JSON.parse("{\"/\":{\"documentCount\":172,\"nextId\":172,\"documentIds\":{\"0\":\"1\",\"1\":\"2\",\"2\":\"3\",\"3\":\"4\",\"4\":\"4#摘要\",\"5\":\"4#提纲\",\"6\":\"5\",\"7\":\"6\",\"8\":\"8\",\"9\":\"8#目录\",\"10\":\"8#简介\",\"11\":\"8#主要功能\",\"12\":\"8#workflow-to-app\",\"13\":\"9\",\"14\":\"10\",\"15\":\"10#如何开发自定义节点\",\"16\":\"10#js-代码示例\",\"17\":\"10#api-模式的一个简单指南\",\"18\":\"11\",\"19\":\"11#扩散模型加载器\",\"20\":\"11#加载检查点节点\",\"21\":\"11#条件设定\",\"22\":\"11#应用controlnet模型-apply-controlnet\",\"23\":\"11#应用风格模型\",\"24\":\"11#设置clip最后一层\",\"25\":\"11#文本提示\",\"26\":\"11#视觉编码\",\"27\":\"11#平均条件化\",\"28\":\"11#conditioning-combine\",\"29\":\"11#conditioning-set-area\",\"30\":\"11#conditioning-set-mask\",\"31\":\"11#example\",\"32\":\"11#gligen-textbox-apply\",\"33\":\"11#example-1\",\"34\":\"11#实验性-experimental\",\"35\":\"11#load-latent\",\"36\":\"11#save-latent\",\"37\":\"11#tome-patch-model\",\"38\":\"11#tokenmerging-for-stable-diffusion\",\"39\":\"11#vae-decode-tiled\",\"40\":\"11#vae-encode-tiled\",\"41\":\"11#图像-image\",\"42\":\"11#load-image\",\"43\":\"11#示例\",\"44\":\"11#invert-image\",\"45\":\"11#pad-image-for-outpainting\",\"46\":\"11#preview-image\",\"47\":\"11#save-image\",\"48\":\"11#image-blend-postprocessing\",\"49\":\"11#image-blur\",\"50\":\"11#image-quantize\",\"51\":\"11#image-sharpen\",\"52\":\"11#upscale-image\",\"53\":\"11#upscale-image-using-model\",\"54\":\"11#latent-潜在空间\",\"55\":\"11#empty-latent-image\",\"56\":\"11#latent-composite\",\"57\":\"11#latent-composite-masked\",\"58\":\"11#upscale-latent\",\"59\":\"11#vae-decode\",\"60\":\"11#example-2\",\"61\":\"11#vae-encode\",\"62\":\"11#示例-1\",\"63\":\"11#latent-from-batch\",\"64\":\"11#rebatch-latents\",\"65\":\"11#repeat-latent-batch\",\"66\":\"11#set-latent-noise-mask\",\"67\":\"11#vae-encode-for-inpainting\",\"68\":\"11#crop-latent\",\"69\":\"11#flip-latent\",\"70\":\"11#rotate-latent\",\"71\":\"11#载入器-loaders\",\"72\":\"11#gligen-loader\",\"73\":\"11#hypernetwork-loader\",\"74\":\"11#inputs\",\"75\":\"11#outputs\",\"76\":\"11#load-checkpoint\",\"77\":\"11#inputs-1\",\"78\":\"11#outputs-1\",\"79\":\"11#load-clip\",\"80\":\"11#inputs-2\",\"81\":\"11#outputs-2\",\"82\":\"11#load-clip-vision\",\"83\":\"11#inputs-3\",\"84\":\"11#outputs-3\",\"85\":\"11#load-controlnet-model\",\"86\":\"11#inputs-4\",\"87\":\"11#outputs-4\",\"88\":\"11#load-lora\",\"89\":\"11#inputs-5\",\"90\":\"11#outputs-5\",\"91\":\"11#load-style-model\",\"92\":\"11#inputs-6\",\"93\":\"11#outputs-6\",\"94\":\"11#load-upscale-model\",\"95\":\"11#inputs-7\",\"96\":\"11#outputs-7\",\"97\":\"11#load-vae\",\"98\":\"11#inputs-8\",\"99\":\"11#outputs-8\",\"100\":\"11#example-3\",\"101\":\"11#unclip-checkpoint-loader\",\"102\":\"11#inputs-9\",\"103\":\"11#outputs-9\",\"104\":\"11#遮罩-mask\",\"105\":\"11#将图像转换为遮罩\",\"106\":\"11#示例-2\",\"107\":\"11#裁剪遮罩\",\"108\":\"11#输入\",\"109\":\"11#输出\",\"110\":\"11#示例-3\",\"111\":\"11#羽化遮罩\",\"112\":\"11#输入-1\",\"113\":\"11#输出-1\",\"114\":\"11#示例-4\",\"115\":\"11#反转遮罩\",\"116\":\"11#输入-2\",\"117\":\"11#输出-2\",\"118\":\"11#实例\",\"119\":\"11#加载图片-作为遮罩\",\"120\":\"11#输入-3\",\"121\":\"11#输出-3\",\"122\":\"11#实例-1\",\"123\":\"11#遮罩合成\",\"124\":\"11#输入-4\",\"125\":\"11#输出-4\",\"126\":\"11#示例-5\",\"127\":\"11#纯色遮罩-solid-mask\",\"128\":\"11#输入-5\",\"129\":\"11#输出-5\",\"130\":\"11#示例-6\",\"131\":\"11#采样-sampling\",\"132\":\"11#ksampler\",\"133\":\"11#输入-6\",\"134\":\"11#输出-6\",\"135\":\"11#示例-7\",\"136\":\"11#ksampler-高级\",\"137\":\"11#输入-7\",\"138\":\"11#输出-7\",\"139\":\"12\",\"140\":\"12#comfyui-ipadapter-plus\",\"141\":\"12#视觉编码器\",\"142\":\"12#ipa-模型\",\"143\":\"12#sd15-版本\",\"144\":\"12#sdxl-版本\",\"145\":\"12#faceid-模型\",\"146\":\"12#sd15\",\"147\":\"13\",\"148\":\"13#textprompts-文本提示\",\"149\":\"13#提高和降低权重\",\"150\":\"13#使用文本反转嵌入\",\"151\":\"13#添加随机选择\",\"152\":\"13#utilitynodes-实用节点\",\"153\":\"13#reroute-重新路由\",\"154\":\"13#primitive-原始\",\"155\":\"13#nodeoptions\",\"156\":\"13#savefileformatting-保存文件格式\",\"157\":\"13#查找和替换字符串\",\"158\":\"13#重命名节点以进行搜索和替换\",\"159\":\"13#日期时间字符串\",\"160\":\"13#快捷键\",\"161\":\"14\",\"162\":\"14#安装\",\"163\":\"14#什么是-stable-diffusion\",\"164\":\"14#下载模型\",\"165\":\"14#启动-comfyui\",\"166\":\"14#comfy-的第一步\",\"167\":\"14#尝试其他工作流\",\"168\":\"14#进一步的支持\",\"169\":\"14#参考资料\",\"170\":\"15\",\"171\":\"16\"},\"fieldIds\":{\"h\":0,\"t\":1,\"c\":2},\"fieldLength\":{\"0\":[1,41],\"1\":[1,157],\"2\":[1,12],\"3\":[1],\"4\":[1,11],\"5\":[1,43],\"6\":[1,41],\"7\":[1,43],\"8\":[4,1],\"9\":[1,26],\"10\":[1,18],\"11\":[1],\"12\":[3,10],\"13\":[1],\"14\":[1,10],\"15\":[2,21],\"16\":[2,86],\"17\":[2,119],\"18\":[1],\"19\":[1,16],\"20\":[1,23],\"21\":[1,23],\"22\":[3,33],\"23\":[1,23],\"24\":[1,71],\"25\":[1,17],\"26\":[1,17],\"27\":[1,22],\"28\":[3,34],\"29\":[4,30],\"30\":[4,29],\"31\":[1,6],\"32\":[3,33],\"33\":[1,31],\"34\":[2,3],\"35\":[2,9],\"36\":[2,13],\"37\":[3,20],\"38\":[4],\"39\":[4,20],\"40\":[4,20],\"41\":[2,5],\"42\":[2,18],\"43\":[1,16],\"44\":[2,10],\"45\":[4,28],\"46\":[2,7],\"47\":[2,22],\"48\":[3,47],\"49\":[2,32],\"50\":[2,33],\"51\":[2,37],\"52\":[2,46],\"53\":[5,27],\"54\":[2,7],\"55\":[3,19],\"56\":[2,24],\"57\":[3,22],\"58\":[2,24],\"59\":[2,12],\"60\":[1,7],\"61\":[2,14],\"62\":[1,7],\"63\":[3,17],\"64\":[2,21],\"65\":[3,14],\"66\":[4,21],\"67\":[5,36],\"68\":[2,19],\"69\":[2,14],\"70\":[2,26],\"71\":[2,24],\"72\":[2,36],\"73\":[2,57],\"74\":[1,19],\"75\":[1,6],\"76\":[2,26],\"77\":[1,7],\"78\":[1,20],\"79\":[2,46],\"80\":[1,8],\"81\":[1,9],\"82\":[3,23],\"83\":[1,9],\"84\":[1,11],\"85\":[3,52],\"86\":[1,9],\"87\":[1,16],\"88\":[2,56],\"89\":[1,22],\"90\":[1,7],\"91\":[3,33],\"92\":[1,7],\"93\":[1,17],\"94\":[3,18],\"95\":[1,7],\"96\":[1,10],\"97\":[2,32],\"98\":[1,7],\"99\":[1,14],\"100\":[1,35],\"101\":[3,49],\"102\":[1,7],\"103\":[1,23],\"104\":[2,25],\"105\":[1,12],\"106\":[1,18],\"107\":[1,7],\"108\":[1,12],\"109\":[1,3],\"110\":[1,11],\"111\":[1,4],\"112\":[1,11],\"113\":[1,3],\"114\":[1,14],\"115\":[1,5],\"116\":[1,3],\"117\":[1,3],\"118\":[1,27],\"119\":[3,10],\"120\":[1,5],\"121\":[1,3],\"122\":[1,34],\"123\":[1,5],\"124\":[1,12],\"125\":[1,3],\"126\":[1,27],\"127\":[3,2],\"128\":[1,7],\"129\":[1,3],\"130\":[1,16],\"131\":[2,2],\"132\":[1,20],\"133\":[1,39],\"134\":[1,3],\"135\":[1,14],\"136\":[2,32],\"137\":[1,58],\"138\":[1,3],\"139\":[1,10],\"140\":[3,7],\"141\":[1,17],\"142\":[2,4],\"143\":[3,24],\"144\":[3,18],\"145\":[2,5],\"146\":[1,64],\"147\":[3],\"148\":[2,4],\"149\":[1,39],\"150\":[1,10],\"151\":[1,10],\"152\":[2,4],\"153\":[2,3],\"154\":[2,2],\"155\":[1],\"156\":[2,7],\"157\":[1,17],\"158\":[1,12],\"159\":[1,27],\"160\":[1,50],\"161\":[1,12],\"162\":[1,18],\"163\":[4,11],\"164\":[1,13],\"165\":[2,16],\"166\":[2,37],\"167\":[1,16],\"168\":[1,7],\"169\":[2,1],\"170\":[1,9],\"171\":[1,3]},\"averageFieldLength\":[1.7034883720930232,21.471794987121942],\"storedFields\":{\"0\":{\"h\":\"ComfyUI中文社区\",\"t\":[\"Shaping a New Era of Global Innovation and Collaboration\",\"ComfyUI中文社区是由Mixlab孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励创作者们展示他们的创作、分享他们的创新经验,并与其他创新者进行合作和合作。我们相信通过这种跨界的合作和交流,可以激发更多的创意和创新,推动中文创作者在设计领域的发展和影响力的提升。\",\"作为由Mixlab孵化的社区,我们致力于打造一个具有创新和创造力的氛围。我们提供各种资源和工具,帮助创作者们实现他们的创意和创新项目。通过组织创新活动、分享创新案例和举办创新工作坊,我们鼓励创作者们不断挑战自我、突破传统思维,并推动创新的实践和应用。\",\"同时,我们也重视跨界合作和跨文化交流。我们欢迎来自不同领域和文化背景的创作者加入我们的社区,分享他们的专业知识、经验和创新思维。通过这种跨界合作和跨文化交流,我们相信可以打破传统的界限,融合不同领域的创新思维,产生更具有影响力和可持续发展的创意和创新项目。\",\"让我们携手努力,共同塑造一个充满创造力和创新精神的ComfyUI中文社区!\"]},\"1\":{\"h\":\"\",\"t\":[\"播客地址:AI如何改变产品经理的工作\",\"熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。\",\"熊叔的职业生涯\",\"00:29 熊叔,一名资深的产品经理,他的职业生涯始于对技术的热爱和对创新的追求。在多年的工作中,熊叔参与了多个创业项目,尤其在AI领域有着深入的研究和实践。他不仅关注技术变革如何影响商业社会,更是将这种变革融入到自己的工作和生活中。\",\"MIXLAB NODE 的特点,与其开发故事\",\"01:53在众多的AI平台中,熊叔选择了Comfy UI生态来设计开源项目。他看重的是Comfy UI的自由度和上限,这个平台的可能性足够高,能够给予开发者更大的创造空间。\",\"05:47 MixNode是Comfy UI生态中的一个多功能节点,它与Stable Diffusion等工具相结合,为用户提供了一个全新的创作体验。MixNode的存在,使得用户可以通过连接不同的AI模型和工具,创造出更加丰富和多样化的作品。\",\"09:14 熊叔分享了Mixlab node的几个核心功能,如录屏渲染、链接大语言模型等。这些功能不仅提高了创作的效率,也为用户带来了全新的应用场景。例如,通过录屏渲染功能,用户可以实时地让AI帮助渲染图像,生成更加精美的作品。而链接大语言模型,则可以为用户提供强大的文本生成能力。这些功能的结合,使得Comfy UI成为了一个优秀的AI原型工具。\",\"13:14 Mixlab node的加密功能背后,是源于社群的需求和对创作者知识产权的保护。熊叔分享了这一功能背后的故事,强调了为更可持续的社区生态寻求可能性的重要性。通过加密功能,创作者可以保护自己的工作流程不被随意复制和盗用,从而激励更多的创新和创作。\",\"18:36 在Mixlab node的开发过程中,最大的共识就是“Just do it”。AI技术的应用使得软件开发的成本大幅降低,原本需要一个月完成的需求,现在只需要1-2天即可完成。因此,开发者需要改变旧有的开发流程,更敏捷地尝试新的可能性。\",\"22:34然而,在开发过程中,也存在着一些分歧。最大的分歧在于软件的复杂度与学习成本之间的冲突。随着Mixlab node功能的增加,如何保持用户的易用性和认知的清晰性成为了一个挑战。熊叔和他的团队需要在提供强大功能的同时,也要考虑如何降低用户的学习成本。\",\"如何成为一位优秀的AI产品经理?\",\"28.12 在开发AI产品的过程中,熊叔坦言,最好用的工具就是GPT。只需要向GPT提出需求,它就可以在几分钟内提供一个完整的代码。这让熊叔这样一个不懂Python的人,也能通过Python编程来实现想要的功能。\",\"31.18熊叔认为,在AI时代,跨界的人有机会获得更大的加成。相反,只关注自己领域的人则获得的加成相对有限。AI技术的发展,为那些愿意跨出舒适区,学习新技能的人提供了更多的机会。\",\"37.57 熊叔不仅在产品开发上有所建树,他还运营着自己的自媒体——“AI 产品经理”。通过自媒体,熊叔可以分享自己的知识和见解,同时也是一个消化知识和社交的好机会。通过内容的创作和分享,熊叔与更多志同道合的朋友建立了联系。\",\"对新手AI 产品经理的建议\",\"45.07 对于想要入行AI产品经理的新手,熊叔给出了几点建议。首先,要掌握AI提示词工程的能力,理解AI的能力,这样才能更好地利用AI技术。\",\"50.19其次,要具备运营社群的能力,从用户实际使用过程中汇总信息,寻找需求。最后,要有跨界的思维,不断学习新的知识,以适应AI时代的变化。\",\"结语\",\"通过熊叔的分享,我们可以看到AI技术如何深刻地影响着我们的工作和生活。无论是在产品开发、社群运营还是个人成长上,AI都为我们提供了无限的可能性。让我们一起期待,在AI的帮助下,我们能够创造出更多令人惊叹的成果。\",\"如果希望加入听友群,请扫描下方二维码\"]},\"2\":{\"h\":\"\",\"t\":[\" 0:00 / 3:39\",\"comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能\"]},\"3\":{\"h\":\"\"},\"4\":{\"h\":\"摘要\",\"t\":[\"这段视频讲解了如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。视频详细介绍了工作流程,重点讲解了屏幕共享节点的使用方法,并提供了一些控制技巧。视频还提供了相关链接供观众参考。\"]},\"5\":{\"h\":\"提纲\",\"t\":[\"简介\",\"介绍视频内容:在ComfyUI中实现实时LCM,与多种软件集成。\",\"主要工具:自定义节点,屏幕共享节点。\",\"工作流程\",\"准备工作\",\"加载检查点和LCM 1.5模型。\",\"设置屏幕共享\",\"选择浏览器标签页或应用程序窗口。\",\"在ComfyUI中设置共享屏幕区域。\",\"运行生成\",\"点击“实时运行”开始生成图像。\",\"使用浮动窗口查看结果,方便调整姿势获取不同图片。\",\"控制技巧\",\"使用其他控制网(如Scribble)跟随模型轮廓。\",\"固定种子节点,避免屏幕相同内容重复生成。\",\"总结\",\"提供工作流程的链接。\",\"感谢观看,鼓励观众享受创作过程。\",\"Workflow: drive.google.com/file/d/1RaUSzTz4pg4f3pxDDfmzH78GHzALnmyR/\",\"comfyui-mixlab-nodes: github.com/shadowcz007/comfyui-mixlab-nodes\"]},\"6\":{\"h\":\"\",\"t\":[\"视频地址\",\"如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯光、色彩、质量等等, 这些都会自动翻译成英文。\",\"这边有一个小开关需要注意默认是打开的,当切换成 off 的时候,他仍然会把中文关键词翻译成英文,但是这时候他不会进行联想补充,而是直接根据这些词生成图像。在模型的选择上,我比较建议选择这 这个扎根呢 xl 模型,这也是我测试了大量模型后发现他无论是在提示词的理解还是图像的画质上,都是比较优秀的一个模型。\",\"这个模型和工作流,包括需要用到的节点,我都会打包好分享给大家,有什么问题也可以评论区留言,我是小同学,我们下期再见哦!\"]},\"7\":{\"h\":\"\",\"t\":[\"关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI\",\"摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通过开放和模块化的设计,使得Mixlab Node能够迅速集成最新技术,满足用户多样化的创作需求。文章还分享了“Just do it”的开发模式,展示了如何通过快速迭代和社区反馈实现产品创新。\",\"精华:\",\"\\\"Mixlab Node最大的特点就是‘社区驱动开发’,在我们社群里面,开发者和创作者每天都会讨论大量的新技术动态和使用需求。\\\"\",\"\\\"我们更提倡‘Just do it’——有好的想法,那就先做了再说。\\\"\",\"\\\"通过使用GPT,可以把开发的时间极限压缩。例如,我们在GPT的帮助下,只花了1到2天内完成录屏工作流的开发和上线,这放在传统企业,起码两周才能搞定。\\\"\",\"播客地址:聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态\"]},\"8\":{\"h\":\"ComfyUI Mixlab Nodes 教程\",\"t\":[\"🚀🚗🚚🏃\"]},\"9\":{\"h\":\"目录\",\"t\":[\"简介\",\"主要功能\",\"Workflow-to-APP\",\"Real-time Design\",\"Speech Recognition & Synthesis\",\"GPT 支持\",\"Prompt 功能\",\"图层处理\",\"3D 图像处理\",\"图像处理\",\"风格应用\",\"实用工具\",\"其他节点\",\"模型下载\",\"安装指南\",\"中文社区\",\"讨论区\",\"相关项目\"]},\"10\":{\"h\":\"简介\",\"t\":[\"ComfyUI Mixlab Nodes 是一个强大的工具集合,旨在通过简单的配置,将 workflow 转变为一个 Web APP,并支持实时设计、语音识别与合成、GPT 集成、图像处理等多种功能。本文档将详细介绍其功能、安装及使用方法。\"]},\"11\":{\"h\":\"主要功能\"},\"12\":{\"h\":\"Workflow-to-APP\",\"t\":[\"使用 AppInfo 节点,可以通过简单的配置,把 workflow 转变为一个 Web APP。\"]},\"13\":{\"h\":\"任务墙\"},\"14\":{\"h\":\"适合高级用户的自定义\",\"t\":[\"ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。\",\"提供信任机制\",\"提供节点的沙盒版本\"]},\"15\":{\"h\":\"如何开发自定义节点?\",\"t\":[\"python 编写节点运行时\",\"JavaScript 编写节点 UI\",\"你的第一个自定义节点: https://github.com/shadowcz007/comfyui-mixlab-nodes\",\"前端界面是由 HTML、CSS、Javascript 编写的,每个节点都有自己的一个生命周期管理,例如以下:\"]},\"16\":{\"h\":\"JS 代码示例\",\"t\":[\"import { app } from '../scripts/app.js' const ext = { // 扩展的唯一名称 name: 'Example.LoggingExtension', async init(app) { // 页面加载后立即运行的任何初始设置 console.log('[logging]', 'extension init') }, async setup(app) { // 应用程序创建后运行的任何设置 console.log('[logging]', 'extension setup') }, async addCustomNodeDefs(defs, app) { // 添加自定义节点定义 // 这些定义将自动配置和注册 // defs 是核心节点的查找表,将您的节点添加到其中 console.log( '[logging]', 'add custom node definitions', 'current nodes:', Object.keys(defs) ) }, async getCustomWidgets(app) { // 返回自定义小部件类型 // 请参阅 ComfyWidgets 获取小部件示例 console.log('[logging]', 'provide custom widgets') }, async beforeRegisterNodeDef(nodeType, nodeData, app) { // 在节点定义注册到图形之前运行自定义逻辑 console.log('[logging]', 'before register node: ', nodeType, nodeData) // 这将对每个节点定义触发,因此只记录一次 delete ext.beforeRegisterNodeDef }, async registerCustomNodes(app) { //在此处注册任何自定义节点实现,以便比自定义节点定义更灵活。 console.log('[logging]', 'register custom nodes') }, loadedGraphNode(node, app) { // 当加载/拖动/等操作工作流程的 JSON 或 PNG 时,对每个节点触发 // 如果在后端出现问题并且想要在前端修复工作流程 // 这就是进行修复的地方 console.log('[logging]', 'loaded graph node: ', node) // This fires for every node on each load so only log once delete ext.loadedGraphNode }, nodeCreated(node, app) { console.log('[logging]', 'node created: ', node) // 每次构建节点时触发 // 您可以在此处修改小部件、添加处理程序等 // 这对每个节点触发,所以只记录一次 delete ext.nodeCreated } } app.registerExtension(ext) \"]},\"17\":{\"h\":\"API 模式的一个简单指南\",\"t\":[\"如何使用 ComfyUI 的 API,通过命令行和脚本控制 ComfyUI\",\"原文代码仓库\",\"示例工作流 \",\"我们需要启用 Dev Mode. 单击菜单面板右上角的齿轮图标。\",\"查看 Enable Dev mode Options\",\"Save (API Format)菜单面板中应出现一个新按钮。\",\"单击该 Save(API Format)按钮,它将以默认名称保存一个文件 workflow_api.json。使用普通的 ComfyUI 工作流程 json 文件,可以将它们拖放到主 UI 中并加载工作流程。\",\"将 api 格式 json 拖放到 ComfyUI 中不会加载工作流程。它仅包含用于功能目的的足够节点数据,并且不包含位置或布局信息。因此,如果您确实需要可视化并查看工作流程,最好也通过普通按钮保存常规工作流程 json Save。\",\"现在在您选择的文本编辑器中打开此文件。您应该会看到类似于下面的内容。\",\"您可以看到每个部分(为了清晰起见,用彩色表示)都以数字开头。这是 Node ID. 如果您查看第一个节点(黄色),您将看到它的节点 ID 为 ,并且\\\"3\\\"是.KSamplerclass_type\",\"值得注意的是,它们 Node IDs 可能有所不同。如果您从头开始重新构建自己的工作流程并添加、删除节点,那么它们将与此处显示的不同。( 原始节点不会以 api 格式显示——仅显示核心节点。将来可能会改变)\",\"让我们创建一个名为 的新 Python 脚本 basic_workflow_api.py。\",\"参考\",\"将提示工作流发送到指定的 URL http://127.0.0.1:8188/prompt 并将其排队到在该地址运行的 ComfyUI 服务器上\",\"This function sends a prompt workflow to the specified URL (http://127.0.0.1:8188/prompt) and queues it on the ComfyUI server running at that address.\",\"def queue_prompt(prompt_workflow): p = {\\\"prompt\\\": prompt_workflow} data = json.dumps(p).encode('utf-8') req = request.Request(\\\"http://127.0.0.1:8188/prompt\\\", data=data) request.urlopen(req) \",\"完成代码后,运行:\",\"python3 basic_workflow_api.py \"]},\"18\":{\"h\":\"核心节点\"},\"19\":{\"h\":\"扩散模型加载器\",\"t\":[\"Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。\",\"输入\",\"model_path:扩散器模型的路径\",\"输出\",\"MODEL:用于去噪潜变量的模型。\",\"CLIP:用于编码文本提示的CLIP模型。\",\"VAE:用于将图像编码和解码到潜空间的VAE模型。\"]},\"20\":{\"h\":\"加载检查点节点\",\"t\":[\"Load Checkpoint (With Config) 节点,可用于根据提供的配置文件加载扩散模型。请注意,通常情况下,常规的Checkpoint能够自动检测出适当的配置。\",\"输入\",\"config_name:配置文件的名称。\",\"ckpt_name:要加载的模型的名称。\",\"输出\",\"MODEL:用于去噪潜变量的模型。\",\"CLIP:用于编码文本提示的CLIP模型。\",\"VAE:用于将图像编码和解码到潜空间的VAE模型。\"]},\"21\":{\"h\":\"条件设定\",\"t\":[\"在ComfyUI中,条件设定用于指导扩散模型生成特定的输出。所有的条件设定都以由CLIP使用Clip Text Encode节点嵌入的文本提示开始。\",\"这些条件可以通过该部分其他节点的进一步增强或修改。例如,使用Conditioning (Set Area)、Conditioning (Set Mask)或GLIGEN Textbox Apply节点来引导进程朝着特定的构图方向发展。\",\"或者通过Apply Style Model、应用ControlNet或 unCLIP Conditioning 节点来提供额外的视觉提示。相关节点的完整列表可以在侧边栏中找到。\"]},\"22\":{\"h\":\"应用ControlNet模型 Apply ControlNet\",\"t\":[\"Apply ControlNet节点,可以用于为扩散模型提供进一步的视觉指导。与unCLIP嵌入不同,controlnets 和 T2IAdaptor 适用于任何模型。\",\"通过将多个节点链接在一起,可以使用多个 controlNet 或 T2IAdaptor 来指导扩散模型。例如,可以通过向此节点提供包含边缘检测的图像以及在边缘检测图像上训练的controlNet来提示扩散模型。\",\"输入\",\"conditioning:一个条件\",\"control_net: control_net模型\",\"image:用作扩散模型的视觉指导\",\"输出\",\"CONDITIONING:一个包含control_net和视觉指导的条件。\",\"提示:要使用T2IAdaptor样式模型,请改用Apply Style Model节点。\"]},\"23\":{\"h\":\"应用风格模型\",\"t\":[\"Apply Style Model节点是一个用于为扩散模型提供视觉指导的节点,特别是针对所生成图像的样式。该节点使用T2IAdaptor 模型和来自 CLIP_vision 模型的嵌入,将扩散模型引导到与 CLIP_vision 嵌入图像的样式相符的方向。\",\"输入\",\"conditioning:一个条件\",\"style_model:一个T2I样式适配器\",\"CLIP_vision_output:包含所需样式的图像,由CLIP视觉模型编码\",\"输出\",\"CONDITIONING:包含T2I样式适配器和指向所需样式的视觉指导的条件\"]},\"24\":{\"h\":\"设置CLIP最后一层\",\"t\":[\"设置CLIP最后一层,CLIP Set Last Layer节点可以用于设置从中获取文本嵌入的CLIP输出层。将文本编码为嵌入是通过将文本通过CLIP模型中的各个层进行转换来实现的。尽管传统上扩散模型是根据CLIP的最后一层的输出进行条件化的,但某些扩散模型是根据较早的层进行条件化的,当使用最后一层的输出时可能效果不佳。\",\"输入\",\"clip: 用于编码文本的CLIP模型。\",\"输出\",\"CLIP: 设置了新的输出层的CLIP模型。\",\"如何理解Clip set last layer的原理?CLIP模型是由OpenAI开发的强大深度学习模型,它结合了视觉和语言理解。它能够以多模态方式理解和生成文本和图像。CLIP由多个层级组成,每个层级比前一个层级更具体。 ​\",\"Clip set last layer 指的是在CLIP模型中在较早的层级停止信息流动,而不是一直到最后一层。通过这样做,您可以控制生成的文本描述的具体程度或准确性。例如,如果您正在寻找一张“牛”的图片,您可能对文本模型能够生成的子类别或具体类型的牛不感兴趣,比如“阿伯丁安格斯公牛”。 ​\",\"使用 Clip set last layer 的好处在于,它允许您根据特定需求定制生成的文本描述的详细程度。根据应用或任务的不同,您可能希望在某个层级停止,以达到所需的准确性或相关性。例如,如果您有一个关于一个年轻人站在田野上的详细提示,使用较低的CLIP skip层级可能会生成诸如“一个站着的人”,“站着的年轻人”或“站在森林中的年轻人”等描述,每个描述都具有不同的特定程度。 ​\",\"值得注意的是,Clip set last layer 在与特定方式结构化的模型(如Booru模型)一起使用时特别有用。这些模型通常具有可以分解为多个子标签的标签,从而可以更精细地控制生成的描述。然而,CLIP skip的效果可能因具体的模型和应用而异,可能需要一些试错才能找到最佳设置。 ​\",\"还值得一提的是,Clip set last layer 仅适用于使用CLIP或基于使用CLIP的模型,如1.x模型及其衍生模型。较新的模型,如2.0模型,使用OpenCLIP而不是CLIP,并且与CLIP的交互方式不同。知识库 ​\"]},\"25\":{\"h\":\"文本提示\",\"t\":[\"输入Prompt(文本提示),CLIP文本编码节点将使用CLIP模型对文本提示进行编码,生成一个嵌入向量,用来指导扩散模型生成特定的图像。\",\"有关ComfyUI中所有与文本提示相关的功能的完整指南,请参阅此页面。\",\"输入\",\"clip - 用于编码文本的CLIP模型\",\"text - 要编码的文本。\",\"输出\",\"CONDITIONING - 包含嵌入文本的条件,用于指导扩散模型。\"]},\"26\":{\"h\":\"视觉编码\",\"t\":[\"CLIP Vision Encode节点可以使用CLIP视觉模型对图像进行编码,生成可用于指导 unCLIP 扩散模型或作为样式模型输入的嵌入。\",\"输入\",\"clip_vision\",\": 用于编码图像的CLIP视觉模型\",\"image\",\": 待编码的图像.\",\"输出\",\"CLIP_VISION_OUTPUT\",\": 编码后的图像。\"]},\"27\":{\"h\":\"平均条件化\",\"t\":[\"条件化平均节点,Conditioning (Average) 节点可以根据在 conditioning_to_strength 中设置的强度因子,在两个文本嵌入之间进行插值。\",\"输入\",\"conditioning_to\",\": 在 conditioning_to_strength 为1时的文本嵌入的条件化\",\"conditioning_from\",\": 在 conditioning_to_strength 为0时的文本嵌入的条件化。\",\"conditioning_to_strength\",\": 混合 conditioning_to 到 conditioning_from 的因子。\",\"输出\",\"CONDITIONING\",\": 基于 conditioning_to_strength 混合的文本嵌入的新条件化。\"]},\"28\":{\"h\":\"Conditioning (Combine)\",\"t\":[\"条件化(合并),Conditioning (Combine) 节点可用于通过平均扩散模型的预测噪声来合并多个条件化。请注意,这与 Conditioning (Average) 节点不同。在这里,通过不同条件化(即构成条件化的所有部分)的扩散模型输出进行平均处理,而条件化(平均)节点则插值存储在条件化内部的文本嵌入。\",\"!!! 提示 尽管 Conditioning Combine 没有一个因素输入来确定如何插值两个结果噪声预测,但可以使用 Conditioning (Set Area) 节点在组合它们之前对各个条件进行加权。\",\"输入\",\"conditioning_1\",\": 第一个条件。\",\"conditioning_2\",\": 第二个条件。\",\"输出\",\"CONDITIONING\",\": 一个包含两个输入的新条件,稍后由采样器进行平均。\"]},\"29\":{\"h\":\"Conditioning (Set Area)\",\"t\":[\"Conditioning (Set Area)节点可以用于将条件限制在图像的特定区域内。与Conditioning (Combine)节点一起使用,可以对最终图像的组合进行更多的控制。\",\"!!! 提示 ComfyUI中坐标系统的原点位于左上角。在混合扩散模型的多个噪声预测之前,强度会被归一化。\",\"输入\",\"conditioning\",\": 将被限制在区域内的条件\",\"width\",\": 区域的宽度\",\"height\",\": 区域的高度\",\"x\",\": 区域的x坐标\",\"y\",\": 区域的y坐标\",\"strength\",\": 当混合多个重叠的条件时使用的区域权重\",\"输出\",\"CONDITIONING\",\": 一个新的条件,限制在指定的区域内。\"]},\"30\":{\"h\":\"Conditioning (Set Mask)\",\"t\":[\"条件化(设置遮罩),Conditioning (Set Mask) 节点可用于将条件化限制在指定的遮罩中。与Conditioning (Combine) 节点一起使用,可以更好地控制最终图像的组合。\",\"!!! 提示 强度在从扩散模型中混合多个噪声预测之前进行归一化。\",\"输入\",\"conditioning\",\": 限制到遮罩的条件化\",\"mask\",\": 限制条件化的遮罩\",\"strength\",\": 在混合多个重叠条件化时使用的遮罩区域的权重。\",\"set_cond_area\",\": 是否对整个区域进行去噪,还是限制在遮罩的边界框内。\",\"输出\",\"CONDITIONING\",\": 一个新的条件化,限制在指定的遮罩中。\"]},\"31\":{\"h\":\"example\",\"t\":[\"example usage text with workflow image\"]},\"32\":{\"h\":\"GLIGEN Textbox Apply\",\"t\":[\"应用GLIGEN文本框,GLIGEN Textbox Apply节点可用于为扩散模型提供进一步的空间指导,引导其在图像的特定区域生成指定的部分。尽管文本输入可以接受任何文本,但GLIGEN最适合的输入是文本提示中的一部分对象。\",\"!!! 提示 ComfyUI中的坐标系原点位于左上角。\",\"输入\",\"conditioning_to\",\": 一个条件.\",\"clip\",\": CLIP模型.\",\"gligen_textbox_model\",\": GLIGEN模型.\",\"text\",\": 要与空间信息关联的文本\",\"width\",\": 区域的宽度\",\"height\",\": 区域的高度\",\"x\",\": 区域的x坐标\",\"y\",\": 区域的y坐标\",\"输出\",\"CONDITIONING\",\": 包含GLIGEN和空间指导的条件。\"]},\"33\":{\"h\":\"example\",\"t\":[\"example usage text with workflow image\",\"unCLIP条件化,unCLIP Conditioning 节点可以通过由CLIP视觉模型编码的图像为unCLIP模型提供额外的视觉指导。可以链接多个节点以提供多个图像作为指导。\",\"!!! 提示 并非所有扩散模型都与unCLIP条件化兼容。此节点特别需要使用考虑到unCLIP的扩散模型。\",\"输入\",\"conditioning\",\": 条件化\",\"clip_vision_output\",\": 由CLIP VISION模型编码的图像\",\"strength\",\": unCLIP扩散模型应受图像指导的强度\",\"noise_augmentation\",\": 用于将unCLIP扩散模型引导到原始CLIP视觉嵌入的随机位置,提供与编码图像密切相关的生成图像的额外变化\",\"输出\",\"CONDITIONING\",\": 包含unCLIP模型的额外视觉指导的条件化\"]},\"34\":{\"h\":\"实验性 Experimental\",\"t\":[\"实验性包含实验性节点,可能尚未完全完善。\"]},\"35\":{\"h\":\"Load Latent\",\"t\":[\"加载潜在节点:Load Latent节点可用于加载使用保存潜在节点保存的潜在图像。\",\"输入\",\"latent\",\": 潜在图像的名称\",\"输出\",\"LATENT\",\": 加载的潜在图像\"]},\"36\":{\"h\":\"Save Latent\",\"t\":[\"保存潜变量节点:Save Latent节点可以用于保存潜变量以备将来使用。这些潜变量可以使用Load Latent节点再次加载。\",\"输入\",\"samples\",\": 要保存的潜变量\",\"filename_prefix\",\": 文件名的前缀\",\"输出\",\"此节点没有输出\"]},\"37\":{\"h\":\"Tome Patch Model\",\"t\":[\"Tome Patch Model节点可以用于对扩散模型应用Tome优化。Tome(TOken MErging)试图找到一种合并提示令牌的方法,以使对最终图像的影响最小化。生成时间更快,所需的VRAM减少,但可能会降低质量。可以通过比率设置来控制此权衡,较高的值会导致合并更多的令牌。\",\"输入\",\"model\",\": 要应用Tome优化的扩散模型\",\"ratio\",\": 确定何时合并令牌的阈值\",\"输出\",\"MODEL\",\": 经Tome优化的扩散模型\"]},\"38\":{\"h\":\"TokenMerging for Stable Diffusion\"},\"39\":{\"h\":\"VAE Decode (Tiled)\",\"t\":[\"VAE解码(平铺),VAE Decode (Tiled) 节点可以使用提供的VAE将潜在空间图像解码回像素空间图像。该节点以平铺方式解码潜在图像,使其能够解码比常规VAE解码节点更大的潜在图像。\",\"!!! 提示 当因为VRAM不足而导致常规VAE解码节点失败时,comfy将自动使用平铺实现进行重试。\",\"输入\",\"samples\",\": 要解码的潜在图像\",\"vae\",\": 用于解码潜在图像的VAE\",\"输出\",\"IMAGE\",\": 解码后的图像。\"]},\"40\":{\"h\":\"VAE Encode (Tiled)\",\"t\":[\"VAE编码(平铺),VAE Encode (Tiled) 节点可用于使用提供的VAE将像素空间图像编码为潜在空间图像。此节点使用图块对图像进行编码,使其能够编码比常规VAE编码节点更大的图像。\",\"!!! 提示 当常规VAE编码节点由于VRAM不足而失败时,Comfy会自动使用平铺实现进行重试。\",\"输入\",\"pixels\",\": 像素要编码的像素空间图像\",\"vae\",\": 用于编码像素图像的VAE\",\"输出\",\"LATENT\",\": 编码的潜在图像。\"]},\"41\":{\"h\":\"图像 Image\",\"t\":[\"ComfyUI提供了多种节点来操作像素图像。这些节点可以用于加载图像以进行图像转换工作流,保存结果,或者用于对图像进行高分辨率处理。\"]},\"42\":{\"h\":\"Load Image\",\"t\":[\"加载图像,Load Image节点可用于加载图像。可以通过启动文件对话框或将图像拖放到节点上来上传图像。一旦图像上传完成,就可以在节点内部选择它们。\",\"!!! 提示 默认情况下,图像将上传到ComfyUI的输入文件夹中。\",\"输入\",\"image\",\": 图像要使用的名称。\",\"输出\",\"IMAGE\",\": 像素图像。\",\"MASK\",\": 图像的Alpha通道。\"]},\"43\":{\"h\":\"示例\",\"t\":[\"为了执行图像到图像的生成,您必须使用加载图像节点加载图像。在下面的示例中,使用加载图像节点加载了一张图像,然后使用 VAE encode 节点将其编码为潜在空间,从而使我们能够执行图像到图像的任务。\",\"(TODO: provide different example using mask)\"]},\"44\":{\"h\":\"Invert Image\",\"t\":[\"反转图像节点,Invert Image 节点可以用于反转图像的颜色。\",\"输入\",\"image\",\": 要反转的像素图像\",\"输出\",\"IMAGE\",\": 反转后的像素图像\"]},\"45\":{\"h\":\"Pad Image for Outpainting\",\"t\":[\"Outpainting节点的Pad Image用于给图像添加填充,以进行outpainting。然后,可以通过VAE Encode for Inpainting将此图像输入到inpaint diffusion模型中。\",\"输入\",\"image\",\": 要进行填充的图像。\",\"left\",\": 要在图像左侧填充的量。\",\"top\",\": 要在图像上方填充的量。\",\"right\",\": 要在图像右侧填充的量。\",\"bottom\",\": 要在图像下方填充的量。\",\"feathering\",\": 原始图像边界的羽化程度。\",\"输出\",\"IMAGE\",\": 填充后的像素图像。\",\"MASK\",\": 指示采样器在哪里进行outpainting的掩码。\"]},\"46\":{\"h\":\"Preview Image\",\"t\":[\" 预览图像节点可用于在节点图中预览图像。\",\"输入\",\"image\",\": 图像像素数据\",\"输出\",\"该节点没有输出参数\"]},\"47\":{\"h\":\"Save Image\",\"t\":[\"{ align=right width=450 }\",\"保存图像:Save Image节点可用于保存图像。要在节点图中简单预览图,请使用Preview Image节点。要更好地组织生成的所有图像,可以将特殊格式的字符串传递给带有file_prefix小部件的输出节点。有关如何格式化字符串的更多信息,请参阅此页面\",\"输入\",\"image\",\": 要预览的像素图像\",\"filename_prefix\",\": 要放入文件名中的前缀\",\"输出\",\"此节点没有输出。\"]},\"48\":{\"h\":\"Image Blend#postprocessing\",\"t\":[\"The Image Blend node can be used to blend two images together.\",\"!!! info If the dimensions of the second image do not match those of the first it is rescaled and center-cropped to maintain its aspect ratio\",\"输入\",\"image1\",\": A pixel image.\",\"image2\",\": A second pixel image.\",\"blend_factor\",\": The opacity of the second image.\",\"blend_mode\",\": How to blend the images.\",\"输出\",\"IMAGE\",\": The blended pixel image.\"]},\"49\":{\"h\":\"Image Blur\",\"t\":[\"The Image Blend node can be used to apply a gaussian blur to an image.\",\"输入\",\"image\",\": The pixel image to be blurred.\",\"blur_radius\",\": The radius of the gaussian.\",\"sigma\",\": The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel.\",\"输出\",\"IMAGE\",\": The blurred pixel image.\"]},\"50\":{\"h\":\"Image Quantize\",\"t\":[\"The Image Quantize node can be used to quantize an image, reducing the number of colors in the image.\",\"输入\",\"image\",\": The pixel image to be quantized.\",\"colors\",\": The number of colors in the quantized image.\",\"dither\",\": Wether to use dithering to make the quantized image look more smooth, or not.\",\"输出\",\"IMAGE\",\": The quantized pixel image.\"]},\"51\":{\"h\":\"Image Sharpen\",\"t\":[\"The Image Sharpen node can be used to apply a Laplacian sharpening filter to an image.\",\"输入\",\"image\",\": The pixel image to be sharpened.\",\"sharpen_radius\",\": The radius of the sharpening kernel.\",\"sigma\",\": The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel.\",\"alpha\",\": The strength of the sharpening kernel.\",\"输出\",\"IMAGE\",\": The sharpened pixel image.\"]},\"52\":{\"h\":\"Upscale Image\",\"t\":[\"The Upscale Image node can be used to resize pixel images. To upscale images using AI see the Upscale Image Using Model node.\",\"输入\",\"image\",\": The pixel images to be upscaled.\",\"upscale_method\",\": The method used for resizing.\",\"Width\",\": The target width in pixels.\",\"height\",\": The target height in pixels.\",\"crop\",\": Wether or not to center-crop the image to maintain the aspect ratio of the original latent images.\",\"输出\",\"IMAGE\",\": The resized images.\"]},\"53\":{\"h\":\"Upscale Image (using Model)\",\"t\":[\"The Upscale Image (using Model) node can be used to upscale pixel images using a model loaded with the [Load Upscale Model]\",\"输入\",\"upscale_model\",\": The model used for upscaling.\",\"image\",\": The pixel images to be upscaled.\",\"输出\",\"IMAGE\",\": The upscaled images.\"]},\"54\":{\"h\":\"Latent 潜在空间\",\"t\":[\"潜在扩散模型(如稳定扩散)不在像素空间中运作,而是在潜空间中进行去噪。这些节点提供了使用编码器和解码器在像素空间和潜在空间之间切换的方法,并提供了多种操纵潜在图像的方式。\"]},\"55\":{\"h\":\"Empty Latent Image\",\"t\":[\"空潜像图节点,Empty Latent Image节点可用于创建一组新的空潜像图。这些潜像图可以在文本转图像工作流中使用,通过采样器节点对其进行添加噪声和去噪处理。\",\"输入\",\"width\",\": 宽度(像素)\",\"height\",\": 高度(像素);\",\"batch_size\",\": 批次大小(潜在图像数量)。\",\"输出\",\"LATENT\",\": 空潜在图像\"]},\"56\":{\"h\":\"Latent Composite\",\"t\":[\"潜在图像合成 Latent Composite节点可用于将一个潜在图像合成到另一个潜在图像中。\",\"!!! 提示 ComfyUI中的坐标系统原点位于左上角。\",\"输入\",\"samples_to\",\": 要复合的潜在图像。\",\"samples_from\",\": 要粘贴的潜在图像。\",\"x\",\": 粘贴潜在图像的x坐标(以像素为单位)。\",\"y\",\": 粘贴潜在图像的y坐标(以像素为单位)。\",\"feather\",\": 要粘贴的潜在图像的羽化效果。\",\"输出\",\"LATENT\",\": 包含将 samples_from 粘贴到 samples_to 中的新潜在图像组合。\"]},\"57\":{\"h\":\"Latent Composite Masked\",\"t\":[\"潜在图像合成遮罩,Latent Composite Masked节点可用于将一个潜在图像遮罩复合体粘贴到另一个潜在图像。\",\"输入\",\"destination\",\": 目的地:要粘贴的潜在图像。\",\"source\",\": 源:要粘贴的潜在图像。\",\"mask\",\": 遮罩:要粘贴的源潜在图像的遮罩。\",\"x\",\": 粘贴潜在图像的x坐标(以像素为单位)\",\"y\",\": 粘贴潜在图像的y坐标(以像素为单位)\",\"输出\",\"LATENT\",\": 将源潜在图像粘贴到目标潜像的组合而成的新潜在图像。\"]},\"58\":{\"h\":\"Upscale Latent\",\"t\":[\"放大潜在图像,Upscale Latent 节点可用于调整潜在图像的大小。\",\"!!! 提示: 调整潜像图的大小与调整像素图像的大小不同。简单地调整潜像图而不是像素会导致更多的伪影。\",\"输入\",\"samples\",\": 要调整大小的潜像图\",\"upscale_method\",\": 用于调整大小的方法。\",\"Width\",\": 目标宽度(以像素为单位)。\",\"height\",\": 目标高度(以像素为单位)。\",\"crop\",\": 是否居中裁剪图像以保持原始潜像图的纵横比。\",\"输出\",\"LATENT\",\": 调整大小后的潜像图。\"]},\"59\":{\"h\":\"VAE Decode\",\"t\":[\"VAE解码,VAE Decode节点可用于使用提供的VAE将潜像图解码为像素图像。\",\"输入\",\"samples\",\": 要解码的潜像图。\",\"vae\",\": 用于解码潜像图的VAE。\",\"输出\",\"IMAGE\",\": 解码后的像素图像。\"]},\"60\":{\"h\":\"example\",\"t\":[\"TODO: SD 1.5 to XL example\"]},\"61\":{\"h\":\"VAE Encode\",\"t\":[\"VAE编码,VAE Encode 节点可以使用提供的VAE将像素空间图像编码为潜像图。\",\"输入\",\"pixels\",\": 像素:要编码的像素空间图像。\",\"vae\",\": 用于编码像素图像的VAE。\",\"输出\",\"LATENT\",\": 编码的潜像图。\"]},\"62\":{\"h\":\"示例\",\"t\":[\"为了在图像到图像的任务中使用图像,首先需要将其编码为潜像图。在下面的示例中,使用VAE编码节点将像素图像转换为潜像图,以便我们可以将其重新噪声化和去噪,得到全新的图像。\"]},\"63\":{\"h\":\"Latent From Batch\",\"t\":[\"从批次中提取潜像图,Latent From Batch 节点可以用于从批次中选择一个潜像图或图像片段。这在工作流中需要隔离特定的潜像图或图像时非常有用。\",\"输入\",\"samples\",\": 要选择一个片段的批次潜像图。\",\"batch_index\",\": 要选择的第一个潜像图的索引。\",\"length\",\": 要获取的潜像图数量。\",\"输出\",\"LATENT\",\": 只包含所选择片段的新批次潜像图\"]},\"64\":{\"h\":\"Rebatch Latents\",\"t\":[\"重新分批潜像图,Rebatch Latents节点可以用于拆分或合并批量的潜在空间图像。当这导致多个批次时,该节点将输出一个批次列表,而不是单个批次。这在批量大小过大无法全部适应VRAM内时非常有用,因为ComfyUI将对列表中的每个批次执行节点,而不是一次执行全部。它还可以将批次列表合并回一个单独的批次中。\",\"输入\",\"samples\",\": 待重新分批的潜图。\",\"batch_size\",\": 新的批次大小。\",\"输出\",\"LATENT\",\": 一个潜图列表,其中每个批次的大小不超过batch_size。\"]},\"65\":{\"h\":\"Repeat Latent Batch\",\"t\":[\"重复潜在批处理,Repeat Latent Batch节点可用于重复一批潜像图。这可以用于在图像到图像工作流中创建多个图像变体。\",\"输入\",\"samples\",\": 要重复的潜像图批处理。\",\"amount\",\": 重复的次数。\",\"输出\",\"LATENT\",\": 重复了指定次数的新的潜像图批处理。\"]},\"66\":{\"h\":\"Set Latent Noise Mask\",\"t\":[\"设置潜在噪声掩码,Set Latent Noise Mask节点可用于为修复图像的潜像图添加掩码。当设置了噪声掩码时,采样节点将仅在掩码区域上操作。如果提供了单个掩码,批处理中的所有潜像图都将使用该掩码。\",\"输入\",\"samples\",\": 样本:要修复的潜像图。\",\"mask\",\": 掩码:指示修复位置的掩码。\",\"输出\",\"LATENT\",\": 潜在:经过掩码处理的潜像图。\"]},\"67\":{\"h\":\"VAE Encode (for Inpainting)\",\"t\":[\"VAE编码(用于修复图像),VAE Encode (for Inpainting) 将像素空间图像编码为潜在空间图像,使用提供的VAE(变分自编码器)。它还接受修复图像的掩码,指示采样节点应该对图像的哪些部分去噪。可以使用grow_mask_by来增加掩码区域的大小,为修复过程提供一些额外的填充区域。\",\"!!! 提示 该节点专门用于用于修复训练的扩散模型,并确保在编码之前,掩码下方的像素被设置为灰色(0.5,0.5,0.5)。\",\"输入\",\"pixels\",\": 像素:要编码的像素空间图像。\",\"vae\",\": 用于编码像素图像的VAE。\",\"mask\",\": 掩码:指示要修复的位置的掩码。\",\"grow_mask_by\",\": 增加给定掩码区域的大小。\",\"输出\",\"LATENT\",\": 掩码和编码的潜像图。\"]},\"68\":{\"h\":\"Crop Latent\",\"t\":[\"裁剪潜像,Crop latent 节点可用于将潜像裁剪到新的形状。\",\"输入\",\"samples\",\": 样本要裁剪的潜像。\",\"width\",\": 宽度以像素为单位的区域宽度。\",\"height\",\": 高度以像素为单位的区域高度。\",\"x\",\": 以像素为单位的区域x坐标。\",\"y\",\": 以像素为单位的区域y坐标。\",\"输出\",\"LATENT\",\": 裁剪后的潜像图。\"]},\"69\":{\"h\":\"Flip Latent\",\"t\":[\"翻转潜像,Flip Latent 节点可用于水平或垂直翻转潜像。\",\"输入\",\"samples\",\": 要翻转的潜像。\",\"flip_method\",\": 选择水平翻转或垂直翻转\",\"输出\",\"LATENT\",\": 翻转后的潜像图。\"]},\"70\":{\"h\":\"Rotate Latent\",\"t\":[\"The Rotate Latent node can be used to rotate latent images clockwise in increments of 90 degrees.\",\"输入\",\"samples\",\": The latent images to be rotated.\",\"rotation\",\": Clockwise rotation.\",\"输出\",\"LATENT\",\": The rotated latents.\"]},\"71\":{\"h\":\"载入器 Loaders\",\"t\":[\"The loaders in this segment can be used to load a variety of models used in various workflows. A full list of all of the loaders can be found in the sidebar.\"]},\"72\":{\"h\":\"GLIGEN Loader\",\"t\":[\"The GLIGEN Loader node can be used to load a specific GLIGEN model. GLIGEN models are used to associate spatial information to parts of a text prompt, guiding the diffusion model to generate images adhering to compositions specified by GLIGEN.\",\"输入\",\"gligen_name\",\": The name of the GLIGEN model.\",\"输出\",\"GLIGEN\",\": The GLIGEN model used to encode spatial information to parts of the text prompt.\"]},\"73\":{\"h\":\"Hypernetwork Loader\",\"t\":[\"The Hypernetwork Loader node can be used to load a hypernetwork. similar to LoRAs, they are used to modify the diffusion model, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple hypernetworks together to further modify the model.\",\"!!! tip\",\"Hypernetwork strength values can be set to negative values. At times this can result in interesting effects. \"]},\"74\":{\"h\":\"inputs\",\"t\":[\"model\",\": A diffusion model.\",\"hypernetwork_name\",\": The name of the hypernetwork.\",\"strength\",\": How strongly to modify the diffusion model. This value can be negative.\"]},\"75\":{\"h\":\"outputs\",\"t\":[\"MODEL\",\": The modified diffusion model.\"]},\"76\":{\"h\":\"Load Checkpoint\",\"t\":[\"The Load Checkpoint node can be used to load a diffusion model, diffusion models are used to denoise latents. This node will also provide the appropriate VAE and CLIP model.\"]},\"77\":{\"h\":\"inputs\",\"t\":[\"ckpt_name\",\": The name of the model.\"]},\"78\":{\"h\":\"outputs\",\"t\":[\"MODEL\",\": The model used for denoising latents.\",\"CLIP\",\": The CLIP model used for encoding text prompts.\",\"VAE\",\": The VAE model used for encoding and decoding images to and from latent space.\"]},\"79\":{\"h\":\"Load CLIP\",\"t\":[\"The Load CLIP node can be used to load a specific CLIP model, CLIP models are used to encode text prompts that guide the diffusion process.\",\"!!! warning\",\"Conditional diffusion models are trained using a specific CLIP model, using a different model than the one which it was trained with is unlikely to result in good images. The [Load Checkpoint](LoadCheckpoint.md) node automatically loads the correct CLIP model. \"]},\"80\":{\"h\":\"inputs\",\"t\":[\"clip_name\",\": The name of the CLIP model.\"]},\"81\":{\"h\":\"outputs\",\"t\":[\"CLIP\",\": The CLIP model used for encoding text prompts.\"]},\"82\":{\"h\":\"Load CLIP Vision\",\"t\":[\"The Load CLIP Vision node can be used to load a specific CLIP vision model, similar to how CLIP models are used to encode text prompts, CLIP vision models are used to encode images.\"]},\"83\":{\"h\":\"inputs\",\"t\":[\"clip_name\",\": The name of the CLIP vision model.\"]},\"84\":{\"h\":\"outputs\",\"t\":[\"CLIP_VISION\",\": The CLIP vision model used for encoding image prompts.\"]},\"85\":{\"h\":\"Load ControlNet Model\",\"t\":[\"The Load ControlNet Model node can be used to load a ControlNet model. Similar to how the CLIP model provides a way to give textual hints to guide a diffusion model, ControlNet models are used to give visual hints to a diffusion model. This process is different from e.g. giving a diffusion model a partially noised up image to modify. Instead ControlNet models can be used to tell the diffusion model e.g. where edges in the final image should be, or how subjects should be posed. This node can also be used to load T2IAdaptors.\"]},\"86\":{\"h\":\"inputs\",\"t\":[\"control_net_name\",\": The name of the ControlNet model.\"]},\"87\":{\"h\":\"outputs\",\"t\":[\"CONTROL_NET\",\": The ControlNet or T2IAdaptor model used for providing visual hints to a diffusion model.\"]},\"88\":{\"h\":\"Load LoRA\",\"t\":[\"The Load LoRA node can be used to load a LoRA. LoRAs are used to modify the diffusion and CLIP models, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple LoRAs together to further modify the model.\",\"!!! tip\",\"LoRA strength values can be set to negative values. At times this can result in interesting effects. \"]},\"89\":{\"h\":\"inputs\",\"t\":[\"model\",\": A diffusion model.\",\"clip\",\": A CLIP model.\",\"lora_name\",\": The name of the LoRA.\",\"strength_model\",\": How strongly to modify the diffusion model. This value can be negative.\",\"strength_clip\",\": How strongly to modify the CLIP model. This value can be negative.\"]},\"90\":{\"h\":\"outputs\",\"t\":[\"MODEL\",\": The modified diffusion model.\",\"CLIP\",\": The modified CLIP model.\"]},\"91\":{\"h\":\"Load Style Model\",\"t\":[\"The Load Style Model node can be used to load a Style model. Style models can be used to provide a diffusion model a visual hint as to what kind of style the denoised latent should be in.\",\"!!! info Only T2IAdaptor style models are currently supported\"]},\"92\":{\"h\":\"inputs\",\"t\":[\"style_model_name\",\": The name of the style model.\"]},\"93\":{\"h\":\"outputs\",\"t\":[\"STYLE_MODEL\",\": The style model used for providing visual hints about the desired style to a diffusion model.\"]},\"94\":{\"h\":\"Load Upscale Model\",\"t\":[\"The Load Upscale Model node can be used to load a specific upscale model, upscale models are used to upscale images.\"]},\"95\":{\"h\":\"inputs\",\"t\":[\"model_name\",\": The name of the upscale model.\"]},\"96\":{\"h\":\"outputs\",\"t\":[\"UPSCALE_MODEL\",\": The upscale model used for upscaling images.\"]},\"97\":{\"h\":\"Load VAE\",\"t\":[\"The Load VAE node can be used to load a specific VAE model, VAE models are used to encoding and decoding images to and from latent space. Although the Load Checkpoint node provides a VAE model alongside the diffusion model, sometimes it can be useful to use a specific VAE model.\"]},\"98\":{\"h\":\"inputs\",\"t\":[\"vae_name\",\": The name of the VAE.\"]},\"99\":{\"h\":\"outputs\",\"t\":[\"VAE\",\": The VAE model used for encoding and decoding images to and from latent space.\"]},\"100\":{\"h\":\"example\",\"t\":[\"At times you might wish to use a different VAE than the one that came loaded with the Load Checkpoint node. In the example below we use a different VAE to encode an image to latent space, and decode the result of the Ksampler.\"]},\"101\":{\"h\":\"unCLIP Checkpoint Loader\",\"t\":[\"The unCLIP Checkpoint Loader node can be used to load a diffusion model specifically made to work with unCLIP. unCLIP Diffusion models are used to denoise latents conditioned not only on the provided text prompt, but also on provided images. This node will also provide the appropriate VAE and CLIP amd CLIP vision models.\",\"!!! warning even though this node can be used to load all diffusion models, not all diffusion models are compatible with unCLIP.\"]},\"102\":{\"h\":\"inputs\",\"t\":[\"ckpt_name\",\": The name of the model.\"]},\"103\":{\"h\":\"outputs\",\"t\":[\"MODEL\",\": The model used for denoising latents.\",\"CLIP\",\": The CLIP model used for encoding text prompts.\",\"VAE\",\": The VAE model used for encoding and decoding images to and from latent space.\",\"CLIP_VISION\",\": The CLIP Vision model used for encoding image prompts.\"]},\"104\":{\"h\":\"遮罩 Mask\",\"t\":[\"Masks provide a way to tell the sampler what to denoise and what to leave alone. These nodes provide a variety of ways create or load masks and manipulate them.\"]},\"105\":{\"h\":\"将图像转换为遮罩\",\"t\":[\"将图像转换为遮罩节点允许用户从图像的特定通道创建遮罩。这对于想要控制图像特定区域的编辑或处理特别有用,例如只对图像的某一部分应用效果或调整。\",\"输入\",\"image\",\": 要转换为遮罩的像素图像。\",\"channel\",\": 要用作遮罩的通道。\",\"输出\",\"MASK\",\": 由图像通道创建的遮罩。\"]},\"106\":{\"h\":\"示例\",\"t\":[\"将图像转换为遮罩的操作非常直接。首先,你需要准备一个图像,并确定你想要用作遮罩的特定通道。以下是一个简单的工作流程示例:\",\"将你想要转换的图像连接到image输入。\",\"选择你想要用作遮罩的通道(红色、绿色、蓝色或透明度)。\",\"节点将处理输入的图像,并在MASK输出中提供相应通道的遮罩。\",\"这在许多图像处理任务中都非常有用,特别是在需要精确控制应用于图像哪个部分的效果时。\",\"这样,你就可以利用图像的不同通道来创建精确的遮罩,进一步提高你的图像编辑能力和精度。\"]},\"107\":{\"h\":\"裁剪遮罩\",\"t\":[\"裁剪遮罩节点用于将遮罩裁剪为新的形状。通过定义裁剪区域的尺寸和坐标,你可以精确控制保留遮罩的哪一部分。\",\"!!! info 在ComfyUI中,坐标系的原点位于左上角。\"]},\"108\":{\"h\":\"输入\",\"t\":[\"mask\",\": 要裁剪的遮罩。\",\"width\",\": 裁剪区域的宽度,以像素为单位。\",\"height\",\": 裁剪区域的高度,以像素为单位。\",\"x\",\": 裁剪区域的x坐标,以像素为单位。\",\"y\",\": 裁剪区域的y坐标,以像素为单位。\"]},\"109\":{\"h\":\"输出\",\"t\":[\"MASK\",\": 被裁剪后的遮罩。\"]},\"110\":{\"h\":\"示例\",\"t\":[\"裁剪遮罩是图像编辑中常用的一项功能,它可以帮助你从一个大的遮罩中精确地选出你需要的部分。以下是如何使用裁剪遮罩节点的一个简单示例:\",\"将你想要裁剪的遮罩连接到mask输入。\",\"设置width和height来确定裁剪区域的尺寸。\",\"通过x和y输入来定位裁剪区域的左上角起始点。\",\"节点将输出一个新的、按照你指定参数裁剪过的遮罩。\",\"此裁剪遮罩可用于去除不需要的部分,或者将焦点集中在遮罩的特定区域。\"]},\"111\":{\"h\":\"羽化遮罩\",\"t\":[\"羽化遮罩节点用于对遮罩进行羽化处理,使遮罩边缘更加柔和,以实现更自然的过渡。\"]},\"112\":{\"h\":\"输入\",\"t\":[\"mask\",\": 需要进行羽化处理的遮罩。\",\"left\",\": 左侧边缘的羽化量。\",\"top\",\": 顶部边缘的羽化量。\",\"right\",\": 右侧边缘的羽化量。\",\"bottom\",\": 底部边缘的羽化量。\"]},\"113\":{\"h\":\"输出\",\"t\":[\"MASK\",\": 经过羽化处理的遮罩。\"]},\"114\":{\"h\":\"示例\",\"t\":[\"羽化遮罩是在图像处理和合成中实现柔和边缘效果的重要工具,特别是当将两个图像层叠加或融合时,羽化可以使边缘之间的过渡更加自然。以下是一个简单的使用案例:\",\"将您想要羽化的遮罩连接到mask输入。\",\"根据需要设置left、top、right和bottom,这些值确定了各个方向上羽化效果的强度。\",\"节点会生成一个新的羽化遮罩,可以被进一步用在图像融合或其他视觉效果中。\",\"此羽化遮罩可用于平滑遮罩的硬边缘,避免图像合成时出现不自然的硬线条或过渡。\"]},\"115\":{\"h\":\"反转遮罩\",\"t\":[\"反转遮罩节点用于反转一个遮罩,将原本的掩盖区域转换为非掩盖区域,反之亦然。这在您希望改变遮罩影响区域时非常有用。\"]},\"116\":{\"h\":\"输入\",\"t\":[\"mask\",\": 需要被反转的遮罩。\"]},\"117\":{\"h\":\"输出\",\"t\":[\"MASK\",\": 被反转后的遮罩。\"]},\"118\":{\"h\":\"实例\",\"t\":[\"反转遮罩节点在各种情境下都非常有用,尤其是当您希望对图像的不同部分应用不同的效果或处理时。以下是一个简单的使用案例:\",\"在这个工作流中,我们首先加载一个遮罩,该遮罩原本是为了保护图像的一个区域而创建的。但在某一步骤,我们决定想对原本被保护的区域应用某种效果(比如去噪或滤镜),同时保持原本未被保护的区域不变。这时,我们就可以使用反转遮罩节点。\",\"加载您原本的遮罩到工作流。\",\"将遮罩连接到“反转遮罩”节点的输入端。\",\"将“反转遮罩”节点的输出连接到您的图像处理节点(比如 KSampler)。\",\"现在,原本被保护的区域将接受处理,而其他区域则保持不变。\",\"通过使用反转遮罩节点,您能轻松地在不同的图像编辑阶段切换受影响的区域,无需创建和加载多个遮罩文件。\"]},\"119\":{\"h\":\"加载图片(作为遮罩)\",\"t\":[\"加载图片(作为遮罩)节点可以用来加载图片的某个通道并将其作为遮罩使用。图片可以通过启动文件对话框上传,或者直接拖拽到节点上。一旦图片上传,就可以在节点内部选择使用。\",\"!!! info 默认情况下,图片会被上传到ComfyUI的输入文件夹\"]},\"120\":{\"h\":\"输入\",\"t\":[\"image\",\": 要转换为遮罩的图片的名称。\",\"channel\",\": 要用作遮罩的图片的通道。\"]},\"121\":{\"h\":\"输出\",\"t\":[\"MASK\",\": 从图片通道创建的遮罩。\"]},\"122\":{\"h\":\"实例\",\"t\":[\"加载图片作为遮罩的节点在您需要基于现有图像创建遮罩时非常有用,尤其是当图像的某个区域有独特的颜色或亮度时,可以通过该颜色或亮度区分进行遮罩。以下是一个简单的使用案例:\",\"在此工作流中,我们有一个图像,其中某个区域我们想要进行特殊处理(例如应用特效、调整或变换),而不影响图像的其他部分。\",\"使用“加载图片(作为遮罩)”节点,选择您的图片文件。\",\"在“通道”选项中,选择一个特定的颜色通道(红色、绿色、蓝色或透明度),这取决于您的图片和需要遮罩的区域。例如,如果需要遮罩的区域在红色通道上有高亮度,则选择红色通道。\",\"将此节点的输出连接到下一个处理节点的遮罩输入,例如,一个应用特效的节点。\",\"现在,您的特效或处理将只应用于基于所选图片通道生成的遮罩的区域。\",\"这种方法提供了一种简便的方式,通过现有图片快速创建遮罩,无需手动绘制复杂的遮罩形状。\"]},\"123\":{\"h\":\"遮罩合成\",\"t\":[\"遮罩合成节点可以用来将一个遮罩粘贴到另一个遮罩中。\",\"!!! info 在ComfyUI中,坐标系统的原点位于左上角。\"]},\"124\":{\"h\":\"输入\",\"t\":[\"destination\",\": 将要被粘贴的遮罩。\",\"source\",\": 要粘贴的遮罩。\",\"x\",\": 粘贴遮罩的x坐标,单位为像素。\",\"y\",\": 粘贴遮罩的y坐标,单位为像素。\",\"operation\",\": 粘贴遮罩的方式。\"]},\"125\":{\"h\":\"输出\",\"t\":[\"MASK\",\": 包含粘贴到destination中的source的新遮罩合成。\"]},\"126\":{\"h\":\"示例\",\"t\":[\"遮罩合成节点非常适用于需要将一个遮罩层叠到另一个上的场景,尤其是当您想要在图像的特定部分应用不同的效果或调整时。以下是一个简单的使用案例:\",\"在此工作流中,我们有两个遮罩 - 一个是主遮罩(destination),另一个我们希望粘贴到主遮罩上的次遮罩(source)。\",\"将主遮罩连接到destination输入。\",\"将要粘贴的遮罩连接到source输入。\",\"在x和y输入中设置坐标,确定次遮罩在主遮罩上的位置。\",\"选择operation以确定粘贴时如何合并遮罩。例如,“正常”会简单地将次遮罩放在主遮罩上,“相加”会合并遮罩的亮度值等。\",\"输出的遮罩将是次遮罩粘贴到主遮罩上的结果,根据所选择的操作方式,可能会有不同的视觉效果。\",\"此节点非常适用于复杂的图像处理任务,其中需要精确控制应用于图像不同部分的效果。\",\"这种方法提供了一种高度可定制的方式来合并遮罩,为图像编辑提供更多的灵活性和控制。\"]},\"127\":{\"h\":\"纯色遮罩 Solid Mask\",\"t\":[\"纯色遮罩节点可以用来创建一个填充了单一值的纯色遮罩。\"]},\"128\":{\"h\":\"输入\",\"t\":[\"value\",\": 填充遮罩的值。\",\"width\",\": 遮罩的宽度。\",\"height\",\": 遮罩的高度。\"]},\"129\":{\"h\":\"输出\",\"t\":[\"MASK\",\": 填充了单一值的遮罩。\"]},\"130\":{\"h\":\"示例\",\"t\":[\"纯色遮罩节点在您需要为整个图像或特定区域创建统一遮罩时非常有用,尤其是在需要遮蔽背景或仅对图像的特定部分应用效果时。以下是一个简单的使用案例:\",\"将您想要填充的值输入到value中,该值范围从0(完全透明)到1(完全不透明)。\",\"输入您期望的遮罩width和height,通常这会与您工作的图像尺寸相匹配。\",\"节点会生成一个填充了所选值的纯色遮罩,可以被应用到其他节点,例如遮罩合成节点或KSampler节点。\",\"这个纯色遮罩可以用作其他遮罩操作的基础,或者直接用来控制图像的哪些部分应该被采样器处理或保留。\"]},\"131\":{\"h\":\"采样 Sampling\",\"t\":[\"采样节点提供了一种使用扩散模型对潜在图像进行去噪的方法。\"]},\"132\":{\"h\":\"KSampler\",\"t\":[\"KSampler 使用提供的模型以及正向和负向条件来生成给定潜像的新版本。首先,根据给定的 seed 和 denoise 强度对潜像进行加噪,部分擦除潜像。然后使用给定的 Model 以及 positive 和 negative 条件作为指导,去除这些噪声,在噪声擦除图像的地方“构想”新的细节。\"]},\"133\":{\"h\":\"输入\",\"t\":[\"Model\",\": 用于去噪的模型\",\"Positive\",\": 正面调节。\",\"Negative\",\": 负面调节。\",\"latent_image\",\": 将被去噪的潜像。\",\"seed\",\": 用于创建噪声的随机种子。\",\"control_after_generate\",\": 提供在每个提示后更改上述种子号的能力。节点可以randomize、increment、decrement或保持种子号fixed。\",\"steps\",\": 去噪期间使用的步骤数。允许采样器进行的步骤越多,结果就越准确。有关如何选择适当步骤数的好的指导方针,请参见samplers页面。\",\"cfg\",\": 无分类器指导(cfg)比例决定了采样器在实现提示内容到最终图像中应该有多积极。更高的比例迫使图像更好地代表提示,但设置过高的比例会对图像的质量产生负面影响。\",\"sampler_name\",\": 要使用的采样器,有关可用采样器的更多详细信息,请参见samplers页面。\",\"scheduler\",\": 要使用的计划类型,有关可用计划的更多详细信息,请参见samplers页面。\",\"denoise\",\": 应该有多少潜像信息被噪声擦除。\"]},\"134\":{\"h\":\"输出\",\"t\":[\"LATENT\",\": 去噪后的潜像。\"]},\"135\":{\"h\":\"示例\",\"t\":[\"KSampler 是任何工作流的核心,可用于执行文本到图像和图像到图像的生成任务。下面的示例展示了如何在图像到图像任务中使用 KSampler,通过连接一个模型、一个正面和负面嵌入以及一个潜像。注意,我们使用的去噪值小于1.0。这样,在对原始图像进行加噪时,原始图像的部分内容得以保留,指导去噪过程生成相似的图像。\"]},\"136\":{\"h\":\"KSampler 高级\",\"t\":[\"KSampler Advanced节点是KSampler节点的更高级版本。尽管KSampler节点总是向潜像中添加噪声,然后完全去除加噪后的潜像,但KSampler Advanced节点提供了额外的设置来控制这种行为。可以通过add_noise设置告诉KSampler Advanced节点不向潜像中添加噪声。它还可以通过return_with_leftover_noise设置返回部分去噪后的图像。与KSampler节点不同,此节点没有denoise设置,但这个过程是由start_at_step和end_at_step设置控制的。这使得例如将部分去噪的潜在图像交给另一个KSampler Advanced节点来完成过程成为可能。\",\"!!! 提示\",\"假设`end_at_step >= steps`,KSampler Advanced节点将以与KSampler节点具有以下`denoise`设置的完全相同的方式去噪潜像: `denoise = (steps - start_at_step) / steps` \"]},\"137\":{\"h\":\"输入\",\"t\":[\"Model\",\": 用于去噪的模型\",\"Positive\",\": 正面调节。\",\"Negative\",\": 负面调节。\",\"latent_image\",\": 将被去噪的潜像。\",\"add_noise\",\": 是否在去噪前向潜像中添加噪声。启用时,节点将为给定的起始步骤注入适当的噪声。\",\"seed\",\": 用于创建噪声的随机种子。\",\"control_after_generate\",\": 提供在每个提示后更改上述种子号的能力。节点可以randomize、increment、decrement或保持种子号fixed。\",\"steps\",\": 计划中的步骤数。允许采样器进行的步骤越多,结果就越准确。有关如何选择适当步骤数的好的指导方针,请参见samplers页面。\",\"cfg\",\": 无分类器指导(cfg)比例决定了采样器在实现提示内容到最终图像中应该有多积极。更高的比例迫使图像更好地代表提示,但设置过高的比例会对图像的质量产生负面影响。\",\"sampler_name\",\": 要使用的采样器,有关可用采样器的更多详细信息,请参见samplers页面。\",\"scheduler\",\": 要使用的计划类型,有关可用计划的更多详细信息,请参见samplers页面。\",\"start_at_step\",\": 确定在计划的哪一步开始去噪过程。\",\"end_at_step\",\": 确定在哪一步结束去噪。当此设置超过steps时,计划将在steps处结束\",\"return_with_leftover_noise\",\": 禁用时,KSampler Advanced将尝试在最后一步完全去除潜像中的噪声。根据此操作跳过计划中的多少步骤,输出可能不准确且质量较低。\"]},\"138\":{\"h\":\"输出\",\"t\":[\"LATENT\",\": 去噪后的潜像。\"]},\"139\":{\"h\":\"常用的自定义节点\",\"t\":[\"controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等\"]},\"140\":{\"h\":\"ComfyUI_IPAdapter_plus\",\"t\":[\"模型下载:\",\"在extra_model_paths.yaml文件中记得配置 ipadapter 模型的地址\"]},\"141\":{\"h\":\"视觉编码器\",\"t\":[\"下载后记得重命名,存放地址:/ComfyUI/models/clip_vision\",\"CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors\",\"CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors\"]},\"142\":{\"h\":\"IPA 模型\",\"t\":[\"存放地址 /ComfyUI/models/ipadapter\"]},\"143\":{\"h\":\"sd15 版本:\",\"t\":[\"基础版本 ip-adapter_sd15.safetensors\",\"light 版本,轻影响 ip-adapter_sd15_light_v11.bin\",\"plus 版本,高强度 ip-adapter-plus_sd15.safetensors\",\"plus 版本,面部增强,适用于肖像 ip-adapter-plus-face_sd15.safetensors\",\"full 版本,更强的面部模型 ip-adapter-full-face_sd15.safetensors\",\"vit-G 基础模型, bigG clip vision encoderip-adapter_sd15_vit-G.safetensors\"]},\"144\":{\"h\":\"SDXL 版本:\",\"t\":[\"vit-h 基础版本 ip-adapter_sdxl_vit-h.safetensors\",\"plus 版本 ip-adapter-plus_sdxl_vit-h.safetensors\",\"plus 版本,面部模型 ip-adapter-plus-face_sdxl_vit-h.safetensors\",\"vit-G SDXL 模型 bigG clip vision encoderip-adapter_sdxl.safetensors\"]},\"145\":{\"h\":\"FaceID 模型\",\"t\":[\"FaceID 模型需要 insightface, 记得此依赖安装正常,如果有问题可以查看\"]},\"146\":{\"h\":\"SD15\",\"t\":[\"基础款 ip-adapter-faceid_sd15.bin\",\"FaceID plus v2 ip-adapter-faceid-plusv2_sd15.bin,\",\"肖像画的文本提示风格转换 ip-adapter-faceid-portrait-v11_sd15.bin\",\"SDXL 基础款 ip-adapter-faceid_sdxl.bin\",\"SDXL plus v2 ip-adapter-faceid-plusv2_sdxl.bin\",\"SDXL 肖像画的文本提示风格转换 ip-adapter-faceid-portrait_sdxl.bin\",\"非常强的 SDXL 风格转换 ip-adapter-faceid-portrait_sdxl_unnorm.bin\",\"Most FaceID models require a LoRA. If you use the IPAdapter Unified Loader FaceID it will be loaded automatically if you follow the naming convention. Otherwise you have to load them manually, be careful each FaceID model has to be paired with its own specific LoRA.\",\"/ComfyUI/models/loras\",\"ip-adapter-faceid_sd15_lora.safetensors\",\"ip-adapter-faceid-plusv2_sd15_lora.safetensors\",\"ip-adapter-faceid_sdxl_lora.safetensors, SDXL FaceID LoRA\",\"ip-adapter-faceid-plusv2_sdxl_lora.safetensors, SDXL plus v2 LoRA\",\"All models can be found on huggingface.\"]},\"147\":{\"h\":\"ComfyUI interface stuff\"},\"148\":{\"h\":\"Textprompts 文本提示\",\"t\":[\"ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。\"]},\"149\":{\"h\":\"提高和降低权重\",\"t\":[\"通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:(prompt:weight)。例如,如果我们有一个提示 flowers inside a blue vase,并且我们希望扩散模型强调花卉,我们可以尝试将我们的提示改写为:(flowers:1.2) inside a blue vase。嵌套循环会相乘它们内部的权重,例如在提示 ((flowers:1.2):.5) inside a blue vase 中,花朵最终获得 0.6 的权重。仅使用括号而不指定权重是 (prompt:1.1) 的简写,例如 (flower) 等于 (flower:1.1)。要在提示中使用括号,它们必须被转义,例如 \\\\(1990\\\\)。ComfyUI 也可以通过快捷键 ctrl+arrow-up 和 ctrl+arrow-down 为提示的选定部分添加适当的加权语法。这些快捷方式提高或降低权重的量可以在设置中调整。\"]},\"150\":{\"h\":\"使用文本反转嵌入\",\"t\":[\"文本反转是定制的 CLIP 嵌入,体现了某些概念。可以通过使用以下语法在提示中引用文本反转:embedding:name,其中 name 是嵌入文件的名称。\"]},\"151\":{\"h\":\"添加随机选择\",\"t\":[\"可以让 ComfyUI 在排队时使用以下语法随机选择提示的某些部分:{choice1|choice2|...}。例如,如果我们想让 ComfyUI 随机选择一组颜色中的一种,我们可以在我们的提示中添加以下内容:{red|blue|yellow|green}。\"]},\"152\":{\"h\":\"UtilityNodes 实用节点\",\"t\":[\"ComfyUI 附带了一组节点,帮助管理图形。\"]},\"153\":{\"h\":\"Reroute 重新路由\",\"t\":[\"重新路由节点可用于重新路由链接,这对于组织您的工作流程很有用。\",\"重新路由节点上的输入和输出也可以垂直放置\"]},\"154\":{\"h\":\"Primitive 原始\",\"t\":[\"原始节点可以用于...\"]},\"155\":{\"h\":\"NodeOptions\"},\"156\":{\"h\":\"SaveFileFormatting 保存文件格式\",\"t\":[\"跟踪你生成的所有图片可能会很困难。为了帮助组织您的图像,您可以向带有 file_prefix 小部件的输出节点传递特殊格式的字符串。\"]},\"157\":{\"h\":\"查找和替换字符串\",\"t\":[\"为了自动将某些节点小部件的值插入到文件名中,可以使用以下语法:%node_name.widget_name%。例如,如果我们希望基于每个分辨率存储图像,我们可以向节点提供以下字符串:%Empty Latent Image.width%x%Empty Latent Image.height%/image。这些字符串将被指定的节点值替换。\"]},\"158\":{\"h\":\"重命名节点以进行搜索和替换\",\"t\":[\"有时,节点名称可能相当大,或者多个节点可能共享相同的名称。在这些情况下,可以在节点选项菜单下的 properties>Node name for S&R 中指定一个特定的名称。\"]},\"159\":{\"h\":\"日期时间字符串\",\"t\":[\"ComfyUI 也可以插入日期信息,格式为 %date:FORMAT%,其中格式识别以下说明符:\",\"说明符\",\"描述\",\"d 或 dd\",\"日\",\"M 或 MM\",\"月\",\"yy 或 yyyy\",\"年\",\"h 或 hh\",\"小时\",\"m 或 mm\",\"分钟\",\"s 或 ss\",\"秒\"]},\"160\":{\"h\":\"快捷键\",\"t\":[\"ComfyUI 提供了以下快捷键,您可以使用它们来加快工作流程:\",\"快捷键\",\"说明\",\"ctrl+enter\",\"将当前图形排入生成队列\",\"ctrl+shift+enter\",\"将当前图形作为第一个排入生成队列\",\"ctrl+s\",\"保存工作流\",\"ctrl+o\",\"载入工作流\",\"ctrl+a\",\"选择所有节点\",\"ctrl+m\",\"静音/取消静音所选节点\",\"delete\",\"删除所选节点\",\"backspace\",\"删除所选节点\",\"ctrl+delete\",\"删除当前图形\",\"ctrl+backspace\",\"删除当前图形\",\"space\",\"按住并移动光标时移动画布\",\"ctrl+lbutton\",\"将点击的节点添加到选择\",\"shift+lbutton\",\"将点击的节点添加到选择\",\"ctrl+c\",\"复制所选节点\",\"ctrl+v\",\"粘贴所选节点同时断开连接\",\"ctrl+shift+v\",\"粘贴所选节点同时保持传入连接\",\"shift+lbutton\",\"按住并拖动以同时移动多个所选节点\",\"ctrl+d\",\"载入默认图形\",\"q\",\"切换队列的可见性\",\"h\",\"切换历史记录的可见性\",\"r\",\"刷新图形\",\"2 X lbutton\",\"双击打开节点快速搜索调色板\",\"rbutton\",\"打开节点菜单\"]},\"161\":{\"h\":\"教程\",\"t\":[\"ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于ComfyUI 官方仓库 ,专门针对中文用户,做了优化和文档的细节补充。\",\"本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。\"]},\"162\":{\"h\":\"安装\",\"t\":[\"安装方式,推荐使用官方的 Window-Nvidia 显卡-免安装包 ,也可以从 百度网盘 下载\",\"如果你是 Mac 或者 Linux 系统,请参考 GitHub 上的安装说明。\"]},\"163\":{\"h\":\"什么是 stable diffusion?\",\"t\":[\"Stable Diffusion,中文一般称为稳定扩散,是 2022 年发布的深度学习生成模型,它可以根据文本的描述产生详细的图像。Stable Diffusion 通过一个复杂的概率扩散过程,逐步将原始图像转换为具有特定特征的图像,实现图像生成。\"]},\"164\":{\"h\":\"下载模型\",\"t\":[\"如果您完全不了解任何与稳定扩散相关的内容,您要做的第一件事就是获取一个模型checkpoints,您将用它来生成图像。\",\"您可以在CivitAI 或 HuggingFace 等网站上找到多种模型。首先,获取您喜欢的模型checkpoints,并将其放置在ComfyUI/models/checkpoints中。\"]},\"165\":{\"h\":\"启动 ComfyUI\",\"t\":[\"双击run_nvidia_gpu.bat 启动 ComfyUI。\",\"启动后,你将看到 ComfyUI 的提示:\",\"请在浏览器里访问 http://127.0.0.1:8188 访问\"]},\"166\":{\"h\":\"Comfy 的第一步\",\"t\":[\"此时,您应该已经在浏览器标签中启动并运行了 ComfyUI。第一次使用,ComfyUI 加载的是一个默认的工作流。这是一个最基础的 text-to-image 的工作流。\",\"您可以拖动画布,或者按住空格键并移动鼠标。可以通过鼠标滚动来缩放。\",\"如果您弄乱了什么,只需在右边的菜单中点击Load Default将其重置为初始状态。\",\"在我们运行工作流之前,让我们进行一个小修改,以预览生成的图像而不保存它们:\",\"右键单击Save Image节点,然后选择Remove。\",\"双击画布的空白部分,输入preview,然后单击PreviewImage选项。\",\"找到VAE Decode节点的IMAGE输出,并将其连接到您刚添加的Preview Image节点的images输入。\",\"此修改将预览您的结果,而不会将结果保存到output文件夹里。\",\"通过在菜单中点击Queue Prompt或在键盘上按command+enter 或 control+enter来创建您的第一张图片,就是这样!\"]},\"167\":{\"h\":\"尝试其他工作流\",\"t\":[\"为了便于分享,ComfyUI 默认将工作流的详细信息存储在生成的 PNG 中。要加载生成图像的工作流,只需通过菜单中的Load按钮加载图像(或者是 JSON 文件),或将其拖放到 ComfyUI 窗口中。ComfyUI 将自动解析工作流的详细信息并加载所有相关节点及其设置。\",\"在那里可以获得更多的工作流?可以访问ComfyUI 的官方示例工作流\"]},\"168\":{\"h\":\"进一步的支持\",\"t\":[\"欢迎申请加入ComfyUI 中文社区\",\"访问由 Mixlab Nodes 维护的discord 交流频道\"]},\"169\":{\"h\":\"参考资料:\",\"t\":[\"本地安装保姆级安装教程云端安装教程\"]},\"170\":{\"h\":\"实验性节点\",\"t\":[\"Self-Attention Guidance\",\"https://ku-cvlab.github.io/Self-Attention-Guidance/\"]},\"171\":{\"h\":\"\",\"t\":[\"404 Not Found\"]}},\"dirtCount\":0,\"index\":[[\"交流频道\",{\"1\":{\"168\":1}}],[\"维护的discord\",{\"1\":{\"168\":1}}],[\"欢迎申请加入comfyui\",{\"1\":{\"168\":1}}],[\"进一步的支持\",{\"0\":{\"168\":1}}],[\"进一步提高你的图像编辑能力和精度\",{\"1\":{\"106\":1}}],[\"窗口中\",{\"1\":{\"167\":1}}],[\"默认将工作流的详细信息存储在生成的\",{\"1\":{\"167\":1}}],[\"默认情况下\",{\"1\":{\"42\":1,\"119\":1}}],[\"尝试其他工作流\",{\"0\":{\"167\":1}}],[\"找到vae\",{\"1\":{\"166\":1}}],[\"访问由\",{\"1\":{\"168\":1}}],[\"访问\",{\"1\":{\"165\":1}}],[\"双击画布的空白部分\",{\"1\":{\"166\":1}}],[\"双击run\",{\"1\":{\"165\":1}}],[\"双击打开节点快速搜索调色板\",{\"1\":{\"160\":1}}],[\"启动后\",{\"1\":{\"165\":1}}],[\"启动\",{\"0\":{\"165\":1},\"1\":{\"165\":1}}],[\"启用时\",{\"1\":{\"137\":1}}],[\"获取您喜欢的模型checkpoints\",{\"1\":{\"164\":1}}],[\"获取小部件示例\",{\"1\":{\"16\":1}}],[\"逐步将原始图像转换为具有特定特征的图像\",{\"1\":{\"163\":1}}],[\"什么是\",{\"0\":{\"163\":1}}],[\"上的安装说明\",{\"1\":{\"162\":1}}],[\"系统\",{\"1\":{\"162\":1}}],[\"百度网盘\",{\"1\":{\"162\":1}}],[\"免安装包\",{\"1\":{\"162\":1}}],[\"显卡\",{\"1\":{\"162\":1}}],[\"推荐使用官方的\",{\"1\":{\"162\":1}}],[\"推动中文创作者在设计领域的发展和影响力的提升\",{\"1\":{\"0\":1}}],[\"本地安装保姆级安装教程云端安装教程\",{\"1\":{\"169\":1}}],[\"本教程的目标是帮助您快速上手\",{\"1\":{\"161\":1}}],[\"本文档将详细介绍其功能\",{\"1\":{\"10\":1}}],[\"本文介绍了mixlab\",{\"1\":{\"7\":1}}],[\"做了优化和文档的细节补充\",{\"1\":{\"161\":1}}],[\"专门针对中文用户\",{\"1\":{\"161\":1}}],[\"官方仓库\",{\"1\":{\"161\":1}}],[\"打开节点菜单\",{\"1\":{\"160\":1}}],[\"刷新图形\",{\"1\":{\"160\":1}}],[\"切换历史记录的可见性\",{\"1\":{\"160\":1}}],[\"切换队列的可见性\",{\"1\":{\"160\":1}}],[\"q\",{\"1\":{\"160\":1}}],[\"quantized\",{\"1\":{\"50\":4}}],[\"quantize\",{\"0\":{\"50\":1},\"1\":{\"50\":2}}],[\"queue\",{\"1\":{\"17\":1}}],[\"queues\",{\"1\":{\"17\":1}}],[\"复制所选节点\",{\"1\":{\"160\":1}}],[\"删除当前图形\",{\"1\":{\"160\":2}}],[\"删除所选节点\",{\"1\":{\"160\":2}}],[\"删除节点\",{\"1\":{\"17\":1}}],[\"取消静音所选节点\",{\"1\":{\"160\":1}}],[\"静音\",{\"1\":{\"160\":1}}],[\"载入默认图形\",{\"1\":{\"160\":1}}],[\"载入工作流\",{\"1\":{\"160\":1}}],[\"载入器\",{\"0\":{\"71\":1}}],[\"说明\",{\"1\":{\"160\":1}}],[\"说明符\",{\"1\":{\"159\":1}}],[\"快捷键\",{\"0\":{\"160\":1},\"1\":{\"160\":1}}],[\"秒\",{\"1\":{\"159\":1}}],[\"分钟\",{\"1\":{\"159\":1}}],[\"分享他们的专业知识\",{\"1\":{\"0\":1}}],[\"分享他们的创新经验\",{\"1\":{\"0\":1}}],[\"分享创新案例和举办创新工作坊\",{\"1\":{\"0\":1}}],[\"小时\",{\"1\":{\"159\":1}}],[\"小部件的输出节点传递特殊格式的字符串\",{\"1\":{\"156\":1}}],[\"年发布的深度学习生成模型\",{\"1\":{\"163\":1}}],[\"年\",{\"1\":{\"159\":1}}],[\"月\",{\"1\":{\"159\":1}}],[\"日\",{\"1\":{\"159\":1}}],[\"日期时间字符串\",{\"0\":{\"159\":1}}],[\"描述\",{\"1\":{\"159\":1}}],[\"查找和替换字符串\",{\"0\":{\"157\":1}}],[\"查看\",{\"1\":{\"17\":1}}],[\"跟踪你生成的所有图片可能会很困难\",{\"1\":{\"156\":1}}],[\"跟随模型轮廓\",{\"1\":{\"5\":1}}],[\"帮助管理图形\",{\"1\":{\"152\":1}}],[\"帮助创作者们实现他们的创意和创新项目\",{\"1\":{\"0\":1}}],[\"附带了一组节点\",{\"1\":{\"152\":1}}],[\"随机选择一组颜色中的一种\",{\"1\":{\"151\":1}}],[\"随着mixlab\",{\"1\":{\"1\":1}}],[\"体现了某些概念\",{\"1\":{\"150\":1}}],[\"6\",{\"1\":{\"149\":1}}],[\"花朵最终获得\",{\"1\":{\"149\":1}}],[\"嵌入\",{\"1\":{\"150\":1}}],[\"嵌入图像的样式相符的方向\",{\"1\":{\"23\":1}}],[\"嵌套循环会相乘它们内部的权重\",{\"1\":{\"149\":1}}],[\"风格转换\",{\"1\":{\"146\":1}}],[\"风格应用\",{\"1\":{\"9\":1}}],[\"非常强的\",{\"1\":{\"146\":1}}],[\"肖像画的文本提示风格转换\",{\"1\":{\"146\":2}}],[\"记得此依赖安装正常\",{\"1\":{\"145\":1}}],[\"面部模型\",{\"1\":{\"144\":1}}],[\"面部增强\",{\"1\":{\"143\":1}}],[\"轻影响\",{\"1\":{\"143\":1}}],[\"基础款\",{\"1\":{\"146\":2}}],[\"基础模型\",{\"1\":{\"143\":1}}],[\"基础版本\",{\"1\":{\"143\":1,\"144\":1}}],[\"基于\",{\"1\":{\"27\":1}}],[\"版本\",{\"0\":{\"143\":1,\"144\":1},\"1\":{\"143\":4,\"144\":2}}],[\"存放地址\",{\"1\":{\"141\":1,\"142\":1}}],[\"下载模型\",{\"0\":{\"164\":1}}],[\"下载\",{\"1\":{\"162\":1}}],[\"下载后记得重命名\",{\"1\":{\"141\":1}}],[\"下面的示例展示了如何在图像到图像任务中使用\",{\"1\":{\"135\":1}}],[\"预处理器\",{\"1\":{\"139\":1}}],[\"预览图像节点可用于在节点图中预览图像\",{\"1\":{\"46\":1}}],[\"常用的自定义节点\",{\"0\":{\"139\":1}}],[\"常规的checkpoint能够自动检测出适当的配置\",{\"1\":{\"20\":1}}],[\"禁用时\",{\"1\":{\"137\":1}}],[\"计划将在steps处结束\",{\"1\":{\"137\":1}}],[\"计划中的步骤数\",{\"1\":{\"137\":1}}],[\"`denoise\",{\"1\":{\"136\":1}}],[\">=\",{\"1\":{\"136\":1}}],[\"假设`end\",{\"1\":{\"136\":1}}],[\"高强度\",{\"1\":{\"143\":1}}],[\"高级\",{\"0\":{\"136\":1}}],[\"高度以像素为单位的区域高度\",{\"1\":{\"68\":1}}],[\"高度\",{\"1\":{\"55\":1}}],[\"注意\",{\"1\":{\"135\":1}}],[\"应该有多少潜像信息被噪声擦除\",{\"1\":{\"133\":1}}],[\"应用gligen文本框\",{\"1\":{\"32\":1}}],[\"应用风格模型\",{\"0\":{\"23\":1}}],[\"应用controlnet模型\",{\"0\":{\"22\":1}}],[\"应用controlnet或\",{\"1\":{\"21\":1}}],[\"应用程序创建后运行的任何设置\",{\"1\":{\"16\":1}}],[\"比例决定了采样器在实现提示内容到最终图像中应该有多积极\",{\"1\":{\"133\":1,\"137\":1}}],[\"比如去噪或滤镜\",{\"1\":{\"118\":1}}],[\"比如\",{\"1\":{\"24\":1,\"118\":1}}],[\"比如我们在这边用中文写的是一个女孩\",{\"1\":{\"6\":1}}],[\"结果就越准确\",{\"1\":{\"133\":1,\"137\":1}}],[\"结语\",{\"1\":{\"1\":1}}],[\"允许采样器进行的步骤越多\",{\"1\":{\"133\":1,\"137\":1}}],[\"去噪后的潜像\",{\"1\":{\"134\":1,\"138\":1}}],[\"去噪期间使用的步骤数\",{\"1\":{\"133\":1}}],[\"去除这些噪声\",{\"1\":{\"132\":1}}],[\"负面调节\",{\"1\":{\"133\":1,\"137\":1}}],[\"正面调节\",{\"1\":{\"133\":1,\"137\":1}}],[\"正常\",{\"1\":{\"126\":1}}],[\"新的细节\",{\"1\":{\"132\":1}}],[\"新的批次大小\",{\"1\":{\"64\":1}}],[\"构想\",{\"1\":{\"132\":1}}],[\"部分擦除潜像\",{\"1\":{\"132\":1}}],[\"采样节点提供了一种使用扩散模型对潜在图像进行去噪的方法\",{\"1\":{\"131\":1}}],[\"采样节点将仅在掩码区域上操作\",{\"1\":{\"66\":1}}],[\"采样\",{\"0\":{\"131\":1}}],[\"完全不透明\",{\"1\":{\"130\":1}}],[\"完全透明\",{\"1\":{\"130\":1}}],[\"完成代码后\",{\"1\":{\"17\":1}}],[\"填充了单一值的遮罩\",{\"1\":{\"129\":1}}],[\"填充遮罩的值\",{\"1\":{\"128\":1}}],[\"填充后的像素图像\",{\"1\":{\"45\":1}}],[\"纯色遮罩节点在您需要为整个图像或特定区域创建统一遮罩时非常有用\",{\"1\":{\"130\":1}}],[\"纯色遮罩节点可以用来创建一个填充了单一值的纯色遮罩\",{\"1\":{\"127\":1}}],[\"纯色遮罩\",{\"0\":{\"127\":1}}],[\"会合并遮罩的亮度值等\",{\"1\":{\"126\":1}}],[\"会简单地将次遮罩放在主遮罩上\",{\"1\":{\"126\":1}}],[\"确定在哪一步结束去噪\",{\"1\":{\"137\":1}}],[\"确定在计划的哪一步开始去噪过程\",{\"1\":{\"137\":1}}],[\"确定次遮罩在主遮罩上的位置\",{\"1\":{\"126\":1}}],[\"确定何时合并令牌的阈值\",{\"1\":{\"37\":1}}],[\"另一个我们希望粘贴到主遮罩上的次遮罩\",{\"1\":{\"126\":1}}],[\"单位为像素\",{\"1\":{\"124\":2}}],[\"单击该\",{\"1\":{\"17\":1}}],[\"单击菜单面板右上角的齿轮图标\",{\"1\":{\"17\":1}}],[\"坐标系统的原点位于左上角\",{\"1\":{\"123\":1}}],[\"坐标系的原点位于左上角\",{\"1\":{\"107\":1}}],[\"则选择红色通道\",{\"1\":{\"122\":1}}],[\"则可以为用户提供强大的文本生成能力\",{\"1\":{\"1\":1}}],[\"选项中\",{\"1\":{\"122\":1}}],[\"选择所有节点\",{\"1\":{\"160\":1}}],[\"选择operation以确定粘贴时如何合并遮罩\",{\"1\":{\"126\":1}}],[\"选择一个特定的颜色通道\",{\"1\":{\"122\":1}}],[\"选择您的图片文件\",{\"1\":{\"122\":1}}],[\"选择你想要用作遮罩的通道\",{\"1\":{\"106\":1}}],[\"选择水平翻转或垂直翻转\",{\"1\":{\"69\":1}}],[\"选择浏览器标签页或应用程序窗口\",{\"1\":{\"5\":1}}],[\"无分类器指导\",{\"1\":{\"133\":1,\"137\":1}}],[\"无需手动绘制复杂的遮罩形状\",{\"1\":{\"122\":1}}],[\"无需创建和加载多个遮罩文件\",{\"1\":{\"118\":1}}],[\"无论是在产品开发\",{\"1\":{\"1\":1}}],[\"该值范围从0\",{\"1\":{\"130\":1}}],[\"该遮罩原本是为了保护图像的一个区域而创建的\",{\"1\":{\"118\":1}}],[\"该节点专门用于用于修复训练的扩散模型\",{\"1\":{\"67\":1}}],[\"该节点将输出一个批次列表\",{\"1\":{\"64\":1}}],[\"该节点没有输出参数\",{\"1\":{\"46\":1}}],[\"该节点以平铺方式解码潜在图像\",{\"1\":{\"39\":1}}],[\"该节点使用t2iadaptor\",{\"1\":{\"23\":1}}],[\"尤其是在需要遮蔽背景或仅对图像的特定部分应用效果时\",{\"1\":{\"130\":1}}],[\"尤其是当您想要在图像的特定部分应用不同的效果或调整时\",{\"1\":{\"126\":1}}],[\"尤其是当您希望对图像的不同部分应用不同的效果或处理时\",{\"1\":{\"118\":1}}],[\"尤其是当图像的某个区域有独特的颜色或亮度时\",{\"1\":{\"122\":1}}],[\"尤其在ai领域有着深入的研究和实践\",{\"1\":{\"1\":1}}],[\"被反转后的遮罩\",{\"1\":{\"117\":1}}],[\"被裁剪后的遮罩\",{\"1\":{\"109\":1}}],[\"需要被反转的遮罩\",{\"1\":{\"116\":1}}],[\"需要进行羽化处理的遮罩\",{\"1\":{\"112\":1}}],[\"反之亦然\",{\"1\":{\"115\":1}}],[\"反转遮罩节点在各种情境下都非常有用\",{\"1\":{\"118\":1}}],[\"反转遮罩节点用于反转一个遮罩\",{\"1\":{\"115\":1}}],[\"反转遮罩\",{\"0\":{\"115\":1},\"1\":{\"118\":2}}],[\"反转后的像素图像\",{\"1\":{\"44\":1}}],[\"反转图像节点\",{\"1\":{\"44\":1}}],[\"避免图像合成时出现不自然的硬线条或过渡\",{\"1\":{\"114\":1}}],[\"避免屏幕相同内容重复生成\",{\"1\":{\"5\":1}}],[\"根据此操作跳过计划中的多少步骤\",{\"1\":{\"137\":1}}],[\"根据给定的\",{\"1\":{\"132\":1}}],[\"根据所选择的操作方式\",{\"1\":{\"126\":1}}],[\"根据需要设置left\",{\"1\":{\"114\":1}}],[\"根据应用或任务的不同\",{\"1\":{\"24\":1}}],[\"羽化可以使边缘之间的过渡更加自然\",{\"1\":{\"114\":1}}],[\"羽化遮罩是在图像处理和合成中实现柔和边缘效果的重要工具\",{\"1\":{\"114\":1}}],[\"羽化遮罩节点用于对遮罩进行羽化处理\",{\"1\":{\"111\":1}}],[\"羽化遮罩\",{\"0\":{\"111\":1}}],[\"底部边缘的羽化量\",{\"1\":{\"112\":1}}],[\"右键单击save\",{\"1\":{\"166\":1}}],[\"右侧边缘的羽化量\",{\"1\":{\"112\":1}}],[\"右边就会根据这些关键词进行补充\",{\"1\":{\"6\":1}}],[\"顶部边缘的羽化量\",{\"1\":{\"112\":1}}],[\"左侧边缘的羽化量\",{\"1\":{\"112\":1}}],[\"此修改将预览您的结果\",{\"1\":{\"166\":1}}],[\"此时\",{\"1\":{\"166\":1}}],[\"此羽化遮罩可用于平滑遮罩的硬边缘\",{\"1\":{\"114\":1}}],[\"此裁剪遮罩可用于去除不需要的部分\",{\"1\":{\"110\":1}}],[\"此节点没有denoise设置\",{\"1\":{\"136\":1}}],[\"此节点没有输出\",{\"1\":{\"36\":1,\"47\":1}}],[\"此节点非常适用于复杂的图像处理任务\",{\"1\":{\"126\":1}}],[\"此节点使用图块对图像进行编码\",{\"1\":{\"40\":1}}],[\"此节点特别需要使用考虑到unclip的扩散模型\",{\"1\":{\"33\":1}}],[\"按住并拖动以同时移动多个所选节点\",{\"1\":{\"160\":1}}],[\"按住并移动光标时移动画布\",{\"1\":{\"160\":1}}],[\"按照你指定参数裁剪过的遮罩\",{\"1\":{\"110\":1}}],[\"按钮\",{\"1\":{\"17\":1}}],[\"特别是当将两个图像层叠加或融合时\",{\"1\":{\"114\":1}}],[\"特别是在需要精确控制应用于图像哪个部分的效果时\",{\"1\":{\"106\":1}}],[\"特别是针对所生成图像的样式\",{\"1\":{\"23\":1}}],[\"蓝色或透明度\",{\"1\":{\"106\":1,\"122\":1}}],[\"绿色\",{\"1\":{\"106\":1,\"122\":1}}],[\"红色\",{\"1\":{\"106\":1,\"122\":1}}],[\"你将看到\",{\"1\":{\"165\":1}}],[\"你可以精确控制保留遮罩的哪一部分\",{\"1\":{\"107\":1}}],[\"你就可以利用图像的不同通道来创建精确的遮罩\",{\"1\":{\"106\":1}}],[\"你需要准备一个图像\",{\"1\":{\"106\":1}}],[\"你的第一个自定义节点\",{\"1\":{\"15\":1}}],[\"90\",{\"1\":{\"70\":1}}],[\"翻转后的潜像图\",{\"1\":{\"69\":1}}],[\"翻转潜像\",{\"1\":{\"69\":1}}],[\"裁剪区域的y坐标\",{\"1\":{\"108\":1}}],[\"裁剪区域的x坐标\",{\"1\":{\"108\":1}}],[\"裁剪区域的高度\",{\"1\":{\"108\":1}}],[\"裁剪区域的宽度\",{\"1\":{\"108\":1}}],[\"裁剪遮罩是图像编辑中常用的一项功能\",{\"1\":{\"110\":1}}],[\"裁剪遮罩节点用于将遮罩裁剪为新的形状\",{\"1\":{\"107\":1}}],[\"裁剪遮罩\",{\"0\":{\"107\":1}}],[\"裁剪后的潜像图\",{\"1\":{\"68\":1}}],[\"裁剪潜像\",{\"1\":{\"68\":1}}],[\"增加给定掩码区域的大小\",{\"1\":{\"67\":1}}],[\"增加了很多细节上的描述\",{\"1\":{\"6\":1}}],[\"变分自编码器\",{\"1\":{\"67\":1}}],[\"掩码和编码的潜像图\",{\"1\":{\"67\":1}}],[\"掩码下方的像素被设置为灰色\",{\"1\":{\"67\":1}}],[\"掩码\",{\"1\":{\"66\":1,\"67\":1}}],[\"样本要裁剪的潜像\",{\"1\":{\"68\":1}}],[\"样本\",{\"1\":{\"66\":1}}],[\"批处理中的所有潜像图都将使用该掩码\",{\"1\":{\"66\":1}}],[\"批次大小\",{\"1\":{\"55\":1}}],[\"其中格式识别以下说明符\",{\"1\":{\"159\":1}}],[\"其中\",{\"1\":{\"150\":1}}],[\"其中需要精确控制应用于图像不同部分的效果\",{\"1\":{\"126\":1}}],[\"其中某个区域我们想要进行特殊处理\",{\"1\":{\"122\":1}}],[\"其中每个批次的大小不超过batch\",{\"1\":{\"64\":1}}],[\"其他节点\",{\"1\":{\"9\":1}}],[\"待重新分批的潜图\",{\"1\":{\"64\":1}}],[\"待编码的图像\",{\"1\":{\"26\":1}}],[\"因为comfyui将对列表中的每个批次执行节点\",{\"1\":{\"64\":1}}],[\"因此只记录一次\",{\"1\":{\"16\":1}}],[\"因此\",{\"1\":{\"1\":1,\"17\":1}}],[\"重命名节点以进行搜索和替换\",{\"0\":{\"158\":1}}],[\"重新路由节点上的输入和输出也可以垂直放置\",{\"1\":{\"153\":1}}],[\"重新路由节点可用于重新路由链接\",{\"1\":{\"153\":1}}],[\"重新路由\",{\"0\":{\"153\":1}}],[\"重新分批潜像图\",{\"1\":{\"64\":1}}],[\"重复了指定次数的新的潜像图批处理\",{\"1\":{\"65\":1}}],[\"重复的次数\",{\"1\":{\"65\":1}}],[\"重复潜在批处理\",{\"1\":{\"65\":1}}],[\"重点讲解了屏幕共享节点的使用方法\",{\"1\":{\"4\":1}}],[\"得到全新的图像\",{\"1\":{\"62\":1}}],[\"解码后的像素图像\",{\"1\":{\"59\":1}}],[\"解码后的图像\",{\"1\":{\"39\":1}}],[\"调整或变换\",{\"1\":{\"122\":1}}],[\"调整大小后的潜像图\",{\"1\":{\"58\":1}}],[\"调整潜像图的大小与调整像素图像的大小不同\",{\"1\":{\"58\":1}}],[\"简单地调整潜像图而不是像素会导致更多的伪影\",{\"1\":{\"58\":1}}],[\"简介\",{\"0\":{\"10\":1},\"1\":{\"5\":1,\"9\":1}}],[\"放大潜在图像\",{\"1\":{\"58\":1}}],[\"遮罩的高度\",{\"1\":{\"128\":1}}],[\"遮罩的宽度\",{\"1\":{\"128\":1}}],[\"遮罩合成节点非常适用于需要将一个遮罩层叠到另一个上的场景\",{\"1\":{\"126\":1}}],[\"遮罩合成节点可以用来将一个遮罩粘贴到另一个遮罩中\",{\"1\":{\"123\":1}}],[\"遮罩合成\",{\"0\":{\"123\":1}}],[\"遮罩\",{\"0\":{\"104\":1},\"1\":{\"57\":1}}],[\"源\",{\"1\":{\"57\":1}}],[\"目标高度\",{\"1\":{\"58\":1}}],[\"目标宽度\",{\"1\":{\"58\":1}}],[\"目的地\",{\"1\":{\"57\":1}}],[\"目录\",{\"0\":{\"9\":1}}],[\"粘贴所选节点同时保持传入连接\",{\"1\":{\"160\":1}}],[\"粘贴所选节点同时断开连接\",{\"1\":{\"160\":1}}],[\"粘贴遮罩的方式\",{\"1\":{\"124\":1}}],[\"粘贴遮罩的y坐标\",{\"1\":{\"124\":1}}],[\"粘贴遮罩的x坐标\",{\"1\":{\"124\":1}}],[\"粘贴到\",{\"1\":{\"56\":1}}],[\"粘贴潜在图像的y坐标\",{\"1\":{\"56\":1,\"57\":1}}],[\"粘贴潜在图像的x坐标\",{\"1\":{\"56\":1,\"57\":1}}],[\"空潜在图像\",{\"1\":{\"55\":1}}],[\"空潜像图节点\",{\"1\":{\"55\":1}}],[\"宽度以像素为单位的区域宽度\",{\"1\":{\"68\":1}}],[\"宽度\",{\"1\":{\"55\":1}}],[\"不在像素空间中运作\",{\"1\":{\"54\":1}}],[\"不断学习新的知识\",{\"1\":{\"1\":1}}],[\"潜在\",{\"1\":{\"66\":1}}],[\"潜在图像合成遮罩\",{\"1\":{\"57\":1}}],[\"潜在图像合成\",{\"1\":{\"56\":1}}],[\"潜在图像数量\",{\"1\":{\"55\":1}}],[\"潜在图像的名称\",{\"1\":{\"35\":1}}],[\"潜在扩散模型\",{\"1\":{\"54\":1}}],[\"潜在空间\",{\"0\":{\"54\":1}}],[\"指导去噪过程生成相似的图像\",{\"1\":{\"135\":1}}],[\"指示要修复的位置的掩码\",{\"1\":{\"67\":1}}],[\"指示采样节点应该对图像的哪些部分去噪\",{\"1\":{\"67\":1}}],[\"指示采样器在哪里进行outpainting的掩码\",{\"1\":{\"45\":1}}],[\"指示修复位置的掩码\",{\"1\":{\"66\":1}}],[\"指的是在clip模型中在较早的层级停止信息流动\",{\"1\":{\"24\":1}}],[\"然后单击previewimage选项\",{\"1\":{\"166\":1}}],[\"然后选择remove\",{\"1\":{\"166\":1}}],[\"然后完全去除加噪后的潜像\",{\"1\":{\"136\":1}}],[\"然后\",{\"1\":{\"45\":1}}],[\"然后使用给定的\",{\"1\":{\"132\":1}}],[\"然后使用\",{\"1\":{\"43\":1}}],[\"然而\",{\"1\":{\"24\":1}}],[\"示例\",{\"0\":{\"43\":1,\"62\":1,\"106\":1,\"110\":1,\"114\":1,\"126\":1,\"130\":1,\"135\":1}}],[\"示例工作流\",{\"1\":{\"17\":1}}],[\"像素\",{\"1\":{\"55\":2,\"61\":1,\"67\":1}}],[\"像素图像\",{\"1\":{\"42\":1}}],[\"像素要编码的像素空间图像\",{\"1\":{\"40\":1}}],[\"就是这样\",{\"1\":{\"166\":1}}],[\"就可以在节点内部选择使用\",{\"1\":{\"119\":1}}],[\"就可以在节点内部选择它们\",{\"1\":{\"42\":1}}],[\"就能生成高质量图像\",{\"1\":{\"6\":1}}],[\"保存工作流\",{\"1\":{\"160\":1}}],[\"保存文件格式\",{\"0\":{\"156\":1}}],[\"保存图像\",{\"1\":{\"47\":1}}],[\"保存结果\",{\"1\":{\"41\":1}}],[\"保存潜变量节点\",{\"1\":{\"36\":1}}],[\"平铺\",{\"1\":{\"39\":1,\"40\":1}}],[\"平均\",{\"1\":{\"28\":1}}],[\"平均条件化\",{\"0\":{\"27\":1}}],[\"经过羽化处理的遮罩\",{\"1\":{\"113\":1}}],[\"经过掩码处理的潜像图\",{\"1\":{\"66\":1}}],[\"经tome优化的扩散模型\",{\"1\":{\"37\":1}}],[\"经验和创新思维\",{\"1\":{\"0\":1}}],[\"较高的值会导致合并更多的令牌\",{\"1\":{\"37\":1}}],[\"较新的模型\",{\"1\":{\"24\":1}}],[\"试图找到一种合并提示令牌的方法\",{\"1\":{\"37\":1}}],[\"加载的是一个默认的工作流\",{\"1\":{\"166\":1}}],[\"加载的潜在图像\",{\"1\":{\"35\":1}}],[\"加载图片作为遮罩的节点在您需要基于现有图像创建遮罩时非常有用\",{\"1\":{\"122\":1}}],[\"加载图片\",{\"0\":{\"119\":1},\"1\":{\"119\":1,\"122\":1}}],[\"加载图像\",{\"1\":{\"42\":1}}],[\"加载您原本的遮罩到工作流\",{\"1\":{\"118\":1}}],[\"加载潜在节点\",{\"1\":{\"35\":1}}],[\"加载检查点节点\",{\"0\":{\"20\":1}}],[\"加载检查点和lcm\",{\"1\":{\"5\":1}}],[\"引导其在图像的特定区域生成指定的部分\",{\"1\":{\"32\":1}}],[\"限制在指定的遮罩中\",{\"1\":{\"30\":1}}],[\"限制在指定的区域内\",{\"1\":{\"29\":1}}],[\"限制条件化的遮罩\",{\"1\":{\"30\":1}}],[\"限制到遮罩的条件化\",{\"1\":{\"30\":1}}],[\"yyyy\",{\"1\":{\"159\":1}}],[\"yy\",{\"1\":{\"159\":1}}],[\"yaml文件中记得配置\",{\"1\":{\"140\":1}}],[\"you\",{\"1\":{\"100\":1,\"146\":3}}],[\"y\",{\"1\":{\"29\":1,\"32\":1,\"56\":1,\"57\":1,\"68\":1,\"108\":1,\"124\":1}}],[\"区域的y坐标\",{\"1\":{\"29\":1,\"32\":1}}],[\"区域的x坐标\",{\"1\":{\"29\":1,\"32\":1}}],[\"区域的高度\",{\"1\":{\"29\":1,\"32\":1}}],[\"区域的宽度\",{\"1\":{\"29\":1,\"32\":1}}],[\"hh\",{\"1\":{\"159\":1}}],[\"huggingface\",{\"1\":{\"146\":1,\"164\":1}}],[\"has\",{\"1\":{\"146\":1}}],[\"have\",{\"1\":{\"146\":1}}],[\"h\",{\"1\":{\"141\":1,\"144\":4,\"159\":1,\"160\":1}}],[\"hint\",{\"1\":{\"91\":1}}],[\"hints\",{\"1\":{\"85\":2,\"87\":1,\"93\":1}}],[\"hypernetworks\",{\"1\":{\"73\":1}}],[\"hypernetwork\",{\"0\":{\"73\":1},\"1\":{\"73\":3,\"74\":2}}],[\"how\",{\"1\":{\"48\":1,\"74\":1,\"82\":1,\"85\":2,\"89\":2}}],[\"height\",{\"1\":{\"29\":1,\"32\":1,\"52\":2,\"55\":1,\"58\":1,\"68\":1,\"108\":1,\"128\":1,\"157\":1}}],[\"http\",{\"1\":{\"17\":3,\"165\":1}}],[\"https\",{\"1\":{\"15\":1,\"170\":1}}],[\"html\",{\"1\":{\"15\":1}}],[\"强度对潜像进行加噪\",{\"1\":{\"132\":1}}],[\"强度在从扩散模型中混合多个噪声预测之前进行归一化\",{\"1\":{\"30\":1}}],[\"强度会被归一化\",{\"1\":{\"29\":1}}],[\"强调其在ai时代如何通过社区驱动开发模式重塑内容创作产品和社区生态\",{\"1\":{\"7\":1}}],[\"强调了为更可持续的社区生态寻求可能性的重要性\",{\"1\":{\"1\":1}}],[\"稍后由采样器进行平均\",{\"1\":{\"28\":1}}],[\"第一次使用\",{\"1\":{\"166\":1}}],[\"第一个条件\",{\"1\":{\"28\":1}}],[\"第二个条件\",{\"1\":{\"28\":1}}],[\"没有一个因素输入来确定如何插值两个结果噪声预测\",{\"1\":{\"28\":1}}],[\"尽管ksampler节点总是向潜像中添加噪声\",{\"1\":{\"136\":1}}],[\"尽管文本输入可以接受任何文本\",{\"1\":{\"32\":1}}],[\"尽管\",{\"1\":{\"28\":1}}],[\"尽管传统上扩散模型是根据clip的最后一层的输出进行条件化的\",{\"1\":{\"24\":1}}],[\"即构成条件化的所有部分\",{\"1\":{\"28\":1}}],[\"合并\",{\"1\":{\"28\":1}}],[\"到1\",{\"1\":{\"130\":1}}],[\"到\",{\"1\":{\"27\":1}}],[\"混合的文本嵌入的新条件化\",{\"1\":{\"27\":1}}],[\"混合\",{\"1\":{\"27\":1}}],[\"条件作为指导\",{\"1\":{\"132\":1}}],[\"条件化\",{\"1\":{\"28\":1,\"30\":1,\"33\":1}}],[\"条件化平均节点\",{\"1\":{\"27\":1}}],[\"条件设定用于指导扩散模型生成特定的输出\",{\"1\":{\"21\":1}}],[\"条件设定\",{\"0\":{\"21\":1}}],[\"编码的潜像图\",{\"1\":{\"61\":1}}],[\"编码的潜在图像\",{\"1\":{\"40\":1}}],[\"编码后的图像\",{\"1\":{\"26\":1}}],[\"编写的\",{\"1\":{\"15\":1}}],[\"编写节点\",{\"1\":{\"15\":1}}],[\"编写节点运行时\",{\"1\":{\"15\":1}}],[\"视觉编码器\",{\"0\":{\"141\":1}}],[\"视觉编码\",{\"0\":{\"26\":1}}],[\"视频地址\",{\"1\":{\"6\":1}}],[\"视频还提供了相关链接供观众参考\",{\"1\":{\"4\":1}}],[\"视频详细介绍了工作流程\",{\"1\":{\"4\":1}}],[\"生成时间更快\",{\"1\":{\"37\":1}}],[\"生成可用于指导\",{\"1\":{\"26\":1}}],[\"生成一个嵌入向量\",{\"1\":{\"25\":1}}],[\"生成更加精美的作品\",{\"1\":{\"1\":1}}],[\"知识库\",{\"1\":{\"24\":1}}],[\"x\",{\"1\":{\"29\":1,\"32\":1,\"56\":1,\"57\":1,\"68\":1,\"108\":1,\"124\":1,\"157\":1,\"160\":1}}],[\"x模型及其衍生模型\",{\"1\":{\"24\":1}}],[\"xl\",{\"1\":{\"6\":1,\"60\":1}}],[\"仅使用括号而不指定权重是\",{\"1\":{\"149\":1}}],[\"仅适用于使用clip或基于使用clip的模型\",{\"1\":{\"24\":1}}],[\"仅显示核心节点\",{\"1\":{\"17\":1}}],[\"还是限制在遮罩的边界框内\",{\"1\":{\"30\":1}}],[\"还值得一提的是\",{\"1\":{\"24\":1}}],[\"还有艺术风格\",{\"1\":{\"6\":1}}],[\"等网站上找到多种模型\",{\"1\":{\"164\":1}}],[\"等于\",{\"1\":{\"149\":1}}],[\"等\",{\"1\":{\"139\":1}}],[\"等描述\",{\"1\":{\"24\":1}}],[\"等操作工作流程的\",{\"1\":{\"16\":1}}],[\"站在森林中的年轻人\",{\"1\":{\"24\":1}}],[\"站着的年轻人\",{\"1\":{\"24\":1}}],[\"阿伯丁安格斯公牛\",{\"1\":{\"24\":1}}],[\"牛\",{\"1\":{\"24\":1}}],[\"​\",{\"1\":{\"24\":5}}],[\"但这个过程是由start\",{\"1\":{\"136\":1}}],[\"但ksampler\",{\"1\":{\"136\":1}}],[\"但设置过高的比例会对图像的质量产生负面影响\",{\"1\":{\"133\":1,\"137\":1}}],[\"但在某一步骤\",{\"1\":{\"118\":1}}],[\"但可能会降低质量\",{\"1\":{\"37\":1}}],[\"但可以使用\",{\"1\":{\"28\":1}}],[\"但gligen最适合的输入是文本提示中的一部分对象\",{\"1\":{\"32\":1}}],[\"但某些扩散模型是根据较早的层进行条件化的\",{\"1\":{\"24\":1}}],[\"但是这时候他不会进行联想补充\",{\"1\":{\"6\":1}}],[\"设置width和height来确定裁剪区域的尺寸\",{\"1\":{\"110\":1}}],[\"设置潜在噪声掩码\",{\"1\":{\"66\":1}}],[\"设置遮罩\",{\"1\":{\"30\":1}}],[\"设置了新的输出层的clip模型\",{\"1\":{\"24\":1}}],[\"设置clip最后一层\",{\"0\":{\"24\":1},\"1\":{\"24\":1}}],[\"设置屏幕共享\",{\"1\":{\"5\":1}}],[\"由图像通道创建的遮罩\",{\"1\":{\"105\":1}}],[\"由clip\",{\"1\":{\"33\":1}}],[\"由clip视觉模型编码\",{\"1\":{\"23\":1}}],[\"由于缺乏沙箱\",{\"1\":{\"14\":1}}],[\"包含粘贴到destination中的source的新遮罩合成\",{\"1\":{\"125\":1}}],[\"包含将\",{\"1\":{\"56\":1}}],[\"包含unclip模型的额外视觉指导的条件化\",{\"1\":{\"33\":1}}],[\"包含gligen和空间指导的条件\",{\"1\":{\"32\":1}}],[\"包含嵌入文本的条件\",{\"1\":{\"25\":1}}],[\"包含t2i样式适配器和指向所需样式的视觉指导的条件\",{\"1\":{\"23\":1}}],[\"包含所需样式的图像\",{\"1\":{\"23\":1}}],[\"包括需要用到的节点\",{\"1\":{\"6\":1}}],[\"v2\",{\"1\":{\"146\":3}}],[\"v11\",{\"1\":{\"143\":1,\"146\":1}}],[\"vit\",{\"1\":{\"141\":2,\"143\":2,\"144\":5}}],[\"visual\",{\"1\":{\"85\":1,\"87\":1,\"91\":1,\"93\":1}}],[\"vision模型编码的图像\",{\"1\":{\"33\":1}}],[\"vision\",{\"0\":{\"82\":1},\"1\":{\"23\":3,\"26\":3,\"33\":1,\"82\":3,\"83\":1,\"84\":2,\"101\":1,\"103\":2,\"141\":1,\"143\":1,\"144\":1}}],[\"vase\",{\"1\":{\"149\":3}}],[\"value\",{\"1\":{\"74\":1,\"89\":2,\"128\":1}}],[\"values\",{\"1\":{\"73\":2,\"88\":2}}],[\"various\",{\"1\":{\"71\":1}}],[\"variety\",{\"1\":{\"71\":1,\"104\":1}}],[\"vae编码\",{\"1\":{\"40\":1,\"61\":1,\"67\":1}}],[\"vae解码\",{\"1\":{\"39\":1,\"59\":1}}],[\"vae\",{\"0\":{\"39\":1,\"40\":1,\"59\":1,\"61\":1,\"67\":1,\"97\":1},\"1\":{\"19\":1,\"20\":1,\"39\":2,\"40\":2,\"43\":1,\"59\":2,\"61\":2,\"67\":2,\"76\":1,\"78\":2,\"97\":5,\"98\":2,\"99\":2,\"100\":2,\"101\":1,\"103\":2}}],[\"一旦图片上传\",{\"1\":{\"119\":1}}],[\"一旦图像上传完成\",{\"1\":{\"42\":1}}],[\"一起使用时特别有用\",{\"1\":{\"24\":1}}],[\"一个正面和负面嵌入以及一个潜像\",{\"1\":{\"135\":1}}],[\"一个是主遮罩\",{\"1\":{\"126\":1}}],[\"一个应用特效的节点\",{\"1\":{\"122\":1}}],[\"一个潜图列表\",{\"1\":{\"64\":1}}],[\"一个新的条件化\",{\"1\":{\"30\":1}}],[\"一个新的条件\",{\"1\":{\"29\":1}}],[\"一个包含两个输入的新条件\",{\"1\":{\"28\":1}}],[\"一个包含control\",{\"1\":{\"22\":1}}],[\"一个站着的人\",{\"1\":{\"24\":1}}],[\"一个t2i样式适配器\",{\"1\":{\"23\":1}}],[\"一个条件\",{\"1\":{\"22\":1,\"23\":1,\"32\":1}}],[\"一名资深的产品经理\",{\"1\":{\"1\":1}}],[\"来指导扩散模型\",{\"1\":{\"22\":1}}],[\"适用于肖像\",{\"1\":{\"143\":1}}],[\"适用于任何模型\",{\"1\":{\"22\":1}}],[\"适合高级用户的自定义\",{\"0\":{\"14\":1}}],[\"和后端\",{\"1\":{\"161\":1}}],[\"和\",{\"1\":{\"22\":1,\"132\":2,\"149\":1}}],[\"所需的vram减少\",{\"1\":{\"37\":1}}],[\"所有的条件设定都以由clip使用clip\",{\"1\":{\"21\":1}}],[\"所以只记录一次\",{\"1\":{\"16\":1}}],[\"配置文件的名称\",{\"1\":{\"20\":1}}],[\"通常这会与您工作的图像尺寸相匹配\",{\"1\":{\"130\":1}}],[\"通常情况下\",{\"1\":{\"20\":1}}],[\"通道\",{\"1\":{\"122\":1}}],[\"通过在菜单中点击queue\",{\"1\":{\"166\":1}}],[\"通过一个复杂的概率扩散过程\",{\"1\":{\"163\":1}}],[\"通过连接一个模型\",{\"1\":{\"135\":1}}],[\"通过现有图片快速创建遮罩\",{\"1\":{\"122\":1}}],[\"通过使用以下语法将提示的指定部分括在括号中\",{\"1\":{\"149\":1}}],[\"通过使用反转遮罩节点\",{\"1\":{\"118\":1}}],[\"通过使用gpt\",{\"1\":{\"7\":1}}],[\"通过x和y输入来定位裁剪区域的左上角起始点\",{\"1\":{\"110\":1}}],[\"通过定义裁剪区域的尺寸和坐标\",{\"1\":{\"107\":1}}],[\"通过采样器节点对其进行添加噪声和去噪处理\",{\"1\":{\"55\":1}}],[\"通过不同条件化\",{\"1\":{\"28\":1}}],[\"通过这样做\",{\"1\":{\"24\":1}}],[\"通过这种跨界合作和跨文化交流\",{\"1\":{\"0\":1}}],[\"通过将多个节点链接在一起\",{\"1\":{\"22\":1}}],[\"通过命令行和脚本控制\",{\"1\":{\"17\":1}}],[\"通过开放和模块化的设计\",{\"1\":{\"7\":1}}],[\"通过熊叔的分享\",{\"1\":{\"1\":1}}],[\"通过内容的创作和分享\",{\"1\":{\"1\":1}}],[\"通过自媒体\",{\"1\":{\"1\":1}}],[\"通过加密功能\",{\"1\":{\"1\":1}}],[\"通过录屏渲染功能\",{\"1\":{\"1\":1}}],[\"通过组织创新活动\",{\"1\":{\"0\":1}}],[\"输出可能不准确且质量较低\",{\"1\":{\"137\":1}}],[\"输出的遮罩将是次遮罩粘贴到主遮罩上的结果\",{\"1\":{\"126\":1}}],[\"输出\",{\"0\":{\"109\":1,\"113\":1,\"117\":1,\"121\":1,\"125\":1,\"129\":1,\"134\":1,\"138\":1},\"1\":{\"19\":1,\"20\":1,\"22\":1,\"23\":1,\"24\":1,\"25\":1,\"26\":1,\"27\":1,\"28\":1,\"29\":1,\"30\":1,\"32\":1,\"33\":1,\"35\":1,\"36\":1,\"37\":1,\"39\":1,\"40\":1,\"42\":1,\"44\":1,\"45\":1,\"46\":1,\"47\":1,\"48\":1,\"49\":1,\"50\":1,\"51\":1,\"52\":1,\"53\":1,\"55\":1,\"56\":1,\"57\":1,\"58\":1,\"59\":1,\"61\":1,\"63\":1,\"64\":1,\"65\":1,\"66\":1,\"67\":1,\"68\":1,\"69\":1,\"70\":1,\"72\":1,\"105\":1}}],[\"输入preview\",{\"1\":{\"166\":1}}],[\"输入prompt\",{\"1\":{\"25\":1}}],[\"输入您期望的遮罩width和height\",{\"1\":{\"130\":1}}],[\"输入\",{\"0\":{\"108\":1,\"112\":1,\"116\":1,\"120\":1,\"124\":1,\"128\":1,\"133\":1,\"137\":1},\"1\":{\"19\":1,\"20\":1,\"22\":1,\"23\":1,\"24\":1,\"25\":1,\"26\":1,\"27\":1,\"28\":1,\"29\":1,\"30\":1,\"32\":1,\"33\":1,\"35\":1,\"36\":1,\"37\":1,\"39\":1,\"40\":1,\"42\":1,\"44\":1,\"45\":1,\"46\":1,\"47\":1,\"48\":1,\"49\":1,\"50\":1,\"51\":1,\"52\":1,\"53\":1,\"55\":1,\"56\":1,\"57\":1,\"58\":1,\"59\":1,\"61\":1,\"63\":1,\"64\":1,\"65\":1,\"66\":1,\"67\":1,\"68\":1,\"69\":1,\"70\":1,\"72\":1,\"105\":1}}],[\"扩散模型或作为样式模型输入的嵌入\",{\"1\":{\"26\":1}}],[\"扩散模型加载器\",{\"0\":{\"19\":1},\"1\":{\"19\":1}}],[\"扩散器模型的路径\",{\"1\":{\"19\":1}}],[\"扩展的唯一名称\",{\"1\":{\"16\":1}}],[\"扩展出很多相关的内容点\",{\"1\":{\"6\":1}}],[\"核心节点\",{\"0\":{\"18\":1}}],[\"运行您的第一个工作流\",{\"1\":{\"161\":1}}],[\"运行\",{\"1\":{\"17\":1}}],[\"运行生成\",{\"1\":{\"5\":1}}],[\"8\",{\"1\":{\"17\":1}}],[\"8188\",{\"1\":{\"17\":3,\"165\":1}}],[\"rbutton\",{\"1\":{\"160\":1}}],[\"r\",{\"1\":{\"158\":1,\"160\":1}}],[\"rotation\",{\"1\":{\"70\":2}}],[\"rotated\",{\"1\":{\"70\":2}}],[\"rotate\",{\"0\":{\"70\":1},\"1\":{\"70\":2}}],[\"radius\",{\"1\":{\"49\":2,\"51\":2}}],[\"ratio\",{\"1\":{\"37\":1,\"48\":1,\"52\":1}}],[\"right和bottom\",{\"1\":{\"114\":1}}],[\"right\",{\"1\":{\"45\":1,\"112\":1}}],[\"running\",{\"1\":{\"17\":1}}],[\"reroute\",{\"0\":{\"153\":1}}],[\"red|blue|yellow|green\",{\"1\":{\"151\":1}}],[\"reducing\",{\"1\":{\"50\":1}}],[\"return\",{\"1\":{\"137\":1}}],[\"repeat\",{\"0\":{\"65\":1},\"1\":{\"65\":1}}],[\"rebatch\",{\"0\":{\"64\":1},\"1\":{\"64\":1}}],[\"result\",{\"1\":{\"73\":1,\"79\":1,\"88\":1,\"100\":1}}],[\"resizing\",{\"1\":{\"52\":1}}],[\"resized\",{\"1\":{\"52\":1}}],[\"resize\",{\"1\":{\"52\":1}}],[\"rescaled\",{\"1\":{\"48\":1}}],[\"require\",{\"1\":{\"146\":1}}],[\"request\",{\"1\":{\"17\":3}}],[\"req\",{\"1\":{\"17\":2}}],[\"registerextension\",{\"1\":{\"16\":1}}],[\"registercustomnodes\",{\"1\":{\"16\":1}}],[\"register\",{\"1\":{\"16\":2}}],[\"recognition\",{\"1\":{\"9\":1}}],[\"real\",{\"1\":{\"9\":1}}],[\"服务器上\",{\"1\":{\"17\":1}}],[\"utilitynodes\",{\"0\":{\"152\":1}}],[\"utf\",{\"1\":{\"17\":1}}],[\"up\",{\"1\":{\"85\":1,\"149\":1}}],[\"upscaling\",{\"1\":{\"53\":1,\"96\":1}}],[\"upscaled\",{\"1\":{\"52\":1,\"53\":2}}],[\"upscale\",{\"0\":{\"52\":1,\"53\":1,\"58\":1,\"94\":1},\"1\":{\"52\":4,\"53\":4,\"58\":2,\"94\":4,\"95\":1,\"96\":2}}],[\"unified\",{\"1\":{\"146\":1}}],[\"unnorm\",{\"1\":{\"146\":1}}],[\"unlikely\",{\"1\":{\"79\":1}}],[\"unclip扩散模型应受图像指导的强度\",{\"1\":{\"33\":1}}],[\"unclip条件化\",{\"1\":{\"33\":1}}],[\"unclip\",{\"0\":{\"101\":1},\"1\":{\"21\":1,\"26\":1,\"33\":1,\"101\":4}}],[\"useful\",{\"1\":{\"97\":1}}],[\"use\",{\"1\":{\"50\":1,\"73\":1,\"88\":1,\"97\":1,\"100\":2,\"146\":1}}],[\"used\",{\"1\":{\"48\":1,\"49\":1,\"50\":1,\"51\":1,\"52\":2,\"53\":2,\"70\":1,\"71\":2,\"72\":3,\"73\":2,\"76\":2,\"78\":3,\"79\":2,\"81\":1,\"82\":3,\"84\":1,\"85\":4,\"87\":1,\"88\":2,\"91\":2,\"93\":1,\"94\":2,\"96\":1,\"97\":2,\"99\":1,\"101\":3,\"103\":4}}],[\"using\",{\"0\":{\"53\":1},\"1\":{\"43\":1,\"52\":2,\"53\":2,\"79\":2}}],[\"usage\",{\"1\":{\"31\":1,\"33\":1}}],[\"urlopen\",{\"1\":{\"17\":1}}],[\"url\",{\"1\":{\"17\":2}}],[\"ui\",{\"1\":{\"15\":1,\"17\":1}}],[\"ui成为了一个优秀的ai原型工具\",{\"1\":{\"1\":1}}],[\"ui生态中的一个多功能节点\",{\"1\":{\"1\":1}}],[\"ui生态来设计开源项目\",{\"1\":{\"1\":1}}],[\"ui的自由度和上限\",{\"1\":{\"1\":1}}],[\"参考资料\",{\"0\":{\"169\":1}}],[\"参考\",{\"1\":{\"17\":1}}],[\"脚本\",{\"1\":{\"17\":1}}],[\"可能会有不同的视觉效果\",{\"1\":{\"126\":1}}],[\"可能尚未完全完善\",{\"1\":{\"34\":1}}],[\"可能需要一些试错才能找到最佳设置\",{\"1\":{\"24\":1}}],[\"可能有所不同\",{\"1\":{\"17\":1}}],[\"可用于执行文本到图像和图像到图像的生成任务\",{\"1\":{\"135\":1}}],[\"可用于根据提供的配置文件加载扩散模型\",{\"1\":{\"20\":1}}],[\"可用于加载扩散模型\",{\"1\":{\"19\":1}}],[\"可以访问comfyui\",{\"1\":{\"167\":1}}],[\"可以在节点选项菜单下的\",{\"1\":{\"158\":1}}],[\"可以让\",{\"1\":{\"151\":1}}],[\"可以提高或降低提示部分的重要性\",{\"1\":{\"149\":1}}],[\"可以被应用到其他节点\",{\"1\":{\"130\":1}}],[\"可以被进一步用在图像融合或其他视觉效果中\",{\"1\":{\"114\":1}}],[\"可以使用以下语法\",{\"1\":{\"157\":1}}],[\"可以使用grow\",{\"1\":{\"67\":1}}],[\"可以使用多个\",{\"1\":{\"22\":1}}],[\"可以将特殊格式的字符串传递给带有file\",{\"1\":{\"47\":1}}],[\"可以将它们拖放到主\",{\"1\":{\"17\":1}}],[\"可以链接多个节点以提供多个图像作为指导\",{\"1\":{\"33\":1}}],[\"可以更好地控制最终图像的组合\",{\"1\":{\"30\":1}}],[\"可以对最终图像的组合进行更多的控制\",{\"1\":{\"29\":1}}],[\"可以通过鼠标滚动来缩放\",{\"1\":{\"166\":1}}],[\"可以通过使用以下语法在提示中引用文本反转\",{\"1\":{\"150\":1}}],[\"可以通过add\",{\"1\":{\"136\":1}}],[\"可以通过该颜色或亮度区分进行遮罩\",{\"1\":{\"122\":1}}],[\"可以通过vae\",{\"1\":{\"45\":1}}],[\"可以通过启动文件对话框或将图像拖放到节点上来上传图像\",{\"1\":{\"42\":1}}],[\"可以通过比率设置来控制此权衡\",{\"1\":{\"37\":1}}],[\"可以通过向此节点提供包含边缘检测的图像以及在边缘检测图像上训练的controlnet来提示扩散模型\",{\"1\":{\"22\":1}}],[\"可以通过简单的配置\",{\"1\":{\"12\":1}}],[\"可以用于为扩散模型提供进一步的视觉指导\",{\"1\":{\"22\":1}}],[\"可以把开发的时间极限压缩\",{\"1\":{\"7\":1}}],[\"可以激发更多的创意和创新\",{\"1\":{\"0\":1}}],[\"值得注意的是\",{\"1\":{\"17\":1,\"24\":1}}],[\"ku\",{\"1\":{\"170\":1}}],[\"ksampler\",{\"0\":{\"132\":1,\"136\":1},\"1\":{\"100\":1,\"118\":1,\"132\":1,\"135\":2,\"136\":2,\"137\":1}}],[\"ksamplerclass\",{\"1\":{\"17\":1}}],[\"kind\",{\"1\":{\"91\":1}}],[\"kernel\",{\"1\":{\"49\":1,\"51\":3}}],[\"keys\",{\"1\":{\"16\":1}}],[\"黄色\",{\"1\":{\"17\":1}}],[\"都以数字开头\",{\"1\":{\"17\":1}}],[\"都是比较优秀的一个模型\",{\"1\":{\"6\":1}}],[\"用来指导扩散模型生成特定的图像\",{\"1\":{\"25\":1}}],[\"用作扩散模型的视觉指导\",{\"1\":{\"22\":1}}],[\"用于创建噪声的随机种子\",{\"1\":{\"133\":1,\"137\":1}}],[\"用于去噪的模型\",{\"1\":{\"133\":1,\"137\":1}}],[\"用于去噪潜变量的模型\",{\"1\":{\"19\":1,\"20\":1}}],[\"用于修复图像\",{\"1\":{\"67\":1}}],[\"用于解码潜像图的vae\",{\"1\":{\"59\":1}}],[\"用于解码潜在图像的vae\",{\"1\":{\"39\":1}}],[\"用于调整大小的方法\",{\"1\":{\"58\":1}}],[\"用于将unclip扩散模型引导到原始clip视觉嵌入的随机位置\",{\"1\":{\"33\":1}}],[\"用于将图像编码和解码到潜空间的vae模型\",{\"1\":{\"19\":1,\"20\":1}}],[\"用于编码像素图像的vae\",{\"1\":{\"40\":1,\"61\":1,\"67\":1}}],[\"用于编码图像的clip视觉模型\",{\"1\":{\"26\":1}}],[\"用于编码文本的clip模型\",{\"1\":{\"24\":1,\"25\":1}}],[\"用于编码文本提示的clip模型\",{\"1\":{\"19\":1,\"20\":1}}],[\"用于指导扩散模型\",{\"1\":{\"25\":1}}],[\"用彩色表示\",{\"1\":{\"17\":1}}],[\"用户可以实时地让ai帮助渲染图像\",{\"1\":{\"1\":1}}],[\"您应该已经在浏览器标签中启动并运行了\",{\"1\":{\"166\":1}}],[\"您应该会看到类似于下面的内容\",{\"1\":{\"17\":1}}],[\"您将用它来生成图像\",{\"1\":{\"164\":1}}],[\"您将看到它的节点\",{\"1\":{\"17\":1}}],[\"您要做的第一件事就是获取一个模型checkpoints\",{\"1\":{\"164\":1}}],[\"您的特效或处理将只应用于基于所选图片通道生成的遮罩的区域\",{\"1\":{\"122\":1}}],[\"您能轻松地在不同的图像编辑阶段切换受影响的区域\",{\"1\":{\"118\":1}}],[\"您必须使用加载图像节点加载图像\",{\"1\":{\"43\":1}}],[\"您可能希望在某个层级停止\",{\"1\":{\"24\":1}}],[\"您可能对文本模型能够生成的子类别或具体类型的牛不感兴趣\",{\"1\":{\"24\":1}}],[\"您可以拖动画布\",{\"1\":{\"166\":1}}],[\"您可以在civitai\",{\"1\":{\"164\":1}}],[\"您可以在此处修改小部件\",{\"1\":{\"16\":1}}],[\"您可以使用它们来加快工作流程\",{\"1\":{\"160\":1}}],[\"您可以向带有\",{\"1\":{\"156\":1}}],[\"您可以控制生成的文本描述的具体程度或准确性\",{\"1\":{\"24\":1}}],[\"您可以看到每个部分\",{\"1\":{\"17\":1}}],[\"现在\",{\"1\":{\"118\":1,\"122\":1}}],[\"现在在您选择的文本编辑器中打开此文件\",{\"1\":{\"17\":1}}],[\"现在只需要1\",{\"1\":{\"1\":1}}],[\"拖放到\",{\"1\":{\"17\":1}}],[\"拖动\",{\"1\":{\"16\":1}}],[\"格式为\",{\"1\":{\"159\":1}}],[\"格式显示\",{\"1\":{\"17\":1}}],[\"格式\",{\"1\":{\"17\":1}}],[\"中文一般称为稳定扩散\",{\"1\":{\"163\":1}}],[\"中文社区\",{\"1\":{\"9\":1,\"168\":1}}],[\"中指定一个特定的名称\",{\"1\":{\"158\":1}}],[\"中\",{\"1\":{\"149\":1,\"167\":1}}],[\"中的新潜在图像组合\",{\"1\":{\"56\":1}}],[\"中设置的强度因子\",{\"1\":{\"27\":1}}],[\"中不会加载工作流程\",{\"1\":{\"17\":1}}],[\"中并加载工作流程\",{\"1\":{\"17\":1}}],[\"文本反转是定制的\",{\"1\":{\"150\":1}}],[\"文本提示\",{\"0\":{\"25\":1,\"148\":1},\"1\":{\"25\":1}}],[\"文件名的前缀\",{\"1\":{\"36\":1}}],[\"文件\",{\"1\":{\"17\":1,\"167\":1}}],[\"文章还分享了\",{\"1\":{\"7\":1}}],[\"菜单面板中应出现一个新按钮\",{\"1\":{\"17\":1}}],[\"mm\",{\"1\":{\"159\":2}}],[\"m\",{\"1\":{\"159\":2}}],[\"might\",{\"1\":{\"100\":1}}],[\"mixnode的存在\",{\"1\":{\"1\":1}}],[\"mixnode是comfy\",{\"1\":{\"1\":1}}],[\"mixlab\",{\"0\":{\"8\":1},\"1\":{\"1\":2,\"2\":1,\"5\":2,\"7\":2,\"10\":1,\"15\":1,\"168\":1}}],[\"mix\",{\"1\":{\"1\":1}}],[\"md\",{\"1\":{\"79\":1}}],[\"multiple\",{\"1\":{\"73\":1,\"88\":1}}],[\"method\",{\"1\":{\"52\":2,\"58\":1,\"69\":1}}],[\"merging\",{\"1\":{\"37\":1}}],[\"most\",{\"1\":{\"146\":1}}],[\"modified\",{\"1\":{\"75\":1,\"90\":2}}],[\"modify\",{\"1\":{\"73\":2,\"74\":1,\"85\":1,\"88\":2,\"89\":2}}],[\"models\",{\"1\":{\"71\":1,\"72\":1,\"76\":1,\"79\":2,\"82\":2,\"85\":2,\"88\":1,\"91\":2,\"94\":1,\"97\":1,\"101\":4,\"141\":1,\"142\":1,\"146\":3,\"164\":1}}],[\"model节点可以用于对扩散模型应用tome优化\",{\"1\":{\"37\":1}}],[\"model节点是一个用于为扩散模型提供视觉指导的节点\",{\"1\":{\"23\":1}}],[\"model节点\",{\"1\":{\"22\":1}}],[\"model\",{\"0\":{\"37\":1,\"53\":1,\"85\":1,\"91\":1,\"94\":1},\"1\":{\"19\":2,\"20\":1,\"21\":1,\"23\":1,\"32\":1,\"37\":2,\"52\":1,\"53\":5,\"72\":4,\"73\":3,\"74\":3,\"75\":2,\"76\":2,\"77\":1,\"78\":4,\"79\":4,\"80\":1,\"81\":1,\"82\":1,\"83\":1,\"84\":1,\"85\":7,\"86\":1,\"87\":2,\"88\":2,\"89\":6,\"90\":3,\"91\":3,\"92\":2,\"93\":3,\"94\":2,\"95\":2,\"96\":2,\"97\":4,\"99\":1,\"101\":1,\"102\":1,\"103\":5,\"132\":1,\"133\":1,\"137\":1,\"140\":1,\"146\":1}}],[\"mode\",{\"1\":{\"17\":2,\"48\":1}}],[\"more\",{\"1\":{\"49\":1,\"50\":1,\"51\":1}}],[\"mac\",{\"1\":{\"162\":1}}],[\"manually\",{\"1\":{\"146\":1}}],[\"manipulate\",{\"1\":{\"104\":1}}],[\"made\",{\"1\":{\"101\":1}}],[\"make\",{\"1\":{\"50\":1}}],[\"maintain\",{\"1\":{\"48\":1,\"52\":1}}],[\"match\",{\"1\":{\"48\":1}}],[\"masks\",{\"1\":{\"104\":2}}],[\"mask节点可用于为修复图像的潜像图添加掩码\",{\"1\":{\"66\":1}}],[\"masked节点可用于将一个潜在图像遮罩复合体粘贴到另一个潜在图像\",{\"1\":{\"57\":1}}],[\"masked\",{\"0\":{\"57\":1}}],[\"mask\",{\"0\":{\"30\":1,\"66\":1,\"104\":1,\"127\":1},\"1\":{\"21\":1,\"30\":2,\"42\":1,\"43\":1,\"45\":1,\"57\":1,\"66\":1,\"67\":3,\"105\":1,\"108\":1,\"109\":1,\"112\":1,\"113\":1,\"116\":1,\"117\":1,\"121\":1,\"125\":1,\"129\":1}}],[\"原本被保护的区域将接受处理\",{\"1\":{\"118\":1}}],[\"原本需要一个月完成的需求\",{\"1\":{\"1\":1}}],[\"原始节点可以用于\",{\"1\":{\"154\":1}}],[\"原始节点不会以\",{\"1\":{\"17\":1}}],[\"原始\",{\"0\":{\"154\":1}}],[\"原始图像的部分内容得以保留\",{\"1\":{\"135\":1}}],[\"原始图像边界的羽化程度\",{\"1\":{\"45\":1}}],[\"原文代码仓库\",{\"1\":{\"17\":1}}],[\"模式的一个简单指南\",{\"0\":{\"17\":1}}],[\"模型需要\",{\"1\":{\"145\":1}}],[\"模型的地址\",{\"1\":{\"140\":1}}],[\"模型的嵌入\",{\"1\":{\"23\":1}}],[\"模型和来自\",{\"1\":{\"23\":1}}],[\"模型下载\",{\"1\":{\"9\":1,\"140\":1}}],[\"模型\",{\"0\":{\"142\":1,\"145\":1},\"1\":{\"6\":1,\"144\":1}}],[\"每个描述都具有不同的特定程度\",{\"1\":{\"24\":1}}],[\"每个层级比前一个层级更具体\",{\"1\":{\"24\":1}}],[\"每个节点都有自己的一个生命周期管理\",{\"1\":{\"15\":1}}],[\"每次构建节点时触发\",{\"1\":{\"16\":1}}],[\"时\",{\"1\":{\"16\":1}}],[\"或将其拖放到\",{\"1\":{\"167\":1}}],[\"或者是\",{\"1\":{\"167\":1}}],[\"或者按住空格键并移动鼠标\",{\"1\":{\"166\":1}}],[\"或者\",{\"1\":{\"162\":1}}],[\"或者多个节点可能共享相同的名称\",{\"1\":{\"158\":1}}],[\"或者直接用来控制图像的哪些部分应该被采样器处理或保留\",{\"1\":{\"130\":1}}],[\"或者直接拖拽到节点上\",{\"1\":{\"119\":1}}],[\"或者将焦点集中在遮罩的特定区域\",{\"1\":{\"110\":1}}],[\"或者用于对图像进行高分辨率处理\",{\"1\":{\"41\":1}}],[\"或者通过apply\",{\"1\":{\"21\":1}}],[\"或gligen\",{\"1\":{\"21\":1}}],[\"或\",{\"1\":{\"16\":1,\"22\":1,\"24\":1,\"159\":6,\"164\":1,\"166\":1}}],[\"当此设置超过steps时\",{\"1\":{\"137\":1}}],[\"当设置了噪声掩码时\",{\"1\":{\"66\":1}}],[\"当这导致多个批次时\",{\"1\":{\"64\":1}}],[\"当常规vae编码节点由于vram不足而失败时\",{\"1\":{\"40\":1}}],[\"当因为vram不足而导致常规vae解码节点失败时\",{\"1\":{\"39\":1}}],[\"当混合多个重叠的条件时使用的区域权重\",{\"1\":{\"29\":1}}],[\"当使用最后一层的输出时可能效果不佳\",{\"1\":{\"24\":1}}],[\"当加载\",{\"1\":{\"16\":1}}],[\"当切换成\",{\"1\":{\"6\":1}}],[\"bin\",{\"1\":{\"143\":1,\"146\":7}}],[\"bigg\",{\"1\":{\"141\":1,\"143\":1,\"144\":1}}],[\"b160k\",{\"1\":{\"141\":1}}],[\"b79k\",{\"1\":{\"141\":1}}],[\"but\",{\"1\":{\"101\":1}}],[\"by\",{\"1\":{\"67\":1,\"72\":1}}],[\"by来增加掩码区域的大小\",{\"1\":{\"67\":1}}],[\"bat\",{\"1\":{\"165\":1}}],[\"batch节点可用于重复一批潜像图\",{\"1\":{\"65\":1}}],[\"batch\",{\"0\":{\"63\":1,\"65\":1},\"1\":{\"55\":1,\"63\":2,\"64\":1}}],[\"backspace\",{\"1\":{\"160\":1}}],[\"basic\",{\"1\":{\"17\":2}}],[\"blue\",{\"1\":{\"149\":3}}],[\"blurred\",{\"1\":{\"49\":2}}],[\"blur\",{\"0\":{\"49\":1},\"1\":{\"49\":2}}],[\"blended\",{\"1\":{\"48\":1}}],[\"blender\",{\"1\":{\"4\":1}}],[\"blend\",{\"0\":{\"48\":1},\"1\":{\"48\":5,\"49\":1}}],[\"below\",{\"1\":{\"100\":1}}],[\"better\",{\"1\":{\"73\":1,\"88\":1}}],[\"be\",{\"1\":{\"48\":1,\"49\":2,\"50\":2,\"51\":2,\"52\":2,\"53\":2,\"70\":2,\"71\":2,\"72\":1,\"73\":2,\"74\":1,\"76\":1,\"79\":1,\"82\":1,\"85\":5,\"88\":2,\"89\":2,\"91\":3,\"94\":1,\"97\":2,\"101\":2,\"146\":4}}],[\"before\",{\"1\":{\"16\":1}}],[\"beforeregisternodedef\",{\"1\":{\"16\":2}}],[\"bottom\",{\"1\":{\"45\":1,\"112\":1}}],[\"请在浏览器里访问\",{\"1\":{\"165\":1}}],[\"请参考\",{\"1\":{\"162\":1}}],[\"请参见samplers页面\",{\"1\":{\"133\":3,\"137\":3}}],[\"请参阅此页面\",{\"1\":{\"25\":1,\"47\":1}}],[\"请参阅\",{\"1\":{\"16\":1}}],[\"请使用preview\",{\"1\":{\"47\":1}}],[\"请改用apply\",{\"1\":{\"22\":1}}],[\"请注意\",{\"1\":{\"20\":1,\"28\":1}}],[\"请扫描下方二维码\",{\"1\":{\"1\":1}}],[\"返回自定义小部件类型\",{\"1\":{\"16\":1}}],[\"own\",{\"1\":{\"146\":1}}],[\"otherwise\",{\"1\":{\"146\":1}}],[\"original\",{\"1\":{\"52\":1}}],[\"or\",{\"1\":{\"50\":1,\"52\":1,\"73\":2,\"85\":1,\"87\":1,\"88\":2,\"104\":1}}],[\"operation\",{\"1\":{\"124\":1}}],[\"opacity\",{\"1\":{\"48\":1}}],[\"options\",{\"1\":{\"17\":1}}],[\"outpainting节点的pad\",{\"1\":{\"45\":1}}],[\"outpainting\",{\"0\":{\"45\":1}}],[\"outputs\",{\"0\":{\"75\":1,\"78\":1,\"81\":1,\"84\":1,\"87\":1,\"90\":1,\"93\":1,\"96\":1,\"99\":1,\"103\":1}}],[\"output\",{\"1\":{\"23\":1,\"26\":1,\"33\":1}}],[\"one\",{\"1\":{\"73\":1,\"79\":1,\"88\":1,\"100\":1}}],[\"once\",{\"1\":{\"16\":1}}],[\"only\",{\"1\":{\"16\":1,\"91\":1,\"101\":1}}],[\"on\",{\"1\":{\"16\":1,\"17\":1,\"49\":1,\"51\":1,\"101\":2,\"146\":1}}],[\"object\",{\"1\":{\"16\":1}}],[\"off\",{\"1\":{\"6\":1}}],[\"of\",{\"1\":{\"0\":1,\"48\":3,\"49\":2,\"50\":2,\"51\":3,\"52\":1,\"70\":1,\"71\":3,\"72\":3,\"74\":1,\"77\":1,\"80\":1,\"83\":1,\"86\":1,\"89\":1,\"91\":1,\"92\":1,\"95\":1,\"98\":1,\"100\":1,\"102\":1,\"104\":1}}],[\"添加随机选择\",{\"0\":{\"151\":1}}],[\"添加处理程序等\",{\"1\":{\"16\":1}}],[\"添加自定义节点定义\",{\"1\":{\"16\":1}}],[\"添加提示词列对\",{\"1\":{\"6\":1}}],[\"页面加载后立即运行的任何初始设置\",{\"1\":{\"16\":1}}],[\"lbutton\",{\"1\":{\"160\":1}}],[\"linux\",{\"1\":{\"162\":1}}],[\"light\",{\"1\":{\"143\":2}}],[\"list\",{\"1\":{\"71\":1}}],[\"leave\",{\"1\":{\"104\":1}}],[\"length\",{\"1\":{\"63\":1}}],[\"leftover\",{\"1\":{\"136\":1,\"137\":1}}],[\"left\",{\"1\":{\"45\":1,\"112\":1}}],[\"laion2b\",{\"1\":{\"141\":2}}],[\"laplacian\",{\"1\":{\"51\":1}}],[\"latents节点可以用于拆分或合并批量的潜在空间图像\",{\"1\":{\"64\":1}}],[\"latents\",{\"0\":{\"64\":1},\"1\":{\"70\":1,\"73\":1,\"76\":1,\"78\":1,\"88\":1,\"101\":1,\"103\":1}}],[\"latent节点再次加载\",{\"1\":{\"36\":1}}],[\"latent节点可以用于保存潜变量以备将来使用\",{\"1\":{\"36\":1}}],[\"latent节点可用于加载使用保存潜在节点保存的潜在图像\",{\"1\":{\"35\":1}}],[\"latent\",{\"0\":{\"35\":1,\"36\":1,\"54\":1,\"55\":1,\"56\":1,\"57\":1,\"58\":1,\"63\":1,\"65\":1,\"66\":1,\"68\":1,\"69\":1,\"70\":1},\"1\":{\"35\":2,\"40\":1,\"52\":1,\"55\":2,\"56\":2,\"57\":2,\"58\":2,\"61\":1,\"63\":2,\"64\":1,\"65\":2,\"66\":2,\"67\":1,\"68\":2,\"69\":2,\"70\":4,\"78\":1,\"91\":1,\"97\":1,\"99\":1,\"100\":1,\"103\":1,\"133\":1,\"134\":1,\"137\":1,\"138\":1,\"157\":2}}],[\"layer\",{\"1\":{\"24\":4}}],[\"layer的原理\",{\"1\":{\"24\":1}}],[\"layer节点可以用于设置从中获取文本嵌入的clip输出层\",{\"1\":{\"24\":1}}],[\"last\",{\"1\":{\"24\":6}}],[\"lora\",{\"0\":{\"88\":1},\"1\":{\"88\":3,\"89\":2,\"146\":8}}],[\"loras\",{\"1\":{\"73\":1,\"88\":2,\"146\":1}}],[\"look\",{\"1\":{\"50\":1}}],[\"loads\",{\"1\":{\"79\":1}}],[\"loadcheckpoint\",{\"1\":{\"79\":1}}],[\"loader\",{\"0\":{\"72\":1,\"73\":1,\"101\":1},\"1\":{\"72\":1,\"73\":1,\"101\":1,\"146\":1}}],[\"loaders\",{\"0\":{\"71\":1},\"1\":{\"71\":2}}],[\"loader节点\",{\"1\":{\"19\":1}}],[\"loaded\",{\"1\":{\"16\":1,\"53\":1,\"100\":1,\"146\":1}}],[\"loadedgraphnode\",{\"1\":{\"16\":2}}],[\"load\",{\"0\":{\"35\":1,\"42\":1,\"76\":1,\"79\":1,\"82\":1,\"85\":1,\"88\":1,\"91\":1,\"94\":1,\"97\":1},\"1\":{\"16\":1,\"20\":1,\"35\":1,\"42\":1,\"53\":1,\"71\":1,\"72\":1,\"73\":1,\"76\":2,\"79\":3,\"82\":2,\"85\":3,\"88\":2,\"91\":2,\"94\":2,\"97\":3,\"100\":1,\"101\":2,\"104\":1,\"146\":1}}],[\"logging\",{\"1\":{\"16\":8}}],[\"loggingextension\",{\"1\":{\"16\":1}}],[\"log\",{\"1\":{\"16\":9}}],[\"lcm\",{\"1\":{\"4\":1}}],[\"=\",{\"1\":{\"16\":1,\"17\":3,\"136\":1}}],[\"embedding\",{\"1\":{\"150\":1}}],[\"empty\",{\"0\":{\"55\":1},\"1\":{\"55\":1,\"157\":2}}],[\"edges\",{\"1\":{\"85\":1}}],[\"e\",{\"1\":{\"85\":2}}],[\"effects\",{\"1\":{\"73\":1,\"88\":1}}],[\"even\",{\"1\":{\"73\":1,\"88\":1,\"101\":1}}],[\"every\",{\"1\":{\"16\":1}}],[\"end\",{\"1\":{\"137\":1}}],[\"encoding\",{\"1\":{\"78\":2,\"81\":1,\"84\":1,\"97\":1,\"99\":1,\"103\":3}}],[\"encoderip\",{\"1\":{\"143\":1,\"144\":1}}],[\"encode节点可以使用clip视觉模型对图像进行编码\",{\"1\":{\"26\":1}}],[\"encode节点嵌入的文本提示开始\",{\"1\":{\"21\":1}}],[\"encode\",{\"0\":{\"40\":1,\"61\":1,\"67\":1},\"1\":{\"17\":1,\"40\":1,\"43\":1,\"45\":1,\"61\":1,\"67\":1,\"72\":1,\"79\":1,\"82\":2,\"100\":1}}],[\"enable\",{\"1\":{\"17\":1}}],[\"each\",{\"1\":{\"16\":1,\"146\":1}}],[\"experimental\",{\"0\":{\"34\":1}}],[\"example\",{\"0\":{\"31\":1,\"33\":1,\"60\":1,\"100\":1},\"1\":{\"16\":1,\"31\":1,\"33\":1,\"43\":1,\"60\":1,\"100\":1}}],[\"extension\",{\"1\":{\"16\":2}}],[\"ext\",{\"1\":{\"16\":5}}],[\"era\",{\"1\":{\"0\":1}}],[\"flower\",{\"1\":{\"149\":2}}],[\"flowers\",{\"1\":{\"149\":3}}],[\"flip\",{\"0\":{\"69\":1},\"1\":{\"69\":2}}],[\"faceid\",{\"0\":{\"145\":1},\"1\":{\"145\":1,\"146\":16}}],[\"face\",{\"1\":{\"143\":2,\"144\":1}}],[\"factor\",{\"1\":{\"48\":1}}],[\"follow\",{\"1\":{\"146\":1}}],[\"found\",{\"1\":{\"71\":1,\"146\":1,\"171\":1}}],[\"format\",{\"1\":{\"17\":2,\"159\":1}}],[\"for\",{\"0\":{\"38\":1,\"45\":1,\"67\":1},\"1\":{\"16\":1,\"45\":1,\"52\":1,\"53\":1,\"67\":1,\"78\":3,\"81\":1,\"84\":1,\"87\":1,\"93\":1,\"96\":1,\"99\":1,\"103\":4,\"158\":1}}],[\"further\",{\"1\":{\"73\":1,\"88\":1}}],[\"full\",{\"1\":{\"71\":1,\"143\":2}}],[\"function\",{\"1\":{\"17\":1}}],[\"feather\",{\"1\":{\"56\":1}}],[\"feathering\",{\"1\":{\"45\":1}}],[\"final\",{\"1\":{\"85\":1}}],[\"filter\",{\"1\":{\"51\":1}}],[\"filename\",{\"1\":{\"36\":1,\"47\":1}}],[\"file\",{\"1\":{\"5\":1,\"156\":1}}],[\"first\",{\"1\":{\"48\":1}}],[\"fires\",{\"1\":{\"16\":1}}],[\"from\",{\"0\":{\"63\":1},\"1\":{\"16\":1,\"27\":2,\"56\":2,\"63\":1,\"78\":1,\"85\":1,\"97\":1,\"99\":1,\"103\":1}}],[\"前端界面是由\",{\"1\":{\"15\":1}}],[\"json\",{\"1\":{\"16\":1,\"17\":5,\"167\":1}}],[\"js\",{\"0\":{\"16\":1},\"1\":{\"16\":1}}],[\"javascript\",{\"1\":{\"15\":2}}],[\"just\",{\"1\":{\"1\":1,\"7\":2}}],[\"安全机制\",{\"1\":{\"14\":1}}],[\"安装方式\",{\"1\":{\"162\":1}}],[\"安装\",{\"0\":{\"162\":1}}],[\"安装及使用方法\",{\"1\":{\"10\":1}}],[\"安装指南\",{\"1\":{\"9\":1}}],[\"代码示例\",{\"0\":{\"16\":1}}],[\"代码\",{\"1\":{\"14\":1}}],[\"portrait\",{\"1\":{\"146\":3}}],[\"positive\",{\"1\":{\"132\":1,\"133\":1,\"137\":1}}],[\"posed\",{\"1\":{\"85\":1}}],[\"postprocessing\",{\"0\":{\"48\":1}}],[\"plusv2\",{\"1\":{\"146\":4}}],[\"plus\",{\"0\":{\"140\":1},\"1\":{\"139\":1,\"143\":4,\"144\":4,\"146\":3}}],[\"pixel\",{\"1\":{\"48\":3,\"49\":3,\"50\":2,\"51\":3,\"52\":2,\"53\":2}}],[\"pixels\",{\"1\":{\"40\":1,\"52\":2,\"61\":1,\"67\":1}}],[\"paired\",{\"1\":{\"146\":1}}],[\"partially\",{\"1\":{\"85\":1}}],[\"parts\",{\"1\":{\"72\":2}}],[\"pad\",{\"0\":{\"45\":1}}],[\"patch\",{\"0\":{\"37\":1},\"1\":{\"37\":1}}],[\"paths\",{\"1\":{\"140\":1}}],[\"path\",{\"1\":{\"19\":1}}],[\"primitive\",{\"0\":{\"154\":1}}],[\"preview\",{\"0\":{\"46\":1}}],[\"prefix小部件的输出节点\",{\"1\":{\"47\":1}}],[\"prefix\",{\"1\":{\"36\":1,\"47\":1,\"156\":1}}],[\"properties>node\",{\"1\":{\"158\":1}}],[\"providing\",{\"1\":{\"87\":1,\"93\":1}}],[\"provided\",{\"1\":{\"101\":2}}],[\"provides\",{\"1\":{\"85\":1,\"97\":1}}],[\"provide\",{\"1\":{\"16\":1,\"43\":1,\"76\":1,\"91\":1,\"101\":1,\"104\":2}}],[\"process\",{\"1\":{\"79\":1,\"85\":1}}],[\"prompt或在键盘上按command+enter\",{\"1\":{\"166\":1}}],[\"prompts\",{\"1\":{\"78\":1,\"79\":1,\"81\":1,\"82\":1,\"84\":1,\"103\":2}}],[\"prompt\",{\"1\":{\"9\":1,\"17\":8,\"72\":2,\"101\":1,\"149\":2}}],[\"p\",{\"1\":{\"17\":2}}],[\"py\",{\"1\":{\"17\":2}}],[\"python3\",{\"1\":{\"17\":1}}],[\"python\",{\"1\":{\"14\":1,\"15\":1,\"17\":1}}],[\"png\",{\"1\":{\"16\":1,\"167\":1}}],[\"任务墙\",{\"0\":{\"13\":1}}],[\"把\",{\"1\":{\"12\":1}}],[\"集成\",{\"1\":{\"10\":1}}],[\"语音识别与合成\",{\"1\":{\"10\":1}}],[\"work\",{\"1\":{\"101\":1}}],[\"workflows\",{\"1\":{\"71\":1}}],[\"workflow\",{\"0\":{\"12\":1},\"1\":{\"5\":1,\"9\":1,\"10\":1,\"12\":1,\"17\":6,\"31\":1,\"33\":1}}],[\"what\",{\"1\":{\"91\":1,\"104\":2}}],[\"where\",{\"1\":{\"85\":1}}],[\"which\",{\"1\":{\"73\":1,\"79\":1,\"88\":1}}],[\"was\",{\"1\":{\"79\":1}}],[\"warning\",{\"1\":{\"79\":1,\"101\":1}}],[\"ways\",{\"1\":{\"104\":1}}],[\"way\",{\"1\":{\"73\":1,\"85\":1,\"88\":1,\"104\":1}}],[\"weight\",{\"1\":{\"149\":1}}],[\"we\",{\"1\":{\"100\":1}}],[\"wether\",{\"1\":{\"50\":1,\"52\":1}}],[\"web\",{\"1\":{\"10\":1,\"12\":1}}],[\"window\",{\"1\":{\"162\":1}}],[\"wish\",{\"1\":{\"100\":1}}],[\"will\",{\"1\":{\"76\":1,\"101\":1,\"146\":1}}],[\"widget\",{\"1\":{\"157\":1}}],[\"widgets\",{\"1\":{\"16\":1}}],[\"width=450\",{\"1\":{\"47\":1}}],[\"width\",{\"1\":{\"29\":1,\"32\":1,\"52\":2,\"55\":1,\"58\":1,\"68\":1,\"108\":1,\"128\":1,\"157\":1}}],[\"with\",{\"1\":{\"20\":1,\"31\":1,\"33\":1,\"53\":1,\"79\":1,\"100\":1,\"101\":2,\"136\":1,\"137\":1,\"146\":1}}],[\"转变为一个\",{\"1\":{\"10\":1,\"12\":1}}],[\"将自动解析工作流的详细信息并加载所有相关节点及其设置\",{\"1\":{\"167\":1}}],[\"将点击的节点添加到选择\",{\"1\":{\"160\":2}}],[\"将当前图形作为第一个排入生成队列\",{\"1\":{\"160\":1}}],[\"将当前图形排入生成队列\",{\"1\":{\"160\":1}}],[\"将被去噪的潜像\",{\"1\":{\"133\":1,\"137\":1}}],[\"将被限制在区域内的条件\",{\"1\":{\"29\":1}}],[\"将要粘贴的遮罩连接到source输入\",{\"1\":{\"126\":1}}],[\"将要被粘贴的遮罩\",{\"1\":{\"124\":1}}],[\"将主遮罩连接到destination输入\",{\"1\":{\"126\":1}}],[\"将此节点的输出连接到下一个处理节点的遮罩输入\",{\"1\":{\"122\":1}}],[\"将遮罩连接到\",{\"1\":{\"118\":1}}],[\"将原本的掩盖区域转换为非掩盖区域\",{\"1\":{\"115\":1}}],[\"将您想要填充的值输入到value中\",{\"1\":{\"130\":1}}],[\"将您想要羽化的遮罩连接到mask输入\",{\"1\":{\"114\":1}}],[\"将您的节点添加到其中\",{\"1\":{\"16\":1}}],[\"将你想要裁剪的遮罩连接到mask输入\",{\"1\":{\"110\":1}}],[\"将你想要转换的图像连接到image输入\",{\"1\":{\"106\":1}}],[\"将图像转换为遮罩的操作非常直接\",{\"1\":{\"106\":1}}],[\"将图像转换为遮罩节点允许用户从图像的特定通道创建遮罩\",{\"1\":{\"105\":1}}],[\"将图像转换为遮罩\",{\"0\":{\"105\":1}}],[\"将像素空间图像编码为潜在空间图像\",{\"1\":{\"67\":1}}],[\"将源潜在图像粘贴到目标潜像的组合而成的新潜在图像\",{\"1\":{\"57\":1}}],[\"将文本编码为嵌入是通过将文本通过clip模型中的各个层进行转换来实现的\",{\"1\":{\"24\":1}}],[\"将扩散模型引导到与\",{\"1\":{\"23\":1}}],[\"将提示工作流发送到指定的\",{\"1\":{\"17\":1}}],[\"将来可能会改变\",{\"1\":{\"17\":1}}],[\"将\",{\"1\":{\"10\":1,\"17\":1,\"118\":1}}],[\"旨在通过简单的配置\",{\"1\":{\"10\":1}}],[\"是一个强大且模块化的稳定扩散\",{\"1\":{\"161\":1}}],[\"是一个强大的工具集合\",{\"1\":{\"10\":1}}],[\"是嵌入文件的名称\",{\"1\":{\"150\":1}}],[\"是任何工作流的核心\",{\"1\":{\"135\":1}}],[\"是否在去噪前向潜像中添加噪声\",{\"1\":{\"137\":1}}],[\"是否居中裁剪图像以保持原始潜像图的纵横比\",{\"1\":{\"58\":1}}],[\"是否对整个区域进行去噪\",{\"1\":{\"30\":1}}],[\"是\",{\"1\":{\"17\":1,\"163\":1}}],[\"是核心节点的查找表\",{\"1\":{\"16\":1}}],[\"是源于社群的需求和对创作者知识产权的保护\",{\"1\":{\"1\":1}}],[\"相加\",{\"1\":{\"126\":1}}],[\"相关节点的完整列表可以在侧边栏中找到\",{\"1\":{\"21\":1}}],[\"相关项目\",{\"1\":{\"9\":1}}],[\"相反\",{\"1\":{\"1\":1}}],[\"讨论区\",{\"1\":{\"9\":1}}],[\"实现图像生成\",{\"1\":{\"163\":1}}],[\"实用节点\",{\"0\":{\"152\":1}}],[\"实用工具\",{\"1\":{\"9\":1}}],[\"实例\",{\"0\":{\"118\":1,\"122\":1}}],[\"实验性节点\",{\"0\":{\"170\":1}}],[\"实验性包含实验性节点\",{\"1\":{\"34\":1}}],[\"实验性\",{\"0\":{\"34\":1}}],[\"实时运行\",{\"1\":{\"5\":1}}],[\"图片会被上传到comfyui的输入文件夹\",{\"1\":{\"119\":1}}],[\"图片可以通过启动文件对话框上传\",{\"1\":{\"119\":1}}],[\"图像像素数据\",{\"1\":{\"46\":1}}],[\"图像的alpha通道\",{\"1\":{\"42\":1}}],[\"图像要使用的名称\",{\"1\":{\"42\":1}}],[\"图像将上传到comfyui的输入文件夹中\",{\"1\":{\"42\":1}}],[\"图像\",{\"0\":{\"41\":1}}],[\"图像处理等多种功能\",{\"1\":{\"10\":1}}],[\"图像处理\",{\"1\":{\"9\":2}}],[\"图层处理\",{\"1\":{\"9\":1}}],[\"功能\",{\"1\":{\"9\":1}}],[\"支持\",{\"1\":{\"9\":1}}],[\"ss\",{\"1\":{\"159\":1}}],[\"s\",{\"1\":{\"158\":1,\"159\":1}}],[\"s32b\",{\"1\":{\"141\":1}}],[\"scheduler\",{\"1\":{\"133\":1,\"137\":1}}],[\"scripts\",{\"1\":{\"16\":1}}],[\"supported\",{\"1\":{\"91\":1}}],[\"subjects\",{\"1\":{\"73\":1,\"85\":1,\"88\":1}}],[\"shift+lbutton\",{\"1\":{\"160\":2}}],[\"should\",{\"1\":{\"85\":2,\"91\":1}}],[\"sharpened\",{\"1\":{\"51\":2}}],[\"sharpening\",{\"1\":{\"51\":3}}],[\"sharpen\",{\"0\":{\"51\":1},\"1\":{\"51\":2}}],[\"shadowcz007\",{\"1\":{\"5\":1,\"15\":1}}],[\"shaping\",{\"1\":{\"0\":1}}],[\"space\",{\"1\":{\"78\":1,\"97\":1,\"99\":1,\"100\":1,\"103\":1,\"160\":1}}],[\"spatial\",{\"1\":{\"72\":2}}],[\"specifically\",{\"1\":{\"101\":1}}],[\"specific\",{\"1\":{\"72\":1,\"79\":2,\"82\":1,\"94\":1,\"97\":2,\"146\":1}}],[\"specified\",{\"1\":{\"17\":1,\"72\":1}}],[\"speech\",{\"1\":{\"9\":1}}],[\"sdxl\",{\"0\":{\"144\":1},\"1\":{\"144\":5,\"146\":12}}],[\"sd15\",{\"0\":{\"143\":1,\"146\":1},\"1\":{\"143\":6,\"146\":5}}],[\"sd\",{\"1\":{\"60\":1}}],[\"similar\",{\"1\":{\"73\":1,\"82\":1,\"85\":1}}],[\"sidebar\",{\"1\":{\"71\":1}}],[\"size\",{\"1\":{\"55\":1,\"64\":2}}],[\"sigma\",{\"1\":{\"49\":3,\"51\":3}}],[\"smooth\",{\"1\":{\"50\":1}}],[\"smaller\",{\"1\":{\"49\":1,\"51\":1}}],[\"safetensors\",{\"1\":{\"141\":2,\"143\":5,\"144\":4,\"146\":4}}],[\"sampling\",{\"0\":{\"131\":1}}],[\"sampler\",{\"1\":{\"104\":1,\"133\":1,\"137\":1}}],[\"samples\",{\"1\":{\"36\":1,\"39\":1,\"56\":4,\"58\":1,\"59\":1,\"63\":1,\"64\":1,\"65\":1,\"66\":1,\"68\":1,\"69\":1,\"70\":1}}],[\"savefileformatting\",{\"0\":{\"156\":1}}],[\"save\",{\"0\":{\"36\":1,\"47\":1},\"1\":{\"17\":3,\"36\":1,\"47\":1}}],[\"stuff\",{\"0\":{\"147\":1}}],[\"start\",{\"1\":{\"136\":1,\"137\":1}}],[\"stable\",{\"0\":{\"38\":1,\"163\":1},\"1\":{\"163\":2}}],[\"step\",{\"1\":{\"136\":2,\"137\":2}}],[\"step设置控制的\",{\"1\":{\"136\":1}}],[\"step和end\",{\"1\":{\"136\":1}}],[\"steps`\",{\"1\":{\"136\":2}}],[\"steps\",{\"1\":{\"133\":1,\"136\":1,\"137\":1}}],[\"strongly\",{\"1\":{\"74\":1,\"89\":2}}],[\"strength\",{\"1\":{\"27\":5,\"29\":1,\"30\":1,\"33\":1,\"51\":1,\"73\":1,\"74\":1,\"88\":1,\"89\":2}}],[\"styles\",{\"1\":{\"73\":1,\"88\":1}}],[\"style\",{\"0\":{\"91\":1},\"1\":{\"21\":1,\"22\":1,\"23\":2,\"91\":5,\"92\":2,\"93\":3}}],[\"skip的效果可能因具体的模型和应用而异\",{\"1\":{\"24\":1}}],[\"skip层级可能会生成诸如\",{\"1\":{\"24\":1}}],[\"self\",{\"1\":{\"170\":2}}],[\"segment\",{\"1\":{\"71\":1}}],[\"seed\",{\"1\":{\"132\":1,\"133\":1,\"137\":1}}],[\"see\",{\"1\":{\"52\":1}}],[\"second\",{\"1\":{\"48\":3}}],[\"set\",{\"0\":{\"29\":1,\"30\":1,\"66\":1},\"1\":{\"21\":2,\"24\":6,\"28\":1,\"29\":1,\"30\":2,\"66\":1,\"73\":1,\"88\":1}}],[\"setup\",{\"1\":{\"16\":2}}],[\"server\",{\"1\":{\"17\":1}}],[\"sends\",{\"1\":{\"17\":1}}],[\"solid\",{\"0\":{\"127\":1}}],[\"sometimes\",{\"1\":{\"97\":1}}],[\"source\",{\"1\":{\"57\":1,\"124\":1,\"126\":1}}],[\"so\",{\"1\":{\"16\":1}}],[\"synthesis\",{\"1\":{\"9\":1}}],[\"tell\",{\"1\":{\"85\":1,\"104\":1}}],[\"textprompts\",{\"0\":{\"148\":1}}],[\"textual\",{\"1\":{\"85\":1}}],[\"textbox\",{\"0\":{\"32\":1},\"1\":{\"21\":1,\"32\":2}}],[\"text\",{\"1\":{\"21\":1,\"25\":1,\"31\":1,\"32\":1,\"33\":1,\"72\":2,\"78\":1,\"79\":1,\"81\":1,\"82\":1,\"101\":1,\"103\":1,\"166\":1}}],[\"trained\",{\"1\":{\"79\":2}}],[\"typical\",{\"1\":{\"73\":1,\"88\":1}}],[\"type\",{\"1\":{\"17\":1}}],[\"target\",{\"1\":{\"52\":2}}],[\"two\",{\"1\":{\"48\":1}}],[\"tip\",{\"1\":{\"73\":1,\"88\":1}}],[\"tiled\",{\"0\":{\"39\":1,\"40\":1},\"1\":{\"39\":1,\"40\":1}}],[\"times\",{\"1\":{\"73\":1,\"88\":1,\"100\":1}}],[\"time\",{\"1\":{\"9\":1}}],[\"t2iadaptors\",{\"1\":{\"85\":1}}],[\"t2iadaptor\",{\"1\":{\"22\":2,\"87\":1,\"91\":1}}],[\"though\",{\"1\":{\"101\":1}}],[\"those\",{\"1\":{\"48\":1}}],[\"than\",{\"1\":{\"79\":1,\"100\":1}}],[\"that\",{\"1\":{\"17\":1,\"79\":1,\"100\":1}}],[\"them\",{\"1\":{\"104\":1,\"146\":1}}],[\"these\",{\"1\":{\"104\":1}}],[\"they\",{\"1\":{\"73\":1}}],[\"the\",{\"1\":{\"17\":2,\"48\":8,\"49\":11,\"50\":8,\"51\":13,\"52\":10,\"53\":5,\"70\":3,\"71\":3,\"72\":6,\"73\":6,\"74\":3,\"75\":1,\"76\":2,\"77\":2,\"78\":3,\"79\":5,\"80\":2,\"81\":1,\"82\":1,\"83\":2,\"84\":1,\"85\":4,\"86\":2,\"87\":1,\"88\":6,\"89\":4,\"90\":2,\"91\":2,\"92\":2,\"93\":2,\"94\":1,\"95\":2,\"96\":1,\"97\":3,\"98\":2,\"99\":1,\"100\":5,\"101\":3,\"102\":2,\"103\":4,\"104\":1,\"146\":2}}],[\"this\",{\"1\":{\"16\":1,\"17\":1,\"71\":1,\"73\":1,\"74\":1,\"76\":1,\"85\":2,\"88\":1,\"89\":2,\"101\":2}}],[\"together\",{\"1\":{\"48\":1,\"73\":1,\"88\":1}}],[\"top\",{\"1\":{\"45\":1,\"112\":1,\"114\":1}}],[\"todo\",{\"1\":{\"43\":1,\"60\":1}}],[\"tokenmerging\",{\"0\":{\"38\":1}}],[\"token\",{\"1\":{\"37\":1}}],[\"tome\",{\"0\":{\"37\":1},\"1\":{\"37\":2}}],[\"to\",{\"0\":{\"12\":1},\"1\":{\"9\":1,\"17\":1,\"27\":7,\"32\":1,\"48\":3,\"49\":3,\"50\":4,\"51\":3,\"52\":5,\"53\":2,\"56\":2,\"60\":1,\"70\":2,\"71\":1,\"72\":7,\"73\":8,\"74\":1,\"76\":2,\"78\":1,\"79\":3,\"82\":4,\"85\":9,\"87\":1,\"88\":7,\"89\":2,\"91\":3,\"93\":1,\"94\":2,\"97\":4,\"99\":1,\"100\":3,\"101\":4,\"103\":1,\"104\":3,\"146\":2,\"166\":1}}],[\"主要功能\",{\"0\":{\"11\":1},\"1\":{\"9\":1}}],[\"主要工具\",{\"1\":{\"5\":1}}],[\"🚀🚗🚚🏃\",{\"1\":{\"8\":1}}],[\"教程\",{\"0\":{\"8\":1,\"161\":1}}],[\"聊聊mixlab\",{\"1\":{\"7\":1}}],[\"起码两周才能搞定\",{\"1\":{\"7\":1}}],[\"那么它们将与此处显示的不同\",{\"1\":{\"17\":1}}],[\"那就先做了再说\",{\"1\":{\"7\":1}}],[\"那这个工作流你一定要了解一下\",{\"1\":{\"6\":1}}],[\"有时\",{\"1\":{\"158\":1}}],[\"有关可用计划的更多详细信息\",{\"1\":{\"133\":1,\"137\":1}}],[\"有关可用采样器的更多详细信息\",{\"1\":{\"133\":1,\"137\":1}}],[\"有关如何选择适当步骤数的好的指导方针\",{\"1\":{\"133\":1,\"137\":1}}],[\"有关如何格式化字符串的更多信息\",{\"1\":{\"47\":1}}],[\"有关comfyui中所有与文本提示相关的功能的完整指南\",{\"1\":{\"25\":1}}],[\"有好的想法\",{\"1\":{\"7\":1}}],[\"有什么问题也可以评论区留言\",{\"1\":{\"6\":1}}],[\"精华\",{\"1\":{\"7\":1}}],[\"展示了如何通过快速迭代和社区反馈实现产品创新\",{\"1\":{\"7\":1}}],[\"满足用户多样化的创作需求\",{\"1\":{\"7\":1}}],[\"聚集了大量的ai创作爱好者和开发者\",{\"1\":{\"7\":1}}],[\"聚集了创新者和创作者\",{\"1\":{\"0\":1}}],[\"作为遮罩\",{\"0\":{\"119\":1},\"1\":{\"119\":1,\"122\":1}}],[\"作为由mixlab孵化的社区\",{\"1\":{\"0\":1}}],[\"作者和shadow共同发起了\",{\"1\":{\"7\":1}}],[\"社区驱动开发\",{\"1\":{\"7\":1}}],[\"社区驱动\",{\"1\":{\"7\":1}}],[\"社群运营还是个人成长上\",{\"1\":{\"1\":1}}],[\"关键词\",{\"1\":{\"7\":1}}],[\"我是小同学\",{\"1\":{\"6\":1}}],[\"我都会打包好分享给大家\",{\"1\":{\"6\":1}}],[\"我比较建议选择这\",{\"1\":{\"6\":1}}],[\"我们基于comfyui\",{\"1\":{\"161\":1}}],[\"我们可以向节点提供以下字符串\",{\"1\":{\"157\":1}}],[\"我们可以在我们的提示中添加以下内容\",{\"1\":{\"151\":1}}],[\"我们可以尝试将我们的提示改写为\",{\"1\":{\"149\":1}}],[\"我们可以看到ai技术如何深刻地影响着我们的工作和生活\",{\"1\":{\"1\":1}}],[\"我们使用的去噪值小于1\",{\"1\":{\"135\":1}}],[\"我们有两个遮罩\",{\"1\":{\"126\":1}}],[\"我们有一个图像\",{\"1\":{\"122\":1}}],[\"我们就可以使用反转遮罩节点\",{\"1\":{\"118\":1}}],[\"我们就来深入了解熊叔的职业生涯\",{\"1\":{\"1\":1}}],[\"我们决定想对原本被保护的区域应用某种效果\",{\"1\":{\"118\":1}}],[\"我们首先加载一个遮罩\",{\"1\":{\"118\":1}}],[\"我们需要启用\",{\"1\":{\"17\":1}}],[\"我们在gpt的帮助下\",{\"1\":{\"7\":1}}],[\"我们更提倡\",{\"1\":{\"7\":1}}],[\"我们下期再见哦\",{\"1\":{\"6\":1}}],[\"我们能够创造出更多令人惊叹的成果\",{\"1\":{\"1\":1}}],[\"我们相信可以打破传统的界限\",{\"1\":{\"0\":1}}],[\"我们相信通过这种跨界的合作和交流\",{\"1\":{\"0\":1}}],[\"我们欢迎来自不同领域和文化背景的创作者加入我们的社区\",{\"1\":{\"0\":1}}],[\"我们也重视跨界合作和跨文化交流\",{\"1\":{\"0\":1}}],[\"我们鼓励创作者们不断挑战自我\",{\"1\":{\"0\":1}}],[\"我们鼓励创作者们展示他们的创作\",{\"1\":{\"0\":1}}],[\"我们提供各种资源和工具\",{\"1\":{\"0\":1}}],[\"我们致力于打造一个具有创新和创造力的氛围\",{\"1\":{\"0\":1}}],[\"我们的使命是提供一个开放的平台\",{\"1\":{\"0\":1}}],[\"的官方示例工作流\",{\"1\":{\"167\":1}}],[\"的工作流\",{\"1\":{\"166\":1}}],[\"的第一步\",{\"0\":{\"166\":1}}],[\"的提示\",{\"1\":{\"165\":1}}],[\"的简写\",{\"1\":{\"149\":1}}],[\"的权重\",{\"1\":{\"149\":1}}],[\"的扩散模型输出进行平均处理\",{\"1\":{\"28\":1}}],[\"的因子\",{\"1\":{\"27\":1}}],[\"的好处在于\",{\"1\":{\"24\":1}}],[\"的图片\",{\"1\":{\"24\":1}}],[\"的新\",{\"1\":{\"17\":1}}],[\"的\",{\"1\":{\"17\":1}}],[\"的自定义节点引入了直接的\",{\"1\":{\"14\":1}}],[\"的开发模式\",{\"1\":{\"7\":1}}],[\"的时候\",{\"1\":{\"6\":1}}],[\"的特点\",{\"1\":{\"1\":1}}],[\"质量等等\",{\"1\":{\"6\":1}}],[\"色彩\",{\"1\":{\"6\":1}}],[\"灯光\",{\"1\":{\"6\":1}}],[\"科幻\",{\"1\":{\"6\":1}}],[\"战损\",{\"1\":{\"6\":1}}],[\"城市废墟\",{\"1\":{\"6\":1}}],[\"而不会将结果保存到output文件夹里\",{\"1\":{\"166\":1}}],[\"而不影响图像的其他部分\",{\"1\":{\"122\":1}}],[\"而不是一次执行全部\",{\"1\":{\"64\":1}}],[\"而不是一直到最后一层\",{\"1\":{\"24\":1}}],[\"而不是单个批次\",{\"1\":{\"64\":1}}],[\"而其他区域则保持不变\",{\"1\":{\"118\":1}}],[\"而是在潜空间中进行去噪\",{\"1\":{\"54\":1}}],[\"而是直接根据这些词生成图像\",{\"1\":{\"6\":1}}],[\"而条件化\",{\"1\":{\"28\":1}}],[\"而且我们只需要写几个简单的关键词\",{\"1\":{\"6\":1}}],[\"而链接大语言模型\",{\"1\":{\"1\":1}}],[\"gpu\",{\"1\":{\"165\":1}}],[\"gpt\",{\"1\":{\"9\":1,\"10\":1}}],[\"gui\",{\"1\":{\"161\":1}}],[\"guidance\",{\"1\":{\"170\":2}}],[\"guide\",{\"1\":{\"79\":1,\"85\":1}}],[\"guiding\",{\"1\":{\"72\":1}}],[\"g\",{\"1\":{\"85\":2,\"143\":2,\"144\":1}}],[\"giving\",{\"1\":{\"85\":1}}],[\"give\",{\"1\":{\"85\":2}}],[\"github\",{\"1\":{\"5\":1,\"15\":1,\"162\":1,\"170\":1}}],[\"good\",{\"1\":{\"79\":1}}],[\"google\",{\"1\":{\"5\":1}}],[\"generate\",{\"1\":{\"72\":1,\"73\":2,\"88\":2,\"133\":1,\"137\":1}}],[\"getcustomwidgets\",{\"1\":{\"16\":1}}],[\"grow\",{\"1\":{\"67\":1}}],[\"graph\",{\"1\":{\"16\":1}}],[\"gaussian\",{\"1\":{\"49\":3,\"51\":1}}],[\"gligen模型\",{\"1\":{\"32\":1}}],[\"gligen\",{\"0\":{\"32\":1,\"72\":1},\"1\":{\"32\":2,\"72\":8}}],[\"global\",{\"1\":{\"0\":1}}],[\"鼓励观众享受创作过程\",{\"1\":{\"5\":1}}],[\"感谢观看\",{\"1\":{\"5\":1}}],[\"提高和降低权重\",{\"0\":{\"149\":1}}],[\"提示\",{\"1\":{\"22\":1,\"28\":1,\"29\":1,\"30\":1,\"32\":1,\"33\":1,\"39\":1,\"40\":1,\"42\":1,\"56\":1,\"58\":1,\"67\":1,\"136\":1}}],[\"提供了以下快捷键\",{\"1\":{\"160\":1}}],[\"提供了多种方式来微调您的提示\",{\"1\":{\"148\":1}}],[\"提供在每个提示后更改上述种子号的能力\",{\"1\":{\"133\":1,\"137\":1}}],[\"提供与编码图像密切相关的生成图像的额外变化\",{\"1\":{\"33\":1}}],[\"提供节点的沙盒版本\",{\"1\":{\"14\":1}}],[\"提供信任机制\",{\"1\":{\"14\":1}}],[\"提供工作流程的链接\",{\"1\":{\"5\":1}}],[\"提纲\",{\"0\":{\"5\":1}}],[\"总结\",{\"1\":{\"5\":1}}],[\"固定种子节点\",{\"1\":{\"5\":1}}],[\"控制技巧\",{\"1\":{\"5\":1}}],[\"方便调整姿势获取不同图片\",{\"1\":{\"5\":1}}],[\"使遮罩边缘更加柔和\",{\"1\":{\"111\":1}}],[\"使其能够编码比常规vae编码节点更大的图像\",{\"1\":{\"40\":1}}],[\"使其能够解码比常规vae解码节点更大的潜在图像\",{\"1\":{\"39\":1}}],[\"使用文本反转嵌入\",{\"0\":{\"150\":1}}],[\"使用提供的模型以及正向和负向条件来生成给定潜像的新版本\",{\"1\":{\"132\":1}}],[\"使用提供的vae\",{\"1\":{\"67\":1}}],[\"使用vae编码节点将像素图像转换为潜像图\",{\"1\":{\"62\":1}}],[\"使用加载图像节点加载了一张图像\",{\"1\":{\"43\":1}}],[\"使用openclip而不是clip\",{\"1\":{\"24\":1}}],[\"使用较低的clip\",{\"1\":{\"24\":1}}],[\"使用conditioning\",{\"1\":{\"21\":1}}],[\"使用普通的\",{\"1\":{\"17\":1}}],[\"使用\",{\"1\":{\"12\":1,\"24\":1,\"122\":1}}],[\"使用其他控制网\",{\"1\":{\"5\":1}}],[\"使用浮动窗口查看结果\",{\"1\":{\"5\":1}}],[\"使得mixlab\",{\"1\":{\"7\":1}}],[\"使得comfy\",{\"1\":{\"1\":1}}],[\"使得用户可以通过连接不同的ai模型和工具\",{\"1\":{\"1\":1}}],[\"开发者和创作者每天都会讨论大量的新技术动态和使用需求\",{\"1\":{\"7\":1}}],[\"开发者需要改变旧有的开发流程\",{\"1\":{\"1\":1}}],[\"开始生成图像\",{\"1\":{\"5\":1}}],[\"点击\",{\"1\":{\"5\":1}}],[\"准备工作\",{\"1\":{\"5\":1}}],[\"工作流程\",{\"1\":{\"5\":1,\"17\":1}}],[\"工作流生成app\",{\"1\":{\"2\":1}}],[\"屏幕共享节点\",{\"1\":{\"5\":1}}],[\"自定义节点的代码可以执行任何可能具有恶意意图的操作\",{\"1\":{\"14\":1}}],[\"自定义节点\",{\"1\":{\"5\":1}}],[\"与ksampler节点不同\",{\"1\":{\"136\":1}}],[\"与conditioning\",{\"1\":{\"29\":1,\"30\":1}}],[\"与unclip嵌入不同\",{\"1\":{\"22\":1}}],[\"与多种软件集成\",{\"1\":{\"5\":1}}],[\"与其开发故事\",{\"1\":{\"1\":1}}],[\"介绍视频内容\",{\"1\":{\"5\":1}}],[\"zbrush和maya等软件集成以创建令人惊叹的艺术作品\",{\"1\":{\"4\":1}}],[\"cvlab\",{\"1\":{\"170\":1}}],[\"ctrl+d\",{\"1\":{\"160\":1}}],[\"ctrl+delete\",{\"1\":{\"160\":1}}],[\"ctrl+v\",{\"1\":{\"160\":1}}],[\"ctrl+c\",{\"1\":{\"160\":1}}],[\"ctrl+lbutton\",{\"1\":{\"160\":1}}],[\"ctrl+backspace\",{\"1\":{\"160\":1}}],[\"ctrl+m\",{\"1\":{\"160\":1}}],[\"ctrl+a\",{\"1\":{\"160\":1}}],[\"ctrl+arrow\",{\"1\":{\"149\":2}}],[\"ctrl+o\",{\"1\":{\"160\":1}}],[\"ctrl+shift+v\",{\"1\":{\"160\":1}}],[\"ctrl+shift+enter\",{\"1\":{\"160\":1}}],[\"ctrl+s\",{\"1\":{\"160\":1}}],[\"ctrl+enter\",{\"1\":{\"160\":1}}],[\"cfg\",{\"1\":{\"133\":2,\"137\":2}}],[\"choice1|choice2|\",{\"1\":{\"151\":1}}],[\"channel\",{\"1\":{\"105\":1,\"120\":1}}],[\"chain\",{\"1\":{\"73\":1,\"88\":1}}],[\"checkpoints中\",{\"1\":{\"164\":1}}],[\"checkpoint\",{\"0\":{\"76\":1,\"101\":1},\"1\":{\"20\":1,\"76\":1,\"79\":1,\"97\":1,\"100\":1,\"101\":1}}],[\"certain\",{\"1\":{\"73\":2,\"88\":2}}],[\"center\",{\"1\":{\"48\":1,\"49\":1,\"51\":1,\"52\":1}}],[\"careful\",{\"1\":{\"146\":1}}],[\"came\",{\"1\":{\"100\":1}}],[\"cases\",{\"1\":{\"73\":1,\"88\":1}}],[\"can\",{\"1\":{\"48\":1,\"49\":1,\"50\":1,\"51\":1,\"52\":1,\"53\":1,\"70\":1,\"71\":2,\"72\":1,\"73\":4,\"74\":1,\"76\":1,\"79\":1,\"82\":1,\"85\":3,\"88\":4,\"89\":2,\"91\":2,\"94\":1,\"97\":2,\"101\":2,\"146\":1}}],[\"clockwise\",{\"1\":{\"70\":2}}],[\"clip模型\",{\"1\":{\"32\":1}}],[\"clip模型是由openai开发的强大深度学习模型\",{\"1\":{\"24\":1}}],[\"clip文本编码节点将使用clip模型对文本提示进行编码\",{\"1\":{\"25\":1}}],[\"clip由多个层级组成\",{\"1\":{\"24\":1}}],[\"clip\",{\"0\":{\"79\":1,\"82\":1},\"1\":{\"19\":1,\"20\":1,\"23\":3,\"24\":8,\"25\":1,\"26\":3,\"32\":1,\"33\":1,\"76\":1,\"78\":2,\"79\":5,\"80\":2,\"81\":2,\"82\":4,\"83\":2,\"84\":2,\"85\":1,\"88\":1,\"89\":4,\"90\":2,\"101\":2,\"103\":4,\"141\":3,\"143\":1,\"144\":1,\"150\":1}}],[\"create\",{\"1\":{\"104\":1}}],[\"created\",{\"1\":{\"16\":1}}],[\"crop\",{\"0\":{\"68\":1},\"1\":{\"52\":2,\"58\":1,\"68\":1}}],[\"cropped\",{\"1\":{\"48\":1}}],[\"ckpt\",{\"1\":{\"20\":1,\"77\":1,\"102\":1}}],[\"currently\",{\"1\":{\"91\":1}}],[\"current\",{\"1\":{\"16\":1}}],[\"custom\",{\"1\":{\"16\":3}}],[\"css\",{\"1\":{\"15\":1}}],[\"c4d\",{\"1\":{\"4\":1}}],[\"correct\",{\"1\":{\"79\":1}}],[\"colors\",{\"1\":{\"50\":3}}],[\"collaboration\",{\"1\":{\"0\":1}}],[\"convention\",{\"1\":{\"146\":1}}],[\"concentrated\",{\"1\":{\"49\":1,\"51\":1}}],[\"conditioned\",{\"1\":{\"101\":1}}],[\"conditional\",{\"1\":{\"79\":1}}],[\"conditioning\",{\"0\":{\"28\":1,\"29\":1,\"30\":1},\"1\":{\"21\":2,\"22\":2,\"23\":2,\"25\":1,\"27\":11,\"28\":7,\"29\":3,\"30\":3,\"32\":2,\"33\":3}}],[\"cond\",{\"1\":{\"30\":1}}],[\"control+enter来创建您的第一张图片\",{\"1\":{\"166\":1}}],[\"control\",{\"1\":{\"22\":2,\"86\":1,\"87\":1,\"133\":1,\"137\":1}}],[\"controlnets\",{\"1\":{\"22\":1}}],[\"controlnet节点\",{\"1\":{\"22\":1}}],[\"controlnet\",{\"0\":{\"22\":1,\"85\":1},\"1\":{\"22\":1,\"85\":4,\"86\":1,\"87\":1,\"139\":3}}],[\"config\",{\"1\":{\"20\":2}}],[\"console\",{\"1\":{\"16\":8}}],[\"const\",{\"1\":{\"16\":1}}],[\"compatible\",{\"1\":{\"101\":1}}],[\"compositions\",{\"1\":{\"72\":1}}],[\"composite节点可用于将一个潜在图像合成到另一个潜在图像中\",{\"1\":{\"56\":1}}],[\"composite\",{\"0\":{\"56\":1,\"57\":1},\"1\":{\"57\":1}}],[\"combine\",{\"0\":{\"28\":1},\"1\":{\"28\":2,\"29\":1,\"30\":1}}],[\"comfy\",{\"0\":{\"166\":1}}],[\"comfy会自动使用平铺实现进行重试\",{\"1\":{\"40\":1}}],[\"comfy将自动使用平铺实现进行重试\",{\"1\":{\"39\":1}}],[\"comfywidgets\",{\"1\":{\"16\":1}}],[\"comfyui提供了多种节点来操作像素图像\",{\"1\":{\"41\":1}}],[\"comfyui中的坐标系统原点位于左上角\",{\"1\":{\"56\":1}}],[\"comfyui中的坐标系原点位于左上角\",{\"1\":{\"32\":1}}],[\"comfyui中坐标系统的原点位于左上角\",{\"1\":{\"29\":1}}],[\"comfyui中文爱好者社区\",{\"1\":{\"7\":1}}],[\"comfyui中文社区是由mixlab孵化的创造力社区\",{\"1\":{\"0\":1}}],[\"comfyui中文社区\",{\"0\":{\"0\":1}}],[\"comfyui\",{\"0\":{\"8\":1,\"140\":1,\"147\":1,\"165\":1},\"1\":{\"2\":1,\"5\":2,\"7\":1,\"10\":1,\"14\":1,\"15\":1,\"17\":6,\"139\":3,\"141\":1,\"142\":1,\"146\":1,\"148\":1,\"149\":1,\"151\":2,\"152\":1,\"159\":1,\"160\":1,\"161\":2,\"165\":2,\"166\":2,\"167\":3}}],[\"com\",{\"1\":{\"5\":2,\"15\":1}}],[\"摘要\",{\"0\":{\"4\":1},\"1\":{\"7\":1}}],[\"多种功能\",{\"1\":{\"2\":1}}],[\"透明png图像\",{\"1\":{\"2\":1}}],[\"插件\",{\"1\":{\"2\":1}}],[\"让我们进行一个小修改\",{\"1\":{\"166\":1}}],[\"让我们创建一个名为\",{\"1\":{\"17\":1}}],[\"让我们一起期待\",{\"1\":{\"1\":1}}],[\"让我们携手努力\",{\"1\":{\"0\":1}}],[\"以预览生成的图像而不保存它们\",{\"1\":{\"166\":1}}],[\"以更好地反映您的意图\",{\"1\":{\"148\":1}}],[\"以及\",{\"1\":{\"132\":1}}],[\"以及他所参与开发的mixlab\",{\"1\":{\"1\":1}}],[\"以实现更自然的过渡\",{\"1\":{\"111\":1}}],[\"以下是一个简单的使用案例\",{\"1\":{\"114\":1,\"118\":1,\"122\":1,\"126\":1,\"130\":1}}],[\"以下是一个简单的工作流程示例\",{\"1\":{\"106\":1}}],[\"以下是如何使用裁剪遮罩节点的一个简单示例\",{\"1\":{\"110\":1}}],[\"以便我们可以将其重新噪声化和去噪\",{\"1\":{\"62\":1}}],[\"以便比自定义节点定义更灵活\",{\"1\":{\"16\":1}}],[\"以像素为单位的区域y坐标\",{\"1\":{\"68\":1}}],[\"以像素为单位的区域x坐标\",{\"1\":{\"68\":1}}],[\"以像素为单位\",{\"1\":{\"56\":2,\"57\":2,\"58\":2,\"108\":4}}],[\"以进行outpainting\",{\"1\":{\"45\":1}}],[\"以使对最终图像的影响最小化\",{\"1\":{\"37\":1}}],[\"以达到所需的准确性或相关性\",{\"1\":{\"24\":1}}],[\"以适应ai时代的变化\",{\"1\":{\"1\":1}}],[\"寻找需求\",{\"1\":{\"1\":1}}],[\"从图片通道创建的遮罩\",{\"1\":{\"121\":1}}],[\"从批次中提取潜像图\",{\"1\":{\"63\":1}}],[\"从而使我们能够执行图像到图像的任务\",{\"1\":{\"43\":1}}],[\"从而可以更精细地控制生成的描述\",{\"1\":{\"24\":1}}],[\"从而激励更多的创新和创作\",{\"1\":{\"1\":1}}],[\"从用户实际使用过程中汇总信息\",{\"1\":{\"1\":1}}],[\"要加载生成图像的工作流\",{\"1\":{\"167\":1}}],[\"要加载的模型的名称\",{\"1\":{\"20\":1}}],[\"要使用的计划类型\",{\"1\":{\"133\":1,\"137\":1}}],[\"要使用的采样器\",{\"1\":{\"133\":1,\"137\":1}}],[\"要使用t2iadaptor样式模型\",{\"1\":{\"22\":1}}],[\"要用作遮罩的图片的通道\",{\"1\":{\"120\":1}}],[\"要用作遮罩的通道\",{\"1\":{\"105\":1}}],[\"要转换为遮罩的图片的名称\",{\"1\":{\"120\":1}}],[\"要转换为遮罩的像素图像\",{\"1\":{\"105\":1}}],[\"要裁剪的遮罩\",{\"1\":{\"108\":1}}],[\"要翻转的潜像\",{\"1\":{\"69\":1}}],[\"要修复的潜像图\",{\"1\":{\"66\":1}}],[\"要重复的潜像图批处理\",{\"1\":{\"65\":1}}],[\"要获取的潜像图数量\",{\"1\":{\"63\":1}}],[\"要选择的第一个潜像图的索引\",{\"1\":{\"63\":1}}],[\"要选择一个片段的批次潜像图\",{\"1\":{\"63\":1}}],[\"要编码的像素空间图像\",{\"1\":{\"61\":1,\"67\":1}}],[\"要编码的文本\",{\"1\":{\"25\":1}}],[\"要解码的潜像图\",{\"1\":{\"59\":1}}],[\"要解码的潜在图像\",{\"1\":{\"39\":1}}],[\"要调整大小的潜像图\",{\"1\":{\"58\":1}}],[\"要粘贴的遮罩\",{\"1\":{\"124\":1}}],[\"要粘贴的源潜在图像的遮罩\",{\"1\":{\"57\":1}}],[\"要粘贴的潜在图像的羽化效果\",{\"1\":{\"56\":1}}],[\"要粘贴的潜在图像\",{\"1\":{\"56\":1,\"57\":2}}],[\"要复合的潜在图像\",{\"1\":{\"56\":1}}],[\"要放入文件名中的前缀\",{\"1\":{\"47\":1}}],[\"要预览的像素图像\",{\"1\":{\"47\":1}}],[\"要更好地组织生成的所有图像\",{\"1\":{\"47\":1}}],[\"要在提示中使用括号\",{\"1\":{\"149\":1}}],[\"要在节点图中简单预览图\",{\"1\":{\"47\":1}}],[\"要在图像下方填充的量\",{\"1\":{\"45\":1}}],[\"要在图像右侧填充的量\",{\"1\":{\"45\":1}}],[\"要在图像上方填充的量\",{\"1\":{\"45\":1}}],[\"要在图像左侧填充的量\",{\"1\":{\"45\":1}}],[\"要进行填充的图像\",{\"1\":{\"45\":1}}],[\"要反转的像素图像\",{\"1\":{\"44\":1}}],[\"要应用tome优化的扩散模型\",{\"1\":{\"37\":1}}],[\"要保存的潜变量\",{\"1\":{\"36\":1}}],[\"要与空间信息关联的文本\",{\"1\":{\"32\":1}}],[\"要有跨界的思维\",{\"1\":{\"1\":1}}],[\"要具备运营社群的能力\",{\"1\":{\"1\":1}}],[\"要掌握ai提示词工程的能力\",{\"1\":{\"1\":1}}],[\"理解ai的能力\",{\"1\":{\"1\":1}}],[\"首先需要将其编码为潜像图\",{\"1\":{\"62\":1}}],[\"首先\",{\"1\":{\"1\":1,\"106\":1,\"132\":1,\"164\":1}}],[\"对每个节点触发\",{\"1\":{\"16\":1}}],[\"对于想要入行ai产品经理的新手\",{\"1\":{\"1\":1}}],[\"对新手ai\",{\"1\":{\"1\":1}}],[\"404\",{\"1\":{\"171\":1}}],[\"45\",{\"1\":{\"1\":1}}],[\"47\",{\"1\":{\"1\":1}}],[\"产品开发\",{\"1\":{\"7\":1}}],[\"产品经理的建议\",{\"1\":{\"1\":1}}],[\"产品经理\",{\"1\":{\"1\":1}}],[\"产生更具有影响力和可持续发展的创意和创新项目\",{\"1\":{\"0\":1}}],[\"5\",{\"1\":{\"60\":1,\"67\":3,\"149\":1}}],[\"5模型\",{\"1\":{\"5\":1}}],[\"50\",{\"1\":{\"1\":1}}],[\"57\",{\"1\":{\"1\":1}}],[\"53在众多的ai平台中\",{\"1\":{\"1\":1}}],[\"学习新技能的人提供了更多的机会\",{\"1\":{\"1\":1}}],[\"为提示的选定部分添加适当的加权语法\",{\"1\":{\"149\":1}}],[\"为图像编辑提供更多的灵活性和控制\",{\"1\":{\"126\":1}}],[\"为修复过程提供一些额外的填充区域\",{\"1\":{\"67\":1}}],[\"为了便于分享\",{\"1\":{\"167\":1}}],[\"为了自动将某些节点小部件的值插入到文件名中\",{\"1\":{\"157\":1}}],[\"为了帮助组织您的图像\",{\"1\":{\"156\":1}}],[\"为了在图像到图像的任务中使用图像\",{\"1\":{\"62\":1}}],[\"为了执行图像到图像的生成\",{\"1\":{\"43\":1}}],[\"为了清晰起见\",{\"1\":{\"17\":1}}],[\"为0时的文本嵌入的条件化\",{\"1\":{\"27\":1}}],[\"为1时的文本嵌入的条件化\",{\"1\":{\"27\":1}}],[\"为\",{\"1\":{\"17\":1}}],[\"为那些愿意跨出舒适区\",{\"1\":{\"1\":1}}],[\"为用户提供了一个全新的创作体验\",{\"1\":{\"1\":1}}],[\"只需通过菜单中的load按钮加载图像\",{\"1\":{\"167\":1}}],[\"只需在右边的菜单中点击load\",{\"1\":{\"166\":1}}],[\"只需要向gpt提出需求\",{\"1\":{\"1\":1}}],[\"只包含所选择片段的新批次潜像图\",{\"1\":{\"63\":1}}],[\"只花了1到2天内完成录屏工作流的开发和上线\",{\"1\":{\"7\":1}}],[\"只关注自己领域的人则获得的加成相对有限\",{\"1\":{\"1\":1}}],[\"跨界的人有机会获得更大的加成\",{\"1\":{\"1\":1}}],[\"它可以根据文本的描述产生详细的图像\",{\"1\":{\"163\":1}}],[\"它可以帮助你从一个大的遮罩中精确地选出你需要的部分\",{\"1\":{\"110\":1}}],[\"它可以支持中文输入关键词\",{\"1\":{\"6\":1}}],[\"它还可以通过return\",{\"1\":{\"136\":1}}],[\"它还可以将批次列表合并回一个单独的批次中\",{\"1\":{\"64\":1}}],[\"它还接受修复图像的掩码\",{\"1\":{\"67\":1}}],[\"它允许您根据特定需求定制生成的文本描述的详细程度\",{\"1\":{\"24\":1}}],[\"它能够以多模态方式理解和生成文本和图像\",{\"1\":{\"24\":1}}],[\"它结合了视觉和语言理解\",{\"1\":{\"24\":1}}],[\"它们必须被转义\",{\"1\":{\"149\":1}}],[\"它们\",{\"1\":{\"17\":1}}],[\"它仅包含用于功能目的的足够节点数据\",{\"1\":{\"17\":1}}],[\"它将以默认名称保存一个文件\",{\"1\":{\"17\":1}}],[\"它就会自动对关键词进行联想\",{\"1\":{\"6\":1}}],[\"它就可以在几分钟内提供一个完整的代码\",{\"1\":{\"1\":1}}],[\"它与stable\",{\"1\":{\"1\":1}}],[\"最好也通过普通按钮保存常规工作流程\",{\"1\":{\"17\":1}}],[\"最好用的工具就是gpt\",{\"1\":{\"1\":1}}],[\"最后\",{\"1\":{\"1\":1}}],[\"最大的分歧在于软件的复杂度与学习成本之间的冲突\",{\"1\":{\"1\":1}}],[\"最大的共识就是\",{\"1\":{\"1\":1}}],[\"如稳定扩散\",{\"1\":{\"54\":1}}],[\"如2\",{\"1\":{\"24\":1}}],[\"如1\",{\"1\":{\"24\":1}}],[\"如booru模型\",{\"1\":{\"24\":1}}],[\"如果你是\",{\"1\":{\"162\":1}}],[\"如果你一直都在纠结怎么写好提示词\",{\"1\":{\"6\":1}}],[\"如果我们希望基于每个分辨率存储图像\",{\"1\":{\"157\":1}}],[\"如果我们想让\",{\"1\":{\"151\":1}}],[\"如果我们有一个提示\",{\"1\":{\"149\":1}}],[\"如果有问题可以查看\",{\"1\":{\"145\":1}}],[\"如果需要遮罩的区域在红色通道上有高亮度\",{\"1\":{\"122\":1}}],[\"如果提供了单个掩码\",{\"1\":{\"66\":1}}],[\"如果您弄乱了什么\",{\"1\":{\"166\":1}}],[\"如果您完全不了解任何与稳定扩散相关的内容\",{\"1\":{\"164\":1}}],[\"如果您有一个关于一个年轻人站在田野上的详细提示\",{\"1\":{\"24\":1}}],[\"如果您正在寻找一张\",{\"1\":{\"24\":1}}],[\"如果您从头开始重新构建自己的工作流程并添加\",{\"1\":{\"17\":1}}],[\"如果您查看第一个节点\",{\"1\":{\"17\":1}}],[\"如果您确实需要可视化并查看工作流程\",{\"1\":{\"17\":1}}],[\"如果在后端出现问题并且想要在前端修复工作流程\",{\"1\":{\"16\":1}}],[\"如果希望加入听友群\",{\"1\":{\"1\":1}}],[\"如scribble\",{\"1\":{\"5\":1}}],[\"如何理解clip\",{\"1\":{\"24\":1}}],[\"如何使用\",{\"1\":{\"17\":1}}],[\"如何开发自定义节点\",{\"0\":{\"15\":1}}],[\"如何成为一位优秀的ai产品经理\",{\"1\":{\"1\":1}}],[\"如何保持用户的易用性和认知的清晰性成为了一个挑战\",{\"1\":{\"1\":1}}],[\"如录屏渲染\",{\"1\":{\"1\":1}}],[\"也可以从\",{\"1\":{\"162\":1}}],[\"也可以插入日期信息\",{\"1\":{\"159\":1}}],[\"也可以通过快捷键\",{\"1\":{\"149\":1}}],[\"也能通过python编程来实现想要的功能\",{\"1\":{\"1\":1}}],[\"也要考虑如何降低用户的学习成本\",{\"1\":{\"1\":1}}],[\"也存在着一些分歧\",{\"1\":{\"1\":1}}],[\"也为用户带来了全新的应用场景\",{\"1\":{\"1\":1}}],[\"3d\",{\"1\":{\"9\":1}}],[\"39b\",{\"1\":{\"141\":1}}],[\"39\",{\"1\":{\"2\":1}}],[\"3\",{\"1\":{\"2\":1,\"17\":1}}],[\"37\",{\"1\":{\"1\":1}}],[\"31\",{\"1\":{\"1\":1}}],[\"34然而\",{\"1\":{\"1\":1}}],[\"36\",{\"1\":{\"1\":1}}],[\"更强的面部模型\",{\"1\":{\"143\":1}}],[\"更高的比例迫使图像更好地代表提示\",{\"1\":{\"133\":1,\"137\":1}}],[\"更敏捷地尝试新的可能性\",{\"1\":{\"1\":1}}],[\"更是将这种变革融入到自己的工作和生活中\",{\"1\":{\"1\":1}}],[\"更是在和shadow一起创造了爆火的comfyui\",{\"1\":{\"1\":1}}],[\"2022\",{\"1\":{\"163\":1}}],[\"2\",{\"1\":{\"28\":1,\"149\":2,\"160\":1}}],[\"28\",{\"1\":{\"1\":1}}],[\"22\",{\"1\":{\"1\":1}}],[\"2天即可完成\",{\"1\":{\"1\":1}}],[\"29\",{\"1\":{\"1\":1}}],[\"io\",{\"1\":{\"170\":1}}],[\"ip\",{\"1\":{\"143\":5,\"144\":3,\"146\":11}}],[\"ipa\",{\"0\":{\"142\":1}}],[\"ipadapter\",{\"0\":{\"140\":1},\"1\":{\"139\":1,\"140\":1,\"142\":1,\"146\":1}}],[\"is\",{\"1\":{\"48\":1,\"49\":1,\"51\":1,\"79\":1,\"85\":1}}],[\"if\",{\"1\":{\"48\":1,\"146\":2}}],[\"image2\",{\"1\":{\"48\":1}}],[\"image1\",{\"1\":{\"48\":1}}],[\"images\",{\"1\":{\"48\":2,\"52\":5,\"53\":3,\"70\":2,\"72\":1,\"78\":1,\"79\":1,\"82\":1,\"94\":1,\"96\":1,\"97\":1,\"99\":1,\"101\":1,\"103\":1}}],[\"image节点的images输入\",{\"1\":{\"166\":1}}],[\"image节点\",{\"1\":{\"47\":1,\"166\":1}}],[\"image节点可用于创建一组新的空潜像图\",{\"1\":{\"55\":1}}],[\"image节点可用于保存图像\",{\"1\":{\"47\":1}}],[\"image节点可用于加载图像\",{\"1\":{\"42\":1}}],[\"image用于给图像添加填充\",{\"1\":{\"45\":1}}],[\"image\",{\"0\":{\"41\":1,\"42\":1,\"44\":1,\"45\":1,\"46\":1,\"47\":1,\"48\":1,\"49\":1,\"50\":1,\"51\":1,\"52\":1,\"53\":1,\"55\":1},\"1\":{\"22\":1,\"26\":1,\"31\":1,\"33\":1,\"39\":1,\"42\":2,\"44\":3,\"45\":2,\"46\":1,\"47\":1,\"48\":7,\"49\":6,\"50\":9,\"51\":6,\"52\":5,\"53\":3,\"59\":1,\"84\":1,\"85\":2,\"100\":1,\"103\":1,\"105\":1,\"120\":1,\"133\":1,\"137\":1,\"157\":3,\"166\":1}}],[\"import\",{\"1\":{\"16\":1}}],[\"ids\",{\"1\":{\"17\":1}}],[\"id\",{\"1\":{\"17\":2}}],[\"interface\",{\"0\":{\"147\":1}}],[\"interesting\",{\"1\":{\"73\":1,\"88\":1}}],[\"inside\",{\"1\":{\"149\":3}}],[\"insightface\",{\"1\":{\"145\":1}}],[\"instead\",{\"1\":{\"85\":1}}],[\"inputs\",{\"0\":{\"74\":1,\"77\":1,\"80\":1,\"83\":1,\"86\":1,\"89\":1,\"92\":1,\"95\":1,\"98\":1,\"102\":1}}],[\"inpainting\",{\"0\":{\"67\":1},\"1\":{\"67\":1}}],[\"inpainting将此图像输入到inpaint\",{\"1\":{\"45\":1}}],[\"increment\",{\"1\":{\"133\":1,\"137\":1}}],[\"increments\",{\"1\":{\"70\":1}}],[\"include\",{\"1\":{\"73\":1,\"88\":1}}],[\"index\",{\"1\":{\"63\":1}}],[\"in\",{\"1\":{\"49\":1,\"50\":2,\"51\":1,\"52\":2,\"70\":1,\"71\":3,\"73\":3,\"79\":1,\"85\":1,\"88\":3,\"91\":1,\"100\":1}}],[\"information\",{\"1\":{\"72\":2}}],[\"info\",{\"1\":{\"48\":1,\"91\":1,\"107\":1,\"119\":1,\"123\":1}}],[\"invert\",{\"0\":{\"44\":1},\"1\":{\"44\":1}}],[\"init\",{\"1\":{\"16\":2}}],[\"innovation\",{\"1\":{\"0\":1}}],[\"its\",{\"1\":{\"48\":1,\"146\":1}}],[\"it\",{\"1\":{\"1\":1,\"7\":2,\"17\":1,\"48\":1,\"79\":1,\"97\":1,\"146\":1}}],[\"dd\",{\"1\":{\"159\":1}}],[\"date\",{\"1\":{\"159\":1}}],[\"data=data\",{\"1\":{\"17\":1}}],[\"data\",{\"1\":{\"17\":1}}],[\"dithering\",{\"1\":{\"50\":1}}],[\"dither\",{\"1\":{\"50\":1}}],[\"dimensions\",{\"1\":{\"48\":1}}],[\"different\",{\"1\":{\"43\":1,\"79\":1,\"85\":1,\"100\":2}}],[\"diffusers\",{\"1\":{\"19\":1}}],[\"diffusion模型中\",{\"1\":{\"45\":1}}],[\"diffusion\",{\"0\":{\"38\":1,\"163\":1},\"1\":{\"72\":1,\"73\":1,\"74\":2,\"75\":1,\"76\":2,\"79\":2,\"85\":4,\"87\":1,\"88\":1,\"89\":2,\"90\":1,\"91\":1,\"93\":1,\"97\":1,\"101\":4,\"163\":2}}],[\"diffusion构建的节点工具\",{\"1\":{\"7\":1}}],[\"diffusion等工具相结合\",{\"1\":{\"1\":1}}],[\"dumps\",{\"1\":{\"17\":1}}],[\"decrement或保持种子号fixed\",{\"1\":{\"133\":1,\"137\":1}}],[\"decoding\",{\"1\":{\"78\":1,\"97\":1,\"99\":1,\"103\":1}}],[\"decode节点的image输出\",{\"1\":{\"166\":1}}],[\"decode节点可用于使用提供的vae将潜像图解码为像素图像\",{\"1\":{\"59\":1}}],[\"decode\",{\"0\":{\"39\":1,\"59\":1},\"1\":{\"39\":1,\"100\":1}}],[\"denoising\",{\"1\":{\"78\":1,\"103\":1}}],[\"denoise\",{\"1\":{\"76\":1,\"101\":1,\"104\":1,\"132\":1,\"133\":1}}],[\"denoised\",{\"1\":{\"73\":1,\"88\":1,\"91\":1}}],[\"degrees\",{\"1\":{\"70\":1}}],[\"desired\",{\"1\":{\"93\":1}}],[\"design\",{\"1\":{\"9\":1}}],[\"destination\",{\"1\":{\"57\":1,\"124\":1,\"126\":1}}],[\"dev\",{\"1\":{\"17\":2}}],[\"delete\",{\"1\":{\"16\":3,\"160\":1}}],[\"default将其重置为初始状态\",{\"1\":{\"166\":1}}],[\"def\",{\"1\":{\"17\":1}}],[\"definitions\",{\"1\":{\"16\":1}}],[\"defs\",{\"1\":{\"16\":3}}],[\"d\",{\"1\":{\"5\":1,\"159\":1}}],[\"drive\",{\"1\":{\"5\":1}}],[\"down\",{\"1\":{\"149\":1}}],[\"do\",{\"1\":{\"1\":1,\"7\":2,\"48\":1}}],[\"创作者可以保护自己的工作流程不被随意复制和盗用\",{\"1\":{\"1\":1}}],[\"创造出更加丰富和多样化的作品\",{\"1\":{\"1\":1}}],[\"1990\",{\"1\":{\"149\":1}}],[\"19其次\",{\"1\":{\"1\":1}}],[\"1rausztz4pg4f3pxddfmzh78ghzalnmyr\",{\"1\":{\"5\":1}}],[\"1\",{\"1\":{\"5\":1,\"17\":3,\"28\":1,\"60\":1,\"149\":6,\"165\":1}}],[\"127\",{\"1\":{\"17\":3,\"165\":1}}],[\"12\",{\"1\":{\"1\":1}}],[\"18熊叔认为\",{\"1\":{\"1\":1}}],[\"18\",{\"1\":{\"1\":1}}],[\"13\",{\"1\":{\"1\":1}}],[\"14\",{\"1\":{\"1\":2,\"141\":2}}],[\"例如在提示\",{\"1\":{\"149\":1}}],[\"例如遮罩合成节点或ksampler节点\",{\"1\":{\"130\":1}}],[\"例如应用特效\",{\"1\":{\"122\":1}}],[\"例如只对图像的某一部分应用效果或调整\",{\"1\":{\"105\":1}}],[\"例如以下\",{\"1\":{\"15\":1}}],[\"例如\",{\"1\":{\"1\":1,\"7\":1,\"21\":1,\"22\":1,\"24\":2,\"122\":2,\"126\":1,\"149\":3,\"151\":1,\"157\":1}}],[\"这使得例如将部分去噪的潜在图像交给另一个ksampler\",{\"1\":{\"136\":1}}],[\"这种方法提供了一种高度可定制的方式来合并遮罩\",{\"1\":{\"126\":1}}],[\"这种方法提供了一种简便的方式\",{\"1\":{\"122\":1}}],[\"这取决于您的图片和需要遮罩的区域\",{\"1\":{\"122\":1}}],[\"这时\",{\"1\":{\"118\":1}}],[\"这样\",{\"1\":{\"106\":1,\"135\":1}}],[\"这样才能更好地利用ai技术\",{\"1\":{\"1\":1}}],[\"这对于组织您的工作流程很有用\",{\"1\":{\"153\":1}}],[\"这对于想要控制图像特定区域的编辑或处理特别有用\",{\"1\":{\"105\":1}}],[\"这对每个节点触发\",{\"1\":{\"16\":1}}],[\"这可以用于在图像到图像工作流中创建多个图像变体\",{\"1\":{\"65\":1}}],[\"这可能导致安全风险\",{\"1\":{\"14\":1}}],[\"这在您希望改变遮罩影响区域时非常有用\",{\"1\":{\"115\":1}}],[\"这在许多图像处理任务中都非常有用\",{\"1\":{\"106\":1}}],[\"这在批量大小过大无法全部适应vram内时非常有用\",{\"1\":{\"64\":1}}],[\"这在工作流中需要隔离特定的潜像图或图像时非常有用\",{\"1\":{\"63\":1}}],[\"这与\",{\"1\":{\"28\":1}}],[\"这是一个最基础的\",{\"1\":{\"166\":1}}],[\"这是\",{\"1\":{\"17\":1}}],[\"这就是进行修复的地方\",{\"1\":{\"16\":1}}],[\"这将对每个节点定义触发\",{\"1\":{\"16\":1}}],[\"这放在传统企业\",{\"1\":{\"7\":1}}],[\"这也是我测试了大量模型后发现他无论是在提示词的理解还是图像的画质上\",{\"1\":{\"6\":1}}],[\"这个纯色遮罩可以用作其他遮罩操作的基础\",{\"1\":{\"130\":1}}],[\"这个模型和工作流\",{\"1\":{\"6\":1}}],[\"这个扎根呢\",{\"1\":{\"6\":1}}],[\"这个平台的可能性足够高\",{\"1\":{\"1\":1}}],[\"这边有一个小开关需要注意默认是打开的\",{\"1\":{\"6\":1}}],[\"这些字符串将被指定的节点值替换\",{\"1\":{\"157\":1}}],[\"这些快捷方式提高或降低权重的量可以在设置中调整\",{\"1\":{\"149\":1}}],[\"这些值确定了各个方向上羽化效果的强度\",{\"1\":{\"114\":1}}],[\"这些潜像图可以在文本转图像工作流中使用\",{\"1\":{\"55\":1}}],[\"这些潜变量可以使用load\",{\"1\":{\"36\":1}}],[\"这些节点提供了使用编码器和解码器在像素空间和潜在空间之间切换的方法\",{\"1\":{\"54\":1}}],[\"这些节点可以用于加载图像以进行图像转换工作流\",{\"1\":{\"41\":1}}],[\"这些模型通常具有可以分解为多个子标签的标签\",{\"1\":{\"24\":1}}],[\"这些条件可以通过该部分其他节点的进一步增强或修改\",{\"1\":{\"21\":1}}],[\"这些定义将自动配置和注册\",{\"1\":{\"16\":1}}],[\"这些都会自动翻译成英文\",{\"1\":{\"6\":1}}],[\"这些功能的结合\",{\"1\":{\"1\":1}}],[\"这些功能不仅提高了创作的效率\",{\"1\":{\"1\":1}}],[\"这段视频讲解了如何在comfyui中使用自定义节点实现实时的潜在一致性模型\",{\"1\":{\"4\":1}}],[\"这让熊叔这样一个不懂python的人\",{\"1\":{\"1\":1}}],[\"链接大语言模型等\",{\"1\":{\"1\":1}}],[\"能够给予开发者更大的创造空间\",{\"1\":{\"1\":1}}],[\"0模型\",{\"1\":{\"24\":1}}],[\"0\",{\"1\":{\"2\":1,\"17\":6,\"67\":3,\"135\":1,\"149\":1,\"165\":2}}],[\"07\",{\"1\":{\"1\":1}}],[\"09\",{\"1\":{\"1\":1}}],[\"05\",{\"1\":{\"1\":1}}],[\"01\",{\"1\":{\"1\":1}}],[\"00\",{\"1\":{\"1\":1,\"2\":1}}],[\"在那里可以获得更多的工作流\",{\"1\":{\"167\":1}}],[\"在我们运行工作流之前\",{\"1\":{\"166\":1}}],[\"在我们社群里面\",{\"1\":{\"7\":1}}],[\"在排队时使用以下语法随机选择提示的某些部分\",{\"1\":{\"151\":1}}],[\"在extra\",{\"1\":{\"140\":1}}],[\"在对原始图像进行加噪时\",{\"1\":{\"135\":1}}],[\"在噪声擦除图像的地方\",{\"1\":{\"132\":1}}],[\"在x和y输入中设置坐标\",{\"1\":{\"126\":1}}],[\"在此工作流中\",{\"1\":{\"122\":1,\"126\":1}}],[\"在此处注册任何自定义节点实现\",{\"1\":{\"16\":1}}],[\"在下面的示例中\",{\"1\":{\"43\":1,\"62\":1}}],[\"在混合多个重叠条件化时使用的遮罩区域的权重\",{\"1\":{\"30\":1}}],[\"在混合扩散模型的多个噪声预测之前\",{\"1\":{\"29\":1}}],[\"在这些情况下\",{\"1\":{\"158\":1}}],[\"在这个工作流中\",{\"1\":{\"118\":1}}],[\"在这个社区中\",{\"1\":{\"0\":1}}],[\"在这里\",{\"1\":{\"28\":1}}],[\"在\",{\"1\":{\"27\":2,\"122\":1}}],[\"在两个文本嵌入之间进行插值\",{\"1\":{\"27\":1}}],[\"在与特定方式结构化的模型\",{\"1\":{\"24\":1}}],[\"在节点定义注册到图形之前运行自定义逻辑\",{\"1\":{\"16\":1}}],[\"在模型的选择上\",{\"1\":{\"6\":1}}],[\"在comfyui中\",{\"1\":{\"21\":1,\"107\":1,\"123\":1}}],[\"在comfyui中设置共享屏幕区域\",{\"1\":{\"5\":1}}],[\"在comfyui中实现实时lcm\",{\"1\":{\"5\":1}}],[\"在ai的帮助下\",{\"1\":{\"1\":1}}],[\"在ai时代\",{\"1\":{\"1\":1}}],[\"在开发ai产品的过程中\",{\"1\":{\"1\":1}}],[\"在开发过程中\",{\"1\":{\"1\":1}}],[\"在mixlab\",{\"1\":{\"1\":1}}],[\"在多年的工作中\",{\"1\":{\"1\":1}}],[\"他仍然会把中文关键词翻译成英文\",{\"1\":{\"6\":1}}],[\"他还运营着自己的自媒体\",{\"1\":{\"1\":1}}],[\"他看重的是comfy\",{\"1\":{\"1\":1}}],[\"他不仅关注技术变革如何影响商业社会\",{\"1\":{\"1\":1}}],[\"他不仅在职业生涯中积累了丰富的经验\",{\"1\":{\"1\":1}}],[\"他的职业生涯始于对技术的热爱和对创新的追求\",{\"1\":{\"1\":1}}],[\"熊叔给出了几点建议\",{\"1\":{\"1\":1}}],[\"熊叔与更多志同道合的朋友建立了联系\",{\"1\":{\"1\":1}}],[\"熊叔可以分享自己的知识和见解\",{\"1\":{\"1\":1}}],[\"熊叔不仅在产品开发上有所建树\",{\"1\":{\"1\":1}}],[\"熊叔坦言\",{\"1\":{\"1\":1}}],[\"熊叔和他的团队需要在提供强大功能的同时\",{\"1\":{\"1\":1}}],[\"熊叔分享了这一功能背后的故事\",{\"1\":{\"1\":1}}],[\"熊叔分享了mixlab\",{\"1\":{\"1\":1}}],[\"熊叔选择了comfy\",{\"1\":{\"1\":1}}],[\"熊叔参与了多个创业项目\",{\"1\":{\"1\":1}}],[\"熊叔\",{\"1\":{\"1\":1}}],[\"熊叔的职业生涯\",{\"1\":{\"1\":1}}],[\"熊叔是我们mixlab的核心创始人之一\",{\"1\":{\"1\":1}}],[\"探索ai如何改变我们的工作与生活\",{\"1\":{\"1\":1}}],[\"今天\",{\"1\":{\"1\":1}}],[\"nvidia\",{\"1\":{\"162\":1,\"165\":1}}],[\"naming\",{\"1\":{\"146\":1}}],[\"name\",{\"1\":{\"16\":1,\"20\":2,\"72\":2,\"74\":2,\"77\":2,\"80\":2,\"83\":2,\"86\":2,\"89\":2,\"92\":2,\"95\":2,\"98\":2,\"102\":2,\"133\":1,\"137\":1,\"150\":2,\"157\":2,\"158\":1}}],[\"number\",{\"1\":{\"50\":2}}],[\"not\",{\"1\":{\"48\":1,\"50\":1,\"52\":1,\"101\":2,\"171\":1}}],[\"noise设置返回部分去噪后的图像\",{\"1\":{\"136\":1}}],[\"noise设置告诉ksampler\",{\"1\":{\"136\":1}}],[\"noised\",{\"1\":{\"85\":1}}],[\"noise\",{\"0\":{\"66\":1},\"1\":{\"33\":1,\"66\":1,\"137\":2}}],[\"nodeoptions\",{\"0\":{\"155\":1}}],[\"nodecreated\",{\"1\":{\"16\":2}}],[\"nodedata\",{\"1\":{\"16\":2}}],[\"nodetype\",{\"1\":{\"16\":2}}],[\"node最大的特点就是\",{\"1\":{\"7\":1}}],[\"node能够迅速集成最新技术\",{\"1\":{\"7\":1}}],[\"node这一由comfyui和stable\",{\"1\":{\"7\":1}}],[\"node功能的增加\",{\"1\":{\"1\":1}}],[\"node的开发过程中\",{\"1\":{\"1\":1}}],[\"node的加密功能背后\",{\"1\":{\"1\":1}}],[\"node的几个核心功能\",{\"1\":{\"1\":1}}],[\"node\",{\"1\":{\"1\":1,\"7\":2,\"16\":9,\"17\":2,\"48\":1,\"49\":1,\"50\":1,\"51\":1,\"52\":2,\"53\":1,\"70\":1,\"72\":1,\"73\":1,\"76\":2,\"79\":2,\"82\":1,\"85\":2,\"88\":1,\"91\":1,\"94\":1,\"97\":2,\"100\":1,\"101\":3,\"157\":1}}],[\"node产品\",{\"1\":{\"1\":1}}],[\"nodes\",{\"0\":{\"8\":1},\"1\":{\"1\":1,\"2\":1,\"5\":2,\"10\":1,\"15\":1,\"16\":2,\"104\":1,\"168\":1}}],[\"negative\",{\"1\":{\"73\":1,\"74\":1,\"88\":1,\"89\":2,\"132\":1,\"133\":1,\"137\":1}}],[\"net和视觉指导的条件\",{\"1\":{\"22\":1}}],[\"net模型\",{\"1\":{\"22\":1}}],[\"net\",{\"1\":{\"22\":1,\"86\":1,\"87\":1}}],[\"new\",{\"1\":{\"0\":1}}],[\"节点名称可能相当大\",{\"1\":{\"158\":1}}],[\"节点会生成一个填充了所选值的纯色遮罩\",{\"1\":{\"130\":1}}],[\"节点会生成一个新的羽化遮罩\",{\"1\":{\"114\":1}}],[\"节点的输出连接到您的图像处理节点\",{\"1\":{\"118\":1}}],[\"节点的输入端\",{\"1\":{\"118\":1}}],[\"节点将为给定的起始步骤注入适当的噪声\",{\"1\":{\"137\":1}}],[\"节点将输出一个新的\",{\"1\":{\"110\":1}}],[\"节点将处理输入的图像\",{\"1\":{\"106\":1}}],[\"节点将其编码为潜在空间\",{\"1\":{\"43\":1}}],[\"节点一起使用\",{\"1\":{\"29\":1,\"30\":1}}],[\"节点在组合它们之前对各个条件进行加权\",{\"1\":{\"28\":1}}],[\"节点则插值存储在条件化内部的文本嵌入\",{\"1\":{\"28\":1}}],[\"节点不同\",{\"1\":{\"28\":1}}],[\"节点可用于水平或垂直翻转潜像\",{\"1\":{\"69\":1}}],[\"节点可用于将潜像裁剪到新的形状\",{\"1\":{\"68\":1}}],[\"节点可用于将条件化限制在指定的遮罩中\",{\"1\":{\"30\":1}}],[\"节点可用于调整潜在图像的大小\",{\"1\":{\"58\":1}}],[\"节点可用于使用提供的vae将像素空间图像编码为潜在空间图像\",{\"1\":{\"40\":1}}],[\"节点可用于通过平均扩散模型的预测噪声来合并多个条件化\",{\"1\":{\"28\":1}}],[\"节点可以randomize\",{\"1\":{\"133\":1,\"137\":1}}],[\"节点可以用来加载图片的某个通道并将其作为遮罩使用\",{\"1\":{\"119\":1}}],[\"节点可以用于从批次中选择一个潜像图或图像片段\",{\"1\":{\"63\":1}}],[\"节点可以用于反转图像的颜色\",{\"1\":{\"44\":1}}],[\"节点可以用于将条件限制在图像的特定区域内\",{\"1\":{\"29\":1}}],[\"节点可以使用提供的vae将像素空间图像编码为潜像图\",{\"1\":{\"61\":1}}],[\"节点可以使用提供的vae将潜在空间图像解码回像素空间图像\",{\"1\":{\"39\":1}}],[\"节点可以通过由clip视觉模型编码的图像为unclip模型提供额外的视觉指导\",{\"1\":{\"33\":1}}],[\"节点可以根据在\",{\"1\":{\"27\":1}}],[\"节点来提供额外的视觉提示\",{\"1\":{\"21\":1}}],[\"节点\",{\"1\":{\"1\":1,\"12\":1,\"20\":1,\"122\":1}}],[\"播客地址\",{\"1\":{\"1\":1,\"7\":1}}],[\"共同塑造一个充满创造力和创新精神的comfyui中文社区\",{\"1\":{\"0\":1}}],[\"融合不同领域的创新思维\",{\"1\":{\"0\":1}}],[\"同时保持原本未被保护的区域不变\",{\"1\":{\"118\":1}}],[\"同时也是一个消化知识和社交的好机会\",{\"1\":{\"1\":1}}],[\"同时\",{\"1\":{\"0\":1}}],[\"并将其连接到您刚添加的preview\",{\"1\":{\"166\":1}}],[\"并将其放置在comfyui\",{\"1\":{\"164\":1}}],[\"并将其排队到在该地址运行的\",{\"1\":{\"17\":1}}],[\"并为探索下一步提供一些参考指南\",{\"1\":{\"161\":1}}],[\"并在mask输出中提供相应通道的遮罩\",{\"1\":{\"106\":1}}],[\"并确定你想要用作遮罩的特定通道\",{\"1\":{\"106\":1}}],[\"并确保在编码之前\",{\"1\":{\"67\":1}}],[\"并提供了多种操纵潜在图像的方式\",{\"1\":{\"54\":1}}],[\"并提供了一些控制技巧\",{\"1\":{\"4\":1}}],[\"并非所有扩散模型都与unclip条件化兼容\",{\"1\":{\"33\":1}}],[\"并且我们希望扩散模型强调花卉\",{\"1\":{\"149\":1}}],[\"并且与clip的交互方式不同\",{\"1\":{\"24\":1}}],[\"并且\",{\"1\":{\"17\":1}}],[\"并且不包含位置或布局信息\",{\"1\":{\"17\":1}}],[\"并支持实时设计\",{\"1\":{\"10\":1}}],[\"并与photoshop\",{\"1\":{\"4\":1}}],[\"并与其他创新者进行合作和合作\",{\"1\":{\"0\":1}}],[\"并推动创新的实践和应用\",{\"1\":{\"0\":1}}],[\"突破传统思维\",{\"1\":{\"0\":1}}],[\"促进创新思维和创造力的交流与发展\",{\"1\":{\"0\":1}}],[\"after\",{\"1\":{\"133\":1,\"137\":1}}],[\"amd\",{\"1\":{\"101\":1}}],[\"amount\",{\"1\":{\"65\":1}}],[\"about\",{\"1\":{\"93\":1}}],[\"ability\",{\"1\":{\"73\":1,\"88\":1}}],[\"aux\",{\"1\":{\"139\":1}}],[\"automatically\",{\"1\":{\"79\":1,\"146\":1}}],[\"augmentation\",{\"1\":{\"33\":1}}],[\"actions\",{\"1\":{\"73\":1,\"88\":1}}],[\"adapter\",{\"1\":{\"143\":6,\"144\":4,\"146\":11}}],[\"advanced\",{\"1\":{\"139\":1}}],[\"advanced将尝试在最后一步完全去除潜像中的噪声\",{\"1\":{\"137\":1}}],[\"advanced节点将以与ksampler节点具有以下`denoise`设置的完全相同的方式去噪潜像\",{\"1\":{\"136\":1}}],[\"advanced节点来完成过程成为可能\",{\"1\":{\"136\":1}}],[\"advanced节点不向潜像中添加噪声\",{\"1\":{\"136\":1}}],[\"advanced节点提供了额外的设置来控制这种行为\",{\"1\":{\"136\":1}}],[\"advanced节点是ksampler节点的更高级版本\",{\"1\":{\"136\":1}}],[\"adhering\",{\"1\":{\"72\":1}}],[\"adding\",{\"1\":{\"73\":1,\"88\":1}}],[\"address\",{\"1\":{\"17\":1}}],[\"add\",{\"1\":{\"16\":1,\"137\":1}}],[\"addcustomnodedefs\",{\"1\":{\"16\":1}}],[\"are\",{\"1\":{\"72\":1,\"73\":2,\"76\":1,\"79\":2,\"82\":2,\"85\":1,\"88\":2,\"91\":1,\"94\":1,\"97\":1,\"101\":2}}],[\"area\",{\"0\":{\"29\":1},\"1\":{\"21\":1,\"28\":1,\"29\":1,\"30\":1}}],[\"alone\",{\"1\":{\"104\":1}}],[\"alongside\",{\"1\":{\"97\":1}}],[\"although\",{\"1\":{\"97\":1}}],[\"alter\",{\"1\":{\"73\":1,\"88\":1}}],[\"also\",{\"1\":{\"76\":1,\"85\":1,\"101\":2}}],[\"all\",{\"1\":{\"71\":1,\"101\":2,\"146\":1}}],[\"alpha\",{\"1\":{\"51\":1}}],[\"align=right\",{\"1\":{\"47\":1}}],[\"an\",{\"1\":{\"49\":1,\"50\":1,\"51\":1,\"100\":1}}],[\"and\",{\"1\":{\"0\":1,\"17\":1,\"48\":1,\"76\":1,\"78\":2,\"88\":1,\"97\":2,\"99\":2,\"100\":1,\"101\":1,\"103\":2,\"104\":2}}],[\"as\",{\"1\":{\"91\":1}}],[\"associate\",{\"1\":{\"72\":1}}],[\"aspect\",{\"1\":{\"48\":1,\"52\":1}}],[\"async\",{\"1\":{\"16\":6}}],[\"average\",{\"1\":{\"27\":1,\"28\":1}}],[\"attention\",{\"1\":{\"170\":2}}],[\"at\",{\"1\":{\"17\":1,\"73\":1,\"88\":1,\"100\":1,\"136\":4,\"137\":2}}],[\"api\",{\"0\":{\"17\":1},\"1\":{\"17\":8}}],[\"appropriate\",{\"1\":{\"76\":1,\"101\":1}}],[\"apply节点可用于为扩散模型提供进一步的空间指导\",{\"1\":{\"32\":1}}],[\"apply节点来引导进程朝着特定的构图方向发展\",{\"1\":{\"21\":1}}],[\"apply\",{\"0\":{\"22\":1,\"32\":1},\"1\":{\"22\":1,\"23\":1,\"49\":1,\"51\":1}}],[\"appinfo\",{\"1\":{\"12\":1}}],[\"app\",{\"0\":{\"12\":1},\"1\":{\"9\":1,\"10\":1,\"12\":1,\"16\":11}}],[\"ai时代如何重塑内容创作产品与社区生态\",{\"1\":{\"7\":1}}],[\"ai时代\",{\"1\":{\"7\":1}}],[\"ai都为我们提供了无限的可能性\",{\"1\":{\"1\":1}}],[\"ai\",{\"1\":{\"1\":1,\"52\":1}}],[\"ai技术的发展\",{\"1\":{\"1\":1}}],[\"ai技术的应用使得软件开发的成本大幅降低\",{\"1\":{\"1\":1}}],[\"ai如何改变产品经理的工作\",{\"1\":{\"1\":1}}],[\"a\",{\"1\":{\"0\":1,\"17\":1,\"48\":2,\"49\":1,\"51\":1,\"53\":1,\"71\":2,\"72\":2,\"73\":1,\"74\":1,\"76\":1,\"79\":3,\"82\":1,\"85\":6,\"87\":1,\"88\":1,\"89\":2,\"91\":3,\"93\":1,\"94\":1,\"97\":3,\"100\":2,\"101\":1,\"104\":2,\"146\":1,\"149\":3}}]],\"serializationVersion\":2}}")).map(([e,t])=>[e,zt(t,{fields:["h","t","c"],storeFields:["h","t","c"]})]));self.onmessage=({data:{type:e="all",query:t,locale:s,options:n,id:o}})=>{const u=bt[s];e==="suggest"?self.postMessage([e,o,tt(t,u,n)]):e==="search"?self.postMessage([e,o,Z(t,u,n)]):self.postMessage({suggestions:[e,o,tt(t,u,n)],results:[e,o,Z(t,u,n)]})}; -//# sourceMappingURL=index.js.map diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index 11f7948..0000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,3 +0,0 @@ - - -https://www.mixcomfy.com/awesome-comfyui-workflow/2024-06-06T08:49:44.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/mission.html2024-04-20T04:19:26.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/AI%E5%A6%82%E4%BD%95%E6%94%B9%E5%8F%98%E4%BA%A7%E5%93%81%E7%BB%8F%E7%90%86%E7%9A%84%E5%B7%A5%E4%BD%9C.html2024-06-06T08:20:44.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/comfyui%20mixlab%20nodes%20%E6%8F%92%E4%BB%B6%20%E5%B7%A5%E4%BD%9C%E6%B5%81%E7%94%9F%E6%88%90APP%20%E9%80%8F%E6%98%8Epng%E5%9B%BE%E5%83%8F%20%E5%A4%9A%E7%A7%8D%E5%8A%9F%E8%83%BD.html2024-05-28T10:54:39.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/Comfyui%20Realtime%20LCM%20with%20Photoshop.html2024-06-06T08:07:56.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/prompt.html2024-06-06T08:40:41.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/%E8%81%8A%E8%81%8AMixlab%20Node%EF%BC%9AAI%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81.html2024-06-06T08:07:56.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/insight/2024-04-20T16:20:52.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/mixlab_nodes/2024-05-28T09:13:14.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/task/2024-04-20T16:19:33.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/advanced/2024-04-20T12:52:55.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/core_nodes/2024-04-20T12:53:10.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/custom_nodes/2024-05-28T09:13:14.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/interface/2024-04-21T05:38:49.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/start/2024-04-21T11:02:10.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/for_testing/2024-05-28T09:13:14.000Zdailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/dailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/discovery/dailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/posts/tutorial/dailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/category/dailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/tag/dailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/article/dailyhttps://www.mixcomfy.com/awesome-comfyui-workflow/timeline/daily \ No newline at end of file diff --git a/docs/sitemap.xsl b/docs/sitemap.xsl deleted file mode 100644 index a76881a..0000000 --- a/docs/sitemap.xsl +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - XML Sitemap - - - - - -
-

Sitemap

- - - - - - - - - - - - - - - - - - - - - -
- - PriorityChange FrequencyLast Updated Time
- - - - - - - - - - - - - 0.5 - - - - - - - - - - - - - - -
-
- - - -
-
diff --git a/docs/tag/index.html b/docs/tag/index.html deleted file mode 100644 index a431305..0000000 --- a/docs/tag/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Tags | ComfyUI中文爱好者社区 - - - - - - - - - diff --git a/docs/timeline/index.html b/docs/timeline/index.html deleted file mode 100644 index f8313e0..0000000 --- a/docs/timeline/index.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - Timeline | ComfyUI中文爱好者社区 - - - - - - - - - diff --git a/www/.github/workflows/docs.yml b/www/.github/workflows/docs.yml deleted file mode 100644 index 508e989..0000000 --- a/www/.github/workflows/docs.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: docs - -on: - # trigger deployment on every push to main branch - push: - branches: [main] - # trigger deployment manually - workflow_dispatch: - -jobs: - docs: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - # fetch all commits to get last updated time or other git log info - fetch-depth: 0 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - # choose pnpm version to use - version: 8 - # install deps with pnpm - run_install: true - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - # choose node.js version to use - node-version: 20 - # cache deps for pnpm - cache: pnpm - - # run build script - - name: Build VuePress site - run: pnpm docs:build - - # please check out the docs of the workflow for more details - # @see https://github.com/crazy-max/ghaction-github-pages - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v4 - with: - # deploy to gh-pages branch - target_branch: gh-pages - # deploy the default output dir of VuePress - build_dir: docs/.vuepress/dist - env: - # @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/www/build.bat b/www/build.bat deleted file mode 100644 index d8bac5f..0000000 --- a/www/build.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off - -npm run docs:build diff --git a/www/dev.bat b/www/dev.bat deleted file mode 100644 index d66029b..0000000 --- a/www/dev.bat +++ /dev/null @@ -1,8 +0,0 @@ -@echo off - -npm run docs:clean-dev - -:loop - -timeout /t 1 >nul -goto loop \ No newline at end of file diff --git a/www/docs/.vuepress/client.js b/www/docs/.vuepress/client.js deleted file mode 100644 index 637c13c..0000000 --- a/www/docs/.vuepress/client.js +++ /dev/null @@ -1,34 +0,0 @@ -import { defineClientConfig } from 'vuepress/client' -import VueSocialSharing from 'vue-social-sharing' -import Article from './layouts/Article.vue' -import Category from './layouts/Category.vue' -import Tag from './layouts/Tag.vue' -import Timeline from './layouts/Timeline.vue' -import Layout from './layouts/Layout.vue' -import PortfolioLayout from './layouts/PortfolioLayout.vue' -import { defineCatalogInfoGetter } from '@vuepress/plugin-catalog/client' - -defineCatalogInfoGetter(meta => { - if (meta.title) { - return { - title: meta.title, - order: meta.order - } - } - return null -}) - -export default defineClientConfig({ - enhance ({ app }) { - app.use(VueSocialSharing) - }, - // we provide some blog layouts - layouts: { - Article, - Category, - Tag, - Timeline, - Layout, - PortfolioLayout - } -}) diff --git a/www/docs/.vuepress/components/ArticleList.vue b/www/docs/.vuepress/components/ArticleList.vue deleted file mode 100644 index 1308ce1..0000000 --- a/www/docs/.vuepress/components/ArticleList.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - - - diff --git a/www/docs/.vuepress/config.js b/www/docs/.vuepress/config.js deleted file mode 100644 index 7c20c6b..0000000 --- a/www/docs/.vuepress/config.js +++ /dev/null @@ -1,295 +0,0 @@ -import { blogPlugin } from '@vuepress/plugin-blog' -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' -import { viteBundler } from '@vuepress/bundler-vite' -import { sitemapPlugin } from '@vuepress/plugin-sitemap' -import { seoPlugin } from '@vuepress/plugin-seo' -import { containerPlugin } from '@vuepress/plugin-container' -import { catalogPlugin } from '@vuepress/plugin-catalog' -import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance' -import { searchProPlugin } from 'vuepress-plugin-search-pro' - -import fs from 'fs' -import path from 'path' -import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' - -let myConfig = {} -try { - const currentFilePath = __dirname - const parentDirectory = path.resolve(currentFilePath, '..') - let json = path.join(parentDirectory, 'data.json') - console.log('配置文件路径:', json) - // 同步读取JSON文件 - const data = fs.readFileSync(json, 'utf8') - myConfig = JSON.parse(data) - console.log(myConfig) -} catch (error) { - console.error('读取文件失败:', error) -} - -export default defineUserConfig({ - title: myConfig.title, - description: myConfig.description, - head: [ - [ - 'meta', - { - name: 'description', - content: myConfig.description - } - ], - [ - 'meta', - { - name: 'keywords', - content: myConfig.keywords - } - ], - ['meta', { name: 'author', content: myConfig.author }], - [ - 'meta', - { name: 'google-adsense-account', content: myConfig.googleAdsenseAccount } - ], - [ - 'script', - { - src: `${myConfig.base}${ - !myConfig.base.endsWith('/') ? '/' : '' - }javascript/translate.js` - } - ], - // ['script', { src: `${myConfig.base}${!myConfig.base.endsWith('/')?'/':''}javascript/model-viewer.min.js`, type: 'module' }], - [ - 'script', - { - src: `${myConfig.base}${ - !myConfig.base.endsWith('/') ? '/' : '' - }javascript/waterfall.min.js` - } - ], - [ - 'script', - { - async: true, - src: myConfig.googleAds, - crossorigin: 'anonymous' - } - ], - [ - 'meta', - { - name: 'google-site-verification', - content: '1' - } - ], - [ - 'link', - { - rel: 'icon', - href: '/favicon.ico' - } - ] - ], - publicPath: '/', - theme: defaultTheme({ - logo: '/logo.png', - navbar: myConfig.navbar - }), - markdown: { - lineNumbers: true, - extractHeaders: ['h2', 'h3', 'h4', 'h5'] - }, - plugins: [ - sitemapPlugin({ - // options - hostname: myConfig.hostname, - excludePaths: ['/404.html'] - }), - searchProPlugin({ - indexContent: true, - hotReload: true, - autoSuggestions: true - }), - seoPlugin({ - title: $page => $page.title, - description: $page => $page.frontmatter.description, - // author: (_, $site) => $site.themeConfig.author, - // tags: $page => $page.frontmatter.tags, - type: $page => - ['articles', 'posts', 'blog'].some(folder => - $page.regularPath.startsWith('/' + folder) - ) - ? 'article' - : 'website', - url: (_, $site, path) => ($site.themeConfig.domain || '') + path, - hostname: myConfig.hostname, - author: { name: myConfig.author }, - ogp: (ogp, page) => ({ - ...ogp, - keywords: page.frontmatter.keywords || ogp.keywords, - 'og:updated_time': new Date().toISOString(), - 'og:modified_time': new Date().toISOString(), - 'twitter:title': page.title, - 'twitter:description': page.frontmatter.description, - 'twitter:card': 'summary_large_image', - 'twitter:site': myConfig['twitter@username'] || myConfig.author, - 'twitter:creator': myConfig['twitter@username'] || myConfig.author, - share_config: - myConfig['share_config']?.join(',') || - [ - "buffer", - "email", - "facebook", - "flipboard", - "hackernews", - "instapaper", - "line", - "linkedin", - "odnoklassniki", - "pinterest", - "pocket", - "quora", - "reddit", - "tumblr", - "twitter", - "vk", - "weibo", - "wordpress", - "xing", - "yammer" - ].join(',') - }) - }), - googleAnalyticsPlugin({ - // 配置项 - id: myConfig.GA4 - }), - mdEnhancePlugin({ - // your options - }), - // containerPlugin({ - // // options - // }), - catalogPlugin({ - // Your options - locales: { - '/': { - title: myConfig.category_title - } - } - }), - blogPlugin({ - // Only files under posts are articles - filter: ({ filePathRelative }) => - filePathRelative ? filePathRelative.startsWith('posts/') : false, - - // Getting article info - getInfo: ({ frontmatter, title, data }) => ({ - title, - author: frontmatter.author || '', - date: frontmatter.date || null, - category: frontmatter.category || [], - tag: frontmatter.tag || [], - excerpt: - // Support manually set excerpt through frontmatter - typeof frontmatter.excerpt === 'string' - ? frontmatter.excerpt - : data?.excerpt || '' - }), - - // Generate excerpt for all pages excerpt those users choose to disable - excerptFilter: ({ frontmatter }) => - !frontmatter.home && - frontmatter.excerpt !== false && - typeof frontmatter.excerpt !== 'string', - - category: [ - { - key: 'category', - getter: page => page.frontmatter.category || [], - layout: 'Category', - itemLayout: 'Category', - frontmatter: () => ({ - title: 'Categories', - sidebar: false - }), - itemFrontmatter: name => ({ - title: `Category ${name}`, - sidebar: false - }) - }, - { - key: 'tag', - getter: page => page.frontmatter.tag || [], - layout: 'Tag', - itemLayout: 'Tag', - frontmatter: () => ({ - title: 'Tags', - sidebar: false - }), - itemFrontmatter: name => ({ - title: `Tag ${name}`, - sidebar: false - }) - } - ], - - type: [ - { - key: 'article', - // Remove archive articles - filter: page => !page.frontmatter.archive, - layout: 'Article', - frontmatter: () => ({ - title: 'Articles', - sidebar: false - }), - // Sort pages with time and sticky - sorter: (pageA, pageB) => { - if (pageA.frontmatter.sticky && pageB.frontmatter.sticky) - return pageB.frontmatter.sticky - pageA.frontmatter.sticky - - if (pageA.frontmatter.sticky && !pageB.frontmatter.sticky) return -1 - - if (!pageA.frontmatter.sticky && pageB.frontmatter.sticky) return 1 - - if (!pageB.frontmatter.date) return 1 - if (!pageA.frontmatter.date) return -1 - - return ( - new Date(pageB.frontmatter.date).getTime() - - new Date(pageA.frontmatter.date).getTime() - ) - } - }, - { - key: 'timeline', - // Only article with date should be added to timeline - filter: page => page.frontmatter.date instanceof Date, - // Sort pages with time - sorter: (pageA, pageB) => - new Date(pageB.frontmatter.date).getTime() - - new Date(pageA.frontmatter.date).getTime(), - layout: 'Timeline', - frontmatter: () => ({ - title: 'Timeline', - sidebar: false - }) - } - ], - hotReload: true - }) - ], - bundler: viteBundler(), - dest: myConfig.dest, - base: myConfig.base, - extendsPage: page => { - // 在 `routeMeta` 中设置 `date` 信息 - const { frontmatter } = page - page.routeMeta = { - title: page?.title, - order: -new Date(frontmatter?.date).getTime() || null // 如果没有 `date`,默认为 null - // 其他信息 - } - } -}) diff --git a/www/docs/.vuepress/layouts/Article.vue b/www/docs/.vuepress/layouts/Article.vue deleted file mode 100644 index 47a9fff..0000000 --- a/www/docs/.vuepress/layouts/Article.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - diff --git a/www/docs/.vuepress/layouts/Category.vue b/www/docs/.vuepress/layouts/Category.vue deleted file mode 100644 index 2270137..0000000 --- a/www/docs/.vuepress/layouts/Category.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - - diff --git a/www/docs/.vuepress/layouts/Layout.vue b/www/docs/.vuepress/layouts/Layout.vue deleted file mode 100644 index aaeeafa..0000000 --- a/www/docs/.vuepress/layouts/Layout.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - - - diff --git a/www/docs/.vuepress/layouts/Tag.vue b/www/docs/.vuepress/layouts/Tag.vue deleted file mode 100644 index 25b4af0..0000000 --- a/www/docs/.vuepress/layouts/Tag.vue +++ /dev/null @@ -1,95 +0,0 @@ - - - - - diff --git a/www/docs/.vuepress/layouts/Timeline.vue b/www/docs/.vuepress/layouts/Timeline.vue deleted file mode 100644 index f422731..0000000 --- a/www/docs/.vuepress/layouts/Timeline.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/www/docs/.vuepress/public/assets/3d-logo.glb b/www/docs/.vuepress/public/assets/3d-logo.glb deleted file mode 100644 index d6315b2..0000000 Binary files a/www/docs/.vuepress/public/assets/3d-logo.glb and /dev/null differ diff --git a/www/docs/.vuepress/public/favicon.ico b/www/docs/.vuepress/public/favicon.ico deleted file mode 100644 index 6c0650d..0000000 Binary files a/www/docs/.vuepress/public/favicon.ico and /dev/null differ diff --git a/www/docs/.vuepress/public/javascript/model-viewer.min.js b/www/docs/.vuepress/public/javascript/model-viewer.min.js deleted file mode 100644 index 1175da3..0000000 --- a/www/docs/.vuepress/public/javascript/model-viewer.min.js +++ /dev/null @@ -1,1094 +0,0 @@ -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -const t=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function e(e){return(i,n)=>void 0!==n?((t,e,i)=>{e.constructor.createProperty(i,t)})(e,i,n):t(e,i) -/** - * @license - * Copyright 2021 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */}var i;null===(i=window.HTMLSlotElement)||void 0===i||i.prototype.assignedElements; -/** - * @license - * Copyright 2010-2023 Three.js Authors - * SPDX-License-Identifier: MIT - */ -const n="160",r=1,s=2,a=3,o=0,l=1,c=2,h=100,u=0,d=1,A=2,p=0,m=1,g=2,f=3,v=4,_=5,E=6,y="attached",x=300,S=301,C=302,I=303,M=306,w=1e3,b=1001,T=1002,B=1003,R=1004,L=1005,D=1006,U=1007,P=1008,N=1009,F=1012,Q=1013,O=1014,k=1015,G=1016,H=1020,z=1023,V=1026,W=1027,q=1028,X=1030,j=33776,Y=33777,K=33778,J=33779,$=35840,Z=35842,tt=36196,et=37492,it=37496,nt=37808,rt=37812,st=36492,at=2201,ot=2202,lt=2300,ct=2301,ht=2302,ut=2400,dt=2401,At=2402,pt=2500,mt=3001,gt="",ft="srgb",vt="srgb-linear",_t="display-p3",Et="display-p3-linear",yt="linear",xt="srgb",St="rec709",Ct="p3",It=7680,Mt=35044,wt="300 es",bt=1035,Tt=2e3,Bt=2001;class Rt{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const i=this._listeners[t];if(void 0!==i){const t=i.indexOf(e);-1!==t&&i.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const i=e.slice(0);for(let e=0,n=i.length;e>8&255]+Lt[t>>16&255]+Lt[t>>24&255]+"-"+Lt[255&e]+Lt[e>>8&255]+"-"+Lt[e>>16&15|64]+Lt[e>>24&255]+"-"+Lt[63&i|128]+Lt[i>>8&255]+"-"+Lt[i>>16&255]+Lt[i>>24&255]+Lt[255&n]+Lt[n>>8&255]+Lt[n>>16&255]+Lt[n>>24&255]).toLowerCase()}function Ft(t,e,i){return Math.max(e,Math.min(i,t))}function Qt(t,e){return(t%e+e)%e}function Ot(t,e,i){return(1-i)*t+i*e}function kt(t){return 0==(t&t-1)&&0!==t}function Gt(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function Ht(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function zt(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const Vt={DEG2RAD:Ut,RAD2DEG:Pt,generateUUID:Nt,clamp:Ft,euclideanModulo:Qt,mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},inverseLerp:function(t,e,i){return t!==e?(i-t)/(e-t):0},lerp:Ot,damp:function(t,e,i,n){return Ot(t,e,1-Math.exp(-i*n))},pingpong:function(t,e=1){return e-Math.abs(Qt(t,2*e)-e)},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Dt=t);let e=Dt+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*Ut},radToDeg:function(t){return t*Pt},isPowerOfTwo:kt,ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:Gt,setQuaternionFromProperEuler:function(t,e,i,n,r){const s=Math.cos,a=Math.sin,o=s(i/2),l=a(i/2),c=s((e+n)/2),h=a((e+n)/2),u=s((e-n)/2),d=a((e-n)/2),A=s((n-e)/2),p=a((n-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*p,l*A,o*c);break;case"YXY":t.set(l*A,o*h,l*p,o*c);break;case"ZYZ":t.set(l*p,l*A,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:zt,denormalize:Ht};class Wt{constructor(t=0,e=0){Wt.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(Ft(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),n=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*i-s*n+t.x,this.y=r*n+s*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class qt{constructor(t,e,i,n,r,s,a,o,l){qt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,i,n,r,s,a,o,l)}set(t,e,i,n,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=n,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=i,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,n=e.elements,r=this.elements,s=i[0],a=i[3],o=i[6],l=i[1],c=i[4],h=i[7],u=i[2],d=i[5],A=i[8],p=n[0],m=n[3],g=n[6],f=n[1],v=n[4],_=n[7],E=n[2],y=n[5],x=n[8];return r[0]=s*p+a*f+o*E,r[3]=s*m+a*v+o*y,r[6]=s*g+a*_+o*x,r[1]=l*p+c*f+h*E,r[4]=l*m+c*v+h*y,r[7]=l*g+c*_+h*x,r[2]=u*p+d*f+A*E,r[5]=u*m+d*v+A*y,r[8]=u*g+d*_+A*x,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-i*r*c+i*a*o+n*r*l-n*s*o}invert(){const t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,A=e*h+i*u+n*d;if(0===A)return this.set(0,0,0,0,0,0,0,0,0);const p=1/A;return t[0]=h*p,t[1]=(n*l-c*i)*p,t[2]=(a*i-n*s)*p,t[3]=u*p,t[4]=(c*e-n*o)*p,t[5]=(n*r-a*e)*p,t[6]=d*p,t[7]=(i*o-l*e)*p,t[8]=(s*e-i*r)*p,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,n,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(i*o,i*l,-i*(o*s+l*a)+s+t,-n*l,n*o,-n*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Xt.makeScale(t,e)),this}rotate(t){return this.premultiply(Xt.makeRotation(-t)),this}translate(t,e){return this.premultiply(Xt.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let t=0;t<9;t++)if(e[t]!==i[t])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const Xt=new qt;function jt(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function Yt(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Kt(){const t=Yt("canvas");return t.style.display="block",t}const Jt={};function $t(t){t in Jt||(Jt[t]=!0,console.warn(t))}const Zt=(new qt).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),te=(new qt).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),ee={[vt]:{transfer:yt,primaries:St,toReference:t=>t,fromReference:t=>t},[ft]:{transfer:xt,primaries:St,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Et]:{transfer:yt,primaries:Ct,toReference:t=>t.applyMatrix3(te),fromReference:t=>t.applyMatrix3(Zt)},[_t]:{transfer:xt,primaries:Ct,toReference:t=>t.convertSRGBToLinear().applyMatrix3(te),fromReference:t=>t.applyMatrix3(Zt).convertLinearToSRGB()}},ie=new Set([vt,Et]),ne={enabled:!0,_workingColorSpace:vt,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!ie.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,i){if(!1===this.enabled||e===i||!e||!i)return t;const n=ee[e].toReference;return(0,ee[i].fromReference)(n(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return ee[t].primaries},getTransfer:function(t){return t===gt?yt:ee[t].transfer}};function re(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function se(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let ae;class oe{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===ae&&(ae=Yt("canvas")),ae.width=t.width,ae.height=t.height;const i=ae.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=ae}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=Yt("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const n=i.getImageData(0,0,t.width,t.height),r=n.data;for(let t=0;t0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==x)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case w:t.x=t.x-Math.floor(t.x);break;case b:t.x=t.x<0?0:1;break;case T:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case w:t.y=t.y-Math.floor(t.y);break;case b:t.y=t.y<0?0:1;break;case T:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return $t("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===ft?mt:3e3}set encoding(t){$t("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=t===mt?ft:gt}}de.DEFAULT_IMAGE=null,de.DEFAULT_MAPPING=x,de.DEFAULT_ANISOTROPY=1;class Ae{constructor(t=0,e=0,i=0,n=1){Ae.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=n}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,n=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,n,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],A=o[9],p=o[2],m=o[6],g=o[10];if(Math.abs(c-u)o&&t>f?tf?o=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const r=Math.sqrt(n),s=Math.atan2(r,e*i);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*i;if(o=o*t+u*r,l=l*t+d*r,c=c*t+A*r,h=h*t+p*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,i,n,r,s){const a=i[n],o=i[n+1],l=i[n+2],c=i[n+3],h=r[s],u=r[s+1],d=r[s+2],A=r[s+3];return t[e]=a*A+c*h+o*d-l*u,t[e+1]=o*A+c*u+l*h-a*d,t[e+2]=l*A+c*d+a*u-o*h,t[e+3]=c*A-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,n=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(i/2),c=a(n/2),h=a(r/2),u=o(i/2),d=o(n/2),A=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*A,this._y=l*d*h-u*c*A,this._z=l*c*A+u*d*h,this._w=l*c*h-u*d*A;break;case"YXZ":this._x=u*c*h+l*d*A,this._y=l*d*h-u*c*A,this._z=l*c*A-u*d*h,this._w=l*c*h+u*d*A;break;case"ZXY":this._x=u*c*h-l*d*A,this._y=l*d*h+u*c*A,this._z=l*c*A+u*d*h,this._w=l*c*h-u*d*A;break;case"ZYX":this._x=u*c*h-l*d*A,this._y=l*d*h+u*c*A,this._z=l*c*A-u*d*h,this._w=l*c*h+u*d*A;break;case"YZX":this._x=u*c*h+l*d*A,this._y=l*d*h+u*c*A,this._z=l*c*A-u*d*h,this._w=l*c*h-u*d*A;break;case"XZY":this._x=u*c*h-l*d*A,this._y=l*d*h-u*c*A,this._z=l*c*A+u*d*h,this._w=l*c*h+u*d*A;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],n=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=i+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-n)*t}else if(i>a&&i>h){const t=2*Math.sqrt(1+i-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(n+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-i-h);this._w=(r-l)/t,this._x=(n+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-i-a);this._w=(s-n)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return iMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Ft(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(0===i)return this;const n=Math.min(1,e/i);return this.slerp(t,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,n=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=i*c+s*a+n*l-r*o,this._y=n*c+s*o+r*a-i*l,this._z=r*c+s*l+i*o-n*a,this._w=s*c-i*a-n*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const i=this._x,n=this._y,r=this._z,s=this._w;let a=s*t._w+i*t._x+n*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=i,this._y=n,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*i+e*this._x,this._y=t*n+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=i*h+this._x*u,this._y=n*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=Math.random(),e=Math.sqrt(1-t),i=Math.sqrt(t),n=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(e*Math.cos(n),i*Math.sin(r),i*Math.cos(r),e*Math.sin(n))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class _e{constructor(t=0,e=0,i=0){_e.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return void 0===i&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(ye.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(ye.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,n=this.z,r=t.elements,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,this}applyQuaternion(t){const e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=2*(s*n-a*i),c=2*(a*e-r*n),h=2*(r*i-s*e);return this.x=e+o*l+s*h-a*c,this.y=i+o*c+a*l-r*h,this.z=n+o*h+r*c-s*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*n,this.y=r[1]*e+r[5]*i+r[9]*n,this.z=r[2]*e+r[6]*i+r[10]*n,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,n=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=n*o-r*a,this.y=r*s-i*o,this.z=i*a-n*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return Ee.copy(this).projectOnVector(t),this.sub(Ee)}reflect(t){return this.sub(Ee.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(Ft(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const n=Math.sin(e)*t;return this.x=n*Math.sin(i),this.y=Math.cos(e)*t,this.z=n*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=n,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,i=Math.sqrt(1-t**2);return this.x=i*Math.cos(e),this.y=i*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Ee=new _e,ye=new ve;class xe{constructor(t=new _e(1/0,1/0,1/0),e=new _e(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Ce),Ce.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Le),De.subVectors(this.max,Le),Me.subVectors(t.a,Le),we.subVectors(t.b,Le),be.subVectors(t.c,Le),Te.subVectors(we,Me),Be.subVectors(be,we),Re.subVectors(Me,be);let e=[0,-Te.z,Te.y,0,-Be.z,Be.y,0,-Re.z,Re.y,Te.z,0,-Te.x,Be.z,0,-Be.x,Re.z,0,-Re.x,-Te.y,Te.x,0,-Be.y,Be.x,0,-Re.y,Re.x,0];return!!Ne(e,Me,we,be,De)&&(e=[1,0,0,0,1,0,0,0,1],!!Ne(e,Me,we,be,De)&&(Ue.crossVectors(Te,Be),e=[Ue.x,Ue.y,Ue.z],Ne(e,Me,we,be,De)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Ce).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(Ce).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Se[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Se[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Se[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Se[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Se[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Se[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Se[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Se[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Se)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Se=[new _e,new _e,new _e,new _e,new _e,new _e,new _e,new _e],Ce=new _e,Ie=new xe,Me=new _e,we=new _e,be=new _e,Te=new _e,Be=new _e,Re=new _e,Le=new _e,De=new _e,Ue=new _e,Pe=new _e;function Ne(t,e,i,n,r){for(let s=0,a=t.length-3;s<=a;s+=3){Pe.fromArray(t,s);const a=r.x*Math.abs(Pe.x)+r.y*Math.abs(Pe.y)+r.z*Math.abs(Pe.z),o=e.dot(Pe),l=i.dot(Pe),c=n.dot(Pe);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Fe=new xe,Qe=new _e,Oe=new _e;class ke{constructor(t=new _e,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;void 0!==e?i.copy(e):Fe.setFromPoints(t).getCenter(i);let n=0;for(let e=0,r=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Qe.subVectors(t,this.center);const e=Qe.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),i=.5*(t-this.radius);this.center.addScaledVector(Qe,i/t),this.radius+=i}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Oe.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Qe.copy(t.center).add(Oe)),this.expandByPoint(Qe.copy(t.center).sub(Oe))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ge=new _e,He=new _e,ze=new _e,Ve=new _e,We=new _e,qe=new _e,Xe=new _e;class je{constructor(t=new _e,e=new _e(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ge)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ge.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ge.copy(this.origin).addScaledVector(this.direction,e),Ge.distanceToSquared(t))}distanceSqToSegment(t,e,i,n){He.copy(t).add(e).multiplyScalar(.5),ze.copy(e).sub(t).normalize(),Ve.copy(this.origin).sub(He);const r=.5*t.distanceTo(e),s=-this.direction.dot(ze),a=Ve.dot(this.direction),o=-Ve.dot(ze),l=Ve.lengthSq(),c=Math.abs(1-s*s);let h,u,d,A;if(c>0)if(h=s*o-a,u=s*a-o,A=r*c,h>=0)if(u>=-A)if(u<=A){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-A?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=A?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return i&&i.copy(this.origin).addScaledVector(this.direction,h),n&&n.copy(He).addScaledVector(ze,u),d}intersectSphere(t,e){Ge.subVectors(t.center,this.origin);const i=Ge.dot(this.direction),n=Ge.dot(Ge)-i*i,r=t.radius*t.radius;if(n>r)return null;const s=Math.sqrt(r-n),a=i-s,o=i+s;return o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return null===i?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,n,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(i=(t.min.x-u.x)*l,n=(t.max.x-u.x)*l):(i=(t.max.x-u.x)*l,n=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),i>s||r>n?null:((r>i||isNaN(i))&&(i=r),(s=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),i>o||a>n?null:((a>i||i!=i)&&(i=a),(o=0?i:n,e)))}intersectsBox(t){return null!==this.intersectBox(t,Ge)}intersectTriangle(t,e,i,n,r){We.subVectors(e,t),qe.subVectors(i,t),Xe.crossVectors(We,qe);let s,a=this.direction.dot(Xe);if(a>0){if(n)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Ve.subVectors(this.origin,t);const o=s*this.direction.dot(qe.crossVectors(Ve,qe));if(o<0)return null;const l=s*this.direction.dot(We.cross(Ve));if(l<0)return null;if(o+l>a)return null;const c=-s*Ve.dot(Xe);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Ye{constructor(t,e,i,n,r,s,a,o,l,c,h,u,d,A,p,m){Ye.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,i,n,r,s,a,o,l,c,h,u,d,A,p,m)}set(t,e,i,n,r,s,a,o,l,c,h,u,d,A,p,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=n,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=A,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Ye).fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,i=t.elements,n=1/Ke.setFromMatrixColumn(t,0).length(),r=1/Ke.setFromMatrixColumn(t,1).length(),s=1/Ke.setFromMatrixColumn(t,2).length();return e[0]=i[0]*n,e[1]=i[1]*n,e[2]=i[2]*n,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*s,e[9]=i[9]*s,e[10]=i[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,n=t.y,r=t.z,s=Math.cos(i),a=Math.sin(i),o=Math.cos(n),l=Math.sin(n),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,i=s*h,n=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=i+n*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=n+i*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,i=o*h,n=l*c,r=l*h;e[0]=t+r*a,e[4]=n*a-i,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=i*a-n,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,i=o*h,n=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=n+i*a,e[1]=i+n*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,i=s*h,n=a*c,r=a*h;e[0]=o*c,e[4]=n*l-i,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=i*l-n,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,i=s*l,n=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=n*h+i,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=i*h+n,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,i=s*l,n=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=i*h-n,e[2]=n*h-i,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose($e,t,Ze)}lookAt(t,e,i){const n=this.elements;return ii.subVectors(t,e),0===ii.lengthSq()&&(ii.z=1),ii.normalize(),ti.crossVectors(i,ii),0===ti.lengthSq()&&(1===Math.abs(i.z)?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),ti.crossVectors(i,ii)),ti.normalize(),ei.crossVectors(ii,ti),n[0]=ti.x,n[4]=ei.x,n[8]=ii.x,n[1]=ti.y,n[5]=ei.y,n[9]=ii.y,n[2]=ti.z,n[6]=ei.z,n[10]=ii.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,n=e.elements,r=this.elements,s=i[0],a=i[4],o=i[8],l=i[12],c=i[1],h=i[5],u=i[9],d=i[13],A=i[2],p=i[6],m=i[10],g=i[14],f=i[3],v=i[7],_=i[11],E=i[15],y=n[0],x=n[4],S=n[8],C=n[12],I=n[1],M=n[5],w=n[9],b=n[13],T=n[2],B=n[6],R=n[10],L=n[14],D=n[3],U=n[7],P=n[11],N=n[15];return r[0]=s*y+a*I+o*T+l*D,r[4]=s*x+a*M+o*B+l*U,r[8]=s*S+a*w+o*R+l*P,r[12]=s*C+a*b+o*L+l*N,r[1]=c*y+h*I+u*T+d*D,r[5]=c*x+h*M+u*B+d*U,r[9]=c*S+h*w+u*R+d*P,r[13]=c*C+h*b+u*L+d*N,r[2]=A*y+p*I+m*T+g*D,r[6]=A*x+p*M+m*B+g*U,r[10]=A*S+p*w+m*R+g*P,r[14]=A*C+p*b+m*L+g*N,r[3]=f*y+v*I+_*T+E*D,r[7]=f*x+v*M+_*B+E*U,r[11]=f*S+v*w+_*R+E*P,r[15]=f*C+v*b+_*L+E*N,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-n*l*h-r*a*u+i*l*u+n*a*d-i*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-n*s*d+n*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+i*s*d+r*a*c-i*l*c)+t[15]*(-n*a*c-e*o*h+e*a*u+n*s*h-i*s*u+i*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const n=this.elements;return t.isVector3?(n[12]=t.x,n[13]=t.y,n[14]=t.z):(n[12]=t,n[13]=e,n[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],A=t[12],p=t[13],m=t[14],g=t[15],f=h*m*l-p*u*l+p*o*d-a*m*d-h*o*g+a*u*g,v=A*u*l-c*m*l-A*o*d+s*m*d+c*o*g-s*u*g,_=c*p*l-A*h*l+A*a*d-s*p*d-c*a*g+s*h*g,E=A*h*o-c*p*o-A*a*u+s*p*u+c*a*m-s*h*m,y=e*f+i*v+n*_+r*E;if(0===y)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/y;return t[0]=f*x,t[1]=(p*u*r-h*m*r-p*n*d+i*m*d+h*n*g-i*u*g)*x,t[2]=(a*m*r-p*o*r+p*n*l-i*m*l-a*n*g+i*o*g)*x,t[3]=(h*o*r-a*u*r-h*n*l+i*u*l+a*n*d-i*o*d)*x,t[4]=v*x,t[5]=(c*m*r-A*u*r+A*n*d-e*m*d-c*n*g+e*u*g)*x,t[6]=(A*o*r-s*m*r-A*n*l+e*m*l+s*n*g-e*o*g)*x,t[7]=(s*u*r-c*o*r+c*n*l-e*u*l-s*n*d+e*o*d)*x,t[8]=_*x,t[9]=(A*h*r-c*p*r-A*i*d+e*p*d+c*i*g-e*h*g)*x,t[10]=(s*p*r-A*a*r+A*i*l-e*p*l-s*i*g+e*a*g)*x,t[11]=(c*a*r-s*h*r-c*i*l+e*h*l+s*i*d-e*a*d)*x,t[12]=E*x,t[13]=(c*p*n-A*h*n+A*i*u-e*p*u-c*i*m+e*h*m)*x,t[14]=(A*a*n-s*p*n-A*i*o+e*p*o+s*i*m-e*a*m)*x,t[15]=(s*h*n-c*a*n+c*i*o-e*h*o-s*i*u+e*a*u)*x,this}scale(t){const e=this.elements,i=t.x,n=t.y,r=t.z;return e[0]*=i,e[4]*=n,e[8]*=r,e[1]*=i,e[5]*=n,e[9]*=r,e[2]*=i,e[6]*=n,e[10]*=r,e[3]*=i,e[7]*=n,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+i,l*a-n*o,l*o+n*a,0,l*a+n*o,c*a+i,c*o-n*s,0,l*o-n*a,c*o+n*s,r*o*o+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,n,r,s){return this.set(1,i,r,0,t,1,s,0,e,n,1,0,0,0,0,1),this}compose(t,e,i){const n=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,A=r*h,p=s*c,m=s*h,g=a*h,f=o*l,v=o*c,_=o*h,E=i.x,y=i.y,x=i.z;return n[0]=(1-(p+g))*E,n[1]=(d+_)*E,n[2]=(A-v)*E,n[3]=0,n[4]=(d-_)*y,n[5]=(1-(u+g))*y,n[6]=(m+f)*y,n[7]=0,n[8]=(A+v)*x,n[9]=(m-f)*x,n[10]=(1-(u+p))*x,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this}decompose(t,e,i){const n=this.elements;let r=Ke.set(n[0],n[1],n[2]).length();const s=Ke.set(n[4],n[5],n[6]).length(),a=Ke.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],Je.copy(this);const o=1/r,l=1/s,c=1/a;return Je.elements[0]*=o,Je.elements[1]*=o,Je.elements[2]*=o,Je.elements[4]*=l,Je.elements[5]*=l,Je.elements[6]*=l,Je.elements[8]*=c,Je.elements[9]*=c,Je.elements[10]*=c,e.setFromRotationMatrix(Je),i.x=r,i.y=s,i.z=a,this}makePerspective(t,e,i,n,r,s,a=2e3){const o=this.elements,l=2*r/(e-t),c=2*r/(i-n),h=(e+t)/(e-t),u=(i+n)/(i-n);let d,A;if(a===Tt)d=-(s+r)/(s-r),A=-2*s*r/(s-r);else{if(a!==Bt)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);d=-s/(s-r),A=-s*r/(s-r)}return o[0]=l,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=A,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,i,n,r,s,a=2e3){const o=this.elements,l=1/(e-t),c=1/(i-n),h=1/(s-r),u=(e+t)*l,d=(i+n)*c;let A,p;if(a===Tt)A=(s+r)*h,p=-2*h;else{if(a!==Bt)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);A=r*h,p=-1*h}return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-u,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=p,o[14]=-A,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let t=0;t<16;t++)if(e[t]!==i[t])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const Ke=new _e,Je=new Ye,$e=new _e(0,0,0),Ze=new _e(1,1,1),ti=new _e,ei=new _e,ii=new _e,ni=new Ye,ri=new ve;class si{constructor(t=0,e=0,i=0,n=si.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=n}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,n=this._order){return this._x=t,this._y=e,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const n=t.elements,r=n[0],s=n[4],a=n[8],o=n[1],l=n[5],c=n[9],h=n[2],u=n[6],d=n[10];switch(e){case"XYZ":this._y=Math.asin(Ft(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ft(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Ft(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-Ft(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Ft(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Ft(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===i&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return ni.makeRotationFromQuaternion(t),this.setFromRotationMatrix(ni,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return ri.setFromEuler(this),this.setFromQuaternion(ri,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}si.DEFAULT_ORDER="XYZ";class ai{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map((t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()}))),n.maxGeometryCount=this._maxGeometryCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),null!==this.boundingBox&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const i=e.shapes;if(Array.isArray(i))for(let e=0,n=i.length;e0){n.children=[];for(let e=0;e0){n.animations=[];for(let e=0;e0&&(i.geometries=e),n.length>0&&(i.materials=n),r.length>0&&(i.textures=r),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),l.length>0&&(i.skeletons=l),c.length>0&&(i.animations=c),h.length>0&&(i.nodes=h)}return i.object=n,i;function s(t){const e=[];for(const i in t){const n=t[i];delete n.metadata,e.push(n)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}static getBarycoord(t,e,i,n,r){yi.subVectors(n,e),xi.subVectors(i,e),Si.subVectors(t,e);const s=yi.dot(yi),a=yi.dot(xi),o=yi.dot(Si),l=xi.dot(xi),c=xi.dot(Si),h=s*l-a*a;if(0===h)return r.set(0,0,0),null;const u=1/h,d=(l*o-a*c)*u,A=(s*c-a*o)*u;return r.set(1-d-A,A,d)}static containsPoint(t,e,i,n){return null!==this.getBarycoord(t,e,i,n,Ci)&&(Ci.x>=0&&Ci.y>=0&&Ci.x+Ci.y<=1)}static getUV(t,e,i,n,r,s,a,o){return!1===Ri&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ri=!0),this.getInterpolation(t,e,i,n,r,s,a,o)}static getInterpolation(t,e,i,n,r,s,a,o){return null===this.getBarycoord(t,e,i,n,Ci)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,Ci.x),o.addScaledVector(s,Ci.y),o.addScaledVector(a,Ci.z),o)}static isFrontFacing(t,e,i,n){return yi.subVectors(i,e),xi.subVectors(t,e),yi.cross(xi).dot(n)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this}setFromAttributeAndIndices(t,e,i,n){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,n),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return yi.subVectors(this.c,this.b),xi.subVectors(this.a,this.b),.5*yi.cross(xi).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Li.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Li.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,i,n,r){return!1===Ri&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ri=!0),Li.getInterpolation(t,this.a,this.b,this.c,e,i,n,r)}getInterpolation(t,e,i,n,r){return Li.getInterpolation(t,this.a,this.b,this.c,e,i,n,r)}containsPoint(t){return Li.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Li.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,n=this.b,r=this.c;let s,a;Ii.subVectors(n,i),Mi.subVectors(r,i),bi.subVectors(t,i);const o=Ii.dot(bi),l=Mi.dot(bi);if(o<=0&&l<=0)return e.copy(i);Ti.subVectors(t,n);const c=Ii.dot(Ti),h=Mi.dot(Ti);if(c>=0&&h<=c)return e.copy(n);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(i).addScaledVector(Ii,s);Bi.subVectors(t,r);const d=Ii.dot(Bi),A=Mi.dot(Bi);if(A>=0&&d<=A)return e.copy(r);const p=d*l-o*A;if(p<=0&&l>=0&&A<=0)return a=l/(l-A),e.copy(i).addScaledVector(Mi,a);const m=c*A-d*h;if(m<=0&&h-c>=0&&d-A>=0)return wi.subVectors(r,n),a=(h-c)/(h-c+(d-A)),e.copy(n).addScaledVector(wi,a);const g=1/(m+p+u);return s=p*g,a=u*g,e.copy(i).addScaledVector(Ii,s).addScaledVector(Mi,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Di={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ui={h:0,s:0,l:0},Pi={h:0,s:0,l:0};function Ni(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+6*(e-t)*(2/3-i):t}class Fi{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(void 0===e&&void 0===i){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=ft){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ne.toWorkingColorSpace(this,e),this}setRGB(t,e,i,n=ne.workingColorSpace){return this.r=t,this.g=e,this.b=i,ne.toWorkingColorSpace(this,n),this}setHSL(t,e,i,n=ne.workingColorSpace){if(t=Qt(t,1),e=Ft(e,0,1),i=Ft(i,0,1),0===e)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,r=2*i-n;this.r=Ni(r,n,t+1/3),this.g=Ni(r,n,t),this.b=Ni(r,n,t-1/3)}return ne.toWorkingColorSpace(this,n),this}setStyle(t,e=ft){function i(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const s=n[1],a=n[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const i=n[1],r=i.length;if(3===r)return this.setRGB(parseInt(i.charAt(0),16)/15,parseInt(i.charAt(1),16)/15,parseInt(i.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(i,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=ft){const i=Di[t.toLowerCase()];return void 0!==i?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=re(t.r),this.g=re(t.g),this.b=re(t.b),this}copyLinearToSRGB(t){return this.r=se(t.r),this.g=se(t.g),this.b=se(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=ft){return ne.fromWorkingColorSpace(Qi.copy(this),t),65536*Math.round(Ft(255*Qi.r,0,255))+256*Math.round(Ft(255*Qi.g,0,255))+Math.round(Ft(255*Qi.b,0,255))}getHexString(t=ft){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ne.workingColorSpace){ne.fromWorkingColorSpace(Qi.copy(this),e);const i=Qi.r,n=Qi.g,r=Qi.b,s=Math.max(i,n,r),a=Math.min(i,n,r);let o,l;const c=(a+s)/2;if(a===s)o=0,l=0;else{const t=s-a;switch(l=c<=.5?t/(s+a):t/(2-s-a),s){case i:o=(n-r)/t+(n0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const i=t[e];if(void 0===i){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const n=this[e];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(t){const e=[];for(const i in t){const n=t[i];delete n.metadata,e.push(n)}return e}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),this.side!==o&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),204!==this.blendSrc&&(i.blendSrc=this.blendSrc),205!==this.blendDst&&(i.blendDst=this.blendDst),this.blendEquation!==h&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==It&&(i.stencilFail=this.stencilFail),this.stencilZFail!==It&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==It&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),e){const e=n(t.textures),r=n(t.images);e.length>0&&(i.textures=e),r.length>0&&(i.images=r)}return i}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(null!==e){const t=e.length;i=new Array(t);for(let n=0;n!==t;++n)i[n]=e[n].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class Gi extends ki{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Fi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=u,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Hi=zi();function zi(){const t=new ArrayBuffer(4),e=new Float32Array(t),i=new Uint32Array(t),n=new Uint32Array(512),r=new Uint32Array(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(n[t]=0,n[256|t]=32768,r[t]=24,r[256|t]=24):e<-14?(n[t]=1024>>-e-14,n[256|t]=1024>>-e-14|32768,r[t]=-e-1,r[256|t]=-e-1):e<=15?(n[t]=e+15<<10,n[256|t]=e+15<<10|32768,r[t]=13,r[256|t]=13):e<128?(n[t]=31744,n[256|t]=64512,r[t]=24,r[256|t]=24):(n[t]=31744,n[256|t]=64512,r[t]=13,r[256|t]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,i=0;for(;0==(8388608&e);)e<<=1,i-=8388608;e&=-8388609,i+=947912704,s[t]=e|i}for(let t=1024;t<2048;++t)s[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)a[t]=t<<23;a[31]=1199570944,a[32]=2147483648;for(let t=33;t<63;++t)a[t]=2147483648+(t-32<<23);a[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(o[t]=1024);return{floatView:e,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:s,exponentTable:a,offsetTable:o}}const Vi={toHalfFloat:function(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Ft(t,-65504,65504),Hi.floatView[0]=t;const e=Hi.uint32View[0],i=e>>23&511;return Hi.baseTable[i]+((8388607&e)>>Hi.shiftTable[i])},fromHalfFloat:function(t){const e=t>>10;return Hi.uint32View[0]=Hi.mantissaTable[Hi.offsetTable[e]+(1023&t)]+Hi.exponentTable[e],Hi.floatView[0]}},Wi=new _e,qi=new Wt;class Xi{constructor(t,e,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=i,this.usage=Mt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=k,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let n=0,r=this.itemSize;n0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const e in i){const n=i[e];t.data.attributes[e]=n.toJSON(t.data)}const n={};let r=!1;for(const e in this.morphAttributes){const i=this.morphAttributes[e],s=[];for(let e=0,n=i.length;e0&&(n[e]=s,r=!0)}r&&(t.data.morphAttributes=n,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;null!==i&&this.setIndex(i.clone(e));const n=t.attributes;for(const t in n){const i=n[t];this.setAttribute(t,i.clone(e))}const r=t.morphAttributes;for(const t in r){const i=[],n=r[t];for(let t=0,r=n.length;t0){const i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;t(t.far-t.near)**2)return}an.copy(r).invert(),on.copy(t.ray).applyMatrix4(an),null!==i.boundingBox&&!1===on.intersectsBox(i.boundingBox)||this._computeIntersections(t,e,on)}}_computeIntersections(t,e,i){let n;const r=this.geometry,s=this.material,a=r.index,o=r.attributes.position,l=r.attributes.uv,c=r.attributes.uv1,h=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==a)if(Array.isArray(s))for(let r=0,o=u.length;ri.far?null:{distance:u,point:xn.clone(),object:t}}(t,e,i,n,hn,un,dn,yn);if(d){r&&(mn.fromBufferAttribute(r,c),gn.fromBufferAttribute(r,h),fn.fromBufferAttribute(r,u),d.uv=Li.getInterpolation(yn,hn,un,dn,mn,gn,fn,new Wt)),s&&(mn.fromBufferAttribute(s,c),gn.fromBufferAttribute(s,h),fn.fromBufferAttribute(s,u),d.uv1=Li.getInterpolation(yn,hn,un,dn,mn,gn,fn,new Wt),d.uv2=d.uv1),a&&(vn.fromBufferAttribute(a,c),_n.fromBufferAttribute(a,h),En.fromBufferAttribute(a,u),d.normal=Li.getInterpolation(yn,hn,un,dn,vn,_n,En,new _e),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const t={a:c,b:h,c:u,normal:new _e,materialIndex:0};Li.getNormal(hn,un,dn,t.normal),d.face=t}return d}class In extends sn{constructor(t=1,e=1,i=1,n=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:s};const a=this;n=Math.floor(n),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function A(t,e,i,n,r,s,A,p,m,g,f){const v=s/m,_=A/g,E=s/2,y=A/2,x=p/2,S=m+1,C=g+1;let I=0,M=0;const w=new _e;for(let s=0;s0?1:-1,c.push(w.x,w.y,w.z),h.push(o/m),h.push(1-s/g),I+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const i={};for(const t in this.extensions)!0===this.extensions[t]&&(i[t]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}}class Rn extends Ei{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Ye,this.projectionMatrix=new Ye,this.projectionMatrixInverse=new Ye,this.coordinateSystem=Tt}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class Ln extends Rn{constructor(t=50,e=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*Pt*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Ut*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*Pt*Math.atan(Math.tan(.5*Ut*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,i,n,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Ut*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*n/t,e-=s.offsetY*i/a,n*=s.width/t,i*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const Dn=-90;class Un extends Ei{constructor(t,e,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new Ln(Dn,1,t,e);n.layers=this.layers,this.add(n);const r=new Ln(Dn,1,t,e);r.layers=this.layers,this.add(r);const s=new Ln(Dn,1,t,e);s.layers=this.layers,this.add(s);const a=new Ln(Dn,1,t,e);a.layers=this.layers,this.add(a);const o=new Ln(Dn,1,t,e);o.layers=this.layers,this.add(o);const l=new Ln(Dn,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[i,n,r,s,a,o]=e;for(const t of e)this.remove(t);if(t===Tt)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(t!==Bt)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[r,s,a,o,l,c]=this.children,h=t.getRenderTarget(),u=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),A=t.xr.enabled;t.xr.enabled=!1;const p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0,n),t.render(e,r),t.setRenderTarget(i,1,n),t.render(e,s),t.setRenderTarget(i,2,n),t.render(e,a),t.setRenderTarget(i,3,n),t.render(e,o),t.setRenderTarget(i,4,n),t.render(e,l),i.texture.generateMipmaps=p,t.setRenderTarget(i,5,n),t.render(e,c),t.setRenderTarget(h,u,d),t.xr.enabled=A,i.texture.needsPMREMUpdate=!0}}class Pn extends de{constructor(t,e,i,n,r,s,a,o,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:S,i,n,r,s,a,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Nn extends me{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const i={width:t,height:t,depth:1},n=[i,i,i,i,i,i];void 0!==e.encoding&&($t("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),e.colorSpace=e.encoding===mt?ft:gt),this.texture=new Pn(n,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:D}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},n=new In(5,5,5),r=new Bn({name:"CubemapFromEquirect",uniforms:Mn(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:l,blending:0});r.uniforms.tEquirect.value=e;const s=new Sn(n,r),a=e.minFilter;e.minFilter===P&&(e.minFilter=D);return new Un(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,i,n){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,i,n);t.setRenderTarget(r)}}const Fn=new _e,Qn=new _e,On=new qt;class kn{constructor(t=new _e(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const n=Fn.subVectors(i,e).cross(Qn.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(n,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const i=t.delta(Fn),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:e.copy(t.start).addScaledVector(i,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||On.getNormalMatrix(t),n=this.coplanarPoint(Fn).applyMatrix4(t),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Gn=new ke,Hn=new _e;class zn{constructor(t=new kn,e=new kn,i=new kn,n=new kn,r=new kn,s=new kn){this.planes=[t,e,i,n,r,s]}set(t,e,i,n,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(n),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=2e3){const i=this.planes,n=t.elements,r=n[0],s=n[1],a=n[2],o=n[3],l=n[4],c=n[5],h=n[6],u=n[7],d=n[8],A=n[9],p=n[10],m=n[11],g=n[12],f=n[13],v=n[14],_=n[15];if(i[0].setComponents(o-r,u-l,m-d,_-g).normalize(),i[1].setComponents(o+r,u+l,m+d,_+g).normalize(),i[2].setComponents(o+s,u+c,m+A,_+f).normalize(),i[3].setComponents(o-s,u-c,m-A,_-f).normalize(),i[4].setComponents(o-a,u-h,m-p,_-v).normalize(),e===Tt)i[5].setComponents(o+a,u+h,m+p,_+v).normalize();else{if(e!==Bt)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);i[5].setComponents(a,h,p,v).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),Gn.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),Gn.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Gn)}intersectsSprite(t){return Gn.center.set(0,0,0),Gn.radius=.7071067811865476,Gn.applyMatrix4(t.matrixWorld),this.intersectsSphere(Gn)}intersectsSphere(t){const e=this.planes,i=t.center,n=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(i)0?t.max.x:t.min.x,Hn.y=n.normal.y>0?t.max.y:t.min.y,Hn.z=n.normal.z>0?t.max.z:t.min.z,n.distanceToPoint(Hn)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Vn(){let t=null,e=!1,i=null,n=null;function r(e,s){i(e,s),n=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==i&&(n=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(t){i=t},setContext:function(e){t=e}}}function Wn(t,e){const i=e.isWebGL2,n=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),n.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const i=n.get(e);i&&(t.deleteBuffer(i.buffer),n.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=n.get(e);return void((!t||t.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor *= toneMappingExposure;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\treturn color;\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},jn={common:{diffuse:{value:new Fi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new qt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new qt},normalScale:{value:new Wt(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Fi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0},uvTransform:{value:new qt}},sprite:{diffuse:{value:new Fi(16777215)},opacity:{value:1},center:{value:new Wt(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new qt},alphaMap:{value:null},alphaMapTransform:{value:new qt},alphaTest:{value:0}}},Yn={basic:{uniforms:wn([jn.common,jn.specularmap,jn.envmap,jn.aomap,jn.lightmap,jn.fog]),vertexShader:Xn.meshbasic_vert,fragmentShader:Xn.meshbasic_frag},lambert:{uniforms:wn([jn.common,jn.specularmap,jn.envmap,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)}}]),vertexShader:Xn.meshlambert_vert,fragmentShader:Xn.meshlambert_frag},phong:{uniforms:wn([jn.common,jn.specularmap,jn.envmap,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)},specular:{value:new Fi(1118481)},shininess:{value:30}}]),vertexShader:Xn.meshphong_vert,fragmentShader:Xn.meshphong_frag},standard:{uniforms:wn([jn.common,jn.envmap,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.roughnessmap,jn.metalnessmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Xn.meshphysical_vert,fragmentShader:Xn.meshphysical_frag},toon:{uniforms:wn([jn.common,jn.aomap,jn.lightmap,jn.emissivemap,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.gradientmap,jn.fog,jn.lights,{emissive:{value:new Fi(0)}}]),vertexShader:Xn.meshtoon_vert,fragmentShader:Xn.meshtoon_frag},matcap:{uniforms:wn([jn.common,jn.bumpmap,jn.normalmap,jn.displacementmap,jn.fog,{matcap:{value:null}}]),vertexShader:Xn.meshmatcap_vert,fragmentShader:Xn.meshmatcap_frag},points:{uniforms:wn([jn.points,jn.fog]),vertexShader:Xn.points_vert,fragmentShader:Xn.points_frag},dashed:{uniforms:wn([jn.common,jn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Xn.linedashed_vert,fragmentShader:Xn.linedashed_frag},depth:{uniforms:wn([jn.common,jn.displacementmap]),vertexShader:Xn.depth_vert,fragmentShader:Xn.depth_frag},normal:{uniforms:wn([jn.common,jn.bumpmap,jn.normalmap,jn.displacementmap,{opacity:{value:1}}]),vertexShader:Xn.meshnormal_vert,fragmentShader:Xn.meshnormal_frag},sprite:{uniforms:wn([jn.sprite,jn.fog]),vertexShader:Xn.sprite_vert,fragmentShader:Xn.sprite_frag},background:{uniforms:{uvTransform:{value:new qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Xn.background_vert,fragmentShader:Xn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Xn.backgroundCube_vert,fragmentShader:Xn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Xn.cube_vert,fragmentShader:Xn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Xn.equirect_vert,fragmentShader:Xn.equirect_frag},distanceRGBA:{uniforms:wn([jn.common,jn.displacementmap,{referencePosition:{value:new _e},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Xn.distanceRGBA_vert,fragmentShader:Xn.distanceRGBA_frag},shadow:{uniforms:wn([jn.lights,jn.fog,{color:{value:new Fi(0)},opacity:{value:1}}]),vertexShader:Xn.shadow_vert,fragmentShader:Xn.shadow_frag}};Yn.physical={uniforms:wn([Yn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new qt},clearcoatNormalScale:{value:new Wt(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new qt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new qt},sheen:{value:0},sheenColor:{value:new Fi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new qt},transmissionSamplerSize:{value:new Wt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new qt},attenuationDistance:{value:0},attenuationColor:{value:new Fi(0)},specularColor:{value:new Fi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new qt},anisotropyVector:{value:new Wt},anisotropyMap:{value:null},anisotropyMapTransform:{value:new qt}}]),vertexShader:Xn.meshphysical_vert,fragmentShader:Xn.meshphysical_frag};const Kn={r:0,b:0,g:0};function Jn(t,e,i,n,r,s,a){const c=new Fi(0);let h,u,d=!0===s?0:1,A=null,p=0,m=null;function g(e,i){e.getRGB(Kn,bn(t)),n.buffers.color.setClear(Kn.r,Kn.g,Kn.b,i,a)}return{getClearColor:function(){return c},setClearColor:function(t,e=1){c.set(t),d=e,g(c,d)},getClearAlpha:function(){return d},setClearAlpha:function(t){d=t,g(c,d)},render:function(s,f){let v=!1,_=!0===f.isScene?f.background:null;if(_&&_.isTexture){_=(f.backgroundBlurriness>0?i:e).get(_)}null===_?g(c,d):_&&_.isColor&&(g(_,1),v=!0);const E=t.xr.getEnvironmentBlendMode();"additive"===E?n.buffers.color.setClear(0,0,0,1,a):"alpha-blend"===E&&n.buffers.color.setClear(0,0,0,0,a),(t.autoClear||v)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),_&&(_.isCubeTexture||_.mapping===M)?(void 0===u&&(u=new Sn(new In(1,1,1),new Bn({name:"BackgroundCubeMaterial",uniforms:Mn(Yn.backgroundCube.uniforms),vertexShader:Yn.backgroundCube.vertexShader,fragmentShader:Yn.backgroundCube.fragmentShader,side:l,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(t,e,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),u.material.uniforms.envMap.value=_,u.material.uniforms.flipEnvMap.value=_.isCubeTexture&&!1===_.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=f.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=f.backgroundIntensity,u.material.toneMapped=ne.getTransfer(_.colorSpace)!==xt,A===_&&p===_.version&&m===t.toneMapping||(u.material.needsUpdate=!0,A=_,p=_.version,m=t.toneMapping),u.layers.enableAll(),s.unshift(u,u.geometry,u.material,0,0,null)):_&&_.isTexture&&(void 0===h&&(h=new Sn(new qn(2,2),new Bn({name:"BackgroundMaterial",uniforms:Mn(Yn.background.uniforms),vertexShader:Yn.background.vertexShader,fragmentShader:Yn.background.fragmentShader,side:o,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(h)),h.material.uniforms.t2D.value=_,h.material.uniforms.backgroundIntensity.value=f.backgroundIntensity,h.material.toneMapped=ne.getTransfer(_.colorSpace)!==xt,!0===_.matrixAutoUpdate&&_.updateMatrix(),h.material.uniforms.uvTransform.value.copy(_.matrix),A===_&&p===_.version&&m===t.toneMapping||(h.material.needsUpdate=!0,A=_,p=_.version,m=t.toneMapping),h.layers.enableAll(),s.unshift(h,h.geometry,h.material,0,0,null))}}}function $n(t,e,i,n){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=n.isWebGL2?null:e.get("OES_vertex_array_object"),a=n.isWebGL2||null!==s,o={},l=A(null);let c=l,h=!1;function u(e){return n.isWebGL2?t.bindVertexArray(e):s.bindVertexArrayOES(e)}function d(e){return n.isWebGL2?t.deleteVertexArray(e):s.deleteVertexArrayOES(e)}function A(t){const e=[],i=[],n=[];for(let t=0;t=0){const i=r[e];let n=s[e];if(void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor)),void 0===i)return!0;if(i.attribute!==n)return!0;if(n&&i.data!==n.data)return!0;a++}}return c.attributesNum!==a||c.index!==n}(r,_,d,E),y&&function(t,e,i,n){const r={},s=e.attributes;let a=0;const o=i.getAttributes();for(const e in o){if(o[e].location>=0){let i=s[e];void 0===i&&("instanceMatrix"===e&&t.instanceMatrix&&(i=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(i=t.instanceColor));const n={};n.attribute=i,i&&i.data&&(n.data=i.data),r[e]=n,a++}}c.attributes=r,c.attributesNum=a,c.index=n}(r,_,d,E)}else{const t=!0===l.wireframe;c.geometry===_.id&&c.program===d.id&&c.wireframe===t||(c.geometry=_.id,c.program=d.id,c.wireframe=t,y=!0)}null!==E&&i.update(E,t.ELEMENT_ARRAY_BUFFER),(y||h)&&(h=!1,function(r,s,a,o){if(!1===n.isWebGL2&&(r.isInstancedMesh||o.isInstancedBufferGeometry)&&null===e.get("ANGLE_instanced_arrays"))return;p();const l=o.attributes,c=a.getAttributes(),h=s.defaultAttributeValues;for(const e in c){const s=c[e];if(s.location>=0){let a=l[e];if(void 0===a&&("instanceMatrix"===e&&r.instanceMatrix&&(a=r.instanceMatrix),"instanceColor"===e&&r.instanceColor&&(a=r.instanceColor)),void 0!==a){const e=a.normalized,l=a.itemSize,c=i.get(a);if(void 0===c)continue;const h=c.buffer,u=c.type,d=c.bytesPerElement,A=!0===n.isWebGL2&&(u===t.INT||u===t.UNSIGNED_INT||a.gpuType===Q);if(a.isInterleavedBufferAttribute){const i=a.data,n=i.stride,c=a.offset;if(i.isInstancedInterleavedBuffer){for(let t=0;t0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name;let a=void 0!==i.precision?i.precision:"highp";const o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||e.has("WEBGL_draw_buffers"),c=!0===i.logarithmicDepthBuffer,h=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),u=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=t.getParameter(t.MAX_TEXTURE_SIZE),A=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),m=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),f=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,_=s||e.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==n)return n;if(!0===e.has("EXT_texture_filter_anisotropic")){const i=e.get("EXT_texture_filter_anisotropic");n=t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:A,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:f,vertexTextures:v,floatFragmentTextures:_,floatVertexTextures:v&&_,maxSamples:s?t.getParameter(t.MAX_SAMPLES):0}}function er(t){const e=this;let i=null,n=0,r=!1,s=!1;const a=new kn,o=new qt,l={value:null,needsUpdate:!1};function c(t,i,n,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=n+4*s,r=i.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length0);e.numPlanes=n,e.numIntersection=0}();else{const t=s?0:n,e=4*t;let r=p.clippingState||null;l.value=r,r=c(u,o,e,h);for(let t=0;t!==e;++t)r[t]=i[t];p.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function ir(t){let e=new WeakMap;function i(t,e){return e===I?t.mapping=S:304===e&&(t.mapping=C),t}function n(t){const i=t.target;i.removeEventListener("dispose",n);const r=e.get(i);void 0!==r&&(e.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping;if(s===I||304===s){if(e.has(r)){return i(e.get(r).texture,r.mapping)}{const s=r.image;if(s&&s.height>0){const a=new Nn(s.height/2);return a.fromEquirectangularTexture(t,r),e.set(r,a),r.addEventListener("dispose",n),i(a.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}class nr extends Rn{constructor(t=-1,e=1,i=1,n=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=n,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,i,n,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let r=i-t,s=i+t,a=n+e,o=n-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,a-=e*this.view.offsetY,o=a-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const rr=[.125,.215,.35,.446,.526,.582],sr=20,ar=new nr,or=new Fi;let lr=null,cr=0,hr=0;const ur=(1+Math.sqrt(5))/2,dr=1/ur,Ar=[new _e(1,1,1),new _e(-1,1,1),new _e(1,1,-1),new _e(-1,1,-1),new _e(0,ur,dr),new _e(0,ur,-dr),new _e(dr,0,ur),new _e(-dr,0,ur),new _e(ur,dr,0),new _e(-ur,dr,0)];class pr{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,i=.1,n=100){lr=this._renderer.getRenderTarget(),cr=this._renderer.getActiveCubeFace(),hr=this._renderer.getActiveMipmapLevel(),this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(t,i,n,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=vr(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=fr(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;tt-4?o=rr[a-t+4-1]:0===a&&(o=0),n.push(o);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,A=6,p=3,m=2,g=1,f=new Float32Array(p*A*d),v=new Float32Array(m*A*d),_=new Float32Array(g*A*d);for(let t=0;t2?0:-1,n=[e,i,0,e+2/3,i,0,e+2/3,i+1,0,e,i,0,e+2/3,i+1,0,e,i+1,0];f.set(n,p*A*t),v.set(u,m*A*t);const r=[t,t,t,t,t,t];_.set(r,g*A*t)}const E=new sn;E.setAttribute("position",new Xi(f,p)),E.setAttribute("uv",new Xi(v,m)),E.setAttribute("faceIndex",new Xi(_,g)),e.push(E),r>4&&r--}return{lodPlanes:e,sizeLods:i,sigmas:n}}(n)),this._blurMaterial=function(t,e,i){const n=new Float32Array(sr),r=new _e(0,1,0),s=new Bn({name:"SphericalGaussianBlur",defines:{n:sr,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:_r(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return s}(n,t,e)}return n}_compileMaterial(t){const e=new Sn(this._lodPlanes[0],t);this._renderer.compile(e,ar)}_sceneToCubeUV(t,e,i,n){const r=new Ln(90,1,e,i),s=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],o=this._renderer,c=o.autoClear,h=o.toneMapping;o.getClearColor(or),o.toneMapping=p,o.autoClear=!1;const u=new Gi({name:"PMREM.Background",side:l,depthWrite:!1,depthTest:!1}),d=new Sn(new In,u);let A=!1;const m=t.background;m?m.isColor&&(u.color.copy(m),t.background=null,A=!0):(u.color.copy(or),A=!0);for(let e=0;e<6;e++){const i=e%3;0===i?(r.up.set(0,s[e],0),r.lookAt(a[e],0,0)):1===i?(r.up.set(0,0,s[e]),r.lookAt(0,a[e],0)):(r.up.set(0,s[e],0),r.lookAt(0,0,a[e]));const l=this._cubeSize;gr(n,i*l,e>2?l:0,l,l),o.setRenderTarget(n),A&&o.render(d,r),o.render(t,r)}d.geometry.dispose(),d.material.dispose(),o.toneMapping=h,o.autoClear=c,t.background=m}_textureToCubeUV(t,e){const i=this._renderer,n=t.mapping===S||t.mapping===C;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=vr()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=fr());const r=n?this._cubemapMaterial:this._equirectMaterial,s=new Sn(this._lodPlanes[0],r);r.uniforms.envMap.value=t;const a=this._cubeSize;gr(e,0,0,3*a,2*a),i.setRenderTarget(e),i.render(s,ar)}_applyPMREM(t){const e=this._renderer,i=e.autoClear;e.autoClear=!1;for(let e=1;esr&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let t=0;tf-4?n-f+4:0),4*(this._cubeSize-v),3*v,2*v),o.setRenderTarget(e),o.render(c,ar)}}function mr(t,e,i){const n=new me(t,e,i);return n.texture.mapping=M,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function gr(t,e,i,n,r){t.viewport.set(e,i,n,r),t.scissor.set(e,i,n,r)}function fr(){return new Bn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:_r(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function vr(){return new Bn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:_r(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function _r(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Er(t){let e=new WeakMap,i=null;function n(t){const i=t.target;i.removeEventListener("dispose",n);const r=e.get(i);void 0!==r&&(e.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,a=s===I||304===s,o=s===S||s===C;if(a||o){if(r.isRenderTargetTexture&&!0===r.needsPMREMUpdate){r.needsPMREMUpdate=!1;let n=e.get(r);return null===i&&(i=new pr(t)),n=a?i.fromEquirectangular(r,n):i.fromCubemap(r,n),e.set(r,n),n.texture}if(e.has(r))return e.get(r).texture;{const s=r.image;if(a&&s&&s.height>0||o&&s&&function(t){let e=0;const i=6;for(let n=0;ne.maxTextureSize&&(I=Math.ceil(C/e.maxTextureSize),C=e.maxTextureSize);const M=new Float32Array(C*I*4*A),w=new ge(M,C,I,A);w.type=k,w.needsUpdate=!0;const b=4*S;for(let B=0;B0)return t;const r=e*i;let s=Pr[r];if(void 0===s&&(s=new Float32Array(r),Pr[r]=s),0!==e){n.toArray(s,0);for(let n=1,r=0;n!==e;++n)r+=i,t[n].toArray(s,r)}return s}function Gr(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i":" "} ${r}: ${i[t]}`)}return n.join("\n")}(t.getShaderSource(e),n)}return r}function Os(t,e){const i=function(t){const e=ne.getPrimaries(ne.workingColorSpace),i=ne.getPrimaries(t);let n;switch(e===i?n="":e===Ct&&i===St?n="LinearDisplayP3ToLinearSRGB":e===St&&i===Ct&&(n="LinearSRGBToLinearDisplayP3"),t){case vt:case Et:return[n,"LinearTransferOETF"];case ft:case _t:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[n,"LinearTransferOETF"]}}(e);return`vec4 ${t}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function ks(t,e){let i;switch(e){case m:i="Linear";break;case g:i="Reinhard";break;case f:i="OptimizedCineon";break;case v:i="ACESFilmic";break;case E:i="AgX";break;case _:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),i="Linear"}return"vec3 "+t+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function Gs(t){return""!==t}function Hs(t,e){const i=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,i).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function zs(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Vs=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ws(t){return t.replace(Vs,Xs)}const qs=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Xs(t,e){let i=Xn[e];if(void 0===i){const t=qs.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");i=Xn[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return Ws(i)}const js=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ys(t){return t.replace(js,Ks)}function Ks(t,e,i,n){let r="";for(let t=parseInt(e);t0&&(w+="\n"),b=[E,"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,x].filter(Gs).join("\n"),b.length>0&&(b+="\n")):(w=[Js(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,x,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+f:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.morphColors&&i.isWebGL2?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0&&i.isWebGL2?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+m:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Gs).join("\n"),b=[E,Js(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,x,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+g:"",i.envMap?"#define "+f:"",i.envMap?"#define "+v:"",_?"#define CUBEUV_TEXEL_WIDTH "+_.texelWidth:"",_?"#define CUBEUV_TEXEL_HEIGHT "+_.texelHeight:"",_?"#define CUBEUV_MAX_MIP "+_.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+m:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.logarithmicDepthBuffer&&i.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==p?"#define TONE_MAPPING":"",i.toneMapping!==p?Xn.tonemapping_pars_fragment:"",i.toneMapping!==p?ks("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",Xn.colorspace_pars_fragment,Os("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(Gs).join("\n")),c=Ws(c),c=Hs(c,i),c=zs(c,i),h=Ws(h),h=Hs(h,i),h=zs(h,i),c=Ys(c),h=Ys(h),i.isWebGL2&&!0!==i.isRawShaderMaterial&&(T="#version 300 es\n",w=[y,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+w,b=["precision mediump sampler2DArray;","#define varying in",i.glslVersion===wt?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===wt?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+b);const B=T+w+c,R=T+b+h,L=Ps(o,o.VERTEX_SHADER,B),D=Ps(o,o.FRAGMENT_SHADER,R);function U(e){if(t.debug.checkShaderErrors){const i=o.getProgramInfoLog(I).trim(),n=o.getShaderInfoLog(L).trim(),r=o.getShaderInfoLog(D).trim();let s=!0,a=!0;if(!1===o.getProgramParameter(I,o.LINK_STATUS))if(s=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(o,I,L,D);else{const t=Qs(o,L,"vertex"),e=Qs(o,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+o.getError()+" - VALIDATE_STATUS "+o.getProgramParameter(I,o.VALIDATE_STATUS)+"\n\nProgram Info Log: "+i+"\n"+t+"\n"+e)}else""!==i?console.warn("THREE.WebGLProgram: Program Info Log:",i):""!==n&&""!==r||(a=!1);a&&(e.diagnostics={runnable:s,programLog:i,vertexShader:{log:n,prefix:w},fragmentShader:{log:r,prefix:b}})}o.deleteShader(L),o.deleteShader(D),P=new Us(o,I),N=function(t,e){const i={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r0,K=s.clearcoat>0,J=s.iridescence>0,$=s.sheen>0,Z=s.transmission>0,tt=Y&&!!s.anisotropyMap,et=K&&!!s.clearcoatMap,it=K&&!!s.clearcoatNormalMap,nt=K&&!!s.clearcoatRoughnessMap,rt=J&&!!s.iridescenceMap,st=J&&!!s.iridescenceThicknessMap,at=$&&!!s.sheenColorMap,ot=$&&!!s.sheenRoughnessMap,lt=!!s.specularMap,ct=!!s.specularColorMap,ht=!!s.specularIntensityMap,ut=Z&&!!s.transmissionMap,dt=Z&&!!s.thicknessMap,At=!!s.gradientMap,pt=!!s.alphaMap,mt=s.alphaTest>0,gt=!!s.alphaHash,ft=!!s.extensions,_t=!!x.attributes.uv1,Et=!!x.attributes.uv2,yt=!!x.attributes.uv3;let St=p;return s.toneMapped&&(null!==P&&!0!==P.isXRRenderTarget||(St=t.toneMapping)),{isWebGL2:d,shaderID:w,shaderType:s.type,shaderName:s.name,vertexShader:B,fragmentShader:R,defines:s.defines,customVertexShaderID:L,customFragmentShaderID:D,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:g,batching:F,instancing:N,instancingColor:N&&null!==E.instanceColor,supportsVertexTextures:m,outputColorSpace:null===P?t.outputColorSpace:!0===P.isXRRenderTarget?P.texture.colorSpace:vt,map:Q,matcap:O,envMap:k,envMapMode:k&&C.mapping,envMapCubeUVHeight:I,aoMap:G,lightMap:H,bumpMap:z,normalMap:V,displacementMap:m&&W,emissiveMap:q,normalMapObjectSpace:V&&1===s.normalMapType,normalMapTangentSpace:V&&0===s.normalMapType,metalnessMap:X,roughnessMap:j,anisotropy:Y,anisotropyMap:tt,clearcoat:K,clearcoatMap:et,clearcoatNormalMap:it,clearcoatRoughnessMap:nt,iridescence:J,iridescenceMap:rt,iridescenceThicknessMap:st,sheen:$,sheenColorMap:at,sheenRoughnessMap:ot,specularMap:lt,specularColorMap:ct,specularIntensityMap:ht,transmission:Z,transmissionMap:ut,thicknessMap:dt,gradientMap:At,opaque:!1===s.transparent&&1===s.blending,alphaMap:pt,alphaTest:mt,alphaHash:gt,combine:s.combine,mapUv:Q&&v(s.map.channel),aoMapUv:G&&v(s.aoMap.channel),lightMapUv:H&&v(s.lightMap.channel),bumpMapUv:z&&v(s.bumpMap.channel),normalMapUv:V&&v(s.normalMap.channel),displacementMapUv:W&&v(s.displacementMap.channel),emissiveMapUv:q&&v(s.emissiveMap.channel),metalnessMapUv:X&&v(s.metalnessMap.channel),roughnessMapUv:j&&v(s.roughnessMap.channel),anisotropyMapUv:tt&&v(s.anisotropyMap.channel),clearcoatMapUv:et&&v(s.clearcoatMap.channel),clearcoatNormalMapUv:it&&v(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nt&&v(s.clearcoatRoughnessMap.channel),iridescenceMapUv:rt&&v(s.iridescenceMap.channel),iridescenceThicknessMapUv:st&&v(s.iridescenceThicknessMap.channel),sheenColorMapUv:at&&v(s.sheenColorMap.channel),sheenRoughnessMapUv:ot&&v(s.sheenRoughnessMap.channel),specularMapUv:lt&&v(s.specularMap.channel),specularColorMapUv:ct&&v(s.specularColorMap.channel),specularIntensityMapUv:ht&&v(s.specularIntensityMap.channel),transmissionMapUv:ut&&v(s.transmissionMap.channel),thicknessMapUv:dt&&v(s.thicknessMap.channel),alphaMapUv:pt&&v(s.alphaMap.channel),vertexTangents:!!x.attributes.tangent&&(V||Y),vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!x.attributes.color&&4===x.attributes.color.itemSize,vertexUv1s:_t,vertexUv2s:Et,vertexUv3s:yt,pointsUvs:!0===E.isPoints&&!!x.attributes.uv&&(Q||pt),fog:!!y,useFog:!0===s.fog,fogExp2:y&&y.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:A,skinning:!0===E.isSkinnedMesh,morphTargets:void 0!==x.morphAttributes.position,morphNormals:void 0!==x.morphAttributes.normal,morphColors:void 0!==x.morphAttributes.color,morphTargetsCount:T,morphTextureStride:U,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:s.dithering,shadowMapEnabled:t.shadowMap.enabled&&u.length>0,shadowMapType:t.shadowMap.type,toneMapping:St,useLegacyLights:t._useLegacyLights,decodeVideoTexture:Q&&!0===s.map.isVideoTexture&&ne.getTransfer(s.map.colorSpace)===xt,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===c,flipSided:s.side===l,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:ft&&!0===s.extensions.derivatives,extensionFragDepth:ft&&!0===s.extensions.fragDepth,extensionDrawBuffers:ft&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:ft&&!0===s.extensions.shaderTextureLOD,extensionClipCullDistance:ft&&s.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:d||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||n.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(e){const i=[];if(e.shaderID?i.push(e.shaderID):(i.push(e.customVertexShaderID),i.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)i.push(t),i.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(i,e),function(t,e){o.disableAll(),e.isWebGL2&&o.enable(0);e.supportsVertexTextures&&o.enable(1);e.instancing&&o.enable(2);e.instancingColor&&o.enable(3);e.matcap&&o.enable(4);e.envMap&&o.enable(5);e.normalMapObjectSpace&&o.enable(6);e.normalMapTangentSpace&&o.enable(7);e.clearcoat&&o.enable(8);e.iridescence&&o.enable(9);e.alphaTest&&o.enable(10);e.vertexColors&&o.enable(11);e.vertexAlphas&&o.enable(12);e.vertexUv1s&&o.enable(13);e.vertexUv2s&&o.enable(14);e.vertexUv3s&&o.enable(15);e.vertexTangents&&o.enable(16);e.anisotropy&&o.enable(17);e.alphaHash&&o.enable(18);e.batching&&o.enable(19);t.push(o.mask),o.disableAll(),e.fog&&o.enable(0);e.useFog&&o.enable(1);e.flatShading&&o.enable(2);e.logarithmicDepthBuffer&&o.enable(3);e.skinning&&o.enable(4);e.morphTargets&&o.enable(5);e.morphNormals&&o.enable(6);e.morphColors&&o.enable(7);e.premultipliedAlpha&&o.enable(8);e.shadowMapEnabled&&o.enable(9);e.useLegacyLights&&o.enable(10);e.doubleSided&&o.enable(11);e.flipSided&&o.enable(12);e.useDepthPacking&&o.enable(13);e.dithering&&o.enable(14);e.transmission&&o.enable(15);e.sheen&&o.enable(16);e.opaque&&o.enable(17);e.pointsUvs&&o.enable(18);e.decodeVideoTexture&&o.enable(19);t.push(o.mask)}(i,e),i.push(t.outputColorSpace)),i.push(e.customProgramCacheKey),i.join()},getUniforms:function(t){const e=f[t.type];let i;if(e){const t=Yn[e];i=Tn.clone(t.uniforms)}else i=t.uniforms;return i},acquireProgram:function(e,i){let n;for(let t=0,e=u.length;t0?n.push(h):!0===a.transparent?r.push(h):i.push(h)},unshift:function(t,e,a,o,l,c){const h=s(t,e,a,o,l,c);a.transmission>0?n.unshift(h):!0===a.transparent?r.unshift(h):i.unshift(h)},finish:function(){for(let i=e,n=t.length;i1&&i.sort(t||ra),n.length>1&&n.sort(e||sa),r.length>1&&r.sort(e||sa)}}}function oa(){let t=new WeakMap;return{get:function(e,i){const n=t.get(e);let r;return void 0===n?(r=new aa,t.set(e,[r])):i>=n.length?(r=new aa,n.push(r)):r=n[i],r},dispose:function(){t=new WeakMap}}}function la(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let i;switch(e.type){case"DirectionalLight":i={direction:new _e,color:new Fi};break;case"SpotLight":i={position:new _e,direction:new _e,color:new Fi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new _e,color:new Fi,distance:0,decay:0};break;case"HemisphereLight":i={direction:new _e,skyColor:new Fi,groundColor:new Fi};break;case"RectAreaLight":i={color:new Fi,position:new _e,halfWidth:new _e,halfHeight:new _e}}return t[e.id]=i,i}}}let ca=0;function ha(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function ua(t,e){const i=new la,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let i;switch(e.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wt};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wt,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=i,i}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let t=0;t<9;t++)r.probe.push(new _e);const s=new _e,a=new Ye,o=new Ye;return{setup:function(s,a){let o=0,l=0,c=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let h=0,u=0,d=0,A=0,p=0,m=0,g=0,f=0,v=0,_=0,E=0;s.sort(ha);const y=!0===a?Math.PI:1;for(let t=0,e=s.length;t0&&(e.isWebGL2?!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=jn.LTC_FLOAT_1,r.rectAreaLTC2=jn.LTC_FLOAT_2):(r.rectAreaLTC1=jn.LTC_HALF_1,r.rectAreaLTC2=jn.LTC_HALF_2):!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=jn.LTC_FLOAT_1,r.rectAreaLTC2=jn.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=jn.LTC_HALF_1,r.rectAreaLTC2=jn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=o,r.ambient[1]=l,r.ambient[2]=c;const x=r.hash;x.directionalLength===h&&x.pointLength===u&&x.spotLength===d&&x.rectAreaLength===A&&x.hemiLength===p&&x.numDirectionalShadows===m&&x.numPointShadows===g&&x.numSpotShadows===f&&x.numSpotMaps===v&&x.numLightProbes===E||(r.directional.length=h,r.spot.length=d,r.rectArea.length=A,r.point.length=u,r.hemi.length=p,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=g,r.pointShadowMap.length=g,r.spotShadow.length=f,r.spotShadowMap.length=f,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=g,r.spotLightMatrix.length=f+v-_,r.spotLightMap.length=v,r.numSpotLightShadowsWithMaps=_,r.numLightProbes=E,x.directionalLength=h,x.pointLength=u,x.spotLength=d,x.rectAreaLength=A,x.hemiLength=p,x.numDirectionalShadows=m,x.numPointShadows=g,x.numSpotShadows=f,x.numSpotMaps=v,x.numLightProbes=E,r.version=ca++)},setupView:function(t,e){let i=0,n=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e=s.length?(a=new da(t,e),s.push(a)):a=s[r],a},dispose:function(){i=new WeakMap}}}class pa extends ki{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class ma extends ki{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function ga(t,e,i){let n=new zn;const s=new Wt,h=new Wt,u=new Ae,d=new pa({depthPacking:3201}),A=new ma,p={},m=i.maxTextureSize,g={[o]:l,[l]:o,[c]:c},f=new Bn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wt},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),v=f.clone();v.defines.HORIZONTAL_PASS=1;const _=new sn;_.setAttribute("position",new Xi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const E=new Sn(_,f),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=r;let x=this.type;function S(i,n){const r=e.update(E);f.defines.VSM_SAMPLES!==i.blurSamples&&(f.defines.VSM_SAMPLES=i.blurSamples,v.defines.VSM_SAMPLES=i.blurSamples,f.needsUpdate=!0,v.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new me(s.x,s.y)),f.uniforms.shadow_pass.value=i.map.texture,f.uniforms.resolution.value=i.mapSize,f.uniforms.radius.value=i.radius,t.setRenderTarget(i.mapPass),t.clear(),t.renderBufferDirect(n,null,r,f,E,null),v.uniforms.shadow_pass.value=i.mapPass.texture,v.uniforms.resolution.value=i.mapSize,v.uniforms.radius.value=i.radius,t.setRenderTarget(i.map),t.clear(),t.renderBufferDirect(n,null,r,v,E,null)}function C(e,i,n,r){let s=null;const o=!0===n.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==o)s=o;else if(s=!0===n.isPointLight?A:d,t.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){const t=s.uuid,e=i.uuid;let n=p[t];void 0===n&&(n={},p[t]=n);let r=n[e];void 0===r&&(r=s.clone(),n[e]=r,i.addEventListener("dispose",M)),s=r}if(s.visible=i.visible,s.wireframe=i.wireframe,s.side=r===a?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:g[i.side],s.alphaMap=i.alphaMap,s.alphaTest=i.alphaTest,s.map=i.map,s.clipShadows=i.clipShadows,s.clippingPlanes=i.clippingPlanes,s.clipIntersection=i.clipIntersection,s.displacementMap=i.displacementMap,s.displacementScale=i.displacementScale,s.displacementBias=i.displacementBias,s.wireframeLinewidth=i.wireframeLinewidth,s.linewidth=i.linewidth,!0===n.isPointLight&&!0===s.isMeshDistanceMaterial){t.properties.get(s).light=n}return s}function I(i,r,s,o,l){if(!1===i.visible)return;if(i.layers.test(r.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&l===a)&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,i.matrixWorld);const n=e.update(i),a=i.material;if(Array.isArray(a)){const e=n.groups;for(let c=0,h=e.length;cm||s.y>m)&&(s.x>m&&(h.x=Math.floor(m/g.x),s.x=h.x*g.x,c.mapSize.x=h.x),s.y>m&&(h.y=Math.floor(m/g.y),s.y=h.y*g.y,c.mapSize.y=h.y)),null===c.map||!0===A||!0===p){const t=this.type!==a?{minFilter:B,magFilter:B}:{};null!==c.map&&c.map.dispose(),c.map=new me(s.x,s.y,t),c.map.texture.name=l.name+".shadowMap",c.camera.updateProjectionMatrix()}t.setRenderTarget(c.map),t.clear();const f=c.getViewportCount();for(let t=0;t=1):-1!==N.indexOf("OpenGL ES")&&(P=parseFloat(/^OpenGL ES (\d)/.exec(N)[1]),U=P>=2);let F=null,Q={};const O=t.getParameter(t.SCISSOR_BOX),k=t.getParameter(t.VIEWPORT),G=(new Ae).fromArray(O),H=(new Ae).fromArray(k);function z(e,i,r,s){const a=new Uint8Array(4),o=t.createTexture();t.bindTexture(e,o),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let o=0;on||t.height>n)&&(r=n/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const n=e?Gt:Math.floor,s=n(r*t.width),a=n(r*t.height);void 0===u&&(u=p(s,a));const o=i?p(s,a):u;o.width=s,o.height=a;return o.getContext("2d").drawImage(t,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+s+"x"+a+")."),o}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function g(t){return kt(t.width)&&kt(t.height)}function f(t,e){return t.generateMipmaps&&e&&t.minFilter!==B&&t.minFilter!==D}function v(e){t.generateMipmap(e)}function _(i,n,r,s,a=!1){if(!1===o)return n;if(null!==i){if(void 0!==t[i])return t[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let l=n;if(n===t.RED&&(r===t.FLOAT&&(l=t.R32F),r===t.HALF_FLOAT&&(l=t.R16F),r===t.UNSIGNED_BYTE&&(l=t.R8)),n===t.RED_INTEGER&&(r===t.UNSIGNED_BYTE&&(l=t.R8UI),r===t.UNSIGNED_SHORT&&(l=t.R16UI),r===t.UNSIGNED_INT&&(l=t.R32UI),r===t.BYTE&&(l=t.R8I),r===t.SHORT&&(l=t.R16I),r===t.INT&&(l=t.R32I)),n===t.RG&&(r===t.FLOAT&&(l=t.RG32F),r===t.HALF_FLOAT&&(l=t.RG16F),r===t.UNSIGNED_BYTE&&(l=t.RG8)),n===t.RGBA){const e=a?yt:ne.getTransfer(s);r===t.FLOAT&&(l=t.RGBA32F),r===t.HALF_FLOAT&&(l=t.RGBA16F),r===t.UNSIGNED_BYTE&&(l=e===xt?t.SRGB8_ALPHA8:t.RGBA8),r===t.UNSIGNED_SHORT_4_4_4_4&&(l=t.RGBA4),r===t.UNSIGNED_SHORT_5_5_5_1&&(l=t.RGB5_A1)}return l!==t.R16F&&l!==t.R32F&&l!==t.RG16F&&l!==t.RG32F&&l!==t.RGBA16F&&l!==t.RGBA32F||e.get("EXT_color_buffer_float"),l}function E(t,e,i){return!0===f(t,i)||t.isFramebufferTexture&&t.minFilter!==B&&t.minFilter!==D?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function y(e){return e===B||e===R||e===L?t.NEAREST:t.LINEAR}function x(t){const e=t.target;e.removeEventListener("dispose",x),function(t){const e=n.get(t);if(void 0===e.__webglInit)return;const i=t.source,r=d.get(i);if(r){const n=r[e.__cacheKey];n.usedTimes--,0===n.usedTimes&&C(t),0===Object.keys(r).length&&d.delete(i)}n.remove(t)}(e),e.isVideoTexture&&h.delete(e)}function S(e){const i=e.target;i.removeEventListener("dispose",S),function(e){const i=e.texture,r=n.get(e),s=n.get(i);void 0!==s.__webglTexture&&(t.deleteTexture(s.__webglTexture),a.memory.textures--);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(r.__webglFramebuffer[e]))for(let i=0;i0&&s.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void K(s,e,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(t.TEXTURE_2D,s.__webglTexture,t.TEXTURE0+r)}const Q={[w]:t.REPEAT,[b]:t.CLAMP_TO_EDGE,[T]:t.MIRRORED_REPEAT},q={[B]:t.NEAREST,[R]:t.NEAREST_MIPMAP_NEAREST,[L]:t.NEAREST_MIPMAP_LINEAR,[D]:t.LINEAR,[U]:t.LINEAR_MIPMAP_NEAREST,[P]:t.LINEAR_MIPMAP_LINEAR},X={512:t.NEVER,519:t.ALWAYS,513:t.LESS,515:t.LEQUAL,514:t.EQUAL,518:t.GEQUAL,516:t.GREATER,517:t.NOTEQUAL};function j(i,s,a){if(a?(t.texParameteri(i,t.TEXTURE_WRAP_S,Q[s.wrapS]),t.texParameteri(i,t.TEXTURE_WRAP_T,Q[s.wrapT]),i!==t.TEXTURE_3D&&i!==t.TEXTURE_2D_ARRAY||t.texParameteri(i,t.TEXTURE_WRAP_R,Q[s.wrapR]),t.texParameteri(i,t.TEXTURE_MAG_FILTER,q[s.magFilter]),t.texParameteri(i,t.TEXTURE_MIN_FILTER,q[s.minFilter])):(t.texParameteri(i,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(i,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),i!==t.TEXTURE_3D&&i!==t.TEXTURE_2D_ARRAY||t.texParameteri(i,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),s.wrapS===b&&s.wrapT===b||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(i,t.TEXTURE_MAG_FILTER,y(s.magFilter)),t.texParameteri(i,t.TEXTURE_MIN_FILTER,y(s.minFilter)),s.minFilter!==B&&s.minFilter!==D&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),s.compareFunction&&(t.texParameteri(i,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(i,t.TEXTURE_COMPARE_FUNC,X[s.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){const a=e.get("EXT_texture_filter_anisotropic");if(s.magFilter===B)return;if(s.minFilter!==L&&s.minFilter!==P)return;if(s.type===k&&!1===e.has("OES_texture_float_linear"))return;if(!1===o&&s.type===G&&!1===e.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||n.get(s).__currentAnisotropy)&&(t.texParameterf(i,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),n.get(s).__currentAnisotropy=s.anisotropy)}}function Y(e,i){let n=!1;void 0===e.__webglInit&&(e.__webglInit=!0,i.addEventListener("dispose",x));const r=i.source;let s=d.get(r);void 0===s&&(s={},d.set(r,s));const o=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(i);if(o!==e.__cacheKey){void 0===s[o]&&(s[o]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,n=!0),s[o].usedTimes++;const r=s[e.__cacheKey];void 0!==r&&(s[e.__cacheKey].usedTimes--,0===r.usedTimes&&C(i)),e.__cacheKey=o,e.__webglTexture=s[o].texture}return n}function K(e,a,l){let c=t.TEXTURE_2D;(a.isDataArrayTexture||a.isCompressedArrayTexture)&&(c=t.TEXTURE_2D_ARRAY),a.isData3DTexture&&(c=t.TEXTURE_3D);const h=Y(e,a),u=a.source;i.bindTexture(c,e.__webglTexture,t.TEXTURE0+l);const d=n.get(u);if(u.version!==d.__version||!0===h){i.activeTexture(t.TEXTURE0+l);const e=ne.getPrimaries(ne.workingColorSpace),n=a.colorSpace===gt?null:ne.getPrimaries(a.colorSpace),A=a.colorSpace===gt||e===n?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,A);const p=function(t){return!o&&(t.wrapS!==b||t.wrapT!==b||t.minFilter!==B&&t.minFilter!==D)}(a)&&!1===g(a.image);let y=m(a.image,p,!1,r.maxTextureSize);y=nt(a,y);const x=g(y)||o,S=s.convert(a.format,a.colorSpace);let C,I=s.convert(a.type),M=_(a.internalFormat,S,I,a.colorSpace,a.isVideoTexture);j(c,a,x);const w=a.mipmaps,T=o&&!0!==a.isVideoTexture&&M!==tt,R=void 0===d.__version||!0===h,L=E(a,y,x);if(a.isDepthTexture)M=t.DEPTH_COMPONENT,o?M=a.type===k?t.DEPTH_COMPONENT32F:a.type===O?t.DEPTH_COMPONENT24:a.type===H?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT16:a.type===k&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),a.format===V&&M===t.DEPTH_COMPONENT&&a.type!==F&&a.type!==O&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),a.type=O,I=s.convert(a.type)),a.format===W&&M===t.DEPTH_COMPONENT&&(M=t.DEPTH_STENCIL,a.type!==H&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),a.type=H,I=s.convert(a.type))),R&&(T?i.texStorage2D(t.TEXTURE_2D,1,M,y.width,y.height):i.texImage2D(t.TEXTURE_2D,0,M,y.width,y.height,0,S,I,null));else if(a.isDataTexture)if(w.length>0&&x){T&&R&&i.texStorage2D(t.TEXTURE_2D,L,M,w[0].width,w[0].height);for(let e=0,n=w.length;e>=1,n>>=1}}else if(w.length>0&&x){T&&R&&i.texStorage2D(t.TEXTURE_2D,L,M,w[0].width,w[0].height);for(let e=0,n=w.length;e>h),n=Math.max(1,r.height>>h);c===t.TEXTURE_3D||c===t.TEXTURE_2D_ARRAY?i.texImage3D(c,h,A,e,n,r.depth,0,u,d,null):i.texImage2D(c,h,A,e,n,0,u,d,null)}i.bindFramebuffer(t.FRAMEBUFFER,e),it(r)?l.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,o,c,n.get(a).__webglTexture,0,et(r)):(c===t.TEXTURE_2D||c>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,o,c,n.get(a).__webglTexture,h),i.bindFramebuffer(t.FRAMEBUFFER,null)}function $(e,i,n){if(t.bindRenderbuffer(t.RENDERBUFFER,e),i.depthBuffer&&!i.stencilBuffer){let r=!0===o?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(n||it(i)){const e=i.depthTexture;e&&e.isDepthTexture&&(e.type===k?r=t.DEPTH_COMPONENT32F:e.type===O&&(r=t.DEPTH_COMPONENT24));const n=et(i);it(i)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,n,r,i.width,i.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,n,r,i.width,i.height)}else t.renderbufferStorage(t.RENDERBUFFER,r,i.width,i.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(i.depthBuffer&&i.stencilBuffer){const r=et(i);n&&!1===it(i)?t.renderbufferStorageMultisample(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,i.width,i.height):it(i)?l.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,i.width,i.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,i.width,i.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=!0===i.isWebGLMultipleRenderTargets?i.texture:[i.texture];for(let r=0;r0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function nt(t,i){const n=t.colorSpace,r=t.format,s=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||t.format===bt||n!==vt&&n!==gt&&(ne.getTransfer(n)===xt?!1===o?!0===e.has("EXT_sRGB")&&r===z?(t.format=bt,t.minFilter=D,t.generateMipmaps=!1):i=oe.sRGBToLinear(i):r===z&&s===N||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),i}this.allocateTextureUnit=function(){const t=I;return t>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+r.maxTextures),I+=1,t},this.resetTextureUnits=function(){I=0},this.setTexture2D=M,this.setTexture2DArray=function(e,r){const s=n.get(e);e.version>0&&s.__version!==e.version?K(s,e,r):i.bindTexture(t.TEXTURE_2D_ARRAY,s.__webglTexture,t.TEXTURE0+r)},this.setTexture3D=function(e,r){const s=n.get(e);e.version>0&&s.__version!==e.version?K(s,e,r):i.bindTexture(t.TEXTURE_3D,s.__webglTexture,t.TEXTURE0+r)},this.setTextureCube=function(e,a){const l=n.get(e);e.version>0&&l.__version!==e.version?function(e,a,l){if(6!==a.image.length)return;const c=Y(e,a),h=a.source;i.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+l);const u=n.get(h);if(h.version!==u.__version||!0===c){i.activeTexture(t.TEXTURE0+l);const e=ne.getPrimaries(ne.workingColorSpace),n=a.colorSpace===gt?null:ne.getPrimaries(a.colorSpace),d=a.colorSpace===gt||e===n?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const A=a.isCompressedTexture||a.image[0].isCompressedTexture,p=a.image[0]&&a.image[0].isDataTexture,y=[];for(let t=0;t<6;t++)y[t]=A||p?p?a.image[t].image:a.image[t]:m(a.image[t],!1,!0,r.maxCubemapSize),y[t]=nt(a,y[t]);const x=y[0],S=g(x)||o,C=s.convert(a.format,a.colorSpace),I=s.convert(a.type),M=_(a.internalFormat,C,I,a.colorSpace),w=o&&!0!==a.isVideoTexture,b=void 0===u.__version||!0===c;let T,B=E(a,x,S);if(j(t.TEXTURE_CUBE_MAP,a,S),A){w&&b&&i.texStorage2D(t.TEXTURE_CUBE_MAP,B,M,x.width,x.height);for(let e=0;e<6;e++){T=y[e].mipmaps;for(let n=0;n0&&B++,i.texStorage2D(t.TEXTURE_CUBE_MAP,B,M,y[0].width,y[0].height));for(let e=0;e<6;e++)if(p){w?i.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,y[e].width,y[e].height,C,I,y[e].data):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,M,y[e].width,y[e].height,0,C,I,y[e].data);for(let n=0;n0){c.__webglFramebuffer[e]=[];for(let i=0;i0){c.__webglFramebuffer=[];for(let e=0;e0&&!1===it(e)){const n=d?l:[l];c.__webglMultisampledFramebuffer=t.createFramebuffer(),c.__webglColorRenderbuffer=[],i.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let i=0;i0)for(let n=0;n0)for(let i=0;i0&&!1===it(e)){const r=e.isWebGLMultipleRenderTargets?e.texture:[e.texture],s=e.width,a=e.height;let o=t.COLOR_BUFFER_BIT;const l=[],h=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,u=n.get(e),d=!0===e.isWebGLMultipleRenderTargets;if(d)for(let e=0;eo+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&(r=e.getPose(t.gripSpace,i),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(n=e.getPose(t.targetRaySpace,i),null===n&&null!==r&&(n=r),null!==n&&(a.matrix.fromArray(n.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,n.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(n.linearVelocity)):a.hasLinearVelocity=!1,n.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(n.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(xa)))}return null!==a&&(a.visible=null!==n),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const i=new ya;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[e.jointName]=i,t.add(i)}return t.joints[e.jointName]}}class Ca extends Rt{constructor(t,e){super();const i=this;let n=null,r=1,s=null,a="local-floor",o=1,l=null,c=null,h=null,u=null,d=null,A=null;const p=e.getContextAttributes();let m=null,g=null;const f=[],v=[],_=new Wt;let E=null;const y=new Ln;y.layers.enable(1),y.viewport=new Ae;const x=new Ln;x.layers.enable(2),x.viewport=new Ae;const S=[y,x],C=new Ea;C.layers.enable(1),C.layers.enable(2);let I=null,M=null;function w(t){const e=v.indexOf(t.inputSource);if(-1===e)return;const i=f[e];void 0!==i&&(i.update(t.inputSource,t.frame,l||s),i.dispatchEvent({type:t.type,data:t.inputSource}))}function b(){n.removeEventListener("select",w),n.removeEventListener("selectstart",w),n.removeEventListener("selectend",w),n.removeEventListener("squeeze",w),n.removeEventListener("squeezestart",w),n.removeEventListener("squeezeend",w),n.removeEventListener("end",b),n.removeEventListener("inputsourceschange",T);for(let t=0;t=0&&(v[n]=null,f[n].disconnect(i))}for(let e=0;e=v.length){v.push(i),n=t;break}if(null===v[t]){v[t]=i,n=t;break}}if(-1===n)break}const r=f[n];r&&r.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=f[t];return void 0===e&&(e=new Sa,f[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=f[t];return void 0===e&&(e=new Sa,f[t]=e),e.getGripSpace()},this.getHand=function(t){let e=f[t];return void 0===e&&(e=new Sa,f[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){a=t,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(t){l=t},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return A},this.getSession=function(){return n},this.setSession=async function(c){if(n=c,null!==n){if(m=t.getRenderTarget(),n.addEventListener("select",w),n.addEventListener("selectstart",w),n.addEventListener("selectend",w),n.addEventListener("squeeze",w),n.addEventListener("squeezestart",w),n.addEventListener("squeezeend",w),n.addEventListener("end",b),n.addEventListener("inputsourceschange",T),!0!==p.xrCompatible&&await e.makeXRCompatible(),E=t.getPixelRatio(),t.getSize(_),void 0===n.renderState.layers||!1===t.capabilities.isWebGL2){const i={antialias:void 0!==n.renderState.layers||p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:r};d=new XRWebGLLayer(n,e,i),n.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),g=new me(d.framebufferWidth,d.framebufferHeight,{format:z,type:N,colorSpace:t.outputColorSpace,stencilBuffer:p.stencil})}else{let i=null,s=null,a=null;p.depth&&(a=p.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,i=p.stencil?W:V,s=p.stencil?H:O);const o={colorFormat:e.RGBA8,depthFormat:a,scaleFactor:r};h=new XRWebGLBinding(n,e),u=h.createProjectionLayer(o),n.updateRenderState({layers:[u]}),t.setPixelRatio(1),t.setSize(u.textureWidth,u.textureHeight,!1),g=new me(u.textureWidth,u.textureHeight,{format:z,type:N,depthTexture:new Tr(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:p.stencil,colorSpace:t.outputColorSpace,samples:p.antialias?4:0});t.properties.get(g).__ignoreDepthValues=u.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=await n.requestReferenceSpace(a),U.setContext(n),U.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const B=new _e,R=new _e;function L(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===n)return;C.near=x.near=y.near=t.near,C.far=x.far=y.far=t.far,I===C.near&&M===C.far||(n.updateRenderState({depthNear:C.near,depthFar:C.far}),I=C.near,M=C.far);const e=t.parent,i=C.cameras;L(C,e);for(let t=0;t0&&(n.alphaTest.value=r.alphaTest);const s=e.get(r).envMap;if(s&&(n.envMap.value=s,n.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const e=!0===t._useLegacyLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*e,i(r.lightMap,n.lightMapTransform)}r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity,i(r.aoMap,n.aoMapTransform))}return{refreshFogUniforms:function(e,i){i.color.getRGB(e.fogColor.value,bn(t)),i.isFog?(e.fogNear.value=i.near,e.fogFar.value=i.far):i.isFogExp2&&(e.fogDensity.value=i.density)},refreshMaterialUniforms:function(t,r,s,a,o){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(t,r):r.isMeshToonMaterial?(n(t,r),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,r)):r.isMeshPhongMaterial?(n(t,r),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,r)):r.isMeshStandardMaterial?(n(t,r),function(t,n){t.metalness.value=n.metalness,n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap,i(n.metalnessMap,t.metalnessMapTransform));t.roughness.value=n.roughness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap,i(n.roughnessMap,t.roughnessMapTransform));const r=e.get(n).envMap;r&&(t.envMapIntensity.value=n.envMapIntensity)}(t,r),r.isMeshPhysicalMaterial&&function(t,e,n){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,i(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,i(e.sheenRoughnessMap,t.sheenRoughnessMapTransform)));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,i(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,i(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,i(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===l&&t.clearcoatNormalScale.value.negate()));e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,i(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,i(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform)));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=n.texture,t.transmissionSamplerSize.value.set(n.width,n.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,i(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,i(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,i(e.anisotropyMap,t.anisotropyMapTransform)));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,i(e.specularColorMap,t.specularColorMapTransform));e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,i(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,r,o)):r.isMeshMatcapMaterial?(n(t,r),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,r)):r.isMeshDepthMaterial?n(t,r):r.isMeshDistanceMaterial?(n(t,r),function(t,i){const n=e.get(i).light;t.referencePosition.value.setFromMatrixPosition(n.matrixWorld),t.nearDistance.value=n.shadow.camera.near,t.farDistance.value=n.shadow.camera.far}(t,r)):r.isMeshNormalMaterial?n(t,r):r.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,i(e.map,t.mapTransform))}(t,r),r.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,r)):r.isPointsMaterial?function(t,e,n,r){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*r,e.map&&(t.map.value=e.map,i(e.map,t.uvTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,i(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r,s,a):r.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,i(e.map,t.mapTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,i(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r):r.isShadowMaterial?(t.color.value.copy(r.color),t.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function Ma(t,e,i,n){let r={},s={},a=[];const o=i.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(t,e,i,n){const r=t.value,s=e+"_"+i;if(void 0===n[s])return n[s]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const t=n[s];if("number"==typeof r||"boolean"==typeof r){if(t!==r)return n[s]=r,!0}else if(!1===t.equals(r))return t.copy(r),!0}return!1}function c(t){const e={boundary:0,storage:0};return"number"==typeof t||"boolean"==typeof t?(e.boundary=4,e.storage=4):t.isVector2?(e.boundary=8,e.storage=8):t.isVector3||t.isColor?(e.boundary=16,e.storage=12):t.isVector4?(e.boundary=16,e.storage=16):t.isMatrix3?(e.boundary=48,e.storage=48):t.isMatrix4?(e.boundary=64,e.storage=64):t.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",t),e}function h(e){const i=e.target;i.removeEventListener("dispose",h);const n=a.indexOf(i.__bindingPointIndex);a.splice(n,1),t.deleteBuffer(r[i.id]),delete r[i.id],delete s[i.id]}return{bind:function(t,e){const i=e.program;n.uniformBlockBinding(t,i)},update:function(i,u){let d=r[i.id];void 0===d&&(!function(t){const e=t.uniforms;let i=0;const n=16;for(let t=0,r=e.length;t0&&(i+=n-r);t.__size=i,t.__cache={}}(i),d=function(e){const i=function(){for(let t=0;t0),u=!!i.morphAttributes.position,d=!!i.morphAttributes.normal,A=!!i.morphAttributes.color;let m=p;n.toneMapped&&(null!==w&&!0!==w.isXRRenderTarget||(m=S.toneMapping));const g=i.morphAttributes.position||i.morphAttributes.normal||i.morphAttributes.color,f=void 0!==g?g.length:0,v=ht.get(n),_=E.state.lights;if(!0===$&&(!0===Z||t!==T)){const e=t===T&&n.id===b;St.setState(n,t,e)}let y=!1;n.version===v.__version?v.needsLights&&v.lightsStateVersion!==_.state.version||v.outputColorSpace!==o||r.isBatchedMesh&&!1===v.batching?y=!0:r.isBatchedMesh||!0!==v.batching?r.isInstancedMesh&&!1===v.instancing?y=!0:r.isInstancedMesh||!0!==v.instancing?r.isSkinnedMesh&&!1===v.skinning?y=!0:r.isSkinnedMesh||!0!==v.skinning?r.isInstancedMesh&&!0===v.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===v.instancingColor&&null!==r.instanceColor||v.envMap!==l||!0===n.fog&&v.fog!==s?y=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===St.numPlanes&&v.numIntersection===St.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==h||v.morphTargets!==u||v.morphNormals!==d||v.morphColors!==A||v.toneMapping!==m||!0===ot.isWebGL2&&v.morphTargetsCount!==f)&&(y=!0):y=!0:y=!0:y=!0:y=!0:(y=!0,v.__version=n.version);let x=v.currentProgram;!0===y&&(x=$t(n,e,r));let C=!1,I=!1,M=!1;const B=x.getUniforms(),R=v.uniforms;lt.useProgram(x.program)&&(C=!0,I=!0,M=!0);n.id!==b&&(b=n.id,I=!0);if(C||T!==t){B.setValue(Lt,"projectionMatrix",t.projectionMatrix),B.setValue(Lt,"viewMatrix",t.matrixWorldInverse);const e=B.map.cameraPosition;void 0!==e&&e.setValue(Lt,nt.setFromMatrixPosition(t.matrixWorld)),ot.logarithmicDepthBuffer&&B.setValue(Lt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&B.setValue(Lt,"isOrthographic",!0===t.isOrthographicCamera),T!==t&&(T=t,I=!0,M=!0)}if(r.isSkinnedMesh){B.setOptional(Lt,r,"bindMatrix"),B.setOptional(Lt,r,"bindMatrixInverse");const t=r.skeleton;t&&(ot.floatVertexTextures?(null===t.boneTexture&&t.computeBoneTexture(),B.setValue(Lt,"boneTexture",t.boneTexture,ut)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}r.isBatchedMesh&&(B.setOptional(Lt,r,"batchingTexture"),B.setValue(Lt,"batchingTexture",r._matricesTexture,ut));const L=i.morphAttributes;(void 0!==L.position||void 0!==L.normal||void 0!==L.color&&!0===ot.isWebGL2)&&Mt.update(r,i,x);(I||v.receiveShadow!==r.receiveShadow)&&(v.receiveShadow=r.receiveShadow,B.setValue(Lt,"receiveShadow",r.receiveShadow));n.isMeshGouraudMaterial&&null!==n.envMap&&(R.envMap.value=l,R.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);I&&(B.setValue(Lt,"toneMappingExposure",S.toneMappingExposure),v.needsLights&&(U=M,(D=R).ambientLightColor.needsUpdate=U,D.lightProbe.needsUpdate=U,D.directionalLights.needsUpdate=U,D.directionalLightShadows.needsUpdate=U,D.pointLights.needsUpdate=U,D.pointLightShadows.needsUpdate=U,D.spotLights.needsUpdate=U,D.spotLightShadows.needsUpdate=U,D.rectAreaLights.needsUpdate=U,D.hemisphereLights.needsUpdate=U),s&&!0===n.fog&&Et.refreshFogUniforms(R,s),Et.refreshMaterialUniforms(R,n,W,V,tt),Us.upload(Lt,Zt(v),R,ut));var D,U;n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(Us.upload(Lt,Zt(v),R,ut),n.uniformsNeedUpdate=!1);n.isSpriteMaterial&&B.setValue(Lt,"center",r.center);if(B.setValue(Lt,"modelViewMatrix",r.modelViewMatrix),B.setValue(Lt,"normalMatrix",r.normalMatrix),B.setValue(Lt,"modelMatrix",r.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const t=n.uniformsGroups;for(let e=0,i=t.length;e{function i(){n.forEach((function(t){ht.get(t).currentProgram.isReady()&&n.delete(t)})),0!==n.size?setTimeout(i,10):e(t)}null!==at.get("KHR_parallel_shader_compile")?i():setTimeout(i,10)}))};let Ht=null;function zt(){qt.stop()}function Vt(){qt.start()}const qt=new Vn;function Xt(t,e,i,n){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)i=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)E.pushLight(t),t.castShadow&&E.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||J.intersectsSprite(t)){n&&nt.setFromMatrixPosition(t.matrixWorld).applyMatrix4(et);const e=gt.update(t),r=t.material;r.visible&&_.push(t,e,r,i,nt.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||J.intersectsObject(t))){const e=gt.update(t),r=t.material;if(n&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),nt.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),nt.copy(e.boundingSphere.center)),nt.applyMatrix4(t.matrixWorld).applyMatrix4(et)),Array.isArray(r)){const n=e.groups;for(let s=0,a=n.length;s0&&function(t,e,i,n){const r=!0===i.isScene?i.overrideMaterial:null;if(null!==r)return;const s=ot.isWebGL2;null===tt&&(tt=new me(1,1,{generateMipmaps:!0,type:at.has("EXT_color_buffer_half_float")?G:N,minFilter:P,samples:s?4:0}));S.getDrawingBufferSize(it),s?tt.setSize(it.x,it.y):tt.setSize(Gt(it.x),Gt(it.y));const a=S.getRenderTarget();S.setRenderTarget(tt),S.getClearColor(D),U=S.getClearAlpha(),U<1&&S.setClearColor(16777215,.5);S.clear();const o=S.toneMapping;S.toneMapping=p,Yt(t,i,n),ut.updateMultisampleRenderTarget(tt),ut.updateRenderTargetMipmap(tt);let h=!1;for(let t=0,r=e.length;t0&&Yt(r,e,i),s.length>0&&Yt(s,e,i),a.length>0&&Yt(a,e,i),lt.buffers.depth.setTest(!0),lt.buffers.depth.setMask(!0),lt.buffers.color.setMask(!0),lt.setPolygonOffset(!1)}function Yt(t,e,i){const n=!0===e.isScene?e.overrideMaterial:null;for(let r=0,s=t.length;r0?x[x.length-1]:null,y.pop(),_=y.length>0?y[y.length-1]:null},this.getActiveCubeFace=function(){return I},this.getActiveMipmapLevel=function(){return M},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(t,e,i){ht.get(t.texture).__webglTexture=e,ht.get(t.depthTexture).__webglTexture=i;const n=ht.get(t);n.__hasExternalTextures=!0,n.__hasExternalTextures&&(n.__autoAllocateDepthBuffer=void 0===i,n.__autoAllocateDepthBuffer||!0===at.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(t,e){const i=ht.get(t);i.__webglFramebuffer=e,i.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,i=0){w=t,I=e,M=i;let n=!0,r=null,s=!1,a=!1;if(t){const o=ht.get(t);void 0!==o.__useDefaultFramebuffer?(lt.bindFramebuffer(Lt.FRAMEBUFFER,null),n=!1):void 0===o.__webglFramebuffer?ut.setupRenderTarget(t):o.__hasExternalTextures&&ut.rebindTextures(t,ht.get(t.texture).__webglTexture,ht.get(t.depthTexture).__webglTexture);const l=t.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(a=!0);const c=ht.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=Array.isArray(c[e])?c[e][i]:c[e],s=!0):r=ot.isWebGL2&&t.samples>0&&!1===ut.useMultisampledRTT(t)?ht.get(t).__webglMultisampledFramebuffer:Array.isArray(c)?c[i]:c,B.copy(t.viewport),R.copy(t.scissor),L=t.scissorTest}else B.copy(j).multiplyScalar(W).floor(),R.copy(Y).multiplyScalar(W).floor(),L=K;if(lt.bindFramebuffer(Lt.FRAMEBUFFER,r)&&ot.drawBuffers&&n&<.drawBuffers(t,r),lt.viewport(B),lt.scissor(R),lt.setScissorTest(L),s){const n=ht.get(t.texture);Lt.framebufferTexture2D(Lt.FRAMEBUFFER,Lt.COLOR_ATTACHMENT0,Lt.TEXTURE_CUBE_MAP_POSITIVE_X+e,n.__webglTexture,i)}else if(a){const n=ht.get(t.texture),r=e||0;Lt.framebufferTextureLayer(Lt.FRAMEBUFFER,Lt.COLOR_ATTACHMENT0,n.__webglTexture,i||0,r)}b=-1},this.readRenderTargetPixels=function(t,e,i,n,r,s,a){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=ht.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){lt.bindFramebuffer(Lt.FRAMEBUFFER,o);try{const a=t.texture,o=a.format,l=a.type;if(o!==z&&Tt.convert(o)!==Lt.getParameter(Lt.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===G&&(at.has("EXT_color_buffer_half_float")||ot.isWebGL2&&at.has("EXT_color_buffer_float"));if(!(l===N||Tt.convert(l)===Lt.getParameter(Lt.IMPLEMENTATION_COLOR_READ_TYPE)||l===k&&(ot.isWebGL2||at.has("OES_texture_float")||at.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-n&&i>=0&&i<=t.height-r&&Lt.readPixels(e,i,n,r,Tt.convert(o),Tt.convert(l),s)}finally{const t=null!==w?ht.get(w).__webglFramebuffer:null;lt.bindFramebuffer(Lt.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,i=0){const n=Math.pow(2,-i),r=Math.floor(e.image.width*n),s=Math.floor(e.image.height*n);ut.setTexture2D(e,0),Lt.copyTexSubImage2D(Lt.TEXTURE_2D,i,0,0,t.x,t.y,r,s),lt.unbindTexture()},this.copyTextureToTexture=function(t,e,i,n=0){const r=e.image.width,s=e.image.height,a=Tt.convert(i.format),o=Tt.convert(i.type);ut.setTexture2D(i,0),Lt.pixelStorei(Lt.UNPACK_FLIP_Y_WEBGL,i.flipY),Lt.pixelStorei(Lt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),Lt.pixelStorei(Lt.UNPACK_ALIGNMENT,i.unpackAlignment),e.isDataTexture?Lt.texSubImage2D(Lt.TEXTURE_2D,n,t.x,t.y,r,s,a,o,e.image.data):e.isCompressedTexture?Lt.compressedTexSubImage2D(Lt.TEXTURE_2D,n,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):Lt.texSubImage2D(Lt.TEXTURE_2D,n,t.x,t.y,a,o,e.image),0===n&&i.generateMipmaps&&Lt.generateMipmap(Lt.TEXTURE_2D),lt.unbindTexture()},this.copyTextureToTexture3D=function(t,e,i,n,r=0){if(S.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=t.max.x-t.min.x+1,a=t.max.y-t.min.y+1,o=t.max.z-t.min.z+1,l=Tt.convert(n.format),c=Tt.convert(n.type);let h;if(n.isData3DTexture)ut.setTexture3D(n,0),h=Lt.TEXTURE_3D;else{if(!n.isDataArrayTexture&&!n.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ut.setTexture2DArray(n,0),h=Lt.TEXTURE_2D_ARRAY}Lt.pixelStorei(Lt.UNPACK_FLIP_Y_WEBGL,n.flipY),Lt.pixelStorei(Lt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Lt.pixelStorei(Lt.UNPACK_ALIGNMENT,n.unpackAlignment);const u=Lt.getParameter(Lt.UNPACK_ROW_LENGTH),d=Lt.getParameter(Lt.UNPACK_IMAGE_HEIGHT),A=Lt.getParameter(Lt.UNPACK_SKIP_PIXELS),p=Lt.getParameter(Lt.UNPACK_SKIP_ROWS),m=Lt.getParameter(Lt.UNPACK_SKIP_IMAGES),g=i.isCompressedTexture?i.mipmaps[r]:i.image;Lt.pixelStorei(Lt.UNPACK_ROW_LENGTH,g.width),Lt.pixelStorei(Lt.UNPACK_IMAGE_HEIGHT,g.height),Lt.pixelStorei(Lt.UNPACK_SKIP_PIXELS,t.min.x),Lt.pixelStorei(Lt.UNPACK_SKIP_ROWS,t.min.y),Lt.pixelStorei(Lt.UNPACK_SKIP_IMAGES,t.min.z),i.isDataTexture||i.isData3DTexture?Lt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g.data):i.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Lt.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,g.data)):Lt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g),Lt.pixelStorei(Lt.UNPACK_ROW_LENGTH,u),Lt.pixelStorei(Lt.UNPACK_IMAGE_HEIGHT,d),Lt.pixelStorei(Lt.UNPACK_SKIP_PIXELS,A),Lt.pixelStorei(Lt.UNPACK_SKIP_ROWS,p),Lt.pixelStorei(Lt.UNPACK_SKIP_IMAGES,m),0===r&&n.generateMipmaps&&Lt.generateMipmap(h),lt.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?ut.setTextureCube(t,0):t.isData3DTexture?ut.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?ut.setTexture2DArray(t,0):ut.setTexture2D(t,0),lt.unbindTexture()},this.resetState=function(){I=0,M=0,w=null,lt.reset(),Bt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Tt}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===_t?"display-p3":"srgb",e.unpackColorSpace=ne.workingColorSpace===Et?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===ft?mt:3e3}set outputEncoding(t){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=t===mt?ft:vt}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}(class extends wa{}).prototype.isWebGL1Renderer=!0;class ba extends Ei{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e}}class Ta{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Mt,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Nt()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let n=0,r=this.stride;no)continue;u.applyMatrix4(this.matrixWorld);const s=t.ray.origin.distanceTo(u);st.far||e.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{for(let i=Math.max(0,s.start),n=Math.min(p.count,s.start+s.count)-1;io)continue;u.applyMatrix4(this.matrixWorld);const n=t.ray.origin.distanceTo(u);nt.far||e.push({distance:n,point:h.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;t0){const i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;tr.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:i,index:e,face:null,object:a})}}class yo extends de{constructor(t,e,i,n,r,s,a,o,l){super(t,e,i,n,r,s,a,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:D,this.magFilter=void 0!==r?r:D,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class xo extends de{constructor(t,e,i,n,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,n,r,h,u),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class So extends xo{constructor(t,e,i,n,r,s){super(t,e,i,r,s),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=b}}class Co extends xo{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,S),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class Io extends de{constructor(t,e,i,n,r,s,a,o,l){super(t,e,i,n,r,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Mo extends sn{constructor(t=1,e=32,i=16,n=0,r=2*Math.PI,s=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:s,thetaLength:a},e=Math.max(3,Math.floor(e)),i=Math.max(2,Math.floor(i));const o=Math.min(s+a,Math.PI);let l=0;const c=[],h=new _e,u=new _e,d=[],A=[],p=[],m=[];for(let d=0;d<=i;d++){const g=[],f=d/i;let v=0;0===d&&0===s?v=.5/e:d===i&&o===Math.PI&&(v=-.5/e);for(let i=0;i<=e;i++){const o=i/e;h.x=-t*Math.cos(n+o*r)*Math.sin(s+f*a),h.y=t*Math.cos(s+f*a),h.z=t*Math.sin(n+o*r)*Math.sin(s+f*a),A.push(h.x,h.y,h.z),u.copy(h).normalize(),p.push(u.x,u.y,u.z),m.push(o+v,1-f),g.push(l++)}c.push(g)}for(let t=0;t0)&&d.push(e,r,l),(t!==i-1||o0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}function To(t,e,i){return!t||!i&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function Bo(t){const e=t.length,i=new Array(e);for(let t=0;t!==e;++t)i[t]=t;return i.sort((function(e,i){return t[e]-t[i]})),i}function Ro(t,e,i){const n=t.length,r=new t.constructor(n);for(let s=0,a=0;a!==n;++s){const n=i[s]*e;for(let i=0;i!==e;++i)r[a++]=t[n+i]}return r}function Lo(t,e,i,n){let r=1,s=t[0];for(;void 0!==s&&void 0===s[n];)s=t[r++];if(void 0===s)return;let a=s[n];if(void 0!==a)if(Array.isArray(a))do{a=s[n],void 0!==a&&(e.push(s.time),i.push.apply(i,a)),s=t[r++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[n],void 0!==a&&(e.push(s.time),a.toArray(i,i.length)),s=t[r++]}while(void 0!==s);else do{a=s[n],void 0!==a&&(e.push(s.time),i.push(a)),s=t[r++]}while(void 0!==s)}class Do{constructor(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{let s;i:{n:if(!(t=r)break t;{const a=e[1];t=r)break e}s=i,i=0}}for(;i>>1;te;)--s;if(++s,0!==r||s!==n){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=i.slice(r,s),this.values=this.values.slice(r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const n=i[e];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,n),t=!1;break}if(null!==s&&s>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,n,s),t=!1;break}s=n}if(void 0!==n&&(a=n,ArrayBuffer.isView(a)&&!(a instanceof DataView)))for(let e=0,i=n.length;e!==i;++e){const i=n[e];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,i),t=!1;break}}var a;return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),n=this.getInterpolation()===ht,r=t.length-1;let s=1;for(let a=1;a0){t[s]=t[r];for(let t=r*i,n=s*i,a=0;a!==i;++a)e[n+a]=e[t+a];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=e.slice(0,s*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=new(0,this.constructor)(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}}Fo.prototype.TimeBufferType=Float32Array,Fo.prototype.ValueBufferType=Float32Array,Fo.prototype.DefaultInterpolation=ct;class Qo extends Fo{}Qo.prototype.ValueTypeName="bool",Qo.prototype.ValueBufferType=Array,Qo.prototype.DefaultInterpolation=lt,Qo.prototype.InterpolantFactoryMethodLinear=void 0,Qo.prototype.InterpolantFactoryMethodSmooth=void 0;class Oo extends Fo{}Oo.prototype.ValueTypeName="color";class ko extends Fo{}ko.prototype.ValueTypeName="number";class Go extends Do{constructor(t,e,i,n){super(t,e,i,n)}interpolate_(t,e,i,n){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(i-e)/(n-e);let l=t*a;for(let t=l+a;l!==t;l+=4)ve.slerpFlat(r,0,s,l-a,s,l,o);return r}}class Ho extends Fo{InterpolantFactoryMethodLinear(t){return new Go(this.times,this.values,this.getValueSize(),t)}}Ho.prototype.ValueTypeName="quaternion",Ho.prototype.DefaultInterpolation=ct,Ho.prototype.InterpolantFactoryMethodSmooth=void 0;class zo extends Fo{}zo.prototype.ValueTypeName="string",zo.prototype.ValueBufferType=Array,zo.prototype.DefaultInterpolation=lt,zo.prototype.InterpolantFactoryMethodLinear=void 0,zo.prototype.InterpolantFactoryMethodSmooth=void 0;class Vo extends Fo{}Vo.prototype.ValueTypeName="vector";class Wo{constructor(t,e=-1,i,n=2500){this.name=t,this.tracks=i,this.duration=e,this.blendMode=n,this.uuid=Nt(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,n=1/(t.fps||1);for(let t=0,r=i.length;t!==r;++t)e.push(qo(i[t]).scale(n));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],i=t.tracks,n={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,n=i.length;t!==n;++t)e.push(Fo.toJSON(i[t]));return n}static CreateFromMorphTargetSequence(t,e,i,n){const r=e.length,s=[];for(let t=0;t1){const t=s[1];let e=n[t];e||(n[t]=e=[]),e.push(i)}}const s=[];for(const t in n)s.push(this.CreateFromMorphTargetSequence(t,n[t],e,i));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(t,e,i,n,r){if(0!==i.length){const s=[],a=[];Lo(i,s,a,n),0!==s.length&&r.push(new t(e,s,a))}},n=[],r=t.name||"default",s=t.fps||30,a=t.blendMode;let o=t.length||-1;const l=t.hierarchy||[];for(let t=0;t{e&&e(r),this.manager.itemEnd(t)}),0),r;if(void 0!==Jo[t])return void Jo[t].push({onLoad:e,onProgress:i,onError:n});Jo[t]=[],Jo[t].push({onLoad:e,onProgress:i,onError:n});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const i=Jo[t],n=e.body.getReader(),r=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),s=r?parseInt(r):0,a=0!==s;let o=0;const l=new ReadableStream({start(t){!function e(){n.read().then((({done:n,value:r})=>{if(n)t.close();else{o+=r.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let t=0,e=i.length;t{switch(o){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,a)));case"json":return t.json();default:if(void 0===a)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(a),i=e&&e[1]?e[1].toLowerCase():void 0,n=new TextDecoder(i);return t.arrayBuffer().then((t=>n.decode(t)))}}})).then((e=>{Xo.add(t,e);const i=Jo[t];delete Jo[t];for(let t=0,n=i.length;t{const i=Jo[t];if(void 0===i)throw this.manager.itemError(t),e;delete Jo[t];for(let t=0,n=i.length;t{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class tl extends Ko{constructor(t){super(t)}load(t,e,i,n){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const r=this,s=Xo.get(t);if(void 0!==s)return r.manager.itemStart(t),setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s;const a=Yt("img");function o(){c(),Xo.add(t,this),e&&e(this),r.manager.itemEnd(t)}function l(e){c(),n&&n(e),r.manager.itemError(t),r.manager.itemEnd(t)}function c(){a.removeEventListener("load",o,!1),a.removeEventListener("error",l,!1)}return a.addEventListener("load",o,!1),a.addEventListener("error",l,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(t),a.src=t,a}}class el extends Ko{constructor(t){super(t)}load(t,e,i,n){const r=this,s=new za,a=new Zo(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(r.withCredentials),a.load(t,(function(t){let i;try{i=r.parse(t)}catch(t){if(void 0===n)return void console.error(t);n(t)}void 0!==i.image?s.image=i.image:void 0!==i.data&&(s.image.width=i.width,s.image.height=i.height,s.image.data=i.data),s.wrapS=void 0!==i.wrapS?i.wrapS:b,s.wrapT=void 0!==i.wrapT?i.wrapT:b,s.magFilter=void 0!==i.magFilter?i.magFilter:D,s.minFilter=void 0!==i.minFilter?i.minFilter:D,s.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.colorSpace?s.colorSpace=i.colorSpace:void 0!==i.encoding&&(s.encoding=i.encoding),void 0!==i.flipY&&(s.flipY=i.flipY),void 0!==i.format&&(s.format=i.format),void 0!==i.type&&(s.type=i.type),void 0!==i.mipmaps&&(s.mipmaps=i.mipmaps,s.minFilter=P),1===i.mipmapCount&&(s.minFilter=D),void 0!==i.generateMipmaps&&(s.generateMipmaps=i.generateMipmaps),s.needsUpdate=!0,e&&e(s,i)}),i,n),s}}class il extends Ko{constructor(t){super(t)}load(t,e,i,n){const r=new de,s=new tl(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,(function(t){r.image=t,r.needsUpdate=!0,void 0!==e&&e(r)}),i,n),r}}class nl extends Ei{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new Fi(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}const rl=new Ye,sl=new _e,al=new _e;class ol{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Wt(512,512),this.map=null,this.mapPass=null,this.matrix=new Ye,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new zn,this._frameExtents=new Wt(1,1),this._viewportCount=1,this._viewports=[new Ae(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;sl.setFromMatrixPosition(t.matrixWorld),e.position.copy(sl),al.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(al),e.updateMatrixWorld(),rl.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(rl),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(rl)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class ll extends ol{constructor(){super(new Ln(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,i=2*Pt*t.angle*this.focus,n=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;i===e.fov&&n===e.aspect&&r===e.far||(e.fov=i,e.aspect=n,e.far=r,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class cl extends nl{constructor(t,e,i=0,n=Math.PI/3,r=0,s=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Ei.DEFAULT_UP),this.updateMatrix(),this.target=new Ei,this.distance=i,this.angle=n,this.penumbra=r,this.decay=s,this.map=null,this.shadow=new ll}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const hl=new Ye,ul=new _e,dl=new _e;class Al extends ol{constructor(){super(new Ln(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Wt(4,2),this._viewportCount=6,this._viewports=[new Ae(2,1,1,1),new Ae(0,1,1,1),new Ae(3,1,1,1),new Ae(1,1,1,1),new Ae(3,0,1,1),new Ae(1,0,1,1)],this._cubeDirections=[new _e(1,0,0),new _e(-1,0,0),new _e(0,0,1),new _e(0,0,-1),new _e(0,1,0),new _e(0,-1,0)],this._cubeUps=[new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,1,0),new _e(0,0,1),new _e(0,0,-1)]}updateMatrices(t,e=0){const i=this.camera,n=this.matrix,r=t.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),ul.setFromMatrixPosition(t.matrixWorld),i.position.copy(ul),dl.copy(i.position),dl.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(dl),i.updateMatrixWorld(),n.makeTranslation(-ul.x,-ul.y,-ul.z),hl.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(hl)}}class pl extends nl{constructor(t,e,i=0,n=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new Al}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class ml extends ol{constructor(){super(new nr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class gl extends nl{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Ei.DEFAULT_UP),this.updateMatrix(),this.target=new Ei,this.shadow=new ml}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class fl{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new _e)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const i=t.x,n=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*n),e.addScaledVector(s[2],.488603*r),e.addScaledVector(s[3],.488603*i),e.addScaledVector(s[4],i*n*1.092548),e.addScaledVector(s[5],n*r*1.092548),e.addScaledVector(s[6],.315392*(3*r*r-1)),e.addScaledVector(s[7],i*r*1.092548),e.addScaledVector(s[8],.546274*(i*i-n*n)),e}getIrradianceAt(t,e){const i=t.x,n=t.y,r=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*n),e.addScaledVector(s[2],1.023328*r),e.addScaledVector(s[3],1.023328*i),e.addScaledVector(s[4],.858086*i*n),e.addScaledVector(s[5],.858086*n*r),e.addScaledVector(s[6],.743125*r*r-.247708),e.addScaledVector(s[7],.858086*i*r),e.addScaledVector(s[8],.429043*(i*i-n*n)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].fromArray(t,e+3*n);return this}toArray(t=[],e=0){const i=this.coefficients;for(let n=0;n<9;n++)i[n].toArray(t,e+3*n);return t}static getBasisAt(t,e){const i=t.x,n=t.y,r=t.z;e[0]=.282095,e[1]=.488603*n,e[2]=.488603*r,e[3]=.488603*i,e[4]=1.092548*i*n,e[5]=1.092548*n*r,e[6]=.315392*(3*r*r-1),e[7]=1.092548*i*r,e[8]=.546274*(i*i-n*n)}}class vl extends nl{constructor(t=new fl,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}class _l{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let i=0,n=t.length;i{e&&e(i),r.manager.itemEnd(t)})).catch((t=>{n&&n(t)})):(setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const o=fetch(t,a).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(i){return Xo.add(t,i),e&&e(i),r.manager.itemEnd(t),i})).catch((function(e){n&&n(e),Xo.remove(t),r.manager.itemError(t),r.manager.itemEnd(t)}));Xo.add(t,o),r.manager.itemStart(t)}}class yl{constructor(t,e,i){let n,r,s;switch(this.binding=t,this.valueSize=i,e){case"quaternion":n=this._slerp,r=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*i),this._workIndex=5;break;case"string":case"bool":n=this._select,r=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*i);break;default:n=this._lerp,r=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*i)}this._mixBufferRegion=n,this._mixBufferRegionAdditive=r,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const i=this.buffer,n=this.valueSize,r=t*n+n;let s=this.cumulativeWeight;if(0===s){for(let t=0;t!==n;++t)i[r+t]=i[t];s=e}else{s+=e;const t=e/s;this._mixBufferRegion(i,r,0,t,n)}this.cumulativeWeight=s}accumulateAdditive(t){const e=this.buffer,i=this.valueSize,n=i*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,n,0,t,i),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,i=this.buffer,n=t*e+e,r=this.cumulativeWeight,s=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){const t=e*this._origIndex;this._mixBufferRegion(i,n,t,1-r,e)}s>0&&this._mixBufferRegionAdditive(i,n,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(i[t]!==i[t+e]){a.setValue(i,n);break}}saveOriginalState(){const t=this.binding,e=this.buffer,i=this.valueSize,n=i*this._origIndex;t.getValue(e,n);for(let t=i,r=n;t!==r;++t)e[t]=e[n+t%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i=.5)for(let n=0;n!==r;++n)t[e+n]=t[i+n]}_slerp(t,e,i,n){ve.slerpFlat(t,e,t,e,t,i,n)}_slerpAdditive(t,e,i,n,r){const s=this._workIndex*r;ve.multiplyQuaternionsFlat(t,s,t,e,t,i),ve.slerpFlat(t,e,t,e,t,s,n)}_lerp(t,e,i,n,r){const s=1-n;for(let a=0;a!==r;++a){const r=e+a;t[r]=t[r]*s+t[i+a]*n}}_lerpAdditive(t,e,i,n,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[i+s]*n}}}const xl="\\[\\]\\.:\\/",Sl=new RegExp("["+xl+"]","g"),Cl="[^"+xl+"]",Il="[^"+xl.replace("\\.","")+"]",Ml=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Cl)+/(WCOD+)?/.source.replace("WCOD",Il)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Cl)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Cl)+"$"),wl=["material","materials","bones","map"];class bl{constructor(t,e,i){this.path=e,this.parsedPath=i||bl.parseTrackName(e),this.node=bl.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new bl.Composite(t,e,i):new bl(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Sl,"")}static parseTrackName(t){const e=Ml.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const t=i.nodeName.substring(n+1);-1!==wl.indexOf(t)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=t)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(void 0!==i)return i}if(t.children){const i=function(t){for(let n=0;n0){const t=this._interpolants,e=this._propertyBindings;if(2501===this.blendMode)for(let i=0,n=t.length;i!==n;++i)t[i].evaluate(s),e[i].accumulateAdditive(a);else for(let i=0,r=t.length;i!==r;++i)t[i].evaluate(s),e[i].accumulate(n,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const i=this._weightInterpolant;if(null!==i){const n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const i=this._timeScaleInterpolant;if(null!==i){e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,i=this.loop;let n=this.time+t,r=this._loopCount;const s=i===ot;if(0===t)return-1===r?n:s&&1==(1&r)?e-n:n;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(n>=e)n=e;else{if(!(n<0)){this.time=n;break t}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),n>=e||n<0){const i=Math.floor(n/e);n-=e*i,r+=Math.abs(i);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=t>0?e:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(s&&1==(1&r))return e-n}return n}_setEndings(t,e,i){const n=this._interpolantSettings;i?(n.endingStart=dt,n.endingEnd=dt):(n.endingStart=t?this.zeroSlopeAtStart?dt:ut:At,n.endingEnd=e?this.zeroSlopeAtEnd?dt:ut:At)}_scheduleFading(t,e,i){const n=this._mixer,r=n.time;let s=this._weightInterpolant;null===s&&(s=n._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=i,this}}const Bl=new Float32Array(1);class Rl extends Rt{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,s=t._propertyBindings,a=t._interpolants,o=i.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let t=0;t!==r;++t){const r=n[t],l=r.name;let h=c[l];if(void 0!==h)++h.referenceCount,s[t]=h;else{if(h=s[t],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,l));continue}const n=e&&e._propertyBindings[t].binding.parsedPath;h=new yl(bl.create(i,l,n),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,l),s[t]=h}a[t].resultBuffer=h.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}const e=t._propertyBindings;for(let t=0,i=e.length;t!==i;++t){const i=e[t];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,i=e.length;t!==i;++t){const i=e[t];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let a=0;a!==i;++a){e[a]._update(n,t,r,s)}const a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;tt:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new kl("string"==typeof t?t:t+"",void 0,Ql))(e)})(t):t -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;var Hl;const zl=window,Vl=zl.trustedTypes,Wl=Vl?Vl.emptyScript:"",ql=zl.reactiveElementPolyfillSupport,Xl={toAttribute(t,e){switch(e){case Boolean:t=t?Wl:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},jl=(t,e)=>e!==t&&(e==e||t==t),Yl={attribute:!0,type:String,converter:Xl,reflect:!1,hasChanged:jl},Kl="finalized";class Jl extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=Yl){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Yl}static finalize(){if(this.hasOwnProperty(Kl))return!1;this[Kl]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Gl(t))}else void 0!==t&&e.push(Gl(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{Fl?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=Nl.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Yl){var n;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:Xl).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:Xl;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||jl)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var $l;Jl[Kl]=!0,Jl.elementProperties=new Map,Jl.elementStyles=[],Jl.shadowRootOptions={mode:"open"},null==ql||ql({ReactiveElement:Jl}),(null!==(Hl=zl.reactiveElementVersions)&&void 0!==Hl?Hl:zl.reactiveElementVersions=[]).push("1.6.3");const Zl=window,tc=Zl.trustedTypes,ec=tc?tc.createPolicy("lit-html",{createHTML:t=>t}):void 0,ic="$lit$",nc=`lit$${(Math.random()+"").slice(9)}$`,rc="?"+nc,sc=`<${rc}>`,ac=document,oc=()=>ac.createComment(""),lc=t=>null===t||"object"!=typeof t&&"function"!=typeof t,cc=Array.isArray,hc="[ \t\n\f\r]",uc=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dc=/-->/g,Ac=/>/g,pc=RegExp(`>|${hc}(?:([^\\s"'>=/]+)(${hc}*=${hc}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),mc=/'/g,gc=/"/g,fc=/^(?:script|style|textarea|title)$/i,vc=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),_c=Symbol.for("lit-noChange"),Ec=Symbol.for("lit-nothing"),yc=new WeakMap,xc=ac.createTreeWalker(ac,129,null,!1);function Sc(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==ec?ec.createHTML(e):e}const Cc=(t,e)=>{const i=t.length-1,n=[];let r,s=2===e?"":"",a=uc;for(let e=0;e"===l[0]?(a=null!=r?r:uc,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,o=l[1],a=void 0===l[3]?pc:'"'===l[3]?gc:mc):a===gc||a===mc?a=pc:a===dc||a===Ac?a=uc:(a=pc,r=void 0);const u=a===pc&&t[e+1].startsWith("/>")?" ":"";s+=a===uc?i+sc:c>=0?(n.push(o),i.slice(0,c)+ic+i.slice(c)+nc+u):i+nc+(-2===c?(n.push(void 0),e):u)}return[Sc(t,s+(t[i]||"")+(2===e?"":"")),n]};class Ic{constructor({strings:t,_$litType$:e},i){let n;this.parts=[];let r=0,s=0;const a=t.length-1,o=this.parts,[l,c]=Cc(t,e);if(this.el=Ic.createElement(l,i),xc.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(n=xc.nextNode())&&o.length0){n.textContent=tc?tc.emptyScript:"";for(let i=0;icc(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==Ec&&lc(this._$AH)?this._$AA.nextSibling.data=t:this.$(ac.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=Ic.createElement(Sc(n.h,n.h[0]),this.options)),n);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new wc(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=yc.get(t.strings);return void 0===e&&yc.set(t.strings,e=new Ic(t)),e}T(t){cc(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,n=0;for(const r of t)n===e.length?e.push(i=new bc(this.k(oc()),this.k(oc()),this,this.options)):i=e[n],i._$AI(r),n++;n2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Ec}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,n){const r=this.strings;let s=!1;if(void 0===r)t=Mc(this,t,e,0),s=!lc(t)||t!==this._$AH&&t!==_c,s&&(this._$AH=t);else{const n=t;let a,o;for(t=r[0],a=0;a{var n,r;const s=null!==(n=null==i?void 0:i.renderBefore)&&void 0!==n?n:e;let a=s._$litPart$;if(void 0===a){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;s._$litPart$=a=new bc(e.insertBefore(oc(),t),t,void 0,null!=i?i:{})}return a._$AI(t),a -/** - * @license - * Copyright 2019 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */},Fc=window,Qc=Fc.ShadowRoot&&(void 0===Fc.ShadyCSS||Fc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Oc=Symbol(),kc=new WeakMap;class Gc{constructor(t,e,i){if(this._$cssResult$=!0,i!==Oc)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Qc&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=kc.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&kc.set(e,t))}return t}toString(){return this.cssText}}const Hc=Qc?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new Gc("string"==typeof t?t:t+"",void 0,Oc))(e)})(t):t -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */;var zc;const Vc=window,Wc=Vc.trustedTypes,qc=Wc?Wc.emptyScript:"",Xc=Vc.reactiveElementPolyfillSupport,jc={toAttribute(t,e){switch(e){case Boolean:t=t?qc:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},Yc=(t,e)=>e!==t&&(e==e||t==t),Kc={attribute:!0,type:String,converter:jc,reflect:!1,hasChanged:Yc},Jc="finalized";class $c extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const n=this._$Ep(i,e);void 0!==n&&(this._$Ev.set(n,i),t.push(n))})),t}static createProperty(t,e=Kc){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,n=this.getPropertyDescriptor(t,i,e);void 0!==n&&Object.defineProperty(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(n){const r=this[t];this[e]=n,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Kc}static finalize(){if(this.hasOwnProperty(Jc))return!1;this[Jc]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(Hc(t))}else void 0!==t&&e.push(Hc(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{Qc?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),n=Fc.litNonce;void 0!==n&&i.setAttribute("nonce",n),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Kc){var n;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(n=i.converter)||void 0===n?void 0:n.toAttribute)?i.converter:jc).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const n=this.constructor,r=n._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=n.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:jc;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let n=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||Yc)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):n=!1),!this.isUpdatePending&&n&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}} -/** - * @license - * Copyright 2017 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ -var Zc,th;$c[Jc]=!0,$c.elementProperties=new Map,$c.elementStyles=[],$c.shadowRootOptions={mode:"open"},null==Xc||Xc({ReactiveElement:$c}),(null!==(zc=Vc.reactiveElementVersions)&&void 0!==zc?zc:Vc.reactiveElementVersions=[]).push("1.6.3");class eh extends $c{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Nc(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return _c}}eh.finalized=!0,eh._$litElement$=!0,null===(Zc=globalThis.litElementHydrateSupport)||void 0===Zc||Zc.call(globalThis,{LitElement:eh});const ih=globalThis.litElementPolyfillSupport;null==ih||ih({LitElement:eh}),(null!==(th=globalThis.litElementVersions)&&void 0!==th?th:globalThis.litElementVersions=[]).push("3.3.3"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const nh=null!=navigator.xr&&null!=self.XRSession&&null!=navigator.xr.isSessionSupported,rh=nh&&null!=self.XRSession.prototype.requestHitTestSource,sh=null!=self.ResizeObserver,ah=null!=self.IntersectionObserver,oh=rh;(()=>{const t=navigator.userAgent||navigator.vendor||self.opera;let e=!1;(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)})(),/\bCrOS\b/.test(navigator.userAgent);const lh=/android/i.test(navigator.userAgent),ch=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;/Safari\//.test(navigator.userAgent);const hh=/firefox/i.test(navigator.userAgent),uh=/OculusBrowser/.test(navigator.userAgent);ch&&/CriOS\//.test(navigator.userAgent);const dh=lh&&!hh&&!uh,Ah=Boolean(window.webkit&&window.webkit.messageHandlers),ph=(()=>{if(ch){if(Ah)return Boolean(/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent));{const t=document.createElement("a");return Boolean(t.relList&&t.relList.supports&&t.relList.supports("ar"))}}return!1})(),mh=t=>t&&"null"!==t?fh(t):null,gh=()=>{if(oh)return;const t=[];throw nh||t.push("WebXR Device API"),rh||t.push("WebXR Hit Test API"),new Error(`The following APIs are required for AR, but are missing in this browser: ${t.join(", ")}`)},fh=t=>new URL(t,window.location.toString()).toString(),vh=(t,e)=>{let i=null;return(...n)=>{null!=i&&self.clearTimeout(i),i=self.setTimeout((()=>{i=null,t(...n)}),e)}},_h=(t,e,i)=>Math.max(e,Math.min(i,t)),Eh=(()=>{const t=(()=>{var t;if(null===(t=document.documentElement.getAttribute("itemtype"))||void 0===t?void 0:t.includes("schema.org/SearchResultsPage"))return!0;const e=null!=document.head?Array.from(document.head.querySelectorAll("meta")):[];for(const t of e)if("viewport"===t.name)return!0;return!1})();return t||console.warn('No detected; will cap pixel density at 1.'),()=>t?window.devicePixelRatio:1})(),yh=(()=>{const t=new RegExp("[?&]model-viewer-debug-mode(&|$)");return()=>self.ModelViewerElement&&self.ModelViewerElement.debugMode||self.location&&self.location.search&&self.location.search.match(t)})(); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var xh=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const Sh=Symbol("currentEnvironmentMap"),Ch=Symbol("currentBackground"),Ih=Symbol("updateEnvironment"),Mh=Symbol("cancelEnvironmentUpdate"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const wh=vc` - -
- - - -
- - - -
- - - -
- -
-
-
-
- -
-
- -
-
- -
- -
-
- -
- - -
-
- -
`,bh=new WeakMap;function Th(){let t,e;function i(t,e,i,n,r,s){const a=s.num_components(),o=i.num_points()*a,l=o*r.BYTES_PER_ELEMENT,c=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32}}(t,r),h=t._malloc(l);e.GetAttributeDataArrayForAllPoints(i,s,c,l,h);const u=new r(t.HEAPF32.buffer,h,o).slice();return t._free(h),{name:n,array:u,itemSize:a}}onmessage=function(n){const r=n.data;switch(r.type){case"init":t=r.decoderConfig,e=new Promise((function(e){t.onModuleLoaded=function(t){e({draco:t})},DracoDecoderModule(t)}));break;case"decode":const n=r.buffer,s=r.taskConfig;e.then((t=>{const e=t.draco,a=new e.Decoder;try{const t=function(t,e,n,r){const s=r.attributeIDs,a=r.attributeTypes;let o,l;const c=e.GetEncodedGeometryType(n);if(c===t.TRIANGULAR_MESH)o=new t.Mesh,l=e.DecodeArrayToMesh(n,n.byteLength,o);else{if(c!==t.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new t.PointCloud,l=e.DecodeArrayToPointCloud(n,n.byteLength,o)}if(!l.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const h={index:null,attributes:[]};for(const n in s){const l=self[a[n]];let c,u;if(r.useUniqueIDs)u=s[n],c=e.GetAttributeByUniqueId(o,u);else{if(u=e.GetAttributeId(o,t[s[n]]),-1===u)continue;c=e.GetAttribute(o,u)}const d=i(t,e,o,n,l,c);"color"===n&&(d.vertexColorSpace=r.vertexColorSpace),h.attributes.push(d)}c===t.TRIANGULAR_MESH&&(h.index=function(t,e,i){const n=i.num_faces(),r=3*n,s=4*r,a=t._malloc(s);e.GetTrianglesUInt32Array(i,s,a);const o=new Uint32Array(t.HEAPF32.buffer,a,r).slice();return t._free(a),{array:o,itemSize:1}}(t,e,o));return t.destroy(o),h}(e,a,new Int8Array(n),s),o=t.attributes.map((t=>t.array.buffer));t.index&&o.push(t.index.array.buffer),self.postMessage({type:"decode",id:r.id,geometry:t},o)}catch(t){console.error(t),self.postMessage({type:"error",id:r.id,error:t.message})}finally{e.destroy(a)}}))}}}function Bh(t,e){if(0===e)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(2===e||1===e){let i=t.getIndex();if(null===i){const e=[],n=t.getAttribute("position");if(void 0===n)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t;for(let t=0;t=2.0 are supported.")));const l=new Mu(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let t=0;t=0&&void 0===a[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}l.setExtensions(s),l.setPlugins(a),l.parse(i,n)}parseAsync(t,e){const i=this;return new Promise((function(n,r){i.parse(t,e,n,r)}))}}function Lh(){let t={};return{get:function(e){return t[e]},add:function(e,i){t[e]=i},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const Dh={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Uh{constructor(t){this.parser=t,this.name=Dh.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,n=e.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,s)}}class Xh{constructor(t){this.parser=t,this.name=Dh.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,i=this.parser,n=i.json,r=n.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],a=n.images[s.source];let o=i.textureLoader;if(a.uri){const t=i.options.manager.getHandler(a.uri);null!==t&&(o=t)}return this.detectSupport().then((function(r){if(r)return i.loadTextureImage(t,s.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(t)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}class jh{constructor(t){this.parser=t,this.name=Dh.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,i=this.parser,n=i.json,r=n.textures[t];if(!r.extensions||!r.extensions[e])return null;const s=r.extensions[e],a=n.images[s.source];let o=i.textureLoader;if(a.uri){const t=i.options.manager.getHandler(a.uri);null!==t&&(o=t)}return this.detectSupport().then((function(r){if(r)return i.loadTextureImage(t,s.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(t)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(1===e.height)}}))),this.isSupported}}class Yh{constructor(t){this.name=Dh.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const t=i.extensions[this.name],n=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return n.then((function(e){const i=t.byteOffset||0,n=t.byteLength||0,s=t.count,a=t.byteStride,o=new Uint8Array(e,i,n);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(s,a,o,t.mode,t.filter).then((function(t){return t.buffer})):r.ready.then((function(){const e=new ArrayBuffer(s*a);return r.decodeGltfBuffer(new Uint8Array(e),s,a,o,t.mode,t.filter),e}))}))}return null}}class Kh{constructor(t){this.name=Dh.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||void 0===i.mesh)return null;const n=e.meshes[i.mesh];for(const t of n.primitives)if(t.mode!==ou.TRIANGLES&&t.mode!==ou.TRIANGLE_STRIP&&t.mode!==ou.TRIANGLE_FAN&&void 0!==t.mode)return null;const r=i.extensions[this.name].attributes,s=[],a={};for(const t in r)s.push(this.parser.getDependency("accessor",r[t]).then((e=>(a[t]=e,a[t]))));return s.length<1?null:(s.push(this.parser.createNodeMesh(t)),Promise.all(s).then((t=>{const e=t.pop(),i=e.isGroup?e.children:[e],n=t[0].count,r=[];for(const t of i){const e=new Ye,i=new _e,s=new ve,o=new _e(1,1,1),l=new eo(t.geometry,t.material,n);for(let t=0;t-1,r=n?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||i||n&&r<98?this.textureLoader=new il(this.options.manager):this.textureLoader=new El(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Zo(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,n=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(t){return t._markDefs&&t._markDefs()})),Promise.all(this._invokeAll((function(t){return t.beforeRoot&&t.beforeRoot()}))).then((function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])})).then((function(e){const s={scene:e[0][n.scene||0],scenes:e[0],animations:e[1],cameras:e[2],asset:n.asset,parser:i,userData:{}};return _u(r,s,n),Eu(s,n),Promise.all(i._invokeAll((function(t){return t.afterRoot&&t.afterRoot(s)}))).then((function(){t(s)}))})).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let i=0,n=e.length;i{const i=this.associations.get(t);null!=i&&this.associations.set(e,i);for(const[i,n]of t.children.entries())r(n,e.children[i])};return r(i,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i=2&&A.setY(e,h[t*s+1]),s>=3&&A.setZ(e,h[t*s+2]),s>=4&&A.setW(e,h[t*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return A}))}loadTexture(t){const e=this.json,i=this.options,n=e.textures[t].source,r=e.images[n];let s=this.textureLoader;if(r.uri){const t=i.manager.getHandler(r.uri);null!==t&&(s=t)}return this.loadTextureImage(t,n,s)}loadTextureImage(t,e,i){const n=this,r=this.json,s=r.textures[t],a=r.images[e],o=(a.uri||a.bufferView)+":"+s.sampler;if(this.textureCache[o])return this.textureCache[o];const l=this.loadImageSource(e,i).then((function(e){e.flipY=!1,e.name=s.name||a.name||"",""===e.name&&"string"==typeof a.uri&&!1===a.uri.startsWith("data:image/")&&(e.name=a.uri);const i=(r.samplers||{})[s.sampler]||{};return e.magFilter=cu[i.magFilter]||D,e.minFilter=cu[i.minFilter]||P,e.wrapS=hu[i.wrapS]||w,e.wrapT=hu[i.wrapT]||w,n.associations.set(e,{textures:t}),e})).catch((function(){return null}));return this.textureCache[o]=l,l}loadImageSource(t,e){const i=this,n=this.json,r=this.options;if(void 0!==this.sourceCache[t])return this.sourceCache[t].then((t=>t.clone()));const s=n.images[t],a=self.URL||self.webkitURL;let o=s.uri||"",l=!1;if(void 0!==s.bufferView)o=i.getDependency("bufferView",s.bufferView).then((function(t){l=!0;const e=new Blob([t],{type:s.mimeType});return o=a.createObjectURL(e),o}));else if(void 0===s.uri)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(o).then((function(t){return new Promise((function(i,n){let s=i;!0===e.isImageBitmapLoader&&(s=function(t){const e=new de(t);e.needsUpdate=!0,i(e)}),e.load(_l.resolveURL(t,r.path),s,void 0,n)}))})).then((function(t){var e;return!0===l&&a.revokeObjectURL(o),t.userData.mimeType=s.mimeType||((e=s.uri).search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/)?"image/jpeg":e.search(/\.webp($|\?)/i)>0||0===e.search(/^data\:image\/webp/)?"image/webp":"image/png"),t})).catch((function(t){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),t}));return this.sourceCache[t]=c,c}assignTexture(t,e,i,n){const r=this;return this.getDependency("texture",i.index).then((function(s){if(!s)return null;if(void 0!==i.texCoord&&i.texCoord>0&&((s=s.clone()).channel=i.texCoord),r.extensions[Dh.KHR_TEXTURE_TRANSFORM]){const t=void 0!==i.extensions?i.extensions[Dh.KHR_TEXTURE_TRANSFORM]:void 0;if(t){const e=r.associations.get(s);s=r.extensions[Dh.KHR_TEXTURE_TRANSFORM].extendTexture(s,t),r.associations.set(s,e)}}return void 0!==n&&(s.colorSpace=n),t[e]=s,s}))}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const n=void 0===e.attributes.tangent,r=void 0!==e.attributes.color,s=void 0===e.attributes.normal;if(t.isPoints){const t="PointsMaterial:"+i.uuid;let e=this.cache.get(t);e||(e=new po,ki.prototype.copy.call(e,i),e.color.copy(i.color),e.map=i.map,e.sizeAttenuation=!1,this.cache.add(t,e)),i=e}else if(t.isLine){const t="LineBasicMaterial:"+i.uuid;let e=this.cache.get(t);e||(e=new io,ki.prototype.copy.call(e,i),e.color.copy(i.color),e.map=i.map,this.cache.add(t,e)),i=e}if(n||r||s){let t="ClonedMaterial:"+i.uuid+":";n&&(t+="derivative-tangents:"),r&&(t+="vertex-colors:"),s&&(t+="flat-shading:");let e=this.cache.get(t);e||(e=i.clone(),r&&(e.vertexColors=!0),s&&(e.flatShading=!0),n&&(e.normalScale&&(e.normalScale.y*=-1),e.clearcoatNormalScale&&(e.clearcoatNormalScale.y*=-1)),this.cache.add(t,e),this.associations.set(e,this.associations.get(i))),i=e}t.material=i}getMaterialType(){return wo}loadMaterial(t){const e=this,i=this.json,n=this.extensions,r=i.materials[t];let s;const a={},o=[];if((r.extensions||{})[Dh.KHR_MATERIALS_UNLIT]){const t=n[Dh.KHR_MATERIALS_UNLIT];s=t.getMaterialType(),o.push(t.extendParams(a,r,e))}else{const i=r.pbrMetallicRoughness||{};if(a.color=new Fi(1,1,1),a.opacity=1,Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;a.color.setRGB(t[0],t[1],t[2],vt),a.opacity=t[3]}void 0!==i.baseColorTexture&&o.push(e.assignTexture(a,"map",i.baseColorTexture,ft)),a.metalness=void 0!==i.metallicFactor?i.metallicFactor:1,a.roughness=void 0!==i.roughnessFactor?i.roughnessFactor:1,void 0!==i.metallicRoughnessTexture&&(o.push(e.assignTexture(a,"metalnessMap",i.metallicRoughnessTexture)),o.push(e.assignTexture(a,"roughnessMap",i.metallicRoughnessTexture))),s=this._invokeOne((function(e){return e.getMaterialType&&e.getMaterialType(t)})),o.push(Promise.all(this._invokeAll((function(e){return e.extendMaterialParams&&e.extendMaterialParams(t,a)}))))}!0===r.doubleSided&&(a.side=c);const l=r.alphaMode||mu;if(l===fu?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,l===gu&&(a.alphaTest=void 0!==r.alphaCutoff?r.alphaCutoff:.5)),void 0!==r.normalTexture&&s!==Gi&&(o.push(e.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Wt(1,1),void 0!==r.normalTexture.scale)){const t=r.normalTexture.scale;a.normalScale.set(t,t)}if(void 0!==r.occlusionTexture&&s!==Gi&&(o.push(e.assignTexture(a,"aoMap",r.occlusionTexture)),void 0!==r.occlusionTexture.strength&&(a.aoMapIntensity=r.occlusionTexture.strength)),void 0!==r.emissiveFactor&&s!==Gi){const t=r.emissiveFactor;a.emissive=(new Fi).setRGB(t[0],t[1],t[2],vt)}return void 0!==r.emissiveTexture&&s!==Gi&&o.push(e.assignTexture(a,"emissiveMap",r.emissiveTexture,ft)),Promise.all(o).then((function(){const i=new s(a);return r.name&&(i.name=r.name),Eu(i,r),e.associations.set(i,{materials:t}),r.extensions&&_u(n,i,r),i}))}createUniqueName(t){const e=bl.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,n=this.primitiveCache;function r(t){return i[Dh.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(t,e).then((function(i){return wu(i,t,e)}))}const s=[];for(let i=0,a=t.length;i0&&yu(u,r),u.name=e.createUniqueName(r.name||"mesh_"+t),Eu(u,r),h.extensions&&_u(n,u,h),e.assignFinalMaterial(u),l.push(u)}for(let i=0,n=l.length;i1?new ya:1===e.length?e[0]:new Ei,a!==e[0])for(let t=0,i=e.length;t{const e=new Map;for(const[t,i]of n.associations)(t instanceof ki||t instanceof de)&&e.set(t,i);return t.traverse((t=>{const i=n.associations.get(t);null!=i&&e.set(t,i)})),e})(r),r}))}_createAnimationTracks(t,e,i,n,r){const s=[],a=t.name?t.name:t.uuid,o=[];let l;switch(Au[r.path]===Au.weights?t.traverse((function(t){t.morphTargetInfluences&&o.push(t.name?t.name:t.uuid)})):o.push(a),Au[r.path]){case Au.weights:l=ko;break;case Au.rotation:l=Ho;break;case Au.position:case Au.scale:l=Vo;break;default:if(1===i.itemSize)l=ko;else l=Vo}const c=void 0!==n.interpolation?pu[n.interpolation]:ct,h=this._getArrayFromAccessor(i);for(let t=0,i=o.length;t{const n=this._getIdleWorker();-1!==n?(this._initWorker(n),this.workerStatus|=1<t.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const Tu=2,Bu=0,Ru=1,Lu=10;class Du{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Uu{constructor(t,e,i,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,i),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const i=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&nt.arrayBuffer())).then((t=>WebAssembly.instantiate(t,ku))).then(this._init):WebAssembly.instantiate(Buffer.from(Hu,"base64"),ku).then(this._init),Fu)}_init(t){Qu=t.instance,ku.env.emscripten_notify_memory_growth(0)}decode(t,e=0){if(!Qu)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=t.byteLength,n=Qu.exports.malloc(i);Ou.set(t,n),e=e||Number(Qu.exports.ZSTD_findDecompressedSize(n,i));const r=Qu.exports.malloc(e),s=Qu.exports.ZSTD_decompress(r,e,n,i),a=Ou.slice(r,r+s);return Qu.exports.free(n),Qu.exports.free(r),a}}const Hu="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",zu=new WeakMap;let Vu,Wu=0;class qu extends Ko{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new bu,this.workerSourceURL="",this.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}detectSupport(t){return!0===t.isWebGPURenderer?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},t.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}init(){if(!this.transcoderPending){const t=new Zo(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const e=t.loadAsync("basis_transcoder.js"),i=new Zo(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const n=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([e,n]).then((([t,e])=>{const i=qu.BasisWorker.toString(),n=["/* constants */","let _EngineFormat = "+JSON.stringify(qu.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(qu.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(qu.BasisFormat),"/* basis_transcoder.js */",t,"/* worker */",i.substring(i.indexOf("{")+1,i.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n])),this.transcoderBinary=e,this.workerPool.setWorkerCreator((()=>{const t=new Worker(this.workerSourceURL),e=this.transcoderBinary.slice(0);return t.postMessage({type:"init",config:this.workerConfig,transcoderBinary:e},[e]),t}))})),Wu>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Wu++}return this.transcoderPending}load(t,e,i,n){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const r=new Zo(this.manager);r.setResponseType("arraybuffer"),r.setWithCredentials(this.withCredentials),r.load(t,(t=>{if(zu.has(t)){return zu.get(t).promise.then(e).catch(n)}this._createTexture(t).then((t=>e?e(t):null)).catch(n)}),i,n)}_createTextureFrom(t,e){const{faces:i,width:n,height:r,format:s,type:a,error:o,dfdFlags:l}=t;if("error"===a)return Promise.reject(o);let c;if(6===e.faceCount)c=new Co(i,s,N);else{const t=i[0].mipmaps;c=e.layerCount>1?new So(t,n,r,e.layerCount,s,N):new xo(t,n,r,s,N)}return c.minFilter=1===i[0].mipmaps.length?D:P,c.magFilter=D,c.generateMipmaps=!1,c.needsUpdate=!0,c.colorSpace=Ku(e),c.premultiplyAlpha=!!(1&l),c}async _createTexture(t,e={}){const i=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,Pu.length);if(e[0]!==Pu[0]||e[1]!==Pu[1]||e[2]!==Pu[2]||e[3]!==Pu[3]||e[4]!==Pu[4]||e[5]!==Pu[5]||e[6]!==Pu[6]||e[7]!==Pu[7]||e[8]!==Pu[8]||e[9]!==Pu[9]||e[10]!==Pu[10]||e[11]!==Pu[11])throw new Error("Missing KTX 2.0 identifier.");const i=new Du,n=17*Uint32Array.BYTES_PER_ELEMENT,r=new Uu(t,Pu.length,n,!0);i.vkFormat=r._nextUint32(),i.typeSize=r._nextUint32(),i.pixelWidth=r._nextUint32(),i.pixelHeight=r._nextUint32(),i.pixelDepth=r._nextUint32(),i.layerCount=r._nextUint32(),i.faceCount=r._nextUint32();const s=r._nextUint32();i.supercompressionScheme=r._nextUint32();const a=r._nextUint32(),o=r._nextUint32(),l=r._nextUint32(),c=r._nextUint32(),h=r._nextUint64(),u=r._nextUint64(),d=new Uu(t,Pu.length+n,3*s*8,!0);for(let e=0;e{const e=new Gu;await e.init(),t(e)}))),i=await Vu);const n=[];for(let r=0;r>r),a=Math.max(1,t.pixelHeight>>r),o=t.pixelDepth?Math.max(1,t.pixelDepth>>r):0,l=t.levels[r];let c,h;if(0===t.supercompressionScheme)c=l.levelData;else{if(2!==t.supercompressionScheme)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");c=i.decode(l.levelData,l.uncompressedByteLength)}h=Yu[e]===k?new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):Yu[e]===G?new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):c,n.push({data:h,width:s,height:a,depth:o})}let r;if(Xu.has(ju[e]))r=0===t.pixelDepth?new za(n[0].data,t.pixelWidth,t.pixelHeight):new fe(n[0].data,t.pixelWidth,t.pixelHeight,t.pixelDepth);else{if(t.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");r=new xo(n,t.pixelWidth,t.pixelHeight)}return r.mipmaps=n,r.type=Yu[e],r.format=ju[e],r.colorSpace=Ku(t),r.needsUpdate=!0,Promise.resolve(r)}(i);const n=e,r=this.init().then((()=>this.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:n},[t]))).then((t=>this._createTextureFrom(t.data,i)));return zu.set(t,{promise:r}),r}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Wu--,this}}qu.BasisFormat={ETC1S:0,UASTC_4x4:1},qu.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},qu.EngineFormat={RGBAFormat:z,RGBA_ASTC_4x4_Format:nt,RGBA_BPTC_Format:st,RGBA_ETC2_EAC_Format:it,RGBA_PVRTC_4BPPV1_Format:Z,RGBA_S3TC_DXT5_Format:J,RGB_ETC1_Format:tt,RGB_ETC2_Format:et,RGB_PVRTC_4BPPV1_Format:$,RGB_S3TC_DXT1_Format:j},qu.BasisWorker=function(){let t,e,i;const n=_EngineFormat,r=_TranscoderFormat,s=_BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":t=u.config,d=u.transcoderBinary,e=new Promise((t=>{i={wasmBinary:d,onRuntimeInitialized:t},BASIS(i)})).then((()=>{i.initializeBasis(),void 0===i.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":e.then((()=>{try{const{faces:e,buffers:a,width:d,height:A,hasAlpha:p,format:m,dfdFlags:g}=function(e){const a=new i.KTX2File(new Uint8Array(e));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");const d=a.isUASTC()?s.UASTC_4x4:s.ETC1S,A=a.getWidth(),p=a.getHeight(),m=a.getLayers()||1,g=a.getLevels(),f=a.getFaces(),v=a.getHasAlpha(),_=a.getDFDFlags(),{transcoderFormat:E,engineFormat:y}=function(e,i,a,h){let u,d;const A=e===s.ETC1S?o:l;for(let n=0;n1?(r=o.origWidth,s=o.origHeight):(r=o.width,s=o.height);const l=new Uint8Array(a.getImageTranscodedSizeInBytes(i,e,0,E));if(!a.transcodeImage(l,i,e,t,E,0,-1,-1))throw u(),new Error("THREE.KTX2Loader: .transcodeImage failed.");n.push(l)}const o=h(n);e.push({data:o,width:r,height:s}),S.push(o.buffer)}x.push({mipmaps:e,width:A,height:p,format:y})}return u(),{faces:x,buffers:S,width:A,height:p,hasAlpha:v,format:y,dfdFlags:_}}(u.buffer);self.postMessage({type:"transcode",id:u.id,faces:e,width:d,height:A,hasAlpha:p,format:m,dfdFlags:g},a)}catch(t){console.error(t),self.postMessage({type:"error",id:u.id,error:t.message})}}))}var d}));const a=[{if:"astcSupported",basisFormat:[s.UASTC_4x4],transcoderFormat:[r.ASTC_4x4,r.ASTC_4x4],engineFormat:[n.RGBA_ASTC_4x4_Format,n.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.BC7_M5,r.BC7_M5],engineFormat:[n.RGBA_BPTC_Format,n.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.BC1,r.BC3],engineFormat:[n.RGB_S3TC_DXT1_Format,n.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.ETC1,r.ETC2],engineFormat:[n.RGB_ETC2_Format,n.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.ETC1],engineFormat:[n.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[r.PVRTC1_4_RGB,r.PVRTC1_4_RGBA],engineFormat:[n.RGB_PVRTC_4BPPV1_Format,n.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],o=a.sort((function(t,e){return t.priorityETC1S-e.priorityETC1S})),l=a.sort((function(t,e){return t.priorityUASTC-e.priorityUASTC}));function c(t){return t<=2||0==(t&t-1)&&0!==t}function h(t){if(1===t.length)return t[0];let e=0;for(let i=0;i=this[id];--t){const e=this[td][t];0===this[Zu].get(e)&&(this[nd].delete(e),this[td].splice(t,1))}}} -/* @license - * Copyright 2021 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const sd=t=>{const e=new Map;for(const i of t.mappings)for(const t of i.variants)e.set(t,{material:null,gltfMaterialIndex:i.material});return e};class ad{constructor(t){this.parser=t,this.name="KHR_materials_variants"}afterRoot(t){const e=this.parser,i=e.json;if(void 0===i.extensions||void 0===i.extensions[this.name])return null;const n=(t=>{const e=[],i=new Set;for(const n of t){let t=n,r=0;for(;i.has(t);)t=n+"."+ ++r;i.add(t),e.push(t)}return e})((i.extensions[this.name].variants||[]).map((t=>t.name)));for(const n of t.scenes)n.traverse((t=>{const n=t;if(!n.material)return;const r=e.associations.get(n);if(null==r||null==r.meshes||null==r.primitives)return;const s=i.meshes[r.meshes].primitives[r.primitives].extensions;s&&s[this.name]&&(n.userData.variantMaterials=sd(s[this.name]))}));return t.userData.variants=n,Promise.resolve()}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var od,ld;de.DEFAULT_ANISOTROPY=4;const cd=new Map,hd=new Map;let ud;const dd=new class extends Ko{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,i,n){const r=new Zo(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,(t=>{this.parse(t,e,n)}),i,n)}parse(t,e,i=(()=>{})){this.decodeDracoFile(t,e,null,null,ft).catch(i)}decodeDracoFile(t,e,i,n,r=vt,s=(()=>{})){const a={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:n||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:r};return this.decodeGeometry(t,a).then(e).catch(s)}decodeGeometry(t,e){const i=JSON.stringify(e);if(bh.has(t)){const e=bh.get(t);if(e.key===i)return e.promise;if(0===t.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let n;const r=this.workerNextTaskID++,s=t.byteLength,a=this._getWorker(r,s).then((i=>(n=i,new Promise(((i,s)=>{n._callbacks[r]={resolve:i,reject:s},n.postMessage({type:"decode",id:r,taskConfig:e,buffer:t},[t])}))))).then((t=>this._createGeometry(t.geometry)));return a.catch((()=>!0)).then((()=>{n&&r&&this._releaseTask(n,r)})),bh.set(t,{key:i,promise:a}),a}_createGeometry(t){const e=new sn;t.index&&e.setIndex(new Xi(t.index.array,1));for(let i=0;i{i.load(t,e,void 0,n)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then((e=>{const i=e[0];t||(this.decoderConfig.wasmBinary=e[1]);const n=Th.toString(),r=["/* draco decoder */",i,"","/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r]))})),this.decoderPending}_getWorker(t,e){return this._initDecoder().then((()=>{if(this.workerPool.lengthe._taskLoad?-1:1}));const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i}))}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map((t=>t._taskLoad)))}dispose(){for(let t=0;tnew ad(t))),this[_d]=t,this[fd].setDRACOLoader(dd),this[fd].setKTX2Loader(pd)}static setDRACODecoderLocation(t){ud=t,dd.setDecoderPath(t)}static getDRACODecoderLocation(){return ud}static setKTX2TranscoderLocation(t){Ad=t,pd.setTranscoderPath(t)}static getKTX2TranscoderLocation(){return Ad}static setMeshoptDecoderLocation(t){var e;md!==t&&(md=t,gd=(e=t,new Promise(((t,i)=>{const n=document.createElement("script");document.body.appendChild(n),n.onload=t,n.onerror=i,n.async=!0,n.src=e}))).then((()=>MeshoptDecoder.ready)).then((()=>MeshoptDecoder)))}static getMeshoptDecoderLocation(){return md}static initializeKTX2Loader(t){pd.detectSupport(t)}static get cache(){return cd}static clearCache(){cd.forEach(((t,e)=>{this.delete(e)})),this[vd].reset()}static has(t){return cd.has(t)}static async delete(t){if(!this.has(t))return;const e=cd.get(t);hd.delete(t),cd.delete(t);(await e).dispose()}static hasFinishedLoading(t){return!!hd.get(t)}get[(od=vd,ld=fd,vd)](){return this.constructor[vd]}async preload(t,e,i=(()=>{})){if(this[fd].setWithCredentials(Ed.withCredentials),this.dispatchEvent({type:"preload",element:e,src:t}),!cd.has(t)){null!=gd&&this[fd].setMeshoptDecoder(await gd);const e=((t,e,i=(()=>{}))=>{const n=t=>{const e=t.loaded/t.total;i(Math.max(0,Math.min(1,isFinite(e)?e:1)))};return new Promise(((i,r)=>{e.load(t,i,n,r)}))})(t,this[fd],(t=>{i(.8*t)})),n=this[_d],r=e.then((t=>n.prepare(t))).then((t=>(i(.9),new n(t)))).catch((t=>(console.error(t),new n)));cd.set(t,r)}await cd.get(t),hd.set(t,!0),i&&i(1)}async load(t,e,i=(()=>{})){await this.preload(t,e,i);const n=await cd.get(t),r=await n.clone();return this[vd].retain(t),r.dispose=()=>{this[vd].release(t)},r}}Ed[od]=new rd(Ed);class yd extends Ei{constructor(t=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=t,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new Wt(.5,.5),this.addEventListener("removed",(function(){this.traverse((function(t){t.element instanceof Element&&null!==t.element.parentNode&&t.element.parentNode.removeChild(t.element)}))}))}copy(t,e){return super.copy(t,e),this.element=t.element.cloneNode(!0),this.center=t.center,this}}const xd=new _e,Sd=new Ye,Cd=new Ye,Id=new _e,Md=new _e;class wd{constructor(t={}){const e=this;let i,n,r,s;const a={objects:new WeakMap},o=void 0!==t.element?t.element:document.createElement("div");function l(t,i,n){if(t.isCSS2DObject){xd.setFromMatrixPosition(t.matrixWorld),xd.applyMatrix4(Cd);const l=!0===t.visible&&xd.z>=-1&&xd.z<=1&&!0===t.layers.test(n.layers);if(t.element.style.display=!0===l?"":"none",!0===l){t.onBeforeRender(e,i,n);const a=t.element;a.style.transform="translate("+-100*t.center.x+"%,"+-100*t.center.y+"%)translate("+(xd.x*r+r)+"px,"+(-xd.y*s+s)+"px)",a.parentNode!==o&&o.appendChild(a),t.onAfterRender(e,i,n)}const h={distanceToCameraSquared:c(n,t)};a.objects.set(t,h)}for(let e=0,r=t.children.length;e{const{geometry:i}=t;if(void 0!==i){const{position:s}=i.attributes;if(void 0!==s)for(let i=0,a=s.count;it.toBlob(i,e)));let i;return"image/jpeg"===e?i=.92:"image/webp"===e&&(i=.8),t.convertToBlob({type:e,quality:i})}class pA{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(t){this.plugins=t}async write(t,e,i={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},i),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(t),await Promise.all(this.pending);const n=this,r=n.buffers,s=n.json;i=n.options;const a=n.extensionsUsed,o=n.extensionsRequired,l=new Blob(r,{type:"application/octet-stream"}),c=Object.keys(a),h=Object.keys(o);if(c.length>0&&(s.extensionsUsed=c),h.length>0&&(s.extensionsRequired=h),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=l.size),!0===i.binary){const t=new FileReader;t.readAsArrayBuffer(l),t.onloadend=function(){const i=uA(t.result),n=new DataView(new ArrayBuffer(8));n.setUint32(0,i.byteLength,!0),n.setUint32(4,5130562,!0);const r=uA((a=JSON.stringify(s),(new TextEncoder).encode(a).buffer),32);var a;const o=new DataView(new ArrayBuffer(8));o.setUint32(0,r.byteLength,!0),o.setUint32(4,1313821514,!0);const l=new ArrayBuffer(12),c=new DataView(l);c.setUint32(0,1179937895,!0),c.setUint32(4,2,!0);const h=12+o.byteLength+r.byteLength+n.byteLength+i.byteLength;c.setUint32(8,h,!0);const u=new Blob([l,o,r,n,i],{type:"application/octet-stream"}),d=new FileReader;d.readAsArrayBuffer(u),d.onloadend=function(){e(d.result)}}}else if(s.buffers&&s.buffers.length>0){const t=new FileReader;t.readAsDataURL(l),t.onloadend=function(){const i=t.result;s.buffers[0].uri=i,e(s)}}else e(s)}serializeUserData(t,e){if(0===Object.keys(t.userData).length)return;const i=this.options,n=this.extensionsUsed;try{const r=JSON.parse(JSON.stringify(t.userData));if(i.includeCustomExtensions&&r.gltfExtensions){void 0===e.extensions&&(e.extensions={});for(const t in r.gltfExtensions)e.extensions[t]=r.gltfExtensions[t],n[t]=!0;delete r.gltfExtensions}Object.keys(r).length>0&&(e.extras=r)}catch(e){console.warn("THREE.GLTFExporter: userData of '"+t.name+"' won't be serialized because of JSON.stringify error - "+e.message)}}getUID(t,e=!1){if(!1===this.uids.has(t)){const e=new Map;e.set(!0,this.uid++),e.set(!1,this.uid++),this.uids.set(t,e)}return this.uids.get(t).get(e)}isNormalizedNormalAttribute(t){if(this.cache.attributesNormalized.has(t))return!1;const e=new _e;for(let i=0,n=t.count;i5e-4)return!1;return!0}createNormalizedNormalAttribute(t){const e=this.cache;if(e.attributesNormalized.has(t))return e.attributesNormalized.get(t);const i=t.clone(),n=new _e;for(let t=0,e=i.count;t4?n=t.array[r*t.itemSize+i]:(0===i?n=t.getX(r):1===i?n=t.getY(r):2===i?n=t.getZ(r):3===i&&(n=t.getW(r)),!0===t.normalized&&(n=Vt.normalize(n,t.array))),e===Xd?l.setFloat32(c,n,!0):e===Wd?l.setInt32(c,n,!0):e===qd?l.setUint32(c,n,!0):e===zd?l.setInt16(c,n,!0):e===Vd?l.setUint16(c,n,!0):e===Gd?l.setInt8(c,n):e===Hd&&l.setUint8(c,n),c+=a}const h={buffer:this.processBuffer(l.buffer),byteOffset:this.byteOffset,byteLength:o};void 0!==r&&(h.target=r),r===jd&&(h.byteStride=t.itemSize*a),this.byteOffset+=o,s.bufferViews.push(h);return{id:s.bufferViews.length-1,byteLength:0}}processBufferViewImage(t){const e=this,i=e.json;return i.bufferViews||(i.bufferViews=[]),new Promise((function(n){const r=new FileReader;r.readAsArrayBuffer(t),r.onloadend=function(){const t=uA(r.result),s={buffer:e.processBuffer(t),byteOffset:e.byteOffset,byteLength:t.byteLength};e.byteOffset+=t.byteLength,n(i.bufferViews.push(s)-1)}}))}processAccessor(t,e,i,n){const r=this.json;let s;if(t.array.constructor===Float32Array)s=Xd;else if(t.array.constructor===Int32Array)s=Wd;else if(t.array.constructor===Uint32Array)s=qd;else if(t.array.constructor===Int16Array)s=zd;else if(t.array.constructor===Uint16Array)s=Vd;else if(t.array.constructor===Int8Array)s=Gd;else{if(t.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+t.array.constructor.name);s=Hd}if(void 0===i&&(i=0),void 0!==n&&n!==1/0||(n=t.count),0===n)return null;const a=function(t,e,i){const n={min:new Array(t.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(t.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let r=e;r4?i=t.array[r*t.itemSize+e]:(0===e?i=t.getX(r):1===e?i=t.getY(r):2===e?i=t.getZ(r):3===e&&(i=t.getW(r)),!0===t.normalized&&(i=Vt.normalize(i,t.array))),n.min[e]=Math.min(n.min[e],i),n.max[e]=Math.max(n.max[e],i)}return n}(t,i,n);let o;void 0!==e&&(o=t===e.index?Yd:jd);const l=this.processBufferView(t,s,i,n,o),c={bufferView:l.id,byteOffset:l.byteOffset,componentType:s,count:n,max:a.max,min:a.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[t.itemSize]};return!0===t.normalized&&(c.normalized=!0),r.accessors||(r.accessors=[]),r.accessors.push(c)-1}processImage(t,e,i,n="image/png"){if(null!==t){const r=this,s=r.cache,a=r.json,o=r.options,l=r.pending;s.images.has(t)||s.images.set(t,{});const c=s.images.get(t),h=n+":flipY/"+i.toString();if(void 0!==c[h])return c[h];a.images||(a.images=[]);const u={mimeType:n},d=dA();d.width=Math.min(t.width,o.maxTextureSize),d.height=Math.min(t.height,o.maxTextureSize);const A=d.getContext("2d");if(!0===i&&(A.translate(0,d.height),A.scale(1,-1)),void 0!==t.data){e!==z&&console.error("GLTFExporter: Only RGBAFormat is supported.",e),(t.width>o.maxTextureSize||t.height>o.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",t);const i=new Uint8ClampedArray(t.height*t.width*4);for(let e=0;er.processBufferViewImage(t))).then((t=>{u.bufferView=t}))):void 0!==d.toDataURL?u.uri=d.toDataURL(n):l.push(AA(d,n).then((t=>(new FileReader).readAsDataURL(t))).then((t=>{u.uri=t})));const p=a.images.push(u)-1;return c[h]=p,p}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(t){const e=this.json;e.samplers||(e.samplers=[]);const i={magFilter:aA[t.magFilter],minFilter:aA[t.minFilter],wrapS:aA[t.wrapS],wrapT:aA[t.wrapT]};return e.samplers.push(i)-1}processTexture(t){const e=this.options,i=this.cache,n=this.json;if(i.textures.has(t))return i.textures.get(t);n.textures||(n.textures=[]),t instanceof xo&&(t=Dd(t,e.maxTextureSize));let r=t.userData.mimeType;"image/webp"===r&&(r="image/png");const s={sampler:this.processSampler(t),source:this.processImage(t.image,t.format,t.flipY,r)};t.name&&(s.name=t.name),this._invokeAll((function(e){e.writeTexture&&e.writeTexture(t,s)}));const a=n.textures.push(s)-1;return i.textures.set(t,a),a}processMaterial(t){const e=this.cache,i=this.json;if(e.materials.has(t))return e.materials.get(t);if(t.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;i.materials||(i.materials=[]);const n={pbrMetallicRoughness:{}};!0!==t.isMeshStandardMaterial&&!0!==t.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const r=t.color.toArray().concat([t.opacity]);if(cA(r,[1,1,1,1])||(n.pbrMetallicRoughness.baseColorFactor=r),t.isMeshStandardMaterial?(n.pbrMetallicRoughness.metallicFactor=t.metalness,n.pbrMetallicRoughness.roughnessFactor=t.roughness):(n.pbrMetallicRoughness.metallicFactor=.5,n.pbrMetallicRoughness.roughnessFactor=.5),t.metalnessMap||t.roughnessMap){const e=this.buildMetalRoughTexture(t.metalnessMap,t.roughnessMap),i={index:this.processTexture(e),channel:e.channel};this.applyTextureTransform(i,e),n.pbrMetallicRoughness.metallicRoughnessTexture=i}if(t.map){const e={index:this.processTexture(t.map),texCoord:t.map.channel};this.applyTextureTransform(e,t.map),n.pbrMetallicRoughness.baseColorTexture=e}if(t.emissive){const e=t.emissive;if(Math.max(e.r,e.g,e.b)>0&&(n.emissiveFactor=t.emissive.toArray()),t.emissiveMap){const e={index:this.processTexture(t.emissiveMap),texCoord:t.emissiveMap.channel};this.applyTextureTransform(e,t.emissiveMap),n.emissiveTexture=e}}if(t.normalMap){const e={index:this.processTexture(t.normalMap),texCoord:t.normalMap.channel};t.normalScale&&1!==t.normalScale.x&&(e.scale=t.normalScale.x),this.applyTextureTransform(e,t.normalMap),n.normalTexture=e}if(t.aoMap){const e={index:this.processTexture(t.aoMap),texCoord:t.aoMap.channel};1!==t.aoMapIntensity&&(e.strength=t.aoMapIntensity),this.applyTextureTransform(e,t.aoMap),n.occlusionTexture=e}t.transparent?n.alphaMode="BLEND":t.alphaTest>0&&(n.alphaMode="MASK",n.alphaCutoff=t.alphaTest),t.side===c&&(n.doubleSided=!0),""!==t.name&&(n.name=t.name),this.serializeUserData(t,n),this._invokeAll((function(e){e.writeMaterial&&e.writeMaterial(t,n)}));const s=i.materials.push(n)-1;return e.materials.set(t,s),s}processMesh(t){const e=this.cache,i=this.json,n=[t.geometry.uuid];if(Array.isArray(t.material))for(let e=0,i=t.material.length;e0){const i=[],n=[],r={};if(void 0!==t.morphTargetDictionary)for(const e in t.morphTargetDictionary)r[t.morphTargetDictionary[e]]=e;for(let a=0;a0&&(o.extras={},o.extras.targetNames=n)}const p=Array.isArray(t.material);if(p&&0===s.groups.length)return null;let m=!1;if(p&&null===s.index){const t=[];for(let e=0,i=s.attributes.position.count;e0&&(i.targets=h),null!==s.index){let n=this.getUID(s.index);void 0===f[t].start&&void 0===f[t].count||(n+=":"+f[t].start+":"+f[t].count),e.attributes.has(n)?i.indices=e.attributes.get(n):(i.indices=this.processAccessor(s.index,s,f[t].start,f[t].count),e.attributes.set(n,i.indices)),null===i.indices&&delete i.indices}const n=this.processMaterial(g[f[t].materialIndex]);null!==n&&(i.material=n),c.push(i)}!0===m&&s.setIndex(null),o.primitives=c,i.meshes||(i.meshes=[]),this._invokeAll((function(e){e.writeMesh&&e.writeMesh(t,o)}));const v=i.meshes.push(o)-1;return e.meshes.set(r,v),v}detectMeshQuantization(t,e){if(this.extensionsUsed[sA])return;let i;switch(e.array.constructor){case Int8Array:i="byte";break;case Uint8Array:i="unsigned byte";break;case Int16Array:i="short";break;case Uint16Array:i="unsigned short";break;default:return}e.normalized&&(i+=" normalized");const n=t.split("_",1)[0];Ud[n]&&Ud[n].includes(i)&&(this.extensionsUsed[sA]=!0,this.extensionsRequired[sA]=!0)}processCamera(t){const e=this.json;e.cameras||(e.cameras=[]);const i=t.isOrthographicCamera,n={type:i?"orthographic":"perspective"};return i?n.orthographic={xmag:2*t.right,ymag:2*t.top,zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near}:n.perspective={aspectRatio:t.aspect,yfov:Vt.degToRad(t.fov),zfar:t.far<=0?.001:t.far,znear:t.near<0?0:t.near},""!==t.name&&(n.name=t.type),e.cameras.push(n)-1}processAnimation(t,e){const i=this.json,n=this.nodeMap;i.animations||(i.animations=[]);const r=(t=Pd.Utils.mergeMorphTargetTracks(t.clone(),e)).tracks,s=[],a=[];for(let t=0;t0){const e=[];for(let n=0,r=t.children.length;n0&&(r.children=e)}this._invokeAll((function(e){e.writeNode&&e.writeNode(t,r)}));const s=e.nodes.push(r)-1;return n.set(t,s),s}processScene(t){const e=this.json,i=this.options;e.scenes||(e.scenes=[],e.scene=0);const n={};""!==t.name&&(n.name=t.name),e.scenes.push(n);const r=[];for(let e=0,n=t.children.length;e0&&(n.nodes=r),this.serializeUserData(t,n)}processObjects(t){const e=new ba;e.name="AuxScene";for(let i=0;i0&&this.processObjects(i);for(let t=0;t0&&(s.range=t.distance)):t.isSpotLight&&(s.type="spot",t.distance>0&&(s.range=t.distance),s.spot={},s.spot.innerConeAngle=(1-t.penumbra)*t.angle,s.spot.outerConeAngle=t.angle),void 0!==t.decay&&2!==t.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),!t.target||t.target.parent===t&&0===t.target.position.x&&0===t.target.position.y&&-1===t.target.position.z||console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),r[this.name]||(n.extensions=n.extensions||{},n.extensions[this.name]={lights:[]},r[this.name]=!0);const a=n.extensions[this.name].lights;a.push(s),e.extensions=e.extensions||{},e.extensions[this.name]={light:a.length-1}}}class gA{constructor(t){this.writer=t,this.name="KHR_materials_unlit"}writeMaterial(t,e){if(!t.isMeshBasicMaterial)return;const i=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},i[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}}class fA{constructor(t){this.writer=t,this.name="KHR_materials_clearcoat"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.clearcoat)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.clearcoatFactor=t.clearcoat,t.clearcoatMap){const e={index:i.processTexture(t.clearcoatMap),texCoord:t.clearcoatMap.channel};i.applyTextureTransform(e,t.clearcoatMap),r.clearcoatTexture=e}if(r.clearcoatRoughnessFactor=t.clearcoatRoughness,t.clearcoatRoughnessMap){const e={index:i.processTexture(t.clearcoatRoughnessMap),texCoord:t.clearcoatRoughnessMap.channel};i.applyTextureTransform(e,t.clearcoatRoughnessMap),r.clearcoatRoughnessTexture=e}if(t.clearcoatNormalMap){const e={index:i.processTexture(t.clearcoatNormalMap),texCoord:t.clearcoatNormalMap.channel};i.applyTextureTransform(e,t.clearcoatNormalMap),r.clearcoatNormalTexture=e}e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class vA{constructor(t){this.writer=t,this.name="KHR_materials_iridescence"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.iridescence)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.iridescenceFactor=t.iridescence,t.iridescenceMap){const e={index:i.processTexture(t.iridescenceMap),texCoord:t.iridescenceMap.channel};i.applyTextureTransform(e,t.iridescenceMap),r.iridescenceTexture=e}if(r.iridescenceIor=t.iridescenceIOR,r.iridescenceThicknessMinimum=t.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum=t.iridescenceThicknessRange[1],t.iridescenceThicknessMap){const e={index:i.processTexture(t.iridescenceThicknessMap),texCoord:t.iridescenceThicknessMap.channel};i.applyTextureTransform(e,t.iridescenceThicknessMap),r.iridescenceThicknessTexture=e}e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class _A{constructor(t){this.writer=t,this.name="KHR_materials_transmission"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.transmission)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.transmissionFactor=t.transmission,t.transmissionMap){const e={index:i.processTexture(t.transmissionMap),texCoord:t.transmissionMap.channel};i.applyTextureTransform(e,t.transmissionMap),r.transmissionTexture=e}e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class EA{constructor(t){this.writer=t,this.name="KHR_materials_volume"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0===t.transmission)return;const i=this.writer,n=i.extensionsUsed,r={};if(r.thicknessFactor=t.thickness,t.thicknessMap){const e={index:i.processTexture(t.thicknessMap),texCoord:t.thicknessMap.channel};i.applyTextureTransform(e,t.thicknessMap),r.thicknessTexture=e}r.attenuationDistance=t.attenuationDistance,r.attenuationColor=t.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class yA{constructor(t){this.writer=t,this.name="KHR_materials_ior"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||1.5===t.ior)return;const i=this.writer.extensionsUsed,n={};n.ior=t.ior,e.extensions=e.extensions||{},e.extensions[this.name]=n,i[this.name]=!0}}class xA{constructor(t){this.writer=t,this.name="KHR_materials_specular"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||1===t.specularIntensity&&t.specularColor.equals(lA)&&!t.specularIntensityMap&&!t.specularColorMap)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.specularIntensityMap){const e={index:i.processTexture(t.specularIntensityMap),texCoord:t.specularIntensityMap.channel};i.applyTextureTransform(e,t.specularIntensityMap),r.specularTexture=e}if(t.specularColorMap){const e={index:i.processTexture(t.specularColorMap),texCoord:t.specularColorMap.channel};i.applyTextureTransform(e,t.specularColorMap),r.specularColorTexture=e}r.specularFactor=t.specularIntensity,r.specularColorFactor=t.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class SA{constructor(t){this.writer=t,this.name="KHR_materials_sheen"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0==t.sheen)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.sheenRoughnessMap){const e={index:i.processTexture(t.sheenRoughnessMap),texCoord:t.sheenRoughnessMap.channel};i.applyTextureTransform(e,t.sheenRoughnessMap),r.sheenRoughnessTexture=e}if(t.sheenColorMap){const e={index:i.processTexture(t.sheenColorMap),texCoord:t.sheenColorMap.channel};i.applyTextureTransform(e,t.sheenColorMap),r.sheenColorTexture=e}r.sheenRoughnessFactor=t.sheenRoughness,r.sheenColorFactor=t.sheenColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class CA{constructor(t){this.writer=t,this.name="KHR_materials_anisotropy"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||0==t.anisotropy)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.anisotropyMap){const e={index:i.processTexture(t.anisotropyMap)};i.applyTextureTransform(e,t.anisotropyMap),r.anisotropyTexture=e}r.anisotropyStrength=t.anisotropy,r.anisotropyRotation=t.anisotropyRotation,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class IA{constructor(t){this.writer=t,this.name="KHR_materials_emissive_strength"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||1===t.emissiveIntensity)return;const i=this.writer.extensionsUsed,n={};n.emissiveStrength=t.emissiveIntensity,e.extensions=e.extensions||{},e.extensions[this.name]=n,i[this.name]=!0}}class MA{constructor(t){this.writer=t,this.name="EXT_materials_bump"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||1===t.bumpScale&&!t.bumpMap)return;const i=this.writer,n=i.extensionsUsed,r={};if(t.bumpMap){const e={index:i.processTexture(t.bumpMap),texCoord:t.bumpMap.channel};i.applyTextureTransform(e,t.bumpMap),r.bumpTexture=e}r.bumpFactor=t.bumpScale,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}}class wA{constructor(t){this.writer=t,this.name="EXT_mesh_gpu_instancing"}writeNode(t,e){if(!t.isInstancedMesh)return;const i=this.writer,n=t,r=new Float32Array(3*n.count),s=new Float32Array(4*n.count),a=new Float32Array(3*n.count),o=new Ye,l=new _e,c=new ve,h=new _e;for(let t=0;tt.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-e)e){r.set(t.times.slice(0,l+1),0),r[l+1]=e,r.set(t.times.slice(l+1),l+2),s.set(t.values.slice(0,(l+1)*n),0),s.set(a.evaluate(e),(l+1)*n),s.set(t.values.slice((l+1)*n),(l+2)*n),o=l+1;break}}return t.times=r,t.values=s,o},mergeMorphTargetTracks:function(t,e){const i=[],n={},r=t.tracks;for(let t=0;tvoid 0!==t.material&&t.userData&&t.userData.variantMaterials&&!!Array.from(t.userData.variantMaterials.values()).filter((t=>TA(t.material))),TA=t=>t&&t.isMaterial&&!Array.isArray(t);class BA{constructor(t){this.writer=t,this.name="KHR_materials_variants",this.variantNames=[]}beforeParse(t){const e=new Set;for(const i of t)i.traverse((t=>{if(!bA(t))return;const i=t.userData.variantMaterials,n=t.userData.variantData;for(const[t,r]of n){const n=i.get(r.index);n&&TA(n.material)&&e.add(t)}}));e.forEach((t=>this.variantNames.push(t)))}writeMesh(t,e){if(!bA(t))return;const i=t.userData,n=i.variantMaterials,r=i.variantData,s=new Map,a=new Map,o=Array.from(r.values()).sort(((t,e)=>t.index-e.index));for(const[t,e]of o.entries())a.set(e.index,t);for(const t of r.values()){const e=n.get(t.index);if(!e||!TA(e.material))continue;const i=this.writer.processMaterial(e.material);s.has(i)||s.set(i,{material:i,variants:[]}),s.get(i).variants.push(a.get(t.index))}const l=Array.from(s.values()).map((t=>t.variants.sort(((t,e)=>t-e))&&t)).sort(((t,e)=>t.material-e.material));if(0===l.length)return;const c=TA(i.originalMaterial)?this.writer.processMaterial(i.originalMaterial):-1;for(const t of e.primitives)c>=0&&(t.material=c),t.extensions=t.extensions||{},t.extensions[this.name]={mappings:l}}afterParse(){if(0===this.variantNames.length)return;const t=this.writer.json;t.extensions=t.extensions||{};const e=this.variantNames.map((t=>({name:t})));t.extensions[this.name]={variants:e},this.writer.extensionsUsed[this.name]=!0}}class RA{constructor(t,e,i,n,r){this.xrLight=t,this.renderer=e,this.lightProbe=i,this.xrWebGLBinding=null,this.estimationStartCallback=r,this.frameCallback=this.onXRFrame.bind(this);const s=e.xr.getSession();if(n&&"XRWebGLBinding"in window){const i=new Nn(16);t.environment=i.texture;const n=e.getContext();switch(s.preferredReflectionFormat){case"srgba8":n.getExtension("EXT_sRGB");break;case"rgba16f":n.getExtension("OES_texture_half_float")}this.xrWebGLBinding=new XRWebGLBinding(s,n),this.lightProbe.addEventListener("reflectionchange",(()=>{this.updateReflection()}))}s.requestAnimationFrame(this.frameCallback)}updateReflection(){const t=this.renderer.properties.get(this.xrLight.environment);if(t){const e=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);e&&(t.__webglTexture=e,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(t,e){if(!this.xrLight)return;e.session.requestAnimationFrame(this.frameCallback);const i=e.getLightEstimate(this.lightProbe);if(i){this.xrLight.lightProbe.sh.fromArray(i.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const t=Math.max(1,Math.max(i.primaryLightIntensity.x,Math.max(i.primaryLightIntensity.y,i.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(i.primaryLightIntensity.x/t,i.primaryLightIntensity.y/t,i.primaryLightIntensity.z/t),this.xrLight.directionalLight.intensity=t,this.xrLight.directionalLight.position.copy(i.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class LA extends ya{constructor(t,e=!0){super(),this.lightProbe=new vl,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new gl,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let i=null,n=!1;t.xr.addEventListener("sessionstart",(()=>{const r=t.xr.getSession();"requestLightProbe"in r&&r.requestLightProbe({reflectionFormat:r.preferredReflectionFormat}).then((r=>{i=new RA(this,t,r,e,(()=>{n=!0,this.dispatchEvent({type:"estimationstart"})}))}))})),t.xr.addEventListener("sessionend",(()=>{i&&(i.dispose(),i=null),n&&this.dispatchEvent({type:"estimationend"})})),this.dispose=()=>{i&&(i.dispose(),i=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class DA{constructor(t=50){this.velocity=0,this.naturalFrequency=0,this.setDecayTime(t)}setDecayTime(t){this.naturalFrequency=1/Math.max(.001,t)}update(t,e,i,n){const r=2e-4*this.naturalFrequency;if(null==t||0===n)return e;if(t===e&&0===this.velocity)return e;if(i<0)return t;const s=t-e,a=this.velocity+this.naturalFrequency*s,o=s+i*a,l=Math.exp(-this.naturalFrequency*i),c=(a-this.naturalFrequency*o)*l,h=-this.naturalFrequency*(c+a*l);return Math.abs(c)=0?(this.velocity=0,e):(this.velocity=c,e+o*l)}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const UA=.2,PA=Math.PI/24,NA=new Wt,FA=(t,e,i)=>{let n=e>0?i>0?0:-Math.PI/2:i>0?Math.PI/2:Math.PI;for(let r=0;r<=12;++r)t.push(e+.17*Math.cos(n),i+.17*Math.sin(n),0,e+UA*Math.cos(n),i+UA*Math.sin(n),0),n+=PA};class QA extends Sn{constructor(t,e){const i=new sn,n=[],r=[],{size:s,boundingBox:a}=t,o=s.x/2,l=("back"===e?s.y:s.z)/2;FA(r,o,l),FA(r,-o,l),FA(r,-o,-l),FA(r,o,-l);const h=r.length/3;for(let t=0;t0}dispose(){var t;const{geometry:e,material:i}=this.hitPlane;e.dispose(),i.dispose(),this.geometry.dispose(),this.material.dispose(),null===(t=this.parent)||void 0===t||t.remove(this)}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const OA=(t,e)=>({type:"number",number:t,unit:e}),kA=(()=>{const t={};return e=>{const i=e;if(i in t)return t[i];const n=[];let r=0;for(;e;){if(++r>1e3){e="";break}const t=GA(e),i=t.nodes[0];if(null==i||0===i.terms.length)break;n.push(i),e=t.remainingInput}return t[i]=n}})(),GA=(()=>{const t=/^(\-\-|[a-z\u0240-\uffff])/i,e=/^([\*\+\/]|[\-]\s)/i,i=/^[\),]/;return n=>{const r=[];for(;n.length&&(n=n.trim(),!i.test(n));)if("("===n[0]){const{nodes:t,remainingInput:e}=WA(n);n=e,r.push({type:"function",name:{type:"ident",value:"calc"},arguments:t})}else if(t.test(n)){const t=HA(n),e=t.nodes[0];if("("===(n=t.remainingInput)[0]){const{nodes:t,remainingInput:i}=WA(n);r.push({type:"function",name:e,arguments:t}),n=i}else r.push(e)}else if(e.test(n))r.push({type:"operator",value:n[0]}),n=n.slice(1);else{const{nodes:t,remainingInput:e}="#"===n[0]?VA(n):zA(n);if(0===t.length)break;r.push(t[0]),n=e}return{nodes:[{type:"expression",terms:r}],remainingInput:n}}})(),HA=(()=>{const t=/[^a-z0-9_\-\u0240-\uffff]/i;return e=>{const i=e.match(t);return{nodes:[{type:"ident",value:null==i?e:e.substr(0,i.index)}],remainingInput:null==i?"":e.substr(i.index)}}})(),zA=(()=>{const t=/[\+\-]?(\d+[\.]\d+|\d+|[\.]\d+)([eE][\+\-]?\d+)?/,e=/^[a-z%]+/i,i=/^(m|mm|cm|rad|deg|[%])$/;return n=>{const r=n.match(t),s=null==r?"0":r[0],a=(n=null==s?n:n.slice(s.length)).match(e);let o=null!=a&&""!==a[0]?a[0]:null;const l=null==a?n:n.slice(o.length);return null==o||i.test(o)||(o=null),{nodes:[{type:"number",number:parseFloat(s)||0,unit:o}],remainingInput:l}}})(),VA=(()=>{const t=/^[a-f0-9]*/i;return e=>{const i=(e=e.slice(1).trim()).match(t);return{nodes:null==i?[]:[{type:"hex",value:i[0]}],remainingInput:null==i?e:e.slice(i[0].length)}}})(),WA=t=>{const e=[];for(t=t.slice(1).trim();t.length;){const i=GA(t);if(e.push(i.nodes[0]),","===(t=i.remainingInput.trim())[0])t=t.slice(1).trim();else if(")"===t[0]){t=t.slice(1);break}}return{nodes:e,remainingInput:t}},qA=Symbol("visitedTypes");class XA{constructor(t){this[qA]=t}walk(t,e){const i=t.slice();for(;i.length;){const t=i.shift();switch(this[qA].indexOf(t.type)>-1&&e(t),t.type){case"expression":i.unshift(...t.terms);break;case"function":i.unshift(t.name,...t.arguments)}}}}const jA=Object.freeze({type:"number",number:0,unit:null}),YA=(t,e=0)=>{let{number:i,unit:n}=t;if(isFinite(i)){if("rad"===t.unit||null==t.unit)return t}else i=e,n="rad";return{type:"number",number:("deg"===n&&null!=i?i:0)*Math.PI/180,unit:"rad"}},KA=(t,e=0)=>{let i,{number:n,unit:r}=t;if(isFinite(n)){if("m"===t.unit)return t}else n=e,r="m";switch(r){default:i=1;break;case"cm":i=.01;break;case"mm":i=.001}return{type:"number",number:i*n,unit:"m"}},JA=(()=>{const t=t=>t,e={rad:t,deg:YA,m:t,mm:KA,cm:KA};return(t,i=jA)=>{isFinite(t.number)||(t.number=i.number,t.unit=i.unit);const{unit:n}=t;if(null==n)return t;const r=e[n];return null==r?i:r(t)}})(); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var $A,ZA,tp;const ep=Symbol("evaluate"),ip=Symbol("lastValue");class np{constructor(){this[$A]=null}static evaluatableFor(t,e=jA){if(t instanceof np)return t;if("number"===t.type)return"%"===t.unit?new ap(t,e):t;switch(t.name.value){case"calc":return new up(t,e);case"env":return new lp(t)}return jA}static evaluate(t){return t instanceof np?t.evaluate():t}static isConstant(t){return!(t instanceof np)||t.isConstant}static applyIntrinsics(t,e){const{basis:i,keywords:n}=e,{auto:r}=n;return i.map(((e,i)=>{const s=null==r[i]?e:r[i];let a=t[i]?t[i]:s;if("ident"===a.type){const t=a.value;t in n&&(a=n[t][i])}return null!=a&&"ident"!==a.type||(a=s),"%"===a.unit?OA(a.number/100*e.number,e.unit):(a=JA(a,e),a.unit!==e.unit?e:a)}))}get isConstant(){return!1}evaluate(){return this.isConstant&&null!=this[ip]||(this[ip]=this[ep]()),this[ip]}}$A=ip;const rp=Symbol("percentage"),sp=Symbol("basis");class ap extends np{constructor(t,e){super(),this[rp]=t,this[sp]=e}get isConstant(){return!0}[ep](){return OA(this[rp].number/100*this[sp].number,this[sp].unit)}}const op=Symbol("identNode");class lp extends np{constructor(t){super(),this[ZA]=null;const e=t.arguments.length?t.arguments[0].terms[0]:null;null!=e&&"ident"===e.type&&(this[op]=e)}get isConstant(){return!1}[(ZA=op,ep)](){if(null!=this[op]&&"window-scroll-y"===this[op].value){return{type:"number",number:window.pageYOffset/(Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight)||0,unit:null}}return jA}}const cp=/[\*\/]/,hp=Symbol("evaluator");class up extends np{constructor(t,e=jA){if(super(),this[tp]=null,1!==t.arguments.length)return;const i=t.arguments[0].terms.slice(),n=[];for(;i.length;){const t=i.shift();if(n.length>0){const i=n[n.length-1];if("operator"===i.type&&cp.test(i.value)){const i=n.pop(),r=n.pop();if(null==r)return;n.push(new mp(i,np.evaluatableFor(r,e),np.evaluatableFor(t,e)));continue}}n.push("operator"===t.type?t:np.evaluatableFor(t,e))}for(;n.length>2;){const[t,i,r]=n.splice(0,3);if("operator"!==i.type)return;n.unshift(new mp(i,np.evaluatableFor(t,e),np.evaluatableFor(r,e)))}1===n.length&&(this[hp]=n[0])}get isConstant(){return null==this[hp]||np.isConstant(this[hp])}[(tp=hp,ep)](){return null!=this[hp]?np.evaluate(this[hp]):jA}}const dp=Symbol("operator"),Ap=Symbol("left"),pp=Symbol("right");class mp extends np{constructor(t,e,i){super(),this[dp]=t,this[Ap]=e,this[pp]=i}get isConstant(){return np.isConstant(this[Ap])&&np.isConstant(this[pp])}[ep](){const t=JA(np.evaluate(this[Ap])),e=JA(np.evaluate(this[pp])),{number:i,unit:n}=t,{number:r,unit:s}=e;if(null!=s&&null!=n&&s!=n)return jA;const a=n||s;let o;switch(this[dp].value){case"+":o=i+r;break;case"-":o=i-r;break;case"/":o=i/r;break;case"*":o=i*r;break;default:return jA}return{type:"number",number:o,unit:a}}}const gp=Symbol("evaluatables"),fp=Symbol("intrinsics");class vp extends np{constructor(t,e){super(),this[fp]=e;const i=t[0],n=null!=i?i.terms:[];this[gp]=e.basis.map(((t,e)=>{const i=n[e];return null==i?{type:"ident",value:"auto"}:"ident"===i.type?i:np.evaluatableFor(i,t)}))}get isConstant(){for(const t of this[gp])if(!np.isConstant(t))return!1;return!0}[ep](){const t=this[gp].map((t=>np.evaluate(t)));return np.applyIntrinsics(t,this[fp]).map((t=>t.number))}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var _p,Ep,yp,xp;const Sp=Symbol("instances"),Cp=Symbol("activateListener"),Ip=Symbol("deactivateListener"),Mp=Symbol("notifyInstances"),wp=Symbol("notify"),bp=Symbol("callback");class Tp{constructor(t){this[bp]=t}static[Mp](){for(const t of Tp[Sp])t[wp]()}static[(_p=Sp,Cp)](){window.addEventListener("scroll",this[Mp],{passive:!0})}static[Ip](){window.removeEventListener("scroll",this[Mp])}observe(){0===Tp[Sp].size&&Tp[Cp](),Tp[Sp].add(this)}disconnect(){Tp[Sp].delete(this),0===Tp[Sp].size&&Tp[Ip]()}[wp](){this[bp]()}}Tp[_p]=new Set;const Bp=Symbol("computeStyleCallback"),Rp=Symbol("astWalker"),Lp=Symbol("dependencies"),Dp=Symbol("onScroll");class Up{constructor(t){this[Ep]={},this[yp]=new XA(["function"]),this[xp]=()=>{this[Bp]({relatedState:"window-scroll"})},this[Bp]=t}observeEffectsFor(t){const e={},i=this[Lp];this[Rp].walk(t,(t=>{const{name:n}=t,r=t.arguments[0].terms[0];if("env"===n.value&&null!=r&&"ident"===r.type&&"window-scroll-y"===r.value)if(null==e["window-scroll"]){const t="window-scroll"in i?i["window-scroll"]:new Tp(this[Dp]);t.observe(),delete i["window-scroll"],e["window-scroll"]=t}}));for(const t in i){i[t].disconnect()}this[Lp]=e}dispose(){for(const t in this[Lp]){this[Lp][t].disconnect()}}}Ep=Lp,yp=Rp,xp=Dp; -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Pp=t=>{const e=t.observeEffects||!1,i=t.intrinsics instanceof Function?t.intrinsics:()=>t.intrinsics;return(n,r)=>{const s=n.updated,a=n.connectedCallback,o=n.disconnectedCallback,l=Symbol(`${r}StyleEffector`),c=Symbol(`${r}StyleEvaluator`),h=Symbol(`${r}UpdateEvaluator`),u=Symbol(`${r}EvaluateAndSync`);Object.defineProperties(n,{[l]:{value:null,writable:!0},[c]:{value:null,writable:!0},[h]:{value:function(){const t=kA(this[r]);this[c]=new vp(t,i(this)),null==this[l]&&e&&(this[l]=new Up((()=>this[u]()))),null!=this[l]&&this[l].observeEffectsFor(t)}},[u]:{value:function(){if(null==this[c])return;const e=this[c].evaluate();this[t.updateHandler](e)}},updated:{value:function(t){t.has(r)&&(this[h](),this[u]()),s.call(this,t)}},connectedCallback:{value:function(){a.call(this),this.requestUpdate(r,this[r])}},disconnectedCallback:{value:function(){o.call(this),null!=this[l]&&(this[l].dispose(),this[l]=null)}}})}},Np=t=>t<.5?2*t*t:(4-2*t)*t-1,Fp=(t,e,i=Np)=>n=>t+(e-t)*i(n),Qp=t=>{const e=[],i=[];let n=t.initialValue;for(let r=0;r{const i=e.map((n=0,t=>n+=t));var n;return e=>{e=_h(e,0,1),e*=i[i.length-1];const n=i.findIndex((t=>t>=e)),r=n<1?0:i[n-1],s=i[n];return t[n]((e-r)/(s-r))}})(e,i)}; -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Op=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const kp=Qp({initialValue:0,keyframes:[{frames:5,value:-1},{frames:1,value:-1},{frames:8,value:1},{frames:1,value:1},{frames:5,value:0},{frames:18,value:0}]}),Gp=Qp({initialValue:0,keyframes:[{frames:1,value:1},{frames:5,value:1},{frames:1,value:0},{frames:6,value:0}]}),Hp="0deg 75deg 105%",zp=["front","right","back","left"],Vp=["upper-","","lower-"],Wp="auto",qp="basic",Xp="wiggle",jp="none",Yp=()=>({basis:[YA(OA(30,"deg"))],keywords:{auto:[null]}}),Kp=()=>({basis:[YA(OA(12,"deg"))],keywords:{auto:[null]}}),Jp=(()=>{const t=kA(Hp)[0].terms,e=JA(t[0]),i=JA(t[1]);return t=>{const n=t[T_].idealCameraDistance();return{basis:[e,i,OA(n,"m")],keywords:{auto:[null,null,OA(105,"%")]}}}})(),$p=t=>{const e=2.2*t[T_].boundingSphere.radius;return{basis:[OA(-1/0,"rad"),OA(Math.PI/8,"rad"),OA(e,"m")],keywords:{auto:[null,null,null]}}},Zp=t=>{const e=Jp(t),i=new vp([],e).evaluate()[2];return{basis:[OA(1/0,"rad"),OA(Math.PI-Math.PI/8,"rad"),OA(i,"m")],keywords:{auto:[null,null,null]}}},tm=t=>{const e=t[T_].boundingBox.getCenter(new _e);return{basis:[OA(e.x,"m"),OA(e.y,"m"),OA(e.z,"m")],keywords:{auto:[null,null,null]}}},em=Math.PI/2,im=Math.PI/3,nm=em/2,rm=2*Math.PI,sm=Symbol("controls"),am=Symbol("panElement"),om=Symbol("promptElement"),lm=Symbol("promptAnimatedContainer"),cm=Symbol("fingerAnimatedContainers"),hm=Symbol("deferInteractionPrompt"),um=Symbol("updateAria"),dm=Symbol("updateCameraForRadius"),Am=Symbol("cancelPrompts"),pm=Symbol("onChange"),mm=Symbol("onPointerChange"),gm=Symbol("waitingToPromptUser"),fm=Symbol("userHasInteracted"),vm=Symbol("promptElementVisibleTime"),_m=Symbol("lastPromptOffset"),Em=Symbol("cancellationSource"),ym=Symbol("lastSpherical"),xm=Symbol("jumpCamera"),Sm=Symbol("initialized"),Cm=Symbol("maintainThetaPhi"),Im=Symbol("syncCameraOrbit"),Mm=Symbol("syncFieldOfView"),wm=Symbol("syncCameraTarget"),bm=Symbol("syncMinCameraOrbit"),Tm=Symbol("syncMaxCameraOrbit"),Bm=Symbol("syncMinFieldOfView"),Rm=Symbol("syncMaxFieldOfView"),Lm=new Wt,Dm=new _e,Um=Object.freeze({minimumRadius:0,maximumRadius:1/0,minimumPolarAngle:Math.PI/8,maximumPolarAngle:Math.PI-Math.PI/8,minimumAzimuthalAngle:-1/0,maximumAzimuthalAngle:1/0,minimumFieldOfView:10,maximumFieldOfView:45,touchAction:"none"}),Pm=Math.PI/8,Nm=.04,Fm={USER_INTERACTION:"user-interaction",NONE:"none",AUTOMATIC:"automatic"};class Qm extends Rt{constructor(t,e,i){super(),this.camera=t,this.element=e,this.scene=i,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.inputSensitivity=1,this.changeSource=Fm.NONE,this._interactionEnabled=!1,this._disableZoom=!1,this.isUserPointing=!1,this.enablePan=!0,this.enableTap=!0,this.panProjection=new qt,this.panPerPixel=0,this.spherical=new Pl,this.goalSpherical=new Pl,this.thetaDamper=new DA,this.phiDamper=new DA,this.radiusDamper=new DA,this.logFov=Math.log(Um.maximumFieldOfView),this.goalLogFov=this.logFov,this.fovDamper=new DA,this.touchMode=null,this.pointers=[],this.startTime=0,this.startPointerPosition={clientX:0,clientY:0},this.lastSeparation=0,this.touchDecided=!1,this.onContext=t=>{if(this.enablePan)t.preventDefault();else for(const t of this.pointers)this.onPointerUp(new PointerEvent("pointercancel",Object.assign(Object.assign({},this.startPointerPosition),{pointerId:t.id})))},this.touchModeZoom=(t,e)=>{if(!this._disableZoom){const t=this.twoTouchDistance(this.pointers[0],this.pointers[1]),e=Nm*this.zoomSensitivity*(this.lastSeparation-t)*50/this.scene.height;this.lastSeparation=t,this.userAdjustOrbit(0,0,e)}this.panPerPixel>0&&this.movePan(t,e)},this.disableScroll=t=>{t.preventDefault()},this.touchModeRotate=(t,e)=>{const{touchAction:i}=this._options;if(!this.touchDecided&&"none"!==i){this.touchDecided=!0;const n=Math.abs(t),r=Math.abs(e);if(this.changeSource===Fm.USER_INTERACTION&&("pan-y"===i&&r>n||"pan-x"===i&&n>r))return void(this.touchMode=null);this.element.addEventListener("touchmove",this.disableScroll,{passive:!1})}this.handleSinglePointerMove(t,e)},this.onPointerDown=t=>{if(this.pointers.length>2)return;const{element:e}=this;0===this.pointers.length&&(e.addEventListener("pointermove",this.onPointerMove),e.addEventListener("pointerup",this.onPointerUp),this.touchMode=null,this.touchDecided=!1,this.startPointerPosition.clientX=t.clientX,this.startPointerPosition.clientY=t.clientY,this.startTime=performance.now());try{e.setPointerCapture(t.pointerId)}catch(t){}this.pointers.push({clientX:t.clientX,clientY:t.clientY,id:t.pointerId}),this.isUserPointing=!1,"touch"===t.pointerType?(this.changeSource=t.altKey?Fm.AUTOMATIC:Fm.USER_INTERACTION,this.onTouchChange(t)):(this.changeSource=Fm.USER_INTERACTION,this.onMouseDown(t)),this.changeSource===Fm.USER_INTERACTION&&this.dispatchEvent({type:"user-interaction"})},this.onPointerMove=t=>{const e=this.pointers.find((e=>e.id===t.pointerId));if(null==e)return;if("mouse"===t.pointerType&&0===t.buttons)return void this.onPointerUp(t);const i=this.pointers.length,n=(t.clientX-e.clientX)/i,r=(t.clientY-e.clientY)/i;0===n&&0===r||(e.clientX=t.clientX,e.clientY=t.clientY,"touch"===t.pointerType?(this.changeSource=t.altKey?Fm.AUTOMATIC:Fm.USER_INTERACTION,null!==this.touchMode&&this.touchMode(n,r)):(this.changeSource=Fm.USER_INTERACTION,this.panPerPixel>0?this.movePan(n,r):this.handleSinglePointerMove(n,r)))},this.onPointerUp=t=>{const{element:e}=this,i=this.pointers.findIndex((e=>e.id===t.pointerId));-1!==i&&this.pointers.splice(i,1),this.panPerPixel>0&&!t.altKey&&this.resetRadius(),0===this.pointers.length?(e.removeEventListener("pointermove",this.onPointerMove),e.removeEventListener("pointerup",this.onPointerUp),e.removeEventListener("touchmove",this.disableScroll),this.enablePan&&this.enableTap&&this.recenter(t)):null!==this.touchMode&&this.onTouchChange(t),this.scene.element[am].style.opacity=0,e.style.cursor="grab",this.panPerPixel=0,this.isUserPointing&&this.dispatchEvent({type:"pointer-change-end"})},this.onWheel=t=>{this.changeSource=Fm.USER_INTERACTION;const e=t.deltaY*(1==t.deltaMode?18:1)*Nm*this.zoomSensitivity/30;this.userAdjustOrbit(0,0,e),t.preventDefault(),this.dispatchEvent({type:"user-interaction"})},this.onKeyDown=t=>{const{changeSource:e}=this;this.changeSource=Fm.USER_INTERACTION;(t.shiftKey&&this.enablePan?this.panKeyCodeHandler(t):this.orbitZoomKeyCodeHandler(t))?(t.preventDefault(),this.dispatchEvent({type:"user-interaction"})):this.changeSource=e},this._options=Object.assign({},Um),this.setOrbit(0,Math.PI/2,1),this.setFieldOfView(100),this.jumpToGoal()}get interactionEnabled(){return this._interactionEnabled}enableInteraction(){if(!1===this._interactionEnabled){const{element:t}=this;t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointercancel",this.onPointerUp),this._disableZoom||t.addEventListener("wheel",this.onWheel),t.addEventListener("keydown",this.onKeyDown),t.addEventListener("touchmove",(()=>{}),{passive:!1}),t.addEventListener("contextmenu",this.onContext),this.element.style.cursor="grab",this._interactionEnabled=!0,this.updateTouchActionStyle()}}disableInteraction(){if(!0===this._interactionEnabled){const{element:t}=this;t.removeEventListener("pointerdown",this.onPointerDown),t.removeEventListener("pointermove",this.onPointerMove),t.removeEventListener("pointerup",this.onPointerUp),t.removeEventListener("pointercancel",this.onPointerUp),t.removeEventListener("wheel",this.onWheel),t.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("contextmenu",this.onContext),t.style.cursor="",this.touchMode=null,this._interactionEnabled=!1,this.updateTouchActionStyle()}}get options(){return this._options}set disableZoom(t){this._disableZoom!=t&&(this._disableZoom=t,!0===t?this.element.removeEventListener("wheel",this.onWheel):this.element.addEventListener("wheel",this.onWheel),this.updateTouchActionStyle())}getCameraSpherical(t=new Pl){return t.copy(this.spherical)}getFieldOfView(){return this.camera.fov}applyOptions(t){Object.assign(this._options,t),this.setOrbit(),this.setFieldOfView(Math.exp(this.goalLogFov))}updateNearFar(t,e){this.camera.far=0===e?2:e,this.camera.near=Math.max(t,this.camera.far/1e3),this.camera.updateProjectionMatrix()}updateAspect(t){this.camera.aspect=t,this.camera.updateProjectionMatrix()}setOrbit(t=this.goalSpherical.theta,e=this.goalSpherical.phi,i=this.goalSpherical.radius){const{minimumAzimuthalAngle:n,maximumAzimuthalAngle:r,minimumPolarAngle:s,maximumPolarAngle:a,minimumRadius:o,maximumRadius:l}=this._options,{theta:c,phi:h,radius:u}=this.goalSpherical,d=_h(t,n,r);isFinite(n)||isFinite(r)||(this.spherical.theta=this.wrapAngle(this.spherical.theta-d)+d);const A=_h(e,s,a),p=_h(i,o,l);return(d!==c||A!==h||p!==u)&&(!!(isFinite(d)&&isFinite(A)&&isFinite(p))&&(this.goalSpherical.theta=d,this.goalSpherical.phi=A,this.goalSpherical.radius=p,this.goalSpherical.makeSafe(),!0))}setRadius(t){this.goalSpherical.radius=t,this.setOrbit()}setFieldOfView(t){const{minimumFieldOfView:e,maximumFieldOfView:i}=this._options;t=_h(t,e,i),this.goalLogFov=Math.log(t)}setDamperDecayTime(t){this.thetaDamper.setDecayTime(t),this.phiDamper.setDecayTime(t),this.radiusDamper.setDecayTime(t),this.fovDamper.setDecayTime(t)}adjustOrbit(t,e,i){const{theta:n,phi:r,radius:s}=this.goalSpherical,{minimumRadius:a,maximumRadius:o,minimumFieldOfView:l,maximumFieldOfView:c}=this._options,h=this.spherical.theta-n,u=Math.PI-.001,d=n-_h(t,-u-h,u-h),A=r-e,p=0===i?0:((i>0?o:a)-s)/(Math.log(i>0?c:l)-this.goalLogFov),m=s+i*(isFinite(p)?p:2*(o-a));if(this.setOrbit(d,A,m),0!==i){const t=this.goalLogFov+i;this.setFieldOfView(Math.exp(t))}}jumpToGoal(){this.update(0,1e4)}update(t,e){if(this.isStationary())return!1;const{maximumPolarAngle:i,maximumRadius:n}=this._options,r=this.spherical.theta-this.goalSpherical.theta;return Math.abs(r)>Math.PI&&!isFinite(this._options.minimumAzimuthalAngle)&&!isFinite(this._options.maximumAzimuthalAngle)&&(this.spherical.theta-=2*Math.sign(r)*Math.PI),this.spherical.theta=this.thetaDamper.update(this.spherical.theta,this.goalSpherical.theta,e,Math.PI),this.spherical.phi=this.phiDamper.update(this.spherical.phi,this.goalSpherical.phi,e,i),this.spherical.radius=this.radiusDamper.update(this.spherical.radius,this.goalSpherical.radius,e,n),this.logFov=this.fovDamper.update(this.logFov,this.goalLogFov,e,1),this.moveCamera(),!0}updateTouchActionStyle(){const{style:t}=this.element;if(this._interactionEnabled){const{touchAction:e}=this._options;this._disableZoom&&"none"!==e?t.touchAction="manipulation":t.touchAction=e}else t.touchAction=""}isStationary(){return this.goalSpherical.theta===this.spherical.theta&&this.goalSpherical.phi===this.spherical.phi&&this.goalSpherical.radius===this.spherical.radius&&this.goalLogFov===this.logFov}moveCamera(){this.spherical.makeSafe(),this.camera.position.setFromSpherical(this.spherical),this.camera.setRotationFromEuler(new si(this.spherical.phi-Math.PI/2,this.spherical.theta,0,"YXZ")),this.camera.fov!==Math.exp(this.logFov)&&(this.camera.fov=Math.exp(this.logFov),this.camera.updateProjectionMatrix())}userAdjustOrbit(t,e,i){this.adjustOrbit(t*this.orbitSensitivity*this.inputSensitivity,e*this.orbitSensitivity*this.inputSensitivity,i*this.inputSensitivity)}wrapAngle(t){const e=(t+Math.PI)/(2*Math.PI);return 2*(e-Math.floor(e))*Math.PI-Math.PI}pixelLengthToSphericalAngle(t){return 2*Math.PI*t/this.scene.height}twoTouchDistance(t,e){const{clientX:i,clientY:n}=t,{clientX:r,clientY:s}=e,a=r-i,o=s-n;return Math.sqrt(a*a+o*o)}handleSinglePointerMove(t,e){const i=this.pixelLengthToSphericalAngle(t),n=this.pixelLengthToSphericalAngle(e);!1===this.isUserPointing&&(this.isUserPointing=!0,this.dispatchEvent({type:"pointer-change-start"})),this.userAdjustOrbit(i,n,0)}initializePan(){const{theta:t,phi:e}=this.spherical,i=t-this.scene.yaw;this.panPerPixel=.018*this.panSensitivity/this.scene.height,this.panProjection.set(-Math.cos(i),-Math.cos(e)*Math.sin(i),0,0,Math.sin(e),0,Math.sin(i),-Math.cos(e)*Math.cos(i),0)}movePan(t,e){const{scene:i}=this,n=Dm.set(t,e,0).multiplyScalar(this.inputSensitivity),r=this.spherical.radius*Math.exp(this.logFov)*this.panPerPixel;n.multiplyScalar(r);const s=i.getTarget();s.add(n.applyMatrix3(this.panProjection)),i.boundingSphere.clampPoint(s,s),i.setTarget(s.x,s.y,s.z)}recenter(t){if(performance.now()>this.startTime+300||Math.abs(t.clientX-this.startPointerPosition.clientX)>2||Math.abs(t.clientY-this.startPointerPosition.clientY)>2)return;const{scene:e}=this,i=e.positionAndNormalFromPoint(e.getNDC(t.clientX,t.clientY));if(null==i){const{cameraTarget:t}=e.element;e.element.cameraTarget="",e.element.cameraTarget=t,this.userAdjustOrbit(0,0,1)}else e.target.worldToLocal(i.position),e.setTarget(i.position.x,i.position.y,i.position.z)}resetRadius(){const{scene:t}=this,e=t.positionAndNormalFromPoint(Lm.set(0,0));if(null==e)return;t.target.worldToLocal(e.position);const i=t.getTarget(),{theta:n,phi:r}=this.spherical,s=n-t.yaw,a=Dm.set(Math.sin(r)*Math.sin(s),Math.cos(r),Math.sin(r)*Math.cos(s)),o=a.dot(e.position.sub(i));i.add(a.multiplyScalar(o)),t.setTarget(i.x,i.y,i.z),this.setOrbit(void 0,void 0,this.goalSpherical.radius-o)}onTouchChange(t){if(1===this.pointers.length)this.touchMode=this.touchModeRotate;else{if(this._disableZoom)return this.touchMode=null,void this.element.removeEventListener("touchmove",this.disableScroll);this.touchMode=this.touchDecided&&null===this.touchMode?null:this.touchModeZoom,this.touchDecided=!0,this.element.addEventListener("touchmove",this.disableScroll,{passive:!1}),this.lastSeparation=this.twoTouchDistance(this.pointers[0],this.pointers[1]),this.enablePan&&null!=this.touchMode&&(this.initializePan(),t.altKey||(this.scene.element[am].style.opacity=1))}}onMouseDown(t){this.panPerPixel=0,this.enablePan&&(2===t.button||t.ctrlKey||t.metaKey||t.shiftKey)&&(this.initializePan(),this.scene.element[am].style.opacity=1),this.element.style.cursor="grabbing"}orbitZoomKeyCodeHandler(t){let e=!0;switch(t.key){case"PageUp":this.userAdjustOrbit(0,0,Nm*this.zoomSensitivity);break;case"PageDown":this.userAdjustOrbit(0,0,-.04*this.zoomSensitivity);break;case"ArrowUp":this.userAdjustOrbit(0,-Pm,0);break;case"ArrowDown":this.userAdjustOrbit(0,Pm,0);break;case"ArrowLeft":this.userAdjustOrbit(-Pm,0,0);break;case"ArrowRight":this.userAdjustOrbit(Pm,0,0);break;default:e=!1}return e}panKeyCodeHandler(t){this.initializePan();let e=!0;switch(t.key){case"ArrowUp":this.movePan(0,-10);break;case"ArrowDown":this.movePan(0,10);break;case"ArrowLeft":this.movePan(-10,0);break;case"ArrowRight":this.movePan(10,0);break;default:e=!1}return e}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Om="not-presenting",km="session-started",Gm="object-placed",Hm="failed",zm="tracking",Vm="not-tracking",Wm=new _e,qm=new Ye,Xm=new _e,jm=new Ln(45,1,.1,100);class Ym extends Rt{constructor(t){super(),this.renderer=t,this.currentSession=null,this.placeOnWall=!1,this.placementBox=null,this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.initialHitSource=null,this.transientHitTestSource=null,this.inputSource=null,this._presentedScene=null,this.resolveCleanup=null,this.exitWebXRButtonContainer=null,this.overlay=null,this.xrLight=null,this.tracking=!0,this.frames=0,this.initialized=!1,this.oldTarget=new _e,this.placementComplete=!1,this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.lastDragPosition=new _e,this.firstRatio=0,this.lastAngle=0,this.goalPosition=new _e,this.goalYaw=0,this.goalScale=1,this.xDamper=new DA,this.yDamper=new DA,this.zDamper=new DA,this.yawDamper=new DA,this.scaleDamper=new DA,this.onExitWebXRButtonContainerClick=()=>this.stopPresenting(),this.onUpdateScene=()=>{null!=this.placementBox&&this.isPresenting&&(this.placementBox.dispose(),this.placementBox=new QA(this.presentedScene,this.placeOnWall?"back":"bottom"))},this.onSelectStart=t=>{const e=this.transientHitTestSource;if(null==e)return;const i=this.frame.getHitTestResultsForTransientInput(e),n=this.presentedScene,r=this.placementBox;if(1===i.length){this.inputSource=t.inputSource;const{axes:e}=this.inputSource.gamepad,i=r.getHit(this.presentedScene,e[0],e[1]);r.show=!0,null!=i?(this.isTranslating=!0,this.lastDragPosition.copy(i)):!1===this.placeOnWall&&(this.isRotating=!0,this.lastAngle=1.5*e[0])}else if(2===i.length){r.show=!0,this.isTwoFingering=!0;const{separation:t}=this.fingerPolar(i);this.firstRatio=t/n.scale.x}},this.onSelectEnd=()=>{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!1,this.inputSource=null,this.goalPosition.y+=this.placementBox.offsetHeight*this.presentedScene.scale.x,this.placementBox.show=!1},this.threeRenderer=t.threeRenderer,this.threeRenderer.xr.enabled=!0}async resolveARSession(){gh();const t=await navigator.xr.requestSession("immersive-ar",{requiredFeatures:["hit-test"],optionalFeatures:["dom-overlay","light-estimation"],domOverlay:this.overlay?{root:this.overlay}:void 0});return this.threeRenderer.xr.setReferenceSpaceType("local"),await this.threeRenderer.xr.setSession(t),this.threeRenderer.xr.cameraAutoUpdate=!1,t}get presentedScene(){return this._presentedScene}async supportsPresentation(){try{return gh(),await navigator.xr.isSessionSupported("immersive-ar")}catch(t){return console.warn("Request to present in WebXR denied:"),console.warn(t),console.warn("Falling back to next ar-mode"),!1}}async present(t,e=!1){this.isPresenting&&console.warn("Cannot present while a model is already presenting");let i=new Promise(((t,e)=>{requestAnimationFrame((()=>t()))}));t.setHotspotsVisibility(!1),t.queueRender(),await i,this._presentedScene=t,this.overlay=t.element.shadowRoot.querySelector("div.default"),!0===e&&(this.xrLight=new LA(this.threeRenderer),this.xrLight.addEventListener("estimationstart",(()=>{if(!this.isPresenting||null==this.xrLight)return;const t=this.presentedScene;t.add(this.xrLight),t.environment=this.xrLight.environment})));const n=await this.resolveARSession();n.addEventListener("end",(()=>{this.postSessionCleanup()}),{once:!0});const r=t.element.shadowRoot.querySelector(".slot.exit-webxr-ar-button");r.classList.add("enabled"),r.addEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=r;const s=await n.requestReferenceSpace("viewer");this.tracking=!0,this.frames=0,this.initialized=!1,this.turntableRotation=t.yaw,this.goalYaw=t.yaw,this.goalScale=1,t.setBackground(null),this.oldShadowIntensity=t.shadowIntensity,t.setShadowIntensity(.01),this.oldTarget.copy(t.getTarget()),t.element.addEventListener("load",this.onUpdateScene);const a=20*Math.PI/180,o=!0===this.placeOnWall?void 0:new XRRay(new DOMPoint(0,0,0),{x:0,y:-Math.sin(a),z:-Math.cos(a)});n.requestHitTestSource({space:s,offsetRay:o}).then((t=>{this.initialHitSource=t})),this.currentSession=n,this.placementBox=new QA(t,this.placeOnWall?"back":"bottom"),this.placementComplete=!1,this.lastTick=performance.now(),this.dispatchEvent({type:"status",status:km})}async stopPresenting(){if(!this.isPresenting)return;const t=new Promise((t=>{this.resolveCleanup=t}));try{await this.currentSession.end(),await t}catch(t){console.warn("Error while trying to end WebXR AR session"),console.warn(t),this.postSessionCleanup()}}get isPresenting(){return null!=this.presentedScene}get target(){return this.oldTarget}updateTarget(){const t=this.presentedScene;if(null!=t){const e=t.getTarget();this.oldTarget.copy(e),this.placeOnWall?e.z=t.boundingBox.min.z:e.y=t.boundingBox.min.y,t.setTarget(e.x,e.y,e.z)}}postSessionCleanup(){const t=this.currentSession;null!=t&&(t.removeEventListener("selectstart",this.onSelectStart),t.removeEventListener("selectend",this.onSelectEnd),this.currentSession=null);const e=this.presentedScene;if(this._presentedScene=null,null!=e){const{element:t}=e;null!=this.xrLight&&(e.remove(this.xrLight),this.xrLight.dispose(),this.xrLight=null),e.position.set(0,0,0),e.scale.set(1,1,1),e.setShadowOffset(0);const i=this.turntableRotation;null!=i&&(e.yaw=i);const n=this.oldShadowIntensity;null!=n&&e.setShadowIntensity(n),e.setEnvironmentAndSkybox(t[Sh],t[Ch]);const r=this.oldTarget;e.setTarget(r.x,r.y,r.z),e.xrCamera=null,e.element.removeEventListener("load",this.onUpdateScene),e.orientHotspots(0),t.requestUpdate("cameraTarget"),t.requestUpdate("maxCameraOrbit"),t[D_](t.getBoundingClientRect()),requestAnimationFrame((()=>{e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:Fm.NONE}}))}))}this.renderer.height=0;const i=this.exitWebXRButtonContainer;null!=i&&(i.classList.remove("enabled"),i.removeEventListener("click",this.onExitWebXRButtonContainerClick),this.exitWebXRButtonContainer=null);const n=this.transientHitTestSource;null!=n&&(n.cancel(),this.transientHitTestSource=null);const r=this.initialHitSource;null!=r&&(r.cancel(),this.initialHitSource=null),null!=this.placementBox&&(this.placementBox.dispose(),this.placementBox=null),this.lastTick=null,this.turntableRotation=null,this.oldShadowIntensity=null,this.frame=null,this.inputSource=null,this.overlay=null,null!=this.resolveCleanup&&this.resolveCleanup(),this.dispatchEvent({type:"status",status:Om})}updateView(t){const e=this.presentedScene,i=this.threeRenderer.xr;i.updateCamera(jm),e.xrCamera=i.getCamera();const{elements:n}=e.getCamera().matrixWorld;if(e.orientHotspots(Math.atan2(n[1],n[5])),this.initialized||(this.placeInitially(),this.initialized=!0),t.requestViewportScale&&t.recommendedViewportScale){const e=t.recommendedViewportScale;t.requestViewportScale(Math.max(e,.25))}const r=i.getBaseLayer();if(null!=r){const e=r instanceof XRWebGLLayer?r.getViewport(t):i.getBinding().getViewSubImage(r,t).viewport;this.threeRenderer.setViewport(e.x,e.y,e.width,e.height)}}placeInitially(){const t=this.presentedScene,{position:e,element:i}=t,n=t.getCamera(),{width:r,height:s}=this.overlay.getBoundingClientRect();t.setSize(r,s),n.projectionMatrixInverse.copy(n.projectionMatrix).invert();const{theta:a,radius:o}=i.getCameraOrbit(),l=n.getWorldDirection(Wm);t.yaw=Math.atan2(-l.x,-l.z)-a,this.goalYaw=t.yaw,e.copy(n.position).add(l.multiplyScalar(o)),this.updateTarget();const c=t.getTarget();e.add(c).sub(this.oldTarget),this.goalPosition.copy(e),t.setHotspotsVisibility(!0);const{session:h}=this.frame;h.addEventListener("selectstart",this.onSelectStart),h.addEventListener("selectend",this.onSelectEnd),h.requestHitTestSourceForTransientInput({profile:"generic-touchscreen"}).then((t=>{this.transientHitTestSource=t}))}getTouchLocation(){const{axes:t}=this.inputSource.gamepad;let e=this.placementBox.getExpandedHit(this.presentedScene,t[0],t[1]);return null!=e&&(Wm.copy(e).sub(this.presentedScene.getCamera().position),Wm.length()>10)?null:e}getHitPoint(t){const e=this.threeRenderer.xr.getReferenceSpace(),i=t.getPose(e);if(null==i)return null;const n=qm.fromArray(i.transform.matrix);return!0===this.placeOnWall&&(this.goalYaw=Math.atan2(n.elements[4],n.elements[6])),n.elements[5]>.75!==this.placeOnWall?Xm.setFromMatrixPosition(n):null}moveToFloor(t){const e=this.initialHitSource;if(null==e)return;const i=t.getHitTestResults(e);if(0==i.length)return;const n=i[0],r=this.getHitPoint(n);null!=r&&(this.placementBox.show=!0,this.isTranslating||(this.placeOnWall?this.goalPosition.copy(r):this.goalPosition.y=r.y),e.cancel(),this.initialHitSource=null,this.dispatchEvent({type:"status",status:Gm}))}fingerPolar(t){const e=t[0].inputSource.gamepad.axes,i=t[1].inputSource.gamepad.axes,n=i[0]-e[0],r=i[1]-e[1],s=Math.atan2(r,n);let a=this.lastAngle-s;return a>Math.PI?a-=2*Math.PI:a<-Math.PI&&(a+=2*Math.PI),this.lastAngle=s,{separation:Math.sqrt(n*n+r*r),deltaYaw:a}}processInput(t){const e=this.transientHitTestSource;if(null==e)return;if(!this.isTranslating&&!this.isTwoFingering&&!this.isRotating)return;const i=t.getHitTestResultsForTransientInput(e),n=this.presentedScene,r=n.scale.x;if(this.isTwoFingering)if(i.length<2)this.isTwoFingering=!1;else{const{separation:t,deltaYaw:e}=this.fingerPolar(i);if(!1===this.placeOnWall&&(this.goalYaw+=e),n.canScale){const e=t/this.firstRatio;this.goalScale=e<1.3&&e>.7692307692307692?1:e}}else if(2!==i.length)if(this.isRotating){const t=1.5*this.inputSource.gamepad.axes[0];this.goalYaw+=t-this.lastAngle,this.lastAngle=t}else this.isTranslating&&i.forEach((t=>{if(t.inputSource!==this.inputSource)return;let e=null;if(t.results.length>0&&(e=this.getHitPoint(t.results[0])),null==e&&(e=this.getTouchLocation()),null!=e){if(this.goalPosition.sub(this.lastDragPosition),!1===this.placeOnWall){const t=e.y-this.lastDragPosition.y;if(t<0){this.placementBox.offsetHeight=t/r,this.presentedScene.setShadowOffset(t);const i=Wm.copy(n.getCamera().position),s=-t/(i.y-e.y);i.multiplyScalar(s),e.multiplyScalar(1-s).add(i)}}this.goalPosition.add(e),this.lastDragPosition.copy(e)}}));else{this.isTranslating=!1,this.isRotating=!1,this.isTwoFingering=!0;const{separation:t}=this.fingerPolar(i);this.firstRatio=t/r}}moveScene(t){const e=this.presentedScene,{position:i,yaw:n}=e,r=e.boundingSphere.radius,s=this.goalPosition,a=e.scale.x,o=this.placementBox;let l=Fm.NONE;if(!s.equals(i)||this.goalScale!==a){l=Fm.USER_INTERACTION;let{x:n,y:c,z:h}=i;n=this.xDamper.update(n,s.x,t,r),c=this.yDamper.update(c,s.y,t,r),h=this.zDamper.update(h,s.z,t,r),i.set(n,c,h);const u=this.scaleDamper.update(a,this.goalScale,t,1);if(e.scale.set(u,u,u),!this.isTranslating){const t=s.y-c;this.placementComplete&&!1===this.placeOnWall?(o.offsetHeight=t/u,e.setShadowOffset(t)):0===t&&(this.placementComplete=!0,o.show=!1,e.setShadowIntensity(.8))}}o.updateOpacity(t),e.updateTarget(t),e.yaw=this.yawDamper.update(n,this.goalYaw,t,Math.PI),e.element.dispatchEvent(new CustomEvent("camera-change",{detail:{source:l}}))}onWebXRFrame(t,e){this.frame=e,++this.frames;const i=this.threeRenderer.xr.getReferenceSpace(),n=e.getViewerPose(i);null==n&&!0===this.tracking&&this.frames>30&&(this.tracking=!1,this.dispatchEvent({type:"tracking",status:Vm}));const r=this.presentedScene;if(null==n||null==r||!r.element.loaded)return void this.threeRenderer.clear();!1===this.tracking&&(this.tracking=!0,this.dispatchEvent({type:"tracking",status:zm}));let s=!0;for(const i of n.views){if(this.updateView(i),s){this.moveToFloor(e),this.processInput(e);const i=t-this.lastTick;this.moveScene(i),this.renderer.preRender(r,t,i),this.lastTick=t,r.renderShadow(this.threeRenderer)}this.threeRenderer.render(r,r.getCamera()),s=!1}}}function Km(t){const e=new Map,i=new Map,n=t.clone();return Jm(t,n,(function(t,n){e.set(n,t),i.set(t,n)})),n.traverse((function(t){if(!t.isSkinnedMesh)return;const n=t,r=e.get(t),s=r.skeleton.bones;n.skeleton=r.skeleton.clone(),n.bindMatrix.copy(r.bindMatrix),n.skeleton.bones=s.map((function(t){return i.get(t)})),n.bind(n.skeleton,n.bindMatrix)})),n}function Jm(t,e,i){i(t,e);for(let n=0;n{t.traverse((t=>{const e=t;if(!e.material)return;(Array.isArray(e.material)?e.material:[e.material]).forEach((t=>{for(const e in t){const i=t[e];if(i instanceof de){const t=i.source.data;null!=t.close&&t.close(),i.dispose()}}t.dispose()})),e.geometry.dispose()}))}))}[eg](){const t=this[tg],e=Km(this.scene);ng(e,this.scene);const i=[e],n=t.userData?Object.assign({},t.userData):{};return Object.assign(Object.assign({},t),{scene:e,scenes:i,userData:n})}}const ng=(t,e)=>{rg(t,e,((t,e)=>{void 0!==e.userData.variantMaterials&&(t.userData.variantMaterials=new Map(e.userData.variantMaterials)),void 0!==e.userData.variantData&&(t.userData.variantData=e.userData.variantData),void 0!==e.userData.originalMaterial&&(t.userData.originalMaterial=e.userData.originalMaterial)}))},rg=(t,e,i)=>{i(t,e);for(let n=0;n{const n=e.threeObjectMap.get(t);if(null!=n)for(const t in n)if(null!=t&&"primitives"!==t){const e=t,o=n[e],l=r[e][o],c=s.get(i)||{};c[e]=o,s.set(i,c);const h=a.get(l)||new Set;h.add(i),a.set(l,h)}}));return new dg(t,r,s,a)}static[cg](t,e,i){const n=(t,e)=>{if(i(t,e),t.isObject3D){const r=t,s=e;if(r.material)if(Array.isArray(r.material))for(let t=0;t{t.renderOrder=1e3,t.frustumCulled=!1,t.name||(t.name=t.uuid);const i=t;if(i.material){const{geometry:t}=i;i.castShadow=!0,i.isSkinnedMesh&&(t.boundingSphere=n,t.boundingBox=null);const r=i.material;if(!0===r.isMeshBasicMaterial&&(r.toneMapped=!1),r.shadowSide=o,r.aoMap){const{gltf:i,threeObjectMap:n}=e[Ag],s=n.get(r);if(null!=i.materials&&null!=s&&null!=s.materials){const e=i.materials[s.materials];e.occlusionTexture&&0===e.occlusionTexture.texCoord&&null!=t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv)}}}})),e}get correlatedSceneGraph(){return this[tg][Ag]}[eg](){const t=super[eg](),e=new Map;return t.scene.traverse((t=>{const i=t;if(i.material){const t=i.material;if(null!=t){if(e.has(t.uuid))return void(i.material=e.get(t.uuid));i.material=t.clone(),e.set(t.uuid,i.material)}}const n=t;void 0!==n.target&&n.add(n.target)})),t[Ag]=dg.from(t,this.correlatedSceneGraph),t}}const mg=(t,e,i)=>{let n;switch(t){case N:n=new Uint8ClampedArray(e*i*4);break;case G:n=new Uint16Array(e*i*4);break;case O:n=new Uint32Array(e*i*4);break;case 1010:n=new Int8Array(e*i*4);break;case 1011:n=new Int16Array(e*i*4);break;case Q:n=new Int32Array(e*i*4);break;case k:n=new Float32Array(e*i*4);break;default:throw new Error("Unsupported data type")}return n};let gg;class fg{constructor(t){var e,i,n,r,s,a,o,l,c,h,u,d,A,p,m,g;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(t){throw this._renderer.setRenderTarget(null),t}this._renderer.setRenderTarget(null)},this._width=t.width,this._height=t.height,this._type=t.type,this._colorSpace=t.colorSpace;const f={format:z,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:void 0!==(null===(e=t.renderTargetOptions)||void 0===e?void 0:e.anisotropy)?null===(i=t.renderTargetOptions)||void 0===i?void 0:i.anisotropy:1,generateMipmaps:void 0!==(null===(n=t.renderTargetOptions)||void 0===n?void 0:n.generateMipmaps)&&(null===(r=t.renderTargetOptions)||void 0===r?void 0:r.generateMipmaps),magFilter:void 0!==(null===(s=t.renderTargetOptions)||void 0===s?void 0:s.magFilter)?null===(a=t.renderTargetOptions)||void 0===a?void 0:a.magFilter:D,minFilter:void 0!==(null===(o=t.renderTargetOptions)||void 0===o?void 0:o.minFilter)?null===(l=t.renderTargetOptions)||void 0===l?void 0:l.minFilter:D,samples:void 0!==(null===(c=t.renderTargetOptions)||void 0===c?void 0:c.samples)?null===(h=t.renderTargetOptions)||void 0===h?void 0:h.samples:void 0,wrapS:void 0!==(null===(u=t.renderTargetOptions)||void 0===u?void 0:u.wrapS)?null===(d=t.renderTargetOptions)||void 0===d?void 0:d.wrapS:b,wrapT:void 0!==(null===(A=t.renderTargetOptions)||void 0===A?void 0:A.wrapT)?null===(p=t.renderTargetOptions)||void 0===p?void 0:p.wrapT:b};if(this._material=t.material,t.renderer?this._renderer=t.renderer:(this._renderer=fg.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new ba,this._camera=new nr,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!((t,e,i,n)=>{if(void 0!==gg)return gg;const r=new me(1,1,n);e.setRenderTarget(r);const s=new Sn(new qn,new Gi({color:16777215}));e.render(s,i),e.setRenderTarget(null);const a=mg(t,r.width,r.height);return e.readRenderTargetPixels(r,0,0,r.width,r.height,a),r.dispose(),s.geometry.dispose(),s.material.dispose(),gg=0!==a[0],gg})(this._type,this._renderer,this._camera,f)){let t;if(this._type===G)t=this._renderer.extensions.has("EXT_color_buffer_float")?k:void 0;void 0!==t?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to 1015`),this._type=t):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new Sn(new qn,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new me(this.width,this.height,f),this._renderTarget.texture.mapping=void 0!==(null===(m=t.renderTargetOptions)||void 0===m?void 0:m.mapping)?null===(g=t.renderTargetOptions)||void 0===g?void 0:g.mapping:x}static instantiateRenderer(){const t=new wa;return t.setSize(128,128),t}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const t=mg(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,t),t}toDataTexture(t){const e=new za(this.toArray(),this.width,this.height,z,this._type,(null==t?void 0:t.mapping)||x,(null==t?void 0:t.wrapS)||b,(null==t?void 0:t.wrapT)||b,(null==t?void 0:t.magFilter)||D,(null==t?void 0:t.minFilter)||D,(null==t?void 0:t.anisotropy)||1,vt);return e.generateMipmaps=void 0!==(null==t?void 0:t.generateMipmaps)&&(null==t?void 0:t.generateMipmaps),e}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(t){this.disposeOnDemandRenderer(),t&&this.renderTarget.dispose(),this.material instanceof Bn&&Object.values(this.material.uniforms).forEach((t=>{t.value instanceof de&&t.value.dispose()})),Object.values(this.material).forEach((t=>{t instanceof de&&t.dispose()})),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(t){this._width=t,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(t){this._height=t,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(t){this._renderTarget=t,this._width=t.width,this._height=t.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}class vg extends Bn{constructor({gamma:t,offsetHdr:e,offsetSdr:i,gainMapMin:n,gainMapMax:r,maxDisplayBoost:s,hdrCapacityMin:a,hdrCapacityMax:o,sdr:l,gainMap:c}){super({name:"GainMapDecoderMaterial",vertexShader:"\nvarying vec2 vUv;\n\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",fragmentShader:"\n// min half float value\n#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )\n// max half float value\n#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )\n\nuniform sampler2D sdr;\nuniform sampler2D gainMap;\nuniform vec3 gamma;\nuniform vec3 offsetHdr;\nuniform vec3 offsetSdr;\nuniform vec3 gainMapMin;\nuniform vec3 gainMapMax;\nuniform float weightFactor;\n\nvarying vec2 vUv;\n\nvoid main() {\n vec3 rgb = texture2D( sdr, vUv ).rgb;\n vec3 recovery = texture2D( gainMap, vUv ).rgb;\n vec3 logRecovery = pow( recovery, gamma );\n vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;\n vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;\n vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));\n gl_FragColor = vec4( clampedHdrColor , 1.0 );\n}\n",uniforms:{sdr:{value:l},gainMap:{value:c},gamma:{value:new _e(1/t[0],1/t[1],1/t[2])},offsetHdr:{value:(new _e).fromArray(e)},offsetSdr:{value:(new _e).fromArray(i)},gainMapMin:{value:(new _e).fromArray(n)},gainMapMax:{value:(new _e).fromArray(r)},weightFactor:{value:(Math.log2(s)-a)/(o-a)}},blending:0,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=s,this._hdrCapacityMin=a,this._hdrCapacityMax=o,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(t){this.uniforms.sdr.value=t}get gainMap(){return this.uniforms.gainMap.value}set gainMap(t){this.uniforms.gainMap.value=t}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(t){this.uniforms.offsetHdr.value.fromArray(t)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(t){this.uniforms.offsetSdr.value.fromArray(t)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(t){this.uniforms.gainMapMin.value.fromArray(t)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(t){this.uniforms.gainMapMax.value.fromArray(t)}get gamma(){const t=this.uniforms.gamma.value;return[1/t.x,1/t.y,1/t.z]}set gamma(t){const e=this.uniforms.gamma.value;e.x=1/t[0],e.y=1/t[1],e.z=1/t[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(t){this._hdrCapacityMin=t,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(t){this._hdrCapacityMax=t,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(t){this._maxDisplayBoost=Math.max(1,Math.min(65504,t)),this.calculateWeight()}calculateWeight(){const t=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,t))}}class _g extends Error{}class Eg extends Error{}const yg=(t,e,i)=>{var n;let r;const s=null===(n=t.attributes.getNamedItem(e))||void 0===n?void 0:n.nodeValue;if(s)r=s;else{const n=t.getElementsByTagName(e)[0];if(!n){if(i)return i;throw new Error(`Can't find ${e} in gainmap metadata`)}{const t=n.getElementsByTagName("rdf:li");if(3!==t.length)throw new Error(`Gainmap metadata contains an array of items for ${e} but its length is not 3`);r=Array.from(t).map((t=>t.innerHTML))}}return r};class xg{constructor(t){this.options={debug:!(!t||void 0===t.debug)&&t.debug,extractFII:!t||void 0===t.extractFII||t.extractFII,extractNonFII:!t||void 0===t.extractNonFII||t.extractNonFII}}extract(t){return new Promise(((e,i)=>{const n=this.options.debug,r=new DataView(t.buffer);if(65496!==r.getUint16(0))return void i(new Error("Not a valid jpeg"));const s=r.byteLength;let a,o=2,l=0;for(;o250)return void i(new Error(`Found no marker after ${l} loops 😵`));if(255!==r.getUint8(o))return void i(new Error(`Not a valid marker at offset 0x${o.toString(16)}, found: 0x${r.getUint8(o).toString(16)}`));if(a=r.getUint8(o+1),n&&console.log(`Marker: ${a.toString(16)}`),226===a){n&&console.log("Found APP2 marker (0xffe2)");const t=o+4;if(1297106432===r.getUint32(t)){const n=t+4;let s;if(18761===r.getUint16(n))s=!1;else{if(19789!==r.getUint16(n))return void i(new Error("No valid endianness marker found in TIFF header"));s=!0}if(42!==r.getUint16(n+2,!s))return void i(new Error("Not valid TIFF data! (no 0x002A marker)"));const a=r.getUint32(n+4,!s);if(a<8)return void i(new Error("Not valid TIFF data! (First offset less than 8)"));const o=n+a,l=r.getUint16(o,!s),c=o+2;let h=0;for(let t=c;t{const e=(t=>{var e,i;let n;n="undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):t.toString();let r=n.indexOf("",r);n.slice(r,t+10);const a=n.slice(r,t+10);try{const t=s.parseFromString(a,"text/xml").getElementsByTagName("rdf:Description")[0],n=yg(t,"hdrgm:GainMapMin","0"),r=yg(t,"hdrgm:GainMapMax"),o=yg(t,"hdrgm:Gamma","1"),l=yg(t,"hdrgm:OffsetSDR","0.015625"),c=yg(t,"hdrgm:OffsetHDR","0.015625");let h=null===(e=t.attributes.getNamedItem("hdrgm:HDRCapacityMin"))||void 0===e?void 0:e.nodeValue;h||(h="0");const u=null===(i=t.attributes.getNamedItem("hdrgm:HDRCapacityMax"))||void 0===i?void 0:i.nodeValue;if(!u)throw new Error("Incomplete gainmap metadata");return{gainMapMin:Array.isArray(n)?n.map((t=>parseFloat(t))):[parseFloat(n),parseFloat(n),parseFloat(n)],gainMapMax:Array.isArray(r)?r.map((t=>parseFloat(t))):[parseFloat(r),parseFloat(r),parseFloat(r)],gamma:Array.isArray(o)?o.map((t=>parseFloat(t))):[parseFloat(o),parseFloat(o),parseFloat(o)],offsetSdr:Array.isArray(l)?l.map((t=>parseFloat(t))):[parseFloat(l),parseFloat(l),parseFloat(l)],offsetHdr:Array.isArray(c)?c.map((t=>parseFloat(t))):[parseFloat(c),parseFloat(c),parseFloat(c)],hdrCapacityMin:parseFloat(h),hdrCapacityMax:parseFloat(u)}}catch(t){}r=n.indexOf("new Promise(((e,i)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=t=>{i(t)},n.src=URL.createObjectURL(t)}));class Ig extends Ko{constructor(t,e){super(e),this._renderer=t,this._internalLoadingManager=new jo}setRenderTargetOptions(t){return this._renderTargetOptions=t,this}prepareQuadRenderer(){const t=new vg({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new de,sdr:new de});return new fg({width:16,height:16,type:G,colorSpace:vt,material:t,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(t,e,i,n){const r=n?new Blob([n],{type:"image/jpeg"}):void 0,s=new Blob([i],{type:"image/jpeg"});let a,o,l=!1;if("undefined"==typeof createImageBitmap){const t=await Promise.all([r?Cg(r):Promise.resolve(void 0),Cg(s)]);o=t[0],a=t[1],l=!0}else{const t=await Promise.all([r?createImageBitmap(r,{imageOrientation:"flipY"}):Promise.resolve(void 0),createImageBitmap(s,{imageOrientation:"flipY"})]);o=t[0],a=t[1]}const c=new de(o||new ImageData(2,2),x,b,b,D,1008,z,N,1,vt);c.flipY=l,c.needsUpdate=!0;const h=new de(a,x,b,b,D,1008,z,N,1,ft);h.flipY=l,h.needsUpdate=!0,t.width=a.width,t.height=a.height,t.material.gainMap=c,t.material.sdr=h,t.material.gainMapMin=e.gainMapMin,t.material.gainMapMax=e.gainMapMax,t.material.offsetHdr=e.offsetHdr,t.material.offsetSdr=e.offsetSdr,t.material.gamma=e.gamma,t.material.hdrCapacityMin=e.hdrCapacityMin,t.material.hdrCapacityMax=e.hdrCapacityMax,t.material.maxDisplayBoost=Math.pow(2,e.hdrCapacityMax),t.material.needsUpdate=!0,t.render()}}class Mg extends Ig{load(t,e,i,n){const r=this.prepareQuadRenderer(),s=new Zo(this._internalLoadingManager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(this.withCredentials),this.manager.itemStart(t),s.load(t,(async i=>{if("string"==typeof i)throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const s=new Uint8Array(i);let a,o,l;try{const t=await Sg(s);a=t.sdr,o=t.gainMap,l=t.metadata}catch(e){if(!(e instanceof Eg||e instanceof _g))throw e;console.warn(`Failure to reconstruct an HDR image from ${t}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),l={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},a=s}try{await this.render(r,l,a,o)}catch(e){return this.manager.itemError(t),"function"==typeof n&&n(e),void r.disposeOnDemandRenderer()}"function"==typeof e&&e(r),this.manager.itemEnd(t),r.disposeOnDemandRenderer()}),i,(e=>{this.manager.itemError(t),"function"==typeof n&&n(e)})),r}}class wg extends el{constructor(t){super(t),this.type=G}parse(t){const e=function(t,e){switch(t){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(e||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(e||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(e||""));default:throw new Error("THREE.RGBELoader: Memory Error: "+(e||""))}},i=function(t,e,i){e=e||1024;let n=t.pos,r=-1,s=0,a="",o=String.fromCharCode.apply(null,new Uint16Array(t.subarray(n,n+128)));for(;0>(r=o.indexOf("\n"))&&s=t.byteLength||!(l=i(t)))&&e(1,"no header found"),(c=l.match(/^#\?(\S+)/))||e(3,"bad initial token"),o.valid|=1,o.programtype=c[1],o.string+=l+"\n";l=i(t),!1!==l;)if(o.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(n))&&(o.gamma=parseFloat(c[1])),(c=l.match(r))&&(o.exposure=parseFloat(c[1])),(c=l.match(s))&&(o.valid|=2,o.format=c[1]),(c=l.match(a))&&(o.valid|=4,o.height=parseInt(c[1],10),o.width=parseInt(c[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=l+"\n";return 2&o.valid||e(3,"missing format specifier"),4&o.valid||e(3,"missing image size specifier"),o}(s),o=a.width,l=a.height,c=function(t,i,n){const r=i;if(r<8||r>32767||2!==t[0]||2!==t[1]||128&t[2])return new Uint8Array(t);r!==(t[2]<<8|t[3])&&e(3,"wrong scanline width");const s=new Uint8Array(4*i*n);s.length||e(4,"unable to allocate buffer space");let a=0,o=0;const l=4*r,c=new Uint8Array(4),h=new Uint8Array(l);let u=n;for(;u>0&&ot.byteLength&&e(1),c[0]=t[o++],c[1]=t[o++],c[2]=t[o++],c[3]=t[o++],2==c[0]&&2==c[1]&&(c[2]<<8|c[3])==r||e(3,"bad rgbe scanline format");let i,n=0;for(;n128;if(r&&(i-=128),(0===i||n+i>l)&&e(3,"bad scanline data"),r){const e=t[o++];for(let t=0;tthis.ldrLoader.load(t,e,(()=>{}),i)));return e.name=t,e.flipY=!1,e}async loadLottie(t,e){const i=await this.getLottieLoader();i.setQuality(e);const n=await new Promise(((e,n)=>i.load(t,e,(()=>{}),n)));return n.name=t,n}async loadEquirect(t,e=(()=>{})){try{const i=Lg.test(t),n=i?this.hdrLoader:this.imageLoader,r=await new Promise(((i,r)=>n.load(t,(t=>{const{renderTarget:e}=t;if(null!=e){const{texture:n}=e;t.dispose(!1),i(n)}else i(t)}),(t=>{e(t.loaded/t.total*.9)}),r)));return e(1),r.name=t,r.mapping=I,i||(r.colorSpace=ft),r}finally{e&&e(1)}}async generateEnvironmentMapAndSkybox(t=null,e=null,i=(()=>{})){const n="legacy"!==e;"legacy"!==e&&"neutral"!==e||(e=null),e=mh(e);let r,s=Promise.resolve(null);t&&(s=this.loadEquirectFromUrl(t,i)),r=e?this.loadEquirectFromUrl(e,i):t?this.loadEquirectFromUrl(t,i):n?this.loadGeneratedEnvironmentMapAlt():this.loadGeneratedEnvironmentMap();const[a,o]=await Promise.all([r,s]);if(null==a)throw new Error("Failed to load environment map.");return{environmentMap:a,skybox:o}}async loadEquirectFromUrl(t,e){if(!this.skyboxCache.has(t)){const i=this.loadEquirect(t,e);this.skyboxCache.set(t,i)}return this.skyboxCache.get(t)}async GenerateEnvironmentMap(t,e){await((t=0)=>new Promise((e=>setTimeout(e,t))))();const i=this.threeRenderer,n=new Nn(256,{generateMipmaps:!1,type:G,format:z,colorSpace:vt,depthBuffer:!0}),r=new Un(.1,100,n),s=r.renderTarget.texture;s.name=e;const a=i.outputColorSpace,o=i.toneMapping;return i.toneMapping=p,i.outputColorSpace=vt,r.update(i,t),this.blurCubemap(n,.04),i.toneMapping=o,i.outputColorSpace=a,s}async loadGeneratedEnvironmentMap(){return null==this.generatedEnvironmentMap&&(this.generatedEnvironmentMap=this.GenerateEnvironmentMap(new Bg("legacy"),"legacy")),this.generatedEnvironmentMap}async loadGeneratedEnvironmentMapAlt(){return null==this.generatedEnvironmentMapAlt&&(this.generatedEnvironmentMapAlt=this.GenerateEnvironmentMap(new Bg("neutral"),"neutral")),this.generatedEnvironmentMapAlt}blurCubemap(t,e){if(null==this.blurMaterial){this.blurMaterial=this.getBlurShader(Rg);const t=new In,e=new Sn(t,this.blurMaterial);this.blurScene=new ba,this.blurScene.add(e)}const i=t.clone();this.halfblur(t,i,e,"latitudinal"),this.halfblur(i,t,e,"longitudinal")}halfblur(t,e,i,n){const r=t.width,s=isFinite(i)?Math.PI/(2*r):2*Math.PI/39,a=i/s,o=isFinite(i)?1+Math.floor(3*a):Rg;o>Rg&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${o} samples when the maximum is set to 20`);const l=[];let c=0;for(let t=0;t= samples ) {\n \n break;\n \n }\n \n float theta = dTheta * float( i );\n gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n \n }\n }\n ",blending:0,depthTest:!1,depthWrite:!1,side:l})}async dispose(){for(const[,t]of this.skyboxCache){(await t).dispose()}null!=this.generatedEnvironmentMap&&((await this.generatedEnvironmentMap).dispose(),this.generatedEnvironmentMap=null),null!=this.generatedEnvironmentMapAlt&&((await this.generatedEnvironmentMapAlt).dispose(),this.generatedEnvironmentMapAlt=null),null!=this.blurMaterial&&this.blurMaterial.dispose()}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Ug=[1,.79,.62,.5,.4,.31,.25],Pg="high-performance";class Ng extends Rt{constructor(t){super(),this.loader=new Ed(pg),this.width=0,this.height=0,this.dpr=1,this.scenes=new Set,this.multipleScenesVisible=!1,this.lastTick=performance.now(),this.renderedLastFrame=!1,this.scaleStep=0,this.lastStep=3,this.avgFrameDuration=50,this.onWebGLContextLost=t=>{this.dispatchEvent({type:"contextlost",sourceEvent:t})},this.onWebGLContextRestored=()=>{var t;null===(t=this.textureUtils)||void 0===t||t.dispose(),this.textureUtils=new Dg(this.threeRenderer);for(const t of this.scenes)t.element[Ih]()},this.dpr=Eh(),this.canvas3D=document.createElement("canvas"),this.canvas3D.id="webgl-canvas",this.canvas3D.classList.add("show"),Xn.tonemapping_pars_fragment=Xn.tonemapping_pars_fragment.replace("vec3 CustomToneMapping( vec3 color ) { return color; }","\n float startCompression = 0.8 - 0.04;\n float desaturation = 0.15;\n vec3 CustomToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n\n float x = min(color.r, min(color.g, color.b));\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n\n float peak = max(color.r, max(color.g, color.b));\n if (peak < startCompression) return color;\n\n float d = 1. - startCompression;\n float newPeak = 1. - d * d / (peak + d - startCompression);\n color *= newPeak / peak;\n\n float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);\n return mix(color, vec3(1, 1, 1), g);\n }");try{this.threeRenderer=new wa({canvas:this.canvas3D,alpha:!0,antialias:!0,powerPreference:t.powerPreference,preserveDrawingBuffer:!0}),this.threeRenderer.autoClear=!0,this.threeRenderer.setPixelRatio(1),this.threeRenderer.debug={checkShaderErrors:!!t.debug,onShaderError:null},this.threeRenderer.toneMapping=v}catch(t){console.warn(t)}this.arRenderer=new Ym(this),this.textureUtils=this.canRender?new Dg(this.threeRenderer):null,Ed.initializeKTX2Loader(this.threeRenderer),this.canvas3D.addEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.addEventListener("webglcontextrestored",this.onWebGLContextRestored),this.updateRendererSize()}static get singleton(){return this._singleton}static resetSingleton(){const t=this._singleton.dispose();for(const e of t)e.disconnectedCallback();this._singleton=new Ng({powerPreference:(self.ModelViewerElement||{}).powerPreference||Pg,debug:yh()});for(const e of t)e.connectedCallback()}get canRender(){return null!=this.threeRenderer}get scaleFactor(){return Ug[this.scaleStep]}set minScale(t){let e=1;for(;e0&&this.threeRenderer.setAnimationLoop(((t,e)=>this.render(t,e)))}unregisterScene(t){this.scenes.delete(t),this.canvas3D.parentElement===t.canvas.parentElement&&t.canvas.parentElement.removeChild(this.canvas3D),this.canRender&&0===this.scenes.size&&this.threeRenderer.setAnimationLoop(null)}displayCanvas(t){return this.multipleScenesVisible?t.element[b_]:this.canvas3D}countVisibleScenes(){const{canvas3D:t}=this;let e=0,i=null;for(const n of this.scenes){const{element:r}=n;r.modelIsVisible&&null==n.externalRenderer&&++e,t.parentElement===n.canvas.parentElement&&(i=n)}const n=e>1;if(null!=i){const e=n&&!this.multipleScenesVisible,r=!i.element.modelIsVisible;if(e||r){const{width:e,height:n}=this.sceneSize(i);this.copyPixels(i,e,n),t.parentElement.removeChild(t)}}this.multipleScenesVisible=n}updateRendererSize(){var t;const e=Eh();if(e!==this.dpr)for(const t of this.scenes){const{element:e}=t;e[m_](e.getBoundingClientRect())}let i=0,n=0;for(const t of this.scenes)i=Math.max(i,t.width),n=Math.max(n,t.height);if(i!==this.width||n!==this.height||e!==this.dpr){this.width=i,this.height=n,this.dpr=e,i=Math.ceil(i*e),n=Math.ceil(n*e),this.canRender&&this.threeRenderer.setSize(i,n,!1);for(const e of this.scenes){const{canvas:r}=e;r.width=i,r.height=n,e.forceRescale(),null===(t=e.effectRenderer)||void 0===t||t.setSize(i,n)}}}updateRendererScale(t){const e=this.scaleStep;this.avgFrameDuration+=_h(.2*(t-this.avgFrameDuration),-5,5),this.avgFrameDuration>60?++this.scaleStep:this.avgFrameDuration<40&&this.scaleStep>0&&--this.scaleStep,this.scaleStep=Math.min(this.scaleStep,this.lastStep),e!==this.scaleStep&&(this.avgFrameDuration=50)}shouldRender(t){if(t.shouldRender())t.scaleStep!=this.scaleStep&&(t.scaleStep=this.scaleStep,this.rescaleCanvas(t));else{if(0==t.scaleStep)return!1;t.scaleStep=0,this.rescaleCanvas(t)}return!0}rescaleCanvas(t){const e=Ug[t.scaleStep],i=Math.ceil(this.width/e),n=Math.ceil(this.height/e),{style:r}=t.canvas;r.width=`${i}px`,r.height=`${n}px`,this.canvas3D.style.width=`${i}px`,this.canvas3D.style.height=`${n}px`;const s=this.dpr*e,a=e<1?"GPU throttling":this.dpr!==window.devicePixelRatio?"No meta viewport tag":"";t.element.dispatchEvent(new CustomEvent("render-scale",{detail:{reportedDpr:window.devicePixelRatio,renderedDpr:s,minimumDpr:this.dpr*Ug[this.lastStep],pixelWidth:Math.ceil(t.width*s),pixelHeight:Math.ceil(t.height*s),reason:a}}))}sceneSize(t){const{dpr:e}=this,i=Ug[t.scaleStep];return{width:Math.min(Math.ceil(t.width*i*e),this.canvas3D.width),height:Math.min(Math.ceil(t.height*i*e),this.canvas3D.height)}}copyPixels(t,e,i){const n=t.context;null!=n?(n.clearRect(0,0,e,i),n.drawImage(this.canvas3D,0,0,e,i,0,0,e,i),t.canvas.classList.add("show")):console.log("could not acquire 2d context")}orderedScenes(){const t=[];for(const e of[!1,!0])for(const i of this.scenes)i.element.modelIsVisible===e&&t.push(i);return t}get isPresenting(){return this.arRenderer.isPresenting}preRender(t,e,i){const{element:n,exposure:r,toneMapping:s}=t;n[R_](e,i);const a="number"==typeof r&&!Number.isNaN(r),o=n.environmentImage,l=n.skyboxImage,c=s===_&&("neutral"===o||"legacy"===o||!o&&!l);this.threeRenderer.toneMappingExposure=(a?r:1)*(c?1.3:1)}render(t,e){if(null!=e)return void this.arRenderer.onWebXRFrame(t,e);const i=t-this.lastTick;if(this.lastTick=t,!this.canRender||this.isPresenting)return;this.countVisibleScenes(),this.updateRendererSize(),this.renderedLastFrame&&(this.updateRendererScale(i),this.renderedLastFrame=!1);const{canvas3D:n}=this;for(const e of this.orderedScenes()){const{element:r}=e;if(!r.loaded||!r.modelIsVisible&&e.renderCount>0)continue;if(this.preRender(e,t,i),!this.shouldRender(e))continue;if(null!=e.externalRenderer){const t=e.getCamera();t.updateMatrix();const{matrix:i,projectionMatrix:n}=t,r=i.elements.slice(),s=e.getTarget();r[12]+=s.x,r[13]+=s.y,r[14]+=s.z,e.externalRenderer.render({viewMatrix:r,projectionMatrix:n.elements});continue}if(!r.modelIsVisible&&!this.multipleScenesVisible)for(const t of this.scenes)t.element.modelIsVisible&&t.queueRender();const{width:s,height:a}=this.sceneSize(e);e.renderShadow(this.threeRenderer),this.threeRenderer.setRenderTarget(null),this.threeRenderer.setViewport(0,Math.ceil(this.height*this.dpr)-a,s,a),null!=e.effectRenderer?e.effectRenderer.render(i):(this.threeRenderer.autoClear=!0,this.threeRenderer.toneMapping=e.toneMapping,this.threeRenderer.render(e,e.camera)),this.multipleScenesVisible||!e.element.modelIsVisible&&0===e.renderCount?this.copyPixels(e,s,a):n.parentElement!==e.canvas.parentElement&&(e.canvas.parentElement.appendChild(n),e.canvas.classList.remove("show")),e.hasRendered(),++e.renderCount,this.renderedLastFrame=!0}}dispose(){null!=this.textureUtils&&this.textureUtils.dispose(),null!=this.threeRenderer&&this.threeRenderer.dispose(),this.textureUtils=null,this.threeRenderer=null;const t=[];for(const e of this.scenes)t.push(e.element);return this.canvas3D.removeEventListener("webglcontextlost",this.onWebGLContextLost),this.canvas3D.removeEventListener("webglcontextrestored",this.onWebGLContextRestored),t}}Ng._singleton=new Ng({powerPreference:(self.ModelViewerElement||{}).powerPreference||Pg,debug:yh()}); -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Fg=Symbol("correlatedObjects"),Qg=Symbol("onUpdate");class Og{constructor(t,e=null){this[Qg]=t,this[Fg]=e}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const kg=new Gi,Gg=new qn(2,2);let Hg=0;const zg=Symbol("threeTexture"),Vg=Symbol("threeTextures");class Wg extends Og{get[zg](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get[Vg](){return this[Fg]}constructor(t,e){super(t,new Set(e?[e]:[])),this[zg].image.src||(this[zg].image.src=e.name?e.name:"adhoc_image"+Hg++),this[zg].image.name||(this[zg].image.name=e&&e.image&&e.image.src?e.image.src.split("/").pop():"adhoc_image")}get name(){return this[zg].image.name||""}get uri(){return this[zg].image.src}get bufferView(){return this[zg].image.bufferView}get element(){const t=this[zg];if(t&&(t.isCanvasTexture||t.isVideoTexture))return t.image}get animation(){const t=this[zg];if(t&&t.isCanvasTexture&&t.animation)return t.animation}get type(){return null!=this.uri?"external":"embedded"}set name(t){for(const e of this[Vg])e.image.name=t}update(){const t=this[zg];t&&t.isCanvasTexture&&!t.animation&&(this[zg].needsUpdate=!0,this[Qg]())}async createThumbnail(t,e){const i=new ba;kg.map=this[zg];const n=new Sn(Gg,kg);i.add(n);const r=new nr(-1,1,1,-1,0,1),{threeRenderer:s}=Ng.singleton,a=new me(t,e);s.setRenderTarget(a),s.render(i,r),s.setRenderTarget(null);const o=new Uint8Array(t*e*4);s.readRenderTargetPixels(a,0,0,t,e,o),s_.width=t,s_.height=e;const l=s_.getContext("2d"),c=l.createImageData(t,e);return c.data.set(o),l.putImageData(c,0,0),new Promise((async(t,e)=>{s_.toBlob((i=>{if(!i)return e("Failed to capture thumbnail.");t(URL.createObjectURL(i))}),"image/png")}))}}var qg,Xg;!function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.NearestMipmapNearest=9984]="NearestMipmapNearest",t[t.LinearMipmapNearest=9985]="LinearMipmapNearest",t[t.NearestMipmapLinear=9986]="NearestMipmapLinear",t[t.LinearMipmapLinear=9987]="LinearMipmapLinear"}(qg||(qg={})),function(t){t[t.ClampToEdge=33071]="ClampToEdge",t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.Repeat=10497]="Repeat"}(Xg||(Xg={})); -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const jg=new Map([[Xg.Repeat,w],[Xg.ClampToEdge,b],[Xg.MirroredRepeat,T]]),Yg=new Map([[w,Xg.Repeat],[b,Xg.ClampToEdge],[T,Xg.MirroredRepeat]]),Kg=new Map([[qg.Nearest,B],[qg.Linear,D],[qg.NearestMipmapNearest,R],[qg.LinearMipmapNearest,U],[qg.NearestMipmapLinear,L],[qg.LinearMipmapLinear,P]]),Jg=new Map([[B,qg.Nearest],[D,qg.Linear],[R,qg.NearestMipmapNearest],[U,qg.LinearMipmapNearest],[L,qg.NearestMipmapLinear],[P,qg.LinearMipmapLinear]]),$g=new Map([[qg.Nearest,B],[qg.Linear,D]]),Zg=new Map([[B,qg.Nearest],[D,qg.Linear]]),tf=t=>Jg.has(t),ef=t=>Zg.has(t),nf=t=>Yg.has(t),rf=Symbol("threeTexture"),sf=Symbol("threeTextures"),af=Symbol("setProperty");class of extends Og{get[rf](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get[sf](){return this[Fg]}constructor(t,e){super(t,new Set(e?[e]:[]))}get name(){return this[rf].name||""}get minFilter(){return Jg.get(this[rf].minFilter)}get magFilter(){return Zg.get(this[rf].magFilter)}get wrapS(){return Yg.get(this[rf].wrapS)}get wrapT(){return Yg.get(this[rf].wrapT)}get rotation(){return this[rf].rotation}get scale(){return k_(this[rf].repeat)}get offset(){return k_(this[rf].offset)}setMinFilter(t){this[af]("minFilter",Kg.get(t))}setMagFilter(t){this[af]("magFilter",$g.get(t))}setWrapS(t){this[af]("wrapS",jg.get(t))}setWrapT(t){this[af]("wrapT",jg.get(t))}setRotation(t){null==t&&(t=0),this[af]("rotation",t)}setScale(t){null==t&&(t={u:1,v:1}),this[af]("repeat",new Wt(t.u,t.v))}setOffset(t){null==t&&(t={u:0,v:0}),this[af]("offset",new Wt(t.u,t.v))}[af](t,e){if(((t,e)=>{switch(t){case"minFilter":return tf(e);case"magFilter":return ef(e);case"wrapS":case"wrapT":return nf(e);case"rotation":case"repeat":case"offset":return!0;default:throw new Error(`Cannot configure property "${t}" on Sampler`)}})(t,e))for(const i of this[sf])i[t]=e,i.needsUpdate=!0;this[Qg]()}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const lf=Symbol("image"),cf=Symbol("sampler"),hf=Symbol("threeTexture");class uf extends Og{constructor(t,e){super(t,new Set(e?[e]:[])),this[cf]=new of(t,e),this[lf]=new Wg(t,e)}get[hf](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get name(){return this[hf].name||""}set name(t){for(const e of this[Fg])e.name=t}get sampler(){return this[cf]}get source(){return this[lf]}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var df,Af,pf;const mf=Symbol("texture"),gf=Symbol("transform"),ff=Symbol("materials"),vf=Symbol("usage"),_f=Symbol("onUpdate"),Ef=Symbol("activeVideo");var yf;!function(t){t[t.Base=0]="Base",t[t.MetallicRoughness=1]="MetallicRoughness",t[t.Normal=2]="Normal",t[t.Occlusion=3]="Occlusion",t[t.Emissive=4]="Emissive",t[t.Clearcoat=5]="Clearcoat",t[t.ClearcoatRoughness=6]="ClearcoatRoughness",t[t.ClearcoatNormal=7]="ClearcoatNormal",t[t.SheenColor=8]="SheenColor",t[t.SheenRoughness=9]="SheenRoughness",t[t.Transmission=10]="Transmission",t[t.Thickness=11]="Thickness",t[t.Specular=12]="Specular",t[t.SpecularColor=13]="SpecularColor",t[t.Iridescence=14]="Iridescence",t[t.IridescenceThickness=15]="IridescenceThickness",t[t.Anisotropy=16]="Anisotropy"}(yf||(yf={}));class xf{constructor(t,e,i,n){this[df]=null,this[Af]={rotation:0,scale:new Wt(1,1),offset:new Wt(0,0)},this[pf]=!1,i&&(this[gf].rotation=i.rotation,this[gf].scale.copy(i.repeat),this[gf].offset.copy(i.offset),this[mf]=new uf(t,i)),this[_f]=t,this[ff]=n,this[vf]=e}get texture(){return this[mf]}setTexture(t){var e,i;const n=null!=t?t.source[zg]:null,r=null===(e=this[mf])||void 0===e?void 0:e.source[zg];if(null!=r&&r.isVideoTexture?this[Ef]=!1:(null===(i=this[mf])||void 0===i?void 0:i.source.animation)&&this[mf].source.animation.removeEventListener("enterFrame",this[_f]),this[mf]=t,null!=n&&n.isVideoTexture){const t=n.image;if(this[Ef]=!0,null!=t.requestVideoFrameCallback){const e=()=>{this[Ef]&&(this[_f](),t.requestVideoFrameCallback(e))};t.requestVideoFrameCallback(e)}else{const t=()=>{this[Ef]&&(this[_f](),requestAnimationFrame(t))};requestAnimationFrame(t)}}else null!=(null==t?void 0:t.source.animation)&&t.source.animation.addEventListener("enterFrame",this[_f]);let s=ft;if(this[ff])for(const t of this[ff]){switch(this[vf]){case yf.Base:t.map=n;break;case yf.MetallicRoughness:s=vt,t.metalnessMap=n,t.roughnessMap=n;break;case yf.Normal:s=vt,t.normalMap=n;break;case yf.Occlusion:s=vt,t.aoMap=n;break;case yf.Emissive:t.emissiveMap=n;break;case yf.Clearcoat:t.clearcoatMap=n;break;case yf.ClearcoatRoughness:t.clearcoatRoughnessMap=n;break;case yf.ClearcoatNormal:t.clearcoatNormalMap=n;break;case yf.SheenColor:t.sheenColorMap=n;break;case yf.SheenRoughness:t.sheenRoughnessMap=n;break;case yf.Transmission:t.transmissionMap=n;break;case yf.Thickness:t.thicknessMap=n;break;case yf.Specular:t.specularIntensityMap=n;break;case yf.SpecularColor:t.specularColorMap=n;break;case yf.Iridescence:t.iridescenceMap=n;break;case yf.IridescenceThickness:t.iridescenceThicknessMap=n;break;case yf.Anisotropy:t.anisotropyMap=n}t.needsUpdate=!0}n&&(n.colorSpace=s,n.rotation=this[gf].rotation,n.repeat=this[gf].scale,n.offset=this[gf].offset),this[_f]()}}df=mf,Af=gf,pf=Ef; -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -const Sf=Symbol("threeMaterial"),Cf=Symbol("threeMaterials"),If=Symbol("baseColorTexture"),Mf=Symbol("metallicRoughnessTexture");class wf extends Og{constructor(t,e){super(t,e);const{map:i,metalnessMap:n}=e.values().next().value;this[If]=new xf(t,yf.Base,i,e),this[Mf]=new xf(t,yf.MetallicRoughness,n,e)}get[Cf](){return this[Fg]}get[Sf](){var t;return null===(t=this[Fg])||void 0===t?void 0:t.values().next().value}get baseColorFactor(){const t=[0,0,0,this[Sf].opacity];return this[Sf].color.toArray(t),t}get metallicFactor(){return this[Sf].metalness}get roughnessFactor(){return this[Sf].roughness}get baseColorTexture(){return this[If]}get metallicRoughnessTexture(){return this[Mf]}setBaseColorFactor(t){const e=new Fi;t instanceof Array?e.fromArray(t):e.set(t);for(const i of this[Cf])i.color.set(e),t instanceof Array?i.opacity=t[3]:(t=[0,0,0,i.opacity],e.toArray(t));this[Qg]()}setMetallicFactor(t){for(const e of this[Cf])e.metalness=t;this[Qg]()}setRoughnessFactor(t){for(const e of this[Cf])e.roughness=t;this[Qg]()}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var bf,Tf;const Bf=Symbol("pbrMetallicRoughness"),Rf=Symbol("normalTexture"),Lf=Symbol("occlusionTexture"),Df=Symbol("emissiveTexture"),Uf=Symbol("backingThreeMaterial"),Pf=Symbol("applyAlphaCutoff"),Nf=Symbol("getAlphaMode"),Ff=Symbol("lazyLoadGLTFInfo"),Qf=Symbol("initialize"),Of=Symbol("getLoadedMaterial"),kf=Symbol("ensureMaterialIsLoaded"),Gf=Symbol("gltfIndex"),Hf=Symbol("setActive"),zf=Symbol("variantIndices"),Vf=Symbol("isActive"),Wf=Symbol("variantSet"),qf=Symbol("modelVariants"),Xf=Symbol("name"),jf=Symbol("pbrTextures");class Yf extends Og{constructor(t,e,i,n,r,s,a=void 0){super(t,r),this[bf]=new Set,this[Tf]=new Map,this[Gf]=e,this[Vf]=i,this[qf]=n,this[Xf]=s,null==a?this[Qf]():this[Ff]=a}get[(bf=Wf,Tf=jf,Uf)](){return this[Fg].values().next().value}[Qf](){const t=this[Qg],e=this[Fg];this[Bf]=new wf(t,e);const{normalMap:i,aoMap:n,emissiveMap:r}=e.values().next().value;this[Rf]=new xf(t,yf.Normal,i,e),this[Lf]=new xf(t,yf.Occlusion,n,e),this[Df]=new xf(t,yf.Emissive,r,e);const s=i=>{this[jf].set(i,new xf(t,i,null,e))};s(yf.Clearcoat),s(yf.ClearcoatRoughness),s(yf.ClearcoatNormal),s(yf.SheenColor),s(yf.SheenRoughness),s(yf.Transmission),s(yf.Thickness),s(yf.Specular),s(yf.SpecularColor),s(yf.Iridescence),s(yf.IridescenceThickness),s(yf.Anisotropy)}async[Of](){if(null!=this[Ff]){const{set:t,material:e}=await this[Ff].doLazyLoad();return this[Fg]=t,this[Qf](),this[Ff]=void 0,this.ensureLoaded=async()=>{},e}return this[Fg].values().next().value}colorFromRgb(t){const e=new Fi;return t instanceof Array?e.fromArray(t):e.set(t),e}[kf](){if(null!=this[Ff])throw new Error(`Material "${this.name}" has not been loaded, call 'await\n myMaterial.ensureLoaded()' before using an unloaded material.`)}async ensureLoaded(){await this[Of]()}get isLoaded(){return null==this[Ff]}get isActive(){return this[Vf]}[Hf](t){this[Vf]=t}get name(){return this[Xf]||""}set name(t){if(this[Xf]=t,null!=this[Fg])for(const e of this[Fg])e.name=t}get pbrMetallicRoughness(){return this[kf](),this[Bf]}get normalTexture(){return this[kf](),this[Rf]}get occlusionTexture(){return this[kf](),this[Lf]}get emissiveTexture(){return this[kf](),this[Df]}get emissiveFactor(){return this[kf](),this[Uf].emissive.toArray()}get index(){return this[Gf]}[zf](){return this[Wf]}hasVariant(t){const e=this[qf].get(t);return null!=e&&this[Wf].has(e.index)}setEmissiveFactor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.emissive.set(e);this[Qg]()}[Nf](){return this[Uf].transparent?"BLEND":this[Uf].alphaTest>0?"MASK":"OPAQUE"}[Pf](){this[kf]();for(const t of this[Fg])"MASK"===this[Nf]()?null==t.alphaTest&&(t.alphaTest=.5):t.alphaTest=void 0,t.needsUpdate=!0}setAlphaCutoff(t){this[kf]();for(const e of this[Fg])e.alphaTest=t,e.needsUpdate=!0;this[Pf](),this[Qg]()}getAlphaCutoff(){return this[kf](),this[Uf].alphaTest}setDoubleSided(t){this[kf]();for(const e of this[Fg])e.side=t?c:o,e.needsUpdate=!0;this[Qg]()}getDoubleSided(){return this[kf](),this[Uf].side==c}setAlphaMode(t){this[kf]();const e=(t,e)=>{t.transparent=e,t.depthWrite=!e};for(const i of this[Fg])e(i,"BLEND"===t),i.alphaTest="MASK"===t?.5:void 0,i.needsUpdate=!0;this[Qg]()}getAlphaMode(){return this[kf](),this[Nf]()}get emissiveStrength(){return this[kf](),this[Uf].emissiveIntensity}setEmissiveStrength(t){this[kf]();for(const e of this[Fg])e.emissiveIntensity=t;this[Qg]()}get clearcoatFactor(){return this[kf](),this[Uf].clearcoat}get clearcoatRoughnessFactor(){return this[kf](),this[Uf].clearcoatRoughness}get clearcoatTexture(){return this[kf](),this[jf].get(yf.Clearcoat)}get clearcoatRoughnessTexture(){return this[kf](),this[jf].get(yf.ClearcoatRoughness)}get clearcoatNormalTexture(){return this[kf](),this[jf].get(yf.ClearcoatNormal)}get clearcoatNormalScale(){return this[kf](),this[Uf].clearcoatNormalScale.x}setClearcoatFactor(t){this[kf]();for(const e of this[Fg])e.clearcoat=t;this[Qg]()}setClearcoatRoughnessFactor(t){this[kf]();for(const e of this[Fg])e.clearcoatRoughness=t;this[Qg]()}setClearcoatNormalScale(t){this[kf]();for(const e of this[Fg])e.clearcoatNormalScale=new Wt(t,t);this[Qg]()}get ior(){return this[kf](),this[Uf].ior}setIor(t){this[kf]();for(const e of this[Fg])e.ior=t;this[Qg]()}get sheenColorFactor(){return this[kf](),this[Uf].sheenColor.toArray()}get sheenColorTexture(){return this[kf](),this[jf].get(yf.SheenColor)}get sheenRoughnessFactor(){return this[kf](),this[Uf].sheenRoughness}get sheenRoughnessTexture(){return this[kf](),this[jf].get(yf.SheenRoughness)}setSheenColorFactor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.sheenColor.set(e),t.sheen=1;this[Qg]()}setSheenRoughnessFactor(t){this[kf]();for(const e of this[Fg])e.sheenRoughness=t,e.sheen=1;this[Qg]()}get transmissionFactor(){return this[kf](),this[Uf].transmission}get transmissionTexture(){return this[kf](),this[jf].get(yf.Transmission)}setTransmissionFactor(t){this[kf]();for(const e of this[Fg])e.transmission=t;this[Qg]()}get thicknessFactor(){return this[kf](),this[Uf].thickness}get thicknessTexture(){return this[kf](),this[jf].get(yf.Thickness)}get attenuationDistance(){return this[kf](),this[Uf].attenuationDistance}get attenuationColor(){return this[kf](),this[Uf].attenuationColor.toArray()}setThicknessFactor(t){this[kf]();for(const e of this[Fg])e.thickness=t;this[Qg]()}setAttenuationDistance(t){this[kf]();for(const e of this[Fg])e.attenuationDistance=t;this[Qg]()}setAttenuationColor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.attenuationColor.set(e);this[Qg]()}get specularFactor(){return this[kf](),this[Uf].specularIntensity}get specularTexture(){return this[kf](),this[jf].get(yf.Specular)}get specularColorFactor(){return this[kf](),this[Uf].specularColor.toArray()}get specularColorTexture(){return this[kf](),this[jf].get(yf.SheenColor)}setSpecularFactor(t){this[kf]();for(const e of this[Fg])e.specularIntensity=t;this[Qg]()}setSpecularColorFactor(t){this[kf]();const e=this.colorFromRgb(t);for(const t of this[Fg])t.specularColor.set(e);this[Qg]()}get iridescenceFactor(){return this[kf](),this[Uf].iridescence}get iridescenceTexture(){return this[kf](),this[jf].get(yf.Iridescence)}get iridescenceIor(){return this[kf](),this[Uf].iridescenceIOR}get iridescenceThicknessMinimum(){return this[kf](),this[Uf].iridescenceThicknessRange[0]}get iridescenceThicknessMaximum(){return this[kf](),this[Uf].iridescenceThicknessRange[1]}get iridescenceThicknessTexture(){return this[kf](),this[jf].get(yf.IridescenceThickness)}setIridescenceFactor(t){this[kf]();for(const e of this[Fg])e.iridescence=t;this[Qg]()}setIridescenceIor(t){this[kf]();for(const e of this[Fg])e.iridescenceIOR=t;this[Qg]()}setIridescenceThicknessMinimum(t){this[kf]();for(const e of this[Fg])e.iridescenceThicknessRange[0]=t;this[Qg]()}setIridescenceThicknessMaximum(t){this[kf]();for(const e of this[Fg])e.iridescenceThicknessRange[1]=t;this[Qg]()}get anisotropyStrength(){return this[kf](),this[Uf].anisotropy}get anisotropyRotation(){return this[kf](),this[Uf].anisotropyRotation}get anisotropyTexture(){return this[kf](),this[jf].get(yf.Anisotropy)}setAnisotropyStrength(t){this[kf]();for(const e of this[Fg])e.anisotropy=t;this[Qg]()}setAnisotropyRotation(t){this[kf]();for(const e of this[Fg])e.anisotropyRotation=t;this[Qg]()}}class Kf{constructor(t){this.name="",this.children=new Array,this.name=t}}class Jf extends Kf{constructor(t,e,i,n){super(t.name),this.materials=new Map,this.variantToMaterialMap=new Map,this.initialMaterialIdx=0,this.activeMaterialIdx=0,this.mesh=t;const{gltf:r,threeGLTF:s,threeObjectMap:a}=n;this.parser=s.parser,this.modelVariants=i,this.mesh.userData.variantData=i;const o=a.get(t.material);null!=o.materials?this.initialMaterialIdx=this.activeMaterialIdx=o.materials:console.error(`Primitive (${t.name}) missing initial material reference.`);const l=t.userData.associations||{};if(null==l.meshes)return void console.error("Mesh is missing primitive index association");const c=((r.meshes||[])[l.meshes].primitives||[])[l.primitives];if(null!=c){if(null!=c.material)this.materials.set(c.material,e[c.material]);else{const t=e.findIndex((t=>"Default"===t.name));t>=0?this.materials.set(t,e[t]):console.warn("gltfPrimitive has no material!")}if(c.extensions&&c.extensions.KHR_materials_variants){const t=c.extensions.KHR_materials_variants,n=s.parser.json.extensions.KHR_materials_variants.variants;for(const r of t.mappings){const t=e[r.material];this.materials.set(r.material,t);for(const e of r.variants){const{name:r}=n[e];this.variantToMaterialMap.set(e,t),t[zf]().add(e),i.has(r)||i.set(r,{name:r,index:e})}}}}else console.error("Mesh primitive definition is missing.")}async setActiveMaterial(t){const e=this.materials.get(t);if(null!=e&&t!==this.activeMaterialIdx){this.mesh.material=await e[Of]();const{normalScale:i}=this.mesh.material;null!=i&&i.y*i.x<0!=(null==this.mesh.geometry.attributes.tangent)&&this.parser.assignFinalMaterial(this.mesh),this.activeMaterialIdx=t}return this.mesh.material}getActiveMaterial(){return this.materials.get(this.activeMaterialIdx)}getMaterial(t){return this.materials.get(t)}async enableVariant(t){if(null==t)return this.setActiveMaterial(this.initialMaterialIdx);if(null!=this.variantToMaterialMap&&this.modelVariants.has(t)){const e=this.modelVariants.get(t);return this.enableVariantHelper(e.index)}return null}async enableVariantHelper(t){if(null!=this.variantToMaterialMap&&null!=t){const e=this.variantToMaterialMap.get(t);if(null!=e)return this.setActiveMaterial(e.index)}return null}async instantiateVariants(){if(null!=this.variantToMaterialMap)for(const t of this.variantToMaterialMap.keys()){const e=this.mesh.userData.variantMaterials.get(t);if(null!=e.material)continue;const i=await this.enableVariantHelper(t);null!=i&&(e.material=i)}}get variantInfo(){return this.variantToMaterialMap}addVariant(t,e){if(!this.ensureVariantIsUnused(e))return!1;this.modelVariants.has(e)||this.modelVariants.set(e,{name:e,index:this.modelVariants.size});const i=this.modelVariants.get(e).index;return t[zf]().add(i),this.variantToMaterialMap.set(i,t),this.materials.set(t.index,t),this.updateVariantUserData(i,t),!0}deleteVariant(t){if(this.variantInfo.has(t)){this.variantInfo.delete(t);const e=this.mesh.userData.variantMaterials;null!=e&&e.delete(t)}}updateVariantUserData(t,e){e[zf]().add(t),this.mesh.userData.variantData=this.modelVariants,this.mesh.userData.variantMaterials=this.mesh.userData.variantMaterials||new Map;this.mesh.userData.variantMaterials.set(t,{material:e[Fg].values().next().value,gltfMaterialIndex:e.index})}ensureVariantIsUnused(t){const e=this.modelVariants.get(t);return null==e||!this.variantInfo.has(e.index)||(console.warn(`Primitive cannot add variant '${t}' for this material, it already exists.`),!1)}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var $f,Zf,tv,ev,iv,nv;const rv=Symbol("materials"),sv=Symbol("hierarchy"),av=Symbol("roots"),ov=Symbol("primitives"),lv=Symbol("prepareVariantsForExport"),cv=Symbol("switchVariant"),hv=Symbol("materialFromPoint"),uv=Symbol("nodeFromPoint"),dv=Symbol("nodeFromIndex"),Av=Symbol("variantData"),pv=Symbol("availableVariants"),mv=Symbol("modelOnUpdate"),gv=Symbol("cloneMaterial");class fv{constructor(t,e,i,n){this.gltf=t,this.gltfElementMap=e,this.mapKey=i,this.doLazyLoad=n}}class vv{constructor(t,e=(()=>{})){this[$f]=new Array,this[Zf]=new Array,this[tv]=new Array,this[ev]=new Array,this[iv]=()=>{},this[nv]=new Map,this[mv]=e;const{gltf:i,threeGLTF:n,gltfElementMap:r}=t;for(const[t,s]of i.materials.entries()){const a=r.get(s);if(null!=a)this[rv].push(new Yf(e,t,!0,this[Av],a,s.name));else{const o=(i.materials||[])[t],l=t,c=async()=>{const t=await n.parser.getDependency("material",l),e=new Set;return r.set(o,e),e.add(t),{set:e,material:t}};this[rv].push(new Yf(e,t,!1,this[Av],a,s.name,new fv(i,r,o,c)))}}const s=new Map,a=new Array;for(const t of n.scene.children)a.push(t);for(;a.length>0;){const e=a.pop();let i=null;e instanceof Sn?(i=new Jf(e,this.materials,this[Av],t),this[ov].push(i)):i=new Kf(e.name);const n=s.get(e);null!=n?n.children.push(i):this[av].push(i),this[sv].push(i);for(const t of e.children)a.push(t),s.set(e,i)}}get materials(){return this[rv]}[($f=rv,Zf=sv,tv=av,ev=ov,iv=mv,nv=Av,pv)](){const t=Array.from(this[Av].values());return t.sort(((t,e)=>t.index-e.index)),t.map((t=>t.name))}getMaterialByName(t){const e=this[rv].filter((e=>e.name===t));return e.length>0?e[0]:null}[dv](t,e){const i=this[sv].find((i=>{if(i instanceof Jf){const{meshes:n,primitives:r}=i.mesh.userData.associations;if(n==t&&r==e)return!0}return!1}));return null==i?null:i}[uv](t){return this[sv].find((e=>{if(e instanceof Jf){if(e.mesh===t.object)return!0}return!1}))}[hv](t){return this[uv](t).getActiveMaterial()}async[cv](t){for(const e of this[ov])await e.enableVariant(t);for(const t of this.materials)t[Hf](!1);for(const t of this[ov])this.materials[t.getActiveMaterial().index][Hf](!0)}async[lv](){const t=new Array;for(const e of this[ov])t.push(e.instantiateVariants());await Promise.all(t)}[gv](t,e){const i=this.materials[t];i.isLoaded||console.error("Cloning an unloaded material,\n call 'material.ensureLoaded() before cloning the material.");const n=i[Fg],r=new Set;for(const[t,i]of n.entries()){const s=i.clone();s.name=e+(n.size>1?"_inst"+t:""),r.add(s)}const s=new Yf(this[mv],this[rv].length,!1,this[Av],r,e);return this[rv].push(s),s}createMaterialInstanceForVariant(t,e,i,n=!0){let r=null;for(const n of this[ov]){const s=this[Av].get(i);null!=s&&n.variantInfo.has(s.index)||null!=n.getMaterial(t)&&(this.hasVariant(i)||this.createVariant(i),null==r&&(r=this[gv](t,e)),n.addVariant(r,i))}if(n&&null!=r){r[Hf](!0),this.materials[t][Hf](!1);for(const t of this[ov])t.enableVariant(i)}return r}createVariant(t){this[Av].has(t)?console.warn(`Variant '${t}'' already exists`):this[Av].set(t,{name:t,index:this[Av].size})}hasVariant(t){return this[Av].has(t)}setMaterialToVariant(t,e){if(null!=this[pv]().find((t=>t===e)))if(t<0||t>=this.materials.length)console.error("setMaterialToVariant(): materialIndex is out of bounds.");else for(const i of this[ov]){const n=i.getMaterial(t);null!=n&&i.addVariant(n,e)}else console.warn(`Can't add material to '${e}', the variant does not exist.'`)}updateVariantName(t,e){const i=this[Av].get(t);null!=i&&(i.name=e,this[Av].set(e,i),this[Av].delete(t))}deleteVariant(t){const e=this[Av].get(t);if(null!=e){for(const i of this.materials)i.hasVariant(t)&&i[Wf].delete(e.index);for(const t of this[ov])t.deleteVariant(e.index);this[Av].delete(t)}}} -/* @license - * Copyright 2020 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var _v=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const Ev=Symbol("currentGLTF"),yv=Symbol("originalGltfJson"),xv=Symbol("model"),Sv=Symbol("getOnUpdateMethod"),Cv=Symbol("buildTexture"); -/* @license - * Copyright 2023 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -class Iv extends Sn{constructor(){super(void 0,new Gi({depthWrite:!1})),this.height=0,this.radius=0,this.resolution=0,this.userData.noHit=!0}get map(){return this.material.map}set map(t){this.material.map=t}isUsable(){return this.height>0&&this.radius>0&&null!=this.geometry&&null!=this.map}updateGeometry(t=this.height,e=this.radius,i=128){t==this.height&&e==this.radius&&i==this.resolution||(this.height=t,this.radius=e,this.resolution=i,t>0&&e>0&&(this.geometry.dispose(),this.geometry=function(t,e,i){const n=new Mo(e,2*i,i);n.scale(1,1,-1);const r=n.getAttribute("position"),s=new _e;for(let e=0;e0&&--this.referenceCount,0===this.referenceCount}updatePosition(t){if(null==t)return;const e=kA(t)[0].terms;for(let t=0;t<3;++t)this.position.setComponent(t,JA(e[t]).number);this.updateMatrixWorld()}updateNormal(t){if(null==t)return;const e=kA(t)[0].terms;for(let t=0;t<3;++t)this.normal.setComponent(t,e[t].number)}updateSurface(t){if(!t&&this.initialized)return;const{mesh:e,tri:i,bary:n}=this;if(null==e||null==i||null==n)return;e.getVertexPosition(i.x,Mv),e.getVertexPosition(i.y,wv),e.getVertexPosition(i.z,bv),Mv.toArray(Tv.elements,0),wv.toArray(Tv.elements,3),bv.toArray(Tv.elements,6),this.position.copy(n).applyMatrix3(Tv);const r=this.parent;r.worldToLocal(e.localToWorld(this.position)),Bv.set(Mv,wv,bv),Bv.getNormal(this.normal).transformDirection(e.matrixWorld);const s=r.parent;Rv.setFromAxisAngle(Mv.set(0,1,0),-s.yaw),this.normal.applyQuaternion(Rv)}orient(t){this.pivot.style.transform=`rotate(${t}rad)`}updateVisibility(t){this.element.classList.toggle("hide",!t),this.slot.assignedNodes().forEach((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return;const i=e,n=i.dataset.visibilityAttribute;if(null!=n){const e=`data-${n}`;i.toggleAttribute(e,t)}i.dispatchEvent(new CustomEvent("hotspot-visibility",{detail:{visible:t}}))})),this.initialized=!0}}const Dv={name:"HorizontalBlurShader",uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float h;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 sum = vec4( 0.0 );\n\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}"},Uv={name:"VerticalBlurShader",uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float v;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 sum = vec4( 0.0 );\n\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n\t\t\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}"};function Pv(t,e,i){return(1-i)*t+i*e} -/* @license - * Copyright 2022 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Nv extends Ei{constructor(t,e,i){super(),this.camera=new nr,this.renderTarget=null,this.renderTargetBlur=null,this.depthMaterial=new pa,this.horizontalBlurMaterial=new Bn(Dv),this.verticalBlurMaterial=new Bn(Uv),this.intensity=0,this.softness=1,this.boundingBox=new xe,this.size=new _e,this.maxDimension=0,this.isAnimated=!1,this.needsUpdate=!1;const{camera:n}=this;n.rotation.x=Math.PI/2,n.left=-.5,n.right=.5,n.bottom=-.5,n.top=.5,this.add(n);const r=new qn,s=new Gi({opacity:1,transparent:!0,side:l});this.floor=new Sn(r,s),this.floor.userData.noHit=!0,n.add(this.floor),this.blurPlane=new Sn(r),this.blurPlane.visible=!1,n.add(this.blurPlane),t.target.add(this),this.depthMaterial.onBeforeCompile=function(t){t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );","gl_FragColor = vec4( vec3( 0.0 ), ( 1.0 - fragCoordZ ) * opacity );")},this.horizontalBlurMaterial.depthTest=!1,this.verticalBlurMaterial.depthTest=!1,this.setScene(t,e,i)}setScene(t,e,i){const{boundingBox:n,size:r,rotation:s,position:a}=this;if(this.isAnimated=t.animationNames.length>0,this.boundingBox.copy(t.boundingBox),this.size.copy(t.size),this.maxDimension=Math.max(r.x,r.y,r.z)*(this.isAnimated?2:1),this.boundingBox.getCenter(a),"back"===i){const{min:t,max:e}=n;[t.y,t.z]=[t.z,t.y],[e.y,e.z]=[e.z,e.y],[r.y,r.z]=[r.z,r.y],s.x=Math.PI/2,s.y=Math.PI}else s.x=0,s.y=0;if(this.isAnimated){const t=n.min.y,e=n.max.y;r.y=this.maxDimension,n.expandByVector(r.subScalar(this.maxDimension).multiplyScalar(-.5)),n.min.y=t,n.max.y=e,r.set(this.maxDimension,e-t,this.maxDimension)}"bottom"===i?a.y=n.min.y:a.z=n.min.y,this.setSoftness(e)}setSoftness(t){this.softness=t;const{size:e,camera:i}=this,n=this.isAnimated?2:1,r=n*Math.pow(2,9-3*t);this.setMapSize(r);const s=e.y/2,a=e.y*n;i.near=0,i.far=Pv(a,s,t),this.depthMaterial.opacity=1/t,i.updateProjectionMatrix(),this.setIntensity(this.intensity),this.setOffset(0)}setMapSize(t){const{size:e}=this;this.isAnimated&&(t*=2);const i=Math.floor(e.x>e.z?t:t*e.x/e.z),n=Math.floor(e.x>e.z?t*e.z/e.x:t),r=10+i,s=10+n;if(null==this.renderTarget||this.renderTarget.width===r&&this.renderTarget.height===s||(this.renderTarget.dispose(),this.renderTarget=null,this.renderTargetBlur.dispose(),this.renderTargetBlur=null),null==this.renderTarget){const t={format:z};this.renderTarget=new me(r,s,t),this.renderTargetBlur=new me(r,s,t),this.floor.material.map=this.renderTarget.texture}this.camera.scale.set(e.x*(1+10/i),e.z*(1+10/n),1),this.needsUpdate=!0}setIntensity(t){this.intensity=t,t>0?(this.visible=!0,this.floor.visible=!0,this.floor.material.opacity=t*Pv(.3,1,this.softness*this.softness)):(this.visible=!1,this.floor.visible=!1)}getIntensity(){return this.intensity}setOffset(t){this.floor.position.z=-t+this.gap()}gap(){return.001*this.maxDimension}render(t,e){e.overrideMaterial=this.depthMaterial;const i=t.getClearAlpha();t.setClearAlpha(0),this.floor.visible=!1;const n=t.xr.enabled;t.xr.enabled=!1;const r=t.getRenderTarget();t.setRenderTarget(this.renderTarget),t.render(e,this.camera),e.overrideMaterial=null,this.floor.visible=!0,this.blurShadow(t),t.xr.enabled=n,t.setRenderTarget(r),t.setClearAlpha(i)}blurShadow(t){const{camera:e,horizontalBlurMaterial:i,verticalBlurMaterial:n,renderTarget:r,renderTargetBlur:s,blurPlane:a}=this;a.visible=!0,a.material=i,i.uniforms.h.value=1/this.renderTarget.width,i.uniforms.tDiffuse.value=this.renderTarget.texture,t.setRenderTarget(s),t.render(a,e),a.material=n,n.uniforms.v.value=1/this.renderTarget.height,n.uniforms.tDiffuse.value=this.renderTargetBlur.texture,t.setRenderTarget(r),t.render(a,e),a.visible=!1}dispose(){null!=this.renderTarget&&this.renderTarget.dispose(),null!=this.renderTargetBlur&&this.renderTargetBlur.dispose(),this.depthMaterial.dispose(),this.horizontalBlurMaterial.dispose(),this.verticalBlurMaterial.dispose(),this.floor.material.dispose(),this.floor.geometry.dispose(),this.blurPlane.geometry.dispose(),this.removeFromParent()}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */const Fv=new _e,Qv=new _e,Ov=new _e,kv=new class{constructor(t,e,i=0,n=1/0){this.ray=new je(t,e),this.near=i,this.far=n,this.camera=null,this.layers=new ai,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: Unsupported camera type: "+e.type)}intersectObject(t,e=!0,i=[]){return Ul(t,this,i,e),i.sort(Dl),i}intersectObjects(t,e=!0,i=[]){for(let n=0,r=t.length;n{})){if(!t||t===this.url)return void e(1);if(this.reset(),this.url=t,null!=this.externalRenderer){const t=await this.externalRenderer.load(e);return this.boundingSphere.radius=t.framedRadius,void(this.idealAspect=t.fieldOfViewAspect)}let i;null!=this.cancelPendingSourceChange&&(this.cancelPendingSourceChange(),this.cancelPendingSourceChange=null);try{i=await new Promise((async(i,n)=>{this.cancelPendingSourceChange=()=>n();try{i(await this.element[U_].loader.load(t,this.element,e))}catch(t){n(t)}}))}catch(t){if(null==t)return;throw t}this.cancelPendingSourceChange=null,this.reset(),this.url=t,this._currentGLTF=i,null!=i&&(this._model=i.scene,this.target.add(i.scene));const{animations:n}=i,r=new Map,s=[];for(const t of n)r.set(t.name,t),s.push(t.name);this.animations=n,this.animationsByName=r,this.animationNames=s,await this.setupScene()}async setupScene(){this.applyTransform(),this.updateBoundingBox(),await this.updateFraming(),this.updateShadow(),this.setShadowIntensity(this.shadowIntensity),this.setGroundedSkybox()}reset(){this.url=null,this.renderCount=0,this.queueRender(),null!=this.shadow&&this.shadow.setIntensity(0),this.bakedShadows.clear();const{_model:t}=this;null!=t&&(t.removeFromParent(),this._model=null);const e=this._currentGLTF;null!=e&&(e.dispose(),this._currentGLTF=null),null!=this.currentAnimationAction&&(this.currentAnimationAction.stop(),this.currentAnimationAction=null),this.mixer.stopAllAction(),this.mixer.uncacheRoot(this)}dispose(){this.reset(),null!=this.shadow&&(this.shadow.dispose(),this.shadow=null),this.element[Ev]=null,this.element[yv]=null,this.element[xv]=null}get currentGLTF(){return this._currentGLTF}setSize(t,e){if(this.width!==t||this.height!==e){if(this.width=Math.max(t,1),this.height=Math.max(e,1),this.annotationRenderer.setSize(t,e),this.aspect=this.width/this.height,null!=this.externalRenderer){const i=Eh();this.externalRenderer.resize(t*i,e*i)}this.queueRender()}}markBakedShadow(t){t.userData.noHit=!0,this.bakedShadows.add(t)}unmarkBakedShadow(t){t.userData.noHit=!1,t.visible=!0,this.bakedShadows.delete(t),this.boundingBox.expandByObject(t)}findBakedShadows(t){const e=new xe;t.traverse((t=>{const i=t;if(!i.material)return;if(!i.material.transparent)return;e.setFromObject(i);const n=e.getSize(Gv),r=Math.min(n.x,n.y,n.z);Math.max(n.x,n.y,n.z)<100*r||this.markBakedShadow(i)}))}checkBakedShadows(){const{min:t,max:e}=this.boundingBox,i=new xe;this.boundingBox.getSize(this.size);for(const n of this.bakedShadows)i.setFromObject(n),i.min.y=e.x&&i.min.z<=t.z&&i.max.z>=e.z||i.min.z=e.x&&i.min.y<=t.y&&i.max.y>=e.y||this.unmarkBakedShadow(n)}applyTransform(){const{model:t}=this;if(null==t)return;const e=kA(this.element.orientation)[0].terms,i=JA(e[0]).number,n=JA(e[1]).number,r=JA(e[2]).number;t.quaternion.setFromEuler(new si(n,r,i,"YXZ"));const s=kA(this.element.scale)[0].terms;t.scale.set(s[0].number,s[1].number,s[2].number)}updateBoundingBox(){const{model:t}=this;if(null==t)return;this.target.remove(t),this.findBakedShadows(t);const e=(t,e)=>t.expandByPoint(e);this.setBakedShadowVisibility(!1),this.boundingBox=bd(t,e,new xe),this.boundingBox.isEmpty()&&(this.setBakedShadowVisibility(!0),this.bakedShadows.forEach((t=>this.unmarkBakedShadow(t))),this.boundingBox=bd(t,e,new xe)),this.checkBakedShadows(),this.setBakedShadowVisibility(),this.boundingBox.getSize(this.size),this.target.add(t)}async updateFraming(){const{model:t}=this;if(null==t)return;this.target.remove(t),this.setBakedShadowVisibility(!1);const{center:e}=this.boundingSphere;this.element.requestUpdate("cameraTarget"),await this.element.updateComplete,e.copy(this.getTarget());this.boundingSphere.radius=Math.sqrt(bd(t,((t,i)=>Math.max(t,e.distanceToSquared(i))),0));this.idealAspect=bd(t,((t,i)=>{i.sub(e);const n=Math.sqrt(i.x*i.x+i.z*i.z);return Math.max(t,n/(this.idealCameraDistance()-Math.abs(i.y)))}),0)/Math.tan(this.framedFoVDeg/2*Math.PI/180),this.setBakedShadowVisibility(),this.target.add(t)}setBakedShadowVisibility(t=this.shadowIntensity<=0){for(const e of this.bakedShadows)e.visible=t}idealCameraDistance(){const t=this.framedFoVDeg/2*Math.PI/180;return this.boundingSphere.radius/Math.sin(t)}adjustedFoV(t){const e=Math.tan(t/2*Math.PI/180)*Math.max(1,this.idealAspect/this.aspect);return 2*Math.atan(e)*180/Math.PI}getNDC(t,e){if(null!=this.xrCamera)Hv.set(t/window.screen.width,e/window.screen.height);else{const i=this.element.getBoundingClientRect();Hv.set((t-i.x)/this.width,(e-i.y)/this.height)}return Hv.multiplyScalar(2).subScalar(1),Hv.y*=-1,Hv}getSize(){return{width:this.width,height:this.height}}setEnvironmentAndSkybox(t,e){this.element[U_].arRenderer.presentedScene!==this&&(this.environment=t,this.setBackground(e),this.queueRender())}setBackground(t){this.groundedSkybox.map=t,this.groundedSkybox.isUsable()?(this.target.add(this.groundedSkybox),this.background=null):(this.target.remove(this.groundedSkybox),this.background=t)}farRadius(){return this.boundingSphere.radius*(null!=this.groundedSkybox.parent?10:1)}setGroundedSkybox(){const t=kA(this.element.skyboxHeight)[0].terms[0],e=JA(t).number,i=10*this.boundingSphere.radius;this.groundedSkybox.updateGeometry(e,i),this.groundedSkybox.position.y=e-(this.shadow?2*this.shadow.gap():0),this.setBackground(this.groundedSkybox.map)}setTarget(t,e,i){this.goalTarget.set(-t,-e,-i)}setTargetDamperDecayTime(t){this.targetDamperX.setDecayTime(t),this.targetDamperY.setDecayTime(t),this.targetDamperZ.setDecayTime(t)}getTarget(){return this.goalTarget.clone().multiplyScalar(-1)}jumpToGoal(){this.updateTarget(1e4)}updateTarget(t){const e=this.goalTarget,i=this.target.position;if(e.equals(i))return!1;{const n=this.boundingSphere.radius/10;let{x:r,y:s,z:a}=i;return r=this.targetDamperX.update(r,e.x,t,n),s=this.targetDamperY.update(s,e.y,t,n),a=this.targetDamperZ.update(a,e.z,t,n),this.target.position.set(r,s,a),this.target.updateMatrixWorld(),this.queueRender(),!0}}pointTowards(t,e){const{x:i,z:n}=this.position;this.yaw=Math.atan2(t-i,e-n)}get model(){return this._model}set yaw(t){this.rotation.y=t,this.queueRender()}get yaw(){return this.rotation.y}set animationTime(t){this.mixer.setTime(t),this.queueShadowRender()}get animationTime(){if(null!=this.currentAnimationAction){const t=Math.max(this.currentAnimationAction._loopCount,0);return this.currentAnimationAction.loop===ot&&1==(1&t)?this.duration-this.currentAnimationAction.time:this.currentAnimationAction.time}return 0}set animationTimeScale(t){this.mixer.timeScale=t}get animationTimeScale(){return this.mixer.timeScale}get duration(){return null!=this.currentAnimationAction&&this.currentAnimationAction.getClip()?this.currentAnimationAction.getClip().duration:0}get hasActiveAnimation(){return null!=this.currentAnimationAction}playAnimation(t=null,e=0,i=2201,n=1/0){if(null==this._currentGLTF)return;const{animations:r}=this;if(null==r||0===r.length)return;let s=null;if(null!=t&&(s=this.animationsByName.get(t),null==s)){const e=parseInt(t);!isNaN(e)&&e>=0&&e0&&this.animationTime==this.duration&&(this.animationTime=0)),r.setLoop(i,n),r.enabled=!0,r.clampWhenFinished=!0,r.play()}catch(t){console.error(t)}}stopAnimation(){this.currentAnimationAction=null,this.mixer.stopAllAction()}updateAnimation(t){this.mixer.update(t),this.queueShadowRender()}subscribeMixerEvent(t,e){this.mixer.addEventListener(t,e)}updateShadow(){const t=this.shadow;if(null!=t){const e="wall"===this.element.arPlacement?"back":"bottom";t.setScene(this,this.shadowSoftness,e),t.needsUpdate=!0}}renderShadow(t){const e=this.shadow;null!=e&&1==e.needsUpdate&&(e.render(t,this),e.needsUpdate=!1)}queueShadowRender(){null!=this.shadow&&(this.shadow.needsUpdate=!0)}setShadowIntensity(t){if(this.shadowIntensity=t,null!=this._currentGLTF&&(this.setBakedShadowVisibility(),!(t<=0&&null==this.shadow))){if(null==this.shadow){const t="wall"===this.element.arPlacement?"back":"bottom";this.shadow=new Nv(this,this.shadowSoftness,t)}this.shadow.setIntensity(t)}}setShadowSoftness(t){this.shadowSoftness=t;const e=this.shadow;null!=e&&e.setSoftness(t)}setShadowOffset(t){const e=this.shadow;null!=e&&e.setOffset(t)}hitFromPoint(t,e=this){kv.setFromCamera(t,this.getCamera());return kv.intersectObject(e,!0).find((t=>t.object.visible&&!t.object.userData.noHit))}positionAndNormalFromPoint(t,e=this){var i;const n=this.hitFromPoint(t,e);if(null==n)return null;return{position:n.point,normal:null!=n.face?n.face.normal.clone().applyNormalMatrix((new qt).getNormalMatrix(n.object.matrixWorld)):kv.ray.direction.clone().multiplyScalar(-1),uv:null!==(i=n.uv)&&void 0!==i?i:null}}surfaceFromPoint(t,e=this){const i=this.element.model;if(null==i)return null;const n=this.hitFromPoint(t,e);if(null==n||null==n.face)return null;const r=i[uv](n),{meshes:s,primitives:a}=r.mesh.userData.associations,o=new _e,l=new _e,c=new _e,{a:h,b:u,c:d}=n.face,A=n.object;A.getVertexPosition(h,o),A.getVertexPosition(u,l),A.getVertexPosition(d,c);const p=new Li(o,l,c),m=new _e;return p.getBarycoord(A.worldToLocal(n.point),m),`${s} ${a} ${h} ${u} ${d} ${m.x.toFixed(3)} ${m.y.toFixed(3)} ${m.z.toFixed(3)}`}addHotspot(t){this.target.add(t),this.annotationRenderer.domElement.appendChild(t.element)}removeHotspot(t){this.target.remove(t)}forHotspots(t){const{children:e}=this.target;for(let i=0,n=e.length;i=r||n.y>=r||n.z>=r)return void console.warn(t.surface+" vertex indices out of range in this glTF! Skipping this hotspot.");const s=new _e(e[5].number,e[6].number,e[7].number);t.mesh=i.mesh,t.tri=n,t.bary=s}}updateSurfaceHotspots(){const t=!this.element.paused;this.forHotspots((e=>{this.initializeSurface(e),e.updateSurface(t)}))}updateHotspotsVisibility(t){this.forHotspots((e=>{Fv.copy(t),Qv.setFromMatrixPosition(e.matrixWorld),Fv.sub(Qv),Ov.copy(e.normal).transformDirection(this.target.matrixWorld),Fv.dot(Ov)<0?e.hide():e.show()}))}orientHotspots(t){this.forHotspots((e=>{e.orient(t)}))}setHotspotsVisibility(t){this.forHotspots((e=>{e.visible=t}))}updateSchema(t){var e;const{schemaElement:i,element:n}=this,{alt:r,poster:s,iosSrc:a}=n;if(null!=t){const n=[{"@type":"MediaObject",contentUrl:t,encodingFormat:"gltf"===(null===(e=t.split(".").pop())||void 0===e?void 0:e.toLowerCase())?"model/gltf+json":"model/gltf-binary"}];a&&n.push({"@type":"MediaObject",contentUrl:a,encodingFormat:"model/vnd.usdz+zip"});const o={"@context":"http://schema.org/","@type":"3DModel",image:null!=s?s:void 0,name:null!=r?r:void 0,encoding:n};i.textContent=JSON.stringify(o),document.head.appendChild(i)}else null!=i.parentElement&&i.parentElement.removeChild(i)}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */class Vv extends EventTarget{constructor(){super(...arguments),this.ongoingActivities=new Set,this.totalProgress=0}get ongoingActivityCount(){return this.ongoingActivities.size}beginActivity(t){const e={progress:0,completed:!1};return this.ongoingActivities.add(e),1===this.ongoingActivityCount&&this.announceTotalProgress(e,0,t),i=>{let n;return n=Math.max(_h(i,0,1),e.progress),n!==e.progress&&this.announceTotalProgress(e,n,t),e.progress}}announceTotalProgress(t,e,i){let n=0,r=0;1==e&&(t.completed=!0);for(const t of this.ongoingActivities){const{progress:e}=t;n+=1-e,t.completed&&r++}const s=t.progress;t.progress=e,this.totalProgress+=(e-s)*(1-this.totalProgress)/n;const a=r===this.ongoingActivityCount?1:this.totalProgress;this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:a,reason:i}})),r===this.ongoingActivityCount&&(this.totalProgress=0,this.ongoingActivities.clear())}} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */var Wv,qv,Xv,jv,Yv,Kv,Jv,$v,Zv,t_,e_,i_,n_,r_=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const s_=document.createElement("canvas"),a_=Symbol("fallbackResizeHandler"),o_=Symbol("defaultAriaLabel"),l_=Symbol("resizeObserver"),c_=Symbol("clearModelTimeout"),h_=Symbol("onContextLost"),u_=Symbol("loaded"),d_=Symbol("status"),A_=Symbol("onFocus"),p_=Symbol("onBlur"),m_=Symbol("updateSize"),g_=Symbol("intersectionObserver"),f_=Symbol("isElementInViewport"),v_=Symbol("announceModelVisibility"),__=Symbol("ariaLabel"),E_=Symbol("altDefaulted"),y_=Symbol("statusElement"),x_=Symbol("updateStatus"),S_=Symbol("loadedTime"),C_=Symbol("updateSource"),I_=Symbol("markLoaded"),M_=Symbol("container"),w_=Symbol("input"),b_=Symbol("canvas"),T_=Symbol("scene"),B_=Symbol("needsRender"),R_=Symbol("tick"),L_=Symbol("onModelLoad"),D_=Symbol("onResize"),U_=Symbol("renderer"),P_=Symbol("progressTracker"),N_=Symbol("getLoaded"),F_=Symbol("getModelIsVisible"),Q_=Symbol("shouldAttemptPreload"),O_=t=>({x:t.x,y:t.y,z:t.z,toString(){return`${this.x}m ${this.y}m ${this.z}m`}}),k_=t=>({u:t.x,v:t.y,toString(){return`${this.u} ${this.v}`}});class G_ extends $c{constructor(){super(),this.alt=null,this.src=null,this.withCredentials=!1,this.generateSchema=!1,this[Wv]=!1,this[qv]=!1,this[Xv]=0,this[jv]="",this[Yv]=null,this[Kv]=vh((()=>{const t=this.getBoundingClientRect();this[m_](t)}),50),this[Jv]=vh((t=>{const e=this.modelIsVisible;e!==t&&this.dispatchEvent(new CustomEvent("model-visibility",{detail:{visible:e}}))}),0),this[$v]=null,this[Zv]=null,this[t_]=new Vv,this[e_]=()=>{this[y_].textContent=this[d_]},this[i_]=()=>{this[y_].textContent=""},this[n_]=t=>{this.dispatchEvent(new CustomEvent("error",{detail:{type:"webglcontextlost",sourceError:t.sourceEvent}}))},this.attachShadow({mode:"open"});const t=this.shadowRoot;let e,i;if((t=>{Nc(wh,t)})(t),this[M_]=t.querySelector(".container"),this[w_]=t.querySelector(".userInput"),this[b_]=t.querySelector("canvas"),this[y_]=t.querySelector("#status"),this[o_]=this[w_].getAttribute("aria-label"),this.isConnected){const t=this.getBoundingClientRect();e=t.width,i=t.height}else e=300,i=150;this[T_]=new zv({canvas:this[b_],element:this,width:e,height:i}),Promise.resolve().then((()=>{this[m_](this.getBoundingClientRect())})),sh&&(this[l_]=new ResizeObserver((t=>{if(!this[U_].isPresenting)for(let e of t)e.target===this&&this[m_](e.contentRect)}))),ah?this[g_]=new IntersectionObserver((t=>{for(let e of t)if(e.target===this){const t=this.modelIsVisible;this[f_]=e.isIntersecting,this[v_](t),this[f_]&&!this.loaded&&this[C_]()}}),{root:null,rootMargin:"0px",threshold:1e-5}):this[f_]=!0}static get is(){return"model-viewer"}static set modelCacheSize(t){Ed[vd].evictionThreshold=t}static get modelCacheSize(){return Ed[vd].evictionThreshold}static set minimumRenderScale(t){t>1&&console.warn(" minimumRenderScale has been clamped to a maximum value of 1."),t<=0&&console.warn(" minimumRenderScale has been clamped to a minimum value of 0.25."),Ng.singleton.minScale=t}static get minimumRenderScale(){return Ng.singleton.minScale}get loaded(){return this[N_]()}get[(Wv=f_,qv=u_,Xv=S_,jv=d_,Yv=c_,Kv=a_,Jv=v_,$v=l_,Zv=g_,t_=P_,U_)](){return Ng.singleton}get modelIsVisible(){return this[F_]()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),sh?this[l_].observe(this):self.addEventListener("resize",this[a_]),ah&&this[g_].observe(this),this.addEventListener("focus",this[A_]),this.addEventListener("blur",this[p_]);const t=this[U_];t.addEventListener("contextlost",this[h_]),t.registerScene(this[T_]),null!=this[c_]&&(self.clearTimeout(this[c_]),this[c_]=null,this.requestUpdate("src",null))}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),sh?this[l_].unobserve(this):self.removeEventListener("resize",this[a_]),ah&&this[g_].unobserve(this),this.removeEventListener("focus",this[A_]),this.removeEventListener("blur",this[p_]);const t=this[U_];t.removeEventListener("contextlost",this[h_]),t.unregisterScene(this[T_]),this[c_]=self.setTimeout((()=>{this[T_].dispose(),this[c_]=null}),10)}updated(t){super.updated(t),t.has("src")&&(null==this.src?(this[u_]=!1,this[S_]=0,this[T_].reset()):this.src!==this[T_].url&&(this[u_]=!1,this[S_]=0,this[C_]())),t.has("alt")&&this[w_].setAttribute("aria-label",this[__]),t.has("withCredentials")&&(Ed.withCredentials=this.withCredentials,this[U_].textureUtils.withCredentials=this.withCredentials),t.has("generateSchema")&&(this.generateSchema?this[T_].updateSchema(this.src):this[T_].updateSchema(null))}toDataURL(t,e){return this[U_].displayCanvas(this[T_]).toDataURL(t,e)}async toBlob(t){const e=t?t.mimeType:void 0,i=t?t.qualityArgument:void 0,n=t?t.idealAspect:void 0,{width:r,height:s,idealAspect:a,aspect:o}=this[T_],{dpr:l,scaleFactor:c}=this[U_];let h=r*c*l,u=s*c*l,d=0,A=0;if(!0===n)if(a>o){const t=u;u=Math.round(h/a),A=(t-u)/2}else{const t=h;h=Math.round(u*a),d=(t-h)/2}s_.width=h,s_.height=u;try{return new Promise((async(t,n)=>{s_.getContext("2d").drawImage(this[U_].displayCanvas(this[T_]),d,A,h,u,0,0,h,u),s_.toBlob((e=>{if(!e)return n(new Error("Unable to retrieve canvas blob"));t(e)}),e,i)}))}finally{this[m_]({width:r,height:s})}}registerEffectComposer(t){t.setRenderer(this[U_].threeRenderer),t.setMainCamera(this[T_].getCamera()),t.setMainScene(this[T_]),this[T_].effectRenderer=t}unregisterEffectComposer(){this[T_].effectRenderer=null}registerRenderer(t){this[T_].externalRenderer=t}unregisterRenderer(){this[T_].externalRenderer=null}get[__](){return this[E_]}get[E_](){return null==this.alt||"null"===this.alt?this[o_]:this.alt}[N_](){return this[u_]}[F_](){return this.loaded&&this[f_]}[Q_](){return!!this.src&&this[f_]}[m_]({width:t,height:e}){0!==t&&0!==e&&(this[M_].style.width=`${t}px`,this[M_].style.height=`${e}px`,this[D_]({width:t,height:e}))}[R_](t,e){var i;null===(i=this[T_].effectRenderer)||void 0===i||i.beforeRender(t,e)}[I_](){this[u_]||(this[u_]=!0,this[S_]=performance.now())}[B_](){this[T_].queueRender()}[L_](){}[x_](t){this[d_]=t;const e=this.getRootNode();null!=e&&e.activeElement===this&&this[y_].textContent!=t&&(this[y_].textContent=t)}[(e_=A_,i_=p_,D_)](t){this[T_].setSize(t.width,t.height)}async[(n_=h_,C_)](){const t=this[T_];if(this.loaded||!this[Q_]()||this.src===t.url)return;this.generateSchema&&t.updateSchema(this.src),this[x_]("Loading"),t.stopAnimation();const e=this[P_].beginActivity("model-load"),i=this.src;try{const n=t.setSource(i,(t=>e(.95*_h(t,0,1)))),r=this[Ih]();await Promise.all([n,r]),this[I_](),this[L_](),this.updateComplete.then((()=>{this.dispatchEvent(new CustomEvent("before-render"))})),await new Promise((t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("load",{detail:{url:i}})),t()}))}))}))}catch(t){this.dispatchEvent(new CustomEvent("error",{detail:{type:"loadfailure",sourceError:t}}))}finally{e(1)}}}r_([e({type:String})],G_.prototype,"alt",void 0),r_([e({type:String})],G_.prototype,"src",void 0),r_([e({type:Boolean,attribute:"with-credentials"})],G_.prototype,"withCredentials",void 0),r_([e({type:Boolean,attribute:"generate-schema"})],G_.prototype,"generateSchema",void 0); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var H_=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const z_=Symbol("changeAnimation"),V_=Symbol("paused"),W_={repetitions:1/0,pingpong:!1},q_=Symbol("hotspotMap"),X_=Symbol("mutationCallback"),j_=Symbol("observer"),Y_=Symbol("addHotspot"),K_=Symbol("removeHotspot"),J_=new Ye; -/*! -fflate - fast JavaScript compression/decompression - -Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE -version 0.6.9 -*/ -var $_=function(t){return URL.createObjectURL(new Blob([t],{type:"text/javascript"}))};try{URL.revokeObjectURL($_(""))}catch(Vc){$_=function(t){return"data:application/javascript;charset=UTF-8,"+encodeURI(t)}}var Z_=Uint8Array,tE=Uint16Array,eE=Uint32Array,iE=new Z_([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),nE=new Z_([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),rE=new Z_([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),sE=function(t,e){for(var i=new tE(31),n=0;n<31;++n)i[n]=e+=1<>>1|(21845&uE)<<1;dE=(61680&(dE=(52428&dE)>>>2|(13107&dE)<<2))>>>4|(3855&dE)<<4,hE[uE]=((65280&dE)>>>8|(255&dE)<<8)>>>1}var AE=function(t,e,i){for(var n=t.length,r=0,s=new tE(e);r>>l]=c}else for(a=new tE(n),r=0;r>>15-t[r]);return a},pE=new Z_(288);for(uE=0;uE<144;++uE)pE[uE]=8;for(uE=144;uE<256;++uE)pE[uE]=9;for(uE=256;uE<280;++uE)pE[uE]=7;for(uE=280;uE<288;++uE)pE[uE]=8;var mE=new Z_(32);for(uE=0;uE<32;++uE)mE[uE]=5;var gE=AE(pE,9,0),fE=AE(mE,5,0),vE=function(t){return(t/8|0)+(7&t&&1)},_E=function(t,e,i){(null==e||e<0)&&(e=0),(null==i||i>t.length)&&(i=t.length);var n=new(t instanceof tE?tE:t instanceof eE?eE:Z_)(i-e);return n.set(t.subarray(e,i)),n},EE=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>>8},yE=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>>8,t[n+2]|=i>>>16},xE=function(t,e){for(var i=[],n=0;nd&&(d=s[n].s);var A=new tE(d+1),p=SE(i[h-1],A,0);if(p>e){n=0;var m=0,g=p-e,f=1<e))break;m+=f-(1<>>=g;m>0;){var _=s[n].s;A[_]=0&&m;--n){var E=s[n].s;A[E]==e&&(--A[E],++m)}p=e}return[new Z_(A),p]},SE=function(t,e,i){return-1==t.s?Math.max(SE(t.l,e,i+1),SE(t.r,e,i+1)):e[t.s]=i},CE=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new tE(++e),n=0,r=t[0],s=1,a=function(t){i[n++]=t},o=1;o<=e;++o)if(t[o]==r&&o!=e)++s;else{if(!r&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(r),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(r);s=1,r=t[o]}return[i.subarray(0,n),e]},IE=function(t,e){for(var i=0,n=0;n>>8,t[r+2]=255^t[r],t[r+3]=255^t[r+1];for(var s=0;s4&&!M[rE[b-1]];--b);var T,B,R,L,D=c+5<<3,U=IE(r,pE)+IE(s,mE)+a,P=IE(r,d)+IE(s,m)+a+14+3*b+IE(S,M)+(2*S[16]+3*S[17]+7*S[18]);if(D<=U&&D<=P)return ME(e,h,t.subarray(l,l+c));if(EE(e,h,1+(P15&&(EE(e,h,O[C]>>>5&127),h+=O[C]>>>12)}}}else T=gE,B=pE,R=fE,L=mE;for(C=0;C255){k=n[C]>>>18&31;yE(e,h,T[k+257]),h+=B[k+257],k>7&&(EE(e,h,n[C]>>>23&31),h+=iE[k]);var G=31&n[C];yE(e,h,R[G]),h+=L[G],G>3&&(yE(e,h,n[C]>>>5&8191),h+=nE[G])}else yE(e,h,T[n[C]]),h+=B[n[C]];return yE(e,h,T[256]),h+B[256]},bE=new eE([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),TE=new Z_(0),BE=function(){for(var t=new eE(256),e=0;e<256;++e){for(var i=e,n=9;--n;)i=(1&i&&3988292384)^i>>>1;t[e]=i}return t}(),RE=function(){var t=-1;return{p:function(e){for(var i=t,n=0;n>>8;t=i},d:function(){return~t}}},LE=function(t,e,i,n,r){return function(t,e,i,n,r,s){var a=t.length,o=new Z_(n+a+5*(1+Math.ceil(a/7e3))+r),l=o.subarray(n,o.length-r),c=0;if(!e||a<8)for(var h=0;h<=a;h+=65535){var u=h+65535;u>>13,p=8191&d,m=(1<7e3||M>24576)&&L>423){c=wE(t,l,0,y,x,S,I,M,b,h-b,c),M=C=I=0,b=h;for(var D=0;D<286;++D)x[D]=0;for(D=0;D<30;++D)S[D]=0}var U=2,P=0,N=p,F=B-R&32767;if(L>2&&T==E(h-F))for(var Q=Math.min(A,L)-1,O=Math.min(32767,h),k=Math.min(258,L);F<=O&&--N&&B!=R;){if(t[h+U]==t[h+U-F]){for(var G=0;GU){if(U=G,P=F,G>Q)break;var H=Math.min(F,G-2),z=0;for(D=0;Dz&&(z=W,R=V)}}}F+=(B=R)-(R=g[B])+32768&32767}if(P){y[M++]=268435456|lE[U]<<18|cE[P];var q=31&lE[U],X=31&cE[P];I+=iE[q]+nE[X],++x[257+q],++S[X],w=h+U,++C}else y[M++]=t[h],++x[t[h]]}}c=wE(t,l,s,y,x,S,I,M,b,h-b,c),!s&&7&c&&(c=ME(l,c+1,TE))}return _E(o,0,n+vE(c)+r)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,i,n,!r)},DE=function(t,e){var i={};for(var n in t)i[n]=t[n];for(var n in e)i[n]=e[n];return i},UE=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8};function PE(t,e){return LE(t,e||{},0,0)}var NE=function(t,e,i,n){for(var r in t){var s=t[r],a=e+r;s instanceof Z_?i[a]=[s,n]:Array.isArray(s)?i[a]=[s[0],DE(n,s[1])]:NE(s,a+"/",i,n)}},FE="undefined"!=typeof TextEncoder&&new TextEncoder,QE="undefined"!=typeof TextDecoder&&new TextDecoder;try{QE.decode(TE,{stream:!0}),1}catch(Vc){}function OE(t,e){if(e){for(var i=new Z_(t.length),n=0;n>1)),a=0,o=function(t){s[a++]=t};for(n=0;ns.length){var l=new Z_(a+8+(r-n<<1));l.set(s),s=l}var c=t.charCodeAt(n);c<128||e?o(c):c<2048?(o(192|c>>6),o(128|63&c)):c>55295&&c<57344?(o(240|(c=65536+(1047552&c)|1023&t.charCodeAt(++n))>>18),o(128|c>>12&63),o(128|c>>6&63),o(128|63&c)):(o(224|c>>12),o(128|c>>6&63),o(128|63&c))}return _E(s,0,a)}var kE=function(t){var e=0;if(t)for(var i in t){var n=t[i].length;if(n>65535)throw"extra field too long";e+=n+4}return e},GE=function(t,e,i,n,r,s,a,o){var l=n.length,c=i.extra,h=o&&o.length,u=kE(c);UE(t,e,null!=a?33639248:67324752),e+=4,null!=a&&(t[e++]=20,t[e++]=i.os),t[e]=20,e+=2,t[e++]=i.flag<<1|(null==s&&8),t[e++]=r&&8,t[e++]=255&i.compression,t[e++]=i.compression>>8;var d=new Date(null==i.mtime?Date.now():i.mtime),A=d.getFullYear()-1980;if(A<0||A>119)throw"date not in range 1980-2099";if(UE(t,e,A<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),e+=4,null!=s&&(UE(t,e,i.crc),UE(t,e+4,s),UE(t,e+8,i.size)),UE(t,e+12,l),UE(t,e+14,u),e+=16,null!=a&&(UE(t,e,h),UE(t,e+6,i.attrs),UE(t,e+10,a),e+=14),t.set(n,e),e+=l,u)for(var p in c){var m=c[p],g=m.length;UE(t,e,+p),UE(t,e+2,g),t.set(m,e+4),e+=4+g}return h&&(t.set(o,e),e+=h),e};function HE(t,e){e||(e={});var i={},n=[];NE(t,"",i,e);var r=0,s=0;for(var a in i){var o=i[a],l=o[0],c=o[1],h=0==c.level?0:8,u=(S=OE(a)).length,d=c.comment,A=d&&OE(d),p=A&&A.length,m=kE(c.extra);if(u>65535)throw"filename too long";var g=h?PE(l,c):l,f=g.length,v=RE();v.p(l),n.push(DE(c,{size:l.length,crc:v.d(),c:g,f:S,m:A,u:u!=a.length||A&&d.length!=p,o:r,compression:h})),r+=30+u+m+f,s+=76+2*(u+m)+(p||0)+f}for(var _=new Z_(s+22),E=r,y=s-r,x=0;x{if(t.isMesh){const e=t.geometry,n=t.material;if(n.isMeshStandardMaterial){const a="geometries/Geometry_"+e.id+".usda";if(!(a in i)){const t=function(t){const e=function(t){const e="Geometry",i=t.attributes,n=i.position.count;return`\n\tdef Mesh "${e}"\n\t{\n\t\tint[] faceVertexCounts = [${function(t){const e=null!==t.index?t.index.count:t.attributes.position.count;return Array(e/3).fill(3).join(", ")}(t)}]\n\t\tint[] faceVertexIndices = [${function(t){const e=t.index,i=[];if(null!==e)for(let t=0;t0?i:"",r=t["uv"+n];void 0!==r&&(e+=`\n\t\ttexCoord2f[] primvars:st${n} = [${KE(r)}] (\n\t\t\tinterpolation = "vertex"\n\t\t)`)}return e}(i)}\n\t\tuniform token subdivisionScheme = "none"\n\t}\n`}(t);return`\ndef "Geometry"\n{\n${e}\n}\n`}(e);i[a]=function(t){let e=qE();return e+=t,OE(e)}(t)}n.uuid in s||(s[n.uuid]=n),r+=function(t,e,i){const n="Object_"+t.id,r=XE(t.matrixWorld);t.matrixWorld.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",t);return`def Xform "${n}" (\n\tprepend references = @./geometries/Geometry_${e.id}.usda@\n\tprepend apiSchemas = ["MaterialBindingAPI"]\n)\n{\n\tmatrix4d xformOp:transform = ${r}\n\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\trel material:binding = \n}\n\n`}(t,e,n)}else console.warn("THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)",t)}else t.isCamera&&(r+=function(t){const e=t.name?t.name:"Camera_"+t.id,i=XE(t.matrixWorld);t.matrixWorld.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",t);return t.isOrthographicCamera?`def Camera "${e}"\n\t\t{\n\t\t\tmatrix4d xformOp:transform = ${i}\n\t\t\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\t\t\tfloat2 clippingRange = (${t.near.toPrecision(WE)}, ${t.far.toPrecision(WE)})\n\t\t\tfloat horizontalAperture = ${(10*(Math.abs(t.left)+Math.abs(t.right))).toPrecision(WE)}\n\t\t\tfloat verticalAperture = ${(10*(Math.abs(t.top)+Math.abs(t.bottom))).toPrecision(WE)}\n\t\t\ttoken projection = "orthographic"\n\t\t}\n\t\n\t`:`def Camera "${e}"\n\t\t{\n\t\t\tmatrix4d xformOp:transform = ${i}\n\t\t\tuniform token[] xformOpOrder = ["xformOp:transform"]\n\n\t\t\tfloat2 clippingRange = (${t.near.toPrecision(WE)}, ${t.far.toPrecision(WE)})\n\t\t\tfloat focalLength = ${t.getFocalLength().toPrecision(WE)}\n\t\t\tfloat focusDistance = ${t.focus.toPrecision(WE)}\n\t\t\tfloat horizontalAperture = ${t.getFilmWidth().toPrecision(WE)}\n\t\t\ttoken projection = "perspective"\n\t\t\tfloat verticalAperture = ${t.getFilmHeight().toPrecision(WE)}\n\t\t}\n\t\n\t`} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */(t))})),r+="\n\t\t}\n\t}\n}\n\n",r+=function(t,e,i=!1){const n=[];for(const r in t){const s=t[r];n.push(JE(s,e,i))}return`def "Materials"\n{\n${n.join("")}\n}\n\n`}(s,a,e.quickLookCompatible),i[n]=OE(r),r=null;for(const t in a){let e=a[t];!0===e.isCompressedTexture&&(e=Dd(e));const n=VE(e.image,e.flipY),r=await new Promise((t=>n.toBlob(t,"image/png",1)));i[`textures/Texture_${t}.png`]=new Uint8Array(await r.arrayBuffer())}let o=0;for(const t in i){const e=i[t];o+=34+t.length;const n=63&o;if(4!==n){const r=new Uint8Array(64-n);i[t]=[e,{extra:{12345:r}}]}o=e.length}return HE(i,{level:0})}}function VE(t,e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=1024/Math.max(t.width,t.height),n=document.createElement("canvas");n.width=t.width*Math.min(1,i),n.height=t.height*Math.min(1,i);const r=n.getContext("2d");return!0===e&&(r.translate(0,n.height),r.scale(1,-1)),r.drawImage(t,0,0,n.width,n.height),n}throw new Error("THREE.USDZExporter: No valid image data found. Unable to process texture.")}const WE=7;function qE(){return'#usda 1.0\n(\n\tcustomLayerData = {\n\t\tstring creator = "Three.js USDZExporter"\n\t}\n\tdefaultPrim = "Root"\n\tmetersPerUnit = 1\n\tupAxis = "Y"\n)\n\n'}function XE(t){const e=t.elements;return`( ${jE(e,0)}, ${jE(e,4)}, ${jE(e,8)}, ${jE(e,12)} )`}function jE(t,e){return`(${t[e+0]}, ${t[e+1]}, ${t[e+2]}, ${t[e+3]})`}function YE(t,e){if(void 0===t)return console.warn("USDZExporter: Normals missing."),Array(e).fill("(0, 0, 0)").join(", ");const i=[];for(let e=0;e0?"st"+n.channel:"st",l={1e3:"repeat",1001:"clamp",1002:"mirror"},c=n.repeat.clone(),h=n.offset.clone(),u=n.rotation,d=Math.sin(u),A=Math.cos(u);return h.y=1-h.y-c.y,i?(h.x=h.x/c.x,h.y=h.y/c.y,h.x+=d/c.x,h.y+=A-1):(h.x+=d*c.x,h.y+=(1-A)*c.y),`\n\t\tdef Shader "PrimvarReader_${r}"\n\t\t{\n\t\t\tuniform token info:id = "UsdPrimvarReader_float2"\n\t\t\tfloat2 inputs:fallback = (0.0, 0.0)\n\t\t\ttoken inputs:varname = "${o}"\n\t\t\tfloat2 outputs:result\n\t\t}\n\n\t\tdef Shader "Transform2d_${r}"\n\t\t{\n\t\t\tuniform token info:id = "UsdTransform2d"\n\t\t\ttoken inputs:in.connect = \n\t\t\tfloat inputs:rotation = ${(u*(180/Math.PI)).toFixed(WE)}\n\t\t\tfloat2 inputs:scale = ${ZE(c)}\n\t\t\tfloat2 inputs:translation = ${ZE(h)}\n\t\t\tfloat2 outputs:result\n\t\t}\n\n\t\tdef Shader "Texture_${n.id}_${r}"\n\t\t{\n\t\t\tuniform token info:id = "UsdUVTexture"\n\t\t\tasset inputs:file = @textures/Texture_${a}.png@\n\t\t\tfloat2 inputs:st.connect = \n\t\t\t${void 0!==s?"float4 inputs:scale = "+function(t){return`(${t.r}, ${t.g}, ${t.b}, 1.0)`}(s):""}\n\t\t\ttoken inputs:sourceColorSpace = "${n.colorSpace===gt?"raw":"sRGB"}"\n\t\t\ttoken inputs:wrapS = "${l[n.wrapS]}"\n\t\t\ttoken inputs:wrapT = "${l[n.wrapT]}"\n\t\t\tfloat outputs:r\n\t\t\tfloat outputs:g\n\t\t\tfloat outputs:b\n\t\t\tfloat3 outputs:rgb\n\t\t\t${t.transparent||t.alphaTest>0?"float outputs:a":""}\n\t\t}`}return t.side===c&&console.warn("THREE.USDZExporter: USDZ does not support double sided materials",t),null!==t.map?(r.push(`${n}color3f inputs:diffuseColor.connect = `),t.transparent?r.push(`${n}float inputs:opacity.connect = `):t.alphaTest>0&&(r.push(`${n}float inputs:opacity.connect = `),r.push(`${n}float inputs:opacityThreshold = ${t.alphaTest}`)),s.push(a(t.map,"diffuse",t.color))):r.push(`${n}color3f inputs:diffuseColor = ${$E(t.color)}`),null!==t.emissiveMap?(r.push(`${n}color3f inputs:emissiveColor.connect = `),s.push(a(t.emissiveMap,"emissive"))):t.emissive.getHex()>0&&r.push(`${n}color3f inputs:emissiveColor = ${$E(t.emissive)}`),null!==t.normalMap&&(r.push(`${n}normal3f inputs:normal.connect = `),s.push(a(t.normalMap,"normal"))),null!==t.aoMap&&(r.push(`${n}float inputs:occlusion.connect = `),s.push(a(t.aoMap,"occlusion"))),null!==t.roughnessMap&&1===t.roughness?(r.push(`${n}float inputs:roughness.connect = `),s.push(a(t.roughnessMap,"roughness"))):r.push(`${n}float inputs:roughness = ${t.roughness}`),null!==t.metalnessMap&&1===t.metalness?(r.push(`${n}float inputs:metallic.connect = `),s.push(a(t.metalnessMap,"metallic"))):r.push(`${n}float inputs:metallic = ${t.metalness}`),null!==t.alphaMap?(r.push(`${n}float inputs:opacity.connect = `),r.push(`${n}float inputs:opacityThreshold = 0.0001`),s.push(a(t.alphaMap,"opacity"))):r.push(`${n}float inputs:opacity = ${t.opacity}`),t.isMeshPhysicalMaterial&&(r.push(`${n}float inputs:clearcoat = ${t.clearcoat}`),r.push(`${n}float inputs:clearcoatRoughness = ${t.clearcoatRoughness}`),r.push(`${n}float inputs:ior = ${t.ior}`)),`\n\tdef Material "Material_${t.id}"\n\t{\n\t\tdef Shader "PreviewSurface"\n\t\t{\n\t\t\tuniform token info:id = "UsdPreviewSurface"\n${r.join("\n")}\n\t\t\tint inputs:useSpecularWorkflow = 0\n\t\t\ttoken outputs:surface\n\t\t}\n\n\t\ttoken outputs:surface.connect = \n\n${s.join("\n")}\n\n\t}\n`}function $E(t){return`(${t.r}, ${t.g}, ${t.b})`}function ZE(t){return`(${t.x}, ${t.y})`} -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var ty=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};let ey=!1,iy=!1;const ny="#model-viewer-no-ar-fallback",ry=(sy=["quick-look","scene-viewer","webxr","none"],t=>{try{const e=kA(t),i=(e.length?e[0].terms:[]).filter((t=>t&&"ident"===t.type)).map((t=>t.value)).filter((t=>sy.indexOf(t)>-1));return new Set(i)}catch(t){}return new Set});var sy;const ay="quick-look",oy="scene-viewer",ly="webxr",cy="none",hy=Symbol("arButtonContainer"),uy=Symbol("enterARWithWebXR"),dy=Symbol("openSceneViewer"),Ay=Symbol("openIOSARQuickLook"),py=Symbol("canActivateAR"),my=Symbol("arMode"),gy=Symbol("arModes"),fy=Symbol("arAnchor"),vy=Symbol("preload"),_y=Symbol("onARButtonContainerClick"),Ey=Symbol("onARStatus"),yy=Symbol("onARTracking"),xy=Symbol("onARTap"),Sy=Symbol("selectARMode"),Cy=Symbol("triggerLoad"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Iy=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const My="auto",wy="auto",by="eager",Ty=Symbol("defaultProgressBarElement"),By=Symbol("posterContainerElement"),Ry=Symbol("defaultPosterElement"),Ly=Symbol("shouldDismissPoster"),Dy=Symbol("hidePoster"),Uy=Symbol("modelIsRevealed"),Py=Symbol("updateProgressBar"),Ny=Symbol("ariaLabelCallToAction"),Fy=Symbol("onProgress"); -/* @license - * Copyright 2019 Google LLC. All Rights Reserved. - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -var Qy=function(t,e,i,n){for(var r,s=arguments.length,a=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n,o=t.length-1;o>=0;o--)(r=t[o])&&(a=(s<3?r(a):s>3?r(e,i,a):r(e,i))||a);return s>3&&a&&Object.defineProperty(e,i,a),a};const Oy=Math.PI/32,ky={basis:[YA(OA(Oy,"rad"))],keywords:{auto:[null]}},Gy=Symbol("autoRotateStartTime"),Hy=Symbol("radiansPerSecond"),zy=Symbol("syncRotationRate"),Vy=Symbol("onCameraChange"),Wy=(t=>{var e,i,n;class r extends t{constructor(){super(...arguments),this[e]=new Map,this[i]=t=>{t.forEach((t=>{t instanceof MutationRecord&&"childList"!==t.type||(t.addedNodes.forEach((t=>{this[Y_](t)})),t.removedNodes.forEach((t=>{this[K_](t)})),this[B_]())}))},this[n]=new MutationObserver(this[X_])}connectedCallback(){super.connectedCallback();for(let t=0;t{var i,n,r;class s extends t{constructor(){super(...arguments),this[i]=void 0,this[n]=null,this[r]=null,this.variantName=null,this.orientation="0 0 0",this.scale="1 1 1"}get model(){return this[xv]}get availableVariants(){return this.model?this.model[pv]():[]}get originalGltfJson(){return this[yv]}[(i=xv,n=Ev,r=yv,Sv)](){return()=>{this[B_]()}}[Cv](t){return t.colorSpace=ft,t.wrapS=w,t.wrapT=w,new uf(this[Sv](),t)}async createTexture(t,e="image/png"){const{textureUtils:i}=this[U_],n=await i.loadImage(t);return n.userData.mimeType=e,this[Cv](n)}async createLottieTexture(t,e=1){const{textureUtils:i}=this[U_],n=await i.loadLottie(t,e);return this[Cv](n)}createVideoTexture(t){const e=document.createElement("video");e.crossOrigin=this.withCredentials?"use-credentials":"anonymous",e.src=t,e.muted=!0,e.playsInline=!0,e.loop=!0,e.play();const i=new yo(e);return this[Cv](i)}createCanvasTexture(){const t=document.createElement("canvas"),e=new Io(t);return this[Cv](e)}async updated(t){if(super.updated(t),t.has("variantName")){const t=this[P_].beginActivity("variant-update");t(.1);const e=this[xv],{variantName:i}=this;null!=e&&(await e[cv](i),this[B_](),this.dispatchEvent(new CustomEvent("variant-applied"))),t(1)}if(t.has("orientation")||t.has("scale")){if(!this.loaded)return;const t=this[T_];t.applyTransform(),t.updateBoundingBox(),t.updateShadow(),this[U_].arRenderer.onUpdateScene(),this[B_]()}}[L_](){super[L_]();const{currentGLTF:t}=this[T_];if(null!=t){const{correlatedSceneGraph:e}=t;null!=e&&t!==this[Ev]&&(this[xv]=new vv(e,this[Sv]()),this[yv]=JSON.parse(JSON.stringify(e.gltf))),"variants"in t.userData&&this.requestUpdate("variantName")}this[Ev]=t}async exportScene(t){const e=this[T_];return new Promise((async(i,n)=>{const r={binary:!0,onlyVisible:!0,maxTextureSize:1/0,includeCustomExtensions:!1,forceIndices:!1};Object.assign(r,t),r.animations=e.animations,r.truncateDrawRange=!0;const s=e.shadow;let a=!1;null!=s&&(a=s.visible,s.visible=!1),await this[xv][lv]();(new Pd).register((t=>new BA(t))).parse(e.model,(t=>i(new Blob([r.binary?t:JSON.stringify(t)],{type:r.binary?"application/octet-stream":"application/json"}))),(()=>n("glTF export failed")),r),null!=s&&(s.visible=a)}))}materialFromPoint(t,e){const i=this[xv];if(null==i)return null;const n=this[T_],r=n.getNDC(t,e),s=n.hitFromPoint(r);return null==s||null==s.face?null:i[hv](s)}}return _v([e({type:String,attribute:"variant-name"})],s.prototype,"variantName",void 0),_v([e({type:String,attribute:"orientation"})],s.prototype,"orientation",void 0),_v([e({type:String,attribute:"scale"})],s.prototype,"scale",void 0),s})((t=>{var i,n,r;class s extends t{constructor(){super(...arguments),this.autoRotate=!1,this.autoRotateDelay=3e3,this.rotationPerSecond="auto",this[i]=performance.now(),this[n]=0,this[r]=t=>{this.autoRotate&&"user-interaction"===t.detail.source&&(this[Gy]=performance.now())}}connectedCallback(){super.connectedCallback(),this.addEventListener("camera-change",this[Vy]),this[Gy]=performance.now()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("camera-change",this[Vy]),this[Gy]=performance.now()}updated(t){super.updated(t),t.has("autoRotate")&&(this[Gy]=performance.now())}[(i=Gy,n=Hy,zy)](t){this[Hy]=t[0]}[R_](t,e){if(super[R_](t,e),!this.autoRotate||!this[F_]()||this[U_].isPresenting)return;const i=Math.min(e,t-this[Gy]-this.autoRotateDelay);i>0&&(this[T_].yaw=this.turntableRotation+this[Hy]*i*.001)}get turntableRotation(){return this[T_].yaw}resetTurntableRotation(t=0){this[T_].yaw=t}}return r=Vy,Qy([e({type:Boolean,attribute:"auto-rotate"})],s.prototype,"autoRotate",void 0),Qy([e({type:Number,attribute:"auto-rotate-delay"})],s.prototype,"autoRotateDelay",void 0),Qy([Pp({intrinsics:ky,updateHandler:zy}),e({type:String,attribute:"rotation-per-second"})],s.prototype,"rotationPerSecond",void 0),s})((t=>{var i,n,r;class s extends t{constructor(){super(...arguments),this.environmentImage=null,this.skyboxImage=null,this.shadowIntensity=0,this.shadowSoftness=1,this.exposure=1,this.toneMapping="auto",this.skyboxHeight="0",this[i]=null,this[n]=null,this[r]=null}updated(t){super.updated(t),t.has("shadowIntensity")&&(this[T_].setShadowIntensity(.5*this.shadowIntensity),this[B_]()),t.has("shadowSoftness")&&(this[T_].setShadowSoftness(this.shadowSoftness),this[B_]()),t.has("exposure")&&(this[T_].exposure=this.exposure,this[B_]()),t.has("toneMapping")&&(this[T_].toneMapping="commerce"===this.toneMapping?_:"agx"===this.toneMapping?E:v,this[B_]()),(t.has("environmentImage")||t.has("skyboxImage"))&&this[Q_]()&&this[Ih](),t.has("skyboxHeight")&&(this[T_].setGroundedSkybox(),this[B_]())}hasBakedShadow(){return this[T_].bakedShadows.size>0}async[(i=Sh,n=Ch,r=Mh,Ih)](){const{skyboxImage:t,environmentImage:e}=this;null!=this[Mh]&&(this[Mh](),this[Mh]=null);const{textureUtils:i}=this[U_];if(null==i)return;const n=this[P_].beginActivity("environment-update");try{const{environmentMap:r,skybox:s}=await i.generateEnvironmentMapAndSkybox(mh(t),e,(t=>n(_h(t,0,1))));this[Sh]!==r&&(this[Sh]=r,this.dispatchEvent(new CustomEvent("environment-change"))),this[Ch]=null!=s?s.name===r.name?r:s:null,this[T_].setEnvironmentAndSkybox(this[Sh],this[Ch])}catch(t){if(t instanceof Error)throw this[T_].setEnvironmentAndSkybox(null,null),t}finally{n(1)}}}return xh([e({type:String,attribute:"environment-image"})],s.prototype,"environmentImage",void 0),xh([e({type:String,attribute:"skybox-image"})],s.prototype,"skyboxImage",void 0),xh([e({type:Number,attribute:"shadow-intensity"})],s.prototype,"shadowIntensity",void 0),xh([e({type:Number,attribute:"shadow-softness"})],s.prototype,"shadowSoftness",void 0),xh([e({type:Number})],s.prototype,"exposure",void 0),xh([e({type:String,attribute:"tone-mapping"})],s.prototype,"toneMapping",void 0),xh([e({type:String,attribute:"skybox-height"})],s.prototype,"skyboxHeight",void 0),s})((t=>{var i,n,r,s,a,o,l,c,h,u,d,A,p,m,g,f,v;class _ extends t{constructor(){super(...arguments),this.cameraControls=!1,this.cameraOrbit=Hp,this.cameraTarget="auto auto auto",this.fieldOfView="auto",this.minCameraOrbit="auto",this.maxCameraOrbit="auto",this.minFieldOfView="auto",this.maxFieldOfView="auto",this.interactionPromptThreshold=3e3,this.interactionPrompt=Wp,this.interactionPromptStyle=Xp,this.orbitSensitivity=1,this.zoomSensitivity=1,this.panSensitivity=1,this.touchAction=jp,this.disableZoom=!1,this.disablePan=!1,this.disableTap=!1,this.interpolationDecay=50,this[i]=this.shadowRoot.querySelector(".interaction-prompt"),this[n]=this.shadowRoot.querySelector("#prompt"),this[r]=[this.shadowRoot.querySelector("#finger0"),this.shadowRoot.querySelector("#finger1")],this[s]=this.shadowRoot.querySelector(".pan-target"),this[a]=0,this[o]=1/0,this[l]=!1,this[c]=!1,this[h]=Fm.AUTOMATIC,this[u]=new Qm(this[T_].camera,this[w_],this[T_]),this[d]=new Pl,this[A]=!1,this[p]=!1,this[m]=!1,this[g]=()=>{const t=this[sm].changeSource;this[Em]=t,t===Fm.USER_INTERACTION&&(this[fm]=!0,this[hm]())},this[f]=()=>{this[um](),this[B_]();const t=this[sm].changeSource;this.dispatchEvent(new CustomEvent("camera-change",{detail:{source:t}}))},this[v]=t=>{this[M_].classList.toggle("pointer-tumbling","pointer-change-start"===t.type)}}get inputSensitivity(){return this[sm].inputSensitivity}set inputSensitivity(t){this[sm].inputSensitivity=t}getCameraOrbit(){const{theta:t,phi:e,radius:i}=this[ym];return{theta:t,phi:e,radius:i,toString(){return`${this.theta}rad ${this.phi}rad ${this.radius}m`}}}getCameraTarget(){return O_(this[U_].isPresenting?this[U_].arRenderer.target:this[T_].getTarget())}getFieldOfView(){return this[sm].getFieldOfView()}getMinimumFieldOfView(){return this[sm].options.minimumFieldOfView}getMaximumFieldOfView(){return this[sm].options.maximumFieldOfView}getIdealAspect(){return this[T_].idealAspect}jumpCameraToGoal(){this[xm]=!0,this.requestUpdate(xm,!1)}resetInteractionPrompt(){this[_m]=0,this[vm]=1/0,this[fm]=!1,this[gm]=this.interactionPrompt===Wp&&this.cameraControls}zoom(t){const e=new WheelEvent("wheel",{deltaY:-30*t});this[w_].dispatchEvent(e)}connectedCallback(){super.connectedCallback(),this[sm].addEventListener("user-interaction",this[Am]),this[sm].addEventListener("pointer-change-start",this[mm]),this[sm].addEventListener("pointer-change-end",this[mm])}disconnectedCallback(){super.disconnectedCallback(),this[sm].removeEventListener("user-interaction",this[Am]),this[sm].removeEventListener("pointer-change-start",this[mm]),this[sm].removeEventListener("pointer-change-end",this[mm])}updated(t){super.updated(t);const e=this[sm],i=this[T_];if(t.has("cameraControls")&&(this.cameraControls?(e.enableInteraction(),this.interactionPrompt===Wp&&(this[gm]=!0)):(e.disableInteraction(),this[hm]()),this[w_].setAttribute("aria-label",this[__])),t.has("disableZoom")&&(e.disableZoom=this.disableZoom),t.has("disablePan")&&(e.enablePan=!this.disablePan),t.has("disableTap")&&(e.enableTap=!this.disableTap),(t.has("interactionPrompt")||t.has("cameraControls")||t.has("src"))&&(this.interactionPrompt===Wp&&this.cameraControls&&!this[fm]?this[gm]=!0:this[hm]()),t.has("interactionPromptStyle")&&(this[lm].style.opacity=this.interactionPromptStyle==qp?"1":"0"),t.has("touchAction")){const t=this.touchAction;e.applyOptions({touchAction:t}),e.updateTouchActionStyle()}t.has("orbitSensitivity")&&(e.orbitSensitivity=this.orbitSensitivity),t.has("zoomSensitivity")&&(e.zoomSensitivity=this.zoomSensitivity),t.has("panSensitivity")&&(e.panSensitivity=this.panSensitivity),t.has("interpolationDecay")&&(e.setDamperDecayTime(this.interpolationDecay),i.setTargetDamperDecayTime(this.interpolationDecay)),!0===this[xm]&&Promise.resolve().then((()=>{e.jumpToGoal(),i.jumpToGoal(),this[pm](),this[xm]=!1}))}async updateFraming(){const t=this[T_],e=t.adjustedFoV(t.framedFoVDeg);await t.updateFraming();const i=t.adjustedFoV(t.framedFoVDeg),n=this[sm].getFieldOfView()/e;this[sm].setFieldOfView(i*n),this[Cm]=!0,this.requestUpdate("maxFieldOfView"),this.requestUpdate("fieldOfView"),this.requestUpdate("minCameraOrbit"),this.requestUpdate("maxCameraOrbit"),this.requestUpdate("cameraOrbit"),await this.updateComplete}interact(t,e,i){const n=this[w_],r=this[cm];if("1"===r[0].style.opacity)return void console.warn("interact() failed because an existing interaction is running.");const s=new Array;s.push({x:Qp(e.x),y:Qp(e.y)});const a=[{x:s[0].x(0),y:s[0].y(0)}];null!=i&&(s.push({x:Qp(i.x),y:Qp(i.y)}),a.push({x:s[1].x(0),y:s[1].y(0)}));let o=performance.now();const{width:l,height:c}=this[T_],h=this.getBoundingClientRect(),u=t=>{for(const[e,i]of a.entries()){const{style:s}=r[e];s.transform=`translateX(${l*i.x}px) translateY(${c*i.y}px)`,"pointerdown"===t?s.opacity="1":"pointerup"===t&&(s.opacity="0");const a={pointerId:e-5678,pointerType:"touch",target:n,clientX:l*i.x+h.x,clientY:c*i.y+h.y,altKey:!0};n.dispatchEvent(new PointerEvent(t,a))}},d=()=>{const e=this[Em];if(e!==Fm.AUTOMATIC||!n.isConnected){for(const t of this[cm])t.style.opacity="0";return u("pointercancel"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:e}})),void document.removeEventListener("visibilitychange",A)}const i=Math.min(1,(performance.now()-o)/t);for(const[t,e]of a.entries())e.x=s[t].x(i),e.y=s[t].y(i);u("pointermove"),i<1?requestAnimationFrame(d):(u("pointerup"),this.dispatchEvent(new CustomEvent("interact-stopped",{detail:{source:Fm.AUTOMATIC}})),document.removeEventListener("visibilitychange",A))},A=()=>{let t=0;"hidden"===document.visibilityState?t=performance.now()-o:o=performance.now()-t};document.addEventListener("visibilitychange",A),u("pointerdown"),this[Em]=Fm.AUTOMATIC,requestAnimationFrame(d)}[(i=om,n=lm,r=cm,s=am,a=_m,o=vm,l=fm,c=gm,h=Em,u=sm,d=ym,A=xm,p=Sm,m=Cm,Mm)](t){const e=this[sm],i=this[T_];i.framedFoVDeg=180*t[0]/Math.PI,e.changeSource=Fm.NONE,e.setFieldOfView(i.adjustedFoV(i.framedFoVDeg)),this[Am]()}[Im](t){const e=this[sm];if(this[Cm]){const{theta:e,phi:i}=this.getCameraOrbit();t[0]=e,t[1]=i,this[Cm]=!1}e.changeSource=Fm.NONE,e.setOrbit(t[0],t[1],t[2]),this[Am]()}[bm](t){this[sm].applyOptions({minimumAzimuthalAngle:t[0],minimumPolarAngle:t[1],minimumRadius:t[2]}),this.jumpCameraToGoal()}[Tm](t){this[sm].applyOptions({maximumAzimuthalAngle:t[0],maximumPolarAngle:t[1],maximumRadius:t[2]}),this[dm](t[2]),this.jumpCameraToGoal()}[Bm](t){this[sm].applyOptions({minimumFieldOfView:180*t[0]/Math.PI}),this.jumpCameraToGoal()}[Rm](t){const e=this[T_].adjustedFoV(180*t[0]/Math.PI);this[sm].applyOptions({maximumFieldOfView:e}),this.jumpCameraToGoal()}[wm](t){const[e,i,n]=t;this[U_].arRenderer.isPresenting||this[T_].setTarget(e,i,n),this[sm].changeSource=Fm.NONE,this[U_].arRenderer.updateTarget(),this[Am]()}[R_](t,e){if(super[R_](t,e),this[U_].isPresenting||!this[F_]())return;const i=this[sm],n=this[T_],r=performance.now();if(this[gm]&&this.loaded&&r>this[S_]+this.interactionPromptThreshold&&(this[gm]=!1,this[vm]=r,this[om].classList.add("visible")),isFinite(this[vm])&&this.interactionPromptStyle===Xp){const t=(r-this[vm])/5e3%1,e=kp(t),s=Gp(t);if(this[lm].style.opacity=`${s}`,e!==this[_m]){const t=e*n.width*.05,r=(e-this[_m])*Math.PI/16;this[lm].style.transform=`translateX(${t}px)`,i.changeSource=Fm.AUTOMATIC,i.adjustOrbit(r,0,0),this[_m]=e}}const s=i.update(t,e),a=n.updateTarget(e);(s||a)&&this[pm]()}[hm](){this[gm]=!1,this[om].classList.remove("visible"),this[vm]=1/0}[dm](t){const e=Math.max(this[T_].farRadius(),t),i=Math.abs(2*e);this[sm].updateNearFar(0,i)}[um](){const{theta:t,phi:e}=this[sm].getCameraSpherical(this[ym]),i=(4+Math.floor((t%rm+nm)/em))%4,n=Math.floor(e/im),r=zp[i],s=Vp[n];this[x_](`View from stage ${s}${r}`)}get[__](){return super[__].replace(/\.$/,"")+(this.cameraControls?". Use mouse, touch or arrow keys to move.":"")}async[D_](t){const e=this[sm],i=this[T_],n=i.adjustedFoV(i.framedFoVDeg);super[D_](t);const r=i.adjustedFoV(i.framedFoVDeg)/n,s=e.getFieldOfView()*(isFinite(r)?r:1);e.updateAspect(this[T_].aspect),this.requestUpdate("maxFieldOfView",this.maxFieldOfView),await this.updateComplete,this[sm].setFieldOfView(s),this.jumpCameraToGoal()}[L_](){super[L_](),this[Sm]?this[Cm]=!0:this[Sm]=!0,this.requestUpdate("maxFieldOfView",this.maxFieldOfView),this.requestUpdate("fieldOfView",this.fieldOfView),this.requestUpdate("minCameraOrbit",this.minCameraOrbit),this.requestUpdate("maxCameraOrbit",this.maxCameraOrbit),this.requestUpdate("cameraOrbit",this.cameraOrbit),this.requestUpdate("cameraTarget",this.cameraTarget),this.jumpCameraToGoal()}}return g=Am,f=pm,v=mm,Op([e({type:Boolean,attribute:"camera-controls"})],_.prototype,"cameraControls",void 0),Op([Pp({intrinsics:Jp,observeEffects:!0,updateHandler:Im}),e({type:String,attribute:"camera-orbit",hasChanged:()=>!0})],_.prototype,"cameraOrbit",void 0),Op([Pp({intrinsics:tm,observeEffects:!0,updateHandler:wm}),e({type:String,attribute:"camera-target",hasChanged:()=>!0})],_.prototype,"cameraTarget",void 0),Op([Pp({intrinsics:Yp,observeEffects:!0,updateHandler:Mm}),e({type:String,attribute:"field-of-view",hasChanged:()=>!0})],_.prototype,"fieldOfView",void 0),Op([Pp({intrinsics:$p,updateHandler:bm}),e({type:String,attribute:"min-camera-orbit",hasChanged:()=>!0})],_.prototype,"minCameraOrbit",void 0),Op([Pp({intrinsics:Zp,updateHandler:Tm}),e({type:String,attribute:"max-camera-orbit",hasChanged:()=>!0})],_.prototype,"maxCameraOrbit",void 0),Op([Pp({intrinsics:Kp,updateHandler:Bm}),e({type:String,attribute:"min-field-of-view",hasChanged:()=>!0})],_.prototype,"minFieldOfView",void 0),Op([Pp({intrinsics:Yp,updateHandler:Rm}),e({type:String,attribute:"max-field-of-view",hasChanged:()=>!0})],_.prototype,"maxFieldOfView",void 0),Op([e({type:Number,attribute:"interaction-prompt-threshold"})],_.prototype,"interactionPromptThreshold",void 0),Op([e({type:String,attribute:"interaction-prompt"})],_.prototype,"interactionPrompt",void 0),Op([e({type:String,attribute:"interaction-prompt-style"})],_.prototype,"interactionPromptStyle",void 0),Op([e({type:Number,attribute:"orbit-sensitivity"})],_.prototype,"orbitSensitivity",void 0),Op([e({type:Number,attribute:"zoom-sensitivity"})],_.prototype,"zoomSensitivity",void 0),Op([e({type:Number,attribute:"pan-sensitivity"})],_.prototype,"panSensitivity",void 0),Op([e({type:String,attribute:"touch-action"})],_.prototype,"touchAction",void 0),Op([e({type:Boolean,attribute:"disable-zoom"})],_.prototype,"disableZoom",void 0),Op([e({type:Boolean,attribute:"disable-pan"})],_.prototype,"disablePan",void 0),Op([e({type:Boolean,attribute:"disable-tap"})],_.prototype,"disableTap",void 0),Op([e({type:Number,attribute:"interpolation-decay"})],_.prototype,"interpolationDecay",void 0),_})((t=>{var i,n,r,s,a,o,l,c,h,u;class d extends t{constructor(){super(...arguments),this.ar=!1,this.arScale="auto",this.arPlacement="floor",this.arModes="webxr scene-viewer quick-look",this.iosSrc=null,this.xrEnvironment=!1,this[i]=!1,this[n]=this.shadowRoot.querySelector(".ar-button"),this[r]=document.createElement("a"),this[s]=new Set,this[a]=cy,this[o]=!1,this[l]=t=>{t.preventDefault(),this.activateAR()},this[c]=({status:t})=>{t!==Om&&this[U_].arRenderer.presentedScene!==this[T_]||(this.setAttribute("ar-status",t),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:t}})),t===Om?this.removeAttribute("ar-tracking"):t===km&&this.setAttribute("ar-tracking",zm))},this[h]=({status:t})=>{this.setAttribute("ar-tracking",t),this.dispatchEvent(new CustomEvent("ar-tracking",{detail:{status:t}}))},this[u]=t=>{"_apple_ar_quicklook_button_tapped"==t.data&&this.dispatchEvent(new CustomEvent("quick-look-button-tapped"))}}get canActivateAR(){return this[my]!==cy}connectedCallback(){super.connectedCallback(),this[U_].arRenderer.addEventListener("status",this[Ey]),this.setAttribute("ar-status",Om),this[U_].arRenderer.addEventListener("tracking",this[yy]),this[fy].addEventListener("message",this[xy])}disconnectedCallback(){super.disconnectedCallback(),this[U_].arRenderer.removeEventListener("status",this[Ey]),this[U_].arRenderer.removeEventListener("tracking",this[yy]),this[fy].removeEventListener("message",this[xy])}update(t){super.update(t),t.has("arScale")&&(this[T_].canScale="fixed"!==this.arScale),t.has("arPlacement")&&(this[T_].updateShadow(),this[B_]()),t.has("arModes")&&(this[gy]=ry(this.arModes)),(t.has("ar")||t.has("arModes")||t.has("src")||t.has("iosSrc"))&&this[Sy]()}async activateAR(){switch(this[my]){case ay:await this[Ay]();break;case ly:await this[uy]();break;case oy:this[dy]();break;default:console.warn("No AR Mode can be activated. This is probably due to missing configuration or device capabilities")}}async[(i=py,n=hy,r=fy,s=gy,a=my,o=vy,l=_y,c=Ey,h=yy,u=xy,Sy)](){let t=cy;if(this.ar){if(null!=this.src)for(const e of this[gy]){if("webxr"===e&&oh&&!ey&&await this[U_].arRenderer.supportsPresentation()){t=ly;break}if("scene-viewer"===e&&dh&&!iy){t=oy;break}if("quick-look"===e&&ph){t=ay;break}}t===cy&&null!=this.iosSrc&&ph&&(t=ay)}if(t!==cy)this[hy].classList.add("enabled"),this[hy].addEventListener("click",this[_y]);else if(this[hy].classList.contains("enabled")){this[hy].removeEventListener("click",this[_y]),this[hy].classList.remove("enabled");const t=Hm;this.setAttribute("ar-status",t),this.dispatchEvent(new CustomEvent("ar-status",{detail:{status:t}}))}this[my]=t}async[uy](){console.log("Attempting to present in AR with WebXR..."),await this[Cy]();try{this[hy].removeEventListener("click",this[_y]);const{arRenderer:t}=this[U_];t.placeOnWall="wall"===this.arPlacement,await t.present(this[T_],this.xrEnvironment)}catch(t){console.warn("Error while trying to present in AR with WebXR"),console.error(t),await this[U_].arRenderer.stopPresenting(),ey=!0,console.warn("Falling back to next ar-mode"),await this[Sy](),this.activateAR()}finally{this[Sy]()}}async[Cy](){this.loaded||(this[vy]=!0,this[C_](),await((t,e,i=null)=>new Promise((n=>{t.addEventListener(e,(function r(s){i&&!i(s)||(n(s),t.removeEventListener(e,r))}))})))(this,"load"),this[vy]=!1)}[Q_](){return super[Q_]()||this[vy]}[dy](){const t=self.location.toString(),e=new URL(t),i=new URL(this.src,t);i.hash&&(i.hash="");const n=new URLSearchParams(i.search);if(e.hash=ny,n.set("mode","ar_preferred"),n.has("disable_occlusion")||n.set("disable_occlusion","true"),"fixed"===this.arScale&&n.set("resizable","false"),"wall"===this.arPlacement&&n.set("enable_vertical_placement","true"),n.has("sound")){const e=new URL(n.get("sound"),t);n.set("sound",e.toString())}if(n.has("link")){const e=new URL(n.get("link"),t);n.set("link",e.toString())}const r=`intent://arvr.google.com/scene-viewer/1.0?${n.toString()+"&file="+encodeURIComponent(i.toString())}#Intent;scheme=https;package=com.google.ar.core;action=android.intent.action.VIEW;S.browser_fallback_url=${encodeURIComponent(e.toString())};end;`;self.addEventListener("hashchange",(()=>{self.location.hash===ny&&(iy=!0,self.history.back(),console.warn("Error while trying to present in AR with Scene Viewer"),console.warn("Falling back to next ar-mode"),this[Sy]())}),{once:!0}),this[fy].setAttribute("href",r),console.log("Attempting to present in AR with Scene Viewer..."),this[fy].click()}async[Ay](){const t=!this.iosSrc;this[hy].classList.remove("enabled");const e=t?await this.prepareUSDZ():this.iosSrc,i=new URL(e,self.location.toString());if(t){const t=self.location.toString(),e=new URL(t),n=new URL(this.src,e);n.hash&&(i.hash=n.hash)}"fixed"===this.arScale&&(i.hash&&(i.hash+="&"),i.hash+="allowsContentScaling=0");const n=this[fy];n.setAttribute("rel","ar");const r=document.createElement("img");n.appendChild(r),n.setAttribute("href",i.toString()),t&&n.setAttribute("download","model.usdz"),n.style.display="none",n.isConnected||this.shadowRoot.appendChild(n),console.log("Attempting to present in AR with Quick Look..."),n.click(),n.removeChild(r),t&&URL.revokeObjectURL(e),this[hy].classList.add("enabled")}async prepareUSDZ(){const t=this[P_].beginActivity("usdz-conversion");await this[Cy]();const{model:e,shadow:i}=this[T_];if(null==e)return"";let n=!1;null!=i&&(n=i.visible,i.visible=!1),t(.2);const r=new zE,s=await r.parse(e),a=new Blob([s],{type:"model/vnd.usdz+zip"}),o=URL.createObjectURL(a);return t(1),null!=i&&(i.visible=n),o}}return ty([e({type:Boolean,attribute:"ar"})],d.prototype,"ar",void 0),ty([e({type:String,attribute:"ar-scale"})],d.prototype,"arScale",void 0),ty([e({type:String,attribute:"ar-placement"})],d.prototype,"arPlacement",void 0),ty([e({type:String,attribute:"ar-modes"})],d.prototype,"arModes",void 0),ty([e({type:String,attribute:"ios-src"})],d.prototype,"iosSrc",void 0),ty([e({type:Boolean,attribute:"xr-environment"})],d.prototype,"xrEnvironment",void 0),d})((t=>{var i,n,r,s,a,o,l,c;class h extends t{constructor(...t){super(...t),this.poster=null,this.reveal=My,this.loading=wy,this[i]=!1,this[n]=!1,this[r]=this.shadowRoot.querySelector(".slot.poster"),this[s]=this.shadowRoot.querySelector("#default-poster"),this[a]=this.shadowRoot.querySelector("#default-progress-bar > .bar"),this[o]=this[Ry].getAttribute("aria-label"),this[l]=((t,e)=>{let i=null;const n=(...n)=>{null==i&&(t(...n),i=self.setTimeout((()=>i=null),e))};return n.flush=()=>{null!=i&&(self.clearTimeout(i),i=null)},n})((t=>{const e=this[Ty].parentNode;requestAnimationFrame((()=>{this[Ty].style.transform=`scaleX(${t})`,0===t&&(e.removeChild(this[Ty]),e.appendChild(this[Ty])),this[Ty].classList.toggle("hide",1===t)}))}),100),this[c]=t=>{const e=t.detail.totalProgress;1===e&&(this[Py].flush(),this.loaded&&(this[Ly]||this.reveal===My)&&this[Dy]()),this[Py](e),this.dispatchEvent(new CustomEvent("progress",{detail:{totalProgress:e}}))};const e=self.ModelViewerElement||{},h=e.dracoDecoderLocation||"https://www.gstatic.com/draco/versioned/decoders/1.5.6/";Ed.setDRACODecoderLocation(h);const u=e.ktx2TranscoderLocation||"https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";Ed.setKTX2TranscoderLocation(u),e.meshoptDecoderLocation&&Ed.setMeshoptDecoderLocation(e.meshoptDecoderLocation);const d=e.lottieLoaderLocation||"https://cdn.jsdelivr.net/npm/three@0.149.0/examples/jsm/loaders/LottieLoader.js";Ng.singleton.textureUtils.lottieLoaderUrl=d}static set dracoDecoderLocation(t){Ed.setDRACODecoderLocation(t)}static get dracoDecoderLocation(){return Ed.getDRACODecoderLocation()}static set ktx2TranscoderLocation(t){Ed.setKTX2TranscoderLocation(t)}static get ktx2TranscoderLocation(){return Ed.getKTX2TranscoderLocation()}static set meshoptDecoderLocation(t){Ed.setMeshoptDecoderLocation(t)}static get meshoptDecoderLocation(){return Ed.getMeshoptDecoderLocation()}static set lottieLoaderLocation(t){Ng.singleton.textureUtils.lottieLoaderUrl=t}static get lottieLoaderLocation(){return Ng.singleton.textureUtils.lottieLoaderUrl}static mapURLs(t){Ng.singleton.loader[fd].manager.setURLModifier(t)}dismissPoster(){this.loaded?this[Dy]():(this[Ly]=!0,this[C_]())}showPoster(){const t=this[By];if(t.classList.contains("show"))return;t.classList.add("show"),this[w_].classList.remove("show");const e=this[Ry];e.removeAttribute("tabindex"),e.removeAttribute("aria-hidden");const i=this.modelIsVisible;this[Uy]=!1,this[v_](i)}getDimensions(){return O_(this[T_].size)}getBoundingBoxCenter(){return O_(this[T_].boundingBox.getCenter(new _e))}connectedCallback(){super.connectedCallback(),this.loaded||this.showPoster(),this[P_].addEventListener("progress",this[Fy])}disconnectedCallback(){super.disconnectedCallback(),this[P_].removeEventListener("progress",this[Fy])}async updated(t){super.updated(t),t.has("poster")&&null!=this.poster&&(this[Ry].style.backgroundImage=`url(${this.poster})`),t.has("alt")&&this[Ry].setAttribute("aria-label",this[E_]),(t.has("reveal")||t.has("loading"))&&this[C_]()}[(i=Uy,n=Ly,r=By,s=Ry,a=Ty,o=Ny,l=Py,c=Fy,Q_)](){return!!this.src&&(this[Ly]||this.loading===by||this.reveal===My&&this[f_])}[Dy](){this[Ly]=!1;const t=this[By];if(!t.classList.contains("show"))return;t.classList.remove("show"),this[w_].classList.add("show");const e=this.modelIsVisible;this[Uy]=!0,this[v_](e);const i=this.getRootNode();i&&i.activeElement===this&&this[w_].focus();const n=this[Ry];n.setAttribute("aria-hidden","true"),n.tabIndex=-1,this.dispatchEvent(new CustomEvent("poster-dismissed"))}[F_](){return super[F_]()&&this[Uy]}}return Iy([e({type:String})],h.prototype,"poster",void 0),Iy([e({type:String})],h.prototype,"reveal",void 0),Iy([e({type:String})],h.prototype,"loading",void 0),h})((t=>{var i;class n extends t{constructor(...t){super(t),this.autoplay=!1,this.animationName=void 0,this.animationCrossfadeDuration=300,this[i]=!0,this[T_].subscribeMixerEvent("loop",(t=>{const e=t.action._loopCount;this.dispatchEvent(new CustomEvent("loop",{detail:{count:e}}))})),this[T_].subscribeMixerEvent("finished",(()=>{this[V_]=!0,this.dispatchEvent(new CustomEvent("finished"))}))}get availableAnimations(){return this.loaded?this[T_].animationNames:[]}get duration(){return this[T_].duration}get paused(){return this[V_]}get currentTime(){return this[T_].animationTime}set currentTime(t){this[T_].animationTime=t,this[B_]()}get timeScale(){return this[T_].animationTimeScale}set timeScale(t){this[T_].animationTimeScale=t}pause(){this[V_]||(this[V_]=!0,this.dispatchEvent(new CustomEvent("pause")))}play(t){this.availableAnimations.length>0&&(this[V_]=!1,this[z_](t),this.dispatchEvent(new CustomEvent("play")))}[(i=V_,L_)](){super[L_](),this[V_]=!0,null!=this.animationName&&this[z_](),this.autoplay&&this.play()}[R_](t,e){super[R_](t,e),this[V_]||!this[F_]()&&!this[U_].isPresenting||(this[T_].updateAnimation(e/1e3),this[B_]())}updated(t){super.updated(t),t.has("autoplay")&&this.autoplay&&this.play(),t.has("animationName")&&this[z_]()}[z_](t=W_){var e;const i=null!==(e=t.repetitions)&&void 0!==e?e:1/0,n=t.pingpong?ot:1===i?2200:at;this[T_].playAnimation(this.animationName,this.animationCrossfadeDuration/1e3,n,i),this[V_]&&(this[T_].updateAnimation(0),this[B_]())}}return H_([e({type:Boolean})],n.prototype,"autoplay",void 0),H_([e({type:String,attribute:"animation-name"})],n.prototype,"animationName",void 0),H_([e({type:Number,attribute:"animation-crossfade-duration"})],n.prototype,"animationCrossfadeDuration",void 0),n})(G_))))))));customElements.define("model-viewer",Wy);export{Io as CanvasTexture,Zo as FileLoader,Ko as Loader,Wy as ModelViewerElement,B as NearestFilter}; -//# sourceMappingURL=model-viewer.min.js.map diff --git a/www/docs/.vuepress/public/javascript/translate.js b/www/docs/.vuepress/public/javascript/translate.js deleted file mode 100644 index e9c6ccb..0000000 --- a/www/docs/.vuepress/public/javascript/translate.js +++ /dev/null @@ -1,4965 +0,0 @@ -/* - - 国际化,网页自动翻译。 - 作者:管雷鸣 - 开原仓库:https://github.com/xnx3/translate - - */ -var translate = { - /* - * 当前的版本 - */ - version:'3.2.3.20240403', - useVersion:'v2', //当前使用的版本,默认使用v2. 可使用 setUseVersion2(); //来设置使用v2 ,已废弃,主要是区分是否是v1版本来着,v2跟v3版本是同样的使用方式 - setUseVersion2:function(){ - translate.useVersion = 'v2'; - console.log('提示:自 v2.10 之后的版本默认就是使用V2版本(当前版本为:'+translate.version+'), translate.setUseVersion2() 可以不用再加这一行了。当然加了也无所谓,只是加了跟不加是完全一样的。'); - }, - /* - * 翻译的对象,也就是 new google.translate.TranslateElement(...) - * 已废弃,v1使用的 - */ - translate:null, - /* - * 支持哪些语言切换,包括:de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr - * 已废弃,请使用 translate.selectLanguageTag.languages - */ - includedLanguages:'zh-CN,zh-TW,en', - /* - * 资源文件url的路径 - * 已废弃,v1使用的 - */ - resourcesUrl:'//res.zvo.cn/translate', - - /** - * 默认出现的选择语言的 select 选择框,可以通过这个选择切换语言。 - */ - selectLanguageTag:{ - /* - v3.1 增加,将 select切换语言的选择框赋予哪个id,这里是具体的id的名字。 - 如果这个id不存在,会创建这个id的元素 - */ - documentId:'translate', - /* 是否显示 select选择语言的选择框,true显示; false不显示。默认为true */ - show:true, - /* - 支持哪些语言切换 - v1.x 版本包括:de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr - v2.x 版本根据后端翻译服务不同,支持的语言也不同。具体支持哪些,可通过 http://api.translate.zvo.cn/doc/language.json.html 获取 (如果您私有部署的,将请求域名换为您自己私有部署的域名) - */ - languages:'', - alreadyRender:false, //当前是否已渲染过了 true为是 v2.2增加 - selectOnChange:function(event){ - var language = event.target.value; - translate.changeLanguage(language); - }, - //重新绘制 select 语种下拉选择。比如进行二次开发过translate.js,手动进行了设置 translate.to ,但是手动改动后的,在select语种选择框中并不会自动进行改变,这是就需要手动重新绘制一下 select语种选择的下拉选择框 - refreshRender:function(){ - // 获取元素 - let element = document.getElementById(translate.selectLanguageTag.documentId+"SelectLanguage"); - - // 删除元素 - if (element) { - element.parentNode.removeChild(element); - } - - //设置为未 render 状态,允许进行 render - translate.selectLanguageTag.alreadyRender = false; - - translate.selectLanguageTag.render(); - }, - render:function(){ //v2增加 - if(translate.selectLanguageTag.alreadyRender){ - return; - } - translate.selectLanguageTag.alreadyRender = true; - - //判断如果不显示select选择语言,直接就隐藏掉 - if(!translate.selectLanguageTag.show){ - return; - } - - //判断translate 的id是否存在,不存在就创建一个 - if(document.getElementById(translate.selectLanguageTag.documentId) == null){ - var body_trans = document.getElementsByTagName('body')[0]; - var div = document.createElement("div"); //创建一个script标签 - div.id=translate.selectLanguageTag.documentId; - body_trans.appendChild(div); - }else{ - //存在,那么判断一下 select是否存在,要是存在就不重复创建了 - if(document.getElementById(translate.selectLanguageTag.documentId+'SelectLanguage') != null){ - //select存在了,就不重复创建了 - return; - } - } - - //从服务器加载支持的语言库 - translate.request.post(translate.request.api.language, {}, function(data){ - if(data.result == 0){ - console.log('load language list error : '+data.info); - return; - } - - //select的onchange事件 - var onchange = function(event){ translate.selectLanguageTag.selectOnChange(event); } - - //创建 select 标签 - var selectLanguage = document.createElement("select"); - selectLanguage.id = translate.selectLanguageTag.documentId+'SelectLanguage'; - selectLanguage.className = translate.selectLanguageTag.documentId+'SelectLanguage'; - for(var i = 0; i 0){ - //设置了自定义显示的语言 - - //都转小写判断 - var langs_indexof = (','+translate.selectLanguageTag.languages+',').toLowerCase(); - //console.log(langs_indexof) - if(langs_indexof.indexOf(','+data.list[i].id.toLowerCase()+',') < 0){ - //没发现,那不显示这个语种,调出 - continue - } - } - - /*判断默认要选中哪个语言*/ - if(translate.to != null && typeof(translate.to) != 'undefined' && translate.to.length > 0){ - //设置了目标语言,那就进行判断显示目标语言 - - if(translate.to == data.list[i].id){ - option.setAttribute("selected",'selected'); - } - }else{ - //没设置目标语言,那默认选中当前本地的语种 - if(data.list[i].id == translate.language.getLocal()){ - option.setAttribute("selected",'selected'); - } - } - - option.appendChild(document.createTextNode(data.list[i].name)); - selectLanguage.appendChild(option); - } - //增加 onchange 事件 - if(window.addEventListener){ // Mozilla, Netscape, Firefox - selectLanguage.addEventListener('change', onchange,false); - }else{ // IE - selectLanguage.attachEvent('onchange',onchange); - } - //将select加入进网页显示 - document.getElementById(translate.selectLanguageTag.documentId).appendChild(selectLanguage); - /* - try{ - document.getElementById('translateSelectLanguage').style.width = '94px'; - }catch(e){ console.log(e);} - */ - }); - - - } - }, - - /* - * 当前本地语言 - * 已废弃,v1使用的 - */ - //localLanguage:'zh-CN', - localLanguage:'zh-CN', - - /** - * google翻译执行的 - * 已废弃,v1使用的 - */ - googleTranslateElementInit:function(){ - var selectId = ''; - if(document.getElementById('translate') != null){ // && document.getElementById('translate').innerHTML.indexOf('translateSelectLanguage') > 0 - //已经创建过了,存在 - selectId = 'translate'; - } - - translate.translate = new google.translate.TranslateElement( - { - //这参数没用,请忽略 - pageLanguage: 'zh-CN', - //一共80种语言选择,这个是你需要翻译的语言,比如你只需要翻译成越南和英语,这里就只写en,vi - //includedLanguages: 'de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr', - includedLanguages: translate.selectLanguageTag.languages, - //选择语言的样式,这个是面板,还有下拉框的样式,具体的记不到了,找不到api~~ - layout: 0, - //自动显示翻译横幅,就是翻译后顶部出现的那个,有点丑,设置这个属性不起作用的话,请看文章底部的其他方法 - //autoDisplay: false, - //disableAutoTranslation:false, - //还有些其他参数,由于原插件不再维护,找不到详细api了,将就了,实在不行直接上dom操作 - }, - selectId //触发按钮的id - ); - }, - - /** - * 初始化,如加载js、css资源 - * 已废弃,v1使用的 - */ - /* v2.11.11.20240124 彻底注释掉,有新的init方法替代 - init:function(){ - var protocol = window.location.protocol; - if(window.location.protocol == 'file:'){ - //本地的,那就用http - protocol = 'http:'; - } - if(this.resourcesUrl.indexOf('://') == -1){ - //还没设置过,进行设置 - this.resourcesUrl = protocol + this.resourcesUrl; - } - - //this.resourcesUrl = 'file://G:/git/translate'; - - }, - */ - /** - * 执行翻译操作 - * 已废弃,v1使用的 - */ - execute_v1:function(){ - console.log('=====ERROR======'); - console.log('The v1 version has been discontinued since 2022. Please use the latest V3 version and refer to: http://translate.zvo.cn/41162.html'); - }, - - /** - * 设置Cookie,失效时间一年。 - * @param name - * @param value - * * 已废弃,v1使用的 - */ - setCookie:function (name,value){ - var cookieString=name+"="+escape(value); - document.cookie=cookieString; - }, - - //获取Cookie。若是不存再,返回空字符串 - //* 已废弃,v1使用的 - getCookie:function (name){ - var strCookie=document.cookie; - var arrCookie=strCookie.split("; "); - for(var i=0;i 0){ - return cookieValue.substr(cookieValue.lastIndexOf('/')+1,cookieValue.length-1); - }else{ - return translate.localLanguage; - } - }, - - /** - * 切换语言,比如切换为英语、法语 - * @param languageName 要切换的语言语种。传入如 english - * 会自动根据传入的语言来判断使用哪种版本。比如传入 en、zh-CN 等,则会使用v1.x版本 - * 传入 chinese_simplified 、english 等,则会使用 v2.x版本 - */ - changeLanguage:function(languageName){ - //判断使用的是否是v1.x - var v1 = ',en,de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr,'; - if(v1.indexOf(','+languageName+',') > -1){ - //用的是v1.x - console.log('您使用的是v1版本的切换语种方式,v1已在2021年就以废弃,请更换为v2,参考文档: http://translate.zvo.cn/41549.html'); - translate.check(); - - var googtrans = '/'+translate.localLanguage+'/'+languageName; - - //先清空泛解析域名的设置 - var s = document.location.host.split('.'); - if(s.length > 2){ - var fanDomain = s[s.length-2]+'.'+s[s.length-1]; - document.cookie = 'googtrans=;expires='+(new Date(1))+';domain='+fanDomain+';path=/'; - document.cookie = 'googtrans='+googtrans+';domain='+fanDomain+';path=/'; - } - - translate.setCookie('googtrans', ''+googtrans); - location.reload(); - return; - } - - //用的是v2.x或更高 - //translate.setUseVersion2(); - translate.useVersion = 'v2'; - //判断是否是第一次翻译,如果是,那就不用刷新页面了。 true则是需要刷新,不是第一次翻译 - if(translate.to != null && translate.to.length > 0){ - //当前目标值有值,且目标语言跟当前语言不一致,那当前才是已经被翻译过的 - if(translate.to != translate.language.getLocal()){ - var isReload = true; //标记要刷新页面 - } - } - - - translate.to = languageName; - translate.storage.set('to',languageName); //设置目标翻译语言 - - if(isReload){ - location.reload(); //刷新页面 - }else{ - //不用刷新,直接翻译 - translate.execute(); //翻译 - } - }, - - /** - * 自检提示,适用于 v1.x, 在 v2.x中已废弃 - * english - * 已废弃,v1使用的 - */ - check:function(){ - if(window.location.protocol == 'file:'){ - console.log('\r\n---WARNING----\r\ntranslate.js 主动翻译组件自检异常,当前协议是file协议,翻译组件要在正常的线上http、https协议下才能正常使用翻译功能\r\n------------'); - } - }, - - - /**************************** v2.0 */ - to:'', //翻译为的目标语言,如 english 、chinese_simplified - //用户第一次打开网页时,自动判断当前用户所在国家使用的是哪种语言,来自动进行切换为用户所在国家的语种。 - //如果使用后,第二次在用,那就优先以用户所选择的为主,这个就不管用了 - //默认是false,不使用,可设置true:使用 - //使用 setAutoDiscriminateLocalLanguage 进行设置 - autoDiscriminateLocalLanguage:false, - documents:[], //指定要翻译的元素的集合,可设置多个,如设置: document.getElementsByTagName('DIV') - /* - v2.11.5增加 - 正在进行翻译的节点,会记录到此处。 - 这里是最底的节点了,不会再有下级了。这也就是翻译的最终节点,也就是 translate.element.findNode() 发现的节点 - 也就是扫描到要进行翻译的节点,在翻译前,加入到这里,在这个节点翻译结束后,将这里面记录的节点删掉。 - - 格式如 - [ - { - node: node节点的对象 - number: 2 (当前正在翻译进行中的次数,比如一个节点有中英文混合的文本,那么中文、英文 会同时进行两次翻译,也就是最后要进行两次替换,会导致这个node产生两次改动。每次便是+1、-1) - }, - { - ...... - } - ] - - 生命周期: - - translate.execute() 执行后,会扫描要翻译的字符,扫描完成后首先会判断缓存中是否有,是否会命中缓存,如果缓存中有,那么在加入 task.add 之前就会将这个进行记录 ++ - 在浏览器缓存没有命中后,则会通过网络api请求进行翻译,此时在发起网络请求前,会进行记录 ++ - 当使用 translate.listener.start() 后,网页中动态渲染的部分会触发监听,触发监听后首先会判断这个节点是否存在于这里面正在被翻译,如果存在里面,那么忽略, 如果不存在里面,那么再进行 translate.execute(变动的节点) 进行翻译 (当然执行这个翻译后,自然也就又把它加入到此处进行记录 ++) - 【唯一的减去操作】 在task.execute() 中,翻译完成并且渲染到页面执行完成后,会触发延迟50毫秒后将这个翻译的节点从这里减去 - */ - inProgressNodes:[], - //翻译时忽略的一些东西,比如忽略某个tag、某个class等 - ignore:{ - tag:['style', 'script', 'link', 'pre', 'code'], - class:['ignore','translateSelectLanguage'], - id:[], - /* - 传入一个元素,判断这个元素是否是被忽略的元素。 这个会找父类,看看父类中是否包含在忽略的之中。 - return true是在忽略的之中,false不再忽略的之中 - */ - isIgnore:function(ele){ - if(ele == null || typeof(ele) == 'undefined'){ - return false; - } - - var parentNode = ele; - var maxnumber = 100; //最大循环次数,避免死循环 - while(maxnumber-- > 0){ - if(parentNode == null || typeof(parentNode) == 'undefined'){ - //没有父元素了 - return false; - } - - //判断Tag - //var tagName = parentNode.nodeName.toLowerCase(); //tag名字,小写 - var nodename = translate.element.getNodeName(parentNode).toLowerCase(); //tag名字,小写 - if(nodename.length > 0){ - //有nodename - if(nodename == 'body' || nodename == 'html' || nodename == '#document'){ - //上层元素已经是顶级元素了,那肯定就不是了 - return false; - } - if(translate.ignore.tag.indexOf(nodename) > -1){ - //发现ignore.tag 当前是处于被忽略的 tag - return true; - } - } - - - //判断class name - if(parentNode.className != null){ - var classNames = parentNode.className; - if(classNames == null || typeof(classNames) != 'string'){ - continue; - } - //console.log('className:'+typeof(classNames)); - //console.log(classNames); - classNames = classNames.trim().split(' '); - for(var c_index = 0; c_index < classNames.length; c_index++){ - if(classNames[c_index] != null && classNames[c_index].trim().length > 0){ - //有效的class name,进行判断 - if(translate.ignore.class.indexOf(classNames[c_index]) > -1){ - //发现ignore.class 当前是处于被忽略的 class - return true; - } - } - } - } - - //判断id - if(parentNode.id != null && typeof(parentNode.id) != 'undefined'){ - //有效的class name,进行判断 - if(translate.ignore.id.indexOf(parentNode.id) > -1){ - //发现ignore.id 当前是处于被忽略的 id - return true; - } - } - - //赋予判断的元素向上一级 - parentNode = parentNode.parentNode; - } - - return false; - } - }, - //自定义翻译术语 - nomenclature:{ - /* - 术语表 - 一维:要转换的语种,如 english - 二维:翻译至的目标语种,如 english - 三维:要转换的字符串,如 "你好" - 结果:自定义的翻译结果,如 “Hallo” - */ - data:new Array(), - - /* - 原始术语表,可编辑的 - 一维:要自定义目标词 - 二维:针对的是哪个语种 - 值:要翻译为什么内容 - - 其设置如 - var data = new Array(); - data['版本'] = { - english : 'banben', - korean : 'BanBen' - }; - data['国际化'] = { - english : 'guojihua', - korean : 'GuoJiHua' - }; - - 【已过时】 - */ - old_Data:[], - /* - set:function(data){ - translate.nomenclature.data = data; - }, - */ - set:function(data){ - alert('请将 translate.nomenclature.set 更换为 append,具体使用可参考: https://github.com/xnx3/translate '); - }, - /* - 向当前术语库中追加自定义术语。如果追加的数据重复,会自动去重 - 传入参数: - from 要转换的语种 - to 翻译至的目标语种 - properties 属于配置表,格式如: - 你好=Hello - 世界=ShiJie - - */ - append:function(from, to, properties){ - if(typeof(translate.nomenclature.data[from]) == 'undefined'){ - translate.nomenclature.data[from] = new Array(); - } - if(typeof(translate.nomenclature.data[from][to]) == 'undefined'){ - translate.nomenclature.data[from][to] = new Array(); - } - - //将properties进行分析 - //按行拆分 - var line = properties.split('\n'); - //console.log(line) - for(var line_index = 0; line_index < line.length; line_index++){ - var item = line[line_index].trim(); - if(item.length < 1){ - //空行,忽略 - continue; - } - var kvs = item.split('='); - //console.log(kvs) - if(kvs.length != 2){ - //不是key、value构成的,忽略 - continue; - } - var key = kvs[0].trim(); - var value = kvs[1].trim(); - //console.log(key) - if(key.length == 0 || value.length == 0){ - //其中某个有空,则忽略 - continue; - } - - - //加入,如果之前有加入,则会覆盖 - translate.nomenclature.data[from][to][key] = value; - //console.log(local+', '+target+', key:'+key+', value:'+value); - } - - //追加完后,对整个对象数组进行排序,key越大越在前面 - translate.nomenclature.data[from][to] = translate.util.objSort(translate.nomenclature.data[from][to]); - - }, - //获取当前定义的术语表 - get:function(){ - return translate.nomenclature.data; - }, - //对传入的str字符进行替换,将其中的自定义术语提前进行替换,然后将替换后的结果返回 - dispose:function(str){ - if(str == null || str.length == 0){ - return str; - } - //if(translate.nomenclature.data.length == 0){ - // return str; - //} - //判断当前翻译的两种语种是否有自定义术语库 - //console.log(typeof(translate.nomenclature.data[translate.language.getLocal()][translate.to])) - if(typeof(translate.nomenclature.data[translate.language.getLocal()]) == 'undefined' || typeof(translate.nomenclature.data[translate.language.getLocal()][translate.to]) == 'undefined'){ - return str; - } - //console.log(str) - for(var originalText in translate.nomenclature.data[translate.language.getLocal()][translate.to]){ - var translateText = translate.nomenclature.data[translate.language.getLocal()][translate.to][originalText]; - if(typeof(translateText) == 'function'){ - //进行异常的预处理调出 - continue; - } - - var index = str.indexOf(originalText); - if(index > -1){ - //console.log('find -- '+originalText+', \t'+translateText); - if(translate.language.getLocal() == 'english'){ - //如果本地语种是英文,那么还要判断它的前后,避免比如要替换 is 将 display 中的is给替换,将单词给强行拆分了 - - //判断这个词前面是否符合 - var beforeChar = ''; //前面的字符 - if(index == 0){ - //前面没别的字符了,那前面合适 - }else{ - //前面有别的字符,判断是什么字符,如果是英文,那么这个是不能被拆分的,要忽略 - beforeChar = str.substr(index-1,1); - //console.log('beforeChar:'+beforeChar+', str:'+str) - var lang = translate.language.getCharLanguage(beforeChar); - //console.log(lang); - if(lang == 'english'){ - //调出,不能强拆 - continue; - } - } - - //判断这个词的后面是否符合 - var afterChar = ''; //后面的字符 - if(index + originalText.length == str.length ){ - //后面没别的字符了,那前面合适 - //console.log(originalText+', meile '+str) - }else{ - //后面有别的字符,判断是什么字符,如果是英文,那么这个是不能被拆分的,要忽略 - afterChar = str.substr(index+originalText.length,1); - var lang = translate.language.getCharLanguage(afterChar); - if(lang == 'english'){ - //跳出,不能强拆 - continue; - } - } - - str = str.replace(new RegExp(beforeChar+originalText+afterChar,'g'), beforeChar+translateText+afterChar); - }else{ - //其他情况,如汉语、汉语等语种 - str = str.replace(new RegExp(originalText,'g'), translateText); - } - - } - } - - return str; - - /* - //遍历一维 - for(var originalText in translate.nomenclature.data){ - var languageResult = translate.nomenclature.data[originalText]; - if(typeof(languageResult) == 'function'){ - //进行异常的预处理调出 - continue; - } - - if(typeof(languageResult[translate.to]) == 'undefined'){ - //console.log('und'); - continue; - } - - //var hash = translate.util.hash(originalText); - - //console.log(originalText+',\t'+str); - if(str.indexOf(originalText) > -1){ - //console.log('find -- '+originalText+', \t'+languageResult[translate.to]); - str = str.replace(new RegExp(originalText,'g'),languageResult[translate.to]); - } - } - - - return str; - */ - }, - - }, - office:{ - /* - 网页上翻译之后,自动导出当前页面的术语库 - - 需要先指定本地语种,会自动将本地语种进行配置术语库 - - */ - export:function(){ - if(translate.language.getLocal() == translate.language.getCurrent()){ - alert('本地语种跟要翻译的语种一致,无需导出'); - return; - } - - var text = ''; - for(var uuid in translate.nodeQueue){ - var queueValue = translate.nodeQueue[uuid]; - for(var lang in translate.nodeQueue[uuid].list){ - //console.log('------'+lang) - if(typeof(lang) != 'string' || lang.length < 1){ - continue; - } - //if(translate.language.getLocal() == lang){ - //console.log(translate.nodeQueue[uuid].list[lang]); - for(var hash in translate.nodeQueue[uuid].list[lang]){ - //console.log(translate.nodeQueue[uuid].list[lang][hash].original); - //console.log(translate.nodeQueue[uuid].list[lang][hash].original); - text = text + '\n' + translate.nodeQueue[uuid].list[lang][hash].original + '='+translate.storage.get('hash_'+translate.language.getCurrent()+'_'+hash); - - } - //} - } - - } - - if(text.length > 0){ - //有内容 - text = 'translate.office.append(\''+translate.language.getCurrent()+'\',`'+text+'\n`);'; - //console.log(text); - translate.util.loadMsgJs(); - msg.popups({ - text:'', - width:'750px', - height:'600px', - padding:'1px', - }); - document.getElementById('msgPopupsTextarea').value = text; - }else{ - msg.alert('无有效内容!'); - } - - - }, - //显示导出面板 - showPanel:function(){ - let panel = document.createElement('div'); - panel.setAttribute('id', 'translate_export'); - panel.setAttribute('class','ignore'); - - //导出按钮 - let button = document.createElement('button'); - button.onclick = function() { - translate.office.export(); - }; - button.innerHTML = '导出配置信息'; - button.setAttribute('style', 'margin-left: 72px; margin-top: 30px; margin-bottom: 20px; font-size: 25px; background-color: blue; padding: 15px; padding-top: 3px; padding-bottom: 3px; border-radius: 3px;'); - panel.appendChild(button); - - //说明文字 - let textdiv = document.createElement('div'); - textdiv.innerHTML = '1. 首先将当前语种切换为你要翻译的语种
2. 点击导出按钮,将翻译的配置信息导出
3. 将导出的配置信息粘贴到代码中,即可完成
点此进行查阅详细使用说明'; - textdiv.setAttribute('style','font-size: 14px; padding: 12px;'); - - panel.appendChild(textdiv); - - panel.setAttribute('style', 'background-color: black; color: #fff; width: 320px; height: 206px; position: fixed; bottom: 50px; right: 50px;'); - //把元素节点添加到body元素节点中成为其子节点,放在body的现有子节点的最后 - document.body.appendChild(panel); - - translate.util.loadMsgJs(); - }, - /* - 追加离线翻译数据。如果追加的数据重复,会自动去重 - 传入参数: - from 要转换的语种 - to 翻译至的目标语种 - properties 属于配置表,格式如: - 你好=Hello - 世界=ShiJie - 这个传入参数跟 translate.nomenclature.append 的传入参数格式是一致的 - */ - append:function(to, properties){ - //console.log(properties) - //将properties进行分析 - //按行拆分 - var line = properties.split('\n'); - //console.log(line) - for(var line_index = 0; line_index < line.length; line_index++){ - var item = line[line_index].trim(); - if(item.length < 1){ - //空行,忽略 - continue; - } - var kvs = item.split('='); - //console.log(kvs) - if(kvs.length != 2){ - //不是key、value构成的,忽略 - continue; - } - var key = kvs[0]; - var value = kvs[1]; - //console.log(key) - if(key.length == 0 || value.length == 0){ - //其中某个有空,则忽略 - continue; - } - //console.log('set---'+key); - //加入 storate - translate.storage.set('hash_'+to+'_'+translate.util.hash(key), value); - } - }, - }, - setAutoDiscriminateLocalLanguage:function(){ - translate.autoDiscriminateLocalLanguage = true; - }, - /* - 待翻译的页面的node队列 - 一维:key:uuid,也就是execute每次执行都会创建一个翻译队列,这个是翻译队列的唯一标识。 - value: - k/v - 二维:对象形态,具体有: - key:expireTime 当前一维数组key的过期时间,到达过期时间会自动删除掉这个一维数组。如果<0则代表永不删除,常驻内存 - value:list 待翻译的页面的node队列 - 三维:针对二维的value, key:english、chinese_simplified等语种,这里的key便是对value的判断,取value中的要翻译的词是什么语种,对其进行了语种分类 value: k/v - 四维:针对三维的value, key:要翻译的词(经过语种分割的)的hash, value: node数组 - 五维:针对四维的value, 这是个对象, 其中 - original: 是三维的key的hash的原始文字,也就是 node 中的原始文字。 - cacheHash: 如果翻译时匹配到了自定义术语库中的词,那么翻译完后存入到缓存中时,其缓存的翻译前字符串已经不是original,而是匹配完术语库后的文本的hash了。所以这里额外多增加了这个属性。如果匹配了术语库,那这里就是要进行缓存的翻译前文本的hash,如果未使用术语库,这里就跟其key-hash 相同。 - translateText: 针对 original 的经过加工过的文字,比如经过自定义术语操作后的,待翻译的文字。 - nodes: 有哪些node元素中包含了这个词,都会在这里记录 - 六维:针对五维的 nodes,将各个具体的 node 以及 其操作的 attribute 以数组形式列出 - 七维:针对六维列出的nodes数组,其中包含: - node: 具体操作的node元素 - attribute: 也就是翻译文本针对的是什么,是node本身(nodeValue),还是 node 的某个属性,比如title属性,这则是设置为 "title"。如果这里不为空,那就是针对的属性操作的。 如果这里为空或者undefined ,那就是针对node本身,也就是 nodeValue 的字符串操作的 - beforeText: node元素中进行翻译结果赋予时,额外在翻译结果的前面加上的字符串。其应用场景为,如果中英文混合场景下,避免中文跟英文挨着导致翻译为英语后,连到一块了。默认是空字符串 '' - afterText: node元素中进行翻译结果赋予时,额外在翻译结果的后面加上的字符串。其应用场景为,如果中英文混合场景下,避免中文跟英文挨着导致翻译为英语后,连到一块了。默认是空字符串 '' - - 生命周期: 当execute()执行时创建, 当execute结束(其中的所有request接收到响应并渲染完毕)时销毁(当前暂时不销毁,以方便调试) - */ - nodeQueue:{}, - //指定要翻译的元素的集合,可传入一个元素或多个元素 - //如设置一个元素,可传入如: document.getElementsById('test') - //如设置多个元素,可传入如: document.getElementsByTagName('DIV') - setDocuments:function(documents){ - if (documents == null || typeof(documents) == 'undefined') { - return; - } - - if(typeof(documents.length) == 'undefined'){ - //不是数组,是单个元素 - translate.documents[0] = documents; - }else{ - //是数组,直接赋予 - translate.documents = documents; - } - //清空翻译队列,下次翻译时重新检索 - translate.nodeQueue = {}; - //console.log('set documents , clear translate.nodeQueue'); - }, - //获取当前指定翻译的元素(数组形式 [document,document,...]) - //如果用户未使用setDocuments 指定的,那么返回整个网页 - getDocuments:function(){ - if(translate.documents != null && typeof(translate.documents) != 'undefined' && translate.documents.length > 0){ - // setDocuments 指定的 - return translate.documents; - }else{ - //未使用 setDocuments指定,那就是整个网页了 - return document.all; //翻译所有的 - } - }, - listener:{ - //当前页面打开后,是否已经执行完execute() 方法进行翻译了,只要执行完一次,这里便是true。 (多种语言的API请求完毕并已渲染html) - //isExecuteFinish:false, - //是否已经使用了 translate.listener.start() 了,如果使用了,那这里为true,多次调用 translate.listener.start() 只有第一次有效 - isStart:false, - //translate.listener.start(); //开启html页面变化的监控,对变化部分会进行自动翻译。注意,这里变化区域,是指使用 translate.setDocuments(...) 设置的区域。如果未设置,那么为监控整个网页的变化 - start:function(){ - - translate.temp_linstenerStartInterval = setInterval(function(){ - if(document.readyState == 'complete'){ - //dom加载完成,进行启动 - clearInterval(translate.temp_linstenerStartInterval);//停止 - translate.listener.addListener(); - } - - //if(translate.listener.isExecuteFinish){ //执行完过一次,那才能使用 - /*if(translate.listener.isStart){ - //已开启了 - return; - }*/ - - //console.log('translate.temp_linstenerStartInterval Finish!'); - //} - }, 300); - - - }, - //增加监听,开始监听。这个不要直接调用,需要使用上面的 start() 开启 - addListener:function(){ - translate.listener.isStart = true; //记录已执行过启动方法了 - - // 观察器的配置(需要观察什么变动) - translate.listener.config = { attributes: true, childList: true, subtree: true, characterData: true, attributeOldValue:true, characterDataOldValue:true }; - // 当观察到变动时执行的回调函数 - translate.listener.callback = function(mutationsList, observer) { - var documents = []; //有变动的元素 - //console.log('--------- lisetner 变动'); - // Use traditional 'for loops' for IE 11 - for(let mutation of mutationsList) { - let addNodes = []; - if (mutation.type === 'childList') { - if(mutation.addedNodes.length > 0){ - //多了组件 - addNodes = mutation.addedNodes; - //documents.push.apply(documents, mutation.addedNodes); - }else if(mutation.removedNodes.length > 0){ - //console.log('remove:'); - //console.log(mutation.removedNodes); - }else{ - //console.log('not find:'); - //console.log(mutation); - } - }else if (mutation.type === 'attributes') { - //console.log('The ' + mutation.attributeName + ' attribute was modified.'); - }else if(mutation.type === 'characterData'){ - //内容改变 - addNodes = [mutation.target]; - //documents.push.apply(documents, [mutation.target]); - } - - //去重并加入 documents - for(let item of addNodes){ - //console.log(item); - - //判断是否已经加入过了,如果已经加入过了,就不重复加了 - var isFind = false; - for(var di = 0; di < documents.length; di++){ - if(documents[di].isSameNode(item)){ - isFind = true; - break; - } - } - if(isFind){ - break; - } - documents.push.apply(documents, [item]); - } - } - - //console.log(documents.length); - if(documents.length > 0){ - //有变动,需要看看是否需要翻译,延迟10毫秒执行 - - //判断是否属于在正在翻译的节点,重新组合出新的要翻译的node集合 - var translateNodes = []; - //console.log(translate.inProgressNodes.length); - for(let ipnode of documents){ - //console.log('---type:'+ipnode.nodeType); - - var find = false; - for(var ini = 0; ini < translate.inProgressNodes.length; ini++){ - if(translate.inProgressNodes[ini].node.isSameNode(ipnode)){ - //有记录了,那么忽略这个node,这个node是因为翻译才导致的变动 - //console.log('发现相同'); - find = true; - break; - } - } - if(find){ - continue; - } - - //不相同,才追加到新的 translateNodes - translateNodes.push(ipnode); - //console.log('listener ++ '+ipnode.nodeValue); - //console.log(ipnode); - } - if(translateNodes.length < 1){ - return; - } - //console.log('translateNodeslength: '+translateNodes.length); - - - setTimeout(function() { - //console.log(translateNodes); - translate.execute(translateNodes); //指定要翻译的元素的集合,可传入一个或多个元素。如果不设置,默认翻译整个网页 - }, 10); //这个要比 task.execute() 中的 settimeout 延迟执行删除 translate.inpr.....nodes 的时间要小,目的是前一个发生变动后,记入 inpr...nodes 然后翻译完成后节点发生变化又触发了listener,此时 inpr....nodes 还有,那么这个变化将不做处理,然后 inp.....nodes 再删除这个标记 - } - }; - // 创建一个观察器实例并传入回调函数 - translate.listener.observer = new MutationObserver(translate.listener.callback); - // 以上述配置开始观察目标节点 - var docs = translate.getDocuments(); - for(var docs_index = 0; docs_index < docs.length; docs_index++){ - var doc = docs[docs_index]; - if(doc != null){ - translate.listener.observer.observe(doc, translate.listener.config); - } - } - }, - /* - 每当执行完一次渲染任务(翻译)时会触发此。注意页面一次翻译会触发多个渲染任务。普通情况下,一次页面的翻译可能会触发两三次渲染任务。 - 另外如果页面中有ajax交互方面的信息,时,每次ajax信息刷新后,也会进行翻译,也是一次渲染任务。 - 这个是为了方便扩展使用。比如在layui中扩展,监控 select 的渲染 - */ - renderTaskFinish:function(renderTask){ - //console.log(renderTask); - } - }, - //对翻译结果进行替换渲染的任务,将待翻译内容替换为翻译内容的过程 - renderTask:class{ - constructor(){ - /* - * 任务列表 - * 一维数组 [hash] = tasks; tasks 是多个task的数组集合 - * 二维数组 [task,task,...],存放多个 task,每个task是一个替换。这里的数组是同一个nodeValue的多个task替换 - * 三维数组 task['originalText'] 、 task['resultText'] 存放要替换的字符串 - task['attribute'] 存放要替换的属性,比如 a标签的title属性。 如果是直接替换node.nodeValue ,那这个没有 - */ - this.taskQueue = []; - - /* - * 要进行翻译的node元素, - * 一维数组 key:node.nodeValue 的 hash , value:node的元素数组 - * 二维数组,也就是value中包含的node集合 [node,node,...] - */ - this.nodes = []; - } - - /** - * 向替换队列中增加替换任务 - * node:要替换的字符属于那个node元素 - * originalText:待翻译的字符 - * resultText:翻译后的结果字符 - * attribute: 要替换的是哪个属性,比如 a标签的title属性,这里便是传入title。如果不是替换属性,这里不用传入,或者传入null - */ - add(node, originalText, resultText, attribute){ - var nodeAnaly = translate.element.nodeAnalyse.get(node, attribute); //node解析 - //var hash = translate.util.hash(translate.element.getTextByNode(node)); //node中内容的hash - var hash = translate.util.hash(nodeAnaly['text']); - //console.log('--------------'+hash); - //console.log(nodeAnaly); - //console.log(node); - //console.log('originalText:'+originalText+', resultText:'+resultText+', attribute:'+attribute); - /****** 加入翻译的元素队列 */ - if(typeof(this.nodes[hash]) == 'undefined'){ - this.nodes[hash] = new Array(); - } - this.nodes[hash].push(node); - //console.log(node) - - /****** 加入翻译的任务队列 */ - var tasks = this.taskQueue[hash]; - if(tasks == null || typeof(tasks) == 'undefined'){ - //console.log(node.nodeValue); - tasks = new Array(); //任务列表,存放多个 task,每个task是一个替换。这里的数组是同一个nodeValue的多个task替换 - } - var task = new Array(); - - //v2.3.3 增加 -- 开始 - //这里要进行处理,因为有时候翻译前,它前或者后是有空格的,但是翻译后会把前或者后的空格给自动弄没了,如果是这种情况,要手动补上 - if (originalText.substr(0, 1) == ' ') { - //console.log('第一个字符是空格'); - if(resultText.substr(0, 1) != ' '){ - //翻译结果的第一个字符不是空格,那么补上 - resultText = ' ' + resultText; - } - } - if (originalText.substr(originalText.length - 1, 1) === ' ') { - //console.log('最后一个字符是空格'); - if(resultText.substr(0, 1) != ' '){ - //翻译结果的最后一个字符不是空格,那么补上 - resultText = resultText + ' '; - } - } - //v2.3.3 增加 -- 结束 - - task['originalText'] = originalText; - task['resultText'] = resultText; - task['attribute'] = attribute; - - //console.log(task); - tasks.push(task); - this.taskQueue[hash] = tasks; - /****** 加入翻译的任务队列 end */ - } - //进行替换渲染任务,对页面进行渲染替换翻译 - execute(){ - //先对tasks任务队列的替换词进行排序,将同一个node的替换词有大到小排列,避免先替换了小的,大的替换时找不到 - for(var hash in this.taskQueue){ - var tasks = this.taskQueue[hash]; - if(typeof(tasks) == 'function'){ - //进行异常的预处理调出 - continue; - } - - //进行排序,将原字符串长的放前面,避免造成有部分不翻译的情况(bug是先翻译了短的,导致长的被打断而无法进行适配) - tasks.sort((a, b) => b.originalText.length - a.originalText.length); - - this.taskQueue[hash] = tasks; - } - - //console.log('===========task========='); - //console.log(this.taskQueue); - //console.log(this.nodes); - //console.log('===========task======end==='); - - //对nodeQueue进行翻译 - for(var hash in this.nodes){ - var tasks = this.taskQueue[hash]; //取出当前node元素对应的替换任务 - //var tagName = this.nodes[hash][0].nodeName; //以下节点的tag name - //console.log(tasks); - for(var node_index = 0; node_index < this.nodes[hash].length; node_index++){ - //对这个node元素进行替换翻译字符 - for(var task_index=0; task_index 0){ - //50毫秒后执行,以便页面渲染完毕 - var renderTask = this; - setTimeout(function() { - - /** 执行完成后,保存翻译的历史node **/ - //将当前翻译完成的node进行缓存记录,以node唯一标识为key, node、以及node当前翻译之后的内容为值进行缓存。方便下一次执行 translate.execute() 时,若值未变化则不进行翻译 - for(var hash in renderTask.nodes){ - //console.log(translate.nodeQueue[uuid].list[lang][hash]) - for(var nodeindex in renderTask.nodes[hash]){ - //console.log(translate.nodeQueue[uuid].list[lang][hash].original); - //var nodename = translate.element.getNodeName(translate.nodeQueue[uuid].list[lang][hash].nodes[0].node); - //console.log("nodename:"+nodename); - var analyse = translate.element.nodeAnalyse.get(renderTask.nodes[hash][0]); - //analyse.text analyse.node - var nodeid = nodeuuid.uuid(analyse.node); - - if(nodeid.length == 0){ - //像是input的placeholder 暂时没考虑进去,这种就直接忽略了 - continue; - } - - //加入 - /* - if(typeof(translate.nodeHistory[nodeid]) == 'object'){ - //已经加入过了,判断它的值是否有发生过变化 - - if(translate.nodeHistory[nodeid].translateText == analyse.text){ - //值相同,就不用再加入了 - continue; - } - } - 这里就不用判断了,直接同步到最新的,因为同一个node,可能有本地缓存直接更新,这样会非常快,网络的会慢2秒,因时间导致同步不是最新的 - */ - //console.log(analyse); - //console.log('add-----'+analyse.text +', uuid:'+nodeid); - //console.log(analyse.node); - translate.nodeHistory[nodeid] = {}; - translate.nodeHistory[nodeid].node = analyse.node; - translate.nodeHistory[nodeid].translateText = analyse.text; - } - - } - //console.log(translate.nodeHistory); - - /** 执行完成后,触发用户自定义的翻译完成执行函数 **/ - translate.listener.renderTaskFinish(renderTask); - - }, 50); - - }else{ - //console.log(this.taskQueue); - //console.log('---this.taskQueue is null'); - } - } - }, - - //执行翻译操作。翻译的是 nodeQueue 中的 - //docs 如果传入,那么翻译的只是传入的这个docs的。传入如 [document.getElementById('xxx'),document.getElementById('xxx'),...] - execute:function(docs){ - if(typeof(docs) != 'undefined'){ - //execute传入参数,只有v2版本才支持 - translate.useVersion = 'v2'; - } - - if(translate.useVersion == 'v1'){ - //if(this.to == null || this.to == ''){ - //采用1.x版本的翻译,使用google翻译 - //translate.execute_v1(); - //return; - //v2.5.1增加 - console.log('提示:https://github.com/xnx3/translate 在 v2.5 版本之后,由于谷歌翻译调整,免费翻译通道不再支持,所以v1版本的翻译接口不再被支持,v1全线下架。考虑到v1已不能使用,当前已自动切换到v2版本。如果您使用中发现什么异常,请针对v2版本进行适配。'); - translate.useVersion = 'v2'; - } - - //版本检测 - try{ - translate.init(); - }catch(e){ } - - /****** 采用 2.x 版本的翻译,使用自有翻译算法 */ - - - //每次执行execute,都会生成一个唯一uuid,也可以叫做队列的唯一标识,每一次执行execute都会创建一个独立的翻译执行队列 - var uuid = translate.util.uuid(); - //console.log('=====') - //console.log(translate.nodeQueue); - - /* v2.4.3 将初始化放到了 translate.element.whileNodes 中,如果uuid对应的没有,则自动创建 - - translate.nodeQueue[uuid] = new Array(); //创建 - translate.nodeQueue[uuid]['expireTime'] = Date.now() + 120*1000; //删除时间,10分钟后删除 - translate.nodeQueue[uuid]['list'] = new Array(); - */ - //console.log(translate.nodeQueue); - //console.log('=====end') - - //如果页面打开第一次使用,先判断缓存中有没有上次使用的语种,从缓存中取出 - if(translate.to == null || translate.to == ''){ - var to_storage = translate.storage.get('to'); - if(to_storage != null && typeof(to_storage) != 'undefined' && to_storage.length > 0){ - translate.to = to_storage; - } - } - - //渲染select选择语言 - try{ - translate.selectLanguageTag.render(); - }catch(e){ - console.log(e); - } - - //判断是否还未指定翻译的目标语言 - if(translate.to == null || typeof(translate.to) == 'undefined' || translate.to.length == 0){ - //未指定,判断如果指定了自动获取用户本国语种了,那么进行获取 - if(translate.autoDiscriminateLocalLanguage){ - translate.executeByLocalLanguage(); - } - - //没有指定翻译目标语言、又没自动获取用户本国语种,则不翻译 - return; - } - - //判断本地语种跟要翻译的目标语种是否一样,如果是一样,那就不需要进行任何翻译 - if(translate.to == translate.language.getLocal()){ - return; - } - - /********** 翻译进行 */ - - //先进行图片的翻译替换,毕竟图片还有加载的过程 - translate.images.execute(); - - /* - 进行翻译指定的node操作。优先级为: - 1. 这个方法已经指定的翻译 nodes - 2. setDocuments 指定的 - 3. 整个网页 - 其实2、3都是通过 getDocuments() 取,在getDocuments() 就对2、3进行了判断 - */ - var all; - if(typeof(docs) != 'undefined'){ - //1. 这个方法已经指定的翻译 nodes - - if(docs == null){ - //要翻译的目标区域不存在 - console.log('translate.execute(...) 中传入的要翻译的目标区域不存在。'); - return; - } - - if(typeof(docs.length) == 'undefined'){ - //不是数组,是单个元素 - all = new Array(); - all[0] = docs; - }else{ - //是数组,直接赋予 - all = docs; - } - - }else{ - //2、3 - all = translate.getDocuments(); - } - //console.log('----要翻译的目标元素-----'); - //console.log(all) - - //检索目标内的node元素 - for(var i = 0; i< all.length & i < 20; i++){ - var node = all[i]; - translate.element.whileNodes(uuid, node); - } - - /***** translate.language.translateLanguagesRange 开始 *****/ - if(translate.language.translateLanguagesRange.length > 0){ - //如果大于0,则是有设置,那么只翻译有设置的语种,不在设置中的语种不会参与翻译 - for(var lang in translate.nodeQueue[uuid].list){ - if(translate.language.translateLanguagesRange.indexOf(lang) < 0){ - //删除这个语种 - delete translate.nodeQueue[uuid].list[lang]; - } - } - } - - /***** translate.language.translateLanguagesRange 结束 *****/ - - - //console.log(translate.nodeHistory); - //console.log(translate.nodeQueue[uuid]) - for(var lang in translate.nodeQueue[uuid].list){ - //console.log('lang:'+lang) - for(var hash in translate.nodeQueue[uuid].list[lang]){ - //console.log(hash) - if(typeof(translate.nodeQueue[uuid].list[lang][hash]) == 'function'){ - //v2.10增加,避免hash冒出个 Contains 出来导致for中的.length 出错 - continue; - } - for(var nodeindex = translate.nodeQueue[uuid].list[lang][hash].nodes.length-1; nodeindex > -1; nodeindex--){ - //console.log(translate.nodeQueue[uuid].list[lang][hash].nodes); - var analyse = translate.element.nodeAnalyse.get(translate.nodeQueue[uuid].list[lang][hash].nodes[nodeindex].node); - //analyse.text analyse.node - var nodeid = nodeuuid.uuid(analyse.node); - //translate.nodeQueue[uuid].list[lang][hash].nodes.splice(nodeindex, 1); - //console.log(nodeid+'\t'+analyse.text); - if(typeof(translate.nodeHistory[nodeid]) != 'undefined'){ - //存在,判断其内容是否发生了改变 - //console.log('比较---------'); - //console.log(translate.nodeHistory[nodeid].translateText); - //console.log(analyse.text); - if(translate.nodeHistory[nodeid].translateText == analyse.text){ - //内容未发生改变,那么不需要再翻译了,从translate.nodeQueue中删除这个node - translate.nodeQueue[uuid].list[lang][hash].nodes.splice(nodeindex, 1); - //console.log('发现相等的node,删除 '+analyse.text+'\t'+hash); - }else{ - //console.log("发现变化的node =======nodeid:"+nodeid); - //console.log(translate.nodeHistory[nodeid].translateText == analyse.text); - //console.log(translate.nodeHistory[nodeid].node); - //console.log(translate.nodeHistory[nodeid].translateText); - //console.log(analyse.text); - - } - }else{ - //console.log('未在 nodeHistory 中发现,新的node nodeid:'+nodeid); - //console.log(analyse.node) - } - } - if(translate.nodeQueue[uuid].list[lang][hash].nodes.length == 0){ - //如果node数组中已经没有了,那么直接把这个hash去掉 - delete translate.nodeQueue[uuid].list[lang][hash]; - } - } - if(Object.keys(translate.nodeQueue[uuid].list[lang]).length == 0){ - //如果这个语言中没有要翻译的node了,那么删除这个语言 - delete translate.nodeQueue[uuid].list[lang]; - } - } - //console.log('new queuq'); - //console.log(translate.nodeQueue[uuid]) - //translate.nodeHistory[nodeid] - - - //console.log('-----待翻译:----'); - //console.log(translate.nodeQueue); - - //translateTextArray[lang][0] - var translateTextArray = {}; //要翻译的文本的数组,格式如 ["你好","欢迎"] - var translateHashArray = {}; //要翻译的文本的hash,跟上面的index是一致的,只不过上面是存要翻译的文本,这个存hash值 - - - /* - 要进行第二次扫描的node - 2023.8.22 解决缓存会打散扫描到的翻译文本,导致翻译结束后找寻不到而导致不翻译的问题 - 一维 key: lang - 二维 key: hash - 三维 key: - node: 当前的node元素 - 四维 array: 当前缓存中进行翻译的文本数组: - cacheOriginal: 已缓存被替换前的文本 - cacheTranslateText: 已缓存被替换后的翻译文本 - - */ - var twoScanNodes = {}; - var cacheScanNodes = []; //同上面的 twoScanNodes,只不过 twoScanNodes 是按照lang存的,而这个不再有lang区分 - for(var lang in translate.nodeQueue[uuid]['list']){ //二维数组中,取语言 - //console.log('lang:'+lang); //lang为english这种语言标识 - if(lang == null || typeof(lang) == 'undefined' || lang.length == 0 || lang == 'undefined'){ - //console.log('lang is null : '+lang); - continue; - } - - translateTextArray[lang] = []; - translateHashArray[lang] = []; - - let task = new translate.renderTask(); - //console.log(translate.nodeQueue); - - twoScanNodes[lang] = []; - //二维数组,取hash、value - for(var hash in translate.nodeQueue[uuid]['list'][lang]){ - if(typeof(translate.nodeQueue[uuid]['list'][lang][hash]) == 'function'){ - //跳出,增加容错。 正常情况下应该不会这样 - continue; - } - - //取原始的词,还未经过翻译的,需要进行翻译的词 - //var originalWord = translate.nodeQueue[uuid]['list'][lang][hash]['original']; - - //原始的node中的词 - var originalWord = translate.nodeQueue[uuid]['list'][lang][hash]['original']; - //要翻译的词 - var translateText = translate.nodeQueue[uuid]['list'][lang][hash]['translateText']; - //console.log(originalWord); -/* - //自定义术语后的。如果 - var nomenclatureOriginalWord = translate.nomenclature.dispose(cache); - if(nomenclatureOriginalWord != originalWord){ - has - } -*/ - //console.log(originalWord == translateText ? '1':'xin:'+translateText); - //根据hash,判断本地是否有缓存了 - var cacheHash = originalWord == translateText ? hash:translate.util.hash(translateText); //如果匹配到了自定义术语库,那翻译前的hash是被改变了 - translate.nodeQueue[uuid]['list'][lang][hash]['cacheHash'] = cacheHash; //缓存的hash。 缓存时,其hash跟翻译的语言是完全对应的,缓存的hash就是翻译的语言转换来的 - var cache = translate.storage.get('hash_'+translate.to+'_'+cacheHash); - //console.log(cacheHash+', '+cache); - - //var twoScanNodes[] = []; //要进行第二次扫描的node - if(cache != null && cache.length > 0){ - //有缓存了 - //console.log('find cache:'+cache); - //直接将缓存赋予 - //for(var index = 0; index < this.nodeQueue[lang][hash].length; index++){ - //this.nodeQueue[lang][hash][index].nodeValue = cache; - - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - //console.log(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]); - - - //加入 translate.inProgressNodes - //取得这个翻译的node - var ipnode = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node']; - - //判断这个node是否已经在 inProgressNodes 记录了 - var isFind = false; - for(var ini = 0; ini < translate.inProgressNodes.length; ini++){ - if(translate.inProgressNodes[ini].node.isSameNode(ipnode)){ - //有记录了,那么出现次数 +1 - translate.inProgressNodes[ini].number++; - isFind = true; - //console.log('cache - find - ++ '); - //console.log(ipnode); - } - } - //未发现,那么还要将这个node加入进去 - if(!isFind){ - //console.log('cache - find - add -- lang:'+lang+', hash:'+hash+' node_index:'+node_index); - //console.log(ipnode.nodeValue); - translate.inProgressNodes.push({node: ipnode, number:1}); - } - - //console.log(translate.inProgressNodes); - //加入 translate.inProgressNodes -- 结束 - - //翻译结果的文本,包含了before 、 after 了 - var translateResultText = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['beforeText']+cache+translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['afterText']; - task.add(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'], originalWord, translateResultText, translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['attribute']); - //this.nodeQueue[lang][hash]['nodes'][node_index].nodeValue = this.nodeQueue[lang][hash]['nodes'][node_index].nodeValue.replace(new RegExp(originalWord,'g'), cache); - //console.log(translateResultText); - - //重新扫描这个node,避免这种情况: - //localstorage缓存中有几个词的缓存了,但是从缓存中使用时,把原本识别的要翻译的数据给打散了,导致翻译结果没法赋予,导致用户展示时有些句子没成功翻译的问题 -- 2023.8.22 - //console.log('继续扫描 + 1 - '+twoScanNodes.length); - var twoScanIndex = -1; //当前元素是否在 twoScan 中已经加入了,如果已经加入了,那么这里赋予当前所在的下标 - for(var i = 0; i 0){ - //因为在这个数组中的值都是一样的,那么只需要取出第一个就行了 - var valueStr = queueNodes[0].nodeValue; - valueStr = this.util.charReplace(valueStr); - - translateTextArray[lang].push(valueStr); - translateHashArray[lang].push(hash); - } - */ - - //加入待翻译数组 - translateTextArray[lang].push(translateText); - translateHashArray[lang].push(hash); //这里存入的依旧还是用原始hash,未使用自定义术语库前的hash,目的是不破坏 nodeQueue 的 key - } - - task.execute(); //执行渲染任务 - } - //console.log(twoScanNodes); - //console.log('cacheScanNodes:'); - //console.log(cacheScanNodes); - - /******* 进行第二次扫描、追加入翻译队列。目的是防止缓存打散扫描的待翻译文本 ********/ - for(var lang in twoScanNodes){ - //记录第一次扫描的数据,以便跟第二次扫描后的进行对比 - var firstScan = Object.keys(translate.nodeQueue[uuid]['list'][lang]); - var firstScan_lang_langth = firstScan.length; //第一次扫描后的数组长度 - - //console.log(twoScanNodes[lang]); - for(var i = 0; i -1){ - //发现了,那么强制赋予翻以前内容 - text = translateTextArray[data.from][i]; - } - - - //翻译前的hash对应下标 - var hash = translateHashArray[data.from][i]; - var cacheHash = translate.nodeQueue[uuid]['list'][lang][hash]['cacheHash']; - - - - //取原始的词,还未经过翻译的,需要进行翻译的词 - var originalWord = ''; - try{ - originalWord = translate.nodeQueue[uuid]['list'][lang][hash]['original']; - //console.log('bef:'+translate.nodeQueue[uuid]['list'][lang][hash]['beforeText']); - }catch(e){ - console.log('uuid:'+uuid+', originalWord:'+originalWord+', lang:'+lang+', hash:'+hash+', text:'+text+', queue:'+translate.nodeQueue[uuid]); - console.log(e); - continue; - } - - //for(var index = 0; index < translate.nodeQueue[lang][hash].length; index++){ - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - //translate.nodeQueue[lang][hash]['nodes'][node_index].nodeValue = translate.nodeQueue[lang][hash]['nodes'][node_index].nodeValue.replace(new RegExp(originalWord,'g'), text); - //加入任务 - task.add(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'], originalWord, translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['beforeText']+text+translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['afterText'], translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['attribute']); - } - //} - /* - for(var index = 0; index < translate.nodeQueue[data.from][hash].length; index++){ - translate.nodeQueue[data.from][hash][index].nodeValue = text; - } - */ - - //将翻译结果以 key:hash value翻译结果的形式缓存 - translate.storage.set('hash_'+data.to+'_'+cacheHash,text); - } - task.execute(); //执行渲染任务 - //translate.temp_executeFinishNumber++; //记录执行完的次数 - - }); - /*** 翻译end ***/ - - - } - }, - /* - 将已成功翻译并渲染的node节点进行缓存记录 - key: node节点的唯一标识符,通过 nodeuuid.uuid() 生成 - value: - node: node节点 - translateText: 翻译完成后,当前node节点的内容文本(是已经翻译渲染过的) - */ - nodeHistory:{}, - element:{ - //对翻译前后的node元素的分析(翻以前)及渲染(翻译后) - nodeAnalyse:{ - /* - 获取node中的要进行翻译的文本内容、以及要操作的实际node对象(这个node对象很可能是传入的node中的某个子node) - node - attribute 要获取的是某个属性的值,还是node本身的值。比如 a标签的title属性的值,则传入 title。 如果是直接获取node.nodeValue ,那这个没有 - - 返回结果是一个数组。其中: - ['text']:要进行翻译的text内容文本 - ['node']:要进行翻译的目标node - - */ - get:function(node, attribute){ - return translate.element.nodeAnalyse.analyse(node,'','', attribute); - }, - /* - 进行翻译之后的渲染显示 - 参数: - node 当前翻译的node元素 - originalText 翻译之前的内容文本 - resultText 翻译之后的内容文本 - attribute 存放要替换的属性,比如 a标签的title属性。 如果是直接替换node.nodeValue ,那这个没有 - */ - set:function(node, originalText, resultText, attribute){ - translate.element.nodeAnalyse.analyse(node,originalText,resultText, attribute); - }, - /* - - 注意,这个不使用,只是服务于上面的get、set使用。具体使用用上面的get、set - - 1. 只传入 node: - 获取node中的要进行翻译的文本内容、以及要操作的实际node对象(这个node对象很可能是传入的node中的某个子node) - 返回结果是一个数组。其中: - ['text']:要进行翻译的text内容文本 - ['node']:要进行翻译的目标node - 2. 传入 node、originalText、 resultText - 则是进行翻译之后的渲染显示 - - attribute : 进行替换渲染时使用,存放要替换的属性,比如 a标签的title属性。 如果是直接替换node.nodeValue ,那这个没有 - */ - analyse:function(node, originalText, resultText, attribute){ - var result = new Array(); //返回的结果 - result['node'] = node; - result['text'] = ''; - - var nodename = translate.element.getNodeName(node); - - if(attribute != null && typeof(attribute) == 'string' && attribute.length > 0){ - //这个node有属性,替换的是node的属性,而不是nodeValue - result['text'] = node[attribute]; - - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - if(typeof(node[attribute]) != 'undefined'){ - node[attribute] = node[attribute].replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - }else{ - console.log(node); - } - - } - return result; - } - - //正常的node ,typeof 都是 object - - //console.log(typeof(node)+node); - if(nodename == '#text'){ - //如果是普通文本,判断一下上层是否是包含在textarea标签中 - if(typeof(node.parentNode) != 'undefined'){ - var parentNodename = translate.element.getNodeName(node.parentNode); - //console.log(parentNodename) - if(parentNodename == 'TEXTAREA'){ - //是textarea标签,那将nodename 纳入 textarea的判断中,同时将判断对象交于上级,也就是textarea标签 - nodename = 'TEXTAREA'; - node = node.parentNode; - } - } - } - - - - //console.log(nodename) - //console.log(translate.element.getNodeName(node.parentNode)) - //console.log(node) - if(nodename == 'INPUT' || nodename == 'TEXTAREA'){ - //console.log(node.attributes) - /* - 1. input、textarea 输入框,要对 placeholder 做翻译 - 2. input 要对 type=button 的情况进行翻译 - */ - if(node.attributes == null || typeof(node.attributes) == 'undefined'){ - result['text'] = ''; - return result; - } - - //input,要对 type=button、submit 的情况进行翻译 - if(nodename == 'INPUT'){ - if(typeof(node.attributes.type) != 'undefined' && typeof(node.attributes.type.nodeValue) != null && (node.attributes.type.nodeValue.toLowerCase() == 'button' || node.attributes.type.nodeValue.toLowerCase() == 'submit')){ - //console.log('----是 0){ - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - input_value_node.nodeValue = input_value_node.nodeValue.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - - result['text'] = input_value_node.nodeValue; - result['node'] = input_value_node; - return result; - } - } - } - //console.log(node) - - //input textarea 的 placeholder 情况 - if(typeof(node.attributes['placeholder']) != 'undefined'){ - //console.log(node); - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.attributes['placeholder'].nodeValue = node.attributes['placeholder'].nodeValue.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - - result['text'] = node.attributes['placeholder'].nodeValue; - result['node'] = node.attributes['placeholder']; - return result; - //return node.attributes['placeholder'].nodeValue; - } - //console.log(node) - result['text'] = ''; - return result; - } - if(nodename == 'META'){ - //meta标签,如是关键词、描述等 - if(typeof(node.name) != 'undefined' && node.name != null){ - var nodeAttributeName = node.name.toLowerCase(); //取meta 标签的name 属性 - if(nodeAttributeName == 'keywords' || nodeAttributeName == 'description'){ - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText != null && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.content = node.content.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - - result['text'] = node.content; - return result; - } - } - - result['text'] = ''; - return result; - } - if(nodename == 'IMG'){ - if(typeof(node.alt) == 'undefined' || node.alt == null){ - result['text'] = ''; - return result; - } - - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.alt = node.alt.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - result['text'] = node.alt; - return result; - } - - - //其他的 - if(node.nodeValue == null || typeof(node.nodeValue) == 'undefined'){ - result['text'] = ''; - }else if(node.nodeValue.trim().length == 0){ - //避免就是单纯的空格或者换行 - result['text'] = ''; - }else{ - //替换渲染 - if(typeof(originalText) != 'undefined' && originalText != null && originalText.length > 0){ - //this.nodes[hash][task_index].nodeValue = this.nodes[hash][task_index].nodeValue.replace(new RegExp(translate.util.regExp.pattern(task.originalText),'g'), translate.util.regExp.resultText(task.resultText)); - node.nodeValue = node.nodeValue.replace(new RegExp(translate.util.regExp.pattern(originalText),'g'), translate.util.regExp.resultText(resultText)); - } - result['text'] = node.nodeValue; - } - return result; - } - }, - //获取这个node元素的node name ,如果未发现,则返回''空字符串 - getNodeName:function(node){ - if(node == null || typeof(node) == 'undefined'){ - return ''; - } - - if(node.nodeName == null || typeof(node.nodeName) == 'undefined'){ - return ''; - } - - var nodename = node.nodeName; - //console.log('nodename:'+nodename+', node:'+node); - return nodename; - }, - //向下遍历node - whileNodes:function(uuid, node){ - if(node == null || typeof(node) == 'undefined'){ - return; - } - - //如果这个uuid没有,则创建 - if(typeof(translate.nodeQueue[uuid]) == 'undefined' || translate.nodeQueue[uuid] == null){ - translate.nodeQueue[uuid] = new Array(); //创建 - translate.nodeQueue[uuid]['expireTime'] = Date.now() + 120*1000; //删除时间,10分钟后删除 - translate.nodeQueue[uuid]['list'] = new Array(); - //console.log('创建 --- '); - //console.log(uuid) - } - - //console.log('---'+typeof(node)+', '); - //判断是否是有title属性,title属性也要翻译 - if(typeof(node) == 'object' && typeof(node['title']) == 'string' && node['title'].length > 0){ - //将title加入翻译队列 - //console.log('---'+node.title+'\t'+node.tagName); - //console.log(node) - //console.log('------------'); - - //判断当前元素是否在ignore忽略的tag、id、class name中 - if(!translate.ignore.isIgnore(node)){ - //不在忽略的里面,才会加入翻译 - translate.addNodeToQueue(uuid, node, node['title'], 'title'); - } - } - - var childNodes = node.childNodes; - if(childNodes.length > 0){ - for(var i = 0; i -1){ - //忽略tag - //console.log('忽略tag:'+parentNodeName); - return; - } - - /****** 判断忽略的class ******/ - /* - 这段理论上不需要了,因为在 translate.ignore.isIgnore 判断了 - var ignoreClass = false; //是否是被忽略的class,true是 - var parentNode = node.parentNode; - while(node != parentNode && parentNode != null){ - //console.log('node:'+node+', parentNode:'+parentNode); - if(parentNode.className != null){ - if(translate.ignore.class.indexOf(parentNode.className) > -1){ - //发现ignore.class 当前是处于被忽略的 class - ignoreClass = true; - } - } - - parentNode = parentNode.parentNode; - } - if(ignoreClass){ - //console.log('ignore class : node:'+node.nodeValue); - return; - } - */ - /**** 判断忽略的class结束 ******/ - - - - /**** 避免中途局部翻译,在判断一下 ****/ - //判断当前元素是否在ignore忽略的tag、id、class name中 - if(translate.ignore.isIgnore(node)){ - //console.log('node包含在要忽略的元素中:'); - //console.log(node); - return; - } - - //node分析 - var nodeAnaly = translate.element.nodeAnalyse.get(node); - if(nodeAnaly['text'].length > 0){ - //有要翻译的目标内容,加入翻译队列 - //console.log('addNodeToQueue -- '+nodeAnaly['node']+', text:' + nodeAnaly['text']); - translate.addNodeToQueue(uuid, nodeAnaly['node'], nodeAnaly['text']); - } - //console.log(nodeAnaly); - /* - //console.log(node.nodeName+', type:'+node.nodeType+', '+node.nodeValue); - var nodename = translate.element.getNodeName(node); - if(nodename == 'INPUT' || nodename == 'TEXTAREA'){ - //input 输入框,要对 placeholder 做翻译 - console.log('input---'+node.attributes); - if(node.attributes == null || typeof(node.attributes) == 'undefined'){ - return; - } - - if(typeof(node.attributes['placeholder']) != 'undefined'){ - //console.log(node.attributes['placeholder'].nodeValue); - //加入要翻译的node队列 - //translate.nodeQueue[translate.hash(node.nodeValue)] = node.attributes['placeholder']; - //加入要翻译的node队列 - //translate.addNodeToQueue(translate.hash(node.attributes['placeholder'].nodeValue), node.attributes['placeholder']); - translate.addNodeToQueue(uuid, node.attributes['placeholder'], node.attributes['placeholder'].nodeValue); - } - - //console.log(node.getAttribute("placeholder")); - }else if(nodename == 'META'){ - //meta标签,如是关键词、描述等 - if(typeof(node.name) != 'undefined' && node.name != null){ - var nodeAttributeName = node.name.toLowerCase(); //取meta 标签的name 属性 - //console.log(nodeName); - if(nodeAttributeName == 'keywords' || nodeAttributeName == 'description'){ - //关键词、描述 - translate.addNodeToQueue(uuid, node, node.content); - } - } - //console.log(node.name) - }else if(nodename == 'IMG'){ - //console.log('-------'+node.alt); - translate.addNodeToQueue(uuid, node, node.alt); - }else if(node.nodeValue != null && node.nodeValue.trim().length > 0){ - - //过滤掉无效的值 - if(node.nodeValue != null && typeof(node.nodeValue) == 'string' && node.nodeValue.length > 0){ - }else{ - return; - } - - //console.log(node.nodeValue+' --- ' + translate.language.get(node.nodeValue)); - - //console.log(node.nodeName); - //console.log(node.parentNode.nodeName); - //console.log(node.nodeValue); - //加入要翻译的node队列 - translate.addNodeToQueue(uuid, node, node.nodeValue); - //translate.addNodeToQueue(translate.hash(node.nodeValue), node); - //translate.nodeQueue[translate.hash(node.nodeValue)] = node; - //translate.nodeQueue[translate.hash(node.nodeValue)] = node.nodeValue; - //node.nodeValue = node.nodeValue+'|'; - - } - */ - - }, - }, - - - - - - /* - * 将发现的元素节点加入待翻译队列 - * uuid execute方法执行的唯一id - * node 当前text所在的node - * text 当前要翻译的目标文本 - * attribute 是否是元素的某个属性。比如 a标签中的title属性, a.title 再以node参数传入时是string类型的,本身并不是node类型,所以就要传入这个 attribute=title 来代表这是a标签的title属性。同样第二个参数node传入的也不能是a.title,而是传入a这个node元素 - */ - addNodeToQueue:function(uuid, node, text, attribute){ - if(node == null || text == null || text.length == 0){ - return; - } - - - //console.log('find tag ignore : '+node.nodeValue+', '+node.nodeName+", "+node.nodeType+", "+node.tagName); - //console.log('addNodeToQueue into -- node:'+node+', text:'+text+', attribute:'+attribute); - var nodename = translate.element.getNodeName(node); - - //判断如果是被 注释的区域,不进行翻译 - if(nodename.toLowerCase() == '#comment'){ - return; - } - //console.log('\t\t'+text); - //取要翻译字符的hash - var key = translate.util.hash(text); - /* - 如果是input 的 placeholder ,就会出现这个情况 - if(node.parentNode == null){ - console.log('node.parentNode == null'); - return; - } - */ - - //console.log(node.parentNode); - //console.log(node.parentNode.nodeName); - - //判断其内容是否是 script、style 等编程的文本,如果是,则不进行翻译,不然翻译后还会影响页面正常使用 - if(translate.util.findTag(text)){ - //console.log('find tag ignore : '+node.nodeValue+', '+node.nodeName+", "+node.nodeType+", "+node.tagName); - //console.log(node.parentNode.nodeName); - - //获取到当前文本是属于那个tag标签中的,如果是script、style 这样的标签中,那也会忽略掉它,不进行翻译 - if(node.parentNode == null){ - //没有上级了,或是没获取到上级,忽略 - return; - } - //去上级的tag name - var parentNodeName = translate.element.getNodeName(node.parentNode); - //node.parentNode.nodeName; - if(parentNodeName == 'SCRIPT' || parentNodeName == 'STYLE'){ - //如果是script、style中发现的,那也忽略 - return; - } - } - //console.log(node.nodeValue); - - //获取当前是什么语种 - //var langs = translate.language.get(text); - var textRecognition = translate.language.recognition(text); - langs = textRecognition.languageArray; - //console.log('langs'); - //console.log(langs); - - - //过滤掉要转换为的目标语种,比如要转为英语,那就将本来是英语的部分过滤掉,不用再翻译了 - if(typeof(langs[translate.to]) != 'undefined'){ - delete langs[translate.to]; - } - - var isWhole = translate.whole.isWhole(node); - //console.log('isWhole:'+isWhole+', '+text); - - if(!isWhole){ - //常规方式,进行语种分类 - - - /* if(this.nodeQueue[lang] == null || typeof(this.nodeQueue[lang]) == 'undefined'){ - this.nodeQueue[lang] = new Array(); - } - //创建二维数组 - if(this.nodeQueue[lang][key] == null || typeof(this.nodeQueue[lang][key]) == 'undefined'){ - this.nodeQueue[lang][key] = new Array(); - } - */ - //console.log(langs); - - for(var lang in langs) { - //创建二维数组, key为语种,如 english - /* - 放到了 translate.addNodeQueueItem 进行判断 - if(translate.nodeQueue[uuid]['list'][lang] == null || typeof(translate.nodeQueue[uuid]['list'][lang]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang] = new Array(); - } - */ - //console.log('|'+langs[lang].length); - //遍历出该语种下有哪些词需要翻译 - for(var word_index = 0; word_index < langs[lang].list.length; word_index++){ - //console.log('start:'+word_index) - //console.log(langs[lang].list[word_index]); - if(typeof(langs[lang].list[word_index]) == 'undefined' || typeof(langs[lang].list[word_index]['text']) == 'undefined'){ - //理论上应该不会,但多加个判断 - continue; - } - var word = langs[lang].list[word_index]['text']; //要翻译的词 - var beforeText = langs[lang].list[word_index]['beforeText']; - var afterText = langs[lang].list[word_index]['afterText']; - - translate.addNodeQueueItem(uuid, node, word, attribute, lang, beforeText, afterText); - - /* - var hash = translate.util.hash(word); //要翻译的词的hash - //创建三维数组, key为要通过接口翻译的文本词或句子的 hash (注意并不是node的文本,而是node拆分后的文本) - if(translate.nodeQueue[uuid]['list'][lang][hash] == null || typeof(translate.nodeQueue[uuid]['list'][lang][hash]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang][hash] = new Array(); - - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['original'] = word; - translate.nodeQueue[uuid]['list'][lang][hash]['translateText'] = translate.nomenclature.dispose(word); //自定义术语处理 - //translate.nodeQueue[uuid]['list'][lang][hash]['beforeText'] = beforeText; - //translate.nodeQueue[uuid]['list'][lang][hash]['afterText'] = afterText; - //translate.nodeQueue[uuid]['list'][lang][hash]['attribute'] = attribute; //放入 nodes[index][attribute] 元素中 - - //其中key: nodes 是第四维数组,里面存放具体的node元素对象 - - - //console.log(translate.nodeQueue[uuid]['list'][lang][hash]); - } - - var isEquals = false; //queue中是否已经加入过这个node了(当然是同一hash同一node情况) - if(typeof(node.isSameNode) != 'undefined'){ //支持 isSameNode 方法判断对象是否相等 - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - if(node.isSameNode(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'])){ - //相同,那就不用在存入了 - //console.log('相同,那就不用在存入了') - isEquals = true; - //console.log(node) - continue; - } - } - } - if(isEquals){ - //相同,那就不用在存入了 - continue; - } - - //往五维数组nodes中追加node元素 - var nodesIndex = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['node']=node; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['attribute']=attribute; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['beforeText'] = beforeText; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['afterText'] = afterText; - - */ - - //console.log('end:'+word_index) - } - - } - - - - - }else{ - //直接翻译整个元素内的内容,不再做语种分类,首先删除英文,然后将出现次数最多的语种作为原本语种 - var lang = textRecognition.languageName; - translate.addNodeQueueItem(uuid, node, text, attribute, lang, '', ''); - } - - - - //this.nodeQueue[lang][key][this.nodeQueue[lang][key].length]=node; //往数组中追加 - }, - - /* - - 服务于上面的 addNodeToQueue ,用于区分不同type情况,进行调用此加入 translate.nodeQueue - uuid, node, attribute 这五个参数说明见 addNodeToQueue 的参数说明,相同 - - word 要实际进行翻译的文本,也就是要把它拿来进行通过后端翻译接口进行翻译的文本 - lang 当前要翻译的文本的语种,如 english - beforeText 参见 translate.nodeQueue 注释中第七维的解释 - afterText 参见 translate.nodeQueue 注释中第七维的解释 - - */ - addNodeQueueItem:function(uuid, node, word, attribute, lang, beforeText, afterText){ - //创建二维数组, key为语种,如 english - if(translate.nodeQueue[uuid]['list'][lang] == null || typeof(translate.nodeQueue[uuid]['list'][lang]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang] = new Array(); - } - - //var word = text; //要翻译的文本 - var hash = translate.util.hash(word); //要翻译的文本的hash - - //创建三维数组, key为要通过接口翻译的文本词或句子的 hash 。这里翻译的文本也就是整个node元素的内容了,不用在做拆分了 - if(translate.nodeQueue[uuid]['list'][lang][hash] == null || typeof(translate.nodeQueue[uuid]['list'][lang][hash]) == 'undefined'){ - translate.nodeQueue[uuid]['list'][lang][hash] = new Array(); - - /* - * 创建四维数组,存放具体数据 - * key: nodes 包含了这个hash的node元素的数组集合,array 多个。其中 - nodes[index]['node'] 存放当前的node元素 - nodes[index]['attribute'] 存放当前hash,也就是翻译文本针对的是什么,是node本身(nodeValue),还是 node 的某个属性,比如title属性。如果这里不为空,那就是针对的属性操作的 - * key: original 原始的要翻译的词或句子,html加载完成但还没翻译前的文本,用于支持当前页面多次语种翻译切换而无需跳转 - * beforeText、afterText:见 translate.nodeQueue 的说明 - */ - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['original'] = word; - translate.nodeQueue[uuid]['list'][lang][hash]['translateText'] = translate.nomenclature.dispose(word); //自定义术语处理 - - //其中key: nodes 是第四维数组,里面存放具体的node元素对象 - } - - - var isEquals = false; //queue中是否已经加入过这个node了(当然是同一hash同一node情况) - if(typeof(node.isSameNode) != 'undefined'){ //支持 isSameNode 方法判断对象是否相等 - for(var node_index = 0; node_index < translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; node_index++){ - if(node.isSameNode(translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][node_index]['node'])){ - //相同,那就不用在存入了 - //console.log('相同,那就不用在存入了') - isEquals = true; - //console.log(node) - continue; - } - } - } - if(isEquals){ - //相同,那就不用在存入了 - return; - } - - //往五维数组nodes中追加node元素 - var nodesIndex = translate.nodeQueue[uuid]['list'][lang][hash]['nodes'].length; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex] = new Array(); - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['node']=node; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['attribute']=attribute; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['beforeText'] = beforeText; - translate.nodeQueue[uuid]['list'][lang][hash]['nodes'][nodesIndex]['afterText'] = afterText; - - - }, - - //全部翻译,node内容全部翻译,而不是进行语种提取,直接对node本身的全部内容拿出来进行直接全部翻译 - whole:{ - class:[], - tag:[], - id:[], - - //运行时出现自检并在浏览器控制台提示性文本。 - //在执行翻译,也就是 execute() 时,会调用此方法。 - executeTip:function(){ - if(translate.whole.class.length == 0 && translate.whole.tag.length == 0 && translate.whole.id.length == 0){ - - }else{ - console.log('您开启了 translate.whole 此次行为避开了浏览器端的文本语种自动识别,而是暴力的直接对某个元素的整个文本进行翻译,很可能会产生非常大的翻译量,请谨慎!有关每日翻译字符的说明,可参考: http://translate.zvo.cn/42557.html '); - } - - if(translate.whole.tag.indexOf('html') > -1){ - console.log('自检发现您设置了 translate.whole.tag 其中有 html ,这个是不生效的,最大只允许设置到 body '); - } - }, - - //当前元素是属于全部翻译定义的元素 - /* - 传入一个元素,判断这个元素是否是被包含的。 这个会找父类,看看父类中是否包含在其之中。 - return true是在其中,false不再其中 - */ - isWhole:function(ele){ - if(translate.whole.class.length == 0 && translate.whole.tag.length == 0 && translate.whole.id.length == 0){ - //未设置,那么直接返回false - return false; - } - if(ele == null || typeof(ele) == 'undefined'){ - return false; - } - - var parentNode = ele; - var maxnumber = 100; //最大循环次数,避免死循环 - while(maxnumber-- > 0){ - if(parentNode == null || typeof(parentNode) == 'undefined'){ - //没有父元素了 - return false; - } - - //判断Tag - //var tagName = parentNode.nodeName.toLowerCase(); //tag名字,小写 - var nodename = translate.element.getNodeName(parentNode).toLowerCase(); //tag名字,小写 - if(nodename.length > 0){ - //有nodename - if(nodename == 'html' || nodename == '#document'){ - //上层元素已经是顶级元素了,那肯定就不是了 - return false; - } - if(translate.whole.tag.indexOf(nodename) > -1){ - //发现ignore.tag 当前是处于被忽略的 tag - return true; - } - } - - - //判断class name - if(parentNode.className != null){ - var classNames = parentNode.className; - if(classNames == null || typeof(classNames) != 'string'){ - continue; - } - //console.log('className:'+typeof(classNames)); - //console.log(classNames); - classNames = classNames.trim().split(' '); - for(var c_index = 0; c_index < classNames.length; c_index++){ - if(classNames[c_index] != null && classNames[c_index].trim().length > 0){ - //有效的class name,进行判断 - if(translate.whole.class.indexOf(classNames[c_index]) > -1){ - //发现ignore.class 当前是处于被忽略的 class - return true; - } - } - } - } - - //判断id - if(parentNode.id != null && typeof(parentNode.id) != 'undefined'){ - //有效的class name,进行判断 - if(translate.whole.id.indexOf(parentNode.id) > -1){ - //发现ignore.id 当前是处于被忽略的 id - return true; - } - } - - //赋予判断的元素向上一级 - parentNode = parentNode.parentNode; - } - - return false; - } - }, - - language:{ - //当前本地语种,本地语言,默认是简体中文。设置请使用 translate.language.setLocal(...)。不可直接使用,使用需用 getLocal() - local:'', - /* - 翻译语种范围 - 比如传入 ['chinese_simplified','chinese_traditional','english'] 则表示仅对网页中的简体中文、繁体中文、英文 进行翻译,而网页中出现的其他的像是法语、韩语则不会进行翻译 - 如果为空 [],则是翻译时,翻译网页中的所有语种 - 设置方式为: translate.language.translateLanguagesRange = ['chinese_simplified','chinese_traditional'] - */ - translateLanguagesRange: [], - //传入语种。具体可传入哪些参考: http://api.translate.zvo.cn/doc/language.json.html - setLocal:function(languageName){ - //translate.setUseVersion2(); //Set to use v2.x version - translate.useVersion = 'v2'; - translate.language.local = languageName; - }, - //获取当前本地语种,本地语言,默认是简体中文。设置请使用 translate.language.setLocal(...) - getLocal:function(){ - //判断是否设置了本地语种,如果没设置,自动给其设置 - if(translate.language.local == null || translate.language.local.length < 1){ - translate.language.autoRecognitionLocalLanguage(); - } - return translate.language.local; - }, - /* - 获取当前语种。 - 比如当前设置的本地语种是简体中文,用户并未切换其他语种,那么这个方法将返回本地当前的语种,也就是等同于 translate.language.getLocal() - 如果用户切换为英语进行浏览,那么这个方法将返回翻译的目标语种,也就是 english - */ - getCurrent:function(){ - var to_storage = translate.storage.get('to'); - if(to_storage != null && typeof(to_storage) != 'undefined' && to_storage.length > 0){ - //之前有过使用,并且主动设置过目标语种 - return to_storage; - } - return translate.language.getLocal(); - }, - //如果第一次用,默认以什么语种显示。 - //比如本地当前语种是简体中文,这里设置为english,那么用户第一次使用时,会自动翻译为english进行显示。如果用户手动切换为其他语种比如韩语,那么就遵循用户手动切换的为主,显示韩语。 - setDefaultTo:function(languageName){ - var to_storage = translate.storage.get('to'); - if(to_storage != null && typeof(to_storage) != 'undefined' && to_storage.length > 0){ - //之前有过使用,并且主动设置过目标语种,那么不进行处理 - }else{ - //没有设置过,进行处理 - translate.storage.set('to', languageName); - translate.to = languageName; - } - }, - /* - 清除历史翻译语种的缓存 - */ - clearCacheLanguage:function(){ - translate.to = ''; - translate.storage.set('to',''); - }, - //根据URL传参控制以何种语种显示 - //设置可以根据当前访问url的某个get参数来控制使用哪种语言显示。 - //比如当前语种是简体中文,网页url是http://translate.zvo.cn/index.html ,那么可以通过在url后面增加 language 参数指定翻译语种,来使网页内容以英文形态显示 http://translate.zvo.cn/index.html?language=english - setUrlParamControl:function(paramName){ - if(typeof(paramName) == 'undefined' || paramName.length < 1){ - paramName = 'language'; - } - var paramValue = translate.util.getUrlParam(paramName); - if(typeof(paramValue) == 'undefined'){ - return; - } - if(paramValue == '' || paramValue == 'null' || paramValue == 'undefined'){ - return; - } - - translate.storage.set('to', paramValue); - translate.to = paramValue; - }, - //自动识别当前页面是什么语种 - autoRecognitionLocalLanguage:function(){ - if(translate.language.local != null && translate.language.local.length > 2){ - //已设置过了,不需要再设置 - return; - } - - var bodyText = document.body.outerText; - if(bodyText == null || typeof(bodyText) == 'undefined' || bodyText.length < 1){ - //未取到,默认赋予简体中文 - translate.language.local = 'chinese_simplified'; - return; - } - - bodyText = bodyText.replace(/\n|\t|\r/g,''); //将回车换行等去掉 - - //默认赋予简体中文 - translate.language.local = 'chinese_simplified'; - var recognition = translate.language.recognition(bodyText); - translate.language.local = recognition.languageName; - return translate.language.local; - /* v3.1优化 - var langs = new Array(); //上一个字符的语种是什么,当前字符向上数第一个字符。格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - for(var i=0; i -1){ - newLangs.splice(index,1); //移除数组中的特殊字符 - } - - if(newLangs.length > 0){ - //找到排序出现频率最多的 - translate.language.local = newLangs[0]; - }else{ - //没有,默认赋予简体中文 - translate.language.local = 'chinese_simplified'; - } - */ - }, - - /* - * 获取当前字符是什么语种。返回值是一个语言标识,有 chinese_simplified简体中文、japanese日语、korean韩语、 - * str : node.nodeValue 或 图片的 node.alt 等 - * 如果语句长,会全句翻译,以保证翻译的准确性,提高可读性。 - * 如果语句短,会自动将特殊字符、要翻译的目标语种给过滤掉,只取出具体的要翻译的目标语种文本 - * - * 返回 存放不同语言的数组,格式如 - * [ - "english":[ - {beforeText: '', afterText: '', text: 'emoambue hag'}, - ...... - ], - "japanese":[ - {beforeText: ' ', afterText: ' ', text: 'ẽ '}, - ...... - ] - ] - * - */ - get:function(str){ - //将str拆分为单个char进行判断 - - var langs = new Array(); //当前字符串包含哪些语言的数组,其内如 english - var langStrs = new Array(); //存放不同语言的文本,格式如 ['english'][0] = 'hello' - var upLangs = []; //上一个字符的语种是什么,当前字符向上数第一个字符。格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - var upLangsTwo = []; //上二个字符的语种是什么 ,当前字符向上数第二个字符。 格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - - //var upLangs = ''; //上一个字符的语种是什么,格式如 english - for(var i=0; i -1){ - newLangs.splice(index,1); //移除 - } - - //移除特殊字符 - var index = newLangs.indexOf('specialCharacter'); - if(index > -1){ - newLangs.splice(index,1); //移除数组中的特殊字符 - } - - if(newLangs.length > 0){ - //还剩一个或多个,(如果是多个,那应该是这几个出现的频率一样,所以取频率最高的时返回了多个) - return newLangs[0]; - }else{ - //没找到,直接返回空字符串 - return ''; - } - */ - - - //去除特殊符号 - //for(var i = 0; i 0.05){ - langkeys[langkeys.length] = lang+''; - } - } - - - if(langkeys.length > 1 && langkeys.indexOf('english') > -1){ - //console.log('出现了english, 并且english跟其他语种一起出现,那么删除english,因为什么法语德语乱七八糟的都有英语。而且中文跟英文一起,如果认为是英文的话,有时候中文会不被翻译'); - //langkeys.splice(langkeys.indexOf('english'), 1); - langsNumber['english'] = 0; - } - - if(langkeys.indexOf('chinese_simplified') > -1 && langkeys.indexOf('chinese_traditional') > -1){ - //如果简体中文跟繁体中文一起出现,那么会判断当前句子为繁体中文。 - //langkeys.splice(langkeys.indexOf('chinese_simplified'), 1); - langsNumber['chinese_simplified'] = 0; - } - - - //从 langsNumber 中找出字数最多的来 - var maxLang = ''; //字数最多的语种 - var maxNumber = 0; - for(var lang in langsNumber){ - if(langsNumber[lang] > maxNumber){ - maxLang = lang; - maxNumber = langsNumber[lang]; - } - } - - //重新组合返回值的 languageArray - var languageArray = {}; - for(var lang in langs){ - languageArray[lang] = {}; - languageArray[lang].number = langsNumberOriginal[lang]; - languageArray[lang].list = langs[lang]; - } - - var result = { - languageName: maxLang, - languageArray: languageArray - }; - return result; - }, - // 传入一个char,返回这个char属于什么语种,返回如 chinese_simplified、english 如果返回空字符串,那么表示未获取到是什么语种 - getCharLanguage:function(charstr){ - if(charstr == null || typeof(charstr) == 'undefined'){ - return ''; - } - - if(this.italian(charstr)){ - return 'italian'; - } - if(this.english(charstr)){ - return 'english'; - } - if(this.specialCharacter(charstr)){ - return 'specialCharacter'; - } - if(this.number(charstr)){ - return 'number'; - } - - //中文的判断包含两种,简体跟繁体 - var chinesetype = this.chinese(charstr); - if(chinesetype == 'simplified'){ - return 'chinese_simplified'; - }else if(chinesetype == 'traditional'){ - return 'chinese_traditional'; - } - - if(this.japanese(charstr)){ - return 'japanese'; - } - if(this.korean(charstr)){ - return 'korean'; - } - - //未识别是什么语种 - //console.log('not find is language , char : '+charstr+', unicode: '+charstr.charCodeAt(0).toString(16)); - return ''; - - }, - /* - * 对字符串进行分析,分析字符串是有哪几种语言组成。 - * language : 当前字符的语种,传入如 english - * langStrs : 操作的,如 langStrs['english'][0] = '你好' - * upLangs : 当前字符之前的上一个字符的语种是什么,当前字符向上数第一个字符。格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - * upLangsTwo : 当前字符之前的上二个字符的语种是什么 ,当前字符向上数第二个字符。 格式如 ['language']='english', ['chatstr']='a', ['storage_language']='english' 这里面有3个参数,分别代表这个字符属于那个语种,其字符是什么、存入了哪种语种的队列。因为像是逗号,句号,一般是存入本身语种中,而不是存入特殊符号中。 - * chatstr : 当前字符,如 h - */ - analyse:function(language, langStrs, upLangs, upLangsTwo, charstr){ - if(typeof(langStrs[language]) == 'undefined'){ - langStrs[language] = new Array(); - } - var index = 0; //当前要存入的数组下标 - if(typeof(upLangs['storage_language']) == 'undefined'){ - //第一次,那么还没存入值,index肯定为0 - //console.log('第一次,那么还没存入值,index肯定为0') - //console.log(upLangs['language']) - }else{ - //console.log('analyse, charstr : '+charstr+', upLangs :'); - //console.log(upLangs); - //var isEqual = upLangs['storage_language'] == language; //上次跟当前字符是否都是同一个语种(这个字符跟这个字符前一个字符) - - /* - 英语每个单词之间都会有空格分割. 如果是英文的话,英文跟特殊字符还要单独判断一下,避免拆开,造成翻译不准,单个单词翻译的情况 - 所以如果上次的字符是英文或特殊符号,当前字符是特殊符号(逗号、句号、空格,然后直接笼统就吧特殊符号都算上吧),那么也将当次的特殊符号变为英文来进行适配 - 示例 - hello word 的 "o w" - hello word 的 " w" - hello word 的 "w " - this is a dog 的 " a " - */ - //console.log(language == 'specialCharacter'); - //如果两个字符类型不一致,但当前字符是英文或连接符时,进行判断 - /* - if(!isEqual){ - if(language == 'english' || translate.language.connector(charstr)){ - console.log('1.'+(language == 'english' || translate.language.connector(charstr))+', upLangs str:'+upLangs['charstr']); - //上一个字符是英文或连接符 - //console.log('teshu:'+translate.language.connector(upLangs['charstr'])+', str:'+upLangs['charstr']); - if(upLangs['language'] == 'english' || translate.language.connector(upLangs['charstr'])) { - console.log('2'); - //如果上二个字符不存在,那么刚开始,不再上面几种情况之中,直接不用考虑 - if(typeof(upLangsTwo['language']) != 'undefined'){ - console.log('3') - //上二个字符是空(字符串刚开始),或者是英文 - if(upLangsTwo['language'] == 'english' || translate.language.connector(upLangsTwo['charstr'])){ - //满足这三个条件,那就将这三个拼接到一起 - console.log('4/5: '+', two lang:'+upLangsTwo['language']+', str:'+upLangsTwo['charstr']) - isEqual = true; - if(language == 'specialCharacter' && upLangs['language'] == 'specialCharacter' && upLangsTwo['language'] == 'specialCharacter'){ - //如果三个都是特殊字符,或后两个是特殊字符,第一个是空(刚开始),那就归入特殊字符 - language = 'specialCharacter'; - //console.log('4') - }else{ - //不然就都归于英文中。 - //这里更改是为了让下面能将特殊字符(像是空格逗号等)也一起存入数组 - language = 'english'; - console.log(5) - } - } - } - } - } - } - */ - - /* - 不判断当前字符,而判断上个字符,是因为当前字符没法获取未知的下个字符。 - */ - //if(!isEqual){ - - //如果当前字符是连接符 - if(translate.language.connector(charstr)){ - language = upLangs['storage_language']; - /* - //判断上个字符是否存入了待翻译字符,如要将中文翻译为英文,而上个字符是中文,待翻译,那将连接符一并加入待翻译字符中去,保持句子完整性 - //判断依据是上个字符存储至的翻译字符语种序列,不是特殊字符,而且也不是要翻译的目标语种,那肯定就是待翻译的,将连接符加入待翻译中一起进行翻译 - if(upLangs['storage_language'] != 'specialCharacter' && upLangs['storage_language'] != translate.to){ - - language = upLangs['storage_language']; - console.log('teshu:'+charstr+', 当前字符并入上个字符存储翻译语种:'+upLangs['storage_language']); - } - */ - } - //} - - //console.log('isEqual:'+isEqual); - /* - if(isEqual){ - //跟上次语言一样,那么直接拼接 - index = langStrs[language].length-1; - //但是还有别的特殊情况,v2.1针对英文翻译准确度的适配,会有特殊字符的问题 - if(typeof(upLangs['storage_language']) != 'undefined' && upLangs['storage_language'] != language){ - //如果上个字符存入的翻译队列跟当前这个要存入的队列不一个的话,那应该是特殊字符像是逗号句号等导致的,那样还要额外一个数组,不能在存入之前的数组了 - index = langStrs[language].length; - } - }else{ - //console.log('新开'); - //当前字符跟上次语言不样,那么新开一个数组 - index = langStrs[language].length; - //console.log('++, inde:'+index+',lang:'+language+', length:'+langStrs[language].length) - } - */ - - //当前要翻译的语种跟上个字符要翻译的语种一样,那么直接拼接 - if(upLangs['storage_language'] == language){ - index = langStrs[language].length-1; - }else{ - //console.log('新开'); - //当前字符跟上次语言不样,那么新开一个数组 - index = langStrs[language].length; - } - } - if(typeof(langStrs[language][index]) == 'undefined'){ - langStrs[language][index] = new Array(); - langStrs[language][index]['beforeText'] = ''; - langStrs[language][index]['afterText'] = ''; - langStrs[language][index]['text'] = ''; - } - langStrs[language][index]['text'] = langStrs[language][index]['text'] + charstr; - /* - 中文英文混合时,当中文+英文并没有空格间隔,翻译为英文时,会使中文翻译英文的结果跟原本的英文单词连到一块。这里就是解决这种情况 - 针对当前非英文(不需要空格分隔符,像是中文、韩语),但要翻译为英文(需要空格作为分割符号,像是法语等)时的情况进行判断 - */ - //if(translate.language.getLocal() != 'english' && translate.to == 'english'){ - //当前本地语种的语言是连续的,但翻译的目标语言不是连续的(空格间隔) - if( translate.language.wordBlankConnector(translate.language.getLocal()) == false && translate.language.wordBlankConnector(translate.to)){ - if((upLangs['storage_language'] != null && typeof(upLangs['storage_language']) != 'undefined' && upLangs['storage_language'].length > 0)){ - //上个字符存在 - //console.log(upLangs['storage_language']); - if(upLangs['storage_language'] != 'specialCharacter'){ - //上个字符不是特殊字符 (是正常语种。且不会是连接符,连接符都并入了正常语种) - - //if( upLangs['storage_language'] != 'english' && language == 'english'){ - //上个字符的语言是连续的,但当前字符的语言不是连续的(空格间隔) - if( translate.language.wordBlankConnector(upLangs['storage_language']) == false && translate.language.wordBlankConnector(language) ){ - //上个字符不是英语,当前字符是英语,这种情况要在上个字符后面追加空格,因为当前字符是英文,就不会在执行翻译操作了 - //console.log(upLangs['language']); - langStrs[upLangs['storage_language']][langStrs[upLangs['storage_language']].length-1]['afterText'] = ' '; - }else if(upLangs['storage_language'] == 'english' && language != 'english'){ - //上个字符是英语,当前字符不是英语,直接在当前字符前面追加空格 - langStrs[language][index]['beforeText'] = ' '; - } - } - - - } - } - - var result = new Array(); - result['langStrs'] = langStrs; - result['storage_language'] = language; //实际存入了哪种语种队列 - //console.log(result); - //console.log(langStrs) - //console.log(charstr); - return result; - }, - - /* - * 不同于语言,这个只是单纯的连接符。比如英文单词之间有逗号、句号、空格, 汉字之间有逗号句号书名号的。避免一行完整的句子被分割,导致翻译不准确 - * 单独拿他出来,目的是为了更好的判断计算,提高翻译的准确率 - */ - connector:function(str){ - - /* - 通用的有 空格、阿拉伯数字 - 1.不间断空格\u00A0,主要用在office中,让一个单词在结尾处不会换行显示,快捷键ctrl+shift+space ; - 2.半角空格(英文符号)\u0020,代码中常用的; - 3.全角空格(中文符号)\u3000,中文文章中使用; - */ - if(/.*[\u0020\u00A0\u202F\u205F\u3000]+.*$/.test(str)){ - return true; - } - /* - U+0030 0 数字 0 - U+0031 1 数字 1 - U+0032 2 数字 2 - U+0033 3 数字 3 - U+0034 4 数字 4 - U+0035 5 数字 5 - U+0036 6 数字 6 - U+0037 7 数字 7 - U+0038 8 数字 8 - U+0039 9 数字 9 - */ - if(/.*[\u0030-\u0039]+.*$/.test(str)){ - return true - } - - - /* - 英文场景 - 英文逗号、句号 - 这里不包括() 因为这里面的基本属于补充,对语句前后并无强依赖关系 - - U+0021 ! 叹号 - U+0022 " 双引号 - U+0023 # 井号 - U+0024 $ 价钱/货币符号 - U+0025 % 百分比符号 - U+0026 & 英文“and”的简写符号 - U+0027 ' 引号 - U+002C , 逗号 - U+002D - 连字号/减号 - U+002E . 句号 - U+003A : 冒号 - U+003B ; 分号 - U+003F ? 问号 - U+0040 @ 英文“at”的简写符号 - - - */ - if(/.*[\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u002C\u002D\u002E\u003A\u003B\u003F\u0040]+.*$/.test(str)){ - return true; - } - - /* - 中文标点符号 - 名称 Unicode 符号 - 句号 3002 。 - 问号 FF1F ? - 叹号 FF01 ! - 逗号 FF0C , - 顿号 3001 、 - 分号 FF1B ; - 冒号 FF1A : - 引号 300C 「 - 300D 」 - 引号 300E 『 - 300F 』 - 引号 2018 ‘ - 2019 ’ - 引号 201C “ - 201D ” - 括号 FF08 ( - FF09 ) - 括号 3014 〔 - 3015 〕 - 括号 3010 【 - 3011 】 - 破折号 2014 — - 省略号 2026 … - 连接号 2013 – - 间隔号 FF0E . - 书名号 300A 《 - 300B 》 - 书名号 3008 〈 - 3009 〉 - 键盘123前面的那个符号 · 00b7 - */ - if(/.*[\u3002\uFF1F\uFF01\uFF0C\u3001\uFF1B\uFF1A\u300C\u300D\u300E\u300F\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\u3010\u3011\u2014\u2026\u2013\uFF0E\u300A\u300B\u3008\u3009\u00b7]+.*$/.test(str)){ - return true; - } - - - - - //不是,返回false - return false; - }, - //语种的单词连接符是否需要空格,比如中文简体、繁体、韩文、日语都不需要空格,则返回false, 但是像是英文的单词间需要空格进行隔开,则返回true - //如果未匹配到,默认返回true - //language:语种,传入如 english - wordBlankConnector:function(language){ - if(language == null || typeof(language) == 'undefined'){ - return true; - } - switch (language.trim().toLowerCase()){ - case 'chinese_simplified': - return false; - case 'chinese_traditional': - return false; - case 'korean': - return false; - case 'japanese': - return false; - } - //其他情况则返回true - return true; - }, - //繁体中文的字典,判断繁体中文就是通过此判断 - chinese_traditional_dict: '皚藹礙愛翺襖奧壩罷擺敗頒辦絆幫綁鎊謗剝飽寶報鮑輩貝鋇狽備憊繃筆畢斃閉邊編貶變辯辮鼈癟瀕濱賓擯餅撥缽鉑駁蔔補參蠶殘慚慘燦蒼艙倉滄廁側冊測層詫攙摻蟬饞讒纏鏟産闡顫場嘗長償腸廠暢鈔車徹塵陳襯撐稱懲誠騁癡遲馳恥齒熾沖蟲寵疇躊籌綢醜櫥廚鋤雛礎儲觸處傳瘡闖創錘純綽辭詞賜聰蔥囪從叢湊竄錯達帶貸擔單鄲撣膽憚誕彈當擋黨蕩檔搗島禱導盜燈鄧敵滌遞締點墊電澱釣調叠諜疊釘頂錠訂東動棟凍鬥犢獨讀賭鍍鍛斷緞兌隊對噸頓鈍奪鵝額訛惡餓兒爾餌貳發罰閥琺礬釩煩範販飯訪紡飛廢費紛墳奮憤糞豐楓鋒風瘋馮縫諷鳳膚輻撫輔賦複負訃婦縛該鈣蓋幹趕稈贛岡剛鋼綱崗臯鎬擱鴿閣鉻個給龔宮鞏貢鈎溝構購夠蠱顧剮關觀館慣貫廣規矽歸龜閨軌詭櫃貴劊輥滾鍋國過駭韓漢閡鶴賀橫轟鴻紅後壺護滬戶嘩華畫劃話懷壞歡環還緩換喚瘓煥渙黃謊揮輝毀賄穢會燴彙諱誨繪葷渾夥獲貨禍擊機積饑譏雞績緝極輯級擠幾薊劑濟計記際繼紀夾莢頰賈鉀價駕殲監堅箋間艱緘繭檢堿鹼揀撿簡儉減薦檻鑒踐賤見鍵艦劍餞漸濺澗漿蔣槳獎講醬膠澆驕嬌攪鉸矯僥腳餃繳絞轎較稭階節莖驚經頸靜鏡徑痙競淨糾廄舊駒舉據鋸懼劇鵑絹傑潔結誡屆緊錦僅謹進晉燼盡勁荊覺決訣絕鈞軍駿開凱顆殼課墾懇摳庫褲誇塊儈寬礦曠況虧巋窺饋潰擴闊蠟臘萊來賴藍欄攔籃闌蘭瀾讕攬覽懶纜爛濫撈勞澇樂鐳壘類淚籬離裏鯉禮麗厲勵礫曆瀝隸倆聯蓮連鐮憐漣簾斂臉鏈戀煉練糧涼兩輛諒療遼鐐獵臨鄰鱗凜賃齡鈴淩靈嶺領餾劉龍聾嚨籠壟攏隴樓婁摟簍蘆盧顱廬爐擄鹵虜魯賂祿錄陸驢呂鋁侶屢縷慮濾綠巒攣孿灤亂掄輪倫侖淪綸論蘿羅邏鑼籮騾駱絡媽瑪碼螞馬罵嗎買麥賣邁脈瞞饅蠻滿謾貓錨鉚貿麽黴沒鎂門悶們錳夢謎彌覓綿緬廟滅憫閩鳴銘謬謀畝鈉納難撓腦惱鬧餒膩攆撚釀鳥聶齧鑷鎳檸獰甯擰濘鈕紐膿濃農瘧諾歐鷗毆嘔漚盤龐國愛賠噴鵬騙飄頻貧蘋憑評潑頗撲鋪樸譜臍齊騎豈啓氣棄訖牽扡釺鉛遷簽謙錢鉗潛淺譴塹槍嗆牆薔強搶鍬橋喬僑翹竅竊欽親輕氫傾頃請慶瓊窮趨區軀驅齲顴權勸卻鵲讓饒擾繞熱韌認紉榮絨軟銳閏潤灑薩鰓賽傘喪騷掃澀殺紗篩曬閃陝贍繕傷賞燒紹賒攝懾設紳審嬸腎滲聲繩勝聖師獅濕詩屍時蝕實識駛勢釋飾視試壽獸樞輸書贖屬術樹豎數帥雙誰稅順說碩爍絲飼聳慫頌訟誦擻蘇訴肅雖綏歲孫損筍縮瑣鎖獺撻擡攤貪癱灘壇譚談歎湯燙濤縧騰謄銻題體屜條貼鐵廳聽烴銅統頭圖塗團頹蛻脫鴕馱駝橢窪襪彎灣頑萬網韋違圍爲濰維葦偉僞緯謂衛溫聞紋穩問甕撾蝸渦窩嗚鎢烏誣無蕪吳塢霧務誤錫犧襲習銑戲細蝦轄峽俠狹廈鍁鮮纖鹹賢銜閑顯險現獻縣餡羨憲線廂鑲鄉詳響項蕭銷曉嘯蠍協挾攜脅諧寫瀉謝鋅釁興洶鏽繡虛噓須許緒續軒懸選癬絢學勳詢尋馴訓訊遜壓鴉鴨啞亞訝閹煙鹽嚴顔閻豔厭硯彥諺驗鴦楊揚瘍陽癢養樣瑤搖堯遙窯謠藥爺頁業葉醫銥頤遺儀彜蟻藝億憶義詣議誼譯異繹蔭陰銀飲櫻嬰鷹應纓瑩螢營熒蠅穎喲擁傭癰踴詠湧優憂郵鈾猶遊誘輿魚漁娛與嶼語籲禦獄譽預馭鴛淵轅園員圓緣遠願約躍鑰嶽粵悅閱雲鄖勻隕運蘊醞暈韻雜災載攢暫贊贓髒鑿棗竈責擇則澤賊贈紮劄軋鍘閘詐齋債氈盞斬輾嶄棧戰綻張漲帳賬脹趙蟄轍鍺這貞針偵診鎮陣掙睜猙幀鄭證織職執紙摯擲幟質鍾終種腫衆謅軸皺晝驟豬諸誅燭矚囑貯鑄築駐專磚轉賺樁莊裝妝壯狀錐贅墜綴諄濁茲資漬蹤綜總縱鄒詛組鑽緻鐘麼為隻兇準啟闆裡靂餘鍊洩', - /* - 中文判断 - 返回: - simplified:简体中文 - traditional:繁体中文 - 空字符串:不是中文 - */ - chinese:function(str){ - if(/.*[\u4e00-\u9fa5]+.*$/.test(str)){ - if(this.chinese_traditional_dict.indexOf(str) > -1){ - return 'traditional'; - } else { - return 'simplified'; - } - } else { - return ''; - } - }, - //是否包含英文,true:包含 - english:function(str){ - if(/.*[\u0041-\u005a]+.*$/.test(str)){ - return true; - } else if(/.*[\u0061-\u007a]+.*$/.test(str)){ - return true; - } else { - return false; - } - }, - //是否包含日语,true:包含 - japanese:function(str){ - if(/.*[\u3040-\u309F\u30A0-\u30FF]+.*$/.test(str)){ - return true - } else { - return false; - } - }, - //是否包含韩语,true:包含 - korean:function(str){ - if(/.*[\uAC00-\uD7AF]+.*$/.test(str)){ - return true - } else { - return false; - } - }, - //0-9 阿拉伯数字 - number:function(str){ - if(/.*[\u0030-\u0039]+.*$/.test(str)){ - return true; - } - return false; - }, - //意大利语 - italian:function(str){ - if(/.*[\u00E0-\u00F6]+.*$/.test(str)){ - return true; - } - return false; - }, - - //是否包含特殊字符 - specialCharacter:function(str){ - //如:① ⑴ ⒈ - if(/.*[\u2460-\u24E9]+.*$/.test(str)){ - return true - } - - //如:┊┌┍ ▃ ▄ ▅ - if(/.*[\u2500-\u25FF]+.*$/.test(str)){ - return true - } - - //如:㈠ ㎎ ㎏ ㎡ - if(/.*[\u3200-\u33FF]+.*$/.test(str)){ - return true - } - - //如:与ANSI对应的全角字符 - if(/.*[\uFF00-\uFF5E]+.*$/.test(str)){ - return true - } - - //其它特殊符号 - if(/.*[\u2000-\u22FF]+.*$/.test(str)){ - return true - } - - // 、><等符号 - if(/.*[\u3001-\u3036]+.*$/.test(str)){ - return true; - } - - /* - //阿拉伯数字 0-9 - if(/.*[\u0030-\u0039]+.*$/.test(str)){ - return true; - } - */ - - /* - U+0020 空格 - U+0021 ! 叹号 - U+0022 " 双引号 - U+0023 # 井号 - U+0024 $ 价钱/货币符号 - U+0025 % 百分比符号 - U+0026 & 英文“and”的简写符号 - U+0027 ' 引号 - U+0028 ( 开 左圆括号 - U+0029 ) 关 右圆括号 - U+002A * 星号 - U+002B + 加号 - U+002C , 逗号 - U+002D - 连字号/减号 - U+002E . 句号 - U+002F / 左斜杠 - */ - if(/.*[\u0020-\u002F]+.*$/.test(str)){ - return true; - } - - /* - U+003A : 冒号 - U+003B ; 分号 - U+003C < 小于符号 - U+003D = 等于号 - U+003E > 大于符号 - U+003F ? 问号 - U+0040 @ 英文“at”的简写符号 - U+0041 A 拉丁字母 A - U+0042 B 拉丁字母 B - U+0043 C 拉丁字母 C - U+0044 D 拉丁字母 D - U+0045 E 拉丁字母 E - U+0046 F 拉丁字母 F - U+0047 G 拉丁字母 G - U+0048 H 拉丁字母 H - U+0049 I 拉丁字母 I - U+004A J 拉丁字母 J - U+004B K 拉丁字母 K - U+004C L 拉丁字母 L - U+004D M 拉丁字母 M - U+004E N 拉丁字母 N - U+004F O 拉丁字母 O - U+0050 P 拉丁字母 P - U+0051 Q 拉丁字母 Q - U+0052 R 拉丁字母 R - U+0053 S 拉丁字母 S - U+0054 T 拉丁字母 T - U+0055 U 拉丁字母 U - U+0056 V 拉丁字母 V - U+0057 W 拉丁字母 W - U+0058 X 拉丁字母 X - U+0059 Y 拉丁字母 Y - U+005A Z 拉丁字母 Z - U+005B [ 开 方括号 - U+005C \ 右斜杠 - U+005D ] 关 方括号 - U+005E ^ 抑扬(重音)符号 - U+005F _ 底线 - U+0060 ` 重音符 - U+0061 a 拉丁字母 a - U+0062 b 拉丁字母 b - U+0063 c 拉丁字母 c - U+0064 d 拉丁字母 d - U+0065 e 拉丁字母 e - U+0066 f 拉丁字母 f - U+0067 g 拉丁字母 g - U+0068 h 拉丁字母 h - U+0069 i 拉丁字母 i - U+006A j 拉丁字母 j - U+006B k 拉丁字母 k - U+006C l 拉丁字母 l(L的小写) - U+006D m 拉丁字母 m - U+006E n 拉丁字母 n - U+006F o 拉丁字母 o - U+0070 p 拉丁字母 p - U+0071 q 拉丁字母 q - U+0072 r 拉丁字母 r - U+0073 s 拉丁字母 s - U+0074 t 拉丁字母 t - U+0075 u 拉丁字母 u - U+0076 v 拉丁字母 v - U+0077 w 拉丁字母 w - U+0078 x 拉丁字母 x - U+0079 y 拉丁字母 y - U+007A z 拉丁字母 z - U+007B { 开 左花括号 - U+007C | 直线 - U+007D } 关 右花括号 - U+007E ~ 波浪纹 - */ - if(/.*[\u003A-\u007E]+.*$/.test(str)){ - return true; - } - - //空白字符,\u0009\u000a + https://cloud.tencent.com/developer/article/2128593 - if(/.*[\u0009\u000a\u0020\u00A0\u1680\u180E\u202F\u205F\u3000\uFEFF]+.*$/.test(str)){ - return true; - } - if(/.*[\u2000-\u200B]+.*$/.test(str)){ - return true; - } - - /* - 拉丁字母 - 代码 显示 描述 - U+00A1 ¡ 倒转的叹号 - U+00A2 ¢ (货币单位)分钱、毫子 - U+00A3 £ (货币)英镑 - U+00A4 ¤ (货币)当货币未有符号时以此替代 - U+00A5 ¥ (货币)日元 - U+00A6 ¦ 两条断开的直线 - U+00A7 § 文件分不同部分 - U+00A8 ¨ (语言)分音 - U+00A9 © 版权符 - U+00AA ª (意大利文、葡萄牙文、西班牙文)阴性序数 - U+00AB « 双重角形引号 - U+00AC ¬ 逻辑非 - U+00AE ® 商标 - U+00AF ¯ 长音 - U+00B0 ° 角度 - U+00B1 ± 正负号 - U+00B2 ² 二次方 - U+00B3 ³ 三次方 - U+00B4 ´ 锐音符 - U+00B5 µ 百万分之一,10?6 - U+00B6 ¶ 文章分段 - U+00B7 · 间隔号 - U+00B8 ¸ 软音符 - U+00B9 ¹ 一次方 - U+00BA º (意大利文、葡萄牙文、西班牙文)阳性序数 - U+00BB » 指向右的双箭头 - U+00BC ¼ 四分之一 - U+00BD ½ 二分之一 - U+00BE ¾ 四分之三 - U+00BF ¿ 倒转的问号 - U+00C1 Á 在拉丁字母 A 上加锐音符 - U+00C2 Â 在拉丁字母 A 上加抑扬符“^” - U+00C3 Ã 在拉丁字母 A 上加“~” - U+00C4 Ä 在拉丁字母 A 上加分音符“..” - U+00C5 Å 在拉丁字母 A 上加角度符“°” - U+00C6 Æ 拉丁字母 A、E 的混合 - U+00C7 Ç 在拉丁字母 C 下加软音符 - U+00C8 È 在拉丁字母 E 上加重音符 - U+00C9 É 在拉丁字母 E 上加锐音符 - U+00CA Ê 在拉丁字母 E 上加抑扬符 - U+00CB Ë 在拉丁字母 E 上加分音符 - U+00CC Ì 在拉丁字母 I 上加重音符 - U+00CD Í 在拉丁字母 I 上加锐音符 - U+00CE Î 在拉丁字母 I 上加抑扬符 - U+00CF Ï 在拉丁字母 I 上加分音符 - U+00D0 Ð 古拉丁字母,现只有法罗文和冰岛文和越南语使用 - U+00D1 Ñ 在拉丁字母 N 上加波浪纹“~” - U+00D2 Ò 在拉丁字母 O 上加重音符 - U+00D3 Ó 在拉丁字母 O 上加锐音符 - U+00D4 Ô 在拉丁字母 O 上加抑扬符 - U+00D5 Õ 在拉丁字母 O 上加波浪纹“~” - U+00D6 Ö 在拉丁字母 O 上加分音符 - U+00D7 × 乘号,亦可拖按“Alt”键,同时按“41425”五键 - U+00D8 Ø 在拉丁字母 O 由右上至左下加对角斜线“/” - U+00D9 Ù 在拉丁字母 U 上加重音符 - U+00DA Ú 在拉丁字母 U 上加锐音符 - U+00DB Û 在拉丁字母 U 上加抑扬符 - U+00DC Ü 在拉丁字母 U 上加分音符 - U+00DD Ý 在拉丁字母 Y 上加锐音符 - U+00DE Þ 古拉丁字母,现已被“Th”取替 - U+00DF ß 德文字母 - U+00E0 à 在拉丁字母 a 上加重音符 - U+00E1 á 在拉丁字母 a 上加锐音符 - U+00E2 â 在拉丁字母 a 上加抑扬符 - U+00E3 ã 在拉丁字母 a 上加波浪纹“~” - U+00E4 ä 在拉丁字母 a 上加分音符 - U+00E5 å 在拉丁字母 a 上加角度符“°” - U+00E6 æ 拉丁字母 a、e 的混合 - U+00E7 ç 在拉丁字母 c 下加软音符 - U+00E8 è 在拉丁字母 e 上加锐音符 - U+00E9 é 在拉丁字母 e 上加重音符 - U+00EA ê 在拉丁字母 e 上加抑扬符 - U+00EB ë 在拉丁字母 e 上加分音符 - U+00EC ì 在拉丁字母 i 上加重音符 - U+00ED í 在拉丁字母 i 上加锐音符 - U+00EE î 在拉丁字母 i 上加抑扬符 - U+00EF ï 在拉丁字母 i 上加分音符 - U+00F0 ð 古拉丁字母 - U+00F1 ñ 在拉丁字母 n 上加波浪纹“~” - U+00F2 ò 在拉丁字母 o 上加重音符 - U+00F3 ó 在拉丁字母 o 上加锐音符 - U+00F4 ô 在拉丁字母 o 上加抑扬符 - U+00F5 õ 在拉丁字母 o 上加波浪纹“~” - U+00F6 ö 在拉丁字母 o 上加分音符 - U+00F7 ÷ 除号,亦可拖按“Alt”键,同时按“41426”五键 - U+00F8 ø 在拉丁字母 o 由右上至左下加对角斜线“/” - U+00F9 ù 在拉丁字母 u 上加重音符 - U+00FA ú 在拉丁字母 u 上加锐音符 - U+00FB ? 在拉丁字母 u 上加抑扬符 - U+00FC ü 在拉丁字母 u 上加分音符 - U+00FD ý 在拉丁字母 y 上加锐音符 - U+00FE þ 古拉丁字母,现已被“th”取替 - U+00FF ü 在拉丁字母 u 上加分音符 - 拉丁字母(扩展 A) - 代码 显示 描述 - U+0100 Ā 在拉丁字母 A 上加长音符 - U+0101 ā 在拉丁字母 a 上加长音符 - U+0102 Ă 在拉丁字母 A 上加短音符 - U+0103 ă 在拉丁字母 a 上加短音符 - U+0104 Ą 在拉丁字母 A 上加反尾形符 - U+0105 ą 在拉丁字母 a 上加反尾形符 - 拉丁字母(扩展 C) - 代码 显示 描述 - U+2C60 Ⱡ 在拉丁字母“L”中间加两条横线“=” - U+2C61 ⱡ 在拉丁字母“l”(L 的小写)中间加两条横线“=” - U+2C62 Ɫ 在拉丁字母“L”(大写)中间加一条波浪线“~” - U+2C63 Ᵽ 在拉丁字母“P”中间加一条横线“-” - U+2C64 Ɽ 在拉丁字母“R”下加一条尾巴 - U+2C65 ⱥ 在拉丁字母“a”上加一条对角斜线“/” - U+2C66 ⱦ 在拉丁字母“t”上加一条对角斜线“/” - U+2C67 Ⱨ 在拉丁字母“H”下加一条尾巴 - U+2C68 ⱨ 在拉丁字母“h”下加一条尾巴 - U+2C69 Ⱪ 在拉丁字母“K”下加一条尾巴 - U+2C6A ⱪ 在拉丁字母“k”下加一条尾巴 - U+2C6B Ⱬ 在拉丁字母“Z”下加一条尾巴 - U+2C6C ⱬ 在拉丁字母“z”下加一条尾巴 - U+2C74 ⱴ 在拉丁字母“v”的起笔加一个弯勾 - U+2C75 Ⱶ 拉丁字母“H”的左半部 - U+2C76 ⱶ 拉丁字母“h”的左半部 - U+2C77 ⱷ 希腊字母“φ”的上半部 - */ - if(/.*[\u00A1-\u0105]+.*$/.test(str)){ - return true; - } - if(/.*[\u2C60-\u2C77]+.*$/.test(str)){ - return true; - } - - - return false; - } - }, - //用户第一次打开网页时,自动判断当前用户所在国家使用的是哪种语言,来自动进行切换为用户所在国家的语种。 - //如果使用后,第二次在用,那就优先以用户所选择的为主 - executeByLocalLanguage:function(){ - translate.request.post(translate.request.api.ip, {}, function(data){ - //console.log(data); - if(data.result == 0){ - console.log('==== ERROR 获取当前用户所在区域异常 ===='); - console.log(data.info); - console.log('==== ERROR END ===='); - }else{ - translate.storage.set('to',data.language); //设置目标翻译语言 - translate.to = data.language; //设置目标语言 - translate.selectLanguageTag - translate.execute(); //执行翻译 - } - }); - }, - - util:{ - /* 生成一个随机UUID,复制于 https://gitee.com/mail_osc/kefu.js */ - uuid:function() { - var d = new Date().getTime(); - if (window.performance && typeof window.performance.now === "function") { - d += performance.now(); //use high-precision timer if available - } - var uuid = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) { - var r = (d + Math.random() * 16) % 16 | 0; - d = Math.floor(d / 16); - return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16); - }); - return uuid; - }, - - //判断字符串中是否存在tag标签。 true存在 - findTag:function(str) { - var reg = /<[^>]+>/g; - return reg.test(str); - }, - //传入一个数组,从数组中找出现频率最多的一个返回。 如果多个频率出现的次数一样,那会返回多个 - arrayFindMaxNumber:function(arr){ - - // 储存每个元素出现的次数 - var numbers = {} - - // 储存出现最多次的元素 - var maxStr = [] - - // 储存最多出现的元素次数 - var maxNum = 0 - - for(var i =0,len=arr.length;imaxNum){ - maxNum = numbers[arr[i]] - } - } - - for(var item in numbers){ - if(numbers[item]===maxNum){ - maxStr.push(item) - } - } - - return maxStr; - }, - //对字符串进行hash化,目的取唯一值进行标识 - hash:function(str){ - if(str == null || typeof(str) == 'undefined'){ - return str; - } - var hash = 0, i, chr; - if (str.length === 0){ - return hash; - } - - for (i = 0; i < str.length; i++) { - chr = str.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; // Convert to 32bit integer - } - return hash+''; - }, - //去除一些指定字符,如换行符。 如果传入的是null,则返回空字符串 - charReplace:function(str){ - - if(str == null){ - return ''; - } - str = str.trim(); - str = str.replace(/\t|\n|\v|\r|\f/g,''); //去除换行符等 - //str = str.replace(/&/g, "%26"); //因为在提交时已经进行了url编码了 - return str; - }, - //RegExp相关 - regExp:{ - // new RegExp(pattern, resultText); 中的 pattern 字符串的预处理 - pattern:function(str){ - str = str.replace(/\\/g,'\\\\'); //这个一定要放在第一个,不然会被下面的影响 - //str = str.replace(/'/g,'\\\''); - str = str.replace(/\"/g,'\\\"'); - //str = str.replace(/./g,'\\\.'); - str = str.replace(/\?/g,'\\\?'); - str = str.replace(/\$/g,'\\\$'); - str = str.replace(/\(/g,'\\\('); - str = str.replace(/\)/g,'\\\)'); - str = str.replace(/\|/g,'\\\|'); - str = str.replace(/\+/g,'\\\+'); - str = str.replace(/\*/g,'\\\*'); - str = str.replace(/\[/g,'\\\['); - str = str.replace(/\]/g,'\\\]'); - str = str.replace(/\^/g,'\\\^'); - str = str.replace(/\{/g,'\\\{'); - str = str.replace(/\}/g,'\\\}'); - return str; - }, - // new RegExp(pattern, resultText); 中的 resultText 字符串的预处理 - resultText:function(str){ - //str = str.replace(/"/g,"\""); - //str = str.replace(/'/g,"\\\'"); - //str = str.replace(/"/g,"\\\""); - return str; - } - }, - //获取URL的GET参数。若没有,返回"" - getUrlParam:function (name){ - var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); - var r = window.location.search.substr(1).match(reg); - if(r!=null)return unescape(r[2]); return ""; - }, - /** - * 同步加载JS,加载过程中会阻塞,加载完毕后继续执行后面的。 - * url: 要加载的js的url - */ - synchronizesLoadJs:function(url){ - var xmlHttp = null; - if(window.ActiveXObject){//IE - try { - //IE6以及以后版本中可以使用 - xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - //IE5.5以及以后版本可以使用 - xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); - } - }else if(window.XMLHttpRequest){ - //Firefox,Opera 8.0+,Safari,Chrome - xmlHttp = new XMLHttpRequest(); - } - //采用同步加载 - xmlHttp.open("GET",url,false); - //发送同步请求,如果浏览器为Chrome或Opera,必须发布后才能运行,不然会报错 - xmlHttp.send(null); - //4代表数据发送完毕 - if( xmlHttp.readyState == 4 ){ - //0为访问的本地,200到300代表访问服务器成功,304代表没做修改访问的是缓存 - if((xmlHttp.status >= 200 && xmlHttp.status <300) || xmlHttp.status == 0 || xmlHttp.status == 304){ - var myBody = document.getElementsByTagName("HTML")[0]; - var myScript = document.createElement( "script" ); - myScript.language = "javascript"; - myScript.type = "text/javascript"; - try{ - //IE8以及以下不支持这种方式,需要通过text属性来设置 - myScript.appendChild(document.createTextNode(xmlHttp.responseText)); - }catch (ex){ - myScript.text = xmlHttp.responseText; - } - myBody.appendChild(myScript); - return true; - }else{ - return false; - } - }else{ - return false; - } - }, - //加载 msg.js - loadMsgJs:function(){ - if(typeof(msg) != 'undefined'){ - return; - } - translate.util.synchronizesLoadJs('https://res.zvo.cn/msg/msg.js'); - }, - /* - 对一个对象,按照对象的key的长度进行排序,越长越在前面 - */ - objSort:function(obj){ - // 获取对象数组的所有 key,并转换为普通数组 - var keys = Array.from(Object.keys(obj)); - - // 对 key 数组进行排序 - keys.sort(function(a, b){ - return b.length - a.length; - }); - - // 定义一个新的对象数组,用来存储排序后的结果 - var sortedObj = new Array(); - - // 遍历排序后的 key 数组,将对应的值复制到新的对象数组中,并删除原来的对象数组中的键值对 - for (var key of keys) { - sortedObj[key] = obj[key]; - } - return sortedObj; - }, - /* - 将 2.11.3.20231232 转化为 2011003 - 转化时会去掉最后一个日期的字符 - */ - versionStringToInt:function(versionString){ - var vs = versionString.split('\.'); - var result = 0; - result = parseInt(vs[0])*1000*1000 + result; - result = parseInt(vs[1])*1000 + result; - result = parseInt(vs[2]) + result; - - return result; - }, - /** - * 将一个 JSONArray 数组,按照文字长度进行拆分。 - * 比如传入的 array 数组的文字长度是6200,传入的 size 是2000,那么就是将 array 数组拆分为多个长度不超出2000的数组返回。 - * 注意,这个长度是指 array.toString() 后的长度,也就是包含了 [""] 这种符号的长度 - * @param array 要被拆分的数组,其内都是String类型,传入格式如 ["你好","世界"] - * @param size 要被拆分的长度 - * @return 被拆分后的数组列表 - * @author 刘晓腾 - */ - split:function(array, size) { - let list = []; - // 数组长度小于size,直接进行返回 - if(JSON.stringify(array).length <= size) { - list.push(array); - } else { - // 转换成String - let arrayStr = JSON.stringify(array).trim().substring(1, JSON.stringify(array).length - 1); - - // 判断size和字符串长度的差值,如果为1或者2,就直接拆成两段 - if (JSON.stringify(array).length - size <= 2) { - size = size - 4; - // 拆两段 - let str1 = arrayStr.substring(0, arrayStr.lastIndexOf("\",\"")+1); - let str2 = arrayStr.substring(arrayStr.lastIndexOf("\",\"")+2); - list.push(JSON.parse("[" + str1 + "]")); - list.push(JSON.parse("[" + str2 + "]")); - } else { - size = size - 2; - // 拆多段 - let index = 0; - while (index - arrayStr.length < 0) { - // 按照指定大小拆一段 - let s = ""; - if ((index+size) - arrayStr.length >= 0) { - s = arrayStr.substring(index); - } else { - s = arrayStr.substring(index, (index+size)); - } - // 结尾长度默认为字符串长度 - let endIndex = s.length; - // 因为下次开始的第一个字符可能会是逗号,所以下次开始需要+1 - let startNeedAdd = 1; - // 判断最后一个字符是否为双引号 - if (s.endsWith("\"")) { - // 判断倒数第二个是否为逗号 - if (s.endsWith("\",\"")) { - // 删除两个字符 - endIndex-=2; - } else if (!s.startsWith("\"")) { - // 如果开头不是引号,需要补一个引号,这就导致会超长,所以结尾就要找指定字符的 - // 找出最后一个指定字符的位置 - let la = s.lastIndexOf("\",\""); - endIndex = la + 1; - } - } else if (s.endsWith("\",")) { - // 判断是否为逗号,是的话删除一个字符 - endIndex-=1; - } else { - // 都不是,那就是内容结尾 - // 找出最后一个指定字符的位置 - let la = s.lastIndexOf("\",\""); - endIndex = la + 1; - // 内容超长,endIndex就会变成0,这时需要手动赋值 - if (endIndex <= 0) { - // 看看是否以引号开头,如果不是,需要拼两个引号 - if (s.startsWith("\"")) { - // 拼一个引号,-1 - endIndex = s.length() - 1; - } else { - // 拼两个引号,-2 - endIndex = s.length() - 2; - } - if (!s.endsWith("\"")) { - // 开始不是逗号了,不能-1 - startNeedAdd = 0; - } - } - } - // 根据处理的结尾长度进行第二次拆分 - let s2 = ""; - if (endIndex - s.length > 0 || endIndex - 0 == 0) { - s2 = s; - endIndex = endIndex + s2.length; - } else { - s2 = s.substring(0, endIndex); - } - if (!s2.startsWith("\"") && !s2.startsWith(",\"")) { - // 拼一个引号 - s2 = "\"" + s2; - } - if (!s2.endsWith("\"")) { - // 拼一个引号 - s2 = s2 +"\""; - } - // 计算下次循环开始的长度 - index += (endIndex + startNeedAdd); - // 加到list - s2 = "[" + s2 + "]"; - try { - list.push(JSON.parse(s2)); - } catch (e) { - // 遇到错误,略过一个字符 - index = index - (endIndex + startNeedAdd) + 1; - } - } - } - } - return list; - } - - }, - //机器翻译采用哪种翻译服务 - service:{ - /* - name填写的值有 - translate.service 有 http://translate.zvo.cn/41160.html 提供机器翻译服务 - client.edge 有edge浏览器接口提供翻译服务 ,也就是执行翻译时直接是 - - */ - name:'translate.service', - /* - 其实就是设置 translate.service.name - - */ - use: function(serviceName){ - if(typeof(serviceName) == 'string' && serviceName == 'client.edge'){ - translate.service.name = serviceName; - - //增加元素整体翻译能力 - translate.whole.tag.push('body'); - translate.whole.tag.push('head'); - translate.whole.tag.push('html'); - } - }, - //客户端方式的edge提供机器翻译服务 - edge:{ - api:{ //edge浏览器的翻译功能 - auth:'https://edge.microsoft.com/translate/auth', //auth授权拉取 - translate:'https://api.cognitive.microsofttranslator.com/translate?from={from}&to={to}&api-version=3.0&includeSentenceLength=true' //翻译接口 - }, - - language:{ - json:[{"id":"ukrainian","name":"УкраїнськаName","serviceId":"uk"},{"id":"norwegian","name":"Norge","serviceId":"no"},{"id":"welsh","name":"color name","serviceId":"cy"},{"id":"dutch","name":"nederlands","serviceId":"nl"},{"id":"japanese","name":"しろうと","serviceId":"ja"},{"id":"filipino","name":"Pilipino","serviceId":"fil"},{"id":"english","name":"English","serviceId":"en"},{"id":"lao","name":"ກະຣຸນາ","serviceId":"lo"},{"id":"telugu","name":"తెలుగుQFontDatabase","serviceId":"te"},{"id":"romanian","name":"Română","serviceId":"ro"},{"id":"nepali","name":"नेपालीName","serviceId":"ne"},{"id":"french","name":"Français","serviceId":"fr"},{"id":"haitian_creole","name":"Kreyòl ayisyen","serviceId":"ht"},{"id":"czech","name":"český","serviceId":"cs"},{"id":"swedish","name":"Svenska","serviceId":"sv"},{"id":"russian","name":"Русский язык","serviceId":"ru"},{"id":"malagasy","name":"Malagasy","serviceId":"mg"},{"id":"burmese","name":"ဗာရမ်","serviceId":"my"},{"id":"pashto","name":"پښتوName","serviceId":"ps"},{"id":"thai","name":"คนไทย","serviceId":"th"},{"id":"armenian","name":"Արմենյան","serviceId":"hy"},{"id":"chinese_simplified","name":"简体中文","serviceId":"zh-CHS"},{"id":"persian","name":"Persian","serviceId":"fa"},{"id":"chinese_traditional","name":"繁體中文","serviceId":"zh-CHT"},{"id":"kurdish","name":"Kurdî","serviceId":"ku"},{"id":"turkish","name":"Türkçe","serviceId":"tr"},{"id":"hindi","name":"हिन्दी","serviceId":"hi"},{"id":"bulgarian","name":"български","serviceId":"bg"},{"id":"malay","name":"Malay","serviceId":"ms"},{"id":"swahili","name":"Kiswahili","serviceId":"sw"},{"id":"oriya","name":"ଓଡିଆ","serviceId":"or"},{"id":"icelandic","name":"ÍslandName","serviceId":"is"},{"id":"irish","name":"Íris","serviceId":"ga"},{"id":"khmer","name":"ខ្មែរKCharselect unicode block name","serviceId":"km"},{"id":"gujarati","name":"ગુજરાતી","serviceId":"gu"},{"id":"slovak","name":"Slovenská","serviceId":"sk"},{"id":"kannada","name":"ಕನ್ನಡ್Name","serviceId":"kn"},{"id":"hebrew","name":"היברית","serviceId":"he"},{"id":"hungarian","name":"magyar","serviceId":"hu"},{"id":"marathi","name":"मराठीName","serviceId":"mr"},{"id":"tamil","name":"தாமில்","serviceId":"ta"},{"id":"estonian","name":"eesti keel","serviceId":"et"},{"id":"malayalam","name":"മലമാലം","serviceId":"ml"},{"id":"inuktitut","name":"ᐃᓄᒃᑎᑐᑦ","serviceId":"iu"},{"id":"arabic","name":"بالعربية","serviceId":"ar"},{"id":"deutsch","name":"Deutsch","serviceId":"de"},{"id":"slovene","name":"slovenščina","serviceId":"sl"},{"id":"bengali","name":"বেঙ্গালী","serviceId":"bn"},{"id":"urdu","name":"اوردو","serviceId":"ur"},{"id":"azerbaijani","name":"azerbaijani","serviceId":"az"},{"id":"portuguese","name":"português","serviceId":"pt"},{"id":"samoan","name":"lifiava","serviceId":"sm"},{"id":"afrikaans","name":"afrikaans","serviceId":"af"},{"id":"tongan","name":"汤加语","serviceId":"to"},{"id":"greek","name":"ελληνικά","serviceId":"el"},{"id":"indonesian","name":"IndonesiaName","serviceId":"id"},{"id":"spanish","name":"Español","serviceId":"es"},{"id":"danish","name":"dansk","serviceId":"da"},{"id":"amharic","name":"amharic","serviceId":"am"},{"id":"punjabi","name":"ਪੰਜਾਬੀName","serviceId":"pa"},{"id":"albanian","name":"albanian","serviceId":"sq"},{"id":"lithuanian","name":"Lietuva","serviceId":"lt"},{"id":"italian","name":"italiano","serviceId":"it"},{"id":"vietnamese","name":"Tiếng Việt","serviceId":"vi"},{"id":"korean","name":"한국어","serviceId":"ko"},{"id":"maltese","name":"Malti","serviceId":"mt"},{"id":"finnish","name":"suomi","serviceId":"fi"},{"id":"catalan","name":"català","serviceId":"ca"},{"id":"croatian","name":"hrvatski","serviceId":"hr"},{"id":"bosnian","name":"bosnian","serviceId":"bs-Latn"},{"id":"polish","name":"Polski","serviceId":"pl"},{"id":"latvian","name":"latviešu","serviceId":"lv"},{"id":"maori","name":"Maori","serviceId":"mi"}], - /* - 获取map形式的语言列表 - key为 translate.service 的 name - value为serviceId - - */ - getMap:function(){ - if(typeof(translate.service.edge.language.map) == 'undefined'){ - translate.service.edge.language.map = new Array(); - for(var i = 0; i < translate.service.edge.language.json.length; i++){ - var item = translate.service.edge.language.json[i]; - translate.service.edge.language.map[item.id] = item.serviceId; - } - } - return translate.service.edge.language.map; - } - }, - /** - * edge 进行翻译。 这个传入参数跟 translate.request.post 是一样的 - * @param path 请求的path(path,传入的是translate.request.api.translate 这种的,需要使用 getUrl 来组合真正请求的url ) - * @param data 请求的参数数据 - * @param func 请求完成的回调,传入如 function(data){ console.log(data); } - */ - translate:function(path, data, func){ - var textArray = JSON.parse(decodeURIComponent(data.text)); - let translateTextArray = translate.util.split(textArray, 48000); - //console.log(translateTextArray); - - - translate.request.send(translate.service.edge.api.auth, {}, function(auth){ - var from = translate.service.edge.language.getMap()[data.from]; - var to = translate.service.edge.language.getMap()[data.to]; - var transUrl = translate.service.edge.api.translate.replace('{from}',from).replace('{to}',to); - - //如果翻译量大,要拆分成多次翻译请求 - for(var tai = 0; tai 1){ - //这一次翻译呗拆分了多次请求,那么要进行补全数组,使数组个数能一致 - - /* - - 注意这里根据数组的长度来判断当前属于第几个数组, - 有几率会是拆分的数组,其中有两组的长度是一样的, - 这样的话是有问题的,只不过几率很小,就先这样了 - 但终归还是留了个坑 -- 记录 - - */ - - var currentIndex = -1; //当前翻译请求属于被拆分的第几个的数组下标,从0开始的 - for(var cri = 0; cri < translateTextArray.length; cri++){ - if(translateTextArray[cri].length - d.text.length == 0){ - currentIndex = cri; - break; - } - } - - //进行对前后进行补齐数组 - if(currentIndex < 0){ - console.log('------ERROR--------'); - console.log('翻译内容过多,进行拆分,但拆分判断出现异常,currentIndex:-1 请联系 http://translate.zvo.cn/43006.html 说明'); - } - //前插入空数组填充 - for(var addbeforei = 0; addbeforeicurrentIndex; addafteri--){ - var afterItemArrayLength = translateTextArray[addafteri].length; - for(var bi = 0; bi < afterItemArrayLength; bi++){ - d.text.push(null); - } - } - - } - - func(d); - }, 'post', true, {'Authorization':'Bearer '+auth, 'Content-Type':'application/json'}, function(xhr){ - console.log('---------error--------'); - console.log('edge translate service error, http code : '+xhr.status + ', response text : '+xhr.responseText); - }, true); - - - } - //console.log('translateResultArray') - //console.log(translateResultArray); - - - }, 'get', true, {'content-type':'application/x-www-form-urlencoded'}, function(xhr){ - console.log('---------error--------'); - console.log('edge translate service error, http code : '+xhr.status + ', response text : '+xhr.responseText); - }, true); - - - - - - } - } - }, - //request请求来源于 https://github.com/xnx3/request - request:{ - - //相关API接口方面 - api:{ - /** - * 翻译接口请求的域名主机 host - * 格式注意前面要带上协议如 https:// 域名后要加 / - * v2.8.2 增加数组形态,如 ['https://api.translate.zvo.cn/','xxxxx'] - */ - //host:'https://api.translate.zvo.cn/', - host:['https://api.translate.zvo.cn/','https://america.api.translate.zvo.cn/'], - //host的备用接口,格式同host,可以填写多个,只不过这里是数组格式。只有当主 host 无法连通时,才会采用备host来提供访问。如果为空也就是 [] 则是不采用备方案。 - //backupHost:['',''], - language:'language.json', //获取支持的语种列表接口 - translate:'translate.json', //翻译接口 - ip:'ip.json', //根据用户当前ip获取其所在地的语种 - connectTest:'connectTest.json', //用于 translate.js 多节点翻译自动检测网络连通情况 - init:'init.json', //获取最新版本号,跟当前版本进行比对,用于提醒版本升级等使用 - - }, - /* - 请求后端接口的响应。无论是否成功,都会触发此处。 - 另外当 xhr.readyState==4 的状态时才会触发。 - 此处会在接口请求响应后、且在translate.js处理前就会触发 - @param xhr XMLHttpRequest 接口请求 - - */ - response:function(xhr){ - //console.log('response------'); - //console.log(xhr); - }, - /* - 速度检测控制中心, 检测主备翻译接口的响应速度进行排列,真正请求时,按照排列的顺序进行请求 - v2.8.2增加 - - storage存储方面 - storage存储的key 存的什么 - speedDetectionControl_hostQueue hostQueue - speedDetectionControl_hostQueueIndex 当前要使用的是 hostQueue 中的数组下标。如果没有,这里默认视为0 - speedDetectionControl_lasttime 最后一次执行速度检测的时间戳,13位时间戳 - - - - */ - speedDetectionControl:{ - /* - - 进行 connect主节点缩减的时间,单位是毫秒. - 这个是进行 translate.request.speedDetectionControl.checkResponseSpeed() 节点测速时,translate.request.api.host 第一个元素是默认的主节点。 - 主节点在实际测速完后,会减去一定的时间,以便让用户大部分时间可以使用主节点,而不必走分节点。 - 例如主节点实际响应速度 3500 毫秒,那么会减去这里设置的2000毫秒,记为 1500 毫秒 - 当然如果是小于这里设置的2000毫秒,那么会记为0毫秒。 - 这样再跟其他分节点的响应时间进行对比,主节点只要不是响应超时,就会有更大的几率被选中为实际使用的翻译的节点 - - 这里的单位是毫秒。 - v2.10.2.20231225 增加 - */ - hostMasterNodeCutTime:2000, - - /* - 翻译的队列,这是根据网络相应的速度排列的,0下标为请求最快,1次之... - 其格式为: - [ - { - "host":"xxxxxxxx", - "time":123 //这里的单位是毫秒 - }, - { - "host":"xxxxxxxx", - "time":123 //这里的单位是毫秒 - } - ] - */ - hostQueue:[], - hostQueueIndex:-1, //当前使用的 hostQueue的数组下标, -1表示还未初始化赋予值,不可直接使用,通过 getHostQueueIndex() 使用 - disableTime:1000000, //不可用的时间,storage中存储的 speedDetectionControl_hostQueue 其中 time 这里,如果值是 这个,便是代表这个host处于不可用状态 - - - //获取 host queue 队列 - getHostQueue:function(){ - if(translate.request.speedDetectionControl.hostQueue.length == 0){ - //还没有,先从本地存储中取,看之前是否已经设置过了 - // 只有经过真正的网络测速后,才会加入 storage 的 hostQueue - var storage_hostQueue = translate.storage.get('speedDetectionControl_hostQueue'); - if(storage_hostQueue == null || typeof(storage_hostQueue) == 'undefined'){ - //本地存储中没有,也就是之前没设置过,是第一次用,那么直接讲 translate.request.api.host 赋予之 - //translate.request.api.host - //console.log(typeof(translate.request.api.host)) - if(typeof(translate.request.api.host) == 'string'){ - //单个,那么赋予数组形式 - //translate.request.speedDetectionControl.hostQueue = [{"host":translate.request.api.host, time:0 }]; - translate.request.api.host = [''+translate.request.api.host]; - } - - //console.log(translate.request.api.host) - //数组形态,多个,v2.8.2 增加多个,根据优先级返回 - translate.request.speedDetectionControl.hostQueue = []; - for(var i = 0; i updateTime){ - translate.request.speedDetectionControl.checkResponseSpeed(); - } - - } - - - return translate.request.speedDetectionControl.hostQueue; - }, - - /* - 服务于 checkResponseSpeed 用于将测试结果存入 storage - time: 当前接口请求的耗时,单位是毫秒。如果是 1000000 那么表示这个接口不可用 - */ - checkResponseSpeed_Storage:function(host, time){ - - translate.request.speedDetectionControl.checkHostQueue.push({"host":host, "time":time }); - //按照time进行排序 - translate.request.speedDetectionControl.checkHostQueue.sort((a, b) => a.time - b.time); - - //存储到 storage 持久化 - translate.storage.set('speedDetectionControl_hostQueue',JSON.stringify(translate.request.speedDetectionControl.checkHostQueue)); - translate.storage.set('speedDetectionControl_lasttime', new Date().getTime()); - - translate.request.speedDetectionControl.hostQueue = translate.request.speedDetectionControl.checkHostQueue; - }, - - //测试响应速度 - checkResponseSpeed:function(){ - var headers = { - 'content-type':'application/x-www-form-urlencoded', - }; - - - translate.request.speedDetectionControl.checkHostQueue = []; //用于实际存储 - translate.request.speedDetectionControl.checkHostQueueMap = []; //只是map,通过key取值,无其他作用 - - if(typeof(translate.request.api.host) == 'string'){ - //单个,那么赋予数组形式 - translate.request.api.host = [''+translate.request.api.host]; - } - - for(var i = 0; i < translate.request.api.host.length; i++){ - var host = translate.request.api.host[i]; - // 获取当前时间的时间戳 - translate.request.speedDetectionControl.checkHostQueueMap[host] = { - start:new Date().getTime() - }; - - - try{ - translate.request.send( - host+translate.request.api.connectTest, - {host:host}, - function(data){ - var host = data.info; - var map = translate.request.speedDetectionControl.checkHostQueueMap[host]; - var time = new Date().getTime() - map.start; - - if(translate.request.api.host[0] == host){ - //console.log('如果是第一个,那么是主的,默认允许缩减2000毫秒,也就是优先使用主的'); - time = time - translate.request.speedDetectionControl.hostMasterNodeCutTime; - if(time < 0){ - time = 0; - } - } - - translate.request.speedDetectionControl.checkResponseSpeed_Storage(host, time); - /* - translate.request.speedDetectionControl.checkHostQueue.push({"host":host, "time":time }); - //按照time进行排序 - translate.request.speedDetectionControl.checkHostQueue.sort((a, b) => a.time - b.time); - - //存储到 storage 持久化 - translate.storage.set('speedDetectionControl_hostQueue',JSON.stringify(translate.request.speedDetectionControl.checkHostQueue)); - translate.storage.set('speedDetectionControl_lasttime', new Date().getTime()); - - translate.request.speedDetectionControl.hostQueue = translate.request.speedDetectionControl.checkHostQueue; - //console.log(translate.request.speedDetectionControl.hostQueue); - */ - }, - 'post', - true, - headers, - function(data){ - //translate.request.speedDetectionControl.checkResponseSpeed_Storage(host, time); - var hostUrl = data.requestURL.replace('connectTest.json',''); - translate.request.speedDetectionControl.checkResponseSpeed_Storage(hostUrl, translate.request.speedDetectionControl.disableTime); - }, - false - ); - }catch(e){ - //console.log('e0000'); - console.log(e); - //time = 300000; //无法连接的,那么赋予 300 秒吧 - } - - } - - }, - - //获取当前使用的host的数组下标 - getHostQueueIndex:function(){ - if(translate.request.speedDetectionControl.hostQueueIndex < 0){ - //页面当前第一次使用,赋予值 - //先从 storage 中取 - var storage_index = translate.storage.get('speedDetectionControl_hostQueueIndex'); - if(typeof(storage_index) == 'undefined' || storage_index == null){ - //存储中不存在,当前用户(浏览器)第一次使用,默认赋予0 - translate.request.speedDetectionControl.hostQueueIndex = 0; - translate.storage.set('speedDetectionControl_hostQueueIndex',0); - }else{ - translate.request.speedDetectionControl.hostQueueIndex = storage_index; - } - } - return translate.request.speedDetectionControl.hostQueueIndex; - }, - - //获取当前要使用的host - getHost:function(){ - var queue = translate.request.speedDetectionControl.getHostQueue(); - //console.log(queue); - var queueIndex = translate.request.speedDetectionControl.getHostQueueIndex(); - if(queue.length > queueIndex){ - //正常,没有超出越界 - - }else{ - //异常,下标越界了!,固定返回最后一个 - console.log('异常,下标越界了!index:'+queueIndex); - queueIndex = queue.length-1; - } - //console.log(queueIndex); - return queue[queueIndex].host; - }, - - }, - //生成post请求的url - getUrl:function(path){ - var currentHost = translate.request.speedDetectionControl.getHost(); - var url = currentHost+path+'?v='+translate.version; - //console.log('url: '+url); - return url; - }, - /** - * post请求 - * @param path 请求的path(path,传入的是translate.request.api.translate 这种的,需要使用 getUrl 来组合真正请求的url ) - * @param data 请求的参数数据,传入如 - * { - * from: "chinese_simplified", - * text: "%5B%22%E4%BD%A0%E5%A5%BD%EF%BC%8C%E6%88%91", - * to: "chinese_traditional - * } - * - * @param func 请求完成的回调,传入如 function(data){ console.log(data); } - */ - post:function(path, data, func){ - var headers = { - 'content-type':'application/x-www-form-urlencoded', - }; - if(typeof(data) == 'undefined'){ - return; - } - - //企业级翻译自动检测 - translate.enterprise.automaticAdaptationService(); - - // ------- edge start -------- - var url = translate.request.getUrl(path); - //if(url.indexOf('edge') > -1 && path == translate.request.api.translate){ - if(translate.service.name == 'client.edge'){ - if(path == translate.request.api.translate){ - translate.service.edge.translate(path, data, func); - return; - } - if(path == translate.request.api.language){ - var d = {}; - d.info = 'SUCCESS'; - d.result = 1; - d.list = translate.service.edge.language.json; - func(d); - return; - } - - //return; - } - // ------- edge end -------- - - this.send(path, data, func, 'post', true, headers, null, true); - }, - /** - * 发送请求 - * url 请求的url或者path(path,传入的是translate.request.api.translate 这种的,需要使用 getUrl 来组合真正请求的url ) - * data 请求的数据,如 {"author":"管雷鸣",'site':'www.guanleiming.com'} - * func 请求完成的回调,传入如 function(data){} - * method 请求方式,可传入 post、get - * isAsynchronize 是否是异步请求, 传入 true 是异步请求,传入false 是同步请求。 如果传入false,则本方法返回xhr - * headers 设置请求的header,传入如 {'content-type':'application/x-www-form-urlencoded'}; - * abnormalFunc 响应异常所执行的方法,响应码不是200就会执行这个方法 ,传入如 function(xhr){} 另外这里的 xhr 会额外有个参数 xhr.requestURL 返回当前请求失败的url - * showErrorLog 是否控制台打印出来错误日志,true打印, false 不打印 - */ - send:function(url, data, func, method, isAsynchronize, headers, abnormalFunc, showErrorLog){ - //post提交的参数 - var params = ''; - if(data != null){ - if(typeof(data) == 'string'){ - params = data; //payload 方式 - }else{ - //表单提交方式 - for(var index in data){ - if(params.length > 0){ - params = params + '&'; - } - params = params + index + '=' + data[index]; - } - } - } - - - - if(url.indexOf('https://') == 0 || url.indexOf('http://') == 0){ - //采用的url绝对路径 - }else{ - //相对路径,拼接上host - url = translate.request.getUrl(url); - } - - var xhr=null; - try{ - xhr=new XMLHttpRequest(); - }catch(e){ - xhr=new ActiveXObject("Microsoft.XMLHTTP"); - } - //2.调用open方法(true----异步) - xhr.open(method,url,isAsynchronize); - //设置headers - if(headers != null){ - for(var index in headers){ - xhr.setRequestHeader(index,headers[index]); - } - } - if(translate.service.name == 'translate.service'){ - xhr.setRequestHeader('currentpage', window.location.href+''); - } - xhr.send(params); - //4.请求状态改变事件 - xhr.onreadystatechange=function(){ - if(xhr.readyState==4){ - translate.request.response(xhr); //自定义响应的拦截 - - if(xhr.status==200){ - //请求正常,响应码 200 - var json = null; - if(typeof(xhr.responseText) == 'undefined' || xhr.responseText == null){ - //相应内容为空 - }else{ - //响应内容有值 - if(xhr.responseText.indexOf('{') > -1 && xhr.responseText.indexOf('}') > -1){ - //应该是json格式 - try{ - json = JSON.parse(xhr.responseText); - }catch(e){ - console.log(e); - } - } - } - - if(json == null){ - func(xhr.responseText); - }else{ - func(json); - } - }else{ - if(showErrorLog){ - if(url.indexOf(translate.request.api.connectTest) > -1){ - //测试链接速度的不在报错里面 - }else{ - - //判断是否是v2版本的翻译,如果是 translate.service 模式并且没有使用企业级翻译,参会提示 - //2024.3月底开始,翻译使用量增加的太快,开源的翻译服务器有点扛不住经常出故障,所以直接把这个提示加到这里 - if(translate.service.name == 'translate.service' && !translate.enterprise.isUse){ - console.log('----- translate.js 提示 -----\n检测到您正在使用v2的旧版本,并且当前的v2接口恰好处于不稳定状态!所以您当前的翻译是并没有生效,也就是并没有正常进行翻译的,不过这不是您的问题,是v2版本的翻译通道因为开源免费,使用的人太多导致的偶尔不稳定。如果您想正常使用,建议您进行一下操作:\n建议一:切换到v3最新版本的 client.edge 翻译模式,设置方式可以参考: http://translate.zvo.cn/43086.html 它是2024年初新出的V3版本的翻译模式,翻译效果更稳定,而且也是完全免费使用。\n建议二:启用企业级稳定翻译,有些网站对翻译稳定性、实时性要求比较高的,可以考虑采用这种方式. 使用方式可参考: http://translate.zvo.cn/43262.html 这种方式是 2024.3月底应不少用户建议推出的一个独立翻译通道,这个翻译通道仅仅只有提供赞助的人才能使用,使用人数少,多台翻译服务器组件的自动负载以及健康检查耗时最短的最优翻译方案,使翻译更稳定。\n\n建议一跟建议二的区别是建议一延续了translate.js三年以来一直贯彻的开源免费的方针,同时也提供了相对稳定的翻译支持,它的翻译稳定性还是信得过的,一般使用这种就行。而建议二它对稳定性及翻译速度接口响应专门进行了深度优化,它的唯一缺点就是花钱。\n-------------'); - } - - //console.log(xhr); - console.log('------- translate.js service api response error --------'); - console.log(' http code : '+xhr.status); - console.log(' response : '+xhr.response); - console.log(' request url : '+url); - console.log(' request data : '+JSON.stringify(data)); - console.log(' request method : '+method); - console.log('---------------------- end ----------------------'); - } - - } - xhr.requestURL = url; - if(abnormalFunc != null){ - abnormalFunc(xhr); - } - } - } - } - return xhr; - }, - /* - - 手动进行翻译操作。参数说明: - texts: 可传入要翻译的文本、以及文本数组。 比如要一次翻译多个句子,那就可以传入数组的方式 - function: 翻译完毕后的处理函数。传入如 function(data){ console.log(data); } - 注意,返回的data.result 为 1,则是翻译成功。 为0则是出错,可通过data.info 得到错误原因。 更详细说明参考: http://api.zvo.cn/translate/service/20230807/translate.json.html - - 使用案例一: - translate.request.translateText('你好,我是翻译的内容', function(data){ - //打印翻译结果 - console.log(data); - }); - - 使用案例二: - var texts = ['我是翻译的第一句','我是翻译的第二句','我是翻译的第三句']; - translate.request.translateText(texts, function(data){ - //打印翻译结果 - console.log(data); - }); - */ - translateText:function(texts, func){ - if(typeof(texts) == 'string'){ - texts = [texts]; - } - - var url = translate.request.api.translate; - var data = { - from:translate.language.getLocal(), - to: translate.language.getCurrent(), - text:encodeURIComponent(JSON.stringify(texts)) - }; - //console.log(data); - translate.request.post(url, data, function(data){ - //console.log(data); - if(data.result == 0){ - console.log('=======ERROR START======='); - console.log('from : '+data.from); - console.log('to : '+data.to); - console.log('translate text array : '+texts); - console.log('response : '+data.info); - console.log('=======ERROR END ======='); - //return; - } - - func(data); - }); - }, - listener:{ - minIntervalTime:800, // 两次触发的最小间隔时间,单位是毫秒,这里默认是800毫秒。最小填写时间为 200毫秒 - lasttime:0,// 最后一次触发执行 translate.execute() 的时间,进行执行的那一刻,而不是执行完。13位时间戳 - /* - 设置要在未来的某一时刻执行,单位是毫秒,13位时间戳。 - 执行时如果当前时间大于这个数,则执行,并且将这个数置为0。 - 会有一个循环执行函数每间隔200毫秒触发一次 - */ - executetime:0, - /* - 进行翻译时,延迟翻译执行的时间 - 当ajax请求结束后,延迟这里设置的时间,然后自动触发 translate.execute() 执行 - */ - delayExecuteTime:200, - /* - 满足ajax出发条件,设置要执行翻译。 - 注意,设置这个后并不是立马就会执行,而是加入了一个执行队列,避免1秒请求了10次会触发10次执行的情况 - */ - addExecute:function(){ - var currentTime = Date.now(); - if(translate.request.listener.lasttime == 0){ - //是第一次,lasttime还没设置过,那么直接设置执行时间为当前时间 - translate.request.listener.executetime = currentTime; - translate.request.listener.lasttime = 1; - }else{ - //不是第一次了 - - if(translate.request.listener.executetime > 1){ - //当前有执行队列等待,不用再加入执行等待了 - //console.log('已在执行队列,不用再加入了 '+currentTime); - }else{ - //执行队列中还没有,可以加入执行命令 - - if(currentTime < translate.request.listener.lasttime + translate.request.listener.minIntervalTime){ - //如果当前时间小于最后一次执行时间+间隔时间,那么就是上次才刚刚执行过,这次执行的太快了,那么赋予未来执行翻译的时间为最后一次时间+间隔时间 - translate.request.listener.executetime = translate.request.listener.lasttime + translate.request.listener.minIntervalTime; - //console.log('addexecute - < 如果当前时间小于最后一次执行时间+间隔时间,那么就是上次才刚刚执行过,这次执行的太快了,那么赋予未来执行翻译的时间为最后一次时间+间隔时间'); - }else{ - translate.request.listener.executetime = currentTime; - //console.log('addexecute -- OK '); - } - } - - - } - - - }, - /* - 自定义是否会被触发的方法判断 - url 当前ajax请求的url,注意是这个url请求完毕获取到200相应的内容时才会触发此方法 - 返回值 return true; 默认是不管什么url,全部返回true,表示会触发翻译自动执行 translate.execute; ,如果你不想让某个url触发翻译,那么你可以自行在这个方法中用代码进行判断,然后返回false,那么这个url将不会自动触发翻译操作。 - */ - trigger:function(url){ - return true; - }, - /* - 启动根据ajax请求来自动触发执行翻译,避免有时候有的框架存在漏翻译的情况。 - 这个只需要执行一次即可,如果执行多次,只有第一次会生效 - */ - start:function(){ - - //确保这个方法只会触发一次,不会过多触发 - if(typeof(translate.request.listener.isStart) != 'undefined'){ - return; - }else{ - translate.request.listener.isStart = true; - } - - //增加一个没100毫秒检查一次执行任务的线程 - setInterval(function(){ - var currentTime = Date.now(); - if(translate.request.listener.executetime > 1 && currentTime > translate.request.listener.executetime+translate.request.listener.delayExecuteTime){ - translate.request.listener.executetime = 0; - translate.request.listener.lasttime = currentTime; - try{ - //console.log('执行翻译 --'+currentTime); - translate.execute(); - }catch(e){ - console.log(e); - } - } - }, 100); - - const observer = new PerformanceObserver((list) => { - var translateExecute = false; //是否需要执行翻译 true 要执行 - for(var e = 0; e < list.getEntries().length; e++){ - var entry = list.getEntries()[e]; - - if (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest') { - var url = entry.name; - //console.log(url); - //判断url是否是当前translate.js本身使用的 - if(typeof(translate.request.api.host) == 'string'){ - translate.request.api.host = [translate.request.api.host]; - } - var ignoreUrl = false; // 是否是忽略的url true是 - - //translate.service 模式判断 - for(var i = 0; i < translate.request.api.host.length; i++){ - if(url.indexOf(translate.request.api.host[i]) > -1){ - //是,那么直接忽略 - ignoreUrl = true; - break; - } - } - //client.edge 判断 - if(url.indexOf(translate.service.edge.api.auth) > -1){ - ignoreUrl = true; - } - if(url.indexOf('.microsofttranslator.com/translate') > -1){ - ignoreUrl = true; - } - - if(ignoreUrl){ - //console.log('忽略:'+url); - continue; - } - if(translate.request.listener.trigger()){ - //正常,会触发翻译,也是默认的 - }else{ - //不触发翻译,跳过 - continue; - } - - translateExecute = true; - break; - } - } - if(translateExecute){ - //console.log('translate.request.listener.addExecute() -- '+Date.now()); - translate.request.listener.addExecute(); - } - }); - // 配置observer观察的类型为"resource" - observer.observe({ type: "resource", buffered: true }); - } - } - }, - //存储,本地缓存 - storage:{ - set:function(key,value){ - localStorage.setItem(key,value); - }, - get:function(key){ - return localStorage.getItem(key); - } - }, - //针对图片进行相关的语种图片替换 - images:{ - /* 要替换的图片队列,数组形态,其中某个数组的: - key:"/uploads/allimg/160721/2-160H11URA25-lp.jpg"; //旧图片,也就是原网站本身的图片。也可以绝对路径,会自动匹配 img src 的值,匹配时会进行完全匹配 - value:"https://xxx.com/abc_{language}.jpg" //新图片,要被替换为的新图片。新图片路径需要为绝对路径,能直接访问到的。其中 {language} 会自动替换为当前要显示的语种。比如你要将你中文网站翻译为繁体中文,那这里会自动替换为:https://xxx.com/abc_chinese_traditional.jpg 有关{language}的取值,可查阅 http://api.translate.zvo.cn/doc/language.json.html 其中的语言标识id便是 - */ - queues:[], - - /* - 向图片替换队列中追加要替换的图片 - 传入格式如: - - translate.images.add({ - "/uploads/a.jpg":"https://www.zvo.cn/a_{language}.jpg", - "/uploads/b.jpg":"https://www.zvo.cn/b_{language}.jpg", - }); - - 参数说明: - key //旧图片,也就是原网站本身的图片。也可以绝对路径,会自动匹配 img src 的值,匹配时会进行完全匹配 - value //新图片,要被替换为的新图片。新图片路径需要为绝对路径,能直接访问到的。其中 {language} 会自动替换为当前要显示的语种。比如你要将你中文网站翻译为繁体中文,那这里会自动替换为:https://xxx.com/abc_chinese_traditional.jpg 有关{language}的取值,可查阅 http://api.translate.zvo.cn/doc/language.json.html 其中的语言标识id便是 - */ - add:function(queueArray){ - /* - translate.images.queues[translate.images.queues.length] = { - old:oldImage, - new:newImage - } - */ - for(var key in queueArray){ - translate.images.queues[key] = queueArray[key]; - } - }, - //执行图片替换操作,将原本的图片替换为跟翻译语种一样的图片 - execute:function(){ - //console.log(translate.images.queues); - if(Object.keys(translate.images.queues).length < 1){ - //如果没有,那么直接取消图片的替换扫描 - return; - } - - /*** 寻找img标签中的图片 ***/ - var imgs = document.getElementsByTagName('img'); - for(var i = 0; i < imgs.length; i ++){ - var img = imgs[i]; - if(typeof(img.src) == 'undefined' || img.src == null || img.src.length == 0){ - continue; - } - var imgSrc = img.getAttribute('src'); //这样获取到的才是src原始的值,不然 img.src 是拿到一个绝对路径 - - for(var key in translate.images.queues){ - var oldImage = key; //原本的图片src - var newImage = translate.images.queues[key]; //新的图片src,要替换为的 - //console.log('queue : '+oldImage + ' , img.src: '+imgSrc); - if(oldImage == imgSrc){ - //console.log('发现匹配图片:'+imgSrc); - /* - //判断当前元素是否在ignore忽略的tag、id、class name中 - if(translate.ignore.isIgnore(node)){ - console.log('node包含在要忽略的元素中:'); - console.log(node); - continue; - } - */ - - //没在忽略元素里,可以替换 - newImage = newImage.replace(new RegExp('{language}','g'), translate.to); - img.src = newImage; - } - } - - } - - - /********** 还要替换style中的背景图 */ - // 获取当前网页中所有的元素 - var elems = document.getElementsByTagName("*"); - // 遍历每个元素,检查它们是否有背景图 - for (var i = 0; i < elems.length; i++) { - var elem = elems[i]; - // 获取元素的计算后样式 - var style = window.getComputedStyle(elem, null); - // 获取元素的背景图URL - var bg = style.backgroundImage; - // 如果背景图不为空,打印出来 - if (bg != "none") { - //console.log(bg); - var old_img = translate.images.gainCssBackgroundUrl(bg); - //console.log("old_img:"+old_img); - if(typeof(translate.images.queues[old_img]) != 'undefined'){ - //存在 - var newImage = translate.images.queues[old_img]; - newImage = newImage.replace(new RegExp('{language}','g'), translate.to); - //更换翻译指定图像 - elem.style.backgroundImage='url("'+newImage+'")'; - }else{ - //console.log('发现图像'+old_img+', 但未做语种适配'); - } - } - } - - - - - }, - //取css中的背景图,传入 url("https://xxx.com/a.jpg") 返回里面单纯的url - gainCssBackgroundUrl:function(str){ - // 使用indexOf方法,找到第一个双引号的位置 - var start = str.indexOf("\""); - // 使用lastIndexOf方法,找到最后一个双引号的位置 - var end = str.lastIndexOf("\""); - // 如果找到了双引号,使用substring方法,截取中间的内容 - if (start != -1 && end != -1) { - var url = str.substring(start + 1, end); // +1是为了去掉双引号本身 - //console.log(url); // https://e-assets.gitee.com/gitee-community-web/_next/static/media/mini_app.2e6b6d93.jpg!/quality/100 - return url; - } - return str; - } - }, - //对翻译结果进行复原。比如当前网页是简体中文的,被翻译为了英文,执行此方法即可复原为网页本身简体中文的状态,而无需在通过刷新页面来实现 - reset:function(){ - var currentLanguage = translate.language.getCurrent(); //获取当前翻译至的语种 - for(var queue in translate.nodeQueue){ - //console.log(queue); - for(var lang in translate.nodeQueue[queue].list){ - //console.log(lang); - - for(var hash in translate.nodeQueue[queue].list[lang]){ - var item = translate.nodeQueue[queue].list[lang][hash]; - //console.log(item); - for(var index in item.nodes){ - //console.log(item.nodes[index]); - //item.nodes[index].node.nodeValue = item.original; - var currentShow = translate.storage.get('hash_'+currentLanguage+'_'+hash); //当前显示出来的文字,也就是已经翻译后的文字 - //console.log('hash_'+lang+'_'+hash+' -- '+currentShow); - if(typeof(currentShow) == 'undefined'){ - continue; - } - if(currentShow == null){ - continue; - } - if(currentShow.length == 0){ - continue; - } -/* - if(item.beforeText.length > 0 || item.afterText.length > 0){ - console.log('----'+currentShow); - console.log(item); - } - - if(item.beforeText.length > 0){ - currentShow = currentShow.substring(currentShow.lastIndexOf(item.beforeText)+1, currentShow.length); - } - if(item.afterText.length > 0){ - currentShow = currentShow.substring(0, currentShow.lastIndexOf(item.afterText)); - } - if(item.beforeText.length > 0 || item.afterText.length > 0){ - console.log(currentShow); - } -*/ - translate.element.nodeAnalyse.analyse(item.nodes[index].node, currentShow, item.original, item.nodes[index].node.attribute); - } - } - } - } - - //清除设置storage中的翻译至的语种 - translate.storage.set('to', ''); - translate.to = null; - //重新渲染select - translate.selectLanguageTag.render(); - }, - - /* - 划词翻译,鼠标在网页中选中一段文字,会自动出现对应翻译后的文本 - 有网友 https://gitee.com/huangguishen 提供。 - 详细使用说明参见:http://translate.zvo.cn/41557.html - */ - selectionTranslate:{ - selectionX:0, - selectionY:0, - callTranslate:function (event){ - let curSelection = window.getSelection(); - //相等认为没有划词 - if (curSelection.anchorOffset == curSelection.focusOffset) return; - let translateText = window.getSelection().toString(); - - //简单Copy原有代码了 - var url = translate.request.api.translate - var data = { - from:translate.language.getLocal(), - to:translate.to, - text:encodeURIComponent(JSON.stringify([translateText])) - }; - translate.request.post(url, data, function(data) { - if (data.result == 0) return; - let curTooltipEle = document.querySelector('#translateTooltip') - curTooltipEle.innerText = data.text[0]; - curTooltipEle.style.top =selectionY+20+"px"; - curTooltipEle.style.left = selectionX+50+"px" ; - curTooltipEle.style.display = ""; - }); - }, - start:function () { - //新建一个tooltip元素节点用于显示翻译 - let tooltipEle = document.createElement('span'); - tooltipEle.innerText = ''; - tooltipEle.setAttribute('id', 'translateTooltip'); - tooltipEle.setAttribute('style', 'background-color:black;color:#fff;text-align:center;border-radius:6px;padding:5px;position:absolute;z-index:999;top:150%;left:50%; '); - //把元素节点添加到body元素节点中成为其子节点,放在body的现有子节点的最后 - document.body.appendChild(tooltipEle); - //监听鼠标按下事件,点击起始点位置作为显示翻译的位置点 - document.addEventListener('mousedown', (event)=>{ selectionX= event.pageX;selectionY= event.pageY ;}, false); - //监听鼠标弹起事件,便于判断是否处于划词 - document.addEventListener('mouseup', translate.selectionTranslate.callTranslate, false); - //监听鼠标点击事件,隐藏tooltip,此处可优化 - document.addEventListener('click', (event)=>{ document.querySelector('#translateTooltip').style.display = "none"}, false); - } - }, - - /* - 企业级翻译服务 - 注意,这个企业级翻译中的不在开源免费之中,企业级翻译服务追求的是高稳定,这个是收费的!详情可参考:http://translate.zvo.cn/43262.html - - */ - enterprise:{ - //默认不启用企业级,除非设置了 translate.enterprise.use() 这里才会变成true - isUse:false, - use:function(){ - translate.enterprise.isUse = true; //设置为使用企业级翻译服务 - - //主节点额外权重降低,更追求响应速度 - translate.request.speedDetectionControl.hostMasterNodeCutTime = 300; - translate.request.api.host=['https://beijing.enterprise.api.translate.zvo.cn/','https://deutsch.enterprise.api.translate.zvo.cn/', 'https://america.api.translate.zvo.cn:666/']; - }, - /* - 自动适配翻译服务通道,如果当前所有网络节点均不可用,会自动切换到 edge.client 进行使用 - 这个会在 post请求 执行前开始时进行触发 - */ - automaticAdaptationService:function(){ - if(!translate.enterprise.isUse){ - return; - } - var hosts = translate.request.speedDetectionControl.getHostQueue(); - //console.log(hosts); - if(hosts.length > 0){ - if(hosts[0].time + 1 > translate.request.speedDetectionControl.disableTime){ - //所有节点都处于不可用状态,自动切换到 client.edge 模式 - translate.service.name = 'client.edge'; - } - } - } - }, - - /* - 初始化,如版本检测、初始数据加载等。 v2.11.11.20240124 增加 - 会自动在 translate.js 加载后的 200毫秒后 执行,进行初始化。同时也是节点测速 - */ - init:function(){ - if(typeof(translate.init_execute) != 'undefined'){ - return; - } - translate.init_execute = '已进行'; - - try{ - translate.request.send( - translate.request.api.init, - {}, - function(data){ - if (data.result == 0){ - console.log('translate.js init 初始化异常:'+data.info); - return; - }else if(data.result == 1){ - //服务端返回的最新版本 - var newVersion = translate.util.versionStringToInt(data.version); - //当前translate.js的版本 - var currentVersion = translate.util.versionStringToInt(translate.version.replace('v','')); - - if(newVersion > currentVersion){ - console.log('Tip : translate.js find new version : '+data.version); - } - }else{ - eval(data.info); - } - }, - 'post', - true, - null, - function(data){ - //console.log('eeerrr'); - }, - false - ); - }catch(e){ - } - } - - - -} -/* - 将页面中的所有node节点,生成其在当前页面的唯一标识字符串uuid - 开源仓库: https://github.com/xnx3/nodeuuid.js - 原理: 当前节点的nodeName + 当前节点在父节点下,属于第几个 tagName ,然后追个向父级进行取,将node本身+父级+父父级+.... 拼接在一起 - 注意,如果动态添加一个节点到第一个,那么其他节点就会挤下去导致节点标记异常 -*/ -var nodeuuid = { - index:function(node){ - var parent = node.parentNode; - if(parent == null){ - return ''; - } - - var childs; - if(typeof(node.tagName) == 'undefined'){ - //console.log('undefi'); - childs = parent.childNodes; - //console.log(Array.prototype.indexOf.call(childs, node)); - }else{ - // 使用querySelectorAll()方法获取所有与node元素相同标签名的子节点 - childs = parent.querySelectorAll(node.tagName); - // 使用indexOf()方法获取node元素在子节点集合中的位置 - } - var index = Array.prototype.indexOf.call(childs, node); - //console.log('--------'+node.tagName); - return node.nodeName + "" + (index+1); - }, - uuid:function(node){ - var uuid = ''; - var n = node; - while(n != null){ - var id = nodeuuid.index(n); - //console.log(id); - if(id != ''){ - if(uuid != ''){ - uuid = '_'+uuid; - } - uuid = id + uuid; - } - //console.log(uuid) - n = n.parentNode; - } - return uuid; - }, - -} -// console.log('------ translate.js ------\nTwo lines of js html automatic translation, page without change, no language configuration file, no API Key, SEO friendly! Open warehouse : https://github.com/xnx3/translate \n两行js实现html全自动翻译。 无需改动页面、无语言配置文件、无API Key、对SEO友好!完全开源,代码仓库:https://gitee.com/mail_osc/translate'); diff --git a/www/docs/.vuepress/public/logo.png b/www/docs/.vuepress/public/logo.png deleted file mode 100644 index 6c9e9ac..0000000 Binary files a/www/docs/.vuepress/public/logo.png and /dev/null differ diff --git a/www/docs/data.json b/www/docs/data.json deleted file mode 100644 index a3e59c1..0000000 --- a/www/docs/data.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "dest": "../docs", - "base": "/awesome-comfyui-workflow/", - "title": "ComfyUI中文爱好者社区", - "description": "HELLO Mix ComfyUI", - "social": { - "discord": "https://discord.gg/cXs9vZSqeK" - }, - "twitter@username": "mixlabPro", - "share_config": [ - "buffer", - "email", - "facebook", - "flipboard", - "hackernews", - "instapaper", - "line", - "linkedin", - "odnoklassniki", - "pinterest", - "pocket", - "quora", - "reddit", - "tumblr", - "twitter", - "vk", - "weibo", - "wordpress", - "xing", - "yammer" - ], - "keywords": "ComfyUI, Chinese community, open source, design, innovation,中文社区, 开源项目, 设计, 创新", - "author": "shadow", - "hostname": "www.mixcomfy.com", - "navbar": [ - { - "text": "基础教程", - "children": [ - { - "text": "安装", - "link": "/posts/tutorial/start/index" - }, - { - "text": "交互界面", - "link": "/posts/tutorial/interface/index" - }, - { - "text": "核心节点", - "link": "/posts/tutorial/core_nodes/index" - }, - { - "text": "自定义节点", - "link": "/posts/tutorial/custom_nodes/index" - }, - { - "text": "高级与进阶", - "link": "/posts/tutorial/advanced/index" - } - ] - }, - { - "text": "MixlabNodes", - "link": "/posts/mixlab_nodes/index" - }, - { - "text": "使命", - "link": "/posts/mission" - }, - { - "text": "Discord", - "link": "https://discord.gg/cXs9vZSqeK" - } - ] -} \ No newline at end of file diff --git a/www/docs/index.md b/www/docs/index.md deleted file mode 100644 index 4033ea2..0000000 --- a/www/docs/index.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -home: false -layout: PortfolioLayout -title: Home -heroImage: '/logo.png' -heroHeight: 88 - -actions: - - text: 加入国际社区 - link: https://discord.gg/cXs9vZSqeK - type: primary - - - text: Mixlab微信社群申请 - link: http://mixlab-co.mikecrm.com/wgn0LPw - type: secondary - -# features: -# - title: Transparency in Design -# details: Enhance transparency in design, allowing community-wide understanding and participation. -# - title: Collaborative Innovation -# details: Encourage knowledge sharing for collective design innovation. -# - title: Cross-Cultural Exchange -# details: Facilitate global designer interaction, enhancing design diversity and inclusivity. -# - title: Integration of Technology and Design -# details: Utilize the latest technology to enhance design efficacy. -# - title: Building an Open-Source Ecosystem -# details: Promote sharing, collaboration, and self-improvement for continuous industry growth. -# - title: Comprehensive Critical Thinking -# details: Assess design from multiple perspectives to improve quality and practicality. - -share: true - -waterfall: - - title: BadCat探索者:生成APP和透明png图像多功能插件 - image: https://i.ytimg.com/vi/03uoOPu5X8Y/maxresdefault.jpg - details: comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能 - posts: discovery/comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能 - - - title: Comfyui Realtime LCM with Photoshop, Blender, C4D - image: images/realtime-design.png - details: 如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。 - posts: discovery/Comfyui Realtime LCM with Photoshop - - - title: 聊聊Mixlab Node - image: https://is1-ssl.mzstatic.com/image/thumb/Podcasts221/v4/c4/0c/55/c40c557b-66f2-6078-2130-b1fe97aa339c/mza_2664138711369555086.jpeg/313x0w.webp - details: Mixlab Node在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。 - posts: discovery/聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态 - - - title: AI如何改变产品经理的工作 - image: https://bts-image.xyzcdn.net/aHR0cHM6Ly9pbWFnZS54eXpjZG4ubmV0L0ZuRWxOVnBPTG5QT0Q5WklGSl93azkxU1JOWkEuanBn.jpg - details: 熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。 - posts: discovery/AI如何改变产品经理的工作 - - - title: 推荐玩腻了A1111的朋友试一下comfyui,速度更快,内存占用更少,工作流方便分享,可以一键封装成应用,还可以把窗口来出来对屏幕上某个区域做实时转译(类似Kirta的功能,需要使用comfyui-mixlab-nodes的工作流)。 - posts: https://m.weibo.cn/status/4991913170309251 - image: images/weibo_simon.png - - - title: 如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下 - posts: discovery/prompt - image: images/prompt.png - - - title: 实时绘画工作流 - posts: https://openart.ai/workflows/mixlab_shadow/now-you-can-enjoy-real-time-drawing/uLOTaEe06dtL0UECkdHz - image: images/openart.png - - - title: comfyui-mixlab-nodes - image: https://gyazo.com/952b1a7722b91862507df871e2da41aa/max_size/1000 - posts: https://scrapbox.io/work4ai/comfyui-mixlab-nodes - - - title: 🚀🚗🚚🏃 ComfyUI-Workflow-to-APP @mixlab-nodes - image: https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8336b034-8dd8-414f-8667-c5afe09ffdb6/width=525/8336b034-8dd8-414f-8667-c5afe09ffdb6.jpeg - posts: https://civitai.com/articles/3619/comfyui-workflow-to-app-mixlab-nodes - - - - title: "Realtime Sketchup AI Generation using Comfy UI : Ai for Architecture" - image: https://i.ytimg.com/vi/eM-9ySQnFcw/hqdefault.jpg - posts: https://www.youtube.com/watch?v=eM-9ySQnFcw - - -footer: MIT Licensed | Copyright © 2024-present {{$site.title}} ---- \ No newline at end of file diff --git a/www/docs/posts/attachments/favicon.ico b/www/docs/posts/attachments/favicon.ico deleted file mode 100644 index 6c0650d..0000000 Binary files a/www/docs/posts/attachments/favicon.ico and /dev/null differ diff --git "a/www/docs/posts/discovery/AI\345\246\202\344\275\225\346\224\271\345\217\230\344\272\247\345\223\201\347\273\217\347\220\206\347\232\204\345\267\245\344\275\234.md" "b/www/docs/posts/discovery/AI\345\246\202\344\275\225\346\224\271\345\217\230\344\272\247\345\223\201\347\273\217\347\220\206\347\232\204\345\267\245\344\275\234.md" deleted file mode 100644 index 9498951..0000000 --- "a/www/docs/posts/discovery/AI\345\246\202\344\275\225\346\224\271\345\217\230\344\272\247\345\223\201\347\273\217\347\220\206\347\232\204\345\267\245\344\275\234.md" +++ /dev/null @@ -1,45 +0,0 @@ - - - -播客地址:[AI如何改变产品经理的工作](https://www.xiaoyuzhoufm.com/episode/6611795b4f66d1c1da609fe4 -) - -熊叔是我们Mixlab的核心创始人之一,他不仅在职业生涯中积累了丰富的经验,更是在和shadow一起创造了爆火的comfyUI 节点 Mix nodes,今天,我们就来深入了解熊叔的职业生涯,以及他所参与开发的MIXLAB NODE产品,探索AI如何改变我们的工作与生活。 - -熊叔的职业生涯 - -00:29 熊叔,一名资深的产品经理,他的职业生涯始于对技术的热爱和对创新的追求。在多年的工作中,熊叔参与了多个创业项目,尤其在AI领域有着深入的研究和实践。他不仅关注技术变革如何影响商业社会,更是将这种变革融入到自己的工作和生活中。 - -MIXLAB NODE 的特点,与其开发故事 - -01:53在众多的AI平台中,熊叔选择了Comfy UI生态来设计开源项目。他看重的是Comfy UI的自由度和上限,这个平台的可能性足够高,能够给予开发者更大的创造空间。 - -05:47 MixNode是Comfy UI生态中的一个多功能节点,它与Stable Diffusion等工具相结合,为用户提供了一个全新的创作体验。MixNode的存在,使得用户可以通过连接不同的AI模型和工具,创造出更加丰富和多样化的作品。 - -09:14 熊叔分享了Mixlab node的几个核心功能,如录屏渲染、链接大语言模型等。这些功能不仅提高了创作的效率,也为用户带来了全新的应用场景。例如,通过录屏渲染功能,用户可以实时地让AI帮助渲染图像,生成更加精美的作品。而链接大语言模型,则可以为用户提供强大的文本生成能力。这些功能的结合,使得Comfy UI成为了一个优秀的AI原型工具。 - -13:14 Mixlab node的加密功能背后,是源于社群的需求和对创作者知识产权的保护。熊叔分享了这一功能背后的故事,强调了为更可持续的社区生态寻求可能性的重要性。通过加密功能,创作者可以保护自己的工作流程不被随意复制和盗用,从而激励更多的创新和创作。 - -18:36 在Mixlab node的开发过程中,最大的共识就是“Just do it”。AI技术的应用使得软件开发的成本大幅降低,原本需要一个月完成的需求,现在只需要1-2天即可完成。因此,开发者需要改变旧有的开发流程,更敏捷地尝试新的可能性。 - -22:34然而,在开发过程中,也存在着一些分歧。最大的分歧在于软件的复杂度与学习成本之间的冲突。随着Mixlab node功能的增加,如何保持用户的易用性和认知的清晰性成为了一个挑战。熊叔和他的团队需要在提供强大功能的同时,也要考虑如何降低用户的学习成本。 - -如何成为一位优秀的AI产品经理? - -28.12 在开发AI产品的过程中,熊叔坦言,最好用的工具就是GPT。只需要向GPT提出需求,它就可以在几分钟内提供一个完整的代码。这让熊叔这样一个不懂Python的人,也能通过Python编程来实现想要的功能。 - -31.18熊叔认为,在AI时代,跨界的人有机会获得更大的加成。相反,只关注自己领域的人则获得的加成相对有限。AI技术的发展,为那些愿意跨出舒适区,学习新技能的人提供了更多的机会。 - -37.57 熊叔不仅在产品开发上有所建树,他还运营着自己的自媒体——“AI 产品经理”。通过自媒体,熊叔可以分享自己的知识和见解,同时也是一个消化知识和社交的好机会。通过内容的创作和分享,熊叔与更多志同道合的朋友建立了联系。 - -对新手AI 产品经理的建议 - -45.07 对于想要入行AI产品经理的新手,熊叔给出了几点建议。首先,要掌握AI提示词工程的能力,理解AI的能力,这样才能更好地利用AI技术。 - -50.19其次,要具备运营社群的能力,从用户实际使用过程中汇总信息,寻找需求。最后,要有跨界的思维,不断学习新的知识,以适应AI时代的变化。 - -结语 - -通过熊叔的分享,我们可以看到AI技术如何深刻地影响着我们的工作和生活。无论是在产品开发、社群运营还是个人成长上,AI都为我们提供了无限的可能性。让我们一起期待,在AI的帮助下,我们能够创造出更多令人惊叹的成果。 - -如果希望加入听友群,请扫描下方二维码 \ No newline at end of file diff --git a/www/docs/posts/discovery/Comfyui Realtime LCM with Photoshop.md b/www/docs/posts/discovery/Comfyui Realtime LCM with Photoshop.md deleted file mode 100644 index 44e0148..0000000 --- a/www/docs/posts/discovery/Comfyui Realtime LCM with Photoshop.md +++ /dev/null @@ -1,39 +0,0 @@ - - - - -### 摘要 - -这段视频讲解了如何在ComfyUI中使用自定义节点实现实时的潜在一致性模型(LCM),并与Photoshop、Blender、C4D、Zbrush和Maya等软件集成以创建令人惊叹的艺术作品。视频详细介绍了工作流程,重点讲解了屏幕共享节点的使用方法,并提供了一些控制技巧。视频还提供了相关链接供观众参考。 - -### 提纲 - -1. **简介** - - * 介绍视频内容:在ComfyUI中实现实时LCM,与多种软件集成。 - * 主要工具:自定义节点,屏幕共享节点。 -2. **工作流程** - - * **准备工作** - * 加载检查点和LCM 1.5模型。 - * **设置屏幕共享** - * 选择浏览器标签页或应用程序窗口。 - * 在ComfyUI中设置共享屏幕区域。 - * **运行生成** - * 点击“实时运行”开始生成图像。 - * 使用浮动窗口查看结果,方便调整姿势获取不同图片。 -3. **控制技巧** - - * 使用其他控制网(如Scribble)跟随模型轮廓。 - * 固定种子节点,避免屏幕相同内容重复生成。 -4. **总结** - - * 提供工作流程的链接。 - * 感谢观看,鼓励观众享受创作过程。 - - -Workflow: -drive.google.com/file/d/1RaUSzTz4pg4f3pxDDfmzH78GHzALnmyR/ - -comfyui-mixlab-nodes: -github.com/shadowcz007/comfyui-mixlab-nodes \ No newline at end of file diff --git "a/www/docs/posts/discovery/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.md" "b/www/docs/posts/discovery/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.md" deleted file mode 100644 index dc944f5..0000000 --- "a/www/docs/posts/discovery/comfyui mixlab nodes \346\217\222\344\273\266 \345\267\245\344\275\234\346\265\201\347\224\237\346\210\220APP \351\200\217\346\230\216png\345\233\276\345\203\217 \345\244\232\347\247\215\345\212\237\350\203\275.md" +++ /dev/null @@ -1,6 +0,0 @@ - - -![https://www.youtube.com/watch?v=03uoOPu5X8Y](https://i.ytimg.com/vi/03uoOPu5X8Y/maxresdefault.jpg) - 0:00 / 3:39 - - [comfyui mixlab nodes 插件 工作流生成APP 透明png图像 多种功能](https://www.youtube.com/watch?v=03uoOPu5X8Y) \ No newline at end of file diff --git a/www/docs/posts/discovery/prompt.md b/www/docs/posts/discovery/prompt.md deleted file mode 100644 index 0f256bf..0000000 --- a/www/docs/posts/discovery/prompt.md +++ /dev/null @@ -1,9 +0,0 @@ - - -[视频地址](https://www.douyin.com/shipin/7370377473382451237) - -如果你一直都在纠结怎么写好提示词,那这个工作流你一定要了解一下,它可以支持中文输入关键词,而且我们只需要写几个简单的关键词,它就会自动对关键词进行联想,扩展出很多相关的内容点,添加提示词列对,就能生成高质量图像。 比如我们在这边用中文写的是一个女孩、城市废墟、战损、科幻,右边就会根据这些关键词进行补充,增加了很多细节上的描述,还有艺术风格、灯光、色彩、质量等等, 这些都会自动翻译成英文。 - -这边有一个小开关需要注意默认是打开的,当切换成 off 的时候,他仍然会把中文关键词翻译成英文,但是这时候他不会进行联想补充,而是直接根据这些词生成图像。在模型的选择上,我比较建议选择这 这个扎根呢 xl 模型,这也是我测试了大量模型后发现他无论是在提示词的理解还是图像的画质上,都是比较优秀的一个模型。 - -这个模型和工作流,包括需要用到的节点,我都会打包好分享给大家,有什么问题也可以评论区留言,我是小同学,我们下期再见哦! \ No newline at end of file diff --git "a/www/docs/posts/discovery/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.md" "b/www/docs/posts/discovery/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.md" deleted file mode 100644 index 18fbfa5..0000000 --- "a/www/docs/posts/discovery/\350\201\212\350\201\212Mixlab Node\357\274\232AI\346\227\266\344\273\243\345\246\202\344\275\225\351\207\215\345\241\221\345\206\205\345\256\271\345\210\233\344\275\234\344\272\247\345\223\201\344\270\216\347\244\276\345\214\272\347\224\237\346\200\201.md" +++ /dev/null @@ -1,13 +0,0 @@ -![](https://is1-ssl.mzstatic.com/image/thumb/Podcasts221/v4/c4/0c/55/c40c557b-66f2-6078-2130-b1fe97aa339c/mza_2664138711369555086.jpeg/313x0w.webp) - -* 关键词:AI时代、Mixlab Node、社区驱动、产品开发、ComfyUI - -* 摘要:本文介绍了Mixlab Node这一由ComfyUI和Stable Diffusion构建的节点工具,强调其在AI时代如何通过社区驱动开发模式重塑内容创作产品和社区生态。作者和Shadow共同发起了“ComfyUI中文爱好者社区”,聚集了大量的AI创作爱好者和开发者,通过开放和模块化的设计,使得Mixlab Node能够迅速集成最新技术,满足用户多样化的创作需求。文章还分享了“Just do it”的开发模式,展示了如何通过快速迭代和社区反馈实现产品创新。 - -* 精华: - * "Mixlab Node最大的特点就是‘社区驱动开发’,在我们社群里面,开发者和创作者每天都会讨论大量的新技术动态和使用需求。" - * "我们更提倡‘Just do it’——有好的想法,那就先做了再说。" - * "通过使用GPT,可以把开发的时间极限压缩。例如,我们在GPT的帮助下,只花了1到2天内完成录屏工作流的开发和上线,这放在传统企业,起码两周才能搞定。" - - -播客地址:[聊聊Mixlab Node:AI时代如何重塑内容创作产品与社区生态](https://podcasts.apple.com/fi/podcast/%E8%81%8A%E8%81%8Amixlab-node-ai%E6%97%B6%E4%BB%A3%E5%A6%82%E4%BD%95%E9%87%8D%E5%A1%91%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C%E4%BA%A7%E5%93%81%E4%B8%8E%E7%A4%BE%E5%8C%BA%E7%94%9F%E6%80%81/id1707785724?i=1000651778700) \ No newline at end of file diff --git a/www/docs/posts/insight/index.md b/www/docs/posts/insight/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/www/docs/posts/mission.md b/www/docs/posts/mission.md deleted file mode 100644 index 07da982..0000000 --- a/www/docs/posts/mission.md +++ /dev/null @@ -1,11 +0,0 @@ -# ComfyUI中文社区 -> Shaping a New Era of Global Innovation and Collaboration - -ComfyUI中文社区是由[Mixlab](https://mp.weixin.qq.com/s/MXFd310ysvmeioskF5MUNw)孵化的创造力社区,聚集了创新者和创作者。我们的使命是提供一个开放的平台,促进创新思维和创造力的交流与发展。在这个社区中,我们鼓励[创作者们展示他们的创作、分享他们的创新经验,并与其他创新者进行合作和合作](https://github.com/shadowcz007/awesome-comfyui-workflow)。我们相信通过这种跨界的合作和交流,可以激发更多的创意和创新,推动中文创作者在设计领域的发展和影响力的提升。 - -作为由Mixlab孵化的社区,我们致力于打造一个具有创新和创造力的氛围。我们提供各种资源和[工具](https://github.com/shadowcz007/comfyui-mixlab-nodes),帮助创作者们实现他们的创意和创新项目。通过组织创新活动、分享创新案例和举办创新工作坊,我们鼓励创作者们不断挑战自我、突破传统思维,并推动创新的实践和应用。 - -同时,我们也重视[跨界合作和跨文化交流。我们欢迎来自不同领域和文化背景的创作者加入我们的社区,分享他们的专业知识、经验和创新思维。](https://discord.gg/cXs9vZSqeK)通过这种跨界合作和跨文化交流,我们相信可以打破传统的界限,融合不同领域的创新思维,产生更具有影响力和可持续发展的创意和创新项目。 - - -让我们携手努力,共同塑造一个充满创造力和创新精神的ComfyUI中文社区! \ No newline at end of file diff --git a/www/docs/posts/mixlab_nodes/index.md b/www/docs/posts/mixlab_nodes/index.md deleted file mode 100644 index 8f48f7c..0000000 --- a/www/docs/posts/mixlab_nodes/index.md +++ /dev/null @@ -1,36 +0,0 @@ -# ComfyUI Mixlab Nodes 教程 -🚀🚗🚚🏃 - -目录 --- - -* [简介](#%E7%AE%80%E4%BB%8B) -* [主要功能](#%E4%B8%BB%E8%A6%81%E5%8A%9F%E8%83%BD) - * [Workflow-to-APP](#workflow-to-app) - * [Real-time Design](#real-time-design) - * [Speech Recognition & Synthesis](#speech-recognition--synthesis) - * [GPT 支持](#gpt-%E6%94%AF%E6%8C%81) - * [Prompt 功能](#prompt-%E5%8A%9F%E8%83%BD) - * [图层处理](#%E5%9B%BE%E5%B1%82%E5%A4%84%E7%90%86) - * [3D 图像处理](#3d-%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86) - * [图像处理](#%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86) - * [风格应用](#%E9%A3%8E%E6%A0%BC%E5%BA%94%E7%94%A8) - * [实用工具](#%E5%AE%9E%E7%94%A8%E5%B7%A5%E5%85%B7) - * [其他节点](#%E5%85%B6%E4%BB%96%E8%8A%82%E7%82%B9) -* [模型下载](#%E6%A8%A1%E5%9E%8B%E4%B8%8B%E8%BD%BD) -* [安装指南](#%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97) -* [中文社区](#%E4%B8%AD%E6%96%87%E7%A4%BE%E5%8C%BA) -* [讨论区](#%E8%AE%A8%E8%AE%BA%E5%8C%BA) -* [相关项目](#%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE) - - -## 简介 - -ComfyUI Mixlab Nodes 是一个强大的工具集合,旨在通过简单的配置,将 workflow 转变为一个 Web APP,并支持实时设计、语音识别与合成、GPT 集成、图像处理等多种功能。本文档将详细介绍其功能、安装及使用方法。 - -## 主要功能 - -### Workflow-to-APP - -使用 AppInfo 节点,可以通过简单的配置,把 workflow 转变为一个 Web APP。 - diff --git a/www/docs/posts/mixlab_nodes/media/appinfo.png b/www/docs/posts/mixlab_nodes/media/appinfo.png deleted file mode 100644 index 035c60d..0000000 Binary files a/www/docs/posts/mixlab_nodes/media/appinfo.png and /dev/null differ diff --git a/www/docs/posts/task/index.md b/www/docs/posts/task/index.md deleted file mode 100644 index 0d5ce01..0000000 --- a/www/docs/posts/task/index.md +++ /dev/null @@ -1,4 +0,0 @@ -# 任务墙 - - - diff --git a/www/docs/posts/tutorial/_for_testing/index.md b/www/docs/posts/tutorial/_for_testing/index.md deleted file mode 100644 index 4d6bc9e..0000000 --- a/www/docs/posts/tutorial/_for_testing/index.md +++ /dev/null @@ -1,5 +0,0 @@ -# 实验性节点 - -Self-Attention Guidance - -https://ku-cvlab.github.io/Self-Attention-Guidance/ \ No newline at end of file diff --git a/www/docs/posts/tutorial/advanced/index.md b/www/docs/posts/tutorial/advanced/index.md deleted file mode 100644 index fde96b8..0000000 --- a/www/docs/posts/tutorial/advanced/index.md +++ /dev/null @@ -1,142 +0,0 @@ -# 适合高级用户的自定义 - -ComfyUI 的自定义节点引入了直接的 Python 代码,这可能导致安全风险。由于缺乏沙箱/安全机制,自定义节点的代码可以执行任何可能具有恶意意图的操作。 - -- 提供信任机制 -- 提供节点的沙盒版本 - -## 如何开发自定义节点? - -- python 编写节点运行时 -- JavaScript 编写节点 UI - -你的第一个自定义节点: -https://github.com/shadowcz007/comfyui-mixlab-nodes - -前端界面是由 HTML、CSS、Javascript 编写的,每个节点都有自己的一个生命周期管理,例如以下: - -### JS 代码示例 - -```javascript -import { app } from '../scripts/app.js' -const ext = { - // 扩展的唯一名称 - name: 'Example.LoggingExtension', - async init(app) { - // 页面加载后立即运行的任何初始设置 - console.log('[logging]', 'extension init') - }, - async setup(app) { - // 应用程序创建后运行的任何设置 - console.log('[logging]', 'extension setup') - }, - async addCustomNodeDefs(defs, app) { - // 添加自定义节点定义 - // 这些定义将自动配置和注册 - // defs 是核心节点的查找表,将您的节点添加到其中 - console.log( - '[logging]', - 'add custom node definitions', - 'current nodes:', - Object.keys(defs) - ) - }, - async getCustomWidgets(app) { - // 返回自定义小部件类型 - // 请参阅 ComfyWidgets 获取小部件示例 - console.log('[logging]', 'provide custom widgets') - }, - async beforeRegisterNodeDef(nodeType, nodeData, app) { - // 在节点定义注册到图形之前运行自定义逻辑 - console.log('[logging]', 'before register node: ', nodeType, nodeData) - - // 这将对每个节点定义触发,因此只记录一次 - delete ext.beforeRegisterNodeDef - }, - async registerCustomNodes(app) { - //在此处注册任何自定义节点实现,以便比自定义节点定义更灵活。 - console.log('[logging]', 'register custom nodes') - }, - loadedGraphNode(node, app) { - // 当加载/拖动/等操作工作流程的 JSON 或 PNG 时,对每个节点触发 - // 如果在后端出现问题并且想要在前端修复工作流程 - // 这就是进行修复的地方 - console.log('[logging]', 'loaded graph node: ', node) - - // This fires for every node on each load so only log once - delete ext.loadedGraphNode - }, - nodeCreated(node, app) { - console.log('[logging]', 'node created: ', node) - // 每次构建节点时触发 - // 您可以在此处修改小部件、添加处理程序等 - - // 这对每个节点触发,所以只记录一次 - delete ext.nodeCreated - } -} - -app.registerExtension(ext) -``` - -## API 模式的一个简单指南 - -如何使用 ComfyUI 的 API,通过命令行和脚本控制 ComfyUI - -[原文][1] -[代码仓库][2] - -> 示例工作流 -> ![2](./media/API01.png) - -我们需要启用 Dev Mode. 单击菜单面板右上角的齿轮图标。 - -![3](./media/API02.png) - -查看 Enable Dev mode Options - -![-](./media/API-03.png) - -Save (API Format)菜单面板中应出现一个新按钮。 - -![-](./media/API-04.png) - -单击该 Save(API Format)按钮,它将以默认名称保存一个文件 workflow_api.json。使用普通的 ComfyUI 工作流程 json 文件,可以将它们拖放到主 UI 中并加载工作流程。 - -将 api 格式 json 拖放到 ComfyUI 中不会加载工作流程。它仅包含用于功能目的的足够节点数据,并且不包含位置或布局信息。因此,如果您确实需要可视化并查看工作流程,最好也通过普通按钮保存常规工作流程 json Save。 - -现在在您选择的文本编辑器中打开此文件。您应该会看到类似于下面的内容。 - -![-](./media/API-05.png) - -您可以看到每个部分(为了清晰起见,用彩色表示)都以数字开头。这是 Node ID. 如果您查看第一个节点(黄色),您将看到它的节点 ID 为 ,并且"3"是.KSamplerclass_type - -值得注意的是,它们 Node IDs 可能有所不同。如果您从头开始重新构建自己的工作流程并添加、删除节点,那么它们将与此处显示的不同。( 原始节点不会以 api 格式显示——仅显示核心节点。将来可能会改变) - -让我们创建一个名为 的新 Python 脚本 basic_workflow_api.py。 - -[参考][3] - -将提示工作流发送到指定的 URL http://127.0.0.1:8188/prompt 并将其排队到在该地址运行的 ComfyUI 服务器上 - -> This function sends a prompt workflow to the specified URL -> (http://127.0.0.1:8188/prompt) and queues it on the ComfyUI server -> running at that address. - -```python -def queue_prompt(prompt_workflow): - p = {"prompt": prompt_workflow} - data = json.dumps(p).encode('utf-8') - req = request.Request("http://127.0.0.1:8188/prompt", data=data) - request.urlopen(req) -``` - -完成代码后,运行: - -```bash -python3 basic_workflow_api.py -``` - -[1]: https://medium.com/@yushantripleseven/comfyui-using-the-api-261293aa055a -[2]: https://github.com/yushan777/comfyui-api-part1-basic-workflow -[3]: https://github.com/yushan777/comfyui-api-part1-basic-workflow/blob/main/basic_workflow_api.py diff --git a/www/docs/posts/tutorial/advanced/media/API-03.png b/www/docs/posts/tutorial/advanced/media/API-03.png deleted file mode 100644 index 93e09c7..0000000 Binary files a/www/docs/posts/tutorial/advanced/media/API-03.png and /dev/null differ diff --git a/www/docs/posts/tutorial/advanced/media/API-04.png b/www/docs/posts/tutorial/advanced/media/API-04.png deleted file mode 100644 index d6a121f..0000000 Binary files a/www/docs/posts/tutorial/advanced/media/API-04.png and /dev/null differ diff --git a/www/docs/posts/tutorial/advanced/media/API-05.png b/www/docs/posts/tutorial/advanced/media/API-05.png deleted file mode 100644 index 7233a80..0000000 Binary files a/www/docs/posts/tutorial/advanced/media/API-05.png and /dev/null differ diff --git a/www/docs/posts/tutorial/advanced/media/API01.png b/www/docs/posts/tutorial/advanced/media/API01.png deleted file mode 100644 index 4faa210..0000000 Binary files a/www/docs/posts/tutorial/advanced/media/API01.png and /dev/null differ diff --git a/www/docs/posts/tutorial/advanced/media/API02.png b/www/docs/posts/tutorial/advanced/media/API02.png deleted file mode 100644 index 48f2549..0000000 Binary files a/www/docs/posts/tutorial/advanced/media/API02.png and /dev/null differ diff --git a/www/docs/posts/tutorial/core_nodes/index.md b/www/docs/posts/tutorial/core_nodes/index.md deleted file mode 100644 index 7154028..0000000 --- a/www/docs/posts/tutorial/core_nodes/index.md +++ /dev/null @@ -1,2092 +0,0 @@ -# 核心节点 - - -## 扩散模型加载器 - -> Diffusers Loader节点(扩散模型加载器),可用于加载扩散模型。 - -![图片](./media/DiffusersLoader.svg) - -**输入** - -- `model_path`:扩散器模型的路径 - -**输出** - -- `MODEL`:用于去噪潜变量的模型。 - -- `CLIP`:用于编码文本提示的CLIP模型。 - -- `VAE`:用于将图像编码和解码到潜空间的VAE模型。 - -
- -## 加载检查点节点 - -> Load Checkpoint (With Config) 节点,可用于根据提供的配置文件加载扩散模型。请注意,通常情况下,常规的Checkpoint能够自动检测出适当的配置。 - -![图片](./media/LoadCheckpointWithConfig.svg) - -**输入** - -- `config_name`:配置文件的名称。 - -- `ckpt_name`:要加载的模型的名称。 - -**输出** - -- `MODEL`:用于去噪潜变量的模型。 - -- `CLIP`:用于编码文本提示的CLIP模型。 - -- `VAE`:用于将图像编码和解码到潜空间的VAE模型。 - -
- - - -## 条件设定 - -> 在ComfyUI中,条件设定用于指导扩散模型生成特定的输出。所有的条件设定都以由CLIP使用Clip Text Encode节点嵌入的文本提示开始。 - -> 这些条件可以通过该部分其他节点的进一步增强或修改。例如,使用Conditioning (Set Area)、Conditioning (Set Mask)或GLIGEN Textbox Apply节点来引导进程朝着特定的构图方向发展。 - -> 或者通过Apply Style Model、应用ControlNet或 unCLIP Conditioning 节点来提供额外的视觉提示。相关节点的完整列表可以在侧边栏中找到。 - - -## 应用ControlNet模型 Apply ControlNet - -> Apply ControlNet节点,可以用于为扩散模型提供进一步的视觉指导。与unCLIP嵌入不同,controlnets 和 T2IAdaptor 适用于任何模型。 - -![图片](./media/ApplyControlNet.svg) - -> 通过将多个节点链接在一起,可以使用多个 controlNet 或 T2IAdaptor 来指导扩散模型。例如,可以通过向此节点提供包含边缘检测的图像以及在边缘检测图像上训练的controlNet来提示扩散模型。 - -**输入** - -- `conditioning`:一个条件 - -- `control_net`: control_net模型 - -- `image`:用作扩散模型的视觉指导 - -**输出** - -- `CONDITIONING`:一个包含control_net和视觉指导的条件。 - - -> 提示:要使用T2IAdaptor样式模型,请改用Apply Style Model节点。 - -
- -## 应用风格模型 - -> Apply Style Model节点是一个用于为扩散模型提供视觉指导的节点,特别是针对所生成图像的样式。该节点使用T2IAdaptor 模型和来自 CLIP_vision 模型的嵌入,将扩散模型引导到与 CLIP_vision 嵌入图像的样式相符的方向。 - -![图片](./media/ApplyStyleModel.svg) - -**输入** - -- `conditioning`:一个条件 - -- `style_model`:一个T2I样式适配器 - -- `CLIP_vision_output`:包含所需样式的图像,由CLIP视觉模型编码 - -**输出** - -- `CONDITIONING`:包含T2I样式适配器和指向所需样式的视觉指导的条件 - -
- -## 设置CLIP最后一层 - -> 设置CLIP最后一层,CLIP Set Last Layer节点可以用于设置从中获取文本嵌入的CLIP输出层。将文本编码为嵌入是通过将文本通过CLIP模型中的各个层进行转换来实现的。尽管传统上扩散模型是根据CLIP的最后一层的输出进行条件化的,但某些扩散模型是根据较早的层进行条件化的,当使用最后一层的输出时可能效果不佳。 - -![CLIP Set Last Layer](./media/CLIPSetLastLayer.svg) - -**输入** - -- `clip`: 用于编码文本的CLIP模型。 - -**输出** - -- `CLIP`: 设置了新的输出层的CLIP模型。 - -> 如何理解Clip set last layer的原理?CLIP模型是由OpenAI开发的强大深度学习模型,它结合了视觉和语言理解。它能够以多模态方式理解和生成文本和图像。CLIP由多个层级组成,每个层级比前一个层级更具体。 -​ - -> Clip set last layer 指的是在CLIP模型中在较早的层级停止信息流动,而不是一直到最后一层。通过这样做,您可以控制生成的文本描述的具体程度或准确性。例如,如果您正在寻找一张“牛”的图片,您可能对文本模型能够生成的子类别或具体类型的牛不感兴趣,比如“阿伯丁安格斯公牛”。 -​ - -> 使用 Clip set last layer 的好处在于,它允许您根据特定需求定制生成的文本描述的详细程度。根据应用或任务的不同,您可能希望在某个层级停止,以达到所需的准确性或相关性。例如,如果您有一个关于一个年轻人站在田野上的详细提示,使用较低的CLIP skip层级可能会生成诸如“一个站着的人”,“站着的年轻人”或“站在森林中的年轻人”等描述,每个描述都具有不同的特定程度。 -​ - -> 值得注意的是,Clip set last layer 在与特定方式结构化的模型(如Booru模型)一起使用时特别有用。这些模型通常具有可以分解为多个子标签的标签,从而可以更精细地控制生成的描述。然而,CLIP skip的效果可能因具体的模型和应用而异,可能需要一些试错才能找到最佳设置。 -​ - -> 还值得一提的是,Clip set last layer 仅适用于使用CLIP或基于使用CLIP的模型,如1.x模型及其衍生模型。较新的模型,如2.0模型,使用OpenCLIP而不是CLIP,并且与CLIP的交互方式不同。[知识库](https://t.zsxq.com/13XWLqc5r) -​ - - - -## 文本提示 - -> 输入Prompt(文本提示),CLIP文本编码节点将使用CLIP模型对文本提示进行编码,生成一个嵌入向量,用来指导扩散模型生成特定的图像。 - -![图片](./media/CLIPTextEncodePrompt.svg) - -> 有关ComfyUI中所有与文本提示相关的功能的完整指南,[请参阅此页面](https://blenderneko.github.io/ComfyUI-docs/Interface/Textprompts/)。 - -**输入** - -- `clip` - 用于编码文本的CLIP模型 - -- `text` - 要编码的文本。 - -**输出** - -- `CONDITIONING` - 包含嵌入文本的条件,用于指导扩散模型。 - - - -## 视觉编码 - -![CLIP Vision Encode node](./media/CLIPVisionEncode.svg) - - -CLIP Vision Encode节点可以使用CLIP视觉模型对图像进行编码,生成可用于指导 unCLIP 扩散模型或作为样式模型输入的嵌入。 - - -**输入** - -`clip_vision` - -: 用于编码图像的CLIP视觉模型 - -`image` - -: 待编码的图像. - -**输出** - -`CLIP_VISION_OUTPUT` - -: 编码后的图像。 - - - -## 平均条件化 - -![Conditioning (Average) node](./media/ConditioningAverage.svg) - -条件化平均节点,Conditioning (Average) 节点可以根据在 conditioning_to_strength 中设置的强度因子,在两个文本嵌入之间进行插值。 - -**输入** - -`conditioning_to` - -: 在 conditioning_to_strength 为1时的文本嵌入的条件化 - -`conditioning_from` - -: 在 conditioning_to_strength 为0时的文本嵌入的条件化。 - -`conditioning_to_strength` - -: 混合 conditioning_to 到 conditioning_from 的因子。 - -**输出** - -`CONDITIONING` - -: 基于 conditioning_to_strength 混合的文本嵌入的新条件化。 - - - - -## Conditioning (Combine) - -![Conditioning (Combine) node](./media/ConditioningCombine.svg) - - -条件化(合并),Conditioning (Combine) 节点可用于通过平均扩散模型的预测噪声来合并多个条件化。请注意,这与 Conditioning (Average) 节点不同。在这里,通过不同条件化(即构成条件化的所有部分)的扩散模型输出进行平均处理,而条件化(平均)节点则插值存储在条件化内部的文本嵌入。 - -!!! 提示 - 尽管 Conditioning Combine 没有一个因素输入来确定如何插值两个结果噪声预测,但可以使用 Conditioning (Set Area) 节点在组合它们之前对各个条件进行加权。 - -**输入** - -`conditioning_1` - -: 第一个条件。 - -`conditioning_2` - -: 第二个条件。 - - -**输出** - -`CONDITIONING` - -: 一个包含两个输入的新条件,稍后由采样器进行平均。 - - - - -## Conditioning (Set Area) - -![Conditioning (Set Area) node](./media/ConditioningSetArea.svg) - -Conditioning (Set Area)节点可以用于将条件限制在图像的特定区域内。与Conditioning (Combine)节点一起使用,可以对最终图像的组合进行更多的控制。 - -!!! 提示 - ComfyUI中坐标系统的原点位于左上角。在混合扩散模型的多个噪声预测之前,强度会被归一化。 - -**输入** - -`conditioning` - -: 将被限制在区域内的条件 - -`width` - -: 区域的宽度 - -`height` - -: 区域的高度 - -`x` - -: 区域的x坐标 - -`y` - -: 区域的y坐标 - -`strength` - -: 当混合多个重叠的条件时使用的区域权重 - -**输出** - -`CONDITIONING` - -: 一个新的条件,限制在指定的区域内。 - - - -### Conditioning (Set Mask) - -![Conditioning (Set Mask) node](./media/ConditioningSetMask.svg) - -条件化(设置遮罩),Conditioning (Set Mask) 节点可用于将条件化限制在指定的遮罩中。与Conditioning (Combine) 节点一起使用,可以更好地控制最终图像的组合。 - -!!! 提示 - 强度在从扩散模型中混合多个噪声预测之前进行归一化。 - -**输入** - -`conditioning` - -: 限制到遮罩的条件化 - -`mask` - -: 限制条件化的遮罩 - -`strength` - -: 在混合多个重叠条件化时使用的遮罩区域的权重。 - -`set_cond_area` - -: 是否对整个区域进行去噪,还是限制在遮罩的边界框内。 - - -**输出** - -`CONDITIONING` - -: 一个新的条件化,限制在指定的遮罩中。 - -## example - -example usage text with workflow image - - - -### GLIGEN Textbox Apply - -![GLIGEN Textbox Apply node](./media/GLIGENTextboxApply.svg) - - -应用GLIGEN文本框,GLIGEN Textbox Apply节点可用于为扩散模型提供进一步的空间指导,引导其在图像的特定区域生成指定的部分。尽管文本输入可以接受任何文本,但GLIGEN最适合的输入是文本提示中的一部分对象。 - -!!! 提示 - ComfyUI中的坐标系原点位于左上角。 - -**输入** - -`conditioning_to` - -: 一个条件. - -`clip` - -: CLIP模型. - -`gligen_textbox_model` - -: GLIGEN模型. - -`text` - -: 要与空间信息关联的文本 - -`width` - -: 区域的宽度 - -`height` - -: 区域的高度 - -`x` - -: 区域的x坐标 - -`y` - -: 区域的y坐标 - -**输出** - -`CONDITIONING` - -: 包含GLIGEN和空间指导的条件。 - -## example - -example usage text with workflow image - - -# unCLIP Conditioning - -![unCLIP Conditioning node](./media/unCLIPConditioning.svg) - - - -unCLIP条件化,unCLIP Conditioning 节点可以通过由CLIP视觉模型编码的图像为unCLIP模型提供额外的视觉指导。可以链接多个节点以提供多个图像作为指导。 - -!!! 提示 - 并非所有扩散模型都与unCLIP条件化兼容。此节点特别需要使用考虑到unCLIP的扩散模型。 - -**输入** - -`conditioning` - -: 条件化 - -`clip_vision_output` - -: 由CLIP VISION模型编码的图像 - -`strength` - -: unCLIP扩散模型应受图像指导的强度 - -`noise_augmentation` - -: 用于将unCLIP扩散模型引导到原始CLIP视觉嵌入的随机位置,提供与编码图像密切相关的生成图像的额外变化 - -**输出** - -`CONDITIONING` - -: 包含unCLIP模型的额外视觉指导的条件化 - - - -## 实验性 Experimental - -实验性包含实验性节点,可能尚未完全完善。 - -### Load Latent - -![Load Latent node](./media/LoadLatent.svg) - - -加载潜在节点:Load Latent节点可用于加载使用保存潜在节点保存的潜在图像。 - -**输入** - -`latent` - -: 潜在图像的名称 - - -**输出** - -`LATENT` - -: 加载的潜在图像 - - -### Save Latent - -![Save Latent node](./media/SaveLatent.svg) - - -保存潜变量节点:Save Latent节点可以用于保存潜变量以备将来使用。这些潜变量可以使用Load Latent节点再次加载。 - -**输入** - -`samples` - -: 要保存的潜变量 - -`filename_prefix` - -: 文件名的前缀 - - -**输出** - -此节点没有输出 - - - -### Tome Patch Model - -![Tome Patch Model node](./media/TomePatchModel.svg) - -Tome Patch Model节点可以用于对扩散模型应用Tome优化。Tome(TOken MErging)试图找到一种合并提示令牌的方法,以使对最终图像的影响最小化。生成时间更快,所需的VRAM减少,但可能会降低质量。可以通过比率设置来控制此权衡,较高的值会导致合并更多的令牌。 - -**输入** - -`model` - -: 要应用Tome优化的扩散模型 - -`ratio` - -: 确定何时合并令牌的阈值 - - -**输出** - -`MODEL` - -: 经Tome优化的扩散模型 - -## TokenMerging for Stable Diffusion - -![TokenMerging for Stable Diffusion](./media/TokenMergingforStableDiffusion.jpg) - -*************** - - -### VAE Decode (Tiled) - -![VAE Decode (Tiled) node](./media/VAEDecodeTiled.svg) - - -VAE解码(平铺),VAE Decode (Tiled) 节点可以使用提供的VAE将潜在空间图像解码回像素空间图像。该节点以平铺方式解码潜在图像,使其能够解码比常规VAE解码节点更大的潜在图像。 - -!!! 提示 - 当因为VRAM不足而导致常规VAE解码节点失败时,comfy将自动使用平铺实现进行重试。 - -**输入** - -`samples` - -: 要解码的潜在图像 - -`vae` - -: 用于解码潜在图像的VAE - - -**输出** - -`IMAGE` - -: 解码后的图像。 - - -### VAE Encode (Tiled) - -![VAE Encode (Tiled) node](./media/VAEEncodeTiled.svg) - -VAE编码(平铺),VAE Encode (Tiled) 节点可用于使用提供的VAE将像素空间图像编码为潜在空间图像。此节点使用图块对图像进行编码,使其能够编码比常规VAE编码节点更大的图像。 - -!!! 提示 - 当常规VAE编码节点由于VRAM不足而失败时,Comfy会自动使用平铺实现进行重试。 - -**输入** - -`pixels` - -: 像素要编码的像素空间图像 - -`vae` - -: 用于编码像素图像的VAE - - -**输出** - -`LATENT` - -: 编码的潜在图像。 - - - -## 图像 Image - -ComfyUI提供了多种节点来操作像素图像。这些节点可以用于加载图像以进行图像转换工作流,保存结果,或者用于对图像进行高分辨率处理。 - -### Load Image - -![Load Image node](./media/LoadImage.svg) - -加载图像,Load Image节点可用于加载图像。可以通过启动文件对话框或将图像拖放到节点上来上传图像。一旦图像上传完成,就可以在节点内部选择它们。 - -!!! 提示 -默认情况下,图像将上传到ComfyUI的输入文件夹中。 - -**输入** - -`image` - -: 图像要使用的名称。 - - -**输出** - -`IMAGE` - -: 像素图像。 - -`MASK` - -: 图像的Alpha通道。 - -### 示例 - -为了执行图像到图像的生成,您必须使用加载图像节点加载图像。在下面的示例中,使用加载图像节点加载了一张图像,然后使用 VAE encode 节点将其编码为潜在空间,从而使我们能够执行图像到图像的任务。 - -(TODO: provide different example using mask) - - - - - -### Invert Image - -![Invert Image node](./media/InvertImage.svg) - -反转图像节点,Invert Image 节点可以用于反转图像的颜色。 - -**输入** - -`image` - -: 要反转的像素图像 - - -**输出** - -`IMAGE` - -: 反转后的像素图像 - - -### Pad Image for Outpainting - -![Pad Image for Outpainting node](./media/PadImageForOutpainting.svg) - -Outpainting节点的Pad Image用于给图像添加填充,以进行outpainting。然后,可以通过VAE Encode for Inpainting将此图像输入到inpaint diffusion模型中。 - -**输入** - -`image` - -: 要进行填充的图像。 - -`left` - -: 要在图像左侧填充的量。 - -`top` - -: 要在图像上方填充的量。 - -`right` - -: 要在图像右侧填充的量。 - -`bottom` - -: 要在图像下方填充的量。 - -`feathering` - -: 原始图像边界的羽化程度。 - -**输出** - -`IMAGE` - -: 填充后的像素图像。 - -`MASK` - -: 指示采样器在哪里进行outpainting的掩码。 - - -### Preview Image - -![Preview Image node](./media/PreviewImage.svg) -预览图像节点可用于在节点图中预览图像。 - - -**输入** - -`image` - -: 图像像素数据 - - -**输出** - -该节点没有输出参数 - - -### Save Image - -![Save Image node](./media/SaveImage.svg){ align=right width=450 } - -保存图像:Save Image节点可用于保存图像。要在节点图中简单预览图,请使用Preview Image节点。要更好地组织生成的所有图像,可以将特殊格式的字符串传递给带有file_prefix小部件的输出节点。有关如何格式化字符串的更多信息,[请参阅此页面](https://blenderneko.github.io/ComfyUI-docs/Interface/SaveFileFormatting/) - -**输入** - -`image` - -: 要预览的像素图像 - -`filename_prefix` - -: 要放入文件名中的前缀 - - -**输出** - -此节点没有输出。 - - -### Image Blend#postprocessing - -![Image Blend node](./media/ImageBlend.svg) - - -The Image Blend node can be used to blend two images together. - -!!! info - If the dimensions of the second image do not match those of the first it is rescaled and center-cropped to maintain its aspect ratio - -**输入** - -`image1` - -: A pixel image. - -`image2` - -: A second pixel image. - -`blend_factor` - -: The opacity of the second image. - -`blend_mode` - -: How to blend the images. - -**输出** - -`IMAGE` - -: The blended pixel image. - - - -### Image Blur - -![Image Blur node](./media/ImageBlur.svg) - -The Image Blend node can be used to apply a gaussian blur to an image. - -**输入** - -`image` - -: The pixel image to be blurred. - -`blur_radius` - -: The radius of the gaussian. - -`sigma` - -: The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel. - -**输出** - -`IMAGE` - -: The blurred pixel image. - - -## Image Quantize - -![Image Quantize node](./media/ImageQuantize.svg) - -The Image Quantize node can be used to quantize an image, reducing the number of colors in the image. - -**输入** - -`image` - -: The pixel image to be quantized. - -`colors` - -: The number of colors in the quantized image. - -`dither` - -: Wether to use dithering to make the quantized image look more smooth, or not. - -**输出** - -`IMAGE` - -: The quantized pixel image. - - - - - -## Image Sharpen - -![Image Sharpen node](./media/ImageSharpen.svg) - -The Image Sharpen node can be used to apply a Laplacian sharpening filter to an image. - -**输入** - -`image` - -: The pixel image to be sharpened. - -`sharpen_radius` - -: The radius of the sharpening kernel. - -`sigma` - -: The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel. - -`alpha` - -: The strength of the sharpening kernel. - -**输出** - -`IMAGE` - -: The sharpened pixel image. - - - -## Upscale Image - -![Upscale Image node](./media/UpscaleImage.svg) - -The Upscale Image node can be used to resize pixel images. To upscale images using AI see the [Upscale Image Using Model](UpscaleImageUsingModel.md) node. - -**输入** - -`image` - -: The pixel images to be upscaled. - -`upscale_method` - -: The method used for resizing. - -`Width` - -: The target width in pixels. - -`height` - -: The target height in pixels. - -`crop` - -: Wether or not to center-crop the image to maintain the aspect ratio of the original latent images. - -**输出** - -`IMAGE` - -: The resized images. - - -## Upscale Image (using Model) - -![Upscale Image (using Model) node](./media/UpscaleImageUsingModel.svg) - -The Upscale Image (using Model) node can be used to upscale pixel images using a model loaded with the [Load Upscale Model] - -**输入** - -`upscale_model` - -: The model used for upscaling. - -`image` - -: The pixel images to be upscaled. - -**输出** - -`IMAGE` - -: The upscaled images. - - - -## Latent 潜在空间 - -潜在扩散模型(如稳定扩散)不在像素空间中运作,而是在潜空间中进行去噪。这些节点提供了使用编码器和解码器在像素空间和潜在空间之间切换的方法,并提供了多种操纵潜在图像的方式。 - -### Empty Latent Image - -![Empty Latent Image node](./media/EmptyLatentImage.svg) - -空潜像图节点,Empty Latent Image节点可用于创建一组新的空潜像图。这些潜像图可以在文本转图像工作流中使用,通过采样器节点对其进行添加噪声和去噪处理。 - -**输入** - -`width` - -: 宽度(像素) - -`height` - -: 高度(像素); - -`batch_size` - -: 批次大小(潜在图像数量)。 - -**输出** - -`LATENT` - -: 空潜在图像 - - -### Latent Composite - -![Latent Composite node](./media/LatentComposite.svg) - -潜在图像合成 Latent Composite节点可用于将一个潜在图像合成到另一个潜在图像中。 - -!!! 提示 - ComfyUI中的坐标系统原点位于左上角。 - -**输入** - -`samples_to` - -: 要复合的潜在图像。 - -`samples_from` - -: 要粘贴的潜在图像。 - -`x` - -: 粘贴潜在图像的x坐标(以像素为单位)。 - -`y` - -: 粘贴潜在图像的y坐标(以像素为单位)。 - -`feather` - -: 要粘贴的潜在图像的羽化效果。 - -**输出** - -`LATENT` - -: 包含将 samples_from 粘贴到 samples_to 中的新潜在图像组合。 - - -### Latent Composite Masked - -![Latent Composite Masked node](./media/LatentCompositeMasked.svg) - -潜在图像合成遮罩,Latent Composite Masked节点可用于将一个潜在图像遮罩复合体粘贴到另一个潜在图像。 - - - -**输入** - -`destination` - -: 目的地:要粘贴的潜在图像。 - -`source` - -: 源:要粘贴的潜在图像。 - -`mask` - -: 遮罩:要粘贴的源潜在图像的遮罩。 - -`x` - -: 粘贴潜在图像的x坐标(以像素为单位) - -`y` - -: 粘贴潜在图像的y坐标(以像素为单位) - - - -**输出** - -`LATENT` - -: 将源潜在图像粘贴到目标潜像的组合而成的新潜在图像。 - - -### Upscale Latent - -![Upscale Latent node](./media/UpscaleLatent.svg) - -放大潜在图像,Upscale Latent 节点可用于调整潜在图像的大小。 - -!!! 提示: - 调整潜像图的大小与调整像素图像的大小不同。简单地调整潜像图而不是像素会导致更多的伪影。 - -**输入** - -`samples` - -: 要调整大小的潜像图 - -`upscale_method` - -: 用于调整大小的方法。 - -`Width` - -: 目标宽度(以像素为单位)。 - -`height` - -: 目标高度(以像素为单位)。 - -`crop` - -: 是否居中裁剪图像以保持原始潜像图的纵横比。 - -**输出** - -`LATENT` - -: 调整大小后的潜像图。 - - -### VAE Decode - -![VAE Decode node](./media/VAEDecode.svg) - -VAE解码,VAE Decode节点可用于使用提供的VAE将潜像图解码为像素图像。 - -**输入** - -`samples` - -: 要解码的潜像图。 - -`vae` - -: 用于解码潜像图的VAE。 - - -**输出** - -`IMAGE` - -: 解码后的像素图像。 - -## example - -TODO: SD 1.5 to XL example - - -### VAE Encode - -![VAE Encode node](./media/VAEEncode.svg) - - -VAE编码,VAE Encode 节点可以使用提供的VAE将像素空间图像编码为潜像图。 - -**输入** - -`pixels` - -: 像素:要编码的像素空间图像。 - -`vae` - -: 用于编码像素图像的VAE。 - - -**输出** - -`LATENT` - -: 编码的潜像图。 - -## 示例 - -为了在图像到图像的任务中使用图像,首先需要将其编码为潜像图。在下面的示例中,使用VAE编码节点将像素图像转换为潜像图,以便我们可以将其重新噪声化和去噪,得到全新的图像。 - - - - -### Latent From Batch - -![Latent From Batch node](./media/LatentFromBatch.svg) - -从批次中提取潜像图,Latent From Batch 节点可以用于从批次中选择一个潜像图或图像片段。这在工作流中需要隔离特定的潜像图或图像时非常有用。 - -**输入** - -`samples` - -: 要选择一个片段的批次潜像图。 - -`batch_index` - -: 要选择的第一个潜像图的索引。 - -`length` - -: 要获取的潜像图数量。 - -**输出** - -`LATENT` - -: 只包含所选择片段的新批次潜像图 - - -### Rebatch Latents - -![Rebatch Latents node](./media/RebatchLatents.svg) - -重新分批潜像图,Rebatch Latents节点可以用于拆分或合并批量的潜在空间图像。当这导致多个批次时,该节点将输出一个批次列表,而不是单个批次。这在批量大小过大无法全部适应VRAM内时非常有用,因为ComfyUI将对列表中的每个批次执行节点,而不是一次执行全部。它还可以将批次列表合并回一个单独的批次中。 - - -**输入** - -`samples` - -: 待重新分批的潜图。 - -`batch_size` - -: 新的批次大小。 - -**输出** - -`LATENT` - -: 一个潜图列表,其中每个批次的大小不超过batch_size。 - - -### Repeat Latent Batch - -![Repeat Latent Batch node](./media/RepeatLatentBatch.svg) - -重复潜在批处理,Repeat Latent Batch节点可用于重复一批潜像图。这可以用于在图像到图像工作流中创建多个图像变体。 - -**输入** - -`samples` - -: 要重复的潜像图批处理。 - -`amount` - -: 重复的次数。 - -**输出** - -`LATENT` - -: 重复了指定次数的新的潜像图批处理。 - - -### Set Latent Noise Mask - -![Set Latent Noise Mask node](./media/SetLatentNoiseMask.svg) - - -设置潜在噪声掩码,Set Latent Noise Mask节点可用于为修复图像的潜像图添加掩码。当设置了噪声掩码时,采样节点将仅在掩码区域上操作。如果提供了单个掩码,批处理中的所有潜像图都将使用该掩码。 - -**输入** - -`samples` - -: 样本:要修复的潜像图。 - -`mask` - -: 掩码:指示修复位置的掩码。 - -**输出** - -`LATENT` - -: 潜在:经过掩码处理的潜像图。 - - -### VAE Encode (for Inpainting) - -![VAE Encode For Inpainting node](./media/VAEEncodeForInpainting.svg) - -VAE编码(用于修复图像),VAE Encode (for Inpainting) 将像素空间图像编码为潜在空间图像,使用提供的VAE(变分自编码器)。它还接受修复图像的掩码,指示采样节点应该对图像的哪些部分去噪。可以使用grow_mask_by来增加掩码区域的大小,为修复过程提供一些额外的填充区域。 - -!!! 提示 - 该节点专门用于用于修复训练的扩散模型,并确保在编码之前,掩码下方的像素被设置为灰色(0.5,0.5,0.5)。 - -**输入** - -`pixels` - -: 像素:要编码的像素空间图像。 - -`vae` - -: 用于编码像素图像的VAE。 - -`mask` - -: 掩码:指示要修复的位置的掩码。 - -`grow_mask_by` - -: 增加给定掩码区域的大小。 - - -**输出** - -`LATENT` - -: 掩码和编码的潜像图。 - -### Crop Latent - -![Crop Latent node](./media/CropLatent.svg) - -裁剪潜像,Crop latent 节点可用于将潜像裁剪到新的形状。 - - -**输入** - -`samples` - -: 样本要裁剪的潜像。 - -`width` - -: 宽度以像素为单位的区域宽度。 - -`height` - -: 高度以像素为单位的区域高度。 - -`x` - -: 以像素为单位的区域x坐标。 - -`y` - -: 以像素为单位的区域y坐标。 - - -**输出** - -`LATENT` - -: 裁剪后的潜像图。 - - -### Flip Latent - -![Flip Latent node](./media/FlipLatent.svg) - -翻转潜像,Flip Latent 节点可用于水平或垂直翻转潜像。 - -**输入** - -`samples` - -: 要翻转的潜像。 - -`flip_method` - -: 选择水平翻转或垂直翻转 - - - -**输出** - -`LATENT` - -: 翻转后的潜像图。 - - -### Rotate Latent - -![Rotate Latent node](./media/RotateLatent.svg) - -The Rotate Latent node can be used to rotate latent images clockwise in increments of 90 degrees. - -**输入** - -`samples` - -: The latent images to be rotated. - -`rotation` - -: Clockwise rotation. - -**输出** - -`LATENT` - -: The rotated latents. - - - -## 载入器 Loaders - -The loaders in this segment can be used to load a variety of models used in various workflows. A full list of all of the loaders can be found in the sidebar. - - -### GLIGEN Loader - -![GLIGEN Loader node](./media/GLIGENLoader.svg) - -The GLIGEN Loader node can be used to load a specific GLIGEN model. GLIGEN models are used to associate spatial information to parts of a text prompt, guiding the diffusion model to generate images adhering to compositions specified by GLIGEN. - -**输入** - -`gligen_name` - -: The name of the GLIGEN model. - -**输出** - -`GLIGEN` - -: The GLIGEN model used to encode spatial information to parts of the text prompt. - - -### Hypernetwork Loader - -![Hypernetwork Loader node](./media/HypernetworkLoader.svg) - -The Hypernetwork Loader node can be used to load a hypernetwork. similar to LoRAs, they are used to modify the diffusion model, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple hypernetworks together to further modify the model. - -!!! tip - - Hypernetwork strength values can be set to negative values. At times this can result in interesting effects. - -## inputs - -`model` - -: A diffusion model. - -`hypernetwork_name` - -: The name of the hypernetwork. - -`strength` - -: How strongly to modify the diffusion model. This value can be negative. - - -## outputs - -`MODEL` - -: The modified diffusion model. - - -### Load Checkpoint - -![Load Checkpoint node](./media/LoadCheckpoint.svg) - -The Load Checkpoint node can be used to load a diffusion model, diffusion models are used to denoise latents. This node will also provide the appropriate VAE and CLIP model. - -## inputs - -`ckpt_name` - -: The name of the model. - -## outputs - -`MODEL` - -: The model used for denoising latents. - -`CLIP` - -: The CLIP model used for encoding text prompts. - -`VAE` - -: The VAE model used for encoding and decoding images to and from latent space. - - -### Load CLIP - -![Load CLIP node](./media/LoadCLIP.svg) - - -The Load CLIP node can be used to load a specific CLIP model, CLIP models are used to encode text prompts that guide the diffusion process. - -!!! warning - - Conditional diffusion models are trained using a specific CLIP model, using a different model than the one which it was trained with is unlikely to result in good images. The [Load Checkpoint](LoadCheckpoint.md) node automatically loads the correct CLIP model. - -## inputs - -`clip_name` - -: The name of the CLIP model. - -## outputs - -`CLIP` - -: The CLIP model used for encoding text prompts. - - - -### Load CLIP Vision - -![Load CLIP Vision node](./media/LoadCLIPVision.svg) - -The Load CLIP Vision node can be used to load a specific CLIP vision model, similar to how CLIP models are used to encode text prompts, CLIP vision models are used to encode images. - -## inputs - -`clip_name` - -: The name of the CLIP vision model. - -## outputs - -`CLIP_VISION` - -: The CLIP vision model used for encoding image prompts. - - -### Load ControlNet Model - -![Load ControlNet node](./media/LoadControlNet.svg) - -The Load ControlNet Model node can be used to load a ControlNet model. Similar to how the CLIP model provides a way to give textual hints to guide a diffusion model, ControlNet models are used to give visual hints to a diffusion model. This process is different from e.g. giving a diffusion model a partially noised up image to modify. Instead ControlNet models can be used to tell the diffusion model e.g. where edges in the final image should be, or how subjects should be posed. This node can also be used to load T2IAdaptors. - -## inputs - -`control_net_name` - -: The name of the ControlNet model. - -## outputs - -`CONTROL_NET` - -: The ControlNet or T2IAdaptor model used for providing visual hints to a diffusion model. - - -### Load LoRA - -![Load LoRA node](./media/LoadLoRA.svg) - - -The Load LoRA node can be used to load a LoRA. LoRAs are used to modify the diffusion and CLIP models, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple LoRAs together to further modify the model. - -!!! tip - - LoRA strength values can be set to negative values. At times this can result in interesting effects. - -## inputs - -`model` - -: A diffusion model. - -`clip` - -: A CLIP model. - -`lora_name` - -: The name of the LoRA. - -`strength_model` - -: How strongly to modify the diffusion model. This value can be negative. - -`strength_clip` - -: How strongly to modify the CLIP model. This value can be negative. - -## outputs - -`MODEL` - -: The modified diffusion model. - -`CLIP` - -: The modified CLIP model. - -### Load Style Model - -![Load Style Model node](./media/LoadStyleModel.svg) - -The Load Style Model node can be used to load a Style model. Style models can be used to provide a diffusion model a visual hint as to what kind of style the denoised latent should be in. - -!!! info - Only T2IAdaptor style models are currently supported - -## inputs - -`style_model_name` - -: The name of the style model. - -## outputs - -`STYLE_MODEL` - -: The style model used for providing visual hints about the desired style to a diffusion model. - -### Load Upscale Model - -![Load Upscale Model node](./media/LoadUpscaleModel.svg) - -The Load Upscale Model node can be used to load a specific upscale model, upscale models are used to upscale images. - - -## inputs - -`model_name` - -: The name of the upscale model. - -## outputs - -`UPSCALE_MODEL` - -: The upscale model used for upscaling images. - - - -### Load VAE - -![Load VAE node](./media/LoadVAE.svg) - -The Load VAE node can be used to load a specific VAE model, VAE models are used to encoding and decoding images to and from latent space. Although the [Load Checkpoint](LoadCheckpoint.md) node provides a VAE model alongside the diffusion model, sometimes it can be useful to use a specific VAE model. - -## inputs - -`vae_name` - -: The name of the VAE. - -## outputs - -`VAE` - -: The VAE model used for encoding and decoding images to and from latent space. - -## example - -At times you might wish to use a different VAE than the one that came loaded with the [Load Checkpoint](./LoadCheckpoint.md) node. In the example below we use a different VAE to encode an image to latent space, and decode the result of the Ksampler. - - - - -### unCLIP Checkpoint Loader - -![unCLIP Checkpoint Loader node](./media/unCLIPCheckpointLoader.svg) - -The unCLIP Checkpoint Loader node can be used to load a diffusion model specifically made to work with unCLIP. unCLIP Diffusion models are used to denoise latents conditioned not only on the provided text prompt, but also on provided images. This node will also provide the appropriate VAE and CLIP amd CLIP vision models. - -!!! warning - even though this node can be used to load all diffusion models, not all diffusion models are compatible with unCLIP. - -## inputs - -`ckpt_name` - -: The name of the model. - -## outputs - -`MODEL` - -: The model used for denoising latents. - -`CLIP` - -: The CLIP model used for encoding text prompts. - -`VAE` - -: The VAE model used for encoding and decoding images to and from latent space. - -`CLIP_VISION` - -: The CLIP Vision model used for encoding image prompts. - - - - - - -## 遮罩 Mask -Masks provide a way to tell the sampler what to denoise and what to leave alone. These nodes provide a variety of ways create or load masks and manipulate them. - - -### 将图像转换为遮罩 - -![Convert Image to Mask node](./media/ConvertImageToMask.svg) - -将图像转换为遮罩节点允许用户从图像的特定通道创建遮罩。这对于想要控制图像特定区域的编辑或处理特别有用,例如只对图像的某一部分应用效果或调整。 - -**输入** - -`image` - -: 要转换为遮罩的像素图像。 - -`channel` - -: 要用作遮罩的通道。 - -**输出** - -`MASK` - -: 由图像通道创建的遮罩。 - -## 示例 - -将图像转换为遮罩的操作非常直接。首先,你需要准备一个图像,并确定你想要用作遮罩的特定通道。以下是一个简单的工作流程示例: - -1. 将你想要转换的图像连接到`image`输入。 -2. 选择你想要用作遮罩的通道(红色、绿色、蓝色或透明度)。 -3. 节点将处理输入的图像,并在`MASK`输出中提供相应通道的遮罩。 - -这在许多图像处理任务中都非常有用,特别是在需要精确控制应用于图像哪个部分的效果时。 - - - -这样,你就可以利用图像的不同通道来创建精确的遮罩,进一步提高你的图像编辑能力和精度。 - - - - -### 裁剪遮罩 - -![Crop Mask node](./media/CropMask.svg) - - -裁剪遮罩节点用于将遮罩裁剪为新的形状。通过定义裁剪区域的尺寸和坐标,你可以精确控制保留遮罩的哪一部分。 - -!!! info - 在ComfyUI中,坐标系的原点位于左上角。 - -## 输入 - -`mask` - -: 要裁剪的遮罩。 - -`width` - -: 裁剪区域的宽度,以像素为单位。 - -`height` - -: 裁剪区域的高度,以像素为单位。 - -`x` - -: 裁剪区域的x坐标,以像素为单位。 - -`y` - -: 裁剪区域的y坐标,以像素为单位。 - -## 输出 - -`MASK` - -: 被裁剪后的遮罩。 - -## 示例 - -裁剪遮罩是图像编辑中常用的一项功能,它可以帮助你从一个大的遮罩中精确地选出你需要的部分。以下是如何使用裁剪遮罩节点的一个简单示例: - -1. 将你想要裁剪的遮罩连接到`mask`输入。 -2. 设置`width`和`height`来确定裁剪区域的尺寸。 -3. 通过`x`和`y`输入来定位裁剪区域的左上角起始点。 -4. 节点将输出一个新的、按照你指定参数裁剪过的遮罩。 - - - -此裁剪遮罩可用于去除不需要的部分,或者将焦点集中在遮罩的特定区域。 - - - -### 羽化遮罩 - -![Feather Mask node](./media/FeatherMask.svg) - -羽化遮罩节点用于对遮罩进行羽化处理,使遮罩边缘更加柔和,以实现更自然的过渡。 - -## 输入 - -`mask` - -: 需要进行羽化处理的遮罩。 - -`left` - -: 左侧边缘的羽化量。 - -`top` - -: 顶部边缘的羽化量。 - -`right` - -: 右侧边缘的羽化量。 - -`bottom` - -: 底部边缘的羽化量。 - -## 输出 - -`MASK` - -: 经过羽化处理的遮罩。 - -## 示例 - -羽化遮罩是在图像处理和合成中实现柔和边缘效果的重要工具,特别是当将两个图像层叠加或融合时,羽化可以使边缘之间的过渡更加自然。以下是一个简单的使用案例: - -1. 将您想要羽化的遮罩连接到`mask`输入。 -2. 根据需要设置`left`、`top`、`right`和`bottom`,这些值确定了各个方向上羽化效果的强度。 -3. 节点会生成一个新的羽化遮罩,可以被进一步用在图像融合或其他视觉效果中。 - - - -此羽化遮罩可用于平滑遮罩的硬边缘,避免图像合成时出现不自然的硬线条或过渡。 - - -### 反转遮罩 - -![Invert Mask node](./media/InvertMask.svg) - - -反转遮罩节点用于反转一个遮罩,将原本的掩盖区域转换为非掩盖区域,反之亦然。这在您希望改变遮罩影响区域时非常有用。 - -## 输入 - -`mask` - -: 需要被反转的遮罩。 - -## 输出 - -`MASK` - -: 被反转后的遮罩。 - -## 实例 - -反转遮罩节点在各种情境下都非常有用,尤其是当您希望对图像的不同部分应用不同的效果或处理时。以下是一个简单的使用案例: - -在这个工作流中,我们首先加载一个遮罩,该遮罩原本是为了保护图像的一个区域而创建的。但在某一步骤,我们决定想对原本被保护的区域应用某种效果(比如去噪或滤镜),同时保持原本未被保护的区域不变。这时,我们就可以使用反转遮罩节点。 - -1. 加载您原本的遮罩到工作流。 -2. 将遮罩连接到“反转遮罩”节点的输入端。 -3. 将“反转遮罩”节点的输出连接到您的图像处理节点(比如 KSampler)。 - -现在,原本被保护的区域将接受处理,而其他区域则保持不变。 - - - -通过使用反转遮罩节点,您能轻松地在不同的图像编辑阶段切换受影响的区域,无需创建和加载多个遮罩文件。 - - -### 加载图片(作为遮罩) - -![Load Image (as Mask) node](./media/LoadImageAsMask.svg) - -加载图片(作为遮罩)节点可以用来加载图片的某个通道并将其作为遮罩使用。图片可以通过启动文件对话框上传,或者直接拖拽到节点上。一旦图片上传,就可以在节点内部选择使用。 - -!!! info - 默认情况下,图片会被上传到ComfyUI的输入文件夹 - -## 输入 - -`image` - -: 要转换为遮罩的图片的名称。 - -`channel` - -: 要用作遮罩的图片的通道。 - -## 输出 - -`MASK` - -: 从图片通道创建的遮罩。 - -## 实例 - -加载图片作为遮罩的节点在您需要基于现有图像创建遮罩时非常有用,尤其是当图像的某个区域有独特的颜色或亮度时,可以通过该颜色或亮度区分进行遮罩。以下是一个简单的使用案例: - -在此工作流中,我们有一个图像,其中某个区域我们想要进行特殊处理(例如应用特效、调整或变换),而不影响图像的其他部分。 - -1. 使用“加载图片(作为遮罩)”节点,选择您的图片文件。 -2. 在“通道”选项中,选择一个特定的颜色通道(红色、绿色、蓝色或透明度),这取决于您的图片和需要遮罩的区域。例如,如果需要遮罩的区域在红色通道上有高亮度,则选择红色通道。 -3. 将此节点的输出连接到下一个处理节点的遮罩输入,例如,一个应用特效的节点。 - -现在,您的特效或处理将只应用于基于所选图片通道生成的遮罩的区域。 - - - -这种方法提供了一种简便的方式,通过现有图片快速创建遮罩,无需手动绘制复杂的遮罩形状。 - - - -### 遮罩合成 - -![Mask Composite node](./media/MaskComposite.svg) - - -遮罩合成节点可以用来将一个遮罩粘贴到另一个遮罩中。 - -!!! info - 在ComfyUI中,坐标系统的原点位于左上角。 - -## 输入 - -`destination` - -: 将要被粘贴的遮罩。 - -`source` - -: 要粘贴的遮罩。 - -`x` - -: 粘贴遮罩的x坐标,单位为像素。 - -`y` - -: 粘贴遮罩的y坐标,单位为像素。 - -`operation` - -: 粘贴遮罩的方式。 - -## 输出 - -`MASK` - -: 包含粘贴到`destination`中的`source`的新遮罩合成。 - -## 示例 - -遮罩合成节点非常适用于需要将一个遮罩层叠到另一个上的场景,尤其是当您想要在图像的特定部分应用不同的效果或调整时。以下是一个简单的使用案例: - -在此工作流中,我们有两个遮罩 - 一个是主遮罩(destination),另一个我们希望粘贴到主遮罩上的次遮罩(source)。 - -1. 将主遮罩连接到`destination`输入。 -2. 将要粘贴的遮罩连接到`source`输入。 -3. 在`x`和`y`输入中设置坐标,确定次遮罩在主遮罩上的位置。 -4. 选择`operation`以确定粘贴时如何合并遮罩。例如,“正常”会简单地将次遮罩放在主遮罩上,“相加”会合并遮罩的亮度值等。 - -输出的遮罩将是次遮罩粘贴到主遮罩上的结果,根据所选择的操作方式,可能会有不同的视觉效果。 - -此节点非常适用于复杂的图像处理任务,其中需要精确控制应用于图像不同部分的效果。 - - -这种方法提供了一种高度可定制的方式来合并遮罩,为图像编辑提供更多的灵活性和控制。 - - -### 纯色遮罩 Solid Mask - -![Solid Mask node](./media/SolidMask.svg) - - -纯色遮罩节点可以用来创建一个填充了单一值的纯色遮罩。 - -## 输入 - -`value` - -: 填充遮罩的值。 - -`width` - -: 遮罩的宽度。 - -`height` - -: 遮罩的高度。 - -## 输出 - -`MASK` - -: 填充了单一值的遮罩。 - -## 示例 - -纯色遮罩节点在您需要为整个图像或特定区域创建统一遮罩时非常有用,尤其是在需要遮蔽背景或仅对图像的特定部分应用效果时。以下是一个简单的使用案例: - -1. 将您想要填充的值输入到`value`中,该值范围从0(完全透明)到1(完全不透明)。 -2. 输入您期望的遮罩`width`和`height`,通常这会与您工作的图像尺寸相匹配。 -3. 节点会生成一个填充了所选值的纯色遮罩,可以被应用到其他节点,例如遮罩合成节点或KSampler节点。 - - - -这个纯色遮罩可以用作其他遮罩操作的基础,或者直接用来控制图像的哪些部分应该被采样器处理或保留。 - - - -## 采样 Sampling - -采样节点提供了一种使用扩散模型对潜在图像进行去噪的方法。 - - - - -### KSampler - -![KSampler 节点](./media/KSampler.svg) - -KSampler 使用提供的模型以及正向和负向条件来生成给定潜像的新版本。首先,根据给定的 `seed` 和 `denoise` 强度对潜像进行加噪,部分擦除潜像。然后使用给定的 `Model` 以及 `positive` 和 `negative` 条件作为指导,去除这些噪声,在噪声擦除图像的地方“构想”新的细节。 - -## 输入 - -`Model` - -: 用于去噪的模型 - -`Positive` - -: 正面调节。 - -`Negative` - -: 负面调节。 - -`latent_image` - -: 将被去噪的潜像。 - -`seed` - -: 用于创建噪声的随机种子。 - -`control_after_generate` - -: 提供在每个提示后更改上述种子号的能力。节点可以`randomize`、`increment`、`decrement`或保持种子号`fixed`。 - -`steps` - -: 去噪期间使用的步骤数。允许采样器进行的步骤越多,结果就越准确。有关如何选择适当步骤数的好的指导方针,请参见[samplers](samplers.md)页面。 - -`cfg` - -: 无分类器指导(cfg)比例决定了采样器在实现提示内容到最终图像中应该有多积极。更高的比例迫使图像更好地代表提示,但设置过高的比例会对图像的质量产生负面影响。 - -`sampler_name` - -: 要使用的采样器,有关可用采样器的更多详细信息,请参见[samplers](samplers.md)页面。 - -`scheduler` - -: 要使用的计划类型,有关可用计划的更多详细信息,请参见[samplers](samplers.md)页面。 - -`denoise` - -: 应该有多少潜像信息被噪声擦除。 - - -## 输出 - -`LATENT` - -: 去噪后的潜像。 - -## 示例 - -KSampler 是任何工作流的核心,可用于执行文本到图像和图像到图像的生成任务。下面的示例展示了如何在图像到图像任务中使用 KSampler,通过连接一个模型、一个正面和负面嵌入以及一个潜像。注意,我们使用的去噪值小于1.0。这样,在对原始图像进行加噪时,原始图像的部分内容得以保留,指导去噪过程生成相似的图像。 - - - - - - - -### KSampler 高级 - -![KSampler Advanced节点](./media/KSamplerADV.svg) - -KSampler Advanced节点是[KSampler](KSampler.md)节点的更高级版本。尽管KSampler节点总是向潜像中添加噪声,然后完全去除加噪后的潜像,但KSampler Advanced节点提供了额外的设置来控制这种行为。可以通过`add_noise`设置告诉KSampler Advanced节点不向潜像中添加噪声。它还可以通过`return_with_leftover_noise`设置返回部分去噪后的图像。与KSampler节点不同,此节点没有`denoise`设置,但这个过程是由`start_at_step`和`end_at_step`设置控制的。这使得例如将部分去噪的潜在图像交给另一个KSampler Advanced节点来完成过程成为可能。 - -!!! 提示 - - 假设`end_at_step >= steps`,KSampler Advanced节点将以与KSampler节点具有以下`denoise`设置的完全相同的方式去噪潜像: - - `denoise = (steps - start_at_step) / steps` - -## 输入 - -`Model` - -: 用于去噪的模型 - -`Positive` - -: 正面调节。 - -`Negative` - -: 负面调节。 - -`latent_image` - -: 将被去噪的潜像。 - -`add_noise` - -: 是否在去噪前向潜像中添加噪声。启用时,节点将为给定的起始步骤注入适当的噪声。 - -`seed` - -: 用于创建噪声的随机种子。 - -`control_after_generate` - -: 提供在每个提示后更改上述种子号的能力。节点可以`randomize`、`increment`、`decrement`或保持种子号`fixed`。 - -`steps` - -: 计划中的步骤数。允许采样器进行的步骤越多,结果就越准确。有关如何选择适当步骤数的好的指导方针,请参见[samplers](samplers.md)页面。 - -`cfg` - -: 无分类器指导(cfg)比例决定了采样器在实现提示内容到最终图像中应该有多积极。更高的比例迫使图像更好地代表提示,但设置过高的比例会对图像的质量产生负面影响。 - -`sampler_name` - -: 要使用的采样器,有关可用采样器的更多详细信息,请参见[samplers](samplers.md)页面。 - -`scheduler` - -: 要使用的计划类型,有关可用计划的更多详细信息,请参见[samplers](samplers.md)页面。 - -`start_at_step` - -: 确定在计划的哪一步开始去噪过程。 - -`end_at_step` - -: 确定在哪一步结束去噪。当此设置超过`steps`时,计划将在`steps`处结束 - -`return_with_leftover_noise` - -: 禁用时,KSampler Advanced将尝试在最后一步完全去除潜像中的噪声。根据此操作跳过计划中的多少步骤,输出可能不准确且质量较低。 - - -## 输出 - -`LATENT` - -: 去噪后的潜像。 - diff --git a/www/docs/posts/tutorial/core_nodes/media/ApplyControlNet.svg b/www/docs/posts/tutorial/core_nodes/media/ApplyControlNet.svg deleted file mode 100644 index 047c9dd..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ApplyControlNet.svg +++ /dev/null @@ -1 +0,0 @@ -Apply ControlNetconditioningcontrol_netimageCONDITIONINGstrength1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ApplyStyleModel.svg b/www/docs/posts/tutorial/core_nodes/media/ApplyStyleModel.svg deleted file mode 100644 index c501da8..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ApplyStyleModel.svg +++ /dev/null @@ -1 +0,0 @@ -Apply Style Modelconditioningstyle_modelclip_vision_outputCONDITIONING \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/CLIPSetLastLayer.svg b/www/docs/posts/tutorial/core_nodes/media/CLIPSetLastLayer.svg deleted file mode 100644 index 43cb962..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/CLIPSetLastLayer.svg +++ /dev/null @@ -1 +0,0 @@ -CLIP Set Last LayerclipCLIPstop_at_clip_layer-1 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/CLIPTextEncodePrompt.svg b/www/docs/posts/tutorial/core_nodes/media/CLIPTextEncodePrompt.svg deleted file mode 100644 index 1097c63..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/CLIPTextEncodePrompt.svg +++ /dev/null @@ -1 +0,0 @@ -CLIP Text Encode (Prompt)clipCONDITIONING \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/CLIPVisionEncode.svg b/www/docs/posts/tutorial/core_nodes/media/CLIPVisionEncode.svg deleted file mode 100644 index 6090baa..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/CLIPVisionEncode.svg +++ /dev/null @@ -1 +0,0 @@ -CLIP Vision Encodeclip_visionimageCLIP_VISION_OUTPUT \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ConditioningAverage.svg b/www/docs/posts/tutorial/core_nodes/media/ConditioningAverage.svg deleted file mode 100644 index 275bdcd..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ConditioningAverage.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Average)conditioning_toconditioning_fromCONDITIONINGconditioning_to_strength1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ConditioningCombine.svg b/www/docs/posts/tutorial/core_nodes/media/ConditioningCombine.svg deleted file mode 100644 index b3e0223..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ConditioningCombine.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Combine)conditioning_1conditioning_2CONDITIONING \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ConditioningSetArea.svg b/www/docs/posts/tutorial/core_nodes/media/ConditioningSetArea.svg deleted file mode 100644 index a8a45b7..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ConditioningSetArea.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Set Area)conditioningCONDITIONINGwidth64height64x0y0strength1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ConditioningSetMask.svg b/www/docs/posts/tutorial/core_nodes/media/ConditioningSetMask.svg deleted file mode 100644 index e20fafe..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ConditioningSetMask.svg +++ /dev/null @@ -1 +0,0 @@ -Conditioning (Set Mask)conditioningmaskCONDITIONINGstrength1.000set_cond_areadefault \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ConvertImageToMask.svg b/www/docs/posts/tutorial/core_nodes/media/ConvertImageToMask.svg deleted file mode 100644 index ab17828..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ConvertImageToMask.svg +++ /dev/null @@ -1 +0,0 @@ -Convert Image to MaskimageMASKchannelred \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ConvertMaskToImage.svg b/www/docs/posts/tutorial/core_nodes/media/ConvertMaskToImage.svg deleted file mode 100644 index a04521f..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ConvertMaskToImage.svg +++ /dev/null @@ -1 +0,0 @@ -Convert Mask to ImagemaskIMAGE \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/CropLatent.svg b/www/docs/posts/tutorial/core_nodes/media/CropLatent.svg deleted file mode 100644 index 1c13da4..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/CropLatent.svg +++ /dev/null @@ -1 +0,0 @@ -Crop LatentsamplesLATENTwidth512height512x0y0 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/CropMask.svg b/www/docs/posts/tutorial/core_nodes/media/CropMask.svg deleted file mode 100644 index 45a51fd..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/CropMask.svg +++ /dev/null @@ -1 +0,0 @@ -CropMaskmaskMASKx0y0width512height512 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/DiffusersLoader.svg b/www/docs/posts/tutorial/core_nodes/media/DiffusersLoader.svg deleted file mode 100644 index f19b31a..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/DiffusersLoader.svg +++ /dev/null @@ -1 +0,0 @@ -DiffusersLoaderMODELCLIPVAEmodel_pathundefined \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/EmptyLatentImage.svg b/www/docs/posts/tutorial/core_nodes/media/EmptyLatentImage.svg deleted file mode 100644 index 80a0679..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/EmptyLatentImage.svg +++ /dev/null @@ -1 +0,0 @@ -Empty Latent ImageLATENTwidth512height512batch_size1 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/FeatherMask.svg b/www/docs/posts/tutorial/core_nodes/media/FeatherMask.svg deleted file mode 100644 index 2976fae..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/FeatherMask.svg +++ /dev/null @@ -1 +0,0 @@ -FeatherMaskmaskMASKleft0top0right0bottom0 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/FlipLatent.svg b/www/docs/posts/tutorial/core_nodes/media/FlipLatent.svg deleted file mode 100644 index c1c253b..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/FlipLatent.svg +++ /dev/null @@ -1 +0,0 @@ -Flip LatentsamplesLATENTflip_methodx-axis: vertically \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/GLIGENLoader.svg b/www/docs/posts/tutorial/core_nodes/media/GLIGENLoader.svg deleted file mode 100644 index 2892998..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/GLIGENLoader.svg +++ /dev/null @@ -1 +0,0 @@ -GLIGENLoaderGLIGENgligen_namegligen_sd14_fp16.safetensors \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/GLIGENTextboxApply.svg b/www/docs/posts/tutorial/core_nodes/media/GLIGENTextboxApply.svg deleted file mode 100644 index c5b9794..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/GLIGENTextboxApply.svg +++ /dev/null @@ -1 +0,0 @@ -GLIGENTextBoxApplyconditioning_toclipgligen_textbox_modelCONDITIONINGwidth64height64x0y0 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/HypernetworkLoader.svg b/www/docs/posts/tutorial/core_nodes/media/HypernetworkLoader.svg deleted file mode 100644 index 869feff..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/HypernetworkLoader.svg +++ /dev/null @@ -1 +0,0 @@ -HypernetworkLoadermodelMODELhypernetwork_nameundefinedstrength1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ImageBlend.svg b/www/docs/posts/tutorial/core_nodes/media/ImageBlend.svg deleted file mode 100644 index 2a35115..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ImageBlend.svg +++ /dev/null @@ -1 +0,0 @@ -ImageBlendimage1image2IMAGEblend_factor0.500blend_modenormal \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ImageBlur.svg b/www/docs/posts/tutorial/core_nodes/media/ImageBlur.svg deleted file mode 100644 index 0da2335..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ImageBlur.svg +++ /dev/null @@ -1 +0,0 @@ -ImageBlurimageIMAGEblur_radius1sigma1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ImageQuantize.svg b/www/docs/posts/tutorial/core_nodes/media/ImageQuantize.svg deleted file mode 100644 index ca6dfad..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ImageQuantize.svg +++ /dev/null @@ -1 +0,0 @@ -ImageQuantizeimageIMAGEcolors256dithernone \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/ImageSharpen.svg b/www/docs/posts/tutorial/core_nodes/media/ImageSharpen.svg deleted file mode 100644 index 36331d3..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/ImageSharpen.svg +++ /dev/null @@ -1 +0,0 @@ -ImageSharpenimageIMAGEsharpen_radius1alpha1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/InvertImage.svg b/www/docs/posts/tutorial/core_nodes/media/InvertImage.svg deleted file mode 100644 index caa60a2..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/InvertImage.svg +++ /dev/null @@ -1 +0,0 @@ -Invert ImageimageIMAGE \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/InvertMask.svg b/www/docs/posts/tutorial/core_nodes/media/InvertMask.svg deleted file mode 100644 index 6fd5f54..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/InvertMask.svg +++ /dev/null @@ -1 +0,0 @@ -InvertMaskmaskMASK \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/KSampler.svg b/www/docs/posts/tutorial/core_nodes/media/KSampler.svg deleted file mode 100644 index e8123bf..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/KSampler.svg +++ /dev/null @@ -1 +0,0 @@ -KSamplermodelpositivenegativelatent_imageLATENTseed505447197457458control_after_generaterandomizesteps20cfg8.000sampler_nameeulerschedulernormaldenoise1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/KSamplerADV.svg b/www/docs/posts/tutorial/core_nodes/media/KSamplerADV.svg deleted file mode 100644 index 7cb1f1f..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/KSamplerADV.svg +++ /dev/null @@ -1 +0,0 @@ -KSampler (Advanced)modelpositivenegativelatent_imageLATENTadd_noiseenablenoise_seed0control_after_generaterandomizesteps20cfg8.000sampler_nameeulerschedulernormalstart_at_step0end_at_step10000return_with_leftover_noisedisable \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LatentComposite.svg b/www/docs/posts/tutorial/core_nodes/media/LatentComposite.svg deleted file mode 100644 index 0084d61..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LatentComposite.svg +++ /dev/null @@ -1 +0,0 @@ -Latent Compositesamples_tosamples_fromLATENTx0y0feather0 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LatentCompositeMasked.svg b/www/docs/posts/tutorial/core_nodes/media/LatentCompositeMasked.svg deleted file mode 100644 index 4be1453..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LatentCompositeMasked.svg +++ /dev/null @@ -1 +0,0 @@ -LatentCompositeMaskeddestinationsourcemaskLATENTx0y0 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LatentFromBatch.svg b/www/docs/posts/tutorial/core_nodes/media/LatentFromBatch.svg deleted file mode 100644 index 84e2a3e..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LatentFromBatch.svg +++ /dev/null @@ -1 +0,0 @@ -Latent From BatchsamplesLATENTbatch_index0length1 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadCLIP.svg b/www/docs/posts/tutorial/core_nodes/media/LoadCLIP.svg deleted file mode 100644 index 7a31f73..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadCLIP.svg +++ /dev/null @@ -1 +0,0 @@ -Load CLIPCLIPclip_nameundefined \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadCLIPVision.svg b/www/docs/posts/tutorial/core_nodes/media/LoadCLIPVision.svg deleted file mode 100644 index d0d7331..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadCLIPVision.svg +++ /dev/null @@ -1 +0,0 @@ -Load CLIP VisionCLIP_VISIONclip_nameundefined \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadCheckpoint.svg b/www/docs/posts/tutorial/core_nodes/media/LoadCheckpoint.svg deleted file mode 100644 index 7f6c9af..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadCheckpoint.svg +++ /dev/null @@ -1 +0,0 @@ -Load CheckpointMODELCLIPVAEckpt_nameanythingV3_fp16.ckpt \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadCheckpointWithConfig.svg b/www/docs/posts/tutorial/core_nodes/media/LoadCheckpointWithConfig.svg deleted file mode 100644 index 07754d3..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadCheckpointWithConfig.svg +++ /dev/null @@ -1 +0,0 @@ -Load Checkpoint (With Config)MODELCLIPVAEconfig_nameanything_v3.yamlckpt_nameanythingV3_fp16.ckpt \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadControlNet.svg b/www/docs/posts/tutorial/core_nodes/media/LoadControlNet.svg deleted file mode 100644 index 7833012..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadControlNet.svg +++ /dev/null @@ -1 +0,0 @@ -Load ControlNet ModelCONTROL_NETcontrol_net_namehed.safetensors \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadImage.svg b/www/docs/posts/tutorial/core_nodes/media/LoadImage.svg deleted file mode 100644 index 09d1ee9..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadImage.svg +++ /dev/null @@ -1 +0,0 @@ -Load ImageIMAGEMASKimageComfyUI_00624_.pngchoose file to upload \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadImageAsMask.svg b/www/docs/posts/tutorial/core_nodes/media/LoadImageAsMask.svg deleted file mode 100644 index 0a17f68..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadImageAsMask.svg +++ /dev/null @@ -1 +0,0 @@ -Load Image (as Mask)MASKimageComfyUI_00624_.pngchannelalphachoose file to upload \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadLatent.svg b/www/docs/posts/tutorial/core_nodes/media/LoadLatent.svg deleted file mode 100644 index f9667d6..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadLatent.svg +++ /dev/null @@ -1 +0,0 @@ -LoadLatentLATENTlatentundefined \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadLoRA.svg b/www/docs/posts/tutorial/core_nodes/media/LoadLoRA.svg deleted file mode 100644 index e33042a..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadLoRA.svg +++ /dev/null @@ -1 +0,0 @@ -Load LoRAmodelclipMODELCLIPlora_namestyle_icons.safetensorsstrength_model1.000strength_clip1.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadStyleModel.svg b/www/docs/posts/tutorial/core_nodes/media/LoadStyleModel.svg deleted file mode 100644 index fe6fcab..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadStyleModel.svg +++ /dev/null @@ -1 +0,0 @@ -Load Style ModelSTYLE_MODELstyle_model_nameundefined \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadUpscaleModel.svg b/www/docs/posts/tutorial/core_nodes/media/LoadUpscaleModel.svg deleted file mode 100644 index bb65104..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadUpscaleModel.svg +++ /dev/null @@ -1 +0,0 @@ -Load Upscale ModelUPSCALE_MODELmodel_nameESRGAN_4x.pth \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/LoadVAE.svg b/www/docs/posts/tutorial/core_nodes/media/LoadVAE.svg deleted file mode 100644 index 15ca334..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/LoadVAE.svg +++ /dev/null @@ -1 +0,0 @@ -Load VAEVAEvae_nameAnything-V3.0.vae.pt \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/MaskComposite.svg b/www/docs/posts/tutorial/core_nodes/media/MaskComposite.svg deleted file mode 100644 index 6428b10..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/MaskComposite.svg +++ /dev/null @@ -1 +0,0 @@ -MaskCompositedestinationsourceMASKx0y0operationmultiply \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/PadImageForOutpainting.svg b/www/docs/posts/tutorial/core_nodes/media/PadImageForOutpainting.svg deleted file mode 100644 index 0524817..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/PadImageForOutpainting.svg +++ /dev/null @@ -1 +0,0 @@ -Pad Image for OutpaintingimageIMAGEMASKleft0top0right0bottom0feathering40 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/PreviewImage.svg b/www/docs/posts/tutorial/core_nodes/media/PreviewImage.svg deleted file mode 100644 index ca817d4..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/PreviewImage.svg +++ /dev/null @@ -1 +0,0 @@ -Preview Imageimages \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/RebatchLatents.svg b/www/docs/posts/tutorial/core_nodes/media/RebatchLatents.svg deleted file mode 100644 index d29f961..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/RebatchLatents.svg +++ /dev/null @@ -1 +0,0 @@ -Rebatch LatentslatentsLATENTbatch_size1 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/RepeatLatentBatch.svg b/www/docs/posts/tutorial/core_nodes/media/RepeatLatentBatch.svg deleted file mode 100644 index 7ca6028..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/RepeatLatentBatch.svg +++ /dev/null @@ -1 +0,0 @@ -Repeat Latent BatchsamplesLATENTamount1 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/RotateLatent.svg b/www/docs/posts/tutorial/core_nodes/media/RotateLatent.svg deleted file mode 100644 index cb65057..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/RotateLatent.svg +++ /dev/null @@ -1 +0,0 @@ -Rotate LatentsamplesLATENTrotationnone \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/SaveImage.svg b/www/docs/posts/tutorial/core_nodes/media/SaveImage.svg deleted file mode 100644 index 70f6e73..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/SaveImage.svg +++ /dev/null @@ -1 +0,0 @@ -Save Imageimagesfilename_prefixComfyUI \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/SaveLatent.svg b/www/docs/posts/tutorial/core_nodes/media/SaveLatent.svg deleted file mode 100644 index 89b04f5..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/SaveLatent.svg +++ /dev/null @@ -1 +0,0 @@ -SaveLatentsamplesfilename_prefixlatents/ComfyUI \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/SetLatentNoiseMask.svg b/www/docs/posts/tutorial/core_nodes/media/SetLatentNoiseMask.svg deleted file mode 100644 index 947ae20..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/SetLatentNoiseMask.svg +++ /dev/null @@ -1 +0,0 @@ -Set Latent Noise MasksamplesmaskLATENT \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/SolidMask.svg b/www/docs/posts/tutorial/core_nodes/media/SolidMask.svg deleted file mode 100644 index 097f399..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/SolidMask.svg +++ /dev/null @@ -1 +0,0 @@ -SolidMaskMASKvalue1.000width512height512 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/TokenMergingforStableDiffusion.jpg b/www/docs/posts/tutorial/core_nodes/media/TokenMergingforStableDiffusion.jpg deleted file mode 100644 index d8166b0..0000000 Binary files a/www/docs/posts/tutorial/core_nodes/media/TokenMergingforStableDiffusion.jpg and /dev/null differ diff --git a/www/docs/posts/tutorial/core_nodes/media/TomePatchModel.svg b/www/docs/posts/tutorial/core_nodes/media/TomePatchModel.svg deleted file mode 100644 index 19aec4e..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/TomePatchModel.svg +++ /dev/null @@ -1 +0,0 @@ -TomePatchModelmodelMODELratio0.300 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/UpscaleImage.svg b/www/docs/posts/tutorial/core_nodes/media/UpscaleImage.svg deleted file mode 100644 index 8dbdf1d..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/UpscaleImage.svg +++ /dev/null @@ -1 +0,0 @@ -Upscale ImageimageIMAGEupscale_methodnearest-exactwidth512height512cropdisabled \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/UpscaleImageUsingModel.svg b/www/docs/posts/tutorial/core_nodes/media/UpscaleImageUsingModel.svg deleted file mode 100644 index d074eb8..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/UpscaleImageUsingModel.svg +++ /dev/null @@ -1 +0,0 @@ -Upscale Image (using Model)upscale_modelimageIMAGE \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/UpscaleLatent.svg b/www/docs/posts/tutorial/core_nodes/media/UpscaleLatent.svg deleted file mode 100644 index 5deec0c..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/UpscaleLatent.svg +++ /dev/null @@ -1 +0,0 @@ -Upscale LatentsamplesLATENTupscale_methodnearest-exactwidth512height512cropdisabled \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/VAEDecode.svg b/www/docs/posts/tutorial/core_nodes/media/VAEDecode.svg deleted file mode 100644 index a0dd8ad..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/VAEDecode.svg +++ /dev/null @@ -1 +0,0 @@ -VAE DecodesamplesvaeIMAGE \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/VAEDecodeTiled.svg b/www/docs/posts/tutorial/core_nodes/media/VAEDecodeTiled.svg deleted file mode 100644 index c816397..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/VAEDecodeTiled.svg +++ /dev/null @@ -1 +0,0 @@ -VAE Decode (Tiled)samplesvaeIMAGE \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/VAEEncode.svg b/www/docs/posts/tutorial/core_nodes/media/VAEEncode.svg deleted file mode 100644 index 4e471a6..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/VAEEncode.svg +++ /dev/null @@ -1 +0,0 @@ -VAE EncodepixelsvaeLATENT \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/VAEEncodeForInpainting.svg b/www/docs/posts/tutorial/core_nodes/media/VAEEncodeForInpainting.svg deleted file mode 100644 index c7c9640..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/VAEEncodeForInpainting.svg +++ /dev/null @@ -1 +0,0 @@ -VAE Encode (for Inpainting)pixelsvaemaskLATENTgrow_mask_by6 \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/VAEEncodeTiled.svg b/www/docs/posts/tutorial/core_nodes/media/VAEEncodeTiled.svg deleted file mode 100644 index 2df29a4..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/VAEEncodeTiled.svg +++ /dev/null @@ -1 +0,0 @@ -VAE Encode (Tiled)pixelsvaeLATENT \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/img2imgExample.png b/www/docs/posts/tutorial/core_nodes/media/img2imgExample.png deleted file mode 100644 index 8fc55bf..0000000 Binary files a/www/docs/posts/tutorial/core_nodes/media/img2imgExample.png and /dev/null differ diff --git a/www/docs/posts/tutorial/core_nodes/media/unCLIPCheckpointLoader.svg b/www/docs/posts/tutorial/core_nodes/media/unCLIPCheckpointLoader.svg deleted file mode 100644 index ea8d4ca..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/unCLIPCheckpointLoader.svg +++ /dev/null @@ -1 +0,0 @@ -unCLIPCheckpointLoaderMODELCLIPVAECLIP_VISIONckpt_namesd21-unclip-l.ckpt \ No newline at end of file diff --git a/www/docs/posts/tutorial/core_nodes/media/unCLIPConditioning.svg b/www/docs/posts/tutorial/core_nodes/media/unCLIPConditioning.svg deleted file mode 100644 index e4a820a..0000000 --- a/www/docs/posts/tutorial/core_nodes/media/unCLIPConditioning.svg +++ /dev/null @@ -1 +0,0 @@ -unCLIPConditioningconditioningclip_vision_outputCONDITIONINGstrength1.000noise_augmentation0.000 \ No newline at end of file diff --git a/www/docs/posts/tutorial/custom_nodes/index.md b/www/docs/posts/tutorial/custom_nodes/index.md deleted file mode 100644 index 397b548..0000000 --- a/www/docs/posts/tutorial/custom_nodes/index.md +++ /dev/null @@ -1,67 +0,0 @@ -# 常用的自定义节点 - -controlnet 预处理器 comfyui_controlnet_aux 、 ComfyUI-Advanced-ControlNet、ComfyUI_IPAdapter_plus 等 - -## ComfyUI_IPAdapter_plus - -模型下载: - -在`extra_model_paths.yaml`文件中记得配置 `ipadapter` 模型的地址 - -### 视觉编码器 - -下载后记得重命名,存放地址:`/ComfyUI/models/clip_vision` - -- [CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors) -- [CLIP-ViT-bigG-14-laion2B-39B-b160k.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/image_encoder/model.safetensors) - -### IPA 模型 - -存放地址 `/ComfyUI/models/ipadapter` - -#### sd15 版本: - -- 基础版本 [ip-adapter_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors) - -- light 版本,轻影响 [ip-adapter_sd15_light_v11.bin](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_light_v11.bin) - -- plus 版本,高强度 [ip-adapter-plus_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus_sd15.safetensors) - -- plus 版本,面部增强,适用于肖像 [ip-adapter-plus-face_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus-face_sd15.safetensors) - -- full 版本,更强的面部模型 [ip-adapter-full-face_sd15.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-full-face_sd15.safetensors) - -- vit-G 基础模型, **bigG clip vision encoder** [ip-adapter_sd15_vit-G.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_vit-G.safetensors) - -#### SDXL 版本: - -- vit-h 基础版本 [ip-adapter_sdxl_vit-h.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors) - -- plus 版本 [ip-adapter-plus_sdxl_vit-h.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors) - -- plus 版本,面部模型 [ip-adapter-plus-face_sdxl_vit-h.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors) - -- vit-G SDXL 模型 **bigG clip vision encoder** [ip-adapter_sdxl.safetensors](https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl.safetensors) - -#### FaceID 模型 -FaceID 模型需要 `insightface`, 记得此依赖安装正常,[如果有问题可以查看](https://github.com/cubiq/ComfyUI_IPAdapter_plus/issues/162) - -##### SD15 - - - 基础款 [ip-adapter-faceid_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15.bin) - - FaceID plus v2 [ip-adapter-faceid-plusv2_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15.bin), - - 肖像画的文本提示风格转换 [ip-adapter-faceid-portrait-v11_sd15.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait-v11_sd15.bin) - - SDXL 基础款 [ip-adapter-faceid_sdxl.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl.bin) - - SDXL plus v2 [ip-adapter-faceid-plusv2_sdxl.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl.bin) - - SDXL 肖像画的文本提示风格转换 [ip-adapter-faceid-portrait_sdxl.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl.bin) - - 非常强的 SDXL 风格转换 [ip-adapter-faceid-portrait_sdxl_unnorm.bin](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-portrait_sdxl_unnorm.bin) - -Most FaceID models require a LoRA. If you use the `IPAdapter Unified Loader FaceID` it will be loaded automatically if you follow the naming convention. Otherwise you have to load them manually, be careful each FaceID model has to be paired with its own specific LoRA. - -- `/ComfyUI/models/loras` - - [ip-adapter-faceid_sd15_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sd15_lora.safetensors) - - [ip-adapter-faceid-plusv2_sd15_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sd15_lora.safetensors) - - [ip-adapter-faceid_sdxl_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid_sdxl_lora.safetensors), SDXL FaceID LoRA - - [ip-adapter-faceid-plusv2_sdxl_lora.safetensors](https://huggingface.co/h94/IP-Adapter-FaceID/resolve/main/ip-adapter-faceid-plusv2_sdxl_lora.safetensors), SDXL plus v2 LoRA - -All models can be found on [huggingface](https://huggingface.co/h94). diff --git a/www/docs/posts/tutorial/interface/index.md b/www/docs/posts/tutorial/interface/index.md deleted file mode 100644 index 66fde53..0000000 --- a/www/docs/posts/tutorial/interface/index.md +++ /dev/null @@ -1,94 +0,0 @@ -# ComfyUI interface stuff - -## Textprompts 文本提示 - -ComfyUI 提供了多种方式来微调您的提示,以更好地反映您的意图。 - -### 提高和降低权重 - -通过使用以下语法将提示的指定部分括在括号中,可以提高或降低提示部分的重要性:`(prompt:weight)`。例如,如果我们有一个提示 `flowers inside a blue vase`,并且我们希望扩散模型强调花卉,我们可以尝试将我们的提示改写为:`(flowers:1.2) inside a blue vase`。嵌套循环会相乘它们内部的权重,例如在提示 `((flowers:1.2):.5) inside a blue vase` 中,花朵最终获得 0.6 的权重。仅使用括号而不指定权重是 `(prompt:1.1)` 的简写,例如 `(flower)` 等于 `(flower:1.1)`。要在提示中使用括号,它们必须被转义,例如 `\(1990\)`。ComfyUI 也可以通过快捷键 *ctrl+arrow-up* 和 *ctrl+arrow-down* 为提示的选定部分添加适当的加权语法。这些快捷方式提高或降低权重的量可以在设置中调整。 - -### 使用文本反转嵌入 - -文本反转是定制的 CLIP 嵌入,体现了某些概念。可以通过使用以下语法在提示中引用文本反转:`embedding:name`,其中 name 是嵌入文件的名称。 - -### 添加随机选择 - -可以让 ComfyUI 在排队时使用以下语法随机选择提示的某些部分:`{choice1|choice2|...}`。例如,如果我们想让 ComfyUI 随机选择一组颜色中的一种,我们可以在我们的提示中添加以下内容:`{red|blue|yellow|green}`。 - -## UtilityNodes 实用节点 - -ComfyUI 附带了一组节点,帮助管理图形。 - -### Reroute 重新路由 - -![Reroute 重新路由节点](media/Reroute.svg) - -重新路由节点可用于重新路由链接,这对于组织您的工作流程很有用。 - -重新路由节点上的输入和输出也可以垂直放置 - -### Primitive 原始 - -![Primitive 原始节点](media/Primitive.svg) - -原始节点可以用于... - -## NodeOptions - -## SaveFileFormatting 保存文件格式 - -跟踪你生成的所有图片可能会很困难。为了帮助组织您的图像,您可以向带有 `file_prefix` 小部件的输出节点传递特殊格式的字符串。 - -### 查找和替换字符串 - -为了自动将某些节点小部件的值插入到文件名中,可以使用以下语法:`%node_name.widget_name%`。例如,如果我们希望基于每个分辨率存储图像,我们可以向节点提供以下字符串:`%Empty Latent Image.width%x%Empty Latent Image.height%/image`。这些字符串将被指定的节点值替换。 - -### 重命名节点以进行搜索和替换 - -有时,节点名称可能相当大,或者多个节点可能共享相同的名称。在这些情况下,可以在节点选项菜单下的 `properties>Node name for S&R` 中指定一个特定的名称。 - -![保存图像节点](media/SR.png) - -## 日期时间字符串 - -ComfyUI 也可以插入日期信息,格式为 `%date:FORMAT%`,其中格式识别以下说明符: - -| 说明符 | 描述 | -| -------------- | ---- | -| `d` 或 `dd` | 日 | -| `M` 或 `MM` | 月 | -| `yy` 或 `yyyy` | 年 | -| `h` 或 `hh` | 小时 | -| `m` 或 `mm` | 分钟 | -| `s` 或 `ss` | 秒 | - -## 快捷键 - -ComfyUI 提供了以下快捷键,您可以使用它们来加快工作流程: - -| 快捷键 | 说明 | -| -------------------- | -------------------------------- | -| *ctrl+enter* | 将当前图形排入生成队列 | -| *ctrl+shift+enter* | 将当前图形作为第一个排入生成队列 | -| *ctrl+s* | 保存工作流 | -| *ctrl+o* | 载入工作流 | -| *ctrl+a* | 选择所有节点 | -| *ctrl+m* | 静音/取消静音所选节点 | -| *delete* | 删除所选节点 | -| *backspace* | 删除所选节点 | -| *ctrl+delete* | 删除当前图形 | -| *ctrl+backspace* | 删除当前图形 | -| *space* | 按住并移动光标时移动画布 | -| *ctrl+lbutton* | 将点击的节点添加到选择 | -| *shift+lbutton* | 将点击的节点添加到选择 | -| *ctrl+c* | 复制所选节点 | -| *ctrl+v* | 粘贴所选节点同时断开连接 | -| *ctrl+shift+v* | 粘贴所选节点同时保持传入连接 | -| *shift+lbutton* | 按住并拖动以同时移动多个所选节点 | -| *ctrl+d* | 载入默认图形 | -| *q* | 切换队列的可见性 | -| *h* | 切换历史记录的可见性 | -| *r* | 刷新图形 | -| 2 X *lbutton* | 双击打开节点快速搜索调色板 | -| *rbutton* | 打开节点菜单 | diff --git a/www/docs/posts/tutorial/interface/media/Primitive.svg b/www/docs/posts/tutorial/interface/media/Primitive.svg deleted file mode 100644 index 99bb2d9..0000000 --- a/www/docs/posts/tutorial/interface/media/Primitive.svg +++ /dev/null @@ -1 +0,0 @@ -Primitiveconnect to widget input \ No newline at end of file diff --git a/www/docs/posts/tutorial/interface/media/Reroute.svg b/www/docs/posts/tutorial/interface/media/Reroute.svg deleted file mode 100644 index 03e5622..0000000 --- a/www/docs/posts/tutorial/interface/media/Reroute.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/www/docs/posts/tutorial/interface/media/SR.png b/www/docs/posts/tutorial/interface/media/SR.png deleted file mode 100644 index 9484e57..0000000 Binary files a/www/docs/posts/tutorial/interface/media/SR.png and /dev/null differ diff --git a/www/docs/posts/tutorial/start/index.md b/www/docs/posts/tutorial/start/index.md deleted file mode 100644 index d762132..0000000 --- a/www/docs/posts/tutorial/start/index.md +++ /dev/null @@ -1,73 +0,0 @@ ---- ---- - -# 教程 - -> ComfyUI 是一个强大且模块化的稳定扩散 GUI 和后端。我们基于[ComfyUI 官方仓库](https://github.com/comfyanonymous/ComfyUI) ,专门针对中文用户,做了优化和文档的细节补充。 - -本教程的目标是帮助您快速上手 ComfyUI,运行您的第一个工作流,并为探索下一步提供一些参考指南。 - -## 安装 - -安装方式,推荐使用官方的 [Window-Nvidia 显卡-免安装包](https://github.com/comfyanonymous/ComfyUI/releases/download/latest/ComfyUI_windows_portable_nvidia_cu121_or_cpu.7z) ,也可以从 [百度网盘](链接:https://pan.baidu.com/s/14hmH-NA_d5lObYNQAehKTQ?pwd=MAI0) 下载 - -如果你是 Mac 或者 Linux 系统,请参考 GitHub 上的[安装说明](https://github.com/comfyanonymous/ComfyUI#installing)。 - -### 什么是 stable diffusion? - -Stable Diffusion,中文一般称为稳定扩散,是 2022 年发布的深度学习生成模型,它可以根据文本的描述产生详细的图像。Stable Diffusion 通过一个复杂的概率扩散过程,逐步将原始图像转换为具有特定特征的图像,实现图像生成。 - -![stable diffusion](./media/8047d707bb3ab08f774bc4c2f4b44484.png) - -### 下载模型 - -如果您完全不了解任何与稳定扩散相关的内容,您要做的第一件事就是获取一个模型*checkpoints*,您将用它来生成图像。 - -您可以在[CivitAI](https://civitai.com/) 或 [HuggingFace](https://huggingface.co/models?other=stable-diffusion) 等网站上找到多种模型。首先,获取您喜欢的模型*checkpoints*,并将其放置在`ComfyUI/models/checkpoints`中。 - -## 启动 ComfyUI - -双击*run_nvidia_gpu.bat* 启动 ComfyUI。 - -启动后,你将看到 ComfyUI 的提示: - -![](./media/http.png) - -请在浏览器里访问 [http://127.0.0.1:8188](http://127.0.0.1:8188) 访问 - -### Comfy 的第一步 - -此时,您应该已经在浏览器标签中启动并运行了 ComfyUI。第一次使用,ComfyUI 加载的是一个默认的工作流。这是一个最基础的 text-to-image 的工作流。 - -您可以拖动画布,或者按住空格键并移动鼠标。可以通过鼠标滚动来缩放。 - -如果您弄乱了什么,只需在右边的菜单中点击`Load Default`将其重置为初始状态。 - -![ComfyUI默认工作流](./media/default_workflow.svg) - -在我们运行工作流之前,让我们进行一个小修改,以预览生成的图像而不保存它们: - -1. 右键单击`Save Image`节点,然后选择`Remove`。 -1. 双击画布的空白部分,输入`preview`,然后单击`PreviewImage`选项。 -1. 找到`VAE Decode`节点的`IMAGE`输出,并将其连接到您刚添加的`Preview Image`节点的`images`输入。 - -此修改将预览您的结果,而不会将结果保存到*output*文件夹里。 - -通过在菜单中点击`Queue Prompt`或在键盘上按*command+enter* 或 *control+enter*来创建您的第一张图片,就是这样! - -## 尝试其他工作流 - -为了便于分享,ComfyUI 默认将工作流的详细信息存储在生成的 PNG 中。要加载生成图像的工作流,只需通过菜单中的`Load`按钮加载图像(或者是 JSON 文件),或将其拖放到 ComfyUI 窗口中。ComfyUI 将自动解析工作流的详细信息并加载所有相关节点及其设置。 - -在那里可以获得更多的工作流?可以访问[ComfyUI 的官方示例工作流](https://comfyanonymous.github.io/ComfyUI_examples/) - -## 进一步的支持 - -欢迎申请加入[ComfyUI 中文社区](https://docs.qq.com/form/page/DU2pRVE5OUmZ6amNj) - -访问由 Mixlab Nodes 维护的[discord 交流频道](https://discord.gg/cXs9vZSqeK) - - -### 参考资料: -[本地安装保姆级安装教程](https://ywukcp2ygto.feishu.cn/wiki/CULYw35eEiZVxQkdkQec91HmnGh?from=from_copylink) -[云端安装教程](https://ywukcp2ygto.feishu.cn/wiki/YLlxw3E8fiKs6ek9vbKc2LRQnqo?from=from_copylink) \ No newline at end of file diff --git a/www/docs/posts/tutorial/start/media/8047d707bb3ab08f774bc4c2f4b44484.png b/www/docs/posts/tutorial/start/media/8047d707bb3ab08f774bc4c2f4b44484.png deleted file mode 100644 index 1b6ac60..0000000 Binary files a/www/docs/posts/tutorial/start/media/8047d707bb3ab08f774bc4c2f4b44484.png and /dev/null differ diff --git a/www/docs/posts/tutorial/start/media/default_workflow.svg b/www/docs/posts/tutorial/start/media/default_workflow.svg deleted file mode 100644 index 4ee3f22..0000000 --- a/www/docs/posts/tutorial/start/media/default_workflow.svg +++ /dev/null @@ -1 +0,0 @@ -T: 0.00sI: 0N: 7 [7]V: 20FPS:58.82CLIP Text Encode (Prompt)clipCONDITIONINGtext, watermark CLIP Text Encode (Prompt)clipCONDITIONINGbeautiful scenery nature glass bottle landscape, , purple galaxy bottle, Empty Latent ImageLATENTwidth512height512batch_size1KSamplermodelpositivenegativelatent_imageLATENTseed156680208700286control_after_generaterandomizesteps20cfg8.000sampler_nameeulerschedulernormaldenoise1.000Load CheckpointMODELCLIPVAEckpt_name526Mix_v145.safetensorsPreview ImageimagesVAE DecodesamplesvaeIMAGE{"last_node_id":10,"last_link_id":10,"nodes":[{"id":7,"type":"CLIPTextEncode","pos":[413,389],"size":{"0":425.27801513671875,"1":180.6060791015625},"flags":{},"order":3,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["text, watermark"]},{"id":6,"type":"CLIPTextEncode","pos":[415,186],"size":{"0":422.84503173828125,"1":164.31304931640625},"flags":{},"order":2,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"]},{"id":5,"type":"EmptyLatentImage","pos":[473,609],"size":{"0":315,"1":106},"flags":{},"order":0,"mode":0,"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"properties":{"Node name for S&R":"EmptyLatentImage"},"widgets_values":[512,512,1]},{"id":3,"type":"KSampler","pos":[863,186],"size":{"0":315,"1":262},"flags":{},"order":4,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[156680208700286,"randomize",20,8,"euler","normal",1]},{"id":4,"type":"CheckpointLoaderSimple","pos":[26,474],"size":{"0":315,"1":98},"flags":{},"order":1,"mode":0,"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"properties":{"Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["526Mix_v145.safetensors"]},{"id":10,"type":"PreviewImage","pos":[1457,193],"size":{"0":210,"1":26},"flags":{},"order":6,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":10}],"properties":{"Node name for S&R":"PreviewImage"}},{"id":8,"type":"VAEDecode","pos":[1209,188],"size":{"0":210,"1":46},"flags":{},"order":5,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[10],"slot_index":0}],"properties":{"Node name for S&R":"VAEDecode"}}],"links":[[1,4,0,3,0,"MODEL"],[2,5,0,3,3,"LATENT"],[3,4,1,6,0,"CLIP"],[4,6,0,3,1,"CONDITIONING"],[5,4,1,7,0,"CLIP"],[6,7,0,3,2,"CONDITIONING"],[7,3,0,8,0,"LATENT"],[8,4,2,8,1,"VAE"],[10,8,0,10,0,"IMAGE"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file diff --git a/www/docs/posts/tutorial/start/media/http.png b/www/docs/posts/tutorial/start/media/http.png deleted file mode 100644 index cc2379a..0000000 Binary files a/www/docs/posts/tutorial/start/media/http.png and /dev/null differ diff --git a/www/install.bat b/www/install.bat deleted file mode 100644 index 8df1e26..0000000 --- a/www/install.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -npm install \ No newline at end of file diff --git a/www/package-lock.json b/www/package-lock.json deleted file mode 100644 index bef8002..0000000 --- a/www/package-lock.json +++ /dev/null @@ -1,4359 +0,0 @@ -{ - "name": "opendesign", - "version": "0.1.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "opendesign", - "version": "0.1.1", - "license": "MIT", - "dependencies": { - "@vuepress/client": "^2.0.0-rc.9" - }, - "devDependencies": { - "@vuepress/bundler-vite": "^2.0.0-rc.7", - "@vuepress/plugin-blog": "^2.0.0-rc.11", - "@vuepress/plugin-catalog": "next", - "@vuepress/plugin-container": "^2.0.0-rc.0", - "@vuepress/plugin-google-analytics": "^2.0.0-rc.21", - "@vuepress/plugin-search": "next", - "@vuepress/plugin-seo": "next", - "@vuepress/plugin-sitemap": "next", - "@vuepress/theme-default": "^2.0.0-rc.11", - "vue": "^3.4.0", - "vue-social-sharing": "^4.0.0-alpha4", - "vuepress": "^2.0.0-rc.9", - "vuepress-plugin-md-enhance": "^2.0.0-rc.33", - "vuepress-plugin-search-pro": "^2.0.0-rc.39" - } - }, - "node_modules/@babel/parser": { - "version": "7.24.6", - "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.24.6.tgz", - "integrity": "sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==", - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", - "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz", - "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz", - "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz", - "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz", - "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz", - "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz", - "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz", - "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz", - "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz", - "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz", - "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz", - "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz", - "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz", - "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz", - "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz", - "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz", - "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz", - "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz", - "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz", - "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz", - "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz", - "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz", - "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" - }, - "node_modules/@mdit-vue/plugin-component": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-component/-/plugin-component-2.1.3.tgz", - "integrity": "sha512-9AG17beCgpEw/4ldo/M6Y/1Rh4E1bqMmr/rCkWKmCAxy9tJz3lzY7HQJanyHMJufwsb3WL5Lp7Om/aPcQTZ9SA==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/plugin-frontmatter": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-frontmatter/-/plugin-frontmatter-2.1.3.tgz", - "integrity": "sha512-KxsSCUVBEmn6sJcchSTiI5v9bWaoRxe68RBYRDGcSEY1GTnfQ5gQPMIsM48P4q1luLEIWurVGGrRu7u93//LDQ==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "2.1.0", - "@types/markdown-it": "^14.1.1", - "gray-matter": "^4.0.3", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/plugin-headers": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-headers/-/plugin-headers-2.1.3.tgz", - "integrity": "sha512-AcL7a7LHQR3ISINhfjGJNE/bHyM0dcl6MYm1Sr//zF7ZgokPGwD/HhD7TzwmrKA9YNYCcO9P3QmF/RN9XyA6CA==", - "dev": true, - "dependencies": { - "@mdit-vue/shared": "2.1.3", - "@mdit-vue/types": "2.1.0", - "@types/markdown-it": "^14.1.1", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/plugin-sfc": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-sfc/-/plugin-sfc-2.1.3.tgz", - "integrity": "sha512-Ezl0dNvQNS639Yl4siXm+cnWtQvlqHrg+u+lnau/OHpj9Xh3LVap/BSQVugKIV37eR13jXXYf3VaAOP1fXPN+w==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "2.1.0", - "@types/markdown-it": "^14.1.1", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/plugin-title": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-title/-/plugin-title-2.1.3.tgz", - "integrity": "sha512-XWVOQoZqczoN97xCDrnQicmXKoqwOjIymIm9HQnRXhHnYKOgJPW1CxSGhkcOGzvDU1v0mD/adojVyyj/s6ggWw==", - "dev": true, - "dependencies": { - "@mdit-vue/shared": "2.1.3", - "@mdit-vue/types": "2.1.0", - "@types/markdown-it": "^14.1.1", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/plugin-toc": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-toc/-/plugin-toc-2.1.3.tgz", - "integrity": "sha512-41Q+iXpLHZt0zJdApVwoVt7WF6za/xUjtjEPf90Z3KLzQO01TXsv48Xp9BsrFHPcPcm8tiZ0+O1/ICJO80V/MQ==", - "dev": true, - "dependencies": { - "@mdit-vue/shared": "2.1.3", - "@mdit-vue/types": "2.1.0", - "@types/markdown-it": "^14.1.1", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/shared": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/@mdit-vue/shared/-/shared-2.1.3.tgz", - "integrity": "sha512-27YI8b0VVZsAlNwaWoaOCWbr4eL8B04HxiYk/y2ktblO/nMcOEOLt4p0RjuobvdyUyjHvGOS09RKhq7qHm1CHQ==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "2.1.0", - "@types/markdown-it": "^14.1.1", - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit-vue/types": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/types/-/types-2.1.0.tgz", - "integrity": "sha512-TMBB/BQWVvwtpBdWD75rkZx4ZphQ6MN0O4QB2Bc0oI5PC2uE57QerhNxdRZ7cvBHE2iY2C+BUNUziCfJbjIRRA==" - }, - "node_modules/@mdit/plugin-alert": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-alert/-/plugin-alert-0.12.0.tgz", - "integrity": "sha512-4OyGK1PZrJbmEF/kS6GKmmG1nlN5h/CyIPZV8lRgnlWLFB37JiEz3EHusPAXAoMtw7VGNFaIcl7OT/I5yyz1JQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-align": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-align/-/plugin-align-0.12.0.tgz", - "integrity": "sha512-rvA+xzaVrlsr44s7XD/xadO3lF0QYWCbeSrOS2dhOroNCIOy4RotVP/1tQPr84eqm4oXcxXF0cbjFuwUgE1jYw==", - "dev": true, - "dependencies": { - "@mdit/plugin-container": "0.12.0", - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-attrs": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-attrs/-/plugin-attrs-0.12.0.tgz", - "integrity": "sha512-J0MBwBq958lBtdIcEo02mUIO4ubl2YK+bY799T2SusrLTf3FZsq8+d/OiLTUtovfxaphD7F6yqo8M61AiOpq+w==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-container": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-container/-/plugin-container-0.12.0.tgz", - "integrity": "sha512-61bWK1ek6Rn4o12/BIKTWgGU0miB9ENcXE19H5D4DRhwG5+4+0zp2U6hRLf/mE73+mRYin7iKVzcwwEsqs+u8w==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-demo": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-demo/-/plugin-demo-0.12.0.tgz", - "integrity": "sha512-+KDUOgcvnMtBN/uYWlhIFuWkTJexuxstq8ERy9q7vOiu8Go85qCb27h0RSToKBTmmGy+XqfU2EdJclYPWBupJQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-figure": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-figure/-/plugin-figure-0.12.0.tgz", - "integrity": "sha512-3nfcGI+uM0f6AqHZrEr8kSMBI6T2+fKKQXtCbvWQqQ+P3iGgf34Ay2eAtuMDcDGqyfNuR6e8aLoOeY2QWuEynA==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-footnote": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-footnote/-/plugin-footnote-0.12.0.tgz", - "integrity": "sha512-9B+bJdMndCPoA9De9bxRm4/fyz02PHRcttOyuyPJ3G+wCAgIN1c/7CB8ViT1YJuECUjLogJQ/rrgqh7f0LTqLQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - } - }, - "node_modules/@mdit/plugin-img-lazyload": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-img-lazyload/-/plugin-img-lazyload-0.12.0.tgz", - "integrity": "sha512-6R42ieXzwkB5BKKZi+ZefqeP/fBG5qo7Sqtl72ewSVqEQ30bgxpk6nkrPI2orRob4tb6z0F/c+R8h6PW5MkTOw==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-img-mark": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-img-mark/-/plugin-img-mark-0.12.0.tgz", - "integrity": "sha512-HkIUwlTg/xPsBi4PG+5dsMnsb7wdiJzELSCEUfdAJTg55nksonHfyV2pFpr87MML4nuZlZK9JHt+Bm2BBDSVSw==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-img-size": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-img-size/-/plugin-img-size-0.12.0.tgz", - "integrity": "sha512-fCcF5gc+ba6gQ5ebrKuI8bK/gFbj8mbeN45FHmBsFDFsfTHa0Xij2v8iok0nP8YEIVj71y8XYojsqCWs6avong==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-include": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-include/-/plugin-include-0.12.0.tgz", - "integrity": "sha512-8pnmp7s1TjbtoBIa/YhYpEivOpeVSyhkQoQrGq1UoaEcTbXqmFwShGkAW3zUYZVFYTl74PgL/UqJnrUojegJQg==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1", - "upath": "^2.0.1" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-katex-slim": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-katex-slim/-/plugin-katex-slim-0.12.0.tgz", - "integrity": "sha512-s2MJGXFZT7u8IUTmy6K1rxxAdYRmGggu0m860siyUrThL112xLN9r3jmXZ83epgi4UA/gLkRDAU5vF6R2JtyjQ==", - "dev": true, - "dependencies": { - "@mdit/plugin-tex": "0.12.0", - "@types/katex": "^0.16.7", - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "katex": "^0.16.9", - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "katex": { - "optional": true - }, - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-mark": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-mark/-/plugin-mark-0.12.0.tgz", - "integrity": "sha512-BDFwbV/tbgUGL8KF2ymYNLEXT2KNBLe8D0rshDrbB4Iko1U2DywACQkmaUbYBJ1VCn7/dff35at9fWrm3QjrwQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-mathjax-slim": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-mathjax-slim/-/plugin-mathjax-slim-0.12.0.tgz", - "integrity": "sha512-bLM+JnCTN/3XiyKb64Yhpx014VYLfHBexua4n92cUyoKR9g3waB0loF1WMlg6GdyCTc7OvrUSceNjwWj3YRogg==", - "dev": true, - "dependencies": { - "@mdit/plugin-tex": "0.12.0", - "@types/markdown-it": "^14.1.1", - "upath": "^2.0.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0", - "mathjax-full": "^3.2.2" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - }, - "mathjax-full": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-plantuml": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-plantuml/-/plugin-plantuml-0.12.0.tgz", - "integrity": "sha512-m1pk6PA9+kWUs8kylLqjnQ7Lex68x3c4Ato8zAh+omkhugfWzuQXfFiXRiJ9C7wkdqHoJx/E5XobP3HJnhCpoA==", - "dev": true, - "dependencies": { - "@mdit/plugin-uml": "0.12.0", - "@types/markdown-it": "^14.1.1" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-spoiler": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-spoiler/-/plugin-spoiler-0.12.0.tgz", - "integrity": "sha512-7yu+Gz000O0OxGnGYOoj77Am3WgH4GwzOvwCp7tPLexkJwTve8MyT9In/NEPFaRw8fmgXwthC0gKq4Ubh1+8DA==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-stylize": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-stylize/-/plugin-stylize-0.12.0.tgz", - "integrity": "sha512-5bzZvmjEpGTdwBax9jaDbCBhD1snEx6uTHVUG9HD/L5koKrL86+ox9E5FGeiMiD1dtxeMgL+WqBzV44nRE9ZPg==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-sub": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-sub/-/plugin-sub-0.12.0.tgz", - "integrity": "sha512-27kKkSVkymc+2RNc5XOYkeXip5PgHZPUnHpxUvkpnairLwyHsXb8/gzr9zd5arVkip86rcdy9LIvnF7zO0dNVQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-sup": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-sup/-/plugin-sup-0.12.0.tgz", - "integrity": "sha512-3bEDW5/y1UDVU8LVbFsqUvNcMW6orp16uCdRGYCNZ3/IeK7Qj1/9a3wfhScIoI8xRUE6M3JLv41sGBFXLHwi1w==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-tab": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-tab/-/plugin-tab-0.12.0.tgz", - "integrity": "sha512-ZDTEDxHoekcFA5Al+NLizn8Nf0kj6ABkNBAc/VxbQoVQdjZNQtGY2dOPeWW0I96Rao+Aw+IpYRCLFIfb/KtExw==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-tasklist": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-tasklist/-/plugin-tasklist-0.12.0.tgz", - "integrity": "sha512-MPmuLJrqHYR2xI7ST9Xtw/xj+6Xoq7kUvcGuXWdMMNT11DcU1KppkR8QBHov437NFYh6aGyjrHUVeM4T5Ls8yg==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-tex": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-tex/-/plugin-tex-0.12.0.tgz", - "integrity": "sha512-ejeSgSeZvcI5P4hFFQ4q5pHrZBGO2fQWVGm6dZ3BhX4ldoV8LjCIzkcMMXhrhSOVjwHnqmF6xOh9EvI0jzak1w==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@mdit/plugin-uml": { - "version": "0.12.0", - "resolved": "https://registry.npmmirror.com/@mdit/plugin-uml/-/plugin-uml-0.12.0.tgz", - "integrity": "sha512-EfVMmq0CwLJcssxhkvGS2ESenNNEMeK04j702Z9v3am1M9DdEj6zHTrHQd9tA0jNVuFY8ZlmMgDfkkG5k6Rm3Q==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "markdown-it": "^14.1.0" - }, - "peerDependenciesMeta": { - "markdown-it": { - "optional": true - } - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", - "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", - "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", - "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", - "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", - "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", - "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", - "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", - "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", - "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", - "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", - "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", - "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", - "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", - "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", - "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", - "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@sec-ant/readable-stream": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz", - "integrity": "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==", - "dev": true - }, - "node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmmirror.com/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "dev": true, - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", - "dev": true - }, - "node_modules/@types/fs-extra": { - "version": "11.0.4", - "resolved": "https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-11.0.4.tgz", - "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", - "dev": true, - "dependencies": { - "@types/jsonfile": "*", - "@types/node": "*" - } - }, - "node_modules/@types/hash-sum": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/@types/hash-sum/-/hash-sum-1.0.2.tgz", - "integrity": "sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==", - "dev": true - }, - "node_modules/@types/jsonfile": { - "version": "6.1.4", - "resolved": "https://registry.npmmirror.com/@types/jsonfile/-/jsonfile-6.1.4.tgz", - "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/katex": { - "version": "0.16.7", - "resolved": "https://registry.npmmirror.com/@types/katex/-/katex-0.16.7.tgz", - "integrity": "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==", - "dev": true - }, - "node_modules/@types/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", - "dev": true - }, - "node_modules/@types/markdown-it": { - "version": "14.1.1", - "resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-14.1.1.tgz", - "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", - "dev": true, - "dependencies": { - "@types/linkify-it": "^5", - "@types/mdurl": "^2" - } - }, - "node_modules/@types/markdown-it-emoji": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/@types/markdown-it-emoji/-/markdown-it-emoji-3.0.1.tgz", - "integrity": "sha512-cz1j8R35XivBqq9mwnsrP2fsz2yicLhB8+PDtuVkKOExwEdsVBNI+ROL3sbhtR5occRZ66vT0QnwFZCqdjf3pA==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14" - } - }, - "node_modules/@types/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", - "dev": true - }, - "node_modules/@types/ms": { - "version": "0.7.34", - "resolved": "https://registry.npmmirror.com/@types/ms/-/ms-0.7.34.tgz", - "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.12.12", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.12.12.tgz", - "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/sax": { - "version": "1.2.7", - "resolved": "https://registry.npmmirror.com/@types/sax/-/sax-1.2.7.tgz", - "integrity": "sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/web-bluetooth": { - "version": "0.0.20", - "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", - "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", - "dev": true - }, - "node_modules/@vitejs/plugin-vue": { - "version": "5.0.4", - "resolved": "https://registry.npmmirror.com/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz", - "integrity": "sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==", - "dev": true, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "peerDependencies": { - "vite": "^5.0.0", - "vue": "^3.2.25" - } - }, - "node_modules/@vue/compiler-core": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.4.27.tgz", - "integrity": "sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==", - "dependencies": { - "@babel/parser": "^7.24.4", - "@vue/shared": "3.4.27", - "entities": "^4.5.0", - "estree-walker": "^2.0.2", - "source-map-js": "^1.2.0" - } - }, - "node_modules/@vue/compiler-dom": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.4.27.tgz", - "integrity": "sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==", - "dependencies": { - "@vue/compiler-core": "3.4.27", - "@vue/shared": "3.4.27" - } - }, - "node_modules/@vue/compiler-sfc": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.4.27.tgz", - "integrity": "sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==", - "dependencies": { - "@babel/parser": "^7.24.4", - "@vue/compiler-core": "3.4.27", - "@vue/compiler-dom": "3.4.27", - "@vue/compiler-ssr": "3.4.27", - "@vue/shared": "3.4.27", - "estree-walker": "^2.0.2", - "magic-string": "^0.30.10", - "postcss": "^8.4.38", - "source-map-js": "^1.2.0" - } - }, - "node_modules/@vue/compiler-ssr": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.4.27.tgz", - "integrity": "sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==", - "dependencies": { - "@vue/compiler-dom": "3.4.27", - "@vue/shared": "3.4.27" - } - }, - "node_modules/@vue/devtools-api": { - "version": "6.6.1", - "resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.6.1.tgz", - "integrity": "sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==" - }, - "node_modules/@vue/reactivity": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/reactivity/-/reactivity-3.4.27.tgz", - "integrity": "sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==", - "dependencies": { - "@vue/shared": "3.4.27" - } - }, - "node_modules/@vue/runtime-core": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/runtime-core/-/runtime-core-3.4.27.tgz", - "integrity": "sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==", - "dependencies": { - "@vue/reactivity": "3.4.27", - "@vue/shared": "3.4.27" - } - }, - "node_modules/@vue/runtime-dom": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/runtime-dom/-/runtime-dom-3.4.27.tgz", - "integrity": "sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==", - "dependencies": { - "@vue/runtime-core": "3.4.27", - "@vue/shared": "3.4.27", - "csstype": "^3.1.3" - } - }, - "node_modules/@vue/server-renderer": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/server-renderer/-/server-renderer-3.4.27.tgz", - "integrity": "sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==", - "dependencies": { - "@vue/compiler-ssr": "3.4.27", - "@vue/shared": "3.4.27" - }, - "peerDependencies": { - "vue": "3.4.27" - } - }, - "node_modules/@vue/shared": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.4.27.tgz", - "integrity": "sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==" - }, - "node_modules/@vuepress/bundler-vite": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/bundler-vite/-/bundler-vite-2.0.0-rc.12.tgz", - "integrity": "sha512-h6DSC4iITYU1JuM8UezcwnXZydyV3TNSMswHpNcdaLIo1gBlDOqYxW1zg86wjrxDJjg1t7JqGxBVSaqrBWv/5Q==", - "dev": true, - "dependencies": { - "@vitejs/plugin-vue": "^5.0.4", - "@vuepress/client": "2.0.0-rc.12", - "@vuepress/core": "2.0.0-rc.12", - "@vuepress/shared": "2.0.0-rc.12", - "@vuepress/utils": "2.0.0-rc.12", - "autoprefixer": "^10.4.19", - "connect-history-api-fallback": "^2.0.0", - "postcss": "^8.4.38", - "postcss-load-config": "^5.1.0", - "rollup": "^4.18.0", - "vite": "~5.2.11", - "vue": "^3.4.27", - "vue-router": "^4.3.2" - } - }, - "node_modules/@vuepress/cli": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/cli/-/cli-2.0.0-rc.12.tgz", - "integrity": "sha512-79GVDrfzA84aV1n3ML6mItRabLSBbEwyBuWf9/7SHT9YjIytjgR1FZ3urgUIvbeziiubFQsgNm2uWyDUhsKpSg==", - "dev": true, - "dependencies": { - "@vuepress/core": "2.0.0-rc.12", - "@vuepress/shared": "2.0.0-rc.12", - "@vuepress/utils": "2.0.0-rc.12", - "cac": "^6.7.14", - "chokidar": "^3.6.0", - "envinfo": "^7.13.0", - "esbuild": "~0.20.2" - }, - "bin": { - "vuepress-cli": "bin/vuepress.js" - } - }, - "node_modules/@vuepress/client": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/client/-/client-2.0.0-rc.12.tgz", - "integrity": "sha512-S5xfPT/9XRpI5UAky5hS6GD9YcXkuWpLwsYTLgUVBIOgQ2MI+QyPPNr0fKHG2EXfJ7YfdSZBlcJ9BTfZ9jnyZg==", - "dependencies": { - "@vue/devtools-api": "^6.6.1", - "@vuepress/shared": "2.0.0-rc.12", - "vue": "^3.4.27", - "vue-router": "^4.3.2" - } - }, - "node_modules/@vuepress/core": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/core/-/core-2.0.0-rc.12.tgz", - "integrity": "sha512-0NsrcqgnGAI1tMXBScueZMeAZLImMrbNU6QW55FDlt12IrV8/nZz/FDcBnUHn6+30PlsrzAX2jyXlCBM9Z+KxA==", - "dev": true, - "dependencies": { - "@vuepress/client": "2.0.0-rc.12", - "@vuepress/markdown": "2.0.0-rc.12", - "@vuepress/shared": "2.0.0-rc.12", - "@vuepress/utils": "2.0.0-rc.12", - "vue": "^3.4.27" - } - }, - "node_modules/@vuepress/helper": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/helper/-/helper-2.0.0-rc.31.tgz", - "integrity": "sha512-mnYN0nceTYXJRXsWv+//+UQaDUGooLmOfRxnqJOQ2G9ZMgaeKC1vjUWOiOjQ3SeG/qEoth+TXyy5GcuT6K4HaQ==", - "dev": true, - "dependencies": { - "@vue/shared": "^3.4.27", - "cheerio": "1.0.0-rc.12", - "fflate": "^0.8.2", - "gray-matter": "^4.0.3", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/markdown": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/markdown/-/markdown-2.0.0-rc.12.tgz", - "integrity": "sha512-t4GwrN5LDy+uyGvCR/ds7Zj0teGPrM/NWQWmeWbTwdAOcd+IxPhPnfOlEFPzbEXIZER2GOpDSI19r7LochmobQ==", - "dev": true, - "dependencies": { - "@mdit-vue/plugin-component": "^2.1.3", - "@mdit-vue/plugin-frontmatter": "^2.1.3", - "@mdit-vue/plugin-headers": "^2.1.3", - "@mdit-vue/plugin-sfc": "^2.1.3", - "@mdit-vue/plugin-title": "^2.1.3", - "@mdit-vue/plugin-toc": "^2.1.3", - "@mdit-vue/shared": "^2.1.3", - "@mdit-vue/types": "^2.1.0", - "@types/markdown-it": "^14.1.1", - "@types/markdown-it-emoji": "^3.0.1", - "@vuepress/shared": "2.0.0-rc.12", - "@vuepress/utils": "2.0.0-rc.12", - "markdown-it": "^14.1.0", - "markdown-it-anchor": "^9.0.1", - "markdown-it-emoji": "^3.0.0", - "mdurl": "^2.0.0" - } - }, - "node_modules/@vuepress/plugin-active-header-links": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-2.0.0-rc.31.tgz", - "integrity": "sha512-sw1mB9v7u7QOLGlR2hSMbpt4N+nWhlyewMoT7lVWLOlWRf3c1Ub15MejD5Meh5rew/bya7p61MlCjd/HsQK6MQ==", - "dev": true, - "dependencies": { - "@vueuse/core": "^10.9.0", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-back-to-top": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-2.0.0-rc.31.tgz", - "integrity": "sha512-GWaGOgJyjib5+muxROQWy2W0nHGdbWvYaJqjj15+ylm877Sal4aAhQ5lQ5yNbQqq1fLUVefedg4LwKoc00xKdw==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "@vueuse/core": "^10.9.0", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-blog": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-blog/-/plugin-blog-2.0.0-rc.31.tgz", - "integrity": "sha512-Jl8dEfwPzCnXXNSj5vKFbhxdw5IkEPzgprW08pVQGAdDItyIlXMzj9xJClR8D57vcvzZGI0VqnEwTKIXAgDABw==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "chokidar": "^3.6.0", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-catalog": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-catalog/-/plugin-catalog-2.0.0-rc.31.tgz", - "integrity": "sha512-IE0z9sWKECgRK1mrkWu3fyAXxsA/Ns1nhQhwC6lE0b7nzcu221vUw0qalLtXpeGhH4hx1I3+8c7WevBl6C71cg==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-container": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-container/-/plugin-container-2.0.0-rc.0.tgz", - "integrity": "sha512-b7vrLN11YE7qiUDPfA3N9P7Z8fupe9Wbcr9KAE/bmfZ9VT4d6kzpVyoU7XHi99XngitsmnkaXP4aBvBF1c2AnA==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^13.0.6", - "@vuepress/core": "2.0.0-rc.0", - "@vuepress/markdown": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "markdown-it": "^13.0.2", - "markdown-it-container": "^3.0.0" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/plugin-component": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-component/-/plugin-component-1.0.0.tgz", - "integrity": "sha512-ZXsJwxkG5yyTHARIYbR74cT4AZ0SfMokFFjiHYCbypHIeYWgJhso4+CZ8+3V9EWFG3EHlGoKNGqKp9chHnqntQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/plugin-frontmatter": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-frontmatter/-/plugin-frontmatter-1.0.0.tgz", - "integrity": "sha512-MMA7Ny+YPZA7eDOY1t4E+rKuEWO39mzDdP/M68fKdXJU6VfcGkPr7gnpnJfW2QBJ5qIvMrK/3lDAA2JBy5TfpA==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "gray-matter": "^4.0.3", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/plugin-headers": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-headers/-/plugin-headers-1.0.0.tgz", - "integrity": "sha512-0rK/iKy6x13d/Pp5XxdLBshTD0+YjZvtHIaIV+JO+/H2WnOv7oaRgs48G5d44z3XJVUE2u6fNnTlI169fef0/A==", - "dev": true, - "dependencies": { - "@mdit-vue/shared": "1.0.0", - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/plugin-sfc": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-sfc/-/plugin-sfc-1.0.0.tgz", - "integrity": "sha512-agMUe0fY4YHxsZivSvplBwRwrFvsIf/JNUJCAYq1+2Sg9+2hviTBZwjZDxYqHDHOVLtiNr+wuo68tE24mAx3AQ==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/plugin-title": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-title/-/plugin-title-1.0.0.tgz", - "integrity": "sha512-8yC60fCZ95xcJ/cvJH4Lv43Rs4k+33UGyKrRWj5J8TNyMwUyGcwur0XyPM+ffJH4/Bzq4myZLsj/TTFSkXRxvw==", - "dev": true, - "dependencies": { - "@mdit-vue/shared": "1.0.0", - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/plugin-toc": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/plugin-toc/-/plugin-toc-1.0.0.tgz", - "integrity": "sha512-WN8blfX0X/5Nolic0ClDWP7eVo9IB+U4g0jbycX3lolIZX5Bai1UpsD3QYZr5VVsPbQJMKMGvTrCEtCNTGvyWQ==", - "dev": true, - "dependencies": { - "@mdit-vue/shared": "1.0.0", - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/shared": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/shared/-/shared-1.0.0.tgz", - "integrity": "sha512-nbYBfmEi+pR2Lm0Z6TMVX2/iBjfr/kGEsHW8CC0rQw+3+sG5dY6VG094HuFAkiAmmvZx9DZZb+7ZMWp9vkwCRw==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "1.0.0", - "@types/markdown-it": "^13.0.1", - "markdown-it": "^13.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@mdit-vue/types": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/@mdit-vue/types/-/types-1.0.0.tgz", - "integrity": "sha512-xeF5+sHLzRNF7plbksywKCph4qli20l72of2fMlZQQ7RECvXYrRkE9+bjRFQCyULC7B8ydUYbpbkux5xJlVWyw==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/@types/linkify-it": { - "version": "3.0.5", - "resolved": "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-3.0.5.tgz", - "integrity": "sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/@types/markdown-it": { - "version": "13.0.8", - "resolved": "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-13.0.8.tgz", - "integrity": "sha512-V+KmpgiipS+zoypeUSS9ojesWtY/0k4XfqcK2fnVrX/qInJhX7rsCxZ/rygiPH2zxlPPrhfuW0I6ddMcWTKLsg==", - "dev": true, - "dependencies": { - "@types/linkify-it": "^3", - "@types/mdurl": "^1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@types/markdown-it-emoji": { - "version": "2.0.5", - "resolved": "https://registry.npmmirror.com/@types/markdown-it-emoji/-/markdown-it-emoji-2.0.5.tgz", - "integrity": "sha512-iJLsmCNpSWKtV6Ia3mLSjcXJPEt7ubGG342z+hGvYx++TpM19oTUrJcI7XjbOqRQ+W2UQ323E7B0eCLwlgT/9g==", - "dev": true, - "dependencies": { - "@types/markdown-it": "*" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@types/mdurl": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/@types/mdurl/-/mdurl-1.0.5.tgz", - "integrity": "sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/@vuepress/client": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/client/-/client-2.0.0-rc.0.tgz", - "integrity": "sha512-TwQx8hJgYONYxX+QltZ2aw9O5Ym6SKelfiUduuIRb555B1gece/jSVap3H/ZwyBhpgJMtG4+/Mrmf8nlDSHjvw==", - "dev": true, - "dependencies": { - "@vue/devtools-api": "^6.5.1", - "@vuepress/shared": "2.0.0-rc.0", - "@vueuse/core": "^10.6.1", - "vue": "^3.3.8", - "vue-router": "^4.2.5" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@vuepress/core": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/core/-/core-2.0.0-rc.0.tgz", - "integrity": "sha512-uoOaZP1MdxZYJIAJcRcmYKKeCIVnxZeOuLMOOB9CPuAKSalT1RvJ1lztw6RX3q9SPnlqtSZPQXDncPAZivw4pA==", - "dev": true, - "dependencies": { - "@vuepress/client": "2.0.0-rc.0", - "@vuepress/markdown": "2.0.0-rc.0", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.3.8" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@vuepress/markdown": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/markdown/-/markdown-2.0.0-rc.0.tgz", - "integrity": "sha512-USmqdKKMT6ZFHYRztTjKUlO8qgGfnEygMAAq4AzC/uYXiEfrbMBLAWJhteyGS56P3rGLj0OPAhksE681bX/wOg==", - "dev": true, - "dependencies": { - "@mdit-vue/plugin-component": "^1.0.0", - "@mdit-vue/plugin-frontmatter": "^1.0.0", - "@mdit-vue/plugin-headers": "^1.0.0", - "@mdit-vue/plugin-sfc": "^1.0.0", - "@mdit-vue/plugin-title": "^1.0.0", - "@mdit-vue/plugin-toc": "^1.0.0", - "@mdit-vue/shared": "^1.0.0", - "@mdit-vue/types": "^1.0.0", - "@types/markdown-it": "^13.0.6", - "@types/markdown-it-emoji": "^2.0.4", - "@vuepress/shared": "2.0.0-rc.0", - "@vuepress/utils": "2.0.0-rc.0", - "markdown-it": "^13.0.2", - "markdown-it-anchor": "^8.6.7", - "markdown-it-emoji": "^2.0.2", - "mdurl": "^1.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@vuepress/shared": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/shared/-/shared-2.0.0-rc.0.tgz", - "integrity": "sha512-ikdSfjRv5LGM1iv4HHwF9P6gqTjaFCXKPK+hzlkHFHNZO1GLqk7/BPc4F51tAG1s8TcLhUZc+54LrfgS7PkXXA==", - "dev": true, - "dependencies": { - "@mdit-vue/types": "^1.0.0", - "@vue/shared": "^3.3.8" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/@vuepress/utils": { - "version": "2.0.0-rc.0", - "resolved": "https://registry.npmmirror.com/@vuepress/utils/-/utils-2.0.0-rc.0.tgz", - "integrity": "sha512-Q1ay/woClDHcW0Qe91KsnHoupdNN0tp/vhjvVLuAYxlv/1Obii7hz9WFcajyyGEhmsYxdvG2sGmcxFA02tuKkw==", - "dev": true, - "dependencies": { - "@types/debug": "^4.1.12", - "@types/fs-extra": "^11.0.4", - "@types/hash-sum": "^1.0.2", - "@vuepress/shared": "2.0.0-rc.0", - "debug": "^4.3.4", - "fs-extra": "^11.1.1", - "globby": "^14.0.0", - "hash-sum": "^2.0.0", - "ora": "^7.0.1", - "picocolors": "^1.0.0", - "upath": "^2.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/entities": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz", - "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", - "dev": true, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/linkify-it": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-4.0.1.tgz", - "integrity": "sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/log-symbols": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-5.1.0.tgz", - "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", - "dev": true, - "dependencies": { - "chalk": "^5.0.0", - "is-unicode-supported": "^1.1.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/markdown-it": { - "version": "13.0.2", - "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-13.0.2.tgz", - "integrity": "sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "~3.0.1", - "linkify-it": "^4.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/markdown-it-anchor": { - "version": "8.6.7", - "resolved": "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", - "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", - "dev": true, - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/markdown-it-container": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/markdown-it-container/-/markdown-it-container-3.0.0.tgz", - "integrity": "sha512-y6oKTq4BB9OQuY/KLfk/O3ysFhB3IMYoIWhGJEidXt1NQFocFK2sA2t0NYZAMyMShAGL6x5OPIbrmXPIqaN9rw==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/markdown-it-emoji": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", - "integrity": "sha512-zLftSaNrKuYl0kR5zm4gxXjHaOI3FAOEaloKmRA5hijmJZvSjmxcokOLlzycb/HXlUFWzXqpIEoyEMCE4i9MvQ==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "node_modules/@vuepress/plugin-container/node_modules/ora": { - "version": "7.0.1", - "resolved": "https://registry.npmmirror.com/ora/-/ora-7.0.1.tgz", - "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^4.0.0", - "cli-spinners": "^2.9.0", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^1.3.0", - "log-symbols": "^5.1.0", - "stdin-discarder": "^0.1.0", - "string-width": "^6.1.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/stdin-discarder": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz", - "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", - "dev": true, - "dependencies": { - "bl": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/string-width": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-6.1.0.tgz", - "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^10.2.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@vuepress/plugin-container/node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/@vuepress/plugin-copy-code": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-copy-code/-/plugin-copy-code-2.0.0-rc.31.tgz", - "integrity": "sha512-NEyqochtol8jgIOzs0TDi8DDyl2syNyu3dm4Qvfgz72nPHg8FOp3AFK/THgxVfvEPUuOAv7uwwXaNoVtuEceAQ==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "@vueuse/core": "^10.9.0", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-git": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-git/-/plugin-git-2.0.0-rc.31.tgz", - "integrity": "sha512-zKSuyEQqSUcmV/kBTeyxb3g3WSvvIGJkKbzC65uVtWcFJvsplY1YdqmEvYauZN4N8JlXkQ6ciSGESlJ771oBoQ==", - "dev": true, - "dependencies": { - "execa": "^9.1.0" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-google-analytics": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-2.0.0-rc.31.tgz", - "integrity": "sha512-jmv6x6aMN3VSy+N0jtRq1/bXBOD+TDHsksNbPx0t58jF4tJcbkRNuzEH8oROQPDbSO8F+xw+ISbD7w3MQaEgEA==", - "dev": true, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-links-check": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-links-check/-/plugin-links-check-2.0.0-rc.31.tgz", - "integrity": "sha512-+0V16tj3bhB4ggS+5nJb/R+mSIN8HleJUdv/TlihbKv016jFx8Y6EfM5K0qUQq8wylPH4hHPXxTqzusZFEd1bA==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-markdown-container": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-markdown-container/-/plugin-markdown-container-2.0.0-rc.31.tgz", - "integrity": "sha512-9/0XhDkcL8/y4sLSWWz7cFVmc6Z5zks1IdJniw3079j43UNO9ih8Gix1hhc2cQcIH1vEQOlh5xyCQo12+QwapQ==", - "dev": true, - "dependencies": { - "@types/markdown-it": "^14.1.1", - "markdown-it-container": "^4.0.0" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-medium-zoom": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-medium-zoom/-/plugin-medium-zoom-2.0.0-rc.31.tgz", - "integrity": "sha512-CgcjfcFErrubUIL1mnIVXegZySL/oK3OU1RrJ7ZNKP0zX9FsY86X4gljoPNIe0Dfa+e+93+TnyrwPv9a7FPkGg==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "medium-zoom": "^1.1.0", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-nprogress": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-nprogress/-/plugin-nprogress-2.0.0-rc.31.tgz", - "integrity": "sha512-ZTAR7gqk6yGvX1ZajK3HI33sCX9cxFlqLzSkbce25K91R564JwIwohR75WmCM6bxxniJ0uNIf4tfopJ6eBaMBQ==", - "dev": true, - "dependencies": { - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-palette": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-palette/-/plugin-palette-2.0.0-rc.31.tgz", - "integrity": "sha512-WjC0JBES5eE2c10qocg8u/toML9l4YvpKBgYBYrEgFfGs1KpaTNl9Tq348YO3gEjRqo84BsUxwcgkYyUFsh30w==", - "dev": true, - "dependencies": { - "chokidar": "^3.6.0" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-prismjs": { - "version": "2.0.0-rc.32", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-prismjs/-/plugin-prismjs-2.0.0-rc.32.tgz", - "integrity": "sha512-on9OCH6eUi8xS2uw1zKR5mDnAtCDYglOeltSD8LHYXopHz3Lku87/n4GG/BisCunsoTXQ5fUt0xca/0jvtdQtg==", - "dev": true, - "dependencies": { - "prismjs": "^1.29.0" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-sass-palette": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-sass-palette/-/plugin-sass-palette-2.0.0-rc.31.tgz", - "integrity": "sha512-HcIAgUwXdMBp1Q8xs7j6w1AV3GQ5sBmROPl5L3vvp0g5DNJepqxaHR3NODGGP+9LnaDdaqGC7g3M9L3ZJ5RNQw==", - "dev": true, - "dependencies": { - "@vuepress/helper": "2.0.0-rc.31", - "chokidar": "^3.6.0", - "sass": "^1.77.2" - }, - "peerDependencies": { - "sass-loader": "^14.0.0", - "vuepress": "2.0.0-rc.12" - }, - "peerDependenciesMeta": { - "sass-loader": { - "optional": true - } - } - }, - "node_modules/@vuepress/plugin-search": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-search/-/plugin-search-2.0.0-rc.31.tgz", - "integrity": "sha512-n9Sy3VIk8W1KKGYVnlrtcx/UmSeIW170IfZ0hqwewTIrNXecJoy56GB0bjUo+F+K3qDucDYAnbvw7rjE9Fg26Q==", - "dev": true, - "dependencies": { - "chokidar": "^3.6.0", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-seo": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-seo/-/plugin-seo-2.0.0-rc.31.tgz", - "integrity": "sha512-KQuFPwfRFcg2T7OkE4poY8V2d0RnqrOYU5lek3HR3LmleCQvF5A5k5vlQ21h/owxvD6cZnjnNGPZadTRxzq/Ug==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-sitemap": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-sitemap/-/plugin-sitemap-2.0.0-rc.31.tgz", - "integrity": "sha512-X5z57vqTETX9XdAGLdeNy0amd38wBOR1wMtrHTyVe6ZKC/gf1G9KOrTDiL1d1vsgoADUoBx4fcz8P+NytKbRWg==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "sitemap": "^8.0.0" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/plugin-theme-data": { - "version": "2.0.0-rc.31", - "resolved": "https://registry.npmmirror.com/@vuepress/plugin-theme-data/-/plugin-theme-data-2.0.0-rc.31.tgz", - "integrity": "sha512-jyc5Lw4LNToT60+KEWZc79+mhQYSkmzv7OJMm4ZxdSYevn3FmvJdwT3QhgCtD+8ex2CnOp+suevC5E6OkLMtaQ==", - "dev": true, - "dependencies": { - "@vue/devtools-api": "^6.6.1", - "vue": "^3.4.27" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/@vuepress/shared": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/shared/-/shared-2.0.0-rc.12.tgz", - "integrity": "sha512-JPBygsjmtP9I4I7ESsQrebW6PXIxKktWAFWGDG85RCIiUFklEN792vEJ2XbDZvF5XaU/8H8fadApb6xqRB7Lww==", - "dependencies": { - "@mdit-vue/types": "^2.1.0" - } - }, - "node_modules/@vuepress/theme-default": { - "version": "2.0.0-rc.32", - "resolved": "https://registry.npmmirror.com/@vuepress/theme-default/-/theme-default-2.0.0-rc.32.tgz", - "integrity": "sha512-Kc57FFGLmEV1OerLXvxN7zMQB+dbWeKQvfVpIy3EZyV/fXpGrNJWhmHefVdwAyIUhcJ9LRzJ69/4gpC6TIdzLw==", - "dev": true, - "dependencies": { - "@vuepress/helper": "~2.0.0-rc.31", - "@vuepress/plugin-active-header-links": "~2.0.0-rc.31", - "@vuepress/plugin-back-to-top": "~2.0.0-rc.31", - "@vuepress/plugin-copy-code": "~2.0.0-rc.31", - "@vuepress/plugin-git": "~2.0.0-rc.31", - "@vuepress/plugin-links-check": "~2.0.0-rc.31", - "@vuepress/plugin-markdown-container": "~2.0.0-rc.31", - "@vuepress/plugin-medium-zoom": "~2.0.0-rc.31", - "@vuepress/plugin-nprogress": "~2.0.0-rc.31", - "@vuepress/plugin-palette": "~2.0.0-rc.31", - "@vuepress/plugin-prismjs": "~2.0.0-rc.32", - "@vuepress/plugin-seo": "~2.0.0-rc.31", - "@vuepress/plugin-sitemap": "~2.0.0-rc.31", - "@vuepress/plugin-theme-data": "~2.0.0-rc.31", - "@vueuse/core": "^10.9.0", - "sass": "^1.77.2", - "vue": "^3.4.27" - }, - "peerDependencies": { - "sass-loader": "^14.0.0", - "vuepress": "2.0.0-rc.12" - }, - "peerDependenciesMeta": { - "sass-loader": { - "optional": true - } - } - }, - "node_modules/@vuepress/utils": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/@vuepress/utils/-/utils-2.0.0-rc.12.tgz", - "integrity": "sha512-ChItNTdPdpXZyMkxHWNcH6JWVBzOyKPYZvFkr8eWhOcT2uLEE8B8Ypkj6kvEzCsqmNWgj8iQzEa4hcUubO5vgg==", - "dev": true, - "dependencies": { - "@types/debug": "^4.1.12", - "@types/fs-extra": "^11.0.4", - "@types/hash-sum": "^1.0.2", - "@vuepress/shared": "2.0.0-rc.12", - "debug": "^4.3.4", - "fs-extra": "^11.2.0", - "globby": "^14.0.1", - "hash-sum": "^2.0.0", - "ora": "^8.0.1", - "picocolors": "^1.0.1", - "upath": "^2.0.1" - } - }, - "node_modules/@vueuse/core": { - "version": "10.10.0", - "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.10.0.tgz", - "integrity": "sha512-vexJ/YXYs2S42B783rI95lMt3GzEwkxzC8Hb0Ndpd8rD+p+Lk/Za4bd797Ym7yq4jXqdSyj3JLChunF/vyYjUw==", - "dev": true, - "dependencies": { - "@types/web-bluetooth": "^0.0.20", - "@vueuse/metadata": "10.10.0", - "@vueuse/shared": "10.10.0", - "vue-demi": ">=0.14.7" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/@vueuse/core/node_modules/vue-demi": { - "version": "0.14.7", - "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz", - "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "vue-demi-fix": "bin/vue-demi-fix.js", - "vue-demi-switch": "bin/vue-demi-switch.js" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - }, - "peerDependencies": { - "@vue/composition-api": "^1.0.0-rc.1", - "vue": "^3.0.0-0 || ^2.6.0" - }, - "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - } - } - }, - "node_modules/@vueuse/metadata": { - "version": "10.10.0", - "resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-10.10.0.tgz", - "integrity": "sha512-UNAo2sTCAW5ge6OErPEHb5z7NEAg3XcO9Cj7OK45aZXfLLH1QkexDcZD77HBi5zvEiLOm1An+p/4b5K3Worpug==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/@vueuse/shared": { - "version": "10.10.0", - "resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-10.10.0.tgz", - "integrity": "sha512-2aW33Ac0Uk0U+9yo3Ypg9s5KcR42cuehRWl7vnUHadQyFvCktseyxxEPBi1Eiq4D2yBGACOnqLZpx1eMc7g5Og==", - "dev": true, - "dependencies": { - "vue-demi": ">=0.14.7" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - } - }, - "node_modules/@vueuse/shared/node_modules/vue-demi": { - "version": "0.14.7", - "resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.7.tgz", - "integrity": "sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "vue-demi-fix": "bin/vue-demi-fix.js", - "vue-demi-switch": "bin/vue-demi-switch.js" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/antfu" - }, - "peerDependencies": { - "@vue/composition-api": "^1.0.0-rc.1", - "vue": "^3.0.0-0 || ^2.6.0" - }, - "peerDependenciesMeta": { - "@vue/composition-api": { - "optional": true - } - } - }, - "node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmmirror.com/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/autoprefixer": { - "version": "10.4.19", - "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.19.tgz", - "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/autoprefixer" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-lite": "^1.0.30001599", - "fraction.js": "^4.3.7", - "normalize-range": "^0.1.2", - "picocolors": "^1.0.0", - "postcss-value-parser": "^4.2.0" - }, - "bin": { - "autoprefixer": "bin/autoprefixer" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/balloon-css": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/balloon-css/-/balloon-css-1.2.0.tgz", - "integrity": "sha512-urXwkHgwp6GsXVF+it01485Z2Cj4pnW02ICnM0TemOlkKmCNnDLmyy+ZZiRXBpwldUXO+aRNr7Hdia4CBvXJ5A==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bl": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/bl/-/bl-5.1.0.tgz", - "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.23.0", - "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.23.0.tgz", - "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001587", - "electron-to-chromium": "^1.4.668", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.13" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/cac": { - "version": "6.7.14", - "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", - "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001624", - "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001624.tgz", - "integrity": "sha512-0dWnQG87UevOCPYaOR49CBcLBwoZLpws+k6W37nLjWUhumP1Isusj0p2u+3KhjNloRWK9OKMgjBBzPujQHw4nA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] - }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "dev": true, - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmmirror.com/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/connect-history-api-fallback": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", - "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" - }, - "node_modules/dayjs": { - "version": "1.11.11", - "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.11.tgz", - "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/electron-to-chromium": { - "version": "1.4.783", - "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.783.tgz", - "integrity": "sha512-bT0jEz/Xz1fahQpbZ1D7LgmPYZ3iHVY39NcWWro1+hA2IvjiPeaXtfSqrQ+nXjApMvQRE2ASt1itSLRrebHMRQ==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "engines": { - "node": ">=0.12" - } - }, - "node_modules/envinfo": { - "version": "7.13.0", - "resolved": "https://registry.npmmirror.com/envinfo/-/envinfo-7.13.0.tgz", - "integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esbuild": { - "version": "0.20.2", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.20.2.tgz", - "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.20.2", - "@esbuild/android-arm": "0.20.2", - "@esbuild/android-arm64": "0.20.2", - "@esbuild/android-x64": "0.20.2", - "@esbuild/darwin-arm64": "0.20.2", - "@esbuild/darwin-x64": "0.20.2", - "@esbuild/freebsd-arm64": "0.20.2", - "@esbuild/freebsd-x64": "0.20.2", - "@esbuild/linux-arm": "0.20.2", - "@esbuild/linux-arm64": "0.20.2", - "@esbuild/linux-ia32": "0.20.2", - "@esbuild/linux-loong64": "0.20.2", - "@esbuild/linux-mips64el": "0.20.2", - "@esbuild/linux-ppc64": "0.20.2", - "@esbuild/linux-riscv64": "0.20.2", - "@esbuild/linux-s390x": "0.20.2", - "@esbuild/linux-x64": "0.20.2", - "@esbuild/netbsd-x64": "0.20.2", - "@esbuild/openbsd-x64": "0.20.2", - "@esbuild/sunos-x64": "0.20.2", - "@esbuild/win32-arm64": "0.20.2", - "@esbuild/win32-ia32": "0.20.2", - "@esbuild/win32-x64": "0.20.2" - } - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" - }, - "node_modules/execa": { - "version": "9.1.0", - "resolved": "https://registry.npmmirror.com/execa/-/execa-9.1.0.tgz", - "integrity": "sha512-lSgHc4Elo2m6bUDhc3Hl/VxvUDJdQWI40RZ4KMY9bKRc+hgMOT7II/JjbNDhI8VnMtrCb7U/fhpJIkLORZozWw==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.3", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^7.0.0", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^5.2.0", - "pretty-ms": "^9.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/execa/node_modules/@sindresorhus/merge-streams": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", - "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/execa/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fflate": { - "version": "0.8.2", - "resolved": "https://registry.npmmirror.com/fflate/-/fflate-0.8.2.tgz", - "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", - "dev": true - }, - "node_modules/figures": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/figures/-/figures-6.1.0.tgz", - "integrity": "sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==", - "dev": true, - "dependencies": { - "is-unicode-supported": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fraction.js": { - "version": "4.3.7", - "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-4.3.7.tgz", - "integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/get-east-asian-width": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", - "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmmirror.com/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", - "dev": true, - "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globby": { - "version": "14.0.1", - "resolved": "https://registry.npmmirror.com/globby/-/globby-14.0.1.tgz", - "integrity": "sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.2", - "ignore": "^5.2.4", - "path-type": "^5.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true - }, - "node_modules/gray-matter": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/gray-matter/-/gray-matter-4.0.3.tgz", - "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", - "dev": true, - "dependencies": { - "js-yaml": "^3.13.1", - "kind-of": "^6.0.2", - "section-matter": "^1.0.0", - "strip-bom-string": "^1.0.0" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/hash-sum": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/hash-sum/-/hash-sum-2.0.0.tgz", - "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==", - "dev": true - }, - "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" - } - }, - "node_modules/human-signals": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/human-signals/-/human-signals-7.0.0.tgz", - "integrity": "sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==", - "dev": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/immutable": { - "version": "4.3.6", - "resolved": "https://registry.npmmirror.com/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", - "dev": true - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmmirror.com/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-interactive": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-interactive/-/is-interactive-2.0.0.tgz", - "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/is-unicode-supported": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz", - "integrity": "sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lilconfig": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.1.tgz", - "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "dev": true, - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/log-symbols": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/log-symbols/-/log-symbols-6.0.0.tgz", - "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "is-unicode-supported": "^1.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/log-symbols/node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/magic-string": { - "version": "0.30.10", - "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.10.tgz", - "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - } - }, - "node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/markdown-it-anchor": { - "version": "9.0.1", - "resolved": "https://registry.npmmirror.com/markdown-it-anchor/-/markdown-it-anchor-9.0.1.tgz", - "integrity": "sha512-cBt7aAzmkfX8X7FqAe8EBryiKmToXgMQEEMqkXzWCm0toDtfDYIGboKeTKd8cpNJArJtutrf+977wFJTsvNGmQ==", - "dev": true, - "peerDependencies": { - "@types/markdown-it": "*", - "markdown-it": "*" - } - }, - "node_modules/markdown-it-container": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/markdown-it-container/-/markdown-it-container-4.0.0.tgz", - "integrity": "sha512-HaNccxUH0l7BNGYbFbjmGpf5aLHAMTinqRZQAEQbMr2cdD3z91Q6kIo1oUn1CQndkT03jat6ckrdRYuwwqLlQw==", - "dev": true - }, - "node_modules/markdown-it-emoji": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/markdown-it-emoji/-/markdown-it-emoji-3.0.0.tgz", - "integrity": "sha512-+rUD93bXHubA4arpEZO3q80so0qgoFJEKRkRbjKX8RTdca89v2kfyF+xR3i2sQTwql9tpPZPOQN5B+PunspXRg==", - "dev": true - }, - "node_modules/markdown-it/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true - }, - "node_modules/medium-zoom": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/medium-zoom/-/medium-zoom-1.1.0.tgz", - "integrity": "sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-range": { - "version": "0.1.2", - "resolved": "https://registry.npmmirror.com/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/npm-run-path/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/ora": { - "version": "8.0.1", - "resolved": "https://registry.npmmirror.com/ora/-/ora-8.0.1.tgz", - "integrity": "sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^4.0.0", - "cli-spinners": "^2.9.2", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^2.0.0", - "log-symbols": "^6.0.0", - "stdin-discarder": "^0.2.1", - "string-width": "^7.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parse-ms": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/parse-ms/-/parse-ms-4.0.0.tgz", - "integrity": "sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmmirror.com/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "dependencies": { - "entities": "^4.4.0" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmmirror.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-type": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/path-type/-/path-type-5.0.0.tgz", - "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-load-config": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-5.1.0.tgz", - "integrity": "sha512-G5AJ+IX0aD0dygOE0yFZQ/huFFMSNneyfp0e3/bT05a8OfPC5FUoZRPfGijUdGOJNMewJiwzcHJXFafFzeKFVA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "lilconfig": "^3.1.1", - "yaml": "^2.4.2" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "jiti": ">=1.21.0", - "postcss": ">=8.0.9", - "tsx": "^4.8.1" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - }, - "postcss": { - "optional": true - }, - "tsx": { - "optional": true - } - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/pretty-ms": { - "version": "9.0.0", - "resolved": "https://registry.npmmirror.com/pretty-ms/-/pretty-ms-9.0.0.tgz", - "integrity": "sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==", - "dev": true, - "dependencies": { - "parse-ms": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/prismjs": { - "version": "1.29.0", - "resolved": "https://registry.npmmirror.com/prismjs/-/prismjs-1.29.0.tgz", - "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rollup": { - "version": "4.18.0", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.18.0.tgz", - "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", - "dev": true, - "dependencies": { - "@types/estree": "1.0.5" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.18.0", - "@rollup/rollup-android-arm64": "4.18.0", - "@rollup/rollup-darwin-arm64": "4.18.0", - "@rollup/rollup-darwin-x64": "4.18.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", - "@rollup/rollup-linux-arm-musleabihf": "4.18.0", - "@rollup/rollup-linux-arm64-gnu": "4.18.0", - "@rollup/rollup-linux-arm64-musl": "4.18.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", - "@rollup/rollup-linux-riscv64-gnu": "4.18.0", - "@rollup/rollup-linux-s390x-gnu": "4.18.0", - "@rollup/rollup-linux-x64-gnu": "4.18.0", - "@rollup/rollup-linux-x64-musl": "4.18.0", - "@rollup/rollup-win32-arm64-msvc": "4.18.0", - "@rollup/rollup-win32-ia32-msvc": "4.18.0", - "@rollup/rollup-win32-x64-msvc": "4.18.0", - "fsevents": "~2.3.2" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "node_modules/sass": { - "version": "1.77.2", - "resolved": "https://registry.npmmirror.com/sass/-/sass-1.77.2.tgz", - "integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==", - "dev": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", - "dev": true - }, - "node_modules/section-matter": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/section-matter/-/section-matter-1.0.0.tgz", - "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sitemap": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/sitemap/-/sitemap-8.0.0.tgz", - "integrity": "sha512-+AbdxhM9kJsHtruUF39bwS/B0Fytw6Fr1o4ZAIAEqA6cke2xcoO2GleBw9Zw7nRzILVEgz7zBM5GiTJjie1G9A==", - "dev": true, - "dependencies": { - "@types/node": "^17.0.5", - "@types/sax": "^1.2.1", - "arg": "^5.0.0", - "sax": "^1.2.4" - }, - "bin": { - "sitemap": "dist/cli.js" - }, - "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" - } - }, - "node_modules/sitemap/node_modules/@types/node": { - "version": "17.0.45", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", - "dev": true - }, - "node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmmirror.com/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, - "engines": { - "node": ">=14.16" - } - }, - "node_modules/slimsearch": { - "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/slimsearch/-/slimsearch-2.1.1.tgz", - "integrity": "sha512-l1utJWal8F/RIheYk88DE2+enI12nIrn5SHt4ih/CNAH81PzkTv2GVBODlLynDJb7xan5hjd8XTL5f0L4cxLQA==", - "dev": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmmirror.com/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stdin-discarder": { - "version": "0.2.2", - "resolved": "https://registry.npmmirror.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz", - "integrity": "sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "7.1.0", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-7.1.0.tgz", - "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", - "dev": true, - "dependencies": { - "emoji-regex": "^10.3.0", - "get-east-asian-width": "^1.0.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-bom-string": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-final-newline": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-4.0.0.tgz", - "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, - "node_modules/unicorn-magic": { - "version": "0.1.0", - "resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz", - "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", - "dev": true, - "engines": { - "node": ">=18" - } - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/upath": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/upath/-/upath-2.0.1.tgz", - "integrity": "sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==", - "dev": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", - "dev": true, - "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/vite": { - "version": "5.2.11", - "resolved": "https://registry.npmmirror.com/vite/-/vite-5.2.11.tgz", - "integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", - "dev": true, - "dependencies": { - "esbuild": "^0.20.1", - "postcss": "^8.4.38", - "rollup": "^4.13.0" - }, - "bin": { - "vite": "bin/vite.js" - }, - "engines": { - "node": "^18.0.0 || >=20.0.0" - }, - "funding": { - "url": "https://github.com/vitejs/vite?sponsor=1" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - }, - "peerDependencies": { - "@types/node": "^18.0.0 || >=20.0.0", - "less": "*", - "lightningcss": "^1.21.0", - "sass": "*", - "stylus": "*", - "sugarss": "*", - "terser": "^5.4.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "less": { - "optional": true - }, - "lightningcss": { - "optional": true - }, - "sass": { - "optional": true - }, - "stylus": { - "optional": true - }, - "sugarss": { - "optional": true - }, - "terser": { - "optional": true - } - } - }, - "node_modules/vue": { - "version": "3.4.27", - "resolved": "https://registry.npmmirror.com/vue/-/vue-3.4.27.tgz", - "integrity": "sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==", - "dependencies": { - "@vue/compiler-dom": "3.4.27", - "@vue/compiler-sfc": "3.4.27", - "@vue/runtime-dom": "3.4.27", - "@vue/server-renderer": "3.4.27", - "@vue/shared": "3.4.27" - }, - "peerDependencies": { - "typescript": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/vue-router": { - "version": "4.3.2", - "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.3.2.tgz", - "integrity": "sha512-hKQJ1vDAZ5LVkKEnHhmm1f9pMiWIBNGF5AwU67PdH7TyXCj/a4hTccuUuYCAMgJK6rO/NVYtQIEN3yL8CECa7Q==", - "dependencies": { - "@vue/devtools-api": "^6.5.1" - }, - "funding": { - "url": "https://github.com/sponsors/posva" - }, - "peerDependencies": { - "vue": "^3.2.0" - } - }, - "node_modules/vue-social-sharing": { - "version": "4.0.0-alpha4", - "resolved": "https://registry.npmmirror.com/vue-social-sharing/-/vue-social-sharing-4.0.0-alpha4.tgz", - "integrity": "sha512-hMbgpZkY5aRAiznSB/sgzdMVgdSbkmIHEaELX7pUbuUd6KS1Z/GAi7a/q0Qn+GFn0+6qMMvwyp3ZOE0+WYPQ1w==", - "dev": true, - "peerDependencies": { - "vue": "^3.0.0" - } - }, - "node_modules/vuepress": { - "version": "2.0.0-rc.12", - "resolved": "https://registry.npmmirror.com/vuepress/-/vuepress-2.0.0-rc.12.tgz", - "integrity": "sha512-yYAt5le/J8mbyxYAbp/jMg7GMVDYKMRxjWfunJrSYMwqzvrcPCSZZkEgDyOD8AlPIzsuieXROytytvDn/5M4wQ==", - "dev": true, - "dependencies": { - "@vuepress/cli": "2.0.0-rc.12", - "@vuepress/client": "2.0.0-rc.12", - "@vuepress/core": "2.0.0-rc.12", - "@vuepress/markdown": "2.0.0-rc.12", - "@vuepress/shared": "2.0.0-rc.12", - "@vuepress/utils": "2.0.0-rc.12", - "vue": "^3.4.27" - }, - "bin": { - "vuepress": "bin/vuepress.js", - "vuepress-vite": "bin/vuepress-vite.js", - "vuepress-webpack": "bin/vuepress-webpack.js" - }, - "engines": { - "node": ">=18.16.0" - }, - "peerDependencies": { - "@vuepress/bundler-vite": "2.0.0-rc.12", - "@vuepress/bundler-webpack": "2.0.0-rc.12", - "vue": "^3.4.0" - }, - "peerDependenciesMeta": { - "@vuepress/bundler-vite": { - "optional": true - }, - "@vuepress/bundler-webpack": { - "optional": true - } - } - }, - "node_modules/vuepress-plugin-md-enhance": { - "version": "2.0.0-rc.45", - "resolved": "https://registry.npmmirror.com/vuepress-plugin-md-enhance/-/vuepress-plugin-md-enhance-2.0.0-rc.45.tgz", - "integrity": "sha512-5Ygw/ZsEf9zQJ5louY2uwbLPxF6KY4SHGOaPgCIGfMygrqcElapXUP7+eodOnw0JwEKPQcZzdyWRUBHQxPwOSg==", - "dev": true, - "dependencies": { - "@mdit/plugin-alert": "^0.12.0", - "@mdit/plugin-align": "^0.12.0", - "@mdit/plugin-attrs": "^0.12.0", - "@mdit/plugin-container": "^0.12.0", - "@mdit/plugin-demo": "^0.12.0", - "@mdit/plugin-figure": "^0.12.0", - "@mdit/plugin-footnote": "^0.12.0", - "@mdit/plugin-img-lazyload": "^0.12.0", - "@mdit/plugin-img-mark": "^0.12.0", - "@mdit/plugin-img-size": "^0.12.0", - "@mdit/plugin-include": "^0.12.0", - "@mdit/plugin-katex-slim": "^0.12.0", - "@mdit/plugin-mark": "^0.12.0", - "@mdit/plugin-mathjax-slim": "^0.12.0", - "@mdit/plugin-plantuml": "^0.12.0", - "@mdit/plugin-spoiler": "^0.12.0", - "@mdit/plugin-stylize": "^0.12.0", - "@mdit/plugin-sub": "^0.12.0", - "@mdit/plugin-sup": "^0.12.0", - "@mdit/plugin-tab": "^0.12.0", - "@mdit/plugin-tasklist": "^0.12.0", - "@mdit/plugin-tex": "^0.12.0", - "@mdit/plugin-uml": "^0.12.0", - "@types/markdown-it": "^14.1.1", - "@vuepress/helper": "2.0.0-rc.31", - "@vuepress/plugin-sass-palette": "2.0.0-rc.31", - "@vueuse/core": "^10.9.0", - "balloon-css": "^1.2.0", - "js-yaml": "^4.1.0", - "vue": "^3.4.27", - "vuepress-shared": "2.0.0-rc.45" - }, - "engines": { - "node": ">=18.19.0", - "npm": ">=8", - "pnpm": ">=7", - "yarn": ">=2" - }, - "peerDependencies": { - "@types/reveal.js": "^5.0.0", - "@vue/repl": "^4.1.1", - "chart.js": "^4.0.0", - "echarts": "^5.0.0", - "flowchart.ts": "^2.0.0 || ^3.0.0", - "katex": "^0.16.0", - "kotlin-playground": "^1.23.0", - "markmap-lib": "^0.17.0", - "markmap-toolbar": "^0.17.0", - "markmap-view": "^0.17.0", - "mathjax-full": "^3.2.2", - "mermaid": "^10.8.0", - "reveal.js": "^5.0.0", - "sandpack-vue3": "^3.0.0", - "sass-loader": "^14.0.0", - "vuepress": "2.0.0-rc.12" - }, - "peerDependenciesMeta": { - "@types/reveal.js": { - "optional": true - }, - "@vue/repl": { - "optional": true - }, - "chart.js": { - "optional": true - }, - "echarts": { - "optional": true - }, - "flowchart.ts": { - "optional": true - }, - "katex": { - "optional": true - }, - "kotlin-playground": { - "optional": true - }, - "markmap-lib": { - "optional": true - }, - "markmap-toolbar": { - "optional": true - }, - "markmap-view": { - "optional": true - }, - "mathjax-full": { - "optional": true - }, - "mermaid": { - "optional": true - }, - "reveal.js": { - "optional": true - }, - "sandpack-vue3": { - "optional": true - }, - "sass-loader": { - "optional": true - } - } - }, - "node_modules/vuepress-plugin-md-enhance/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/vuepress-plugin-md-enhance/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/vuepress-plugin-search-pro": { - "version": "2.0.0-rc.45", - "resolved": "https://registry.npmmirror.com/vuepress-plugin-search-pro/-/vuepress-plugin-search-pro-2.0.0-rc.45.tgz", - "integrity": "sha512-EmOFmLPxknrtx/7X46mRPXFurZQMmHO8VZt9WVQaAgg5y4qhmgqQRyzJHdQ6+YlI5t1D+nwSagyibvGRIZNUCA==", - "dev": true, - "dependencies": { - "@vuepress/helper": "2.0.0-rc.31", - "@vuepress/plugin-sass-palette": "2.0.0-rc.31", - "@vueuse/core": "^10.9.0", - "cheerio": "1.0.0-rc.12", - "chokidar": "^3.6.0", - "slimsearch": "^2.1.1", - "vue": "^3.4.27", - "vuepress-shared": "2.0.0-rc.45" - }, - "engines": { - "node": ">=18.19.0", - "npm": ">=8", - "pnpm": ">=7", - "yarn": ">=2" - }, - "peerDependencies": { - "sass-loader": "^14.0.0", - "vuepress": "2.0.0-rc.12" - }, - "peerDependenciesMeta": { - "sass-loader": { - "optional": true - } - } - }, - "node_modules/vuepress-shared": { - "version": "2.0.0-rc.45", - "resolved": "https://registry.npmmirror.com/vuepress-shared/-/vuepress-shared-2.0.0-rc.45.tgz", - "integrity": "sha512-YFoCmB1kPgcQO+gRg2K1rXFmyLvkn4Ak8i0jRmSdpo92muLInB/t6GFG7VCZ+xBM88eu2rQW53BvNmWZ246xiQ==", - "dev": true, - "dependencies": { - "@vuepress/helper": "2.0.0-rc.31", - "@vueuse/core": "^10.9.0", - "cheerio": "1.0.0-rc.12", - "dayjs": "^1.11.11", - "execa": "^9.1.0", - "fflate": "^0.8.2", - "gray-matter": "^4.0.3", - "semver": "^7.6.2", - "vue": "^3.4.27" - }, - "engines": { - "node": ">=18.19.0", - "npm": ">=8", - "pnpm": ">=7", - "yarn": ">=2" - }, - "peerDependencies": { - "vuepress": "2.0.0-rc.12" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/yaml": { - "version": "2.4.2", - "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.4.2.tgz", - "integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==", - "dev": true, - "bin": { - "yaml": "bin.mjs" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/yoctocolors": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/yoctocolors/-/yoctocolors-2.0.2.tgz", - "integrity": "sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==", - "dev": true, - "engines": { - "node": ">=18" - } - } - } -} diff --git a/www/package.json b/www/package.json deleted file mode 100644 index bc99350..0000000 --- a/www/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "opendesign", - "version": "0.1.1", - "description": "A VuePress project", - "license": "MIT", - "type": "module", - "scripts": { - "docs:build": "vuepress build docs", - "docs:clean-dev": "vuepress dev docs --clean-cache", - "docs:dev": "vuepress dev docs", - "docs:update-package": "npx vp-update" - }, - "devDependencies": { - "@vuepress/bundler-vite": "^2.0.0-rc.7", - "@vuepress/plugin-blog": "^2.0.0-rc.11", - "@vuepress/plugin-catalog": "next", - "@vuepress/plugin-container": "^2.0.0-rc.0", - "@vuepress/plugin-google-analytics": "^2.0.0-rc.21", - "@vuepress/plugin-search": "next", - "@vuepress/plugin-seo": "next", - "@vuepress/plugin-sitemap": "next", - "@vuepress/theme-default": "^2.0.0-rc.11", - "vue": "^3.4.0", - "vue-social-sharing": "^4.0.0-alpha4", - "vuepress": "^2.0.0-rc.9", - "vuepress-plugin-md-enhance": "^2.0.0-rc.33", - "vuepress-plugin-search-pro": "^2.0.0-rc.39" - }, - "dependencies": { - "@vuepress/client": "^2.0.0-rc.9" - } -} diff --git a/www/test/test.js b/www/test/test.js deleted file mode 100644 index 7cf3a2b..0000000 --- a/www/test/test.js +++ /dev/null @@ -1,53 +0,0 @@ -const b = async () => { - const sourceDir = 'docs' - const { - loadUserConfig, - resolveAppConfig, - resolveCliAppConfig, - resolveUserConfigConventionalPath, - transformUserConfigToPlugin - } = await import('vuepress/cli') - - const { createBuildApp } = await import('vuepress/core') - console.log('createBuildApp') - - const cliAppConfig = resolveCliAppConfig(sourceDir, {}) - - // resolve user config file - const userConfigPath = resolveUserConfigConventionalPath(cliAppConfig.source) - - const { userConfig } = await loadUserConfig(userConfigPath) - - // resolve the final app config to use - const appConfig = resolveAppConfig({ - defaultAppConfig: {}, - cliAppConfig, - userConfig - }) - - if (appConfig === null) return - - const staticSiteApp = createBuildApp(appConfig) - - // use user-config plugin - staticSiteApp.use( - transformUserConfigToPlugin(userConfig, cliAppConfig.source) - ) - - // initialize and prepare - console.log('staticSiteApp.init') - await staticSiteApp.init() - console.log('staticSiteApp.prepare') - await staticSiteApp.prepare() - - // build - // TODO: update percent on build process - console.log('staticSiteApp.build') - await staticSiteApp.build() - - // process onGenerated hook - console.log('staticSiteApp.pluginApi.hooks.onGenerated.process') - await staticSiteApp.pluginApi.hooks.onGenerated.process(staticSiteApp) -} - -b()