@realsee/five 6.0.0-alpha.105 → 6.0.0-alpha.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FiveProviderType | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Five SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">如视 Five SDK</a></li><li><a href="../modules/react.html">react</a></li><li><a href="react.FiveProviderType.html">FiveProviderType</a></li></ul><h1>Type alias FiveProviderType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Five<wbr/>Provider<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">ReturnType</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-keyword">typeof </span><a href="../functions/react.createFiveProvider.html" class="tsd-signature-type tsd-kind-function">createFiveProvider</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in lib/react/createProvider.ts:163</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>如视 Five SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li><a href="../modules/five.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>five</a></li><li><a href="../modules/gltf_loader.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>gltf-loader</a></li><li><a href="../modules/line.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>line</a></li><li><a href="../modules/plugins.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>plugins</a></li><li><a href="../modules/react.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>react</a></li><li><a href="../modules/sticker.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>sticker</a></li><li><a href="../modules/vfx.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>vfx</a></li><li><a href="../modules/vue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>vue</a></li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg></body></html>
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FiveProviderType | 如视 Five SDK</title><meta name="description" content="Documentation for 如视 Five SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视 Five SDK</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">如视 Five SDK</a></li><li><a href="../modules/react.html">react</a></li><li><a href="react.FiveProviderType.html">FiveProviderType</a></li></ul><h1>Type alias FiveProviderType</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Five<wbr/>Provider<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">ReturnType</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-keyword">typeof </span><a href="../functions/react.createFiveProvider.html" class="tsd-signature-type tsd-kind-function">createFiveProvider</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in lib/react/createProvider.ts:164</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1"></use></svg><span>如视 Five SDK</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li><a href="../modules/five.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>five</a></li><li><a href="../modules/gltf_loader.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>gltf-loader</a></li><li><a href="../modules/line.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>line</a></li><li><a href="../modules/plugins.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>plugins</a></li><li><a href="../modules/react.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>react</a></li><li><a href="../modules/sticker.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>sticker</a></li><li><a href="../modules/vfx.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>vfx</a></li><li><a href="../modules/vue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2"></use></svg>vue</a></li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><svg style="display: none"><g id="icon-1"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-2"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g><g id="icon-16"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g><g id="icon-64"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g><g id="icon-4096"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.39 16V7.24H14.55V8.224H10.446V11.128H14.238V12.112H10.47V16H9.39Z" fill="var(--color-text)"></path></g><g id="icon-8192"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-16384"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g><g id="icon-32768"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g><g id="icon-65536"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-131072"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-524288"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-1048576"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g><g id="icon-2097152"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="#FF4D82" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M10.354 17V8.24H13.066C13.586 8.24 14.042 8.348 14.434 8.564C14.826 8.772 15.13 9.064 15.346 9.44C15.562 9.816 15.67 10.256 15.67 10.76C15.67 11.352 15.514 11.86 15.202 12.284C14.898 12.708 14.482 13 13.954 13.16L15.79 17H14.518L12.838 13.28H11.434V17H10.354ZM11.434 12.308H13.066C13.514 12.308 13.874 12.168 14.146 11.888C14.418 11.6 14.554 11.224 14.554 10.76C14.554 10.288 14.418 9.912 14.146 9.632C13.874 9.352 13.514 9.212 13.066 9.212H11.434V12.308Z" fill="var(--color-text)"></path></g><g id="icon-chevronDown"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></g><g id="icon-chevronSmall"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></g><g id="icon-menu"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></g><g id="icon-search"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></g><g id="icon-anchor"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g></svg></body></html>
package/five/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/6/19
5
- * Version: 6.0.0-alpha.105
4
+ * Generated: 2024/6/25
5
+ * Version: 6.0.0-alpha.106
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -2010,7 +2010,7 @@ void main() {
2010
2010
  #include <premultiplied_alpha_fragment>
2011
2011
 
2012
2012
  }
2013
- `},fo=function(n){pe(t,n);function t(e){var r=n.call(this,{uniforms:d.UniformsUtils.clone(va.uniforms),vertexShader:va.vertexShader,fragmentShader:va.fragmentShader,clipping:!0})||this;return r.type="LineMaterial",r.dashed=!1,Object.defineProperties(r,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(i){this.uniforms.diffuse.value=i}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(i){this.uniforms.linewidth.value=i}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(i){this.uniforms.dashScale.value=i}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(i){this.uniforms.dashSize.value=i}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(i){this.uniforms.gapSize.value=i}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(i){this.uniforms.opacity.value=i}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(i){this.uniforms.resolution.value.copy(i)}}}),r.setValues(e),r}return t}(d.ShaderMaterial);Object.assign(fo.prototype,{isLineMaterial:!0});var pu=function(n){pe(t,n);function t(e,r){var i=n.call(this)||this;return i.type="LineSegments2",i.geometry=e!==void 0?e:new co,i.material=r!==void 0?r:new fo({color:Math.random()*16777215}),i}return t.prototype.computeLineDistances=function(){for(var e=this.geometry,r=e.attributes.instanceStart,i=e.attributes.instanceEnd,a=new Float32Array(2*r.count),o=new d.Vector3,s=new d.Vector3,u=0,l=0,c=r.count;u<c;u++,l+=2)o.fromBufferAttribute(r,u),s.fromBufferAttribute(i,u),a[l]=l===0?0:a[l-1],a[l+1]=a[l]+o.distanceTo(s);var f=new d.InstancedInterleavedBuffer(a,2,1);return e.setAttribute("instanceDistanceStart",new d.InterleavedBufferAttribute(f,1,0)),e.setAttribute("instanceDistanceEnd",new d.InterleavedBufferAttribute(f,1,1)),this},t.prototype.raycast=function(e,r){e.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var i=e.ray,a=e.camera,o=a.projectionMatrix,s=this.geometry,u=this.material,l=u.resolution,c=u.linewidth,f=s.attributes.instanceStart,h=s.attributes.instanceEnd,m=new d.Vector4,A=new d.Vector4,p=new d.Vector4,g=new d.Vector3,v=new d.Matrix4,y=new d.Line3,b=new d.Vector3;i.at(1,p),p.w=1,p.applyMatrix4(a.matrixWorldInverse),p.applyMatrix4(o),p.multiplyScalar(1/p.w),p.x*=l.x/2,p.y*=l.y/2,p.z=0,g.copy(p);var w=this.matrixWorld;v.multiplyMatrices(a.matrixWorldInverse,w);for(var E=0,x=f.count;E<x;E++){m.fromBufferAttribute(f,E),A.fromBufferAttribute(h,E),m.w=1,A.w=1,m.applyMatrix4(v),A.applyMatrix4(v),m.applyMatrix4(o),A.applyMatrix4(o),m.multiplyScalar(1/m.w),A.multiplyScalar(1/A.w);var M=m.z<-1&&A.z<-1,C=m.z>1&&A.z>1;if(!(M||C)){m.x*=l.x/2,m.y*=l.y/2,A.x*=l.x/2,A.y*=l.y/2,y.start.copy(m),y.start.z=0,y.end.copy(A),y.end.z=0;var I=y.closestPointToPointParameter(g,!0);y.at(I,b);var T=d.MathUtils.lerp(m.z,A.z,I),P=T>=-1&&T<=1,F=g.distanceTo(b)<c*.5;if(P&&F){y.start.fromBufferAttribute(f,E),y.end.fromBufferAttribute(h,E),y.start.applyMatrix4(w),y.end.applyMatrix4(w);var R=new d.Vector3,O=new d.Vector3;i.distanceSqToSegment(y.start,y.end,O,R),r.push({point:O,pointOnLine:R,distance:i.origin.distanceTo(O),object:this,faceIndex:E})}}}},t}(d.Mesh);Object.assign(pu.prototype,{isLineSegments2:!0});var vu=function(n){pe(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.type="Line2",i}return t}(pu);Object.assign(vu.prototype,{isLine2:!0});var Au=function(n){pe(t,n);function t(){var e=n.call(this)||this;return e.type="LineGeometry",e}return t.prototype.setPositions=function(e){for(var r=e.length-3,i=new Float32Array(2*r),a=0;a<r;a+=3)i[2*a]=e[a],i[2*a+1]=e[a+1],i[2*a+2]=e[a+2],i[2*a+3]=e[a+3],i[2*a+4]=e[a+4],i[2*a+5]=e[a+5];return n.prototype.setPositions.call(this,i),this},t.prototype.setColors=function(e){for(var r=e.length-3,i=new Float32Array(2*r),a=0;a<r;a+=3)i[2*a]=e[a],i[2*a+1]=e[a+1],i[2*a+2]=e[a+2],i[2*a+3]=e[a+3],i[2*a+4]=e[a+4],i[2*a+5]=e[a+5];return n.prototype.setColors.call(this,i),this},t.prototype.fromLine=function(e){var r=e.geometry;if(r instanceof d.Geometry){var i=new d.BufferGeometry().fromGeometry(r);this.setPositions(i.attributes.position.array)}else r instanceof d.BufferGeometry&&this.setPositions(r.attributes.position.array);return this},t.prototype.copy=function(){return this},t}(co);Object.assign(Au.prototype,{isLineGeometry:!0});var dp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uY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wlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==",Vs=14467195,fp=8,hp=2,pp=20,Ns=null,Na=function(n){pe(t,n);function t(e,r){e===void 0&&(e=new d.Vector3),r===void 0&&(r=new d.Vector3);var i=n.call(this)||this;i.type="FiveLine",i.needsRender=!0;var a=new Au,o=new fo({color:Vs,linewidth:hp,dashScale:pp,dashed:!1});i.line=new vu(a,o);var s=new d.BufferGeometry,u=new d.PointsMaterial({color:Vs,size:fp,map:Ns||(Ns=new d.TextureLoader().load(dp)),sizeAttenuation:!1,transparent:!0});return i.points=new d.Points(s,u),i.points.renderOrder=11,i.points.frustumCulled=!1,i.setPoints(e,r),i.add(i.line,i.points),i}return Object.defineProperty(t,"version",{get:function(){return"6.0.0-alpha.105"},enumerable:!1,configurable:!0}),t.prototype.setPoints=function(e,r){var i=[].concat(e.toArray(),r.toArray());this.points.geometry.setAttribute("position",new d.BufferAttribute(new Float32Array(i),3)),this.line.geometry.setPositions(i),this.line.computeLineDistances(),this.needsRender=!0},t.prototype.getPoints=function(){var e=this.points.geometry.attributes.position.array;return[new d.Vector3(e[0],e[1],e[2]),new d.Vector3(e[3],e[4],e[5])]},t.prototype.setMaterial=function(e){var r=this.line.material;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];i==="dashed"?(r.dashed=a,a?r.defines.USE_DASH="":delete r.defines.USE_DASH,r.needsUpdate=!0):r[i]=e[i]}this.needsRender=!0},t.prototype.setResolution=function(e,r){var i=this.line.material.resolution;(i.x!==e||i.y!==r)&&(i.set(e,r),this.needsRender=!0)},t}(d.Object3D);Object.assign(Na.prototype,{isFiveLine:!0});var We={Handedness:Object.freeze({NONE:"none",LEFT:"left",RIGHT:"right"}),ComponentState:Object.freeze({DEFAULT:"default",TOUCHED:"touched",PRESSED:"pressed"}),ComponentProperty:Object.freeze({BUTTON:"button",X_AXIS:"xAxis",Y_AXIS:"yAxis",STATE:"state"}),ComponentType:Object.freeze({TRIGGER:"trigger",SQUEEZE:"squeeze",TOUCHPAD:"touchpad",THUMBSTICK:"thumbstick",BUTTON:"button"}),ButtonTouchThreshold:.05,AxisTouchThreshold:.1,VisualResponseProperty:Object.freeze({TRANSFORM:"transform",VISIBILITY:"visibility"})};function mu(n){return Ii(this,void 0,void 0,function(){var t;return Si(this,function(e){switch(e.label){case 0:return[4,fetch(n)];case 1:if(t=e.sent(),t.ok)return[2,t.json()];throw new Error(t.statusText)}})})}function vp(n){return Ii(this,void 0,void 0,function(){var t,e;return Si(this,function(r){switch(r.label){case 0:if(!n)throw new Error("No basePath supplied");return t="profilesList.json",[4,mu("".concat(n,"/").concat(t))];case 1:return e=r.sent(),[2,e]}})})}function Ap(n,t,e,r){return e===void 0&&(e=null),r===void 0&&(r=!0),Ii(this,void 0,void 0,function(){var i,a,o,s,u,l;return Si(this,function(c){switch(c.label){case 0:if(!n)throw new Error("No xrInputSource supplied");if(!t)throw new Error("No basePath supplied");return[4,vp(t)];case 1:if(i=c.sent(),n.profiles.some(function(f){var h=i[f];return h&&(a={profileId:f,profilePath:"".concat(t,"/").concat(h.path),deprecated:!!h.deprecated}),!!a}),!a){if(!e)throw new Error("No matching profile name found");if(o=i[e],!o)throw new Error('No matching profile name found and default profile "'.concat(e,'" missing.'));a={profileId:e,profilePath:"".concat(t,"/").concat(o.path),deprecated:!!o.deprecated}}return[4,mu(a.profilePath)];case 2:if(s=c.sent(),r){if(l=void 0,l=s.layouts[n.handedness],!l)throw new Error("No matching handedness, ".concat(n.handedness,", in profile ").concat(a.profileId));l.assetPath&&(u=a.profilePath.replace("profile.json",l.assetPath))}return[2,{profile:s,assetPath:u}]}})})}var mp={xAxis:0,yAxis:0,button:0,state:We.ComponentState.DEFAULT};function gp(n,t){n===void 0&&(n=0),t===void 0&&(t=0);var e=n,r=t,i=Math.sqrt(n*n+t*t);if(i>1){var a=Math.atan2(t,n);e=Math.cos(a),r=Math.sin(a)}var o={normalizedXAxis:e*.5+.5,normalizedYAxis:r*.5+.5};return o}var yp=function(){function n(t){this.componentProperty=t.componentProperty,this.states=t.states,this.valueNodeName=t.valueNodeName,this.valueNodeProperty=t.valueNodeProperty,this.valueNodeProperty===We.VisualResponseProperty.TRANSFORM&&(this.minNodeName=t.minNodeName,this.maxNodeName=t.maxNodeName),this.value=0,this.updateFromComponent(mp)}return n.prototype.updateFromComponent=function(t){var e=t.xAxis,r=t.yAxis,i=t.button,a=t.state,o=gp(e,r),s=o.normalizedXAxis,u=o.normalizedYAxis;switch(this.componentProperty){case We.ComponentProperty.X_AXIS:this.value=this.states.includes(a)?s:.5;break;case We.ComponentProperty.Y_AXIS:this.value=this.states.includes(a)?u:.5;break;case We.ComponentProperty.BUTTON:this.value=this.states.includes(a)?i:0;break;case We.ComponentProperty.STATE:this.valueNodeProperty===We.VisualResponseProperty.VISIBILITY?this.value=this.states.includes(a):this.value=this.states.includes(a)?1:0;break;default:throw new Error("Unexpected visualResponse componentProperty ".concat(this.componentProperty))}},n}(),bp=function(){function n(t,e){var r=this;if(!t||!e||!e.visualResponses||!e.gamepadIndices||Object.keys(e.gamepadIndices).length===0)throw new Error("Invalid arguments supplied");this.id=t,this.type=e.type,this.rootNodeName=e.rootNodeName,this.touchPointNodeName=e.touchPointNodeName,this.visualResponses={},Object.keys(e.visualResponses).forEach(function(i){var a=new yp(e.visualResponses[i]);r.visualResponses[i]=a}),this.gamepadIndices=Object.assign({},e.gamepadIndices),this.values={state:We.ComponentState.DEFAULT,button:this.gamepadIndices.button!==void 0?0:void 0,xAxis:this.gamepadIndices.xAxis!==void 0?0:void 0,yAxis:this.gamepadIndices.yAxis!==void 0?0:void 0}}return Object.defineProperty(n.prototype,"data",{get:function(){var t=k({id:this.id},this.values);return t},enumerable:!1,configurable:!0}),n.prototype.updateFromGamepad=function(t){var e=this;if(this.values.state=We.ComponentState.DEFAULT,this.gamepadIndices.button!==void 0&&t.buttons.length>this.gamepadIndices.button){var r=t.buttons[this.gamepadIndices.button];this.values.button=r.value,this.values.button=this.values.button<0?0:this.values.button,this.values.button=this.values.button>1?1:this.values.button,r.pressed||this.values.button===1?this.values.state=We.ComponentState.PRESSED:(r.touched||this.values.button>We.ButtonTouchThreshold)&&(this.values.state=We.ComponentState.TOUCHED)}this.gamepadIndices.xAxis!==void 0&&t.axes.length>this.gamepadIndices.xAxis&&(this.values.xAxis=t.axes[this.gamepadIndices.xAxis],this.values.xAxis=this.values.xAxis<-1?-1:this.values.xAxis,this.values.xAxis=this.values.xAxis>1?1:this.values.xAxis,this.values.state===We.ComponentState.DEFAULT&&Math.abs(this.values.xAxis)>We.AxisTouchThreshold&&(this.values.state=We.ComponentState.TOUCHED)),this.gamepadIndices.yAxis!==void 0&&t.axes.length>this.gamepadIndices.yAxis&&(this.values.yAxis=t.axes[this.gamepadIndices.yAxis],this.values.yAxis=this.values.yAxis<-1?-1:this.values.yAxis,this.values.yAxis=this.values.yAxis>1?1:this.values.yAxis,this.values.state===We.ComponentState.DEFAULT&&Math.abs(this.values.yAxis)>We.AxisTouchThreshold&&(this.values.state=We.ComponentState.TOUCHED)),Object.values(this.visualResponses).forEach(function(i){i.updateFromComponent(e.values)})},n}(),wp=function(){function n(t,e,r){var i=this;if(!t)throw new Error("No xrInputSource supplied");if(!e)throw new Error("No profile supplied");this.xrInputSource=t,this.assetUrl=r,this.id=e.profileId,this.layoutDescription=e.layouts[t.handedness],this.components={},Object.keys(this.layoutDescription.components).forEach(function(a){var o=i.layoutDescription.components[a];i.components[a]=new bp(a,o)}),this.updateFromGamepad()}return Object.defineProperty(n.prototype,"gripSpace",{get:function(){return this.xrInputSource.gripSpace},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"targetRaySpace",{get:function(){return this.xrInputSource.targetRaySpace},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){var t=[];return Object.values(this.components).forEach(function(e){t.push(e.data)}),t},enumerable:!1,configurable:!0}),n.prototype.updateFromGamepad=function(){var t=this;Object.values(this.components).forEach(function(e){e.updateFromGamepad(t.xrInputSource.gamepad)})},n}(),Ep="https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles",xp="generic-trigger",Mp=function(n){pe(t,n);function t(){var e=n.call(this)||this;return e.motionController=null,e.envMap=null,e}return t.prototype.setEnvironmentMap=function(e){var r=this;return this.envMap==e?this:(this.envMap=e,this.traverse(function(i){i instanceof d.Mesh&&i.isMesh&&(i.material.envMap=r.envMap,i.material.needsUpdate=!0)}),this)},t.prototype.updateMatrixWorld=function(e){n.prototype.updateMatrixWorld.call(this,e),this.motionController&&(this.motionController.updateFromGamepad(),Object.values(this.motionController.components).forEach(function(r){Object.values(r.visualResponses).forEach(function(i){var a=i.valueNode,o=i.minNode,s=i.maxNode,u=i.value,l=i.valueNodeProperty;a&&(l===We.VisualResponseProperty.VISIBILITY?a.visible=u:l===We.VisualResponseProperty.TRANSFORM&&(a.quaternion.copy(o.quaternion).slerp(s.quaternion,u),a.position.lerpVectors(o.position,s.position,u)))})}))},t}(Bn.Object3D);function Cp(n,t){Object.values(n.components).forEach(function(e){var r=e.type,i=e.touchPointNodeName,a=e.visualResponses;if(r===We.ComponentType.TOUCHPAD)if(e.touchPointNode=t.getObjectByName(i),e.touchPointNode){var o=new Bn.SphereGeometry(.001),s=new Bn.MeshBasicMaterial({color:255}),u=new Bn.Mesh(o,s);e.touchPointNode.add(u)}else console.warn("Could not find touch dot, ".concat(e.touchPointNodeName,", in touchpad component ").concat(e.id));Object.values(a).forEach(function(l){var c=l.valueNodeName,f=l.minNodeName,h=l.maxNodeName,m=l.valueNodeProperty;if(m===We.VisualResponseProperty.TRANSFORM){if(l.minNode=t.getObjectByName(f),l.maxNode=t.getObjectByName(h),!l.minNode){console.warn("Could not find ".concat(f," in the model"));return}if(!l.maxNode){console.warn("Could not find ".concat(h," in the model"));return}}l.valueNode=t.getObjectByName(c),l.valueNode||console.warn("Could not find ".concat(c," in the model"))})})}function zs(n,t){Cp(n.motionController,t),n.envMap&&t.traverse(function(e){e instanceof d.Mesh&&e.isMesh&&(e.material.envMap=n.envMap,e.material.needsUpdate=!0)}),n.add(t)}var Ip=function(){function n(t){t===void 0&&(t=null),this.gltfLoader=t,this.path=Ep,this._assetCache={}}return n.prototype.createControllerModel=function(t){var e=this,r=new Mp,i=null;return t.addEventListener("connected",function(a){var o=a.data;o.targetRayMode!=="tracked-pointer"||!o.gamepad||Ap(o,e.path,xp).then(function(s){var u=s.profile,l=s.assetPath;r.motionController=new wp(o,u,l);var c=e._assetCache[r.motionController.assetUrl];if(c)i=c.scene.clone(),zs(r,i);else{if(!e.gltfLoader)throw new Error("GLTFLoader not set.");e.gltfLoader.load(r.motionController.assetUrl,function(f){e._assetCache[r.motionController.assetUrl]=f,i=f.scene.clone(),zs(r,i)})}}).catch(function(s){console.warn(s)})}),t.addEventListener("disconnected",function(){r.motionController=null,r.remove(i),i=null}),r},n}();function Sp(n,t){if(!t)return n;var e=n.match(/\d+_[a-z].png/);return n.substring(0,e.index)+t+"/"+n.substring(e.index)}var Qs=300,Tp=new d.Matrix4().makeRotationAxis(new d.Vector3(0,1,0),Math.PI),Ds=new d.Vector3(-1,1,1),Pp=function(n){pe(t,n);function t(e){var r=n.call(this,e)||this;r.xrManager=new cp(r.renderer,r.renderer.getContext(),{onSessionStart:function(u){r.emit("xr.session.start",J("xr.session.start",{session:u,machineType:r.xrManager.machineType}))},onSessionEnd:function(){r.emit("xr.session.end",J("xr.session.end",{session:null,machineType:r.xrManager.machineType}))}}),r.xrControllerRay={left:new d.Raycaster,right:new d.Raycaster},r.xrControllerRay.left.params.Points={threshold:.1},r.xrControllerRay.right.params.Points={threshold:.1},r.pointerLines={left:new Na,right:new Na},r.pointerLines.left.visible=!1,r.pointerLines.right.visible=!0,r.pointerLines.left.setMaterial({color:new d.Vector3(1,1,1)}),r.pointerLines.left.points.material.depthTest=!1,r.pointerLines.right.setMaterial({color:new d.Vector3(1,1,1)}),r.pointerLines.right.points.material.depthTest=!1,r.scene.add(r.pointerLines.left,r.pointerLines.right),r.panoResources={},r.panoResources[r.locationMotion.keyframes[0].key=r.locationMotion.keyframes[1].key=wt()]={panoId:Ue(r.currentPano),leftPanoPicture:null,position:r.camera.pose.offset.clone(),effect:"fade",fixCameraTransform:new d.Matrix4},r.parallaxCameraMatrixs=[];var i=ut.shared.getContext();if(!i)return console.error("获取session失败,请退出重试"),r;r.on("xr.session.end",function(){r.scene.remove(r.pointerLines.left,r.pointerLines.right)}),r.xrManager.setSession(i),r.controllerWrappers=[new d.Group,new d.Group],r.scene.add(r.controllerWrappers[0],r.controllerWrappers[1]);var a=r.xrManager.getController(0);r.controllerWrappers[0].add(a);var o=r.xrManager.getController(1);r.controllerWrappers[1].add(o);var s=new Ip;return s.gltfLoader={load:function(u,l){vi.ajax(u,{responseType:"arraybuffer"}).then(function(c){var f;return _a(c.body,{resourcePath:u.slice(0,u.lastIndexOf("/")+1),search:(f=u.split("?")[1])!==null&&f!==void 0?f:"",fetcher:vi})}).then(function(c){return l(c)})}},r.on("xr.session.start",function(){var u=r.xrManager.getControllerGrip(0);u.add(s.createControllerModel(u)),r.controllerWrappers[0].add(u);var l=r.xrManager.getControllerGrip(1);l.add(s.createControllerModel(l)),r.controllerWrappers[1].add(l)}),r.xrControllerState={LeftAxesUp:{touchStartTime:0,touchStart:!1},LeftAxesDown:{touchStartTime:0,touchStart:!1},LeftAxesLeft:{touchStartTime:0,touchStart:!1},LeftAxesRight:{touchStartTime:0,touchStart:!1},LeftTrigger:{touchStartTime:0,touchStart:!1},LeftPinch:{touchStartTime:0,touchStart:!1},RightAxesUp:{touchStartTime:0,touchStart:!1},RightAxesDown:{touchStartTime:0,touchStart:!1},RightAxesLeft:{touchStartTime:0,touchStart:!1},RightAxesRight:{touchStartTime:0,touchStart:!1},RightTrigger:{touchStartTime:0,touchStart:!1},RightPinch:{touchStartTime:0,touchStart:!1},Y:{touchStartTime:0,touchStart:!1},X:{touchStartTime:0,touchStart:!1},A:{touchStartTime:0,touchStart:!1},B:{touchStartTime:0,touchStart:!1}},r}return t.parseArgs=function(e){if(e instanceof t)return e;var r=k(k({},e),{maxLatitude:Math.PI/2,minLatitude:-Math.PI/2});return n.parseArgs.call(this,r)},t.initAnimationEndState=function(e){var r=this.parseArgs(e),i=n.initAnimationEndState.call(this,r);return k(k({},i),{mode:"XRPanorama"})},t.prototype.moveToPano=function(e,r,i){var a=this,o,s,u,l,c=(o=r.effect)!==null&&o!==void 0?o:"fade";this.userAction=i,this.stopMomentumMovement();var f=this.works.getResolvedObserver(e);if(!f)throw new Error("Invalid PanoIndex");var h=zn(f.images.up),m=this.imageOptions.size;typeof m=="undefined"&&f&&h&&(m=Number(h)),typeof m=="undefined"&&(m=2048);var A=this.imageOptions.transform,p=function(P,F){return Sp(Ai(P,A,F))},g=k({key:"pano.".concat(f.panoId)},Er(this.imageOptions,["format","size","quality"])),v=f.images,y=(u=(s=f.images.tiles)===null||s===void 0?void 0:s.filter(function(P){return P.size>m}))!==null&&u!==void 0?u:null,b="pano:"+On([v,g,A]);if(this.pendingTextureTask){if(this.pendingTextureTask.hash===b)return;var w=this.pendingTextureTask.panoId;(l=this.panoMeshes[w])===null||l===void 0||l.setProgress(0),this.emit("pano.texture.abort",J("pano.texture.abort",{error:null,progress:0,meta:null,pano:f.pano})),this.pendingTextureTask.onError(new Error("texture aborted"))}var E=this.models.getMaterial()||{},x=E.pano0,M=E.pano1,C;if((x==null?void 0:x.map.name)===b?C=x:(M==null?void 0:M.map.name)===b&&(C=M),C){var I={panoId:f.panoId,effect:c,leftPanoPicture:{zoom:1,map:C.map,luminanceMap:C.luminanceMap,matrix:new d.Matrix4().compose(f.position,f.quaternion,Ds)},position:f.position.clone(),fixCameraTransform:new d.Matrix4};this.doMoveToPano(f.pano,I,r);return}var T="move-to-pano-"+f.panoId;this.pending.add(T),this.pendingTextureTask={panoId:f.panoId,hash:b,onLoad:function(P){if(a.pending.delete(T),a.destroyed)P.body.dispose();else{P.body.name=b;var F={panoId:f.panoId,effect:c,leftPanoPicture:{zoom:1,map:P.body,luminanceMap:null,matrix:new d.Matrix4().compose(f.position,f.quaternion,Ds)},position:f.position.clone(),fixCameraTransform:new d.Matrix4};a.doMoveToPano(f.pano,F,r)}},onError:function(P){a.pending.delete(T);var F=k(k(k({},f.pano),{mode:a.mode}),_e(a.camera.pose));a.emit("pano.error",J("pano.error",{error:P,userAction:a.userAction,options:r,prevPano:a.currentPano,progress:0,state:F})),a.emit("pano.cancel",J("pano.cancel",{error:null,userAction:a.userAction,options:r,prevPano:a.currentPano,progress:0,state:F})),r.moveCancelCallback&&r.moveCancelCallback()}},Promise.all([this.tileLevelForFov&&y&&y.length?this.textureLoader.loadTiledCubeTexture(v,y,{tileMaxLevel:this.TILED_CUBE_TEXTURE_LEVEL,imageURL:{transform:p,options:g},format:d.RGBAFormat,minFilter:d.LinearFilter,magFilter:d.LinearFilter,generateMipmaps:!1,viaAjax:!0,fetcher:nt(f.work)},void 0,void 0,function(P){var F,R;a.emit("pano.texture.progress",J("pano.texture.progress",{error:null,progress:P,meta:null,pano:f.pano})),((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b&&((R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(P))},this.renderer):this.textureLoader.loadCubeTexture(v,{imageURL:{transform:p,options:g},format:d.RGBAFormat,fetcher:nt(f.work)},void 0,void 0,function(P){var F,R;((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b&&((R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(P)),a.emit("pano.texture.progress",J("pano.texture.progress",{error:null,progress:P,meta:null,pano:f.pano}))},this.renderer)]).then(function(P){var F,R,O=P[0];((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b?(a.pendingTextureTask.onLoad(O),(R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(0),delete a.pendingTextureTask,a.emit("pano.texture.success",J("pano.texture.success",{error:null,progress:1,meta:O.meta,pano:f.pano}))):O.body.dispose()}).catch(function(P){var F,R;((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b&&(a.pendingTextureTask.onError(P),(R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(0),delete a.pendingTextureTask,a.emit("pano.texture.error",J("pano.texture.error",{error:P,progress:0,meta:null,pano:f.pano})),a.emit("error",P))}),this.emit("pano.texture.load",J("pano.texture.load",{error:null,progress:0,meta:null,pano:f.pano}))},t.prototype.doMoveToPano=function(e,r,i){var a=this,o,s,u,l,c,f,h,m,A,p;i===void 0&&(i={});var g=Me(),v=wt();this.panoResources[v]=r;var y=1,b,w,E;if(this.locationMotion.ended){var x=this.locationMotion.getKeyFrameSegment(g);x[0];var M=x[1],C=this.locationMotion.value,I=this.panoResourceFromLocationMotionKeyframe(M).position,T=r.position;b=Math.max(I.distanceTo(T),y),w=[{key:M.key,progress:0,value:k(k({},C),{count:0})},{key:v,progress:1,value:{distance:0,count:1}}],E=0}else{var P=this.locationMotion.getKeyFrameSegment(g),F=P[0],M=P[1],C=this.locationMotion.value,R=this.panoResourceFromLocationMotionKeyframe(F).position,I=this.panoResourceFromLocationMotionKeyframe(M).position,T=r.position,O=M.value.count-C.count,L=Math.max(R.distanceTo(I),y)*O,z=Math.max(I.distanceTo(T),y);b=L+z,w=[{key:F.key,progress:0,value:k({},C)},{key:M.key,progress:L/b,value:M.value},{key:v,progress:1,value:{count:M.value.count+1,distance:0}}];var N=this.locationMotionKeyframesLength(this.locationMotion.keyframes),W=this.locationMotionKeyframesLength(w);E=this.locationMotion.getProgressVelocity(g)*N/W}var j=r.effect==="instant"?0:this.calculateMovingDuration(i.duration,r.effect==="fly"?b:0),D={longitude:i.longitude,latitude:i.latitude,fov:i.fov},H=k(k({},e),{mode:this.mode,longitude:(o=D.longitude)!==null&&o!==void 0?o:this.camera.pose.longitude,latitude:(s=D.latitude)!==null&&s!==void 0?s:this.camera.pose.latitude,fov:(u=D.fov)!==null&&u!==void 0?u:this.camera.pose.fov,offset:r.position.clone(),distance:0}),K=this.currentPano;if(this.emit("pano.moveTo",J("pano.moveTo",{options:i,prevPano:K,progress:0,state:H,userAction:this.userAction,error:null})),i.moveStartCallback&&i.moveStartCallback(H),this.videoTexture&&this.videoTexture.image instanceof HTMLVideoElement&&this.videoTexture.image.getAttribute("src")&&(this.videoTexture.image.pause(),this.videoTexture.image.removeAttribute("uuid"),this.videoTexture.image.removeAttribute("src"),this.videoTexture.image.oncanplay=Q,this.videoTexture.needsUpdate=!0),this.panoVideo.setMaterial(null),r.effect==="fly")this.cameraMotion.set(D,j).catch(Q);else{var Z=Vt({longitude:this.cameraMotion.value.longitude,latitude:this.cameraMotion.value.latitude}),G=Vt({longitude:(l=D.longitude)!==null&&l!==void 0?l:this.cameraMotion.value.longitude,latitude:(c=D.latitude)!==null&&c!==void 0?c:this.cameraMotion.value.latitude}),X=new d.Object3D;X.lookAt(Z);var _=new d.Matrix4().makeRotationFromQuaternion(X.quaternion);X.lookAt(G);var de=new d.Matrix4().makeRotationFromQuaternion(X.quaternion),ee=new d.Matrix4().getInverse(_).premultiply(de),oe=this.cameraMotion.value.fov,ie=(f=D.fov)!==null&&f!==void 0?f:this.cameraMotion.value.fov,ue=1;r.effect==="zoomin"?ue=1.5:r.effect==="zoomout"&&(ue=.4);for(var ne=ie*ue,ae=0;ae<w.length-1;ae++){var he=w[ae].key;if(he){var ve=this.panoResources[he];ve&&(ve.fixCameraTransform.copy(ee),ve.leftPanoPicture&&(ve.leftPanoPicture.zoom=Math.tan(oe/2/180*Math.PI)/Math.tan(ne/2/180*Math.PI)))}}this.cameraMotion.setKeyframes([{progress:0,value:{longitude:this.cameraMotion.value.longitude,latitude:this.cameraMotion.value.latitude,fov:this.cameraMotion.value.fov}},{progress:0,value:{longitude:(h=D.longitude)!==null&&h!==void 0?h:this.cameraMotion.value.longitude,latitude:(m=D.latitude)!==null&&m!==void 0?m:this.cameraMotion.value.latitude,fov:ne}},{progress:1,value:{longitude:(A=D.longitude)!==null&&A!==void 0?A:this.cameraMotion.value.longitude,latitude:(p=D.latitude)!==null&&p!==void 0?p:this.cameraMotion.value.latitude,fov:ie}}],j).catch(Q)}var we=this.locationMotion.setKeyframes(w,j,E);we.then(function(){for(var xe,Be,$,te=0,q=a.models;te<q.length;te++){var Le=q[te];Le.show()}var Pe=k(k({},e),{mode:a.mode,longitude:a.camera.pose.longitude,latitude:a.camera.pose.latitude,fov:a.camera.pose.fov,offset:a.camera.pose.offset.clone(),distance:0});a.emit("pano.arrived",J("pano.arrived",{options:i,prevPano:K,progress:1,state:Pe,userAction:a.userAction,error:null})),i.moveEndCallback&&i.moveEndCallback(Pe);var Se=a.works.getResolvedObserver(a.currentPano);if(Se&&Se.video&&a.videoTexture&&a.videoTexture.image instanceof HTMLVideoElement){var De=Tp.clone().multiply(($=(Be=(xe=a.models.getMaterial())===null||xe===void 0?void 0:xe.pano1)===null||Be===void 0?void 0:Be.matrix)!==null&&$!==void 0?$:new d.Matrix4).multiply(Se.video.matrix),ge={map:a.videoTexture,size:Se.video.size,matrix:De,alpha:1},ye=wt(),me=a.videoTexture.image;me.setAttribute("uuid",ye),iu().then(function(be){be&&Se.video&&me.getAttribute("uuid")===ye&&(me.oncanplay=function(){me.oncanplay=Q,me.play()},me.ontimeupdate=function(){me.currentTime>.5&&(me.ontimeupdate=Q,a.panoVideo.setMaterial(ge))},me.src=Se.video.source)}).catch(function(){me.removeAttribute("uuid")})}},function(){a.emit("pano.cancel",J("pano.cancel",{options:i,prevPano:K,progress:0,state:H,userAction:a.userAction,error:null})),i.moveCancelCallback&&i.moveCancelCallback()})},t.prototype.checkSelectedPano=function(e){var r=this,i,a,o,s;this.stopMomentumMovement();var u=this.camera.getDirection(new d.Vector3).setY(0),l=null,c=this.works.getResolvedObserver(this.currentPano);if(!c)return null;var f=c.accessibleIds.filter(function(G){var X=ft(G);if(Xt(X,r.currentPano))return!1;var _=r.works.getResolvedObserver(X);return!_||_.position.distanceTo(r.camera.position)>r.maxAccessibleDistance?!1:_.loadable||_.active}),h=this.models.intersectRaycaster(e)[0];if(h){var m=sr(f,function(G){var X=r.works.getResolvedObserver(G);if(!X)return 1/0;var _=X.standingPosition.clone();return _.distanceTo(h.point)},!0),A=m[0],p=m[1];A&&p<this.panoTapTriggerRadius&&(l=(i=this.works.getResolvedObserver(A))!==null&&i!==void 0?i:null)}if(Ls(l)){var g=this.getForwardObserverOrNot(e);g&&(l=g)}for(var v=0,y=this.locationMotion.keyframes;v<y.length;v++){var b=y[v],w=this.panoResourceFromLocationMotionKeyframe(b);if(!(b.progress<this.locationMotion.progress)&&l&&w.panoId===l.panoId){l=null;break}}if(Ls(l))return this.locationMotion.ended===!0&&this.cameraBounce(),null;if(l&&!l.active){var E=l.panoId;this.panoMeshes[E]&&(this.panoMeshes[E].setDisabled(!1),this.panoMeshes[E].setLoading(!0))}var x={};if(l){for(var M=Math.PI/6,C=Math.PI/12,I=new d.Vector3(0,1,0),T=l.position.clone().setY(0).sub(c.position.clone().setY(0)).normalize(),P=T.clone().applyAxisAngle(I,M),F=T.clone().applyAxisAngle(I,-M),R=[],O=[],L=[],z=0,N=l.accessibleIds;z<N.length;z++){var A=N[z],W=ft(A);if(!(Xt(W,this.currentPano)||Xt(W,l.pano))){var j=this.works.getResolvedObserver(A);if(j){var D=j.position.clone().sub(l.position).setY(0);T.angleTo(D)<M?L.push(D):P.angleTo(D)<M?R.push(D):F.angleTo(D)<M&&O.push(D)}}}var H=L.length>0?L:yt(yt([],R,!0),O,!0),K=H.slice().sort(function(G,X){return G.angleTo(T)-X.angleTo(T)})[0];K&&K.angleTo(u)>C&&(x.longitude=Math.atan2(-K.x,-K.z))}this.cameraMotion.value.latitude<-Math.PI/4&&(x.latitude=ce(0,this.minLatitude,this.maxLatitude)),this.cameraMotion.value.fov<60&&(x.fov=this.defaultFov);var Z={workCode:l.pano.workCode,panoIndex:l.pano.panoIndex,mode:this.mode,longitude:(a=x.longitude)!==null&&a!==void 0?a:this.camera.pose.longitude,latitude:(o=x.latitude)!==null&&o!==void 0?o:this.camera.pose.latitude,fov:(s=x.fov)!==null&&s!==void 0?s:this.camera.pose.fov,distance:0,offset:l?l.position.clone():new d.Vector3};return this.emit("pano.select",J("pano.select",{prevPano:this.currentPano,state:Z,userAction:!0,options:x,progress:0,error:null})),l&&l.active?(this.emit("pano.request",J("pano.request",{userAction:!0,prevPano:this.currentPano,progress:0,state:Z,options:x,error:null})),l.pano):null},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.isReady=function(){return!1},t.prototype.updateCamera=function(e,r,i){return Promise.resolve()},t.prototype.updateCameraWithKeyframes=function(e,r,i){return Promise.resolve()},t.prototype.updateTime=function(e,r){for(var i=this,a,o,s,u,l,c,f,h,m=[],A=2;A<arguments.length;A++)m[A-2]=arguments[A];this.userAction=!0;var p={},g={},v=this.panoResourceFromLocationMotionKeyframe(this.locationMotion.keyframes[0]),y=this.panoResourceFromLocationMotionKeyframe(this.locationMotion.keyframes[this.locationMotion.keyframes.length-1]),b=!1;if(this.cameraMotion.ended===!1&&(this.cameraMotion.update(e),g.longitude=this.cameraMotion.value.longitude,g.latitude=this.cameraMotion.value.latitude,g.fov=this.cameraMotion.value.fov),this.modelAlphaMotion.ended===!1&&(this.modelAlphaMotion.update(e),p.modelAlpha=this.modelAlphaMotion.value.modelAlpha),this.perspToOrthoMotion.ended===!1&&(this.perspToOrthoMotion.update(e),this.camera.perspToOrtho.setScalar(ce(this.perspToOrthoMotion.value.perspToOrtho,0,1))),this.locationMotion.ended===!1){this.locationMotion.update(e);var w=this.locationMotion.getKeyFrameSegment(e),E=w[0],x=w[1],M=this.panoResourceFromLocationMotionKeyframe(E),C=this.panoResourceFromLocationMotionKeyframe(x),I=new d.Vector3().copy(M.position),T=new d.Vector3().copy(C.position),P=this.locationMotion.value.count-x.value.count+1;p.progress=P,C.leftPanoPicture&&(P<1?M.leftPanoPicture&&(p.pano0=M.leftPanoPicture):p.pano0=C.leftPanoPicture,p.pano1=C.leftPanoPicture),C.effect==="montage"?p.transition="BLACK":C.effect==="spread"?p.transition="SPREAD":p.transition="FADE",(C.effect==="zoomin"||C.effect==="zoomout")&&(p.progress=Math.pow(P,3)),P<1&&C.effect!=="fly"&&(p.pano0&&M.leftPanoPicture&&(p.pano0={map:p.pano0.map,zoom:p.pano0.zoom,luminanceMap:p.pano0.luminanceMap,matrix:M.leftPanoPicture.matrix.clone().setPosition(C.position)}),I.copy(T),b=!0),g.distance=this.locationMotion.value.distance,g.offset=new d.Vector3(I.x+(T.x-I.x)*P,I.y+(T.y-I.y)*P,I.z+(T.z-I.z)*P);for(var F=[],R=[],O=0,L=this.locationMotion.keyframes;O<L.length;O++){var z=L[O],N=z.key,W=z.progress;N!==void 0&&(F.push(N),W>this.locationMotion.progress&&R.push(N))}for(var j=0,D=Object.keys(this.panoResources);j<D.length;j++){var H=D[j];if(!(R.indexOf(H)>=0)){var K=this.panoResources[H];if(K.leftPanoPicture){var Z=K.leftPanoPicture.map;if(Z){if(Z===((a=p.pano0)===null||a===void 0?void 0:a.map)||Z===((o=p.pano1)===null||o===void 0?void 0:o.map))continue;Z instanceof ze&&Z.cubeRenderTarget&&this.colorCubeRenderTargetPool.push(Z.cubeRenderTarget),Z.dispose(),K.leftPanoPicture=null}}F.indexOf(H)>=0||delete this.panoResources[H]}}this.currentPano=ft(C.panoId),this.emit("pano.moving",J("pano.moving",{userAction:this.userAction,prevPano:ft(v.panoId),state:k(k(k(k({},ft(y.panoId)),{mode:this.mode}),_e(this.camera.pose)),g),options:{},progress:this.locationMotion.progress,error:null}))}Qt(p)===!1&&(!((s=p.pano0)===null||s===void 0)&&s.map&&p.pano0.map instanceof ze&&!p.pano0.map.cubeRenderTarget&&(p.pano0.map.cubeRenderTarget=this.colorCubeRenderTargetPool.pop()),!((u=p.pano1)===null||u===void 0)&&u.map&&p.pano1.map instanceof ze&&!p.pano1.map.cubeRenderTarget&&(p.pano1.map.cubeRenderTarget=this.colorCubeRenderTargetPool.pop()),this.models.setMaterial(p)),Qt(g)===!1&&this.setCamera(g);var G=this.works.getResolvedObserver(this.currentPano),X=m[1];if(!X){console.error("xrFrame丢失,请重试");return}if(!this.xrManager.session){console.error("session丢失,请重试");return}var _=this.xrManager.referenceSpace;if(_){var de=this.xrManager.cameraVR,ee=this.xrManager.cameraL,oe=this.xrManager.cameraR,ie=[ee,oe],ue=X.getViewerPose(_),ne=new d.Vector3(0,0,0);if(ue){var ae;ae=this.xrManager.session.renderState.baseLayer;var he=ue.views;if(!ae){console.error("no layer found");return}this.renderer.setFramebuffer(ae.framebuffer);var ve=!1;he.length!==de.cameras.length&&(de.cameras.length=0,ve=!0),this.parallaxCameraMatrixs=[];var we=new d.Vector3,xe=new d.Vector3;new d.Matrix4().fromArray(he[0].transform.matrix).decompose(we,new d.Quaternion,new d.Vector3),new d.Matrix4().fromArray(he[1].transform.matrix).decompose(xe,new d.Quaternion,new d.Vector3),xe.clone().sub(we).normalize();var Be=new d.Vector3,$=new d.Quaternion,te=new d.Vector3;this.camera.matrix.decompose(Be,$,te);for(var q=0;q<he.length;q++){var Le=he[q],Pe=ae.getViewport(Le),Se=ie[q];Se.matrix.fromArray(Le.transform.matrix);var De=new d.Vector3,ge=new d.Quaternion,ye=new d.Vector3;Se.matrix.decompose(De,ge,ye),ne.copy(Be),Se.position.copy(Be),Se.quaternion.copy(ge),Se.scale.copy(ye),Se.updateMatrix(),Se.projectionMatrix.fromArray(Le.projectionMatrix),Se.viewport.set(Pe.x,Pe.y,Pe.width,Pe.height),ve===!0&&de.cameras.push(Se)}ue.views[0].transform.position,ue.views[1].transform.position;for(var me=this.xrManager.session.inputSources,q=0;q<this.xrManager.controllers.length;q++){var be=this.xrManager.controllers[q],Ae=me[q];if(Ae){be.update(Ae,X,_);var Ne=this.xrManager.getController(q),Qe=new d.Vector3(0,1.2,0),Ke=Ne.position.clone().add(ne).sub(Qe);Ae.handedness==="left"?this.xrControllerRay.left.set(Ke,new d.Vector3(0,0,-1).applyEuler(Ne.rotation)):Ae.handedness==="right"&&this.xrControllerRay.right.set(Ke,new d.Vector3(0,0,-1).applyEuler(Ne.rotation)),this.controllerWrappers[q].position.copy(new d.Vector3(0,0,0).add(ne).sub(Qe));var at=this.models.intersectRaycaster(this.xrControllerRay.right);if(at.length===0&&(at=this.xrControllerRay.right.intersectObject(this.boundingMesh,!0).map(function(ot){var vt;return k({floor:(vt=G==null?void 0:G.floorIndex)!==null&&vt!==void 0?vt:0},ot)})),at.length>=1&&at[0].face)if(Ae.handedness==="right"){var Oe=this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene,!0),St=at[0].face.normal,Tt=St.clone(),Dt=at[0].point.clone();this.intersectMesh.position.copy(Dt);var $r=Dt.clone().add(Tt);if(this.intersectMesh.lookAt($r),Math.abs(St.y)>.99){var lr=this.camera.position.clone().sub(Dt);this.intersectMesh.rotation.z=-Math.atan2(lr.z,lr.x)}this.intersectMesh.visible=!0,this.needsRender=!0,Oe.length>0?(this.pointerLines.right.setPoints(Ke,Oe[0].point),this.pointerLines.right.points.visible=!0,this.intersectMesh.visible=!1):(this.pointerLines.right.points.visible=!1,this.pointerLines.right.setPoints(Ke,at[0].point));var ht=at[0],Zt=J("intersect.update",{raycaster:(l=this.xrControllerRay.right)!==null&&l!==void 0?l:null,intersection:ht!=null?ht:null,object:this.intersectMesh});if(this.emit("intersect.update",Zt),Zt.defaultPrevented){this.hideIntersectMesh();return}}else this.pointerLines.left.setPoints(Ke,at[0].point)}}if(this.camera.pose.distance>.1||b)for(var xr=0,Ut=Object.keys(this.panoMeshes);xr<Ut.length;xr++){var pt=Ut[xr],ke=this.panoMeshes[pt];ke.setOpacity(0),ke.setCurrent(!1),ke.updateTime&&ke.updateTime(e,r),ke.visible=!1}else if(G){var cr=sr(G.visibleIds,function(rt){var ot=i.works.getResolvedObserver(rt);return ot?G.standingPosition.distanceTo(ot.standingPosition):1/0},!0),qt=cr[1];qt=ce(qt,2.5,1/0);for(var dr=G.visibleIds.concat(Ue(this.currentPano)),Et=this.getForwardObserverOrNot(),fr=this.camera.getDirection(new d.Vector3),Yt=0,Pt=Object.keys(this.panoMeshes);Yt<Pt.length;Yt++){var pt=Pt[Yt],ke=this.panoMeshes[pt],xt=this.works.getResolvedObserver(pt);if(dr.indexOf(pt)===-1)ke.setCurrent(!1),ke.setOpacity(0);else if(!xt)ke.setCurrent(!1),ke.setOpacity(0);else if(!xt.loadable&&!xt.active)ke.setCurrent(!1),ke.setOpacity(0);else{var hr=ke.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);ke.setCurrent(!ke.loading&&ke.progress===0&&Et!==null&&Et.panoId===pt),ke.setOpacity(hr<.01?0:ce(qt/hr*1.2,.65,.98));var Ur=this.camera.position.clone().setY(ke.position.y),Mr=new d.Vector3().copy(ke.position).sub(Ur).normalize();if(pt===Ue(this.currentPano)){var qr=ce((.5-Ur.distanceTo(ke.position))/.5,0,1);Mr.multiplyScalar(1-qr).add(fr.clone().multiplyScalar(qr))}Mr.length()>0&&ke.quaternion.setFromEuler(new d.Euler(0,Math.atan2(Mr.x,Mr.z),0))}ke.updateTime&&ke.updateTime(e,r)}}var Cr=function(){if(i.tileLevelForFov===!1)return 0;var rt=new d.Vector2(4e3,4e3),ot=y.panoId,vt=i.works.getResolvedObserver(ot),At=i.imageOptions.size;if(typeof At=="undefined"&&vt){var Jn=vt.images.up.match(/\/cube_(\d+)\//);Jn&&(At=Number(Jn[1]))}typeof At=="undefined"&&(At=2048);var Hr=0;At>=1024&&(Hr=1),At>=2048&&(Hr=2),At>=4096&&(Hr=3),At>=8192&&(Hr=4);var Gr=i.tileLevelForFov(ee.fov,rt);return Gr>Hr?Gr:0}(),$t=function(){var rt=new d.PerspectiveCamera;rt.applyMatrix4(de.matrix),rt.position.set(0,0,0);var ot=i.works.getResolvedObserver(y.panoId),vt=ot!=null?ot:G;vt&&rt.quaternion.premultiply(vt.quaternion.clone().inverse()),rt.updateProjectionMatrix(),rt.updateMatrixWorld(!0);var At=new d.Frustum().setFromProjectionMatrix(new d.Matrix4().multiplyMatrices(rt.projectionMatrix,rt.matrixWorldInverse));return At}();y.panoId===Ue(this.currentPano)&&((c=y.leftPanoPicture)===null||c===void 0?void 0:c.map)instanceof ze&&(y.leftPanoPicture.map.update($t,Cr),y.leftPanoPicture.map.needsRender===!0&&(this.needsRender=!0));{var tt=this.tiling.object.visible;if(Cr>this.TILED_CUBE_TEXTURE_LEVEL&&this.initAnimationed){var qe=y.panoId,je=this.works.getResolvedObserver(qe);je?Kn(this.camera.position,je.position)&&this.locationMotion.ended?(this.tiling.object.visible=!0,this.tiling.panoId!==qe&&this.tiling.cleanup(),this.tiling.panoId=qe,this.tiling.setResource((h=(f=je.images)===null||f===void 0?void 0:f.tiles)!==null&&h!==void 0?h:[],this.enableIOSEDR&&je.images.luminance?je.images.luminance:null),this.tiling.setFetcher(nt(je.work)),this.tiling.setRotation(je.quaternion),this.tiling.setPosition(je.position),this.tiling.update($t,Cr,e)):this.tiling.object.visible=!1:this.tiling.object.visible=!1}else this.tiling.object.visible=!1;tt!==this.tiling.object.visible&&(this.tiling.object.needsRender=!0)}this.panoVideo.object.position.copy(this.camera.position),this.panoVideo.updateTime(e),!(!me||me.length<1)&&this.updateControllerHelper(me,e,r)}}},t.prototype.render=function(){var e=this.xrManager.getCamera(this.camera);this.renderer.render(this.scene,e)},t.prototype.onPanGesture=function(){},t.prototype.onTapGesture=function(){},t.prototype.onPinchGesture=function(){},t.prototype.onMouseMove=function(){},t.prototype.onMouseOut=function(){},t.prototype.panoResourceFromLocationMotionKeyframe=function(e){return this.panoResources[e.key]},t.prototype.updateControllerHelper=function(e,r,i){var a=this.xrControllerRay.left,o=this.xrControllerRay.right;if(!(!e||e.length===0)){for(var s={buttons:{X:!1,Y:!1,LeftTrigger:!1,LeftPinch:!1,A:!1,B:!1,RightTrigger:!1,RightPinch:!1}},u=0;u<e.length;u++){var l=e[u].handedness,c=e[u].gamepad;switch(l){case"left":c.axes&&(this.emitEvent(c.axes[2]===-1,"LeftAxesLeft",r),this.emitEvent(c.axes[2]===1,"LeftAxesRight",r),this.emitEvent(c.axes[3]===-1,"LeftAxesUp",r),this.emitEvent(c.axes[3]===1,"LeftAxesDown",r)),c!=null&&c.buttons&&(c.buttons[4]&&this.emitEvent(c.buttons[4].pressed,"X",r),c.buttons[5]&&this.emitEvent(c.buttons[5].pressed,"Y",r),c.buttons[0]&&this.emitEvent(c.buttons[0].pressed,"LeftTrigger",r),c.buttons[1]&&this.emitEvent(c.buttons[1].pressed,"LeftPinch",r));var f={raycaster:a,axes:{up:c.axes&&c.axes[3]<0?Math.abs(c.axes[3]):0,down:c.axes&&c.axes[3]<0?0:Math.abs(c.axes[3]),left:c.axes&&c.axes[2]<0?Math.abs(c.axes[2]):0,right:c.axes&&c.axes[2]<0?0:Math.abs(c.axes[2])},deltaTime:i};s.buttons.X=c.buttons&&c.buttons[4]?c.buttons[4].pressed:!1,s.buttons.Y=c.buttons&&c.buttons[5]?c==null?void 0:c.buttons[5].pressed:!1,s.buttons.LeftTrigger=c.buttons&&c.buttons[0]?c==null?void 0:c.buttons[0].pressed:!1,s.buttons.LeftPinch=c.buttons&&c.buttons[1]?c==null?void 0:c.buttons[1].pressed:!1,s.left=f;break;case"right":c.axes&&(this.emitEvent(c.axes[2]===-1,"RightAxesLeft",r),this.emitEvent(c.axes[2]===1,"RightAxesRight",r),this.emitEvent(c.axes[3]===-1,"RightAxesUp",r),this.emitEvent(c.axes[3]===1,"RightAxesDown",r)),c.buttons&&(c.buttons[4]&&this.emitEvent(c.buttons[4].pressed,"A",r),c.buttons[5]&&this.emitEvent(c.buttons[5].pressed,"B",r),c.buttons[0]&&this.emitEvent(c.buttons[0].pressed,"RightTrigger",r),c.buttons[1]&&this.emitEvent(c.buttons[1].pressed,"RightPinch",r));var h={raycaster:o,axes:{up:c.axes&&c.axes[3]<0?Math.abs(c.axes[3]):0,down:c.axes&&c.axes[3]<0?0:Math.abs(c.axes[3]),left:c.axes&&c.axes[2]<0?Math.abs(c.axes[2]):0,right:c.axes&&c.axes[2]<0?0:Math.abs(c.axes[2])},deltaTime:i};s.right=h,s.buttons.A=c.buttons&&c.buttons[4]?c==null?void 0:c.buttons[4].pressed:!1,s.buttons.B=c.buttons&&c.buttons[5]?c==null?void 0:c.buttons[5].pressed:!1,s.buttons.RightTrigger=c.buttons&&c.buttons[0]?c==null?void 0:c.buttons[0].pressed:!1,s.buttons.RightPinch=c.buttons&&c.buttons[1]?c==null?void 0:c.buttons[1].pressed:!1;break}}this.emit("xr.controller.update",J("xr.controller.update",s))}},t.prototype.emitEvent=function(e,r,i){var a=this.xrControllerRay.left,o=this.xrControllerRay.right;if(e)if(this.xrControllerState[r].touchStart===!1)this.xrControllerState[r].touchStartTime=i,this.xrControllerState[r].touchStart=!0,this.emit("xr.gesture.buttonDown",J("xr.gesture.buttonDown",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!1,isFirst:!0,controllers:{raycaster:{leftRay:a,rightRay:o}}}));else{var s=i-this.xrControllerState[r].touchStartTime;s>Qs&&this.emit("xr.gesture.press",J("xr.gesture.tap",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!0,isFirst:!0,controllers:{raycaster:{leftRay:a,rightRay:o}}}))}else if(this.xrControllerState[r].touchStart===!0){this.emit("xr.gesture.buttonUp",J("xr.gesture.buttonUp",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!0,isFirst:!1,controllers:{raycaster:{leftRay:a,rightRay:o}}}));var s=i-this.xrControllerState[r].touchStartTime;if(s<=Qs){var u=J("xr.gesture.tap",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!0,isFirst:!1,controllers:{raycaster:{leftRay:a,rightRay:o}}}),l=this.emit("xr.gesture.tap",u);!l&&!u.defaultPrevented&&r==="RightTrigger"&&this.checkSelectedPano(this.xrControllerRay.right)}this.xrControllerState[r].touchStart=!1,this.xrControllerState[r].touchStartTime=0}},t}(so),Ft={Floorplan:Va,Topview:Wf,Panorama:so,VRPanorama:Wh,Model:_h,Mapview:sp,XRPanorama:Pp},gu=["gesture.pan","gesture.tap","gesture.press","gesture.pinch","gesture.mousewheel","gesture.mousemove","gesture.momentum","initAnimation.start","initAnimation.end","camera.update","intersect.update","pano.select","pano.moveTo","pano.moving","pano.arrived","pano.cancel","pano.error","pano.texture.load","pano.texture.progress","pano.texture.success","pano.texture.error","pano.texture.abort","xr.session.start","xr.session.end","xr.gesture.tap","xr.gesture.press","xr.gesture.buttonUp","xr.gesture.buttonDown","xr.controller.update"];function Bp(n){n.on("initAnimation.start",function(t){n.emit("initAnimationWillStart",t.state.panoIndex,t.state,t.userAction)}),n.on("initAnimation.end",function(t){n.emit("initAnimationEnded",t.state.panoIndex,t.state,t.userAction)}),n.on("gesture.pan",function(t){var e=!1;e=n.emit("wantsGesture","pan",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsPanGesture",t.state,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","pan",t.pointers,t.isFinal),n.emit("panGesture",t.state,t.isFinal))}),n.on("gesture.tap",function(t){var e=!1;e=n.emit("wantsGesture","tap",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsTapGesture",t.center.raycaster,t.center.coords,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","tap",t.pointers,t.isFinal),n.emit("tapGesture",t.center.raycaster,t.center.coords,t.isFinal))}),n.on("gesture.press",function(t){var e=!1;e=n.emit("wantsGesture","press",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsPressGesture",t.center.raycaster,t.center.coords,t.center.delta,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","press",t.pointers,t.isFinal),n.emit("pressGesture",t.center.raycaster,t.center.coords,t.center.delta,t.isFinal))}),n.on("gesture.pinch",function(t){var e=!1;e=n.emit("wantsGesture","pinch",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsPinchGesture",t.scale,t.state.fov,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","pinch",t.pointers,t.isFinal),n.emit("pinchGesture",t.scale,t.state.fov,t.isFinal))}),n.on("gesture.mousewheel",function(t){var e=!1;e=n.emit("wantsGesture","mouseWheel",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsMouseWheel",t.center.delta,t.state.fov,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","mouseWheel",t.pointers,t.isFinal),n.emit("mouseWheel",t.center.delta,t.state.fov,t.isFinal))}),n.on("gesture.mousemove",function(t){var e=!1;e=n.emit("wantsGesture","mouseMove",t.pointers,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","mouseMove",t.pointers,t.isFinal),e=n.emit("wantsChangeCameraFov",t.state.fov),e&&t.preventDefault())}),n.on("gesture.momentum",function(t){var e=!1;e=n.emit("wantsInteriaPan",t.state),e&&t.preventDefault(),t.defaultPrevented||n.emit("interiaPan",t.state,t.isFinal)}),n.on("camera.update",function(t){n.emit("cameraFovUpdate",t.state.fov,t.userAction),n.emit("cameraDirectionUpdate",t.state,t.userAction);var e=Vt(t.state);e.setLength(t.state.distance);var r=t.state.offset.clone().sub(e);n.emit("cameraPositionUpdate",r,t.userAction),n.emit("cameraUpdate",t.state,t.userAction)}),n.on("intersect.update",function(t){if(t.intersection){var e=!1;e=n.emit("wantsShowIntersectionOnModel",t.raycaster),e&&t.preventDefault(),t.defaultPrevented||n.emit("intersectionOnModelUpdate",t.intersection,t.object)}else n.emit("intersectionHidden")}),n.on("pano.request",function(t){var e=n.emit("wantsMoveToPano",t.state.panoIndex,t.options,t.userAction);e||(e=n.emit("wantsToMoveToPano",t.state.panoIndex,t.options,t.userAction)),e&&t.preventDefault(),t.defaultPrevented||n.emit("panoWillLoad",t.state.panoIndex)}),n.on("pano.select",function(t){n.emit("panoSelected",t.state.panoIndex)}),n.on("pano.moveTo",function(t){n.emit("panoLoaded",t.state.panoIndex),n.emit("moveToPano",t.state.panoIndex,t.userAction),n.emit("panoWillArrive",t.state.panoIndex,t.state,t.userAction)}),n.on("pano.moving",function(t){n.emit("movingToPano",t.state.panoIndex,t.prevPano.panoIndex,t.progress)}),n.on("pano.arrived",function(t){n.emit("panoArrived",t.state.panoIndex,t.state,t.userAction)}),n.on("pano.cancel",function(t){n.emit("moveToPanoCanceled",t.state.panoIndex)}),n.on("pano.error",function(t){n.emit("panoLoadError",t.error,t.state.panoIndex)}),n.on("pano.texture.load",function(t){n.emit("textureStartLoad",t.pano.panoIndex)}),n.on("pano.texture.success",function(t){n.emit("textureLoaded",t.pano.panoIndex,t.meta)}),n.on("pano.texture.error",function(t){n.emit("textureError",t.error,t.pano.panoIndex)}),n.on("pano.texture.abort",function(t){n.emit("textureAbort",t.pano.panoIndex)}),n.on("pano.texture.progress",function(t){n.emit("textureLoading",t.progress,t.pano.panoIndex)}),n.on("xr.session.start",function(t){n.emit("webXRSessionStart")}),n.on("xr.session.end",function(t){n.emit("webXRSessionEnd")}),n.on("xr.gesture.tap",function(t){n.emit("webXRControllerEvent","tap",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.gesture.press",function(t){n.emit("webXRControllerEvent","press",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.gesture.buttonUp",function(t){n.emit("webXRControllerEvent","buttonUp",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.gesture.buttonDown",function(t){n.emit("webXRControllerEvent","buttonDown",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.controller.update",function(t){n.emit("webXRControllerRayUpdate",{leftRay:t.left?t.left.raycaster:void 0,rightRay:t.right?t.right.raycaster:void 0}),t.left&&n.emit("webXRAxesUpdate","left",{raycaster:{leftRay:t.left?t.left.raycaster:void 0,rightRay:t.right?t.right.raycaster:void 0},axesState:{up:t.left.axes.up,down:t.left.axes.down,left:t.left.axes.left,right:t.left.axes.right},deltaTime:t.left.deltaTime}),t.right&&n.emit("webXRAxesUpdate","right",{raycaster:{leftRay:t.left?t.left.raycaster:void 0,rightRay:t.right?t.right.raycaster:void 0},axesState:{up:t.right.axes.up,down:t.right.axes.down,left:t.right.axes.left,right:t.right.axes.right},deltaTime:t.right.deltaTime})}),n.on("works.request",function(t){n.emit("willLoad",t.input,t.works[0],t.state)}),n.on("works.load",function(t){n.emit("load",t.input,t.works[0],t.state)}),n.on("works.ready",function(t){n.emit("loaded",t.input,t.works[0])}),n.on("state.change",function(t){n.emit("stateChange",t.state,t.userAction)}),n.on("currentState.change",function(t){n.emit("currentStateChange",t.state,t.userAction)}),n.on("state.set",function(t){n.emit("setState",t.state)}),n.on("state.synced",function(t){n.emit("stateSynced",t.state)}),n.on("model.request",function(t){n.emit("modelWillLoad",t.work.model)}),n.on("model.error",function(t){n.emit("modelLoadError",t.error,t.model)}),n.on("model.load",function(t){n.emit("modelLoaded",t.model)}),n.on("model.changeShownFloor",function(t){n.emit("modelShownFloorChange",t.model.shownFloor,t.model.floorLength)}),n.on("render",function(t){n.emit("renderFrame",t.needsRender)}),n.on("mode.change.request",function(t){n.emit("wantsChangeMode",t.mode,t.prevMode)}),n.on("mode.change",function(t){n.emit("modeChange",t.mode,t.prevMode,t.state.panoIndex,t.state,t.userAction)}),n.on("helpers.visible",function(t){n.emit("helpersVisibleChange",t.object.visible)}),n.on("network.resource",function(t){n.emit("network",t.source,t.requestType,t.requestState,t.detail)})}function Rp(){if(typeof window!="undefined"){var n=document.createElement("video");n.loop=!0,n.autoplay=!0,n.playsInline=!0,n.muted=!0,n.crossOrigin="";var t=function(){document.removeEventListener("touchstart",t,!1),document.removeEventListener("mousedown",t,!1),n.muted=!1};return document.addEventListener("touchstart",t,!1),document.addEventListener("mousedown",t,!1),n}else return{}}function Fp(n){{var t=new d.DirectionalLight(16777215,.3);t.position.copy(new d.Vector3(1,1,1)),n.add(t)}{var t=new d.DirectionalLight(16777215,.1);t.position.copy(new d.Vector3(-1,-1,-1)),n.add(t)}{var t=new d.DirectionalLight(16777215,.1);n.add(t)}{var t=new d.AmbientLight(16777215,.6);n.add(t)}}function kp(n){for(var t,e,r={},i=n.split(/(\;|\,)/),a=0,o=i;a<o.length;a++){var s=o[a],u=s.split("="),l=(t=u[0])===null||t===void 0?void 0:t.trim(),c=(e=u[1])===null||e===void 0?void 0:e.trim();l&&c&&(r[l]=c)}return r}function yu(){var n;if(typeof document!="undefined")for(var t=document.getElementsByTagName("meta"),e=0;e<t.length;e++){var r=t[e];if(r.getAttribute("name")==="viewport"){var i=kp((n=r.getAttribute("content"))!==null&&n!==void 0?n:""),a=Number(i["initial-scale"]);if(!isNaN(a))return a}}return 1}const Lp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV8AAAA/CAQAAADtPwPkAAAR+0lEQVR4AezYg3LEQACH8d1cbdu23Q5qG9G47z/TN/h6tn2b/H+TUTLc7yjcOXV46OUAnUs6EbUp022ZBXc1NhoZYYd7fjDRvdcHAwrlK2QBVJ4sgoqONmY45RUT23sZ6H42F2hK5CtkMbjhZlDmUUcvq1zyieUVyjbE4I1GBfItwxG56YaUZTQwyh4P6NgJ4YYYvCuQb5kOyI03pORjiqe4Lwpq5pt1vJqfUwKWJVbSMYfppYconG+maNNQOWBZuwHTzicGel75NtFOkxr5apmV8cikcko0DrDQs863AeGl0cE0+1xy573m0/wf0cEKW6H7BWtggiMG8sy3oHRDpJMw4NWb6am/bv9znkqEzjd61t5oo5clTrjhwevO75EJRBKSRt745Z16ZEjcM73sccZplBPm8PyTcxZAkSRdHm/acJ0Z3JZhHB0BxqDHgWFZFmm0ZbCw87twI/zc3e/Cz93vPneXtU/WdQS3oTviXdY/q5PsJKfoGuQjZuO/0in1qsj85cuXrxqeAOJpGqdJOqrUutgVl2Qb0BWqp/RE8AWWVB7t2KrIzY2Wx2fWKl7yfswgxqj8lYummYa3hfwF9MuQRmbfQE4ocPDjtUWQ6Tq1M2w7gC2EcrMGtWS6xlpGKEDDcb1vUQ25zT4lrC2s0dU4gFPppKkbeIYr7N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rPGWMF58TWr5viyJAP5/4EV4KePiaSE8eNRgjDy8/tyRW+FZjhS+2tlovNJovtJovNJ0uhK6Wo64SDdxEbM//KesjwAAAABJRU5ErkJggg==";var Us=[351,63],qs=[20,20],Op=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),Vp=new Float32Array([0,0,1,0,0,1,1,1]),Np=new Uint8Array([0,1,2,1,3,2]),Li=new d.BufferGeometry;Li.setAttribute("position",new d.BufferAttribute(Op,3));Li.setAttribute("uv",new d.BufferAttribute(Vp,2));Li.setIndex(new d.BufferAttribute(Np,1));var hi=new d.MeshBasicMaterial({transparent:!0,depthTest:!1,depthWrite:!1,stencilWrite:!1,fog:!1}),bu=new d.Mesh(Li,hi);bu.matrixAutoUpdate=!1;var ho=new d.Scene;ho.add(bu);ho.matrixAutoUpdate=!1;var jn=new d.OrthographicCamera(-.5,.5,.5,-.5,.1,1);jn.position.set(0,0,.5);jn.lookAt(0,0,0);jn.updateMatrixWorld(!0);jn.matrixAutoUpdate=!1;var zp=new d.Vector4,Qp=new d.Vector4;function Hs(n){if(hi.map){var r=n.getViewport(zp),i=n.getScissor(Qp),a=n.getScissorTest(),o=n.autoClear,s=i.x+qs[0]/3,u=i.y+qs[1]/3,l=Us[0]/3,c=Us[1]/3;n.setViewport(s,u,l,c),n.setScissor(s,u,l,c),n.setScissorTest(!0),n.autoClear=!1,n.render(ho,jn),n.setViewport(r),n.setScissor(i),n.setScissorTest(a),n.autoClear=o}else{var t=new d.Texture,e=new Image;e.onload=function(){t.image=e,t.wrapS=d.ClampToEdgeWrapping,t.wrapT=d.ClampToEdgeWrapping,t.minFilter=d.LinearFilter,t.needsUpdate=!0,t.generateMipmaps=!1,hi.needsUpdate=!0,e.onload=Q},e.src=Lp,hi.map=t}}var Dp=800,Gs=90,Up=function(n){return n.replace("//vrlab-public.ljcdn.com/","//vr-public.realsee-cdn.cn/").replace("//vrlab-image4.ljcdn.com/","//vr-image-4.realsee-cdn.cn/").replace("//vrlab-image3.ljcdn.com/","//vr-image-3.realsee-cdn.cn/").replace("//vrlab-image2.ljcdn.com/","//vr-image-2.realsee-cdn.cn/").replace("//vrlab-image1.ljcdn.com/","//vr-image-1.realsee-cdn.cn/")},En=new d.Vector2,ii=new d.Frustum,ai=new d.Matrix4,Ks=new WeakMap,Aa=new WeakMap,js=Ra([]),wu=function(n){pe(t,n);function t(e){e===void 0&&(e={});var r,i,a,o,s,u,l,c,f,h=n.call(this)||this;if(h.ident=wt(),typeof window!="undefined"&&(za.instances[h.ident]=h),h.renderSwitch01=0,h.currentMode="Panorama",h.pano={workCode:"",panoIndex:0},h.needsRender=!1,h.onlyRenderIfNeeds=(r=e.onlyRenderIfNeeds)!==null&&r!==void 0?r:!0,h.imageOptions=k({},(i=e.imageOptions)!==null&&i!==void 0?i:{}),h.textureOptions=k({},(a=e.textureOptions)!==null&&a!==void 0?a:{}),h.poweredByRealsee=(o=e.poweredByRealsee)!==null&&o!==void 0?o:!0,h.extraElements=[],h.controllerInits={Panorama:Object.assign({},e.panorama),Model:Object.assign({},e.model),Floorplan:Object.assign({},e.floorplan),Topview:Object.assign({},e.topview),Mapview:Object.assign({},e.mapview),VRPanorama:Object.assign({},e.vrPanorama),XRPanorama:Object.assign({},e.xrPanorama)},h.fps={testCount:0,testTime:Me()},h.info=null,h.modeChangeDuration=(s=e.modeChangeDuration)!==null&&s!==void 0?s:Dp,h.enableWheel=(u=e.enableWheel)!==null&&u!==void 0?u:!0,typeof window!="undefined")if("renderer"in e)e.renderer instanceof Jr&&h.throwError(new Error("cannot render a internal renderer")),h.renderer=e.renderer;else try{h.renderer=new Jr({preserveDrawingBuffer:e.preserveDrawingBuffer,backgroundColor:e.backgroundColor,backgroundAlpha:e.backgroundAlpha,antialias:e.antialias,webgl2:e==null?void 0:e.webgl2});var m=yu();h.renderer.setPixelRatio(m===1?window.devicePixelRatio:1),h.renderer.setSize(512,512)}catch(M){M instanceof Error&&h.throwError(M)}h.getPixelsRenderTarget=new d.WebGLRenderTarget(1,1,{encoding:(c=(l=h.renderer)===null||l===void 0?void 0:l.outputEncoding)!==null&&c!==void 0?c:d.sRGBEncoding}),h.scissor=Object.assign({left:0,bottom:0,width:1,height:1},e.scissor),h.camera=new Pi(Gs),h.scene=new f0,h.xrCustomObjectsScene=new d.Scene,h.scene.add(h.xrCustomObjectsScene),h.scene.matrixAutoUpdate=!1,h.lastLoadWorkTask=Promise.resolve(),h.requestProxy=(f=e.requestProxy)!==null&&f!==void 0?f:Up,h.networkSubscribe=new e0,h.networkSubscribe.on("network",function(M,C,I,T){var P;h.emit("network.resource",J("network.resource",{source:M,requestType:C,requestState:I,detail:T})),(P=h.analysis)===null||P===void 0||P.network(h.works,M,C,I,T)}),h.boundingMesh=Uf(new d.Box3(new d.Vector3(-.5,-.5,-.5),new d.Vector3(.5,.5,.5))),h.boundingMesh.name="bounding",h.scene.add(h.boundingMesh),h.models=ms(),h.models.push(new ka),h.lastModels=ms(),h.lastWorks=Ra([]),h.readyCallbacks=[],h.syncingState=!1,h.modelGroup=new d.Group,h.modelGroup.visible=!1,h.modelGroup.name="model",h.modelGroup.matrixAutoUpdate=!1,h.modelGroup.renderOrder=-4,h.scene.add(h.modelGroup),h.helperGroup=new d.Group,h.helperGroup.name="helper",h.helperGroup.matrixAutoUpdate=!1,h.scene.add(h.helperGroup),h.videoTexture=new d.VideoTexture(e.videoInstance||Rp()),Fp(h.scene),h.copyEffect=new Fi(h.renderer,h.scene,h.camera,h.models),h.state={mode:h.currentMode,workCode:h.pano.workCode,panoIndex:h.pano.panoIndex,longitude:h.camera.pose.longitude,latitude:h.camera.pose.latitude,fov:h.camera.pose.fov,offset:h.camera.pose.offset.clone(),distance:h.camera.pose.distance},h.stateSynced=!1,h._enableIOSEDR=!1,h.destroyed=!1,h.paused=!0,typeof window!="undefined"&&(e.play!==!1&&h.play(),h.stopAnimationLoop=ut.shared.add(function(M,C){for(var I=[],T=2;T<arguments.length;T++)I[T-2]=arguments[T];h.updateTime.apply(h,yt([M,C],I,!1))},!1,0,10));var A=function(){typeof document!="undefined"&&document.fullscreenElement===null&&h.currentMode==="VRPanorama"&&h.controller.emit("vr.requestExit",J("vr.requestExit",{}))},p=function(){h.needsRender=!0};if(typeof document!="undefined"&&document.addEventListener("fullscreenchange",A,!1),h.renderer&&h.renderer.domElement.addEventListener("webglcontextrestored",p,!1),h.removeEventListeners=function(){typeof document!="undefined"&&document.removeEventListener("fullscreenchange",A,!1),h.renderer&&h.renderer.domElement.removeEventListener("webglcontextrestored",p,!1)},h.plugins={},e.plugins&&e.plugins.length)for(var g=0,v=e.plugins;g<v.length;g++){var y=v[g];if(typeof y=="function")y(h);else if(Array.isArray(y)){var b=y[0],w=y[1],E=y[2];if(typeof b=="function"){var x=b(h,E);typeof w=="string"&&(h.plugins[w]?h.throwError(new Error("plugin name ".concat(w," is exists."))):h.plugins[w]=x)}}}return h.gpuPickingRenderTarget=new d.WebGLRenderTarget(1,1),h.meshReplaceMaterialMap=new Map,h.meshOriginMaterialMap=new Map,Bp(h),h}return Object.defineProperty(t,"version",{get:function(){return"6.0.0-alpha.105"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"dracoPath",{get:function(){return wi.decoderPath},set:function(e){wi.setDecoderPath(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"ktx2Path",{get:function(){return Ln.transcoderPath},set:function(e){Ln.setTranscoderPath(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panoIndex",{get:function(){return this.pano.panoIndex},enumerable:!1,configurable:!0}),t.prototype.getGPUPicking=function(e,r,i,a,o){var s=this;if(a===void 0&&(a=1),o===void 0&&(o=new d.Vector3(0,0,0)),!this.renderer)throw new Error("renderer is not initialized.");this.models.setMaterial({constantColor:o}),this.scene.traverse(function(f){if(!(!(f instanceof d.Mesh)||f instanceof It)){var h=Object.keys(i).filter(function(A){return A===f.uuid})[0];if(h)if(s.meshOriginMaterialMap.set(h,f.material),s.meshReplaceMaterialMap.get(h))f.material=s.meshReplaceMaterialMap.get(h);else{var m=new d.ShaderMaterial({uniforms:{color:{value:i[h]}},vertexShader:`
2013
+ `},fo=function(n){pe(t,n);function t(e){var r=n.call(this,{uniforms:d.UniformsUtils.clone(va.uniforms),vertexShader:va.vertexShader,fragmentShader:va.fragmentShader,clipping:!0})||this;return r.type="LineMaterial",r.dashed=!1,Object.defineProperties(r,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(i){this.uniforms.diffuse.value=i}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(i){this.uniforms.linewidth.value=i}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(i){this.uniforms.dashScale.value=i}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(i){this.uniforms.dashSize.value=i}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(i){this.uniforms.gapSize.value=i}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(i){this.uniforms.opacity.value=i}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(i){this.uniforms.resolution.value.copy(i)}}}),r.setValues(e),r}return t}(d.ShaderMaterial);Object.assign(fo.prototype,{isLineMaterial:!0});var pu=function(n){pe(t,n);function t(e,r){var i=n.call(this)||this;return i.type="LineSegments2",i.geometry=e!==void 0?e:new co,i.material=r!==void 0?r:new fo({color:Math.random()*16777215}),i}return t.prototype.computeLineDistances=function(){for(var e=this.geometry,r=e.attributes.instanceStart,i=e.attributes.instanceEnd,a=new Float32Array(2*r.count),o=new d.Vector3,s=new d.Vector3,u=0,l=0,c=r.count;u<c;u++,l+=2)o.fromBufferAttribute(r,u),s.fromBufferAttribute(i,u),a[l]=l===0?0:a[l-1],a[l+1]=a[l]+o.distanceTo(s);var f=new d.InstancedInterleavedBuffer(a,2,1);return e.setAttribute("instanceDistanceStart",new d.InterleavedBufferAttribute(f,1,0)),e.setAttribute("instanceDistanceEnd",new d.InterleavedBufferAttribute(f,1,1)),this},t.prototype.raycast=function(e,r){e.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var i=e.ray,a=e.camera,o=a.projectionMatrix,s=this.geometry,u=this.material,l=u.resolution,c=u.linewidth,f=s.attributes.instanceStart,h=s.attributes.instanceEnd,m=new d.Vector4,A=new d.Vector4,p=new d.Vector4,g=new d.Vector3,v=new d.Matrix4,y=new d.Line3,b=new d.Vector3;i.at(1,p),p.w=1,p.applyMatrix4(a.matrixWorldInverse),p.applyMatrix4(o),p.multiplyScalar(1/p.w),p.x*=l.x/2,p.y*=l.y/2,p.z=0,g.copy(p);var w=this.matrixWorld;v.multiplyMatrices(a.matrixWorldInverse,w);for(var E=0,x=f.count;E<x;E++){m.fromBufferAttribute(f,E),A.fromBufferAttribute(h,E),m.w=1,A.w=1,m.applyMatrix4(v),A.applyMatrix4(v),m.applyMatrix4(o),A.applyMatrix4(o),m.multiplyScalar(1/m.w),A.multiplyScalar(1/A.w);var M=m.z<-1&&A.z<-1,C=m.z>1&&A.z>1;if(!(M||C)){m.x*=l.x/2,m.y*=l.y/2,A.x*=l.x/2,A.y*=l.y/2,y.start.copy(m),y.start.z=0,y.end.copy(A),y.end.z=0;var I=y.closestPointToPointParameter(g,!0);y.at(I,b);var T=d.MathUtils.lerp(m.z,A.z,I),P=T>=-1&&T<=1,F=g.distanceTo(b)<c*.5;if(P&&F){y.start.fromBufferAttribute(f,E),y.end.fromBufferAttribute(h,E),y.start.applyMatrix4(w),y.end.applyMatrix4(w);var R=new d.Vector3,O=new d.Vector3;i.distanceSqToSegment(y.start,y.end,O,R),r.push({point:O,pointOnLine:R,distance:i.origin.distanceTo(O),object:this,faceIndex:E})}}}},t}(d.Mesh);Object.assign(pu.prototype,{isLineSegments2:!0});var vu=function(n){pe(t,n);function t(e,r){var i=n.call(this,e,r)||this;return i.type="Line2",i}return t}(pu);Object.assign(vu.prototype,{isLine2:!0});var Au=function(n){pe(t,n);function t(){var e=n.call(this)||this;return e.type="LineGeometry",e}return t.prototype.setPositions=function(e){for(var r=e.length-3,i=new Float32Array(2*r),a=0;a<r;a+=3)i[2*a]=e[a],i[2*a+1]=e[a+1],i[2*a+2]=e[a+2],i[2*a+3]=e[a+3],i[2*a+4]=e[a+4],i[2*a+5]=e[a+5];return n.prototype.setPositions.call(this,i),this},t.prototype.setColors=function(e){for(var r=e.length-3,i=new Float32Array(2*r),a=0;a<r;a+=3)i[2*a]=e[a],i[2*a+1]=e[a+1],i[2*a+2]=e[a+2],i[2*a+3]=e[a+3],i[2*a+4]=e[a+4],i[2*a+5]=e[a+5];return n.prototype.setColors.call(this,i),this},t.prototype.fromLine=function(e){var r=e.geometry;if(r instanceof d.Geometry){var i=new d.BufferGeometry().fromGeometry(r);this.setPositions(i.attributes.position.array)}else r instanceof d.BufferGeometry&&this.setPositions(r.attributes.position.array);return this},t.prototype.copy=function(){return this},t}(co);Object.assign(Au.prototype,{isLineGeometry:!0});var dp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnI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fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==",Vs=14467195,fp=8,hp=2,pp=20,Ns=null,Na=function(n){pe(t,n);function t(e,r){e===void 0&&(e=new d.Vector3),r===void 0&&(r=new d.Vector3);var i=n.call(this)||this;i.type="FiveLine",i.needsRender=!0;var a=new Au,o=new fo({color:Vs,linewidth:hp,dashScale:pp,dashed:!1});i.line=new vu(a,o);var s=new d.BufferGeometry,u=new d.PointsMaterial({color:Vs,size:fp,map:Ns||(Ns=new d.TextureLoader().load(dp)),sizeAttenuation:!1,transparent:!0});return i.points=new d.Points(s,u),i.points.renderOrder=11,i.points.frustumCulled=!1,i.setPoints(e,r),i.add(i.line,i.points),i}return Object.defineProperty(t,"version",{get:function(){return"6.0.0-alpha.106"},enumerable:!1,configurable:!0}),t.prototype.setPoints=function(e,r){var i=[].concat(e.toArray(),r.toArray());this.points.geometry.setAttribute("position",new d.BufferAttribute(new Float32Array(i),3)),this.line.geometry.setPositions(i),this.line.computeLineDistances(),this.needsRender=!0},t.prototype.getPoints=function(){var e=this.points.geometry.attributes.position.array;return[new d.Vector3(e[0],e[1],e[2]),new d.Vector3(e[3],e[4],e[5])]},t.prototype.setMaterial=function(e){var r=this.line.material;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];i==="dashed"?(r.dashed=a,a?r.defines.USE_DASH="":delete r.defines.USE_DASH,r.needsUpdate=!0):r[i]=e[i]}this.needsRender=!0},t.prototype.setResolution=function(e,r){var i=this.line.material.resolution;(i.x!==e||i.y!==r)&&(i.set(e,r),this.needsRender=!0)},t}(d.Object3D);Object.assign(Na.prototype,{isFiveLine:!0});var We={Handedness:Object.freeze({NONE:"none",LEFT:"left",RIGHT:"right"}),ComponentState:Object.freeze({DEFAULT:"default",TOUCHED:"touched",PRESSED:"pressed"}),ComponentProperty:Object.freeze({BUTTON:"button",X_AXIS:"xAxis",Y_AXIS:"yAxis",STATE:"state"}),ComponentType:Object.freeze({TRIGGER:"trigger",SQUEEZE:"squeeze",TOUCHPAD:"touchpad",THUMBSTICK:"thumbstick",BUTTON:"button"}),ButtonTouchThreshold:.05,AxisTouchThreshold:.1,VisualResponseProperty:Object.freeze({TRANSFORM:"transform",VISIBILITY:"visibility"})};function mu(n){return Ii(this,void 0,void 0,function(){var t;return Si(this,function(e){switch(e.label){case 0:return[4,fetch(n)];case 1:if(t=e.sent(),t.ok)return[2,t.json()];throw new Error(t.statusText)}})})}function vp(n){return Ii(this,void 0,void 0,function(){var t,e;return Si(this,function(r){switch(r.label){case 0:if(!n)throw new Error("No basePath supplied");return t="profilesList.json",[4,mu("".concat(n,"/").concat(t))];case 1:return e=r.sent(),[2,e]}})})}function Ap(n,t,e,r){return e===void 0&&(e=null),r===void 0&&(r=!0),Ii(this,void 0,void 0,function(){var i,a,o,s,u,l;return Si(this,function(c){switch(c.label){case 0:if(!n)throw new Error("No xrInputSource supplied");if(!t)throw new Error("No basePath supplied");return[4,vp(t)];case 1:if(i=c.sent(),n.profiles.some(function(f){var h=i[f];return h&&(a={profileId:f,profilePath:"".concat(t,"/").concat(h.path),deprecated:!!h.deprecated}),!!a}),!a){if(!e)throw new Error("No matching profile name found");if(o=i[e],!o)throw new Error('No matching profile name found and default profile "'.concat(e,'" missing.'));a={profileId:e,profilePath:"".concat(t,"/").concat(o.path),deprecated:!!o.deprecated}}return[4,mu(a.profilePath)];case 2:if(s=c.sent(),r){if(l=void 0,l=s.layouts[n.handedness],!l)throw new Error("No matching handedness, ".concat(n.handedness,", in profile ").concat(a.profileId));l.assetPath&&(u=a.profilePath.replace("profile.json",l.assetPath))}return[2,{profile:s,assetPath:u}]}})})}var mp={xAxis:0,yAxis:0,button:0,state:We.ComponentState.DEFAULT};function gp(n,t){n===void 0&&(n=0),t===void 0&&(t=0);var e=n,r=t,i=Math.sqrt(n*n+t*t);if(i>1){var a=Math.atan2(t,n);e=Math.cos(a),r=Math.sin(a)}var o={normalizedXAxis:e*.5+.5,normalizedYAxis:r*.5+.5};return o}var yp=function(){function n(t){this.componentProperty=t.componentProperty,this.states=t.states,this.valueNodeName=t.valueNodeName,this.valueNodeProperty=t.valueNodeProperty,this.valueNodeProperty===We.VisualResponseProperty.TRANSFORM&&(this.minNodeName=t.minNodeName,this.maxNodeName=t.maxNodeName),this.value=0,this.updateFromComponent(mp)}return n.prototype.updateFromComponent=function(t){var e=t.xAxis,r=t.yAxis,i=t.button,a=t.state,o=gp(e,r),s=o.normalizedXAxis,u=o.normalizedYAxis;switch(this.componentProperty){case We.ComponentProperty.X_AXIS:this.value=this.states.includes(a)?s:.5;break;case We.ComponentProperty.Y_AXIS:this.value=this.states.includes(a)?u:.5;break;case We.ComponentProperty.BUTTON:this.value=this.states.includes(a)?i:0;break;case We.ComponentProperty.STATE:this.valueNodeProperty===We.VisualResponseProperty.VISIBILITY?this.value=this.states.includes(a):this.value=this.states.includes(a)?1:0;break;default:throw new Error("Unexpected visualResponse componentProperty ".concat(this.componentProperty))}},n}(),bp=function(){function n(t,e){var r=this;if(!t||!e||!e.visualResponses||!e.gamepadIndices||Object.keys(e.gamepadIndices).length===0)throw new Error("Invalid arguments supplied");this.id=t,this.type=e.type,this.rootNodeName=e.rootNodeName,this.touchPointNodeName=e.touchPointNodeName,this.visualResponses={},Object.keys(e.visualResponses).forEach(function(i){var a=new yp(e.visualResponses[i]);r.visualResponses[i]=a}),this.gamepadIndices=Object.assign({},e.gamepadIndices),this.values={state:We.ComponentState.DEFAULT,button:this.gamepadIndices.button!==void 0?0:void 0,xAxis:this.gamepadIndices.xAxis!==void 0?0:void 0,yAxis:this.gamepadIndices.yAxis!==void 0?0:void 0}}return Object.defineProperty(n.prototype,"data",{get:function(){var t=k({id:this.id},this.values);return t},enumerable:!1,configurable:!0}),n.prototype.updateFromGamepad=function(t){var e=this;if(this.values.state=We.ComponentState.DEFAULT,this.gamepadIndices.button!==void 0&&t.buttons.length>this.gamepadIndices.button){var r=t.buttons[this.gamepadIndices.button];this.values.button=r.value,this.values.button=this.values.button<0?0:this.values.button,this.values.button=this.values.button>1?1:this.values.button,r.pressed||this.values.button===1?this.values.state=We.ComponentState.PRESSED:(r.touched||this.values.button>We.ButtonTouchThreshold)&&(this.values.state=We.ComponentState.TOUCHED)}this.gamepadIndices.xAxis!==void 0&&t.axes.length>this.gamepadIndices.xAxis&&(this.values.xAxis=t.axes[this.gamepadIndices.xAxis],this.values.xAxis=this.values.xAxis<-1?-1:this.values.xAxis,this.values.xAxis=this.values.xAxis>1?1:this.values.xAxis,this.values.state===We.ComponentState.DEFAULT&&Math.abs(this.values.xAxis)>We.AxisTouchThreshold&&(this.values.state=We.ComponentState.TOUCHED)),this.gamepadIndices.yAxis!==void 0&&t.axes.length>this.gamepadIndices.yAxis&&(this.values.yAxis=t.axes[this.gamepadIndices.yAxis],this.values.yAxis=this.values.yAxis<-1?-1:this.values.yAxis,this.values.yAxis=this.values.yAxis>1?1:this.values.yAxis,this.values.state===We.ComponentState.DEFAULT&&Math.abs(this.values.yAxis)>We.AxisTouchThreshold&&(this.values.state=We.ComponentState.TOUCHED)),Object.values(this.visualResponses).forEach(function(i){i.updateFromComponent(e.values)})},n}(),wp=function(){function n(t,e,r){var i=this;if(!t)throw new Error("No xrInputSource supplied");if(!e)throw new Error("No profile supplied");this.xrInputSource=t,this.assetUrl=r,this.id=e.profileId,this.layoutDescription=e.layouts[t.handedness],this.components={},Object.keys(this.layoutDescription.components).forEach(function(a){var o=i.layoutDescription.components[a];i.components[a]=new bp(a,o)}),this.updateFromGamepad()}return Object.defineProperty(n.prototype,"gripSpace",{get:function(){return this.xrInputSource.gripSpace},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"targetRaySpace",{get:function(){return this.xrInputSource.targetRaySpace},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){var t=[];return Object.values(this.components).forEach(function(e){t.push(e.data)}),t},enumerable:!1,configurable:!0}),n.prototype.updateFromGamepad=function(){var t=this;Object.values(this.components).forEach(function(e){e.updateFromGamepad(t.xrInputSource.gamepad)})},n}(),Ep="https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles",xp="generic-trigger",Mp=function(n){pe(t,n);function t(){var e=n.call(this)||this;return e.motionController=null,e.envMap=null,e}return t.prototype.setEnvironmentMap=function(e){var r=this;return this.envMap==e?this:(this.envMap=e,this.traverse(function(i){i instanceof d.Mesh&&i.isMesh&&(i.material.envMap=r.envMap,i.material.needsUpdate=!0)}),this)},t.prototype.updateMatrixWorld=function(e){n.prototype.updateMatrixWorld.call(this,e),this.motionController&&(this.motionController.updateFromGamepad(),Object.values(this.motionController.components).forEach(function(r){Object.values(r.visualResponses).forEach(function(i){var a=i.valueNode,o=i.minNode,s=i.maxNode,u=i.value,l=i.valueNodeProperty;a&&(l===We.VisualResponseProperty.VISIBILITY?a.visible=u:l===We.VisualResponseProperty.TRANSFORM&&(a.quaternion.copy(o.quaternion).slerp(s.quaternion,u),a.position.lerpVectors(o.position,s.position,u)))})}))},t}(Bn.Object3D);function Cp(n,t){Object.values(n.components).forEach(function(e){var r=e.type,i=e.touchPointNodeName,a=e.visualResponses;if(r===We.ComponentType.TOUCHPAD)if(e.touchPointNode=t.getObjectByName(i),e.touchPointNode){var o=new Bn.SphereGeometry(.001),s=new Bn.MeshBasicMaterial({color:255}),u=new Bn.Mesh(o,s);e.touchPointNode.add(u)}else console.warn("Could not find touch dot, ".concat(e.touchPointNodeName,", in touchpad component ").concat(e.id));Object.values(a).forEach(function(l){var c=l.valueNodeName,f=l.minNodeName,h=l.maxNodeName,m=l.valueNodeProperty;if(m===We.VisualResponseProperty.TRANSFORM){if(l.minNode=t.getObjectByName(f),l.maxNode=t.getObjectByName(h),!l.minNode){console.warn("Could not find ".concat(f," in the model"));return}if(!l.maxNode){console.warn("Could not find ".concat(h," in the model"));return}}l.valueNode=t.getObjectByName(c),l.valueNode||console.warn("Could not find ".concat(c," in the model"))})})}function zs(n,t){Cp(n.motionController,t),n.envMap&&t.traverse(function(e){e instanceof d.Mesh&&e.isMesh&&(e.material.envMap=n.envMap,e.material.needsUpdate=!0)}),n.add(t)}var Ip=function(){function n(t){t===void 0&&(t=null),this.gltfLoader=t,this.path=Ep,this._assetCache={}}return n.prototype.createControllerModel=function(t){var e=this,r=new Mp,i=null;return t.addEventListener("connected",function(a){var o=a.data;o.targetRayMode!=="tracked-pointer"||!o.gamepad||Ap(o,e.path,xp).then(function(s){var u=s.profile,l=s.assetPath;r.motionController=new wp(o,u,l);var c=e._assetCache[r.motionController.assetUrl];if(c)i=c.scene.clone(),zs(r,i);else{if(!e.gltfLoader)throw new Error("GLTFLoader not set.");e.gltfLoader.load(r.motionController.assetUrl,function(f){e._assetCache[r.motionController.assetUrl]=f,i=f.scene.clone(),zs(r,i)})}}).catch(function(s){console.warn(s)})}),t.addEventListener("disconnected",function(){r.motionController=null,r.remove(i),i=null}),r},n}();function Sp(n,t){if(!t)return n;var e=n.match(/\d+_[a-z].png/);return n.substring(0,e.index)+t+"/"+n.substring(e.index)}var Qs=300,Tp=new d.Matrix4().makeRotationAxis(new d.Vector3(0,1,0),Math.PI),Ds=new d.Vector3(-1,1,1),Pp=function(n){pe(t,n);function t(e){var r=n.call(this,e)||this;r.xrManager=new cp(r.renderer,r.renderer.getContext(),{onSessionStart:function(u){r.emit("xr.session.start",J("xr.session.start",{session:u,machineType:r.xrManager.machineType}))},onSessionEnd:function(){r.emit("xr.session.end",J("xr.session.end",{session:null,machineType:r.xrManager.machineType}))}}),r.xrControllerRay={left:new d.Raycaster,right:new d.Raycaster},r.xrControllerRay.left.params.Points={threshold:.1},r.xrControllerRay.right.params.Points={threshold:.1},r.pointerLines={left:new Na,right:new Na},r.pointerLines.left.visible=!1,r.pointerLines.right.visible=!0,r.pointerLines.left.setMaterial({color:new d.Vector3(1,1,1)}),r.pointerLines.left.points.material.depthTest=!1,r.pointerLines.right.setMaterial({color:new d.Vector3(1,1,1)}),r.pointerLines.right.points.material.depthTest=!1,r.scene.add(r.pointerLines.left,r.pointerLines.right),r.panoResources={},r.panoResources[r.locationMotion.keyframes[0].key=r.locationMotion.keyframes[1].key=wt()]={panoId:Ue(r.currentPano),leftPanoPicture:null,position:r.camera.pose.offset.clone(),effect:"fade",fixCameraTransform:new d.Matrix4},r.parallaxCameraMatrixs=[];var i=ut.shared.getContext();if(!i)return console.error("获取session失败,请退出重试"),r;r.on("xr.session.end",function(){r.scene.remove(r.pointerLines.left,r.pointerLines.right)}),r.xrManager.setSession(i),r.controllerWrappers=[new d.Group,new d.Group],r.scene.add(r.controllerWrappers[0],r.controllerWrappers[1]);var a=r.xrManager.getController(0);r.controllerWrappers[0].add(a);var o=r.xrManager.getController(1);r.controllerWrappers[1].add(o);var s=new Ip;return s.gltfLoader={load:function(u,l){vi.ajax(u,{responseType:"arraybuffer"}).then(function(c){var f;return _a(c.body,{resourcePath:u.slice(0,u.lastIndexOf("/")+1),search:(f=u.split("?")[1])!==null&&f!==void 0?f:"",fetcher:vi})}).then(function(c){return l(c)})}},r.on("xr.session.start",function(){var u=r.xrManager.getControllerGrip(0);u.add(s.createControllerModel(u)),r.controllerWrappers[0].add(u);var l=r.xrManager.getControllerGrip(1);l.add(s.createControllerModel(l)),r.controllerWrappers[1].add(l)}),r.xrControllerState={LeftAxesUp:{touchStartTime:0,touchStart:!1},LeftAxesDown:{touchStartTime:0,touchStart:!1},LeftAxesLeft:{touchStartTime:0,touchStart:!1},LeftAxesRight:{touchStartTime:0,touchStart:!1},LeftTrigger:{touchStartTime:0,touchStart:!1},LeftPinch:{touchStartTime:0,touchStart:!1},RightAxesUp:{touchStartTime:0,touchStart:!1},RightAxesDown:{touchStartTime:0,touchStart:!1},RightAxesLeft:{touchStartTime:0,touchStart:!1},RightAxesRight:{touchStartTime:0,touchStart:!1},RightTrigger:{touchStartTime:0,touchStart:!1},RightPinch:{touchStartTime:0,touchStart:!1},Y:{touchStartTime:0,touchStart:!1},X:{touchStartTime:0,touchStart:!1},A:{touchStartTime:0,touchStart:!1},B:{touchStartTime:0,touchStart:!1}},r}return t.parseArgs=function(e){if(e instanceof t)return e;var r=k(k({},e),{maxLatitude:Math.PI/2,minLatitude:-Math.PI/2});return n.parseArgs.call(this,r)},t.initAnimationEndState=function(e){var r=this.parseArgs(e),i=n.initAnimationEndState.call(this,r);return k(k({},i),{mode:"XRPanorama"})},t.prototype.moveToPano=function(e,r,i){var a=this,o,s,u,l,c=(o=r.effect)!==null&&o!==void 0?o:"fade";this.userAction=i,this.stopMomentumMovement();var f=this.works.getResolvedObserver(e);if(!f)throw new Error("Invalid PanoIndex");var h=zn(f.images.up),m=this.imageOptions.size;typeof m=="undefined"&&f&&h&&(m=Number(h)),typeof m=="undefined"&&(m=2048);var A=this.imageOptions.transform,p=function(P,F){return Sp(Ai(P,A,F))},g=k({key:"pano.".concat(f.panoId)},Er(this.imageOptions,["format","size","quality"])),v=f.images,y=(u=(s=f.images.tiles)===null||s===void 0?void 0:s.filter(function(P){return P.size>m}))!==null&&u!==void 0?u:null,b="pano:"+On([v,g,A]);if(this.pendingTextureTask){if(this.pendingTextureTask.hash===b)return;var w=this.pendingTextureTask.panoId;(l=this.panoMeshes[w])===null||l===void 0||l.setProgress(0),this.emit("pano.texture.abort",J("pano.texture.abort",{error:null,progress:0,meta:null,pano:f.pano})),this.pendingTextureTask.onError(new Error("texture aborted"))}var E=this.models.getMaterial()||{},x=E.pano0,M=E.pano1,C;if((x==null?void 0:x.map.name)===b?C=x:(M==null?void 0:M.map.name)===b&&(C=M),C){var I={panoId:f.panoId,effect:c,leftPanoPicture:{zoom:1,map:C.map,luminanceMap:C.luminanceMap,matrix:new d.Matrix4().compose(f.position,f.quaternion,Ds)},position:f.position.clone(),fixCameraTransform:new d.Matrix4};this.doMoveToPano(f.pano,I,r);return}var T="move-to-pano-"+f.panoId;this.pending.add(T),this.pendingTextureTask={panoId:f.panoId,hash:b,onLoad:function(P){if(a.pending.delete(T),a.destroyed)P.body.dispose();else{P.body.name=b;var F={panoId:f.panoId,effect:c,leftPanoPicture:{zoom:1,map:P.body,luminanceMap:null,matrix:new d.Matrix4().compose(f.position,f.quaternion,Ds)},position:f.position.clone(),fixCameraTransform:new d.Matrix4};a.doMoveToPano(f.pano,F,r)}},onError:function(P){a.pending.delete(T);var F=k(k(k({},f.pano),{mode:a.mode}),_e(a.camera.pose));a.emit("pano.error",J("pano.error",{error:P,userAction:a.userAction,options:r,prevPano:a.currentPano,progress:0,state:F})),a.emit("pano.cancel",J("pano.cancel",{error:null,userAction:a.userAction,options:r,prevPano:a.currentPano,progress:0,state:F})),r.moveCancelCallback&&r.moveCancelCallback()}},Promise.all([this.tileLevelForFov&&y&&y.length?this.textureLoader.loadTiledCubeTexture(v,y,{tileMaxLevel:this.TILED_CUBE_TEXTURE_LEVEL,imageURL:{transform:p,options:g},format:d.RGBAFormat,minFilter:d.LinearFilter,magFilter:d.LinearFilter,generateMipmaps:!1,viaAjax:!0,fetcher:nt(f.work)},void 0,void 0,function(P){var F,R;a.emit("pano.texture.progress",J("pano.texture.progress",{error:null,progress:P,meta:null,pano:f.pano})),((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b&&((R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(P))},this.renderer):this.textureLoader.loadCubeTexture(v,{imageURL:{transform:p,options:g},format:d.RGBAFormat,fetcher:nt(f.work)},void 0,void 0,function(P){var F,R;((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b&&((R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(P)),a.emit("pano.texture.progress",J("pano.texture.progress",{error:null,progress:P,meta:null,pano:f.pano}))},this.renderer)]).then(function(P){var F,R,O=P[0];((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b?(a.pendingTextureTask.onLoad(O),(R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(0),delete a.pendingTextureTask,a.emit("pano.texture.success",J("pano.texture.success",{error:null,progress:1,meta:O.meta,pano:f.pano}))):O.body.dispose()}).catch(function(P){var F,R;((F=a.pendingTextureTask)===null||F===void 0?void 0:F.hash)===b&&(a.pendingTextureTask.onError(P),(R=a.panoMeshes[f.panoId])===null||R===void 0||R.setProgress(0),delete a.pendingTextureTask,a.emit("pano.texture.error",J("pano.texture.error",{error:P,progress:0,meta:null,pano:f.pano})),a.emit("error",P))}),this.emit("pano.texture.load",J("pano.texture.load",{error:null,progress:0,meta:null,pano:f.pano}))},t.prototype.doMoveToPano=function(e,r,i){var a=this,o,s,u,l,c,f,h,m,A,p;i===void 0&&(i={});var g=Me(),v=wt();this.panoResources[v]=r;var y=1,b,w,E;if(this.locationMotion.ended){var x=this.locationMotion.getKeyFrameSegment(g);x[0];var M=x[1],C=this.locationMotion.value,I=this.panoResourceFromLocationMotionKeyframe(M).position,T=r.position;b=Math.max(I.distanceTo(T),y),w=[{key:M.key,progress:0,value:k(k({},C),{count:0})},{key:v,progress:1,value:{distance:0,count:1}}],E=0}else{var P=this.locationMotion.getKeyFrameSegment(g),F=P[0],M=P[1],C=this.locationMotion.value,R=this.panoResourceFromLocationMotionKeyframe(F).position,I=this.panoResourceFromLocationMotionKeyframe(M).position,T=r.position,O=M.value.count-C.count,L=Math.max(R.distanceTo(I),y)*O,z=Math.max(I.distanceTo(T),y);b=L+z,w=[{key:F.key,progress:0,value:k({},C)},{key:M.key,progress:L/b,value:M.value},{key:v,progress:1,value:{count:M.value.count+1,distance:0}}];var N=this.locationMotionKeyframesLength(this.locationMotion.keyframes),W=this.locationMotionKeyframesLength(w);E=this.locationMotion.getProgressVelocity(g)*N/W}var j=r.effect==="instant"?0:this.calculateMovingDuration(i.duration,r.effect==="fly"?b:0),D={longitude:i.longitude,latitude:i.latitude,fov:i.fov},H=k(k({},e),{mode:this.mode,longitude:(o=D.longitude)!==null&&o!==void 0?o:this.camera.pose.longitude,latitude:(s=D.latitude)!==null&&s!==void 0?s:this.camera.pose.latitude,fov:(u=D.fov)!==null&&u!==void 0?u:this.camera.pose.fov,offset:r.position.clone(),distance:0}),K=this.currentPano;if(this.emit("pano.moveTo",J("pano.moveTo",{options:i,prevPano:K,progress:0,state:H,userAction:this.userAction,error:null})),i.moveStartCallback&&i.moveStartCallback(H),this.videoTexture&&this.videoTexture.image instanceof HTMLVideoElement&&this.videoTexture.image.getAttribute("src")&&(this.videoTexture.image.pause(),this.videoTexture.image.removeAttribute("uuid"),this.videoTexture.image.removeAttribute("src"),this.videoTexture.image.oncanplay=Q,this.videoTexture.needsUpdate=!0),this.panoVideo.setMaterial(null),r.effect==="fly")this.cameraMotion.set(D,j).catch(Q);else{var Z=Vt({longitude:this.cameraMotion.value.longitude,latitude:this.cameraMotion.value.latitude}),G=Vt({longitude:(l=D.longitude)!==null&&l!==void 0?l:this.cameraMotion.value.longitude,latitude:(c=D.latitude)!==null&&c!==void 0?c:this.cameraMotion.value.latitude}),X=new d.Object3D;X.lookAt(Z);var _=new d.Matrix4().makeRotationFromQuaternion(X.quaternion);X.lookAt(G);var de=new d.Matrix4().makeRotationFromQuaternion(X.quaternion),ee=new d.Matrix4().getInverse(_).premultiply(de),oe=this.cameraMotion.value.fov,ie=(f=D.fov)!==null&&f!==void 0?f:this.cameraMotion.value.fov,ue=1;r.effect==="zoomin"?ue=1.5:r.effect==="zoomout"&&(ue=.4);for(var ne=ie*ue,ae=0;ae<w.length-1;ae++){var he=w[ae].key;if(he){var ve=this.panoResources[he];ve&&(ve.fixCameraTransform.copy(ee),ve.leftPanoPicture&&(ve.leftPanoPicture.zoom=Math.tan(oe/2/180*Math.PI)/Math.tan(ne/2/180*Math.PI)))}}this.cameraMotion.setKeyframes([{progress:0,value:{longitude:this.cameraMotion.value.longitude,latitude:this.cameraMotion.value.latitude,fov:this.cameraMotion.value.fov}},{progress:0,value:{longitude:(h=D.longitude)!==null&&h!==void 0?h:this.cameraMotion.value.longitude,latitude:(m=D.latitude)!==null&&m!==void 0?m:this.cameraMotion.value.latitude,fov:ne}},{progress:1,value:{longitude:(A=D.longitude)!==null&&A!==void 0?A:this.cameraMotion.value.longitude,latitude:(p=D.latitude)!==null&&p!==void 0?p:this.cameraMotion.value.latitude,fov:ie}}],j).catch(Q)}var we=this.locationMotion.setKeyframes(w,j,E);we.then(function(){for(var xe,Be,$,te=0,q=a.models;te<q.length;te++){var Le=q[te];Le.show()}var Pe=k(k({},e),{mode:a.mode,longitude:a.camera.pose.longitude,latitude:a.camera.pose.latitude,fov:a.camera.pose.fov,offset:a.camera.pose.offset.clone(),distance:0});a.emit("pano.arrived",J("pano.arrived",{options:i,prevPano:K,progress:1,state:Pe,userAction:a.userAction,error:null})),i.moveEndCallback&&i.moveEndCallback(Pe);var Se=a.works.getResolvedObserver(a.currentPano);if(Se&&Se.video&&a.videoTexture&&a.videoTexture.image instanceof HTMLVideoElement){var De=Tp.clone().multiply(($=(Be=(xe=a.models.getMaterial())===null||xe===void 0?void 0:xe.pano1)===null||Be===void 0?void 0:Be.matrix)!==null&&$!==void 0?$:new d.Matrix4).multiply(Se.video.matrix),ge={map:a.videoTexture,size:Se.video.size,matrix:De,alpha:1},ye=wt(),me=a.videoTexture.image;me.setAttribute("uuid",ye),iu().then(function(be){be&&Se.video&&me.getAttribute("uuid")===ye&&(me.oncanplay=function(){me.oncanplay=Q,me.play()},me.ontimeupdate=function(){me.currentTime>.5&&(me.ontimeupdate=Q,a.panoVideo.setMaterial(ge))},me.src=Se.video.source)}).catch(function(){me.removeAttribute("uuid")})}},function(){a.emit("pano.cancel",J("pano.cancel",{options:i,prevPano:K,progress:0,state:H,userAction:a.userAction,error:null})),i.moveCancelCallback&&i.moveCancelCallback()})},t.prototype.checkSelectedPano=function(e){var r=this,i,a,o,s;this.stopMomentumMovement();var u=this.camera.getDirection(new d.Vector3).setY(0),l=null,c=this.works.getResolvedObserver(this.currentPano);if(!c)return null;var f=c.accessibleIds.filter(function(G){var X=ft(G);if(Xt(X,r.currentPano))return!1;var _=r.works.getResolvedObserver(X);return!_||_.position.distanceTo(r.camera.position)>r.maxAccessibleDistance?!1:_.loadable||_.active}),h=this.models.intersectRaycaster(e)[0];if(h){var m=sr(f,function(G){var X=r.works.getResolvedObserver(G);if(!X)return 1/0;var _=X.standingPosition.clone();return _.distanceTo(h.point)},!0),A=m[0],p=m[1];A&&p<this.panoTapTriggerRadius&&(l=(i=this.works.getResolvedObserver(A))!==null&&i!==void 0?i:null)}if(Ls(l)){var g=this.getForwardObserverOrNot(e);g&&(l=g)}for(var v=0,y=this.locationMotion.keyframes;v<y.length;v++){var b=y[v],w=this.panoResourceFromLocationMotionKeyframe(b);if(!(b.progress<this.locationMotion.progress)&&l&&w.panoId===l.panoId){l=null;break}}if(Ls(l))return this.locationMotion.ended===!0&&this.cameraBounce(),null;if(l&&!l.active){var E=l.panoId;this.panoMeshes[E]&&(this.panoMeshes[E].setDisabled(!1),this.panoMeshes[E].setLoading(!0))}var x={};if(l){for(var M=Math.PI/6,C=Math.PI/12,I=new d.Vector3(0,1,0),T=l.position.clone().setY(0).sub(c.position.clone().setY(0)).normalize(),P=T.clone().applyAxisAngle(I,M),F=T.clone().applyAxisAngle(I,-M),R=[],O=[],L=[],z=0,N=l.accessibleIds;z<N.length;z++){var A=N[z],W=ft(A);if(!(Xt(W,this.currentPano)||Xt(W,l.pano))){var j=this.works.getResolvedObserver(A);if(j){var D=j.position.clone().sub(l.position).setY(0);T.angleTo(D)<M?L.push(D):P.angleTo(D)<M?R.push(D):F.angleTo(D)<M&&O.push(D)}}}var H=L.length>0?L:yt(yt([],R,!0),O,!0),K=H.slice().sort(function(G,X){return G.angleTo(T)-X.angleTo(T)})[0];K&&K.angleTo(u)>C&&(x.longitude=Math.atan2(-K.x,-K.z))}this.cameraMotion.value.latitude<-Math.PI/4&&(x.latitude=ce(0,this.minLatitude,this.maxLatitude)),this.cameraMotion.value.fov<60&&(x.fov=this.defaultFov);var Z={workCode:l.pano.workCode,panoIndex:l.pano.panoIndex,mode:this.mode,longitude:(a=x.longitude)!==null&&a!==void 0?a:this.camera.pose.longitude,latitude:(o=x.latitude)!==null&&o!==void 0?o:this.camera.pose.latitude,fov:(s=x.fov)!==null&&s!==void 0?s:this.camera.pose.fov,distance:0,offset:l?l.position.clone():new d.Vector3};return this.emit("pano.select",J("pano.select",{prevPano:this.currentPano,state:Z,userAction:!0,options:x,progress:0,error:null})),l&&l.active?(this.emit("pano.request",J("pano.request",{userAction:!0,prevPano:this.currentPano,progress:0,state:Z,options:x,error:null})),l.pano):null},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.isReady=function(){return!1},t.prototype.updateCamera=function(e,r,i){return Promise.resolve()},t.prototype.updateCameraWithKeyframes=function(e,r,i){return Promise.resolve()},t.prototype.updateTime=function(e,r){for(var i=this,a,o,s,u,l,c,f,h,m=[],A=2;A<arguments.length;A++)m[A-2]=arguments[A];this.userAction=!0;var p={},g={},v=this.panoResourceFromLocationMotionKeyframe(this.locationMotion.keyframes[0]),y=this.panoResourceFromLocationMotionKeyframe(this.locationMotion.keyframes[this.locationMotion.keyframes.length-1]),b=!1;if(this.cameraMotion.ended===!1&&(this.cameraMotion.update(e),g.longitude=this.cameraMotion.value.longitude,g.latitude=this.cameraMotion.value.latitude,g.fov=this.cameraMotion.value.fov),this.modelAlphaMotion.ended===!1&&(this.modelAlphaMotion.update(e),p.modelAlpha=this.modelAlphaMotion.value.modelAlpha),this.perspToOrthoMotion.ended===!1&&(this.perspToOrthoMotion.update(e),this.camera.perspToOrtho.setScalar(ce(this.perspToOrthoMotion.value.perspToOrtho,0,1))),this.locationMotion.ended===!1){this.locationMotion.update(e);var w=this.locationMotion.getKeyFrameSegment(e),E=w[0],x=w[1],M=this.panoResourceFromLocationMotionKeyframe(E),C=this.panoResourceFromLocationMotionKeyframe(x),I=new d.Vector3().copy(M.position),T=new d.Vector3().copy(C.position),P=this.locationMotion.value.count-x.value.count+1;p.progress=P,C.leftPanoPicture&&(P<1?M.leftPanoPicture&&(p.pano0=M.leftPanoPicture):p.pano0=C.leftPanoPicture,p.pano1=C.leftPanoPicture),C.effect==="montage"?p.transition="BLACK":C.effect==="spread"?p.transition="SPREAD":p.transition="FADE",(C.effect==="zoomin"||C.effect==="zoomout")&&(p.progress=Math.pow(P,3)),P<1&&C.effect!=="fly"&&(p.pano0&&M.leftPanoPicture&&(p.pano0={map:p.pano0.map,zoom:p.pano0.zoom,luminanceMap:p.pano0.luminanceMap,matrix:M.leftPanoPicture.matrix.clone().setPosition(C.position)}),I.copy(T),b=!0),g.distance=this.locationMotion.value.distance,g.offset=new d.Vector3(I.x+(T.x-I.x)*P,I.y+(T.y-I.y)*P,I.z+(T.z-I.z)*P);for(var F=[],R=[],O=0,L=this.locationMotion.keyframes;O<L.length;O++){var z=L[O],N=z.key,W=z.progress;N!==void 0&&(F.push(N),W>this.locationMotion.progress&&R.push(N))}for(var j=0,D=Object.keys(this.panoResources);j<D.length;j++){var H=D[j];if(!(R.indexOf(H)>=0)){var K=this.panoResources[H];if(K.leftPanoPicture){var Z=K.leftPanoPicture.map;if(Z){if(Z===((a=p.pano0)===null||a===void 0?void 0:a.map)||Z===((o=p.pano1)===null||o===void 0?void 0:o.map))continue;Z instanceof ze&&Z.cubeRenderTarget&&this.colorCubeRenderTargetPool.push(Z.cubeRenderTarget),Z.dispose(),K.leftPanoPicture=null}}F.indexOf(H)>=0||delete this.panoResources[H]}}this.currentPano=ft(C.panoId),this.emit("pano.moving",J("pano.moving",{userAction:this.userAction,prevPano:ft(v.panoId),state:k(k(k(k({},ft(y.panoId)),{mode:this.mode}),_e(this.camera.pose)),g),options:{},progress:this.locationMotion.progress,error:null}))}Qt(p)===!1&&(!((s=p.pano0)===null||s===void 0)&&s.map&&p.pano0.map instanceof ze&&!p.pano0.map.cubeRenderTarget&&(p.pano0.map.cubeRenderTarget=this.colorCubeRenderTargetPool.pop()),!((u=p.pano1)===null||u===void 0)&&u.map&&p.pano1.map instanceof ze&&!p.pano1.map.cubeRenderTarget&&(p.pano1.map.cubeRenderTarget=this.colorCubeRenderTargetPool.pop()),this.models.setMaterial(p)),Qt(g)===!1&&this.setCamera(g);var G=this.works.getResolvedObserver(this.currentPano),X=m[1];if(!X){console.error("xrFrame丢失,请重试");return}if(!this.xrManager.session){console.error("session丢失,请重试");return}var _=this.xrManager.referenceSpace;if(_){var de=this.xrManager.cameraVR,ee=this.xrManager.cameraL,oe=this.xrManager.cameraR,ie=[ee,oe],ue=X.getViewerPose(_),ne=new d.Vector3(0,0,0);if(ue){var ae;ae=this.xrManager.session.renderState.baseLayer;var he=ue.views;if(!ae){console.error("no layer found");return}this.renderer.setFramebuffer(ae.framebuffer);var ve=!1;he.length!==de.cameras.length&&(de.cameras.length=0,ve=!0),this.parallaxCameraMatrixs=[];var we=new d.Vector3,xe=new d.Vector3;new d.Matrix4().fromArray(he[0].transform.matrix).decompose(we,new d.Quaternion,new d.Vector3),new d.Matrix4().fromArray(he[1].transform.matrix).decompose(xe,new d.Quaternion,new d.Vector3),xe.clone().sub(we).normalize();var Be=new d.Vector3,$=new d.Quaternion,te=new d.Vector3;this.camera.matrix.decompose(Be,$,te);for(var q=0;q<he.length;q++){var Le=he[q],Pe=ae.getViewport(Le),Se=ie[q];Se.matrix.fromArray(Le.transform.matrix);var De=new d.Vector3,ge=new d.Quaternion,ye=new d.Vector3;Se.matrix.decompose(De,ge,ye),ne.copy(Be),Se.position.copy(Be),Se.quaternion.copy(ge),Se.scale.copy(ye),Se.updateMatrix(),Se.projectionMatrix.fromArray(Le.projectionMatrix),Se.viewport.set(Pe.x,Pe.y,Pe.width,Pe.height),ve===!0&&de.cameras.push(Se)}ue.views[0].transform.position,ue.views[1].transform.position;for(var me=this.xrManager.session.inputSources,q=0;q<this.xrManager.controllers.length;q++){var be=this.xrManager.controllers[q],Ae=me[q];if(Ae){be.update(Ae,X,_);var Ne=this.xrManager.getController(q),Qe=new d.Vector3(0,1.2,0),Ke=Ne.position.clone().add(ne).sub(Qe);Ae.handedness==="left"?this.xrControllerRay.left.set(Ke,new d.Vector3(0,0,-1).applyEuler(Ne.rotation)):Ae.handedness==="right"&&this.xrControllerRay.right.set(Ke,new d.Vector3(0,0,-1).applyEuler(Ne.rotation)),this.controllerWrappers[q].position.copy(new d.Vector3(0,0,0).add(ne).sub(Qe));var at=this.models.intersectRaycaster(this.xrControllerRay.right);if(at.length===0&&(at=this.xrControllerRay.right.intersectObject(this.boundingMesh,!0).map(function(ot){var vt;return k({floor:(vt=G==null?void 0:G.floorIndex)!==null&&vt!==void 0?vt:0},ot)})),at.length>=1&&at[0].face)if(Ae.handedness==="right"){var Oe=this.xrControllerRay.right.intersectObject(this.xrCustomObjectsScene,!0),St=at[0].face.normal,Tt=St.clone(),Dt=at[0].point.clone();this.intersectMesh.position.copy(Dt);var $r=Dt.clone().add(Tt);if(this.intersectMesh.lookAt($r),Math.abs(St.y)>.99){var lr=this.camera.position.clone().sub(Dt);this.intersectMesh.rotation.z=-Math.atan2(lr.z,lr.x)}this.intersectMesh.visible=!0,this.needsRender=!0,Oe.length>0?(this.pointerLines.right.setPoints(Ke,Oe[0].point),this.pointerLines.right.points.visible=!0,this.intersectMesh.visible=!1):(this.pointerLines.right.points.visible=!1,this.pointerLines.right.setPoints(Ke,at[0].point));var ht=at[0],Zt=J("intersect.update",{raycaster:(l=this.xrControllerRay.right)!==null&&l!==void 0?l:null,intersection:ht!=null?ht:null,object:this.intersectMesh});if(this.emit("intersect.update",Zt),Zt.defaultPrevented){this.hideIntersectMesh();return}}else this.pointerLines.left.setPoints(Ke,at[0].point)}}if(this.camera.pose.distance>.1||b)for(var xr=0,Ut=Object.keys(this.panoMeshes);xr<Ut.length;xr++){var pt=Ut[xr],ke=this.panoMeshes[pt];ke.setOpacity(0),ke.setCurrent(!1),ke.updateTime&&ke.updateTime(e,r),ke.visible=!1}else if(G){var cr=sr(G.visibleIds,function(rt){var ot=i.works.getResolvedObserver(rt);return ot?G.standingPosition.distanceTo(ot.standingPosition):1/0},!0),qt=cr[1];qt=ce(qt,2.5,1/0);for(var dr=G.visibleIds.concat(Ue(this.currentPano)),Et=this.getForwardObserverOrNot(),fr=this.camera.getDirection(new d.Vector3),Yt=0,Pt=Object.keys(this.panoMeshes);Yt<Pt.length;Yt++){var pt=Pt[Yt],ke=this.panoMeshes[pt],xt=this.works.getResolvedObserver(pt);if(dr.indexOf(pt)===-1)ke.setCurrent(!1),ke.setOpacity(0);else if(!xt)ke.setCurrent(!1),ke.setOpacity(0);else if(!xt.loadable&&!xt.active)ke.setCurrent(!1),ke.setOpacity(0);else{var hr=ke.position.clone().setY(this.camera.position.y).distanceTo(this.camera.position);ke.setCurrent(!ke.loading&&ke.progress===0&&Et!==null&&Et.panoId===pt),ke.setOpacity(hr<.01?0:ce(qt/hr*1.2,.65,.98));var Ur=this.camera.position.clone().setY(ke.position.y),Mr=new d.Vector3().copy(ke.position).sub(Ur).normalize();if(pt===Ue(this.currentPano)){var qr=ce((.5-Ur.distanceTo(ke.position))/.5,0,1);Mr.multiplyScalar(1-qr).add(fr.clone().multiplyScalar(qr))}Mr.length()>0&&ke.quaternion.setFromEuler(new d.Euler(0,Math.atan2(Mr.x,Mr.z),0))}ke.updateTime&&ke.updateTime(e,r)}}var Cr=function(){if(i.tileLevelForFov===!1)return 0;var rt=new d.Vector2(4e3,4e3),ot=y.panoId,vt=i.works.getResolvedObserver(ot),At=i.imageOptions.size;if(typeof At=="undefined"&&vt){var Jn=vt.images.up.match(/\/cube_(\d+)\//);Jn&&(At=Number(Jn[1]))}typeof At=="undefined"&&(At=2048);var Hr=0;At>=1024&&(Hr=1),At>=2048&&(Hr=2),At>=4096&&(Hr=3),At>=8192&&(Hr=4);var Gr=i.tileLevelForFov(ee.fov,rt);return Gr>Hr?Gr:0}(),$t=function(){var rt=new d.PerspectiveCamera;rt.applyMatrix4(de.matrix),rt.position.set(0,0,0);var ot=i.works.getResolvedObserver(y.panoId),vt=ot!=null?ot:G;vt&&rt.quaternion.premultiply(vt.quaternion.clone().inverse()),rt.updateProjectionMatrix(),rt.updateMatrixWorld(!0);var At=new d.Frustum().setFromProjectionMatrix(new d.Matrix4().multiplyMatrices(rt.projectionMatrix,rt.matrixWorldInverse));return At}();y.panoId===Ue(this.currentPano)&&((c=y.leftPanoPicture)===null||c===void 0?void 0:c.map)instanceof ze&&(y.leftPanoPicture.map.update($t,Cr),y.leftPanoPicture.map.needsRender===!0&&(this.needsRender=!0));{var tt=this.tiling.object.visible;if(Cr>this.TILED_CUBE_TEXTURE_LEVEL&&this.initAnimationed){var qe=y.panoId,je=this.works.getResolvedObserver(qe);je?Kn(this.camera.position,je.position)&&this.locationMotion.ended?(this.tiling.object.visible=!0,this.tiling.panoId!==qe&&this.tiling.cleanup(),this.tiling.panoId=qe,this.tiling.setResource((h=(f=je.images)===null||f===void 0?void 0:f.tiles)!==null&&h!==void 0?h:[],this.enableIOSEDR&&je.images.luminance?je.images.luminance:null),this.tiling.setFetcher(nt(je.work)),this.tiling.setRotation(je.quaternion),this.tiling.setPosition(je.position),this.tiling.update($t,Cr,e)):this.tiling.object.visible=!1:this.tiling.object.visible=!1}else this.tiling.object.visible=!1;tt!==this.tiling.object.visible&&(this.tiling.object.needsRender=!0)}this.panoVideo.object.position.copy(this.camera.position),this.panoVideo.updateTime(e),!(!me||me.length<1)&&this.updateControllerHelper(me,e,r)}}},t.prototype.render=function(){var e=this.xrManager.getCamera(this.camera);this.renderer.render(this.scene,e)},t.prototype.onPanGesture=function(){},t.prototype.onTapGesture=function(){},t.prototype.onPinchGesture=function(){},t.prototype.onMouseMove=function(){},t.prototype.onMouseOut=function(){},t.prototype.panoResourceFromLocationMotionKeyframe=function(e){return this.panoResources[e.key]},t.prototype.updateControllerHelper=function(e,r,i){var a=this.xrControllerRay.left,o=this.xrControllerRay.right;if(!(!e||e.length===0)){for(var s={buttons:{X:!1,Y:!1,LeftTrigger:!1,LeftPinch:!1,A:!1,B:!1,RightTrigger:!1,RightPinch:!1}},u=0;u<e.length;u++){var l=e[u].handedness,c=e[u].gamepad;switch(l){case"left":c.axes&&(this.emitEvent(c.axes[2]===-1,"LeftAxesLeft",r),this.emitEvent(c.axes[2]===1,"LeftAxesRight",r),this.emitEvent(c.axes[3]===-1,"LeftAxesUp",r),this.emitEvent(c.axes[3]===1,"LeftAxesDown",r)),c!=null&&c.buttons&&(c.buttons[4]&&this.emitEvent(c.buttons[4].pressed,"X",r),c.buttons[5]&&this.emitEvent(c.buttons[5].pressed,"Y",r),c.buttons[0]&&this.emitEvent(c.buttons[0].pressed,"LeftTrigger",r),c.buttons[1]&&this.emitEvent(c.buttons[1].pressed,"LeftPinch",r));var f={raycaster:a,axes:{up:c.axes&&c.axes[3]<0?Math.abs(c.axes[3]):0,down:c.axes&&c.axes[3]<0?0:Math.abs(c.axes[3]),left:c.axes&&c.axes[2]<0?Math.abs(c.axes[2]):0,right:c.axes&&c.axes[2]<0?0:Math.abs(c.axes[2])},deltaTime:i};s.buttons.X=c.buttons&&c.buttons[4]?c.buttons[4].pressed:!1,s.buttons.Y=c.buttons&&c.buttons[5]?c==null?void 0:c.buttons[5].pressed:!1,s.buttons.LeftTrigger=c.buttons&&c.buttons[0]?c==null?void 0:c.buttons[0].pressed:!1,s.buttons.LeftPinch=c.buttons&&c.buttons[1]?c==null?void 0:c.buttons[1].pressed:!1,s.left=f;break;case"right":c.axes&&(this.emitEvent(c.axes[2]===-1,"RightAxesLeft",r),this.emitEvent(c.axes[2]===1,"RightAxesRight",r),this.emitEvent(c.axes[3]===-1,"RightAxesUp",r),this.emitEvent(c.axes[3]===1,"RightAxesDown",r)),c.buttons&&(c.buttons[4]&&this.emitEvent(c.buttons[4].pressed,"A",r),c.buttons[5]&&this.emitEvent(c.buttons[5].pressed,"B",r),c.buttons[0]&&this.emitEvent(c.buttons[0].pressed,"RightTrigger",r),c.buttons[1]&&this.emitEvent(c.buttons[1].pressed,"RightPinch",r));var h={raycaster:o,axes:{up:c.axes&&c.axes[3]<0?Math.abs(c.axes[3]):0,down:c.axes&&c.axes[3]<0?0:Math.abs(c.axes[3]),left:c.axes&&c.axes[2]<0?Math.abs(c.axes[2]):0,right:c.axes&&c.axes[2]<0?0:Math.abs(c.axes[2])},deltaTime:i};s.right=h,s.buttons.A=c.buttons&&c.buttons[4]?c==null?void 0:c.buttons[4].pressed:!1,s.buttons.B=c.buttons&&c.buttons[5]?c==null?void 0:c.buttons[5].pressed:!1,s.buttons.RightTrigger=c.buttons&&c.buttons[0]?c==null?void 0:c.buttons[0].pressed:!1,s.buttons.RightPinch=c.buttons&&c.buttons[1]?c==null?void 0:c.buttons[1].pressed:!1;break}}this.emit("xr.controller.update",J("xr.controller.update",s))}},t.prototype.emitEvent=function(e,r,i){var a=this.xrControllerRay.left,o=this.xrControllerRay.right;if(e)if(this.xrControllerState[r].touchStart===!1)this.xrControllerState[r].touchStartTime=i,this.xrControllerState[r].touchStart=!0,this.emit("xr.gesture.buttonDown",J("xr.gesture.buttonDown",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!1,isFirst:!0,controllers:{raycaster:{leftRay:a,rightRay:o}}}));else{var s=i-this.xrControllerState[r].touchStartTime;s>Qs&&this.emit("xr.gesture.press",J("xr.gesture.tap",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!0,isFirst:!0,controllers:{raycaster:{leftRay:a,rightRay:o}}}))}else if(this.xrControllerState[r].touchStart===!0){this.emit("xr.gesture.buttonUp",J("xr.gesture.buttonUp",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!0,isFirst:!1,controllers:{raycaster:{leftRay:a,rightRay:o}}}));var s=i-this.xrControllerState[r].touchStartTime;if(s<=Qs){var u=J("xr.gesture.tap",{session:this.xrManager.session,machineType:this.xrManager.machineType,buttons:r,isFinal:!0,isFirst:!1,controllers:{raycaster:{leftRay:a,rightRay:o}}}),l=this.emit("xr.gesture.tap",u);!l&&!u.defaultPrevented&&r==="RightTrigger"&&this.checkSelectedPano(this.xrControllerRay.right)}this.xrControllerState[r].touchStart=!1,this.xrControllerState[r].touchStartTime=0}},t}(so),Ft={Floorplan:Va,Topview:Wf,Panorama:so,VRPanorama:Wh,Model:_h,Mapview:sp,XRPanorama:Pp},gu=["gesture.pan","gesture.tap","gesture.press","gesture.pinch","gesture.mousewheel","gesture.mousemove","gesture.momentum","initAnimation.start","initAnimation.end","camera.update","intersect.update","pano.select","pano.moveTo","pano.moving","pano.arrived","pano.cancel","pano.error","pano.texture.load","pano.texture.progress","pano.texture.success","pano.texture.error","pano.texture.abort","xr.session.start","xr.session.end","xr.gesture.tap","xr.gesture.press","xr.gesture.buttonUp","xr.gesture.buttonDown","xr.controller.update"];function Bp(n){n.on("initAnimation.start",function(t){n.emit("initAnimationWillStart",t.state.panoIndex,t.state,t.userAction)}),n.on("initAnimation.end",function(t){n.emit("initAnimationEnded",t.state.panoIndex,t.state,t.userAction)}),n.on("gesture.pan",function(t){var e=!1;e=n.emit("wantsGesture","pan",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsPanGesture",t.state,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","pan",t.pointers,t.isFinal),n.emit("panGesture",t.state,t.isFinal))}),n.on("gesture.tap",function(t){var e=!1;e=n.emit("wantsGesture","tap",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsTapGesture",t.center.raycaster,t.center.coords,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","tap",t.pointers,t.isFinal),n.emit("tapGesture",t.center.raycaster,t.center.coords,t.isFinal))}),n.on("gesture.press",function(t){var e=!1;e=n.emit("wantsGesture","press",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsPressGesture",t.center.raycaster,t.center.coords,t.center.delta,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","press",t.pointers,t.isFinal),n.emit("pressGesture",t.center.raycaster,t.center.coords,t.center.delta,t.isFinal))}),n.on("gesture.pinch",function(t){var e=!1;e=n.emit("wantsGesture","pinch",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsPinchGesture",t.scale,t.state.fov,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","pinch",t.pointers,t.isFinal),n.emit("pinchGesture",t.scale,t.state.fov,t.isFinal))}),n.on("gesture.mousewheel",function(t){var e=!1;e=n.emit("wantsGesture","mouseWheel",t.pointers,t.isFinal),e&&t.preventDefault(),e=n.emit("wantsMouseWheel",t.center.delta,t.state.fov,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","mouseWheel",t.pointers,t.isFinal),n.emit("mouseWheel",t.center.delta,t.state.fov,t.isFinal))}),n.on("gesture.mousemove",function(t){var e=!1;e=n.emit("wantsGesture","mouseMove",t.pointers,t.isFinal),e&&t.preventDefault(),t.defaultPrevented||(n.emit("gesture","mouseMove",t.pointers,t.isFinal),e=n.emit("wantsChangeCameraFov",t.state.fov),e&&t.preventDefault())}),n.on("gesture.momentum",function(t){var e=!1;e=n.emit("wantsInteriaPan",t.state),e&&t.preventDefault(),t.defaultPrevented||n.emit("interiaPan",t.state,t.isFinal)}),n.on("camera.update",function(t){n.emit("cameraFovUpdate",t.state.fov,t.userAction),n.emit("cameraDirectionUpdate",t.state,t.userAction);var e=Vt(t.state);e.setLength(t.state.distance);var r=t.state.offset.clone().sub(e);n.emit("cameraPositionUpdate",r,t.userAction),n.emit("cameraUpdate",t.state,t.userAction)}),n.on("intersect.update",function(t){if(t.intersection){var e=!1;e=n.emit("wantsShowIntersectionOnModel",t.raycaster),e&&t.preventDefault(),t.defaultPrevented||n.emit("intersectionOnModelUpdate",t.intersection,t.object)}else n.emit("intersectionHidden")}),n.on("pano.request",function(t){var e=n.emit("wantsMoveToPano",t.state.panoIndex,t.options,t.userAction);e||(e=n.emit("wantsToMoveToPano",t.state.panoIndex,t.options,t.userAction)),e&&t.preventDefault(),t.defaultPrevented||n.emit("panoWillLoad",t.state.panoIndex)}),n.on("pano.select",function(t){n.emit("panoSelected",t.state.panoIndex)}),n.on("pano.moveTo",function(t){n.emit("panoLoaded",t.state.panoIndex),n.emit("moveToPano",t.state.panoIndex,t.userAction),n.emit("panoWillArrive",t.state.panoIndex,t.state,t.userAction)}),n.on("pano.moving",function(t){n.emit("movingToPano",t.state.panoIndex,t.prevPano.panoIndex,t.progress)}),n.on("pano.arrived",function(t){n.emit("panoArrived",t.state.panoIndex,t.state,t.userAction)}),n.on("pano.cancel",function(t){n.emit("moveToPanoCanceled",t.state.panoIndex)}),n.on("pano.error",function(t){n.emit("panoLoadError",t.error,t.state.panoIndex)}),n.on("pano.texture.load",function(t){n.emit("textureStartLoad",t.pano.panoIndex)}),n.on("pano.texture.success",function(t){n.emit("textureLoaded",t.pano.panoIndex,t.meta)}),n.on("pano.texture.error",function(t){n.emit("textureError",t.error,t.pano.panoIndex)}),n.on("pano.texture.abort",function(t){n.emit("textureAbort",t.pano.panoIndex)}),n.on("pano.texture.progress",function(t){n.emit("textureLoading",t.progress,t.pano.panoIndex)}),n.on("xr.session.start",function(t){n.emit("webXRSessionStart")}),n.on("xr.session.end",function(t){n.emit("webXRSessionEnd")}),n.on("xr.gesture.tap",function(t){n.emit("webXRControllerEvent","tap",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.gesture.press",function(t){n.emit("webXRControllerEvent","press",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.gesture.buttonUp",function(t){n.emit("webXRControllerEvent","buttonUp",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.gesture.buttonDown",function(t){n.emit("webXRControllerEvent","buttonDown",t.buttons,{raycaster:t.controllers.raycaster})}),n.on("xr.controller.update",function(t){n.emit("webXRControllerRayUpdate",{leftRay:t.left?t.left.raycaster:void 0,rightRay:t.right?t.right.raycaster:void 0}),t.left&&n.emit("webXRAxesUpdate","left",{raycaster:{leftRay:t.left?t.left.raycaster:void 0,rightRay:t.right?t.right.raycaster:void 0},axesState:{up:t.left.axes.up,down:t.left.axes.down,left:t.left.axes.left,right:t.left.axes.right},deltaTime:t.left.deltaTime}),t.right&&n.emit("webXRAxesUpdate","right",{raycaster:{leftRay:t.left?t.left.raycaster:void 0,rightRay:t.right?t.right.raycaster:void 0},axesState:{up:t.right.axes.up,down:t.right.axes.down,left:t.right.axes.left,right:t.right.axes.right},deltaTime:t.right.deltaTime})}),n.on("works.request",function(t){n.emit("willLoad",t.input,t.works[0],t.state)}),n.on("works.load",function(t){n.emit("load",t.input,t.works[0],t.state)}),n.on("works.ready",function(t){n.emit("loaded",t.input,t.works[0])}),n.on("state.change",function(t){n.emit("stateChange",t.state,t.userAction)}),n.on("currentState.change",function(t){n.emit("currentStateChange",t.state,t.userAction)}),n.on("state.set",function(t){n.emit("setState",t.state)}),n.on("state.synced",function(t){n.emit("stateSynced",t.state)}),n.on("model.request",function(t){n.emit("modelWillLoad",t.work.model)}),n.on("model.error",function(t){n.emit("modelLoadError",t.error,t.model)}),n.on("model.load",function(t){n.emit("modelLoaded",t.model)}),n.on("model.changeShownFloor",function(t){n.emit("modelShownFloorChange",t.model.shownFloor,t.model.floorLength)}),n.on("render",function(t){n.emit("renderFrame",t.needsRender)}),n.on("mode.change.request",function(t){n.emit("wantsChangeMode",t.mode,t.prevMode)}),n.on("mode.change",function(t){n.emit("modeChange",t.mode,t.prevMode,t.state.panoIndex,t.state,t.userAction)}),n.on("helpers.visible",function(t){n.emit("helpersVisibleChange",t.object.visible)}),n.on("network.resource",function(t){n.emit("network",t.source,t.requestType,t.requestState,t.detail)})}function Rp(){if(typeof window!="undefined"){var n=document.createElement("video");n.loop=!0,n.autoplay=!0,n.playsInline=!0,n.muted=!0,n.crossOrigin="";var t=function(){document.removeEventListener("touchstart",t,!1),document.removeEventListener("mousedown",t,!1),n.muted=!1};return document.addEventListener("touchstart",t,!1),document.addEventListener("mousedown",t,!1),n}else return{}}function Fp(n){{var t=new d.DirectionalLight(16777215,.3);t.position.copy(new d.Vector3(1,1,1)),n.add(t)}{var t=new d.DirectionalLight(16777215,.1);t.position.copy(new d.Vector3(-1,-1,-1)),n.add(t)}{var t=new d.DirectionalLight(16777215,.1);n.add(t)}{var t=new d.AmbientLight(16777215,.6);n.add(t)}}function kp(n){for(var t,e,r={},i=n.split(/(\;|\,)/),a=0,o=i;a<o.length;a++){var s=o[a],u=s.split("="),l=(t=u[0])===null||t===void 0?void 0:t.trim(),c=(e=u[1])===null||e===void 0?void 0:e.trim();l&&c&&(r[l]=c)}return r}function yu(){var n;if(typeof document!="undefined")for(var t=document.getElementsByTagName("meta"),e=0;e<t.length;e++){var r=t[e];if(r.getAttribute("name")==="viewport"){var i=kp((n=r.getAttribute("content"))!==null&&n!==void 0?n:""),a=Number(i["initial-scale"]);if(!isNaN(a))return a}}return 1}const Lp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAV8AAAA/CAQAAADtPwPkAAAR+0lEQVR4AezYg3LEQACH8d1cbdu23Q5qG9G47z/TN/h6tn2b/H+TUTLc7yjcOXV46OUAnUs6EbUp022ZBXc1NhoZYYd7fjDRvdcHAwrlK2QBVJ4sgoqONmY45RUT23sZ6H42F2hK5CtkMbjhZlDmUUcvq1zyieUVyjbE4I1GBfItwxG56YaUZTQwyh4P6NgJ4YYYvCuQb5kOyI03pORjiqe4Lwpq5pt1vJqfUwKWJVbSMYfppYconG+maNNQOWBZuwHTzicGel75NtFOkxr5apmV8cikcko0DrDQs863AeGl0cE0+1xy573m0/wf0cEKW6H7BWtggiMG8sy3oHRDpJMw4NWb6am/bv9znkqEzjd61t5oo5clTrjhwevO75EJRBKSRt745Z16ZEjcM73sccZplBPm8PyTcxZAkSRdHm/acJ0Z3JZhHB0BxqDHgWFZFmm0ZbCw87twI/zc3e/Cz93vPneXtU/WdQS3oTviXdY/q5PsJKfoGuQjZuO/0in1qsj85cuXrxqeAOJpGqdJOqrUutgVl2Qb0BWqp/RE8AWWVB7t2KrIzY2Wx2fWKl7yfswgxqj8lYummYa3hfwF9M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KQisbPLJDv3jNSLq9OkYBEIihKIj3v7S1TRQCX5Kdl1ZQlol7LF+E++fwirfiq2sf4cTXxc6hzxffPuLEeqSWrPGWMF58TWr5viyJAP5/4EV4KePiaSE8eNRgjDy8/tyRW+FZjhS+2tlovNJovtJovNJ0uhK6Wo64SDdxEbM//KesjwAAAABJRU5ErkJggg==";var Us=[351,63],qs=[20,20],Op=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),Vp=new Float32Array([0,0,1,0,0,1,1,1]),Np=new Uint8Array([0,1,2,1,3,2]),Li=new d.BufferGeometry;Li.setAttribute("position",new d.BufferAttribute(Op,3));Li.setAttribute("uv",new d.BufferAttribute(Vp,2));Li.setIndex(new d.BufferAttribute(Np,1));var hi=new d.MeshBasicMaterial({transparent:!0,depthTest:!1,depthWrite:!1,stencilWrite:!1,fog:!1}),bu=new d.Mesh(Li,hi);bu.matrixAutoUpdate=!1;var ho=new d.Scene;ho.add(bu);ho.matrixAutoUpdate=!1;var jn=new d.OrthographicCamera(-.5,.5,.5,-.5,.1,1);jn.position.set(0,0,.5);jn.lookAt(0,0,0);jn.updateMatrixWorld(!0);jn.matrixAutoUpdate=!1;var zp=new d.Vector4,Qp=new d.Vector4;function Hs(n){if(hi.map){var r=n.getViewport(zp),i=n.getScissor(Qp),a=n.getScissorTest(),o=n.autoClear,s=i.x+qs[0]/3,u=i.y+qs[1]/3,l=Us[0]/3,c=Us[1]/3;n.setViewport(s,u,l,c),n.setScissor(s,u,l,c),n.setScissorTest(!0),n.autoClear=!1,n.render(ho,jn),n.setViewport(r),n.setScissor(i),n.setScissorTest(a),n.autoClear=o}else{var t=new d.Texture,e=new Image;e.onload=function(){t.image=e,t.wrapS=d.ClampToEdgeWrapping,t.wrapT=d.ClampToEdgeWrapping,t.minFilter=d.LinearFilter,t.needsUpdate=!0,t.generateMipmaps=!1,hi.needsUpdate=!0,e.onload=Q},e.src=Lp,hi.map=t}}var Dp=800,Gs=90,Up=function(n){return n.replace("//vrlab-public.ljcdn.com/","//vr-public.realsee-cdn.cn/").replace("//vrlab-image4.ljcdn.com/","//vr-image-4.realsee-cdn.cn/").replace("//vrlab-image3.ljcdn.com/","//vr-image-3.realsee-cdn.cn/").replace("//vrlab-image2.ljcdn.com/","//vr-image-2.realsee-cdn.cn/").replace("//vrlab-image1.ljcdn.com/","//vr-image-1.realsee-cdn.cn/")},En=new d.Vector2,ii=new d.Frustum,ai=new d.Matrix4,Ks=new WeakMap,Aa=new WeakMap,js=Ra([]),wu=function(n){pe(t,n);function t(e){e===void 0&&(e={});var r,i,a,o,s,u,l,c,f,h=n.call(this)||this;if(h.ident=wt(),typeof window!="undefined"&&(za.instances[h.ident]=h),h.renderSwitch01=0,h.currentMode="Panorama",h.pano={workCode:"",panoIndex:0},h.needsRender=!1,h.onlyRenderIfNeeds=(r=e.onlyRenderIfNeeds)!==null&&r!==void 0?r:!0,h.imageOptions=k({},(i=e.imageOptions)!==null&&i!==void 0?i:{}),h.textureOptions=k({},(a=e.textureOptions)!==null&&a!==void 0?a:{}),h.poweredByRealsee=(o=e.poweredByRealsee)!==null&&o!==void 0?o:!0,h.extraElements=[],h.controllerInits={Panorama:Object.assign({},e.panorama),Model:Object.assign({},e.model),Floorplan:Object.assign({},e.floorplan),Topview:Object.assign({},e.topview),Mapview:Object.assign({},e.mapview),VRPanorama:Object.assign({},e.vrPanorama),XRPanorama:Object.assign({},e.xrPanorama)},h.fps={testCount:0,testTime:Me()},h.info=null,h.modeChangeDuration=(s=e.modeChangeDuration)!==null&&s!==void 0?s:Dp,h.enableWheel=(u=e.enableWheel)!==null&&u!==void 0?u:!0,typeof window!="undefined")if("renderer"in e)e.renderer instanceof Jr&&h.throwError(new Error("cannot render a internal renderer")),h.renderer=e.renderer;else try{h.renderer=new Jr({preserveDrawingBuffer:e.preserveDrawingBuffer,backgroundColor:e.backgroundColor,backgroundAlpha:e.backgroundAlpha,antialias:e.antialias,webgl2:e==null?void 0:e.webgl2});var m=yu();h.renderer.setPixelRatio(m===1?window.devicePixelRatio:1),h.renderer.setSize(512,512)}catch(M){M instanceof Error&&h.throwError(M)}h.getPixelsRenderTarget=new d.WebGLRenderTarget(1,1,{encoding:(c=(l=h.renderer)===null||l===void 0?void 0:l.outputEncoding)!==null&&c!==void 0?c:d.sRGBEncoding}),h.scissor=Object.assign({left:0,bottom:0,width:1,height:1},e.scissor),h.camera=new Pi(Gs),h.scene=new f0,h.xrCustomObjectsScene=new d.Scene,h.scene.add(h.xrCustomObjectsScene),h.scene.matrixAutoUpdate=!1,h.lastLoadWorkTask=Promise.resolve(),h.requestProxy=(f=e.requestProxy)!==null&&f!==void 0?f:Up,h.networkSubscribe=new e0,h.networkSubscribe.on("network",function(M,C,I,T){var P;h.emit("network.resource",J("network.resource",{source:M,requestType:C,requestState:I,detail:T})),(P=h.analysis)===null||P===void 0||P.network(h.works,M,C,I,T)}),h.boundingMesh=Uf(new d.Box3(new d.Vector3(-.5,-.5,-.5),new d.Vector3(.5,.5,.5))),h.boundingMesh.name="bounding",h.scene.add(h.boundingMesh),h.models=ms(),h.models.push(new ka),h.lastModels=ms(),h.lastWorks=Ra([]),h.readyCallbacks=[],h.syncingState=!1,h.modelGroup=new d.Group,h.modelGroup.visible=!1,h.modelGroup.name="model",h.modelGroup.matrixAutoUpdate=!1,h.modelGroup.renderOrder=-4,h.scene.add(h.modelGroup),h.helperGroup=new d.Group,h.helperGroup.name="helper",h.helperGroup.matrixAutoUpdate=!1,h.scene.add(h.helperGroup),h.videoTexture=new d.VideoTexture(e.videoInstance||Rp()),Fp(h.scene),h.copyEffect=new Fi(h.renderer,h.scene,h.camera,h.models),h.state={mode:h.currentMode,workCode:h.pano.workCode,panoIndex:h.pano.panoIndex,longitude:h.camera.pose.longitude,latitude:h.camera.pose.latitude,fov:h.camera.pose.fov,offset:h.camera.pose.offset.clone(),distance:h.camera.pose.distance},h.stateSynced=!1,h._enableIOSEDR=!1,h.destroyed=!1,h.paused=!0,typeof window!="undefined"&&(e.play!==!1&&h.play(),h.stopAnimationLoop=ut.shared.add(function(M,C){for(var I=[],T=2;T<arguments.length;T++)I[T-2]=arguments[T];h.updateTime.apply(h,yt([M,C],I,!1))},!1,0,10));var A=function(){typeof document!="undefined"&&document.fullscreenElement===null&&h.currentMode==="VRPanorama"&&h.controller.emit("vr.requestExit",J("vr.requestExit",{}))},p=function(){h.needsRender=!0};if(typeof document!="undefined"&&document.addEventListener("fullscreenchange",A,!1),h.renderer&&h.renderer.domElement.addEventListener("webglcontextrestored",p,!1),h.removeEventListeners=function(){typeof document!="undefined"&&document.removeEventListener("fullscreenchange",A,!1),h.renderer&&h.renderer.domElement.removeEventListener("webglcontextrestored",p,!1)},h.plugins={},e.plugins&&e.plugins.length)for(var g=0,v=e.plugins;g<v.length;g++){var y=v[g];if(typeof y=="function")y(h);else if(Array.isArray(y)){var b=y[0],w=y[1],E=y[2];if(typeof b=="function"){var x=b(h,E);typeof w=="string"&&(h.plugins[w]?h.throwError(new Error("plugin name ".concat(w," is exists."))):h.plugins[w]=x)}}}return h.gpuPickingRenderTarget=new d.WebGLRenderTarget(1,1),h.meshReplaceMaterialMap=new Map,h.meshOriginMaterialMap=new Map,Bp(h),h}return Object.defineProperty(t,"version",{get:function(){return"6.0.0-alpha.106"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"dracoPath",{get:function(){return wi.decoderPath},set:function(e){wi.setDecoderPath(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"ktx2Path",{get:function(){return Ln.transcoderPath},set:function(e){Ln.setTranscoderPath(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panoIndex",{get:function(){return this.pano.panoIndex},enumerable:!1,configurable:!0}),t.prototype.getGPUPicking=function(e,r,i,a,o){var s=this;if(a===void 0&&(a=1),o===void 0&&(o=new d.Vector3(0,0,0)),!this.renderer)throw new Error("renderer is not initialized.");this.models.setMaterial({constantColor:o}),this.scene.traverse(function(f){if(!(!(f instanceof d.Mesh)||f instanceof It)){var h=Object.keys(i).filter(function(A){return A===f.uuid})[0];if(h)if(s.meshOriginMaterialMap.set(h,f.material),s.meshReplaceMaterialMap.get(h))f.material=s.meshReplaceMaterialMap.get(h);else{var m=new d.ShaderMaterial({uniforms:{color:{value:i[h]}},vertexShader:`
2014
2014
  void main() {
2015
2015
  vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
2016
2016
  gl_Position = projectionMatrix * mvPosition;
package/five/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2024/6/19
5
- * Version: 6.0.0-alpha.105
4
+ * Generated: 2024/6/25
5
+ * Version: 6.0.0-alpha.106
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -20524,7 +20524,7 @@ var op = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA
20524
20524
  }
20525
20525
  return Object.defineProperty(t, "version", {
20526
20526
  get: function() {
20527
- return "6.0.0-alpha.105";
20527
+ return "6.0.0-alpha.106";
20528
20528
  },
20529
20529
  enumerable: !1,
20530
20530
  configurable: !0
@@ -22064,7 +22064,7 @@ var Np = 800, Ds = 90, zp = function(n) {
22064
22064
  }
22065
22065
  return Object.defineProperty(t, "version", {
22066
22066
  get: function() {
22067
- return "6.0.0-alpha.105";
22067
+ return "6.0.0-alpha.106";
22068
22068
  },
22069
22069
  enumerable: !1,
22070
22070
  configurable: !0